Annotation of embedaddon/ntp/ports/winnt/libntp/messages.h, revision 1.1

1.1     ! misho       1:  /*
        !             2:  Microsoft Developer Support
        !             3:  Copyright (c) 1992 Microsoft Corporation
        !             4: 
        !             5:  This file contains the message definitions for the Win32
        !             6:  syslog support messages for the nntp firewall
        !             7: -------------------------------------------------------------------------
        !             8:  HEADER SECTION
        !             9: 
        !            10:  The header section defines names and language identifiers for use
        !            11:  by the message definitions later in this file. The MessageIdTypedef,
        !            12:  SeverityNames, FacilityNames, and LanguageNames keywords are
        !            13:  optional and not required.
        !            14: 
        !            15: 
        !            16: 
        !            17:  The MessageIdTypedef keyword gives a typedef name that is used in a
        !            18:  type cast for each message code in the generated include file. Each
        !            19:  message code appears in the include file with the format: #define
        !            20:  name ((type) 0xnnnnnnnn) The default value for type is empty, and no
        !            21:  type cast is generated. It is the programmer's responsibility to
        !            22:  specify a typedef statement in the application source code to define
        !            23:  the type. The type used in the typedef must be large enough to
        !            24:  accomodate the entire 32-bit message code.
        !            25: 
        !            26: 
        !            27: 
        !            28:  The SeverityNames keyword defines the set of names that are allowed
        !            29:  as the value of the Severity keyword in the message definition. The
        !            30:  set is delimited by left and right parentheses. Associated with each
        !            31:  severity name is a number that, when shifted left by 30, gives the
        !            32:  bit pattern to logical-OR with the Facility value and MessageId
        !            33:  value to form the full 32-bit message code. The default value of
        !            34:  this keyword is:
        !            35: 
        !            36:  SeverityNames=(
        !            37:    Success=0x0
        !            38:    Informational=0x1
        !            39:    Warning=0x2
        !            40:    Error=0x3
        !            41:    )
        !            42: 
        !            43:  Severity values occupy the high two bits of a 32-bit message code.
        !            44:  Any severity value that does not fit in two bits is an error. The
        !            45:  severity codes can be given symbolic names by following each value
        !            46:  with :name
        !            47: 
        !            48: 
        !            49: FacilityNames=(System=0x0:FACILITY_SYSTEM
        !            50:                Runtime=0x2:FACILITY_RUNTIME
        !            51:                Stubs=0x3:FACILITY_STUBS
        !            52:                Io=0x4:FACILITY_IO_ERROR_CODE
        !            53:               )
        !            54: 
        !            55:  The FacilityNames keyword defines the set of names that are allowed
        !            56:  as the value of the Facility keyword in the message definition. The
        !            57:  set is delimited by left and right parentheses. Associated with each
        !            58:  facility name is a number that, when shift it left by 16 bits, gives
        !            59:  the bit pattern to logical-OR with the Severity value and MessageId
        !            60:  value to form the full 32-bit message code. The default value of
        !            61:  this keyword is:
        !            62: 
        !            63:  FacilityNames=(
        !            64:    System=0x0FF
        !            65:    Application=0xFFF
        !            66:    )
        !            67: 
        !            68:  Facility codes occupy the low order 12 bits of the high order
        !            69:  16-bits of a 32-bit message code. Any facility code that does not
        !            70:  fit in 12 bits is an error. This allows for 4,096 facility codes.
        !            71:  The first 256 codes are reserved for use by the system software. The
        !            72:  facility codes can be given symbolic names by following each value
        !            73:  with :name
        !            74: 
        !            75: 
        !            76:  The LanguageNames keyword defines the set of names that are allowed
        !            77:  as the value of the Language keyword in the message definition. The
        !            78:  set is delimited by left and right parentheses. Associated with each
        !            79:  language name is a number and a file name that are used to name the
        !            80:  generated resource file that contains the messages for that
        !            81:  language. The number corresponds to the language identifier to use
        !            82:  in the resource table. The number is separated from the file name
        !            83:  with a colon. The initial value of LanguageNames is:
        !            84: 
        !            85:  LanguageNames=(English=1:MSG00001)
        !            86: 
        !            87:  Any new names in the source file which don't override the built-in
        !            88:  names are added to the list of valid languages. This allows an
        !            89:  application to support private languages with descriptive names.
        !            90: 
        !            91: 
        !            92: -------------------------------------------------------------------------
        !            93:  MESSAGE DEFINITION SECTION
        !            94: 
        !            95:  Following the header section is the body of the Message Compiler
        !            96:  source file. The body consists of zero or more message definitions.
        !            97:  Each message definition begins with one or more of the following
        !            98:  statements:
        !            99: 
        !           100:  MessageId = [number|+number]
        !           101:  Severity = severity_name
        !           102:  Facility = facility_name
        !           103:  SymbolicName = name
        !           104: 
        !           105:  The MessageId statement marks the beginning of the message
        !           106:  definition. A MessageID statement is required for each message,
        !           107:  although the value is optional. If no value is specified, the value
        !           108:  used is the previous value for the facility plus one. If the value
        !           109:  is specified as +number then the value used is the previous value
        !           110:  for the facility, plus the number after the plus sign. Otherwise, if
        !           111:  a numeric value is given, that value is used. Any MessageId value
        !           112:  that does not fit in 16 bits is an error.
        !           113: 
        !           114:  The Severity and Facility statements are optional. These statements
        !           115:  specify additional bits to OR into the final 32-bit message code. If
        !           116:  not specified they default to the value last specified for a message
        !           117:  definition. The initial values prior to processing the first message
        !           118:  definition are:
        !           119: 
        !           120:  Severity=Success
        !           121:  Facility=Application
        !           122: 
        !           123:  The value associated with Severity and Facility must match one of
        !           124:  the names given in the FacilityNames and SeverityNames statements in
        !           125:  the header section. The SymbolicName statement allows you to
        !           126:  associate a C/C++ symbolic constant with the final 32-bit message
        !           127:  code.
        !           128:  */
        !           129: //
        !           130: //  Values are 32 bit values laid out as follows:
        !           131: //
        !           132: //   3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
        !           133: //   1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
        !           134: //  +---+-+-+-----------------------+-------------------------------+
        !           135: //  |Sev|C|R|     Facility          |               Code            |
        !           136: //  +---+-+-+-----------------------+-------------------------------+
        !           137: //
        !           138: //  where
        !           139: //
        !           140: //      Sev - is the severity code
        !           141: //
        !           142: //          00 - Success
        !           143: //          01 - Informational
        !           144: //          10 - Warning
        !           145: //          11 - Error
        !           146: //
        !           147: //      C - is the Customer code flag
        !           148: //
        !           149: //      R - is a reserved bit
        !           150: //
        !           151: //      Facility - is the facility code
        !           152: //
        !           153: //      Code - is the facility's status code
        !           154: //
        !           155: //
        !           156: // Define the facility codes
        !           157: //
        !           158: 
        !           159: 
        !           160: //
        !           161: // Define the severity codes
        !           162: //
        !           163: #define STATUS_SEVERITY_WARNING          0x2
        !           164: #define STATUS_SEVERITY_SUCCESS          0x0
        !           165: #define STATUS_SEVERITY_INFORMATIONAL    0x1
        !           166: #define STATUS_SEVERITY_ERROR            0x3
        !           167: 
        !           168: 
        !           169: //
        !           170: // MessageId: NTP_ERROR
        !           171: //
        !           172: // MessageText:
        !           173: //
        !           174: // %1
        !           175: //
        !           176: #define NTP_ERROR                        ((DWORD)0xC0000001L)
        !           177: 
        !           178: //
        !           179: // MessageId: NTP_WARNING
        !           180: //
        !           181: // MessageText:
        !           182: //
        !           183: // %1
        !           184: // 
        !           185: //
        !           186: #define NTP_WARNING                      ((DWORD)0x80000002L)
        !           187: 
        !           188: //
        !           189: // MessageId: NTP_INFO
        !           190: //
        !           191: // MessageText:
        !           192: //
        !           193: // %1
        !           194: // 
        !           195: // 
        !           196: // 
        !           197: //
        !           198: #define NTP_INFO                         ((DWORD)0x40000003L)
        !           199: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>