Função read_line() de buffer.h

Função read_line() de buffer.h

por Daniel Silva Nunes -
Número de respostas: 1

Olá, professor e monitores!

No enunciado do PR02, está indicado que o programa de teste "deve ler cada linha do arquivo de entrada usando a função read_line() de buffer.h".

Porém, essa função não está especificada na interface disponibilizada. Devemos incluí-la em buffer.h?

 

Abraços,

Daniel.

 

Em resposta à Daniel Silva Nunes

Re: Função read_line() de buffer.h

por Leonardo Lana Violin Oliveira -

Ops, subi a versão errada

 

/*
  Read a line (i.e., reads up to a newline '\n' character or the
  end-of-file) from the input file and places it into the given
  buffer, including the newline character if it is present. The buffer
  is resetted before the line is read.
   
  Returns the number of characters read; in particular, returns ZERO
  if end-of-file is reached before any characters are read.
  */
  int read_line(FILE *input, Buffer *B);

Isto é a parte que falta, no buffer.h. Vou pedir pro Coelho subir a nova versão.