mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-20 18:10:07 +00:00
enum neaten
This commit is contained in:
parent
1e9f0c4d0c
commit
be406bc37b
4 changed files with 11 additions and 7 deletions
|
|
@ -6,6 +6,7 @@
|
|||
#define MLRCLI_H
|
||||
|
||||
#include "containers/sllv.h"
|
||||
#include "cli/quoting.h"
|
||||
#include "input/lrec_reader.h"
|
||||
#include "mapping/mapper.h"
|
||||
#include "output/lrec_writer.h"
|
||||
|
|
@ -34,7 +35,7 @@ typedef struct _cli_opts_t {
|
|||
char* json_flatten_separator;
|
||||
|
||||
char* ofmt;
|
||||
int oquoting;
|
||||
quoting_t oquoting;
|
||||
|
||||
lrec_reader_t* plrec_reader;
|
||||
sllv_t* pmapper_list;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
#ifndef QUOTING_H
|
||||
#define QUOTING_H
|
||||
|
||||
#define QUOTE_ALL 0xb1
|
||||
#define QUOTE_NONE 0xb2
|
||||
#define QUOTE_MINIMAL 0xb3
|
||||
#define QUOTE_NUMERIC 0xb4
|
||||
typedef enum _quoting_t {
|
||||
QUOTE_ALL,
|
||||
QUOTE_NONE,
|
||||
QUOTE_MINIMAL,
|
||||
QUOTE_NUMERIC
|
||||
} quoting_t;
|
||||
|
||||
#endif // QUOTING_H
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ static void quote_minimal_output_func(FILE* fp, char* string, char* ors, char* o
|
|||
static void quote_numeric_output_func(FILE* fp, char* string, char* ors, char* ofs, int orslen, int ofslen);
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
lrec_writer_t* lrec_writer_csv_alloc(char* ors, char* ofs, int oquoting, int headerless_csv_output) {
|
||||
lrec_writer_t* lrec_writer_csv_alloc(char* ors, char* ofs, quoting_t oquoting, int headerless_csv_output) {
|
||||
lrec_writer_t* plrec_writer = mlr_malloc_or_die(sizeof(lrec_writer_t));
|
||||
|
||||
lrec_writer_csv_state_t* pstate = mlr_malloc_or_die(sizeof(lrec_writer_csv_state_t));
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
#ifndef LREC_WRITERS_H
|
||||
#define LREC_WRITERS_H
|
||||
#include "cli/quoting.h"
|
||||
#include "output/lrec_writer.h"
|
||||
|
||||
lrec_writer_t* lrec_writer_csv_alloc(char* ors, char* ofs, int oquoting, int headerless_csv_output);
|
||||
lrec_writer_t* lrec_writer_csv_alloc(char* ors, char* ofs, quoting_t oquoting, int headerless_csv_output);
|
||||
lrec_writer_t* lrec_writer_csvlite_alloc(char* ors, char* ofs, int headerless_csv_output);
|
||||
lrec_writer_t* lrec_writer_dkvp_alloc(char* ors, char* ofs, char* ops);
|
||||
lrec_writer_t* lrec_writer_json_alloc(int stack_vertically, int wrap_json_output_in_outer_list,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue