Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!decvax!ucbvax!cartan!ucbcad!ames!sri-spam!rutgers!clyde!cbatt!cwruecmp!hal!ncoast!kent From: kent@ncoast.UUCP Newsgroups: comp.sys.ibm.pc,net.sources Subject: PC-SHELL flames Message-ID: <1799@ncoast.UUCP> Date: Tue, 9-Dec-86 13:18:03 EST Article-I.D.: ncoast.1799 Posted: Tue Dec 9 13:18:03 1986 Date-Received: Sun, 14-Dec-86 05:16:24 EST Distribution: net Organization: Cleveland Public Access UNIX, Cleveland, OH Lines: 56 Xref: linus comp.sys.ibm.pc:421 net.sources:5518 *** REPLACE THIS LINE WITH YOUR MESSAGE *** 1,$s/*** REPLACE THIS LINE WITH YOUR MESSAGE ***/YOUR MESSAGE/g Okay everybody, I have been seeing a lot of griping about how PC-SHELL is incompatible with memory-resident programs, and I feel I should defend myself. I DO NOT do anything weird that makes all those programs go bonko - My program is as portable as it could be to ANY machine running MS-DOS. I have traced the problem to the fact that I get a line of input by this insidious subtrefuge : char *getline(buf) char *buf; { char *bp = buf; char c; while (0 != read(0,&c,1) && strchr("\r\n",c) == NULL) *bp++ = c; *bp = '\0'; /* terminate string */ if (c == '\r') /* we stopped at carriage return - need to eat newline */ read(0,&c,1); return (bp == buf) ? NULL : buf; } If you can think of a more vanilla way to do input from standard input under ms-dos, you let me know. Apparently the MS-DOS console device does not do the hootenany B.S. that resident programs expect - so the problem is NOT my incompatibility with resident programs, but rather DOS's incompatibility with them under the abover circumstances. I will work on the problem, OK??? As for those who have called my program a 'naive implementation', go write your own, and come back 3 months later and talk to me. The NEXT version you see on the net will be rewritten from the ground up - I am reverse-engineering csh from the Xenix V.2 documentation. If any Berkeley Purists out there want it to be any more c-shell like, they can send me the manual page for the berkeley C-Shell. For those of you who got corrupted copies of the last posting, send me a disk and a mailer to Kent Williams 722 Rundell Iowa City, IA 52240 For those of you who expressed disdainful opinions of my program, keep in mind the effort that went into it, with little assurance of any reward. I estimate that my financial return per copies in use right now is about 25 cents a copy.