123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- <?xml version='1.0' encoding='iso-8859-1'?>
- <!doctype html public '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
- <html xmlns='http://www.w3c.org/1999/xhtml' lang='en-us'>
- <head>
- <title>
- error.h
- </title>
- <meta http-equiv='content-type' content='text/html;iso-8859-1'/>
- <meta name='generator' content='motley-tools 1.9.4 13:40:33 Feb 18 2015'/>
- <meta name='author' content='cmaier@cmassoc.net'/>
- <meta name='robots' content='noindex,nofollow'/>
- <link href='toolkit.css' rel='stylesheet' type='text/css'/>
- </head>
- <body>
- <div class='headerlink'>
- [<a href='endian.h.html' title=' endian.h '>PREV</a>]
- [<a href='toolkit.html' title=' Index '>HOME</a>]
- [<a href='ether.h.html' title=' ether.h '>NEXT</a>]
- </div>
- <pre>
- /*====================================================================*
- *
- * error.h - error function definitions and declarations;
- *
- * this file is an alterantive to GNU header file of the same
- * name; in addition to standard GNU error function declarations,
- * some additional functions are declared;
- *
- * Motley Tools by Charles Maier <cmaier@cmassoc.net>;
- * Copyright 2001-2006 by Charles Maier Associates;
- * Licensed under the Internet Software Consortium License;
- *
- *--------------------------------------------------------------------*/
- #ifndef ERROR_HEADER
- #define ERROR_HEADER
- /*====================================================================*
- * system header files;
- *--------------------------------------------------------------------*/
- #include <errno.h>
- /*====================================================================*
- * custom header files;
- *--------------------------------------------------------------------*/
- #include "../tools/types.h"
- /*====================================================================*
- *
- *--------------------------------------------------------------------*/
- #if defined (WIN32)
- #define __func__ __FUNCTION__
- #endif
- /*====================================================================*
- * define error codes for systems that do not support POSIX codes;
- *--------------------------------------------------------------------*/
- #ifndef ECANCELED
- #define ECANCELED 0
- #endif
- #ifndef ENOTSUP
- #define ENOTSUP EPERM
- #endif
- #ifndef EBADMSG
- #define EBADMSG 0
- #endif
- #ifndef EPROTONOSUPPORT
- #define EPROTONOSUPPORT 124
- #endif
- #ifndef ENODATA
- #define ENODATA 0
- #endif
- #ifndef EOVERFLOW
- #define EOVERFLOW 0
- #endif
- /*====================================================================*
- * define common error message strings;
- *--------------------------------------------------------------------*/
- #define ERROR_NOTROOT "This program needs root privileges"
- #define ERROR_TOOMANY "Too many command line arguments"
- #define CANT_START_TIMER "function %s can't start timer", __func__
- #define CANT_RESET_TIMER "function %s can't reset timer", __func__
- /*====================================================================*
- *
- *--------------------------------------------------------------------*/
- #define TRACE error (0, 0, "%s (%d)", __FILE__, __LINE__);
- /*====================================================================*
- * declare GNU error() and error_at_line() functions;
- *--------------------------------------------------------------------*/
- #ifdef __GNUC__
- __attribute__ ((format (printf, 3, 4)))
- #endif
- signed error (signed status, errno_t number, char const * format, ...);
- #ifdef __GNUC__
- __attribute__ ((format (printf, 3, 4)))
- #endif
- signed debug (signed status, char const * string, char const * format, ...);
- signed extra (signed status, errno_t number, int argc, char const * argv []);
- /*====================================================================*
- * end definitions and declarations;
- *--------------------------------------------------------------------*/
- #endif
- </pre>
- <div class='footerlink'>
- [<a href='endian.h.html' title=' endian.h '>PREV</a>]
- [<a href='toolkit.html' title=' Index '>HOME</a>]
- [<a href='ether.h.html' title=' ether.h '>NEXT</a>]
- </div>
- </body>
- </html>
|