Path: utzoo!attcan!uunet!munnari!otc!metro!ditsyda!evans From: evans@ditsyda.oz (Bruce Evans) Newsgroups: comp.os.minix Subject: Re: V1.4 #0 (introduction) Summary: Report on 1.4a Message-ID: <1633@ditsyda.oz> Date: 26 Jan 89 12:10:30 GMT References: <1945@ast.cs.vu.nl> Organization: CSIRO DIT Sydney, Australia Lines: 167 I have been running the modified sh for several months and strongly recommend it. The only new bug I know of is that sh -x does not print assignment statements properly (try sh -x $HOME/.profile with both shells). I found the following problems. Packaging --------- The diffs for commands/make/* were reversed. No crc was posted for helpfile. Please use shar even for single files, since even with perfect communications it's hard to tell how many newlines are added by news. Same for floppy.c.cdif. This is actually the full floppy.c with the diff appended. Packaging - string functions ---------------------------- Makefile.strin and StringTest.c are in the crc list but were not posted. I recovered them from the previous posting. Running make is supposed to produce string.h and memory.h for /usr/include. This was not done. Instead there is string.h.proto in the include directory. This needs to be run through sed to produce the other files. Sed doesn't work with multiple commands separated by ';', so the makefile doesn't work directly. The makefile needs to be edited for cc to produce the tester program. It still has .o files. This is always a pain when porting Unix programs. Why not just modify cc and (preferably not) friends so that .o file == packed assembler file .s file == human readable assembler file I won't be doing it since I only use cc for testing. Lib --- fdopen.c appears to have 2 fresh bugs. It no longer seeks to the end for the append case, and sets the IOMYBUF flag even for a null buffer. termcap.c appears to have some of the bugs fixed by EFTH. I think it is based on an old ST version. utime.c doesn't compile. It has an undeclared argument. The library order is still hard to get right. Now index calls strchr and rindex calls strrchr. I had to move strchr and strrchr later in the library to match. Same for time which is now called by utime. I forgot the -LIB flag when recompiling this library. Why does asld distinguish extern symbols in the library? I understand why .define is needed for the library, but why is .globl good enough elsewhere? The CFLAGS for the library are getting out of hand: -Di8088 -DCONST='' -DSIZET=int -DVOIDSTAR='char *' -LIB The strings package really belongs in a directory by itself. The helpfile for more is called more.help in more.c, but help.more in the distribution. I think lib should be reserved for source files and not cluttered up with help files. It is already too large. On a hard disk I use /usr/sys/lib for source so there's plenty of room in /usr/lib. It is not clear how to organize it for floppies. Does anyone still care? Commands -------- pr.c clears the L_BUF pointers before it allocates them. The bug shows up in commands like ls | pr -t -l1 -5 (same before this supposed fix). It looks like a botched diff - the indentantion is wrong too. I'm posting my 1 line fix again rather than mess around with this 5 line fix. Old cc bugs ----------- The string tester program showed 2 problems. One involving strerror() is system-dependent and doesn't matter. The other is that memchr() is broken. This is because cc is broken. Cc incorrectly thinks (unsigned char) *"\203" == 0xFF83. (unsigned char) 0203 is OK. The program ccbug.c shows the bug and its effect on memchr. I've been bitten by this before when "porting" to cc. cc -D/user/include -c somefile.c gives an amusing error message. The -D is a mistyped -I. #! /bin/sh # Contents: ccbug.c pr.c.cdif # Wrapped by sys@besplex on Thu Jan 26 23:00:25 1989 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'ccbug.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'ccbug.c'\" else echo shar: Extracting \"'ccbug.c'\" \(619 characters\) sed "s/^X//" >'ccbug.c' <<'END_OF_FILE' X/* show bug (unsigned char) *"\203" == 0xFF83 */ X Xchar one[10]; Xchar *scan = "\203"; Xint uc; Xint ucharwanted; X Xmain() X{ X strcpy(one, "a\203b"); X if (memchr(one, 0203, 3) != one+1) { X printf("something wrong with memchr:\n"); X printf("memchr(one, 0203, 3) = %04x\n", memchr(one, 0203, 3)); X printf("one + 1 = %04x\n", one + 1); X } X ucharwanted = 0203; X uc = (unsigned char) ucharwanted; X if ((unsigned char) *scan != uc) { X printf("no, something wrong with cc:\n"); X printf("(unsigned char) *\"\\203\" = %04x\n", X (unsigned char) *"\203"); X printf("(unsigned char) 0203 = %04x\n", X (unsigned char) 0203); X } X} END_OF_FILE if test 619 -ne `wc -c <'ccbug.c'`; then echo shar: \"'ccbug.c'\" unpacked with wrong size! fi # end of 'ccbug.c' fi if test -f 'pr.c.cdif' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'pr.c.cdif'\" else echo shar: Extracting \"'pr.c.cdif'\" \(269 characters\) sed "s/^X//" >'pr.c.cdif' <<'END_OF_FILE' X*** /user/sys/commands/pr.c Thu Oct 6 02:08:47 1988 X--- pr.c Thu Oct 6 02:15:49 1988 X*************** X*** 468,473 **** X--- 468,474 ---- X fprintf(stderr,"malloc returned %d\n",ptr); X exit(1); X } X+ memset(ptr, 0, (unsigned)size); X return (char *) ptr; X } X END_OF_FILE if test 269 -ne `wc -c <'pr.c.cdif'`; then echo shar: \"'pr.c.cdif'\" unpacked with wrong size! fi # end of 'pr.c.cdif' fi echo shar: End of shell archive. exit 0 D