mirror of
https://github.com/utoni/nDPId.git
synced 2026-05-05 19:15:06 +00:00
Merge commit 'c8bf38e5fb' as 'dependencies/uthash'
This commit is contained in:
commit
00e5132a80
250 changed files with 20767 additions and 0 deletions
23
dependencies/uthash/tests/test50.c
vendored
Normal file
23
dependencies/uthash/tests/test50.c
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#include <stdio.h>
|
||||
#include "utarray.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
UT_array *nums;
|
||||
long l, *p;
|
||||
UT_icd long_icd = {sizeof(long), NULL, NULL, NULL };
|
||||
utarray_new(nums, &long_icd);
|
||||
|
||||
l=1;
|
||||
utarray_push_back(nums, &l);
|
||||
l=2;
|
||||
utarray_push_back(nums, &l);
|
||||
|
||||
p=NULL;
|
||||
while( (p=(long*)utarray_next(nums,p)) != NULL ) {
|
||||
printf("%ld\n", *p);
|
||||
}
|
||||
|
||||
utarray_free(nums);
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue