1 .\" Copyright (c) 1988 Massachusetts Institute of Technology,
2 .\" Student Information Processing Board.
4 .TH COM_ERR 3 "22 Nov 1988" SIPB
6 com_err \- common error display routine
9 #include <et/com_err.h>
11 void com_err (whoami, code, format, ...);
16 proc = set_com_err_hook (proc);
20 ) (const char *, long, const char *, va_list);
23 proc = reset_com_err_hook ();
25 void initialize_XXXX_error_table ();
29 displays an error message on the standard error stream
35 string, which should specify the program name or some subportion of
36 a program, followed by an error message generated from the
40 and a string produced using the
42 string and any following arguments, in the same style as
49 this defines a procedure which is called with the arguments passed to
51 instead of the default internal procedure which sends the formatted
52 text to error output. Thus the error messages from a program can all
53 easily be diverted to another form of diagnostic logging, such as
56 may be used to restore the behavior of
58 to its default form. Both procedures return the previous ``hook''
59 value. These ``hook'' procedures must have the declaration given for
61 above in the synopsis.
64 .I initialize_XXXX_error_table
65 routine is generated mechanically by
67 from a source file containing names and associated strings. Each
68 table has a name of up to four characters, which is used in place of
71 in the name of the routine. These routines should be called before
72 any of the corresponding error codes are used, so that the
74 library will recognize error codes from these tables when they are
79 header file should be included in any source file that uses routines
82 library; executable files must be linked using
86 library to be included.
88 .\" .IR for manual entries
89 .\" .PP for paragraph breaks
92 compile_et (1), syslog (3).
94 Ken Raeburn, "A Common Error Description Library for UNIX".