X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=includes%2Fstdio.h;h=1d7c0bf23ecddf47979700d7dbd660005e53301e;hb=b41576197133c1211d6ec353faf93f505f573b8a;hp=6b562d95bd6b5732730c1adaefcd220c6c0260b9;hpb=0fa6394bc70eab55e0e38703a31a3072232c0729;p=pdclib diff --git a/includes/stdio.h b/includes/stdio.h index 6b562d9..1d7c0bf 100644 --- a/includes/stdio.h +++ b/includes/stdio.h @@ -8,11 +8,8 @@ #ifndef _PDCLIB_STDIO_H #define _PDCLIB_STDIO_H _PDCLIB_STDIO_H - -#ifndef _PDCLIB_INT_H -#define _PDCLIB_INT_H _PDCLIB_INT_H #include <_PDCLIB_int.h> -#endif +_PDCLIB_BEGIN_EXTERN_C #ifndef _PDCLIB_SIZE_T_DEFINED #define _PDCLIB_SIZE_T_DEFINED _PDCLIB_SIZE_T_DEFINED @@ -65,7 +62,7 @@ int remove( const char * filename ); If there already is a file with the new filename, behaviour is defined by the glue code (see functions/_PDCLIB/rename.c). */ -int rename( const char * old, const char * new ); +int rename( const char * old, const char * newn ); /* Open a temporary file with mode "wb+", i.e. binary-update. Remove the file automatically if it is closed or the program exits normally (by returning @@ -654,13 +651,13 @@ int fputc( int c, FILE * stream ); */ int fputs( const char * _PDCLIB_restrict s, FILE * _PDCLIB_restrict stream ); -/* Equivalent to fgetc( stream ), but may be implemented as a macro that +/* Equivalent to fgetc( stream ), but may be overloaded by a macro that evaluates its parameter more than once. */ -#define getc( stream ) fgetc( stream ) +int getc( FILE * stream ); -/* Equivalent to fgetc( stdin ), but may be implemented as a macro. */ -#define getchar() fgetc( stdin ) +/* Equivalent to fgetc( stdin ). */ +int getchar( void ); /* Read characters from given stream into the array s, stopping at \n or EOF. The string read is terminated with \0. Returns s if successful. If EOF is @@ -670,15 +667,15 @@ int fputs( const char * _PDCLIB_restrict s, FILE * _PDCLIB_restrict stream ); */ char * gets( char * s ); -/* Equivalent to fputc( c, stream ), but may be implemented as a macro that +/* Equivalent to fputc( c, stream ), but may be overloaded by a macro that evaluates its parameter more than once. */ -#define putc( c, stream ) fputc( c, stream ) +int putc( int c, FILE * stream ); -/* Equivalent to fputc( c, stdout ), but may be implemented as a macro that +/* Equivalent to fputc( c, stdout ), but may be overloaded by a macro that evaluates its parameter more than once. */ -#define putchar( c ) putc( c, stdout ) +int putchar( int c ); /* 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 @@ -796,4 +793,5 @@ int ferror( FILE * stream ); */ void perror( const char * s ); +_PDCLIB_END_EXTERN_C #endif