robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
38986188ba
master
1#pragma once 2 3#include <stdint.h> // IWYU pragma: keep 4#include <stdio.h> // IWYU pragma: keep 5#include <time.h> // IWYU pragma: keep 6 7#include "nvim/eval/typval_defs.h" 8#include "nvim/ex_cmds_defs.h" // IWYU pragma: keep 9#include "nvim/garray_defs.h" // IWYU pragma: keep 10#include "nvim/os/fs_defs.h" // IWYU pragma: keep 11#include "nvim/os/os_defs.h" // IWYU pragma: keep 12#include "nvim/pos_defs.h" // IWYU pragma: keep 13#include "nvim/types_defs.h" // IWYU pragma: keep 14 15/// Values for readfile() flags 16enum { 17READ_NEW = 0x01 ,///< read a file into a new buffer 18READ_FILTER = 0x02 ,///< read filter output 19READ_STDIN = 0x04 ,///< read from stdin 20READ_BUFFER = 0x08 ,///< read from curbuf (converting stdin) 21READ_DUMMY = 0x10 ,///< reading into a dummy buffer 22READ_KEEP_UNDO = 0x20 ,///< keep undo info 23READ_FIFO = 0x40 ,///< read from fifo or socket 24READ_NOWINENTER = 0x80 ,///< do not trigger BufWinEnter 25READ_NOFILE = 0x100 ,///< do not read a file, do trigger BufReadCmd 26}; 27 28typedef varnumber_T (* CheckItem )(void * expr ,const char * name ); 29 30enum { 31FIO_LATIN1 = 0x01 ,///< convert Latin1 32FIO_UTF8 = 0x02 ,///< convert UTF-8 33FIO_UCS2 = 0x04 ,///< convert UCS-2 34FIO_UCS4 = 0x08 ,///< convert UCS-4 35FIO_UTF16 = 0x10 ,///< convert UTF-16 36FIO_ENDIAN_L = 0x80 ,///< little endian 37FIO_NOCONVERT = 0x2000 ,///< skip encoding conversion 38FIO_UCSBOM = 0x4000 ,///< check for BOM at start of file 39FIO_ALL = -1 ,///< allow all formats 40}; 41 42enum { 43/// When converting, a read() or write() may leave some bytes to be converted 44/// for the next call. The value is guessed... 45CONV_RESTLEN = 30 , 46}; 47 48enum {WRITEBUFSIZE = 8192 , };///< size of normal write buffer 49 50enum { 51/// We have to guess how much a sequence of bytes may expand when converting 52/// with iconv() to be able to allocate a buffer. 53ICONV_MULT = 8 , 54}; 55 56#include "fileio.h.generated.h"