summaryrefslogtreecommitdiff
path: root/win32/win32iop.h
diff options
context:
space:
mode:
Diffstat (limited to 'win32/win32iop.h')
-rw-r--r--win32/win32iop.h40
1 files changed, 39 insertions, 1 deletions
diff --git a/win32/win32iop.h b/win32/win32iop.h
index 56ed40282a..4606563d0e 100644
--- a/win32/win32iop.h
+++ b/win32/win32iop.h
@@ -64,6 +64,22 @@ EXT int win32_rmdir(const char *dir);
EXT int win32_chdir(const char *dir);
EXT int win32_flock(int fd, int oper);
EXT int win32_execvp(const char *cmdname, const char *const *argv);
+EXT void win32_perror(const char *str);
+EXT void win32_setbuf(FILE *pf, char *buf);
+EXT int win32_setvbuf(FILE *pf, char *buf, int type, size_t size);
+EXT int win32_flushall(void);
+EXT int win32_fcloseall(void);
+EXT char* win32_fgets(char *s, int n, FILE *pf);
+EXT char* win32_gets(char *s);
+EXT int win32_fgetc(FILE *pf);
+EXT int win32_putc(int c, FILE *pf);
+EXT int win32_puts(const char *s);
+EXT int win32_getchar(void);
+EXT int win32_putchar(int c);
+EXT void* win32_malloc(size_t size);
+EXT void* win32_calloc(size_t numitems, size_t size);
+EXT void* win32_realloc(void *block, size_t size);
+EXT void win32_free(void *block);
/*
* these two are win32 specific but still io related
@@ -81,7 +97,8 @@ long stolen_get_osfhandle(int fd);
#include <win32io.h> /* pull in the io sub system structure */
-void * SetIOSubSystem(void *piosubsystem);
+EXT PWIN32_IOSUBSYSTEM SetIOSubSystem(void *piosubsystem);
+EXT PWIN32_IOSUBSYSTEM GetIOSubSystem(void);
/*
* the following six(6) is #define in stdio.h
@@ -98,6 +115,9 @@ void * SetIOSubSystem(void *piosubsystem);
#ifdef __BORLANDC__
#undef ungetc
#undef getc
+#undef putc
+#undef getchar
+#undef putchar
#undef fileno
#endif
@@ -157,6 +177,24 @@ void * SetIOSubSystem(void *piosubsystem);
#define chdir win32_chdir
#define flock(fd,o) win32_flock(fd,o)
#define execvp win32_execvp
+#define perror win32_perror
+#define setbuf win32_setbuf
+#define setvbuf win32_setvbuf
+#define flushall win32_flushall
+#define fcloseall win32_fcloseall
+#define fgets win32_fgets
+#define gets win32_gets
+#define fgetc win32_fgetc
+#define putc win32_putc
+#define puts win32_puts
+#define getchar win32_getchar
+#define putchar win32_putchar
+#define fscanf (GetIOSubSystem()->pfnfscanf)
+#define scanf (GetIOSubSystem()->pfnscanf)
+#define malloc win32_malloc
+#define calloc win32_calloc
+#define realloc win32_realloc
+#define free win32_free
#endif /* WIN32IO_IS_STDIO */
#endif /* WIN32IOP_H */