[BACK]Return to compile_et.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / compile_et

Diff for /src/usr.bin/compile_et/Attic/compile_et.1 between version 1.2 and 1.3

version 1.2, 1996/11/11 05:45:45 version 1.3, 1997/07/01 07:22:04
Line 2 
Line 2 
 .\" Student Information Processing Board.  All rights reserved.  .\" Student Information Processing Board.  All rights reserved.
 .\"  .\"
 .\" $OpenBSD$  .\" $OpenBSD$
   .\" $Header$
 .\"  .\"
 .TH COMPILE_ET 1 "22 Nov 1988" SIPB  .Dd     November 22, 1988
 .SH NAME  .Os
 compile_et \- error table compiler  .Dt COMPILE_ET 1
 .SH SYNOPSIS  .Sh NAME
 .B compile_et  .Nm compile_et
 file  .Nd error table compiler
 .SH DESCRIPTION  .Sh SYNOPSIS
 .B Compile_et  .Nm compile_et
   .Ar file
   .Sh DESCRIPTION
   .Nm Compile_et
 converts a table listing error-code names and associated messages into  converts a table listing error-code names and associated messages into
 a C source file suitable for use with the  a C source file suitable for use with the
 .IR com_err (3)  .Xr com_err 3
 library.  library.
   .Pp
 The source file name must end with a suffix of ``.et''; the file  The source file name must end with a suffix of ``.et''; the file
 consists of a declaration supplying the name (up to four characters  consists of a declaration supplying the name (up to four characters
 long) of the error-code table:  long) of the error-code table:
   
 .B error_table  .Em error_table name
 .I name  
   
 followed by up to 256 entries of the form:  followed by up to 256 entries of the form:
   
 .B error_code  .Em error_code name ,
 .I name,  
 "  "
 .I string  .Em string
 "  "
   
 and a final  and a final
   
 .B end  .Em end
   
 to indicate the end of the table.  to indicate the end of the table.
   .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
 .I initialize_XXXX_error_table  .Em initialize_XXXX_error_table
 which must be called in order for the  which must be called in order for the
 .I com_err  .Xr com_err 3
 library to recognize the error table.  library to recognize the error table.
   .Pp
 The various error codes defined are assigned sequentially increasing  The various error codes defined are assigned sequentially increasing
 numbers (starting with a large number computed as a hash function of  numbers (starting with a large number computed as a hash function of
 the name of the table); thus for compatibility it is suggested that  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  new codes be added only to the end of an existing table, and that no
 codes be removed from tables.  codes be removed from tables.
   .Pp
 The names defined in the table are placed into a C header file with  The names defined in the table are placed into a C header file with
 preprocessor directives defining them as integer constants of up to  preprocessor directives defining them as integer constants of up to
 32 bits in magnitude.  32 bits in magnitude.
   .Pp
 A C source file is also generated which should be compiled and linked  A C source file is also generated which should be compiled and linked
 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 ``.et'' suffix replaced by ``.c'' and ``.h''.
   .Pp
 A ``#'' in the source file is treated as a comment character, and all  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.  remaining text to the end of the source line will be ignored.
   .Sh BUGS
 .SH BUGS  
   
 Since  Since
 .B compile_et  .Nm compile_et
 uses a very simple parser based on  uses a very simple parser based on
 .IR yacc (1),  .Xr yacc 1 ,
 its error recovery leaves much to be desired.  its error recovery leaves much to be desired.
   .Sh "SEE ALSO"
 .\" .IR for manual entries  .Xr yacc 1 ,
 .\" .PP for paragraph breaks  .Xr com_err 3
   .Pp
 .SH "SEE ALSO"  .Rs
 com_err (3).  .%A Ken Raeburn
   .%T "A Common Error Description Library for UNIX"
 Ken Raeburn, "A Common Error Description Library for UNIX".  .Re

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3