Mercurial > vim
diff src/structs.h @ 18199:e2be5a6485f5 v8.1.2094
patch 8.1.2094: the fileio.c file is too big
Commit: https://github.com/vim/vim/commit/473952e85286eb9c6098801f1819981ba61ad153
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Sep 28 16:30:04 2019 +0200
patch 8.1.2094: the fileio.c file is too big
Problem: The fileio.c file is too big.
Solution: Move buf_write() to bufwrite.c. (Yegappan Lakshmanan,
closes #4990)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 28 Sep 2019 16:45:04 +0200 |
parents | 4ac8161e92e0 |
children | e0ec4cd7a865 |
line wrap: on
line diff
--- 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