projects
/
chise
/
xemacs-chise.git-
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(=koseki): Fix DOC.
[chise/xemacs-chise.git-]
/
src
/
md5.c
diff --git
a/src/md5.c
b/src/md5.c
index
86fb828
..
ec1337c
100644
(file)
--- a/
src/md5.c
+++ b/
src/md5.c
@@
-29,10
+29,7
@@
#include <sys/types.h>
#include <string.h>
#include <stdio.h>
#include <sys/types.h>
#include <string.h>
#include <stdio.h>
-
-#if defined HAVE_LIMITS_H || _LIBC
-# include <limits.h>
-#endif
+#include <limits.h>
/* The following contortions are an attempt to use the C preprocessor
to determine an unsigned integral type that is 32 bits wide. An
/* The following contortions are an attempt to use the C preprocessor
to determine an unsigned integral type that is 32 bits wide. An
@@
-110,7
+107,7
@@
struct md5_ctx
static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ };
static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ };
-static void md5_process_block (CONST void *, size_t, struct md5_ctx *);
+static void md5_process_block (const void *, size_t, struct md5_ctx *);
/* Initialize structure containing state of computation.
/* Initialize structure containing state of computation.
@@
-133,7
+130,7
@@
md5_init_ctx (struct md5_ctx *ctx)
IMPORTANT: On some systems it is required that RESBUF is correctly
aligned for a 32 bits value. */
static void *
IMPORTANT: On some systems it is required that RESBUF is correctly
aligned for a 32 bits value. */
static void *
-md5_read_ctx (CONST struct md5_ctx *ctx, void *resbuf)
+md5_read_ctx (const struct md5_ctx *ctx, void *resbuf)
{
((md5_uint32 *) resbuf)[0] = SWAP (ctx->A);
((md5_uint32 *) resbuf)[1] = SWAP (ctx->B);
{
((md5_uint32 *) resbuf)[0] = SWAP (ctx->A);
((md5_uint32 *) resbuf)[1] = SWAP (ctx->B);
@@
-251,7
+248,7
@@
md5_buffer (const char *buffer, size_t len, void *resblock)
static void
static void
-md5_process_bytes (CONST void *buffer, size_t len, struct md5_ctx *ctx)
+md5_process_bytes (const void *buffer, size_t len, struct md5_ctx *ctx)
{
/* When we already have some bits in our internal buffer concatenate
both inputs first. */
{
/* When we already have some bits in our internal buffer concatenate
both inputs first. */
@@
-306,7
+303,7
@@
md5_process_bytes (CONST void *buffer, size_t len, struct md5_ctx *ctx)
It is assumed that LEN % 64 == 0. */
static void
It is assumed that LEN % 64 == 0. */
static void
-md5_process_block (CONST void *buffer, size_t len, struct md5_ctx *ctx)
+md5_process_block (const void *buffer, size_t len, struct md5_ctx *ctx)
{
md5_uint32 correct_words[16];
const md5_uint32 *words = (const md5_uint32 *) buffer;
{
md5_uint32 correct_words[16];
const md5_uint32 *words = (const md5_uint32 *) buffer;
@@
-482,7
+479,7
@@
md5_coding_system (Lisp_Object object, Lisp_Object coding, Lisp_Object istream,
{
/* Attempt to autodetect the coding of the string. This is
VERY hit-and-miss. */
{
/* Attempt to autodetect the coding of the string. This is
VERY hit-and-miss. */
- enum eol_type eol = EOL_AUTODETECT;
+ eol_type_t eol = EOL_AUTODETECT;
coding_system = Fget_coding_system (Qundecided);
determine_real_coding_system (XLSTREAM (istream),
&coding_system, &eol);
coding_system = Fget_coding_system (Qundecided);
determine_real_coding_system (XLSTREAM (istream),
&coding_system, &eol);
@@
-563,7
+560,7
@@
file-coding or Mule support. Otherwise, they are ignored.
CHECK_STRING (object);
get_string_range_byte (object, start, end, &bstart, &bend,
GB_HISTORICAL_STRING_BEHAVIOR);
CHECK_STRING (object);
get_string_range_byte (object, start, end, &bstart, &bend,
GB_HISTORICAL_STRING_BEHAVIOR);
- instream = make_lisp_string_input_stream (object, bstart, bend);
+ instream = make_lisp_string_input_stream (object, bstart, bend - bstart);
}
GCPRO1 (instream);
}
GCPRO1 (instream);
@@
-582,9
+579,9
@@
file-coding or Mule support. Otherwise, they are ignored.
while (1)
{
Bufbyte tempbuf[1024]; /* some random amount */
while (1)
{
Bufbyte tempbuf[1024]; /* some random amount */
- int size_in_bytes = Lstream_read (XLSTREAM (instream),
- tempbuf, sizeof (tempbuf));
- if (!size_in_bytes)
+ Lstream_data_count size_in_bytes =
+ Lstream_read (XLSTREAM (instream), tempbuf, sizeof (tempbuf));
+ if (size_in_bytes <= 0)
break;
/* Process the bytes. */
break;
/* Process the bytes. */