Home
last modified time | relevance | path

Searched refs:array (Results 1 – 25 of 1122) sorted by relevance

12345678910>>...45

/freebsd/contrib/mandoc/
H A Ddba_array.c46 struct dba_array *array; in dba_array_new() local
49 array = mandoc_malloc(sizeof(*array)); in dba_array_new()
50 array->ep = mandoc_reallocarray(NULL, ea, sizeof(*array->ep)); in dba_array_new()
51 array->em = mandoc_reallocarray(NULL, ea, sizeof(*array->em)); in dba_array_new()
52 array->ea = ea; in dba_array_new()
53 array->eu = 0; in dba_array_new()
54 array->ed = 0; in dba_array_new()
55 array->ec = 0; in dba_array_new()
56 array->flags = flags; in dba_array_new()
57 array->pos = 0; in dba_array_new()
[all …]
/freebsd/sys/contrib/ck/src/
H A Dck_array.c50 ck_array_init(struct ck_array *array, unsigned int mode, struct ck_malloc *allocator, unsigned int … in ck_array_init() argument
66 array->n_entries = 0; in ck_array_init()
67 array->allocator = allocator; in ck_array_init()
68 array->active = active; in ck_array_init()
69 array->transaction = NULL; in ck_array_init()
74 ck_array_put(struct ck_array *array, void *value) in ck_array_put() argument
83 if (array->transaction == NULL) { in ck_array_put()
84 target = array->active; in ck_array_put()
86 if (array->n_entries == target->length) { in ck_array_put()
89 target = array->allocator->realloc(target, in ck_array_put()
[all …]
/freebsd/crypto/heimdal/base/
H A Darray.c50 heim_array_t array = ptr; in array_dealloc() local
52 for (n = 0; n < array->len; n++) in array_dealloc()
53 heim_release(array->val[n]); in array_dealloc()
54 free(array->val); in array_dealloc()
76 heim_array_t array; in heim_array_create() local
78 array = _heim_alloc_object(&array_object, sizeof(*array)); in heim_array_create()
79 if (array == NULL) in heim_array_create()
82 array->val = NULL; in heim_array_create()
83 array->len = 0; in heim_array_create()
85 return array; in heim_array_create()
[all …]
/freebsd/contrib/ldns/
H A Dradix.c56 static int ldns_radix_str_create(ldns_radix_array_t* array, uint8_t* key,
61 static int ldns_radix_array_split(ldns_radix_array_t* array, uint8_t* key,
104 node->array = NULL; in ldns_radix_new_node()
205 LDNS_FREE(prefix->array); in ldns_radix_insert()
212 prefix->array[0].edge = add; in ldns_radix_insert()
216 len, &prefix->array[0].str, in ldns_radix_insert()
217 &prefix->array[0].len)) { in ldns_radix_insert()
219 LDNS_FREE(prefix->array); in ldns_radix_insert()
259 &prefix->array[byte], key, pos+1, in ldns_radix_insert()
268 prefix->array[byte].edge = add; in ldns_radix_insert()
[all …]
/freebsd/usr.bin/dc/
H A Dstack.c28 static struct array *array_new(void);
29 static __inline void array_free(struct array *);
30 static struct array *array_dup(const struct array *);
31 static __inline void array_grow(struct array *, size_t);
32 static __inline void array_assign(struct array *, size_t, const struct value *);
33 static __inline struct value *array_retrieve(const struct array *, size_t);
69 array_free(v->array); in stack_free_value()
70 v->array = NULL; in stack_free_value()
93 copy->array = a->array == NULL ? NULL : array_dup(a->array); in stack_dup_value()
153 stack->stack[stack->sp].array = NULL; in stack_pushnumber()
[all …]
/freebsd/sbin/ipf/libipf/
H A Dprintipfexpr.c11 printipfexpr(int *array) in printipfexpr() argument
16 nelems = array[0]; in printipfexpr()
19 ipfe = (ipfexp_t *)(array + i); in printipfexpr()
29 printhosts(array + i); in printipfexpr()
34 printsingle(array + i); in printipfexpr()
39 printhosts(array + i); in printipfexpr()
44 printhosts(array + i); in printipfexpr()
49 printport(array + i); in printipfexpr()
54 printport(array + i); in printipfexpr()
59 printport(array + i); in printipfexpr()
[all …]
/freebsd/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/
H A Dtst.ArrayPointer2.d41 int array[5]; variable
44 array[0] = 100;
45 array[1] = 200;
46 array[2] = 300;
47 array[3] = 400;
48 array[4] = 500;
50 p = &array[0];
52 printf("array[0]: %d\tp[0]: %d\n", array[0], p[0]);
53 printf("array[1]: %d\tp[1]: %d\n", array[1], p[1]);
54 printf("array[2]: %d\tp[2]: %d\n", array[2], p[2]);
[all …]
H A Dtst.PointerArithmetic2.d42 int array[5]; variable
45 array[0] = 100;
46 array[1] = 200;
47 array[2] = 300;
48 array[3] = 400;
49 array[4] = 500;
51 p = &array[0];
53 printf("array[0]: %d\t*p: %d\n", array[0], *p);
54 printf("array[1]: %d\t*(p+1): %d\n", array[1], *(p+1));
55 printf("array[2]: %d\t*(p+2): %d\n", array[2], *(p+2));
[all …]
H A Dtst.ArrayPointer3.d40 int array[5]; variable
45 array[0] = 100;
46 array[1] = 200;
47 array[2] = 300;
48 array[3] = 400;
49 array[4] = 500;
51 p = array;
53 printf("array[0]: %d\tp[0]: %d\n", array[0], p[0]);
54 printf("array[1]: %d\tp[1]: %d\n", array[1], p[1]);
55 printf("array[2]: %d\tp[2]: %d\n", array[2], p[2]);
[all …]
H A Dtst.PointerAssignment.d41 int array[3]; variable
47 array[0] = 200;
48 array[1] = 400;
49 array[2] = 600;
51 ptr1 = array;
58 printf("array[0]: %d\tptr2[0]: %d\n", array[0], ptr2[0]);
59 printf("array[1]: %d\tptr2[1]: %d\n", array[1], ptr2[1]);
60 printf("array[2]: %d\tptr2[2]: %d\n", array[2], ptr2[2]);
67 /(array[0] != 400) || (array[1] != 800) || (array[2] != 1200)/
H A Dtst.IntegerArithmetic1.d41 int array[3]; variable
49 array[0] = 20;
50 array[1] = 40;
51 array[2] = 80;
53 uptr = (uintptr_t) &array[0];
59 printf("array[0]: %d\t*p: %d\n", array[0], *p);
60 printf("array[1]: %d\t*q: %d\n", array[1], *q);
61 printf("array[2]: %d\t*r: %d\n", array[2], *r);
/freebsd/sys/dev/hptmv/
H A Dgui_lib.c92 if ((pVDevice->u.array.dArStamp != 0) && (pVDevice == p)) in check_VDevice_valid()
128 if(pVDevice->u.array.rf_need_rebuild && !pVDevice->u.array.rf_duplicate_and_create) in get_array_flag()
132 if(pVDevice->u.array.rf_rebuilding) in get_array_flag()
136 if(pVDevice->u.array.rf_verifying) in get_array_flag()
140 if(pVDevice->u.array.rf_initializing) in get_array_flag()
144 if(pVDevice->u.array.rf_broken) in get_array_flag()
152 if(pVDevice->u.array.rf_newly_created) in get_array_flag()
160 if(pVDevice->u.array.rf_auto_rebuild) in get_array_flag()
163 for(i = 0; i < pVDevice->u.array.bArnMember; i++) in get_array_flag()
165 PVDevice pMember = pVDevice->u.array.pMember[i]; in get_array_flag()
[all …]
H A Dioctl.c123 memcpy(e.Data, ((PVDevice)param)->u.array.ArrayName, MAX_ARRAY_NAME); in ioctl_ReportEvent()
170 if (pArray->u.array.rf_rebuilding || pArray->u.array.rf_verifying || in hpt_delete_array()
171 pArray->u.array.rf_initializing) in hpt_delete_array()
174 for(i=0; i<pArray->u.array.bArnMember; i++) { in hpt_delete_array()
175 pa = pArray->u.array.pMember[i]; in hpt_delete_array()
177 if (pa->u.array.rf_rebuilding || pa->u.array.rf_verifying || in hpt_delete_array()
178 pa->u.array.rf_initializing) in hpt_delete_array()
386 (ID_TO_VDEV(*(DEVICEID *)lpOutBuffer))->u.array.rf_auto_rebuild = 0; in Kernel_DeviceIoControl()
407 (ID_TO_VDEV(*(DEVICEID *)lpOutBuffer))->u.array.rf_auto_rebuild = 0; in Kernel_DeviceIoControl()
421 if(pArray->u.array.rf_rebuilding == 0) in Kernel_DeviceIoControl()
[all …]
H A Dhptproc.c75 if ((pArray=ArrayTables(i))->u.array.dArStamp==0) in hpt_set_asc_info()
78 if (pArray->u.array.rf_need_rebuild && !pArray->u.array.rf_rebuilding) in hpt_set_asc_info()
80 …(UCHAR)((pArray->u.array.CriticalMembers || pArray->VDeviceType == VD_RAID_1)? DUPLICATE : REBUILD… in hpt_set_asc_info()
88 if ((pArray=ArrayTables(i))->u.array.dArStamp==0) in hpt_set_asc_info()
91 if (pArray->u.array.rf_rebuilding) in hpt_set_asc_info()
92 pArray->u.array.rf_abort_rebuild = 1; in hpt_set_asc_info()
149 pSubArray->u.array.rf_auto_rebuild = 0; in hpt_set_asc_info()
150 pSubArray->u.array.rf_abort_rebuild = 0; in hpt_set_asc_info()
155 for (i = 0; (UCHAR)i < pArray->u.array.bArnMember; i++) in hpt_set_asc_info()
156 if(pArray->u.array.pMember[i] && mIsArray(pArray->u.array.pMember[i]) && in hpt_set_asc_info()
[all …]
/freebsd/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/sizeof/
H A Dtst.SizeofArray.d40 int array[5]; variable
44 array[0] = 010;
45 array[1] = 100;
46 array[2] = 210;
48 printf("sizeof (array): %d\n", sizeof (array));
49 printf("sizeof (array[0]): %d\n", sizeof (array[0]));
50 printf("sizeof (array[1]): %d\n", sizeof (array[1]));
51 printf("sizeof (array[2]): %d\n", sizeof (array[2]));
57 /(20 != sizeof (array)) || (4 != sizeof (array[0])) || (4 != sizeof (array[1]))
58 || (4 != sizeof (array[2]))/
/freebsd/contrib/llvm-project/compiler-rt/lib/builtins/
H A Demutls.c46 static void emutls_shutdown(emutls_address_array *array);
101 emutls_address_array *array = (emutls_address_array *)ptr; in emutls_key_destructor() local
102 if (array->skip_destructor_rounds > 0) { in emutls_key_destructor()
109 array->skip_destructor_rounds--; in emutls_key_destructor()
110 emutls_setspecific(array); in emutls_key_destructor()
112 emutls_shutdown(array); in emutls_key_destructor()
260 static void emutls_shutdown(emutls_address_array *array) { in emutls_shutdown() argument
261 if (array) { in emutls_shutdown()
263 for (i = 0; i < array->size; ++i) { in emutls_shutdown()
264 if (array->data[i]) in emutls_shutdown()
[all …]
/freebsd/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/json/
H A Dtst.general.d.out2 tst |empty array|
7 tst |one-element array: integer|
18 tst |one-element array: hex integer (not in spec, not supported)|
23 tst |one-element array: float|
28 tst |one-element array: float + exponent|
33 tst |one-element array: integer + whitespace|
38 tst |one-element array: integer + exponent + whitespace|
43 tst |one-element array: string|
59 tst |one-element array: object|
68 tst |many-element array: integers|
[all …]
/freebsd/contrib/llvm-project/libcxx/include/
H A Darray14 array synopsis
19 struct array
36 void swap(array& a) noexcept(is_nothrow_swappable_v<T>); // constexpr in C++20
75 array(T, U...) -> array<T, 1 + sizeof...(U)>; // C++17
78 bool operator==(const array<T,N>& x, const array<T,N>& y); // constexpr in C++20
80 bool operator!=(const array<T,N>& x, const array<T,N>& y); // removed in C++20
82 bool operator<(const array<T,N>& x, const array<T,N>& y); // removed in C++20
84 bool operator>(const array<T,N>& x, const array<T,N>& y); // removed in C++20
86 bool operator<=(const array<T,N>& x, const array<T,N>& y); // removed in C++20
88 bool operator>=(const array<T,N>& x, const array<T,N>& y); // removed in C++20
[all …]
/freebsd/contrib/unbound/util/storage/
H A Dslabhash.c59 sl->array = (struct lruhash**)calloc(sl->size, sizeof(struct lruhash*)); in slabhash_create()
60 if(!sl->array) { in slabhash_create()
77 sl->array[i] = lruhash_create(start_size, maxmem / sl->size, in slabhash_create()
79 if(!sl->array[i]) { in slabhash_create()
91 if(sl->array) { in slabhash_delete()
94 lruhash_delete(sl->array[i]); in slabhash_delete()
95 free(sl->array); in slabhash_delete()
106 lruhash_clear(sl->array[i]); in slabhash_clear()
119 lruhash_insert(sl->array[slab_idx(sl, hash)], hash, entry, data, arg); in slabhash_insert()
125 return lruhash_lookup(sl->array[slab_idx(sl, hash)], hash, key, wr); in slabhash_lookup()
[all …]
/freebsd/contrib/ntp/sntp/unity/auto/
H A DparseOutput.rb59 def testPassed(array) argument
60 lastItem = array.length - 1
61 testName = array[lastItem - 1]
62 testSuiteVerify(array[@className])
70 def testIgnored(array) argument
71 lastItem = array.length - 1
72 testName = array[lastItem - 2]
73 reason = array[lastItem].chomp
74 testSuiteVerify(array[@className])
84 def testFailed(array) argument
[all …]
/freebsd/contrib/libcbor/test/
H A Darray_test.c117 cbor_item_t *array = cbor_new_definite_array(2); in test_array_replace() local
118 assert_size_equal(cbor_array_size(array), 0); in test_array_replace()
125 assert_false(cbor_array_replace(array, 0, three)); in test_array_replace()
129 assert_true(cbor_array_push(array, one)); in test_array_replace()
130 assert_true(cbor_array_push(array, cbor_move(cbor_build_uint8(2)))); in test_array_replace()
132 assert_size_equal(cbor_array_size(array), 2); in test_array_replace()
135 assert_false(cbor_array_replace(array, 2, three)); in test_array_replace()
139 assert_true(cbor_array_replace(array, 0, three)); in test_array_replace()
142 assert_uint8(cbor_move(cbor_array_get(array, 0)), 3); in test_array_replace()
143 assert_uint8(cbor_move(cbor_array_get(array, 1)), 2); in test_array_replace()
[all …]
/freebsd/sys/dev/mthca/
H A Dmthca_allocator.c118 void *mthca_array_get(struct mthca_array *array, int index) in mthca_array_get() argument
122 if (array->page_list[p].page) in mthca_array_get()
123 return array->page_list[p].page[index & MTHCA_ARRAY_MASK]; in mthca_array_get()
128 int mthca_array_set(struct mthca_array *array, int index, void *value) in mthca_array_set() argument
133 if (!array->page_list[p].page) in mthca_array_set()
134 array->page_list[p].page = (void **) get_zeroed_page(GFP_ATOMIC); in mthca_array_set()
136 if (!array->page_list[p].page) in mthca_array_set()
139 array->page_list[p].page[index & MTHCA_ARRAY_MASK] = value; in mthca_array_set()
140 ++array->page_list[p].used; in mthca_array_set()
145 void mthca_array_clear(struct mthca_array *array, int index) in mthca_array_clear() argument
[all …]
/freebsd/tools/tools/sortbench/
H A Dsort_bench.c101 int *array = malloc(size); in rand_bench() local
102 arc4random_buf(array, size); in rand_bench()
103 sort(array, elts, s); in rand_bench()
104 free(array); in rand_bench()
114 int *array = malloc(size); in sort_bench() local
116 array[i] = i; in sort_bench()
118 sort(array, elts, s); in sort_bench()
119 free(array); in sort_bench()
129 int *array = malloc(size); in partial_bench() local
132 array[i] = i; in partial_bench()
[all …]
/freebsd/contrib/llvm-project/lldb/source/API/
H A DSBData.cpp405 uint64_t *array, in CreateDataFromUInt64Array() argument
407 LLDB_INSTRUMENT_VA(endian, addr_byte_size, array, array_len); in CreateDataFromUInt64Array()
409 if (!array || array_len == 0) in CreateDataFromUInt64Array()
414 lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len)); in CreateDataFromUInt64Array()
425 uint32_t *array, in CreateDataFromUInt32Array() argument
427 LLDB_INSTRUMENT_VA(endian, addr_byte_size, array, array_len); in CreateDataFromUInt32Array()
429 if (!array || array_len == 0) in CreateDataFromUInt32Array()
434 lldb::DataBufferSP buffer_sp(new DataBufferHeap(array, data_len)); in CreateDataFromUInt32Array()
445 int64_t *array, in CreateDataFromSInt64Array() argument
447 LLDB_INSTRUMENT_VA(endian, addr_byte_size, array, array_len); in CreateDataFromSInt64Array()
[all …]
/freebsd/contrib/atf/atf-c++/
H A Dbuild_test.cpp75 equal_argvs(const atf::process::argv_array& aa, const char* const* array) in equal_argvs() argument
80 while (equal && (i < aa.size() && array[i] != NULL)) { in equal_argvs()
81 if (std::strcmp(aa[i], array[i]) != 0) in equal_argvs()
87 if (equal && (i < aa.size() || array[i] != NULL)) in equal_argvs()
95 check_equal_argvs(const atf::process::argv_array& aa, const char* const* array) in check_equal_argvs() argument
97 print_array("Expected arguments", array); in check_equal_argvs()
100 if (!equal_argvs(aa, array)) in check_equal_argvs()
116 const char* const array[] = { NULL }; in ATF_TEST_CASE_BODY() local
119 ATF_REQUIRE(equal_argvs(atf::process::argv_array(argv), array)); in ATF_TEST_CASE_BODY()
123 const char* const array[] = { NULL }; in ATF_TEST_CASE_BODY() local
[all …]

12345678910>>...45