From 453690061035661435407594f2c3d8304671bf7b Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Fri, 10 Jan 2025 19:16:46 -0300 Subject: Replace src/config.h with ; incorporate changes from other projects --- src/config.h.in | 6 ---- src/hash.c | 2 +- src/meta.h.in | 3 ++ src/pindaiba.en.msg | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/pindaiba.h | 1 + src/pindaibabs.en.msg | 76 --------------------------------------------------- src/pindaibabs.h | 1 - src/testing.c | 14 +++------- 8 files changed, 85 insertions(+), 94 deletions(-) delete mode 100644 src/config.h.in create mode 100644 src/meta.h.in create mode 100644 src/pindaiba.en.msg create mode 120000 src/pindaiba.h delete mode 100644 src/pindaibabs.en.msg delete mode 120000 src/pindaibabs.h (limited to 'src') diff --git a/src/config.h.in b/src/config.h.in deleted file mode 100644 index ab2256e..0000000 --- a/src/config.h.in +++ /dev/null @@ -1,6 +0,0 @@ -#define _XOPEN_SOURCE 700 -#define _POSIX_C_SOURCE 200809L -#define VERSION "@VERSION@" -#define DATE "@DATE@" -#define NAME "@NAME@" -#define LOCALEDIR "@LOCALEDIR@" diff --git a/src/hash.c b/src/hash.c index 67b3656..03fc8df 100644 --- a/src/hash.c +++ b/src/hash.c @@ -8,7 +8,7 @@ #include #include -#include +#include #include "hash.h" #include "logerr.h" diff --git a/src/meta.h.in b/src/meta.h.in new file mode 100644 index 0000000..9bd8c08 --- /dev/null +++ b/src/meta.h.in @@ -0,0 +1,3 @@ +#define VERSION "@VERSION@" +#define DATE "@DATE@" +#define NAME "@NAME@" diff --git a/src/pindaiba.en.msg b/src/pindaiba.en.msg new file mode 100644 index 0000000..72c5daa --- /dev/null +++ b/src/pindaiba.en.msg @@ -0,0 +1,76 @@ +0 Usage:\n + +1 pindaibabs -p FILE [-o DIRECTORY]\n + +2 pindaibabs -l FILE [-o DIRECTORY]\n + +3 pindaibabs [-hV]\n + +4 \n + +5 \n + +6 Options:\n + +7 -p FILE parser file to be processed\n + +8 -l FILE lexer file to be processed\n + +9 -o DIRECTORY output where to place the\n + +10 generated files (default .)\n + +11 -h, --help show this help message\n + +12 -V, --version print the version number\n + +13 \n + +14 \n + +15 Run the pindaibabs(1) parser program.\n + +16 \n + +17 Here is the explanation for what it does, and the synopsis\n + +18 of its usage.\n + +19 \n + +20 See "man pindaibabs" for usage information and\n + +21 "man pindaibabs.tutorial" for a beginner introduction.\n + +22 \n + +23 \n + +24 Examples:\n + +25 \n + +26 Do a one-line parser:\n + +27 \n + +28 $ pindaibabs run md.grammar < README.md\n + +29 \n + +30 \n + +31 Compile the grammer:\n + +32 \n + +33 $ pindaibabs build csv.grammar > dunno.alsodunno\n + +34 pindaibabs 0.1.0 1970-01-01\n + +35 Already at max capacity (%ld): %s\n + +36 idx (%ld) is beyond bounds (%ld)\n + +37 pop on an empty vector\n + diff --git a/src/pindaiba.h b/src/pindaiba.h new file mode 120000 index 0000000..a564cc1 --- /dev/null +++ b/src/pindaiba.h @@ -0,0 +1 @@ +lib.h \ No newline at end of file diff --git a/src/pindaibabs.en.msg b/src/pindaibabs.en.msg deleted file mode 100644 index 72c5daa..0000000 --- a/src/pindaibabs.en.msg +++ /dev/null @@ -1,76 +0,0 @@ -0 Usage:\n - -1 pindaibabs -p FILE [-o DIRECTORY]\n - -2 pindaibabs -l FILE [-o DIRECTORY]\n - -3 pindaibabs [-hV]\n - -4 \n - -5 \n - -6 Options:\n - -7 -p FILE parser file to be processed\n - -8 -l FILE lexer file to be processed\n - -9 -o DIRECTORY output where to place the\n - -10 generated files (default .)\n - -11 -h, --help show this help message\n - -12 -V, --version print the version number\n - -13 \n - -14 \n - -15 Run the pindaibabs(1) parser program.\n - -16 \n - -17 Here is the explanation for what it does, and the synopsis\n - -18 of its usage.\n - -19 \n - -20 See "man pindaibabs" for usage information and\n - -21 "man pindaibabs.tutorial" for a beginner introduction.\n - -22 \n - -23 \n - -24 Examples:\n - -25 \n - -26 Do a one-line parser:\n - -27 \n - -28 $ pindaibabs run md.grammar < README.md\n - -29 \n - -30 \n - -31 Compile the grammer:\n - -32 \n - -33 $ pindaibabs build csv.grammar > dunno.alsodunno\n - -34 pindaibabs 0.1.0 1970-01-01\n - -35 Already at max capacity (%ld): %s\n - -36 idx (%ld) is beyond bounds (%ld)\n - -37 pop on an empty vector\n - diff --git a/src/pindaibabs.h b/src/pindaibabs.h deleted file mode 120000 index a564cc1..0000000 --- a/src/pindaibabs.h +++ /dev/null @@ -1 +0,0 @@ -lib.h \ No newline at end of file diff --git a/src/testing.c b/src/testing.c index 917ad45..f3239e0 100644 --- a/src/testing.c +++ b/src/testing.c @@ -11,8 +11,8 @@ #define COLOUR_GREEN "\033[0;32m" #define COLOUR_YELLOW "\033[0;33m" -static const char *const -ENVVAR_NAME = "NO_COLOUR"; +static const char +ENVVAR_NAME[] = "NO_COLOUR"; static bool @@ -24,8 +24,6 @@ show_colour(void) { void test_start(const char *const name) { (void)fprintf(stderr, "%s:\n", name); - - return; } void @@ -33,7 +31,7 @@ testing(const char *const message) { if (show_colour()) { (void)fprintf( stderr, - COLOUR_YELLOW "testing" COLOUR_RESET ": %s...", + COLOUR_YELLOW "testing" COLOUR_RESET ": %s... ", message ); } else { @@ -43,17 +41,13 @@ testing(const char *const message) { message ); } - - return; } void test_ok(void) { if (show_colour()) { - (void)fprintf(stderr, " " COLOUR_GREEN "OK" COLOUR_RESET ".\n"); + (void)fprintf(stderr, COLOUR_GREEN "OK" COLOUR_RESET ".\n"); } else { (void)fprintf(stderr, " OK.\n"); } - - return; } -- cgit v1.2.3