Wed Nov 4 06:09:55 2020 UTC ()
make(1): fix indentation in parse.c


(rillig)
diff -r1.424 -r1.425 src/usr.bin/make/parse.c

cvs diff -r1.424 -r1.425 src/usr.bin/make/parse.c (expand / switch to unified diff)

--- src/usr.bin/make/parse.c 2020/11/04 04:49:32 1.424
+++ src/usr.bin/make/parse.c 2020/11/04 06:09:55 1.425
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: parse.c,v 1.424 2020/11/04 04:49:32 rillig Exp $ */ 1/* $NetBSD: parse.c,v 1.425 2020/11/04 06:09:55 rillig Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1988, 1989, 1990, 1993 4 * Copyright (c) 1988, 1989, 1990, 1993
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to Berkeley by 7 * This code is derived from software contributed to Berkeley by
8 * Adam de Boor. 8 * Adam de Boor.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -107,27 +107,27 @@ @@ -107,27 +107,27 @@
107#ifndef MAP_FILE 107#ifndef MAP_FILE
108#define MAP_FILE 0 108#define MAP_FILE 0
109#endif 109#endif
110#ifndef MAP_COPY 110#ifndef MAP_COPY
111#define MAP_COPY MAP_PRIVATE 111#define MAP_COPY MAP_PRIVATE
112#endif 112#endif
113 113
114#include "make.h" 114#include "make.h"
115#include "dir.h" 115#include "dir.h"
116#include "job.h" 116#include "job.h"
117#include "pathnames.h" 117#include "pathnames.h"
118 118
119/* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */ 119/* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */
120MAKE_RCSID("$NetBSD: parse.c,v 1.424 2020/11/04 04:49:32 rillig Exp $"); 120MAKE_RCSID("$NetBSD: parse.c,v 1.425 2020/11/04 06:09:55 rillig Exp $");
121 121
122/* types and constants */ 122/* types and constants */
123 123
124/* 124/*
125 * Structure for a file being read ("included file") 125 * Structure for a file being read ("included file")
126 */ 126 */
127typedef struct IFile { 127typedef struct IFile {
128 char *fname; /* name of file */ 128 char *fname; /* name of file */
129 Boolean fromForLoop; /* simulated .include by the .for loop */ 129 Boolean fromForLoop; /* simulated .include by the .for loop */
130 int lineno; /* current line number in file */ 130 int lineno; /* current line number in file */
131 int first_lineno; /* line number of start of text */ 131 int first_lineno; /* line number of start of text */
132 unsigned int cond_depth; /* 'if' nesting when file opened */ 132 unsigned int cond_depth; /* 'if' nesting when file opened */
133 Boolean depending; /* state of doing_depend on EOF */ 133 Boolean depending; /* state of doing_depend on EOF */
@@ -1840,27 +1840,27 @@ Parse_IsVar(const char *p, VarAssign *ou @@ -1840,27 +1840,27 @@ Parse_IsVar(const char *p, VarAssign *ou
1840 1840
1841 /* During parsing, the '+' of the '+=' operator is initially parsed 1841 /* During parsing, the '+' of the '+=' operator is initially parsed
1842 * as part of the variable name. It is later corrected, as is the ':sh' 1842 * as part of the variable name. It is later corrected, as is the ':sh'
1843 * modifier. Of these two (nameEnd and op), the earlier one determines the 1843 * modifier. Of these two (nameEnd and op), the earlier one determines the
1844 * actual end of the variable name. */ 1844 * actual end of the variable name. */
1845 pvar.nameStart = p; 1845 pvar.nameStart = p;
1846#ifdef CLEANUP 1846#ifdef CLEANUP
1847 pvar.nameEnd = NULL; 1847 pvar.nameEnd = NULL;
1848 pvar.eq = NULL; 1848 pvar.eq = NULL;
1849#endif 1849#endif
1850 1850
1851 /* Scan for one of the assignment operators outside a variable expansion */ 1851 /* Scan for one of the assignment operators outside a variable expansion */
1852 while (*p != '\0') { 1852 while (*p != '\0') {
1853 char ch = *p++; 1853 char ch = *p++;
1854 if (ch == '(' || ch == '{') { 1854 if (ch == '(' || ch == '{') {
1855 level++; 1855 level++;
1856 continue; 1856 continue;
1857 } 1857 }
1858 if (ch == ')' || ch == '}') { 1858 if (ch == ')' || ch == '}') {
1859 level--; 1859 level--;
1860 continue; 1860 continue;
1861 } 1861 }
1862 1862
1863 if (level != 0) 1863 if (level != 0)
1864 continue; 1864 continue;
1865 1865
1866 if (ch == ' ' || ch == '\t') 1866 if (ch == ' ' || ch == '\t')