1 .\" Copyright (c) 1988 Massachusetts Institute of Technology,
2 .\" Student Information Processing Board. All rights reserved.
6 .TH COM_ERR 3 "22 Nov 1988" SIPB
8 com_err \- common error display routine
13 void com_err (whoami, code, format, ...);
18 proc = set_com_err_hook (proc);
22 ) (const char *, long, const char *, va_list);
25 proc = reset_com_err_hook ();
27 void initialize_XXXX_error_table ();
31 displays an error message on the standard error stream
37 string, which should specify the program name or some subportion of
38 a program, followed by an error message generated from the
42 and a string produced using the
44 string and any following arguments, in the same style as
51 this defines a procedure which is called with the arguments passed to
53 instead of the default internal procedure which sends the formatted
54 text to error output. Thus the error messages from a program can all
55 easily be diverted to another form of diagnostic logging, such as
58 may be used to restore the behavior of
60 to its default form. Both procedures return the previous ``hook''
61 value. These ``hook'' procedures must have the declaration given for
63 above in the synopsis.
66 .I initialize_XXXX_error_table
67 routine is generated mechanically by
69 from a source file containing names and associated strings. Each
70 table has a name of up to four characters, which is used in place of
73 in the name of the routine. These routines should be called before
74 any of the corresponding error codes are used, so that the
76 library will recognize error codes from these tables when they are
81 header file should be included in any source file that uses routines
84 library; executable files must be linked using
88 library to be included.
90 .\" .IR for manual entries
91 .\" .PP for paragraph breaks
94 compile_et (1), syslog (3).
96 Ken Raeburn, "A Common Error Description Library for UNIX".