Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!munnari.oz.au!csc!ccadfa!usage!basser!metro!extro!natmlab!ditsyda!evans From: evans@ditsyda.oz (Bruce Evans) Newsgroups: comp.os.minix Subject: Re: nroff and MINIX-ST V1.1 Message-ID: <2218@ditsyda.oz> Date: 18 Sep 89 09:33:48 GMT References: <23926@louie.udel.EDU> Reply-To: evans@ditsyda.oz (Bruce Evans) Organization: CSIRO DIT Sydney, Australia Lines: 71 In article <23926@louie.udel.EDU> tomiak@vax.hmi.dbp.de (Andreas Tomiak) writes: >I'm using the plain MINIX-ST 1.1 and have severe problems in running >the recently posted nroff. It does compile, assemble and link fine, >but if one try to run it there will be an memory fault. If I use I had the same problem. It turned out that spread() was generating negative indices (why, I don't know; the enclosed fix is temporary) and writing over the stdio FILE data. Bad pointers soon caused the memory fault. (It only faulted in 386 32-bit mode, where there were 64K good pointers and 4G - 64K bad pointers, great for trapping.) >[It sort of works with -v option] "Unlucky". Different data must have been trashed. The diff fixes 2 other things: falling off the end of main() with no exit code and printing carriage returns. Underlining seems broken. "nroff -man", as suggested by the man page, gave lousy formatting on the man page itself, but "nroff -b -man" worked well. #! /bin/sh # Contents: nrof.cdif # Wrapped by sys@besplex on Mon Sep 18 17:25:39 1989 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'nrof.cdif' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'nrof.cdif'\" else echo shar: Extracting \"'nrof.cdif'\" \(548 characters\) sed "s/^X//" >'nrof.cdif' <<'END_OF_FILE' X*** nroff1.c~ Sun Sep 17 08:04:30 1989 X--- nroff1.c Sun Sep 17 08:27:09 1989 X*************** X*** 57,58 **** X--- 57,59 ---- X } X+ return(0); X } X*** nroff3.c~ Sun Sep 17 08:04:41 1989 X--- nroff3.c Sun Sep 17 09:46:03 1989 X*************** X*** 361,363 **** X { X! putc(c,fp); X } X--- 361,363 ---- X { X! if (c != '\r') putc(c,fp); X } X*************** X*** 535,536 **** X--- 535,537 ---- X while(i < j) { X+ if (i < 0 | j < 0) return; X p[j] = p[i]; X*************** X*** 543,544 **** X--- 544,546 ---- X --j; X+ if (j < 0) return; X p[j] = ' '; END_OF_FILE if test 548 -ne `wc -c <'nrof.cdif'`; then echo shar: \"'nrof.cdif'\" unpacked with wrong size! fi # end of 'nrof.cdif' fi echo shar: End of shell archive. exit 0 -- Bruce Evans evans@ditsyda.oz.au