Lines Matching refs:array

40 isc_result_t omapi_array_allocate (omapi_array_t **array,  in omapi_array_allocate()  argument
47 if (!array || *array) in omapi_array_allocate()
52 *array = aptr; in omapi_array_allocate()
58 isc_result_t omapi_array_free (omapi_array_t **array, in omapi_array_free() argument
64 if (!array || !*array) in omapi_array_free()
66 aptr = *array; in omapi_array_free()
72 *array = (omapi_array_t *)0; in omapi_array_free()
79 isc_result_t omapi_array_extend (omapi_array_t *array, char *ptr, in omapi_array_extend() argument
83 int new = array -> count; in omapi_array_extend()
84 status = omapi_array_set (array, ptr, new, file, line); in omapi_array_extend()
92 isc_result_t omapi_array_set (omapi_array_t *array, void *ptr, int index, in omapi_array_set() argument
99 if (!array) in omapi_array_set()
108 if (array -> max <= index) { in omapi_array_set()
109 delta = index - array -> max + 10; in omapi_array_set()
110 newbuf = dmalloc ((array -> max + delta) * sizeof (char *), in omapi_array_set()
115 memset (&newbuf [array -> max], 0, (sizeof (char *)) * delta); in omapi_array_set()
116 array -> max += delta; in omapi_array_set()
118 if (array -> data) { in omapi_array_set()
120 array -> data, array -> count * sizeof (char *)); in omapi_array_set()
121 dfree (array -> data, file, line); in omapi_array_set()
123 array -> data = newbuf; in omapi_array_set()
127 if (array -> data [index]) { in omapi_array_set()
128 status = ((*array -> deref) (&array -> data [index], in omapi_array_set()
141 status = (*array -> ref) (&array -> data [index], ptr, in omapi_array_set()
146 if (index >= array -> count) in omapi_array_set()
147 array -> count = index + 1; in omapi_array_set()
151 isc_result_t omapi_array_lookup (char **ptr, omapi_array_t *array, int index, in omapi_array_lookup() argument
154 if (!array || !ptr || *ptr || index < 0 || index >= array -> count) in omapi_array_lookup()
156 if (array -> data [index]) in omapi_array_lookup()
157 return (*array -> ref) (ptr, in omapi_array_lookup()
158 array -> data [index], file, line); in omapi_array_lookup()