extern.h revision 99352
159191Skris/*-
259191Skris * Copyright (c) 1992 Diomidis Spinellis.
359191Skris * Copyright (c) 1992, 1993
459191Skris *	The Regents of the University of California.  All rights reserved.
559191Skris *
659191Skris * This code is derived from software contributed to Berkeley by
759191Skris * Diomidis Spinellis of Imperial College, University of London.
859191Skris *
959191Skris * Redistribution and use in source and binary forms, with or without
1059191Skris * modification, are permitted provided that the following conditions
1159191Skris * are met:
1259191Skris * 1. Redistributions of source code must retain the above copyright
1359191Skris *    notice, this list of conditions and the following disclaimer.
1459191Skris * 2. Redistributions in binary form must reproduce the above copyright
15238405Sjkim *    notice, this list of conditions and the following disclaimer in the
1659191Skris *    documentation and/or other materials provided with the distribution.
1759191Skris * 3. All advertising materials mentioning features or use of this software
1859191Skris *    must display the following acknowledgement:
1959191Skris *	This product includes software developed by the University of
2059191Skris *	California, Berkeley and its contributors.
21238405Sjkim * 4. Neither the name of the University nor the names of its contributors
22238405Sjkim *    may be used to endorse or promote products derived from this software
23238405Sjkim *    without specific prior written permission.
24238405Sjkim *
25238405Sjkim * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2659191Skris * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2759191Skris * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2859191Skris * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
29109998Smarkm * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3059191Skris * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31238405Sjkim * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32238405Sjkim * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3359191Skris * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3459191Skris * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3559191Skris * SUCH DAMAGE.
3659191Skris *
3759191Skris *	@(#)extern.h	8.1 (Berkeley) 6/6/93
3859191Skris * $FreeBSD: head/usr.bin/sed/extern.h 99352 2002-07-03 14:38:27Z tjr $
3959191Skris */
4059191Skris
4159191Skrisextern struct s_command *prog;
4259191Skrisextern struct s_appends *appends;
4359191Skrisextern regmatch_t *match;
4459191Skrisextern size_t maxnsub;
4559191Skrisextern u_long linenum;
4659191Skrisextern int appendnum;
4759191Skrisextern int aflag, eflag, nflag;
4859191Skrisextern const char *fname;
4959191Skrisextern int rflags;	/* regex flags to use */
5059191Skris
5159191Skrisvoid	 cfclose(struct s_command *, struct s_command *);
5259191Skrisvoid	 compile(void);
5359191Skrisvoid	 cspace(SPACE *, char *, size_t, enum e_spflag);
5459191Skrischar	*cu_fgets(char *, int, int *);
5559191Skrisint	 mf_fgets(SPACE *, enum e_spflag);
5659191Skrisint	 lastline(void);
5759191Skrisvoid	 process(void);
5859191Skrischar	*strregerror(int, regex_t *);
5959191Skris