Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/sed Move data I/O file pointers into processing part.



details:   https://anonhg.NetBSD.org/src/rev/3a2544a635b9
branches:  trunk
changeset: 336424:3a2544a635b9
user:      asau <asau%NetBSD.org@localhost>
date:      Sun Mar 01 00:38:01 2015 +0000

description:
Move data I/O file pointers into processing part.

diffstat:

 usr.bin/sed/extern.h  |  3 +--
 usr.bin/sed/main.c    |  7 ++-----
 usr.bin/sed/process.c |  7 +++++--
 3 files changed, 8 insertions(+), 9 deletions(-)

diffs (73 lines):

diff -r 90f0ca422f1a -r 3a2544a635b9 usr.bin/sed/extern.h
--- a/usr.bin/sed/extern.h      Sun Mar 01 00:34:14 2015 +0000
+++ b/usr.bin/sed/extern.h      Sun Mar 01 00:38:01 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: extern.h,v 1.15 2015/02/28 21:56:53 asau Exp $ */
+/*     $NetBSD: extern.h,v 1.16 2015/03/01 00:38:01 asau Exp $ */
 
 /*-
  * Copyright (c) 1992 Diomidis Spinellis.
@@ -62,7 +62,6 @@
 extern size_t appendnum;
 extern int aflag, nflag;
 extern int ispan;
-extern FILE *infile, *outfile;
 extern int rflags;     /* regex flags to use */
 
 void    cfclose(struct s_command *, struct s_command *);
diff -r 90f0ca422f1a -r 3a2544a635b9 usr.bin/sed/main.c
--- a/usr.bin/sed/main.c        Sun Mar 01 00:34:14 2015 +0000
+++ b/usr.bin/sed/main.c        Sun Mar 01 00:38:01 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.31 2015/02/28 21:56:53 asau Exp $   */
+/*     $NetBSD: main.c,v 1.32 2015/03/01 00:38:01 asau Exp $   */
 
 /*-
  * Copyright (c) 2013 Johann 'Myrkraverk' Oskarsson.
@@ -39,7 +39,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: main.c,v 1.31 2015/02/28 21:56:53 asau Exp $");
+__RCSID("$NetBSD: main.c,v 1.32 2015/03/01 00:38:01 asau Exp $");
 #ifdef __FBSDID
 __FBSDID("$FreeBSD: head/usr.bin/sed/main.c 252231 2013-06-26 04:14:19Z pfg $");
 #endif
@@ -88,9 +88,6 @@
 struct s_flist *files;
 static struct s_flist **fl_nextp = &files;
 
-FILE *infile;                  /* Current input file */
-FILE *outfile;                 /* Current output file */
-
 int aflag;
 static int eflag;
 int nflag;
diff -r 90f0ca422f1a -r 3a2544a635b9 usr.bin/sed/process.c
--- a/usr.bin/sed/process.c     Sun Mar 01 00:34:14 2015 +0000
+++ b/usr.bin/sed/process.c     Sun Mar 01 00:38:01 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: process.c,v 1.47 2015/02/28 21:56:53 asau Exp $        */
+/*     $NetBSD: process.c,v 1.48 2015/03/01 00:38:01 asau Exp $        */
 
 /*-
  * Copyright (c) 1992 Diomidis Spinellis.
@@ -38,7 +38,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: process.c,v 1.47 2015/02/28 21:56:53 asau Exp $");
+__RCSID("$NetBSD: process.c,v 1.48 2015/03/01 00:38:01 asau Exp $");
 #ifdef __FBSDID
 __FBSDID("$FreeBSD: head/usr.bin/sed/process.c 192732 2009-05-25 06:45:33Z brian $");
 #endif
@@ -87,6 +87,9 @@
 static void             regsub(SPACE *, char *, char *);
 static int              substitute(struct s_command *);
 
+static FILE *infile;           /* Current input file */
+static FILE *outfile;          /* Current output file */
+
 /*
  * Current file and line number; line numbers restart across compilation
  * units, but span across input files.  The latter is optional if editing



Home | Main Index | Thread Index | Old Index