typedef f_string_location f_fss_object;
#define f_fss_object_initialize f_string_location_initialize
- #define f_macro_fss_object_new(status, object, length) status = f_new_array((void **) & object, sizeof(f_fss_object), length)
+ #define f_macro_fss_object_new(status, object, length) status = f_memory_new((void **) & object, sizeof(f_fss_object), length)
- #define f_macro_fss_object_delete(status, object) status = f_delete((void **) & object)
- #define f_macro_fss_object_destroy(status, object, size) status = f_destroy((void **) & object, sizeof(f_fss_object), size)
+ #define f_macro_fss_object_delete(status, object) status = f_memory_delete((void **) & object)
+ #define f_macro_fss_object_destroy(status, object, size) status = f_memory_destroy((void **) & object, sizeof(f_fss_object), size)
- #define f_macro_fss_object_resize(status, object, old_length, new_length) status = f_resize((void **) & object, sizeof(f_fss_object), old_length, new_length)
+ #define f_macro_fss_object_resize(status, object, old_length, new_length) status = f_memory_resize((void **) & object, sizeof(f_fss_object), old_length, new_length)
- #define f_macro_fss_object_adjust(status, object, old_length, new_length) status = f_adjust((void **) & object, sizeof(f_fss_object), old_length, new_length)
+ #define f_macro_fss_object_adjust(status, object, old_length, new_length) status = f_memory_adjust((void **) & object, sizeof(f_fss_object), old_length, new_length)
#endif // _di_fss_object_
/**
extern "C" {
#endif
-#ifndef _di_f_new_
- f_return_status f_new_array(void **pointer, const f_memory_size_t type, const f_memory_length length) {
+#ifndef _di_f_memory_new_
+ f_return_status f_memory_new(void **pointer, const f_memory_size_t type, const f_memory_length length) {
#ifndef _di_level_0_parameter_checking_
if (type <= 0) return f_status_set_error(f_invalid_parameter);
if (pointer == 0) return f_status_set_error(f_invalid_parameter);
return f_status_set_error(f_allocation_error);
}
-#endif // _di_f_new_
+#endif // _di_f_memory_new_
-#if ! ( defined (_di_f_delete_) || defined (_f_memory_FORCE_secure_memory_) )
- f_return_status f_delete(void **pointer, const f_memory_size_t type, const f_memory_length length) {
+#if ! ( defined (_di_f_memory_delete_) || defined (_f_memory_FORCE_secure_memory_) )
+ f_return_status f_memory_delete(void **pointer, const f_memory_size_t type, const f_memory_length length) {
#ifndef _di_level_0_parameter_checking_
if (pointer == 0) return f_status_set_error(f_invalid_parameter);
#endif // _di_level_0_parameter_checking_
return f_none;
}
-#endif // ! ( defined (_di_f_delete_) || defined (_f_memory_FORCE_secure_memory_) )
+#endif // ! ( defined (_di_f_memory_delete_) || defined (_f_memory_FORCE_secure_memory_) )
-#if ! ( defined (_di_f_destroy_) || defined (_f_memory_FORCE_fast_memory_) )
- f_return_status f_destroy(void **pointer, const f_memory_size_t type, const f_memory_length length) {
+#if ! ( defined (_di_f_memory_destroy_) || defined (_f_memory_FORCE_fast_memory_) )
+ f_return_status f_memory_destroy(void **pointer, const f_memory_size_t type, const f_memory_length length) {
#ifndef _di_level_0_parameter_checking_
if (length < 0) return f_status_set_error(f_invalid_parameter);
if (type <= 0) return f_status_set_error(f_invalid_parameter);
return f_none;
}
-#endif // ! ( defined (_di_f_destroy_) || defined (_f_memory_FORCE_fast_memory_) )
+#endif // ! ( defined (_di_f_memory_destroy_) || defined (_f_memory_FORCE_fast_memory_) )
-#if ! ( defined (_di_f_resize_) || defined (_f_memory_FORCE_secure_memory_) )
- f_return_status f_resize(void **pointer, const f_memory_size_t type, const f_memory_length old_length, const f_memory_length new_length) {
+#if ! ( defined (_di_f_memory_resize_) || defined (_f_memory_FORCE_secure_memory_) )
+ f_return_status f_memory_resize(void **pointer, const f_memory_size_t type, const f_memory_length old_length, const f_memory_length new_length) {
#ifndef _di_level_0_parameter_checking_
if (type <= 0) return f_status_set_error(f_invalid_parameter);
if (old_length < 0) return f_status_set_error(f_invalid_parameter);
return f_status_set_error(f_reallocation_error);
}
-#endif // ! ( defined (_di_f_resize_) || defined (_f_memory_FORCE_secure_memory_) )
+#endif // ! ( defined (_di_f_memory_resize_) || defined (_f_memory_FORCE_secure_memory_) )
-#if ! ( defined (_di_f_adjust_) || defined (_f_memory_FORCE_fast_memory_) )
- f_return_status f_adjust(void **pointer, const f_memory_size_t type, const f_memory_length old_length, const f_memory_length new_length) {
+#if ! ( defined (_di_f_memory_adjust_) || defined (_f_memory_FORCE_fast_memory_) )
+ f_return_status f_memory_adjust(void **pointer, const f_memory_size_t type, const f_memory_length old_length, const f_memory_length new_length) {
#ifndef _di_level_0_parameter_checking_
if (type <= 0) return f_status_set_error(f_invalid_parameter);
if (old_length < 0) return f_status_set_error(f_invalid_parameter);
return f_status_set_error(f_reallocation_error);
}
-#endif // ! ( defined (_di_f_adjust_) || defined (_f_memory_FORCE_fast_memory_) )
+#endif // ! ( defined (_di_f_memory_adjust_) || defined (_f_memory_FORCE_fast_memory_) )
#ifdef __cplusplus
} // extern "C"
#endif
#ifdef _f_memory_FORCE_secure_memory_
- #define f_delete(the_pointer, the_type, the_length) f_destroy(the_pointer, the_type, the_length)
- #define f_resize(the_pointer, the_type, the_old_length, the_new_length) f_adjust(the_pointer, the_type, the_old_length, the_new_length)
+ #define f_memory_delete(the_pointer, the_type, the_length) f_memory_destroy(the_pointer, the_type, the_length)
+ #define f_memory_resize(the_pointer, the_type, the_old_length, the_new_length) f_memory_adjust(the_pointer, the_type, the_old_length, the_new_length)
#ifdef _f_memory_FORCE_fast_memory_
#error You cannot define both _f_memory_FORCE_fast_memory_ and _f_memory_FORCE_secure_memory_ at the same time
#endif // _f_memory_FORCE_secure_memory_
#ifdef _f_memory_FORCE_fast_memory_
- #define f_destroy(the_pointer, the_type, the_length) f_delete(the_pointer, the_type, the_length)
- #define f_adjust(the_pointer, the_type, the_old_length, the_new_length) f_resize(the_pointer, the_type, the_old_length, the_new_length)
+ #define f_memory_destroy(the_pointer, the_type, the_length) f_memory_delete(the_pointer, the_type, the_length)
+ #define f_memory_adjust(the_pointer, the_type, the_old_length, the_new_length) f_memory_resize(the_pointer, the_type, the_old_length, the_new_length)
#endif // _f_memory_FORCE_fast_memory_
#define f_memory_length size_t
#endif // _di_f_memory_types_
-#ifndef _di_f_new_
+#ifndef _di_f_memory_new_
// Create some dynamically allocated array of some length
- extern f_return_status f_new_array(void **pointer, const f_memory_size_t type, const f_memory_length length);
-#endif // _di_f_new_
+ extern f_return_status f_memory_new(void **pointer, const f_memory_size_t type, const f_memory_length length);
+#endif // _di_f_memory_new_
-#if ! ( defined (_di_f_delete_) || defined (_f_memory_FORCE_secure_memory_) )
+#if ! ( defined (_di_f_memory_delete_) || defined (_f_memory_FORCE_secure_memory_) )
/**
* deletes some dynamically allocated data.
- * f_delete, will not change any of the data to 0 prior to deallocation.
- * type and length are not used by this function normally but must be provided for the cases when f_delete is swapped with f_destroy (or vice-versa).
+ * f_memory_delete, will not change any of the data to 0 prior to deallocation.
+ * type and length are not used by this function normally but must be provided for the cases when f_memory_delete is swapped with f_memory_destroy (or vice-versa).
*/
- extern f_return_status f_delete(void **pointer, const f_memory_size_t type, const f_memory_length length);
-#endif // ! ( defined (_di_f_delete_) || defined (_f_memory_FORCE_secure_memory_) )
+ extern f_return_status f_memory_delete(void **pointer, const f_memory_size_t type, const f_memory_length length);
+#endif // ! ( defined (_di_f_memory_delete_) || defined (_f_memory_FORCE_secure_memory_) )
-#if ! ( defined (_di_f_destroy_) || defined (_f_memory_FORCE_fast_memory_) )
+#if ! ( defined (_di_f_memory_destroy_) || defined (_f_memory_FORCE_fast_memory_) )
/**
* securely deletes some dynamically allocated data.
- * f_destroy, will change all data to 0 prior to deallocation.
+ * f_memory_destroy, will change all data to 0 prior to deallocation.
*/
- extern f_return_status f_destroy(void **pointer, const f_memory_size_t type, const f_memory_length length);
-#endif // ! ( defined (_di_f_destroy_) || defined (_f_memory_FORCE_fast_memory_) )
+ extern f_return_status f_memory_destroy(void **pointer, const f_memory_size_t type, const f_memory_length length);
+#endif // ! ( defined (_di_f_memory_destroy_) || defined (_f_memory_FORCE_fast_memory_) )
-#if ! ( defined (_di_f_resize_) || defined (_f_memory_FORCE_secure_memory_) )
+#if ! ( defined (_di_f_memory_resize_) || defined (_f_memory_FORCE_secure_memory_) )
/**
* resizes some dynamically allocated data.
- * f_resize, will not change any of the data prior to deallocation.
+ * f_memory_resize, will not change any of the data prior to deallocation.
*/
- extern f_return_status f_resize(void **pointer, const f_memory_size_t type, const f_memory_length old_length, const f_memory_length new_length);
-#endif // ! ( defined (_di_f_resize_) || defined (_f_memory_FORCE_secure_memory_) )
+ extern f_return_status f_memory_resize(void **pointer, const f_memory_size_t type, const f_memory_length old_length, const f_memory_length new_length);
+#endif // ! ( defined (_di_f_memory_resize_) || defined (_f_memory_FORCE_secure_memory_) )
-#if ! ( defined (_di_f_adjust_) || defined (_f_memory_FORCE_fast_memory_) )
+#if ! ( defined (_di_f_memory_adjust_) || defined (_f_memory_FORCE_fast_memory_) )
/**
* securely resizes some dynamically allocated data.
- * f_adjust, will change all data to 0 prior to deallocation.
+ * f_memory_adjust, will change all data to 0 prior to deallocation.
*/
- extern f_return_status f_adjust(void **pointer, const f_memory_size_t type, const f_memory_length old_length, const f_memory_length new_length);
-#endif // _di_f_adjust_
+ extern f_return_status f_memory_adjust(void **pointer, const f_memory_size_t type, const f_memory_length old_length, const f_memory_length new_length);
+#endif // _di_f_memory_adjust_
// centralize allocation for all FLL structures that follow the size+used approach.
structure.array = 0; \
structure.size = 0; \
structure.used = 0; \
- status = f_new_array((void **) & structure.array, sizeof(type), length); \
+ status = f_memory_new((void **) & structure.array, sizeof(type), length); \
if (status == f_none) { \
structure.size = length; \
structure.used = 0; \
* type: the structure type.
*/
#define f_macro_memory_structure_delete(status, structure, type) \
- status = f_delete((void **) & structure.array, sizeof(type), structure.size); \
+ status = f_memory_delete((void **) & structure.array, sizeof(type), structure.size); \
if (status == f_none) { \
structure.size = 0; \
structure.used = 0; \
* type: the structure type.
*/
#define f_macro_memory_structure_destroy(status, structure, type) \
- status = f_destroy((void **) & structure.array, sizeof(type), structure.size); \
+ status = f_memory_destroy((void **) & structure.array, sizeof(type), structure.size); \
if (status == f_none) { \
structure.size = 0; \
structure.used = 0; \
* type: the structure type.
*/
#define f_macro_memory_structure_resize(status, structure, type, new_length) \
- status = f_resize((void **) & structure.array, sizeof(type), structure.size, new_length); \
+ status = f_memory_resize((void **) & structure.array, sizeof(type), structure.size, new_length); \
if (status == f_none) { \
structure.size = new_length; \
if (structure.used > structure.size) structure.used = new_length; \
* type: the structure type.
*/
#define f_macro_memory_structure_adjust(status, structure, type, new_length) \
- status = f_adjust((void **) & structure.array, sizeof(type), structure.size, new_length); \
+ status = f_memory_adjust((void **) & structure.array, sizeof(type), structure.size, new_length); \
if (status == f_none) { \
structure.size = new_length; \
if (structure.used > structure.size) structure.used = new_length; \
structures.array = 0; \
structures.size = 0; \
structures.used = 0; \
- status = f_new_array((void **) & structures.array, sizeof(type), new_length); \
+ status = f_memory_new((void **) & structures.array, sizeof(type), new_length); \
if (status == f_none) { \
structures.size = new_length; \
structures.used = 0; \
f_macro_memory_structure_delete(status, structures.array[structures.size], type); \
if (status != f_none) break; \
} \
- if (status == f_none) status = f_delete((void **) & structures.array, sizeof(type), structures.size); \
+ if (status == f_none) status = f_memory_delete((void **) & structures.array, sizeof(type), structures.size); \
if (status == f_none) structures.used = 0;
#endif // _di_f_macro_memory_structures_delete_
f_macro_memory_structure_destroy(status, structures.array[structures.size], type); \
if (status != f_none) break; \
} \
- if (status == f_none) status = f_destroy((void **) & structures.array, sizeof(type), structures.size); \
+ if (status == f_none) status = f_memory_destroy((void **) & structures.array, sizeof(type), structures.size); \
if (status == f_none) structures.used = 0;
#endif // _di_f_macro_memory_structures_destroy_
if (status != f_none) break; \
} \
} \
- if (status == f_none) status = f_resize((void **) & structures.array, sizeof(type), structures.size, new_length); \
+ if (status == f_none) status = f_memory_resize((void **) & structures.array, sizeof(type), structures.size, new_length); \
if (status == f_none) { \
if (new_length > structures.size) { \
length_variable i = structures.size; \
if (status != f_none) break; \
} \
} \
- if (status == f_none) status = f_adjust((void **) & structures.array, sizeof(type), structures.size, new_length); \
+ if (status == f_none) status = f_memory_adjust((void **) & structures.array, sizeof(type), structures.size, new_length); \
if (status == f_none) { \
if (new_length > structures.size) { \
length_variable i = structures.size; \
#define f_string_max_size f_signed_long_size
#define f_string_initialize f_string_eos
- #define f_macro_string_new(status, string, length) status = f_new_array((void **) & string, sizeof(f_string), length)
- #define f_macro_string_delete(status, string, size) status = f_delete((void **) & string, sizeof(f_string), size)
- #define f_macro_string_destroy(status, string, size) status = f_destroy((void **) & string, sizeof(f_string), size)
+ #define f_macro_string_new(status, string, length) status = f_memory_new((void **) & string, sizeof(f_string), length)
+ #define f_macro_string_delete(status, string, size) status = f_memory_delete((void **) & string, sizeof(f_string), size)
+ #define f_macro_string_destroy(status, string, size) status = f_memory_destroy((void **) & string, sizeof(f_string), size)
#define f_macro_string_resize(status, string, old_length, new_length) \
- status = f_resize((void **) & string, sizeof(f_string), old_length, new_length)
+ status = f_memory_resize((void **) & string, sizeof(f_string), old_length, new_length)
#define f_macro_string_adjust(status, string, old_length, new_length) \
- status = f_adjust((void **) & string, sizeof(f_string), old_length, new_length)
+ status = f_memory_adjust((void **) & string, sizeof(f_string), old_length, new_length)
#endif // _di_f_string_
#ifndef _di_f_string_length_
#define f_string_length_printf string_format_long_integer
- #define f_macro_string_length_new(status, string, length) status = f_new_array((void **) & string, sizeof(f_string_length), length)
- #define f_macro_string_length_delete(status, string, length) status = f_delete((void **) & string, sizeof(f_string_length), length)
- #define f_macro_string_length_destroy(status, string, size) status = f_destroy((f_void_P *) & string, sizeof(f_string_length), size)
+ #define f_macro_string_length_new(status, string, length) status = f_memory_new((void **) & string, sizeof(f_string_length), length)
+ #define f_macro_string_length_delete(status, string, length) status = f_memory_delete((void **) & string, sizeof(f_string_length), length)
+ #define f_macro_string_length_destroy(status, string, size) status = f_memory_destroy((f_void_P *) & string, sizeof(f_string_length), size)
#define f_macro_string_length_resize(status, length, old_length, new_length) \
- status = f_resize((void **) & length, sizeof(f_string_length), old_length, new_length)
+ status = f_memory_resize((void **) & length, sizeof(f_string_length), old_length, new_length)
#define f_macro_string_length_adjust(status, length, old_length, new_length) \
- status = f_adjust((void **) & length, sizeof(f_string_length), old_length, new_length)
+ status = f_memory_adjust((void **) & length, sizeof(f_string_length), old_length, new_length)
#endif // _di_f_string_length_
/**
#define f_string_location_initialize { 1, 0 }
- #define f_macro_string_location_new(status, string_location, length) status = f_new_array((void **) & string_location, sizeof(f_string_location), length)
- #define f_macro_string_location_delete(status, string_location, size) status = f_delete((void **) & string_location, sizeof(f_string_location), size)
- #define f_macro_string_location_destroy(status, string_location, size) status = f_destroy((void **) & string_location, sizeof(f_string_location), size)
+ #define f_macro_string_location_new(status, string_location, length) status = f_memory_new((void **) & string_location, sizeof(f_string_location), length)
+ #define f_macro_string_location_delete(status, string_location, size) status = f_memory_delete((void **) & string_location, sizeof(f_string_location), size)
+ #define f_macro_string_location_destroy(status, string_location, size) status = f_memory_destroy((void **) & string_location, sizeof(f_string_location), size)
#define f_macro_string_location_resize(status, string_location, old_length, new_length) \
- status = f_resize((void **) & string_location, sizeof(f_string_location), old_length, new_length)
+ status = f_memory_resize((void **) & string_location, sizeof(f_string_location), old_length, new_length)
#define f_macro_string_location_adjust(status, string_location, old_length, new_length) \
- status = f_adjust((void **) & string_location, sizeof(f_string_location), old_length, new_length)
+ status = f_memory_adjust((void **) & string_location, sizeof(f_string_location), old_length, new_length)
#endif // _di_f_string_location_
/**
#define f_macro_string_dynamic_new(status, dynamic, new_length) \
f_clear_string_dynamic(dynamic) \
- status = f_new_array((void **) & dynamic.string, sizeof(f_string), new_length); \
+ status = f_memory_new((void **) & dynamic.string, sizeof(f_string), new_length); \
if (status == f_none) { \
dynamic.size = new_length; \
dynamic.used = 0; \
}
#define f_macro_string_dynamic_delete(status, dynamic) \
- status = f_delete((void **) & dynamic.string, sizeof(f_string), dynamic.size); \
+ status = f_memory_delete((void **) & dynamic.string, sizeof(f_string), dynamic.size); \
if (status == f_none) { \
dynamic.size = 0; \
dynamic.used = 0; \
}
#define f_macro_string_dynamic_destroy(status, dynamic) \
- status = f_destroy((void **) & dynamic.string, sizeof(f_string), dynamic.size); \
+ status = f_memory_destroy((void **) & dynamic.string, sizeof(f_string), dynamic.size); \
if (status == f_none) { \
dynamic.size = 0; \
dynamic.used = 0; \
}
#define f_macro_string_dynamic_resize(status, dynamic, new_length) \
- status = f_resize((void **) & dynamic.string, sizeof(f_string), dynamic.size, new_length); \
+ status = f_memory_resize((void **) & dynamic.string, sizeof(f_string), dynamic.size, new_length); \
if (status == f_none) { \
dynamic.size = new_length; \
if (dynamic.used > dynamic.size) dynamic.used = new_length; \
}
#define f_macro_string_dynamic_adjust(status, dynamic, new_length) \
- status = f_adjust((void **) & dynamic.string, sizeof(f_string), dynamic.size, new_length); \
+ status = f_memory_adjust((void **) & dynamic.string, sizeof(f_string), dynamic.size, new_length); \
if (status == f_none) { \
dynamic.size = new_length; \
if (dynamic.used > dynamic.size) dynamic.used = new_length; \
dynamics.array = 0; \
dynamics.size = 0; \
dynamics.used = 0; \
- status = f_new_array((void **) & dynamics.array, sizeof(f_string_dynamic), length); \
+ status = f_memory_new((void **) & dynamics.array, sizeof(f_string_dynamic), length); \
if (status == f_none) { \
dynamics.size = length; \
dynamics.used = 0; \
f_macro_string_dynamic_destroy(status, dynamics.array[dynamics.size]); \
if (status != f_none) break; \
} \
- if (status == f_none) status = f_delete((void **) & dynamics.array, sizeof(f_string_dynamic), dynamics.size); \
+ if (status == f_none) status = f_memory_delete((void **) & dynamics.array, sizeof(f_string_dynamic), dynamics.size); \
if (status == f_none) dynamics.used = 0;
#define f_macro_string_dynamics_destroy(status, dynamics) \
f_macro_string_dynamic_destroy(status, dynamics.array[dynamics.size]); \
if (status != f_none) break; \
} \
- if (status == f_none) status = f_destroy((void **) & dynamics.array, sizeof(f_string_dynamic), dynamics.size); \
+ if (status == f_none) status = f_memory_destroy((void **) & dynamics.array, sizeof(f_string_dynamic), dynamics.size); \
if (status == f_none) dynamics.used = 0;
#define f_macro_string_dynamics_resize(status, dynamics, new_length) \
if (status != f_none) break; \
} \
} \
- if (status == f_none) status = f_resize((void **) & dynamics.array, sizeof(f_string_dynamic), dynamics.size, new_length); \
+ if (status == f_none) status = f_memory_resize((void **) & dynamics.array, sizeof(f_string_dynamic), dynamics.size, new_length); \
if (status == f_none) { \
if (new_length > dynamics.size) { \
f_string_length i = dynamics.size; \
if (status != f_none) break; \
} \
} \
- if (status == f_none) status = f_adjust((void **) & dynamics.array, sizeof(f_string_dynamic), dynamics.size, new_length); \
+ if (status == f_none) status = f_memory_adjust((void **) & dynamics.array, sizeof(f_string_dynamic), dynamics.size, new_length); \
if (status == f_none) { \
if (new_length > dynamics.size) { \
f_string_length i = dynamics.size; \
#define f_utf_string_max_size f_signed_long_size
#define f_utf_string_initialize f_utf_character_eos
- #define f_macro_utf_string_new(status, string, length) status = f_new_array((void **) & string, sizeof(f_utf_string), length)
- #define f_macro_utf_string_delete(status, string, size) status = f_delete((void **) & string, sizeof(f_utf_string), size)
- #define f_macro_utf_string_destroy(status, string, size) status = f_destroy((void **) & string, sizeof(f_utf_string), size)
+ #define f_macro_utf_string_new(status, string, length) status = f_memory_new((void **) & string, sizeof(f_utf_string), length)
+ #define f_macro_utf_string_delete(status, string, size) status = f_memory_delete((void **) & string, sizeof(f_utf_string), size)
+ #define f_macro_utf_string_destroy(status, string, size) status = f_memory_destroy((void **) & string, sizeof(f_utf_string), size)
#define f_macro_utf_string_resize(status, string, old_length, new_length) \
- status = f_resize((void **) & string, sizeof(f_utf_string), old_length, new_length)
+ status = f_memory_resize((void **) & string, sizeof(f_utf_string), old_length, new_length)
#define f_macro_utf_string_adjust(status, string, old_length, new_length) \
- status = f_adjust((void **) & string, sizeof(f_utf_string), old_length, new_length)
+ status = f_memory_adjust((void **) & string, sizeof(f_utf_string), old_length, new_length)
#endif // _di_f_utf_string_
/**
#ifndef _di_f_utf_string_length_
typedef f_s_long f_utf_string_length;
- #define f_macro_utf_string_length_new(status, string, length) status = f_new_array((void **) & string, sizeof(f_utf_string_length), length)
- #define f_macro_utf_string_length_delete(status, string, length) status = f_delete((void **) & string, sizeof(f_utf_string_length), length)
- #define f_macro_utf_string_length_destroy(status, string, size) status = f_destroy((f_void_P *) & string, sizeof(f_utf_string_length), size)
+ #define f_macro_utf_string_length_new(status, string, length) status = f_memory_new((void **) & string, sizeof(f_utf_string_length), length)
+ #define f_macro_utf_string_length_delete(status, string, length) status = f_memory_delete((void **) & string, sizeof(f_utf_string_length), length)
+ #define f_macro_utf_string_length_destroy(status, string, size) status = f_memory_destroy((f_void_P *) & string, sizeof(f_utf_string_length), size)
#define f_macro_utf_string_length_resize(status, length, old_length, new_length) \
- status = f_resize((void **) & length, sizeof(f_utf_string_length), old_length, new_length)
+ status = f_memory_resize((void **) & length, sizeof(f_utf_string_length), old_length, new_length)
#define f_macro_utf_string_length_adjust(status, length, old_length, new_length) \
- status = f_adjust((void **) & length, sizeof(f_utf_string_length), old_length, new_length)
+ status = f_memory_adjust((void **) & length, sizeof(f_utf_string_length), old_length, new_length)
#endif // _di_f_utf_string_length_
/**
#define f_utf_string_location_initialize { 1, 0 }
- #define f_macro_utf_string_location_new(status, utf_string_location, length) status = f_new_array((void **) & utf_string_location, sizeof(f_utf_string_location), length)
- #define f_macro_utf_string_location_delete(status, utf_string_location, size) status = f_delete((void **) & utf_string_location, sizeof(f_utf_string_location), size)
- #define f_macro_utf_string_location_destroy(status, utf_string_location, size) status = f_destroy((void **) & utf_string_location, sizeof(f_utf_string_location), size)
+ #define f_macro_utf_string_location_new(status, utf_string_location, length) status = f_memory_new((void **) & utf_string_location, sizeof(f_utf_string_location), length)
+ #define f_macro_utf_string_location_delete(status, utf_string_location, size) status = f_memory_delete((void **) & utf_string_location, sizeof(f_utf_string_location), size)
+ #define f_macro_utf_string_location_destroy(status, utf_string_location, size) status = f_memory_destroy((void **) & utf_string_location, sizeof(f_utf_string_location), size)
#define f_macro_utf_string_location_resize(status, utf_string_location, old_length, new_length) \
- status = f_resize((void **) & utf_string_location, sizeof(f_utf_string_location), old_length, new_length)
+ status = f_memory_resize((void **) & utf_string_location, sizeof(f_utf_string_location), old_length, new_length)
#define f_macro_utf_string_location_adjust(status, utf_string_location, old_length, new_length) \
- status = f_adjust((void **) & utf_string_location, sizeof(f_utf_string_location), old_length, new_length)
+ status = f_memory_adjust((void **) & utf_string_location, sizeof(f_utf_string_location), old_length, new_length)
#endif // _di_f_utf_string_location_
/**
#define f_macro_utf_string_dynamic_new(status, dynamic, new_length) \
f_clear_utf_string_dynamic(dynamic) \
- status = f_new_array((void **) & dynamic.string, sizeof(f_utf_string), new_length); \
+ status = f_memory_new((void **) & dynamic.string, sizeof(f_utf_string), new_length); \
if (status == f_none) { \
dynamic.size = new_length; \
dynamic.used = 0; \
}
#define f_macro_utf_string_dynamic_delete(status, dynamic) \
- status = f_delete((void **) & dynamic.string, sizeof(f_utf_string), dynamic.size); \
+ status = f_memory_delete((void **) & dynamic.string, sizeof(f_utf_string), dynamic.size); \
if (status == f_none) { \
dynamic.size = 0; \
dynamic.used = 0; \
}
#define f_macro_utf_string_dynamic_destroy(status, dynamic) \
- status = f_destroy((void **) & dynamic.string, sizeof(f_utf_string), dynamic.size); \
+ status = f_memory_destroy((void **) & dynamic.string, sizeof(f_utf_string), dynamic.size); \
if (status == f_none) { \
dynamic.size = 0; \
dynamic.used = 0; \
}
#define f_macro_utf_string_dynamic_resize(status, dynamic, new_length) \
- status = f_resize((void **) & dynamic.string, sizeof(f_utf_string), dynamic.size, new_length); \
+ status = f_memory_resize((void **) & dynamic.string, sizeof(f_utf_string), dynamic.size, new_length); \
if (status == f_none) { \
dynamic.size = new_length; \
if (dynamic.used > dynamic.size) dynamic.used = new_length; \
}
#define f_macro_utf_string_dynamic_adjust(status, dynamic, new_length) \
- status = f_adjust((void **) & dynamic.string, sizeof(f_utf_string), dynamic.size, new_length); \
+ status = f_memory_adjust((void **) & dynamic.string, sizeof(f_utf_string), dynamic.size, new_length); \
if (status == f_none) { \
dynamic.size = new_length; \
if (dynamic.used > dynamic.size) dynamic.used = new_length; \
dynamics.array = 0; \
dynamics.size = 0; \
dynamics.used = 0; \
- status = f_new_array((void **) & dynamics.array, sizeof(f_utf_string_dynamic), length); \
+ status = f_memory_new((void **) & dynamics.array, sizeof(f_utf_string_dynamic), length); \
if (status == f_none) { \
dynamics.size = length; \
dynamics.used = 0; \
f_macro_utf_string_dynamic_destroy(status, dynamics.array[dynamics.size]); \
if (status != f_none) break; \
} \
- if (status == f_none) status = f_delete((void **) & dynamics.array, sizeof(f_utf_string_dynamic), dynamics.size); \
+ if (status == f_none) status = f_memory_delete((void **) & dynamics.array, sizeof(f_utf_string_dynamic), dynamics.size); \
if (status == f_none) dynamics.used = 0;
#define f_macro_utf_string_dynamics_destroy(status, dynamics) \
f_macro_utf_string_dynamic_destroy(status, dynamics.array[dynamics.size]); \
if (status != f_none) break; \
} \
- if (status == f_none) status = f_destroy((void **) & dynamics.array, sizeof(f_utf_string_dynamic), dynamics.size); \
+ if (status == f_none) status = f_memory_destroy((void **) & dynamics.array, sizeof(f_utf_string_dynamic), dynamics.size); \
if (status == f_none) dynamics.used = 0;
#define f_macro_utf_string_dynamics_resize(status, dynamics, new_length) \
if (status != f_none) break; \
} \
} \
- if (status == f_none) status = f_resize((void **) & dynamics.array, sizeof(f_utf_string_dynamic), dynamics.size, new_length); \
+ if (status == f_none) status = f_memory_resize((void **) & dynamics.array, sizeof(f_utf_string_dynamic), dynamics.size, new_length); \
if (status == f_none) { \
if (new_length > dynamics.size) { \
f_utf_string_length i = dynamics.size; \
if (status != f_none) break; \
} \
} \
- if (status == f_none) status = f_adjust((void **) & dynamics.array, sizeof(f_utf_string_dynamic), dynamics.size, new_length); \
+ if (status == f_none) status = f_memory_adjust((void **) & dynamics.array, sizeof(f_utf_string_dynamic), dynamics.size, new_length); \
if (status == f_none) { \
if (new_length > dynamics.size) { \
f_utf_string_length i = dynamics.size; \
}
// FIXME: the second and third paramater are probably wrong
- f_delete((void **) & listing[counter], sizeof(struct dirent), 0);
+ f_memory_delete((void **) & listing[counter], sizeof(struct dirent), 0);
}
// FIXME: the second and third paramater are probably wrong
- f_delete((void **) & listing, sizeof(struct dirent *), 0);
+ f_memory_delete((void **) & listing, sizeof(struct dirent *), 0);
if (length == 0) {
// an empty directory
delete_init_rule(status, rules.array[rules.size]); \
if (status != f_none) break; \
} \
- if (status == f_none) status = f_delete((f_void_p *) & rules.array, sizeof(init_rule), rules.size); \
+ if (status == f_none) status = f_memory_delete((f_void_p *) & rules.array, sizeof(init_rule), rules.size); \
if (status == f_none) rules.used = 0;
#define f_init_rules_destroy(status, rules) \
destroy_init_rule(status, rules.array[rules.size]); \
if (status != f_none) break; \
} \
- if (status == f_none) status = f_destroy((f_void_p *) & rules.array, sizeof(init_rule), rules.size); \
+ if (status == f_none) status = f_memory_destroy((f_void_p *) & rules.array, sizeof(init_rule), rules.size); \
if (status == f_none) rules.used = 0;
#define f_init_rules_resize(status, rules, new_length) \
if (status != f_none) break; \
} \
} \
- if (status == f_none) status = f_resize((f_void_p *) & rules.array, sizeof(init_rule), rules.size, new_length); \
+ if (status == f_none) status = f_memory_resize((f_void_p *) & rules.array, sizeof(init_rule), rules.size, new_length); \
if (status == f_none) { \
if (new_length > rules.size) { \
f_string_length i = rules.size; \
if (status != f_none) break; \
} \
} \
- if (status == f_none) status = f_adjust((f_void_p *) & rules.array, sizeof(init_rule), rules.size, new_length); \
+ if (status == f_none) status = f_memory_adjust((f_void_p *) & rules.array, sizeof(init_rule), rules.size, new_length); \
if (status == f_none) { \
if (new_length > rules.size) { \
f_string_length i = rules.size; \
delete_init_category(status, categorys.array[categorys.size]); \
if (status != f_none) break; \
} \
- if (status == f_none) status = f_delete((f_void_p *) & categorys.array, sizeof(init_category), categorys.size); \
+ if (status == f_none) status = f_memory_delete((f_void_p *) & categorys.array, sizeof(init_category), categorys.size); \
if (status == f_none) categorys.used = 0;
#define f_init_categorys_destroy(status, categorys) \
destroy_init_category(status, categorys.array[categorys.size]); \
if (status != f_none) break; \
} \
- if (status == f_none) status = f_destroy((f_void_p *) & categorys.array, sizeof(init_category), categorys.size); \
+ if (status == f_none) status = f_memory_destroy((f_void_p *) & categorys.array, sizeof(init_category), categorys.size); \
if (status == f_none) categorys.used = 0;
#define f_init_categorys_resize(status, categorys, new_length) \
if (status != f_none) break; \
} \
} \
- if (status == f_none) status = f_resize((f_void_p *) & categorys.array, sizeof(init_category), categorys.size, new_length); \
+ if (status == f_none) status = f_memory_resize((f_void_p *) & categorys.array, sizeof(init_category), categorys.size, new_length); \
if (status == f_none) { \
if (new_length > categorys.size) { \
f_string_length i = categorys.size; \
if (status != f_none) break; \
} \
} \
- if (status == f_none) status = f_adjust((f_void_p *) & categorys.array, sizeof(init_category), categorys.size, new_length); \
+ if (status == f_none) status = f_memory_adjust((f_void_p *) & categorys.array, sizeof(init_category), categorys.size, new_length); \
if (status == f_none) { \
if (new_length > categorys.size) { \
f_string_length i = categorys.size; \