📄 msgbuf.c
字号:
#ifndef lintstatic char sccsid[] = "@(#)msgbuf.c 1.1 92/07/30 SMI"; /* from S5R2 1.4 */#endif# include "messages.h"# include "lerror.h"/* msgbuf is an array of indices into the message buffer file * each entry corresponds to a message in msgtext * if msgbuf[ i ] is 0 then the message i in not buffered * if msgbuf[ i ] is n then the message is in section n of the buffer file */short msgbuf[ NUMMSGS ] = { 0, /* [0] "%s evaluation order undefined" */ 0, /* [1] "%s may be used before set" */ 0, /* [2] "%s redefinition hides earlier one" */ 0, /* [3] "%s set but not used in function %s" */ 0, /* [4] "%s undefined" */ 0, /* [5] "bad structure offset", */ 0, /* [6] "%s unused in function %s" */ 0, /* [7] "& before array or function: ignored" */ 0, /* [8] "=<%c illegal" */ 0, /* [9] "=>%c illegal" */ 0, /* [10] "BCD constant exceeds 6 characters" */ 0, /* [11] "a function is declared as an argument" */ 0, /* [12] "ambiguous assignment: assignment op taken" */ 1, /* [13] "argument %s unused in function %s" */ 0, /* [14] "array of functions is illegal" */ 12, /* [15] "assignment of different structures" */ 0, /* [16] "bad asm construction" */ 0, /* [17] "bad scalar initialization" */ 18, /* [18] "cannot take address of %s" */ 0, /* [19] "cannot initialize extern or union" */ 0, /* [20] "case not in switch" */ 0, /* [21] "comparison of unsigned with negative constant" */ 0, /* [22] "constant argument to NOT" */ 0, /* [23] "constant expected" */ 0, /* [24] "constant in conditional context" */ 0, /* [25] "constant too big for cross-compiler" */ 2, /* [26] "conversion from long may lose accuracy" */ 3, /* [27] "conversion to long may sign-extend incorrectly" */ 0, /* [28] "declared argument %s is missing" */ 0, /* [29] "default not inside switch" */ 0, /* [30] "degenerate unsigned comparison" */ 0, /* [31] "division by 0" */ 0, /* [32] "division by 0." */ 0, /* [33] "duplicate case in switch, %d" */ 0, /* [34] "duplicate default in switch" */ 0, /* [35] "empty array declaration" */ 0, /* [36] "empty character constant" */ 5, /* [37] "enumeration type clash, operator %s" */ 0, /* [38] "field outside of structure" */ 0, /* [39] "field too big" */ 0, /* [40] "fortran declaration must apply to function" */ 0, /* [41] "fortran function has wrong type" */ 0, /* [42] "fortran keyword nonportable" */ 0, /* [43] "function %s has return(e); and return;" */ 0, /* [44] "function declaration in bad context" */ 0, /* [45] "function %s has illegal storage class" */ 0, /* [46] "function illegal in structure or union" */ 0, /* [47] "function returns illegal type" */ 0, /* [48] "gcos BCD constant illegal" */ 4, /* [49] "illegal array size combination" */ 0, /* [50] "illegal break" */ 0, /* [51] "illegal character: %03o (octal)" */ 0, /* [52] "illegal class for %s" */ 8, /* [53] "illegal combination of pointer and integer, op %s" */ 6, /* [54] "illegal comparison of enums" */ 0, /* [55] "illegal continue" */ 0, /* [56] "illegal field size" */ 0, /* [57] "illegal field type" */ 0, /* [58] "illegal function" */ 0, /* [59] "illegal hex constant" */ 0, /* [60] "illegal indirection" */ 0, /* [61] "illegal initialization" */ 0, /* [62] "illegal lhs of assignment operator" */ 14, /* [63] "illegal member use: %s" */ 0, /* [64] "illegal character: '%c'" */ 16, /* [65] "illegal member use: perhaps %s.%s" */ 7, /* [66] "illegal pointer combination" */ 0, /* [67] "illegal pointer subtraction" */ 0, /* [68] "illegal register declaration %s" */ 10, /* [69] "illegal structure pointer combination" */ 0, /* [70] "illegal type combination" */ 0, /* [71] "illegal types in :" */ 0, /* [72] "illegal use of field" */ 0, /* [73] "illegal zero sized structure member: %s" */ 0, /* [74] "illegal {" */ 0, /* [75] "loop not entered at top" */ 17, /* [76] "member of structure or union required" */ 0, /* [77] "newline in BCD constant" */ 0, /* [78] "newline in string or char constant" */ 0, /* [79] "no automatic aggregate initialization" */ 0, /* [80] "case expression must be an integer constant" */ 0, /* [81] "non-null byte ignored in string initializer" */ 0, /* [82] "nonportable character comparison" */ 0, /* [83] "the only portable field type is unsigned int" */ 13, /* [84] "nonunique name demands struct/union or struct/union pointer" */ 0, /* [85] "null dimension" */ 20, /* [86] "null effect" */ 0, /* [87] "old-fashioned assignment operator" */ 0, /* [88] "old-fashioned initialization: use =" */ 0, /* [89] "operands of %s have incompatible types" */ 0, /* [90] "pointer required" */ 9, /* [91] "possible pointer alignment problem" */ 0, /* [92] "precedence confusion possible: parenthesize!" */ 0, /* [93] "precision lost in assignment to (possibly sign-extended) field" */ 0, /* [94] "precision lost in field assignment" */ 0, /* [95] "questionable conversion of function pointer" */ 0, /* [96] "redeclaration of %s" */ 0, /* [97] "redeclaration of formal parameter, %s" */ 22, /* [98] "pointer casts may be troublesome" */ 0, /* [99] "sizeof returns 0" */ 21, /* [100] "statement not reached" */ 0, /* [101] "static variable %s unused" */ 0, /* [102] "struct/union %s never defined" */ 11, /* [103] "struct/union or struct/union pointer required" */ 0, /* [104] "enum %s never defined" */ 19, /* [105] "structure reference must be addressable" */ 0, /* [106] "structure typed union member must be named" */ 0, /* [107] "too many characters in character constant" */ 0, /* [108] "too many initializers" */ 0, /* [109] "type clash in conditional" */ 0, /* [110] "unacceptable operand of &" */ 0, /* [111] "undeclared initializer name %s" */ 0, /* [112] "undefined structure or union" */ 0, /* [113] "unexpected EOF" */ 0, /* [114] "unknown size" */ 0, /* [115] "unsigned comparison with 0?" */ 0, /* [116] "void function %s cannot return value" */ 0, /* [117] "void type for %s" */ 0, /* [118] "void type illegal in expression" */ 0, /* [119] "zero or negative subscript" */ 0, /* [120] "zero size field" */ 0, /* [121] "zero sized structure" */ 0, /* [122] "} expected" */ 23, /* [123] "long in case or switch statement may be truncated" */ 0, /* [124] "illegal octal constant" */ 0, /* [125] "floating point constant folding causes exception" */ 0, /* [126] "old style assign-op causes syntax error" */ 0, /* [127] "main() returns random value to invocation environment" */ 0, /* [128] "`%s' may be indistinguishable from `%s' due to internal name truncation" */ 0, /* [129] "Label in expression" */ 0, /* [130] "switch expression must have integral or enumerated type" */ 0, /* [131] "undefined enum" */ 0, /* [132] "block nesting too deep" */ 0, /* [133] "zero-length array element" */ 0, /* [134] "cannot take size of a function" */ 0, /* [135] "%s is not a permitted struct/union operation" */ 0, /* [136] "negative shift" */ 0, /* [137] "shift greater than size of object" */ 0, /* [138] "%s declared as parameter to non-function" */ 0, /* [139] "declaration of %s hides parameter" */ 0, /* [140] "cannot declare objects of type void" */ 0, /* [141] "static function %s unused" */ 0, /* [142] "illegal pointer conversion" */ 0, /* [143] "unknown preprocessor directive" */};/* msgtotal is a cumulative count of the number of each message buffered * msgtotal[ 0 ] is the number of unbuffered messages generated * * msgtotal is indexed by the buffer index found in msgbuf * *//* note that as an extern it is assumed that msgtotal is initialized to 0 *//* msgtype is an array of codes that indicate how to print a message * each entry corresponds to a message in msgtext */short msgtype[ NUMMSGS ] = { STRINGTY, /* [0] "%s evaluation order undefined" */ STRINGTY, /* [1] "%s may be used before set" */ STRINGTY, /* [2] "%s redefinition hides earlier one" */ DBLSTRTY, /* [3] "%s set but not used in function %s" */ STRINGTY, /* [4] "%s undefined" */ PLAINTY, /* [5] "bad structure offset", */ DBLSTRTY, /* [6] "%s unused in function %s" */ PLAINTY, /* [7] "& before array or function: ignored" */ CHARTY, /* [8] "=<%c illegal" */ CHARTY, /* [9] "=>%c illegal" */ PLAINTY, /* [10] "BCD constant exceeds 6 characters" */ PLAINTY, /* [11] "a function is declared as an argument" */ PLAINTY, /* [12] "ambiguous assignment: assignment op taken" */ DBLSTRTY, /* [13] "argument %s unused in function %s" */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -