view src/md5.h @ 70866:7d0efe895341

(org-open-at-point): Use renamed variable `org-confirm-shell-link-function'. (org-confirm-shell-link-function): Renamed from `org-confirm-shell-links'. (org-export-directory): New function. (org-export-as-ascii, org-export-as-html, org-export-as-xoxo) (org-export-icalendar): Use `org-export-directory'. (org-indent-item): Keep cursor position. (org-link-file-path-type): New option. (org-export-as-html): Fixed bug with plain lists starting in column 0. (org-export-as-html): Removed deadline formatting, this happens now already in `org-html-handle-time-stamps'. (org-export-html-style): Deadline class removed. (org-insert-labeled-timestamps-at-point): New option. (org-cycle, org-occur, org-scan-tags): Use `org-overview' instead of `hide-sublevels 1', in case the first headline is not level 1. (org-overview, org-content): New fuction. (org-cycle-global-status, org-cycle-subtree-status): Make these variables buffer-local. (org-global-cycle): New command. (org-shifttab): Use `org-global-cycle'. (org-insert-heading, org-insert-item): Go to end of new headline/item after creating it. (org-export-visible): Renames from `org-export-copy-visible'. Now creates a temporary org-file and applies an exporting command to it. (org-table-eval-formula): Support for lisp forms. (org-agenda-todo-ignore-scheduled): New option. (org-agenda-get-todos): Use new option `org-agenda-todo-ignore-scheduled'. (org-export-html-inline-images): New value `maybe'. (org-export-as-html): Inlining of images dependent on link description. (org-archive-subtree): Check for end-of-buffer before trying `kill-line'. (org-agenda-follow-mode): New option. (org-export-with-tags, org-export-with-timestamps): New options. (org-html-handle-time-stamps): New function. (org-keyword-time-regexp): New variable. (org-agenda-get-todos): Use `org-agenda-todo-list-sublevels'. (org-agenda-todo-list-sublevels): New option. (org-html-level-start): When TITLE is nil, just close all levels. (org-parse-key-lines, org-parse-export-options): Functions removed, replaced by `org-infile-export-plist'. (org-combine-plists, org-infile-export-plist) (org-default-export-plist): New functions. (org-export-html-preamble, org-export-html-postamble) (org-export-html-auto-preamble, org-export-html-auto-postamble): New variables. (org-export-publishing-directory): New option. (org-export-as-html, org-export-as-ascii): Use the new property lists for settings. (org-export-copy-visible, org-export-as-xoxo): Respect `org-export-publishing-directory'. (org-link-search, org-store-link, org-file-apps): Support for links to BibTeX database entries.. (org-get-current-options, org-set-regexps-and-options): Implement logging as a startup option. (org-store-link): Make sure context string is never empty (org-insert-link): Use relative path when possible. (org-at-item-checklet-p): New function. (org-shifttab, org-shiftmetaleft, org-shiftmetaright) (org-shiftmetaup, org-shiftmetadown, org-metaleft) (org-metaright, org-metaup, org-metadown, org-shiftup) (org-shiftdown, org-shiftright, org-shiftleft) (org-ctrl-c-ctrl-c, org-cycle, org-return, org-meta-return): Dispatch using `call-interactively'. (org-call-with-arg): New defsubst. (org-tag-alist, org-use-fast-tag-selection): New options. (org-complete): Use `org-tag-alist'. (org-fast-tag-insert, org-fast-tag-selection): New functions. (org-next-item, org-previous-item): New commands. (org-beginning-of-item, org-end-of-item): Added (interactive) to make command. (org-shiftup, org-shiftdown): Accommodate the item-navigation commands.
author Carsten Dominik <dominik@science.uva.nl>
date Wed, 24 May 2006 07:54:46 +0000
parents 3bd95f4f2941
children 751c24f0ec88 c5406394f567
line wrap: on
line source

/* Declaration of functions and data types used for MD5 sum computing
   library functions.
   Copyright (C) 1995, 1996, 1997, 1999, 2000, 2002, 2003, 2004,
                 2005, 2006 Free Software Foundation, Inc.
   This file is part of GNU Emacs.

   The GNU C Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public License as
   published by the Free Software Foundation; either version 2 of the
   License, or (at your option) any later version.

   The GNU C Library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public
   License along with the GNU C Library; see the file COPYING.LIB.  If not,
   write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
   Boston, MA 02110-1301, USA.  */

#ifndef _MD5_H
#define _MD5_H 1

#include <stdio.h>

#if defined HAVE_LIMITS_H || _LIBC
# include <limits.h>
#endif

/* The following contortions are an attempt to use the C preprocessor
   to determine an unsigned integral type that is 32 bits wide.  An
   alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
   doing that would require that the configure script compile and *run*
   the resulting executable.  Locally running cross-compiled executables
   is usually not possible.  */

#ifdef _LIBC
# include <sys/types.h>
typedef u_int32_t md5_uint32;
#else
# if defined __STDC__ && __STDC__
#  define UINT_MAX_32_BITS 4294967295U
# else
#  define UINT_MAX_32_BITS 0xFFFFFFFF
# endif

/* If UINT_MAX isn't defined, assume it's a 32-bit type.
   This should be valid for all systems GNU cares about because
   that doesn't include 16-bit systems, and only modern systems
   (that certainly have <limits.h>) have 64+-bit integral types.  */

# ifndef UINT_MAX
#  define UINT_MAX UINT_MAX_32_BITS
# endif

# if UINT_MAX == UINT_MAX_32_BITS
   typedef unsigned int md5_uint32;
# else
#  if USHRT_MAX == UINT_MAX_32_BITS
    typedef unsigned short md5_uint32;
#  else
#   if ULONG_MAX == UINT_MAX_32_BITS
     typedef unsigned long md5_uint32;
#   else
     /* The following line is intended to evoke an error.
        Using #error is not portable enough.  */
     "Cannot determine unsigned 32-bit data type."
#   endif
#  endif
# endif
#endif


#ifndef __GNUC__
#define __attribute__(X)
#define __alignof__(X) 1
#endif

/* Structure to save state of computation between the single steps.  */
struct md5_ctx
{
  md5_uint32 A;
  md5_uint32 B;
  md5_uint32 C;
  md5_uint32 D;

  md5_uint32 total[2];
  md5_uint32 buflen;
  char buffer[128] __attribute__ ((__aligned__ (__alignof__ (md5_uint32))));
};

/*
 * The following three functions are build up the low level used in
 * the functions `md5_stream' and `md5_buffer'.
 */

/* Initialize structure containing state of computation.
   (RFC 1321, 3.3: Step 3)  */
extern void md5_init_ctx __P ((struct md5_ctx *ctx));

/* Starting with the result of former calls of this function (or the
   initialization function update the context for the next LEN bytes
   starting at BUFFER.
   It is necessary that LEN is a multiple of 64!!! */
extern void md5_process_block __P ((const void *buffer, size_t len,
				      struct md5_ctx *ctx));

/* Starting with the result of former calls of this function (or the
   initialization function update the context for the next LEN bytes
   starting at BUFFER.
   It is NOT required that LEN is a multiple of 64.  */
extern void md5_process_bytes __P ((const void *buffer, size_t len,
				      struct md5_ctx *ctx));

/* Process the remaining bytes in the buffer and put result from CTX
   in first 16 bytes following RESBUF.  The result is always in little
   endian byte order, so that a byte-wise output yields to the wanted
   ASCII representation of the message digest.

   IMPORTANT: On some systems it is required that RESBUF is correctly
   aligned for a 32 bits value.  */
extern void *md5_finish_ctx __P ((struct md5_ctx *ctx, void *resbuf));


/* Put result from CTX in first 16 bytes following RESBUF.  The result is
   always in little endian byte order, so that a byte-wise output yields
   to the wanted ASCII representation of the message digest.

   IMPORTANT: On some systems it is required that RESBUF is correctly
   aligned for a 32 bits value.  */
extern void *md5_read_ctx __P ((const struct md5_ctx *ctx, void *resbuf));


/* Compute MD5 message digest for bytes read from STREAM.  The
   resulting message digest number will be written into the 16 bytes
   beginning at RESBLOCK.  */
extern int md5_stream __P ((FILE *stream, void *resblock));

/* Compute MD5 message digest for LEN bytes beginning at BUFFER.  The
   result is always in little endian byte order, so that a byte-wise
   output yields to the wanted ASCII representation of the message
   digest.  */
extern void *md5_buffer __P ((const char *buffer, size_t len,
				void *resblock));

#endif /* md5.h */

/* arch-tag: 7cd389f3-6c40-4950-999d-0b2ebd1d20d7
   (do not change this comment) */