diff options
author | Mark Murray <markm@FreeBSD.org> | 1999-09-04 09:49:02 +0000 |
---|---|---|
committer | Mark Murray <markm@FreeBSD.org> | 1999-09-04 09:49:02 +0000 |
commit | f9ce010afdd3136fc73e2b500f2ed916bf9cfa59 (patch) | |
tree | 9df870c9a350e1cff82aa60ef88de0d501e8c013 /contrib/com_err/compile_et.1 | |
parent | a828799ddda3fd3ebebbc78b112585a2f01d95df (diff) | |
download | src-f9ce010afdd3136fc73e2b500f2ed916bf9cfa59.tar.gz src-f9ce010afdd3136fc73e2b500f2ed916bf9cfa59.zip |
Fix up this for the build; some compatibility files have been added -
these will be submitted back to KTH for inclusion.
Notes
Notes:
svn path=/head/; revision=50880
Diffstat (limited to 'contrib/com_err/compile_et.1')
-rw-r--r-- | contrib/com_err/compile_et.1 | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/contrib/com_err/compile_et.1 b/contrib/com_err/compile_et.1 new file mode 100644 index 000000000000..091038079535 --- /dev/null +++ b/contrib/com_err/compile_et.1 @@ -0,0 +1,78 @@ +.\" Copyright (c) 1988 Massachusetts Institute of Technology, +.\" Student Information Processing Board. All rights reserved. +.\" +.\" $FreeBSD$ +.\" +.Dd November 22, 1988 +.Os +.Dt COMPILE_ET 1 +.Sh NAME +.Nm compile_et +.Nd error table compiler +.Sh SYNOPSIS +.Nm compile_et +.Ar file +.Sh DESCRIPTION +.Nm Compile_et +converts a table listing error-code names and associated messages into +a C source file suitable for use with the +.Xr com_err 3 +library. +.Pp +The source file name must end with a suffix of ``.et''; the file +consists of a declaration supplying the name (up to four characters +long) of the error-code table: + +.Em error_table name + +followed by up to 256 entries of the form: + +.Em error_code name , +" +.Em string +" + +and a final + +.Em end + +to indicate the end of the table. +.Pp +The name of the table is used to construct the name of a subroutine +.Em initialize_XXXX_error_table +which must be called in order for the +.Xr com_err 3 +library to recognize the error table. +.Pp +The various error codes defined are assigned sequentially increasing +numbers (starting with a large number computed as a hash function of +the name of the table); thus for compatibility it is suggested that +new codes be added only to the end of an existing table, and that no +codes be removed from tables. +.Pp +The names defined in the table are placed into a C header file with +preprocessor directives defining them as integer constants of up to +32 bits in magnitude. +.Pp +A C source file is also generated which should be compiled and linked +with the object files which reference these error codes; it contains +the text of the messages and the initialization subroutine. Both C +files have names derived from that of the original source file, with +the ``.et'' suffix replaced by ``.c'' and ``.h''. +.Pp +A ``#'' in the source file is treated as a comment character, and all +remaining text to the end of the source line will be ignored. +.Sh BUGS +Since +.Nm compile_et +uses a very simple parser based on +.Xr yacc 1 , +its error recovery leaves much to be desired. +.Sh "SEE ALSO" +.Xr yacc 1 , +.Xr com_err 3 +.Pp +.Rs +.%A Ken Raeburn +.%T "A Common Error Description Library for UNIX" +.Re |