/[dtapublic]/projs/trunk/shared_source/c_tcl_base_7_5_w_mods/tclregexp.h
ViewVC logotype

Diff of /projs/trunk/shared_source/c_tcl_base_7_5_w_mods/tclregexp.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 67 by dashley, Mon Oct 31 00:57:34 2016 UTC revision 71 by dashley, Sat Nov 5 11:07:06 2016 UTC
# Line 1  Line 1 
1  /* $Header$ */  /* $Header$ */
2  /*  /*
3   * tclRegexp.h --   * tclRegexp.h --
4   *   *
5   *      This file contains definitions used internally by Henry   *      This file contains definitions used internally by Henry
6   *      Spencer's regular expression code.   *      Spencer's regular expression code.
7   *   *
8   * Copyright (c) 1998 by Sun Microsystems, Inc.   * Copyright (c) 1998 by Sun Microsystems, Inc.
9   * Copyright (c) 1998-1999 by Scriptics Corporation.   * Copyright (c) 1998-1999 by Scriptics Corporation.
10   *   *
11   * See the file "license.terms" for information on usage and redistribution   * See the file "license.terms" for information on usage and redistribution
12   * of this file, and for a DISCLAIMER OF ALL WARRANTIES.   * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
13   *   *
14   * RCS: @(#) $Id: tclregexp.h,v 1.1.1.1 2001/06/13 04:45:39 dtashley Exp $   * RCS: @(#) $Id: tclregexp.h,v 1.1.1.1 2001/06/13 04:45:39 dtashley Exp $
15   */   */
16    
17  #ifndef _TCLREGEXP  #ifndef _TCLREGEXP
18  #define _TCLREGEXP  #define _TCLREGEXP
19    
20  #include "regex.h"  #include "regex.h"
21    
22  #ifdef BUILD_tcl  #ifdef BUILD_tcl
23  # undef TCL_STORAGE_CLASS  # undef TCL_STORAGE_CLASS
24  # define TCL_STORAGE_CLASS DLLEXPORT  # define TCL_STORAGE_CLASS DLLEXPORT
25  #endif  #endif
26    
27  /*  /*
28   * The TclRegexp structure encapsulates a compiled regex_t,   * The TclRegexp structure encapsulates a compiled regex_t,
29   * the flags that were used to compile it, and an array of pointers   * the flags that were used to compile it, and an array of pointers
30   * that are used to indicate subexpressions after a call to Tcl_RegExpExec.   * that are used to indicate subexpressions after a call to Tcl_RegExpExec.
31   * Note that the string and objPtr are mutually exclusive.  These values   * Note that the string and objPtr are mutually exclusive.  These values
32   * are needed by Tcl_RegExpRange in order to return pointers into the   * are needed by Tcl_RegExpRange in order to return pointers into the
33   * original string.   * original string.
34   */   */
35    
36  typedef struct TclRegexp {  typedef struct TclRegexp {
37      int flags;                  /* Regexp compile flags. */      int flags;                  /* Regexp compile flags. */
38      regex_t re;                 /* Compiled re, includes number of      regex_t re;                 /* Compiled re, includes number of
39                                   * subexpressions. */                                   * subexpressions. */
40      CONST char *string;         /* Last string passed to Tcl_RegExpExec. */      CONST char *string;         /* Last string passed to Tcl_RegExpExec. */
41      Tcl_Obj *objPtr;            /* Last object passed to Tcl_RegExpExecObj. */      Tcl_Obj *objPtr;            /* Last object passed to Tcl_RegExpExecObj. */
42      regmatch_t *matches;        /* Array of indices into the Tcl_UniChar      regmatch_t *matches;        /* Array of indices into the Tcl_UniChar
43                                   * representation of the last string matched                                   * representation of the last string matched
44                                   * with this regexp to indicate the location                                   * with this regexp to indicate the location
45                                   * of subexpressions. */                                   * of subexpressions. */
46      rm_detail_t details;        /* Detailed information on match (currently      rm_detail_t details;        /* Detailed information on match (currently
47                                   * used only for REG_EXPECT). */                                   * used only for REG_EXPECT). */
48      int refCount;               /* Count of number of references to this      int refCount;               /* Count of number of references to this
49                                   * compiled regexp. */                                   * compiled regexp. */
50  } TclRegexp;  } TclRegexp;
51    
52  #endif /* _TCLREGEXP */  #endif /* _TCLREGEXP */
53    
54  /* End of tclregexp.h */  /* End of tclregexp.h */

Legend:
Removed from v.67  
changed lines
  Added in v.71

dashley@gmail.com
ViewVC Help
Powered by ViewVC 1.1.25