Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

utils.h

Go to the documentation of this file.
00001 
00023 #ifndef _LIBCOMPREX_UTILS_H_
00024 #define _LIBCOMPREX_UTILS_H_
00025 
00026 #ifdef __cplusplus
00027 extern "C" {
00028 #endif
00029 
00030 #include <libcomprex/comprex.h>
00031 
00032 /* #define DEBUG_REF */
00033 
00039 #ifdef DEBUG_REF
00040 # define CX_LINK(ptr) \
00041     printf("[%p] inc refcount: %d -> %d\n", (ptr), (ptr)->refCount, \
00042            (ptr)->refCount + 1); \
00043     ++(ptr)->refCount
00044 #else
00045 # define CX_LINK(ptr) ++(ptr)->refCount
00046 #endif
00047 
00057 #ifdef DEBUG_REF
00058 # define CX_UNLINK(ptr) \
00059     printf("[%p] dec refcount: %d -> %d\n", (ptr), (ptr)->refCount,\
00060            (ptr)->refCount - 1); \
00061     --(ptr)->refCount
00062 #else
00063 # define CX_UNLINK(ptr) --(ptr)->refCount
00064 #endif
00065 
00076 void cxSplitPath(const char *path, char **dir, char **basename);
00077 
00090 char *cxGetBaseName(const char *path);
00091 
00104 char *cxGetBasePath(const char *path);
00105 
00116 char *cxFixPath(const char *path);
00117 
00132 char *cxGetFullFilePath(const char *filename);
00133 
00144 void cxMakePhysDirs(const char *path, CxArchive *archive);
00145 
00154 void cxApplyFsNodeInfo(CxFsNode *node, const char *path);
00155 
00156 #ifdef __cplusplus
00157 }
00158 #endif
00159 
00160 #endif /* _LIBCOMPREX_UTILS_H_ */
00161 

Generated on Wed Mar 5 20:47:43 2003 for libcomprex by doxygen1.2.18-20021020