forked from Airr/RAEditC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathData.c
151 lines (137 loc) · 4.29 KB
/
Data.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
#include "Data.h"
// .const
char *szScrollBar = "ScrollBar";
char *szStatic = "Static";
char *szButton = "Button";
char *szToolTips = "Tooltips_class32";
char *szToolTip = "RAEdit control";
char *szSplitterBar = "Splitter Bar";
char *szLineNumber = "Show/Hide Linenumbers";
char *szExpand = "Expand all";
char *szCollapse = "Collapse all";
char *szLock = "Lock/Unlock Tab";
char *szChanged = "Changed state";
char *szX = "X";
char *szW = "W";
char *szI = "I";
char *szSpace = " ";
char *szTab = "\t";
char *szComment = "comment +";
char *szInclude = "include";
char *szIncludelib = "includelib";
char *szMemFailLine = "Memory allocation failed! (Line)";
char *szMemFailChar = "Memory allocation failed! (Char)";
char *szMemFailUndo = "Memory allocation failed! (Undo)";
char *szMemFailSyntax = "Memory allocation failed! (Syntax)";
char *szGlobalFail = "GlobalAlloc failed.";
char *szHeapFail = "HeapAlloc failed.";
char *szRAEditClass = "RAEdit";
char *szEditClassName = "RAEditChild";
// .data
BYTE CharTabInit[] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 00
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 10
// ! " # $ % & ' ( ) * + , - . /
0,2,5,3,2,2,2,5,2,2,2,2,2,2,3,2, // 20
// 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
1,1,1,1,1,1,1,1,1,1,2,4,2,2,2,3, // 30
// @ A B C D E F G H I J K L M N O
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // 40
// P Q R S T U V W X Y Z [ \ ] ^ _
1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,1, // 50
// ` a b c d e f g h i j k l m n o
0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // 60
// p q r s t u v w x y z { | } ~
1,1,1,1,1,1,1,1,1,1,1,2,2,2,0,0, // 70
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 80
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 90
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // A0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // B0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // C0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // D0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // E0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // F0
};
BYTE CharTab[] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 00
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 10
// ! " # $ % & ' ( ) * + , - . /
0,2,5,3,2,2,2,5,2,2,2,2,2,2,3,2, // 20
// 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
1,1,1,1,1,1,1,1,1,1,2,4,2,2,2,3, // 30
// @ A B C D E F G H I J K L M N O
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // 40
// P Q R S T U V W X Y Z [ \ ] ^ _
1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,1, // 50
// ` a b c d e f g h i j k l m n o
0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // 60
// p q r s t u v w x y z { | } ~
1,1,1,1,1,1,1,1,1,1,1,2,2,2,0,0, // 70
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 80
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 90
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // A0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // B0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // C0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // D0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // E0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // F0
};
BYTE CaseTab[] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 00
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 10
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 20
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 30
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 40
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 50
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 60
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 70
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 80
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 90
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // A0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // B0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // C0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // D0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // E0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // F0
};
char szLine[32] = "Ln: ";
// data?
HINSTANCE hInstance;
HBITMAP hBmpLnr;
HBITMAP hBmpExp;
HBITMAP hBmpCol;
HBITMAP hBmpLck;
HCURSOR hHSCur;
HCURSOR hSelCur;
HIMAGELIST hIml;
HBRUSH hBrTlt;
DWORD SBWT; // Scroll bar width, GetSystemMetrics(SM_CXVSCROLL)
WNDPROC OldStateProc;
WNDPROC OldSplittBtnProc;
WNDPROC OldFakeToolTipProc;
HANDLE hWrdMem;
ULONG_PTR cbWrdMem;
DWORD rpWrdFree;
DWORD fSelState;
DWORD iYp;
BOOL fOnBM;
DWORD fOnSel;
DWORD nBmid; // Bookmark id
DWORD nUndoid;
BOOL fSize;
UINT_PTR TimerID;
TIMER tmr1;
TIMER tmr2;
POINT ptDrag;
HWND hDragWin;
EDIT *hDragSourceMem;
CHARRANGE cpDragSource;
DWORD peff; // Drop effect
DWORD MpX;
DWORD MpY;
DWORD fTlln;
BYTE blockdefs[4096];
BYTE bracketstart[16];
BYTE bracketend[16];
BYTE bracketcont[16];
BOOL fNoSaveUndo;