mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-24 00:18:39 +00:00
[read performance iterate] byte-reader iterate
This commit is contained in:
parent
9880d3650a
commit
fe70a213f7
3 changed files with 3 additions and 6 deletions
|
|
@ -60,7 +60,6 @@ typedef struct _lrec_reader_stdio_csv_state_t {
|
|||
int ifs_eof_len;
|
||||
|
||||
int peek_buf_len;
|
||||
//int allow_repeat_ifs;
|
||||
|
||||
string_builder_t sb;
|
||||
string_builder_t* psb;
|
||||
|
|
@ -236,7 +235,7 @@ static void lrec_reader_stdio_csv_free(void* pvstate) {
|
|||
}
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
lrec_reader_t* lrec_reader_stdio_csv_alloc(char irs, char ifs, int allow_repeat_ifs) {
|
||||
lrec_reader_t* lrec_reader_stdio_csv_alloc(char irs, char ifs) {
|
||||
lrec_reader_t* plrec_reader = mlr_malloc_or_die(sizeof(lrec_reader_t));
|
||||
|
||||
lrec_reader_stdio_csv_state_t* pstate = mlr_malloc_or_die(sizeof(lrec_reader_stdio_csv_state_t));
|
||||
|
|
@ -270,8 +269,6 @@ lrec_reader_t* lrec_reader_stdio_csv_alloc(char irs, char ifs, int allow_repeat_
|
|||
pstate->peek_buf_len = mlr_imax2(pstate->peek_buf_len, pstate->ifs_eof_len);
|
||||
pstate->peek_buf_len += 2;
|
||||
|
||||
//pstate->allow_repeat_ifs = allow_repeat_ifs;
|
||||
|
||||
sb_init(&pstate->sb, STRING_BUILDER_INIT_SIZE);
|
||||
pstate->psb = &pstate->sb;
|
||||
pstate->pfr = NULL;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ lrec_reader_t* lrec_reader_alloc(char* fmtdesc, int use_mmap, char irs, char if
|
|||
// if (use_mmap)
|
||||
//return lrec_reader_mmap_csv_alloc(irs, ifs, allow_repeat_ifs);
|
||||
//else
|
||||
return lrec_reader_stdio_csv_alloc(irs, ifs, allow_repeat_ifs);
|
||||
return lrec_reader_stdio_csv_alloc(irs, ifs);
|
||||
} else if (streq(fmtdesc, "csvlite")) {
|
||||
if (use_mmap)
|
||||
return lrec_reader_mmap_csvlite_alloc(irs, ifs, allow_repeat_ifs);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
lrec_reader_t* lrec_reader_alloc(char* fmtdesc, int use_mmap, char irs, char ifs, int allow_repeat_ifs,
|
||||
char ips, int allow_repeat_ips);
|
||||
|
||||
lrec_reader_t* lrec_reader_stdio_csv_alloc(char irs, char ifs, int allow_repeat_ifs);
|
||||
lrec_reader_t* lrec_reader_stdio_csv_alloc(char irs, char ifs);
|
||||
lrec_reader_t* lrec_reader_stdio_csvlite_alloc(char irs, char ifs, int allow_repeat_ifs);
|
||||
lrec_reader_t* lrec_reader_stdio_csvex_alloc(char irs, char ifs, int allow_repeat_ifs);
|
||||
lrec_reader_t* lrec_reader_stdio_dkvp_alloc(char irs, char ifs, char ips, int allow_repeat_ifs);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue