1 .\" Copyright (c) 1988 Massachusetts Institute of Technology,
2 .\" Student Information Processing Board. All rights reserved.
4 .\" $FreeBSD: src/contrib/com_err/com_err.3,v 1.1 1999/09/04 09:48:58 markm Exp $
5 .\" $DragonFly: src/contrib/com_err/com_err.3,v 1.2 2003/06/17 04:23:58 dillon Exp $
7 .TH COM_ERR 3 "22 Nov 1988" SIPB
9 com_err \- common error display routine
14 void com_err (whoami, code, format, ...);
19 proc = set_com_err_hook (proc);
23 ) (const char *, long, const char *, va_list);
26 proc = reset_com_err_hook ();
28 void initialize_XXXX_error_table ();
32 displays an error message on the standard error stream
38 string, which should specify the program name or some subportion of
39 a program, followed by an error message generated from the
43 and a string produced using the
45 string and any following arguments, in the same style as
52 this defines a procedure which is called with the arguments passed to
54 instead of the default internal procedure which sends the formatted
55 text to error output. Thus the error messages from a program can all
56 easily be diverted to another form of diagnostic logging, such as
59 may be used to restore the behavior of
61 to its default form. Both procedures return the previous ``hook''
62 value. These ``hook'' procedures must have the declaration given for
64 above in the synopsis.
67 .I initialize_XXXX_error_table
68 routine is generated mechanically by
70 from a source file containing names and associated strings. Each
71 table has a name of up to four characters, which is used in place of
74 in the name of the routine. These routines should be called before
75 any of the corresponding error codes are used, so that the
77 library will recognize error codes from these tables when they are
82 header file should be included in any source file that uses routines
85 library; executable files must be linked using
89 library to be included.
91 .\" .IR for manual entries
92 .\" .PP for paragraph breaks
95 compile_et (1), syslog (3).
97 Ken Raeburn, "A Common Error Description Library for UNIX".