123456789101112131415161718192021222324252627282930313233343536373839 |
- #ifndef ARRAY_HEADER
- #define ARRAY_HEADER
- // this header needs
- #include "BYTE_ARR.h"
- // functions to handle raw arrays of different variable sizes
- // will have to use def directives to get around the variable
- // types not being found because of partial header inclusion
- bool check_array(byte * arr, umax asize, umax var_size);
- umax print_arr_elems(byte * arr, umax asize, umax var_size, umax (* print_elem) (byte *, umax));
- umax reverse_arr(byte * arr, umax asize, umax var_size);
- byte * find_arr_elem(byte * elem, umax esize, byte * arr, umax asize, bool (* comp_elems) (byte *, byte *));
- umax sort_arr(byte * arr, umax asize, umax var_size, bool (* comp_elems) (byte *, byte *));
- // the third big type, barr (bean's array, barr)
- // this array is different from bytarr in the sense that
- // it adds a few more information about the elements in the array
- typedef struct
- {
- bytarr * arr;
- var_type var;
- } barr;
- // barr functions
- barr * create_barr(bytarr * arr, var_type type);
- bool check_barr(barr * arr);
- umax free_barr(barr * arr);
- umax print_barr(byte * src, umax size);
- // copy of the above functions but to be used with the new structure
- umax print_barr_elems(barr * arr);
- umax reverse_barr(barr * arr);
- umax find_barr_elem(bytarr * elem, barr * arr);
- umax sort_barr(barr * arr);
- #include "ARRAY.c"
- #endif // ARRAY_HEADER
|