X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=includes%2Fstdio.h;h=7616474434e5e6b3f6036f4bad6d554c79486243;hb=b1fc26afebd4d557ff89a44bc21767a8704c3809;hp=b9a02249a717be07a28dd09fffdd9dd8c667de10;hpb=71712a8bb92d6a10218e3356c6d26554dc2633dd;p=pdclib diff --git a/includes/stdio.h b/includes/stdio.h index b9a0224..7616474 100644 --- a/includes/stdio.h +++ b/includes/stdio.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* Input/output This file is part of the Public Domain C Library (PDCLib). @@ -9,10 +7,7 @@ #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 #ifndef _PDCLIB_SIZE_T_DEFINED #define _PDCLIB_SIZE_T_DEFINED _PDCLIB_SIZE_T_DEFINED @@ -654,13 +649,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 +665,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