extern.h revision 133385
128219Smsmith/*- 228219Smsmith * Copyright (c) 1992 Diomidis Spinellis. 328219Smsmith * Copyright (c) 1992, 1993 428219Smsmith * The Regents of the University of California. All rights reserved. 528219Smsmith * 628219Smsmith * This code is derived from software contributed to Berkeley by 728219Smsmith * Diomidis Spinellis of Imperial College, University of London. 828219Smsmith * 928219Smsmith * Redistribution and use in source and binary forms, with or without 1028219Smsmith * modification, are permitted provided that the following conditions 1128219Smsmith * are met: 1228219Smsmith * 1. Redistributions of source code must retain the above copyright 1328219Smsmith * notice, this list of conditions and the following disclaimer. 1428219Smsmith * 2. Redistributions in binary form must reproduce the above copyright 1528219Smsmith * notice, this list of conditions and the following disclaimer in the 1628219Smsmith * documentation and/or other materials provided with the distribution. 1728219Smsmith * 4. Neither the name of the University nor the names of its contributors 1828219Smsmith * may be used to endorse or promote products derived from this software 1928219Smsmith * without specific prior written permission. 2028219Smsmith * 2128219Smsmith * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2228219Smsmith * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2328219Smsmith * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2428219Smsmith * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2528219Smsmith * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2650477Speter * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2728219Smsmith * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2828219Smsmith * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2928219Smsmith * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3028219Smsmith * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3128219Smsmith * SUCH DAMAGE. 3232178Smsmith * 3332178Smsmith * @(#)extern.h 8.1 (Berkeley) 6/6/93 3432178Smsmith * $FreeBSD: head/usr.bin/sed/extern.h 133385 2004-08-09 15:29:41Z dds $ 3532178Smsmith */ 3628219Smsmith 3732178Smsmithextern struct s_command *prog; 3832178Smsmithextern struct s_appends *appends; 3932178Smsmithextern regmatch_t *match; 4043433Snsouchextern size_t maxnsub; 4132178Smsmithextern u_long linenum; 4232178Smsmithextern int appendnum; 4328219Smsmithextern int aflag, eflag, nflag; 4432178Smsmithextern const char *fname, *outfname; 4532178Smsmithextern FILE *infile, *outfile; 4632178Smsmithextern int rflags; /* regex flags to use */ 4743433Snsouch 4832178Smsmithvoid cfclose(struct s_command *, struct s_command *); 4932178Smsmithvoid compile(void); 5028219Smsmithvoid cspace(SPACE *, const char *, size_t, enum e_spflag); 5143433Snsouchchar *cu_fgets(char *, int, int *); 5243433Snsouchint mf_fgets(SPACE *, enum e_spflag); 5343433Snsouchint lastline(void); 5428219Smsmithvoid process(void); 55char *strregerror(int, regex_t *); 56