* J.A.Serralheiro <[EMAIL PROTECTED]> [2001.11.04 15:26:04+0000]:
> hi. Im trying to read a complete line from a text file. I use the
> fscanf( file, "[^\n]",buffer);  butit doesnt work. I reads the
> entire file until overflow of the buffer.

this is C? well, it doesn't know regexps by default. you fscanf line
would have to be

  fscanf(file, "%s\n", buffer);

to get the desired effect, but this is prone to buffer overflows.
instead, you shoud be using fgets(3).

-- 
martin;              (greetings from the heart of the sun.)
  \____ echo mailto: !#^."<*>"|tr "<*> mailto:"; [EMAIL PROTECTED]
  
dazed and confused, but trying to continue.

Attachment: pgpEQ2hF9mVBw.pgp
Description: PGP signature

Reply via email to