source: dev/trunk/abdev/ProjectEditor/BREGEXP.H@ 231

Last change on this file since 231 was 80, checked in by dai_9181, 18 years ago

TheText用のリソースを追加。
単語単位での検索を可能にした。

File size: 2.2 KB
Line 
1/*
2Visual Basic からお使いのときは次のDeclare文を使ってください。
3Private Declare Function Match Lib "bregexp" _
4 (szRegstr As String, szTarget As String) As String
5
6
7Private Declare Function Replace Lib "bregexp" _
8 (szRegstr As String, szTarget As String) As String
9
10Private Declare Function Translate Lib "bregexp" _
11 (szRegstr As String, szTarget As String, ret As String) As Long
12
13Private Declare Function Split Lib "bregexp" _
14 (szRegstr As String, szTarget As String, limit As Long) As Variant
15
16Private 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
28typedef 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)
37extern "C"
38{
39#endif
40
41typedef BREGEXPAPI int (*PFUNC_BMatch)(char* str,char *target,char *targetendp,
42 BREGEXP **rxp,char *msg) ;
43typedef BREGEXPAPI int (*PFUNC_BSubst)(char* str,char *target,char *targetendp,
44 BREGEXP **rxp,char *msg) ;
45typedef BREGEXPAPI int (*PFUNC_BTrans)(char* str,char *target,char *targetendp,
46 BREGEXP **rxp,char *msg) ;
47typedef BREGEXPAPI int (*PFUNC_BSplit)(char* str,char *target,char *targetendp,
48 int limit,BREGEXP **rxp,char *msg);
49typedef BREGEXPAPI void (*PFUNC_BRegfree)(BREGEXP* rx);
50
51typedef BREGEXPAPI char *(*PFUNC_BRegexpVersion)(void);
52
53
54class CRegExp{
55 HINSTANCE hLib;
56public:
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
66 char *compare(HWND hFindDlg,char *buffer,char *exp,BOOL IsBigSmall, bool isWordUnit, int *pLength);
67 char *GetPermuStr(HWND hFindDlg,char *buffer,char *exp,char *szPermu,BOOL IsBigSmall);
68};
69extern CRegExp obj_RegExp;
70
71
72#if defined(__cplusplus)
73}
74#endif
75
76
77#undef BREGEXPAPI
Note: See TracBrowser for help on using the repository browser.