os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/generic/tclRegexp.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
/* 
sl@0
     2
 * tclRegexp.h --
sl@0
     3
 *
sl@0
     4
 * 	This file contains definitions used internally by Henry
sl@0
     5
 *	Spencer's regular expression code.
sl@0
     6
 *
sl@0
     7
 * Copyright (c) 1998 by Sun Microsystems, Inc.
sl@0
     8
 * Copyright (c) 1998-1999 by Scriptics Corporation.
sl@0
     9
 *
sl@0
    10
 * See the file "license.terms" for information on usage and redistribution
sl@0
    11
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
sl@0
    12
 *
sl@0
    13
 * RCS: @(#) $Id: tclRegexp.h,v 1.11 1999/08/02 17:45:38 redman Exp $
sl@0
    14
 */
sl@0
    15
sl@0
    16
#ifndef _TCLREGEXP
sl@0
    17
#define _TCLREGEXP
sl@0
    18
sl@0
    19
#include "regex.h"
sl@0
    20
sl@0
    21
#ifdef BUILD_tcl
sl@0
    22
# undef TCL_STORAGE_CLASS
sl@0
    23
# define TCL_STORAGE_CLASS DLLEXPORT
sl@0
    24
#endif
sl@0
    25
sl@0
    26
/*
sl@0
    27
 * The TclRegexp structure encapsulates a compiled regex_t,
sl@0
    28
 * the flags that were used to compile it, and an array of pointers
sl@0
    29
 * that are used to indicate subexpressions after a call to Tcl_RegExpExec.
sl@0
    30
 * Note that the string and objPtr are mutually exclusive.  These values
sl@0
    31
 * are needed by Tcl_RegExpRange in order to return pointers into the
sl@0
    32
 * original string.
sl@0
    33
 */
sl@0
    34
sl@0
    35
typedef struct TclRegexp {
sl@0
    36
    int flags;			/* Regexp compile flags. */
sl@0
    37
    regex_t re;			/* Compiled re, includes number of
sl@0
    38
				 * subexpressions. */
sl@0
    39
    CONST char *string;		/* Last string passed to Tcl_RegExpExec. */
sl@0
    40
    Tcl_Obj *objPtr;		/* Last object passed to Tcl_RegExpExecObj. */
sl@0
    41
    regmatch_t *matches;	/* Array of indices into the Tcl_UniChar
sl@0
    42
				 * representation of the last string matched
sl@0
    43
				 * with this regexp to indicate the location
sl@0
    44
				 * of subexpressions. */
sl@0
    45
    rm_detail_t details;	/* Detailed information on match (currently
sl@0
    46
				 * used only for REG_EXPECT). */
sl@0
    47
    int refCount;		/* Count of number of references to this
sl@0
    48
				 * compiled regexp. */
sl@0
    49
} TclRegexp;
sl@0
    50
sl@0
    51
#endif /* _TCLREGEXP */