home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume16 / sao / patch1 / stardust.pch
Text File  |  1988-12-20  |  2KB  |  58 lines

  1. *** stardust.c.BAK    Wed Dec 14 19:18:09 1988
  2. --- stardust.c    Wed Dec 14 19:20:04 1988
  3. ***************
  4. *** 1,9 ****
  5. --- 1,16 ----
  6.   /*
  7.    * stardust.c -- (un)pulverize files into dust more digestable by compress
  8. +  * (VERSION #2)
  9.    *
  10.    * stardust -e <file.star | compress >small # encode for better compression
  11.    * uncompress small | stardust >file.star   # decode after decompress
  12.    *
  13. +  * updated Dec 1988 with thanks to Dave Yearke (bitnet: sunybcs!sigmast!dgy)
  14. +  * The patches handle character versus integer machine incompatabilities.
  15. +  *
  16. +  * The release also squelches a compiler ambiguity error inadvertantly omitted
  17. +  * in the original (December, 1988) posting to comp.sources.unix (ver 0->ver1).
  18. +  *
  19.    * copyright (c) 1988 by Alan Paeth (awpaeth@watcgl)
  20.    */
  21.   
  22. ***************
  23. *** 42,58 ****
  24.   cline(bo, ba, bb)
  25.       char *bo, *ba, *bb;
  26.       {
  27. !     int i;
  28.       for (i=0; i<BS; i++)
  29.       {
  30. !     char c, t;
  31. !     c = *ba++ - (t=*bb++);
  32.       if (t != '0')
  33.           {
  34.           if (c < 0) c += 10;
  35.           if (en && ((c < 0) || (c > 9))) err("non-digit or non-match");
  36.           }
  37. !     *bo++ = c + '0';
  38.       }
  39.       }
  40.   
  41. --- 49,64 ----
  42.   cline(bo, ba, bb)
  43.       char *bo, *ba, *bb;
  44.       {
  45. !     int i, c, t;            /* ver 2 -- c, t: are now ints */
  46.       for (i=0; i<BS; i++)
  47.       {
  48. !     c = *ba++ - (t = *bb++);    /* ver 1 -- "=*bb" in bogus net copy */
  49.       if (t != '0')
  50.           {
  51.           if (c < 0) c += 10;
  52.           if (en && ((c < 0) || (c > 9))) err("non-digit or non-match");
  53.           }
  54. !     *bo++ = (char)c + '0';        /* ver 2 -- must now recast "c" */
  55.       }
  56.       }
  57.   
  58.