45 #ifndef Included_SysFile
46 #define Included_SysFile
48 #include "rexxapitypes.h"
50 #if defined(__OpenBSD__)
56 #define RX_O_RDONLY O_RDONLY
57 #define RX_O_WRONLY O_WRONLY
58 #define RX_O_RDWR O_RDWR
59 #define RX_O_CREAT O_CREAT
60 #define RX_O_EXCL O_EXCL
61 #define RX_O_TRUNC O_TRUNC
62 #define RX_O_APPEND O_APPEND
64 #define RX_SH_DENYWR 0
65 #define RX_SH_DENYRD 0
66 #define RX_SH_DENYRW 0
67 #define RX_SH_DENYNO 0
69 #define RX_S_IWRITE (S_IWUSR | S_IWGRP | S_IWOTH)
70 #define RX_S_IREAD (S_IRUSR | S_IRGRP | S_IROTH)
87 #define LINE_TERMINATOR "\n"
89 bool open(
const char *name,
int openFlags,
int openMode,
int shareMode);
90 bool open(
int handle);
98 bool read(
char *buf,
size_t len,
size_t &bytesRead);
99 bool write(
const char *data,
size_t len,
size_t &bytesWritten);
103 bool puts(
const char *data,
size_t &bytesWritten);
104 bool gets(
char *
buffer,
size_t len,
size_t &bytesRead);
112 bool putLine(
const char *
buffer,
size_t len,
size_t &bytesWritten);
bool putLine(const char *buffer, size_t len, size_t &bytesWritten)
bool gets(char *buffer, size_t len, size_t &bytesRead)
bool nextLine(size_t &bytesRead)
bool getSize(int64_t &size)
bool seek(int64_t offset, int direction, int64_t &position)
bool seekForwardLines(int64_t startPosition, int64_t &lineCount, int64_t &endPosition)
@ LINE_POSITIONING_BUFFER
static const int stdinHandle
static const int stderrHandle
bool puts(const char *data, size_t &bytesWritten)
bool getPosition(int64_t &position)
void setBuffering(bool buffer, size_t length)
bool getTimeStamp(const char *&time)
static const int stdoutHandle
bool open(const char *name, int openFlags, int openMode, int shareMode)
bool read(char *buf, size_t len, size_t &bytesRead)
bool countLines(int64_t &count)
bool write(const char *data, size_t len, size_t &bytesWritten)
bool setPosition(int64_t location, int64_t &position)