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)
75 /*****************************************************************************/
77 /*****************************************************************************/
82 void __fastcall__ clearerr (FILE* f);
83 int __fastcall__ fclose (FILE* f);
84 int __fastcall__ feof (FILE* f);
85 int __fastcall__ ferror (FILE* f);
86 int __fastcall__ fflush (FILE* f);
87 int __fastcall__ fgetc (FILE* f);
88 char* __fastcall__ fgets (char* buf, size_t size, FILE* f);
89 FILE* __fastcall__ fopen (const char* name, const char* mode);
90 int fprintf (FILE* f, const char* format, ...);
91 int __fastcall__ fputc (int c, FILE* f);
92 int __fastcall__ fputs (const char* s, FILE* f);
93 size_t __fastcall__ fread (void* buf, size_t size, size_t count, FILE* f);
94 FILE* __fastcall__ freopen (const char* name, const char* mode, FILE* f);
95 size_t __fastcall__ fwrite (const void* buf, size_t size, size_t count, FILE* f);
96 int __fastcall__ fgetpos (FILE* f, fpos_t *pos);
97 int __fastcall__ fsetpos (FILE* f, const fpos_t* pos);
98 long __fastcall__ ftell (FILE* f);
99 int __fastcall__ fseek (FILE* f, long offset, int whence);
100 void __fastcall__ rewind (FILE *f);
101 int __fastcall__ getchar (void);
102 char* __fastcall__ gets (char* s);
103 void __fastcall__ perror (const char* s);
104 int printf (const char* format, ...);
105 int __fastcall__ putchar (int c);
106 int __fastcall__ puts (const char* s);
107 int __fastcall__ remove (const char* name);
108 int __fastcall__ rename (const char* oldname, const char* newname);
109 int sprintf (char* buf, const char* format, ...);
110 int __fastcall__ vfprintf (FILE* f, const char* format, va_list ap);
111 int __fastcall__ vprintf (const char* format, va_list ap);
112 int __fastcall__ vsprintf (char* buf, const char* format, va_list ap);
114 /* Not available or testing: */
115 int scanf (const char* format, ...);
116 int fscanf (FILE* f, const char* format, ...);
117 int sscanf (const char* s, const char* format, ...);
118 int __fastcall__ vscanf (const char* format, va_list ap);
119 int __fastcall__ vsscanf (const char* s, const char* format, va_list ap);
120 int __fastcall__ vfscanf (FILE* f, const char* format, va_list ap);
122 #ifndef __STRICT_ANSI__
123 FILE* __fastcall__ fdopen (int fd, const char* mode); /* Unix */
124 int __fastcall__ fileno (FILE* f); /* Unix */
126 void __fastcall__ _poserror (const char* msg); /* cc65 */
128 /* Masking macros for some functions */
129 #define getchar() fgetc (stdin) /* ANSI */
130 #define putchar(c) fputc (c, stdout) /* ANSI */
131 #define getc(f) fgetc (f) /* ANSI */
132 #define putc(c, f) fputc (c, f) /* ANSI */
134 /* Non-standard function like macros */
135 #ifndef __STRICT_ANSI__
136 #define flushall() /* Unix */