dfa.h (131576) | dfa.h (146199) |
---|---|
1/* dfa.h - declarations for GNU deterministic regexp compiler 2 Copyright (C) 1988, 1998 Free Software Foundation, Inc. 3 4 This program is free software; you can redistribute it and/or modify 5 it under the terms of the GNU General Public License as published by 6 the Free Software Foundation; either version 2, or (at your option) 7 any later version. 8 9 This program is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 GNU General Public License for more details. 13 14 You should have received a copy of the GNU General Public License 15 along with this program; if not, write to the Free Software 16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ 17 18/* Written June, 1988 by Mike Haertel */ 19 | 1/* dfa.h - declarations for GNU deterministic regexp compiler 2 Copyright (C) 1988, 1998 Free Software Foundation, Inc. 3 4 This program is free software; you can redistribute it and/or modify 5 it under the terms of the GNU General Public License as published by 6 the Free Software Foundation; either version 2, or (at your option) 7 any later version. 8 9 This program is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 GNU General Public License for more details. 13 14 You should have received a copy of the GNU General Public License 15 along with this program; if not, write to the Free Software 16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ 17 18/* Written June, 1988 by Mike Haertel */ 19 |
20/* $FreeBSD: head/gnu/usr.bin/grep/dfa.h 131576 2004-07-04 16:16:59Z tjr $ */ | 20/* $FreeBSD: head/gnu/usr.bin/grep/dfa.h 146199 2005-05-14 03:02:22Z tjr $ */ |
21 22/* FIXME: 23 2. We should not export so much of the DFA internals. 24 In addition to clobbering modularity, we eat up valuable 25 name space. */ 26 | 21 22/* FIXME: 23 2. We should not export so much of the DFA internals. 24 In addition to clobbering modularity, we eat up valuable 25 name space. */ 26 |
27#include "mbcache.h" 28 | |
29#ifdef __STDC__ 30# ifndef _PTR_T 31# define _PTR_T 32 typedef void * ptr_t; 33# endif 34#else 35# ifndef _PTR_T 36# define _PTR_T --- 365 unchanged lines hidden (view full) --- 402 403/* Execute the given struct dfa on the buffer of characters. The 404 last byte of the buffer must equal the end-of-line byte. 405 The final argument points to a flag that will 406 be set if further examination by a backtracking matcher is needed in 407 order to verify backreferencing; otherwise the flag will be cleared. 408 Returns (size_t) -1 if no match is found, or the offset of the first 409 character after the first & shortest matching string in the buffer. */ | 27#ifdef __STDC__ 28# ifndef _PTR_T 29# define _PTR_T 30 typedef void * ptr_t; 31# endif 32#else 33# ifndef _PTR_T 34# define _PTR_T --- 365 unchanged lines hidden (view full) --- 400 401/* Execute the given struct dfa on the buffer of characters. The 402 last byte of the buffer must equal the end-of-line byte. 403 The final argument points to a flag that will 404 be set if further examination by a backtracking matcher is needed in 405 order to verify backreferencing; otherwise the flag will be cleared. 406 Returns (size_t) -1 if no match is found, or the offset of the first 407 character after the first & shortest matching string in the buffer. */ |
410extern size_t dfaexec PARAMS ((struct dfa *, char const *, size_t, int *, 411 struct mb_cache *)); | 408extern size_t dfaexec PARAMS ((struct dfa *, char const *, size_t, int *)); |
412 413/* Free the storage held by the components of a struct dfa. */ 414extern void dfafree PARAMS ((struct dfa *)); 415 416/* Entry points for people who know what they're doing. */ 417 418/* Initialize the components of a struct dfa. */ 419extern void dfainit PARAMS ((struct dfa *)); --- 18 unchanged lines hidden --- | 409 410/* Free the storage held by the components of a struct dfa. */ 411extern void dfafree PARAMS ((struct dfa *)); 412 413/* Entry points for people who know what they're doing. */ 414 415/* Initialize the components of a struct dfa. */ 416extern void dfainit PARAMS ((struct dfa *)); --- 18 unchanged lines hidden --- |