home *** CD-ROM | disk | FTP | other *** search
/ Atari FTP / ATARI_FTP_0693.zip / ATARI_FTP_0693 / Mint / mnthlb30.zoo / patch / code30.diffs next >
Text File  |  1993-06-05  |  5KB  |  221 lines

  1. *** doprnt.c0    Wed Feb 10 04:35:42 1993
  2. --- doprnt.c    Thu May 27 20:53:38 1993
  3. ***************
  4. *** 606,635 ****
  5.   
  6.   /* static */ void Format __PROTO ((double number, char *buf));
  7.   
  8. ! asm ("
  9. ! comm = -6;
  10. ! resp = -16;
  11. ! .text
  12. ! .even
  13. ! _Format:
  14. !     lea    0xfffffa50:w,a0            | fpu address
  15. !     lea    sp@(4),a1            | argptr
  16. !     movew    #0x5400,a0@(comm)        | fmoved -> fp0
  17. ! 1:    cmpw    #0x8900,a0@(resp)
  18. !     beq    1b
  19. !     movel    a1@+,a0@
  20. !     movel    a1@+,a0@
  21. !     movel    a1@,a1                | get buf
  22. !     movew    #0x6c11,a0@(comm)        | fmovep fp0,a1@{#17}
  23. ! 1:    cmpw    #0x8900,a0@(resp)
  24. !     beq    1b
  25. !     movel    a0@,a1@+
  26. !     movel    a0@,a1@+
  27. !     movel    a0@,a1@+
  28. !     rts
  29. ! ");
  30.   #endif /* sfp004 */
  31.       
  32.   static int
  33. --- 606,635 ----
  34.   
  35.   /* static */ void Format __PROTO ((double number, char *buf));
  36.   
  37. ! asm ("\n"
  38. ! "comm = -6;\n"
  39. ! "resp = -16;\n"
  40. ! ".text\n"
  41. ! ".even\n"
  42. ! "_Format:\n"
  43. ! "    lea    0xfffffa50:w,a0            | fpu address\n"
  44. ! "    lea    sp@(4),a1            | argptr\n"
  45. ! "\n"
  46. ! "    movew    #0x5400,a0@(comm)        | fmoved -> fp0\n"
  47. ! "1:    cmpw    #0x8900,a0@(resp)\n"
  48. ! "    beq    1b\n"
  49. ! "    movel    a1@+,a0@\n"
  50. ! "    movel    a1@+,a0@\n"
  51. ! "\n"
  52. ! "    movel    a1@,a1                | get buf\n"
  53. ! "    movew    #0x6c11,a0@(comm)        | fmovep fp0,a1@{#17}\n"
  54. ! "1:    cmpw    #0x8900,a0@(resp)\n"
  55. ! "    beq    1b\n"
  56. ! "    movel    a0@,a1@+\n"
  57. ! "    movel    a0@,a1@+\n"
  58. ! "    movel    a0@,a1@+\n"
  59. ! "    rts\n"
  60. ! "");
  61.   #endif /* sfp004 */
  62.       
  63.   static int
  64. *** fread.c0    Wed Feb 10 03:49:42 1993
  65. --- fread.c    Thu May 27 21:05:10 1993
  66. ***************
  67. *** 2,7 ****
  68. --- 2,11 ----
  69.    * from Dale Schumacher's dLibs
  70.    */
  71.   
  72. + /* 5/26/93 sb -- Modified for HSC to account for the possibility that
  73. +  * size * count >= 64K.
  74. +  */
  75.   #include <stddef.h>
  76.   #include <stdio.h>
  77.   #include <unistd.h>
  78. ***************
  79. *** 18,24 ****
  80. --- 22,32 ----
  81.       size_t count;
  82.       register FILE *fp;
  83.       {
  84. + #ifdef __SOZOBON__
  85. +     register unsigned long n;
  86. + #else
  87.       register size_t n;
  88. + #endif
  89.       register long l, cnt;
  90.       register unsigned int f;
  91.       char *data=_data;
  92. ***************
  93. *** 33,39 ****
  94. --- 41,51 ----
  95.           return(0);
  96.   
  97.       l = 0;
  98. + #ifdef __SOZOBON__
  99. +     n = (unsigned long)count * size;
  100. + #else
  101.       n = count * size;
  102. + #endif
  103.   #if 0
  104.       if(fflush(fp))            /* re-sync file pointers */
  105.           return 0;
  106. ***************
  107. *** 44,50 ****
  108. --- 56,66 ----
  109.       if((cnt = fp->_cnt) > 0)
  110.       {
  111.           cnt = (cnt < n) ? cnt : n;
  112. + #ifdef __SOZOBON__
  113. +         _bcopy(fp->_ptr, data, cnt);
  114. + #else
  115.           bcopy(fp->_ptr, data, cnt);
  116. + #endif
  117.           fp->_cnt -= cnt;
  118.           fp->_ptr += cnt;
  119.           l += cnt;
  120. ***************
  121. *** 138,142 ****
  122. --- 154,162 ----
  123.       }
  124.   
  125.       ret:
  126. + #ifdef __SOZOBON__
  127. +     return((l > 0) ? ((size_t)((unsigned long)l / size)) : 0);
  128. + #else
  129.       return((l > 0) ? ((size_t)l / size) : 0);
  130. + #endif
  131.       }
  132. *** fwrite.c0    Fri Feb 19 18:28:20 1993
  133. --- fwrite.c    Wed May 26 20:42:12 1993
  134. ***************
  135. *** 1,5 ****
  136. --- 1,9 ----
  137.   /* from Dale Schumacher's dLibs */
  138.   
  139. + /* 5/26/93 sb -- Modified for HSC to account for the possibility that
  140. +  * size * count >= 64K.
  141. +  */
  142.   #include <stddef.h>
  143.   #include <stdio.h>
  144.   #include <unistd.h>
  145. ***************
  146. *** 17,23 ****
  147. --- 21,31 ----
  148.   register FILE *fp;
  149.   {
  150.       const char *data=_data;
  151. + #ifdef __SOZOBON__
  152. +     register unsigned long n, m;
  153. + #else
  154.       register size_t n, m;
  155. + #endif
  156.       register long l = 0;
  157.       long space;
  158.       unsigned int f = fp->_flag;
  159. ***************
  160. *** 38,52 ****
  161. --- 46,69 ----
  162.   
  163.       assert ((data != NULL));
  164.       assert ((size != 0));
  165. + #ifdef __SOZOBON__
  166. +     n =  (unsigned long)count * size;
  167. +     assert ( n <= (unsigned_long)LONG_MAX);  /* otherwise impl will not work */
  168. + #else
  169.       n =  count * size;
  170.       assert ( n <= (size_t)LONG_MAX);  /* otherwise impl will not work */
  171. + #endif
  172.   
  173.       if( (f&_IOBIN) || __FRW_BIN__ ) {
  174.         space = fp->_bsiz - fp->_cnt;
  175.         while(n > 0)
  176.         {
  177.             m = (n > space)? space: n;
  178. + #ifdef __SOZOBON__
  179. +           _bcopy(data, fp->_ptr, m);
  180. + #else
  181.             bcopy(data, fp->_ptr, m);
  182. + #endif
  183.             fp->_ptr += m;
  184.             fp->_cnt += m;
  185.             space -= m;
  186. ***************
  187. *** 137,141 ****
  188. --- 154,162 ----
  189.         }
  190.       }
  191.   
  192. + #ifdef __SOZOBON
  193. +     return((l > 0) ? ((size_t)((unsigned long)l / size)) : 0);
  194. + #else
  195.       return((l > 0) ? ((size_t)l / size) : 0);
  196. + #endif
  197.   }
  198. *** getpw.c0    Sat Sep  5 20:05:08 1992
  199. --- getpw.c    Sat May 22 16:40:24 1993
  200. ***************
  201. *** 114,120 ****
  202.       return (NULL);
  203.   }
  204.   
  205. ! #ifdef atarist
  206.   static char savbuf[256];    /* BUFSIZ seems bigger than necessary! */
  207.   #else
  208.   static char savbuf[BUFSIZ];
  209. --- 114,120 ----
  210.       return (NULL);
  211.   }
  212.   
  213. ! #if defined(atarist) || defined(__SOZOBON__)
  214.   static char savbuf[256];    /* BUFSIZ seems bigger than necessary! */
  215.   #else
  216.   static char savbuf[BUFSIZ];
  217.