/* 
** Error and log proccess functions header file, 
** to be included *after* all standard system headers 
**
** CVS: $Id: errlog.h,v 1.1 2001/06/28 07:21:15 zhangsz Exp $
*/

#ifndef    ERRLOG__H
#define    ERRLOG__H

#include    <sys/types.h>    /* required for some of our prototypes */
#include    <stdio.h>        /* for convenience */
#include    <stdlib.h>       /* for convenience */
#include    <string.h>       /* for convenience */
#include    <unistd.h>       /* for convenience */


	/* default file access permissions for new files */
#define FILE_MODE    (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)

	/* default permissions for new directories */
#define DIR_MODE    (FILE_MODE | S_IXUSR | S_IXGRP | S_IXOTH)

#define log_flag() \
    log_debug("%s: %s: %d", FILE_MACRO, FUNCTION_MACRO, LINE_MACRO)

void    err_dump(const char *, ...);    /* {App misc_source} */
void    err_msg(const char *, ...);
void    err_quit(const char *, ...);
void    err_ret(const char *, ...);
void    err_sys(const char *, ...);

void    log_debug(const char *, ...);        /* {App misc_source} */
void    log_msg(const char *, ...);        /* {App misc_source} */
void    log_open(const char *, int, int);
void    log_quit(const char *, ...);
void    log_sys(const char *, ...);
void    log_ret(const char *, ...);

#endif    /* ERRLOG__H */
