comparison dlib/dlib.h @ 2771:fb399dcc5866

clean up struct typedefs
author p37sitdu, corvid
date Sat, 12 Jan 2013 20:13:36 +0000
parents 8a508291ac35
children
comparison
equal deleted inserted replaced
2770:b73d5f7cf8a3 2771:fb399dcc5866
97 /* 97 /*
98 *-- dStr --------------------------------------------------------------------- 98 *-- dStr ---------------------------------------------------------------------
99 */ 99 */
100 #define Dstr_char_t char 100 #define Dstr_char_t char
101 101
102 typedef struct _dstr { 102 typedef struct {
103 int sz; /* allocated size (private) */ 103 int sz; /* allocated size (private) */
104 int len; 104 int len;
105 Dstr_char_t *str; 105 Dstr_char_t *str;
106 } Dstr; 106 } Dstr;
107 107
126 const char *dStr_printable(Dstr *in, int maxlen); 126 const char *dStr_printable(Dstr *in, int maxlen);
127 127
128 /* 128 /*
129 *-- dList -------------------------------------------------------------------- 129 *-- dList --------------------------------------------------------------------
130 */ 130 */
131 struct Dlist_ { 131 typedef struct {
132 int sz; /* allocated size (private) */ 132 int sz; /* allocated size (private) */
133 int len; 133 int len;
134 void **list; 134 void **list;
135 }; 135 } Dlist;
136
137 typedef struct Dlist_ Dlist;
138 136
139 /* dCompareFunc: 137 /* dCompareFunc:
140 * Return: 0 if parameters are equal (for dList_find_custom). 138 * Return: 0 if parameters are equal (for dList_find_custom).
141 * Return: 0 if equal, < 0 if (a < b), > 0 if (b < a) --for insert sorted. 139 * Return: 0 if equal, < 0 if (a < b), > 0 if (b < a) --for insert sorted.
142 * 140 *