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): use consistent indentation in source code



details:   https://anonhg.NetBSD.org/src/rev/d414d64b9db5
branches:  trunk
changeset: 936670:d414d64b9db5
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Aug 01 14:47:49 2020 +0000

description:
make(1): use consistent indentation in source code

Tabs for multiples of 8, then spaces.

The usage string has been kept as-is since the spaces there are
indentional and do influence the output.

diffstat:

 usr.bin/make/arch.c        |  14 ++++----
 usr.bin/make/compat.c      |  28 ++++++++--------
 usr.bin/make/cond.c        |   8 ++--
 usr.bin/make/dir.c         |  12 +++---
 usr.bin/make/for.c         |  12 +++---
 usr.bin/make/hash.c        |   8 ++--
 usr.bin/make/hash.h        |   6 +-
 usr.bin/make/job.c         |  16 +++++-----
 usr.bin/make/lst.c         |  10 +++---
 usr.bin/make/main.c        |  14 ++++----
 usr.bin/make/make_malloc.h |   4 +-
 usr.bin/make/parse.c       |  18 +++++-----
 usr.bin/make/suff.c        |  14 ++++----
 usr.bin/make/util.c        |  72 +++++++++++++++++++++++-----------------------
 usr.bin/make/var.c         |  12 +++---
 15 files changed, 124 insertions(+), 124 deletions(-)

diffs (truncated from 794 to 300 lines):

diff -r 7d0dfab89b5e -r d414d64b9db5 usr.bin/make/arch.c
--- a/usr.bin/make/arch.c       Sat Aug 01 13:51:40 2020 +0000
+++ b/usr.bin/make/arch.c       Sat Aug 01 14:47:49 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: arch.c,v 1.79 2020/08/01 09:55:00 rillig Exp $ */
+/*     $NetBSD: arch.c,v 1.80 2020/08/01 14:47:49 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: arch.c,v 1.79 2020/08/01 09:55:00 rillig Exp $";
+static char rcsid[] = "$NetBSD: arch.c,v 1.80 2020/08/01 14:47:49 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)arch.c     8.2 (Berkeley) 1/2/94";
 #else
-__RCSID("$NetBSD: arch.c,v 1.79 2020/08/01 09:55:00 rillig Exp $");
+__RCSID("$NetBSD: arch.c,v 1.80 2020/08/01 14:47:49 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -534,7 +534,7 @@
     Hash_Entry   *he;        /* Entry containing member's description */
     struct ar_hdr arh;        /* archive-member header for reading archive */
     char         memName[MAXPATHLEN+1];
-                           /* Current member name while hashing. */
+                           /* Current member name while hashing. */
 
     /*
      * Because of space constraints and similar things, files are archived
@@ -604,7 +604,7 @@
      * can handle...
      */
     if ((fread(magic, SARMAG, 1, arch) != 1) ||
-       (strncmp(magic, ARMAG, SARMAG) != 0)) {
+       (strncmp(magic, ARMAG, SARMAG) != 0)) {
            fclose(arch);
            return NULL;
     }
@@ -786,7 +786,7 @@
            }
        if (DEBUG(ARCH)) {
            fprintf(debug_file, "Found svr4 archive name table with %lu entries\n",
-                   (unsigned long)entry);
+                   (unsigned long)entry);
        }
        return 0;
     }
@@ -862,7 +862,7 @@
      * can handle...
      */
     if ((fread(magic, SARMAG, 1, arch) != 1) ||
-       (strncmp(magic, ARMAG, SARMAG) != 0)) {
+       (strncmp(magic, ARMAG, SARMAG) != 0)) {
            fclose(arch);
            return NULL;
     }
diff -r 7d0dfab89b5e -r d414d64b9db5 usr.bin/make/compat.c
--- a/usr.bin/make/compat.c     Sat Aug 01 13:51:40 2020 +0000
+++ b/usr.bin/make/compat.c     Sat Aug 01 14:47:49 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat.c,v 1.117 2020/08/01 09:55:00 rillig Exp $      */
+/*     $NetBSD: compat.c,v 1.118 2020/08/01 14:47:49 rillig Exp $      */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: compat.c,v 1.117 2020/08/01 09:55:00 rillig Exp $";
+static char rcsid[] = "$NetBSD: compat.c,v 1.118 2020/08/01 14:47:49 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)compat.c   8.2 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: compat.c,v 1.117 2020/08/01 09:55:00 rillig Exp $");
+__RCSID("$NetBSD: compat.c,v 1.118 2020/08/01 14:47:49 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -212,7 +212,7 @@
     char         *cmdStart;    /* Start of expanded command */
     char         *cp, *bp;
     Boolean      silent,       /* Don't print command */
-                 doIt;         /* Execute even if -n */
+                 doIt;         /* Execute even if -n */
     volatile Boolean errCheck;         /* Check errors */
     int          reason;       /* Reason for child's death */
     int                  status;       /* Description of child's death */
@@ -433,18 +433,18 @@
 #endif
                if (status != 0) {
                    if (DEBUG(ERROR)) {
-                       fprintf(debug_file, "\n*** Failed target:  %s\n*** Failed command: ",
+                       fprintf(debug_file, "\n*** Failed target:  %s\n*** Failed command: ",
                            gn->name);
-                       for (cp = cmd; *cp; ) {
-                           if (isspace((unsigned char)*cp)) {
+                       for (cp = cmd; *cp; ) {
+                           if (isspace((unsigned char)*cp)) {
                                fprintf(debug_file, " ");
-                               while (isspace((unsigned char)*cp))
+                               while (isspace((unsigned char)*cp))
                                    cp++;
                            } else {
                                fprintf(debug_file, "%c", *cp);
-                               cp++;
+                               cp++;
                            }
-                       }
+                       }
                        fprintf(debug_file, "\n");
                    }
                    printf("*** Error code %d", status);
@@ -729,10 +729,10 @@
        gn = Targ_FindNode(".BEGIN", TARG_NOCREATE);
        if (gn != NULL) {
            Compat_Make(gn, gn);
-            if (gn->made == ERROR) {
-                PrintOnError(gn, "\nStop.");
-                exit(1);
-            }
+           if (gn->made == ERROR) {
+               PrintOnError(gn, "\nStop.");
+               exit(1);
+           }
        }
     }
 
diff -r 7d0dfab89b5e -r d414d64b9db5 usr.bin/make/cond.c
--- a/usr.bin/make/cond.c       Sat Aug 01 13:51:40 2020 +0000
+++ b/usr.bin/make/cond.c       Sat Aug 01 14:47:49 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cond.c,v 1.84 2020/08/01 09:55:00 rillig Exp $ */
+/*     $NetBSD: cond.c,v 1.85 2020/08/01 14:47:49 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: cond.c,v 1.84 2020/08/01 09:55:00 rillig Exp $";
+static char rcsid[] = "$NetBSD: cond.c,v 1.85 2020/08/01 14:47:49 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)cond.c     8.2 (Berkeley) 1/2/94";
 #else
-__RCSID("$NetBSD: cond.c,v 1.84 2020/08/01 09:55:00 rillig Exp $");
+__RCSID("$NetBSD: cond.c,v 1.85 2020/08/01 14:47:49 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -857,7 +857,7 @@
     static const struct fn_def {
        const char  *fn_name;
        int         fn_name_len;
-        int         (*fn_getarg)(Boolean, char **, char **, const char *);
+       int         (*fn_getarg)(Boolean, char **, char **, const char *);
        Boolean     (*fn_proc)(int, const char *);
     } fn_defs[] = {
        { "defined",   7, CondGetArg, CondDoDefined },
diff -r 7d0dfab89b5e -r d414d64b9db5 usr.bin/make/dir.c
--- a/usr.bin/make/dir.c        Sat Aug 01 13:51:40 2020 +0000
+++ b/usr.bin/make/dir.c        Sat Aug 01 14:47:49 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dir.c,v 1.82 2020/07/31 20:57:38 rillig Exp $  */
+/*     $NetBSD: dir.c,v 1.83 2020/08/01 14:47:49 rillig Exp $  */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: dir.c,v 1.82 2020/07/31 20:57:38 rillig Exp $";
+static char rcsid[] = "$NetBSD: dir.c,v 1.83 2020/08/01 14:47:49 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)dir.c      8.2 (Berkeley) 1/2/94";
 #else
-__RCSID("$NetBSD: dir.c,v 1.82 2020/07/31 20:57:38 rillig Exp $");
+__RCSID("$NetBSD: dir.c,v 1.83 2020/08/01 14:47:49 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -965,7 +965,7 @@
  */
 static char *
 DirLookup(Path *p, const char *name MAKE_ATTR_UNUSED, const char *cp,
-          Boolean hasSlash MAKE_ATTR_UNUSED)
+         Boolean hasSlash MAKE_ATTR_UNUSED)
 {
     char *file;                /* the current filename to check */
 
@@ -1182,7 +1182,7 @@
        p = (Path *)Lst_Datum(ln);
        if (p == dotLast) {
            hasLastDot = TRUE;
-            if (DEBUG(DIR))
+           if (DEBUG(DIR))
                fprintf(debug_file, "[dot last]...");
        }
     }
@@ -1448,7 +1448,7 @@
 
        struct stat st;
        char dirbase[MAXPATHLEN + 1], *db_end;
-        char try[MAXPATHLEN + 1], *try_end;
+       char try[MAXPATHLEN + 1], *try_end;
 
        /* copy out our starting point */
        snprintf(dirbase, sizeof(dirbase), "%s", here);
diff -r 7d0dfab89b5e -r d414d64b9db5 usr.bin/make/for.c
--- a/usr.bin/make/for.c        Sat Aug 01 13:51:40 2020 +0000
+++ b/usr.bin/make/for.c        Sat Aug 01 14:47:49 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: for.c,v 1.57 2020/07/28 16:45:56 rillig Exp $  */
+/*     $NetBSD: for.c,v 1.58 2020/08/01 14:47:49 rillig Exp $  */
 
 /*
  * Copyright (c) 1992, The Regents of the University of California.
@@ -30,14 +30,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: for.c,v 1.57 2020/07/28 16:45:56 rillig Exp $";
+static char rcsid[] = "$NetBSD: for.c,v 1.58 2020/08/01 14:47:49 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)for.c      8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: for.c,v 1.57 2020/07/28 16:45:56 rillig Exp $");
+__RCSID("$NetBSD: for.c,v 1.58 2020/08/01 14:47:49 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -487,9 +487,9 @@
     accumFor = NULL;
 
     if (strlist_num(&arg->items) == 0) {
-        /* Nothing to expand - possibly due to an earlier syntax error. */
-        For_Free(arg);
-        return;
+       /* Nothing to expand - possibly due to an earlier syntax error. */
+       For_Free(arg);
+       return;
     }
 
     Parse_SetInput(NULL, lineno, -1, For_Iterate, arg);
diff -r 7d0dfab89b5e -r d414d64b9db5 usr.bin/make/hash.c
--- a/usr.bin/make/hash.c       Sat Aug 01 13:51:40 2020 +0000
+++ b/usr.bin/make/hash.c       Sat Aug 01 14:47:49 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hash.c,v 1.25 2020/07/20 18:12:48 sjg Exp $    */
+/*     $NetBSD: hash.c,v 1.26 2020/08/01 14:47:49 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: hash.c,v 1.25 2020/07/20 18:12:48 sjg Exp $";
+static char rcsid[] = "$NetBSD: hash.c,v 1.26 2020/08/01 14:47:49 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)hash.c     8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: hash.c,v 1.25 2020/07/20 18:12:48 sjg Exp $");
+__RCSID("$NetBSD: hash.c,v 1.26 2020/08/01 14:47:49 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -476,7 +476,7 @@
 {
        Hash_Entry *e, *next = NULL, **hp, **xp;
        int i, mask;
-        Hash_Entry **oldhp;
+       Hash_Entry **oldhp;
        int oldsize;
 
        oldhp = t->bucketPtr;
diff -r 7d0dfab89b5e -r d414d64b9db5 usr.bin/make/hash.h



Home | Main Index | Thread Index | Old Index