| version 1.7, 2002/08/27 13:12:33 |
version 1.8, 2002/09/29 03:55:02 |
|
|
| |
/** |
| |
* Unlimited dynamic fgets() routine |
| |
* |
| |
* @file platon/str/dynfgets.h |
| |
* @author Yuuki Ninomiya <gm@debian.or.jp> |
| |
* @author Ondrej Jombik <nepto@pobox.sk> |
| |
* @version \$Id$ |
| |
* @date 2001-2002 |
| |
*/ |
| |
|
| #ifndef _PLATON_STR_DYNFGETS_H |
#ifndef _PLATON_STR_DYNFGETS_H |
| #define _PLATON_STR_DYNFGETS_H |
#define _PLATON_STR_DYNFGETS_H |
| |
|
|
|
| # define PLATON_FUNC_STR(_name) #_name |
# define PLATON_FUNC_STR(_name) #_name |
| #endif |
#endif |
| |
|
| /* Size of input buffer. In others words, size of realloc() step. */ |
/** Size of input buffer. In others words, size of realloc() step. */ |
| #define DYNAMIC_FGETS_BUFSIZE (128) |
#define DYNAMIC_FGETS_BUFSIZE (128) |
| |
|
| |
/** Macro alias */ |
| #define dynfgets(f) dynamic_fgets(f) |
#define dynfgets(f) dynamic_fgets(f) |
| |
|
| #ifdef __cplusplus |
#ifdef __cplusplus |
| extern "C" { |
extern "C" { |
| #endif |
#endif |
| |
|
| /* |
/** |
| * dynamic_fgets() |
* Dynamic fgets() with unlimited line length |
| * |
* |
| * Returns line in dynamically allocated buffer. Length of line is unlimited. |
* @param fp stream (FILE * pointer) |
| * On end of file or not of memory error returns NULL. |
* @return dynamically allocated buffer or NULL on not enough memory error |
| */ |
*/ |
| char *PLATON_FUNC(dynamic_fgets)(FILE *fp); |
char *PLATON_FUNC(dynamic_fgets)(FILE *fp); |
| |
|
| #ifdef __cplusplus |
#ifdef __cplusplus |