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

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

#1 fix memory leak under debug util

File size: 689 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_INITIALIZE;
26 CF_DEBUG_BEGIN_FUNCTION;
27
28 CF_DEBUG_PRINT (stderr, "print message with context to stderr\n");
29
30 CF_DEBUG_PRINT_BIN (stdout, (unsigned char *) data, (int) sizeof (data), "hehehehe\n");
31
32 callee ();
33
34 CF_DEBUG_END_FUNCTION;
35 CF_DEBUG_FINALIZE;
36
37 return 0;
38}
Note: See TracBrowser for help on using the repository browser.