cvs commit: apache-1.3/src/ap ap_sha1.c

1999-08-10 Thread martin
martin  99/08/10 04:31:53

  Modified:src/ap   ap_sha1.c
  Log:
  Make ap_sha1.c compile for EBCDIC platforms:
  * replace remaining LONG types by AP_LONG
  * replace reference to renamed variable 'ubuf' by 'buffer'
  
  Revision  ChangesPath
  1.7   +8 -6  apache-1.3/src/ap/ap_sha1.c
  
  Index: ap_sha1.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/ap/ap_sha1.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ap_sha1.c 1999/08/08 18:18:41 1.6
  +++ ap_sha1.c 1999/08/10 11:31:53 1.7
  @@ -282,17 +282,19 @@
   int i;
   const AP_BYTE *buffer = (const AP_BYTE *) buf;
   
  -if ((sha_info-count_lo + ((LONG) count  3))  sha_info-count_lo) {
  +if ((sha_info-count_lo + ((AP_LONG) count  3))  sha_info-count_lo) {
++sha_info-count_hi;
   }
  -sha_info-count_lo += (LONG) count  3;
  -sha_info-count_hi += (LONG) count  29;
  +sha_info-count_lo += (AP_LONG) count  3;
  +sha_info-count_hi += (AP_LONG) count  29;
  +/* Is there a remainder of the previous Update operation? */
   if (sha_info-local) {
i = SHA_BLOCKSIZE - sha_info-local;
if (i  count) {
i = count;
}
  - ebcdic2ascii_strictly(((AP_BYTE *) sha_info-data) + sha_info-local, 
ubuf, i);
  + ebcdic2ascii_strictly(((AP_BYTE *) sha_info-data) + sha_info-local,
  +   buffer, i);
count -= i;
buffer += i;
sha_info-local += i;
  @@ -305,13 +307,13 @@
}
   }
   while (count = SHA_BLOCKSIZE) {
  - ebcdic2ascii_strictly(sha_info-data, buffer, SHA_BLOCKSIZE);
  + ebcdic2ascii_strictly((AP_BYTE *)sha_info-data, buffer, SHA_BLOCKSIZE);
buffer += SHA_BLOCKSIZE;
count -= SHA_BLOCKSIZE;
maybe_byte_reverse(sha_info-data, SHA_BLOCKSIZE);
sha_transform(sha_info);
   }
  -ebcdic2ascii_strictly(sha_info-data, buffer, count);
  +ebcdic2ascii_strictly((AP_BYTE *)sha_info-data, buffer, count);
   sha_info-local = count;
   #else
   ap_SHA1Update_binary(sha_info, (const unsigned char *) buf, count);
  
  
  


cvs commit: apache-1.3/src/ap ap_sha1.c

1999-08-08 Thread randy
randy   99/08/08 11:18:42

  Modified:src/ap   ap_sha1.c
  Log:
  Fix a warning on Win32.
  
  Revision  ChangesPath
  1.6   +1 -1  apache-1.3/src/ap/ap_sha1.c
  
  Index: ap_sha1.c
  ===
  RCS file: /home/cvs/apache-1.3/src/ap/ap_sha1.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ap_sha1.c 1999/08/08 17:58:34 1.5
  +++ ap_sha1.c 1999/08/08 18:18:41 1.6
  @@ -240,7 +240,7 @@
  const unsigned char *buffer,
  unsigned int count)
   {
  -int i;
  +unsigned int i;
   
   if ((sha_info-count_lo + ((AP_LONG) count  3))  sha_info-count_lo) {
++sha_info-count_hi;