There is nothing forcing the current functions in fl_serialized from being in f_serialize.
Renamed f_serialized to f_serialize to be more consistent with the function names.
To that end, I have renamed the functions like f_unserialize* to f_serialize_un.
I have been unable to come up with a better name that is also reasonably short.
build_linker ar
build_libraries -lc
build_libraries-level
-build_sources_library console.c conversion.c directory.c private-directory.c environment.c private-environment.c file.c private-file.c memory.c path.c pipe.c print.c socket.c utf.c private-utf.c
+build_sources_library console.c conversion.c directory.c private-directory.c environment.c private-environment.c file.c private-file.c memory.c path.c pipe.c print.c serialize.c private-serialize.c socket.c utf.c private-utf.c
build_sources_program
-build_sources_headers color.h console.h conversion.h directory.h directory_type.h environment.h file.h fss.h memory.h path.h pipe.h print.h serialized.h socket.h status.h status_array.h string.h type.h type_array.h utf.h
+build_sources_headers color.h console.h conversion.h directory.h directory_type.h environment.h file.h fss.h memory.h path.h pipe.h print.h serialize.h socket.h status.h status_array.h string.h type.h type_array.h utf.h
build_sources_script
build_sources_setting
build_script yes
build_linker ar
build_libraries -lc
build_libraries-level -lfll_0
-build_sources_library color.c console.c directory.c private-directory.c fss.c fss_basic.c fss_basic_list.c fss_extended.c fss_extended_list.c print.c serialized.c private-serialized.c status.c string.c private-string.c utf.c private-utf.c utf_file.c private-utf_file.c
+build_sources_library color.c console.c directory.c private-directory.c fss.c fss_basic.c fss_basic_list.c fss_extended.c fss_extended_list.c print.c status.c string.c private-string.c utf.c private-utf.c utf_file.c private-utf_file.c
build_sources_program
-build_sources_headers color.h console.h directory.h fss.h fss_basic.h fss_basic_list.h fss_extended.h fss_extended_list.h fss_macro.h fss_status.h print.h serialized.h status.h string.h utf.h utf_file.h
+build_sources_headers color.h console.h directory.h fss.h fss_basic.h fss_basic_list.h fss_extended.h fss_extended_list.h fss_macro.h fss_status.h print.h status.h string.h utf.h utf_file.h
build_sources_script
build_sources_setting
build_script yes
build_linker ar
build_libraries -lc
build_libraries-monolithic
-build_sources_library level_0/console.c level_0/conversion.c level_0/directory.c level_0/private-directory.c level_0/environment.c level_0/private-environment.c level_0/file.c level_0/private-file.c level_0/memory.c level_0/path.c level_0/pipe.c level_0/print.c level_0/socket.c level_0/utf.c level_0/private-utf.c level_1/color.c level_1/console.c level_1/directory.c level_1/private-directory.c level_1/fss.c level_1/fss_basic.c level_1/fss_basic_list.c level_1/fss_extended.c level_1/fss_extended_list.c level_1/print.c level_1/serialized.c level_1/private-serialized.c level_1/status.c level_1/string.c level_1/private-string.c level_1/utf.c level_1/private-utf.c level_1/utf_file.c level_1/private-utf_file.c level_2/directory.c level_2/execute.c level_2/private-execute.c level_2/file.c level_2/fss.c level_2/fss_basic.c level_2/fss_basic_list.c level_2/fss_extended.c level_2/fss_extended_list.c level_2/fss_status.c level_2/program.c level_2/status.c
+build_sources_library level_0/console.c level_0/conversion.c level_0/directory.c level_0/private-directory.c level_0/environment.c level_0/private-environment.c level_0/file.c level_0/private-file.c level_0/memory.c level_0/path.c level_0/pipe.c level_0/print.c level_0/serialize.c level_0/private-serialize.c level_0/socket.c level_0/utf.c level_0/private-utf.c level_1/color.c level_1/console.c level_1/directory.c level_1/private-directory.c level_1/fss.c level_1/fss_basic.c level_1/fss_basic_list.c level_1/fss_extended.c level_1/fss_extended_list.c level_1/print.c level_1/status.c level_1/string.c level_1/private-string.c level_1/utf.c level_1/private-utf.c level_1/utf_file.c level_1/private-utf_file.c level_2/directory.c level_2/execute.c level_2/private-execute.c level_2/file.c level_2/fss.c level_2/fss_basic.c level_2/fss_basic_list.c level_2/fss_extended.c level_2/fss_extended_list.c level_2/fss_status.c level_2/program.c level_2/status.c
build_sources_program
-build_sources_headers level_0/color.h level_0/console.h level_0/conversion.h level_0/directory.h level_0/directory_type.h level_0/environment.h level_0/file.h level_0/fss.h level_0/memory.h level_0/path.h level_0/pipe.h level_0/print.h level_0/serialized.h level_0/socket.h level_0/status.h level_0/status_array.h level_0/string.h level_0/type.h level_0/type_array.h level_0/utf.h level_1/color.h level_1/console.h level_1/directory.h level_1/fss.h level_1/fss_basic.h level_1/fss_basic_list.h level_1/fss_extended.h level_1/fss_extended_list.h level_1/fss_macro.h level_1/fss_status.h level_1/print.h level_1/serialized.h level_1/status.h level_1/string.h level_1/utf.h level_1/utf_file.h level_2/directory.h level_2/execute.h level_2/file.h level_2/fss.h level_2/fss_basic.h level_2/fss_basic_list.h level_2/fss_extended.h level_2/fss_extended_list.h level_2/fss_status.h level_2/program.h level_2/status.h
+build_sources_headers level_0/color.h level_0/console.h level_0/conversion.h level_0/directory.h level_0/directory_type.h level_0/environment.h level_0/file.h level_0/fss.h level_0/memory.h level_0/path.h level_0/pipe.h level_0/print.h level_0/serialize.h level_0/socket.h level_0/status.h level_0/status_array.h level_0/string.h level_0/type.h level_0/type_array.h level_0/utf.h level_1/color.h level_1/console.h level_1/directory.h level_1/fss.h level_1/fss_basic.h level_1/fss_basic_list.h level_1/fss_extended.h level_1/fss_extended_list.h level_1/fss_macro.h level_1/fss_status.h level_1/print.h level_1/status.h level_1/string.h level_1/utf.h level_1/utf_file.h level_2/directory.h level_2/execute.h level_2/file.h level_2/fss.h level_2/fss_basic.h level_2/fss_basic_list.h level_2/fss_extended.h level_2/fss_extended_list.h level_2/fss_status.h level_2/program.h level_2/status.h
build_sources_script
build_sources_setting
build_script yes
bash build/scripts/package.sh build -i
if [[ $? -eq 0 ]] ; then
- for i in f_type f_status f_memory f_string f_utf f_color f_console f_conversion f_directory f_environment f_file f_fss f_path f_pipe f_print f_serialized f_socket fl_color fl_console fl_directory fl_fss fl_print fl_serialized fl_status fl_string fl_utf fl_utf_file fll_directory fll_execute fll_file fll_fss fll_program fll_status ; do
+ for i in f_type f_status f_memory f_string f_utf f_color f_console f_conversion f_directory f_environment f_file f_fss f_path f_pipe f_print f_serialize f_socket fl_color fl_console fl_directory fl_fss fl_print fl_status fl_string fl_utf fl_utf_file fll_directory fll_execute fll_file fll_fss fll_program fll_status ; do
echo && echo "Processing $i." &&
cd package/individual/$i-$2/ &&
-#include <level_1/serialized.h>
-#include "private-serialized.h"
+#include <level_0/serialize.h>
+#include "private-serialize.h"
#ifdef __cplusplus
extern "C" {
#endif
-#if !defined(_di_fl_unserialize_simple_find_) || !defined(_di_fl_unserialize_simple_get_)
- f_return_status private_fl_unserialize_simple_find(const f_string_static serialized, const f_array_length index, f_string_range *location) {
+#if !defined(_di_f_serialize_un_simple_find_) || !defined(_di_f_serialize_un_simple_get_)
+ f_return_status private_f_serialize_un_simple_find(const f_string_static serialize, const f_array_length index, f_string_range *location) {
f_status status = F_none;
f_array_length i = 0;
unsigned short width = 0;
- while (i < serialized.used) {
- width = f_macro_utf_byte_width(serialized.string[i]);
+ while (i < serialize.used) {
+ width = f_macro_utf_byte_width(serialize.string[i]);
- if (serialized.string[i] == f_serialized_simple_splitter) {
+ if (serialize.string[i] == f_serialize_simple_splitter) {
if (current == index) {
if (start == i) {
// provide an invalid start to stop range to communicate that there is no data.
start = i + width;
current++;
}
- else if (i == serialized.used) {
+ else if (i == serialize.used) {
if (current == index) {
location->start = start;
location->stop = i - 1;
return F_none_eos;
}
- if (i + width > serialized.used) return F_status_set_error(F_incomplete_utf_eos);
+ if (i + width > serialize.used) return F_status_set_error(F_incomplete_utf_eos);
i += width;
} // while
return F_data_not_eos;
}
-#endif // !defined(_di_fl_unserialize_simple_find_) || !defined(_di_fl_unserialize_simple_get_)
+#endif // !defined(_di_f_serialize_un_simple_find_) || !defined(_di_f_serialize_un_simple_get_)
#ifdef __cplusplus
} // extern "C"
--- /dev/null
+/**
+ * FLL - Level 0
+ *
+ * Project: Serialize
+ * API Version: 0.5
+ * Licenses: lgplv2.1
+ *
+ * These are provided for internal reduction in redundant code.
+ * These should not be exposed/used outside of this project.
+ */
+#ifndef _PRIVATE_F_serialize_h
+#define _PRIVATE_F_serialize_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Private implementation of f_serialize_un_simple_get().
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param serialize
+ * A serialize string to de-serialize.
+ * @param index
+ * An index position within the serialize string to get the deserialize positions of.
+ * @param location
+ * A location within the serialize string representing the string at the given index.
+ *
+ * @return
+ * F_none on success.
+ * F_none_eos on success at end of string.
+ * F_data_not_eos if end of string reached before index was reached.
+ * F_incomplete_utf_eos (with error bit) if end of string is reached before a complete UTF-8 character can be processed.
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#if !defined(_di_f_serialize_un_simple_find_) || !defined(_di_f_serialize_un_simple_get_)
+ extern f_return_status private_f_serialize_un_simple_find(const f_string_static serialize, const f_array_length index, f_string_range *location) f_gcc_attribute_visibility_internal;
+#endif // !defined(_di_f_serialize_un_simple_find_) || !defined(_di_f_serialize_un_simple_get_)
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_F_serialize_h
-#include <level_1/serialized.h>
-#include "private-serialized.h"
+#include <level_0/serialize.h>
+#include "private-serialize.h"
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef _di_fl_serialize_simple_
- f_return_status fl_serialize_simple(const f_string_static value, f_string_dynamic *serialized) {
+#ifndef _di_f_serialize_simple_
+ f_return_status f_serialize_simple(const f_string_static value, f_string_dynamic *serialize) {
#ifndef _di_level_0_parameter_checking_
- if (serialized == 0) return F_status_set_error(F_parameter);
+ if (serialize == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
f_status status = F_none;
- if (serialized->used + value.used + 1 >= serialized->size) {
- f_macro_string_dynamic_resize(status, (*serialized), serialized->size + value.used + 1);
+ if (serialize->used + value.used + 1 >= serialize->size) {
+ f_macro_string_dynamic_resize(status, (*serialize), serialize->size + value.used + 1);
if (F_status_is_error(status)) return status;
}
- if (serialized->used == 0) {
- memcpy(serialized->string + serialized->used, value.string, value.used);
- serialized->used += value.used;
+ if (serialize->used == 0) {
+ memcpy(serialize->string + serialize->used, value.string, value.used);
+ serialize->used += value.used;
}
else {
- memcpy(serialized->string + serialized->used, f_serialized_simple_splitter_string, 1);
- memcpy(serialized->string + serialized->used + 1, value.string, value.used);
- serialized->used += value.used + 1;
+ memcpy(serialize->string + serialize->used, f_serialize_simple_splitter_string, 1);
+ memcpy(serialize->string + serialize->used + 1, value.string, value.used);
+ serialize->used += value.used + 1;
}
return F_none;
}
-#endif // _di_fl_serialize_simple_
+#endif // _di_f_serialize_simple_
-#ifndef _di_fl_unserialize_simple_
- f_return_status fl_unserialize_simple(const f_string_static serialized, f_string_dynamics *strings) {
+#ifndef _di_f_serialize_un_simple_
+ f_return_status f_serialize_un_simple(const f_string_static serialize, f_string_dynamics *strings) {
#ifndef _di_level_0_parameter_checking_
- if (serialized.used == 0) return F_status_set_error(F_parameter);
+ if (serialize.used == 0) return F_status_set_error(F_parameter);
if (strings == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
uint8_t width = 0;
- while (i < serialized.used) {
- width = f_macro_utf_byte_width(serialized.string[i]);
+ while (i < serialize.used) {
+ width = f_macro_utf_byte_width(serialize.string[i]);
- if (serialized.string[i] == f_serialized_simple_splitter || i + 1 >= serialized.used) {
+ if (serialize.string[i] == f_serialize_simple_splitter || i + 1 >= serialize.used) {
if (strings->used >= strings->size) {
- f_macro_string_dynamics_resize(status, (*strings), strings->size + f_serialized_default_allocation_step);
+ f_macro_string_dynamics_resize(status, (*strings), strings->size + f_serialize_default_allocation_step);
if (F_status_is_error(status)) return status;
}
else {
f_string_length total;
- if (i + 1 >= serialized.used) {
+ if (i + 1 >= serialize.used) {
total = (i - start) + 1;
}
else {
- // subtract one from stop point to disclused the f_serialized_simple_splitter character.
+ // subtract one from stop point to disclused the f_serialize_simple_splitter character.
total = ((i - 1) - start) + 1;
}
strings->array[strings->used].size = total;
}
- memcpy(strings->array[strings->used].string, serialized.string + start, total);
+ memcpy(strings->array[strings->used].string, serialize.string + start, total);
strings->array[strings->used].used = total;
strings->used++;
}
- if (i + width > serialized.used) {
+ if (i + width > serialize.used) {
return F_status_set_error(F_incomplete_utf_eos);
}
start = i + width;
}
- else if (i + width > serialized.used) {
+ else if (i + width > serialize.used) {
return F_status_set_error(F_incomplete_utf_eos);
}
return F_none;
}
-#endif // _di_fl_unserialize_simple_
+#endif // _di_f_serialize_un_simple_
-#ifndef _di_fl_unserialize_simple_map_
- f_return_status fl_unserialize_simple_map(const f_string_static serialized, f_string_ranges *locations) {
+#ifndef _di_f_serialize_un_simple_map_
+ f_return_status f_serialize_un_simple_map(const f_string_static serialize, f_string_ranges *locations) {
#ifndef _di_level_0_parameter_checking_
- if (serialized.used == 0) return F_status_set_error(F_parameter);
+ if (serialize.used == 0) return F_status_set_error(F_parameter);
if (locations == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
uint8_t width = 0;
- while (i < serialized.used) {
- width = f_macro_utf_byte_width(serialized.string[i]);
+ while (i < serialize.used) {
+ width = f_macro_utf_byte_width(serialize.string[i]);
- if (serialized.string[i] == f_serialized_simple_splitter || i + 1 >= serialized.used) {
+ if (serialize.string[i] == f_serialize_simple_splitter || i + 1 >= serialize.used) {
if (locations->used >= locations->size) {
- f_macro_string_ranges_resize(status, (*locations), locations->size + f_serialized_default_allocation_step);
+ f_macro_string_ranges_resize(status, (*locations), locations->size + f_serialize_default_allocation_step);
if (F_status_is_error(status)) return status;
}
locations->array[locations->used].start = 1;
locations->array[locations->used].stop = 0;
}
- else if (i + 1 >= serialized.used) {
+ else if (i + 1 >= serialize.used) {
locations->array[locations->used].start = start;
locations->array[locations->used].stop = i;
}
else {
- // subtract one from stop point to disclused the f_serialized_simple_splitter character.
+ // subtract one from stop point to disclused the f_serialize_simple_splitter character.
locations->array[locations->used].start = start;
locations->array[locations->used].stop = i - 1;
}
locations->used++;
- if (i + width > serialized.used) return F_status_set_error(F_incomplete_utf_eos);
+ if (i + width > serialize.used) return F_status_set_error(F_incomplete_utf_eos);
start = i + width;
}
- else if (i + width > serialized.used) {
+ else if (i + width > serialize.used) {
return F_status_set_error(F_incomplete_utf_eos);
}
return F_none;
}
-#endif // _di_fl_unserialize_simple_map_
+#endif // _di_f_serialize_un_simple_map_
-#ifndef _di_fl_unserialize_simple_find_
- f_return_status fl_unserialize_simple_find(const f_string_static serialized, const f_array_length index, f_string_range *range) {
+#ifndef _di_f_serialize_un_simple_find_
+ f_return_status f_serialize_un_simple_find(const f_string_static serialize, const f_array_length index, f_string_range *range) {
#ifndef _di_level_0_parameter_checking_
- if (serialized.used == 0) return F_status_set_error(F_parameter);
+ if (serialize.used == 0) return F_status_set_error(F_parameter);
if (range == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- return private_fl_unserialize_simple_find(serialized, index, range);
+ return private_f_serialize_un_simple_find(serialize, index, range);
}
-#endif // _di_fl_unserialize_simple_find_
+#endif // _di_f_serialize_un_simple_find_
-#ifndef _di_fl_unserialize_simple_get_
- f_return_status fl_unserialize_simple_get(const f_string_static serialized, const f_array_length index, f_string_dynamic *dynamic) {
+#ifndef _di_f_serialize_un_simple_get_
+ f_return_status f_serialize_un_simple_get(const f_string_static serialize, const f_array_length index, f_string_dynamic *dynamic) {
#ifndef _di_level_0_parameter_checking_
- if (serialized.used == 0) return F_status_set_error(F_parameter);
+ if (serialize.used == 0) return F_status_set_error(F_parameter);
if (dynamic == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
f_string_range range = f_string_range_initialize;
- f_status status = private_fl_unserialize_simple_find(serialized, index, &range);
+ f_status status = private_f_serialize_un_simple_find(serialize, index, &range);
if (F_status_is_error(status)) return status;
if (status == F_data_not_eos) {
if (F_status_is_error(status_allocation)) return status_allocation;
}
- memcpy(dynamic->string, serialized.string + range.start, total);
+ memcpy(dynamic->string, serialize.string + range.start, total);
dynamic->used = total;
return status;
}
-#endif // _di_fl_unserialize_simple_get_
+#endif // _di_f_serialize_un_simple_get_
#ifdef __cplusplus
} // extern "C"
/**
- * FLL - Level 1
+ * FLL - Level 0
*
- * Project: Serialized
+ * Project: Serialize
* API Version: 0.5
* Licenses: lgplv2.1
*
- * Provides string processing functionality for what is to be defined as a serialized string.
+ * Provides string processing functionality for what is to be defined as a serialize string.
* Serialized strings are strings that can hold multiple values in a single variable.
- * An example of serialized content is the PATH environment variable where ":" separates data.
+ * An example of serialize content is the PATH environment variable where ":" separates data.
*/
-#ifndef _FL_serialized_h
-#define _FL_serialized_h
+#ifndef _F_serialize_h
+#define _F_serialize_h
// libc includes
#include <string.h>
// fll-0 includes
#include <level_0/status.h>
-#include <level_0/serialized.h>
+#include <level_0/serialize.h>
#include <level_0/string.h>
#include <level_0/type.h>
#include <level_0/utf.h>
extern "C" {
#endif
+#ifndef _di_f_serialize_splitters_
+ #define f_serialize_simple_splitter ':'
+ #define f_serialize_delimited_splitter '\''
+ #define f_serialize_delimited_delimiter '\\'
+
+ #define f_serialize_simple_splitter_string ":"
+ #define f_serialize_delimited_splitter_string "'"
+ #define f_serialize_delimited_delimiter_string "\\"
+#endif // _di_f_serialize_splitters_
+
+#ifndef _di_f_serialize_default_allocation_step_
+ // provide a UTF-8 friendly allocation step.
+ #define f_serialize_default_allocation_step 4
+#endif // _di_f_serialize_default_allocation_step_
+
/**
* Serialized a string using the Simple serialize algorithm.
*
* 3) value = "/usr/sbin", then: PATH="/bin:/sbin:/usr/sbin".
*
* @param value
- * The string to append onto serialized.
- * @param serialized
- * The dynamic string that represents a serialized set of strings.
+ * The string to append onto serialize.
+ * @param serialize
+ * The dynamic string that represents a serialize set of strings.
*
* @return
* F_none on success.
* F_memory_reallocation (with error bit) on memory reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
*/
-#ifndef _di_fl_serialize_simple_
- extern f_return_status fl_serialize_simple(const f_string_static value, f_string_dynamic *serialized);
-#endif // _di_fl_serialize_simple_
+#ifndef _di_f_serialize_simple_
+ extern f_return_status f_serialize_simple(const f_string_static value, f_string_dynamic *serialize);
+#endif // _di_f_serialize_simple_
/**
- * De-serialized the entire serialized string into multiple separate strings using the Simple serialize algorithm.
+ * De-serialize the entire serialize string into multiple separate strings using the Simple serialize algorithm.
*
* The simple Serialize algorithm is akin to the PATH environment variable, example: PATH="/bin:/sbin:/usr/bin".
*
* 2) start = 5, stop = 9.
* 3) start = 11, stop = 18.
*
- * @param serialized
- * A serialized string to de-serialize.
+ * @param serialize
+ * A serialize string to de-serialize.
* @param strings
- * An array of strings de-serialized from serialized.
+ * An array of strings de-serialize from serialize.
*
* @return
* F_none on success.
* F_memory_reallocation (with error bit) on memory reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
*/
-#ifndef _di_fl_unserialize_simple_
- extern f_return_status fl_unserialize_simple(const f_string_static serialized, f_string_dynamics *strings);
-#endif // _di_fl_unserialize_simple_
+#ifndef _di_f_serialize_un_simple_
+ extern f_return_status f_serialize_un_simple(const f_string_static serialize, f_string_dynamics *strings);
+#endif // _di_f_serialize_un_simple_
/**
- * Identify string positions within a serialized string using the Simple serialize algorithm.
+ * Identify string positions within a serialize string using the Simple serialize algorithm.
*
* The simple Serialize algorithm is akin to the PATH environment variable, example: PATH="/bin:/sbin:/usr/bin".
*
* 2) start = 5, stop = 9.
* 3) start = 11, stop = 18.
*
- * @param serialized
- * A serialized string to de-serialize.
+ * @param serialize
+ * A serialize string to de-serialize.
* @param locations
- * The locations within the serialized string representing distinct separate strings.
+ * The locations within the serialize string representing distinct separate strings.
*
* @return
* F_none on success.
* F_memory_reallocation (with error bit) on memory reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
*/
-#ifndef _di_fl_unserialize_simple_map_
- extern f_return_status fl_unserialize_simple_map(const f_string_static serialized, f_string_ranges *locations);
-#endif // _di_fl_unserialize_simple_map_
+#ifndef _di_f_serialize_un_simple_map_
+ extern f_return_status f_serialize_un_simple_map(const f_string_static serialize, f_string_ranges *locations);
+#endif // _di_f_serialize_un_simple_map_
/**
* Unserialize and find the address for a specific string using the Simple serialize algorithm.
* 2) with index = 1, start = 5, stop = 9.
* 3) with index = 2, start = 11, stop = 18.
*
- * @param serialized
- * A serialized string to de-serialize.
+ * @param serialize
+ * A serialize string to de-serialize.
* @param index
- * An index position within the serialized string to get the deserialized positions of.
+ * An index position within the serialize string to get the deserialize positions of.
* @param location
- * A location within the serialized string representing the string at the given index.
+ * A location within the serialize string representing the string at the given index.
*
* @return
* F_none on success.
* F_incomplete_utf_eos (with error bit) if end of string is reached before a complete UTF-8 character can be processed.
* F_parameter (with error bit) if a parameter is invalid.
*/
-#ifndef _di_fl_unserialize_simple_find_
- extern f_return_status fl_unserialize_simple_find(const f_string_static serialized, const f_array_length index, f_string_range *location);
-#endif // _di_fl_unserialize_simple_find_
+#ifndef _di_f_serialize_un_simple_find_
+ extern f_return_status f_serialize_un_simple_find(const f_string_static serialize, const f_array_length index, f_string_range *location);
+#endif // _di_f_serialize_un_simple_find_
/**
* Unserialize and get a copy of a specific string using the Simple serialize algorithm.
* 2) with index = 1, start = 5, stop = 9.
* 3) with index = 2, start = 11, stop = 18.
*
- * @param serialized
- * A serialized string to de-serialize.
+ * @param serialize
+ * A serialize string to de-serialize.
* @param index
- * An index position within the serialized string to get the deserialized positions of.
+ * An index position within the serialize string to get the deserialize positions of.
* @param dynamic
- * The unserialized string from the specified index.
+ * The unserialize string from the specified index.
*
* @return
* F_none on success.
* F_memory_reallocation (with error bit) on memory reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
*/
-#ifndef _di_fl_unserialize_simple_get_
- extern f_return_status fl_unserialize_simple_get(const f_string_static serialized, const f_array_length index, f_string_dynamic *dynamic);
-#endif // _di_fl_unserialize_simple_get_
+#ifndef _di_f_serialize_un_simple_get_
+ extern f_return_status f_serialize_un_simple_get(const f_string_static serialize, const f_array_length index, f_string_dynamic *dynamic);
+#endif // _di_f_serialize_un_simple_get_
#ifdef __cplusplus
} // extern "C"
#endif
-#endif // _FL_serialized_h
+#endif // _F_serialize_h
-f_type
-f_status
f_memory
+f_status
f_string
-f_serialized
+f_type
f_utf
# fss-0001
-project_name f_serialized
+project_name f_serialize
version_major 0
version_minor 5
build_linker ar
build_libraries -lc
build_libraries-individual -lf_memory
-build_sources_library
+build_sources_library serialize.c private-serialize.c
build_sources_program
-build_sources_headers serialized.h
+build_sources_headers serialize.h
build_sources_script
build_sources_setting
build_script yes
+++ /dev/null
-/**
- * FLL - Level 0
- *
- * Project: Serialized
- * API Version: 0.5
- * Licenses: lgplv2.1
- *
- * Provides string processing functionality for what is to be defined as a serialized string.
- * Serialized strings are strings that can hold multiple values in a single variable.
- * An example of serialized content is the PATH environment variable where ":" separates data.
- */
-#ifndef _F_serialized_h
-#define _F_serialized_h
-
-// libc includes
-#include <string.h>
-
-// fll-0 includes
-#include <level_0/string.h>
-#include <level_0/type.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _di_f_serialized_splitters_
- #define f_serialized_simple_splitter ':'
- #define f_serialized_delimited_splitter '\''
- #define f_serialized_delimited_delimiter '\\'
-
- #define f_serialized_simple_splitter_string ":"
- #define f_serialized_delimited_splitter_string "'"
- #define f_serialized_delimited_delimiter_string "\\"
-#endif // _di_f_serialized_splitters_
-
-#ifndef _di_f_serialized_default_allocation_step_
- // provide a UTF-8 friendly allocation step.
- #define f_serialized_default_allocation_step 4
-#endif // _di_f_serialized_default_allocation_step_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _F_serialized_h
+++ /dev/null
-f_type
-f_memory
-f_string
+++ /dev/null
-/**
- * FLL - Level 1
- *
- * Project: Serialized
- * API Version: 0.5
- * Licenses: lgplv2.1
- *
- * These are provided for internal reduction in redundant code.
- * These should not be exposed/used outside of this project.
- */
-#ifndef _PRIVATE_FL_serialized_h
-#define _PRIVATE_FL_serialized_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Private implementation of fl_unserialize_simple_get().
- *
- * Intended to be shared to each of the different implementation variations.
- *
- * @param serialized
- * A serialized string to de-serialize.
- * @param index
- * An index position within the serialized string to get the deserialized positions of.
- * @param location
- * A location within the serialized string representing the string at the given index.
- *
- * @return
- * F_none on success.
- * F_none_eos on success at end of string.
- * F_data_not_eos if end of string reached before index was reached.
- * F_incomplete_utf_eos (with error bit) if end of string is reached before a complete UTF-8 character can be processed.
- * F_parameter (with error bit) if a parameter is invalid.
- */
-#if !defined(_di_fl_unserialize_simple_find_) || !defined(_di_fl_unserialize_simple_get_)
- extern f_return_status private_fl_unserialize_simple_find(const f_string_static serialized, const f_array_length index, f_string_range *location) f_gcc_attribute_visibility_internal;
-#endif // !defined(_di_fl_unserialize_simple_find_) || !defined(_di_fl_unserialize_simple_get_)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_FL_serialized_h
+++ /dev/null
-# fss-0000
-
+++ /dev/null
-# fss-0001
-
-project_name fl_serialized
-
-version_major 0
-version_minor 5
-version_micro 0
-version_target major
-
-environment
-
-process_pre
-process_post
-
-modes individual
-modes_default individual
-
-build_compiler gcc
-build_language c
-build_linker ar
-build_libraries -lc
-build_libraries-individual -lf_utf -lf_memory
-build_sources_library serialized.c private-serialized.c
-build_sources_program
-build_sources_headers serialized.h
-build_sources_script
-build_sources_setting
-build_script yes
-build_shared yes
-build_static yes
-
-path_headers level_1
-path_library_script script
-path_library_shared shared
-path_library_static static
-path_program_script script
-path_program_shared shared
-path_program_static static
-
-search_exclusive yes
-search_shared yes
-search_static yes
-
-defines_all
-defines_static
-defines_shared
-
-flags_all -z now -g
-flags_shared
-flags_static
-flags_library -fPIC
-flags_program -fPIE
#include <level_2/fss_extended.h>
#include <level_2/program.h>
-// Temporary include, remove this.
-#include <level_1/serialized.h>
-
#ifdef __cplusplus
extern "C" {
#endif