home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / misc / emu / AROS_m68k_bin.lha / AROS / include / stdio.h < prev    next >
C/C++ Source or Header  |  1997-02-08  |  3KB  |  106 lines

  1. #ifndef _STDIO_H
  2. #define _STDIO_H
  3.  
  4. /*
  5.     (C) 1995-96 AROS - The Amiga Replacement OS
  6.     $Id: stdio.h,v 1.10 1997/01/28 15:32:36 digulla Exp $
  7.  
  8.     Desc: ANSI-C header file stdio.h
  9.     Lang: english
  10. */
  11. #include <stdarg.h>
  12. #ifndef _SYS_TYPES_H
  13. #   include <sys/types.h>
  14. #endif
  15.  
  16. #ifndef NULL
  17. #   ifdef __cplusplus
  18. #    define NULL 0
  19. #   else
  20. #    define NULL (void*)0
  21. #   endif /* __cplusplus */
  22. #endif /* NULL */
  23.  
  24. #ifndef EOF
  25. #   define EOF (-1)
  26. #endif
  27.  
  28. #ifndef BUFSIZ
  29. #   define BUFSIZ 1024
  30. #endif
  31. #define FILENAME_MAX 1024
  32.  
  33. #ifndef __typedef_FILE
  34. #   define __typedef_FILE
  35.     typedef struct __FILE
  36.     {
  37.     void * fh;
  38.     long   flags;
  39.     } FILE;
  40.  
  41. #   define _STDIO_FILEFLAG_EOF       0x0001L
  42. #   define _STDIO_FILEFLAG_ERROR   0x0002L
  43. #endif
  44.  
  45. #ifndef __typedef_fpos_t
  46. #   define __typedef_fpos_t
  47. typedef long fpos_t;
  48. #endif
  49.  
  50. #define SEEK_SET    1
  51. #define SEEK_CUR    0
  52. #define SEEK_END    -1
  53.  
  54. extern FILE * stdin, * stdout, * stderr;
  55.  
  56. extern FILE * fopen (const char * name, const char * mode);
  57. extern int fclose (FILE *);
  58. extern int printf (const char * format, ...);
  59. extern int vprintf (const char * format, va_list args);
  60. extern int fprintf (FILE * fh, const char * format, ...);
  61. extern int vfprintf (FILE * fh, const char * format, va_list args);
  62. extern int fputc (int c, FILE * stream);
  63. extern int fputs (const char * str, FILE * stream);
  64. extern int puts (const char * str);
  65. extern int fflush (FILE * stream);
  66. extern int fgetc (FILE * stream);
  67. extern int ungetc (int c, FILE * stream);
  68. extern char * fgets (char * buffer, int size, FILE * stream);
  69. extern int feof (FILE * stream);
  70. extern int ferror (FILE * stream);
  71. extern void clearerr (FILE * stream);
  72. extern size_t fread (void *ptr, size_t size, size_t nmemb, FILE * stream);
  73. extern size_t fwrite (void *ptr, size_t size, size_t nmemb, FILE * stream);
  74. extern int sprintf (char * str, const char * format, ...);
  75. extern int vsprintf (char * str, const char * format, va_list args);
  76. extern int snprintf (char * str, size_t n, const char * format, ...);
  77. extern int vsnprintf (char * str, size_t n, const char * format, va_list args);
  78.  
  79. extern int scanf (const char * format, ...);
  80. extern int vscanf (const char * format, va_list args);
  81. extern int fscanf (FILE * fh, const char * format, ...);
  82. extern int vfscanf (FILE * fh, const char * format, va_list args);
  83. extern int sscanf (char * str, const char * format, ...);
  84. extern int vsscanf (char * str, const char * format, va_list args);
  85.  
  86. extern int fseek (FILE * stream, long offset, int whence);
  87. extern long ftell (FILE * stream);
  88. extern void rewind (FILE * stream);
  89. extern int fgetpos (FILE * stream, fpos_t * pos);
  90. extern int fsetpos (FILE * stream, fpos_t * pos);
  91.  
  92. #ifdef AROS_ALMOST_COMPATIBLE
  93. extern int __vcformat (void * data, int (*outc)(int, void *),
  94.             const char * format, va_list args);
  95. extern int __vcscan (void * data, int (*getc)(void *),
  96.             int (*ungetc)(int, void *),
  97.             const char * format, va_list args);
  98. #endif
  99.  
  100. #define putc fputc
  101. #define getc fgetc
  102. #define getchar() fgetc(stdin)
  103. #define gets(s) fgets(s, BUFSIZ, stdin)
  104.  
  105. #endif /* _STDIO_H */
  106.