Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!spool.mu.edu!snorkelwacker.mit.edu!ai-lab!life.ai.mit.edu!rearl From: rearl@gnu.ai.mit.edu (Robert Earl) Newsgroups: comp.lang.c Subject: Re: Extension to solution given to a novice Message-ID: Date: 29 Apr 91 21:16:27 GMT References: <1140@gtenmc.UUCP> Sender: news@ai.mit.edu Organization: (EVIL!) Lines: 15 In-reply-to: csp@gtenmc.UUCP's message of 29 Apr 91 16:38:20 GMT In article <1140@gtenmc.UUCP> csp@gtenmc.UUCP writes a very obfuscated routine. It doesn't work-- at least my test program couldn't get it to work; and there weren't any comments detailing its usage. It's in serious need of useful comments and error-checking. It contains a bug involving getchar(), which was discussed here[*] earlier. Folks, getchar() returns an int: any valid char value, plus EOF (-1). [*] Either here or some other newsgroup; at any rate, see K&R II chapter 7. --robert -- rearl@gnu.ai.mit.edu rearl@watnxt3.ucr.edu