On Fri, 21 Feb 2003, Martin Pool wrote: > On 20 Feb 2003, Tim Janik <[EMAIL PROTECTED]> wrote: > > > http://www.gtk.org/~timj/patches/distcc-line3.diff > > Thanks Tim, > > I did want to ask why you didn't just use stdio rather than apparently > recreating the buffering functions.
mostly because the skeleton for the parsing got copied over from another project (so i didn't have to write it from scratch), and that wouldn't use stdio because of some of stdios limitations (ungetc() guarantees only 1 push back) and because a couple things made sense to implement at the buffering level. e.g. there's peek_char() which doesn't advance the stream pointer, and there's unget_char() which needs to work after peek_char() without an intermediate get_char(). stdios getchar() and ungetc() can't give you these semantics without further buffering code, at which point you're close to having the buffering logic i'm using around raw fds (after all, we're talking about 40 lines code here). > > -- > Martin > --- ciaoTJ __ distcc mailing list http://distcc.samba.org/ To unsubscribe or change options: http://lists.samba.org/cgi-bin/mailman/listinfo/distcc
