BRL-CAD
log.h File Reference
#include "common.h"
#include <stdio.h>
#include <stdarg.h>
#include "bu/defines.h"
#include "bu/magic.h"
#include "bu/parse.h"
#include "bu/list.h"
Include dependency graph for log.h:

Go to the source code of this file.

Data Structures

struct  bu_hook_list
 
struct  bu_lex_t_int
 
struct  bu_lex_t_dbl
 
struct  bu_lex_t_key
 
struct  bu_lex_t_id
 
union  bu_lex_token
 
struct  bu_lex_key
 

Macros

#define BU_HOOK_LIST_NULL   ((struct bu_hook_list *) 0)
 
#define BU_CK_HOOK_LIST(_hl)   BU_CKMAG(_hl, BU_HOOK_LIST_MAGIC, "bu_hook_list")
 
#define BU_HOOK_LIST_INIT(_hl)
 
#define BU_HOOK_LIST_INIT_ZERO   { {BU_HOOK_LIST_MAGIC, BU_LIST_NULL, BU_LIST_NULL}, NULL, NULL }
 
#define BU_HOOK_LIST_IS_INITIALIZED(_p)   (((struct bu_hook_list *)(_p) != BU_HOOK_LIST_NULL) && LIKELY((_p)->l.magic == BU_HOOK_LIST_MAGIC))
 
#define BU_LEX_ANY   0 /* pseudo type */
 
#define BU_LEX_INT   1
 
#define BU_LEX_DOUBLE   2
 
#define BU_LEX_SYMBOL   3
 
#define BU_LEX_KEYWORD   4
 
#define BU_LEX_IDENT   5
 
#define BU_LEX_NUMBER   6 /* Pseudo type */
 
#define BU_LEX_NEED_MORE   0
 

Typedefs

typedef int(* bu_hook_t) (void *, void *)
 
typedef struct bu_hook_list bu_hook_list_t
 

Functions

int bu_backtrace (FILE *fp)
 
void bu_bomb_add_hook (bu_hook_t func, void *clientdata)
 
void bu_bomb (const char *str) _BU_ATTR_NORETURN
 
void bu_exit (int status, const char *fmt,...) _BU_ATTR_NORETURN _BU_ATTR_PRINTF23
 
int bu_crashreport (const char *filename)
 
char * bu_fgets (char *s, int size, FILE *stream)
 
void bu_setlinebuf (FILE *fp)
 
void bu_hook_list_init (struct bu_hook_list *hlp)
 
void bu_hook_add (struct bu_hook_list *hlp, bu_hook_t func, void *clientdata)
 
void bu_hook_delete (struct bu_hook_list *hlp, bu_hook_t func, void *clientdata)
 
void bu_hook_call (struct bu_hook_list *hlp, void *buf)
 
void bu_hook_save_all (struct bu_hook_list *hlp, struct bu_hook_list *save_hlp)
 
void bu_hook_delete_all (struct bu_hook_list *hlp)
 
void bu_hook_restore_all (struct bu_hook_list *hlp, struct bu_hook_list *restore_hlp)
 
void bu_log_indent_delta (int delta)
 
void bu_log_indent_vls (struct bu_vls *v)
 
void bu_log_add_hook (bu_hook_t func, void *clientdata)
 
void bu_log_delete_hook (bu_hook_t func, void *clientdata)
 
void bu_log_hook_save_all (struct bu_hook_list *save_hlp)
 
void bu_log_hook_delete_all (void)
 
void bu_log_hook_restore_all (struct bu_hook_list *restore_hlp)
 
void bu_putchar (int c)
 
void bu_log (const char *,...) _BU_ATTR_PRINTF12
 
void bu_flog (FILE *, const char *,...) _BU_ATTR_PRINTF23
 
int bu_vsscanf (const char *src, const char *fmt, va_list ap)
 
int bu_sscanf (const char *src, const char *fmt,...) _BU_ATTR_SCANF23
 
int bu_scan_fastf_t (int *c, const char *src, const char *delim, int n,...)
 
char * bu_dirname (const char *path)
 
void bu_basename (char *basename, const char *path)
 
int bu_lex (union bu_lex_token *token, struct bu_vls *rtstr, struct bu_lex_key *keywords, struct bu_lex_key *symbols)
 
long int bu_mread (int fd, void *bufp, long int n)