]> ocean-lang.org Git - ocean/commitdiff
Rename string.h and number.h headers
authorNeilBrown <neil@brown.name>
Fri, 11 Sep 2020 07:53:49 +0000 (17:53 +1000)
committerNeilBrown <neil@brown.name>
Fri, 11 Sep 2020 07:53:49 +0000 (17:53 +1000)
Having a "string.h" is potentially confusing as there
is a standard <string.h>
So rename it and for consistency, rename number.h too.

Signed-off-by: NeilBrown <neil@brown.name>
csrc/oceani.mdc
csrc/parsergen.mdc
csrc/scanner.mdc

index bf66eec5239bfba6de9230258a112d1cfe2d04e2..2d17598658b51ecfb20da1878fd1190f493d3f8a 100644 (file)
@@ -633,8 +633,8 @@ there are errors.
 
 ###### includes
        #include <gmp.h>
-       #include "string.h"
-       #include "number.h"
+       #include "parse_string.h"
+       #include "parse_number.h"
 
 ###### libs
        myLDLIBS := libnumber.o libstring.o -lgmp
index c167e0967cddac00f2fe937027ff3165b45f37bd..803d9b6e87e0d21ac7029617bd7b8fa79c292cff 100644 (file)
@@ -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 <string.h>
        #include "mdcode.h"
        #include "scanner.h"
-       #include "number.h"
        #include "parser.h"
 
        #include "calc.h"
index fcfadca97c7803ede6422d5bc6e06493691f58d3..b57db29c0b38fcefead7e0cc4cafb41494d1264e 100644 (file)
@@ -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 <getopt.h>
        #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)