diff options
Diffstat (limited to 'src/structs.h')
-rw-r--r-- | src/structs.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/structs.h b/src/structs.h index 9d2ec16390..adbb820850 100644 --- a/src/structs.h +++ b/src/structs.h @@ -3882,3 +3882,32 @@ typedef struct spat int no_scs; // no smartcase for this pattern soffset_T off; } spat_T; + +#define WRITEBUFSIZE 8192 // size of normal write buffer + +#define FIO_LATIN1 0x01 // convert Latin1 +#define FIO_UTF8 0x02 // convert UTF-8 +#define FIO_UCS2 0x04 // convert UCS-2 +#define FIO_UCS4 0x08 // convert UCS-4 +#define FIO_UTF16 0x10 // convert UTF-16 +#ifdef MSWIN +# define FIO_CODEPAGE 0x20 // convert MS-Windows codepage +# define FIO_PUT_CP(x) (((x) & 0xffff) << 16) // put codepage in top word +# define FIO_GET_CP(x) (((x)>>16) & 0xffff) // get codepage from top word +#endif +#ifdef MACOS_CONVERT +# define FIO_MACROMAN 0x20 // convert MacRoman +#endif +#define FIO_ENDIAN_L 0x80 // little endian +#define FIO_ENCRYPTED 0x1000 // encrypt written bytes +#define FIO_NOCONVERT 0x2000 // skip encoding conversion +#define FIO_UCSBOM 0x4000 // check for BOM at start of file +#define FIO_ALL -1 // allow all formats + +// When converting, a read() or write() may leave some bytes to be converted +// for the next call. The value is guessed... +#define CONV_RESTLEN 30 + +// We have to guess how much a sequence of bytes may expand when converting +// with iconv() to be able to allocate a buffer. +#define ICONV_MULT 8 |