Deleted Added
full compact
regcomp.c (62754) regcomp.c (62755)
1/*-
2 * Copyright (c) 1992, 1993, 1994 Henry Spencer.
3 * Copyright (c) 1992, 1993, 1994
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * Henry Spencer.
8 *

--- 22 unchanged lines hidden (view full) ---

31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 * 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 * @(#)regcomp.c 8.5 (Berkeley) 3/20/94
38 *
1/*-
2 * Copyright (c) 1992, 1993, 1994 Henry Spencer.
3 * Copyright (c) 1992, 1993, 1994
4 * The Regents of the University of California. All rights reserved.
5 *
6 * This code is derived from software contributed to Berkeley by
7 * Henry Spencer.
8 *

--- 22 unchanged lines hidden (view full) ---

31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 * 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 * @(#)regcomp.c 8.5 (Berkeley) 3/20/94
38 *
39 * $FreeBSD: head/lib/libc/regex/regcomp.c 62754 2000-07-07 07:46:36Z dcs $
39 * $FreeBSD: head/lib/libc/regex/regcomp.c 62755 2000-07-07 07:47:39Z dcs $
40 */
41
42#if defined(LIBC_SCCS) && !defined(lint)
43static char sccsid[] = "@(#)regcomp.c 8.5 (Berkeley) 3/20/94";
44#endif /* LIBC_SCCS and not lint */
45
46#include <sys/types.h>
47#include <stdio.h>

--- 226 unchanged lines hidden (view full) ---

274 stripsnug(p, g);
275 findmust(p, g);
276 /* only use Boyer-Moore algorithm if the pattern is bigger
277 * than three characters
278 */
279 if(g->mlen > 3) {
280 computejumps(p, g);
281 computematchjumps(p, g);
40 */
41
42#if defined(LIBC_SCCS) && !defined(lint)
43static char sccsid[] = "@(#)regcomp.c 8.5 (Berkeley) 3/20/94";
44#endif /* LIBC_SCCS and not lint */
45
46#include <sys/types.h>
47#include <stdio.h>

--- 226 unchanged lines hidden (view full) ---

274 stripsnug(p, g);
275 findmust(p, g);
276 /* only use Boyer-Moore algorithm if the pattern is bigger
277 * than three characters
278 */
279 if(g->mlen > 3) {
280 computejumps(p, g);
281 computematchjumps(p, g);
282 if(g->matchjump == NULL) {
282 if(g->matchjump == NULL && g->charjump != NULL) {
283 free(g->charjump);
284 g->charjump = NULL;
285 }
286 }
287 g->nplus = pluscount(p, g);
288 g->magic = MAGIC2;
289 preg->re_nsub = g->nsub;
290 preg->re_g = g;

--- 1794 unchanged lines hidden ---
283 free(g->charjump);
284 g->charjump = NULL;
285 }
286 }
287 g->nplus = pluscount(p, g);
288 g->magic = MAGIC2;
289 preg->re_nsub = g->nsub;
290 preg->re_g = g;

--- 1794 unchanged lines hidden ---