bstr.h

00001 #ifndef _CP_BSTR_H
00002 #define _CP_BSTR_H
00003 
00004 #include "collection.h"
00005 
00006 typedef struct _cp_bstr
00007 {
00008     unsigned char *bits;
00009     int length;
00010 } cp_bstr;
00011 
00012 #define BYTECOUNT(b) (((b)->length + 7) >> 3)
00013 
00014 CPROPS_DLL
00015 cp_bstr *cp_bstr_create(int length, unsigned char *bits);
00016 
00021 cp_bstr *cstr_to_bstr(char *str);
00022 
00023 CPROPS_DLL
00024 void cp_bstr_destroy(cp_bstr *seq);
00025 
00026 CPROPS_DLL
00027 cp_bstr *cp_bstr_dup(cp_bstr *seq);
00028 
00029 CPROPS_DLL
00030 cp_bstr *cp_bstr_cpy(cp_bstr *dst, cp_bstr *src);
00031 
00032 CPROPS_DLL
00033 cp_bstr *cp_bstr_cat(cp_bstr *head, cp_bstr *tail);
00034 
00038 CPROPS_DLL
00039 int cp_bstr_shift_left(cp_bstr *seq, int count);
00040 
00048 CPROPS_DLL
00049 int cp_bstr_cmp(cp_bstr *a, cp_bstr *b, int *pos);
00050 
00051 #define cp_bstr_length(seq) (seq)->length
00052 
00053 CPROPS_DLL
00054 void cp_bstr_dump(cp_bstr *seq);
00055 
00056 CPROPS_DLL
00057 char *cp_bstr_to_string(cp_bstr *seq);
00058 
00059 #endif /* _CP_BSTR_H */
00060 

Generated on Mon Dec 5 23:00:21 2011 for cprops by  doxygen 1.4.7