netbsd sed for minix
This commit is contained in:
parent
707fbb966d
commit
582c0ed74d
6 changed files with 8 additions and 42 deletions
|
@ -24,7 +24,7 @@ SUBDIR= aal add_route adduser advent arp ash at autil awk \
|
|||
profile progressbar proto pr_routes ps pwd pwdauth \
|
||||
ramdisk rarpd rawspeed rcp rdate readall readclock \
|
||||
readfs reboot remsync rev rget rlogin rlogind rmdir \
|
||||
rotate rsh rshd service setup shar size \
|
||||
rotate rsh rshd sed service setup shar size \
|
||||
sleep slip sort spell split srccrc stat strings strip \
|
||||
stty su sum svclog swapfs swifi sync synctree sysenv \
|
||||
syslogd tail talk talkd tcpd tcpdp tcpstat tee telnet \
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
# $NetBSD: Makefile,v 1.13 2006/06/02 19:44:48 mrg Exp $
|
||||
# from: @(#)Makefile 8.1 (Berkeley) 6/6/93
|
||||
|
||||
.include <bsd.own.mk>
|
||||
.include <minix.own.mk>
|
||||
|
||||
PROG= sed
|
||||
SRCS= compile.c main.c misc.c process.c
|
||||
WARNS= 2
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
.include <minix.prog.mk>
|
||||
|
|
|
@ -72,13 +72,6 @@
|
|||
#endif
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)compile.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: compile.c,v 1.35 2007/04/17 20:30:29 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
|
|
@ -72,18 +72,6 @@
|
|||
#endif
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__COPYRIGHT("@(#) Copyright (c) 1992, 1993\
|
||||
The Regents of the University of California. All rights reserved.");
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)main.c 8.2 (Berkeley) 1/3/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.19 2008/09/16 13:32:04 perry Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
|
@ -148,7 +136,6 @@ main(int argc, char *argv[])
|
|||
{
|
||||
int c, fflag;
|
||||
|
||||
setprogname(*argv);
|
||||
fflag = 0;
|
||||
while ((c = getopt(argc, argv, "ae:f:nrE")) != -1)
|
||||
switch (c) {
|
||||
|
|
|
@ -72,13 +72,6 @@
|
|||
#endif
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)misc.c 8.1 (Berkeley) 6/6/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: misc.c,v 1.9 2006/06/18 05:16:41 gdamore Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
|
|
|
@ -72,13 +72,6 @@
|
|||
#endif
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)process.c 8.6 (Berkeley) 4/20/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: process.c,v 1.37 2006/06/18 05:16:41 gdamore Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -94,6 +87,7 @@ __RCSID("$NetBSD: process.c,v 1.37 2006/06/18 05:16:41 gdamore Exp $");
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <termios.h>
|
||||
|
||||
#include "defs.h"
|
||||
#include "extern.h"
|
||||
|
@ -105,10 +99,10 @@ static SPACE HS, PS, SS;
|
|||
#define hs HS.space
|
||||
#define hsl HS.len
|
||||
|
||||
static inline int applies(struct s_command *);
|
||||
static __inline int applies(struct s_command *);
|
||||
static void flush_appends(void);
|
||||
static void lputs(char *);
|
||||
static inline int regexec_e(regex_t *, const char *, int, int, size_t);
|
||||
static __inline int regexec_e(regex_t *, const char *, int, int, size_t);
|
||||
static void regsub(SPACE *, char *, char *);
|
||||
static int substitute(struct s_command *);
|
||||
|
||||
|
@ -316,7 +310,7 @@ new: if (!nflag && !pd)
|
|||
* Return TRUE if the command applies to the current line. Sets the inrange
|
||||
* flag to process ranges. Interprets the non-select (``!'') flag.
|
||||
*/
|
||||
static inline int
|
||||
static __inline int
|
||||
applies(struct s_command *cp)
|
||||
{
|
||||
int r;
|
||||
|
@ -549,7 +543,7 @@ lputs(char *s)
|
|||
err(FATAL, "stdout: %s", strerror(errno ? errno : EIO));
|
||||
}
|
||||
|
||||
static inline int
|
||||
static __inline int
|
||||
regexec_e(regex_t *preg, const char *string, int eflags, int nomatch, size_t slen)
|
||||
{
|
||||
int eval;
|
||||
|
|
Loading…
Reference in a new issue