From: NeilBrown Date: Fri, 11 Sep 2020 07:53:49 +0000 (+1000) Subject: Rename string.h and number.h headers X-Git-Url: https://ocean-lang.org/code/?p=ocean;a=commitdiff_plain;h=74275b2e557383a028515ca4dacdf07cb4858aa1 Rename string.h and number.h headers Having a "string.h" is potentially confusing as there is a standard So rename it and for consistency, rename number.h too. Signed-off-by: NeilBrown --- diff --git a/csrc/oceani.mdc b/csrc/oceani.mdc index bf66eec..2d17598 100644 --- a/csrc/oceani.mdc +++ b/csrc/oceani.mdc @@ -633,8 +633,8 @@ there are errors. ###### includes #include - #include "string.h" - #include "number.h" + #include "parse_string.h" + #include "parse_number.h" ###### libs myLDLIBS := libnumber.o libstring.o -lgmp diff --git a/csrc/parsergen.mdc b/csrc/parsergen.mdc index c167e09..803d9b6 100644 --- a/csrc/parsergen.mdc +++ b/csrc/parsergen.mdc @@ -3060,7 +3060,7 @@ an error. # calc: header - #include "number.h" + #include "parse_number.h" // what do we use for a demo-grammar? A calculator of course. struct number { mpq_t val; @@ -3080,7 +3080,6 @@ an error. #include #include "mdcode.h" #include "scanner.h" - #include "number.h" #include "parser.h" #include "calc.h" diff --git a/csrc/scanner.mdc b/csrc/scanner.mdc index fcfadca..b57db29 100644 --- a/csrc/scanner.mdc +++ b/csrc/scanner.mdc @@ -1670,7 +1670,7 @@ Number parsing goes in `libnumber.c` ## number includes ## number functions -###### File: number.h +###### File: parse_number.h int number_parse(mpq_t num, char tail[3], struct text tok); ###### File: scanner.mk @@ -1954,7 +1954,7 @@ String parsing goes in `libstring.c` ## string functions ## string main -###### File: string.h +###### File: parse_string.h int string_parse(struct token *tok, char escape, struct text *str, char tail[3]); @@ -1983,8 +1983,8 @@ the tokens one per line. #include #include "mdcode.h" #include "scanner.h" - #include "number.h" - #include "string.h" + #include "parse_number.h" + #include "parse_string.h" static int errs; static void pr_err(char *msg)