4 Interface for perl stdio functions
8 #ifndef __Inc__IPerlStdIO___
9 #define __Inc__IPerlStdIO___
12 typedef struct _PerlIO PerlIO;
18 virtual PerlIO* Stdin(void) = 0;
19 virtual PerlIO* Stdout(void) = 0;
20 virtual PerlIO* Stderr(void) = 0;
21 virtual PerlIO* Open(const char *, const char *, int &err) = 0;
22 virtual int Close(PerlIO*, int &err) = 0;
23 virtual int Eof(PerlIO*, int &err) = 0;
24 virtual int Error(PerlIO*, int &err) = 0;
25 virtual void Clearerr(PerlIO*, int &err) = 0;
26 virtual int Getc(PerlIO*, int &err) = 0;
27 virtual char* GetBase(PerlIO *, int &err) = 0;
28 virtual int GetBufsiz(PerlIO *, int &err) = 0;
29 virtual int GetCnt(PerlIO *, int &err) = 0;
30 virtual char* GetPtr(PerlIO *, int &err) = 0;
31 virtual char* Gets(PerlIO*, char*, int, int& err) = 0;
32 virtual int Putc(PerlIO*, int, int &err) = 0;
33 virtual int Puts(PerlIO*, const char *, int &err) = 0;
34 virtual int Flush(PerlIO*, int &err) = 0;
35 virtual int Ungetc(PerlIO*,int, int &err) = 0;
36 virtual int Fileno(PerlIO*, int &err) = 0;
37 virtual PerlIO* Fdopen(int, const char *, int &err) = 0;
38 virtual PerlIO* Reopen(const char*, const char*, PerlIO*, int &err) = 0;
39 virtual SSize_t Read(PerlIO*,void *,Size_t, int &err) = 0;
40 virtual SSize_t Write(PerlIO*,const void *,Size_t, int &err) = 0;
41 virtual void SetBuf(PerlIO *, char*, int &err) = 0;
42 virtual int SetVBuf(PerlIO *, char*, int, Size_t, int &err) = 0;
43 virtual void SetCnt(PerlIO *, int, int &err) = 0;
44 virtual void SetPtrCnt(PerlIO *, char *, int, int& err) = 0;
45 virtual void Setlinebuf(PerlIO*, int &err) = 0;
46 virtual int Printf(PerlIO*, int &err, const char *,...) = 0;
47 virtual int Vprintf(PerlIO*, int &err, const char *, va_list) = 0;
48 virtual long Tell(PerlIO*, int &err) = 0;
49 virtual int Seek(PerlIO*, off_t, int, int &err) = 0;
50 virtual void Rewind(PerlIO*, int &err) = 0;
51 virtual PerlIO* Tmpfile(int &err) = 0;
52 virtual int Getpos(PerlIO*, Fpos_t *, int &err) = 0;
53 virtual int Setpos(PerlIO*, const Fpos_t *, int &err) = 0;
54 virtual void Init(int &err) = 0;
55 virtual void InitOSExtras(void* p) = 0;
57 virtual int OpenOSfhandle(long osfhandle, int flags) = 0;
58 virtual int GetOSfhandle(int filenum) = 0;
62 #endif /* __Inc__IPerlStdIO___ */