extern.h revision 1.20
11.20Schristos/*	$NetBSD: extern.h,v 1.20 2015/03/12 12:40:41 christos Exp $	*/
21.13Schristos
31.1Salm/*-
41.12Schristos * Copyright (c) 1992 Diomidis Spinellis.
51.3Scgd * Copyright (c) 1992, 1993
61.3Scgd *	The Regents of the University of California.  All rights reserved.
71.1Salm *
81.1Salm * This code is derived from software contributed to Berkeley by
91.1Salm * Diomidis Spinellis of Imperial College, University of London.
101.1Salm *
111.1Salm * Redistribution and use in source and binary forms, with or without
121.1Salm * modification, are permitted provided that the following conditions
131.1Salm * are met:
141.1Salm * 1. Redistributions of source code must retain the above copyright
151.1Salm *    notice, this list of conditions and the following disclaimer.
161.1Salm * 2. Redistributions in binary form must reproduce the above copyright
171.1Salm *    notice, this list of conditions and the following disclaimer in the
181.1Salm *    documentation and/or other materials provided with the distribution.
191.14Swiz * 3. Neither the name of the University nor the names of its contributors
201.1Salm *    may be used to endorse or promote products derived from this software
211.1Salm *    without specific prior written permission.
221.1Salm *
231.1Salm * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
241.1Salm * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
251.1Salm * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
261.1Salm * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
271.1Salm * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
281.1Salm * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
291.1Salm * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
301.1Salm * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
311.1Salm * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
321.1Salm * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
331.1Salm * SUCH DAMAGE.
341.1Salm *
351.12Schristos *	@(#)extern.h	8.1 (Berkeley) 6/6/93
361.12Schristos * $FreeBSD: head/usr.bin/sed/extern.h 170608 2007-06-12 12:05:24Z yar $
371.1Salm */
381.1Salm
391.1Salmextern struct s_command *prog;
401.20Schristosextern struct s_appends *appends;
411.20Schristosextern regmatch_t *match;
421.1Salmextern size_t maxnsub;
431.20Schristosextern u_long linenum;
441.12Schristosextern size_t appendnum;
451.20Schristosextern int aflag, eflag, nflag;
461.20Schristosextern const char *fname, *outfname;
471.20Schristosextern FILE *infile, *outfile;
481.12Schristosextern int rflags;	/* regex flags to use */
491.1Salm
501.20Schristosvoid	 cfclose(struct s_command *, struct s_command *);
511.8Swizvoid	 compile(void);
521.20Schristosvoid	 cspace(SPACE *, const char *, size_t, enum e_spflag);
531.20Schristoschar	*cu_fgets(char *, int, int *);
541.20Schristosint	 mf_fgets(SPACE *, enum e_spflag);
551.20Schristosint	 lastline(void);
561.20Schristosvoid	 process(void);
571.20Schristosvoid	 resetstate(void);
581.8Swizchar	*strregerror(int, regex_t *);
591.11Stnnvoid	*xmalloc(size_t);
601.11Stnnvoid	*xrealloc(void *, size_t);
611.12Schristosvoid	*xcalloc(size_t, size_t);
62