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): fix indentation



details:   https://anonhg.NetBSD.org/src/rev/30abbbe508d0
branches:  trunk
changeset: 977169:30abbbe508d0
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Oct 17 17:47:14 2020 +0000

description:
make(1): fix indentation

diffstat:

 usr.bin/make/cond.c  |   8 ++--
 usr.bin/make/dir.c   |  12 ++++----
 usr.bin/make/lst.c   |   6 ++--
 usr.bin/make/make.c  |   6 ++--
 usr.bin/make/parse.c |  74 ++++++++++++++++++++++++++--------------------------
 usr.bin/make/suff.c  |  10 +++---
 usr.bin/make/var.c   |  30 ++++++++++----------
 7 files changed, 73 insertions(+), 73 deletions(-)

diffs (truncated from 456 to 300 lines):

diff -r 44d35ed079b5 -r 30abbbe508d0 usr.bin/make/cond.c
--- a/usr.bin/make/cond.c       Sat Oct 17 17:23:22 2020 +0000
+++ b/usr.bin/make/cond.c       Sat Oct 17 17:47:14 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cond.c,v 1.162 2020/10/05 19:59:07 rillig Exp $        */
+/*     $NetBSD: cond.c,v 1.163 2020/10/17 17:47:14 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -93,7 +93,7 @@
 #include "dir.h"
 
 /*     "@(#)cond.c     8.2 (Berkeley) 1/2/94"  */
-MAKE_RCSID("$NetBSD: cond.c,v 1.162 2020/10/05 19:59:07 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.163 2020/10/17 17:47:14 rillig Exp $");
 
 /*
  * The parsing of conditional expressions is based on this grammar:
@@ -448,8 +448,8 @@
            parseResult = Var_Parse(&nested_p, VAR_CMD, eflags, &str, freeIt);
            /* TODO: handle errors */
            if (str == var_Error) {
-               if (parseResult & VPR_ANY_MSG)
-                   par->printedError = TRUE;
+               if (parseResult & VPR_ANY_MSG)
+                   par->printedError = TRUE;
                if (*freeIt) {
                    free(*freeIt);
                    *freeIt = NULL;
diff -r 44d35ed079b5 -r 30abbbe508d0 usr.bin/make/dir.c
--- a/usr.bin/make/dir.c        Sat Oct 17 17:23:22 2020 +0000
+++ b/usr.bin/make/dir.c        Sat Oct 17 17:47:14 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dir.c,v 1.161 2020/10/05 22:45:47 rillig Exp $ */
+/*     $NetBSD: dir.c,v 1.162 2020/10/17 17:47:14 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -135,7 +135,7 @@
 #include "job.h"
 
 /*     "@(#)dir.c      8.2 (Berkeley) 1/2/94"  */
-MAKE_RCSID("$NetBSD: dir.c,v 1.161 2020/10/05 22:45:47 rillig Exp $");
+MAKE_RCSID("$NetBSD: dir.c,v 1.162 2020/10/17 17:47:14 rillig Exp $");
 
 #define DIR_DEBUG0(text) DEBUG0(DIR, text)
 #define DIR_DEBUG1(fmt, arg1) DEBUG1(DIR, fmt, arg1)
@@ -236,10 +236,10 @@
 {
     CachedDirListNode *ln = odirs->list->first;
     while (ln != NULL) {
-        CachedDirListNode *next = ln->next;
-        CachedDir *dir = ln->datum;
-        Dir_Destroy(dir);      /* removes the dir from odirs->list */
-        ln = next;
+       CachedDirListNode *next = ln->next;
+       CachedDir *dir = ln->datum;
+       Dir_Destroy(dir);       /* removes the dir from odirs->list */
+       ln = next;
     }
     Lst_Free(odirs->list);
     Hash_DeleteTable(&odirs->table);
diff -r 44d35ed079b5 -r 30abbbe508d0 usr.bin/make/lst.c
--- a/usr.bin/make/lst.c        Sat Oct 17 17:23:22 2020 +0000
+++ b/usr.bin/make/lst.c        Sat Oct 17 17:47:14 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lst.c,v 1.74 2020/09/30 06:27:02 rillig Exp $ */
+/* $NetBSD: lst.c,v 1.75 2020/10/17 17:47:14 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -34,7 +34,7 @@
 
 #include "make.h"
 
-MAKE_RCSID("$NetBSD: lst.c,v 1.74 2020/09/30 06:27:02 rillig Exp $");
+MAKE_RCSID("$NetBSD: lst.c,v 1.75 2020/10/17 17:47:14 rillig Exp $");
 
 /* Allocate and initialize a list node.
  *
@@ -313,7 +313,7 @@
 {
     ListNode *node;
     for (node = list->first; node != NULL; node = node->next)
-        proc(node->datum, procData);
+       proc(node->datum, procData);
 }
 
 /* Apply the given function to each element of the given list. The function
diff -r 44d35ed079b5 -r 30abbbe508d0 usr.bin/make/make.c
--- a/usr.bin/make/make.c       Sat Oct 17 17:23:22 2020 +0000
+++ b/usr.bin/make/make.c       Sat Oct 17 17:47:14 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: make.c,v 1.157 2020/10/01 22:42:00 rillig Exp $        */
+/*     $NetBSD: make.c,v 1.158 2020/10/17 17:47:14 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -107,7 +107,7 @@
 #include    "job.h"
 
 /*     "@(#)make.c     8.1 (Berkeley) 6/6/93"  */
-MAKE_RCSID("$NetBSD: make.c,v 1.157 2020/10/01 22:42:00 rillig Exp $");
+MAKE_RCSID("$NetBSD: make.c,v 1.158 2020/10/17 17:47:14 rillig Exp $");
 
 /* Sequence # to detect recursion. */
 static unsigned int checked = 1;
@@ -480,7 +480,7 @@
     GNodeListNode *ln, *nln;
     for (ln = gn->children->first; ln != NULL; ln = nln) {
        nln = ln->next;
-        MakeHandleUse(ln->datum, gn, ln);
+       MakeHandleUse(ln->datum, gn, ln);
     }
 }
 
diff -r 44d35ed079b5 -r 30abbbe508d0 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Sat Oct 17 17:23:22 2020 +0000
+++ b/usr.bin/make/parse.c      Sat Oct 17 17:47:14 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse.c,v 1.372 2020/10/17 17:23:22 rillig Exp $       */
+/*     $NetBSD: parse.c,v 1.373 2020/10/17 17:47:14 rillig Exp $       */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -131,7 +131,7 @@
 #include "pathnames.h"
 
 /*     "@(#)parse.c    8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.372 2020/10/17 17:23:22 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.373 2020/10/17 17:47:14 rillig Exp $");
 
 /* types and constants */
 
@@ -874,7 +874,7 @@
 {
     GNodeListNode *ln;
     for (ln = targets->first; ln != NULL; ln = ln->next)
-        if (!TryApplyDependencyOperator(ln->datum, op))
+       if (!TryApplyDependencyOperator(ln->datum, op))
            break;
 }
 
@@ -1010,14 +1010,14 @@
 ParseDoSrc(GNodeType tOp, const char *src, ParseSpecial specType)
 {
     if (ParseDoSrcKeyword(src, specType))
-        return;
+       return;
 
     if (specType == Main)
-        ParseDoSrcMain(src);
+       ParseDoSrcMain(src);
     else if (specType == Order)
-        ParseDoSrcOrder(src);
+       ParseDoSrcOrder(src);
     else
-        ParseDoSrcOther(src, tOp, specType);
+       ParseDoSrcOther(src, tOp, specType);
 }
 
 /* If we have yet to decide on a main target to make, in the absence of any
@@ -1029,7 +1029,7 @@
     GNodeListNode *ln;
 
     if (mainNode != NULL)
-        return;
+       return;
 
     for (ln = targets->first; ln != NULL; ln = ln->next) {
        GNode *gn = ln->datum;
@@ -1699,13 +1699,13 @@
     curTargs = NULL;
 
     if (!Lst_IsEmpty(targets))
-        ParseDoDependencyCheckSpec(specType);
+       ParseDoDependencyCheckSpec(specType);
 
     /*
      * Have now parsed all the target names. Must parse the operator next.
      */
     if (!ParseDoDependencyParseOp(&cp, lstart, &op))
-        goto out;
+       goto out;
 
     /*
      * Apply the operator to the target. This is how we remember which
@@ -1733,7 +1733,7 @@
      * a .PATH removes all directories from the search path(s).
      */
     if (!*line) {
-        ParseDoDependencySourcesEmpty(specType, paths);
+       ParseDoDependencySourcesEmpty(specType, paths);
     } else if (specType == MFlags) {
        /*
         * Call on functions in main.c to deal with these arguments and
@@ -1760,7 +1760,7 @@
        specType == Includes || specType == Libs ||
        specType == Null || specType == ExObjdir)
     {
-        ParseDoDependencySourcesSpecial(line, cp, specType, paths);
+       ParseDoDependencySourcesSpecial(line, cp, specType, paths);
        if (paths) {
            Lst_Free(paths);
            paths = NULL;
@@ -1769,8 +1769,8 @@
            Dir_SetPATH();
     } else {
        assert(paths == NULL);
-        if (!ParseDoDependencySourcesMundane(line, cp, specType, tOp))
-            goto out;
+       if (!ParseDoDependencySourcesMundane(line, cp, specType, tOp))
+           goto out;
     }
 
     FindMainTarget();
@@ -1827,7 +1827,7 @@
 
        if (ch == ' ' || ch == '\t')
            if (firstSpace == NULL)
-               firstSpace = p - 1;
+               firstSpace = p - 1;
        while (ch == ' ' || ch == '\t')
            ch = *p++;
 
@@ -1877,8 +1877,8 @@
        op--;
 
     } else if (op > name && op[-1] == '?') {
-        op--;
-        type = VAR_DEFAULT;
+       op--;
+       type = VAR_DEFAULT;
 
     } else if (op > name && op[-1] == ':') {
        op--;
@@ -1937,7 +1937,7 @@
     if (type == VAR_APPEND) {
        Var_Append(name, uvalue, ctxt);
     } else if (type == VAR_SUBST) {
-        char *evalue;
+       char *evalue;
        /*
         * Allow variables in the old value to be undefined, but leave their
         * expressions alone -- this is done by forcing oldVars to be false.
@@ -1968,9 +1968,9 @@
 
        Var_Set(name, avalue, ctxt);
     } else if (type == VAR_SHELL) {
-        const char *cmd, *errfmt;
-        char *cmdOut;
-        void *cmd_freeIt = NULL;
+       const char *cmd, *errfmt;
+       char *cmdOut;
+       void *cmd_freeIt = NULL;
 
        cmd = uvalue;
        if (strchr(cmd, '$') != NULL) {
@@ -2979,7 +2979,7 @@
                 */
                cp = line + 1;
              shellCommand:
-               ParseLine_ShellCommand(cp);
+               ParseLine_ShellCommand(cp);
                continue;
            }
 
@@ -3003,7 +3003,7 @@
            }
 #endif
            {
-               VarAssign var;
+               VarAssign var;
                if (Parse_IsVar(line, &var)) {
                    FinishDependencyGroup();
                    Parse_DoVar(&var, VAR_GLOBAL);
@@ -3088,20 +3088,20 @@
             * in which the middle is interpreted as a source, not a target.
             */
            {
-               /* In lint mode, allow undefined variables to appear in
-                * dependency lines.
-                *
-                * Ideally, only the right-hand side would allow undefined
-                * variables since it is common to have no dependencies.
-                * Having undefined variables on the left-hand side is more
-                * unusual though.  Since both sides are expanded in a single
-                * pass, there is not much choice what to do here.
-                *
-                * In normal mode, it does not matter whether undefined
-                * variables are allowed or not since as of 2020-09-14,
-                * Var_Parse does not print any parse errors in such a case.
-                * It simply returns the special empty string var_Error,
-                * which cannot be detected in the result of Var_Subst. */
+               /* In lint mode, allow undefined variables to appear in
+                * dependency lines.
+                *
+                * Ideally, only the right-hand side would allow undefined
+                * variables since it is common to have no dependencies.
+                * Having undefined variables on the left-hand side is more



Home | Main Index | Thread Index | Old Index