#ifdef __cplusplus为了兼容c++
时间:2010-08-09 来源:icebluechao
#pragma once
#ifdef __cplusplus
extern "C" {
#endif void add_node_to(void **head, void *node, void *to, int before_or_after);
void move_node(void **head, void *moved, void *to, int before_or_after);
void add_node(void **head, void *node);
void del_node(void **head, void *node);
typedef int (*CMP_FUNC)(void *t1, void *t2);
void sort_list(void **head, CMP_FUNC nodcmp);
void add_node_sorted(void **head, void *node, CMP_FUNC nodcmp);
#define DECLARE_QUEUE(name, type) \
type *__queue_##name = NULL \\##表示将变量name的值粘贴到__queue的后边
#define REFERENCE_QUEUE(name, type) \
extern type *__queue_##name
#define QUEUE(name) \
((void **)(&(__queue_##name)))
#define QUEUE_HEAD(name) \
(__queue_##name) #ifdef __cplusplus
};
#endif
#ifdef __cplusplus
extern "C" {
#endif void add_node_to(void **head, void *node, void *to, int before_or_after);
void move_node(void **head, void *moved, void *to, int before_or_after);
void add_node(void **head, void *node);
void del_node(void **head, void *node);
typedef int (*CMP_FUNC)(void *t1, void *t2);
void sort_list(void **head, CMP_FUNC nodcmp);
void add_node_sorted(void **head, void *node, CMP_FUNC nodcmp);
#define DECLARE_QUEUE(name, type) \
type *__queue_##name = NULL \\##表示将变量name的值粘贴到__queue的后边
#define REFERENCE_QUEUE(name, type) \
extern type *__queue_##name
#define QUEUE(name) \
((void **)(&(__queue_##name)))
#define QUEUE_HEAD(name) \
(__queue_##name) #ifdef __cplusplus
};
#endif
相关阅读 更多 +