Thanks martin for your analysis, this makes some sense to me, but as I pointed out, even setting ifs to () doesn't solve the issue, so it would be nice to find a solution to this.
Right now having the output of `{} corrupted can be quite inconvenient... Thanks uriel On Tue, Mar 17, 2009 at 3:01 AM, Martin Neubauer <m...@gmx.net> wrote: > On second thought (and in the light of Geoffs reply) I probably won't. > If you do care, the following change to the loop in question will at > least preserve all input: > > while((c = rchr(f))!=EOF){ > if(strchr(stop, c)){ > if(s!=wd){ > *s='\0'; > v = newword(wd, v); > s = wd; > } > } > else if(s==ewd){ > *s='\0'; > v = newword(wd, v); > s = wd; > *s++=c; > } > else *s++=c; > } > > With a dynamic buffer the tokenisation could be prevented, but in your > example the lexical scanner would quite likely bail afterwards. (I > remember a discussion some time ago about this.) > >