[BACK]Return to engine.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libc / regex

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libc/regex/engine.c between version 1.3 and 1.4

version 1.3, 1994/02/23 21:17:45 version 1.4, 1995/01/30 12:19:19
Line 1 
Line 1 
   /*-
    * Copyright (c) 1992, 1993, 1994 Henry Spencer.
    * Copyright (c) 1992, 1993, 1994
    *      The Regents of the University of California.  All rights reserved.
    *
    * This code is derived from software contributed to Berkeley by
    * Henry Spencer.
    *
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
    * 1. Redistributions of source code must retain the above copyright
    *    notice, this list of conditions and the following disclaimer.
    * 2. Redistributions in binary form must reproduce the above copyright
    *    notice, this list of conditions and the following disclaimer in the
    *    documentation and/or other materials provided with the distribution.
    * 3. All advertising materials mentioning features or use of this software
    *    must display the following acknowledgement:
    *      This product includes software developed by the University of
    *      California, Berkeley and its contributors.
    * 4. Neither the name of the University nor the names of its contributors
    *    may be used to endorse or promote products derived from this software
    *    without specific prior written permission.
    *
    * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
    * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
    * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    * SUCH DAMAGE.
    *
    *      @(#)engine.c    8.5 (Berkeley) 3/20/94
    */
   
 /*  /*
  * The matching engine and friends.  This file is #included by regexec.c   * The matching engine and friends.  This file is #included by regexec.c
  * after suitable #defines of a variety of macros used herein, so that   * after suitable #defines of a variety of macros used herein, so that
Line 45  struct match {
Line 84  struct match {
         states empty;           /* empty set of states */          states empty;           /* empty set of states */
 };  };
   
 #include "engine.ih"  /* ========= begin header generated by ./mkh ========= */
   #ifdef __cplusplus
   extern "C" {
   #endif
   
   /* === engine.c === */
   static int matcher __P((struct re_guts *g, char *string, size_t nmatch, regmatch_t pmatch[], int eflags));
   static char *dissect __P((struct match *m, char *start, char *stop, sopno startst, sopno stopst));
   static char *backref __P((struct match *m, char *start, char *stop, sopno startst, sopno stopst, sopno lev));
   static char *fast __P((struct match *m, char *start, char *stop, sopno startst, sopno stopst));
   static char *slow __P((struct match *m, char *start, char *stop, sopno startst, sopno stopst));
   static states step __P((struct re_guts *g, sopno start, sopno stop, states bef, int ch, states aft));
   #define BOL     (OUT+1)
   #define EOL     (BOL+1)
   #define BOLEOL  (BOL+2)
   #define NOTHING (BOL+3)
   #define BOW     (BOL+4)
   #define EOW     (BOL+5)
   #define CODEMAX (BOL+5)         /* highest code used */
   #define NONCHAR(c)      ((c) > CHAR_MAX)
   #define NNONCHAR        (CODEMAX-CHAR_MAX)
   #ifdef REDEBUG
   static void print __P((struct match *m, char *caption, states st, int ch, FILE *d));
   #endif
   #ifdef REDEBUG
   static void at __P((struct match *m, char *title, char *start, char *stop, sopno startst, sopno stopst));
   #endif
   #ifdef REDEBUG
   static char *pchar __P((int ch));
   #endif
   
   #ifdef __cplusplus
   }
   #endif
   /* ========= end header generated by ./mkh ========= */
   
 #ifdef REDEBUG  #ifdef REDEBUG
 #define SP(t, s, c)     print(m, t, s, c, stdout)  #define SP(t, s, c)     print(m, t, s, c, stdout)

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

CVSweb <webmaster@jp.NetBSD.org>