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