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): clean up indentation, includes, add do...
details: https://anonhg.NetBSD.org/src/rev/46cb1634851d
branches: trunk
changeset: 937127:46cb1634851d
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Aug 09 09:44:14 2020 +0000
description:
make(1): clean up indentation, includes, add documentation
diffstat:
usr.bin/make/enum.c | 8 ++++----
usr.bin/make/enum.h | 4 +++-
usr.bin/make/main.c | 10 +++++-----
usr.bin/make/var.c | 8 ++++----
4 files changed, 16 insertions(+), 14 deletions(-)
diffs (138 lines):
diff -r cfa003efe8ee -r 46cb1634851d usr.bin/make/enum.c
--- a/usr.bin/make/enum.c Sun Aug 09 09:40:48 2020 +0000
+++ b/usr.bin/make/enum.c Sun Aug 09 09:44:14 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: enum.c,v 1.2 2020/08/08 14:43:28 rillig Exp $ */
+/* $NetBSD: enum.c,v 1.3 2020/08/09 09:44:14 rillig Exp $ */
/*
Copyright (c) 2020 Roland Illig <rillig%NetBSD.org@localhost>
@@ -28,11 +28,11 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: enum.c,v 1.2 2020/08/08 14:43:28 rillig Exp $";
+static char rcsid[] = "$NetBSD: enum.c,v 1.3 2020/08/09 09:44:14 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: enum.c,v 1.2 2020/08/08 14:43:28 rillig Exp $");
+__RCSID("$NetBSD: enum.c,v 1.3 2020/08/09 09:44:14 rillig Exp $");
#endif
#endif
@@ -75,7 +75,7 @@
assert(value == 0);
if (buf == buf_start)
- return "none";
+ return "none";
assert(buf_size >= 1);
buf[0] = '\0';
diff -r cfa003efe8ee -r 46cb1634851d usr.bin/make/enum.h
--- a/usr.bin/make/enum.h Sun Aug 09 09:40:48 2020 +0000
+++ b/usr.bin/make/enum.h Sun Aug 09 09:44:14 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: enum.h,v 1.4 2020/08/09 07:03:06 rillig Exp $ */
+/* $NetBSD: enum.h,v 1.5 2020/08/09 09:44:14 rillig Exp $ */
/*
Copyright (c) 2020 Roland Illig <rillig%NetBSD.org@localhost>
@@ -34,6 +34,8 @@
* Generate string representation for bitmasks.
*/
+#include <stddef.h>
+
typedef struct {
int es_value;
const char *es_name;
diff -r cfa003efe8ee -r 46cb1634851d usr.bin/make/main.c
--- a/usr.bin/make/main.c Sun Aug 09 09:40:48 2020 +0000
+++ b/usr.bin/make/main.c Sun Aug 09 09:44:14 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.301 2020/08/09 09:27:44 rillig Exp $ */
+/* $NetBSD: main.c,v 1.302 2020/08/09 09:44:14 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: main.c,v 1.301 2020/08/09 09:27:44 rillig Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.302 2020/08/09 09:44:14 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
@@ -81,7 +81,7 @@
#if 0
static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: main.c,v 1.301 2020/08/09 09:27:44 rillig Exp $");
+__RCSID("$NetBSD: main.c,v 1.302 2020/08/09 09:44:14 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -124,13 +124,13 @@
#include <sys/utsname.h>
#include <sys/wait.h>
+#include <ctype.h>
#include <errno.h>
#include <signal.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
-#include <ctype.h>
#include "make.h"
#include "hash.h"
@@ -1582,7 +1582,7 @@
/*-
* Cmd_Exec --
* Execute the command in cmd, and return the output of that command
- * in a string.
+ * in a string. In the output, newlines are replaced with spaces.
*
* Results:
* A string containing the output of the command, or the empty string.
diff -r cfa003efe8ee -r 46cb1634851d usr.bin/make/var.c
--- a/usr.bin/make/var.c Sun Aug 09 09:40:48 2020 +0000
+++ b/usr.bin/make/var.c Sun Aug 09 09:44:14 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.438 2020/08/09 09:40:48 rillig Exp $ */
+/* $NetBSD: var.c,v 1.439 2020/08/09 09:44:14 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: var.c,v 1.438 2020/08/09 09:40:48 rillig Exp $";
+static char rcsid[] = "$NetBSD: var.c,v 1.439 2020/08/09 09:44:14 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: var.c,v 1.438 2020/08/09 09:40:48 rillig Exp $");
+__RCSID("$NetBSD: var.c,v 1.439 2020/08/09 09:44:14 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -131,9 +131,9 @@
#include <stdlib.h>
#include <time.h>
-#include "enum.h"
#include "make.h"
#include "buf.h"
+#include "enum.h"
#include "dir.h"
#include "job.h"
#include "metachar.h"
Home |
Main Index |
Thread Index |
Old Index