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): indent nonints.h and util.c with tabs ...



details:   https://anonhg.NetBSD.org/src/rev/550863530d81
branches:  trunk
changeset: 979144:550863530d81
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Dec 15 20:39:15 2020 +0000

description:
make(1): indent nonints.h and util.c with tabs instead of spaces

diffstat:

 usr.bin/make/nonints.h |  167 ++++++++++++++++++++++++++----------------------
 usr.bin/make/util.c    |   20 ++--
 2 files changed, 101 insertions(+), 86 deletions(-)

diffs (267 lines):

diff -r 2acc5b4b99c0 -r 550863530d81 usr.bin/make/nonints.h
--- a/usr.bin/make/nonints.h    Tue Dec 15 20:17:08 2020 +0000
+++ b/usr.bin/make/nonints.h    Tue Dec 15 20:39:15 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nonints.h,v 1.171 2020/12/13 20:14:48 rillig Exp $     */
+/*     $NetBSD: nonints.h,v 1.172 2020/12/15 20:39:15 rillig Exp $     */
 
 /*-
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -139,17 +139,17 @@
 void Parse_End(void);
 
 typedef enum VarAssignOp {
-    VAR_NORMAL,                        /* = */
-    VAR_SUBST,                 /* := */
-    VAR_SHELL,                 /* != or :sh= */
-    VAR_APPEND,                        /* += */
-    VAR_DEFAULT                        /* ?= */
+       VAR_NORMAL,             /* = */
+       VAR_SUBST,              /* := */
+       VAR_SHELL,              /* != or :sh= */
+       VAR_APPEND,             /* += */
+       VAR_DEFAULT             /* ?= */
 } VarAssignOp;
 
 typedef struct VarAssign {
-    char *varname;             /* unexpanded */
-    VarAssignOp op;
-    const char *value;         /* unexpanded */
+       char *varname;          /* unexpanded */
+       VarAssignOp op;
+       const char *value;      /* unexpanded */
 } VarAssign;
 
 typedef char *(*ReadMoreProc)(void *, size_t *);
@@ -165,16 +165,17 @@
 
 /* str.c */
 typedef struct Words {
-    char **words;
-    size_t len;
-    void *freeIt;
+       char **words;
+       size_t len;
+       void *freeIt;
 } Words;
 
 Words Str_Words(const char *, Boolean);
 MAKE_INLINE void
-Words_Free(Words w) {
-    free(w.words);
-    free(w.freeIt);
+Words_Free(Words w)
+{
+       free(w.words);
+       free(w.freeIt);
 }
 
 char *str_concat2(const char *, const char *);
@@ -227,40 +228,40 @@
 void Var_End(void);
 
 typedef enum VarEvalFlags {
-    VARE_NONE          = 0,
+       VARE_NONE               = 0,
 
-    /* Expand and evaluate variables during parsing.
-     *
-     * TODO: Document what Var_Parse and Var_Subst return when this flag
-     * is not set. */
-    VARE_WANTRES       = 1 << 0,
+       /* Expand and evaluate variables during parsing.
+        *
+        * TODO: Document what Var_Parse and Var_Subst return when this flag
+        * is not set. */
+       VARE_WANTRES            = 1 << 0,
 
-    /* Treat undefined variables as errors.
-     * Must only be used in combination with VARE_WANTRES. */
-    VARE_UNDEFERR      = 1 << 1,
+       /* Treat undefined variables as errors.
+        * Must only be used in combination with VARE_WANTRES. */
+       VARE_UNDEFERR           = 1 << 1,
 
-    /* Keep '$$' as '$$' instead of reducing it to a single '$'.
-     *
-     * Used in variable assignments using the ':=' operator.  It allows
-     * multiple such assignments to be chained without accidentally expanding
-     * '$$file' to '$file' in the first assignment and interpreting it as
-     * '${f}' followed by 'ile' in the next assignment.
-     *
-     * See also preserveUndefined, which preserves subexpressions that are
-     * based on undefined variables; maybe that can be converted to a flag
-     * as well. */
-    VARE_KEEP_DOLLAR   = 1 << 2
+       /* Keep '$$' as '$$' instead of reducing it to a single '$'.
+        *
+        * Used in variable assignments using the ':=' operator.  It allows
+        * multiple such assignments to be chained without accidentally
+        * expanding '$$file' to '$file' in the first assignment and
+        * interpreting it as '${f}' followed by 'ile' in the next assignment.
+        *
+        * See also preserveUndefined, which preserves subexpressions that are
+        * based on undefined variables; maybe that can be converted to a flag
+        * as well. */
+       VARE_KEEP_DOLLAR        = 1 << 2
 } VarEvalFlags;
 
 typedef enum VarSetFlags {
-    VAR_SET_NONE       = 0,
+       VAR_SET_NONE            = 0,
 
-    /* do not export */
-    VAR_SET_NO_EXPORT  = 1 << 0,
+       /* do not export */
+       VAR_SET_NO_EXPORT       = 1 << 0,
 
-    /* Make the variable read-only. No further modification is possible,
-     * except for another call to Var_Set with the same flag. */
-    VAR_SET_READONLY   = 1 << 1
+       /* Make the variable read-only. No further modification is possible,
+        * except for another call to Var_Set with the same flag. */
+       VAR_SET_READONLY        = 1 << 1
 } VarSetFlags;
 
 /* The state of error handling returned by Var_Parse.
@@ -274,48 +275,62 @@
  * and reporting. */
 typedef enum VarParseResult {
 
-    /* Both parsing and evaluation succeeded. */
-    VPR_OK             = 0x0000,
+       /* Both parsing and evaluation succeeded. */
+       VPR_OK          = 0x0000,
+
+       /* See if a message has already been printed for this error. */
+       VPR_ANY_MSG             = 0x0001,
 
-    /* See if a message has already been printed for this error. */
-    VPR_ANY_MSG                = 0x0001,
+       /*
+        * Parsing failed.
+        * No error message has been printed yet.
+        * Deprecated, migrate to VPR_PARSE_MSG instead.
+        */
+       VPR_PARSE_SILENT        = 0x0002,
 
-    /* Parsing failed.
-     * No error message has been printed yet.
-     * Deprecated, migrate to VPR_PARSE_MSG instead. */
-    VPR_PARSE_SILENT   = 0x0002,
+       /*
+        * Parsing failed.
+        * An error message has already been printed.
+        */
+       VPR_PARSE_MSG   = VPR_PARSE_SILENT | VPR_ANY_MSG,
 
-    /* Parsing failed.
-     * An error message has already been printed. */
-    VPR_PARSE_MSG      = VPR_PARSE_SILENT | VPR_ANY_MSG,
+       /*
+        * Parsing succeeded.
+        * During evaluation, VARE_UNDEFERR was set and there was an undefined
+        * variable.
+        * No error message has been printed yet.
+        * Deprecated, migrate to VPR_UNDEF_MSG instead.
+        */
+       VPR_UNDEF_SILENT        = 0x0004,
 
-    /* Parsing succeeded.
-     * During evaluation, VARE_UNDEFERR was set and there was an undefined
-     * variable.
-     * No error message has been printed yet.
-     * Deprecated, migrate to VPR_UNDEF_MSG instead. */
-    VPR_UNDEF_SILENT   = 0x0004,
-
-    /* Parsing succeeded.
-     * During evaluation, VARE_UNDEFERR was set and there was an undefined
-     * variable.
-     * An error message has already been printed. */
-    VPR_UNDEF_MSG      = VPR_UNDEF_SILENT | VPR_ANY_MSG,
+       /*
+        * Parsing succeeded.
+        * During evaluation, VARE_UNDEFERR was set and there was an undefined
+        * variable.
+        * An error message has already been printed.
+        */
+       VPR_UNDEF_MSG   = VPR_UNDEF_SILENT | VPR_ANY_MSG,
 
-    /* Parsing succeeded.
-     * Evaluation failed.
-     * No error message has been printed yet.
-     * Deprecated, migrate to VPR_EVAL_MSG instead. */
-    VPR_EVAL_SILENT    = 0x0006,
+       /*
+        * Parsing succeeded.
+        * Evaluation failed.
+        * No error message has been printed yet.
+        * Deprecated, migrate to VPR_EVAL_MSG instead.
+        */
+       VPR_EVAL_SILENT = 0x0006,
 
-    /* Parsing succeeded.
-     * Evaluation failed.
-     * An error message has already been printed. */
-    VPR_EVAL_MSG       = VPR_EVAL_SILENT | VPR_ANY_MSG,
+       /*
+        * Parsing succeeded.
+        * Evaluation failed.
+        * An error message has already been printed.
+        */
+       VPR_EVAL_MSG    = VPR_EVAL_SILENT | VPR_ANY_MSG,
 
-    /* The exact error handling status is not known yet.
-     * Deprecated, migrate to VPR_OK or any VPE_*_MSG instead. */
-    VPR_UNKNOWN                = 0x0008
+       /*
+        * The exact error handling status is not known yet.
+        * Deprecated, migrate to VPR_OK or any VPE_*_MSG instead.
+        */
+       VPR_UNKNOWN             = 0x0008
 } VarParseResult;
 
 typedef enum VarExportMode {
diff -r 2acc5b4b99c0 -r 550863530d81 usr.bin/make/util.c
--- a/usr.bin/make/util.c       Tue Dec 15 20:17:08 2020 +0000
+++ b/usr.bin/make/util.c       Tue Dec 15 20:39:15 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: util.c,v 1.71 2020/12/05 17:25:41 rillig Exp $ */
+/*     $NetBSD: util.c,v 1.72 2020/12/15 20:39:15 rillig Exp $ */
 
 /*
  * Missing stuff from OS's
@@ -15,7 +15,7 @@
 
 #include "make.h"
 
-MAKE_RCSID("$NetBSD: util.c,v 1.71 2020/12/05 17:25:41 rillig Exp $");
+MAKE_RCSID("$NetBSD: util.c,v 1.72 2020/12/15 20:39:15 rillig Exp $");
 
 #if !defined(MAKE_NATIVE) && !defined(HAVE_STRERROR)
 extern int errno, sys_nerr;
@@ -332,16 +332,16 @@
 SignalProc
 bmake_signal(int s, SignalProc a)
 {
-    struct sigaction sa, osa;
+       struct sigaction sa, osa;
 
-    sa.sa_handler = a;
-    sigemptyset(&sa.sa_mask);
-    sa.sa_flags = SA_RESTART;
+       sa.sa_handler = a;
+       sigemptyset(&sa.sa_mask);
+       sa.sa_flags = SA_RESTART;
 
-    if (sigaction(s, &sa, &osa) == -1)
-       return SIG_ERR;
-    else
-       return osa.sa_handler;
+       if (sigaction(s, &sa, &osa) == -1)
+               return SIG_ERR;
+       else
+               return osa.sa_handler;
 }
 
 #if !defined(MAKE_NATIVE) && !defined(HAVE_VSNPRINTF)



Home | Main Index | Thread Index | Old Index