home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / updates / update20.zoo / lib / diffs < prev    next >
Encoding:
Text File  |  1992-04-19  |  35.2 KB  |  1,425 lines

  1. *** 1.70    1992/03/28 06:40:31
  2. --- Changelo    1992/04/19 16:03:21
  3. ***************
  4. *** 2929,2931 ****
  5. --- 2929,3069 ----
  6.       doc is mum on this point) -- ++jrb
  7.   
  8.   ---------------------------- Patchlevel 79 ---------------------------
  9. + gnulib2.c:: ++jrb
  10. +     add gcc 2.0 support routine __fixunssfsi()
  11. + bblink.c:: ++jrb
  12. +     new file to support gcc -tcov (-tcov is not working as yet, but
  13. +     when it does, we are ready!)
  14. + mincl:: ++jrb
  15. +     add targets for above
  16. + doprnt.c:: michal/++jrb
  17. +     had the same problem as osbind for -fomit-frame-pointer, in ICONV
  18. +     change constraints for stuff that is pushed before the sp is reset
  19. +     from "g" to "r".
  20. +     Also, michal optimized ICONV a bit to do the long div only while
  21. +     the number > 65535.
  22. + signal.h sysvars.h
  23. + div.c doprnt.c gmon.c main.c sbrk.c system.c: Michal
  24. +     shut off gcc 2.X warnings.
  25. + ***************  RENAME     **********************************************
  26. +     rename file _floatsi.cpp to _fltsi.cpp
  27. + **************************************************************************
  28. + **********************    REMOVE ******************************************
  29. +         bzero.c, memset.c. memcpy.s
  30. + *************************************************************************
  31. + bcopy.s, bzero.cpp:: alexander lehmann
  32. +     efficient replacements for bcopy/bzero/memmove/memset/memcpy
  33. + bcopy.s:: ++jrb
  34. +     minor adjustment.
  35. + mincl:: ++jrb
  36. +     adjust targets for above
  37. + fread.c:: ++jrb
  38. +     remove redundant cast in 'data=(char*)data + m;' since data
  39. +     is a char * now.
  40. + _cmpdf2.s _cmpsf2.s  _fixsfsi.cpp _fltsisf.cpp gnulib2.c:: andreas
  41. +     * gnulib2.c: nothing needed for gcc-2.0 except __fixsfsi and
  42. +     __floatsisf
  43. +     * _fixsfsi.cpp, _fltsisf.cpp: new files
  44. +     * _cmpdf2.s, _cmpsf2.s: new entry points for gcc2
  45. +     
  46. +     in gnulib2.c i #if 0'ed out the not used portions instead of deleting
  47. +     them, just so that we have a handy cross reference around. also note
  48. +     that at the bottom there is still one new gcc 2.X support routine
  49. +     around.  ++jrb
  50. + _fixdfsi.cpp:: andreas
  51. +     some cleanups
  52. + _floatsi.cpp:: andreas
  53. +      code for __M68881__ was bogus (is this needed anyways?)
  54. + alloca.s:: andreas
  55. +     remove some wasted bytes
  56. + console.c:: andreas
  57. +     (raw_in): allow typeahead (which is only available at GEMDOS level).
  58. + doprnt.c:: andreas
  59. +     -- remove some misuse of NULL; handle %g correctly.
  60. +     -- a version of iconv for -m68020 and also for non __GNUC__
  61. +         -- i merged in earlier iconv change, with one diff: when
  62. +     using the long div, make d1 come out into 'i' by declaring
  63. +     d1 as the reggie for i as andreas had done in his change, rather
  64. +     than use a movw d1, %1 as i had it earlier   ++jrb
  65. + getenv.c putenv.c :: andreas
  66. +     * getenv.c (putenv): put it in separate file as it is independent
  67. +     of getenv
  68. +     * putenv.c: new file
  69. + getuid.c unistd.h:: andreas
  70. +     * getuid.c: use uid_t and gid_t
  71. +     * unistd.h: ditto
  72. +     note that sete?[gu]id() has int as parameter type so that it
  73. +     matches the old-style definition
  74. + mkdir.c:: andreas
  75. +     * mkdir.c: stat() on an already unx2dos'd filename is a no-no (and
  76. +     also wastefull), use Fattrib() instead
  77. + read.c:: andreas
  78. +     (_delchar, str_length): handle ^@ (^@ == (int)0 ++jrb) correctly
  79. + rmdir.c:: andreas
  80. +     rewrite symbolic directory if dir was nonempty
  81. + scanf.c :: andreas
  82. +     improve handling of character class
  83. + stat.c:: andreas
  84. +     allow symbolic link to a deleted path
  85. + strcoll.c string.h :: andreas
  86. +     * strcoll.c: new file, implementation of strcoll and strxfrm that
  87. +     doesn't know about locales
  88. +     * string.h: add proto for strcoll and strxfrm
  89. + strftime.c:: andreas
  90. +     echo unknown format char ala printf (otherwise
  91. +     buf is uninitialized)
  92. + mincl: andreas
  93. +     add target for putenv.o
  94. +     mincl: add taget for strcoll.o
  95. +     adjust gnulib2 targets:
  96. +         add targets for _fixsfsi.o, _fltsisf.o
  97. +         remove targets for _lshrsi3.o,...,_lesf2.o
  98. + compiler.h float.h signal.h stddef.h stdio.h :: andreas
  99. +     avoid warning `cast to pointer from integer of different size'
  100. +     if -mshort.
  101. +     This is 'fixed' in gcc 2.1 (actually we had the fix for gcc 2.0 PL 2)
  102. +     to not issue this warning for 0 being promoted. but andreas's changes
  103. +     are applicable in any case. ++jrb
  104. + unx2dos.c:: ++jrb/ers/michal
  105. +     change default unixmode (if not user specified) from "/" to "/d"
  106. +     this takes care of problems dues to caonicalization of PATH to
  107. +     posix form, where D:\foo is mapped internally to "/dev/D/foo. if
  108. +     there was no 'd' in the default unixmode, then a casual
  109. +     user would be surprised why non-spawning application could'nt
  110. +     find stuff in such PATH's (like when using findfile).
  111. + ---------------------------- Patchlevel 80 ---------------------------
  112. *** 1.55    1992/03/28 06:40:31
  113. --- PatchLev.h    1992/04/19 16:03:24
  114. ***************
  115. *** 1,5 ****
  116.   
  117. ! #define    PatchLevel "79"
  118.   
  119.   /*
  120.    *
  121. --- 1,5 ----
  122.   
  123. ! #define    PatchLevel "80"
  124.   
  125.   /*
  126.    *
  127. *** 1.1    1990/03/26 17:37:08
  128. --- _cmpdf2.s    1992/04/19 16:03:28
  129. ***************
  130. *** 13,21 ****
  131. --- 13,29 ----
  132.       .text
  133.       .even
  134.       .globl    __cmpdf2, ___cmpdf2
  135. +     | additional entry points for gcc2
  136. +     .globl    ___eqdf2, ___nedf2, ___gtdf2, ___gedf2, ___ltdf2, ___ledf2
  137.   
  138.   __cmpdf2:
  139.   ___cmpdf2:
  140. + ___eqdf2:
  141. + ___nedf2:
  142. + ___gtdf2:
  143. + ___gedf2:
  144. + ___ltdf2:
  145. + ___ledf2:
  146.       moveml    sp@(4),d0-d1/a0-a1 | get u and v
  147.       tstl    d0        | check sign bit
  148.       bpl    1f
  149. *** 1.1    1990/03/26 17:37:08
  150. --- _cmpsf2.s    1992/04/19 16:03:28
  151. ***************
  152. *** 13,21 ****
  153. --- 13,29 ----
  154.       .text
  155.       .even
  156.       .globl    __cmpsf2, ___cmpsf2
  157. +     | additional entry points for gcc2
  158. +     .globl    ___eqsf2, ___nesf2, ___gtsf2, ___gesf2, ___ltsf2, ___lesf2
  159.   
  160.   __cmpsf2:
  161.   ___cmpsf2:
  162. + ___eqsf2:
  163. + ___nesf2:
  164. + ___gtsf2:
  165. + ___gesf2:
  166. + ___ltsf2:
  167. + ___lesf2:
  168.       moveml    sp@(4),d0-d1    | get u and v
  169.       tstl    d1        | check sign bit
  170.       bpl    1f
  171. *** 1.1    1992/02/04 17:11:06
  172. --- _fixdfsi.cpp    1992/04/19 16:03:30
  173. ***************
  174. *** 78,83 ****
  175. --- 78,87 ----
  176.   | written by Kai-Uwe Bloem (I5110401@dbstu1.bitnet).
  177.   | Based on a 80x86 floating point packet from comp.os.minix, written by P.Housel
  178.   |
  179. + | modified by Andreas Schwab (schwab@ls5.informatik.uni-dortmund.de):
  180. + | no loop needed for the shift-down case
  181. + | testing for far shifts now too slow
  182. + | use different registers to gain speed
  183.   |
  184.   | Revision 1.3, kub 01-90 :
  185.   | added support for denormalized numbers
  186. ***************
  187. *** 100,163 ****
  188.   __fixdfsi:
  189.   ___fixdfsi:
  190.       lea    sp@(4),a0    | pointer to parameters
  191. !     moveml    d2/d4/d5,sp@-    | save registers
  192. !     moveml    a0@,d4-d5    | get the number
  193. !     movew    a0@,d0        | extract exp
  194. !     movew    d0,d2        | extract sign
  195. !     lsrw    #4,d0
  196. !     andw    #0x07ff,d0    | kill sign bit
  197.   
  198. !     andl    #0x0fffff,d4    | remove exponent from mantissa
  199. !     orl    #0x100000,d4    | restore implied leading "1"
  200.   
  201. !     cmpw    #BIAS8,d0    | check exponent
  202.       blt    zero        | strictly factional, no integer part ?
  203. !     cmpw    #BIAS8+32,d0    | is it too big to fit in a 32-bit integer ?
  204.       bgt    toobig
  205.   
  206. !     subw    #BIAS8+21,d0    | adjust exponent
  207.       bgt    2f        | shift up
  208. !     beq    3f        | no shift
  209.   
  210. !     cmpw    #-8,d0        | replace far shifts by swap
  211. !     bgt    1f
  212. !     movew    d4,d5        | shift fast, 16 bits
  213. !     swap    d5
  214. !     clrw    d4
  215. !     swap    d4
  216. !     addw    #16,d0        | account for swap
  217. !     bgt    2f
  218. !     beq    3f
  219. ! 1:    lsrl    #1,d4        | shift down to align radix point;
  220. !     addw    #1,d0        | extra bits fall off the end (no rounding)
  221. !     blt    1b        | shifted all the way down yet ?
  222. !     bra    3f
  223. ! 2:    addl    d5,d5        | shift up to align radix point
  224. !     addxl    d4,d4
  225. !     subw    #1,d0
  226.       bgt    2b
  227.   
  228. ! 3:    movel    d4,d0        | put integer into result register
  229. !     cmpl    #0x80000000,d0    | -2147483648 is a nasty evil special case
  230.       bne    6f
  231. !     tstw    d2        | this had better be -2^31 and not 2^31
  232.       bpl    toobig
  233.       bra    8f
  234.   6:    tstl    d0        | sign bit set ? (i.e. too big)
  235.       bmi    toobig
  236.   7:
  237. !     tstw    d2        | is it negative ?
  238.       bpl    8f
  239.       negl    d0        | negate
  240.   8:
  241. !     moveml    sp@+,d2/d4/d5
  242.       rts
  243.   
  244.   zero:
  245.       clrl    d0        | make the whole thing zero
  246. !     bra    7b
  247.   
  248.   toobig:
  249.       movel    #0x7fffffff,d0    | ugh. Should cause a trap here.
  250. --- 104,156 ----
  251.   __fixdfsi:
  252.   ___fixdfsi:
  253.       lea    sp@(4),a0    | pointer to parameters
  254. !     moveml    d2/d3,sp@-    | save registers
  255. !     moveml    a0@,d0-d1    | get the number
  256. !     movew    a0@,d2        | extract exp
  257. !     movew    d2,d3        | extract sign
  258. !     lsrw    #4,d2
  259. !     andw    #0x07ff,d2    | kill sign bit
  260.   
  261. !     andl    #0x0fffff,d0    | remove exponent from mantissa
  262. !     orl    #0x100000,d0    | restore implied leading "1"
  263.   
  264. !     cmpw    #BIAS8,d2    | check exponent
  265.       blt    zero        | strictly factional, no integer part ?
  266. !     cmpw    #BIAS8+32,d2    | is it too big to fit in a 32-bit integer ?
  267.       bgt    toobig
  268.   
  269. !     subw    #BIAS8+21,d2    | adjust exponent
  270.       bgt    2f        | shift up
  271. !     beq    7f        | no shift (never too big)
  272.   
  273. !     negw    d2
  274. !     lsrl    d2,d0        | shift down to align radix point;
  275. !                 | extra bits fall off the end (no rounding)
  276. !     bra    7f        | never too big
  277. ! 2:    addl    d1,d1        | shift up to align radix point
  278. !     addxl    d0,d0
  279. !     subw    #1,d2
  280.       bgt    2b
  281.   
  282. ! 3:    cmpl    #0x80000000,d0    | -2147483648 is a nasty evil special case
  283.       bne    6f
  284. !     tstw    d3        | this had better be -2^31 and not 2^31
  285.       bpl    toobig
  286.       bra    8f
  287.   6:    tstl    d0        | sign bit set ? (i.e. too big)
  288.       bmi    toobig
  289.   7:
  290. !     tstw    d3        | is it negative ?
  291.       bpl    8f
  292.       negl    d0        | negate
  293.   8:
  294. !     moveml    sp@+,d2/d3
  295.       rts
  296.   
  297.   zero:
  298.       clrl    d0        | make the whole thing zero
  299. !     bra    8b
  300.   
  301.   toobig:
  302.       movel    #0x7fffffff,d0    | ugh. Should cause a trap here.
  303. ***************
  304. *** 192,198 ****
  305.   #endif    ERROR_CHECK
  306.   
  307.   # if !defined (sfp004) && !defined (__M68881__)
  308. !     bra    7b
  309.   #else
  310.       rts
  311.   #endif
  312. --- 185,191 ----
  313.   #endif    ERROR_CHECK
  314.   
  315.   # if !defined (sfp004) && !defined (__M68881__)
  316. !     bra    8b
  317.   #else
  318.       rts
  319.   #endif
  320. *** 1.1    1992/02/04 17:11:06
  321. --- _floatsi.cpp    1992/04/19 16:03:31
  322. ***************
  323. *** 12,20 ****
  324.   
  325.   __floatsidf:
  326.   ___floatsidf:
  327. !     fmovel    a7@(4),fp0        | load long int to fp0
  328. !     fintrzd a4@(4),fp0        | get double from fp0
  329. !     fmoved    fp0,a7@-
  330.       moveml    a7@+,d0-d1
  331.        rts
  332.   
  333. --- 12,19 ----
  334.   
  335.   __floatsidf:
  336.   ___floatsidf:
  337. !     fintrzd a7@(4),fp0        | load long int to fp0
  338. !     fmoved    fp0,a7@-        | get double from fp0
  339.       moveml    a7@+,d0-d1
  340.        rts
  341.   
  342. *** 1.4    1989/09/01 01:34:53
  343. --- alloca.s    1992/04/19 16:03:39
  344. ***************
  345. *** 19,24 ****
  346.       subl    d0,sp        | increase stack frame size by that much
  347.       movel    sp,d0        | set up to return it
  348.   
  349. !     lea    sp@(-4),sp    | new top of stack (real bug fix here)
  350.   
  351.       jmp    a0@        | return by jmping via saved addr
  352. --- 19,24 ----
  353.       subl    d0,sp        | increase stack frame size by that much
  354.       movel    sp,d0        | set up to return it
  355.   
  356. !     subql    #4,sp        | new top of stack (real bug fix here)
  357.   
  358.       jmp    a0@        | return by jmping via saved addr
  359. *** 1.10    1992/03/28 06:40:31
  360. --- console.c    1992/04/19 16:03:47
  361. ***************
  362. *** 85,91 ****
  363.   raw_in(dev)
  364.   int dev;
  365.   {
  366. !     return Bconin(in_dev(dev));
  367.   }
  368.   
  369.   #if 0
  370. --- 85,96 ----
  371.   raw_in(dev)
  372.   int dev;
  373.   {
  374. !   if (dev < 3)
  375. !     return Bconin (dev);
  376. !   else if (dev == 3)
  377. !     return Crawcin ();
  378. !   else
  379. !     return Cauxin ();
  380.   }
  381.   
  382.   #if 0
  383. ***************
  384. *** 218,221 ****
  385.       }
  386.       }
  387.   }
  388. --- 223,225 ----
  389. *** 1.3    1991/06/23 17:07:09
  390. --- div.c    1992/04/19 16:03:50
  391. ***************
  392. *** 36,44 ****
  393.            movl    %3,sp@-
  394.           movl    %2,sp@-
  395.           jsr    ___divsi3
  396.           movl    d0,%0
  397. !         movl    d1,%1
  398. !         addqw    #8,sp"
  399.           : "=g"(result.quot), "=g"(result.rem)
  400.           : "r"(num), "r"(denom)
  401.           ); /* compiler dependency, dont tell gcc about d0,d1 clobb */
  402. --- 36,44 ----
  403.            movl    %3,sp@-
  404.           movl    %2,sp@-
  405.           jsr    ___divsi3
  406. +         addqw    #8,sp
  407.           movl    d0,%0
  408. !         movl    d1,%1"
  409.           : "=g"(result.quot), "=g"(result.rem)
  410.           : "r"(num), "r"(denom)
  411.           ); /* compiler dependency, dont tell gcc about d0,d1 clobb */
  412. *** 1.10    1992/03/06 19:19:47
  413. --- doprnt.c    1992/04/19 16:03:50
  414. ***************
  415. *** 23,28 ****
  416. --- 23,29 ----
  417.    */
  418.   
  419.   #ifndef __NO_FLOAT__
  420. + #if 0
  421.   static unsigned long
  422.       __notanumber[2] = { 0x7fffffffL, 0xffffffffL }; /* ieee NAN */
  423.   #define NAN  (*((double *)&__notanumber[0]))
  424. ***************
  425. *** 31,36 ****
  426. --- 32,44 ----
  427.   #define INF  (*((double *)&__p_infinity[0]))
  428.   #endif
  429.   
  430. + #define NAN_HI 0x7fffffffL
  431. + #define NAN_LO 0xffffffffL
  432. + #define INF_HI 0x7ff00000L
  433. + #define INF_LO 0x00000000L
  434. + #endif /* __NO_FLOAT__ */
  435.   #ifdef LIBC_SCCS
  436.   static char sccsid[] = "@(#)doprnt.c    5.37 (Berkeley) 3/26/89";
  437.   #endif /* LIBC_SCCS */
  438. ***************
  439. *** 101,143 ****
  440.   #endif
  441.   
  442.   #ifdef __GNUC__
  443. ! #define _ICONV(NUMBER, BASE, BUF)                 \
  444.   {                                \
  445. !     short i;                            \
  446. !     if(NUMBER <= 65535L)                    \
  447.       {                                \
  448. !     do                             \
  449. !     {                            \
  450. !         __asm__ volatile("  \
  451. !          divu    %3,%2;  \
  452. !          swap    %0;     \
  453. !          movw    %0,%1;  \
  454. !          clrw    %0;     \
  455. !                 swap    %0"                    \
  456. !              : "=d"((long)NUMBER), "=g"(i)            \
  457. !          : "0"((long)NUMBER), "g"((short)BASE));    \
  458. !         *--BUF = digs[i];                    \
  459. !     } while(NUMBER);                    \
  460.       }                                \
  461. !     else                            \
  462.       {                                \
  463. !         extern unsigned long __udivsi3(); /* quot = d0, rem = d1 */     \
  464. !     do                             \
  465. !     {                            \
  466. !         __asm__ volatile("        \
  467. !          movl    %3,sp@-;      \
  468. !          movl    %2,sp@-;      \
  469. !          jsr    ___udivsi3;    \
  470. !          movl    d0,%0;        \
  471. !          movw    d1,%1;        \
  472. !          addqw    #8,sp"                    \
  473. !              : "=g"((long)NUMBER), "=g"(i)            \
  474. !          : "0"((long)NUMBER), "g"((long)BASE)        \
  475.                : "d0", "d1", "a0", "a1");            \
  476.           *--BUF = digs[i];                    \
  477. -     } while(NUMBER);                    \
  478.       }                                \
  479.   }
  480.   #endif /* __GNUC__ */
  481.   
  482.   
  483. --- 109,175 ----
  484.   #endif
  485.   
  486.   #ifdef __GNUC__
  487. ! #ifdef __M68020__
  488. ! #define _ICONV(NUMBER, BASE, BUF)                \
  489.   {                                \
  490. !   long i;                            \
  491. !   do                                \
  492.       {                                \
  493. !       __asm__ volatile                        \
  494. !     ("divull %3,%0:%1"                    \
  495. !      : "=d"((long)(NUMBER)), "=d"(i)            \
  496. !      : "0"((long)(NUMBER)), "d"((long)(BASE)));        \
  497. !       *--(BUF) = digs[i];                    \
  498.       }                                \
  499. !   while (NUMBER);                        \
  500. ! }
  501. ! #else /* !__M68020 */  
  502. ! #define _ICONV(NUMBER, BASE, BUF)                 \
  503. ! {                                \
  504. !                                 \
  505. !     while((NUMBER) > 65535L)                    \
  506.       {                                \
  507. !         extern unsigned long __udivsi3(); /* quot = d0, rem = d1 */ \
  508. !         register long i __asm ("d1");                    \
  509. !     __asm__ volatile("
  510. !         movl    %3,sp@-;
  511. !          movl    %2,sp@-;
  512. !          jsr    ___udivsi3;
  513. !          addqw    #8,sp;
  514. !          movl    d0,%0"                    \
  515. !              : "=r"((long)NUMBER), "=d"(i)            \
  516. !          : "0"((long)NUMBER), "r"((long)BASE)        \
  517.                : "d0", "d1", "a0", "a1");            \
  518.           *--BUF = digs[i];                    \
  519.       }                                \
  520. +     do                                 \
  521. +     {                                \
  522. +             short i;                        \
  523. +         __asm__ volatile("
  524. +          divu    %3,%2;
  525. +          swap    %0;
  526. +          movw    %0,%1;
  527. +          clrw    %0;
  528. +                 swap    %0"                    \
  529. +              : "=d"((long)NUMBER), "=g"(i)            \
  530. +          : "0"((long)NUMBER), "g"((short)BASE));    \
  531. +         *--BUF = digs[i];                    \
  532. +     } while(NUMBER);                        \
  533.   }
  534. + #endif /* __M68020 */
  535. + #else /* !__GNUC__ */
  536. + #define _ICONV(NUMBER, BASE, BUF)                 \
  537. +   do {                                \
  538. +     *--(BUF) = digs[(NUMBER) % (BASE)];                \
  539. +     (NUMBER) /= (BASE);                        \
  540. +   } while (NUMBER);
  541.   #endif /* __GNUC__ */
  542.   
  543.   
  544. ***************
  545. *** 279,285 ****
  546.   /* mjr: check for NANs */
  547.   #define    _double _dd.d
  548.               _double = va_arg(argp, double);
  549. !             if( (unsigned long)_dd.i[0] == __notanumber[0])    {
  550.                   t = buf;
  551.                   t = strcpy(t, " Not A Number ");
  552.                   size = strlen(t);
  553. --- 311,318 ----
  554.   /* mjr: check for NANs */
  555.   #define    _double _dd.d
  556.               _double = va_arg(argp, double);
  557. !             if (_dd.i[0] == NAN_HI)
  558. !             {
  559.                   t = buf;
  560.                   t = strcpy(t, " Not A Number ");
  561.                   size = strlen(t);
  562. ***************
  563. *** 307,317 ****
  564.               else
  565.                   softsign = 0;
  566.   /* mjr: check for +-INFINITY */
  567. !             if(
  568. !                 ((unsigned long)_dd.i[0] == __p_infinity[0])
  569. ! /*              && ((unsigned long)_dd.i[1] == __p_infinity[1]) */
  570. ! /* mjr: don't test this in order to catch a conversion bug in gcc-as     */
  571. !             )    {
  572.                   t = buf;
  573.                   if(softsign == 0)
  574.                   t = strcpy(t, " Infinity ");
  575. --- 340,348 ----
  576.               else
  577.                   softsign = 0;
  578.   /* mjr: check for +-INFINITY */
  579. !             if (((unsigned long)_dd.i[0] == INF_HI) &&
  580. !                 ((unsigned long)_dd.i[1] == INF_LO))
  581. !               {
  582.                   t = buf;
  583.                   if(softsign == 0)
  584.                   t = strcpy(t, " Infinity ");
  585. ***************
  586. *** 322,331 ****
  587.               }
  588.               /*
  589.                * cvt may have to round up past the "start" of the
  590. !              * buffer, i.e. ``intf("%.2f", (double)9.999);'';
  591. !              * if the first char isn't NULL, it did.
  592.                */
  593. !             *buf = (char)NULL;
  594.               size = cvt(_double, (int)prec, (int)flags, &softsign,
  595.                      *fmt, buf, buf + (int)sizeof(buf)); 
  596.               if (softsign)
  597. --- 353,362 ----
  598.               }
  599.               /*
  600.                * cvt may have to round up past the "start" of the
  601. !              * buffer, i.e. ``printf("%.2f", (double)9.999);'';
  602. !              * if the first char isn't '\0', it did.
  603.                */
  604. !             *buf = '\0';
  605.               size = cvt(_double, (int)prec, (int)flags, &softsign,
  606.                      *fmt, buf, buf + (int)sizeof(buf)); 
  607.               if (softsign)
  608. ***************
  609. *** 420,433 ****
  610.                */
  611.               t = buf + BUF;
  612.               if (_ulong != 0 || prec != 0) {
  613. - #ifndef __GNUC__
  614. -                 do {
  615. -                     *--t = digs[_ulong % base];
  616. -                     _ulong /= base;
  617. -                 } while (_ulong);
  618. - #else
  619.                   _ICONV(_ulong, base, t);
  620. - #endif                
  621.                   digs = "0123456789abcdef";
  622.                   if (flags & ALT && base == 8 && *t != '0')
  623.                       *--t = '0'; /* octal leading 0 */
  624. --- 451,457 ----
  625. ***************
  626. *** 671,680 ****
  627.                           fract = modf(fract * 10, &tmp);
  628.                           *t++ = tochar((int)tmp);
  629.                       } while(!tmp);
  630.                   }
  631. !                 while (--prec && fract) {
  632.                       fract = modf(fract * 10, &tmp);
  633.                       *t++ = tochar((int)tmp);
  634.                   }
  635.               }
  636.               if (fract)
  637. --- 695,706 ----
  638.                           fract = modf(fract * 10, &tmp);
  639.                           *t++ = tochar((int)tmp);
  640.                       } while(!tmp);
  641. +                     prec--;
  642.                   }
  643. !                 while (prec && fract) {
  644.                       fract = modf(fract * 10, &tmp);
  645.                       *t++ = tochar((int)tmp);
  646. +                     prec--;
  647.                   }
  648.               }
  649.               if (fract)
  650. *** 1.12    1992/03/28 06:40:31
  651. --- fread.c    1992/04/19 16:03:57
  652. ***************
  653. *** 46,52 ****
  654.           fp->_cnt -= cnt;
  655.           fp->_ptr += cnt;
  656.           l += cnt;
  657. !         data = (char *)data + cnt;
  658.           n -= cnt;
  659.       }
  660.       /* n == how much more */
  661. --- 46,52 ----
  662.           fp->_cnt -= cnt;
  663.           fp->_ptr += cnt;
  664.           l += cnt;
  665. !         data = data + cnt;
  666.           n -= cnt;
  667.       }
  668.       /* n == how much more */
  669. *** 1.7    1992/03/06 19:19:47
  670. --- getenv.c    1992/04/19 16:04:01
  671. ***************
  672. *** 10,17 ****
  673.   
  674.   extern char ** environ;
  675.   
  676. - static void del_env __PROTO((const char *strng));
  677.   char *
  678.   getenv(tag)
  679.       const char *tag;
  680. --- 10,15 ----
  681. ***************
  682. *** 26,91 ****
  683.           if (!strncmp(name, tag, len) && name[len] == '=')
  684.               return name+len+1;
  685.       }
  686. -     return 0;
  687. - }
  688. - static void
  689. - del_env(strng)
  690. -     const char *strng;
  691. - {
  692. -     char **var;
  693. -     char *name;
  694. -     size_t len = 0;
  695. -     if (!environ) return;
  696. - /* find the length of "tag" in "tag=value" */
  697. -     for (name = (char *)strng; *name && (*name != '='); name++)
  698. -         len++;
  699. - /* find the tag in the environment */
  700. -     for (var = environ; name = *var; var++) {
  701. -         if (!strncmp(name, strng, len) && name[len] == '=')
  702. -             break;
  703. -     }
  704. - /* if it's found, move all the other environment variables down by 1 to
  705. -    delete it
  706. -  */
  707. -     if (name) {
  708. -         while (name) {
  709. -             name = var[1];
  710. -             *var++ = name;
  711. -         }
  712. -     }
  713. - }
  714. - int
  715. - putenv(strng)
  716. -     char *strng;
  717. - {
  718. -     int i = 0;
  719. -     char **e;
  720. -     del_env(strng);
  721. -     if (!environ)
  722. -         e = (char **) malloc(2*sizeof(char *));
  723. -     else {
  724. -         while(environ[i]) i++ ;
  725. -         e = (char **) malloc((i+2)*sizeof(char *));
  726. -         if (!e) {
  727. -             return -1;
  728. -         }
  729. -         bcopy(environ, e, (i+1)*sizeof(char *));
  730. -         free(environ);
  731. -         environ = e;
  732. -     }
  733. -     if (!e)
  734. -         return -1;
  735. -     environ = e;
  736. -     environ[i] = strng;
  737. -     environ[i+1] = 0;
  738.       return 0;
  739.   }
  740. --- 24,28 ----
  741. *** 1.7    1992/03/06 19:19:47
  742. --- getopt.c    1992/04/19 16:04:02
  743. ***************
  744. *** 42,48 ****
  745.   int
  746.   getopt( argc, argv, optstring )        /* returns letter, '?', EOF */
  747.       int        argc;        /* argument count from main */
  748. !           char    *argv[];    /* argument vector from main */
  749.       const char    *optstring;    /* allowed args, e.g. "ab:c" */
  750.       {
  751.       static int    sp = 1;        /* position within argument */
  752. --- 42,48 ----
  753.   int
  754.   getopt( argc, argv, optstring )        /* returns letter, '?', EOF */
  755.       int        argc;        /* argument count from main */
  756. !     char *const     *argv;        /* argument vector from main */
  757.       const char    *optstring;    /* allowed args, e.g. "ab:c" */
  758.       {
  759.       static int    sp = 1;        /* position within argument */
  760. *** 1.5    1991/04/12 18:19:53
  761. --- getuid.c    1992/04/19 16:04:04
  762. ***************
  763. *** 6,25 ****
  764.   #include <unistd.h>
  765.   
  766.   /* pretending we are root (0,0) is probably not a good idea */
  767. ! static int euid = 1, egid = 1;
  768. ! static int uid = 1, gid = 1;
  769.     
  770. ! int getuid() { return uid; }
  771. ! int geteuid(){ return euid; }
  772.   
  773. ! int getgid() { return gid; }
  774. ! int getegid() { return egid; }
  775.   
  776. ! int setuid(x) int x; { return uid = x; }
  777. ! int setgid(x) int x; { return gid = x; }
  778.   
  779. ! int seteuid(x) int x; { return euid = x; }
  780. ! int setegid(x) int x; { return egid = x; }
  781.     
  782.   int setpgrp() { return getpid(); }
  783.   int getpgrp() { return getpid(); }
  784. --- 6,25 ----
  785.   #include <unistd.h>
  786.   
  787.   /* pretending we are root (0,0) is probably not a good idea */
  788. ! static uid_t euid = 1, uid = 1;
  789. ! static gid_t egid = 1, gid = 1;
  790.     
  791. ! uid_t getuid() { return uid; }
  792. ! uid_t geteuid(){ return euid; }
  793.   
  794. ! gid_t getgid() { return gid; }
  795. ! gid_t getegid() { return egid; }
  796.   
  797. ! uid_t setuid(x) int x; { return uid = x; }
  798. ! gid_t setgid(x) int x; { return gid = x; }
  799.   
  800. ! uid_t seteuid(x) int x; { return euid = x; }
  801. ! gid_t setegid(x) int x; { return egid = x; }
  802.     
  803.   int setpgrp() { return getpid(); }
  804.   int getpgrp() { return getpid(); }
  805. *** 1.7    1991/12/26 15:53:59
  806. --- gmon.c    1992/04/19 16:04:06
  807. ***************
  808. *** 588,594 ****
  809.         case 0x11201985L:
  810.         case 0x02061986L:
  811.         case 0x04241986L:
  812. !     act_pd = (BASEPAGE **) 0x602C;
  813.       break;
  814.         default:
  815.       act_pd = (BASEPAGE **) sysbase[10];
  816. --- 588,594 ----
  817.         case 0x11201985L:
  818.         case 0x02061986L:
  819.         case 0x04241986L:
  820. !     act_pd = (BASEPAGE **) 0x602CL;
  821.       break;
  822.         default:
  823.       act_pd = (BASEPAGE **) sysbase[10];
  824. *** 1.8    1992/03/06 19:19:47
  825. --- gnulib2.c    1992/04/19 16:04:06
  826. ***************
  827. *** 30,35 ****
  828. --- 30,36 ----
  829.   #define L_floatdidf
  830.   
  831.   /* gcc-2.0 stuff */
  832. + #if 0    /* NOTE: these are now covered, and should not be generated here */
  833.   #define L_lshrsi3
  834.   #define L_lshlsi3
  835.   #define L_ashrsi3
  836. ***************
  837. *** 48,53 ****
  838. --- 49,56 ----
  839.   #define L_gesf2
  840.   #define L_ltsf2
  841.   #define L_lesf2
  842. + #endif
  843. + #define L_fxussfsi
  844.   
  845.   #endif /* __DEF_ALL__ */
  846.   
  847. ***************
  848. *** 240,245 ****
  849. --- 243,249 ----
  850.   __EXTERN long long __fixdfdi __PROTO((double a));
  851.   __EXTERN double __floatdidf __PROTO((long long u));
  852.   __EXTERN int __builtin_saveregs __PROTO((void));
  853. + __EXTERN unsigned SItype __fixunssfsi __PROTO((float a));
  854.   
  855.   #ifdef L_adddi3
  856.   long long 
  857. ***************
  858. *** 1088,1093 ****
  859. --- 1092,1098 ----
  860.   union flt_or_int { long int i; float f; };
  861.   #endif
  862.   
  863. + #if 0        /* NOTE: all these come from elsewhere now */
  864.   #ifdef L_lshrsi3
  865.   #if 0
  866.   SItype
  867. ***************
  868. *** 1622,1625 ****
  869. --- 1627,1643 ----
  870.       movel sp@+,d2
  871.       rts
  872.   ");
  873. + #endif
  874. + #endif    /* # if 0 to ensure that the above functions are not compiled */
  875. + #ifdef L_fxussfsi
  876. + #include <limits.h>
  877. + unsigned SItype
  878. + __fixunssfsi (float a)
  879. + {
  880. +   if (a >= - (float) LONG_MIN)
  881. +     return (SItype) (a + LONG_MIN) - LONG_MIN;
  882. +   return (SItype) a;
  883. + }
  884.   #endif
  885. *** 1.21    1992/01/29 20:58:29
  886. --- main.c    1992/04/19 16:04:12
  887. ***************
  888. *** 36,42 ****
  889.   {
  890.       long *cookie;
  891.   
  892. !     cookie = *((long **) 0x5a0);
  893.       if (!cookie)
  894.           __mint = 0;
  895.       else {
  896. --- 36,42 ----
  897.   {
  898.       long *cookie;
  899.   
  900. !     cookie = *((long **) 0x5a0L);
  901.       if (!cookie)
  902.           __mint = 0;
  903.       else {
  904. *** 1.16    1992/03/06 19:19:47
  905. --- mincl    1992/04/19 16:04:14
  906. ***************
  907. *** 1,9 ****
  908.   #
  909.   # GCC specific stuff
  910.   GLIB1 = _addsubd.o _addsubs.o _cmpdf2.o _cmpsf2.o _divdf3.o _divmods.o \
  911. !     _divsf3.o _extends.o _fixdfsi.o _fxunsd.o _floatsi.o \
  912.       _muldf3.o _mulsf3.o _mulsi3.o _negdf2.o _negsf2.o _normdf.o _normsf.o \
  913. !     _truncdf.o _udivmod.o _umulsi3.o
  914.   
  915.   #GLIB2 = gnulib2.o
  916.   GLIB2 = _adddi3.o _subdi3.o _muldi3.o _divdi3.o _moddi3.o _udivdi3.o \
  917. --- 1,9 ----
  918.   #
  919.   # GCC specific stuff
  920.   GLIB1 = _addsubd.o _addsubs.o _cmpdf2.o _cmpsf2.o _divdf3.o _divmods.o \
  921. !     _divsf3.o _extends.o _fixdfsi.o _fxunsd.o _fltsi.o \
  922.       _muldf3.o _mulsf3.o _mulsi3.o _negdf2.o _negsf2.o _normdf.o _normsf.o \
  923. !     _truncdf.o _udivmod.o _umulsi3.o _fixsfsi.o _fltsisf.o
  924.   
  925.   #GLIB2 = gnulib2.o
  926.   GLIB2 = _adddi3.o _subdi3.o _muldi3.o _divdi3.o _moddi3.o _udivdi3.o \
  927. ***************
  928. *** 10,23 ****
  929.           _umoddi3.o _negdi2.o _anddi3.o _iordi3.o _xordi3.o _lshrdi3.o \
  930.           _lshldi3.o _ashldi3.o _ashrdi3.o _one_cmpldi2.o _bdiv.o _cmpdi2.o \
  931.           _ucmpdi2.o _fixunsdfdi.o _fixdfdi.o _floatdidf.o \
  932. !     _lshrsi3.o _lshlsi3.o _ashrsi3.o _ashlsi3.o _eqdf2.o \
  933. !     _nedf2.o _gtdf2.o _gedf2.o _ltdf2.o _ledf2.o _fixsfsi.o \
  934. !     _floatsisf.o _eqsf2.o _nesf2.o _gtsf2.o _gesf2.o _ltsf2.o \
  935. !     _lesf2.o
  936.   
  937.   GCC=     $(GLIB1) $(GLIB2) \
  938.       ldexp.o frexp.o modf.o alloca.o setjmp.o osbind.o\
  939. !     linea.o  alglobal.o sysvar.o gmon.o screen.o stksiz.o binmode.o
  940.   #
  941.   # ANSI stuff + support
  942.   ANSI =  atol.o atof.o abort.o bsearch.o clock.o ctime.o ctype.o difftime.o \
  943. --- 10,21 ----
  944.           _umoddi3.o _negdi2.o _anddi3.o _iordi3.o _xordi3.o _lshrdi3.o \
  945.           _lshldi3.o _ashldi3.o _ashrdi3.o _one_cmpldi2.o _bdiv.o _cmpdi2.o \
  946.           _ucmpdi2.o _fixunsdfdi.o _fixdfdi.o _floatdidf.o \
  947. !     _fxussfsi.o
  948.   
  949.   GCC=     $(GLIB1) $(GLIB2) \
  950.       ldexp.o frexp.o modf.o alloca.o setjmp.o osbind.o\
  951. !     linea.o  alglobal.o sysvar.o gmon.o screen.o stksiz.o binmode.o \
  952. !     bblink.o
  953.   #
  954.   # ANSI stuff + support
  955.   ANSI =  atol.o atof.o abort.o bsearch.o clock.o ctime.o ctype.o difftime.o \
  956. ***************
  957. *** 25,31 ****
  958.       fputc.o fputs.o fread.o fwrite.o fseek.o fsetpos.o \
  959.       fprintf.o sprintf.o \
  960.       fscanf.o scanf.o sscanf.o \
  961. !     getenv.o gets.o getw.o localtim.o \
  962.       malloc.o qsort.o raise.o rand.o setbuf.o setvbuf.o \
  963.       setlocal.o strftime.o strtol.o system.o \
  964.       tmpnam.o tmpfile.o \
  965. --- 23,29 ----
  966.       fputc.o fputs.o fread.o fwrite.o fseek.o fsetpos.o \
  967.       fprintf.o sprintf.o \
  968.       fscanf.o scanf.o sscanf.o \
  969. !     getenv.o putenv.o gets.o getw.o localtim.o \
  970.       malloc.o qsort.o raise.o rand.o setbuf.o setvbuf.o \
  971.       setlocal.o strftime.o strtol.o system.o \
  972.       tmpnam.o tmpfile.o \
  973. ***************
  974. *** 43,50 ****
  975.   
  976.   STRING = strcat.o strchr.o strcmp.o strcpy.o strcspn.o strdup.o \
  977.       strlen.o strncat.o strncmp.o strncpy.o strpbrk.o strrchr.o strspn.o \
  978. !     strtok.o strstr.o memcpy.o memccpy.o memcmp.o memchr.o memset.o \
  979. !     bcopy.o bcmp.o bzero.o strerror.o
  980.   #
  981.   # stuff to fake unix system calls 
  982.   
  983. --- 41,48 ----
  984.   
  985.   STRING = strcat.o strchr.o strcmp.o strcpy.o strcspn.o strdup.o \
  986.       strlen.o strncat.o strncmp.o strncpy.o strpbrk.o strrchr.o strspn.o \
  987. !     strtok.o strstr.o memccpy.o memcmp.o memchr.o \
  988. !     bcopy.o bcmp.o bzero.o strerror.o strcoll.o
  989.   #
  990.   # stuff to fake unix system calls 
  991.   
  992. ***************
  993. *** 96,102 ****
  994.   _divsf3.o: _divsf3.cpp
  995.   _extends.o: _extends.cpp
  996.   _fixdfsi.o: _fixdfsi.cpp
  997. ! _floatsi.o: _floatsi.cpp
  998.   _fxunsd.o: _fxunsd.cpp
  999.   _muldf3.o: _muldf3.cpp
  1000.   _mulsf3.o: _mulsf3.cpp
  1001. --- 94,100 ----
  1002.   _divsf3.o: _divsf3.cpp
  1003.   _extends.o: _extends.cpp
  1004.   _fixdfsi.o: _fixdfsi.cpp
  1005. ! _fltsi.o: _fltsi.cpp
  1006.   _fxunsd.o: _fxunsd.cpp
  1007.   _muldf3.o: _muldf3.cpp
  1008.   _mulsf3.o: _mulsf3.cpp
  1009. ***************
  1010. *** 103,111 ****
  1011. --- 101,112 ----
  1012.   _normdf.o: _normdf.cpp
  1013.   _normsf.o: _normsf.cpp
  1014.   _truncdf.o: _truncdf.cpp
  1015. + _fixsfsi.o: _fixsfsi.cpp
  1016. + _fltsisf.o: _fltsisf.cpp
  1017.   frexp.o: frexp.cpp
  1018.   ldexp.o: ldexp.cpp
  1019.   modf.o: modf.cpp
  1020. + bzero.o: bzero.cpp
  1021.   
  1022.   #
  1023.   # integer only io stuff
  1024. ***************
  1025. *** 121,127 ****
  1026.   
  1027.   # other dependencies
  1028.   bcopy.o : bcopy.s
  1029. - memcpy.o: memcpy.s
  1030.   atof.o  : flonum.h
  1031.   
  1032.   #
  1033. --- 122,127 ----
  1034. ***************
  1035. *** 149,157 ****
  1036.       rm -f $(IIOBJ)
  1037.       rm -f setjmp.s div.s
  1038.       rm -f _addsubd.s _addsubs.s _divdf3.s _divsf3.s _extends.s _fixdfsi.s
  1039. !     rm -f _floatsi.s _fxunsd.s _muldf3.s _mulsf3.s _normdf.s _normsf.s
  1040. !     rm -f _truncdf.s frexp.s ldexp.s modf.s
  1041.   realclean: clean
  1042.       rm -f $(ALL) $(ALL020)
  1043.   
  1044. --- 149,157 ----
  1045.       rm -f $(IIOBJ)
  1046.       rm -f setjmp.s div.s
  1047.       rm -f _addsubd.s _addsubs.s _divdf3.s _divsf3.s _extends.s _fixdfsi.s
  1048. !     rm -f _fltsi.s _fxunsd.s _muldf3.s _mulsf3.s _normdf.s _normsf.s
  1049. !     rm -f _truncdf.s frexp.s ldexp.s modf.s bzero.s
  1050. !     rm -f  _fixsfsi.s _fltsisf.s
  1051.   realclean: clean
  1052.       rm -f $(ALL) $(ALL020)
  1053.   
  1054. *** 1.10    1992/03/06 19:19:47
  1055. --- mkdir.c    1992/04/19 16:04:17
  1056. ***************
  1057. *** 8,15 ****
  1058.   #include <support.h>
  1059.   #include <unistd.h>
  1060.   #include <errno.h>
  1061. - #include <types.h>
  1062. - #include <stat.h>
  1063.   #include "symdir.h"
  1064.   #include "lib.h"
  1065.   
  1066. --- 8,13 ----
  1067. ***************
  1068. *** 20,26 ****
  1069.   int mode;
  1070.   {
  1071.       int rv, name_munged;
  1072. -     struct stat statbuf;
  1073.       char path[FILENAME_MAX];
  1074.   
  1075.   /*
  1076. --- 18,23 ----
  1077. ***************
  1078. *** 31,44 ****
  1079.    */
  1080.       name_munged = (unx2dos(_path, path) == _NM_CHANGE);
  1081.   
  1082. !     rv = stat(path, &statbuf);    /* Stat directory */
  1083. !     if (rv == 0) {            /* Does it exist ? */
  1084.           errno = EEXIST;        /* Yes, so tell user. */
  1085.           return -1;
  1086.       }
  1087.   
  1088. !     if (errno != ENOENT) {        /* Return stat error, if other than */
  1089. !         return -1;        /* File not found. */
  1090.       }
  1091.   
  1092.       rv = Dcreate(path);
  1093. --- 28,42 ----
  1094.    */
  1095.       name_munged = (unx2dos(_path, path) == _NM_CHANGE);
  1096.   
  1097. !     rv = Fattrib(path, 0, 0);    /* Get file attributes */
  1098. !     if (rv >= 0) {            /* Does it exist ? */
  1099.           errno = EEXIST;        /* Yes, so tell user. */
  1100.           return -1;
  1101.       }
  1102.   
  1103. !     if (rv != -ENOENT) {        /* Return stat error, if other than */
  1104. !         errno = -rv;        /* File not found. */
  1105. !         return -1;
  1106.       }
  1107.   
  1108.       rv = Dcreate(path);
  1109. *** 1.16    1992/03/22 21:57:30
  1110. --- read.c    1992/04/19 16:04:22
  1111. ***************
  1112. *** 31,37 ****
  1113.   #endif
  1114.   
  1115.   #define    iswhite(c)    ((c) == ' ' || (c) == '\t')
  1116. ! #define    isvisable(c)    ((c) >= ' ' && (c) < 0x7f)
  1117.   #define    echochar(fd, c)    if (__ttymode & ECHO) (void) _echochar(fd, c); else
  1118.   #define    delchar(fd, n)    if (__ttymode & ECHO) _delchar(fd, n); else
  1119.   
  1120. --- 31,37 ----
  1121.   #endif
  1122.   
  1123.   #define    iswhite(c)    ((c) == ' ' || (c) == '\t')
  1124. ! #define    isvisable(c)    ((unsigned char)(c) >= ' ')
  1125.   #define    echochar(fd, c)    if (__ttymode & ECHO) (void) _echochar(fd, c); else
  1126.   #define    delchar(fd, n)    if (__ttymode & ECHO) _delchar(fd, n); else
  1127.   
  1128. ***************
  1129. *** 297,303 ****
  1130.       int    len = 0;
  1131.       char    c = thebuf[n];
  1132.   
  1133. !     if ((c > 0 && c < ' ') || (c == 0x7f)) {
  1134.           if (c == '\t')
  1135.               len = __col_pos - str_length(thebuf, n);
  1136.           else
  1137. --- 297,303 ----
  1138.       int    len = 0;
  1139.       char    c = thebuf[n];
  1140.   
  1141. !     if ((c >= 0 && c < ' ') || c == 0x7f) {
  1142.           if (c == '\t')
  1143.               len = __col_pos - str_length(thebuf, n);
  1144.           else
  1145. ***************
  1146. *** 322,328 ****
  1147.   
  1148.       while (n--) {
  1149.           c = *p++;
  1150. !         if ((c > 0 && c < ' ') || (c == 0x7f))
  1151.               if (c == '\t')
  1152.                   pos = (pos | 7) + 1;
  1153.               else
  1154. --- 322,328 ----
  1155.   
  1156.       while (n--) {
  1157.           c = *p++;
  1158. !         if ((c >= 0 && c < ' ') || c == 0x7f)
  1159.               if (c == '\t')
  1160.                   pos = (pos | 7) + 1;
  1161.               else
  1162. *** 1.8    1991/06/11 23:04:27
  1163. --- rmdir.c    1992/04/19 16:04:24
  1164. ***************
  1165. *** 60,65 ****
  1166. --- 60,68 ----
  1167.               *s = 0;    /* restore name */
  1168.           }
  1169.           r = Ddelete(path);
  1170. +         if (r < 0 && dir)
  1171. +           /* rewrite symbolic directory if dir was nonempty */
  1172. +           (void)_write_symdir (path, dir);
  1173.       }
  1174.       if (r < 0) {
  1175.           errno = -r;
  1176. *** 1.10    1992/03/06 19:19:47
  1177. --- sbrk.c    1992/04/19 16:04:24
  1178. ***************
  1179. *** 67,73 ****
  1180.         return lsbrk(n);
  1181.         }
  1182.         errno = ENOMEM;
  1183. !       rval = (void *)-1;
  1184.     }
  1185.     return rval;
  1186.   }
  1187. --- 67,73 ----
  1188.         return lsbrk(n);
  1189.         }
  1190.         errno = ENOMEM;
  1191. !       rval = (void *)(-1L);
  1192.     }
  1193.     return rval;
  1194.   }
  1195. *** 1.13    1992/01/29 20:58:29
  1196. --- scanf.c    1992/04/19 16:04:25
  1197. ***************
  1198. *** 115,121 ****
  1199.       /* Character-buffer pointer.  */
  1200.       register char *str;
  1201.       /* Workspace.  */
  1202. !     char work[200];
  1203.       char *w;        /* Pointer into WORK.  */
  1204.       
  1205.       if ((format == NULL) || (!*format))
  1206. --- 115,121 ----
  1207.       /* Character-buffer pointer.  */
  1208.       register char *str;
  1209.       /* Workspace.  */
  1210. !     char work[256];
  1211.       char *w;        /* Pointer into WORK.  */
  1212.       
  1213.       if ((format == NULL) || (!*format))
  1214. ***************
  1215. *** 494,520 ****
  1216.           }
  1217.           else
  1218.           not_in = 0;
  1219. !         
  1220. !         while ((fc = *f++) != '\0' && fc != ']')
  1221. !         {
  1222. !         if (fc == '-' && *f != '\0' && *f != ']' &&
  1223. !             w > work && w[-1] <= *f)
  1224.               /* Add all characters from the one before the '-'
  1225. !                up to (but not including) the next format char.  */
  1226. !             for (fc = w[-1] + 1; fc < *f; ++fc)
  1227. !             *w++ = fc;
  1228. !         else
  1229. !             /* Add the character to the list.  */
  1230. !             *w++ = fc;
  1231.           }
  1232.           if (fc == '\0')
  1233.           conv_error();
  1234.           
  1235. !         *w = '\0';
  1236.           unum = read_in;
  1237.           do
  1238.           {
  1239. !         if ((strchr(work, c) == NULL) != not_in)
  1240.               break;
  1241.           if (do_assign)
  1242.               *str++ = c;
  1243. --- 494,524 ----
  1244.           }
  1245.           else
  1246.           not_in = 0;
  1247. !         w = (char *)f;        /* remember start of class */
  1248. !         bzero (work, 256);
  1249. !         while ((fc = *f++) != '\0' && (fc != ']' || f - 1 == w))
  1250. !         {
  1251. !         /* Add the character to the list.  */
  1252. !         work[(unsigned char)fc] = 1;
  1253. !         /* Look ahead for a range.  */
  1254. !         if (f[0] == '-' && f[1] != '\0' && f[1] != ']')
  1255. !           {
  1256.               /* Add all characters from the one before the '-'
  1257. !                up to the next format char.  */
  1258. !             unsigned char end = f[1];
  1259. !             while ((unsigned char)++fc <= end)
  1260. !             work[(unsigned char)fc] = 1;
  1261. !             f += 2;
  1262. !           }
  1263.           }
  1264.           if (fc == '\0')
  1265.           conv_error();
  1266.           
  1267. !         work[0] = not_in;
  1268.           unum = read_in;
  1269.           do
  1270.           {
  1271. !         if (work[(unsigned char)c] == not_in)
  1272.               break;
  1273.           if (do_assign)
  1274.               *str++ = c;
  1275. *** 1.17    1992/01/29 20:58:29
  1276. --- stat.c    1992/04/19 16:04:30
  1277. ***************
  1278. *** 170,176 ****
  1279.   
  1280.       if (!(d = _do_stat(path))) {
  1281.       /* errno was set by _do_stat */
  1282. !         if (errno == ENOENT && nval == _NM_LINK) {
  1283.           /* here we have a symbolic link to a deleted file */
  1284.               st->st_mode = S_IFLNK | 0644;
  1285.               st->st_ino = ++__inode;
  1286. --- 170,176 ----
  1287.   
  1288.       if (!(d = _do_stat(path))) {
  1289.       /* errno was set by _do_stat */
  1290. !         if ((errno == ENOENT || errno == EPATH) && nval == _NM_LINK) {
  1291.           /* here we have a symbolic link to a deleted file */
  1292.               st->st_mode = S_IFLNK | 0644;
  1293.               st->st_ino = ++__inode;
  1294. *** 1.4    1991/04/26 03:42:08
  1295. --- strftime.c    1992/04/19 16:04:34
  1296. ***************
  1297. *** 196,201 ****
  1298. --- 196,205 ----
  1299.               strftime(buf, sizeof buf, "%H:%M:%S", ts);
  1300.               break;
  1301.   #endif
  1302. +            default:
  1303. +             buf[0] = q;
  1304. +             buf[1] = 0;
  1305. +             break;
  1306.                   }
  1307.   
  1308.                   if (num + (len = strlen(putstr)) >= maxsize)
  1309. *** 1.15    1992/03/22 21:57:30
  1310. --- system.c    1992/04/19 16:04:40
  1311. ***************
  1312. *** 28,34 ****
  1313.   #endif
  1314.   
  1315.   #define isquote(c) ((c) == '\"' || (c) == '\'' || (c) == '`')
  1316. ! #define ARG_ERR       ( (Argentry *) -1 )
  1317.   
  1318.   /* struct. used to build a list of arguments for the command */
  1319.   
  1320. --- 28,34 ----
  1321.   #endif
  1322.   
  1323.   #define isquote(c) ((c) == '\"' || (c) == '\'' || (c) == '`')
  1324. ! #define ARG_ERR       ( (Argentry *) -1L )
  1325.   
  1326.   /* struct. used to build a list of arguments for the command */
  1327.   
  1328. *** 1.21    1992/01/29 20:58:29
  1329. --- unx2dos.c    1992/04/19 16:04:44
  1330. ***************
  1331. *** 39,45 ****
  1332.    * it's assumed that the user will set this via a definition
  1333.    *    char *_default_unixmode = whatever
  1334.    * if no such definition is present (i.e. _default_unixmode is 0) then
  1335. !  * "/" is assumed
  1336.    */
  1337.   
  1338.   char *_default_unixmode;
  1339. --- 39,45 ----
  1340.    * it's assumed that the user will set this via a definition
  1341.    *    char *_default_unixmode = whatever
  1342.    * if no such definition is present (i.e. _default_unixmode is 0) then
  1343. !  * "/d" is assumed
  1344.    */
  1345.   
  1346.   char *_default_unixmode;
  1347. ***************
  1348. *** 86,92 ****
  1349.       /* compatibility with older versions of the library */
  1350.       switch(_unixmode) {
  1351.         case 0: mode = ""; break;
  1352. !       case 1: mode = "/"; break;
  1353.         case 2: mode = "/.,"; break;
  1354.         default: mode = "/.,LAHd"; break;
  1355.       }
  1356. --- 86,92 ----
  1357.       /* compatibility with older versions of the library */
  1358.       switch(_unixmode) {
  1359.         case 0: mode = ""; break;
  1360. !       case 1: mode = "/d"; break; /* 'd' added to default */
  1361.         case 2: mode = "/.,"; break;
  1362.         default: mode = "/.,LAHd"; break;
  1363.       }
  1364.