version 1.8, 2000/02/19 12:07:18 |
version 1.9, 2000/03/05 20:09:21 |
|
|
.Xr com_err 3 |
.Xr com_err 3 |
library. |
library. |
.Pp |
.Pp |
The source file name must end with a suffix of ``.et''; the file |
The source file name must end with a suffix of |
|
.Dq .et ; |
|
the file |
consists of headers and declarations supplying the name (up to four characters |
consists of headers and declarations supplying the name (up to four characters |
long) of the error-code table. |
long) of the error-code table. |
|
.Pp |
The file may have these declarations: |
The file may have these declarations: |
|
.Bl -tag -width Ds |
.Em id string |
.It Sy id Ar string |
|
Specify |
where string is a revision control system tag. |
.Ar string |
|
as a revision control system tag. |
.Em prefix string |
.It Sy prefix Ar string |
|
Prepends |
where string is prepended to all error codes specified in the file. |
.Ar string |
|
to all error codes specified in the file. |
.Em error_table name |
.It Sy error_table Ar name |
|
Specifies the name of the error table. |
which specifies the name of the error table. |
.It Sy index Ar number |
|
Sets the assigned error number for the next entry. |
.Em index number |
.It Xo Sy error_code |
|
.Ar name , |
sets the assigned error number for the next entry. |
.Qq Ar string |
|
.Xc |
.Em error_code name , |
Declares an error code called |
" |
.Ar name |
.Em string |
with description |
" |
.Ar string ; |
|
up to 256 error codes are allowed. |
declares an error code called name with description name. Upto |
.It Sy end |
256 error codes are allowed. |
Indicates the end of the table. |
|
.El |
and a final |
|
|
|
.Em end |
|
|
|
to indicate the end of the table. |
|
|
|
.Pp |
.Pp |
The name of the table is used to construct the name of a subroutine |
The name of the table is used to construct the name of a subroutine |
.Em initialize_XXXX_error_table |
.Em initialize_XXXX_error_table |
|
|
with the object files which reference these error codes; it contains |
with the object files which reference these error codes; it contains |
the text of the messages and the initialization subroutine. Both C |
the text of the messages and the initialization subroutine. Both C |
files have names derived from that of the original source file, with |
files have names derived from that of the original source file, with |
the ``.et'' suffix replaced by ``.c'' and ``.h''. |
the |
|
.Dq .et |
|
suffix replaced by |
|
.Dq \&.c |
|
and |
|
.Dq \&.h . |
.Pp |
.Pp |
A ``#'' in the source file is treated as a comment character, and all |
A hash mark |
remaining text to the end of the source line will be ignored. |
.Pq Ql # |
|
in the source file is treated as a comment character; subsequent |
|
characters to the end of the source line will be ignored. |
.Sh BUGS |
.Sh BUGS |
Since |
Since |
.Nm |
.Nm |
|
|
.Sh SEE ALSO |
.Sh SEE ALSO |
.Xr yacc 1 , |
.Xr yacc 1 , |
.Xr com_err 3 |
.Xr com_err 3 |
|
.\" XXX - use .br here to work-around apparent bug in mdoc |
|
.br |
.Pp |
.Pp |
.Rs |
.Rs |
.%A Ken Raeburn |
.%A Ken Raeburn |