pat_rep.h revision 22988
10SN/A/*- 22362SN/A * Copyright (c) 1992 Keith Muller. 30SN/A * Copyright (c) 1992, 1993 40SN/A * The Regents of the University of California. All rights reserved. 50SN/A * 60SN/A * This code is derived from software contributed to Berkeley by 72362SN/A * Keith Muller of the University of California, San Diego. 80SN/A * 92362SN/A * Redistribution and use in source and binary forms, with or without 100SN/A * modification, are permitted provided that the following conditions 110SN/A * are met: 120SN/A * 1. Redistributions of source code must retain the above copyright 130SN/A * notice, this list of conditions and the following disclaimer. 140SN/A * 2. Redistributions in binary form must reproduce the above copyright 150SN/A * notice, this list of conditions and the following disclaimer in the 160SN/A * documentation and/or other materials provided with the distribution. 170SN/A * 3. All advertising materials mentioning features or use of this software 180SN/A * must display the following acknowledgement: 190SN/A * This product includes software developed by the University of 200SN/A * California, Berkeley and its contributors. 212362SN/A * 4. Neither the name of the University nor the names of its contributors 222362SN/A * may be used to endorse or promote products derived from this software 232362SN/A * without specific prior written permission. 240SN/A * 250SN/A * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 260SN/A * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 270SN/A * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 280SN/A * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 290SN/A * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 300SN/A * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 310SN/A * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 320SN/A * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 330SN/A * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * 37 * @(#)pat_rep.h 8.1 (Berkeley) 5/31/93 38 * $Id$ 39 */ 40 41/* 42 * data structure for storing user supplied replacement strings (-s) 43 */ 44typedef struct replace { 45 char *nstr; /* the new string we will substitute with */ 46# ifdef NET2_REGEX 47 regexp *rcmp; /* compiled regular expression used to match */ 48# else 49 regex_t rcmp; /* compiled regular expression used to match */ 50# endif 51 int flgs; /* print conversions? global in operation? */ 52#define PRNT 0x1 53#define GLOB 0x2 54 struct replace *fow; /* pointer to next pattern */ 55} REPLACE; 56