[3] | 1 | /*
|
---|
| 2 | Visual Basic からお使いのときは次のDeclare文を使ってください。
|
---|
| 3 | Private Declare Function Match Lib "bregexp" _
|
---|
| 4 | (szRegstr As String, szTarget As String) As String
|
---|
| 5 |
|
---|
| 6 |
|
---|
| 7 | Private Declare Function Replace Lib "bregexp" _
|
---|
| 8 | (szRegstr As String, szTarget As String) As String
|
---|
| 9 |
|
---|
| 10 | Private Declare Function Translate Lib "bregexp" _
|
---|
| 11 | (szRegstr As String, szTarget As String, ret As String) As Long
|
---|
| 12 |
|
---|
| 13 | Private Declare Function Split Lib "bregexp" _
|
---|
| 14 | (szRegstr As String, szTarget As String, limit As Long) As Variant
|
---|
| 15 |
|
---|
| 16 | Private Declare Function MatchEx Lib "bregexp" _
|
---|
| 17 | (szRegstr As String, szTarget As String, mode As Long) As Variant
|
---|
| 18 |
|
---|
| 19 | */
|
---|
| 20 |
|
---|
| 21 |
|
---|
| 22 | #ifdef _BREGEXP_
|
---|
| 23 | #define BREGEXPAPI __declspec(dllexport)
|
---|
| 24 | #else
|
---|
| 25 | #define BREGEXPAPI __declspec(dllimport)
|
---|
| 26 | #endif
|
---|
| 27 |
|
---|
| 28 | typedef struct bregexp {
|
---|
| 29 | const char *outp; /* result string start ptr */
|
---|
| 30 | const char *outendp; /* result string end ptr */
|
---|
| 31 | const int splitctr; /* split result counter */
|
---|
| 32 | const char **splitp; /* split result pointer ptr */
|
---|
| 33 | int rsv1; /* reserved for external use */
|
---|
| 34 | } BREGEXP;
|
---|
| 35 |
|
---|
| 36 | #if defined(__cplusplus)
|
---|
| 37 | extern "C"
|
---|
| 38 | {
|
---|
| 39 | #endif
|
---|
| 40 |
|
---|
| 41 | typedef BREGEXPAPI int (*PFUNC_BMatch)(char* str,char *target,char *targetendp,
|
---|
| 42 | BREGEXP **rxp,char *msg) ;
|
---|
| 43 | typedef BREGEXPAPI int (*PFUNC_BSubst)(char* str,char *target,char *targetendp,
|
---|
| 44 | BREGEXP **rxp,char *msg) ;
|
---|
| 45 | typedef BREGEXPAPI int (*PFUNC_BTrans)(char* str,char *target,char *targetendp,
|
---|
| 46 | BREGEXP **rxp,char *msg) ;
|
---|
| 47 | typedef BREGEXPAPI int (*PFUNC_BSplit)(char* str,char *target,char *targetendp,
|
---|
| 48 | int limit,BREGEXP **rxp,char *msg);
|
---|
| 49 | typedef BREGEXPAPI void (*PFUNC_BRegfree)(BREGEXP* rx);
|
---|
| 50 |
|
---|
| 51 | typedef BREGEXPAPI char *(*PFUNC_BRegexpVersion)(void);
|
---|
| 52 |
|
---|
| 53 |
|
---|
| 54 | class CRegExp{
|
---|
| 55 | HINSTANCE hLib;
|
---|
| 56 | public:
|
---|
| 57 | CRegExp();
|
---|
| 58 | ~CRegExp();
|
---|
| 59 | PFUNC_BMatch BMatch;
|
---|
| 60 | PFUNC_BSubst BSubst;
|
---|
| 61 | PFUNC_BTrans BTrans;
|
---|
| 62 | PFUNC_BSplit BSplit;
|
---|
| 63 | PFUNC_BRegfree BRegfree;
|
---|
| 64 | PFUNC_BRegexpVersion BRegexpVersion;
|
---|
| 65 |
|
---|
[80] | 66 | char *compare(HWND hFindDlg,char *buffer,char *exp,BOOL IsBigSmall, bool isWordUnit, int *pLength);
|
---|
[3] | 67 | char *GetPermuStr(HWND hFindDlg,char *buffer,char *exp,char *szPermu,BOOL IsBigSmall);
|
---|
| 68 | };
|
---|
| 69 | extern CRegExp obj_RegExp;
|
---|
| 70 |
|
---|
| 71 |
|
---|
| 72 | #if defined(__cplusplus)
|
---|
| 73 | }
|
---|
| 74 | #endif
|
---|
| 75 |
|
---|
| 76 |
|
---|
| 77 | #undef BREGEXPAPI
|
---|