Lines Matching refs:cts
283 Counts* cts = malloc(sizeof(Counts)); in new_Counts() local
284 if (cts == NULL) in new_Counts()
288 cts->counts = malloc(n_counts * sizeof(ULong)); in new_Counts()
289 if (cts->counts == NULL) { in new_Counts()
290 free(cts); in new_Counts()
294 cts->n_counts = n_counts; in new_Counts()
296 cts->counts[i] = counts[i]; in new_Counts()
298 return cts; in new_Counts()
304 Counts* cts = malloc(sizeof(Counts)); in new_Counts_Zeroed() local
305 if (cts == NULL) in new_Counts_Zeroed()
309 cts->counts = malloc(n_counts * sizeof(ULong)); in new_Counts_Zeroed()
310 if (cts->counts == NULL) { in new_Counts_Zeroed()
311 free(cts); in new_Counts_Zeroed()
315 cts->n_counts = n_counts; in new_Counts_Zeroed()
317 cts->counts[i] = 0; in new_Counts_Zeroed()
319 return cts; in new_Counts_Zeroed()
322 static void sdel_Counts ( Counts* cts ) in sdel_Counts() argument
324 memset(cts, 0, sizeof(Counts)); in sdel_Counts()
325 free(cts); in sdel_Counts()
328 static void ddel_Counts ( Counts* cts ) in ddel_Counts() argument
330 if (cts->counts) in ddel_Counts()
331 free(cts->counts); in ddel_Counts()
332 memset(cts, 0, sizeof(Counts)); in ddel_Counts()
333 free(cts); in ddel_Counts()
336 static Counts* dopy_Counts ( Counts* cts ) in dopy_Counts() argument
338 return new_Counts( cts->n_counts, cts->counts ); in dopy_Counts()