-
Notifications
You must be signed in to change notification settings - Fork 1
/
MDKMessages.cpp
63 lines (59 loc) · 1.88 KB
/
MDKMessages.cpp
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
// generated from gentext.pl Messages.xlsx
#ifdef _WIN32
#include <windows.h>
#endif
#include "tp_stub.h"
#include <memory>
#include "MDKMessages.h"
#include "string_table_resource.h"
static tjs_char MESSAGE_WORK_AREA[MAX_MESSAGE_LENGTH];
const int RESOURCE_IDS[NUM_MDK_MESSAGE_MAX] = {
IDS_MDK_UNTERMINATED_COMMENT,
IDS_MDK_UNTERMINATED_STRING_REGEX_OCTET,
IDS_MDK_INSUFFICIENT_MEMORY,
IDS_MDK_NUMBER_PARSE_ERRROR,
IDS_MDK_INVALID_CHAR,
IDS_MDK_SELECTOR_PARSE_ERROR,
IDS_MDK_INTERNAL_ERROR,
IDS_MDK_ALREADY_REGISTERED,
IDS_MDK_CANNOT_REGISTER_WORD,
IDS_MDK_PARAMETER_DUPLICATE,
IDS_MDK_ATTRIBUTE_DUPLICATE,
IDS_MDK_INVALID_FILE_ATTRIBUTE_DOT,
IDS_MDK_INVALID_FILE_ATTRIBUTE_DOUBLE_COLON,
IDS_MDK_INVALID_REFERENCE_DOT,
IDS_MDK_INVALID_REFERENCE_DOUBLE_COLON,
IDS_MDK_INVALID_PLUS_NUMBER,
IDS_MDK_INVALID_MINUS_NUMBER,
IDS_MDK_NOT_NUMBER_AFTER_LTIN_TAG,
IDS_MDK_NOT_CLOSED_LTIN_TAG,
IDS_MDK_NOT_NUMBER_AFTER_LBRACE_IN_TAG,
IDS_MDK_NOT_CLOSED_LBRACE_IN_TAG,
IDS_MDK_NOT_NUMBER_AFTER_LPARENTHESIS_IN_TAG,
IDS_MDK_NOT_CLOSED_LPARENTHESIS_IN_TAG,
IDS_MDK_PARAMETER_PARSE_ERROR_IN_TAG,
IDS_MDK_INVALID_CHAR_DECORATION,
IDS_MDK_INVALID_SYMBOL_IN_TAG,
IDS_MDK_INVALID_CHARACTOR_IN_NAME,
IDS_MDK_INVALID_CHARACTOR_IN_LABEL,
IDS_MDK_INVALID_SELECTOR_SYNTAX,
IDS_MDK_INVALID_NEXT_CONDITION,
IDS_MDK_INVALID_TEXT_IN_NEXT_COMMAND,
IDS_MDK_INVALID_RUBY_SYNTAX,
IDS_MDK_INVALID_REGISTER_RUBY_SYNTAX,
IDS_MDK_INVALID_CHARACTOR_DECORATION_SYNTAX,
IDS_MDK_INVALID_INLINE_GRAPHICS_SYNTAX,
IDS_MDK_INVALID_EMOJI_SYNTAX,
IDS_MDK_UNKNOWN_SYNTAX,
IDS_MDK_UNTARMINATED_TAG,
};
extern HINSTANCE TVPMDKParserInst;
ttstr TVPMdkGetText( int num ) {
int len = ::LoadString( TVPMDKParserInst, RESOURCE_IDS[num], MESSAGE_WORK_AREA, MAX_MESSAGE_LENGTH );
if( len <= 0 ) {
return ttstr(TJS_W("Internal Error.") );
} else {
MESSAGE_WORK_AREA[len] = TJS_W('\0');
return ttstr( MESSAGE_WORK_AREA );
}
}