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>
10 void (*\fIproc\fR) (const char *, long, const char *, va_list);
12 void com_err (const char *whoami, long code, const char *format, ...);
14 proc = set_com_err_hook (proc);
16 proc = reset_com_err_hook ();
18 void initialize_XXXX_error_table ();
22 displays an error message on the standard error stream
28 string, which should specify the program name or some subportion of
29 a program, followed by an error message generated from the
33 and a string produced using the
35 string and any following arguments, in the same style as
42 this defines a procedure which is called with the arguments passed to
44 instead of the default internal procedure which sends the formatted
45 text to error output. Thus the error messages from a program can all
46 easily be diverted to another form of diagnostic logging, such as
49 may be used to restore the behavior of
51 to its default form. Both procedures return the previous ``hook''
52 value. These ``hook'' procedures must have the declaration given for
54 above in the synopsis.
57 .I initialize_XXXX_error_table
58 routine is generated mechanically by
60 from a source file containing names and associated strings. Each
61 table has a name of up to four characters, which is used in place of
64 in the name of the routine. These routines should be called before
65 any of the corresponding error codes are used, so that the
67 library will recognize error codes from these tables when they are
72 header file should be included in any source file that uses routines
75 library; executable files must be linked using
79 library to be included.
81 .\" .IR for manual entries
82 .\" .PP for paragraph breaks
85 compile_et (1), syslog (3).
87 Ken Raeburn, "A Common Error Description Library for UNIX".