-
Notifications
You must be signed in to change notification settings - Fork 0
/
eventtypes.h
73 lines (58 loc) · 3.2 KB
/
eventtypes.h
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
//***************************************************************************
// NARS2000 -- Event Types
//***************************************************************************
/***************************************************************************
NARS2000 -- An Experimental APL Interpreter
Copyright (C) 2006-2010 Sudley Place Software
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***************************************************************************/
// Use this macro to join major and minor events into a single value
#define MAKE_ET(Major,Minor) ((((USHORT) Major) << 16) | (USHORT) Minor)
// Use these macros to split apart an EventType into its major and minor parts
#define ET_MAJOR(et) (((UINT) et) >> 16)
#define ET_MINOR(et) (((UINT) et) & 0xFFFF)
// The EventType type
#define EVENT_TYPES UINT
// The event types, taken from the APL2 Language Reference Manual (Feb 1994)
typedef enum tagEVENT_TYPES
{
EVENTTYPE_NOERROR = MAKE_ET (0, 0),
EVENTTYPE_UNK = MAKE_ET (0, 1),
// Resource errors
EVENTTYPE_BREAK = MAKE_ET (1, 1),
EVENTTYPE_SYSTEM_ERROR = MAKE_ET (1, 2),
EVENTTYPE_WS_FULL = MAKE_ET (1, 3),
EVENTTYPE_LIMIT_ST = MAKE_ET (1, 4),
EVENTTYPE_LIMIT_RANK = MAKE_ET (1, 8),
EVENTTYPE_LIMIT_IMPL = MAKE_ET (1, 13),
// SYNTAX ERRORs
EVENTTYPE_SYNTAX_ERROR_ARGOMITTED = MAKE_ET (2, 1),
EVENTTYPE_SYNTAX_ERROR_ILLFORMED = MAKE_ET (2, 2),
EVENTTYPE_SYNTAX_ERROR_NAMECLASS = MAKE_ET (2, 3),
EVENTTYPE_SYNTAX_ERROR_CONTEXT = MAKE_ET (2, 4),
// VALUE_ERRORs
EVENTTYPE_VALUE_ERROR_NAME = MAKE_ET (3, 1),
EVENTTYPE_VALUE_ERROR_FCN = MAKE_ET (3, 2),
// Explicit argument errors
EVENTTYPE_VALENCE_ERROR = MAKE_ET (5, 1),
EVENTTYPE_RANK_ERROR = MAKE_ET (5, 2),
EVENTTYPE_LENGTH_ERROR = MAKE_ET (5, 3),
EVENTTYPE_DOMAIN_ERROR = MAKE_ET (5, 4),
EVENTTYPE_INDEX_ERROR = MAKE_ET (5, 5),
EVENTTYPE_AXIS_ERROR = MAKE_ET (5, 6),
} EVENT_TYPES, *LPEVENT_TYPES;
// N.B.: Whenever changing the above enum
// be sure to make a corresponding change to
// <SysFnDydES_EM_YY> in <qf_es.c>.
//***************************************************************************
// End of File: eventtypes.h
//***************************************************************************