build_sources_library string/static.c string/statics.c string/staticss.c
build_sources_library string/triple.c string/triples.c string/tripless.c
build_sources_library time.c
-build_sources_library type_array/cell.c type_array/file.c type_array/fll_id.c type_array/int8.c type_array/int16.c type_array/int32.c type_array/int64.c type_array/int128.c type_array/number_signed.c type_array/number_unsigned.c type_array/poll.c type_array/quantity.c type_array/quantitys.c type_array/quantityss.c type_array/range.c type_array/ranges.c type_array/rangess.c type_array/range_double.c type_array/range_doubles.c type_array/range_doubless.c type_array/state.c type_array/status.c type_array/uint8.c type_array/uint16.c type_array/uint32.c type_array/uint64.c type_array/uint128.c
+build_sources_library type_array/cell.c type_array/file.c type_array/fll_id.c type_array/int8.c type_array/int16.c type_array/int32.c type_array/int64.c type_array/int128.c type_array/number_signed.c type_array/number_unsigned.c type_array/pid.c type_array/poll.c type_array/quantity.c type_array/quantitys.c type_array/quantityss.c type_array/range.c type_array/ranges.c type_array/rangess.c type_array/range_double.c type_array/range_doubles.c type_array/range_doubless.c type_array/state.c type_array/status.c type_array/uint8.c type_array/uint16.c type_array/uint32.c type_array/uint64.c type_array/uint128.c
build_sources_library utf.c private-utf.c private-utf_alphabetic.c private-utf_combining.c private-utf_control.c private-utf_digit.c private-utf_emoji.c private-utf_numeric.c private-utf_phonetic.c private-utf_private.c private-utf_punctuation.c private-utf_subscript.c private-utf_superscript.c private-utf_symbol.c private-utf_unassigned.c private-utf_valid.c private-utf_whitespace.c private-utf_wide.c private-utf_word.c private-utf_zero_width.c
build_sources_library utf/common.c utf/convert.c
build_sources_library utf/dynamic.c utf/dynamics.c utf/dynamicss.c
build_sources_headers string/static.h string/statics.h string/staticss.h
build_sources_headers string/triple.h string/triples.h string/tripless.h
build_sources_headers time.h time/common.h
-build_sources_headers type.h type/cell.h type/file.h type/fll.h type/mode.h type/number.h type/quantity.h type/range.h type/range_double.h type/state.h type/status.h type/time.h
-build_sources_headers type_array.h type_array_file.h type_array/common.h type_array/cell.h type_array/file.h type_array/fll_id.h type_array/int8.h type_array/int16.h type_array/int32.h type_array/int64.h type_array/int128.h type_array/number_signed.h type_array/number_unsigned.h type_array/poll.h type_array/quantity.h type_array/quantitys.h type_array/quantityss.h type_array/range.h type_array/ranges.h type_array/rangess.h type_array/range_double.h type_array/range_doubles.h type_array/range_doubless.h type_array/state.h type_array/status.h type_array/uint8.h type_array/uint16.h type_array/uint32.h type_array/uint64.h type_array/uint128.h
+build_sources_headers type.h type/cell.h type/file.h type/fll.h type/mode.h type/number.h type/pid.h type/quantity.h type/range.h type/range_double.h type/state.h type/status.h type/time.h
+build_sources_headers type_array.h type_array_file.h type_array/common.h type_array/cell.h type_array/file.h type_array/fll_id.h type_array/int8.h type_array/int16.h type_array/int32.h type_array/int64.h type_array/int128.h type_array/number_signed.h type_array/number_unsigned.h type_array/pid.h type_array/poll.h type_array/quantity.h type_array/quantitys.h type_array/quantityss.h type_array/range.h type_array/ranges.h type_array/rangess.h type_array/range_double.h type_array/range_doubles.h type_array/range_doubless.h type_array/state.h type_array/status.h type_array/uint8.h type_array/uint16.h type_array/uint32.h type_array/uint64.h type_array/uint128.h
build_sources_headers utf.h utf/common.h utf/convert.h utf/dynamic.h utf/dynamics.h utf/dynamicss.h utf/is.h utf/is_character.h utf/map.h utf/maps.h utf/mapss.h utf/map_multi.h utf/map_multis.h utf/map_multiss.h utf/static.h utf/statics.h utf/staticss.h utf/string.h utf/triple.h utf/triples.h utf/tripless.h
build_sources_headers-thread thread.h thread/attribute.h thread/barrier.h thread/barrier_attribute.h thread/condition.h thread/condition_attribute.h thread/id.h thread/key.h thread/lock.h thread/lock_attribute.h thread/mutex.h thread/mutex_attribute.h thread/once.h thread/semaphore.h thread/set.h thread/spin.h
build_sources_library level_0/string/static.c level_0/string/statics.c level_0/string/staticss.c
build_sources_library level_0/string/triple.c level_0/string/triples.c level_0/string/tripless.c
build_sources_library level_0/time.c
-build_sources_library level_0/type_array/cell.c level_0/type_array/file.c level_0/type_array/fll_id.c level_0/type_array/int8.c level_0/type_array/int16.c level_0/type_array/int32.c level_0/type_array/int64.c level_0/type_array/int128.c level_0/type_array/number_signed.c level_0/type_array/number_unsigned.c level_0/type_array/poll.c level_0/type_array/quantity.c level_0/type_array/quantitys.c level_0/type_array/quantityss.c level_0/type_array/range.c level_0/type_array/ranges.c level_0/type_array/rangess.c level_0/type_array/range_double.c level_0/type_array/range_doubles.c level_0/type_array/range_doubless.c level_0/type_array/state.c level_0/type_array/status.c level_0/type_array/uint8.c level_0/type_array/uint16.c level_0/type_array/uint32.c level_0/type_array/uint64.c level_0/type_array/uint128.c
+build_sources_library level_0/type_array/cell.c level_0/type_array/file.c level_0/type_array/fll_id.c level_0/type_array/int8.c level_0/type_array/int16.c level_0/type_array/int32.c level_0/type_array/int64.c level_0/type_array/int128.c level_0/type_array/number_signed.c level_0/type_array/number_unsigned.c level_0/type_array/pid.c level_0/type_array/poll.c level_0/type_array/quantity.c level_0/type_array/quantitys.c level_0/type_array/quantityss.c level_0/type_array/range.c level_0/type_array/ranges.c level_0/type_array/rangess.c level_0/type_array/range_double.c level_0/type_array/range_doubles.c level_0/type_array/range_doubless.c level_0/type_array/state.c level_0/type_array/status.c level_0/type_array/uint8.c level_0/type_array/uint16.c level_0/type_array/uint32.c level_0/type_array/uint64.c level_0/type_array/uint128.c
build_sources_library level_0/utf.c level_0/private-utf.c level_0/private-utf_alphabetic.c level_0/private-utf_combining.c level_0/private-utf_control.c level_0/private-utf_digit.c level_0/private-utf_emoji.c level_0/private-utf_numeric.c level_0/private-utf_phonetic.c level_0/private-utf_private.c level_0/private-utf_punctuation.c level_0/private-utf_subscript.c level_0/private-utf_superscript.c level_0/private-utf_symbol.c level_0/private-utf_unassigned.c level_0/private-utf_valid.c level_0/private-utf_whitespace.c level_0/private-utf_wide.c level_0/private-utf_word.c level_0/private-utf_zero_width.c
build_sources_library level_0/utf/common.c level_0/utf/convert.c
build_sources_library level_0/utf/dynamic.c level_0/utf/dynamics.c level_0/utf/dynamicss.c
build_sources_headers level_0/string/static.h level_0/string/statics.h level_0/string/staticss.h
build_sources_headers level_0/string/triple.h level_0/string/triples.h level_0/string/tripless.h
build_sources_headers level_0/time.h level_0/time/common.h
-build_sources_headers level_0/type.h level_0/type/cell.h level_0/type/file.h level_0/type/fll.h level_0/type/mode.h level_0/type/number.h level_0/type/quantity.h level_0/type/range.h level_0/type/range_double.h level_0/type/state.h level_0/type/status.h level_0/type/time.h
-build_sources_headers level_0/type_array.h level_0/type_array_file.h level_0/type_array/common.h level_0/type_array/cell.h level_0/type_array/file.h level_0/type_array/fll_id.h level_0/type_array/int8.h level_0/type_array/int16.h level_0/type_array/int32.h level_0/type_array/int64.h level_0/type_array/int128.h level_0/type_array/number_signed.h level_0/type_array/number_unsigned.h level_0/type_array/poll.h level_0/type_array/quantity.h level_0/type_array/quantitys.h level_0/type_array/quantityss.h level_0/type_array/range.h level_0/type_array/ranges.h level_0/type_array/rangess.h level_0/type_array/range_double.h level_0/type_array/range_doubles.h level_0/type_array/range_doubless.h level_0/type_array/state.h level_0/type_array/status.h level_0/type_array/uint8.h level_0/type_array/uint16.h level_0/type_array/uint32.h level_0/type_array/uint64.h level_0/type_array/uint128.h
+build_sources_headers level_0/type.h level_0/type/cell.h level_0/type/file.h level_0/type/fll.h level_0/type/mode.h level_0/type/number.h level_0/type/pid.h level_0/type/quantity.h level_0/type/range.h level_0/type/range_double.h level_0/type/state.h level_0/type/status.h level_0/type/time.h
+build_sources_headers level_0/type_array.h level_0/type_array_file.h level_0/type_array/common.h level_0/type_array/cell.h level_0/type_array/file.h level_0/type_array/fll_id.h level_0/type_array/int8.h level_0/type_array/int16.h level_0/type_array/int32.h level_0/type_array/int64.h level_0/type_array/int128.h level_0/type_array/number_signed.h level_0/type_array/number_unsigned.h level_0/type_array/pid.h level_0/type_array/poll.h level_0/type_array/quantity.h level_0/type_array/quantitys.h level_0/type_array/quantityss.h level_0/type_array/range.h level_0/type_array/ranges.h level_0/type_array/rangess.h level_0/type_array/range_double.h level_0/type_array/range_doubles.h level_0/type_array/range_doubless.h level_0/type_array/state.h level_0/type_array/status.h level_0/type_array/uint8.h level_0/type_array/uint16.h level_0/type_array/uint32.h level_0/type_array/uint64.h level_0/type_array/uint128.h
build_sources_headers level_0/utf.h level_0/utf/common.h level_0/utf/convert.h level_0/utf/dynamic.h level_0/utf/dynamics.h level_0/utf/dynamicss.h level_0/utf/is.h level_0/utf/is_character.h level_0/utf/map.h level_0/utf/maps.h level_0/utf/mapss.h level_0/utf/map_multi.h level_0/utf/map_multis.h level_0/utf/map_multiss.h level_0/utf/static.h level_0/utf/statics.h level_0/utf/staticss.h level_0/utf/string.h level_0/utf/triple.h level_0/utf/triples.h level_0/utf/tripless.h
build_sources_headers level_1/control_group.h
#include <stdint.h>
#include <sys/stat.h>
#include <sys/time.h>
+#include <sys/types.h>
#include <time.h>
#include <unistd.h>
#include <fll/level_0/type/cell.h>
#include <fll/level_0/type/fll.h>
#include <fll/level_0/type/mode.h>
+#include <fll/level_0/type/pid.h>
#include <fll/level_0/type/quantity.h>
#include <fll/level_0/type/range.h>
#include <fll/level_0/type/range_double.h>
#define f_cell_t_initialize { 0, 0 }
#define macro_f_cell_t_initialize_1(row, column) { row, column }
-
- #define macro_f_cell_t_clear(cell) \
- cell.row = 0; \
- cell.column = 0;
#endif // _di_f_cell_t_
/**
}
#define macro_f_fll_id_t_initialize_1(name, type, used) { name, type, used }
-
- #define macro_f_fll_id_t_clear(id) \
- id.name[0] = 0; \
- id.type = 0; \
- id.used = 0;
#endif // _di_f_fll_id_t_
/**
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Defines pid type data.
+ *
+ * This is auto-included by type.h and should not need to be explicitly included.
+ */
+#ifndef _F_pid_h
+#define _F_pid_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * An array of pids.
+ *
+ * Properties:
+ * - array: The array of pids.
+ * - size: Total amount of allocated space.
+ * - used: Total number of allocated spaces used.
+ */
+#ifndef _di_f_pids_t_
+ typedef struct {
+ pid_t *array;
+
+ f_number_unsigned_t size;
+ f_number_unsigned_t used;
+ } f_pids_t;
+
+ #define f_pids_t_initialize { 0, 0, 0 }
+
+ #define macro_f_pids_t_initialize_1(array, size, used) { array, size, used }
+ #define macro_f_pids_t_initialize_2(array, length) { array, length, length }
+#endif // _di_f_pids_t_
+
+/**
+ * This holds an array of f_pids_t.
+ *
+ * Properties:
+ * - array: The array of pids arrays.
+ * - size: Total amount of allocated space.
+ * - used: Total number of allocated spaces used.
+ */
+#ifndef _di_f_pidss_t_
+ typedef struct {
+ f_pids_t *array;
+
+ f_number_unsigned_t size;
+ f_number_unsigned_t used;
+ } f_pidss_t;
+
+ #define f_pidss_t_initialize { 0, 0, 0 }
+
+ #define macro_f_pidss_t_initialize_1(array, size, used) { array, size, used }
+ #define macro_f_pidss_t_initialize_2(array, length) { array, length, length }
+#endif // _di_f_pidss_t_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _F_pid_h
#define f_quantity_t_initialize { 0, 0 }
#define macro_f_quantity_t_initialize_1(start, total) { start, total }
-
- #define macro_f_quantity_t_clear(quantity) \
- quantity.start = 0; \
- quantity.total = 0;
#endif // _di_f_quantity_t_
/**
#define macro_f_quantitys_t_initialize_1(array, size, used) { array, size, used }
#define macro_f_quantitys_t_initialize_2(array, length) { array, length, length }
-
- #define macro_f_quantitys_t_clear(quantitys) \
- quantitys.array = 0; \
- quantitys.size = 0; \
- quantitys.used = 0;
#endif // _di_f_quantitys_t_
/**
#define macro_f_quantityss_t_initialize_1(array, size, used) { array, size, used }
#define macro_f_quantityss_t_initialize_2(array, length) { array, length, length }
-
- #define macro_f_quantityss_t_clear(quantityss) \
- quantityss.array = 0; \
- quantityss.size = 0; \
- quantityss.used = 0;
#endif // _di_f_quantityss_t_
#ifdef __cplusplus
#define macro_f_range_t_initialize_1(start, stop) { start, stop }
#define macro_f_range_t_initialize_2(length) { length ? 0 : 1, length ? length - 1 : 0 }
-
- #define macro_f_range_t_clear(range) \
- range.start = 1; \
- range.stop = 0;
#endif // _di_f_range_t_
/**
#define macro_f_ranges_t_initialize_1(array, size, used) { array, size, used }
#define macro_f_ranges_t_initialize_2(array, length) { array, length, length }
-
- #define macro_f_ranges_t_clear(ranges) \
- ranges.array = 0; \
- ranges.size = 0; \
- ranges.used = 0;
#endif // _di_f_ranges_t_
/**
#define macro_f_rangess_t_initialize_1(array, size, used) { array, size, used }
#define macro_f_rangess_t_initialize_2(array, length) { array, length, length }
-
- #define macro_f_rangess_t_clear(rangess) \
- rangess.array = 0; \
- rangess.size = 0; \
- rangess.used = 0;
#endif // _di_f_rangess_t_
#ifdef __cplusplus
#define macro_f_range_double_t_initialize_1(start_1, stop_1, start_2, stop_2) { start_1, stop_1, start_2, stop_2 }
#define macro_f_range_double_t_initialize_2(length_1, length_2) { length_1 ? 0 : 1, length_1 ? length_1 - 1 : 0, length_2 ? 0 : 1, length_2 ? length_2 - 1 : 0 }
-
- #define macro_f_range_double_t_clear(range_1, range_2) \
- range_1.start = 1; \
- range_1.stop = 0 \
- range_2.start = 1; \
- range_2.stop = 0;
#endif // _di_f_range_double_t_
/**
#define macro_f_range_doubles_t_initialize_1(array, size, used) { array, size, used }
#define macro_f_range_doubles_t_initialize_2(array, length) { array, length, length }
-
- #define macro_f_range_doubles_t_clear(ranges) \
- ranges.array = 0; \
- ranges.size = 0; \
- ranges.used = 0;
#endif // _di_f_range_doubles_t_
/**
#define macro_f_range_doubless_t_initialize_1(array, size, used) { array, size, used }
#define macro_f_range_doubless_t_initialize_2(array, length) { array, length, length }
-
- #define macro_f_range_doubless_t_clear(rangess) \
- rangess.array = 0; \
- rangess.size = 0; \
- rangess.used = 0;
#endif // _di_f_range_doubless_t_
#ifdef __cplusplus
custom, \
data, \
}
-
- #define macro_f_state_t_clear(state) \
- state.step_large = 0; \
- state.step_small = 0; \
- state.status = F_okay; \
- state.flag = 0; \
- state.code = 0; \
- state.handle = 0; \
- state.interrupt = 0; \
- state.callbacks = 0; \
- state.custom = 0; \
- state.data = 0;
#endif // _di_f_state_t_
/**
typedef uint64_t f_time_t;
#define f_time_t_initialize 0
-
- #define macro_f_time_t_clear(time) \
- time = 0;
#endif // _di_f_time_t_
/**
} f_time_simple_t;
#define f_time_simple_t_initialize { f_time_t_initialize, f_time_t_initialize }
-
- #define macro_f_time_simple_t_clear(simple) \
- macro_f_time_t_clear(simple.seconds); \
- macro_f_time_t_clear(simple.seconds_nano);
#endif // _di_f_time_simple_t_
/**
} f_date_t;
#define f_date_t_initialize { f_time_t_initialize, f_time_t_initialize }
-
- #define macro_f_date_t_clear(date) \
- date.year = 0; \
- macro_f_time_t_clear(date.time);
#endif // _di_f_date_t_
/**
} f_date_simple_t;
#define f_date_simple_t_initialize { f_time_t_initialize, macro_f_time_simple_t_clear }
-
- #define macro_f_date_simple_t_clear(date) \
- macro_f_time_t_clear(date.year); \
- macro_f_time_simple_t_clear(date.time);
#endif // _di_f_date_simple_t_
#ifdef __cplusplus
build_libraries -lc
-build_sources_headers type.h type/cell.h type/file.h type/fll.h type/mode.h type/number.h type/quantity.h type/range.h type/range_double.h type/state.h type/status.h type/time.h
+build_sources_headers type.h type/cell.h type/file.h type/fll.h type/mode.h type/number.h type/pid.h type/quantity.h type/range.h type/range_double.h type/state.h type/status.h type/time.h
build_script yes
build_shared yes
#include <fll/level_0/type_array/int128.h>
#include <fll/level_0/type_array/number_signed.h>
#include <fll/level_0/type_array/number_unsigned.h>
+#include <fll/level_0/type_array/pid.h>
#include <fll/level_0/type_array/quantity.h>
#include <fll/level_0/type_array/quantitys.h>
#include <fll/level_0/type_array/quantityss.h>
#include "../type_array.h"
-#include "cell.h"
#ifdef __cplusplus
extern "C" {
#include "../type_array.h"
#include "../type_array_file.h"
-#include "file.h"
#ifdef __cplusplus
extern "C" {
#include "../type_array.h"
-#include "fll_id.h"
#ifdef __cplusplus
extern "C" {
#include "../type_array.h"
-#include "int128.h"
#ifdef __cplusplus
extern "C" {
#include "../type_array.h"
-#include "int16.h"
#ifdef __cplusplus
extern "C" {
#include "../type_array.h"
-#include "int32.h"
#ifdef __cplusplus
extern "C" {
#include "../type_array.h"
-#include "int64.h"
#ifdef __cplusplus
extern "C" {
#include "../type_array.h"
-#include "int8.h"
#ifdef __cplusplus
extern "C" {
#include "../type_array.h"
-#include "number_signed.h"
#ifdef __cplusplus
extern "C" {
#include "../type_array.h"
-#include "number_unsigned.h"
#ifdef __cplusplus
extern "C" {
--- /dev/null
+#include "../type_array.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_f_pidss_delete_callback_
+ f_status_t f_pidss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_pids_t * const array = (f_pids_t *) void_array;
+ f_status_t status = F_okay;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ if (array[i].size && array[i].array) {
+ status = f_memory_array_resize(0, sizeof(pid_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
+
+ return F_okay;
+ }
+#endif // _di_f_pidss_delete_callback_
+
+#ifndef _di_f_pidss_destroy_callback_
+ f_status_t f_pidss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const void_array) {
+
+ {
+ f_pids_t * const array = (f_pids_t *) void_array;
+ f_status_t status = F_okay;
+
+ for (f_number_unsigned_t i = start; i < stop; ++i) {
+
+ if (array[i].size && array[i].array) {
+ status = f_memory_array_adjust(0, sizeof(pid_t), (void **) &array[i].array, &array[i].used, &array[i].size);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+ }
+
+ return F_okay;
+ }
+#endif // _di_f_pidss_destroy_callback_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Defines data to be used for/by type (array) related functionality.
+ *
+ * This is auto-included by type_array.h and should not need to be explicitly included.
+ */
+#ifndef _F_type_array_pid_h
+#define _F_type_array_pid_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * A callback intended to be passed to f_memory_arrays_resize() for an f_pidss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_okay on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_resize().
+ *
+ * @see f_memory_array_resize()
+ * @see f_memory_arrays_resize()
+ */
+#ifndef _di_f_pidss_delete_callback_
+ extern f_status_t f_pidss_delete_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_pidss_delete_callback_
+
+/**
+ * A callback intended to be passed to f_memory_arrays_adjust() for an f_pidss_t structure.
+ *
+ * This is only called when shrinking the array and generally should perform deallocations.
+ *
+ * This does not do parameter checking.
+ *
+ * @param start
+ * The inclusive start position in the array to start deleting.
+ * @param stop
+ * The exclusive stop position in the array to stop deleting.
+ * @param array
+ * The array structure to delete all values of.
+ * Must not be NULL.
+ *
+ * @return
+ * F_okay on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_array_adjust().
+ *
+ * @see f_memory_array_adjust()
+ * @see f_memory_arrays_adjust()
+ */
+#ifndef _di_f_pidss_destroy_callback_
+ extern f_status_t f_pidss_destroy_callback(const f_number_unsigned_t start, const f_number_unsigned_t stop, void * const array);
+#endif // _di_f_pidss_destroy_callback_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _F_type_array_pid_h
#include "../type_array.h"
#include "../type_array_file.h"
-#include "poll.h"
#ifdef __cplusplus
extern "C" {
#include "../type_array.h"
-#include "quantity.h"
#ifdef __cplusplus
extern "C" {
#include "../type_array.h"
-#include "quantitys.h"
#ifdef __cplusplus
extern "C" {
#include "../type_array.h"
-#include "quantityss.h"
#ifdef __cplusplus
extern "C" {
#include "../type_array.h"
-#include "range.h"
#ifdef __cplusplus
extern "C" {
#include "../type_array.h"
-#include "range_double.h"
#ifdef __cplusplus
extern "C" {
#include "../type_array.h"
-#include "range_doubles.h"
#ifdef __cplusplus
extern "C" {
#include "../type_array.h"
-#include "range_doubless.h"
#ifdef __cplusplus
extern "C" {
#include "../type_array.h"
-#include "ranges.h"
#ifdef __cplusplus
extern "C" {
#include "../type_array.h"
-#include "rangess.h"
#ifdef __cplusplus
extern "C" {
#include "../type_array.h"
-#include "state.h"
#ifdef __cplusplus
extern "C" {
#include "../type_array.h"
-#include "status.h"
#ifdef __cplusplus
extern "C" {
#include "../type_array.h"
-#include "uint128.h"
#ifdef __cplusplus
extern "C" {
#include "../type_array.h"
-#include "uint16.h"
#ifdef __cplusplus
extern "C" {
#include "../type_array.h"
-#include "uint32.h"
#ifdef __cplusplus
extern "C" {
#include "../type_array.h"
-#include "uint64.h"
#ifdef __cplusplus
extern "C" {
#include "../type_array.h"
-#include "uint8.h"
#ifdef __cplusplus
extern "C" {
build_libraries -lc
build_libraries-individual -lf_memory
-build_sources_library type_array/cell.c type_array/file.c type_array/fll_id.c type_array/int8.c type_array/int16.c type_array/int32.c type_array/int64.c type_array/int128.c type_array/number_signed.c type_array/number_unsigned.c type_array/poll.c type_array/quantity.c type_array/quantitys.c type_array/quantityss.c type_array/range.c type_array/ranges.c type_array/rangess.c type_array/range_double.c type_array/range_doubles.c type_array/range_doubless.c type_array/state.c type_array/status.c type_array/uint8.c type_array/uint16.c type_array/uint32.c type_array/uint64.c type_array/uint128.c
+build_sources_library type_array/cell.c type_array/file.c type_array/fll_id.c type_array/int8.c type_array/int16.c type_array/int32.c type_array/int64.c type_array/int128.c type_array/number_signed.c type_array/number_unsigned.c type_array/pid.c type_array/poll.c type_array/quantity.c type_array/quantitys.c type_array/quantityss.c type_array/range.c type_array/ranges.c type_array/rangess.c type_array/range_double.c type_array/range_doubles.c type_array/range_doubless.c type_array/state.c type_array/status.c type_array/uint8.c type_array/uint16.c type_array/uint32.c type_array/uint64.c type_array/uint128.c
-build_sources_headers type_array.h type_array_file.h type_array/common.h type_array/cell.h type_array/file.h type_array/fll_id.h type_array/int8.h type_array/int16.h type_array/int32.h type_array/int64.h type_array/int128.h type_array/number_signed.h type_array/number_unsigned.h type_array/poll.h type_array/quantity.h type_array/quantitys.h type_array/quantityss.h type_array/range.h type_array/ranges.h type_array/rangess.h type_array/range_double.h type_array/range_doubles.h type_array/range_doubless.h type_array/state.h type_array/status.h type_array/uint8.h type_array/uint16.h type_array/uint32.h type_array/uint64.h type_array/uint128.h
+build_sources_headers type_array.h type_array_file.h type_array/common.h type_array/cell.h type_array/file.h type_array/fll_id.h type_array/int8.h type_array/int16.h type_array/int32.h type_array/int64.h type_array/int128.h type_array/number_signed.h type_array/number_unsigned.h type_array/pid.h type_array/poll.h type_array/quantity.h type_array/quantitys.h type_array/quantityss.h type_array/range.h type_array/ranges.h type_array/rangess.h type_array/range_double.h type_array/range_doubles.h type_array/range_doubless.h type_array/state.h type_array/status.h type_array/uint8.h type_array/uint16.h type_array/uint32.h type_array/uint64.h type_array/uint128.h
build_script yes
build_shared yes
build_libraries -lc
build_libraries-individual -lf_memory
-build_sources_library type_array/cell.c type_array/file.c type_array/fll_id.c type_array/int8.c type_array/int16.c type_array/int32.c type_array/int64.c type_array/int128.c type_array/number_signed.c type_array/number_unsigned.c type_array/poll.c type_array/quantity.c type_array/quantitys.c type_array/quantityss.c type_array/range.c type_array/ranges.c type_array/rangess.c type_array/range_double.c type_array/range_doubles.c type_array/range_doubless.c type_array/state.c type_array/status.c type_array/uint8.c type_array/uint16.c type_array/uint32.c type_array/uint64.c type_array/uint128.c
+build_sources_library type_array/cell.c type_array/file.c type_array/fll_id.c type_array/int8.c type_array/int16.c type_array/int32.c type_array/int64.c type_array/int128.c type_array/number_signed.c type_array/number_unsigned.c type_array/pid.c type_array/poll.c type_array/quantity.c type_array/quantitys.c type_array/quantityss.c type_array/range.c type_array/ranges.c type_array/rangess.c type_array/range_double.c type_array/range_doubles.c type_array/range_doubless.c type_array/state.c type_array/status.c type_array/uint8.c type_array/uint16.c type_array/uint32.c type_array/uint64.c type_array/uint128.c
build_sources_library ../../tests/unit/c/mock-type_array.c
-build_sources_headers type_array.h type_array_file.h type_array/common.h type_array/cell.h type_array/file.h type_array/fll_id.h type_array/int8.h type_array/int16.h type_array/int32.h type_array/int64.h type_array/int128.h type_array/number_signed.h type_array/number_unsigned.h type_array/poll.h type_array/quantity.h type_array/quantitys.h type_array/quantityss.h type_array/range.h type_array/ranges.h type_array/rangess.h type_array/range_double.h type_array/range_doubles.h type_array/range_doubless.h type_array/state.h type_array/status.h type_array/uint8.h type_array/uint16.h type_array/uint32.h type_array/uint64.h type_array/uint128.h
+build_sources_headers type_array.h type_array_file.h type_array/common.h type_array/cell.h type_array/file.h type_array/fll_id.h type_array/int8.h type_array/int16.h type_array/int32.h type_array/int64.h type_array/int128.h type_array/number_signed.h type_array/number_unsigned.h type_array/pid.h type_array/poll.h type_array/quantity.h type_array/quantitys.h type_array/quantityss.h type_array/range.h type_array/ranges.h type_array/rangess.h type_array/range_double.h type_array/range_doubles.h type_array/range_doubless.h type_array/state.h type_array/status.h type_array/uint8.h type_array/uint16.h type_array/uint32.h type_array/uint64.h type_array/uint128.h
build_script yes
build_shared yes
build_sources_program test-type_array-int128ss_delete_callback.c test-type_array-int128ss_destroy_callback.c
build_sources_program test-type_array-number_signedss_delete_callback.c test-type_array-number_signedss_destroy_callback.c
build_sources_program test-type_array-number_unsignedss_delete_callback.c test-type_array-number_unsignedss_destroy_callback.c
+build_sources_program test-type_array-pidss_delete_callback.c test-type_array-pidss_destroy_callback.c
build_sources_program test-type_array-pollss_delete_callback.c test-type_array-pollss_destroy_callback.c
build_sources_program test-type_array-quantitys_append.c test-type_array-quantitys_append_all.c test-type_array-quantityss_append.c test-type_array-quantityss_append_all.c
build_sources_program test-type_array-quantityss_delete_callback.c test-type_array-quantityss_destroy_callback.c
--- /dev/null
+#include "test-type_array.h"
+#include "test-type_array-pidss_delete_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_pidss_delete_callback__fails(void **state) {
+
+ mock_unwrap = 0;
+ mock_unwrap_f_memory = 0;
+
+ pid_t data = 0;
+ pid_t data_array[] = { data };
+ f_pids_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_pids_t datas_array[] = { datas };
+
+ {
+ will_return(__wrap_f_memory_array_resize, true);
+ will_return(__wrap_f_memory_array_resize, F_status_set_error(F_failure));
+
+ const f_status_t status = f_pidss_delete_callback(0, 1, (void *) datas_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_type_array_pidss_delete_callback__works(void **state) {
+
+ mock_unwrap = 1;
+ mock_unwrap_f_memory = 1;
+
+ const f_number_unsigned_t length = 1;
+
+ f_pidss_t datass = f_pidss_t_initialize;
+
+ {
+ f_status_t status = f_memory_array_resize(length, sizeof(f_pids_t), (void **) &datass.array, &datass.used, &datass.size);
+ assert_int_equal(status, F_okay);
+
+ status = f_memory_array_resize(1, sizeof(pid_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+ assert_int_equal(status, F_okay);
+ }
+
+ {
+ const f_status_t status = f_pidss_delete_callback(0, length, (void *) datass.array);
+
+ assert_int_equal(status, F_okay);
+ assert_int_equal(datass.array[0].size, 0);
+ }
+
+ free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__pidss_delete_callback
+#define _TEST__F_type_array__pidss_delete_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_pidss_delete_callback()
+ */
+extern void test__f_type_array_pidss_delete_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_pidss_delete_callback()
+ */
+extern void test__f_type_array_pidss_delete_callback__works(void **state);
+
+#endif // _TEST__F_type_array__pidss_delete_callback
--- /dev/null
+#include "test-type_array.h"
+#include "test-type_array-pidss_destroy_callback.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_type_array_pidss_destroy_callback__fails(void **state) {
+
+ mock_unwrap = 0;
+ mock_unwrap_f_memory = 0;
+
+ pid_t data = 0;
+ pid_t data_array[] = { data };
+ f_pids_t datas = { .array = data_array, .used = 1, .size = 1 };
+ f_pids_t datas_array[] = { datas };
+
+ {
+ will_return(__wrap_f_memory_array_adjust, true);
+ will_return(__wrap_f_memory_array_adjust, F_status_set_error(F_failure));
+
+ const f_status_t status = f_pidss_destroy_callback(0, 1, (void *) datas_array);
+
+ assert_int_equal(status, F_status_set_error(F_failure));
+ }
+}
+
+void test__f_type_array_pidss_destroy_callback__works(void **state) {
+
+ mock_unwrap = 1;
+ mock_unwrap_f_memory = 1;
+
+ const f_number_unsigned_t length = 1;
+
+ f_pidss_t datass = f_pidss_t_initialize;
+
+ {
+ f_status_t status = f_memory_array_adjust(length, sizeof(f_pids_t), (void **) &datass.array, &datass.used, &datass.size);
+ assert_int_equal(status, F_okay);
+
+ status = f_memory_array_adjust(1, sizeof(pid_t), (void **) &datass.array[0].array, &datass.array[0].used, &datass.array[0].size);
+ assert_int_equal(status, F_okay);
+ }
+
+ {
+ const f_status_t status = f_pidss_destroy_callback(0, length, (void *) datass.array);
+
+ assert_int_equal(status, F_okay);
+ assert_int_equal(datass.array[0].size, 0);
+ }
+
+ free((void *) datass.array);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Type
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Test the array types in the type project.
+ */
+#ifndef _TEST__F_type_array__pidss_destroy_callback
+#define _TEST__F_type_array__pidss_destroy_callback
+
+/**
+ * Test that the function fails.
+ *
+ * @see f_pidss_destroy_callback()
+ */
+extern void test__f_type_array_pidss_destroy_callback__fails(void **state);
+
+/**
+ * Test that the function works.
+ *
+ * @see f_pidss_destroy_callback()
+ */
+extern void test__f_type_array_pidss_destroy_callback__works(void **state);
+
+#endif // _TEST__F_type_array__pidss_destroy_callback
cmocka_unit_test(test__f_type_array_number_unsignedss_destroy_callback__fails),
cmocka_unit_test(test__f_type_array_number_unsignedss_destroy_callback__works),
+ cmocka_unit_test(test__f_type_array_pidss_delete_callback__fails),
+ cmocka_unit_test(test__f_type_array_pidss_delete_callback__works),
+
cmocka_unit_test(test__f_type_array_pollss_delete_callback__fails),
cmocka_unit_test(test__f_type_array_pollss_delete_callback__works),
// f_number_unsignedss_destroy_callback() doesn't use parameter checking.
// f_number_unsignedss_delete_callback() doesn't use parameter checking.
+ // f_pidss_destroy_callback() doesn't use parameter checking.
+ // f_pidss_delete_callback() doesn't use parameter checking.
+
// f_pollss_destroy_callback() doesn't use parameter checking.
// f_pollss_delete_callback() doesn't use parameter checking.
#include "test-type_array-number_signedss_destroy_callback.h"
#include "test-type_array-number_unsignedss_delete_callback.h"
#include "test-type_array-number_unsignedss_destroy_callback.h"
+#include "test-type_array-pidss_delete_callback.h"
+#include "test-type_array-pidss_destroy_callback.h"
#include "test-type_array-pollss_delete_callback.h"
#include "test-type_array-pollss_destroy_callback.h"
#include "test-type_array-quantitys_append.h"
process->type = type;
macro_f_time_simple_t_clear(process->cache.timestamp)
- macro_f_range_t_clear(process->cache.range_action)
process->cache.ats.used = 0;
process->cache.stack.used = 0;
process->cache.action.name_file.used = 0;
process->cache.action.name_item.used = 0;
process->cache.action.generic.used = 0;
+ process->cache.range_action.start = 1;
+ process->cache.range_action.stop = 0;
process->stack.used = 0;