mkernel 0.0.2
Micro-kernel framework, everything as a module
assert.c File Reference

Compiled functions used by debugging macros to write on stderr. More...

#include "assert.h"
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#include <time.h>
Include dependency graph for assert.c:

Go to the source code of this file.

Functions

void _trace (const char *p_File, const unsigned int p_Line, const char *p_CompilDate, const char *p_CompilTime, const char *p_Function)
 Print a debug trace (checkpoint) More...
 
void _trace_msg (const char *p_File, const unsigned int p_Line, const char *p_CompilDate, const char *p_CompilTime, const char *p_Function, const char *p_Message)
 Print a debug trace (checkpoint) with a static message. More...
 
void _trace_dynmsg (const char *p_File, const unsigned int p_Line, const char *p_CompilDate, const char *p_CompilTime, const char *p_Function, const char *p_Format,...)
 Print a debug trace (checkpoint) with a formatted message. More...
 

Detailed Description

Compiled functions used by debugging macros to write on stderr.

Date
11/05/1997
Author
François Cerbelle (Fanfan), franc.nosp@m.ois@.nosp@m.cerbe.nosp@m.lle..nosp@m.net

Originally inspired by "L'art du code", Steve Maguire, Microsoft Press

Definition in file assert.c.

Function Documentation

◆ _trace()

void _trace ( const char *  p_File,
const unsigned int  p_Line,
const char *  p_CompilDate,
const char *  p_CompilTime,
const char *  p_Function 
)

Print a debug trace (checkpoint)

Parameters
[in]p_FileSource file
[in]p_LineSource line in the source file
[in]p_CompilDateCompilation date
[in]p_CompilTimeCompilation time
[in]p_FunctionFunction name in the source file

Outputs on stderr a timestamp, with the filename, the sourceline, the compilation date and time, the function name.

Definition at line 75 of file assert.c.

◆ _trace_dynmsg()

void _trace_dynmsg ( const char *  p_File,
const unsigned int  p_Line,
const char *  p_CompilDate,
const char *  p_CompilTime,
const char *  p_Function,
const char *  p_Format,
  ... 
)

Print a debug trace (checkpoint) with a formatted message.

Parameters
[in]p_FileSource file
[in]p_LineSource line in the source file
[in]p_CompilDateCompilation date
[in]p_CompilTimeCompilation time
[in]p_FunctionFunction name in the source file
[in]p_Formatformat string
[in]...Formatted string parameters

Outputs on stderr a timestamp, with the filename, the sourceline, the compilation date and time, the function name and a formatted message.

Todo:
Replace with a portable snprintf function

Definition at line 101 of file assert.c.

◆ _trace_msg()

void _trace_msg ( const char *  p_File,
const unsigned int  p_Line,
const char *  p_CompilDate,
const char *  p_CompilTime,
const char *  p_Function,
const char *  p_Message 
)

Print a debug trace (checkpoint) with a static message.

Parameters
[in]p_FileSource file
[in]p_LineSource line in the source file
[in]p_CompilDateCompilation date
[in]p_CompilTimeCompilation time
[in]p_FunctionFunction name in the source file
[in]p_MessageStatic message

Outputs on stderr a timestamp, with the filename, the sourceline, the compilation date and time, the function name and a static message.

Definition at line 87 of file assert.c.