> > > > int
 > > > > String::readLine(FILE *in)
 > > > > {
 > > > >     Length = 0;
 > > > >     allocate_fix_space(2048);
 > > > >
 > > > >     while (fgets(Data + Length, Allocated - Length, in))
 > > > >     {
 > > > >       Length += strlen(Data + Length);
 > > > >       if (Length == 0)
 > > > >           continue;
 > > > >       if (Data[Length - 1] == '\n')
 > > > >       {
 > > > >           //
 > > > >           // A full line has been read.  Return it.
 > > > >           //
 > > > >           chop('\n');
 > > > >           return 1;
 > > > 

 You might want to reuse the coding logic found in Configuration.cc
(Read method) or WordList.cc (operator >>). Both use iostreams however.
It's simpler to do it with FILE* because you don't have to mess with
the terminating character.

    Cheers,

-- 
                Loic Dachary

                24 av Secretan
                75019 Paris
                Tel: 33 1 42 45 09 16
                e-mail: [EMAIL PROTECTED]
                URL: http://www.senga.org/


------------------------------------
To unsubscribe from the htdig3-dev mailing list, send a message to
[EMAIL PROTECTED] 
You will receive a message to confirm this. 

Reply via email to