1 /*****************************************************************************/
9 /* (C) 1998-2000 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);
92 void perror (const char* s);
93 int printf (const char* format, ...);
95 int puts (const char* s);
96 int remove (const char* name);
97 int rename (const char* old, const char* new);
98 int sprintf (char* buf, const char* format, ...);
99 int vfprintf (FILE* f, const char* format, va_list ap);
100 int vprintf (const char* format, va_list ap);
101 int vsprintf (char* buf, const char* format, va_list ap);
103 #ifndef __STRICT_ANSI__
104 FILE* fdopen (int fd, const char* mode); /* Unix */
105 int __fastcall__ fileno (FILE* f); /* Unix */
109 /* Masking macros for some functions */
110 #define getchar() fgetc (stdin) /* ANSI */
111 #define putchar(c) fputc (c, stdout) /* ANSI */
112 #define getc(f) fgetc (f) /* ANSI */
113 #define putc(c, f) fputc (c, f) /* ANSI */
115 /* Non-standard function like macros */
116 #ifndef __STRICT_ANSI__
117 #define flushall() /* Unix */
118 #define unlink(name) remove (name) /* Unix */