summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMark Lumsden <lum@cvs.openbsd.org>2014-04-02 20:32:01 +0000
committerMark Lumsden <lum@cvs.openbsd.org>2014-04-02 20:32:01 +0000
commit13c7894db90af0a6c6176802f8a856601e3918d3 (patch)
treeebceac5d7f57bb8344385f4a50b55c8c637a1f48 /usr.bin
parent9b7549841ef321c621a1bb36fbc9e34e070596e1 (diff)
Add the '#' character as a comment character in the startup file.
Include ';' and '#' into man page. ok deraadt@ phessler@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/mg/extend.c4
-rw-r--r--usr.bin/mg/mg.110
2 files changed, 10 insertions, 4 deletions
diff --git a/usr.bin/mg/extend.c b/usr.bin/mg/extend.c
index 9d41769a4d3..ef59d5f05a7 100644
--- a/usr.bin/mg/extend.c
+++ b/usr.bin/mg/extend.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: extend.c,v 1.54 2014/03/20 07:47:29 lum Exp $ */
+/* $OpenBSD: extend.c,v 1.55 2014/04/02 20:32:00 lum Exp $ */
/* This file is in the public domain. */
@@ -956,7 +956,7 @@ skipwhite(char *s)
{
while (*s == ' ' || *s == '\t' || *s == ')' || *s == '(')
s++;
- if (*s == ';')
+ if ((*s == ';') || (*s == '#'))
*s = '\0';
return (s);
}
diff --git a/usr.bin/mg/mg.1 b/usr.bin/mg/mg.1
index b26dee7e078..ef3fc845297 100644
--- a/usr.bin/mg/mg.1
+++ b/usr.bin/mg/mg.1
@@ -1,7 +1,7 @@
-.\" $OpenBSD: mg.1,v 1.87 2014/03/27 07:30:25 jmc Exp $
+.\" $OpenBSD: mg.1,v 1.88 2014/04/02 20:32:00 lum Exp $
.\" This file is in the public domain.
.\"
-.Dd $Mdocdate: March 27 2014 $
+.Dd $Mdocdate: April 2 2014 $
.Dt MG 1
.Os
.Sh NAME
@@ -1033,6 +1033,12 @@ set-default-mode fill
set-fill-column 72
auto-execute *.c c-mode
.Ed
+.Pp
+Comments can be added to the startup files by placing
+.Dq \;
+or
+.Dq #
+as the first character of a line.
.Sh FILES
.Bl -tag -width /usr/share/doc/mg/tutorial -compact
.It Pa ~/.mg