I recently noticed that the fll_path has no level 1 dependencies.
I try to keep all projects as low as possible (level_0 being the lowest).
Move fll_paath to fl_path and update everything affected by this.
build_sources_library environment.c
build_sources_library private-fss.c fss/basic.c fss/basic_list.c fss/embedded_list.c fss/extended.c fss/extended_list.c
build_sources_library iki.c
+build_sources_library path.c
build_sources_library print.c private-print.c print/common.c
build_sources_library signal.c
build_sources_library string.c private-string.c
build_sources_headers execute.h execute/common.h
build_sources_headers fss.h fss/basic.h fss/basic_list.h fss/embedded_list.h fss/extended.h fss/extended_list.h
build_sources_headers iki.h
+build_sources_headers path.h
build_sources_headers print.h print/common.h
build_sources_headers signal.h signal/common.h
build_sources_headers string.h
build_sources_library fss.c fss/basic.c fss/basic_list.c fss/embedded_list.c fss/extended.c fss/extended_list.c fss/payload.c
build_sources_library fss_status_string.c
build_sources_library iki.c private-iki.c
-build_sources_library path.c
build_sources_library print.c
build_sources_library program.c program/common.c program/print.c private-program.c
build_sources_library status_string.c
build_sources_headers fss.h fss/basic.h fss/basic_list.h fss/embedded_list.h fss/extended.h fss/extended_list.h fss/payload.h
build_sources_headers fss_status_string.h
build_sources_headers iki.h
-build_sources_headers path.h
build_sources_headers print.h
build_sources_headers program.h program/common.h program/print.h
build_sources_headers status_string.h
build_sources_library level_1/environment.c
build_sources_library level_1/private-fss.c level_1/fss/basic.c level_1/fss/basic_list.c level_1/fss/embedded_list.c level_1/fss/extended.c level_1/fss/extended_list.c
build_sources_library level_1/iki.c
+build_sources_library level_1/path.c
build_sources_library level_1/print.c level_1/private-print.c level_1/print/common.c
build_sources_library level_1/signal.c
build_sources_library level_1/string.c level_1/private-string.c
build_sources_library level_2/fss.c level_2/fss/basic.c level_2/fss/basic_list.c level_2/fss/embedded_list.c level_2/fss/extended.c level_2/fss/extended_list.c level_2/fss/payload.c
build_sources_library level_2/fss_status_string.c
build_sources_library level_2/iki.c level_2/private-iki.c
-build_sources_library level_2/path.c
build_sources_library level_2/print.c
build_sources_library level_2/program.c level_2/program/common.c level_2/program/print.c level_2/private-program.c
build_sources_library level_2/status_string.c
build_sources_headers level_1/execute.h level_1/execute/common.h
build_sources_headers level_1/fss.h level_1/fss/basic.h level_1/fss/basic_list.h level_1/fss/embedded_list.h level_1/fss/extended.h level_1/fss/extended_list.h
build_sources_headers level_1/iki.h
+build_sources_headers level_1/path.h
build_sources_headers level_1/print.h level_1/print/common.h
build_sources_headers level_1/signal.h level_1/signal/common.h
build_sources_headers level_1/string.h
build_sources_headers level_2/fss.h level_2/fss/basic.h level_2/fss/basic_list.h level_2/fss/embedded_list.h level_2/fss/extended.h level_2/fss/extended_list.h level_2/fss/payload.h
build_sources_headers level_2/fss_status_string.h
build_sources_headers level_2/iki.h
-build_sources_headers level_2/path.h
build_sources_headers level_2/print.h
build_sources_headers level_2/program.h level_2/program/common.h level_2/program/print.h
build_sources_headers level_2/status_string.h
$shell_command build/scripts/package.sh $verbose $color rebuild -i
if [[ $? -eq 0 ]] ; then
- for i in f_type f_status f_memory f_type_array f_string f_utf f_account f_capability f_color f_console f_control_group f_conversion f_directory f_environment f_execute f_file f_fss f_iki f_limit f_path f_pipe f_print f_status_string f_serialize f_signal f_socket f_thread fl_control_group fl_conversion fl_directory fl_environment fl_execute fl_fss fl_iki fl_print fl_signal fl_string fl_utf fl_utf_file fll_control_group fll_error fll_execute fll_file fll_fss fll_fss_status_string fll_iki fll_path fll_print fll_program fll_status_string ; do
+ for i in f_type f_status f_memory f_type_array f_string f_utf f_account f_capability f_color f_console f_control_group f_conversion f_directory f_environment f_execute f_file f_fss f_iki f_limit f_path f_pipe f_print f_status_string f_serialize f_signal f_socket f_thread fl_control_group fl_conversion fl_directory fl_environment fl_execute fl_fss fl_iki fl_path fl_print fl_signal fl_string fl_utf fl_utf_file fll_control_group fll_error fll_execute fll_file fll_fss fll_fss_status_string fll_iki fll_print fll_program fll_status_string ; do
echo && echo "Processing $i." &&
cd package/individual/$i-$version/ &&
build_sources_program fll/level_1/environment.c
build_sources_program fll/level_1/private-fss.c fll/level_1/fss/basic.c fll/level_1/fss/basic_list.c fll/level_1/fss/embedded_list.c fll/level_1/fss/extended.c fll/level_1/fss/extended_list.c
build_sources_program fll/level_1/iki.c
+build_sources_program fll/level_1/path.c
build_sources_program fll/level_1/print.c fll/level_1/private-print.c fll/level_1/print/common.c
build_sources_program fll/level_1/string.c fll/level_1/private-string.c
build_sources_program fll/level_2/execute.c fll/level_2/private-execute.c
build_sources_program fll/level_2/file.c fll/level_2/private-file.c
build_sources_program fll/level_2/fss.c fll/level_2/fss/basic.c fll/level_2/fss/basic_list.c fll/level_2/fss/embedded_list.c fll/level_2/fss/extended.c fll/level_2/fss/extended_list.c fll/level_2/fss/payload.c
-build_sources_program fll/level_2/path.c
build_sources_program fll/level_2/print.c
build_sources_program fll/level_2/program.c fll/level_2/program/common.c fll/level_2/program/print.c fll/level_2/private-program.c
extern "C" {
#endif
-#ifndef _di_fll_path_canonical_
- f_status_t fll_path_canonical(const f_string_static_t path, f_string_dynamic_t * const canonical) {
- #ifndef _di_level_2_parameter_checking_
+#ifndef _di_fl_path_canonical_
+ f_status_t fl_path_canonical(const f_string_static_t path, f_string_dynamic_t * const canonical) {
+ #ifndef _di_level_1_parameter_checking_
if (!canonical) return F_status_set_error(F_parameter);
- #endif // _di_level_2_parameter_checking_
+ #endif // _di_level_1_parameter_checking_
f_status_t status = F_none;
return F_none;
}
-#endif // _di_fll_path_canonical_
+#endif // _di_fl_path_canonical_
#ifdef __cplusplus
} // extern "C"
*
* Provides path-related functionality.
*/
-#ifndef _FLL_path_h
-#define _FLL_path_h
+#ifndef _FL_path_h
+#define _FL_path_h
// Libc includes.
#include <stdio.h>
* @see f_string_append_assure()
* @see f_string_dynamic_append_assure()
*/
-#ifndef _di_fll_path_canonical_
- extern f_status_t fll_path_canonical(const f_string_static_t path, f_string_dynamic_t * const canonical);
-#endif // _di_fll_path_canonical_
+#ifndef _di_fl_path_canonical_
+ extern f_status_t fl_path_canonical(const f_string_static_t path, f_string_dynamic_t * const canonical);
+#endif // _di_fl_path_canonical_
#ifdef __cplusplus
} // extern "C"
#endif
-#endif // _FLL_path_h
+#endif // _FL_path_h
# fss-0001
-build_name fll_path
+build_name fl_path
version_major 0
version_minor 7
build_shared yes
build_static no
-path_headers fll/level_2
+path_headers fll/level_1
path_library_script script
path_library_shared shared
path_library_static static
# fss-0001
-build_name test-fll_path
+build_name test-fl_path
version_major 0
version_minor 6
build_language c
build_libraries -lc -lcmocka
-build_libraries-individual -lf_memory -lf_path -lf_string -lfll_path
+build_libraries-individual -lf_memory -lf_path -lf_string -lfl_path
build_sources_program test-path-canonical.c
operate ld_library_path
- if exist build/programs/shared/test-fll_path
- shell build/programs/shared/test-fll_path
+ if exist build/programs/shared/test-fl_path
+ shell build/programs/shared/test-fl_path
- if exist build/programs/static/test-fll_path
- shell build/programs/static/test-fll_path
+ if exist build/programs/static/test-fl_path
+ shell build/programs/static/test-fl_path
- if not exist build/programs/shared/test-fll_path
- and not exist build/programs/static/test-fll_path
+ if not exist build/programs/shared/test-fl_path
+ and not exist build/programs/static/test-fl_path
operate not_created
not_created:
#include <cmocka.h>
// FLL-2 includes.
-#include <fll/level_2/path.h>
+#include <fll/level_1/path.h>
// Mock includes.
//#include "mock-path.h"
#include <fll/level_1/environment.h>
#include <fll/level_1/fss.h>
#include <fll/level_1/iki.h>
+#include <fll/level_1/path.h>
#include <fll/level_1/print.h>
#include <fll/level_1/string.h>
#include <fll/level_2/fss/extended.h>
#include <fll/level_2/fss/extended_list.h>
#include <fll/level_2/fss/payload.h>
-#include <fll/level_2/path.h>
#include <fll/level_2/print.h>
#include <fll/level_2/program.h>
#include <fll/level_2/status_string.h>
f_status_t controller_path_canonical_relative(const controller_setting_t * const setting, const f_string_static_t source, f_string_dynamic_t * const destination) {
{
- const f_status_t status = fll_path_canonical(source, destination);
+ const f_status_t status = fl_path_canonical(source, destination);
if (F_status_is_error(status)) return status;
}
* @return
* F_none on success.
*
- * Errors (with error bit) from: fll_path_canonical().
+ * Errors (with error bit) from: fl_path_canonical().
*
- * @see fll_path_canonical()
+ * @see fl_path_canonical()
*/
#ifndef _di_controller_path_canonical_relative_
extern f_status_t controller_path_canonical_relative(const controller_setting_t * const global, const f_string_static_t source, f_string_dynamic_t * const destination) F_attribute_visibility_internal_d;
fl_environment
fl_fss
fl_iki
+fl_path
fl_print
fl_string
fll_error
fll_execute
fll_fss
-fll_path
fll_print
fll_program
fll_status_string
build_language c
build_libraries -lc -lcap
-build_libraries-individual -lfll_control_group -lfll_error -lfll_execute -lfll_fss -lfll_path -lfll_print -lfll_program -lfll_status_string
-build_libraries-individual -lfl_control_group -lfl_conversion -lfl_directory -lfl_environment -lfl_fss -lfl_iki -lfl_print -lfl_string
+build_libraries-individual -lfll_control_group -lfll_error -lfll_execute -lfll_fss -lfll_print -lfll_program -lfll_status_string
+build_libraries-individual -lfl_control_group -lfl_conversion -lfl_directory -lfl_environment -lfl_fss -lfl_iki -lfl_path -lfl_print -lfl_string
build_libraries-individual -lf_account -lf_capability -lf_color -lf_console -lf_control_group -lf_conversion -lf_directory -lf_environment -lf_execute -lf_file -lf_fss -lf_iki -lf_limit -lf_memory -lf_path -lf_pipe -lf_print -lf_signal -lf_socket -lf_status_string -lf_string -lf_thread -lf_type_array -lf_utf
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll
#include <fll/level_1/directory.h>
#include <fll/level_1/environment.h>
#include <fll/level_1/iki.h>
+#include <fll/level_1/path.h>
#include <fll/level_1/print.h>
#include <fll/level_1/string.h>
#include <fll/level_2/fss.h>
#include <fll/level_2/fss/basic_list.h>
#include <fll/level_2/fss/extended.h>
-#include <fll/level_2/path.h>
#include <fll/level_2/print.h>
#include <fll/level_2/program.h>
data_make->cache_path.used = 0;
- data_make->setting->state.status = fll_path_canonical(path, &data_make->cache_path);
+ data_make->setting->state.status = fl_path_canonical(path, &data_make->cache_path);
if (F_status_is_error(data_make->setting->state.status)) return;
if (data_make->cache_path.used < data_make->path.stack.array[0].used) {
* F_false (with error bit) if path exists outside of the root project path.
*
* Errors (with error bit) from: fl_string_dynamic_partial_compare()
- * Errors (with error bit) from: fll_path_canonical()
+ * Errors (with error bit) from: fl_path_canonical()
* @param path
* file path to get the real path of.
*
* @see fl_string_dynamic_partial_compare()
- * @see fll_path_canonical()
+ * @see fl_path_canonical()
*/
#ifndef _di_fake_make_assure_inside_project_
extern void fake_make_assure_inside_project(fake_make_data_t * const data_make, const f_string_static_t path);
data_make->setting->state.status = f_file_touch(data_make->cache_arguments.array[i], mode.regular, F_false);
if (F_status_is_error(data_make->setting->state.status)) {
- if (F_status_is_error_not(fll_path_canonical(data_make->cache_arguments.array[i], &data_make->cache_path))) {
+ if (F_status_is_error_not(fl_path_canonical(data_make->cache_arguments.array[i], &data_make->cache_path))) {
fake_print_error_file(data_make->setting, data_make->main->error, macro_fake_f(f_file_touch), data_make->cache_path, f_file_operation_touch_s, fll_error_file_type_file_e);
}
else {
data_make->setting->state.status = f_directory_touch(data_make->cache_arguments.array[i], mode.directory);
if (F_status_is_error(data_make->setting->state.status)) {
- if (F_status_is_error_not(fll_path_canonical(data_make->cache_arguments.array[i], &data_make->cache_path))) {
+ if (F_status_is_error_not(fl_path_canonical(data_make->cache_arguments.array[i], &data_make->cache_path))) {
fake_print_error_file(data_make->setting, data_make->main->error, macro_fake_f(f_directory_touch), data_make->cache_path, f_file_operation_touch_s, fll_error_file_type_directory_e);
}
else {
data_make->setting->state.status = f_file_stream_open(data_make->cache_arguments.array[0], f_file_open_mode_truncate_s, &file);
if (F_status_is_error(data_make->setting->state.status)) {
- if (F_status_is_error_not(fll_path_canonical(data_make->cache_arguments.array[0], &data_make->cache_path))) {
+ if (F_status_is_error_not(fl_path_canonical(data_make->cache_arguments.array[0], &data_make->cache_path))) {
fake_print_error_file(data_make->setting, data_make->main->error, macro_fake_f(f_file_stream_open), data_make->cache_path, f_file_operation_open_s, fll_error_file_type_file_e);
}
else {
data_make->setting->state.status = f_file_stream_open(data_make->cache_arguments.array[0], f_file_open_mode_append_s, &file);
if (F_status_is_error(data_make->setting->state.status)) {
- if (F_status_is_error_not(fll_path_canonical(data_make->cache_arguments.array[0], &data_make->cache_path))) {
+ if (F_status_is_error_not(fl_path_canonical(data_make->cache_arguments.array[0], &data_make->cache_path))) {
fake_print_error_file(data_make->setting, data_make->main->error, macro_fake_f(f_file_stream_open), data_make->cache_path, f_file_operation_open_s, fll_error_file_type_file_e);
}
else {
fake_make_operate_process_buffer_escape(data_make, data_make->cache_arguments.array[i], &data_make->cache_1);
if (F_status_is_error(data_make->setting->state.status)) {
- if (F_status_is_error_not(fll_path_canonical(data_make->cache_arguments.array[0], &data_make->cache_path))) {
+ if (F_status_is_error_not(fl_path_canonical(data_make->cache_arguments.array[0], &data_make->cache_path))) {
fake_print_error_file(data_make->setting, data_make->main->error, macro_fake_f(fake_make_operate_process_buffer_escape), data_make->cache_path, f_file_operation_write_s, fll_error_file_type_file_e);
}
else {
data_make->setting->state.status = f_file_stream_write(file, data_make->cache_1, 0);
if (F_status_is_error(data_make->setting->state.status)) {
- if (F_status_is_error_not(fll_path_canonical(data_make->cache_arguments.array[0], &data_make->cache_path))) {
+ if (F_status_is_error_not(fl_path_canonical(data_make->cache_arguments.array[0], &data_make->cache_path))) {
fake_print_error_file(data_make->setting, data_make->main->error, macro_fake_f(f_file_stream_write), data_make->cache_path, f_file_operation_write_s, fll_error_file_type_file_e);
}
else {
fl_execute
fl_fss
fl_iki
+fl_path
fl_print
fl_string
fll_execute
fll_file
fll_fss
-fll_path
fll_print
fll_program
build_language c
build_libraries -lc -lcap
-build_libraries-individual -lfll_error -lfll_execute -lfll_file -lfll_fss -lfll_path -lfll_print -lfll_program
-build_libraries-individual -lfl_control_group -lfl_conversion -lfl_directory -lfl_environment -lfl_fss -lfl_iki -lfl_print -lfl_string
+build_libraries-individual -lfll_error -lfll_execute -lfll_file -lfll_fss -lfll_print -lfll_program
+build_libraries-individual -lfl_control_group -lfl_conversion -lfl_directory -lfl_environment -lfl_fss -lfl_iki -lfl_path -lfl_print -lfl_string
build_libraries-individual -lf_account -lf_capability -lf_color -lf_console -lf_control_group -lf_conversion -lf_directory -lf_environment -lf_execute -lf_file -lf_fss -lf_iki -lf_limit -lf_memory -lf_path -lf_pipe -lf_print -lf_signal -lf_status_string -lf_string -lf_thread -lf_type_array -lf_utf
build_libraries-level -lfll_2 -lfll_1 -lfll_0
build_libraries-monolithic -lfll