home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
unix
/
volume16
/
sao
/
patch1
/
stardust.pch
Wrap
Text File
|
1988-12-20
|
2KB
|
58 lines
*** stardust.c.BAK Wed Dec 14 19:18:09 1988
--- stardust.c Wed Dec 14 19:20:04 1988
***************
*** 1,9 ****
--- 1,16 ----
/*
* stardust.c -- (un)pulverize files into dust more digestable by compress
+ * (VERSION #2)
*
* stardust -e <file.star | compress >small # encode for better compression
* uncompress small | stardust >file.star # decode after decompress
*
+ * updated Dec 1988 with thanks to Dave Yearke (bitnet: sunybcs!sigmast!dgy)
+ * The patches handle character versus integer machine incompatabilities.
+ *
+ * The release also squelches a compiler ambiguity error inadvertantly omitted
+ * in the original (December, 1988) posting to comp.sources.unix (ver 0->ver1).
+ *
* copyright (c) 1988 by Alan Paeth (awpaeth@watcgl)
*/
***************
*** 42,58 ****
cline(bo, ba, bb)
char *bo, *ba, *bb;
{
! int i;
for (i=0; i<BS; i++)
{
! char c, t;
! c = *ba++ - (t=*bb++);
if (t != '0')
{
if (c < 0) c += 10;
if (en && ((c < 0) || (c > 9))) err("non-digit or non-match");
}
! *bo++ = c + '0';
}
}
--- 49,64 ----
cline(bo, ba, bb)
char *bo, *ba, *bb;
{
! int i, c, t; /* ver 2 -- c, t: are now ints */
for (i=0; i<BS; i++)
{
! c = *ba++ - (t = *bb++); /* ver 1 -- "=*bb" in bogus net copy */
if (t != '0')
{
if (c < 0) c += 10;
if (en && ((c < 0) || (c > 9))) err("non-digit or non-match");
}
! *bo++ = (char)c + '0'; /* ver 2 -- must now recast "c" */
}
}