114 int end_idx_exclusive)
118 out->size = end_idx_exclusive - start_idx;
120 out->data = (
char*) malloc(out->alloc * out->el_sz);
121 memcpy(out->data, za->
data +(start_idx*out->el_sz), out->size*out->el_sz);
162 if (capacity <= za->alloc)
165 while (za->
alloc < capacity) {
200 assert(idx < za->size);
217 assert(idx < za->size);
219 *((
void**) p) = &za->
data[idx*za->
el_sz];
225 assert(sz <= za->size);
238 assert(idx < za->size);
241 if (idx < za->size-1)
248 int ncopy = za->
size - idx - 1;
278 for (
int idx = 0; idx < za->
size; idx++) {
301 assert(idx <= za->size);
305 int ncopy = za->
size - idx;
324 assert(idx < za->size);
344 for (
int idx = 0; idx < za->
size; idx++)
382 for (
int idx = 0; idx < za->
size; idx++) {
409 assert(compar != NULL);
420 int zstrcmp(
const void * a_pp,
const void * b_pp);
432 for (
int i = 0; i < za->
size; i++) {
447 assert(dest != NULL);
450 assert(end <= source->size);
456 int count = end - start;
and restrictions which apply to each piece of software is included later in this file and or inside of the individual applicable source files The disclaimer of warranty in the WPILib license above applies to all code in and nothing in any of the other licenses gives permission to use the names of FIRST nor the names of the WPILib contributors to endorse or promote products derived from this software The following pieces of software have additional or alternate and or and nanopb were all modified for use in Google Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *Neither the name of Google Inc nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY OR CONSEQUENTIAL WHETHER IN STRICT OR EVEN IF ADVISED OF THE POSSIBILITY OF SUCH January AND DISTRIBUTION Definitions License shall mean the terms and conditions for and distribution as defined by Sections through of this document Licensor shall mean the copyright owner or entity authorized by the copyright owner that is granting the License Legal Entity shall mean the union of the acting entity and all other entities that control are controlled by or are under common control with that entity For the purposes of this definition control direct or to cause the direction or management of such whether by contract or including but not limited to software source documentation source
Definition ThirdPartyNotices.txt:124
and restrictions which apply to each piece of software is included later in this file and or inside of the individual applicable source files The disclaimer of warranty in the WPILib license above applies to all code in and nothing in any of the other licenses gives permission to use the names of FIRST nor the names of the WPILib contributors to endorse or promote products derived from this software The following pieces of software have additional or alternate and or and nanopb were all modified for use in Google Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *Neither the name of Google Inc nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY OR CONSEQUENTIAL WHETHER IN STRICT OR EVEN IF ADVISED OF THE POSSIBILITY OF SUCH January AND DISTRIBUTION Definitions License shall mean the terms and conditions for and distribution as defined by Sections through of this document Licensor shall mean the copyright owner or entity authorized by the copyright owner that is granting the License Legal Entity shall mean the union of the acting entity and all other entities that control are controlled by or are under common control with that entity For the purposes of this definition control direct or to cause the direction or management of such whether by contract or including but not limited to software source documentation and configuration files Object form shall mean any form resulting from mechanical transformation or translation of a Source including but not limited to compiled object generated and conversions to other media types Work shall mean the work of whether in Source or Object made available under the as indicated by a copyright notice that is included in or attached to the whether in Source or Object that is based or other modifications as a an original work of authorship For the purposes of this Derivative Works shall not include works that remain separable or merely the Work and Derivative Works thereof Contribution shall mean any work of including the original version of the Work and any modifications or additions to that Work or Derivative Works that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner For the purposes of this submitted means any form of or written communication sent to the Licensor or its including but not limited to communication on electronic mailing source code control and issue tracking systems that are managed or on behalf the Licensor for the purpose of discussing and improving the but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as Not a Contribution Contributor shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work Grant of Copyright License Subject to the terms and conditions of this each Contributor hereby grants to You a non no royalty free
Definition ThirdPartyNotices.txt:164
int alloc
Definition zarray.h:48
char * data
Definition zarray.h:49
int size
Definition zarray.h:47
size_t el_sz
Definition zarray.h:45
int zstrcmp(const void *a_pp, const void *b_pp)
A comparison function for comparing strings which can be used by zarray_sort() to sort arrays with ch...
static void zarray_remove_index(zarray_t *za, int idx, int shuffle)
Removes the entry at index 'idx'.
Definition zarray.h:234
static int zarray_remove_value(zarray_t *za, const void *p, int shuffle)
Remove the entry whose value is equal to the value pointed to by 'p'.
Definition zarray.h:273
static void zarray_sort(zarray_t *za, int(*compar)(const void *, const void *))
Uses qsort() to sort the elements contained by the array in ascending order.
Definition zarray.h:406
static void zarray_clear(zarray_t *za)
Removes all elements from the array and sets its size to zero.
Definition zarray.h:365
static void zarray_set(zarray_t *za, int idx, const void *p, void *outp)
Sets the value of the current element at index 'idx' by copying its value from the data pointed to by...
Definition zarray.h:319
static void zarray_ensure_capacity(zarray_t *za, int capacity)
Returns 1 if zarray_size(za) == 0, returns 0 otherwise.
Definition zarray.h:158
void zarray_vmap(zarray_t *za, void(*f)(void *))
Calls the supplied function for every element in the array in index order.
static int iceillog2(int v)
Definition zarray.h:95
static void zarray_add_range(zarray_t *dest, const zarray_t *source, int start, int end)
Add elements from start up to and excluding end from 'source' into 'dest'.
Definition zarray.h:444
static void zarray_destroy(zarray_t *za)
Frees all resources associated with the variable array structure which was created by zarray_create()...
Definition zarray.h:70
static void zarray_get(const zarray_t *za, int idx, void *p)
Retrieves the element from the supplied array located at the zero-based index of 'idx' and copies its...
Definition zarray.h:195
static void zarray_map(zarray_t *za, void(*f)(void *))
Calls the supplied function for every element in the array in index order.
Definition zarray.h:339
static int zarray_contains(const zarray_t *za, const void *p)
Determines whether any element in the array has a value which matches the data pointed to by 'p'.
Definition zarray.h:377
static void zarray_insert(zarray_t *za, int idx, const void *p)
Creates a new entry and inserts it into the array so that it will have the index 'idx' (i....
Definition zarray.h:296
static int zarray_size(const zarray_t *za)
Retrieves the number of elements currently being contained by the passed array, which may be differen...
Definition zarray.h:130
static void zarray_truncate(zarray_t *za, int sz)
Definition zarray.h:222
static int zarray_index_of(const zarray_t *za, const void *p)
Find the index of an element, or return -1 if not found.
Definition zarray.h:427
static void zarray_get_volatile(const zarray_t *za, int idx, void *p)
Similar to zarray_get(), but returns a "live" pointer to the internal storage, avoiding a memcpy.
Definition zarray.h:212
static zarray_t * zarray_create(size_t el_sz)
Creates and returns a variable array structure capable of holding elements of the specified size.
Definition zarray.h:57
static void zarray_add(zarray_t *za, const void *p)
Adds a new element to the end of the supplied array, and sets its value (by copying) from the data po...
Definition zarray.h:179
static zarray_t * zarray_copy(const zarray_t *za)
Allocate a new zarray that contains a copy of the data in the argument.
Definition zarray.h:82
static zarray_t * zarray_copy_subset(const zarray_t *za, int start_idx, int end_idx_exclusive)
Allocate a new zarray that contains a subset of the original elements.
Definition zarray.h:112