/* */
/* */
/* */
-/* (C) 1998-2002 Ullrich von Bassewitz */
-/* Wacholderweg 14 */
-/* D-70597 Stuttgart */
-/* EMail: uz@musoftware.de */
+/* (C) 1998-2009, Ullrich von Bassewitz */
+/* Roemerstrasse 52 */
+/* D-70794 Filderstadt */
+/* EMail: uz@cc65.org */
/* */
/* */
/* This software is provided 'as-is', without any expressed or implied */
#define _IONBF 2
#define BUFSIZ 256
#define EOF -1
-#define FILENAME_MAX 16
#define FOPEN_MAX 8
-#define L_tmpnam (FILENAME_MAX + 1)
#define SEEK_CUR 0
#define SEEK_END 1
#define SEEK_SET 2
#define TMP_MAX 256
+/* Standard defines that are platform dependent */
+#if defined(__APPLE2__) || defined(__APPLE2ENH__)
+# define FILENAME_MAX (64+1)
+#elif defined(__ATARI__)
+# define FILENAME_MAX (12+1)
+#elif defined(__LUNIX__)
+# define FILENAME_MAX (80+1)
+#else
+# define FILENAME_MAX (16+1)
+#endif
+#define L_tmpnam FILENAME_MAX
+
/*****************************************************************************/
int __fastcall__ puts (const char* s);
int __fastcall__ remove (const char* name);
int __fastcall__ rename (const char* oldname, const char* newname);
+int snprintf (char* buf, size_t size, const char* format, ...);
int sprintf (char* buf, const char* format, ...);
+int __fastcall__ ungetc (int c, FILE* f);
int __fastcall__ vfprintf (FILE* f, const char* format, va_list ap);
int __fastcall__ vprintf (const char* format, va_list ap);
+int __fastcall__ vsnprintf (char* buf, size_t size, const char* format, va_list ap);
int __fastcall__ vsprintf (char* buf, const char* format, va_list ap);
-/* Not available or testing: */
int scanf (const char* format, ...);
int fscanf (FILE* f, const char* format, ...);
int sscanf (const char* s, const char* format, ...);
int __fastcall__ vsscanf (const char* s, const char* format, va_list ap);
int __fastcall__ vfscanf (FILE* f, const char* format, va_list ap);
-#ifndef __STRICT_ANSI__
+#if __CC65_STD__ == __CC65_STD_CC65__
FILE* __fastcall__ fdopen (int fd, const char* mode); /* Unix */
int __fastcall__ fileno (FILE* f); /* Unix */
#endif
void __fastcall__ _poserror (const char* msg); /* cc65 */
/* Masking macros for some functions */
-#define getchar() fgetc (stdin) /* ANSI */
-#define putchar(c) fputc (c, stdout) /* ANSI */
#define getc(f) fgetc (f) /* ANSI */
#define putc(c, f) fputc (c, f) /* ANSI */
-/* Non-standard function like macros */
-#ifndef __STRICT_ANSI__
-#define flushall() /* Unix */
-#endif
-
/* End of stdio.h */
-