Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
620 B

.TH array_get 3
array_get \- get pointer to nth element in array
.B #include <array.h>
void* \fBarray_get\fP(array* \fIx\fR, uint64 \fImembersize\fR, int64 \fIpos\fR);
array \fIx\fR;
int64 \fIpos\fR;
\fIt\fR* p = array_get(&\fIx\fR,sizeof(\fIt\fR),\fIpos\fR);
array_get is similar to array_allocate, but it does not allocate any
extra bytes, and it does not initialize any extra bytes. It returns 0
if \fIx\fR is unallocated, for example, or if fewer than
(\fIpos\fR+1)*sizeof(\fIt\fR) bytes are initialized.
array_allocate(3), array_fail(3), array_start(3)