MPD
Functions
text_file.h File Reference
#include <glib.h>
#include <stdio.h>

Go to the source code of this file.

Functions

char * read_text_line (FILE *file, GString *buffer)
 Reads a line from the input file, and strips trailing space.
 

Function Documentation

char* read_text_line ( FILE *  file,
GString *  buffer 
)

Reads a line from the input file, and strips trailing space.

There is a reasonable maximum line length, only to prevent denial of service.

Parameters
filethe source file, opened in text mode
bufferan allocator for the buffer
Returns
a pointer to the line, or NULL on end-of-file or error