source: libcf/trunk/src/cf_local.h@ 151

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

#1 fix interface and add util module

File size: 723 bytes
Line 
1/**
2 * \file cf_local.h
3 *
4 * \author myusgun <myusgun@gmail.com>
5 */
6#ifndef __CF_LOCAL_H__
7#define __CF_LOCAL_H__
8
9#include <stdlib.h>
10
11/** 파일 이름 및 경로 길이 */
12#define NAME_LENGTH 128
13
14/** 예외 처리 */
15#define TRY do
16#define TRY_BREAK break
17#define NO_CATCH while (0)
18#define CATCH_IF(__expr) NO_CATCH; if (__expr)
19#define CATCH_ELSE_IF(__expr) else if (__expr)
20#define CATCH_ELSE else
21
22/**
23 * 유틸 매크로
24 *
25 * \remarks
26 * header는 별도로 include 해야 함
27 */
28#define NEWCTX(__ctx) ((__ctx *) calloc (sizeof (__ctx), 1))
29
30/** non-compatible function */
31#if defined(_WIN32) || defined(_WIN64)
32# define snprintf _snprintf
33#else
34#endif
35
36#endif // #ifndef __CF_LOCAL_H__
Note: See TracBrowser for help on using the repository browser.