rsalz@uunet.uu.net (Rich Salz) (12/15/88)
Submitted-by: Alan Wm Paeth <awpaeth@watcgl.waterloo.edu> Posting-number: Volume 16, Issue 139 Archive-name: sao/patch1 [ You might have seen this patch in comp.sources.d or c.s.bugs; I took it and turned it into a real-style context diff, which is what most folks are used to -- not a diff against the shar file. --r$ ] /Alan #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of shell archive." # Contents: stardust.pch # Wrapped by rsalz@fig.bbn.com on Wed Dec 14 19:22:44 1988 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'stardust.pch' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'stardust.pch'\" else echo shar: Extracting \"'stardust.pch'\" \(1551 characters\) sed "s/^X//" >'stardust.pch' <<'END_OF_FILE' X*** stardust.c.BAK Wed Dec 14 19:18:09 1988 X--- stardust.c Wed Dec 14 19:20:04 1988 X*************** X*** 1,9 **** X--- 1,16 ---- X /* X * stardust.c -- (un)pulverize files into dust more digestable by compress X+ * (VERSION #2) X * X * stardust -e <file.star | compress >small # encode for better compression X * uncompress small | stardust >file.star # decode after decompress X * X+ * updated Dec 1988 with thanks to Dave Yearke (bitnet: sunybcs!sigmast!dgy) X+ * The patches handle character versus integer machine incompatabilities. X+ * X+ * The release also squelches a compiler ambiguity error inadvertantly omitted X+ * in the original (December, 1988) posting to comp.sources.unix (ver 0->ver1). X+ * X * copyright (c) 1988 by Alan Paeth (awpaeth@watcgl) X */ X X*************** X*** 42,58 **** X cline(bo, ba, bb) X char *bo, *ba, *bb; X { X! int i; X for (i=0; i<BS; i++) X { X! char c, t; X! c = *ba++ - (t=*bb++); X if (t != '0') X { X if (c < 0) c += 10; X if (en && ((c < 0) || (c > 9))) err("non-digit or non-match"); X } X! *bo++ = c + '0'; X } X } X X--- 49,64 ---- X cline(bo, ba, bb) X char *bo, *ba, *bb; X { X! int i, c, t; /* ver 2 -- c, t: are now ints */ X for (i=0; i<BS; i++) X { X! c = *ba++ - (t = *bb++); /* ver 1 -- "=*bb" in bogus net copy */ X if (t != '0') X { X if (c < 0) c += 10; X if (en && ((c < 0) || (c > 9))) err("non-digit or non-match"); X } X! *bo++ = (char)c + '0'; /* ver 2 -- must now recast "c" */ X } X } X END_OF_FILE if test 1551 -ne `wc -c <'stardust.pch'`; then echo shar: \"'stardust.pch'\" unpacked with wrong size! fi # end of 'stardust.pch' fi echo shar: End of shell archive. exit 0 -- Please send comp.sources.unix-related mail to rsalz@uunet.uu.net.