From 968415041224952b5d6d44c7ed5e4beaf4b567fc Mon Sep 17 00:00:00 2001 From: Bradley Bell Date: Fri, 3 Oct 2003 03:19:03 +0000 Subject: [PATCH] delete duplicate function --- ChangeLog | 4 ++++ main/netmisc.c | 25 ++++--------------------- 2 files changed, 8 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index 765e72fd..ffb034bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2003-10-02 Bradley Bell + + * main/netmisc.c: delete duplicate function + 2003-10-01 Bradley Bell * main/bm.c: make sure d1_texture_indices gets freed between diff --git a/main/netmisc.c b/main/netmisc.c index 2ad94051..7adeb7a7 100644 --- a/main/netmisc.c +++ b/main/netmisc.c @@ -16,7 +16,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #ifdef RCS -static char rcsid[] = "$Id: netmisc.c,v 1.7 2002-12-31 23:19:42 btb Exp $"; +static char rcsid[] = "$Id: netmisc.c,v 1.8 2003-10-03 03:19:03 btb Exp $"; #endif #include @@ -105,24 +105,6 @@ ushort netmisc_calc_checksum( void * vptr, int len ) return mac_calc_segment_checksum(); } -// Calculates the checksum of a block of memory. -ushort netmisc_calc_checksum_pc( void * vptr, int len ) -{ - ubyte * ptr = (ubyte *)vptr; - unsigned int sum1,sum2; - - sum1 = sum2 = 0; - - while(len--) { - sum1 += *ptr++; - if (sum1 >= 255 ) sum1 -= 255; - sum2 += sum1; - } - sum2 %= 255; - - return ((sum1<<8)+ sum2); -} - // following are routine for macintosh only that will swap the elements of // structures send through the networking code. The structures and // this code must be kept in total sync @@ -613,7 +595,7 @@ void swap_object(object *obj) } -#else +#else /* !WORDS_BIGENDIAN */ // Calculates the checksum of a block of memory. @@ -634,7 +616,8 @@ ushort netmisc_calc_checksum( void * vptr, int len ) return ((sum1<<8)+ sum2); } -#endif +#endif /* WORDS_BIGENDIAN */ + //--unused-- //Finds the difference between block1 and block2. Fills in diff_buffer and //--unused-- //returns the size of diff_buffer. //--unused-- int netmisc_find_diff( void *block1, void *block2, int block_size, void *diff_buffer ) -- 2.39.2