extern.h revision 1.12
11.1Salm/*- 21.12Schristos * Copyright (c) 1992 Diomidis Spinellis. 31.3Scgd * Copyright (c) 1992, 1993 41.3Scgd * The Regents of the University of California. All rights reserved. 51.1Salm * 61.1Salm * This code is derived from software contributed to Berkeley by 71.1Salm * Diomidis Spinellis of Imperial College, University of London. 81.1Salm * 91.1Salm * Redistribution and use in source and binary forms, with or without 101.1Salm * modification, are permitted provided that the following conditions 111.1Salm * are met: 121.1Salm * 1. Redistributions of source code must retain the above copyright 131.1Salm * notice, this list of conditions and the following disclaimer. 141.1Salm * 2. Redistributions in binary form must reproduce the above copyright 151.1Salm * notice, this list of conditions and the following disclaimer in the 161.1Salm * documentation and/or other materials provided with the distribution. 171.1Salm * 4. Neither the name of the University nor the names of its contributors 181.1Salm * may be used to endorse or promote products derived from this software 191.1Salm * without specific prior written permission. 201.1Salm * 211.1Salm * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 221.1Salm * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 231.1Salm * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 241.1Salm * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 251.1Salm * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 261.1Salm * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 271.1Salm * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 281.1Salm * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 291.1Salm * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 301.1Salm * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 311.1Salm * SUCH DAMAGE. 321.1Salm * 331.12Schristos * @(#)extern.h 8.1 (Berkeley) 6/6/93 341.12Schristos * $FreeBSD: head/usr.bin/sed/extern.h 170608 2007-06-12 12:05:24Z yar $ 351.1Salm */ 361.1Salm 371.1Salmextern struct s_command *prog; 381.1Salmextern struct s_appends *appends; 391.1Salmextern regmatch_t *match; 401.1Salmextern size_t maxnsub; 411.1Salmextern u_long linenum; 421.12Schristosextern size_t appendnum; 431.1Salmextern int aflag, eflag, nflag; 441.12Schristosextern const char *fname, *outfname; 451.12Schristosextern FILE *infile, *outfile; 461.12Schristosextern int rflags; /* regex flags to use */ 471.1Salm 481.8Swizvoid cfclose(struct s_command *, struct s_command *); 491.8Swizvoid compile(void); 501.10Slukemvoid cspace(SPACE *, const char *, size_t, enum e_spflag); 511.12Schristoschar *cu_fgets(char *, int, int *); 521.8Swizint mf_fgets(SPACE *, enum e_spflag); 531.12Schristosint lastline(void); 541.8Swizvoid process(void); 551.12Schristosvoid resetstate(void); 561.8Swizchar *strregerror(int, regex_t *); 571.11Stnnvoid *xmalloc(size_t); 581.11Stnnvoid *xrealloc(void *, size_t); 591.12Schristosvoid *xcalloc(size_t, size_t); 60