1
0
forked from aniani/vim

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)
This commit is contained in:
Bram Moolenaar
2019-09-28 16:30:04 +02:00
parent 9be0e0b9d3
commit 473952e852
15 changed files with 2849 additions and 2799 deletions

View File

@@ -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