added more documentation

This commit is contained in:
2019-12-07 13:07:59 -07:00
parent fc0c0f05fc
commit 7e098aa63a
15 changed files with 107 additions and 74 deletions

View File

@@ -1,18 +1,21 @@
#ifndef __LOG_H_INCLUDED
#define __LOG_H_INCLUDED
#define LFATAL 0
#define LERROR 1
#define LWARN 2
#define LINFO 3
#define LDEBUG 4
/* Logging level severities */
#define LFATAL 0 /* fatal error */
#define LERROR 1 /* error */
#define LWARN 2 /* warning */
#define LINFO 3 /* information */
#define LDEBUG 4 /* debugging */
extern void Log(int level, const char *format, ...);
extern void Log_assert_failed(const char *test, const char *file, int line);
/* Current file name definitions for assert macros */
#define THIS_FILE __FILE__
#define DECLARE_THIS_FILE() static const char THIS_FILE[] = __FILE__
/* Assert macros */
#ifdef DEBUG_ASSERT
#define ASSERT(x) ((x) ? (void)0 : Log_assert_failed(#x, THIS_FILE, __LINE__))
#define VERIFY(x) ASSERT(x)