Return-Path: Delivered-To: apache-cvs-archive@hyperreal.org Received: (qmail 6528 invoked by uid 6000); 10 Aug 1999 11:31:56 -0000 Received: (qmail 6511 invoked by alias); 10 Aug 1999 11:31:54 -0000 Delivered-To: apache-1.3-cvs@hyperreal.org Received: (qmail 6505 invoked by uid 177); 10 Aug 1999 11:31:54 -0000 Date: 10 Aug 1999 11:31:53 -0000 Message-ID: <19990810113153.6504.qmail@hyperreal.org> From: martin@hyperreal.org To: apache-1.3-cvs@hyperreal.org Subject: cvs commit: apache-1.3/src/ap ap_sha1.c Sender: apache-cvs-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org 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 Changes Path 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);