2 * Unlimited dynamic fgets() routine
4 * @file platon/str/dynfgets.h
5 * @author Yuuki Ninomiya <gm@debian.or.jp>
6 * @author Ondrej Jombik <nepto@platon.sk>
7 * @version \$Platon: libcfg+/src/platon/str/dynfgets.h,v 1.12 2004/01/12 06:03:09 nepto Exp $
11 #ifndef _PLATON_STR_DYNFGETS_H
12 #define _PLATON_STR_DYNFGETS_H
17 # define PLATON_FUNC(_name) _name
19 #ifndef PLATON_FUNC_STR
20 # define PLATON_FUNC_STR(_name) #_name
23 /** Size of input buffer. In others words, size of realloc() step. */
24 #define DYNAMIC_FGETS_BUFSIZE (128)
27 #define dynfgets(f) dynamic_fgets(f)
34 * Dynamic fgets() with unlimited line length
36 * @param fp stream (FILE * pointer)
37 * @return dynamically allocated buffer or NULL on not enough memory error
39 char *PLATON_FUNC(dynamic_fgets)(FILE *fp);
45 #endif /* #ifndef _PLATON_STR_DYNFGETS_H */