41 #define stricmp strcasecmp 46 : m_lineCount(1), m_nType(PTNull),
48 m_nInt(0), m_fBool(
false),
49 m_String((unsigned char *)malloc(100)),
50 m_nStringLength(0), m_p(0),
75 #define MAX_TAG_LENGTH 30 128 ":HighlightRefColour",
144 ":InitiallyAvailable",
145 ":ProgramConnectionTag",
151 ":NoTokenActionSlots",
154 ":MultipleSelection",
163 ":OrigRefLineColour",
164 ":OrigRefFillColour",
217 ":GetAvailabilityStatus",
220 ":GetCursorPosition",
225 ":GetHighlightStatus",
226 ":GetInteractionStatus",
229 ":GetLastAnchorFired",
239 ":GetSelectionStatus",
267 ":SetCounterEndPosition",
268 ":SetCounterPosition",
269 ":SetCounterTrigger",
270 ":SetCursorPosition",
277 ":SetHighlightStatus",
278 ":SetInteractionStatus",
310 ":NewAbsoluteColour",
317 ":SetBackgroundColour",
321 ":SetFontAttributes",
322 ":SetVideoDecodeOffset",
323 ":GetVideoDecodeOffset",
326 ":SetBitmapDecodeOffset",
327 ":GetBitmapDecodeOffset",
328 ":SetSliderParameters",
343 {
"black", 0, 0, 0, 0 },
344 {
"transparent", 0, 0, 0, 255 },
345 {
"gray", 128, 128, 128, 0 },
346 {
"darkgray", 192, 192, 192, 0 },
347 {
"red", 255, 0, 0, 0 },
348 {
"darkred", 128, 0, 0, 0 },
349 {
"blue", 0, 0, 255, 0 },
350 {
"darkblue", 0, 0, 128, 0 },
351 {
"green", 0, 255, 0, 0 },
352 {
"darkgreen", 0, 128, 0, 0 },
353 {
"yellow", 255, 255, 0, 0 },
354 {
"cyan", 0, 255, 255, 0 },
355 {
"magenta", 255, 0, 255, 0 }
392 [[clang::fallthrough]];
408 Error(
"Malformed comment");
449 Error(
"Unrecognised tag");
476 Error(
"Unterminated string");
484 Error(
"Insufficient memory");
515 Error(
"Unterminated string");
530 Error(
"Malformed quoted printable string");
546 else if (
m_ch >=
'A' &&
m_ch <=
'F')
548 byte =
m_ch -
'A' + 10;
550 else if (
m_ch >=
'a' &&
m_ch <=
'f')
552 byte =
m_ch -
'a' + 10;
556 Error(
"Malformed quoted printable string");
566 else if (
m_ch >=
'A' &&
m_ch <=
'F')
568 byte +=
m_ch -
'A' + 10;
570 else if (
m_ch >=
'a' &&
m_ch <=
'f')
572 byte +=
m_ch -
'a' + 10;
576 Error(
"Malformed quoted printable string");
588 Error(
"Insufficient memory");
602 MHERROR(
"Base 64 string is not implemented");
606 MHERROR(
"3-byte hex constant is not implemented");
622 bool negative =
m_ch ==
'-';
628 if (m_ch < '0' || m_ch >
'9')
630 Error(
"Expected digit after '-'");
641 MHERROR(
"Hex constant is not implemented");
731 if (
stricmp(buff,
"NULL") == 0)
737 if (
stricmp(buff,
"true") == 0)
744 if (
stricmp(buff,
"false") == 0)
801 unsigned char *str = (
unsigned char *)realloc(
m_String, 4 + 1);
805 Error(
"Insufficient memory");
819 Error(
"Unrecognised enumeration");
850 Error(
"Unknown character");
871 Error(
"Expected ':' after '{'");
1018 Error(
"Expected '('");
1111 Error(
"Unexpected symbol");
static int GetEventType(const char *str)
#define C_GET_ENGINE_SUPPORT
void AddArg(MHParseNode *pNode)
MHParseNode * Parse() override
#define C_GET_RUNNING_STATUS
#define C_SET_OVERWRITE_MODE
#define C_SET_INTERACTION_STATUS
static int GetStyle(const char *str)
#define C_ORIGINAL_CONTENT
#define C_GET_OVERWRITE_MODE
#define C_GET_LAST_ANCHOR_FIRED
#define C_NEW_GENERIC_OCTETSTRING
#define C_SET_TRANSPARENCY
MHParseText(QByteArray &program)
#define C_SET_FILL_COLOUR
#define C_GET_SLIDER_VALUE
#define C_SET_COUNTER_END_POSITION
#define C_GET_LINE_COLOUR
#define C_NEW_GENERIC_CONTENT_REF
#define C_CLOSE_CONNECTION
#define C_GET_FILL_COLOUR
static int GetOrientation(const char *str)
void Error(const char *str)
#define C_SET_PALETTE_REF
static int GetLineOrientation(const char *str)
#define C_SET_CURSOR_POSITION
void Copy(const MHOctetString &str)
#define C_NEW_GENERIC_OBJECT_REF
#define C_GET_ENTRY_POINT
#define C_CONTENT_REFERENCE
enum MHParseText::@12 m_nType
#define C_GET_HIGHLIGHT_STATUS
static int GetStartCorner(const char *str)
#define C_SET_COUNTER_TRIGGER
#define C_SET_CURSOR_SHAPE
#define C_GET_TOKEN_POSITION
#define C_GET_INTERACTION_STATUS
#define C_GET_AVAILABILITY_STATUS
const char * rchTagNames[]
static int GetJustification(const char *str)
#define C_GET_CURSOR_POSITION
#define C_SET_LINE_COLOUR
#define C_SET_SLIDER_VALUE
#define C_GET_ITEM_STATUS
#define C_NEW_GENERIC_BOOLEAN
#define C_TOKEN_GROUP_ITEMS
#define C_READ_PERSISTENT
#define C_SET_CACHE_PRIORITY
#define C_GET_TEXT_CONTENT
#define C_CALL_ACTION_SLOT
static struct @11 colourTable[]
static int FindTag(const char *p)
#define C_SET_COUNTER_POSITION
#define C_STORE_PERSISTENT
#define C_NEW_GENERIC_INTEGER
#define C_SET_ENTRY_POINT
#define C_OPEN_CONNECTION
#define C_SET_HIGHLIGHT_STATUS
#define C_GET_SELECTION_STATUS