/[pcre]/code/trunk/pcreposix.h
ViewVC logotype

Diff of /code/trunk/pcreposix.h

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

revision 117 by ph10, Fri Mar 9 15:59:06 2007 UTC revision 332 by ph10, Sat Apr 5 16:11:05 2008 UTC
# Line 9  Line 9 
9  Compatible Regular Expression library. It defines the things POSIX says should  Compatible Regular Expression library. It defines the things POSIX says should
10  be there. I hope.  be there. I hope.
11    
12              Copyright (c) 1997-2007 University of Cambridge              Copyright (c) 1997-2008 University of Cambridge
13    
14  -----------------------------------------------------------------------------  -----------------------------------------------------------------------------
15  Redistribution and use in source and binary forms, with or without  Redistribution and use in source and binary forms, with or without
# Line 59  extern "C" { Line 59  extern "C" {
59  #define REG_DOTALL    0x0010   /* NOT defined by POSIX. */  #define REG_DOTALL    0x0010   /* NOT defined by POSIX. */
60  #define REG_NOSUB     0x0020  #define REG_NOSUB     0x0020
61  #define REG_UTF8      0x0040   /* NOT defined by POSIX. */  #define REG_UTF8      0x0040   /* NOT defined by POSIX. */
62    #define REG_STARTEND  0x0080   /* BSD feature: pass subject string by so,eo */
63    
64  /* This is not used by PCRE, but by defining it we make it easier  /* This is not used by PCRE, but by defining it we make it easier
65  to slot PCRE into existing programs that make POSIX calls. */  to slot PCRE into existing programs that make POSIX calls. */
# Line 105  typedef struct { Line 106  typedef struct {
106    regoff_t rm_eo;    regoff_t rm_eo;
107  } regmatch_t;  } regmatch_t;
108    
109  /* Win32 uses DLL by default; it needs special stuff for exported functions  /* When an application links to a PCRE DLL in Windows, the symbols that are
110  when building PCRE. */  imported have to be identified as such. When building PCRE, the appropriate
111    export settings are needed, and are set in pcreposix.c before including this
112  #ifndef PCRE_DATA_SCOPE  file. */
113  #ifdef _WIN32  
114  #  ifdef PCRE_DEFINITION  #if defined(_WIN32) && !defined(PCRE_STATIC) && !defined(PCREPOSIX_EXP_DECL)
115  #    ifdef DLL_EXPORT  #  define PCREPOSIX_EXP_DECL  extern __declspec(dllimport)
116  #      define PCRE_DATA_SCOPE __declspec(dllexport)  #  define PCREPOSIX_EXP_DEFN  __declspec(dllimport)
 #    endif  
 #  else  
 #    ifndef PCRE_STATIC  
 #      define PCRE_DATA_SCOPE extern __declspec(dllimport)  
 #    endif  
 #  endif  
 #endif  
117  #endif  #endif
118    
119  /* Otherwise, we use the standard "extern". */  /* By default, we use the standard "extern" declarations. */
120    
121  #ifndef PCRE_DATA_SCOPE  #ifndef PCREPOSIX_EXP_DECL
122  #  ifdef __cplusplus  #  ifdef __cplusplus
123  #    define PCRE_DATA_SCOPE     extern "C"  #    define PCREPOSIX_EXP_DECL  extern "C"
124    #    define PCREPOSIX_EXP_DEFN  extern "C"
125  #  else  #  else
126  #    define PCRE_DATA_SCOPE     extern  #    define PCREPOSIX_EXP_DECL  extern
127    #    define PCREPOSIX_EXP_DEFN  extern
128  #  endif  #  endif
129  #endif  #endif
130    
131  /* The functions */  /* The functions */
132    
133  PCRE_DATA_SCOPE int regcomp(regex_t *, const char *, int);  PCREPOSIX_EXP_DECL int regcomp(regex_t *, const char *, int);
134  PCRE_DATA_SCOPE int regexec(const regex_t *, const char *, size_t,  PCREPOSIX_EXP_DECL int regexec(const regex_t *, const char *, size_t,
135                    regmatch_t *, int);                       regmatch_t *, int);
136  PCRE_DATA_SCOPE size_t regerror(int, const regex_t *, char *, size_t);  PCREPOSIX_EXP_DECL size_t regerror(int, const regex_t *, char *, size_t);
137  PCRE_DATA_SCOPE void regfree(regex_t *);  PCREPOSIX_EXP_DECL void regfree(regex_t *);
138    
139  #ifdef __cplusplus  #ifdef __cplusplus
140  }   /* extern "C" */  }   /* extern "C" */

Legend:
Removed from v.117  
changed lines
  Added in v.332

  ViewVC Help
Powered by ViewVC 1.1.5