Path: utzoo!utgpu!attcan!uunet!husc6!rutgers!att!lzaz!bds From: bds@lzaz.ATT.COM (B.SZABLAK) Newsgroups: comp.os.minix Subject: Problem with pr command on ATARI Message-ID: <256@lzaz.ATT.COM> Date: 3 Nov 88 14:02:39 GMT Organization: AT&T ISL Lincroft NJ USA Lines: 20 Well, with all the discussion about portable code, I thought I throw in a fix to pr.c that will make it work with columns: pr -t -5 file bombs on my system. The problem is caused by the code assuming that malloc'ed memory is zeroed at a point that it does free's on LBUF(line,column). The simplest fix is to change all references to malloc() with references to calloc() (adding a second parameter: sizeof(char)), but a more efficient fix is to check to see if LBUF has been initialized... Unfortunately, I can't give a diff listing as I've haven't been able to get MINIX to talk to the outside world yet (the tos program has definite problems writing to a TOS file system; none reading one though). By the way, anyone have a problem with date? Setting the date on boot up works fine; setting the date a second time (some people make mistakes the first time) results in the date being advanced 24 hours from the time entered. Very curious...