Synchronize m4(1) with OpenBSD
This commit is contained in:
parent
c9a1870367
commit
46ef9581dd
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: eval.c,v 1.73 2014/07/11 21:04:17 espie Exp $ */
|
||||
/* $OpenBSD: eval.c,v 1.74 2015/02/05 12:59:57 millert Exp $ */
|
||||
/* $NetBSD: eval.c,v 1.7 1996/11/10 21:21:29 pk Exp $ */
|
||||
|
||||
/*
|
||||
@ -48,8 +48,8 @@ __FBSDID("$FreeBSD$");
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: extern.h,v 1.54 2014/05/12 19:11:19 espie Exp $ */
|
||||
/* $OpenBSD: extern.h,v 1.54 2014/05/12 19:11:19 espie Exp $ */
|
||||
/* $NetBSD: extern.h,v 1.3 1996/01/13 23:25:24 pk Exp $ */
|
||||
|
||||
/*-
|
||||
@ -112,7 +112,7 @@ extern void usage(void);
|
||||
extern void resizedivs(int);
|
||||
extern size_t buffer_mark(void);
|
||||
extern void dump_buffer(FILE *, size_t);
|
||||
extern void m4errx(int, const char *, ...);
|
||||
extern void __dead m4errx(int, const char *, ...);
|
||||
|
||||
extern int obtain_char(struct input_file *);
|
||||
extern void set_input(struct input_file *, FILE *, const char *);
|
||||
|
@ -1,5 +1,5 @@
|
||||
.\" $NetBSD: m4.1,v 1.23 2012/04/08 22:00:39 wiz Exp $
|
||||
.\" @(#) $OpenBSD: m4.1,v 1.62 2014/04/14 07:00:47 jmc Exp $
|
||||
.\" @(#) $OpenBSD: m4.1,v 1.63 2015/09/14 20:06:58 schwarze Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1989, 1993
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -33,7 +33,7 @@
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd $Mdocdate: April 14 2014 $
|
||||
.Dd $Mdocdate: September 14 2015 $
|
||||
.Dt M4 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -98,9 +98,7 @@ recognized as special when not followed by an open parenthesis.
|
||||
.Pp
|
||||
The options are as follows:
|
||||
.Bl -tag -width Ds
|
||||
.It Fl D Ns Ar name Ns Oo
|
||||
.Pf = Ns Ar value
|
||||
.Oc
|
||||
.It Fl D Ns Ar name Ns Op = Ns Ar value
|
||||
Define the symbol
|
||||
.Ar name
|
||||
to have some value (or
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: main.c,v 1.84 2014/12/21 09:33:12 espie Exp $ */
|
||||
/* $OpenBSD: main.c,v 1.86 2015/11/03 16:21:47 deraadt Exp $ */
|
||||
/* $NetBSD: main.c,v 1.12 1997/02/08 23:54:49 cgd Exp $ */
|
||||
|
||||
/*-
|
||||
@ -133,13 +133,7 @@ static struct keyblk keywrds[] = { /* m4 keywords to be installed */
|
||||
{ "traceon", TRACEONTYPE | NOARGS },
|
||||
{ "traceoff", TRACEOFFTYPE | NOARGS },
|
||||
|
||||
#if defined(unix) || defined(__unix__)
|
||||
{ "unix", SELFTYPE | NOARGS },
|
||||
#else
|
||||
#ifdef vms
|
||||
{ "vms", SELFTYPE | NOARGS },
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
#define MAXKEYS (sizeof(keywrds)/sizeof(struct keyblk))
|
||||
@ -477,14 +471,14 @@ macro(void)
|
||||
|
||||
default:
|
||||
if (LOOK_AHEAD(t, scommt)) {
|
||||
char *cp;
|
||||
for (cp = scommt; *cp; cp++)
|
||||
chrsave(*cp);
|
||||
char *p;
|
||||
for (p = scommt; *p; p++)
|
||||
chrsave(*p);
|
||||
for(;;) {
|
||||
t = gpbc();
|
||||
if (LOOK_AHEAD(t, ecommt)) {
|
||||
for (cp = ecommt; *cp; cp++)
|
||||
chrsave(*cp);
|
||||
for (p = ecommt; *p; p++)
|
||||
chrsave(*p);
|
||||
break;
|
||||
}
|
||||
if (t == EOF)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: mdef.h,v 1.32 2014/12/21 09:33:12 espie Exp $ */
|
||||
/* $OpenBSD: mdef.h,v 1.33 2015/11/03 16:21:47 deraadt Exp $ */
|
||||
/* $NetBSD: mdef.h,v 1.7 1996/01/13 23:25:27 pk Exp $ */
|
||||
|
||||
/*
|
||||
@ -107,10 +107,6 @@
|
||||
#define SCOMMT '#'
|
||||
#define ECOMMT '\n'
|
||||
|
||||
#ifdef msdos
|
||||
#define system(str) (-1)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* other important constants
|
||||
*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: pathnames.h,v 1.5 2003/06/03 02:56:10 millert Exp $ */
|
||||
/* $OpenBSD: pathnames.h,v 1.6 2015/11/03 16:21:47 deraadt Exp $ */
|
||||
/* $NetBSD: pathnames.h,v 1.6 1995/09/29 00:27:55 cgd Exp $ */
|
||||
|
||||
/*
|
||||
@ -36,22 +36,4 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Definitions of diversion files. If the name of the file is changed,
|
||||
* adjust UNIQUE to point to the wildcard (*) character in the filename.
|
||||
*/
|
||||
|
||||
#ifdef msdos
|
||||
#define _PATH_DIVNAME "\\M4*XXXXXX" /* msdos diversion files */
|
||||
#define UNIQUE 3 /* unique char location */
|
||||
#endif
|
||||
|
||||
#if defined(unix) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
#define _PATH_DIVNAME "/tmp/m4.0XXXXXXXXXX" /* unix diversion files */
|
||||
#define UNIQUE 8 /* unique char location */
|
||||
#endif
|
||||
|
||||
#ifdef vms
|
||||
#define _PATH_DIVNAME "sys$login:m4*XXXXXX" /* vms diversion files */
|
||||
#define UNIQUE 12 /* unique char location */
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user