home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / minix / update~1.z / update~1 / lib / lib.diff < prev    next >
Encoding:
Text File  |  1989-08-24  |  11.5 KB  |  539 lines

  1. *** /tmp/,RCSt1a12155    Thu Aug 24 00:18:26 1989
  2. --- Makefile.16    Sun Aug 20 02:00:03 1989
  3. ***************
  4. *** 57,65 ****
  5.   _truncdfsf2.o _extendsfdf2.o
  6.   
  7.   GNUSTUFF = $(GNUSUPPORT) \
  8. ! lmemset.o lmemcmp.o lmemchr.o lmemccpy.o lmalloc.o 
  9.   
  10. ! ALL    = head.o crtso.o libc.a iio.a
  11.   
  12.   all: install
  13.   
  14. --- 57,65 ----
  15.   _truncdfsf2.o _extendsfdf2.o
  16.   
  17.   GNUSTUFF = $(GNUSUPPORT) \
  18. ! lmemset.o lmemcmp.o lmemchr.o lmemccpy.o
  19.   
  20. ! ALL    = head.o crtso.o libc.a libiio.a
  21.   
  22.   all: install
  23.   
  24. ***************
  25. *** 91,103 ****
  26.       $(AS) $?
  27.       mv sthead.o $@
  28.   
  29. ! iio.a: ivfprintf.o
  30.       rm -f $@
  31. !     $(AR) sr $@ ivfprintf.o
  32.   
  33.   ivfprintf.o : vfprintf.c
  34.       $(CC) $(CFLAGS) -D__NO_FLOATS__ -c vfprintf.c -o $@
  35.   
  36.   stbrksz.s : stbrksz.cpp
  37.   stcatch.s : stcatch.cpp
  38.   stcrtso.s : stcrtso.cpp
  39. --- 91,106 ----
  40.       $(AS) $?
  41.       mv sthead.o $@
  42.   
  43. ! libiio.a: ivfprintf.o iscanf.o
  44.       rm -f $@
  45. !     $(AR) sr $@ ivfprintf.o iscanf.o
  46.   
  47.   ivfprintf.o : vfprintf.c
  48.       $(CC) $(CFLAGS) -D__NO_FLOATS__ -c vfprintf.c -o $@
  49.   
  50. + iscanf.o : scanf.c
  51. +     $(CC) $(CFLAGS) -D__NO_FLOATS__ -c scanf.c -o $@
  52.   stbrksz.s : stbrksz.cpp
  53.   stcatch.s : stcatch.cpp
  54.   stcrtso.s : stcrtso.cpp
  55. ***************
  56. *** 105,110 ****
  57. --- 108,114 ----
  58.   stsetjmp.s : stsetjmp.cpp
  59.   stsndrec.s : stsndrec.cpp
  60.   bcopy.o : bcopy.s
  61. + alloca.o : alloca.s
  62.   
  63.   # 
  64.   # Note: the following *must* be compiled with 32 bit ints
  65. *** /tmp/,RCSt1a12155    Thu Aug 24 00:18:27 1989
  66. --- Makefile.32    Sun Aug 20 02:00:26 1989
  67. ***************
  68. *** 60,66 ****
  69.   
  70.   GNUSTUFF = $(GNUSUPPORT)
  71.   
  72. ! ALL    = head32.o crtso32.o libc32.a iio32.a
  73.   
  74.   all: install
  75.   
  76. --- 60,66 ----
  77.   
  78.   GNUSTUFF = $(GNUSUPPORT)
  79.   
  80. ! ALL    = head32.o crtso32.o libc32.a libiio32.a
  81.   
  82.   all: install
  83.   
  84. ***************
  85. *** 91,103 ****
  86.       $(AS) $?
  87.       mv sthead.o $@
  88.   
  89. ! iio32.a: ivfprintf.o
  90.       rm -f $@
  91. !     $(AR) sr $@ ivfprintf.o
  92.   
  93.   ivfprintf.o : vfprintf.c
  94.       $(CC) $(CFLAGS) -D__NO_FLOATS__ -c vfprintf.c -o $@
  95.   
  96.   stbrksz.s : stbrksz.cpp
  97.   stcatch.s : stcatch.cpp
  98.   stcrtso.s : stcrtso.cpp
  99. --- 91,106 ----
  100.       $(AS) $?
  101.       mv sthead.o $@
  102.   
  103. ! libiio32.a: ivfprintf.o iscanf.o
  104.       rm -f $@
  105. !     $(AR) sr $@ ivfprintf.o iscanf.o
  106.   
  107.   ivfprintf.o : vfprintf.c
  108.       $(CC) $(CFLAGS) -D__NO_FLOATS__ -c vfprintf.c -o $@
  109.   
  110. + iscanf.o : scanf.c
  111. +     $(CC) $(CFLAGS) -D__NO_FLOATS__ -c scanf.c -o $@
  112.   stbrksz.s : stbrksz.cpp
  113.   stcatch.s : stcatch.cpp
  114.   stcrtso.s : stcrtso.cpp
  115. ***************
  116. *** 105,110 ****
  117. --- 108,114 ----
  118.   stsetjmp.s : stsetjmp.cpp
  119.   stsndrec.s : stsndrec.cpp
  120.   bcopy.o : bcopy.s
  121. + alloca.o : alloca.s
  122.   
  123.   _umulsi3.o _mulsi3.o _udivsi3.o _divsi3.o _umodsi3.o _modsi3.o : fixnumMade
  124.   fixnumMade : fixnum.s
  125. *** /tmp/,RCSt1a12155    Thu Aug 24 00:18:28 1989
  126. --- PatchLevel.h    Thu Aug 24 00:17:40 1989
  127. ***************
  128. *** 1,5 ****
  129.   /*
  130. !  *    PathLevel: 12
  131.    *
  132.    *    the Patch Level above is to identify the version
  133.    *    of the all the files in this directory. given the above
  134. --- 1,5 ----
  135.   /*
  136. !  *    PathLevel: 13
  137.    *
  138.    *    the Patch Level above is to identify the version
  139.    *    of the all the files in this directory. given the above
  140. *** /tmp/,RCSt1a12155    Thu Aug 24 00:20:04 1989
  141. --- malloc.c    Sat Aug 19 19:31:08 1989
  142. ***************
  143. *** 1,5 ****
  144. --- 1,17 ----
  145.   #include "lib.h"
  146.   
  147. + #ifdef __MSHORT__
  148. + # define _LMALLOC  lmalloc
  149. + # define _LREALLOC lrealloc
  150. + # define _LCALLOC  lcalloc
  151. + # define _SIZE_T  unsigned long
  152. + #else
  153. + # define _LMALLOC  malloc
  154. + # define _LREALLOC realloc
  155. + # define _LCALLOC  calloc
  156. + # define _SIZE_T  unsigned     /* fool protos */
  157. + #endif
  158.   /* replace undef by define */
  159.   #undef     DEBUG        /* check assertions */
  160.   #undef     SLOWDEBUG    /* some extra test loops (requires DEBUG) */
  161. ***************
  162. *** 17,24 ****
  163.   #define    ptrint        long
  164.   #endif
  165.   
  166. ! #define BRKSIZE        1024
  167. ! #define    PTRSIZE        sizeof(char *)
  168.   
  169.   #ifdef __GNUC__
  170.   #define Align(x,a)    (( ((ptrint)(x)) + ((ptrint)a - 1L)) & ~((ptrint)a - 1L))
  171. --- 29,36 ----
  172.   #define    ptrint        long
  173.   #endif
  174.   
  175. ! #define BRKSIZE        ((_SIZE_T)1024)
  176. ! #define    PTRSIZE        (sizeof(char *))
  177.   
  178.   #ifdef __GNUC__
  179.   #define Align(x,a)    (( ((ptrint)(x)) + ((ptrint)a - 1L)) & ~((ptrint)a - 1L))
  180. ***************
  181. *** 50,56 ****
  182.   static char *_bottom, *_top, *_empty;
  183.   
  184.   static int grow(len)
  185. ! unsigned len;
  186.   {
  187.     register char *p;
  188.   
  189. --- 62,68 ----
  190.   static char *_bottom, *_top, *_empty;
  191.   
  192.   static int grow(len)
  193. ! unsigned long len;
  194.   {
  195.     register char *p;
  196.   
  197. ***************
  198. *** 65,75 ****
  199.     return(1);
  200.   }
  201.   
  202. ! VOIDSTAR malloc(size)
  203. ! unsigned size;
  204.   {
  205.     register char *prev, *p, *next, *new;
  206. !   register unsigned len, ntries;
  207.   
  208.     if (size == 0)
  209.       size = PTRSIZE;        /* avoid slots less that 2*PTRSIZE */
  210. --- 77,88 ----
  211.     return(1);
  212.   }
  213.   
  214. ! VOIDSTAR _LMALLOC (size)
  215. ! _SIZE_T size;
  216.   {
  217.     register char *prev, *p, *next, *new;
  218. !   register unsigned long len;
  219. !   register short ntries;
  220.   
  221.     if (size == 0)
  222.       size = PTRSIZE;        /* avoid slots less that 2*PTRSIZE */
  223. ***************
  224. *** 76,82 ****
  225.     for (ntries = 0; ntries < 2; ntries++) {
  226.       len = Align(size, PTRSIZE) + PTRSIZE;
  227.       if (_bottom == 0) {
  228. !         p = sbrk(2 * PTRSIZE);
  229.           p = (char *) Align((ptrint)p, PTRSIZE);
  230.           p += PTRSIZE;
  231.           _top = _bottom = p;
  232. --- 89,95 ----
  233.     for (ntries = 0; ntries < 2; ntries++) {
  234.       len = Align(size, PTRSIZE) + PTRSIZE;
  235.       if (_bottom == 0) {
  236. !         p = sbrk((int)(2 * (int)PTRSIZE));
  237.           p = (char *) Align((ptrint)p, PTRSIZE);
  238.           p += PTRSIZE;
  239.           _top = _bottom = p;
  240. ***************
  241. *** 114,129 ****
  242.     return(0);
  243.   }
  244.   
  245. ! VOIDSTAR realloc(old, size)
  246.   VOIDSTAR old;
  247. ! unsigned size;
  248.   {
  249.     register char *prev, *p, *next, *new;
  250. !   register unsigned len, n;
  251.   
  252.     len = Align(size, PTRSIZE) + PTRSIZE;
  253.     next = NextSlot(old);
  254. !   n = (int)(next - (char *)old);            /* old length */
  255.     /*
  256.      * extend old if there is any free space just behind it
  257.      */
  258. --- 127,144 ----
  259.     return(0);
  260.   }
  261.   
  262. ! VOIDSTAR _LREALLOC(old, size)
  263.   VOIDSTAR old;
  264. ! _SIZE_T size;
  265.   {
  266.     register char *prev, *p, *next, *new;
  267. !   register unsigned long len, n;
  268.   
  269. +   if(old == (VOIDSTAR)0) return _LMALLOC(size);
  270.     len = Align(size, PTRSIZE) + PTRSIZE;
  271.     next = NextSlot(old);
  272. !   n = (unsigned long)(next - (char *)old);            /* old length */
  273.     /*
  274.      * extend old if there is any free space just behind it
  275.      */
  276. ***************
  277. *** 153,159 ****
  278.       }
  279.       return(old);
  280.     }
  281. !   if ((new = malloc(size)) == 0)        /* it didn't fit */
  282.       return(0);
  283.     bcopy(old, new, (long)n);                /* n < size */
  284.     free(old);
  285. --- 168,174 ----
  286.       }
  287.       return(old);
  288.     }
  289. !   if ((new = _LMALLOC(size)) == 0)        /* it didn't fit */
  290.       return(0);
  291.     bcopy(old, new, (long)n);                /* n < size */
  292.     free(old);
  293. ***************
  294. *** 160,184 ****
  295.     return(new);
  296.   }
  297.   
  298. ! /* static bcopy(old, new, n)
  299. ! register char *old, *new;
  300. ! register n;
  301. ! {
  302. !   while (n--)
  303. !     *new++ = *old++;
  304. ! }
  305. ! */
  306. ! VOIDSTAR calloc(n, size)
  307. ! unsigned n, size;
  308.   {
  309. !   register char *p, *cp;
  310.   
  311.     n *= size;
  312. !   cp = malloc(n);
  313.     if (cp == (char *)0)
  314.       return ((char *)0);
  315. !   for (p = cp; n-- != 0; )
  316. !     *p++ = '\0';
  317.     return(cp);
  318.   }
  319.   
  320. --- 175,190 ----
  321.     return(new);
  322.   }
  323.   
  324. ! VOIDSTAR _LCALLOC(n, size)
  325. ! _SIZE_T n, size;
  326.   {
  327. !   register char *cp;
  328.   
  329.     n *= size;
  330. !   cp = _LMALLOC(n);
  331.     if (cp == (char *)0)
  332.       return ((char *)0);
  333. !   bzero(cp, (long)n);
  334.     return(cp);
  335.   }
  336.   
  337. ***************
  338. *** 218,221 ****
  339. --- 224,242 ----
  340.       write(2, "assert failed in lib/malloc.c\n", 30);
  341.       abort();
  342.   }
  343. + #endif
  344. + #ifdef __MSHORT__
  345. + VOIDSTAR malloc(n)
  346. + unsigned int n;
  347. + { return lmalloc((unsigned long)n); }
  348. + VOIDSTAR realloc(old, n)
  349. + VOIDSTAR old;
  350. + unsigned int n;
  351. + { return lrealloc(old, (unsigned long)n); }
  352. + VOIDSTAR calloc(n, m)
  353. + unsigned int n, m;
  354. + { return lcalloc((unsigned long)n, (unsigned long)m); }
  355.   #endif
  356. *** /tmp/,RCSt1a12155    Thu Aug 24 00:20:30 1989
  357. --- qsort.c    Sun Aug 20 02:04:08 1989
  358. ***************
  359. *** 176,187 ****
  360.       unsigned long size;
  361.       int (*cmp)();
  362.   {
  363.   #ifdef SHORT_ALIGN_DESIRABLE
  364. !     if((size == 2) && SHORT_ALIGNED(base))
  365.           _wqsort((ushort *)base, 0, num-1, cmp);
  366. !     else if((size == 4) && LONG_ALIGNED(base))
  367.           _lqsort((ulong *)base, 0, num-1, cmp);
  368.   #else
  369.       if((size == 4) && LONG_ALIGNED(base))
  370.           _lqsort((ulong *)base, 0, num-1, cmp);
  371. --- 176,205 ----
  372.       unsigned long size;
  373.       int (*cmp)();
  374.   {
  375. !     if(num < 2)
  376. !         return; /* nothing to do */
  377. !     else if(num == 2)  /* at some point replace if n < THRESH do insert sort */
  378. !     {    /* degenerate case */
  379. !         if(((*cmp)( base, ((uchar *)base)+size )) > 0)
  380. !         {
  381. !         if((_qbuf = alloca(size)) == (void *)0) return;
  382. !         bcopy(base, _qbuf, size);
  383. !         bcopy(((uchar *)base)+size, base, size);
  384. !         bcopy(_qbuf, ((uchar *)base)+size,  size);
  385. !         }
  386. !         return;
  387. !         }
  388.   #ifdef SHORT_ALIGN_DESIRABLE
  389. !     /* assumption: if short align desired, then its ok to
  390. !        align a long at a short boundary too.
  391. !      */
  392. !     if(SHORT_ALIGNED(base))
  393. !     {
  394. !         if(size == 2)
  395.           _wqsort((ushort *)base, 0, num-1, cmp);
  396. !         else if(size == 4)
  397.           _lqsort((ulong *)base, 0, num-1, cmp);
  398. +     }
  399.   #else
  400.       if((size == 4) && LONG_ALIGNED(base))
  401.           _lqsort((ulong *)base, 0, num-1, cmp);
  402. ***************
  403. *** 188,194 ****
  404.   #endif
  405.       else
  406.       {
  407. !         _qbuf = (uchar *)alloca(size);
  408.           _nqsort((uchar *)base, 0, num-1, size, cmp);
  409.       }
  410.   }
  411. --- 206,212 ----
  412.   #endif
  413.       else
  414.       {
  415. !         if((_qbuf = alloca(size)) == (void *)0) return;
  416.           _nqsort((uchar *)base, 0, num-1, size, cmp);
  417.       }
  418.   }
  419. *** /tmp/,RCSt1a12155    Thu Aug 24 00:20:39 1989
  420. --- scanf.c    Sat Aug 19 04:19:03 1989
  421. ***************
  422. *** 60,67 ****
  423. --- 60,69 ----
  424.       char           *chr_p;
  425.       unsigned int   *uint_p;
  426.       unsigned long  *ulong_p;
  427. + #ifndef __NO_FLOATS__
  428.       float           *float_p;
  429.       double           *double_p;
  430. + #endif
  431.   };
  432.   
  433.   static int      ic;        /* the current character */
  434. ***************
  435. *** 156,161 ****
  436. --- 158,164 ----
  437.       return ch;
  438.   }
  439.   
  440. + #ifndef __NO_FLOATS__
  441.   #ifdef __GNUC__
  442.   /* eval f * 10**p */
  443.   static double _fraise(f, p)
  444. ***************
  445. *** 171,177 ****
  446.       return f;
  447.   }
  448.   #endif
  449.   
  450.   /*
  451.    * the routine that does the job 
  452. --- 174,180 ----
  453.       return f;
  454.   }
  455.   #endif
  456. ! #endif
  457.   
  458.   /*
  459.    * the routine that does the job 
  460. ***************
  461. *** 194,202 ****
  462. --- 197,207 ----
  463.       int             done_some;    /* true if we have seen some data */
  464.       int        reverse;    /* reverse the checking in [...] */
  465.       char           *endbracket;     /* position of the ] in format string */
  466. + #ifndef __NO_FLOATS__
  467.   #ifdef __GNUC__
  468.       double        fval;        /* a double value  */
  469.   #endif
  470. + #endif
  471.       
  472.       
  473.       rnc_arg = funcarg;
  474. ***************
  475. *** 331,336 ****
  476. --- 336,342 ----
  477.           goto all_done;
  478.           break;
  479.           
  480. + #ifndef __NO_FLOATS__
  481.   #ifdef __GNUC__
  482.         case 'e':
  483.         case 'f':
  484. ***************
  485. *** 396,401 ****
  486. --- 402,408 ----
  487.           goto all_done;
  488.           break;
  489.   #endif /* __GNUC__ */
  490. + #endif /* __NO_FLOATS__ */
  491.   
  492.         case '[':
  493.           if (!widflag)
  494. *** /tmp/,RCSt1a12155    Thu Aug 24 00:20:54 1989
  495. --- std.h    Sat Aug 19 19:32:10 1989
  496. ***************
  497. *** 325,331 ****
  498.   void *        lmemchr(CONST void *, int, long);
  499.   void *        lmemccpy(void *, CONST void *, int, long);
  500.   void *        lmalloc(unsigned long);
  501. ! void *        lremalloc(void *, unsigned long);
  502.   void *        lcalloc(unsigned long, unsigned long);
  503.   
  504.   #endif    /* __MSHORT__ */
  505. --- 325,331 ----
  506.   void *        lmemchr(CONST void *, int, long);
  507.   void *        lmemccpy(void *, CONST void *, int, long);
  508.   void *        lmalloc(unsigned long);
  509. ! void *        lrealloc(void *, unsigned long);
  510.   void *        lcalloc(unsigned long, unsigned long);
  511.   
  512.   #endif    /* __MSHORT__ */
  513. ***************
  514. *** 356,362 ****
  515.   #define lmemchr        memchr
  516.   #define lmemccpy    memccpy
  517.   #define lmalloc        malloc
  518. ! #define lremalloc    realloc
  519.   #define lcalloc        calloc
  520.   #endif
  521.   
  522. --- 356,362 ----
  523.   #define lmemchr        memchr
  524.   #define lmemccpy    memccpy
  525.   #define lmalloc        malloc
  526. ! #define lrealloc    realloc
  527.   #define lcalloc        calloc
  528.   #endif
  529.   
  530.