Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!lll-tis!ptsfa!hoptoad!academ!uhnix1!sugar!peter From: peter@sugar.UUCP Newsgroups: comp.unix.xenix Subject: New bug in uPort: stdio is broken. Message-ID: <593@sugar.UUCP> Date: Sat, 29-Aug-87 00:55:53 EDT Article-I.D.: sugar.593 Posted: Sat Aug 29 00:55:53 1987 Date-Received: Sun, 30-Aug-87 20:15:38 EDT Organization: Sugar Land UNIX - Houston, TX Lines: 41 Keywords: stdio bugs uPort The following program will not work with the printf(""); taken out. It appears that stdio() doesn't come up properly initted. This is a bug. You should be able to interleaf printf() and putchar() in any order. Without that printf there, the output consists of a single linefeed unless argv[1][0] is alphabetic. The purpose of the program, bu the way, is to strip dubious characters off input read from shell scripts in a UNIX bbs. #include #include main(ac, av) int ac; char **av; { printf(""); /* needed! */ while(*++av) { while(**av) { if(isdigit(**av)) break; if(isupper(**av)) break; if(islower(**av)) break; if(strchr(**av, "-_=+")) break; ++*av; } while(isalnum(**av) || strchr(**av, ".-_=+")) { putchar(**av); ++*av; } putchar(' '); } putchar('\n'); } -- -- Peter da Silva `-_-' ...!seismo!soma!uhnix1!sugar!peter -- U <--- not a copyrighted cartoon :->