From d750780a5dc3a0666770a98e626f4b7840695e67 Mon Sep 17 00:00:00 2001 From: Thomas Jensen Date: Sun, 4 Feb 2024 20:48:32 +0100 Subject: [PATCH] Drop fields REVISION, REVDATE, and CREATED from config file These pieces of information are really in Git, so they are no longer required in the config file. --- boxes-config | 195 ------------------ boxes.vim | 2 +- src/boxes.c | 2 - src/boxes.in.h | 3 - src/lexer.l | 2 +- src/list.c | 8 - src/parsecode.c | 44 ---- test/083_list_design_info.txt | 2 - ...ist_design_info_for_cmdline_definition.txt | 2 - test/135_design_alias_by_design.txt | 2 - test/137_design_alias_no_accumulation.txt | 2 - test/156_eol_control_crlf_design_info.txt | 94 ++++----- test/157_eol_control_lf_design_info.txt | 92 ++++----- test/165_design_alias_parent_override.txt | 2 - test/168_parent_keyword_in_sample_ok.txt | 2 - test/175_utf8_happy_design_info.txt | 2 - test/test-config-unused.cfg | 3 - 17 files changed, 87 insertions(+), 372 deletions(-) diff --git a/boxes-config b/boxes-config index 7570e6c2..377f8faa 100644 --- a/boxes-config +++ b/boxes-config @@ -22,9 +22,6 @@ BOX c author "Thomas Jensen" designer "(public domain)" -revision "1.0" -revdate "March 18, 1999 (Thursday, 15:25h)" -created "March 18, 1999 (Thursday, 15:25h)" tags ("simple", "programming", "box") sample @@ -59,9 +56,6 @@ END c BOX parchment author "Thomas Jensen" -created "March 12, 1999 (Friday, 17:05h)" -revision "1.0" -revdate "March 12, 1999 (Friday, 17:05h)" tags ("artwork", "box", "scroll") sample @@ -103,9 +97,6 @@ END parchment BOX columns author "Thomas Jensen" -revision "1.1" -revdate "July 20, 1999 (Tuesday, 21:06h)" -created "March 17, 1999 (Wednesday, 15:27h)" tags ("artwork", "box") sample @@ -147,9 +138,6 @@ END columns BOX whirly author "Thomas Jensen" -created "March 17, 1999 (Wednesday, 15:40h)" -revdate "December 10, 2023 (Sunday, 14:20h)" -revision "1.1" tags ("artwork", "box") sample @@ -190,9 +178,6 @@ END whirly BOX scroll author "Thomas Jensen" -revision "1.2" -revdate "August 18, 1999 (Wednesday, 17:00h)" -created "March 17, 1999 (Wednesday, 17:04h)" tags ("artwork", "box", "scroll", "large") SAMPLE @@ -251,9 +236,6 @@ BOX simple author "Thomas Jensen" designer "(public domain)" -revision "1.1" -revdate "August 22, 1999 (Sunday, 12:44h)" -created "March 18, 1999 (Thursday, 15:24h)" tags ("simple", "box") sample @@ -281,9 +263,6 @@ BOX c-cmt author "Thomas Jensen" designer "(public domain)" -revision "1.0" -revdate "June 17, 1999 (Thursday, 19:59h)" -created "June 17, 1999 (Thursday, 19:59h)" tags ("simple", "programming", "comment") sample @@ -315,9 +294,6 @@ BOX c-cmt2 author "Thomas Jensen" designer "(public domain)" -revision "1.1" -revdate "August 18, 1999 (Wednesday, 17:01h)" -created "June 17, 1999 (Thursday, 19:59h)" tags ("simple", "programming", "comment") sample @@ -351,9 +327,6 @@ BOX javadoc author "Ted Berg " designer "(public domain)" -revision "1.0" -revdate "October 25, 1999 (Monday 10:16h)" -created "October 25, 1999 (Monday 10:16h)" tags ("simple", "programming", "comment") sample @@ -387,9 +360,6 @@ BOX html author "Thomas Jensen" designer "(public domain)" -revision "1.2" -revdate "October 19, 2012 (Friday, 17:32h)" -created "March 18, 1999 (Thursday, 15:26h)" tags ("simple", "programming", "box") sample @@ -424,9 +394,6 @@ BOX html-cmt author "Thomas Jensen" designer "(public domain)" -revision "1.0" -revdate "June 17, 1999 (Thursday, 19:59h)" -created "June 17, 1999 (Thursday, 19:59h)" tags ("simple", "programming", "comment") sample @@ -458,9 +425,6 @@ BOX shell author "Thomas Jensen" designer "(public domain)" -revision "1.0" -revdate "March 18, 1999 (Thursday, 15:27h)" -created "March 18, 1999 (Thursday, 15:27h)" tags ("simple", "programming", "box") sample @@ -491,9 +455,6 @@ BOX nuke author "Thomas Jensen" designer "Joan G. Stark " -revision "1.1" -revdate "August 22, 1999 (Sunday, 12:51h)" -created "March 30, 1999 (Tuesday, 15:55h)" tags ("artwork", "box") sample @@ -544,9 +505,6 @@ BOX diamonds author "Thomas Jensen" designer "Joan G. Stark " -revision "1.2" -revdate "February 13, 2021 (Saturday, 14:00h)" -created "March 30, 1999 (Tuesday, 15:59h)" tags ("artwork", "box") Sample @@ -629,9 +587,6 @@ BOX mouse author "Thomas Jensen" designer "Joan G. Stark " -revision "1.2" -revdate "February 13, 2021 (Saturday, 14:00h)" -created "March 18, 1999 (Thursday, 15:27h)" tags ("artwork", "box", "sign") sample @@ -695,9 +650,6 @@ BOX sunset author "Thomas Jensen" designer "Joan G. Stark " -revision "1.2" -revdate "December 10, 2023 (Sunday, 14:20h)" -created "March 30, 1999 (Tuesday, 17:10h)" tags ("artwork", "box") sample @@ -748,9 +700,6 @@ BOX boy author "Thomas Jensen" designer "Joan G. Stark " -revision "1.2" -revdate "February 13, 2021 (Saturday, 14:00h)" -created "April 02, 1999 (Friday, 15:02h)" tags ("artwork", "box", "sign") sample @@ -814,9 +763,6 @@ BOX girl author "Thomas Jensen" designer "Joan G. Stark " -revision "1.1" -revdate "February 13, 2021 (Saturday, 14:00h)" -created "April 02, 1999 (Friday, 19:13h)" tags ("artwork", "box", "sign") sample @@ -876,9 +822,6 @@ BOX xes author "Thomas Jensen" designer "Joan G. Stark " -revision "1.3" -revdate "December 10, 2023 (Sunday, 22:00h)" -created "April 09, 1999 (Friday, 20:05h)" tags ("artwork", "box") sample @@ -932,9 +875,6 @@ BOX dog author "Thomas Jensen" designer "Joan G. Stark " -revision "1.1" -revdate "February 13, 2021 (Saturday, 14:00h)" -created "April 09, 1999 (Friday, 19:45h)" tags ("artwork", "box", "sign") sample @@ -987,9 +927,6 @@ BOX cat author "Thomas Jensen" designer "Joan G. Stark " -revision "1.1" -revdate "February 13, 2021 (Saturday, 14:00h)" -created "April 09, 1999 (Friday, 19:45h)" tags ("artwork", "box", "sign") sample @@ -1044,9 +981,6 @@ BOX capgirl author "Thomas Jensen" designer "Joan G. Stark " -revision "1.1" -revdate "February 13, 2021 (Saturday, 14:00h)" -created "April 09, 1999 (Friday, 19:24h)" tags ("artwork", "box", "sign") sample @@ -1108,9 +1042,6 @@ BOX santa author "Thomas Jensen" designer "Joan G. Stark " -revision "1.0" -revdate "April 09, 1999 (Friday, 19:24h)" -created "April 09, 1999 (Friday, 19:24h)" tags ("artwork", "box", "sign") sample @@ -1173,9 +1104,6 @@ BOX spring author "Thomas Jensen" designer "Joan G. Stark " -revision "1.1" -revdate "August 18, 1999 (Wednesday, 17:05h)" -created "April 09, 1999 (Friday, 15:53h)" tags ("artwork") sample @@ -1244,9 +1172,6 @@ BOX stark2 author "Thomas Jensen" designer "Joan G. Stark " -revision "1.2" -revdate "December 10, 2023 (Sunday, 14:20h)" -created "April 05, 1999 (Monday, 21:55h)" tags ("artwork", "box") sample @@ -1294,9 +1219,6 @@ BOX stark1 author "Thomas Jensen" designer "Joan G. Stark " -revision "1.1" -revdate "February 13, 2021 (Saturday, 14:00h)" -created "April 05, 1999 (Monday, 21:55h)" tags ("artwork", "box") sample @@ -1332,9 +1254,6 @@ END stark1 BOX peek author "Thomas Jensen" -revision "1.1" -revdate "December 10, 2023 (Sunday, 14:20h)" -created "April 12, 1999 (Monday, 12:52h)" tags ("programming", "box") sample @@ -1379,9 +1298,6 @@ BOX java-cmt author "Thomas Jensen" designer "(public domain)" -revision "1.0" -revdate "June 17, 1999 (Thursday, 19:59h)" -created "June 17, 1999 (Thursday, 19:59h)" tags ("simple", "programming", "comment") sample @@ -1409,9 +1325,6 @@ BOX pound-cmt author "Thomas Jensen" designer "(public domain)" -revision "1.0" -revdate "June 17, 1999 (Thursday, 19:59h)" -created "June 17, 1999 (Thursday, 19:59h)" tags ("simple", "programming", "comment") sample @@ -1438,9 +1351,6 @@ BOX vim-cmt author "Thomas Jensen" designer "Bram Moolenaar" -revision "1.0" -revdate "June 17, 1999 (Thursday, 19:59h)" -created "June 17, 1999 (Thursday, 19:59h)" tags ("simple", "programming", "comment") sample @@ -1469,9 +1379,6 @@ BOX right author "Thomas Jensen" designer "Thomas Jensen" -revision "1.1" -revdate "April 3, 2021 (Saturday, 21:13h)" -created "June 17, 1999 (Thursday, 19:59h)" tags ("simple", "programming", "comment") sample @@ -1501,9 +1408,6 @@ BOX ada-cmt, lua-cmt, sql-cmt author "Neil Bird " designer "(public domain)" -revision "1.0" -revdate "March 15, 2000 (Wednesday 12:17h)" -created "March 15, 2000 (Wednesday 12:17h)" tags ("simple", "programming", "comment") sample @@ -1531,9 +1435,6 @@ BOX ada-box, lua-box, sql-box author "Neil Bird " designer "(public domain)" -revision "1.0" -revdate "March 15, 2000 (Wednesday 12:24h)" -created "March 15, 2000 (Wednesday 12:24h)" tags ("simple", "programming", "box") sample @@ -1565,9 +1466,6 @@ BOX tex-cmt author "Nic H" designer "(public domain)" -revision "1.0" -revdate "December 01, 2016 (Thursday 15:20h)" -created "December 01, 2016 (Thursday 15:20h)" tags ("simple", "programming", "comment") sample @@ -1595,9 +1493,6 @@ BOX tex-box author "Nic H" designer "(public domain)" -revision "1.0" -revdate "December 01, 2016 (Thursday 15:21h)" -created "December 01, 2016 (Thursday 15:21h)" tags ("simple", "programming", "box") sample @@ -1629,9 +1524,6 @@ BOX boxquote author "Christian Molls " designer "Christian Molls " -revdate "Tue Aug 15 23:02:02 CEST 2000" -created "Tue Aug 15 23:01:50 CEST 2000" -revision "1.0" tags ("simple", "artwork") sample @@ -1666,9 +1558,6 @@ BOX cc author "Bas van Gils " designer "(public domain)" -revision "1.0" -revdate "Tue Sep 19 12:06:51 CEST 2000" -created "Tue Sep 19 12:06:51 CEST 2000" tags ("simple", "programming", "box") sample @@ -1704,8 +1593,6 @@ BOX stone author "Fredrik Steen " designer "Fredrik Steen " -revision "1.0" -created "April 25, 2001 (Wed 11:00)" tags ("simple", "artwork", "box") sample @@ -1736,9 +1623,6 @@ BOX headline author "Thomas Jensen" designer "Thomas Jensen" -revision "1.3" -revdate "February 09, 2021 (Tuesday, 22:00h)" -created "March 18, 1999 (Thursday, 15:25h)" tags ("programming", "box") sample @@ -1778,9 +1662,6 @@ BOX lisp-cmt author "Vijay Lakshminarayanan " designer "(public domain)" -revision "1.0" -revdate "February 20, 2006 (Monday, 20:36h)" -created "February 20, 2006 (Monday, 20:36h)" tags ("simple", "programming", "comment") sample @@ -1807,7 +1688,6 @@ BOX underline author "Elmar Loos " designer "Elmar Loos " -revision "1.0" tags ("simple", "programming", "comment") sample @@ -1831,8 +1711,6 @@ END underline BOX ian_jones author "Karl E. Jorgensen " -created "Fri Jul 20 16:52:39 BST 2001" -revision "0.1" tags ("artwork", "box", "sign") sample @@ -1919,9 +1797,6 @@ END ian_jones BOX unicornthink author "Mike Meyer " -revision "1.1" -revdate "November 08, 2014 (Saturday, 11:08h)" -created "September 02, 2013 (Monday, 14:43h)" tags ("artwork", "speech") sample @@ -2005,9 +1880,6 @@ END unicornthink BOX unicornsay author "Mike Meyer " -revision "1.2" -revdate "February 21, 2019 (Thursday, 18:45h)" -created "September 02, 2013 (Monday, 14:43h)" tags ("artwork", "speech") sample @@ -2092,9 +1964,6 @@ BOX caml author "Michael Tiernan " designer "Michael Tiernan " -revision "1.5" -revdate "Wed May 14 11:41:27 EDT 2014" -created "Wed May 14 11:41:27 EDT 2014" tags ("simple", "artwork", "box") sample @@ -2132,9 +2001,6 @@ BOX twisted author "Tristano Ajmone " designer "Michael Naylor " -revision "1.0" -created "Saturday, 02-Jan-16 12:42:31 UTC+1" -revdate "Saturday, 02-Jan-16 12:42:31 UTC+1" tags ("artwork", "box", "large") sample @@ -2276,8 +2142,6 @@ BOX scroll-akn author "Tristano Ajmone " designer "akn" -created "Saturday, 02-Jan-16 03:34:03 UTC+1" -revision "1.0" tags ("artwork", "box", "scroll") sample @@ -2324,8 +2188,6 @@ BOX face author "Dmitry Bolshakov " designer "Dmitry Bolshakov " -created "2014-02-13 08:41:11" -revision "1.0" tags ("artwork", "box", "large") sample @@ -2369,8 +2231,6 @@ BOX fence designer "Dmitry Bolshakov " author "Dmitry Bolshakov " -created "2017-04-10" -revision "1.0" tags ("artwork", "box") sample @@ -2419,8 +2279,6 @@ BOX important designer "Dmitry Bolshakov " author "Dmitry Bolshakov " -created "2017-04-10" -revision "1.0" tags ("artwork", "box") sample @@ -2462,8 +2320,6 @@ BOX important2 designer "Dmitry Bolshakov " author "Dmitry Bolshakov " -created "2017-04-10" -revision "1.0" tags ("artwork", "box") sample @@ -2509,8 +2365,6 @@ BOX important3 designer "Dmitry Bolshakov " author "Dmitry Bolshakov " -created "2017-04-10" -revision "1.0" tags ("artwork", "box") sample @@ -2562,8 +2416,6 @@ BOX f90-box author "Matt Thompson " designer "(public domain)" -revision "1.0" -created "2018-02-08" tags ("simple", "programming", "box") sample @@ -2594,8 +2446,6 @@ BOX f90-cmt author "Matt Thompson " designer "(public domain)" -revision "1.0" -created "2018-02-08" tags ("simple", "programming", "comment") sample @@ -2622,8 +2472,6 @@ BOX bear designer "Hayley Jane Wakenshaw" author "Thomas Jensen" -created "2019-03-31" -revision "1.0" tags ("artwork", "box", "sign", "large") sample @@ -2715,9 +2563,6 @@ BOX jstone author "Ed Schaller" designer "schallee_@_darkmist.net" -revision "1.0" -revdate "3 Oct 2019" -created "3 Oct 2019" tags ("simple", "programming", "box") sample @@ -2752,8 +2597,6 @@ BOX vim-box author "Ricky Anderson " designer "(public domain)" -revision "1.0" -created "2019-11-17" tags ("simple", "programming", "box") sample @@ -2786,8 +2629,6 @@ BOX weave author "Thomas Jensen" designer "dc" -revision "1.0" -created "2021-06-13" tags ("artwork", "box", "large") sample @@ -2890,8 +2731,6 @@ BOX normand author "Thomas Jensen" designer "Normand Veilleux" -revision "1.0" -created "2021-06-13" tags ("artwork", "box", "large") sample @@ -3009,8 +2848,6 @@ BOX cowsay author "David Yang " designer "Tony Monroe" -revision "1.0" -created "2021-08-16" tags ("artwork", "speech") sample @@ -3090,8 +2927,6 @@ BOX tux author "David Yang " designer "Tony Monroe" -revision "1.0" -created "2021-08-16" tags ("artwork", "speech") sample @@ -3195,8 +3030,6 @@ BOX info author "Thomas Jensen" designer "Thomas Jensen" -revision "1.0" -created "2023-10-24" tags ("box", "color", "simple", "unicode") sample @@ -3245,8 +3078,6 @@ BOX warning author "Thomas Jensen" designer "Thomas Jensen" -revision "1.0" -created "2023-10-24" tags ("box", "color", "simple", "unicode") sample @@ -3295,8 +3126,6 @@ BOX critical author "Thomas Jensen" designer "Thomas Jensen" -revision "1.0" -created "2023-10-24" tags ("box", "color", "simple", "unicode") sample @@ -3345,9 +3174,6 @@ BOX ansi author "chorpler" designer "(public domain)" -created "November 21, 2023 (Tuesday, 20:32h)" -revision "1.0" -revdate "November 21, 2023 (Tuesday, 20:32h)" tags ("box", "simple", "unicode") sample @@ -3387,9 +3213,6 @@ BOX ansi-rounded author "chorpler" designer "(public domain)" -created "November 21, 2023 (Tuesday, 20:32h)" -revision "1.0" -revdate "November 21, 2023 (Tuesday, 20:32h)" tags ("box", "simple", "unicode") sample @@ -3429,9 +3252,6 @@ BOX ansi-double author "chorpler" designer "(public domain)" -created "November 21, 2023 (Tuesday, 20:32h)" -revision "1.0" -revdate "November 21, 2023 (Tuesday, 20:32h)" tags ("box", "simple", "unicode") sample @@ -3471,9 +3291,6 @@ BOX ansi-heavy author "chorpler" designer "(public domain)" -created "November 21, 2023 (Tuesday, 20:32h)" -revision "1.0" -revdate "November 21, 2023 (Tuesday, 20:32h)" tags ("box", "simple", "unicode") sample @@ -3513,9 +3330,6 @@ BOX ansi-heavy-dashed author "chorpler" designer "(public domain)" -created "November 21, 2023 (Tuesday, 20:32h)" -revision "1.0" -revdate "November 21, 2023 (Tuesday, 20:32h)" tags ("box", "simple", "unicode") sample @@ -3555,9 +3369,6 @@ BOX ansi-dashed author "chorpler" designer "(public domain)" -created "November 21, 2023 (Tuesday, 20:32h)" -revision "1.0" -revdate "November 21, 2023 (Tuesday, 20:32h)" tags ("box", "simple", "unicode") sample @@ -3597,9 +3408,6 @@ BOX ansi-rounded-dashed author "chorpler" designer "(public domain)" -created "November 21, 2023 (Tuesday, 20:32h)" -revision "1.0" -revdate "November 21, 2023 (Tuesday, 20:32h)" tags ("box", "simple", "unicode") sample @@ -3639,9 +3447,6 @@ BOX dragon author "Thomas Jensen" designer "Glory Py Yip (Glory Moon)" -revdate "Sun Dec 17 20:35:00 CET 2023" -created "Sun Dec 17 20:35:00 CET 2023" -revision "1.0" tags ("artwork") sample diff --git a/boxes.vim b/boxes.vim index 6170c84f..72b3d115 100644 --- a/boxes.vim +++ b/boxes.vim @@ -40,7 +40,7 @@ syntax iskeyword a-z,A-Z " " Key Words " -syntax keyword boxesClassicKeywords author designer revision created revdate tags indent +syntax keyword boxesClassicKeywords author designer tags indent syntax keyword boxesBlocks elastic replace reverse padding shapes syntax keyword boxesRegStuff with to once global syntax keyword boxesParent parent skipwhite nextgroup=boxesParentPath,boxesParentGlobal diff --git a/src/boxes.c b/src/boxes.c index 923bdc82..0dbd25db 100644 --- a/src/boxes.c +++ b/src/boxes.c @@ -95,8 +95,6 @@ static int build_design(design_t **adesigns, const char *cld) dp->name = ""; dp->aliases = (char **) calloc(1, sizeof(char *)); - dp->created = bxs_from_ascii("now"); - dp->revision = "1.0"; dp->sample = bxs_from_ascii("n/a"); dp->indentmode = DEF_INDENTMODE; dp->padding[BLEF] = 1; diff --git a/src/boxes.in.h b/src/boxes.in.h index 6ab74b71..a11aa280 100644 --- a/src/boxes.in.h +++ b/src/boxes.in.h @@ -111,9 +111,6 @@ typedef struct { char **aliases; /* zero-terminated array of alias names of the design */ bxstr_t *author; /* creator of the configuration file entry */ bxstr_t *designer; /* creator of the original ASCII artwork */ - bxstr_t *created; /* date created, free format */ - char *revision; /* revision number of design */ - bxstr_t *revdate; /* date of current revision */ bxstr_t *sample; /* the complete sample block in one string */ char indentmode; /* 'b', 't', or 'n' */ sentry_t shape[NUM_SHAPES]; diff --git a/src/lexer.l b/src/lexer.l index 2e4b9c3f..ebb0eae2 100644 --- a/src/lexer.l +++ b/src/lexer.l @@ -364,7 +364,7 @@ PFILENAME [^\r\n]+ } -author|designer|created|revision|revdate|indent { +author|designer|indent { /* * general key words */ diff --git a/src/list.c b/src/list.c index 5dbdf6a5..3429331f 100644 --- a/src/list.c +++ b/src/list.c @@ -215,14 +215,6 @@ static void print_design_details(design_t *d) d->author ? bxs_to_output(d->author) : "(unknown author)", opt.eol); fprintf(opt.outfile, "Original Designer: %s%s", d->designer ? bxs_to_output(d->designer) : "(unknown artist)", opt.eol); - fprintf(opt.outfile, "Creation Date: %s%s", - d->created ? bxs_to_output(d->created) : "(unknown)", opt.eol); - - fprintf(opt.outfile, "Current Revision: %s%s%s%s", - d->revision ? d->revision : "", - d->revision && d->revdate ? " as of " : "", - d->revdate ? bxs_to_output(d->revdate) : (d->revision ? "" : "(unknown)"), opt.eol); - fprintf(opt.outfile, "Configuration File: %s%s", bxs_to_output(d->defined_in), opt.eol); fprintf(opt.outfile, "Indentation Mode: "); diff --git a/src/parsecode.c b/src/parsecode.c index 55c0927e..41d07023 100644 --- a/src/parsecode.c +++ b/src/parsecode.c @@ -42,8 +42,6 @@ static pcre2_code *eol_pattern = NULL; -static pcre2_code *semver_pattern = NULL; - static int check_sizes(pass_to_bison *bison_args) @@ -277,9 +275,6 @@ void recover(pass_to_bison *bison_args) BFREE(curdes.author); BFREE(curdes.aliases); BFREE(curdes.designer); - BFREE(curdes.created); - BFREE(curdes.revision); - BFREE(curdes.revdate); BFREE(curdes.sample); BFREE(curdes.tags); init_design(bison_args, &(curdes)); @@ -750,18 +745,6 @@ int action_add_design(pass_to_bison *bison_args, char *design_primary_name, char -static int is_semantic_version(char *version) -{ - if (semver_pattern == NULL) { - /* Not a strict semver, "1" or "1.0" are accepted. */ - semver_pattern = compile_pattern( - "^(0|[1-9]\\d*)(?:\\.(0|[1-9]\\d*))?(?:\\.(0|[1-9]\\d*))?(?:[+-][a-zA-Z0-9\\.+-]+)?$"); - } - return regex_match(semver_pattern, version); -} - - - int action_record_keyword(pass_to_bison *bison_args, char *keyword, bxstr_t *value) { #ifdef PARSER_DEBUG @@ -788,33 +771,6 @@ int action_record_keyword(pass_to_bison *bison_args, char *keyword, bxstr_t *val return RC_ABORT; } } - else if (strcasecmp(keyword, "revision") == 0) { - if (is_semantic_version(value->ascii)) { - curdes.revision = (char *) strdup(value->ascii); - if (curdes.revision == NULL) { - perror(PROJECT); - return RC_ABORT; - } - } - else { - yyerror(bison_args, "revision is not a version number in line %d of %s", __LINE__, __FILE__); - return RC_ERROR; - } - } - else if (strcasecmp(keyword, "created") == 0) { - curdes.created = bxs_strdup(value); - if (curdes.created == NULL) { - perror(PROJECT); - return RC_ABORT; - } - } - else if (strcasecmp(keyword, "revdate") == 0) { - curdes.revdate = bxs_strdup(value); - if (curdes.revdate == NULL) { - perror(PROJECT); - return RC_ABORT; - } - } else if (strcasecmp(keyword, "tags") == 0) { tag_record(bison_args, value); /* discard return code (we print warnings, but tolerate the problem) */ } diff --git a/test/083_list_design_info.txt b/test/083_list_design_info.txt index f8960e49..7fb543eb 100644 --- a/test/083_list_design_info.txt +++ b/test/083_list_design_info.txt @@ -8,8 +8,6 @@ Complete Design Information for "c": Alias Names: none Author: Thomas Jensen Original Designer: (public domain) -Creation Date: March 18, 1999 (Thursday, 15:25h) -Current Revision: 1.0 as of March 18, 1999 (Thursday, 15:25h) Configuration File: ../boxes-config Indentation Mode: box (indent box) Replacement Rules: 1. (glob) "\*/" WITH "*\\/" diff --git a/test/084_list_design_info_for_cmdline_definition.txt b/test/084_list_design_info_for_cmdline_definition.txt index 294b85e7..a05097b9 100644 --- a/test/084_list_design_info_for_cmdline_definition.txt +++ b/test/084_list_design_info_for_cmdline_definition.txt @@ -8,8 +8,6 @@ Complete Design Information for "": Alias Names: none Author: (unknown author) Original Designer: (unknown artist) -Creation Date: now -Current Revision: 1.0 Configuration File: (command line) Indentation Mode: box (indent box) Replacement Rules: none diff --git a/test/135_design_alias_by_design.txt b/test/135_design_alias_by_design.txt index d109bfdf..fec8f65c 100644 --- a/test/135_design_alias_by_design.txt +++ b/test/135_design_alias_by_design.txt @@ -11,8 +11,6 @@ Complete Design Information for "design": Alias Names: alias1, alias2 Author: (unknown author) Original Designer: (unknown artist) -Creation Date: (unknown) -Current Revision: (unknown) Configuration File: 135_design_alias_by_design.cfg Indentation Mode: box (indent box) Replacement Rules: none diff --git a/test/137_design_alias_no_accumulation.txt b/test/137_design_alias_no_accumulation.txt index 21f011ca..69ae0b6b 100644 --- a/test/137_design_alias_no_accumulation.txt +++ b/test/137_design_alias_no_accumulation.txt @@ -11,8 +11,6 @@ Complete Design Information for "design3": Alias Names: alias3a, alias3b Author: (unknown author) Original Designer: (unknown artist) -Creation Date: (unknown) -Current Revision: (unknown) Configuration File: 137_design_alias_no_accumulation.cfg Indentation Mode: box (indent box) Replacement Rules: none diff --git a/test/156_eol_control_crlf_design_info.txt b/test/156_eol_control_crlf_design_info.txt index 371db99b..ae029b93 100644 --- a/test/156_eol_control_crlf_design_info.txt +++ b/test/156_eol_control_crlf_design_info.txt @@ -20,55 +20,47 @@ s/^.*([0-9a-fA-F]{4}):/0000\1:/ 00000080: 2020 5468 6f6d 6173 204a 656e 7365 6e0d Thomas Jensen. 00000090: 0a4f 7269 6769 6e61 6c20 4465 7369 676e .Original Design 000000a0: 6572 3a20 2020 2020 2028 7075 626c 6963 er: (public -000000b0: 2064 6f6d 6169 6e29 0d0a 4372 6561 7469 domain)..Creati -000000c0: 6f6e 2044 6174 653a 2020 2020 2020 2020 on Date: -000000d0: 2020 4d61 7263 6820 3138 2c20 3139 3939 March 18, 1999 -000000e0: 2028 5468 7572 7364 6179 2c20 3135 3a32 (Thursday, 15:2 -000000f0: 3568 290d 0a43 7572 7265 6e74 2052 6576 5h)..Current Rev -00000100: 6973 696f 6e3a 2020 2020 2020 2031 2e30 ision: 1.0 -00000110: 2061 7320 6f66 204d 6172 6368 2031 382c as of March 18, -00000120: 2031 3939 3920 2854 6875 7273 6461 792c 1999 (Thursday, -00000130: 2031 353a 3235 6829 0d0a 436f 6e66 6967 15:25h)..Config -00000140: 7572 6174 696f 6e20 4669 6c65 3a20 2020 uration File: -00000150: 2020 2e2e 2f62 6f78 6573 2d63 6f6e 6669 ../boxes-confi -00000160: 670d 0a49 6e64 656e 7461 7469 6f6e 204d g..Indentation M -00000170: 6f64 653a 2020 2020 2020 2062 6f78 2028 ode: box ( -00000180: 696e 6465 6e74 2062 6f78 290d 0a52 6570 indent box)..Rep -00000190: 6c61 6365 6d65 6e74 2052 756c 6573 3a20 lacement Rules: -000001a0: 2020 2020 2031 2e20 2867 6c6f 6229 2022 1. (glob) " -000001b0: 5c2a 2f22 2057 4954 4820 222a 5c5c 2f22 \*/" WITH "*\\/" -000001c0: 0d0a 5265 7665 7273 696f 6e20 5275 6c65 ..Reversion Rule -000001d0: 733a 2020 2020 2020 2020 312e 2028 676c s: 1. (gl -000001e0: 6f62 2920 225c 2a5c 5c2f 2220 544f 2022 ob) "\*\\/" TO " -000001f0: 2a2f 220d 0a4d 696e 696d 756d 2042 6f78 */"..Minimum Box -00000200: 2044 696d 656e 7369 6f6e 733a 2035 2078 Dimensions: 5 x -00000210: 2033 2020 2877 6964 7468 2078 2068 6569 3 (width x hei -00000220: 6768 7429 0d0a 4465 6661 756c 7420 5061 ght)..Default Pa -00000230: 6464 696e 673a 2020 2020 2020 2020 6c65 dding: le -00000240: 6674 2031 2c20 7269 6768 7420 310d 0a44 ft 1, right 1..D -00000250: 6566 6175 6c74 204b 696c 6c62 6c61 6e6b efault Killblank -00000260: 3a20 2020 2020 2079 6573 0d0a 5461 6773 : yes..Tags -00000270: 3a20 2020 2020 2020 2020 2020 2020 2020 : -00000280: 2020 2020 7369 6d70 6c65 2c20 7072 6f67 simple, prog -00000290: 7261 6d6d 696e 672c 2062 6f78 0d0a 456c ramming, box..El -000002a0: 6173 7469 6320 5368 6170 6573 3a20 2020 astic Shapes: -000002b0: 2020 2020 2020 4e2c 2045 2c20 532c 2057 N, E, S, W -000002c0: 0d0a 4465 6669 6e65 6420 5368 6170 6573 ..Defined Shapes -000002d0: 3a20 2020 2020 2020 2020 204e 573a 2022 : NW: " -000002e0: 2f2a 2220 0d0a 2020 2020 2020 2020 2020 /*" .. -000002f0: 2020 2020 2020 2020 2020 2020 2020 2020 -00000300: 4e3a 2022 2a22 200d 0a20 2020 2020 2020 N: "*" .. -00000310: 2020 2020 2020 2020 2020 2020 2020 2020 -00000320: 2020 4e45 3a20 222a 2f22 200d 0a20 2020 NE: "*/" .. -00000330: 2020 2020 2020 2020 2020 2020 2020 2020 -00000340: 2020 2020 2020 2045 3a20 222a 2f22 200d E: "*/" . -00000350: 0a20 2020 2020 2020 2020 2020 2020 2020 . -00000360: 2020 2020 2020 2020 2020 5345 3a20 222a SE: "* -00000370: 2f22 200d 0a20 2020 2020 2020 2020 2020 /" .. -00000380: 2020 2020 2020 2020 2020 2020 2020 2053 S -00000390: 3a20 222a 2220 0d0a 2020 2020 2020 2020 : "*" .. -000003a0: 2020 2020 2020 2020 2020 2020 2020 2020 -000003b0: 2053 573a 2022 2f2a 2220 0d0a 2020 2020 SW: "/*" .. -000003c0: 2020 2020 2020 2020 2020 2020 2020 2020 -000003d0: 2020 2020 2020 573a 2022 2f2a 2220 0d0a W: "/*" .. +000000b0: 2064 6f6d 6169 6e29 0d0a 436f 6e66 6967 domain)..Config +000000c0: 7572 6174 696f 6e20 4669 6c65 3a20 2020 uration File: +000000d0: 2020 2e2e 2f62 6f78 6573 2d63 6f6e 6669 ../boxes-confi +000000e0: 670d 0a49 6e64 656e 7461 7469 6f6e 204d g..Indentation M +000000f0: 6f64 653a 2020 2020 2020 2062 6f78 2028 ode: box ( +00000100: 696e 6465 6e74 2062 6f78 290d 0a52 6570 indent box)..Rep +00000110: 6c61 6365 6d65 6e74 2052 756c 6573 3a20 lacement Rules: +00000120: 2020 2020 2031 2e20 2867 6c6f 6229 2022 1. (glob) " +00000130: 5c2a 2f22 2057 4954 4820 222a 5c5c 2f22 \*/" WITH "*\\/" +00000140: 0d0a 5265 7665 7273 696f 6e20 5275 6c65 ..Reversion Rule +00000150: 733a 2020 2020 2020 2020 312e 2028 676c s: 1. (gl +00000160: 6f62 2920 225c 2a5c 5c2f 2220 544f 2022 ob) "\*\\/" TO " +00000170: 2a2f 220d 0a4d 696e 696d 756d 2042 6f78 */"..Minimum Box +00000180: 2044 696d 656e 7369 6f6e 733a 2035 2078 Dimensions: 5 x +00000190: 2033 2020 2877 6964 7468 2078 2068 6569 3 (width x hei +000001a0: 6768 7429 0d0a 4465 6661 756c 7420 5061 ght)..Default Pa +000001b0: 6464 696e 673a 2020 2020 2020 2020 6c65 dding: le +000001c0: 6674 2031 2c20 7269 6768 7420 310d 0a44 ft 1, right 1..D +000001d0: 6566 6175 6c74 204b 696c 6c62 6c61 6e6b efault Killblank +000001e0: 3a20 2020 2020 2079 6573 0d0a 5461 6773 : yes..Tags +000001f0: 3a20 2020 2020 2020 2020 2020 2020 2020 : +00000200: 2020 2020 7369 6d70 6c65 2c20 7072 6f67 simple, prog +00000210: 7261 6d6d 696e 672c 2062 6f78 0d0a 456c ramming, box..El +00000220: 6173 7469 6320 5368 6170 6573 3a20 2020 astic Shapes: +00000230: 2020 2020 2020 4e2c 2045 2c20 532c 2057 N, E, S, W +00000240: 0d0a 4465 6669 6e65 6420 5368 6170 6573 ..Defined Shapes +00000250: 3a20 2020 2020 2020 2020 204e 573a 2022 : NW: " +00000260: 2f2a 2220 0d0a 2020 2020 2020 2020 2020 /*" .. +00000270: 2020 2020 2020 2020 2020 2020 2020 2020 +00000280: 4e3a 2022 2a22 200d 0a20 2020 2020 2020 N: "*" .. +00000290: 2020 2020 2020 2020 2020 2020 2020 2020 +000002a0: 2020 4e45 3a20 222a 2f22 200d 0a20 2020 NE: "*/" .. +000002b0: 2020 2020 2020 2020 2020 2020 2020 2020 +000002c0: 2020 2020 2020 2045 3a20 222a 2f22 200d E: "*/" . +000002d0: 0a20 2020 2020 2020 2020 2020 2020 2020 . +000002e0: 2020 2020 2020 2020 2020 5345 3a20 222a SE: "* +000002f0: 2f22 200d 0a20 2020 2020 2020 2020 2020 /" .. +00000300: 2020 2020 2020 2020 2020 2020 2020 2053 S +00000310: 3a20 222a 2220 0d0a 2020 2020 2020 2020 : "*" .. +00000320: 2020 2020 2020 2020 2020 2020 2020 2020 +00000330: 2053 573a 2022 2f2a 2220 0d0a 2020 2020 SW: "/*" .. +00000340: 2020 2020 2020 2020 2020 2020 2020 2020 +00000350: 2020 2020 2020 573a 2022 2f2a 2220 0d0a W: "/*" .. :EOF diff --git a/test/157_eol_control_lf_design_info.txt b/test/157_eol_control_lf_design_info.txt index 5ae6d5b7..e321886a 100644 --- a/test/157_eol_control_lf_design_info.txt +++ b/test/157_eol_control_lf_design_info.txt @@ -20,54 +20,46 @@ s/^.*([0-9a-fA-F]{4}):/0000\1:/ 00000080: 686f 6d61 7320 4a65 6e73 656e 0a4f 7269 homas Jensen.Ori 00000090: 6769 6e61 6c20 4465 7369 676e 6572 3a20 ginal Designer: 000000a0: 2020 2020 2028 7075 626c 6963 2064 6f6d (public dom -000000b0: 6169 6e29 0a43 7265 6174 696f 6e20 4461 ain).Creation Da -000000c0: 7465 3a20 2020 2020 2020 2020 204d 6172 te: Mar -000000d0: 6368 2031 382c 2031 3939 3920 2854 6875 ch 18, 1999 (Thu -000000e0: 7273 6461 792c 2031 353a 3235 6829 0a43 rsday, 15:25h).C -000000f0: 7572 7265 6e74 2052 6576 6973 696f 6e3a urrent Revision: -00000100: 2020 2020 2020 2031 2e30 2061 7320 6f66 1.0 as of -00000110: 204d 6172 6368 2031 382c 2031 3939 3920 March 18, 1999 -00000120: 2854 6875 7273 6461 792c 2031 353a 3235 (Thursday, 15:25 -00000130: 6829 0a43 6f6e 6669 6775 7261 7469 6f6e h).Configuration -00000140: 2046 696c 653a 2020 2020 202e 2e2f 626f File: ../bo -00000150: 7865 732d 636f 6e66 6967 0a49 6e64 656e xes-config.Inden -00000160: 7461 7469 6f6e 204d 6f64 653a 2020 2020 tation Mode: -00000170: 2020 2062 6f78 2028 696e 6465 6e74 2062 box (indent b -00000180: 6f78 290a 5265 706c 6163 656d 656e 7420 ox).Replacement -00000190: 5275 6c65 733a 2020 2020 2020 312e 2028 Rules: 1. ( -000001a0: 676c 6f62 2920 225c 2a2f 2220 5749 5448 glob) "\*/" WITH -000001b0: 2022 2a5c 5c2f 220a 5265 7665 7273 696f "*\\/".Reversio -000001c0: 6e20 5275 6c65 733a 2020 2020 2020 2020 n Rules: -000001d0: 312e 2028 676c 6f62 2920 225c 2a5c 5c2f 1. (glob) "\*\\/ -000001e0: 2220 544f 2022 2a2f 220a 4d69 6e69 6d75 " TO "*/".Minimu -000001f0: 6d20 426f 7820 4469 6d65 6e73 696f 6e73 m Box Dimensions -00000200: 3a20 3520 7820 3320 2028 7769 6474 6820 : 5 x 3 (width -00000210: 7820 6865 6967 6874 290a 4465 6661 756c x height).Defaul -00000220: 7420 5061 6464 696e 673a 2020 2020 2020 t Padding: -00000230: 2020 6c65 6674 2031 2c20 7269 6768 7420 left 1, right -00000240: 310a 4465 6661 756c 7420 4b69 6c6c 626c 1.Default Killbl -00000250: 616e 6b3a 2020 2020 2020 7965 730a 5461 ank: yes.Ta -00000260: 6773 3a20 2020 2020 2020 2020 2020 2020 gs: -00000270: 2020 2020 2020 7369 6d70 6c65 2c20 7072 simple, pr -00000280: 6f67 7261 6d6d 696e 672c 2062 6f78 0a45 ogramming, box.E -00000290: 6c61 7374 6963 2053 6861 7065 733a 2020 lastic Shapes: -000002a0: 2020 2020 2020 204e 2c20 452c 2053 2c20 N, E, S, -000002b0: 570a 4465 6669 6e65 6420 5368 6170 6573 W.Defined Shapes -000002c0: 3a20 2020 2020 2020 2020 204e 573a 2022 : NW: " -000002d0: 2f2a 2220 0a20 2020 2020 2020 2020 2020 /*" . -000002e0: 2020 2020 2020 2020 2020 2020 2020 204e N -000002f0: 3a20 222a 2220 0a20 2020 2020 2020 2020 : "*" . -00000300: 2020 2020 2020 2020 2020 2020 2020 2020 -00000310: 4e45 3a20 222a 2f22 200a 2020 2020 2020 NE: "*/" . -00000320: 2020 2020 2020 2020 2020 2020 2020 2020 -00000330: 2020 2020 453a 2022 2a2f 2220 0a20 2020 E: "*/" . -00000340: 2020 2020 2020 2020 2020 2020 2020 2020 -00000350: 2020 2020 2020 5345 3a20 222a 2f22 200a SE: "*/" . -00000360: 2020 2020 2020 2020 2020 2020 2020 2020 -00000370: 2020 2020 2020 2020 2020 533a 2022 2a22 S: "*" -00000380: 200a 2020 2020 2020 2020 2020 2020 2020 . -00000390: 2020 2020 2020 2020 2020 2053 573a 2022 SW: " -000003a0: 2f2a 2220 0a20 2020 2020 2020 2020 2020 /*" . -000003b0: 2020 2020 2020 2020 2020 2020 2020 2057 W -000003c0: 3a20 222f 2a22 200a : "/*" . +000000b0: 6169 6e29 0a43 6f6e 6669 6775 7261 7469 ain).Configurati +000000c0: 6f6e 2046 696c 653a 2020 2020 202e 2e2f on File: ../ +000000d0: 626f 7865 732d 636f 6e66 6967 0a49 6e64 boxes-config.Ind +000000e0: 656e 7461 7469 6f6e 204d 6f64 653a 2020 entation Mode: +000000f0: 2020 2020 2062 6f78 2028 696e 6465 6e74 box (indent +00000100: 2062 6f78 290a 5265 706c 6163 656d 656e box).Replacemen +00000110: 7420 5275 6c65 733a 2020 2020 2020 312e t Rules: 1. +00000120: 2028 676c 6f62 2920 225c 2a2f 2220 5749 (glob) "\*/" WI +00000130: 5448 2022 2a5c 5c2f 220a 5265 7665 7273 TH "*\\/".Revers +00000140: 696f 6e20 5275 6c65 733a 2020 2020 2020 ion Rules: +00000150: 2020 312e 2028 676c 6f62 2920 225c 2a5c 1. (glob) "\*\ +00000160: 5c2f 2220 544f 2022 2a2f 220a 4d69 6e69 \/" TO "*/".Mini +00000170: 6d75 6d20 426f 7820 4469 6d65 6e73 696f mum Box Dimensio +00000180: 6e73 3a20 3520 7820 3320 2028 7769 6474 ns: 5 x 3 (widt +00000190: 6820 7820 6865 6967 6874 290a 4465 6661 h x height).Defa +000001a0: 756c 7420 5061 6464 696e 673a 2020 2020 ult Padding: +000001b0: 2020 2020 6c65 6674 2031 2c20 7269 6768 left 1, righ +000001c0: 7420 310a 4465 6661 756c 7420 4b69 6c6c t 1.Default Kill +000001d0: 626c 616e 6b3a 2020 2020 2020 7965 730a blank: yes. +000001e0: 5461 6773 3a20 2020 2020 2020 2020 2020 Tags: +000001f0: 2020 2020 2020 2020 7369 6d70 6c65 2c20 simple, +00000200: 7072 6f67 7261 6d6d 696e 672c 2062 6f78 programming, box +00000210: 0a45 6c61 7374 6963 2053 6861 7065 733a .Elastic Shapes: +00000220: 2020 2020 2020 2020 204e 2c20 452c 2053 N, E, S +00000230: 2c20 570a 4465 6669 6e65 6420 5368 6170 , W.Defined Shap +00000240: 6573 3a20 2020 2020 2020 2020 204e 573a es: NW: +00000250: 2022 2f2a 2220 0a20 2020 2020 2020 2020 "/*" . +00000260: 2020 2020 2020 2020 2020 2020 2020 2020 +00000270: 204e 3a20 222a 2220 0a20 2020 2020 2020 N: "*" . +00000280: 2020 2020 2020 2020 2020 2020 2020 2020 +00000290: 2020 4e45 3a20 222a 2f22 200a 2020 2020 NE: "*/" . +000002a0: 2020 2020 2020 2020 2020 2020 2020 2020 +000002b0: 2020 2020 2020 453a 2022 2a2f 2220 0a20 E: "*/" . +000002c0: 2020 2020 2020 2020 2020 2020 2020 2020 +000002d0: 2020 2020 2020 2020 5345 3a20 222a 2f22 SE: "*/" +000002e0: 200a 2020 2020 2020 2020 2020 2020 2020 . +000002f0: 2020 2020 2020 2020 2020 2020 533a 2022 S: " +00000300: 2a22 200a 2020 2020 2020 2020 2020 2020 *" . +00000310: 2020 2020 2020 2020 2020 2020 2053 573a SW: +00000320: 2022 2f2a 2220 0a20 2020 2020 2020 2020 "/*" . +00000330: 2020 2020 2020 2020 2020 2020 2020 2020 +00000340: 2057 3a20 222f 2a22 200a W: "/*" . :EOF diff --git a/test/165_design_alias_parent_override.txt b/test/165_design_alias_parent_override.txt index 4b0325bb..0a1cf6fb 100644 --- a/test/165_design_alias_parent_override.txt +++ b/test/165_design_alias_parent_override.txt @@ -12,8 +12,6 @@ Complete Design Information for "designA": Alias Names: alias1, alias3 Author: (unknown author) Original Designer: (unknown artist) -Creation Date: (unknown) -Current Revision: (unknown) Configuration File: 165_design_alias_parent_override.cfg Indentation Mode: box (indent box) Replacement Rules: none diff --git a/test/168_parent_keyword_in_sample_ok.txt b/test/168_parent_keyword_in_sample_ok.txt index 820de644..59a01ef2 100644 --- a/test/168_parent_keyword_in_sample_ok.txt +++ b/test/168_parent_keyword_in_sample_ok.txt @@ -12,8 +12,6 @@ Complete Design Information for "designB": Alias Names: none Author: (unknown author) Original Designer: (unknown artist) -Creation Date: (unknown) -Current Revision: (unknown) Configuration File: 168_parent_keyword_in_sample_ok.cfg Indentation Mode: box (indent box) Replacement Rules: none diff --git a/test/175_utf8_happy_design_info.txt b/test/175_utf8_happy_design_info.txt index b71b9f7e..a02088c6 100644 --- a/test/175_utf8_happy_design_info.txt +++ b/test/175_utf8_happy_design_info.txt @@ -8,8 +8,6 @@ Complete Design Information for "designA": Alias Names: none Author: 沐宸 Original Designer: John Doe -Creation Date: (unknown) -Current Revision: (unknown) Configuration File: 175_utf8_happy_design_info.cfg Indentation Mode: box (indent box) Replacement Rules: 1. (glob) "ä" WITH "ö" diff --git a/test/test-config-unused.cfg b/test/test-config-unused.cfg index c62ea375..37f6d3da 100644 --- a/test/test-config-unused.cfg +++ b/test/test-config-unused.cfg @@ -58,9 +58,6 @@ BOX retest author "Thomas Jensen" designer "Thomas Jensen" -revision "1.1" -revdate "August 18, 1999 (Wednesday, 17:07h)" -created "April 04, 1999 (Sunday, 18:00h)" sample regular expression test