RetroBSD
http://retrobsd.org/

support for #comments in files.xxx (config)
http://retrobsd.org/viewtopic.php?f=13&t=38194
Page 1 of 1

Author:  aalm [ Tue May 16, 2017 4:34 pm ]
Post subject:  support for #comments in files.xxx (config)

Hi,

while testing out something, i had to spend +30minutes to figure out this strange omission
being the cause of a broken build..
Now I have something like this:
Code:
diff --git a/usr.sbin/config/mkmakefile.c b/usr.sbin/config/mkmakefile.c
index b7518ee3..d2c755fa 100644
--- a/usr.sbin/config/mkmakefile.c
+++ b/usr.sbin/config/mkmakefile.c
@@ -167,6 +167,8 @@ openit:
        }
 next:
        /*
+        * #<ignored line>
+        *      -OR-
         * filename     [ standard | optional ] [ config-dependent ]
         *      [ dev* | profiling-routine ] [ device-driver]
         *      [ compile-with "compile rule" ]
@@ -191,6 +193,13 @@ next:
        if (wd == 0)
                goto next;
        this = ns(wd);
+       if (*wd == '#') {
+               /*printf("%s: %s", fname, wd);*/
+               while ((wd = get_word(fp)) != 0)
+                       /*printf(" %s"wd)*/;
+               /*printf("\n");*/
+               goto next;
+       }
        next_word(fp, wd);
        if (wd == 0) {
                printf("%s: No type for %s.\n",


And do let me know, if this is the wrong place for these:)

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/