⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 error.1

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 1
字号:
.\" SCCSID: @(#)error.1	8.2	12/3/90.TH error 1.SH Nameerror \- analyze and disperse compiler error messages.SH Syntax.B error[\fB\-n\fR] [\fB\-s\fR] [\fB\-q\fR] [\fB\-v\fR] [\fB\-t\fI suffixlist\fR\|] [\fB\-I\fI ignorefile\fR] [\|\fIname\fR\|].SH Description.NXB "error command".NXB "error message" "viewing in source code"The .PN errorcommand analyzes and optionally disperses the diagnostic error messagesproduced by a number of compilers and language processors to the sourcefile and line where the errors occurred.  It permits error messagesand source code to be viewed simultaneouslywithout using multiple windows in a screen editor..PPThe.PN errorcommand looks at the error messages,either from the specified file \fIname\fRor from the standard input.  Itattempts to determine the following:  whichlanguage processor produced each error message,to which source file and line numberthe error message refers, andif the error message is to be ignored or not.It also inserts the error message intothe source file as a comment on the line preceding the onewhere the error occurred..PPError messages that cannot be categorized by language processoror content are not inserted into any file,but are sent to the standard output.The.PN errorcommand touches source files only after all input has been read.By specifying the.B \-qquery option,the user is asked to confirm any potentiallydangerous (such as touching a file) or verbose action..PPIf the.B \-ttouch option and associated suffix list is given, .PN errorrestricts itself to touching only those files with suffixesin the suffix list.Error also can be asked (by specifying.B \-v)to invoke .MS vi 1 on the files in which error messages were inserted; this preventsthe need to remember the names of the files with errors..PPThe.PN errorcommand is intended to be runwith its standard inputconnected via a pipe to the error message source.Some language processors put error messageson their standard error file;others put their messages on the standard output.Hence, both error sources should be piped together into.PN error .For example, when using the \fIcsh\fP syntax,.EXmake \-s lint |\|& error \-q \-v.EE.PPanalyzes all the error messages producedby whatever programs.PN makeruns when making lint..PPThe.PN errorcommand knows about the error messages produced by the following:.PN make ,.PN cc ,.PN cpp ,.PN ccom ,.PN as ,.PN ld ,.PN lint ,.PN pi ,.PN pcand.PN f77.The.PN errorcommand knows a standard format for error messages produced bythe language processors,so it is sensitive to changes in these formats.For all languages except .I Pascal,error messages are restricted to be on one line.Some error messages refer to more than one line in more thanone file.The.PN errorcommand duplicates the error message and inserts it atall of the places referenced..PPThe.PN errorcommanddoes one of six things with error messages..TP 20.I synchronizeSome language processors produce short errors describingwhich file it is processing.The.PN error command uses these to determine the file name for languages thatdon't include the file name in each error message.These synchronization messages are consumed entirely by.PN error ..TP 20.I discardError messages from.PN lintthat refer to one of the two.PN lintlibraries, /usr/lib/llib-lc and /usr/lib/llib-port are discarded,to prevent accidently touching these libraries.Again, these error messages are consumed entirely by.PN error ..TP 20.I nullifyError messages from.PN lintcan be nullified if they refer to a specific function,which is known to generate diagnostics which are not interesting.Nullified error messages are not inserted into the source file,but are written to the standard output.The names of functions to ignore are taken fromeither the file named .PN \&.errorrcin the users's home directory, or from the file named by the.B \-Ioption.If the file does not exist,no error messages are nullified.If the file does exist, there must be one functionname per line..TP 20.I not file specificError messages that can't be discerned are grouped together,and written to the standard output before any files are touched.They will not be inserted into any source file..TP 20.I file specificError message that refer to a specific file,but to no specific line,are written to the standard output whenthat file is touched..TP 20.I true errorsError messages that can be intuited are candidates forinsertion into the file to which they refer..PPOnly true error messages are candidates for inserting intothe file they refer to.Other error messages are consumed entirely by.PN erroror are written to the standard output.The.PN errorcommand inserts the error messages into the source file on the linepreceding the line the language processor found in error.Each error message is turned into a one line comment for thelanguage,and is internally flaggedwith the string ``###'' atthe beginning of the error,and ``%%%'' at the end of the error.This makes pattern searching for errors easier with an editor,and allows the messages to be easily removed..PPIn addition, each error message contains the source line numberfor the line to which the message refers.A reasonably formatted source program can be recompiledwith the error messages still in it,without having the error messages themselves cause future errors.For poorly formatted source programs in free format languages,such as C or Pascal,it is possible to insert a comment into another comment,which can wreak havoc with a future compilation.To avoid this, programs with comments and sourceon the same line should be formattedso that language statements appear before comments..PPThe.PN errorcommand catches interrupt and terminate signals,and if in the insertion phase,terminates what it is doing..SH Options.NXR "error command" "options"Options available with.PN errorare the following:.IP "\fB\-\|I\fI ignorefile\fR" 20Ignore the functions listed in the specified file (next argument)..IP \fB\-n\fR Does nottouch files and sends error messages to thestandard output..IP \fB\-q\fR Prompts before touching the source file.  A ``y'' or ``n'' to the question is necessary to continue.Absence of the.B \-qoption implies that all referenced files(except those referring to discarded error messages)are to be touched..IP \fB\-S\fR Shows error in unsorted order from the error file..IP \fB\-s\fR Displays.I statisticsfor each error type..IP \fB\-T\fR Terse output..IP "\fB\-\|t\fI suffixlist\fR" Does not touch those files that match the specified suffix.The suffix list is dot separated, and ``*'' wildcards work.Thus the suffix list:.IP\&     ".c.y.foo*.h".IPallows.B errorto touch files ending with ``.c'', ``.y'', ``.foo*'' and ``.h''..IP \fB\-v\fR Invokes the .PN vieditor on each file that had been touched..SH Restrictions.NXR "error command" "restricted"Opens the teletype directly to do user querying..PPSource files with links make a new copy of the file withonly one link to it..PPChanging a language processor's format of error messagesmay cause .PN errorto not understand the error message..PPThe.PN errorcommand, since it is purely mechanical,does not filter out subsequent errors caused by `floodgating'initiated by one syntactically trivial error..PPPascal error messages belong after the lines affected(error puts them before).  The alignment of the `\||\|' markingthe point of error is also disturbed by.PN error ..PPThe.PN errorcommand was designed for work on CRT's at reasonably high speed.It does not work as well on slow speed terminals, and has never beenused on hard-copy terminals..SH Files.TP 15.PN \&~/.errorrcfunction names to ignore for \fIlint\fP error messages.TP.PN /dev/ttyuser's teletype.NXE "error command".NXE "error message" "viewing in source code"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -