From: Kevin Day Date: Thu, 7 Jun 2012 05:33:03 +0000 (-0500) Subject: Update: add support for array_length arrays X-Git-Tag: 0.3.0~19 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=e10cfb55331ea194e487531f6ee079d189d529e9;p=fll Update: add support for array_length arrays Because this uses memory operations it was moved to a separate file called types_arrays.h This adds a dependency on f_memory. While the dependency is circular, f_types will never provide source files. Therefore chicken and the egg issues should not be a problem (f_types is always installed before f_memory). --- diff --git a/level_0/f_types/c/types_array.h b/level_0/f_types/c/types_array.h new file mode 100644 index 0000000..c44cb26 --- /dev/null +++ b/level_0/f_types/c/types_array.h @@ -0,0 +1,51 @@ +/* FLL - Level 0 + * Project: Types Array + * Version: 0.3.x + * Licenses: lgplv2.1 + * Programmers: Kevin Day + * Documentation: + * + * Provides datatypes that are arrays of some sort and require memory operations. + */ +#ifndef _F_types_array_h +#define _F_types_array_h + +// libc includes +#include // contains mode_t, dev_t, gid_t, uid_t, etc.. +#include + +// fll includes +#include +#include + +#ifdef __cplusplus +extern "C"{ +#endif + +#ifndef _di_f_array_lengths_ + typedef struct { + f_array_length *array; + f_array_length size; // total amount of allocated space + f_array_length used; // total number of allocated spaces used + } f_array_lengths; + + #define f_array_lengths_initialize { f_array_length_initialize, f_array_length_initialize, f_array_length_initialize } + + #define f_delete_array_lengths(status, lengths) \ + f_delete_structure(status, lengths, f_array_length) + + #define f_destroy_array_lengths(status, lengths) \ + f_destroy_structure(status, lengths, f_array_length) + + #define f_resize_array_lengths(status, lengths, new_length) \ + f_resize_structure(status, lengths, f_array_length, new_length) + + #define f_adjust_array_lengths(status, lengths, new_length) \ + f_adjust_structure(status, lengths, f_array_length, new_length) +#endif // _di_f_array_lengths_ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _F_types_array_h diff --git a/level_0/f_types/data/build/settings b/level_0/f_types/data/build/settings index b9e4c55..79e1cbd 100644 --- a/level_0/f_types/data/build/settings +++ b/level_0/f_types/data/build/settings @@ -8,10 +8,10 @@ version_minor 3 version_micro 0 build_compiler gcc -build_libraries -lc -build_sources_library -build_sources_program -build_sources_headers types.h +build_libraries -lc +build_sources_library +build_sources_program +build_sources_headers types.h types_array.h build_shared yes flags_all -z now