Lines Matching refs:size
43 static char_u *check_for_bom(char_u *p, long size, int *lenp, int flags);
147 long size = 0; in readfile() local
1127 size = SSIZE_MAX; // use max I/O size, 52K in readfile()
1132 size = 0x10000L + linerest; in readfile()
1133 if (size > 0x100000L) in readfile()
1134 size = 0x100000L; in readfile()
1139 if (size < 0 || size + linerest + 1 < 0 || linerest >= MAXCOL) in readfile()
1143 size = 1; in readfile()
1149 for ( ; size >= 10; size = (long)((long_u)size >> 1)) in readfile()
1151 if ((new_buffer = lalloc(size + linerest + 1, in readfile()
1157 do_outofmem_msg((long_u)(size * 2 + linerest + 1)); in readfile()
1178 real_size = (int)size; in readfile()
1181 size = size / ICONV_MULT; in readfile()
1185 size = size / 2; in readfile()
1187 size = (size * 2 / 3) & ~1; in readfile()
1189 size = (size * 2 / 3) & ~3; in readfile()
1191 size = size / ICONV_MULT; // worst case in readfile()
1194 size = size / ICONV_MULT; // also worst case in readfile()
1198 size = size / ICONV_MULT; // also worst case in readfile()
1206 size -= conv_restlen; in readfile()
1217 size = 0; in readfile()
1228 if ((int)tlen + n + 1 > size) in readfile()
1233 n = (int)(size - tlen); in readfile()
1263 size = tlen; in readfile()
1280 size = WRITEBUFSIZE + crypt_get_max_header_len() in readfile()
1286 size = WRITEBUFSIZE + crypto_secretstream_xchacha20poly1305_ABYTES; in readfile()
1288 eof = size; in readfile()
1289 size = read_eintr(fd, ptr, size); in readfile()
1290 filesize_count += size; in readfile()
1292 eof = (size < eof || filesize_count == filesize_disk); in readfile()
1299 if (filesize == 0 && size > 0) in readfile()
1301 cryptkey = check_for_cryptkey(cryptkey, ptr, &size, in readfile()
1316 && size > 0) in readfile()
1323 size, eof); in readfile()
1332 curbuf->b_cryptstate, ptr, size, in readfile()
1381 real_size = size; in readfile()
1383 size = decrypted_size; in readfile()
1389 if (size <= 0) in readfile()
1391 if (size < 0) // read error in readfile()
1476 if (size < 2 || curbuf->b_p_bin) in readfile()
1479 ccname = check_for_bom(ptr, size, &blen, in readfile()
1485 size -= blen; in readfile()
1486 mch_memmove(ptr, ptr + blen, (size_t)size); in readfile()
1517 size += conv_restlen; in readfile()
1522 if (size <= 0) in readfile()
1539 from_size = size; in readfile()
1540 ptr += size; in readfile()
1542 to_size = real_size - size; in readfile()
1586 size = (long)((char_u *)top - ptr); in readfile()
1624 src = ptr + real_size - size; in readfile()
1625 mch_memmove(src, ptr, size); in readfile()
1631 size = size; in readfile()
1632 while (size > 0) in readfile()
1642 bytelen = (int)utf_ptr2len_len(src, size); in readfile()
1643 if (bytelen > size) in readfile()
1652 bytelen = size; in readfile()
1670 for (bytelen = 1; bytelen <= size && bytelen <= 3; in readfile()
1685 if (size == 1) in readfile()
1742 size -= bytelen; in readfile()
1745 if (size > 0) in readfile()
1748 mch_memmove(conv_rest, src, size); in readfile()
1749 conv_restlen = size; in readfile()
1753 size = (long)(dst - ptr); in readfile()
1764 if (macroman2enc(ptr, &size, real_size) == FAIL) in readfile()
1786 p = ptr + size; in readfile()
1790 tail = ptr + size - 1; in readfile()
1793 if (tail + utf_byte2len(*tail) <= ptr + size) in readfile()
1802 p = ptr + (size & ~1); in readfile()
1803 if (size & 1) in readfile()
1827 p = ptr + (size & ~3); in readfile()
1828 if (size & 3) in readfile()
1836 conv_restlen = (int)((ptr + size) - tail); in readfile()
1838 size -= conv_restlen; in readfile()
1984 size = (long)((ptr + real_size) - dest); in readfile()
1994 int todo = (int)((ptr + size) - p); in readfile()
2021 size -= conv_restlen; in readfile()
2046 --size; in readfile()
2055 if (p < ptr + size && !incomplete_tail) in readfile()
2074 filesize += size; in readfile()
2088 for (p = ptr; p < ptr + size; ++p) in readfile()
2113 for (p = ptr; p < ptr + size; ++p) in readfile()
2151 while (++ptr, --size >= 0) in readfile()
2192 while (++ptr, --size >= 0) in readfile()
3270 long size, in check_for_bom() argument
3277 if (p[0] == 0xef && p[1] == 0xbb && size >= 3 && p[2] == 0xbf in check_for_bom()
3285 if (size >= 4 && p[2] == 0 && p[3] == 0 in check_for_bom()
3306 else if (size >= 4 && p[0] == 0 && p[1] == 0 && p[2] == 0xfe in check_for_bom()
3673 vim_fgets(char_u *buf, int size, FILE *fp) in vim_fgets() argument
3679 buf[size - 2] = NUL; in vim_fgets()
3680 eof = fgets((char *)buf, size, fp); in vim_fgets()
3681 if (buf[size - 2] != NUL && buf[size - 2] != '\n') in vim_fgets()
3683 buf[size - 1] = NUL; // Truncate the line in vim_fgets()
4571 varnumber_T size, time; in create_readdirex_item() local
4589 size = (((varnumber_T)wfd->nFileSizeHigh) << 32) | wfd->nFileSizeLow; in create_readdirex_item()
4590 if (dict_add_number(item, "size", size) == FAIL) in create_readdirex_item()
4625 varnumber_T size; in create_readdirex_item() local
4657 size = (varnumber_T)st.st_size; in create_readdirex_item()
4659 size = 0; in create_readdirex_item()
4661 else if ((off_T)size != (off_T)st.st_size) in create_readdirex_item()
4662 size = -2; in create_readdirex_item()
4663 if (dict_add_number(item, "size", size) == FAIL) in create_readdirex_item()
5434 int size = 2; // '^' at start, '$' at end in file_pat_to_reg_pat() local
5457 size += 2; // extra backslash in file_pat_to_reg_pat()
5462 size += 4; // could become "[\/]" in file_pat_to_reg_pat()
5466 size++; in file_pat_to_reg_pat()
5470 ++size; in file_pat_to_reg_pat()
5475 reg_pat = alloc(size + 1); in file_pat_to_reg_pat()