source: libcf/trunk/test/debug.c@ 51

Last change on this file since 51 was 51, checked in by cheese, 11 years ago

#1 change the debugging utiltity to support single context with mutex

File size: 647 bytes
Line 
1/**
2 * @file debug.c
3 * @author myusgun <myusgun@gmail.com>
4 * @version 0.1
5 */
6#include "cf_file.h"
7#include "cf_debug.h"
8
9#include <string.h>
10
11void callee (void) {
12 CF_DEBUG_BEGIN_FUNCTION;
13
14 CF_Debug_PrintCallStack (stdout);
15
16 CF_DEBUG_END_FUNCTION;
17}
18
19int main (void) {
20 char data[] =
21 "【 曲名 : 사랑하고 있는데 】\n"
22 "《 歌 : Kylee 》\n"
23 "『 절원의 템페스트 OP2 Theme 』\n";
24
25 CF_DEBUG_BEGIN_FUNCTION;
26
27 CF_DEBUG_PRINT (stderr, "print message with context to stderr\n");
28
29 CF_DEBUG_PRINT_BIN (stdout, (unsigned char *) data, (int) sizeof (data), "hehehehe\n");
30
31 callee ();
32
33 CF_DEBUG_END_FUNCTION;
34
35 return 0;
36}
Note: See TracBrowser for help on using the repository browser.