The message text file contains a header which defines names and language identifiers for use by the message definitions in the body of the file. The header contains zero or more of the following statements:
MessageIdTypedef = [type]
SeverityNames = (name=number[:name])
FacilityNames = (name=number[:name])
LanguageNames = (name=number:filename)
OutputBase = {number}
These keywords have the following meaning:
#define name ((type) 0xnnnnnnnn)
The default value for type is empty, and no type cast is generated. It is the programmer's responsibility to specify a typedef statement in the application source code to define the type. The type used in the typedef must be large enough to accommodate the entire 32-bit message code.
The default value of this keyword is:
SeverityNames=(
Success=0x0
Informational=0x1
Warning=0x2
Error=0x3
)
Severity values occupy the high two bits of a 32-bit message code. Any severity value that does not fit in two bits is an error. The severity codes can be given symbolic names by following each value with :name
The default value of this keyword is:
FacilityNames=(
System=0x0FF
Application=0xFFF
)
Facility codes occupy the low-order 12 bits of the high-order 16 bits of a 32-bit message code. Any facility code that does not fit in 12 bits is an error. This allows for 4096 facility codes. The first 256 codes are reserved for use by the system software. The facility codes can be given symbolic names by following each value with :name
The initial value of LanguageNames is:
LanguageNames=(English=1:MSG00001)
Any new names in the source file which don't override the built-in names are added to the list of valid languages. This allows an application to support private languages with descriptive names. For example, use the following syntax in the .MC file to support messages in both English and Japanese:
LanguageNames=(English=0x409:MSG00409)
LanguageNames=(Japanese=0x411:MSG00411)
MessageId=0x1
Severity=Error
Facility=Runtime
SymbolicName=MSG_BAD_COMMAND
Language=English
You have chosen an incorrect command.
Language=Japanese
òsÉ|é+âRâ}âôâhé¬æIæ=é|éOé_é|é+.
The legal values for number are 10 and 16.
You can use OutputBase in both the header section and the message definition section of the input file. You can change OutputBase as often as you like.