misc/openalbridge/errlib.h
changeset 3362 8d3b4d19ce27
parent 3353 a767dd3786b5
equal deleted inserted replaced
3361:cfc6cd502f85 3362:8d3b4d19ce27
     1 /*
     1 /*
     2  
     2 
     3  module: errlib.h
     3  module: errlib.h
     4  
     4 
     5  purpose: definitions of function sin errlib.c
     5  purpose: definitions of function sin errlib.c
     6  
     6 
     7  reference: Stevens, Unix network programming (2ed), p.922
     7  reference: Stevens, Unix network programming (2ed), p.922
     8  
     8 
     9  */
     9  */
    10 
    10 
    11 #ifndef _ERRLIB_H
    11 #ifndef _ERRLIB_H
    12 #define _ERRLIB_H
    12 #define _ERRLIB_H
    13 
    13 
    14 #include "globals.h"
    14 #include "globals.h"
    15 
    15 
    16 #ifdef __CPLUSPLUS
    16 extern int daemon_proc;
    17 extern "C" {
    17 
    18 #endif 
    18 void err_msg (const char *fmt, ...);
    19     
    19 void err_quit (const char *fmt, ...);
    20     extern int daemon_proc;
    20 void err_ret (const char *fmt, ...);
    21     
    21 void err_sys (const char *fmt, ...);
    22     void err_msg (const char *fmt, ...);
    22 void err_dump (const char *fmt, ...);
    23     void err_quit (const char *fmt, ...);
       
    24     void err_ret (const char *fmt, ...);
       
    25     void err_sys (const char *fmt, ...);
       
    26     void err_dump (const char *fmt, ...);
       
    27     
       
    28 #ifdef __CPLUSPLUS
       
    29 }
       
    30 #endif
       
    31 
    23 
    32 #endif /*_ERRLIB_H*/
    24 #endif /*_ERRLIB_H*/
    33 
    25 
    34 /*
    26 /*
    35  suggested error string ( PROG ) LEVEL - TEXT : ERRNO
    27  suggested error string ( PROG ) LEVEL - TEXT : ERRNO
    36  
    28 
    37  errno?  closeprog? log level 
    29  errno?  closeprog? log level
    38  err_msg      no       no       LOG_INFO 
    30  err_msg      no       no       LOG_INFO
    39  err_quit     no     exit(1)    LOG_ERR 
    31  err_quit     no     exit(1)    LOG_ERR
    40  err_ret      si       no       LOG_INFO 
    32  err_ret      si       no       LOG_INFO
    41  err_sys      si     exit(1)    LOG_ERR 
    33  err_sys      si     exit(1)    LOG_ERR
    42  err_dump     si    abort( )    LOG_ERR
    34  err_dump     si    abort( )    LOG_ERR
    43  */
    35  */