SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG
DONATE


YUM REPOSITORY

 
 

MAN page from Other libext2fs2-devel-1.34-2sls.i586.rpm

COM_ERR

Section: C Library Functions (3)
Updated: 22 Nov 1988
Index 

NAME

com_err - common error display routine 

SYNOPSIS

 #include <et/com_err.h>void com_err (whoami, code, format, ...);        const char *whoami;        long code;        const char *format;proc = set_com_err_hook (proc);
void (*proc) (const char *, long, const char *, va_list);
proc = reset_com_err_hook ();void initialize_XXXX_error_table ();
 

DESCRIPTION

Com_errdisplays an error message on the standard error streamstderr(seestdio(3S))composed of thewhoamistring, which should specify the program name or some subportion ofa program, followed by an error message generated from thecodevalue (derived fromcompile_et(1)),and a string produced using theformatstring and any following arguments, in the same style asfprintf(3).

The behavior ofcom_errcan be modified usingset_com_err_hook;this defines a procedure which is called with the arguments passed tocom_err,instead of the default internal procedure which sends the formattedtext to error output. Thus the error messages from a program can alleasily be diverted to another form of diagnostic logging, such assyslog(3).Reset_com_err_hookmay be used to restore the behavior ofcom_errto its default form. Both procedures return the previous ``hook''value. These ``hook'' procedures must have the declaration given forprocabove in the synopsis.

Theinitialize_XXXX_error_tableroutine is generated mechanically bycompile_et(1)from a source file containing names and associated strings. Eachtable has a name of up to four characters, which is used in place oftheXXXXin the name of the routine. These routines should be called beforeany of the corresponding error codes are used, so that thecom_errlibrary will recognize error codes from these tables when they areused.

Thecom_err.hheader file should be included in any source file that uses routinesfrom thecom_errlibrary; executable files must be linked using``-lcom_err''in order to cause thecom_errlibrary to be included.

 

SEE ALSO

compile_et (1), syslog (3).

Ken Raeburn, "A Common Error Description Library for UNIX".


 

Index

NAME
SYNOPSIS
DESCRIPTION
SEE ALSO

This document was created byman2html,using the manual pages.