|
From: <kar...@us...> - 2006-04-06 01:03:04
|
Revision: 1213 Author: karstenw Date: 2006-04-05 18:02:50 -0700 (Wed, 05 Apr 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1213&view=rev Log Message: ----------- parameter unused & name conflict fixes Modified Paths: -------------- Frontier/trunk/Common/source/md5.c Frontier/trunk/Common/source/quickdraw.c Frontier/trunk/Common/source/uisharing.c Modified: Frontier/trunk/Common/source/md5.c =================================================================== --- Frontier/trunk/Common/source/md5.c 2006-04-06 01:00:11 UTC (rev 1212) +++ Frontier/trunk/Common/source/md5.c 2006-04-06 01:02:50 UTC (rev 1213) @@ -126,38 +126,37 @@ unsigned char *input; /* input block */ unsigned int inputLen; /* length of input block */ { - unsigned int i, index, partLen; - - /* Compute number of bytes mod 64 */ - index = (unsigned int)((context->count[0] >> 3) & 0x3F); - - /* Update number of bits */ - if ((context->count[0] += ((UINT4)inputLen << 3)) < ((UINT4)inputLen << 3)) - context->count[1]++; - - context->count[1] += ((UINT4)inputLen >> 29); - - partLen = 64 - index; - - /* Transform as many times as possible. -*/ - if (inputLen >= partLen) { - MD5_memcpy - ((POINTER)&context->buffer[index], (POINTER)input, partLen); - MD5Transform (context->state, context->buffer); - - for (i = partLen; i + 63 < inputLen; i += 64) - MD5Transform (context->state, &input[i]); - - index = 0; - } - else - i = 0; - - /* Buffer remaining input */ - MD5_memcpy - ((POINTER)&context->buffer[index], (POINTER)&input[i], - inputLen-i); + unsigned int i, idx, partLen; + + /* Compute number of bytes mod 64 */ + idx = (unsigned int)((context->count[0] >> 3) & 0x3F); + + /* Update number of bits */ + if ((context->count[0] += ((UINT4)inputLen << 3)) < ((UINT4)inputLen << 3)) + context->count[1]++; + + context->count[1] += ((UINT4)inputLen >> 29); + + partLen = 64 - idx; + + /* Transform as many times as possible. */ + if (inputLen >= partLen) { + MD5_memcpy + ((POINTER)&context->buffer[idx], (POINTER)input, partLen); + MD5Transform (context->state, context->buffer); + + for (i = partLen; i + 63 < inputLen; i += 64) + MD5Transform (context->state, &input[i]); + + idx = 0; + } + else + i = 0; + + /* Buffer remaining input */ + MD5_memcpy ((POINTER)&context->buffer[idx], + (POINTER)&input[i], + inputLen-i); } /* MD5 finalization. Ends an MD5 message-digest operation, writing the @@ -167,27 +166,25 @@ unsigned char digest[16]; /* message digest */ MD5_CTX *context; /* context */ { - unsigned char bits[8]; - unsigned int index, padLen; - - /* Save number of bits */ - Encode (bits, context->count, 8); - - /* Pad out to 56 mod 64. -*/ - index = (unsigned int)((context->count[0] >> 3) & 0x3f); - padLen = (index < 56) ? (56 - index) : (120 - index); - MD5Update (context, PADDING, padLen); - - /* Append length (before padding) */ - MD5Update (context, bits, 8); - - /* Store state in digest */ - Encode (digest, context->state, 16); - - /* Zeroize sensitive information. - */ - MD5_memset ((POINTER)context, 0, sizeof (*context)); + unsigned char bits[8]; + unsigned int idx, padLen; + + /* Save number of bits */ + Encode (bits, context->count, 8); + + /* Pad out to 56 mod 64. */ + idx = (unsigned int)((context->count[0] >> 3) & 0x3f); + padLen = (idx < 56) ? (56 - idx) : (120 - idx); + MD5Update (context, PADDING, padLen); + + /* Append length (before padding) */ + MD5Update (context, bits, 8); + + /* Store state in digest */ + Encode (digest, context->state, 16); + + /* Zeroize sensitive information. */ + MD5_memset ((POINTER)context, 0, sizeof (*context)); } /* MD5 basic transformation. Transforms state based on block. Modified: Frontier/trunk/Common/source/quickdraw.c =================================================================== --- Frontier/trunk/Common/source/quickdraw.c 2006-04-06 01:00:11 UTC (rev 1212) +++ Frontier/trunk/Common/source/quickdraw.c 2006-04-06 01:02:50 UTC (rev 1213) @@ -2202,17 +2202,17 @@ #endif -void setrect (Rect *rset, short top, short left, short bottom, short right) { +void setrect (Rect *rset, short top, short pleft, short bottom, short pright) { register Rect *r = rset; (*r).top = top; - (*r).left = left; + (*r).left = pleft; (*r).bottom = bottom; - (*r).right = right; + (*r).right = pright; } /*setrect*/ Modified: Frontier/trunk/Common/source/uisharing.c =================================================================== --- Frontier/trunk/Common/source/uisharing.c 2006-04-06 01:00:11 UTC (rev 1212) +++ Frontier/trunk/Common/source/uisharing.c 2006-04-06 01:02:50 UTC (rev 1213) @@ -1309,11 +1309,11 @@ #endif -Boolean uisOpenHandle (Handle h, Boolean flscriptedcard, Str255 windowname, short top, short left, uisEventCallback filter) { +Boolean uisOpenHandle (Handle h, Boolean flscriptedcard, Str255 windowname, short top, short pleft, uisEventCallback filter) { Point pt; - pt.h = left; pt.v = top; + pt.h = pleft; pt.v = top; if (wsGlobals.windowserver == 0) return (false); @@ -1324,7 +1324,7 @@ } /*uisOpenHandle*/ -Boolean uisOpenCardResource (short id, Boolean flscriptedcard, Str255 windowname, short top, short left, uisEventCallback filter) { +Boolean uisOpenCardResource (short id, Boolean flscriptedcard, Str255 windowname, short top, short pleft, uisEventCallback filter) { Handle h; @@ -1339,15 +1339,15 @@ DetachResource (h); - return (uisOpenHandle (h, flscriptedcard, windowname, top, left, filter)); + return (uisOpenHandle (h, flscriptedcard, windowname, top, pleft, filter)); } /*uisOpenCardResource*/ -Boolean uisRunModalHandle (Handle h, Boolean flscriptedcard, Str255 windowname, short top, short left, uisEventCallback filter) { +Boolean uisRunModalHandle (Handle h, Boolean flscriptedcard, Str255 windowname, short top, short pleft, uisEventCallback filter) { Point pt; - pt.h = left; pt.v = top; + pt.h = pleft; pt.v = top; if (wsGlobals.windowserver == 0) return (false); @@ -1358,7 +1358,7 @@ } /*uisRunModalHandle*/ -Boolean uisRunModalResource (short id, Boolean flscriptedcard, Str255 windowname, short top, short left, uisEventCallback filter) { +Boolean uisRunModalResource (short id, Boolean flscriptedcard, Str255 windowname, short top, short pleft, uisEventCallback filter) { Handle h; @@ -1373,7 +1373,7 @@ DetachResource (h); - return (uisRunModalHandle (h, flscriptedcard, windowname, top, left, filter)); + return (uisRunModalHandle (h, flscriptedcard, windowname, top, pleft, filter)); } /*uisRunModalResource*/ #ifndef isFrontier @@ -1433,12 +1433,12 @@ } /*uisEdit*/ -Boolean uisInit (ProcPtr callback, short idinsertafter, OSType idclientapp, unsigned short bitarray) { +Boolean uisInit (ProcPtr pcallback, short idinsertafter, OSType idclientapp, unsigned short bitarray) { /* initialize window sharing and menu sharing. - the callback is a routine that receives a Str255 as a parameter. it should + the pcallback is a routine that receives a Str255 as a parameter. it should display the string in a modal dialog box and wait for the user to click on OK. it's used for reporting script compiling or runtime errors. pass in nil if you want errors to not be reported to the user (not a great thing @@ -1503,7 +1503,7 @@ if (initsharedmenusGlue (msGlobals.menuserver) != noErr) goto error; - if (setscripterrorcallbackGlue (msGlobals.menuserver, callback) != noErr) + if (setscripterrorcallbackGlue (msGlobals.menuserver, pcallback) != noErr) goto error; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |