Date: Fri, 3 May 2013 23:29:38 +0000 (UTC) From: Jung-uk Kim <jkim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r250226 - in head/usr.bin/m4: . TEST Message-ID: <201305032329.r43NTc3j088990@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jkim Date: Fri May 3 23:29:38 2013 New Revision: 250226 URL: http://svnweb.freebsd.org/changeset/base/250226 Log: Reduce diff with upstream. Modified: head/usr.bin/m4/TEST/ack.m4 head/usr.bin/m4/TEST/hanoi.m4 head/usr.bin/m4/TEST/hash.m4 head/usr.bin/m4/TEST/sqroot.m4 head/usr.bin/m4/TEST/string.m4 head/usr.bin/m4/TEST/test.m4 head/usr.bin/m4/eval.c head/usr.bin/m4/extern.h head/usr.bin/m4/m4.1 head/usr.bin/m4/main.c head/usr.bin/m4/parser.y head/usr.bin/m4/tokenizer.l Modified: head/usr.bin/m4/TEST/ack.m4 ============================================================================== --- head/usr.bin/m4/TEST/ack.m4 Fri May 3 22:33:41 2013 (r250225) +++ head/usr.bin/m4/TEST/ack.m4 Fri May 3 23:29:38 2013 (r250226) @@ -1,4 +1,4 @@ -# $OpenBSD: ack.m4,v 1.2 1996/06/26 05:36:18 deraadt Exp $ +# $OpenBSD: ack.m4,v 1.3 2003/06/03 02:56:11 millert Exp $ # $NetBSD: ack.m4,v 1.4 1995/09/28 05:37:54 tls Exp $ # # Copyright (c) 1989, 1993 @@ -15,7 +15,7 @@ # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# 4. Neither the name of the University nor the names of its contributors +# 3. Neither the name of the University nor the names of its contributors # may be used to endorse or promote products derived from this software # without specific prior written permission. # Modified: head/usr.bin/m4/TEST/hanoi.m4 ============================================================================== --- head/usr.bin/m4/TEST/hanoi.m4 Fri May 3 22:33:41 2013 (r250225) +++ head/usr.bin/m4/TEST/hanoi.m4 Fri May 3 23:29:38 2013 (r250226) @@ -1,4 +1,4 @@ -# $OpenBSD: hanoi.m4,v 1.2 1996/06/26 05:36:19 deraadt Exp $ +# $OpenBSD: hanoi.m4,v 1.3 2003/06/03 02:56:11 millert Exp $ # $NetBSD: hanoi.m4,v 1.4 1995/09/28 05:37:56 tls Exp $ # # Copyright (c) 1989, 1993 @@ -15,7 +15,7 @@ # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# 4. Neither the name of the University nor the names of its contributors +# 3. Neither the name of the University nor the names of its contributors # may be used to endorse or promote products derived from this software # without specific prior written permission. # Modified: head/usr.bin/m4/TEST/hash.m4 ============================================================================== --- head/usr.bin/m4/TEST/hash.m4 Fri May 3 22:33:41 2013 (r250225) +++ head/usr.bin/m4/TEST/hash.m4 Fri May 3 23:29:38 2013 (r250226) @@ -1,4 +1,4 @@ -# $OpenBSD: hash.m4,v 1.2 1996/06/26 05:36:19 deraadt Exp $ +# $OpenBSD: hash.m4,v 1.3 2003/06/03 02:56:11 millert Exp $ # $NetBSD: hash.m4,v 1.4 1995/09/28 05:37:58 tls Exp $ # # Copyright (c) 1989, 1993 @@ -15,7 +15,7 @@ # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# 4. Neither the name of the University nor the names of its contributors +# 3. Neither the name of the University nor the names of its contributors # may be used to endorse or promote products derived from this software # without specific prior written permission. # Modified: head/usr.bin/m4/TEST/sqroot.m4 ============================================================================== --- head/usr.bin/m4/TEST/sqroot.m4 Fri May 3 22:33:41 2013 (r250225) +++ head/usr.bin/m4/TEST/sqroot.m4 Fri May 3 23:29:38 2013 (r250226) @@ -1,4 +1,4 @@ -# $OpenBSD: sqroot.m4,v 1.2 1996/06/26 05:36:20 deraadt Exp $ +# $OpenBSD: sqroot.m4,v 1.3 2003/06/03 02:56:11 millert Exp $ # $NetBSD: sqroot.m4,v 1.4 1995/09/28 05:38:01 tls Exp $ # # Copyright (c) 1989, 1993 @@ -15,7 +15,7 @@ # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# 4. Neither the name of the University nor the names of its contributors +# 3. Neither the name of the University nor the names of its contributors # may be used to endorse or promote products derived from this software # without specific prior written permission. # Modified: head/usr.bin/m4/TEST/string.m4 ============================================================================== --- head/usr.bin/m4/TEST/string.m4 Fri May 3 22:33:41 2013 (r250225) +++ head/usr.bin/m4/TEST/string.m4 Fri May 3 23:29:38 2013 (r250226) @@ -1,4 +1,4 @@ -# $OpenBSD: string.m4,v 1.2 1996/06/26 05:36:20 deraadt Exp $ +# $OpenBSD: string.m4,v 1.3 2003/06/03 02:56:11 millert Exp $ # $NetBSD: string.m4,v 1.4 1995/09/28 05:38:03 tls Exp $ # # Copyright (c) 1989, 1993 @@ -15,7 +15,7 @@ # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# 4. Neither the name of the University nor the names of its contributors +# 3. Neither the name of the University nor the names of its contributors # may be used to endorse or promote products derived from this software # without specific prior written permission. # Modified: head/usr.bin/m4/TEST/test.m4 ============================================================================== --- head/usr.bin/m4/TEST/test.m4 Fri May 3 22:33:41 2013 (r250225) +++ head/usr.bin/m4/TEST/test.m4 Fri May 3 23:29:38 2013 (r250226) @@ -1,4 +1,4 @@ -# $OpenBSD: test.m4,v 1.2 1996/06/26 05:36:21 deraadt Exp $ +# $OpenBSD: test.m4,v 1.3 2003/06/03 02:56:11 millert Exp $ # $NetBSD: test.m4,v 1.4 1995/09/28 05:38:05 tls Exp $ # # Copyright (c) 1989, 1993 @@ -15,7 +15,7 @@ # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. -# 4. Neither the name of the University nor the names of its contributors +# 3. Neither the name of the University nor the names of its contributors # may be used to endorse or promote products derived from this software # without specific prior written permission. # Modified: head/usr.bin/m4/eval.c ============================================================================== --- head/usr.bin/m4/eval.c Fri May 3 22:33:41 2013 (r250225) +++ head/usr.bin/m4/eval.c Fri May 3 23:29:38 2013 (r250226) @@ -1,4 +1,4 @@ -/* $OpenBSD: eval.c,v 1.69 2011/03/24 11:23:08 espie Exp $ */ +/* $OpenBSD: eval.c,v 1.70 2012/04/12 17:00:11 espie Exp $ */ /* $NetBSD: eval.c,v 1.7 1996/11/10 21:21:29 pk Exp $ */ /* Modified: head/usr.bin/m4/extern.h ============================================================================== --- head/usr.bin/m4/extern.h Fri May 3 22:33:41 2013 (r250225) +++ head/usr.bin/m4/extern.h Fri May 3 23:29:38 2013 (r250226) @@ -1,4 +1,4 @@ -/* $OpenBSD: extern.h,v 1.51 2011/09/27 07:24:02 espie Exp $ */ +/* $OpenBSD: extern.h,v 1.52 2012/04/12 17:00:11 espie Exp $ */ /* $NetBSD: extern.h,v 1.3 1996/01/13 23:25:24 pk Exp $ */ /*- Modified: head/usr.bin/m4/m4.1 ============================================================================== --- head/usr.bin/m4/m4.1 Fri May 3 22:33:41 2013 (r250225) +++ head/usr.bin/m4/m4.1 Fri May 3 23:29:38 2013 (r250226) @@ -1,5 +1,5 @@ -.\" $NetBSD: m4.1,v 1.22 2010/05/14 17:14:28 joerg Exp $ -.\" @(#) $OpenBSD: m4.1,v 1.56 2009/10/14 17:19:47 sthen Exp $ +.\" $NetBSD: m4.1,v 1.23 2012/04/08 22:00:39 wiz Exp $ +.\" @(#) $OpenBSD: m4.1,v 1.59 2010/10/21 13:20:51 jmc Exp $ .\" .\" Copyright (c) 1989, 1993 .\" The Regents of the University of California. All rights reserved. @@ -33,14 +33,14 @@ .\" .\" $FreeBSD$ .\" -.Dd October 14, 2009 +.Dd October 21, 2010 .Dt M4 1 .Os .Sh NAME .Nm m4 .Nd macro language processor .Sh SYNOPSIS -.Nm m4 +.Nm .Op Fl gPs .Oo .Sm off @@ -50,18 +50,16 @@ .Op Fl d Ar flags .Op Fl I Ar dirname .Op Fl o Ar filename -.Bk -words .Op Fl t Ar macro .Op Fl U Ns Ar name .Op Ar -.Ek .Sh DESCRIPTION The -.Nm m4 +.Nm utility is a macro processor that can be used as a front end to any language (e.g., C, ratfor, fortran, lex, and yacc). If no input files are given, -.Nm m4 +.Nm reads from the standard input, otherwise files specified on the command line are processed in the given order. @@ -69,7 +67,7 @@ Input files can be regular files, files single dash .Pq Sq - , denoting standard input. -.Nm m4 +.Nm writes the processed text to the standard output, unless told otherwise. .Pp @@ -77,7 +75,7 @@ Macro calls have the form name(argument1 .Pp There cannot be any space following the macro name and the open parenthesis -.Sq \&( . +.Pq Sq \&( . If the macro name is not followed by an open parenthesis it is processed with no arguments. .Pp @@ -169,7 +167,7 @@ Undefine the symbol .Ar name . .El .Sh SYNTAX -.Nm m4 +.Nm provides the following built-in macros. They may be redefined, losing their original meaning. Return values are null unless otherwise stated. @@ -240,7 +238,7 @@ macro definitions (even for built-in mac .It Fn divert num There are 10 output queues (numbered 0-9). At the end of processing -.Nm m4 +.Nm concatenates all the queues in numerical order to produce the final output. Initially the output queue is 0. @@ -259,7 +257,7 @@ Prints the first argument on the standar .It Fn esyscmd cmd Passes its first argument to a shell and returns the shell's standard output. Note that the shell shares its standard input and standard error with -.Nm m4 . +.Nm . .It Fn eval expr Computes the first argument as an arithmetic expression using 32-bit arithmetic. @@ -348,6 +346,9 @@ Multiple calls to get inserted in sequence at the final .Dv EOF . .It Fn maketemp template +Like +.Ic mkstemp . +.It Fn mkstemp template Invokes .Xr mkstemp 3 on the first argument, and returns the modified string. @@ -431,10 +432,16 @@ Returns the current file's line number. .It Ic __file__ Returns the current file's name. .El +.Sh EXIT STATUS +.Ex -std m4 +.Pp +But note that the +.Ic m4exit +macro can modify the exit status. .Sh STANDARDS The .Nm -utility is compliant with the +utility is mostly compliant with the .St -p1003.1-2008 specification. .Pp @@ -456,6 +463,12 @@ and .Ic __file__ are extensions to that specification. .Pp +.Ic maketemp +is not supposed to be a synonym for +.Ic mkstemp , +but instead to be an insecure temporary file name creation function. +The change causes no known compatibility issues. +.Pp The output format of tracing and of .Ic dumpdef are not specified in any standard, @@ -480,7 +493,7 @@ replaces the top-most definition only. Other implementations may erase all definitions on the stack instead. .Pp All built-ins do expand without arguments in many other -.Nm m4 . +.Nm . .Pp Many other .Nm Modified: head/usr.bin/m4/main.c ============================================================================== --- head/usr.bin/m4/main.c Fri May 3 22:33:41 2013 (r250225) +++ head/usr.bin/m4/main.c Fri May 3 23:29:38 2013 (r250226) @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.80 2011/09/27 07:24:02 espie Exp $ */ +/* $OpenBSD: main.c,v 1.81 2012/04/12 17:00:11 espie Exp $ */ /* $NetBSD: main.c,v 1.12 1997/02/08 23:54:49 cgd Exp $ */ /*- Modified: head/usr.bin/m4/parser.y ============================================================================== --- head/usr.bin/m4/parser.y Fri May 3 22:33:41 2013 (r250225) +++ head/usr.bin/m4/parser.y Fri May 3 23:29:38 2013 (r250226) @@ -1,5 +1,5 @@ %{ -/* $OpenBSD: parser.y,v 1.6 2008/08/21 21:00:14 espie Exp $ */ +/* $OpenBSD: parser.y,v 1.7 2012/04/12 17:00:11 espie Exp $ */ /* * Copyright (c) 2004 Marc Espie <espie@cvs.openbsd.org> * Modified: head/usr.bin/m4/tokenizer.l ============================================================================== --- head/usr.bin/m4/tokenizer.l Fri May 3 22:33:41 2013 (r250225) +++ head/usr.bin/m4/tokenizer.l Fri May 3 23:29:38 2013 (r250226) @@ -1,6 +1,6 @@ %option nounput noinput %{ -/* $OpenBSD: tokenizer.l,v 1.7 2010/03/22 20:40:44 espie Exp $ */ +/* $OpenBSD: tokenizer.l,v 1.8 2012/04/12 17:00:11 espie Exp $ */ /* * Copyright (c) 2004 Marc Espie <espie@cvs.openbsd.org> *
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305032329.r43NTc3j088990>