Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make make(1): document enum GetLineMode



details:   https://anonhg.NetBSD.org/src/rev/ba3ea1a7ce7e
branches:  trunk
changeset: 979191:ba3ea1a7ce7e
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Dec 19 12:48:59 2020 +0000

description:
make(1): document enum GetLineMode

diffstat:

 usr.bin/make/parse.c |  26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)

diffs (49 lines):

diff -r ed710ac9c2f7 -r ba3ea1a7ce7e usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Sat Dec 19 12:40:00 2020 +0000
+++ b/usr.bin/make/parse.c      Sat Dec 19 12:48:59 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse.c,v 1.494 2020/12/19 12:24:46 rillig Exp $       */
+/*     $NetBSD: parse.c,v 1.495 2020/12/19 12:48:59 rillig Exp $       */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -117,7 +117,7 @@
 #include "pathnames.h"
 
 /*     "@(#)parse.c    8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.494 2020/12/19 12:24:46 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.495 2020/12/19 12:48:59 rillig Exp $");
 
 /* types and constants */
 
@@ -2790,8 +2790,30 @@
 }
 
 typedef enum GetLineMode {
+       /*
+        * Return the next logical line that is neither empty nor a comment.
+        * Backslash line continuations are folded into a single space.
+        * A trailing comment, if any, is discarded.
+        */
        PARSE_NORMAL,
+
+       /*
+        * Return the next physical line, even if it ends with a backslash.
+        * Comments and empty lines are preserved.
+        *
+        * Used in .for loops to collect the body of the loop while waiting
+        * for the corresponding .endfor.
+        */
        PARSE_RAW,
+
+       /*
+        * Return the next logical line that is a directive.
+        * Backslash line continuations are folded into a single space.
+        * A trailing comment, if any, is discarded.
+        *
+        * Used in .if directives to skip over irrelevant branches while
+        * waiting for the corresponding .endif.
+        */
        PARSE_SKIP
 } GetLineMode;
 



Home | Main Index | Thread Index | Old Index