[BACK]Return to stdio.h CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / include

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/include/stdio.h between version 1.2 and 1.13

version 1.2, 1993/04/17 02:13:22 version 1.13, 1994/05/22 23:14:10
Line 33 
Line 33 
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF   * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.   * SUCH DAMAGE.
  *   *
  *      @(#)stdio.h     5.17 (Berkeley) 6/3/91   *      from: @(#)stdio.h       5.17 (Berkeley) 6/3/91
    *      $Id$
  */   */
   
 #ifndef _STDIO_H_  #ifndef _STDIO_H_
 #define _STDIO_H_  #define _STDIO_H_
   
   #if !defined(_ANSI_SOURCE) && !defined(__STRICT_ANSI_)
   #include <sys/types.h>
   #endif
   
 #include <sys/cdefs.h>  #include <sys/cdefs.h>
   
 #include <machine/ansi.h>  #include <machine/ansi.h>
 #ifdef  _SIZE_T_  #ifdef  _BSD_SIZE_T_
 typedef _SIZE_T_        size_t;  typedef _BSD_SIZE_T_    size_t;
 #undef  _SIZE_T_  #undef  _BSD_SIZE_T_
 #endif  #endif
   
 #ifndef NULL  #ifndef NULL
 #define NULL    0  #define NULL    0
 #endif  #endif
   
 typedef long fpos_t;            /* Must match off_t <sys/types.h> */  /*
    * This is fairly grotesque, but pure ANSI code must not inspect the
    * innards of an fpos_t anyway.  The library internally uses off_t,
    * which we assume is exactly as big as eight chars.
    */
   #if !defined(_ANSI_SOURCE) && !defined(__STRICT_ANSI__)
   typedef off_t fpos_t;
   #else
   typedef struct __sfpos {
           long long _pos;                 /* XXX must be the same as off_t */
   } fpos_t;
   #endif
   
 #define _FSTDIO                 /* Define for new stdio with functions. */  #define _FSTDIO                 /* Define for new stdio with functions. */
   
Line 116  typedef struct __sFILE {
Line 132  typedef struct __sFILE {
         unsigned char _ubuf[3]; /* guarantee an ungetc() buffer */          unsigned char _ubuf[3]; /* guarantee an ungetc() buffer */
         unsigned char _nbuf[1]; /* guarantee a getc() buffer */          unsigned char _nbuf[1]; /* guarantee a getc() buffer */
   
         /* separate buffer for fgetline() when line crosses buffer boundary */          /* separate buffer for fgetln() when line crosses buffer boundary */
         struct  __sbuf _lb;     /* buffer for fgetline() */          struct  __sbuf _lb;     /* buffer for fgetln() */
   
         /* Unix stdio files get aligned to block boundaries on fseek() */          /* Unix stdio files get aligned to block boundaries on fseek() */
         int     _blksize;       /* stat.st_blksize (may be != _bf._size) */          int     _blksize;       /* stat.st_blksize (may be != _bf._size) */
         int     _offset;        /* current lseek offset */          fpos_t  _offset;        /* current lseek offset */
 } FILE;  } FILE;
   
 __BEGIN_DECLS  __BEGIN_DECLS
Line 142  __END_DECLS
Line 158  __END_DECLS
 #define __SOPT  0x0400          /* do fseek() optimisation */  #define __SOPT  0x0400          /* do fseek() optimisation */
 #define __SNPT  0x0800          /* do not do fseek() optimisation */  #define __SNPT  0x0800          /* do not do fseek() optimisation */
 #define __SOFF  0x1000          /* set iff _offset is in fact correct */  #define __SOFF  0x1000          /* set iff _offset is in fact correct */
 #define __SMOD  0x2000          /* true => fgetline modified _p text */  #define __SMOD  0x2000          /* true => fgetln modified _p text */
   
 /*  /*
  * The following three definitions are for ANSI C, which took them   * The following three definitions are for ANSI C, which took them
Line 205  FILE *fopen __P((const char *, const cha
Line 221  FILE *fopen __P((const char *, const cha
 int      fprintf __P((FILE *, const char *, ...));  int      fprintf __P((FILE *, const char *, ...));
 int      fputc __P((int, FILE *));  int      fputc __P((int, FILE *));
 int      fputs __P((const char *, FILE *));  int      fputs __P((const char *, FILE *));
 int      fread __P((void *, size_t, size_t, FILE *));  size_t   fread __P((void *, size_t, size_t, FILE *));
 FILE    *freopen __P((const char *, const char *, FILE *));  FILE    *freopen __P((const char *, const char *, FILE *));
 int      fscanf __P((FILE *, const char *, ...));  int      fscanf __P((FILE *, const char *, ...));
 int      fseek __P((FILE *, long, int));  int      fseek __P((FILE *, long, int));
 int      fsetpos __P((FILE *, const fpos_t *));  int      fsetpos __P((FILE *, const fpos_t *));
 long     ftell __P((const FILE *));  long     ftell __P((const FILE *));
 int      fwrite __P((const void *, size_t, size_t, FILE *));  size_t   fwrite __P((const void *, size_t, size_t, FILE *));
 int      getc __P((FILE *));  int      getc __P((FILE *));
 int      getchar __P((void));  int      getchar __P((void));
 char    *gets __P((char *));  char    *gets __P((char *));
 #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)  #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
 extern int sys_nerr;                    /* perror(3) external variables */  extern int sys_nerr;                    /* perror(3) external variables */
 extern char *sys_errlist[];  extern const char *const sys_errlist[];
 #endif  #endif
 void     perror __P((const char *));  void     perror __P((const char *));
 int      printf __P((const char *, ...));  int      printf __P((const char *, ...));
Line 231  int  scanf __P((const char *, ...));
Line 247  int  scanf __P((const char *, ...));
 void     setbuf __P((FILE *, char *));  void     setbuf __P((FILE *, char *));
 int      setvbuf __P((FILE *, char *, int, size_t));  int      setvbuf __P((FILE *, char *, int, size_t));
 int      sprintf __P((char *, const char *, ...));  int      sprintf __P((char *, const char *, ...));
 int      sscanf __P((char *, const char *, ...));  int      sscanf __P((const char *, const char *, ...));
 FILE    *tmpfile __P((void));  FILE    *tmpfile __P((void));
 char    *tmpnam __P((char *));  char    *tmpnam __P((char *));
 int      ungetc __P((int, FILE *));  int      ungetc __P((int, FILE *));
 int      vfprintf __P((FILE *, const char *, _VA_LIST_));  int      vfprintf __P((FILE *, const char *, _BSD_VA_LIST_));
 int      vprintf __P((const char *, _VA_LIST_));  int      vprintf __P((const char *, _BSD_VA_LIST_));
 int      vsprintf __P((char *, const char *, _VA_LIST_));  int      vsprintf __P((char *, const char *, _BSD_VA_LIST_));
 __END_DECLS  __END_DECLS
   
 /*  /*
  * Functions defined in POSIX 1003.1.   * Functions defined in POSIX 1003.1.
  */   */
 #ifndef _ANSI_SOURCE  #ifndef _ANSI_SOURCE
 #define L_cuserid       9       /* size for cuserid(); UT_NAMESIZE + 1 */  
 #define L_ctermid       1024    /* size for ctermid(); PATH_MAX */  #define L_ctermid       1024    /* size for ctermid(); PATH_MAX */
   #define L_cuserid       9       /* size for cuserid(); UT_NAMESIZE + 1 */
   
 __BEGIN_DECLS  __BEGIN_DECLS
 char    *ctermid __P((char *));  char    *ctermid __P((char *));
   char    *cuserid __P((char *));
 FILE    *fdopen __P((int, const char *));  FILE    *fdopen __P((int, const char *));
 int      fileno __P((FILE *));  int      fileno __P((FILE *));
 __END_DECLS  __END_DECLS
Line 259  __END_DECLS
Line 276  __END_DECLS
  */   */
 #if !defined (_ANSI_SOURCE) && !defined(_POSIX_SOURCE)  #if !defined (_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
 __BEGIN_DECLS  __BEGIN_DECLS
 char    *fgetline __P((FILE *, size_t *));  char    *fgetln __P((FILE *, size_t *));
 int      fpurge __P((FILE *));  int      fpurge __P((FILE *));
 int      getw __P((FILE *));  int      getw __P((FILE *));
 int      pclose __P((FILE *));  int      pclose __P((FILE *));
Line 268  int  putw __P((int, FILE *));
Line 285  int  putw __P((int, FILE *));
 void     setbuffer __P((FILE *, char *, int));  void     setbuffer __P((FILE *, char *, int));
 int      setlinebuf __P((FILE *));  int      setlinebuf __P((FILE *));
 char    *tempnam __P((const char *, const char *));  char    *tempnam __P((const char *, const char *));
 int      snprintf __P((char *, size_t, const char *, ...));  int      snprintf __P((char *, size_t, const char *, ...))
 int      vsnprintf __P((char *, size_t, const char *, _VA_LIST_));                  __attribute__((format (printf, 3, 4)));
 int      vscanf __P((const char *, _VA_LIST_));  int      vsnprintf __P((char *, size_t, const char *, _BSD_VA_LIST_))
 int      vsscanf __P((const char *, const char *, _VA_LIST_));                  __attribute__((format (printf, 3, 0)));
   int      vscanf __P((const char *, _BSD_VA_LIST_))
                   __attribute__((format (scanf, 1, 0)));
   int      vsscanf __P((const char *, const char *, _BSD_VA_LIST_))
                   __attribute__((format (scanf, 2, 0)));
 __END_DECLS  __END_DECLS
   
 /*  /*
Line 300  __END_DECLS
Line 321  __END_DECLS
  */   */
 __BEGIN_DECLS  __BEGIN_DECLS
 int     __srget __P((FILE *));  int     __srget __P((FILE *));
 int     __svfscanf __P((FILE *, const char *, _VA_LIST_));  int     __svfscanf __P((FILE *, const char *, _BSD_VA_LIST_));
 int     __swbuf __P((int, FILE *));  int     __swbuf __P((int, FILE *));
 __END_DECLS  __END_DECLS
   

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.13

CVSweb <webmaster@jp.NetBSD.org>