Module Name:    src
Committed By:   rillig
Date:           Tue Dec 15 20:39:15 UTC 2020

Modified Files:
        src/usr.bin/make: nonints.h util.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.171 -r1.172 src/usr.bin/make/nonints.h
cvs rdiff -u -r1.71 -r1.72 src/usr.bin/make/util.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/nonints.h
diff -u src/usr.bin/make/nonints.h:1.171 src/usr.bin/make/nonints.h:1.172
--- src/usr.bin/make/nonints.h:1.171	Sun Dec 13 20:14:48 2020
+++ src/usr.bin/make/nonints.h	Tue Dec 15 20:39:15 2020
@@ -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_Init(void);
 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 @@ int Parse_GetFatals(void);
 
 /* 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_Init(void);
 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,
-
-    /* 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
+	/* 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,
+
+	/* 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 @@ typedef enum VarSetFlags {
  * 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.
-     * 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.
-     * 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.
-     * 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
+	/*
+	 * 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 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.
+	 * 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,
+
+	/*
+	 * 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 {

Index: src/usr.bin/make/util.c
diff -u src/usr.bin/make/util.c:1.71 src/usr.bin/make/util.c:1.72
--- src/usr.bin/make/util.c:1.71	Sat Dec  5 17:25:41 2020
+++ src/usr.bin/make/util.c	Tue Dec 15 20:39:15 2020
@@ -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 @@ getwd(char *pathname)
 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;
-
-    if (sigaction(s, &sa, &osa) == -1)
-	return SIG_ERR;
-    else
-	return osa.sa_handler;
+	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 !defined(MAKE_NATIVE) && !defined(HAVE_VSNPRINTF)

Reply via email to