Home
last modified time | relevance | path

Searched refs:nmemb (Results 1 – 25 of 4696) sorted by relevance

12345678910>>...188

/dports/databases/fastdb/fastdb/inc/
H A Diqsort.h19 if (nmemb > 1) { in insertion_sort()
21 last = nmemb - 1 + array; in insertion_sort()
98 while (nmemb > 50) { in qloop()
126 nmemb = last - array; in qloop()
142 if (nmemb > 1) { in heapsort()
143 i = --nmemb / 2; in heapsort()
170 for (--nmemb; nmemb; --nmemb) { in heapsort()
206 for (--nmemb; nmemb; --nmemb) { in sorted()
222 for (--nmemb; nmemb; --nmemb) { in rev_sorted()
257 if (nmemb > 1 && !sorted(array, nmemb)) { in iqsort()
[all …]
/dports/devel/git-svn/git-2.34.1/contrib/coccinelle/
H A Dqsort.cocci2 expression base, nmemb, compar;
5 + QSORT(base, nmemb, compar);
8 expression base, nmemb, compar;
11 + QSORT(base, nmemb, compar);
16 expression nmemb, compar;
19 + QSORT(base, nmemb, compar);
22 expression base, nmemb, compar;
24 - if (nmemb)
25 QSORT(base, nmemb, compar);
30 - if (nmemb > 0)
[all …]
/dports/devel/git-p4/git-2.34.1/contrib/coccinelle/
H A Dqsort.cocci2 expression base, nmemb, compar;
5 + QSORT(base, nmemb, compar);
8 expression base, nmemb, compar;
11 + QSORT(base, nmemb, compar);
16 expression nmemb, compar;
19 + QSORT(base, nmemb, compar);
22 expression base, nmemb, compar;
24 - if (nmemb)
25 QSORT(base, nmemb, compar);
30 - if (nmemb > 0)
[all …]
/dports/devel/git/git-2.34.1/contrib/coccinelle/
H A Dqsort.cocci2 expression base, nmemb, compar;
5 + QSORT(base, nmemb, compar);
8 expression base, nmemb, compar;
11 + QSORT(base, nmemb, compar);
16 expression nmemb, compar;
19 + QSORT(base, nmemb, compar);
22 expression base, nmemb, compar;
24 - if (nmemb)
25 QSORT(base, nmemb, compar);
30 - if (nmemb > 0)
[all …]
/dports/devel/git-gui/git-2.34.1/contrib/coccinelle/
H A Dqsort.cocci2 expression base, nmemb, compar;
5 + QSORT(base, nmemb, compar);
8 expression base, nmemb, compar;
11 + QSORT(base, nmemb, compar);
16 expression nmemb, compar;
19 + QSORT(base, nmemb, compar);
22 expression base, nmemb, compar;
24 - if (nmemb)
25 QSORT(base, nmemb, compar);
30 - if (nmemb > 0)
[all …]
/dports/devel/git-cvs/git-2.34.1/contrib/coccinelle/
H A Dqsort.cocci2 expression base, nmemb, compar;
5 + QSORT(base, nmemb, compar);
8 expression base, nmemb, compar;
11 + QSORT(base, nmemb, compar);
16 expression nmemb, compar;
19 + QSORT(base, nmemb, compar);
22 expression base, nmemb, compar;
24 - if (nmemb)
25 QSORT(base, nmemb, compar);
30 - if (nmemb > 0)
[all …]
/dports/devel/cgit/cgit-1.2.3/git/contrib/coccinelle/
H A Dqsort.cocci2 expression base, nmemb, compar;
5 + QSORT(base, nmemb, compar);
8 expression base, nmemb, compar;
11 + QSORT(base, nmemb, compar);
16 expression nmemb, compar;
19 + QSORT(base, nmemb, compar);
22 expression base, nmemb, compar;
24 - if (nmemb)
25 QSORT(base, nmemb, compar);
30 - if (nmemb > 0)
[all …]
/dports/www/libnghttp3/nghttp3-b9e565c/lib/
H A Dnghttp3_ringbuf.c48 if (nmemb) { in nghttp3_ringbuf_init()
50 assert(1 == __popcnt((unsigned int)nmemb)); in nghttp3_ringbuf_init()
64 rb->nmemb = nmemb; in nghttp3_ringbuf_init()
81 rb->first = (rb->first - 1) & (rb->nmemb - 1); in nghttp3_ringbuf_push_front()
82 rb->len = nghttp3_min(rb->nmemb, rb->len + 1); in nghttp3_ringbuf_push_front()
90 if (rb->len == rb->nmemb) { in nghttp3_ringbuf_push_back()
110 assert(len <= rb->nmemb); in nghttp3_ringbuf_resize()
125 if (rb->nmemb >= nmemb) { in nghttp3_ringbuf_reserve()
130 assert(1 == __popcnt((unsigned int)nmemb)); in nghttp3_ringbuf_reserve()
141 if (rb->first + rb->len <= rb->nmemb) { in nghttp3_ringbuf_reserve()
[all …]
/dports/java/sablevm/sablevm-1.13/src/libsablevm/
H A Dcl_alloc.c719 if (size < nmemb) in _svmh_cl_malloc_attributes()
759 if (size < nmemb) in _svmh_cl_malloc_chars()
799 if (size < nmemb) in _svmh_cl_malloc_classes()
839 if (size < nmemb) in _svmh_cl_malloc_constant_pool()
879 if (size < nmemb) in _svmh_cl_malloc_inner_classes()
919 if (size < nmemb) in _svmh_cl_malloc_native_arg_types()
959 if (size < nmemb) in _svmh_cl_malloc_native_args()
999 if (size < nmemb) in _svmh_cl_malloc_super_classes()
1039 if (size < nmemb) in _svmh_cl_malloc_u8()
1079 if (size < nmemb) in _svmh_cl_malloc_code()
[all …]
H A Dglobal_alloc.c240 if (size < nmemb) in _svmh_gzmalloc_cchars_no_exception()
661 if (size < nmemb) in _svmh_gmalloc_cchars()
714 if (size < nmemb) in _svmh_gmalloc_ints()
767 if (size < nmemb) in _svmh_gmalloc_ubytes()
820 if (size < nmemb) in _svmh_gmalloc_chars()
873 if (size < nmemb) in _svmh_gzmalloc_env_array()
926 if (size < nmemb) in _svmh_gzmalloc_fat_lock_array()
979 if (size < nmemb) in _svmh_gzmalloc_instruction_info()
1032 if (size < nmemb) in _svmh_gzmalloc_instruction_preparation()
1085 if (size < nmemb) in _svmh_gzmalloc_local_preparation()
[all …]
/dports/audio/sfront/sfront-0.99/src/lib/csrc/
H A Drobust.c42 size_t rread(void * ptr, size_t size, size_t nmemb, FILE * stream)
52 if ((recv = fread(ptr, size, nmemb, stream)) == nmemb)
53 return nmemb;
79 nmemb -= recv;
82 while ((recv = fread(&(c[len]), size, nmemb, stream)) != nmemb);
90 size_t rwrite(void * ptr, size_t size, size_t nmemb, FILE * stream)
100 if ((recv = fwrite(ptr, size, nmemb, stream)) == nmemb)
101 return nmemb;
120 nmemb -= recv;
123 while ((recv = fwrite(&(c[len]), size, nmemb, stream)) != nmemb);
/dports/math/cado-nfs/cado-nfs-f4284e2391121b2bfb97bc4880b6273c7250dc2f/utils/
H A Dfix-endianness.c12 return fread(ptr, sizeof(uint32_t), nmemb, stream); in fread32_little()
16 return fwrite(ptr, sizeof(uint32_t), nmemb, stream); in fwrite32_little()
20 return fread(ptr, sizeof(uint64_t), nmemb, stream); in fread64_little()
24 return fwrite(ptr, sizeof(uint64_t), nmemb, stream); in fwrite64_little()
31 uint32_t * p = malloc(nmemb * sizeof(uint32_t)); in fread32_little()
33 size_t n = fread(p, sizeof(uint32_t), nmemb, stream); in fread32_little()
55 uint32_t * p = malloc(nmemb * sizeof(uint32_t)); in fwrite32_little()
65 for(size_t i = 0 ; i < nmemb ; i++) { in fwrite32_little()
80 uint64_t * p = malloc(nmemb * sizeof(uint64_t)); in fread64_little()
104 uint64_t * p = malloc(nmemb * sizeof(uint64_t)); in fwrite64_little()
[all …]
/dports/games/SRB2/SRB2-SRB2_release_2.2.9/tools/wadzip/
H A Dxm.c35 if (SIZE_T_MAX / size <= nmemb) in sizmul()
38 "would overflow", (unsigned long)nmemb, in sizmul()
41 return size * nmemb; /* won't overflow */ in sizmul()
44 static void nomem(size_t size, size_t nmemb) in nomem() argument
47 "(total %lu bytes)", (unsigned long)nmemb, in nomem()
51 void *xm(size_t size, size_t nmemb) in xm() argument
53 const size_t bytes = sizmul(size, nmemb); in xm()
57 if (p == NULL) nomem(size, nmemb); in xm()
61 void *xr(void *p, size_t size, size_t nmemb) in xr() argument
63 const size_t bytes = sizmul(size, nmemb); in xr()
[all …]
/dports/science/cdo/cdo-2.0.0/src/kdtreelib/
H A Dpmergesort.cc13 size_t nmemb; member
21 size_t nmemb, int axis, int max_threads);
26 int pmergesort(struct kd_point *base, size_t nmemb, int axis, int max_threads) in pmergesort() argument
40 args.nmemb = nmemb; in pmergesort()
53 size_t nmemb, int axis, int max_threads) in pm_buildparams() argument
58 p->nmemb = nmemb; in pm_buildparams()
77 qsortR(mya->a + mya->first, mya->nmemb, mya->axis); in mergesort_t()
92 mya->nmemb - mya->nmemb / 2, mya->axis, mya->max_threads / 2); in mergesort_t()
109 for(i = mya->first; i < mya->first + mya->nmemb; i++) { in mergesort_t()
110 if (li >= larg.first + larg.nmemb) { in mergesort_t()
[all …]
/dports/chinese/fcitx/fcitx-4.2.9.7/src/lib/fcitx-utils/
H A Dqsort_r.c36 if (nmemb < 10) { /* use O(nmemb^2) algorithm for small enough nmemb */ in fcitx_qsort_r()
37 insertion_sort(base, nmemb, size, compar, thunk); in fcitx_qsort_r()
42 const char *a = base, *b = base + (nmemb / 2) * size, in fcitx_qsort_r()
43 *c = base + (nmemb - 1) * size; in fcitx_qsort_r()
45 ? (compar(b, c, thunk) < 0 ? nmemb / 2 : in fcitx_qsort_r()
46 (compar(a, c, thunk) < 0 ? nmemb - 1 : 0)) in fcitx_qsort_r()
48 (compar(b, c, thunk) < 0 ? nmemb - 1 : nmemb / 2)); in fcitx_qsort_r()
51 swap(base + pivot * size, base + (nmemb - 1) * size, size); in fcitx_qsort_r()
52 pivot = (nmemb - 1) * size; in fcitx_qsort_r()
53 for (i = npart = 0; i < nmemb - 1; ++i) in fcitx_qsort_r()
[all …]
/dports/net/libngtcp2/ngtcp2-224bd62/lib/
H A Dngtcp2_ringbuf.c47 assert(1 == __popcnt((unsigned int)nmemb)); in ngtcp2_ringbuf_init()
49 assert(1 == __builtin_popcount((unsigned int)nmemb)); in ngtcp2_ringbuf_init()
52 rb->buf = ngtcp2_mem_malloc(mem, nmemb * size); in ngtcp2_ringbuf_init()
58 rb->nmemb = nmemb; in ngtcp2_ringbuf_init()
75 rb->first = (rb->first - 1) & (rb->nmemb - 1); in ngtcp2_ringbuf_push_front()
76 rb->len = ngtcp2_min(rb->nmemb, rb->len + 1); in ngtcp2_ringbuf_push_front()
84 if (rb->len == rb->nmemb) { in ngtcp2_ringbuf_push_back()
85 rb->first = (rb->first + 1) & (rb->nmemb - 1); in ngtcp2_ringbuf_push_back()
94 rb->first = (rb->first + 1) & (rb->nmemb - 1); in ngtcp2_ringbuf_pop_front()
104 assert(len <= rb->nmemb); in ngtcp2_ringbuf_resize()
[all …]
/dports/net/openbgpd6/openbgpd-6.9p0/src/bgpd/
H A Drde_sets.c32 size_t nmemb; member
51 aset->set = set_new(nmemb, size); in as_sets_new()
111 set_new(size_t nmemb, size_t size) in set_new() argument
119 if (nmemb == 0) in set_new()
120 nmemb = 4; in set_new()
123 set->max = nmemb; in set_new()
144 rdemem.aset_nmemb -= set->nmemb; in set_free()
173 set->nmemb += nelms; in set_add()
182 *nelms = set->nmemb; in set_get()
224 if (a->nmemb != b->nmemb) in set_equal()
[all …]
/dports/sysutils/yank/yank-1.2.0/
H A Dyank.c52 size_t nmemb; member
59 size_t nmemb; member
79 while ((n = read(0, in.v + in.nmemb, in.size - in.nmemb)) != 0) { in input()
82 in.nmemb += n; in input()
90 memset(in.v + in.nmemb, 0, in.size - in.nmemb); in input()
137 n = nmemb; in xwrite()
146 return nmemb; in xwrite()
231 f.v[f.nmemb].so = f.v[f.nmemb].eo = e - s; in tsetup()
254 f.nmemb = MIN(f.nmemb, j); in tsetup()
257 && f.v[f.nmemb - 1].eo - f.v[f.nmemb - 1].lo >= ws.ws_col) in tsetup()
[all …]
/dports/math/R-cran-nloptr/nloptr/src/nlopt_src/util/
H A Dqsort_r.c76 qsort_r(base_, nmemb, size, thunk, compar); in nlopt_qsort_r()
81 for (i = 0; i+1 < nmemb; ++i) in nlopt_qsort_r()
82 for (j = i+1; j < nmemb; ++j) in nlopt_qsort_r()
90 const char *a = base, *b = base + (nmemb/2)*size, in nlopt_qsort_r()
91 *c = base + (nmemb-1)*size; in nlopt_qsort_r()
93 ? (compar(thunk,b,c) < 0 ? nmemb/2 : in nlopt_qsort_r()
94 (compar(thunk,a,c) < 0 ? nmemb-1 : 0)) in nlopt_qsort_r()
96 (compar(thunk,b,c) < 0 ? nmemb-1 : nmemb/2)); in nlopt_qsort_r()
99 swap(base + pivot*size, base + (nmemb-1) * size, size); in nlopt_qsort_r()
100 pivot = (nmemb - 1) * size; in nlopt_qsort_r()
[all …]
/dports/emulators/libspectrum/libspectrum-1.5.0/
H A Dmemory.c54 libspectrum_malloc_n( size_t nmemb, size_t size ) in libspectrum_malloc_n() argument
56 if( nmemb > SIZE_MAX / size ) abort(); in libspectrum_malloc_n()
58 return libspectrum_malloc( nmemb * size ); in libspectrum_malloc_n()
62 libspectrum_malloc0_n( size_t nmemb, size_t size ) in libspectrum_malloc0_n() argument
66 if( nmemb > SIZE_MAX / size ) abort(); in libspectrum_malloc0_n()
68 ptr = libspectrum_calloc_fn( nmemb, size ); in libspectrum_malloc0_n()
71 if( nmemb && size && !ptr ) abort(); in libspectrum_malloc0_n()
77 libspectrum_calloc( size_t nmemb, size_t size ) in libspectrum_calloc() argument
79 return libspectrum_malloc0_n( nmemb, size ); in libspectrum_calloc()
96 if( nmemb > SIZE_MAX / size ) abort(); in libspectrum_realloc_n()
[all …]
/dports/astro/opencpn/OpenCPN-5.2.4/plugins/grib_pi/libs/jasper/src/base/
H A Djas_malloc.c122 void *jas_realloc2(void *ptr, size_t nmemb, size_t size) in jas_realloc2() argument
125 return jas_alloc2(nmemb, size); in jas_realloc2()
126 if (nmemb && SIZE_MAX / nmemb < size) { in jas_realloc2()
130 return jas_realloc(ptr, nmemb * size); in jas_realloc2()
134 void *jas_alloc2(size_t nmemb, size_t size) in jas_alloc2() argument
136 if (nmemb && SIZE_MAX / nmemb < size) { in jas_alloc2()
141 return jas_malloc(nmemb * size); in jas_alloc2()
156 void *jas_calloc(size_t nmemb, size_t size) in jas_calloc() argument
160 ptr = jas_alloc2(nmemb, size); in jas_calloc()
162 memset(ptr, 0, nmemb*size); in jas_calloc()
/dports/graphics/opencv/opencv-4.5.3/3rdparty/libjasper/
H A Djas_malloc.c124 void *jas_realloc2(void *ptr, size_t nmemb, size_t size) in jas_realloc2() argument
127 return jas_alloc2(nmemb, size); in jas_realloc2()
128 if (nmemb && SIZE_MAX / nmemb < size) { in jas_realloc2()
132 return jas_realloc(ptr, nmemb * size); in jas_realloc2()
136 void *jas_alloc2(size_t nmemb, size_t size) in jas_alloc2() argument
138 if (nmemb && SIZE_MAX / nmemb < size) { in jas_alloc2()
143 return jas_malloc(nmemb * size); in jas_alloc2()
158 void *jas_calloc(size_t nmemb, size_t size) in jas_calloc() argument
162 ptr = jas_alloc2(nmemb, size); in jas_calloc()
164 memset(ptr, 0, nmemb*size); in jas_calloc()
/dports/math/ggobi/ggobi-2.1.11/plugins/ggvis/
H A Dggv_qsort.c2 void Myqsort(void* bot, int nmemb, int size, CompareFunc compar);
20 if (nmemb <= 1) return; in Myqsort()
22 if (nmemb >= THRESH) quick_sort((char*)bot, nmemb, size, compar); in Myqsort()
23 else insertion_sort((char*)bot, nmemb, size, compar); in Myqsort()
82 mid = bot + size * (nmemb >> 1); in quick_sort()
83 top = bot + (nmemb - 1) * size; in quick_sort()
90 if (nmemb >= MTHRESH) { in quick_sort()
153 insertion_sort(bsv, nmemb, size, compar); in quick_sort()
182 nmemb = nlower; in quick_sort()
194 nmemb = nupper; in quick_sort()
[all …]
/dports/misc/rump/buildrump.sh-b914579/src/sys/external/bsd/drm2/dist/include/drm/
H A Ddrm_mem_util.h32 static __inline__ void *drm_calloc_large(size_t nmemb, size_t size) in drm_calloc_large() argument
34 if (size != 0 && nmemb > SIZE_MAX / size) in drm_calloc_large()
37 if (size * nmemb <= PAGE_SIZE) in drm_calloc_large()
38 return kcalloc(nmemb, size, GFP_KERNEL); in drm_calloc_large()
40 return __vmalloc(size * nmemb, in drm_calloc_large()
45 static __inline__ void *drm_malloc_ab(size_t nmemb, size_t size) in drm_malloc_ab() argument
47 if (size != 0 && nmemb > SIZE_MAX / size) in drm_malloc_ab()
50 if (size * nmemb <= PAGE_SIZE) in drm_malloc_ab()
51 return kmalloc(nmemb * size, GFP_KERNEL); in drm_malloc_ab()
53 return __vmalloc(size * nmemb, in drm_malloc_ab()
/dports/devel/arm-none-eabi-gcc492/gcc-4.9.2/libgfortran/runtime/
H A Dmemory.c53 xmallocarray (size_t nmemb, size_t size) in xmallocarray() argument
57 if (!nmemb || !size) in xmallocarray()
58 size = nmemb = 1; in xmallocarray()
60 else if (__builtin_expect ((nmemb | size) >= HALF_SIZE_T, 0) in xmallocarray()
61 && nmemb > SIZE_MAX / size) in xmallocarray()
67 p = malloc (nmemb * size); in xmallocarray()
79 xcalloc (size_t nmemb, size_t size) in xcalloc() argument
81 if (!nmemb || !size) in xcalloc()
82 nmemb = size = 1; in xcalloc()
84 void *p = calloc (nmemb, size); in xcalloc()

12345678910>>...188