X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=includes%2Fstdio.h;h=c1ebcb1a43591b68bf69d63097884688a706eb5c;hb=ed4d5abcad8b07c4a06d2483497066c2c621a6d7;hp=e4b16733375e44cebc4a30c5b97ab6015442353e;hpb=97070b0c950398e0f8459d67081086089d426b51;p=pdclib diff --git a/includes/stdio.h b/includes/stdio.h index e4b1673..c1ebcb1 100644 --- a/includes/stdio.h +++ b/includes/stdio.h @@ -25,13 +25,13 @@ typedef _PDCLIB_size_t size_t; #endif /* See setvbuf(), third argument */ -#define _IOFBF 2 -#define _IOLBF 1 -#define _IONBF 0 +#define _IOFBF 1 +#define _IOLBF 2 +#define _IONBF 4 /* The following are platform-dependant, and defined in _PDCLIB_config.h. */ typedef _PDCLIB_fpos_t fpos_t; -//typedef struct _PDCLIB_file_t FILE; +typedef struct _PDCLIB_file_t FILE; #define EOF -1 #define BUFSIZ _PDCLIB_BUFSIZ #define FOPEN_MAX _PDCLIB_FOPEN_MAX @@ -44,9 +44,9 @@ typedef _PDCLIB_fpos_t fpos_t; #define SEEK_END 2 #define SEEK_SET 4 -//extern FILE * stdin; -//extern FILE * stdout; -//extern FILE * stderr; +extern struct _PDCLIB_file_t * stdin; +extern struct _PDCLIB_file_t * stdout; +extern struct _PDCLIB_file_t * stderr; /* Operations on files */ @@ -713,7 +713,7 @@ char * gets( char * s ); /* Equivalent to fputc( c, stdout ), but may be implemented as a macro that evaluates its parameter more than once. */ -int putchar( int c ); +#define putchar( c ) putc( c, stdout ) /* Write the string s (not including the terminating \0) to stdout, and append a newline to the output. Returns a value >= 0 when successful, EOF if a