adjust to match the uname changes.
[AROS-Contrib.git] / rexx / inc / bio.h
blob0729934168053f845d1ec4f26dd859ce7aa6263d
1 /*
2 * $Header$
3 * $Log$
4 * Revision 1.1 2001/04/04 05:43:36 wang
5 * First commit: compiles on Linux, Amiga, Windows, Windows CE, generic gcc
7 * Revision 1.2 1999/11/29 14:57:42 bnv
8 * Changed: Defines only
10 * Revision 1.1 1999/11/26 08:53:29 bnv
11 * Initial revision
14 * This file provides substitute routines for the stdio.h
15 * For some window systems.
18 #ifndef __BIO_H__
19 #define __BIO_H__
21 #ifndef __WINDOWS_H
22 # include <windows.h>
23 #endif
24 #ifndef __OS_H__
25 # include <os.h>
26 #endif
27 #ifndef __LDEFS_H__
28 # include <ldefs.h>
29 #endif
30 #ifndef __WINIO_H__
31 # include <winio.h>
32 #endif
34 #define EOF (-1)
36 #ifndef SEEK_SET
37 # define SEEK_SET (FILE_BEGIN)
38 # define SEEK_CUR (FILE_CURRENT)
39 # define SEEK_END (FILE_END)
40 #endif
42 #define BIO_READ BIT0
43 #define BIO_WRITE BIT1
44 #define BIO_APPEND BIT2
45 #define BIO_TEXT BIT3
46 #define BIO_BINARY BIT4
47 #define BIO_UNICODE BIT5
48 #define BIO_EOF BIT6
50 typedef struct {
51 HANDLE handle;
52 int mode;
53 } BFILE;
55 BFILE *Bfopen(const char *filename, const char *mode);
56 int Bfclose(BFILE *stream);
57 #ifdef __BORLANDC__
58 # define Bfseek(s,o,w) _llseek(s->handle,o,w)
59 #else
60 # define Bfseek(s,o,w) SetFilePointer(s->handle,o,0,w)
61 #endif
62 #define Bftell(s) Bfseek(s,0L,SEEK_CUR)
63 int Bfeof(BFILE *stream);
64 int Bfflush(BFILE *stream);
65 void Bfputs(const char *s, BFILE *stream);
66 int Bfgetc(BFILE *stream);
67 int Bfputc(char ch, BFILE *stream);
69 char Bgetchar(void);
70 void Bputs(const char *s);
71 void Bputch(char ch);
72 void Bputint(long num, int length, int radix);
74 #endif