home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume5 / jetroff / patch01 next >
Encoding:
Internet Message Format  |  1989-02-03  |  3.5 KB

  1. Path: xanth!nic.MR.NET!hal!ncoast!allbery
  2. From: jetroff@pcrat.UUCP
  3. Newsgroups: comp.sources.misc
  4. Subject: v05i004: JetRoff Version 1.1, Patch01
  5. Message-ID: <8810220654.AA10545@uunet.UU.NET>
  6. Date: 28 Oct 88 02:21:01 GMT
  7. Sender: allbery@ncoast.UUCP
  8. Reply-To: jetroff@pcrat.UUCP
  9. Lines: 154
  10. Approved: allbery@ncoast.UUCP
  11.  
  12. Posting-number: Volume 5, Issue 4
  13. Submitted-by: "A. Nonymous" <jetroff@pcrat.UUCP>
  14. Archive-name: jetroff/Patch01
  15.  
  16. JetRoff, Usenet version 1.1, Patch 01. 10/03/88.
  17.  
  18. This patch was contributed by Lou Salkind (Thanks, Lou!).
  19. This bug rears its ugly head on 3B2's for sure.
  20. Apply this patch this way:
  21.  
  22.     cd root_of_JetRoff_source
  23.     patch -p <Patch01
  24.  
  25. "On a machine that does not sign extend its characters, the code in pk16.c
  26. and makeDESC.c does not work.  Also, I believe the pk_long routines
  27. are not quite right".
  28.  
  29. Here are the diffs:
  30.  
  31. *** djet/pk16.c.b    Tue Sep 27 04:49:49 1988
  32. --- djet/pk16.c    Thu Sep 29 01:12:10 1988
  33. ***************
  34. *** 134,149 ****
  35.   
  36.   int    pk_loc;
  37.   unsigned char pk_byte() { return (pk[npk]->storage[pk_loc++]); }
  38. ! short pk_short()
  39.   {
  40. !     register short a = pk_byte();
  41.       return (a*256 + pk_byte());
  42.   }
  43.   long pk_long()
  44.   {
  45.       register long    a = pk_short();
  46. !     if (a > 32767) a -= 65536;
  47. !     return (a*65536 + pk_short());
  48.   }
  49.   
  50.   /*
  51. --- 134,160 ----
  52.   
  53.   int    pk_loc;
  54.   unsigned char pk_byte() { return (pk[npk]->storage[pk_loc++]); }
  55. ! pk_sbyte()
  56.   {
  57. !     register int a = pk_byte();
  58. !     if (a > 127) a -= 256;
  59. !     return(a);
  60. ! }
  61. ! pk_short()
  62. ! {
  63. !     register short a = pk_sbyte();
  64.       return (a*256 + pk_byte());
  65.   }
  66. + uint pk_ushort()
  67. + {
  68. +     register ushort a = pk_byte();
  69. +     return (a*256 + pk_byte());
  70. + }
  71.   long pk_long()
  72.   {
  73.       register long    a = pk_short();
  74. !     return (a*65536 + pk_ushort());
  75.   }
  76.   
  77.   /*
  78. ***************
  79. *** 268,275 ****
  80.   /*            dy = 0;        not used */
  81.               w = pk_byte();
  82.               h = pk_byte();
  83. !             hoff = (char) pk_byte();
  84. !             voff = (char) pk_byte();
  85.           }
  86.           if (cc < 0 || cc > 127)
  87.               error(1, "character code out of range");
  88. --- 279,286 ----
  89.   /*            dy = 0;        not used */
  90.               w = pk_byte();
  91.               h = pk_byte();
  92. !             hoff = pk_sbyte();
  93. !             voff = pk_sbyte();
  94.           }
  95.           if (cc < 0 || cc > 127)
  96.               error(1, "character code out of range");
  97.  
  98. *** font/devjet/makeDESC.c.bak    Tue Sep 27 04:50:00 1988
  99. --- font/devjet/makeDESC.c    Thu Sep 29 01:20:55 1988
  100. ***************
  101. *** 120,135 ****
  102.   
  103.   int    pk_loc;
  104.   unsigned char pk_byte() { return (pk[npk]->storage[pk_loc++]); }
  105. ! short pk_short()
  106.   {
  107. !     register short a = pk_byte();
  108.       return (a*256 + pk_byte());
  109.   }
  110.   long pk_long()
  111.   {
  112.       register long    a = pk_short();
  113. !     if (a > 32767) a -= 65536;
  114. !     return (a*65536 + pk_short());
  115.   }
  116.   
  117.   /*
  118. --- 120,146 ----
  119.   
  120.   int    pk_loc;
  121.   unsigned char pk_byte() { return (pk[npk]->storage[pk_loc++]); }
  122. ! pk_sbyte()
  123.   {
  124. !     register int a = pk_byte();
  125. !     if (a > 127) a -= 256;
  126. !     return(a);
  127. ! }
  128. ! pk_short()
  129. ! {
  130. !     register short a = pk_sbyte();
  131.       return (a*256 + pk_byte());
  132.   }
  133. + uint pk_ushort()
  134. + {
  135. +     register ushort a = pk_byte();
  136. +     return (a*256 + pk_byte());
  137. + }
  138.   long pk_long()
  139.   {
  140.       register long    a = pk_short();
  141. !     return (a*65536 + pk_ushort());
  142.   }
  143.   
  144.   /*
  145. ***************
  146. *** 254,261 ****
  147.               dy = 0;
  148.               w = pk_byte();
  149.               h = pk_byte();
  150. !             hoff = (char) pk_byte();
  151. !             voff = (char) pk_byte();
  152.           }
  153.           if (cc < 0 || cc > 127)
  154.               error(1, "character code %d out of range", cc);
  155. --- 265,272 ----
  156.               dy = 0;
  157.               w = pk_byte();
  158.               h = pk_byte();
  159. !             hoff = pk_sbyte();
  160. !             voff = pk_sbyte();
  161.           }
  162.           if (cc < 0 || cc > 127)
  163.               error(1, "character code %d out of range", cc);
  164.