--- vnlog.diff 2022-08-11 20:59:41.861963478 +0200 +++ vnlog.ea_edit.diff 2022-08-11 21:12:30.418796821 +0200 @@ -14,19 +14,6 @@ index 8c0d4ce..88b9292 100644 --- c/src/datamash.c +++ w/src/datamash.c -@@ -76,12 +76,6 @@ static size_t line_number = 0 ; - /* Lines in the current group */ - static size_t lines_in_group = 0 ; - --/* Print Output Header */ --static bool output_header = false; -- --/* Input file has a header line */ --static bool input_header = false; -- - /* If true, print the entire input line. Otherwise, print only the key fields */ - static bool print_full_line = false; - @@ -115,6 +109,7 @@ enum OUTPUT_DELIMITER_OPTION, CUSTOM_FORMAT_OPTION, @@ -35,12 +22,11 @@ UNDOC_PRINT_INF_OPTION, UNDOC_PRINT_NAN_OPTION, UNDOC_PRINT_PROGNAME_OPTION, -@@ -134,6 +129,8 @@ static struct option const long_options[] = +@@ -134,6 +129,7 @@ static struct option const long_options[] = {"header-in", no_argument, NULL, INPUT_HEADER_OPTION}, {"header-out", no_argument, NULL, OUTPUT_HEADER_OPTION}, {"headers", no_argument, NULL, 'H'}, + {"vnlog", no_argument, NULL, VNLOG_OPTION}, -+ {"vnl", no_argument, NULL, VNLOG_OPTION}, {"full", no_argument, NULL, 'f'}, {"filler", required_argument, NULL, 'F'}, {"format", required_argument, NULL, CUSTOM_FORMAT_OPTION}, @@ -50,7 +36,7 @@ -H, --headers same as '--header-in --header-out'\n\ +"), stdout); + fputs (_("\ -+ --vnl, --vnlog Reads and writes data in the vnlog format.\n\ ++ --vnlog Reads and writes data in the vnlog format.\n\ + Implies -C -H -W\n\ "), stdout); fputs (_("\ @@ -317,7 +303,7 @@ + const size_t buflen = lbuf->length; + const char* fptr = lbuf->buffer; + -+#define IS_TRAILING_COMMENT (ignore_trailing_comments && (*fptr == '#' || *fptr == ';')) ++#define IS_TRAILING_COMMENT (ignore_trailing_comments && *fptr == '#') /* Move 'fptr' to point to the beginning of 'field' */ if (field_delim != TAB_WHITESPACE) @@ -513,16 +499,10 @@ index 7739d8f..1ddb1a7 100644 --- c/src/text-options.c +++ w/src/text-options.c -@@ -67,6 +67,14 @@ char* missing_field_filler = "N/A"; +@@ -67,6 +67,8 @@ char* missing_field_filler = "N/A"; followed by '#' or ';'. See line_record_is_comment. */ bool skip_comments = false; -+/* Print Output Header */ -+bool output_header = false; -+ -+/* Input file has a header line */ -+bool input_header = false; -+ +bool vnlog = false; + #define UCHAR_LIM (UCHAR_MAX + 1) @@ -532,18 +512,12 @@ index 4282016..46ac37d 100644 --- c/src/text-options.h +++ w/src/text-options.h -@@ -68,6 +68,14 @@ extern char* missing_field_filler; +@@ -68,6 +68,8 @@ extern char* missing_field_filler; followed by '#' or ';'. See line_record_is_comment. */ extern bool skip_comments; +extern bool vnlog; + -+/* Print Output Header */ -+extern bool output_header; -+ -+/* Input file has a header line */ -+extern bool input_header; -+ #define UCHAR_LIM (UCHAR_MAX + 1) extern bool blanks[UCHAR_LIM];