diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2000-11-24 22:24:33 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2000-11-24 22:24:33 +0000 |
commit | f5b9d040829bb5deb93173e35ee6c82ce0a01c37 (patch) | |
tree | 0db2c5de2e4564417efd7178e7a45378073511bc /perliol.h | |
parent | de6cd452fde5aaf57e339f71b33b6a0852f0f96d (diff) | |
download | perl-f5b9d040829bb5deb93173e35ee6c82ce0a01c37.tar.gz |
Re-arrange crlf vs binary for platforms that care.
crlf layer is now "the" buffer layer and can turn its behaviour on/off.
Lip-service to making stdio layer work on such platforms (untested).
Now fails 3 tests rather than one, checkin to see if I can debug
the issue under linux. (Do not merge.)
p4raw-id: //depot/perlio@7853
Diffstat (limited to 'perliol.h')
-rw-r--r-- | perliol.h | 22 |
1 files changed, 18 insertions, 4 deletions
@@ -34,6 +34,13 @@ struct _PerlIO_funcs void (*Set_ptrcnt)(PerlIO *f,STDCHAR *ptr,SSize_t cnt); }; +/*--------------------------------------------------------------------------------------*/ +/* Kind values */ +#define PERLIO_K_RAW 0x00000001 +#define PERLIO_K_BUFFERED 0x00000002 +#define PERLIO_K_CANCRLF 0x00000004 + +/*--------------------------------------------------------------------------------------*/ struct _PerlIO { PerlIOl * next; /* Lower layer */ @@ -50,13 +57,14 @@ struct _PerlIO #define PERLIO_F_ERROR 0x00080000 #define PERLIO_F_TRUNCATE 0x00100000 #define PERLIO_F_APPEND 0x00200000 -#define PERLIO_F_BINARY 0x00400000 +#define PERLIO_F_CRLF 0x00400000 #define PERLIO_F_UTF8 0x00800000 -#define PERLIO_F_LINEBUF 0x01000000 +#define PERLIO_F_UNBUF 0x01000000 #define PERLIO_F_WRBUF 0x02000000 #define PERLIO_F_RDBUF 0x04000000 -#define PERLIO_F_TEMP 0x08000000 -#define PERLIO_F_OPEN 0x10000000 +#define PERLIO_F_LINEBUF 0x08000000 +#define PERLIO_F_TEMP 0x10000000 +#define PERLIO_F_OPEN 0x20000000 #define PerlIOBase(f) (*(f)) #define PerlIOSelf(f,type) ((type *)PerlIOBase(f)) @@ -74,6 +82,12 @@ extern PerlIO_funcs PerlIO_mmap; extern PerlIO *PerlIO_allocate(void); +#if O_BINARY != O_TEXT +#define PERLIO_STDTEXT "t" +#else +#define PERLIO_STDTEXT "" +#endif + /*--------------------------------------------------------------------------------------*/ /* Generic, or stub layer functions */ |