Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!oberon!nunki.usc.edu!jeenglis From: jeenglis@nunki.usc.edu (Joe English) Newsgroups: comp.lang.c Subject: Re: Want a way to strip comments from a Message-ID: <3145@nunki.usc.edu> Date: 19 Mar 89 23:51:03 GMT References: <7150@siemens.UUCP> <9900010@bradley> <4896@cbnews.ATT.COM> <978@philmds.UUCP> <3114@nunki.usc.edu> Reply-To: jeenglis@nunki.usc.edu (Joe English) Organization: University of Southern California, Los Angeles, CA Lines: 21 I made a mistake in the comment-eating program I posted yesterday -- it won't handle /* something like *//* this. */ Change the line in the '/' case from: if ((ch = getchar()) == '*') { eatcomment(); ch=getchar(); } to: if ((ch = getchar()) == '*') { eatcomment(); ch=getchar(); continue; } and it will work. If anyone's interested. --Joe English jeenglis@nunki.usc.edu