摘要: typedef struct _hdf HDF; struct _hdf { int link; int alloc_value; char *name; int name_len; char *value; struct _attr *attr; struct _hdf *top; struct _hdf *next; struct _hdf *child; /* the following fields are used to implement a cache */ struct _hdf *last_hp; struct _hdf *la... 阅读全文
posted @ 2012-02-29 00:25 Lesterwang 阅读(609) 评论(0) 推荐(0) 编辑
摘要: NEOERR* hdf_init (HDF **hdf) { NEOERR *err; HDF *my_hdf; *hdf = NULL; err = nerr_init(); if (err != STATUS_OK) return nerr_pass (err); err = _alloc_hdf (&my_hdf, NULL, 0, NULL, 0, 0, NULL); if (err != STATUS_OK) return nerr_pass (err); my_hdf->top = my_hdf; *hdf = my_hdf; ... 阅读全文
posted @ 2012-02-29 00:19 Lesterwang 阅读(395) 评论(0) 推荐(0) 编辑
摘要: typedef struct _neo_err { int error;//用于记录错误类型 int err_stack;//记录错误层次,可以进行错误链跟踪 int flags;//此结构体是否在使用,当释放时并非真正释放时使用 char desc[256];//错误描述 const char *file;//出错的文件 const char *func;//出错的函数 int lineno;//出错的行数 /* internal use only */ struct _neo_err *next;//当此单元不再使用时,放到缓存队列,起到资源池的作用, ... 阅读全文
posted @ 2012-02-29 00:07 Lesterwang 阅读(551) 评论(0) 推荐(0) 编辑