1 /*****************************************************************************/
9 /* (C) 1998-2002 Ullrich von Bassewitz */
11 /* D-70597 Stuttgart */
12 /* EMail: uz@musoftware.de */
15 /* This software is provided 'as-is', without any expressed or implied */
16 /* warranty. In no event will the authors be held liable for any damages */
17 /* arising from the use of this software. */
19 /* Permission is granted to anyone to use this software for any purpose, */
20 /* including commercial applications, and to alter it and redistribute it */
21 /* freely, subject to the following restrictions: */
23 /* 1. The origin of this software must not be misrepresented; you must not */
24 /* claim that you wrote the original software. If you use this software */
25 /* in a product, an acknowledgment in the product documentation would be */
26 /* appreciated but is not required. */
27 /* 2. Altered source versions must be plainly marked as such, and must not */
28 /* be misrepresented as being the original software. */
29 /* 3. This notice may not be removed or altered from any source */
32 /*****************************************************************************/
51 typedef struct _FILE FILE;
52 typedef unsigned long fpos_t;
54 /* Standard file descriptors */
59 /* Standard defines */
65 #define FILENAME_MAX 16
67 #define L_tmpnam (FILENAME_MAX + 1)
76 void __fastcall__ clearerr (FILE* f);
78 int __fastcall__ feof (FILE* f);
79 int __fastcall__ ferror (FILE* f);
80 int __fastcall__ fflush (FILE* f);
82 char* fgets (char* buf, size_t size, FILE* f);
83 FILE* fopen (const char* name, const char* mode);
84 int fprintf (FILE* f, const char* format, ...);
85 int fputc (int c, FILE* f);
86 int fputs (const char* s, FILE* f);
87 size_t fread (void* buf, size_t size, size_t count, FILE* f);
88 FILE* freopen (const char* name, const char* mode, FILE* f);
89 size_t fwrite (const void* buf, size_t size, size_t count, FILE* f);
90 int fgetpos(FILE* f, fpos_t *pos);
91 int fsetpos(FILE* f, const fpos_t* pos);
93 int fseek(FILE* f, long offset, int whence);
97 void perror (const char* s);
98 int printf (const char* format, ...);
100 int puts (const char* s);
101 int remove (const char* name);
102 int rename (const char* old, const char* new);
103 int sprintf (char* buf, const char* format, ...);
104 int __fastcall__ vfprintf (FILE* f, const char* format, va_list ap);
105 int vprintf (const char* format, va_list ap);
106 int __fastcall__ vsprintf (char* buf, const char* format, va_list ap);
108 /* Not available or testing: */
109 int scanf (const char* format, ...);
110 int fscanf (FILE* f, const char* format, ...);
111 int sscanf (const char* s, const char* format, ...);
112 int vscanf (const char* format, va_list ap);
113 int vsscanf (const char* s, const char* format, va_list ap);
114 int vfscanf (FILE* f, const char* format, va_list ap);
116 #ifndef __STRICT_ANSI__
117 FILE* fdopen (int fd, const char* mode); /* Unix */
118 int __fastcall__ fileno (FILE* f); /* Unix */
122 /* Masking macros for some functions */
123 #define getchar() fgetc (stdin) /* ANSI */
124 #define putchar(c) fputc (c, stdout) /* ANSI */
125 #define getc(f) fgetc (f) /* ANSI */
126 #define putc(c, f) fputc (c, f) /* ANSI */
128 /* Non-standard function like macros */
129 #ifndef __STRICT_ANSI__
130 #define flushall() /* Unix */
131 #define unlink(name) remove (name) /* Unix */