00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #ifndef __HPSTDIO_H
00042 #define __HPSTDIO_H
00043
00044
00045 #ifndef _LONGLONG_DEF
00046 typedef unsigned long long ULONGLONG;
00047 typedef long long LONGLONG;
00048 #define _LONGLONG_DEF
00049 #endif
00050
00051
00052 #include <hpsys.h>
00053 #include <kos.h>
00054 #include <stdarg.h>
00055
00056 typedef struct
00057 {
00058 H_FILE handle;
00059 int eof_state;
00060 } FILE;
00061
00062
00063
00064 typedef struct _open_list_entry {
00065 FILE *file;
00066 struct _open_list_entry *next;
00067 } OPEN_LIST_ENTRY;
00068
00069
00070 #define SEEK_SET 0
00071 #define SEEK_CUR 1
00072 #define SEEK_END 2
00073
00074 FILE *fopen(const char *fn, const char *mode);
00075
00076 int fclose(FILE *f);
00077
00078 int fgetc(FILE *f);
00079
00080 char * fgets(char *buf, int n, FILE *f);
00081
00082 int fputc(int c, FILE *f);
00083
00084 int fputs(const char *s, FILE *f);
00085
00086 SIZE_T fread(void *buf, SIZE_T size, SIZE_T cnt, FILE *f);
00087
00088 SIZE_T fwrite(const void *buf, SIZE_T size, SIZE_T cnt, FILE *f);
00089
00090
00091 int fseek (FILE *f, long offset, int whence);
00092 #define rewind(f) fseek((f),0L,SEEK_SET)
00093 int feof(FILE *f);
00094
00095
00097
00102 void *get_minifont();
00103
00104
00105
00106
00107 char *get_bigfont();
00108 int get_bigfontheight();
00109
00110
00115 int readint();
00116
00121 unsigned readuint();
00122
00127 unsigned readhex();
00128
00133 LONGLONG readlonglong();
00134
00139 ULONGLONG readulonglong();
00140
00145 double readdouble();
00146
00147
00153 EXTERN int puts(const char *);
00154
00161 EXTERN int putchar(int);
00162
00169
00170
00171 int write(int fd, const char *buf, size_t count);
00172 int isatty(int fd);
00173
00174 #ifdef NO_ASSEMBLY_GETS
00175 EXTERN char *_gets(char *buf);
00176 #define gets _gets
00177 #else
00178 EXTERN char *gets(char *buf);
00179 #endif
00180
00181
00182
00188 int printf(const char *fmt, ...);
00189 int sprintf(char *out, const char *fmt, ...);
00190 int vsprintf(char *out,const char *fmt, va_list argp);
00191 int fprintf(FILE *f, const char *fmt, ...);
00192
00193
00194
00195
00196
00197 int iprintf(const char *fmt, ...);
00198 int isprintf(char *out, const char *fmt, ...);
00199 int ivsprintf(char *out,const char *fmt, va_list argp);
00200 int ifprintf(FILE *f, const char *fmt, ...);
00201
00202
00203 #ifdef TINY_PRINTF
00204 #define printf iprintf
00205 #define sprintf isprintf
00206 #define vsprintf ivsprintf
00207 #define fprintf ifprintf
00208 #endif
00209
00210
00211
00212
00213 int _vsscanf(const char *str, const char *format, va_list ap);
00214 int _sscanf(const char *s, const char *f, ...);
00215 int _scanf(const char *f, ...);
00216
00217 #define vsscanf _vsscanf
00218 #define sscanf _sscanf
00219 #define scanf _scanf
00220
00221
00222 #ifndef DOXYGEN_SKIP
00223 int get_decimal_digits();
00224 void set_decimal_digits(int v);
00225 char *get_decimal_separator();
00226 void set_decimal_separator(char a);
00227 #endif
00228
00229
00230
00231 #endif // __HPSTDIO_H