I have used this for a while and have decided these are not worth the effort.
The addition is very nice but the additional code and logic is just extra maintenance and complexity for very little gain.
build_mode_extra_param_2=
build_mode_extra_value_2=
shell_command=bash
-suppress_first="+F"
exclude_programs=
grab_next=
skip=
cd package/individual/${i}-${version}/ &&
- ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} &&
+ ${shell_command} ./bootstrap.sh clean ${verbose} ${color} &&
- ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m individual -m individual_thread ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} &&
+ ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m individual -m individual_thread ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} &&
- ${shell_command} ./install.sh ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} &&
+ ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work} &&
cd ${path_original} || break
done
cd package/level/fll-level_0-${version}/ &&
- ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} &&
+ ${shell_command} ./bootstrap.sh clean ${verbose} ${color} &&
- ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m level ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} &&
+ ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m level ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} &&
- ${shell_command} ./install.sh ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} &&
+ ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work} &&
cd ${path_original} &&
cd package/level/fll-level_1-${version}/ &&
- ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} &&
+ ${shell_command} ./bootstrap.sh clean ${verbose} ${color} &&
- ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m level ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} &&
+ ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m level ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} &&
- ${shell_command} ./install.sh ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} &&
+ ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work} &&
cd ${path_original} &&
cd package/level/fll-level_2-${version}/ &&
- ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} &&
+ ${shell_command} ./bootstrap.sh clean ${verbose} ${color} &&
- ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m level ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} &&
+ ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m level ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} &&
- ${shell_command} ./install.sh ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work}
+ ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work}
fi
if [[ ${1} == "monolithic" ]] ; then
cd package/monolithic/fll-${version}/ &&
- ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} &&
+ ${shell_command} ./bootstrap.sh clean ${verbose} ${color} &&
- ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m monolithic ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} &&
+ ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m monolithic ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} &&
- ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${suppress_first} ${static} -w ${path_work}
+ ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work}
fi
# The following in an example on building individual projects.
cd package/${mode_path}/${mode_part}-${version}/ &&
- ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} &&
+ ${shell_command} ./bootstrap.sh clean ${verbose} ${color} &&
- ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m ${build_mode} ${build_mode_extra_param_1} ${build_mode_extra_value_1} ${build_mode_extra_param_2} ${build_mode_extra_value_2} ${mode_compiler_param} ${mode_compiler_value} &&
+ ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m ${build_mode} ${build_mode_extra_param_1} ${build_mode_extra_value_1} ${build_mode_extra_param_2} ${build_mode_extra_value_2} ${mode_compiler_param} ${mode_compiler_value} &&
- ${shell_command} ./install.sh ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work}
+ ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work}
# The following in an example on building all FLL program projects using the project bootstrapped from above.
elif [[ ${1} == "programs-individual" || ${1} == "programs-level" || ${1} == "programs-monolithic" ]] ; then
cd ${path_original}package/program/${i} &&
- ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} &&
+ ${shell_command} ./bootstrap.sh clean ${verbose} ${color} &&
- ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m ${build_mode} ${build_mode_extra_param_1} ${build_mode_extra_value_1} ${build_mode_extra_param_2} ${build_mode_extra_value_2} ${mode_compiler_param} ${mode_compiler_value} &&
+ ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m ${build_mode} ${build_mode_extra_param_1} ${build_mode_extra_value_1} ${build_mode_extra_param_2} ${build_mode_extra_value_2} ${mode_compiler_param} ${mode_compiler_value} &&
- ${shell_command} ./install.sh ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} ||
+ ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work} ||
break
done
local path_sources=sources/
local path_language=c/
local path_work=
- local print_line_first="yes"
- local print_line_last="yes"
local project_built=
local project_built_shared=
local project_built_static=
verbosity="debug"
verbose="+D"
verbose_common="-v"
- elif [[ ${p} == "+F" || ${p} == "++line_first_no" ]] ; then
- print_line_first="no"
- elif [[ ${p} == "+L" || ${p} == "++line_last_no" ]] ; then
- print_line_last="no"
elif [[ ${p} == "+v" || ${p} == "++version" ]] ; then
echo ${version}
return 0
p=
fi
- if [[ ${verbosity} == "quiet" ]] ; then
- print_line_first="no"
- print_line_last="no"
- fi
-
# If the settings_name has a directory separator, then assume it is a path to the settings file.
if [[ $(echo ${settings_name} | grep -s -o '/') == "" ]] ; then
settings_file="${path_data}build/${settings_name}"
for mode in ${modes} ; do
if [[ $(echo "${mode}" | grep -s -o "[^_[:alnum:]+-]") != "" ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- bootstrap_print_first
-
echo -e "${c_error}ERROR: The mode ${c_notice}${mode}${c_error} includes invalid characters, only alphanumeric, underscore, minus, and plus are allowed.${c_reset}"
-
- bootstrap_print_last
fi
bootstrap_cleanup
if [[ ${modes_available} == "" ]] ; then
if [[ ${modes} != "" ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- bootstrap_print_first
-
echo -e "${c_error}ERROR: The mode(s) ${c_notice}${modes}${c_error} are not a valid modes, there are no available modes.${c_error}${c_reset}"
-
- bootstrap_print_last
fi
bootstrap_cleanup
if [[ ${i} -eq 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- bootstrap_print_first
-
echo -e "${c_error}ERROR: The mode(s) ${c_notice}${modes}${c_error} are not valid modes, they must be one of: ${c_notice}${modes_available}${c_error}.${c_reset}"
-
- bootstrap_print_last
fi
bootstrap_cleanup
bootstrap_id "build_name"
if [[ ${variables[${key}]} == "" ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- bootstrap_print_first
-
echo -e "${c_error}ERROR: The required setting '${c_notice}build_name${c_error}' is not specified in the build settings file '${c_notice}${settings_file}${c_error}'.${c_reset}"
-
- bootstrap_print_last
fi
bootstrap_cleanup
bootstrap_id "version_major"
if [[ ${variables[${key}]} == "" ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- bootstrap_print_first
-
echo -e "${c_error}ERROR: The required setting '${c_notice}version_major${c_error}' is not specified in the build settings file '${c_notice}${settings_file}${c_error}'.${c_reset}"
-
- bootstrap_print_last
fi
bootstrap_cleanup
bootstrap_id "version_minor"
if [[ ${variables[${key}]} == "" ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- bootstrap_print_first
-
echo -e "${c_error}ERROR: The required setting '${c_notice}version_minor${c_error}' is not specified in the build settings file '${c_notice}${settings_file}${c_error}'.${c_reset}"
-
- bootstrap_print_last
fi
bootstrap_cleanup
bootstrap_id "version_micro"
if [[ ${variables[${key}]} == "" ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- bootstrap_print_first
-
echo -e "${c_error}ERROR: The required setting '${c_notice}version_micro${c_error}' is not specified in the build settings file '${c_notice}${settings_file}${c_error}'.${c_reset}"
-
- bootstrap_print_last
fi
bootstrap_cleanup
if [[ ${path_data} == "" || ! -d ${path_data} ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- bootstrap_print_first
-
echo -e "${c_error}ERROR: The data directory ${c_notice}${path_data}${c_error} is not a valid directory.${c_reset}"
-
- bootstrap_print_last
fi
bootstrap_cleanup
if [[ ${path_sources} == "" || ! -d ${path_sources} ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- bootstrap_print_first
-
echo -e "${c_error}ERROR: The sources directory ${c_notice}${path_sources}${c_error} is not a valid directory.${c_reset}"
-
- bootstrap_print_last
fi
bootstrap_cleanup
if [[ ${path_work} != "" && ! -d ${path_work} ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- bootstrap_print_first
-
echo -e "${c_error}ERROR: The work directory ${c_notice}${path_work}${c_error} is not a valid directory.${c_reset}"
-
- bootstrap_print_last
fi
bootstrap_cleanup
if [[ ${operation_failure} == "fail-multiple" ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- bootstrap_print_first
-
echo -e "${c_error}ERROR: Only one operation may be specified at a time.${c_reset}"
-
- bootstrap_print_last
fi
bootstrap_cleanup
return 1
elif [[ ${operation} == "build" ]] ; then
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- bootstrap_print_first
-
echo -e "${c_highlight}Building:${c_reset} ${c_notice}${project_label}${c_highlight} with modes: ${c_notice}${modes}${c_highlight}.${c_reset}"
fi
fi
elif [[ ${operation} == "clean" ]] ; then
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- bootstrap_print_first
-
echo -e "${c_highlight}Cleaning Project:${c_reset} ${c_notice}${project_label}${c_highlight}.${c_reset}"
fi
bootstrap_operation_clean
elif [[ ${operation} == "" ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- bootstrap_print_first
-
echo -e "${c_error}ERROR: No operation was given.${c_reset}"
fi
return 1
else
if [[ ${verbosity} != "quiet" ]] ; then
- bootstrap_print_first
-
echo -e "${c_error}ERROR: The operation ${c_notice}${operation}${c_error} was not recognized.${c_reset}"
-
- bootstrap_print_last
fi
bootstrap_cleanup
return 1
fi
- if [[ ${verbosity} != "quiet" ]] ; then
- if [[ ${failure} -eq 1 || ${verbosity} != "error" ]] ; then
- bootstrap_print_last
- fi
- fi
-
bootstrap_cleanup
return 0
bootstrap_help() {
- bootstrap_print_first
-
echo -e "${c_title}${public_name}${c_reset}"
echo -e " ${c_notice}Version ${version}${c_reset}"
echo
echo -e " ${c_important}clean${c_reset} Delete all build files."
echo
echo -e "${c_highlight}Options:${c_reset}"
- echo -e " -${c_important}h${c_reset}, --${c_important}help${c_reset} Print this help message."
- echo -e " +${c_important}C${c_reset}, ++${c_important}copyright${c_reset} Print the copyright."
- echo -e " +${c_important}d${c_reset}, ++${c_important}dark${c_reset} Output using colors that show up better on dark backgrounds."
- echo -e " +${c_important}l${c_reset}, ++${c_important}light${c_reset} Output using colors that show up better on light backgrounds."
- echo -e " +${c_important}n${c_reset}, ++${c_important}no_color${c_reset} Do not print using color."
- echo -e " +${c_important}Q${c_reset}, ++${c_important}quiet${c_reset} Decrease verbosity, silencing most print.to."
- echo -e " +${c_important}E${c_reset}, ++${c_important}error${c_reset} Decrease verbosity, using only error print.to."
- echo -e " +${c_important}N${c_reset}, ++${c_important}normal${c_reset} Set verbosity to normal."
- echo -e " +${c_important}V${c_reset}, ++${c_important}verbose${c_reset} Increase verbosity beyond normal print.to."
- echo -e " +${c_important}D${c_reset}, ++${c_important}debug${c_reset} Enable debugging, significantly increasing verbosity beyond normal print.to."
- echo -e " +${c_important}v${c_reset}, ++${c_important}version${c_reset} Print only the version number."
- echo -e " +${c_important}F${c_reset}, ++${c_important}line_first_no${c_reset} Disable printing of first line."
- echo -e " +${c_important}L${c_reset}, ++${c_important}line_last_no${c_reset} Disable printing of last line."
+ echo -e " -${c_important}h${c_reset}, --${c_important}help${c_reset} Print this help message."
+ echo -e " +${c_important}C${c_reset}, ++${c_important}copyright${c_reset} Print the copyright."
+ echo -e " +${c_important}d${c_reset}, ++${c_important}dark${c_reset} Output using colors that show up better on dark backgrounds."
+ echo -e " +${c_important}l${c_reset}, ++${c_important}light${c_reset} Output using colors that show up better on light backgrounds."
+ echo -e " +${c_important}n${c_reset}, ++${c_important}no_color${c_reset} Do not print using color."
+ echo -e " +${c_important}Q${c_reset}, ++${c_important}quiet${c_reset} Decrease verbosity, silencing most print.to."
+ echo -e " +${c_important}E${c_reset}, ++${c_important}error${c_reset} Decrease verbosity, using only error print.to."
+ echo -e " +${c_important}N${c_reset}, ++${c_important}normal${c_reset} Set verbosity to normal."
+ echo -e " +${c_important}V${c_reset}, ++${c_important}verbose${c_reset} Increase verbosity beyond normal print.to."
+ echo -e " +${c_important}D${c_reset}, ++${c_important}debug${c_reset} Enable debugging, significantly increasing verbosity beyond normal print.to."
+ echo -e " +${c_important}v${c_reset}, ++${c_important}version${c_reset} Print only the version number."
echo
echo -e "${c_highlight}Bootstrap Options:${c_reset}"
echo -e " -${c_important}d${c_reset}, --${c_important}define${c_reset} Append an additional define after defines from settings file."
echo -e " --${c_important}disable-shared${c_reset} Forcibly do not build shared files."
echo -e " --${c_important}enable-static${c_reset} Forcibly do build static files."
echo -e " --${c_important}disable-static${c_reset} Forcibly do not build static files."
-
- bootstrap_print_last
}
bootstrap_copyright() {
- bootstrap_print_first
-
echo "Copyright © 2007-2024 Kevin Day."
echo
echo "Source code license lgpl-2.1-or-later."
echo "Standard and specification license open-standard-license-1.0-or-later."
echo "Documentation license cc-by-sa-4.0."
-
- bootstrap_print_last
}
bootstrap_id() {
if [[ ! -d ${path_data}build/ ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- bootstrap_print_first
-
echo -e "${c_error}ERROR: No build settings directory '${c_notice}${path_data}build/${c_error}' could not be found or is not a valid directory.${c_reset}"
fi
let failure=1
elif [[ ! -f ${settings_file} ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- bootstrap_print_first
-
echo -e "${c_error}ERROR: No settings file ${c_notice}${settings_file}${c_error} could not be found or is not a valid file.${c_reset}"
fi
if [[ ${failure} -eq 1 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- bootstrap_print_first
-
echo -e "${c_error}ERROR: Failed to build.${c_reset}"
fi
if [[ ${build_compiler} == "" ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- bootstrap_print_first
-
echo -e "${c_error}ERROR: Cannot Build, no '${c_notice}build_compiler${c_error}' specified, such as '${c_notice}gcc${c_error}'.${c_reset}"
fi
if [[ ${build_indexer} == "" ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- bootstrap_print_first
-
echo -e "${c_error}ERROR: Cannot Build, no '${c_notice}build_indexer${c_error}' specified, such as '${c_notice}ar${c_error}'.${c_reset}"
fi
if [[ ${path_sources} == "" || ! -d ${path_sources} ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- bootstrap_print_first
-
echo -e "${c_error}ERROR: The sources directory ${c_notice}${path_sources}${c_error} is not a valid directory.${c_reset}"
fi
if [[ ${failure} -eq 0 && ${path_sources_object} != "" && ! -d ${path_sources_object} ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- bootstrap_print_first
-
echo -e "${c_error}ERROR: The sources object directory ${c_notice}${path_sources_object}${c_error} is not a valid directory.${c_reset}"
fi
if [[ ${build_shared} != "yes" && ${build_static} != "yes" ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- bootstrap_print_first
-
echo -e "${c_error}ERROR: Cannot Build, either build_shared or build_static must be set to 'yes'.${c_reset}"
fi
if [[ ${search_shared} != "yes" && ${search_static} != "yes" ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- bootstrap_print_first
-
echo -e "${c_error}ERROR: Cannot Build, either search_shared or search_static must be set to 'yes'.${c_reset}"
fi
for i in ${sources_script} ; do
if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- bootstrap_print_first
-
echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_script path provided: '${i}'.${c_reset}"
fi
for i in ${sources_headers} ; do
if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- bootstrap_print_first
-
echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_headers path provided: '${i}'.${c_reset}"
fi
for i in ${sources_library} ; do
if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- bootstrap_print_first
-
echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_library path provided: '${i}'.${c_reset}"
fi
for i in ${sources_library_object} ; do
if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- bootstrap_print_first
-
echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_library_object path provided: '${i}'.${c_reset}"
fi
for i in ${sources_program_object} ; do
if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- bootstrap_print_first
-
echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_program_object path provided: '${i}'.${c_reset}"
fi
for i in ${sources_program} ; do
if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- bootstrap_print_first
-
echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_program path provided: '${i}'.${c_reset}"
fi
for i in ${sources_documentation} ; do
if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- bootstrap_print_first
-
echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_documentation path provided: '${i}'.${c_reset}"
fi
for i in ${sources_setting} ; do
if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- bootstrap_print_first
-
echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_setting path provided: '${i}'.${c_reset}"
fi
fi
}
-bootstrap_print_first() {
-
- if [[ ${print_line_first} == "yes" ]] ; then
- echo
-
- print_line_first=
- fi
-}
-
-bootstrap_print_last() {
-
- if [[ ${print_line_last} == "yes" ]] ; then
- echo
- fi
-}
-
bootstrap_cleanup() {
unset bootstrap_copyright
unset bootstrap_operation_build_validate_shared_static
unset bootstrap_operation_build_validate_sources
unset bootstrap_operation_clean
- unset bootstrap_print_first
- unset bootstrap_print_last
unset bootstrap_cleanup
}
local failure=0
local file=
local name=
- local print_line_first="yes"
- local print_line_last="yes"
local source="./"
local verbosity=normal
local verbose=
verbosity="debug"
verbose="+D"
verbose_common="-v"
- elif [[ ${p} == "+F" || ${p} == "++line_first_no" ]] ; then
- print_line_first="no"
- elif [[ ${p} == "+L" || ${p} == "++line_last_no" ]] ; then
- print_line_last="no"
elif [[ ${p} == "+v" || ${p} == "++version" ]] ; then
echo ${version}
return 0
p=
fi
- if [[ ${verbosity} == "quiet" ]] ; then
- print_line_first="no"
- print_line_last="no"
- fi
-
generate_ctags_handle_colors
if [[ ${do_help} == "yes" ]] ; then
if [[ $(echo "$name" | grep -s -o "/") != "" || ${name} == "" ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- generate_ctags_print_first
-
if [[ ${name} == "" ]] ; then
echo -e "${c_error}ERROR: No ${c_notice}name${c_error} parameter has been provided or is empty.${c_reset}"
else
echo -e "${c_error}ERROR: The ${c_notice}name${c_error} parameter value '${c_notice}${name}${c_error}' must not have a slash.${c_reset}"
fi
-
- generate_ctags_print_last
fi
generate_ctags_cleanup
if [[ ${destination} == "" || ! -d ${destination} ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- generate_ctags_print_first
-
if [[ ${destination} == "" ]] ; then
echo -e "${c_error}ERROR: The ${c_notice}destination${c_error} parameter is empty.${c_reset}"
else
echo -e "${c_error}ERROR: The ${c_notice}destination${c_error} parameter value '${c_notice}${destination}${c_error}' must be a directory.${c_reset}"
fi
-
- generate_ctags_print_last
fi
generate_ctags_cleanup
if [[ ${source} == "" || ! -d ${source} ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- generate_ctags_print_first
-
if [[ ${source} == "" ]] ; then
echo -e "${c_error}ERROR: The ${c_notice}source${c_error} parameter is empty.${c_reset}"
else
echo -e "${c_error}ERROR: The ${c_notice}source${c_error} parameter value '${c_notice}${source}${c_error}' must be a directory.${c_reset}"
fi
-
- generate_ctags_print_last
fi
generate_ctags_cleanup
if [[ $? -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- generate_ctags_print_first
-
echo -e "${c_error}ERROR: The ${c_notice}ctags${c_error} process failed.${c_reset}"
-
- generate_ctags_print_last
fi
generate_ctags_cleanup
if [[ $? -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- generate_ctags_print_first
-
echo -e "${c_error}ERROR: Failed to strip the full path from the ${c_notice}${file}${c_error} file.${c_reset}"
-
- generate_ctags_print_last
fi
generate_ctags_cleanup
fi
if [[ ${verbosity} != "quiet" ]] ; then
- generate_ctags_print_first
-
echo -e "${c_highlight}SUCCESS: The file ${c_notice}${file}${c_highlight} has been generated.${c_reset}"
-
- generate_ctags_print_last
fi
generate_ctags_cleanup
return 0
}
-generate_ctags_print_first() {
-
- if [[ ${print_line_first} == "yes" ]] ; then
- echo
-
- print_line_first=
- fi
-}
-
-generate_ctags_print_last() {
-
- if [[ ${print_line_last} == "yes" ]] ; then
- echo
- fi
-}
-
generate_ctags_handle_colors() {
if [[ ${do_color} == "light" ]] ; then
generate_ctags_help() {
- generate_ctags_print_first
-
echo -e "${c_title}${public_name}${c_reset}"
echo -e " ${c_notice}Version ${version}${c_reset}"
echo
echo -e "${c_highlight}${system_name}${c_reset} ${c_notice}[${c_reset} options ${c_notice}]${c_reset} ${c_notice}[${c_reset} name ${c_notice}]${c_reset}"
echo
echo -e "${c_highlight}Options:${c_reset}"
- echo -e " -${c_important}h${c_reset}, --${c_important}help${c_reset} Print this help message."
- echo -e " +${c_important}C${c_reset}, ++${c_important}copyright${c_reset} Print the copyright."
- echo -e " +${c_important}d${c_reset}, ++${c_important}dark${c_reset} Output using colors that show up better on dark backgrounds."
- echo -e " +${c_important}l${c_reset}, ++${c_important}light${c_reset} Output using colors that show up better on light backgrounds."
- echo -e " +${c_important}n${c_reset}, ++${c_important}no_color${c_reset} Do not print using color."
- echo -e " +${c_important}Q${c_reset}, ++${c_important}quiet${c_reset} Decrease verbosity, silencing most print.to."
- echo -e " +${c_important}E${c_reset}, ++${c_important}error${c_reset} Decrease verbosity, using only error print.to."
- echo -e " +${c_important}N${c_reset}, ++${c_important}normal${c_reset} Set verbosity to normal."
- echo -e " +${c_important}V${c_reset}, ++${c_important}verbose${c_reset} Increase verbosity beyond normal print.to."
- echo -e " +${c_important}D${c_reset}, ++${c_important}debug${c_reset} Enable debugging, significantly increasing verbosity beyond normal print.to."
- echo -e " +${c_important}v${c_reset}, ++${c_important}version${c_reset} Print only the version number."
- echo -e " +${c_important}F${c_reset}, ++${c_important}line_first_no${c_reset} Disable printing of first line."
- echo -e " +${c_important}L${c_reset}, ++${c_important}line_last_no${c_reset} Disable printing of last line."
+ echo -e " -${c_important}h${c_reset}, --${c_important}help${c_reset} Print this help message."
+ echo -e " +${c_important}C${c_reset}, ++${c_important}copyright${c_reset} Print the copyright."
+ echo -e " +${c_important}d${c_reset}, ++${c_important}dark${c_reset} Output using colors that show up better on dark backgrounds."
+ echo -e " +${c_important}l${c_reset}, ++${c_important}light${c_reset} Output using colors that show up better on light backgrounds."
+ echo -e " +${c_important}n${c_reset}, ++${c_important}no_color${c_reset} Do not print using color."
+ echo -e " +${c_important}Q${c_reset}, ++${c_important}quiet${c_reset} Decrease verbosity, silencing most print.to."
+ echo -e " +${c_important}E${c_reset}, ++${c_important}error${c_reset} Decrease verbosity, using only error print.to."
+ echo -e " +${c_important}N${c_reset}, ++${c_important}normal${c_reset} Set verbosity to normal."
+ echo -e " +${c_important}V${c_reset}, ++${c_important}verbose${c_reset} Increase verbosity beyond normal print.to."
+ echo -e " +${c_important}D${c_reset}, ++${c_important}debug${c_reset} Enable debugging, significantly increasing verbosity beyond normal print.to."
+ echo -e " +${c_important}v${c_reset}, ++${c_important}version${c_reset} Print only the version number."
echo
echo -e "${c_highlight}Generate Options:${c_reset}"
echo -e " -${c_important}d${c_reset}, --${c_important}destination${c_reset} The destination directory to write to."
echo -e " -${c_important}s${c_reset}, --${c_important}source${c_reset} The source directory containing the header files for generating the ctags from."
echo
echo -e "The ${c_notice}name${c_reset} represents the name of the file, without the extension."
-
- generate_ctags_print_last
}
generate_ctags_copyright() {
- generate_ctags_print_first
-
echo "Copyright © 2007-2024 Kevin Day."
echo
echo "Source code license lgpl-2.1-or-later."
echo "Standard and specification license open-standard-license-1.0-or-later."
echo "Documentation license cc-by-sa-4.0."
-
- generate_ctags_print_last
}
generate_ctags_cleanup() {
unset generate_ctags_main
unset generate_ctags_handle_colors
unset generate_ctags_help
- unset generate_ctags_print_first
- unset generate_ctags_print_last
unset generate_ctags_cleanup
}
local enable_static_programs="yes"
local enable_static_libraries="yes"
local enable_includes="yes"
- local print_line_first="yes"
- local print_line_last="yes"
if [[ $# -gt 0 ]] ; then
t=$#
verbosity="debug"
verbose="+D"
verbose_common="-v"
- elif [[ ${p} == "+F" || ${p} == "++line_first_no" ]] ; then
- print_line_first="no"
- elif [[ ${p} == "+L" || ${p} == "++line_last_no" ]] ; then
- print_line_last="no"
elif [[ ${p} == "+v" || ${p} == "++version" ]] ; then
echo ${version}
return 0
p=
fi
- if [[ ${verbosity} == "quiet" ]] ; then
- print_line_first="no"
- print_line_last="no"
- fi
-
install_handle_colors
if [[ ${do_help} == "yes" ]] ; then
if [[ ${operation_failure} == "fail-unsupported" ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- install_print_first
-
echo -e "${c_error}ERROR: The operation ${c_notice}${operation}${c_error} was not recognized.${c_reset}"
-
- install_print_last
fi
install_cleanup
if [[ ! -d ${path_build} ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- install_print_first
-
echo -e "${c_error}ERROR: The build path ${c_notice}${path_build}${c_error} is not a valid directory.${c_reset}"
-
- install_print_last
fi
install_cleanup
if [[ ${work} == "" && ${destination_prefix} != "" && ! -d ${destination_prefix} ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- install_print_first
-
echo -e "${c_error}ERROR: The destination prefix ${c_notice}${destination_prefix}${c_error} is not a valid directory.${c_reset}"
-
- install_print_last
fi
install_cleanup
if [[ ${work} != "" && ! -d ${work} ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- install_print_first
-
echo -e "${c_error}ERROR: The work directory ${c_notice}${work}${c_error} is not a valid directory.${c_reset}"
-
- install_print_last
fi
install_cleanup
if [[ ${work} == "" && -e ${destination_programs} && ! -d ${destination_programs} ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- install_print_first
-
echo -e "${c_error}ERROR: The destination bindir ${c_notice}${destination_programs}${c_error} is not a valid directory.${c_reset}"
-
- install_print_last
fi
install_cleanup
if [[ ${work} == "" && -e ${destination_programs_static} && ! -d ${destination_programs_static} ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- install_print_first
-
echo -e "${c_error}ERROR: The destination (${c_notice}static${c_error}) bindir ${c_notice}${destination_programs_static}${c_error} is not a valid directory.${c_reset}"
-
- install_print_last
fi
install_cleanup
if [[ ${work} == "" && -e ${destination_programs_shared} && ! -d ${destination_programs_shared} ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- install_print_first
-
echo -e "${c_error}ERROR: The destination (${c_notice}shared${c_error}) bindir ${c_notice}${destination_programs_shared}${c_error} is not a valid directory.${c_reset}"
-
- install_print_last
fi
install_cleanup
if [[ ${work} == "" && -e ${destination_includes} && ! -d ${destination_includes} ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- install_print_first
-
echo -e "${c_error}ERROR: The destination incluedir ${c_notice}${destination_includes}${c_error} is not a valid directory.${c_reset}"
-
- install_print_last
fi
install_cleanup
if [[ ${work} == "" && -e ${destination_libraries_static} && ! -d ${destination_libraries_static} ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- install_print_first
-
echo -e "${c_error}ERROR: The destination (${c_notice}static${c_error}) libdir ${c_notice}${destination_libraries_static}${c_error} is not a valid directory.${c_reset}"
-
- install_print_last
fi
install_cleanup
if [[ ${work} == "" && -e ${destination_libraries_shared} && ! -d ${destination_libraries_shared} ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- install_print_first
-
echo -e "${c_error}ERROR: The destination (${c_notice}shared${c_error}) libdir ${c_notice}${destination_libraries_shared}${c_error} is not a valid directory.${c_reset}"
-
- install_print_last
fi
install_cleanup
install_perform_install
- if [[ ${verbosity} != "quiet" ]] ; then
- if [[ ${failure} -eq 1 || ${verbosity} != "error" ]] ; then
- install_print_last
- fi
- fi
-
install_cleanup
if [[ ${failure} -eq 1 ]] ; then
install_help() {
- install_print_first
-
echo -e "${c_title}${public_name}${c_reset}"
echo -e " ${c_notice}Version ${version}${c_reset}"
echo
echo -e "${c_highlight}${system_name}${c_reset} ${c_notice}[${c_reset} options ${c_notice}]${c_reset}"
echo
echo -e "${c_highlight}Options:${c_reset}"
- echo -e " -${c_important}h${c_reset}, --${c_important}help${c_reset} Print this help message."
- echo -e " +${c_important}C${c_reset}, ++${c_important}copyright${c_reset} Print the copyright."
- echo -e " +${c_important}d${c_reset}, ++${c_important}dark${c_reset} Output using colors that show up better on dark backgrounds."
- echo -e " +${c_important}l${c_reset}, ++${c_important}light${c_reset} Output using colors that show up better on light backgrounds."
- echo -e " +${c_important}n${c_reset}, ++${c_important}no_color${c_reset} Do not print using color."
- echo -e " +${c_important}Q${c_reset}, ++${c_important}quiet${c_reset} Decrease verbosity, silencing most print.to."
- echo -e " +${c_important}E${c_reset}, ++${c_important}error${c_reset} Decrease verbosity, using only error print.to."
- echo -e " +${c_important}N${c_reset}, ++${c_important}normal${c_reset} Set verbosity to normal."
- echo -e " +${c_important}V${c_reset}, ++${c_important}verbose${c_reset} Increase verbosity beyond normal print.to."
- echo -e " +${c_important}D${c_reset}, ++${c_important}debug${c_reset} Enable debugging, significantly increasing verbosity beyond normal print.to."
- echo -e " +${c_important}v${c_reset}, ++${c_important}version${c_reset} Print only the version number."
- echo -e " +${c_important}F${c_reset}, ++${c_important}line_first_no${c_reset} Disable printing of first line."
- echo -e " +${c_important}L${c_reset}, ++${c_important}line_last_no${c_reset} Disable printing of last line."
+ echo -e " -${c_important}h${c_reset}, --${c_important}help${c_reset} Print this help message."
+ echo -e " +${c_important}C${c_reset}, ++${c_important}copyright${c_reset} Print the copyright."
+ echo -e " +${c_important}d${c_reset}, ++${c_important}dark${c_reset} Output using colors that show up better on dark backgrounds."
+ echo -e " +${c_important}l${c_reset}, ++${c_important}light${c_reset} Output using colors that show up better on light backgrounds."
+ echo -e " +${c_important}n${c_reset}, ++${c_important}no_color${c_reset} Do not print using color."
+ echo -e " +${c_important}Q${c_reset}, ++${c_important}quiet${c_reset} Decrease verbosity, silencing most print.to."
+ echo -e " +${c_important}E${c_reset}, ++${c_important}error${c_reset} Decrease verbosity, using only error print.to."
+ echo -e " +${c_important}N${c_reset}, ++${c_important}normal${c_reset} Set verbosity to normal."
+ echo -e " +${c_important}V${c_reset}, ++${c_important}verbose${c_reset} Increase verbosity beyond normal print.to."
+ echo -e " +${c_important}D${c_reset}, ++${c_important}debug${c_reset} Enable debugging, significantly increasing verbosity beyond normal print.to."
+ echo -e " +${c_important}v${c_reset}, ++${c_important}version${c_reset} Print only the version number."
echo
echo -e "${c_highlight}Install Options:${c_reset}"
echo -e " -${c_important}b${c_reset}, --${c_important}build${c_reset} Custom build directory."
echo -e " --${c_important}libraries-shared${c_reset} Custom destination for shared libraries."
echo -e " --${c_important}programs-static${c_reset} Custom destination for static programs."
echo -e " --${c_important}programs-shared${c_reset} Custom destination for shared programs."
-
- install_print_last
}
install_copyright() {
- install_print_first
-
echo "Copyright © 2007-2024 Kevin Day."
echo
echo "Source code license lgpl-2.1-or-later."
echo "Standard and specification license open-standard-license-1.0-or-later."
echo "Documentation license cc-by-sa-4.0."
-
- install_print_last
}
install_perform_install() {
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- install_print_first
-
echo -e "${c_error}ERROR: Failed to create install ${message} ${c_notice}${destination_prefix}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- install_print_first
-
echo -e "${c_error}ERROR: Failed to create install ${message} ${c_notice}${destination_programs}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- install_print_first
-
echo -e "${c_error}ERROR: Failed to create install ${message} ${c_notice}${destination_programs_shared}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- install_print_first
-
echo -e "${c_error}ERROR: Failed to create install ${message} ${c_notice}${destination_programs_static}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- install_print_first
-
echo -e "${c_error}ERROR: Failed to create install ${message} ${c_notice}${destination_libraries}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- install_print_first
-
echo -e "${c_error}ERROR: Failed to create ${message} ${c_notice}${destination_libraries_shared}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- install_print_first
-
echo -e "${c_error}ERROR: Failed to create ${message} ${c_notice}${destination_libraries_static}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- install_print_first
-
echo -e "${c_error}ERROR: Failed to create ${message} ${c_notice}${destination_includes}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- install_print_first
-
echo -e "${c_error}ERROR: Failed to create ${message} ${c_notice}${destination_documentation}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- install_print_first
-
echo -e "${c_error}ERROR: Failed to create ${message} ${c_notice}${destination_settings}${c_error}.${c_reset}"
fi
if [[ ${file} != "" ]] ; then
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- install_print_first_or_always
-
+ echo
echo -e "${c_highlight}Installing Includes to: ${c_reset}${c_notice}${destination_includes}${c_reset}${c_highlight}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- install_print_first
-
echo -e "${c_error}ERROR: Failed to copy include files from ${c_notice}${path_build}${path_includes}${c_error} to ${c_notice}${destination_includes}${c_error}.${c_reset}"
fi
if [[ ${file} != "" ]] ; then
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- install_print_first_or_always
-
+ echo
echo -e "${c_highlight}Installing (${c_notice}static${c_highlight}) Libraries to: ${c_reset}${c_notice}${destination_libraries_static}${c_reset}${c_highlight}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- install_print_first
-
echo -e "${c_error}ERROR: Failed to copy (${c_notice}static${c_error}) library files from ${c_notice}${path_build}${path_libraries}${path_static}${c_error} to ${c_notice}${destination_libraries_static}${c_error}.${c_reset}"
fi
if [[ ${file} != "" ]] ; then
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- install_print_first_or_always
-
+ echo
echo -e "${c_highlight}Installing (${c_notice}shared${c_highlight}) Libraries to: ${c_reset}${c_notice}${destination_libraries_shared}${c_reset}${c_highlight}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- install_print_first
-
echo -e "${c_error}ERROR: Failed to copy (${c_notice}shared${c_error}) library files from ${c_notice}${path_build}${path_libraries}${path_shared}${c_error} to ${c_notice}${destination_libraries_shared}${c_error}.${c_reset}"
fi
if [[ ${file} != "" && ${enable_static_programs} == "yes" ]] ; then
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- install_print_first_or_always
-
+ echo
echo -e "${c_highlight}Installing (${c_notice}static${c_highlight}) Programs to: ${c_reset}${c_notice}${destination_programs_static}${c_reset}${c_highlight}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- install_print_first
-
echo -e "${c_error}ERROR: failed to copy (${c_notice}static${c_error}) program files from ${c_notice}${path_build}${path_programs}${path_static}${c_error} to ${c_notice}${destination_programs_static}${c_error}.${c_reset}"
fi
if [[ ${file} != "" ]] ; then
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- install_print_first_or_always
-
+ echo
echo -e "${c_highlight}Installing (${c_notice}shared${c_highlight}) Programs to: ${c_reset}${c_notice}${destination_programs_shared}${c_reset}${c_highlight}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- install_print_first
-
echo -e "${c_error}ERROR: failed to copy (${c_notice}shared${c_error}) program files from ${c_notice}${path_build}${path_programs}${path_shared}${c_error} to ${c_notice}${destination_programs_shared}${c_error}.${c_reset}"
fi
if [[ ${file} != "" ]] ; then
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- install_print_first_or_always
-
+ echo
echo -e "${c_highlight}Installing Settings to: ${c_reset}${c_notice}${destination_settings}${c_reset}${c_highlight}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- install_print_first
-
echo -e "${c_error}ERROR: failed to copy settings files from ${c_notice}${path_build}${path_settings}${c_error} to ${c_notice}${destination_settings}${c_error}.${c_reset}"
fi
if [[ ${file} != "" ]] ; then
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- install_print_first_or_always
-
+ echo
echo -e "${c_highlight}Installing Documentation to: ${c_reset}${c_notice}${destination_documentation}${c_reset}${c_highlight}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- install_print_first
-
echo -e "${c_error}ERROR: failed to copy documentation files from ${c_notice}${path_build}${path_documentation}${c_error} to ${c_notice}${destination_documentation}${c_error}.${c_reset}"
fi
return 0
}
-install_print_first() {
-
- if [[ ${print_line_first} == "yes" ]] ; then
- echo
-
- print_line_first=
- fi
-}
-
-install_print_first_or_always() {
-
- if [[ ${print_line_first} == "yes" ]] ; then
- echo
-
- print_line_first=
- elif [[ ${print_line_first} == "no" ]] ; then
- print_line_first=
- else
- echo
- fi
-}
-
-install_print_last() {
-
- if [[ ${print_line_last} == "yes" ]] ; then
- echo
- fi
-}
-
install_cleanup() {
unset install_copyright
unset install_handle_colors
unset install_help
unset install_perform_install
- unset install_print_first
- unset install_print_first_or_always
- unset install_print_last
unset install_cleanup
}
local path_destination=package/
local path_sources=./
local prepend=
- local print_line_first="yes"
- local print_line_last="yes"
local verbosity=normal
local verbose=
local verbose_common=
verbosity="debug"
verbose="+D"
verbose_common="-v"
- elif [[ ${p} == "+F" || ${p} == "++line_first_no" ]] ; then
- print_line_first="no"
- elif [[ ${p} == "+L" || ${p} == "++line_last_no" ]] ; then
- print_line_last="no"
elif [[ ${p} == "+v" || ${p} == "++version" ]] ; then
echo $version
return 0
p=
fi
- if [[ ${verbosity} == "quiet" ]] ; then
- print_line_first="no"
- print_line_last="no"
- fi
-
package_handle_colors
if [[ ${do_help} == "yes" ]] ; then
if [[ ${operation_failure} == "fail-multiple" ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Only one operation may be specified at a time.${c_reset}"
-
- package_print_last
fi
package_cleanup
if [[ ! -f build/stand_alone/${i}.settings ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Unknown or unsupported stand alone program '${c_notice}${i}${c_error}'.${c_reset}"
-
- package_print_last
fi
package_cleanup
if [[ ${operation} == "build" || ${operation} == "rebuild" ]] ; then
if [[ ! -d ${path_build} ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Build directory '${c_notice}${path_build}${c_error}' is invalid or missing.${c_reset}"
-
- package_print_last
fi
package_cleanup
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Package directory '${c_notice}${path_destination}${c_error}' is invalid or could not be created.${c_reset}"
-
- package_print_last
fi
package_cleanup
if [[ ! -d ${path_sources} ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Sources directory '${c_notice}${path_sources}${c_error}' is invalid or missing.${c_reset}"
-
- package_print_last
fi
package_cleanup
if [[ ! -d ${path_sources}level_0/ ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Build sources directory '${c_notice}${path_sources}level_0/${c_error}' is invalid or missing.${c_reset}"
-
- package_print_last
fi
package_cleanup
if [[ ! -d ${path_sources}level_1/ ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Build sources directory '${c_notice}${path_sources}level_1/${c_error}' is invalid or missing.${c_reset}"
-
- package_print_last
fi
package_cleanup
if [[ ! -d ${path_sources}level_2/ ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Build sources directory '${c_notice}${path_sources}level_2/${c_error}' is invalid or missing.${c_reset}"
-
- package_print_last
fi
package_cleanup
if [[ ! -d ${path_sources}level_3/ ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Build sources directory '${c_notice}${path_sources}level_3/${c_error}' is invalid or missing.${c_reset}"
-
- package_print_last
fi
package_cleanup
elif [[ ${operation} == "dependencies" ]] ; then
if [[ ! -d ${path_sources} ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Sources directory '${c_notice}${path_sources}${c_error}' is invalid or missing.${c_reset}"
-
- package_print_last
fi
package_cleanup
elif [[ ${operation} == "clean" ]] ; then
if [[ ! -d ${path_destination} ]] ; then
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- package_print_first
-
echo -e "${c_warning}WARNING: Package directory '${c_notice}${path_destination}${c_error}' does not exist, there is nothing to clean.${c_reset}"
-
- package_print_last
fi
package_cleanup
package_operation_clean
elif [[ ${operation} == "" ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: No operation was given.${c_reset}"
-
- package_print_last
fi
package_cleanup
return 1
else
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: The operation ${c_notice}${operation}${c_error} was not recognized.${c_reset}"
-
- package_print_last
fi
package_cleanup
return 1
fi
- if [[ ${verbosity} != "quiet" ]] ; then
- if [[ ${failure} -eq 1 || ${verbosity} != "error" ]] ; then
- package_print_last
- fi
- fi
-
package_cleanup
if [[ ${failure} -eq 1 ]] ; then
package_help() {
- package_print_first
-
echo -e "${c_title}${public_name}${c_reset}"
echo -e " ${c_notice}Version ${version}${c_reset}"
echo
echo -e " ${c_important}rebuild${c_reset} Delete all built packages then build the package."
echo
echo -e "${c_highlight}Options:${c_reset}"
- echo -e " -${c_important}h${c_reset}, --${c_important}help${c_reset} Print this help message."
- echo -e " +${c_important}C${c_reset}, ++${c_important}copyright${c_reset} Print the copyright."
- echo -e " +${c_important}d${c_reset}, ++${c_important}dark${c_reset} Output using colors that show up better on dark backgrounds."
- echo -e " +${c_important}l${c_reset}, ++${c_important}light${c_reset} Output using colors that show up better on light backgrounds."
- echo -e " +${c_important}n${c_reset}, ++${c_important}no_color${c_reset} Do not print using color."
- echo -e " +${c_important}Q${c_reset}, ++${c_important}quiet${c_reset} Decrease verbosity, silencing most print.to."
- echo -e " +${c_important}E${c_reset}, ++${c_important}error${c_reset} Decrease verbosity, using only error print.to."
- echo -e " +${c_important}N${c_reset}, ++${c_important}normal${c_reset} Set verbosity to normal."
- echo -e " +${c_important}V${c_reset}, ++${c_important}verbose${c_reset} Increase verbosity beyond normal print.to."
- echo -e " +${c_important}D${c_reset}, ++${c_important}debug${c_reset} Enable debugging, significantly increasing verbosity beyond normal print.to."
- echo -e " +${c_important}v${c_reset}, ++${c_important}version${c_reset} Print only the version number."
- echo -e " +${c_important}F${c_reset}, ++${c_important}line_first_no${c_reset} Disable printing of first line."
- echo -e " +${c_important}L${c_reset}, ++${c_important}line_last_no${c_reset} Disable printing of last line."
+ echo -e " -${c_important}h${c_reset}, --${c_important}help${c_reset} Print this help message."
+ echo -e " +${c_important}C${c_reset}, ++${c_important}copyright${c_reset} Print the copyright."
+ echo -e " +${c_important}d${c_reset}, ++${c_important}dark${c_reset} Output using colors that show up better on dark backgrounds."
+ echo -e " +${c_important}l${c_reset}, ++${c_important}light${c_reset} Output using colors that show up better on light backgrounds."
+ echo -e " +${c_important}n${c_reset}, ++${c_important}no_color${c_reset} Do not print using color."
+ echo -e " +${c_important}Q${c_reset}, ++${c_important}quiet${c_reset} Decrease verbosity, silencing most print.to."
+ echo -e " +${c_important}E${c_reset}, ++${c_important}error${c_reset} Decrease verbosity, using only error print.to."
+ echo -e " +${c_important}N${c_reset}, ++${c_important}normal${c_reset} Set verbosity to normal."
+ echo -e " +${c_important}V${c_reset}, ++${c_important}verbose${c_reset} Increase verbosity beyond normal print.to."
+ echo -e " +${c_important}D${c_reset}, ++${c_important}debug${c_reset} Enable debugging, significantly increasing verbosity beyond normal print.to."
+ echo -e " +${c_important}v${c_reset}, ++${c_important}version${c_reset} Print only the version number."
echo
echo -e "${c_highlight}Package Options:${c_reset}"
echo -e " -${c_important}d${c_reset}, --${c_important}destination${c_reset} Specify a custom package destination directory."
echo -e " -${c_important}p${c_reset}, --${c_important}program${c_reset} Build program packages (level 3)."
echo -e " -${c_important}s${c_reset}, --${c_important}sources${c_reset} Specify a custom sources directory."
echo -e " -${c_important}S${c_reset}, --${c_important}stand_alone${c_reset} Build a specified program package as stand alone."
- echo
}
package_copyright() {
- package_print_first
-
echo "Copyright © 2007-2024 Kevin Day."
echo
echo "Source code license lgpl-2.1-or-later."
echo "Standard and specification license open-standard-license-1.0-or-later."
echo "Documentation license cc-by-sa-4.0."
-
- package_print_last
}
package_create_base_files() {
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to create directory ${c_notice}${package}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to copy directory ${c_notice}${path_build}documents${c_error} to ${c_notice}${package}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to copy directory ${c_notice}${path_build}licenses${c_error} to ${c_notice}${package}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to copy directory ${c_notice}${path_build}../licenses${c_error} to ${c_notice}${package}${c_error}.${c_reset}"
fi
fi
else
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Neither directory ${c_notice}${path_build}licenses${c_error} nor ${c_notice}${path_build}../licenses${c_error} can be found or are invalid.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to copy script ${c_notice}${path_build}bootstrap.sh${c_error} to ${c_notice}${package}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to set executable permissions on script ${c_notice}${package}bootstrap.sh${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to copy script ${c_notice}${path_build}install.sh${c_error} to ${c_notice}${package}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to set executable permissions on script ${c_notice}${package}install.sh${c_error}.${c_reset}"
fi
level_current="$(echo ${directory} | grep -o '\<level_[[:digit:]]/' | sed -e 's|level_||' -e 's|/$||')"
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- package_print_first_or_always
-
+ echo
echo -e "${c_highlight}Building Dependencies for ${c_reset}${c_notice}${name}${c_reset}${c_highlight}.${c_reset}"
fi
if [[ ! -d ${directory}/data/build/ ]] ; then
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- package_print_first
-
echo -e "${c_warning}WARNING: The project build directory ${c_notice}${dependency_file}${c_warning} is not found.${c_reset}"
fi
if [[ $dependency_files == "yes" && "${directory}/data/build/dependencies" != ${dependency_file} ]] ; then
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- package_print_first
-
echo -e "${c_warning}WARNING: The dependency file ${c_notice}${dependency_file}${c_warning} is not found.${c_reset}"
fi
elif [[ $dependency_files == "no" && "${directory}/data/build/dependencies.*" != ${dependency_file} ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Cannot build dependencies, failed to find ${c_notice}${dependency_file}${c_error} file(s).${c_reset}"
fi
fi
if [[ ! -f ${directory}/data/build/settings${dependency_suffix} ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Cannot build dependencies for ${c_reset}${c_notice}${name}${c_reset}${c_error}, failed to find ${c_notice}${directory}/data/build/settings${dependency_suffix}${c_error}.${c_reset}"
fi
level=level_2
else
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- package_print_first
-
echo -e "${c_warning}WARNING: Failed to detect level for dependency ${c_notice}${dependency}${c_warning}.${c_reset}"
fi
if [[ ! -d ${path_sources}${level}/${dependency}/data/build/ ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to find dependency data directory ${c_notice}${path_sources}${level}/${dependency}/data/build/${c_error}.${c_reset}"
fi
sub_level=level_1
else
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- package_print_first
-
echo -e "${c_warning}WARNING: Failed to detect level for sub-dependency ${c_notice}${sub_dependency}${c_warning}.${c_reset}"
fi
if [[ ! -d ${path_sources}${sub_level}/${sub_dependency}/data/build/ ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to find dependency data directory ${c_notice}${path_sources}${sub_level}/${sub_dependency}/data/build/${c_error}.${c_reset}"
fi
sub_sub_level=level_0
else
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- package_print_first
-
echo -e "${c_warning}WARNING: Failed to detect level for sub-sub-dependency ${c_notice}${sub_sub_dependency}${c_warning}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to update settings file ${c_notice}${settings}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to update settings file ${c_notice}${settings}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to update settings file ${c_notice}${settings}${c_error}.${c_reset}"
fi
settings=${path_sources}${level}/${dependency}/data/build/settings
if [[ ! -f ${settings} ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to find dependency settings file ${c_notice}${settings}${c_error}.${c_reset}"
fi
local monolithic_headers_threaded=
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- package_print_first_or_always
-
+ echo
echo -e "${c_highlight}Building Dependencies: ${c_notice}${level}${c_highlight}.${c_reset}"
fi
settings=${directory}/data/build/settings
if [[ ! -f ${settings} ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to find settings file ${c_notice}${settings}${c_error}.${c_reset}"
fi
if [[ ! -f ${settings} ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to find settings file ${c_notice}${settings}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to update libraries for settings file ${c_notice}${settings}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to update libraries for settings file ${c_notice}${settings}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to update headers for settings file ${c_notice}${settings}${c_error}.${c_reset}"
fi
local monolithic_headers_threaded=""
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- package_print_first_or_always
-
+ echo
echo -e "${c_highlight}Building Dependencies: ${c_notice}monolithic${c_highlight}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to update libraries for settings file ${c_notice}${settings}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to update headers for settings file ${c_notice}${settings}${c_error}.${c_reset}"
fi
local i=
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- package_print_first_or_always
-
+ echo
echo -e "${c_highlight}Cleaning Package Directory '${c_reset}${c_notice}${path_destination}${c_reset}${c_highlight}'.${c_reset}"
fi
fi
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- package_print_first_or_always
-
+ echo
echo "Cleaned '${path_destination}individual'."
fi
fi
fi
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- package_print_first_or_always
-
+ echo
echo "Cleaned '${path_destination}level'."
fi
fi
fi
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- package_print_first_or_always
-
+ echo
echo "Cleaned '${path_destination}monolithic'."
fi
fi
fi
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- package_print_first_or_always
-
+ echo
echo "Cleaned '${path_destination}program'."
fi
fi
fi
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- package_print_first_or_always
-
+ echo
echo "Cleaned '${path_destination}stand_alone/${prepend}${i}-${version}/'."
fi
done
rmdir ${verbose_common} --ignore-fail-on-non-empty ${path_destination}stand_alone
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- package_print_first_or_always
-
+ echo
echo "Cleaned '${path_destination}stand_alone'."
fi
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to copy the data directory ${c_notice}${package}sources/data${c_error} to ${c_notice}${package}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to remove directory ${c_notice}${package}sources/data${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to move sources documents directory ${c_notice}${path_sources}sources/documents${c_error} to ${c_notice}${package}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to remove sources documents directory ${c_notice}${path_sources}sources/documents${c_error} to ${c_notice}${package}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to move sources licenses directory ${c_notice}${path_sources}sources/licenses${c_error} to ${c_notice}${package}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to remove sources licenses directory ${c_notice}${path_sources}sources/licenses${c_error} to ${c_notice}${package}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to move sources specifications directory ${c_notice}${path_sources}sources/specifications${c_error} to ${c_notice}${package}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to remove sources specifications directory ${c_notice}${path_sources}sources/specifications${c_error} to ${c_notice}${package}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to move sources tests directory ${c_notice}${path_sources}sources/tests${c_error} to ${c_notice}${package}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to remove sources tests directory ${c_notice}${path_sources}sources/tests${c_error} to ${c_notice}${package}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to insert the config.c into ${c_notice}${package}data/build/settings${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to insert the config.c into ${c_notice}${package}data/build/settings${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to create the config.c at ${c_notice}${package}sources/c/config.c${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to insert the config.cpp into ${c_notice}${package}data/build/settings${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to insert the config.cpp into ${c_notice}${package}data/build/settings${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to create the config.cpp at ${c_notice}${package}sources/c++/config.cpp${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to create the config.cpp at ${c_notice}${package}sources/c/config.h${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to create the config.cpp at ${c_notice}${package}sources/c++/config.h${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to create directory ${c_notice}${path_destination}individual${c_error}.${c_reset}"
fi
package="${path_destination}individual/${prepend}${name}-${version}/"
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- package_print_first_or_always
-
+ echo
echo -e "${c_highlight}Packaging Project${c_reset} (individual) ${c_notice}${prepend}${name}-${version}${c_reset}${c_highlight}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to copy sources directory ${c_notice}${directory}${c_error} to ${c_notice}${package}sources${c_error}.${c_reset}"
fi
package="${path_destination}level/${prepend}${name}-${version}/"
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- package_print_first_or_always
-
+ echo
echo -e "${c_highlight}Packaging Project${c_reset} (level) ${c_notice}${prepend}${name}-${version}${c_reset}${c_highlight}.${c_reset}"
fi
if [[ ! -d ${path_build}${level} ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Build settings directory ${c_notice}${path_build}${level}${c_error} is invalid or missing.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to create directory ${c_notice}${package}data${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to move the directory ${c_notice}${path_build}${level}${c_error} as ${c_notice}${path_build}${level}build${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to create directory ${c_notice}${package}sources${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to copy files from sources directory ${c_notice}${directory}${c_error} to ${c_notice}${package}sources${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to remove directory ${c_notice}${package}sources/data/build${c_error}.${c_reset}"
fi
package="${path_destination}monolithic/${prepend}${name}-${version}/"
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- package_print_first_or_always
-
+ echo
echo -e "${c_highlight}Packaging Project${c_reset} (monolithic) ${c_notice}${prepend}${name}-${version}${c_reset}${c_highlight}.${c_reset}"
fi
if [[ ! -d ${path_build}monolithic ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Build settings directory ${c_notice}${path_build}monolithic${c_error} is invalid or missing.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to create directory ${c_notice}${package}data${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to move the directory ${c_notice}${path_build}${level}${c_error} as ${c_notice}${path_build}${level}build${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to create directory ${c_notice}${package}sources${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to create directory ${c_notice}${package}tests${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to create package data directory ${c_notice}${package}data/${level}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to copy files from data directory ${c_notice}${directory_sub}${c_error} to ${c_notice}${package}sources/data${level}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to remove directory ${c_notice}${package}sources/data/build${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to copy the data directory ${c_notice}${package}sources/data/${level}/data${c_error} to ${c_notice}${package}data/${level}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to remove directory ${c_notice}${package}sources/data${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to copy directory ${c_notice}${package}data/${level}/documentation${c_error} into ${c_notice}${package}data${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to remove directory ${c_notice}${package}data/${level}/documentation${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to copy files from data directory ${c_notice}${directory_sub}${c_error} to ${c_notice}${package}sources/documents${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to copy files from data directory ${c_notice}${directory_sub}${c_error} to ${c_notice}${package}sources/licenses${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to copy files from data directory ${c_notice}${directory_sub}${c_error} to ${c_notice}${package}sources/specifications${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to copy files from data directory ${c_notice}${directory_sub}${c_error} to ${c_notice}${package}tests${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to create package sources directory ${c_notice}${package}sources/${path_name}/${level}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to copy files from sources directory ${c_notice}${directory_sub}${c_error} to ${c_notice}${package}sources/${path_name}/${level}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to create directory ${c_notice}${path_destination}program${c_error}.${c_reset}"
fi
package="${path_destination}program/${prepend}${name}-${version}/"
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- package_print_first_or_always
-
+ echo
echo -e "${c_highlight}Packaging Project${c_reset} (program) ${c_notice}${prepend}${name}-${version}${c_reset}${c_highlight}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to copy sources directory ${c_notice}${directory}${c_error} to ${c_notice}${package}sources${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to create directory ${c_notice}${path_destination}stand_alone${c_error}.${c_reset}"
fi
package="${path_destination}stand_alone/${prepend}${name}-${version}/"
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- package_print_first_or_always
-
+ echo
echo -e "${c_highlight}Packaging Project${c_reset} (stand_alone) ${c_notice}${prepend}${name}-${version}${c_reset}${c_highlight}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to copy sources directory ${c_notice}${directory}${c_error} to ${c_notice}${package}sources${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to copy file ${c_notice}${path_build}stand_alone/${name}.settings${c_error} to ${c_notice}${package}data/build/settings${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to copy file ${c_notice}${path_build}stand_alone/${name}.fakefile${c_error} to ${c_notice}${package}data/build/fakefile${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to create package sources directory ${c_notice}${package}sources/c/program/${name}/${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to create package sources directory ${c_notice}${package}sources/${path_name}/program/${name}/${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to move path ${c_notice}${path_sub}${c_error} to ${c_notice}${package}sources/${path_name}/program/${name}/${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to copy file ${c_notice}${path_build}stand_alone/config.h${c_error} to ${c_notice}${package}sources/c/${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to create package sources directory ${c_notice}${package}sources/${path_name}/fll/${level}/${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- package_print_first
-
echo -e "${c_error}ERROR: Failed to copy files from sources directory ${c_notice}${directory_level}${path_name}/${c_error} to ${c_notice}${package}sources/${path_name}/fll/${level}/${c_error}.${c_reset}"
fi
return 0
}
-package_print_first() {
-
- if [[ ${print_line_first} == "yes" ]] ; then
- echo
-
- print_line_first=
- fi
-}
-
-package_print_first_or_always() {
-
- if [[ ${print_line_first} == "yes" ]] ; then
- echo
-
- print_line_first=
- elif [[ ${print_line_first} == "no" ]] ; then
- print_line_first=
- else
- echo
- fi
-}
-
-package_print_last() {
-
- if [[ ${print_line_last} == "yes" ]] ; then
- echo
- fi
-}
-
package_cleanup() {
unset package_copyright
unset package_operation_monolithic
unset package_operation_program
unset package_operation_stand_alone
- unset package_print_first
- unset package_print_first_or_always
- unset package_print_last
unset package_cleanup
}
local path_test_package_stand_alone=${path_test_package}stand_alone/
local path_test_project=${path_test}project/
local path_test_work=${path_test}work/
- local print_line_first="yes"
- local print_line_last="yes"
local test_system=
local test_thread="thread"
local test_thread_individual="individual_thread"
verbosity="debug"
verbose="+D"
verbose_common="-v"
- elif [[ ${p} == "+F" || ${p} == "++line_first_no" ]] ; then
- print_line_first="no"
- elif [[ ${p} == "+L" || ${p} == "++line_last_no" ]] ; then
- print_line_last="no"
elif [[ ${p} == "+v" || ${p} == "++version" ]] ; then
echo ${version}
return 0
p=
fi
- if [[ ${verbosity} == "quiet" ]] ; then
- print_line_first="no"
- print_line_last="no"
- fi
-
test_handle_colors
if [[ ${do_help} == "yes" ]] ; then
if [[ ${operation_failure} == "fail-too_many" ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- test_print_first
-
echo -e "${c_error}ERROR: Only a single build system is supported, received the following test systems ${c_notice}${test_system} ${operation}${c_error} was not recognized.${c_reset}"
fi
if [[ ${failure} -eq 0 && ${test_system} != "normal" && ${test_system} != "github" && ${test_system} != "gitlab" ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- test_print_first
-
echo -e "${c_error}ERROR: The test system must be one of ${c_notice}normal${c_error}, ${c_notice}github${c_error}, or ${c_notice}gitlab${c_error}.${c_reset}"
fi
if [[ ${failure} -eq 0 && ${build_compiler} != "gcc" && ${build_compiler} != "clang" ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- test_print_first
-
echo -e "${c_error}ERROR: The build compiler ${c_notice}${build_compiler}${c_error} is not currently directly supported.${c_reset}"
fi
if [[ ${failure} -eq 0 && ! -d ${path_scripts} ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- test_print_first
-
echo -e "${c_error}ERROR: The build scripts path ${c_notice}${path_scripts}${c_error} is not a valid directory.${c_reset}"
fi
if [[ ${failure} -eq 0 && ! -f ${path_scripts_package} ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- test_print_first
-
echo -e "${c_error}ERROR: Unable to find the package build script file under the build scripts path at ${c_notice}${path_scripts_package}${c_error}.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- test_print_first
-
echo -e "${c_error}ERROR: The test path ${c_notice}${path_test}${c_error}, does not exist and could not be created or exists and is not a valid directory.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- test_print_first
-
echo -e "${c_error}ERROR: The package path ${c_notice}${path_test_package}${c_error}, does not exist and could not be created or exists and is not a valid directory.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- test_print_first
-
echo -e "${c_error}ERROR: The test project path ${c_notice}${path_test_project}${c_error}, does not exist and could not be created or exists and is not a valid directory.${c_reset}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- test_print_first
-
echo -e "${c_error}ERROR: The test work path ${c_notice}${path_test_work}${c_error}, does not exist and could not be created or exists and is not a valid directory.${c_reset}"
fi
if [[ ${failure} -eq 0 ]] ; then
test_operate
- let failure=$?
- fi
- if [[ ${verbosity} != "quiet" ]] ; then
- if [[ ${failure} -eq 1 || ${verbosity} != "error" ]] ; then
- test_print_last
- fi
+ let failure=$?
fi
test_cleanup
test_help() {
- test_print_first
-
echo -e "${c_title}${public_name}${c_reset}"
echo -e " ${c_notice}Version ${version}${c_reset}"
echo
echo -e " ${c_important}gitlab${c_reset} Perform a test meant to be used within Gitlab (not yet supported)."
echo
echo -e "${c_highlight}Available Options:${c_reset}"
- echo -e " -${c_important}h${c_reset}, --${c_important}help${c_reset} Print this help message."
- echo -e " +${c_important}C${c_reset}, ++${c_important}copyright${c_reset} Print the copyright."
- echo -e " +${c_important}d${c_reset}, ++${c_important}dark${c_reset} Output using colors that show up better on dark backgrounds."
- echo -e " +${c_important}l${c_reset}, ++${c_important}light${c_reset} Output using colors that show up better on light backgrounds."
- echo -e " +${c_important}n${c_reset}, ++${c_important}no_color${c_reset} Do not print using color."
- echo -e " +${c_important}Q${c_reset}, ++${c_important}quiet${c_reset} Decrease verbosity, silencing most print.to."
- echo -e " +${c_important}E${c_reset}, ++${c_important}error${c_reset} Decrease verbosity, using only error print.to."
- echo -e " +${c_important}N${c_reset}, ++${c_important}normal${c_reset} Set verbosity to normal."
- echo -e " +${c_important}V${c_reset}, ++${c_important}verbose${c_reset} Increase verbosity beyond normal print.to."
- echo -e " +${c_important}D${c_reset}, ++${c_important}debug${c_reset} Enable debugging, significantly increasing verbosity beyond normal print.to."
- echo -e " +${c_important}v${c_reset}, ++${c_important}version${c_reset} Print only the version number."
- echo -e " +${c_important}F${c_reset}, ++${c_important}line_first_no${c_reset} Disable printing of first line."
- echo -e " +${c_important}L${c_reset}, ++${c_important}line_last_no${c_reset} Disable printing of last line."
+ echo -e " -${c_important}h${c_reset}, --${c_important}help${c_reset} Print this help message."
+ echo -e " +${c_important}C${c_reset}, ++${c_important}copyright${c_reset} Print the copyright."
+ echo -e " +${c_important}d${c_reset}, ++${c_important}dark${c_reset} Output using colors that show up better on dark backgrounds."
+ echo -e " +${c_important}l${c_reset}, ++${c_important}light${c_reset} Output using colors that show up better on light backgrounds."
+ echo -e " +${c_important}n${c_reset}, ++${c_important}no_color${c_reset} Do not print using color."
+ echo -e " +${c_important}Q${c_reset}, ++${c_important}quiet${c_reset} Decrease verbosity, silencing most print.to."
+ echo -e " +${c_important}E${c_reset}, ++${c_important}error${c_reset} Decrease verbosity, using only error print.to."
+ echo -e " +${c_important}N${c_reset}, ++${c_important}normal${c_reset} Set verbosity to normal."
+ echo -e " +${c_important}V${c_reset}, ++${c_important}verbose${c_reset} Increase verbosity beyond normal print.to."
+ echo -e " +${c_important}D${c_reset}, ++${c_important}debug${c_reset} Enable debugging, significantly increasing verbosity beyond normal print.to."
+ echo -e " +${c_important}v${c_reset}, ++${c_important}version${c_reset} Print only the version number."
echo
echo -e " -${c_important}a${c_reset}, --${c_important}analyze${c_reset} Perform analyzation on during tests (using fanalyzer mode)."
echo -e " -${c_important}c${c_reset}, --${c_important}compiler${c_reset} Specify the compiler, either gcc (default) or clang."
echo -e " -${c_important}t${c_reset}, --${c_important}path_test${c_reset} Specify a custom directory where the test environment is found."
echo -e " -${c_important}T${c_reset}, --${c_important}thread${c_reset} Compile code being tested with threads enabled."
echo -e " -${c_important}L${c_reset}, --${c_important}threadless${c_reset} Compile code being tested with threads disabled."
-
- test_print_last
}
test_copyright() {
- test_print_first
-
echo "Copyright © 2007-2024 Kevin Day."
echo
echo "Source code license lgpl-2.1-or-later."
echo "Standard and specification license open-standard-license-1.0-or-later."
echo "Documentation license cc-by-sa-4.0."
-
- test_print_last
}
test_operate() {
local path_original="${PWD}/"
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- test_print_first_or_always
-
+ echo
echo -e "${c_highlight}Cleaning and building individual package.${c_reset}"
echo -e "${c_title}-----------------------------------------${c_reset}"
echo
fi
if [[ ${verbosity} == "debug" ]] ; then
- test_print_first_or_always
-
- echo "${shell_command} ${path_scripts_package} ${verbose} ${context} +F -d ${path_test_package} -i rebuild"
+ echo "${shell_command} ${path_scripts_package} ${verbose} ${context} -d ${path_test_package} -i rebuild"
fi
- ${shell_command} ${path_scripts_package} ${verbose} ${context} +F -d ${path_test_package} -i rebuild
+ ${shell_command} ${path_scripts_package} ${verbose} ${context} -d ${path_test_package} -i rebuild
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- test_print_first
-
echo -e "${c_error}ERROR: Failed to clean and build the individual packages.${c_reset}"
fi
local path_original="${PWD}/"
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- test_print_first_or_always
-
+ echo
echo -e "${c_highlight}Cleaning and building program packages.${c_reset}"
echo -e "${c_title}---------------------------------------${c_reset}"
echo
fi
if [[ ${verbosity} == "debug" ]] ; then
- test_print_first_or_always
-
- echo "${shell_command} ${path_scripts_package} ${verbose} ${context} +F -d ${path_test_package} -p rebuild"
+ echo "${shell_command} ${path_scripts_package} ${verbose} ${context} -d ${path_test_package} -p rebuild"
fi
- ${shell_command} ${path_scripts_package} ${verbose} ${context} +F -d ${path_test_package} -p rebuild
+ ${shell_command} ${path_scripts_package} ${verbose} ${context} -d ${path_test_package} -p rebuild
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- test_print_first
-
echo -e "${c_error}ERROR: Failed to clean and build the program packages.${c_reset}"
fi
if [[ ! -d ${path_}${project}-${version}/ ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- test_print_first
-
echo -e "${c_error}ERROR: Package directory '${c_notice}${path_}${project}-${version}${c_error}' is invalid or missing.${c_reset}"
fi
fi
if [[ ${verbosity} == "debug" ]] ; then
- test_print_first_or_always
-
echo -e "Running '${c_notice}cd ${path_}${project}-${version}/${c_reset}'."
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- test_print_first
-
echo -e "${c_error}ERROR: Failed to change into directory '${c_notice}${path_}${project}-${version}${c_error}'.${c_reset}"
fi
if [[ ${bootstrap} == "" ]] ; then
if [[ ${verbosity} == "debug" ]] ; then
- test_print_first_or_always
-
if [[ ${build_compiler} == "gcc" ]] ; then
echo "PATH=\"${env_path}\" LD_LIBRARY_PATH=\"${env_libs}\" fake ${verbose} ${context} -w \"${destination}\" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} -m test ${analyze_flag} ${analyze_value} clean build ${ci_arguments}"
else
else
if [[ ${SHELL_ENGINE} == "zsh" ]] ; then
if [[ ${verbosity} == "debug" ]] ; then
- test_print_first_or_always
-
if [[ ${build_compiler} == "gcc" ]] ; then
- echo "zsh ./bootstrap.sh ${verbose} ${context} +F -w \"${destination}\" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} -m test ${analyze_flag} ${analyze_value} build"
+ echo "zsh ./bootstrap.sh ${verbose} ${context} -w \"${destination}\" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} -m test ${analyze_flag} ${analyze_value} build"
else
- echo "zsh ./bootstrap.sh ${verbose} ${context} +F -w \"${destination}\" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} -m test ${analyze_flag} ${analyze_value} -m ${build_compiler} build"
+ echo "zsh ./bootstrap.sh ${verbose} ${context} -w \"${destination}\" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} -m test ${analyze_flag} ${analyze_value} -m ${build_compiler} build"
fi
fi
if [[ ${build_compiler} == "gcc" ]] ; then
- zsh ./bootstrap.sh ${verbose} ${context} +F -w "${destination}" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} -m test ${analyze_flag} ${analyze_value} build
+ zsh ./bootstrap.sh ${verbose} ${context} -w "${destination}" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} -m test ${analyze_flag} ${analyze_value} build
else
- zsh ./bootstrap.sh ${verbose} ${context} +F -w "${destination}" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} -m test ${analyze_flag} ${analyze_value} -m ${build_compiler} build
+ zsh ./bootstrap.sh ${verbose} ${context} -w "${destination}" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} -m test ${analyze_flag} ${analyze_value} -m ${build_compiler} build
fi
else
if [[ ${verbosity} == "debug" ]] ; then
- test_print_first_or_always
-
if [[ ${build_compiler} == "gcc" ]] ; then
- echo "./bootstrap.sh ${verbose} ${context} +F -w \"${destination}\" -m ${mode} ${mode_thread_individual_param} ${mode_thread_individual_value} ${mode_thread_param} ${mode_thread_value} -m test ${analyze_flag} ${analyze_value} build"
+ echo "./bootstrap.sh ${verbose} ${context} -w \"${destination}\" -m ${mode} ${mode_thread_individual_param} ${mode_thread_individual_value} ${mode_thread_param} ${mode_thread_value} -m test ${analyze_flag} ${analyze_value} build"
else
- echo "./bootstrap.sh ${verbose} ${context} +F -w \"${destination}\" -m ${mode} ${mode_thread_individual_param} ${mode_thread_individual_value} ${mode_thread_param} ${mode_thread_value} -m test ${analyze_flag} ${analyze_value} -m ${build_compiler} build"
+ echo "./bootstrap.sh ${verbose} ${context} -w \"${destination}\" -m ${mode} ${mode_thread_individual_param} ${mode_thread_individual_value} ${mode_thread_param} ${mode_thread_value} -m test ${analyze_flag} ${analyze_value} -m ${build_compiler} build"
fi
fi
if [[ ${build_compiler} == "gcc" ]] ; then
- ./bootstrap.sh ${verbose} ${context} +F -w "${destination}" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} -m test ${analyze_flag} ${analyze_value} build
+ ./bootstrap.sh ${verbose} ${context} -w "${destination}" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} -m test ${analyze_flag} ${analyze_value} build
else
- ./bootstrap.sh ${verbose} ${context} +F -w "${destination}" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} -m test ${analyze_flag} ${analyze_value} -m ${build_compiler} build
+ ./bootstrap.sh ${verbose} ${context} -w "${destination}" -m ${mode} ${mode_thread_param} ${mode_thread_value} ${mode_thread_individual_param} ${mode_thread_individual_value} -m test ${analyze_flag} ${analyze_value} -m ${build_compiler} build
fi
fi
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- test_print_first
-
echo -e "${c_error}ERROR: Failed to build ${mode} project '${c_notice}${project}${c_reset}${c_error}'.${c_reset}"
fi
fi
if [[ ${SHELL_ENGINE} == "zsh" ]] ; then
- zsh ./install.sh ${verbose} ${context} +F +L -w "${destination}"
+ zsh ./install.sh ${verbose} ${context} -w "${destination}"
else
- ./install.sh ${verbose} ${context} +F +L -w "${destination}"
+ ./install.sh ${verbose} ${context} -w "${destination}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- test_print_first
-
echo -e "${c_error}ERROR: Failed to install ${mode} project '${c_notice}${project}${c_reset}${c_error}'.${c_reset}"
fi
local path_original="${PWD}/"
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- test_print_first_or_always
-
+ echo
echo -e "${c_highlight}Building project build tools.${c_reset}"
echo -e "${c_title}-----------------------------${c_reset}"
echo
fi
if [[ ${verbosity} == "debug" ]] ; then
- test_print_first_or_always
-
- echo "${shell_command} ${path_scripts_package} ${verbose} ${context} +F -d ${path_test_package} -S fake rebuild"
+ echo "${shell_command} ${path_scripts_package} ${verbose} ${context} -d ${path_test_package} -S fake rebuild"
fi
- ${shell_command} ${path_scripts_package} ${verbose} ${context} +F -d ${path_test_package} -S fake rebuild
+ ${shell_command} ${path_scripts_package} ${verbose} ${context} -d ${path_test_package} -S fake rebuild
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- test_print_first
-
echo -e "${c_error}ERROR: Failed to clean and build the stand_alone fake package.${c_reset}"
fi
fi
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- test_print_first_or_always
-
+ echo
echo -e "${c_highlight}Performing Github Specific Pre-Build Operations.${c_reset}"
echo -e "${c_title}------------------------------------------------${c_reset}"
echo
fi
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- test_print_first_or_always
-
+ echo
echo -e "${c_highlight}Performing Github Specific Pre-Test Operations.${c_reset}"
echo -e "${c_title}-----------------------------------------------${c_reset}"
echo
if [[ -d ${cmocka_path} ]] ; then
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- test_print_first_or_always
-
echo -e "Detected existing cmocka repository at \"${c_notice}${cmocka_path}${c_reset}\", skipping the cmocka process."
fi
fi
if [[ ${verbosity} == "debug" ]] ; then
- test_print_first_or_always
-
echo "git clone ${clone_quiet} --single-branch -b ${cmocka_branch} \"${cmocka_uri}\" ${cmocka_path}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- test_print_first
-
echo -e "${c_error}ERROR: Failed to git clone '${c_notice}${cmocka_uri}${c_error}' onto '${c_notice}${cmocka_path}${c_error}'.${c_reset}"
fi
fi
if [[ ${verbosity} == "debug" ]] ; then
- test_print_first_or_always
-
echo "mkdir ${verbose_common} -p ${cmocka_data}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- test_print_first
-
echo -e "${c_error}ERROR: Failed to create cmocka build data directory '${c_notice}${cmocka_data}${c_error}'.${c_reset}"
fi
fi
if [[ ${verbosity} == "debug" ]] ; then
- test_print_first_or_always
-
echo "cp ${verbose_common} ${cmocka_settings} ${cmocka_data}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- test_print_first
-
echo -e "${c_error}ERROR: Failed to copy cmocka build settings: '${c_notice}${cmocka_settings}${c_error}'.${c_reset}"
fi
fi
if [[ ${verbosity} == "debug" ]] ; then
- test_print_first_or_always
-
echo "cd ${cmocka_path}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- test_print_first
-
echo -e "${c_error}ERROR: Failed to change cmocka source directory '${c_notice}${cmocka_path}${c_error}'.${c_reset}"
fi
fi
if [[ ${verbosity} == "debug" ]] ; then
- test_print_first_or_always
-
echo "PATH=\"${env_path}\" LD_LIBRARY_PATH=\"${env_libs}\" fake ${verbose} ${context} -w \"${path_test_work}\" -m ${build_compiler} -m ${test_thread} clean build ${ci_arguments}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- test_print_first
-
echo -e "${c_error}ERROR: Failed to build '${c_notice}cmocka${c_error}'.${c_reset}"
fi
fi
if [[ ${verbosity} == "debug" ]] ; then
- test_print_first_or_always
-
echo "cp ${verbose_common} -R ${cmocka_build}includes/* ${work_path}includes/"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- test_print_first
-
echo -e "${c_error}ERROR: Failed to install cmocka headers to '${c_notice}${work_path}includes/${c_error}'.${c_reset}"
fi
fi
if [[ ${verbosity} == "debug" ]] ; then
- test_print_first_or_always
-
echo "cp ${verbose_common} -R ${cmocka_build}libraries/shared/* ${work_path}libraries/shared/"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- test_print_first
-
echo -e "${c_error}ERROR: Failed to install cmocka libraries to '${c_notice}${work_path}libraries/shared/${c_error}'.${c_reset}"
fi
if [[ -d ${libcap_path} ]] ; then
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- test_print_first_or_always
-
echo -e "Detected existing libcap repository at \"${c_notice}${libcap_path}${c_reset}\", skipping the libcap process."
fi
fi
if [[ ${verbosity} == "debug" ]] ; then
- test_print_first_or_always
-
echo "git clone ${clone_quiet} --single-branch -b ${libcap_branch} \"${libcap_uri}\" ${libcap_path}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- test_print_first
-
echo -e "${c_error}ERROR: Failed to git clone '${c_notice}${libcap_uri}${c_error}' onto '${c_notice}${libcap_path}${c_error}'.${c_reset}"
fi
fi
if [[ ${verbosity} == "debug" ]] ; then
- test_print_first_or_always
-
echo "cd ${libcap_path}"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- test_print_first
-
echo -e "${c_error}ERROR: Failed to change libcap source directory '${c_notice}${libcap_path}${c_error}'.${c_reset}"
-
- test_print_last
fi
let failure=1
fi
if [[ ${verbosity} == "debug" ]] ; then
- test_print_first_or_always
-
echo "make MANDIR=${work_path}fake/ SBINDIR=${work_path}fake/ INCDIR=${work_path}includes/ LIBDIR=${work_path}libraries/shared/ PKGCONFIGDIR=${work_path}fake/ install"
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- test_print_first
-
echo -e "${c_error}ERROR: Failed to build and install libcap into the work directory '${c_notice}${work_path}${c_error}'.${c_reset}"
-
- test_print_last
fi
let failure=1
if [[ ${failure} -eq 0 ]] ; then
if [[ ${verbosity} == "debug" ]] ; then
- test_print_first_or_always
-
echo -e "Running '${c_notice}cd ${destination}${c_reset}'."
fi
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- test_print_first
-
echo -e "${c_error}ERROR: Failed to change into directory '${c_notice}${destination}${c_error}'.${c_reset}"
-
- test_print_last
fi
let failure=1
local name=${2}
if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then
- test_print_first_or_always
-
+ echo
echo -e "${c_highlight}Testing ${what} ${name}.${c_reset}"
echo -e "${c_title}--------------------------------------${c_reset}"
echo
if [[ ! -d ${path_name}/ ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- test_print_first
-
echo -e "${c_error}ERROR: ${what} directory '${c_notice}${path_name}${c_error}' is invalid or missing.${c_reset}"
-
- test_print_last
fi
let failure=1
if [[ ! -f ${path_test_package_individual}${project}-${version}/data/build/testfile ]] ; then
if [[ $(echo ${projects_no_tests} | grep -o "\<${project}\>") == "" ]] ; then
if [[ ${verbosity} == "verbose" || ${verbosity} == "debug" ]] ; then
- test_print_first_or_always
-
echo -e "${c_warning}WARNING: Project '${c_notice}${project}${c_warning}' does not have a testfile.${c_reset}"
fi
else
- test_print_first_or_always
-
echo -e "Project '${c_notice}${project}${c_reset}' has no tests and is not expected to.${c_reset}"
fi
if [[ ${failure} -eq 0 ]] ; then
if [[ ! -f ${path_test_package_program}${program}-${version}/data/build/testfile ]] ; then
if [[ ${verbosity} == "verbose" || ${verbosity} == "debug" ]] ; then
- test_print_first_or_always
-
echo -e "${c_warning}WARNING: Program '${c_notice}${program}${c_warning}' does not have a testfile.${c_reset}"
fi
if [[ ${failure} -eq 0 ]] ; then
if [[ ${verbosity} == "debug" ]] ; then
- test_print_first_or_always
-
if [[ ${build_compiler} == "gcc" ]] ; then
echo "PATH=\"${env_path}\" LD_LIBRARY_PATH=\"${env_libs}\" fake ${verbose} ${context} -w \"${destination}\" -m individual -m ${test_thread} ${thread_individual_param} ${thread_individual_value} -m test ${analyze_flag} ${analyze_value} clean make -f testfile ${ci_arguments}"
else
if [[ ${?} -ne 0 ]] ; then
if [[ ${verbosity} != "quiet" ]] ; then
- test_print_first
-
echo -e "${c_error}ERROR: Failure while testing ${what} '${c_notice}${name}${c_reset}${c_error}'.${c_reset}"
-
- test_print_last
fi
let failure=1
fi
}
-test_print_first() {
-
- if [[ ${print_line_first} == "yes" ]] ; then
- echo
-
- print_line_first=
- fi
-}
-
-test_print_first_or_always() {
-
- if [[ ${print_line_first} == "yes" ]] ; then
- echo
-
- print_line_first=
- elif [[ ${print_line_first} == "no" ]] ; then
- print_line_first=
- else
- echo
- fi
-}
-
-test_print_last() {
-
- if [[ ${print_line_last} == "yes" ]] ; then
- echo
- fi
-}
-
test_cleanup() {
unset test_copyright
unset test_operate_tests_projects
unset test_operate_tests_programs
unset test_operate_tests_run
- unset test_print_first
- unset test_print_first_or_always
- unset test_print_last
unset test_cleanup
}
const f_string_static_t f_console_standard_short_light_s = macro_f_string_static_t_initialize_1(F_console_standard_short_light_s, 0, F_console_standard_short_light_s_length);
#endif // _di_f_console_standard_short_light_s_
- #ifndef _di_f_console_standard_short_line_first_no_s_
- const f_string_static_t f_console_standard_short_line_first_no_s = macro_f_string_static_t_initialize_1(F_console_standard_short_line_first_no_s, 0, F_console_standard_short_line_first_no_s_length);
- #endif // _di_f_console_standard_short_line_first_no_s_
-
- #ifndef _di_f_console_standard_short_line_last_no_s_
- const f_string_static_t f_console_standard_short_line_last_no_s = macro_f_string_static_t_initialize_1(F_console_standard_short_line_last_no_s, 0, F_console_standard_short_line_last_no_s_length);
- #endif // _di_f_console_standard_short_line_last_no_s_
-
#ifndef _di_f_console_standard_short_no_color_s_
const f_string_static_t f_console_standard_short_no_color_s = macro_f_string_static_t_initialize_1(F_console_standard_short_no_color_s, 0, F_console_standard_short_no_color_s_length);
#endif // _di_f_console_standard_short_no_color_s_
const f_string_static_t f_console_standard_long_light_s = macro_f_string_static_t_initialize_1(F_console_standard_long_light_s, 0, F_console_standard_long_light_s_length);
#endif // _di_f_console_standard_long_light_s_
- #ifndef _di_f_console_standard_long_line_first_no_s_
- const f_string_static_t f_console_standard_long_line_first_no_s = macro_f_string_static_t_initialize_1(F_console_standard_long_line_first_no_s, 0, F_console_standard_long_line_first_no_s_length);
- #endif // _di_f_console_standard_long_line_first_no_s_
-
- #ifndef _di_f_console_standard_long_line_last_no_s_
- const f_string_static_t f_console_standard_long_line_last_no_s = macro_f_string_static_t_initialize_1(F_console_standard_long_line_last_no_s, 0, F_console_standard_long_line_last_no_s_length);
- #endif // _di_f_console_standard_long_line_last_no_s_
-
#ifndef _di_f_console_standard_long_no_color_s_
const f_string_static_t f_console_standard_long_no_color_s = macro_f_string_static_t_initialize_1(F_console_standard_long_no_color_s, 0, F_console_standard_long_no_color_s_length);
#endif // _di_f_console_standard_long_no_color_s_
f_console_standard_parameter_verbosity_verbose_e,
f_console_standard_parameter_verbosity_debug_e,
f_console_standard_parameter_version_e,
- f_console_standard_parameter_line_first_no_e,
- f_console_standard_parameter_line_last_no_e,
f_console_standard_parameter_last_e,
}; // enum
- #define f_console_parameter_state_type_total_d 13
+ #define f_console_parameter_state_type_total_d 11
#endif // _di_f_console_standard_parameter_e_
/**
* - normal: Use normal printing (don't use debug/quiet/verbose).
* - quiet: Decrease verbosity, print less, in some use cases this could mean printing nothing.
* - verbose: Increase verbosity, print more, in some use cases this could mean printing just about everything.
- * - line_first_no: Don't print the first line if one is to be printed (useful in scripts) (may include error/warning messages).
- * - line_last_no: Don't print the last line if one is to be printed (useful in scripts) (may include error/warning messages).
*
* The following are less subjective in interpretation but do allow some flexibility.
* - dark: Do display color intended for dark backgrounds (often the default behavior) when printing to the console. Other contexts may be acceptable (such as voice inflections, or lack-thereof) for audio.)
* - To avoid problems with the status code after a program is forcibly killed, the status_out environment variable should be cleared at program start.
*/
#ifndef _di_f_console_standard_s_
- #define F_console_standard_short_copyright_s "C"
- #define F_console_standard_short_dark_s "d"
- #define F_console_standard_short_debug_s "D"
- #define F_console_standard_short_error_s "E"
- #define F_console_standard_short_help_s "h"
- #define F_console_standard_short_light_s "l"
- #define F_console_standard_short_line_first_no_s "F"
- #define F_console_standard_short_line_last_no_s "L"
- #define F_console_standard_short_no_color_s "n"
- #define F_console_standard_short_normal_s "N"
- #define F_console_standard_short_quiet_s "Q"
- #define F_console_standard_short_status_in_s "s"
- #define F_console_standard_short_status_out_s "S"
- #define F_console_standard_short_verbose_s "V"
- #define F_console_standard_short_version_s "v"
-
- #define F_console_standard_short_copyright_s_length 1
- #define F_console_standard_short_dark_s_length 1
- #define F_console_standard_short_debug_s_length 1
- #define F_console_standard_short_error_s_length 1
- #define F_console_standard_short_help_s_length 1
- #define F_console_standard_short_light_s_length 1
- #define F_console_standard_short_line_first_no_s_length 1
- #define F_console_standard_short_line_last_no_s_length 1
- #define F_console_standard_short_no_color_s_length 1
- #define F_console_standard_short_normal_s_length 1
- #define F_console_standard_short_quiet_s_length 1
- #define F_console_standard_short_status_in_s_length 1
- #define F_console_standard_short_status_out_s_length 1
- #define F_console_standard_short_verbose_s_length 1
- #define F_console_standard_short_version_s_length 1
-
- #define F_console_standard_long_copyright_s "copyright"
- #define F_console_standard_long_dark_s "dark"
- #define F_console_standard_long_debug_s "debug"
- #define F_console_standard_long_error_s "error"
- #define F_console_standard_long_help_s "help"
- #define F_console_standard_long_light_s "light"
- #define F_console_standard_long_line_first_no_s "line_first_no"
- #define F_console_standard_long_line_last_no_s "line_last_no"
- #define F_console_standard_long_no_color_s "no_color"
- #define F_console_standard_long_normal_s "normal"
- #define F_console_standard_long_quiet_s "quiet"
- #define F_console_standard_long_status_in_s "status_in"
- #define F_console_standard_long_status_out_s "status_out"
- #define F_console_standard_long_verbose_s "verbose"
- #define F_console_standard_long_version_s "version"
-
- #define F_console_standard_long_copyright_s_length 9
- #define F_console_standard_long_dark_s_length 4
- #define F_console_standard_long_debug_s_length 5
- #define F_console_standard_long_error_s_length 5
- #define F_console_standard_long_help_s_length 4
- #define F_console_standard_long_light_s_length 5
- #define F_console_standard_long_line_first_no_s_length 13
- #define F_console_standard_long_line_last_no_s_length 12
- #define F_console_standard_long_no_color_s_length 8
- #define F_console_standard_long_normal_s_length 6
- #define F_console_standard_long_quiet_s_length 5
- #define F_console_standard_long_status_in_s_length 9
- #define F_console_standard_long_status_out_s_length 10
- #define F_console_standard_long_verbose_s_length 7
- #define F_console_standard_long_version_s_length 7
+ #define F_console_standard_short_copyright_s "C"
+ #define F_console_standard_short_dark_s "d"
+ #define F_console_standard_short_debug_s "D"
+ #define F_console_standard_short_error_s "E"
+ #define F_console_standard_short_help_s "h"
+ #define F_console_standard_short_light_s "l"
+ #define F_console_standard_short_no_color_s "n"
+ #define F_console_standard_short_normal_s "N"
+ #define F_console_standard_short_quiet_s "Q"
+ #define F_console_standard_short_status_in_s "s"
+ #define F_console_standard_short_status_out_s "S"
+ #define F_console_standard_short_verbose_s "V"
+ #define F_console_standard_short_version_s "v"
+
+ #define F_console_standard_short_copyright_s_length 1
+ #define F_console_standard_short_dark_s_length 1
+ #define F_console_standard_short_debug_s_length 1
+ #define F_console_standard_short_error_s_length 1
+ #define F_console_standard_short_help_s_length 1
+ #define F_console_standard_short_light_s_length 1
+ #define F_console_standard_short_no_color_s_length 1
+ #define F_console_standard_short_normal_s_length 1
+ #define F_console_standard_short_quiet_s_length 1
+ #define F_console_standard_short_status_in_s_length 1
+ #define F_console_standard_short_status_out_s_length 1
+ #define F_console_standard_short_verbose_s_length 1
+ #define F_console_standard_short_version_s_length 1
+
+ #define F_console_standard_long_copyright_s "copyright"
+ #define F_console_standard_long_dark_s "dark"
+ #define F_console_standard_long_debug_s "debug"
+ #define F_console_standard_long_error_s "error"
+ #define F_console_standard_long_help_s "help"
+ #define F_console_standard_long_light_s "light"
+ #define F_console_standard_long_no_color_s "no_color"
+ #define F_console_standard_long_normal_s "normal"
+ #define F_console_standard_long_quiet_s "quiet"
+ #define F_console_standard_long_status_in_s "status_in"
+ #define F_console_standard_long_status_out_s "status_out"
+ #define F_console_standard_long_verbose_s "verbose"
+ #define F_console_standard_long_version_s "version"
+
+ #define F_console_standard_long_copyright_s_length 9
+ #define F_console_standard_long_dark_s_length 4
+ #define F_console_standard_long_debug_s_length 5
+ #define F_console_standard_long_error_s_length 5
+ #define F_console_standard_long_help_s_length 4
+ #define F_console_standard_long_light_s_length 5
+ #define F_console_standard_long_no_color_s_length 8
+ #define F_console_standard_long_normal_s_length 6
+ #define F_console_standard_long_quiet_s_length 5
+ #define F_console_standard_long_status_in_s_length 9
+ #define F_console_standard_long_status_out_s_length 10
+ #define F_console_standard_long_verbose_s_length 7
+ #define F_console_standard_long_version_s_length 7
#ifndef _di_f_console_standard_short_copyright_s_
extern const f_string_static_t f_console_standard_short_copyright_s;
extern const f_string_static_t f_console_standard_short_light_s;
#endif // _di_f_console_standard_short_light_s_
- #ifndef _di_f_console_standard_short_line_first_no_s_
- extern const f_string_static_t f_console_standard_short_line_first_no_s;
- #endif // _di_f_console_standard_short_line_first_no_s_
-
- #ifndef _di_f_console_standard_short_line_last_no_s_
- extern const f_string_static_t f_console_standard_short_line_last_no_s;
- #endif // _di_f_console_standard_short_line_last_no_s_
-
#ifndef _di_f_console_standard_short_no_color_s_
extern const f_string_static_t f_console_standard_short_no_color_s;
#endif // _di_f_console_standard_short_no_color_s_
extern const f_string_static_t f_console_standard_long_light_s;
#endif // _di_f_console_standard_long_light_s_
- #ifndef _di_f_console_standard_long_line_first_no_s_
- extern const f_string_static_t f_console_standard_long_line_first_no_s;
- #endif // _di_f_console_standard_long_line_first_no_s_
-
- #ifndef _di_f_console_standard_long_line_last_no_s_
- extern const f_string_static_t f_console_standard_long_line_last_no_s;
- #endif // _di_f_console_standard_long_line_last_no_s_
-
#ifndef _di_f_console_standard_long_no_color_s_
extern const f_string_static_t f_console_standard_long_no_color_s;
#endif // _di_f_console_standard_long_no_color_s_
}
#define macro_fll_program_console_parameter_standard_initialize \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s, f_console_standard_long_copyright_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \
- macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e)
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s, f_console_standard_long_copyright_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \
+ macro_f_console_parameter_t_initialize_3(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e)
#endif // _di_fll_program_data_t_
/**
if (!print) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- private_fll_program_print_help_option(print, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print this help message.");
- private_fll_program_print_help_option(print, f_console_standard_short_copyright_s, f_console_standard_long_copyright_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Print the copyright.");
- private_fll_program_print_help_option(print, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Output using colors that show up better on dark backgrounds.");
- private_fll_program_print_help_option(print, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Output using colors that show up better on light backgrounds.");
- private_fll_program_print_help_option(print, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Do not print using color.");
- private_fll_program_print_help_option(print, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Decrease verbosity, silencing most print->to.");
- private_fll_program_print_help_option(print, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Decrease verbosity, using only error print->to.");
- private_fll_program_print_help_option(print, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Set verbosity to normal.");
- private_fll_program_print_help_option(print, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Increase verbosity beyond normal print->to.");
- private_fll_program_print_help_option(print, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Enable debugging, significantly increasing verbosity beyond normal print->to.");
- private_fll_program_print_help_option(print, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Print only the version number.");
- private_fll_program_print_help_option(print, f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, "Disable printing of first line.");
- private_fll_program_print_help_option(print, f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Disable printing of last line.");
+ private_fll_program_print_help_option(print, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print this help message.");
+ private_fll_program_print_help_option(print, f_console_standard_short_copyright_s, f_console_standard_long_copyright_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, "Print the copyright.");
+ private_fll_program_print_help_option(print, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Output using colors that show up better on dark backgrounds.");
+ private_fll_program_print_help_option(print, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Output using colors that show up better on light backgrounds.");
+ private_fll_program_print_help_option(print, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Do not print using color.");
+ private_fll_program_print_help_option(print, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Decrease verbosity, silencing most print->to.");
+ private_fll_program_print_help_option(print, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Decrease verbosity, using only error print->to.");
+ private_fll_program_print_help_option(print, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Set verbosity to normal.");
+ private_fll_program_print_help_option(print, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Increase verbosity beyond normal print->to.");
+ private_fll_program_print_help_option(print, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Enable debugging, significantly increasing verbosity beyond normal print->to.");
+ private_fll_program_print_help_option(print, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Print only the version number.");
return F_okay;
}
#ifndef _di_byte_dump_main_
void byte_dump_main(byte_dump_main_t * const main) {
- if (!main) return;
-
- if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & byte_dump_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
- return;
- }
-
- if ((main->setting.flag & byte_dump_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
+ if (!main || F_status_is_error(main->setting.state.status)) return;
main->setting.state.status = F_okay;
fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
- if ((main->setting.flag & byte_dump_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
return;
}
byte_dump_print_error_file_none(&main->program.error);
}
-
- if ((main->setting.flag & byte_dump_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
}
#endif // _di_byte_dump_main_
main->setting.state.step_small = byte_dump_allocation_small_d;
- if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
- main->setting.flag &= ~byte_dump_main_flag_print_first_e;
- }
- else {
- main->setting.flag |= byte_dump_main_flag_print_first_e;
- }
-
- if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
- main->setting.flag &= ~byte_dump_main_flag_print_last_e;
- }
- else {
- main->setting.flag |= byte_dump_main_flag_print_last_e;
- }
-
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & byte_dump_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
byte_dump_print_error(&main->program.error, macro_byte_dump_f(f_console_parameter_process));
return;
main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & byte_dump_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
byte_dump_print_error(&main->program.error, macro_byte_dump_f(fll_program_parameter_process_context_standard));
return;
main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & byte_dump_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
byte_dump_print_error(&main->program.error, macro_byte_dump_f(fll_program_parameter_process_verbosity_standard));
return;
main->setting.state.status = f_console_parameter_prioritize_right(main->program.parameters, choices, &choice);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & byte_dump_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
byte_dump_print_error(&main->program.error, macro_byte_dump_f(f_console_parameter_prioritize_right));
return;
main->setting.state.status = f_console_parameter_prioritize_right(main->program.parameters, choices, &choice);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & byte_dump_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
byte_dump_print_error(&main->program.error, macro_byte_dump_f(f_console_parameter_prioritize_right));
return;
main->setting.state.status = f_console_parameter_prioritize_right(main->program.parameters, choices, &choice);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & byte_dump_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
byte_dump_print_error(&main->program.error, macro_byte_dump_f(f_console_parameter_prioritize_right));
return;
}
if (F_status_is_error(main->setting.state.status) || number < 0x1 || number >= 0xfb) {
- if ((main->setting.flag & byte_dump_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
byte_dump_print_error_parameter_range_out(&main->program.error, byte_dump_long_width_s, 1, 250, main->program.parameters.arguments.array[index]);
return;
else if (main->program.parameters.array[byte_dump_parameter_width_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & byte_dump_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, byte_dump_long_width_s);
return;
}
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & byte_dump_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
byte_dump_print_error_parameter_range_out(&main->program.error, names[i], 0, F_number_t_size_unsigned_d, main->program.parameters.arguments.array[index]);
return;
else if (main->program.parameters.array[indexs[i]].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & byte_dump_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, names[i]);
return;
if (main->setting.first > main->setting.last) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & byte_dump_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_first_greater_than_last(&main->program.error);
return;
main->setting.state.status = f_memory_array_increase_by(main->program.parameters.remaining.used, sizeof(f_string_dynamic_t), (void **) &main->setting.files.array, &main->setting.files.used, &main->setting.files.size);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & byte_dump_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
byte_dump_print_error(&main->program.error, macro_byte_dump_f(f_memory_array_increase_by));
return;
if (F_status_is_error(main->setting.state.status)) {
if (status_files == F_okay) {
- if ((main->setting.flag & byte_dump_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
status_files = main->setting.state.status;
}
* - last: The last position is specified.
* - placeholder: Placeholder is specified.
* - pipe: Use the input pipe.
- * - print_first: When set, print new line to message output on program begin after loading settings.
- * - print_last: When set, print new line to message output on program end.
* - text: Text is specified.
* - unicode: Unicode is specified.
* - version: Print version.
byte_dump_main_flag_last_e = 0x10,
byte_dump_main_flag_pipe_e = 0x20,
byte_dump_main_flag_placeholder_e = 0x40,
- byte_dump_main_flag_print_first_e = 0x80,
- byte_dump_main_flag_print_last_e = 0x100,
- byte_dump_main_flag_text_e = 0x200,
- byte_dump_main_flag_unicode_e = 0x400,
- byte_dump_main_flag_version_e = 0x800,
- byte_dump_main_flag_version_copyright_help_e = 0x80a,
- byte_dump_main_flag_wide_e = 0x1000,
+ byte_dump_main_flag_text_e = 0x80,
+ byte_dump_main_flag_unicode_e = 0x100,
+ byte_dump_main_flag_version_e = 0x200,
+ byte_dump_main_flag_version_copyright_help_e = 0x20a,
+ byte_dump_main_flag_wide_e = 0x400,
}; // enum
#endif // _di_byte_dump_main_flag_e_
main->setting.state.step_small = controller_allocation_small_d;
- if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
- main->setting.flag &= ~controller_main_flag_print_first_e;
- }
- else {
- main->setting.flag |= controller_main_flag_print_first_e;
- }
-
- if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
- main->setting.flag &= ~controller_main_flag_print_last_e;
- }
- else {
- main->setting.flag |= controller_main_flag_print_last_e;
- }
-
if (F_status_is_error(main->setting.state.status)) {
fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), "f_console_parameter_process", fll_error_file_flag_fallback_e);
* - header: Enable printing of headers.
* - help: Print help.
* - init: Operate as an "init" program.
- * - print_first: When set, print new line to message output on program begin after loading settings.
- * - print_last: When set, print new line to message output on program end.
* - separate: Enable printing of separators.
* - strip_invalid: Using strip invalid character mode.
* - verify: Using verify mode.
controller_main_flag_header_e = 0x8,
controller_main_flag_help_e = 0x10,
controller_main_flag_init_e = 0x20,
- controller_main_flag_print_first_e = 0x40,
- controller_main_flag_print_last_e = 0x80,
- controller_main_flag_separate_e = 0x100,
- controller_main_flag_strip_invalid_e = 0x200,
- controller_main_flag_verify_e = 0x400,
- controller_main_flag_version_e = 0x800,
- controller_main_flag_version_copyright_help_e = 0x811,
+ controller_main_flag_separate_e = 0x40,
+ controller_main_flag_strip_invalid_e = 0x80,
+ controller_main_flag_verify_e = 0x100,
+ controller_main_flag_version_e = 0x200,
+ controller_main_flag_version_copyright_help_e = 0x211,
}; // enum
#endif // _di_controller_main_flag_e_
if (F_status_is_error(main->setting.state.status)) return;
- if ((main->setting.flag & controller_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
main->setting.state.status = F_okay;
if (main->setting.flag & controller_main_flag_version_copyright_help_e) {
fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
- if ((main->setting.flag & controller_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
return;
}
main->setting.state.step_small = example_allocation_small_d;
- if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
- main->setting.flag &= ~example_main_flag_print_first_e;
- }
- else {
- main->setting.flag |= example_main_flag_print_first_e;
- }
-
- if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
- main->setting.flag &= ~example_main_flag_print_last_e;
- }
- else {
- main->setting.flag |= example_main_flag_print_last_e;
- }
-
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & example_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
example_print_error(&main->program.error, macro_example_f(f_console_parameter_process));
return;
main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & example_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
example_print_error(&main->program.error, macro_example_f(fll_program_parameter_process_context_standard));
return;
main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & example_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
example_print_error(&main->program.error, macro_example_f(fll_program_parameter_process_verbosity_standard));
return;
* - fine: Check if status is "fine".
* - help: Print help.
* - pipe: Use the input pipe.
- * - print_first: When set, print new line to message output on program begin after loading settings.
- * - print_last: When set, print new line to message output on program end.
* - version: Print version.
* - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
* - warning: Check if status is "warning".
example_main_flag_fine_e = 0x4,
example_main_flag_help_e = 0x8,
example_main_flag_pipe_e = 0x10,
- example_main_flag_print_first_e = 0x20,
- example_main_flag_print_last_e = 0x40,
- example_main_flag_version_e = 0x80,
- example_main_flag_version_copyright_help_e = 0x89,
- example_main_flag_warning_e = 0x100,
+ example_main_flag_version_e = 0x20,
+ example_main_flag_version_copyright_help_e = 0x29,
+ example_main_flag_warning_e = 0x40,
}; // enum
#endif // _di_example_main_flag_e_
#ifndef _di_example_main_
void example_main(example_main_t * const main) {
- if (!main) return;
-
- if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & example_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
- return;
- }
-
- if ((main->setting.flag & example_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
+ if (!main || F_status_is_error(main->setting.state.status)) return;
main->setting.state.status = F_okay;
fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
- if ((main->setting.flag & example_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
return;
}
if (main->setting.state.status == F_status_set_error(F_interrupt)) {
fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
}
-
- if ((main->setting.flag & example_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
}
#endif // _di_example_main_
main->setting.state.step_small = step_original;
}
- if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
- main->setting.flag &= ~fake_main_flag_print_first_e;
- }
- else {
- main->setting.flag |= fake_main_flag_print_first_e;
- }
-
- if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
- main->setting.flag &= ~fake_main_flag_print_last_e;
- }
- else {
- main->setting.flag |= fake_main_flag_print_last_e;
- }
-
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fake_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fake_print_error(&main->program.error, macro_fake_f(f_console_parameter_process));
return;
main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fake_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fake_print_error(&main->program.error, macro_fake_f(fll_program_parameter_process_context_standard));
return;
main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fake_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fake_print_error(&main->program.error, macro_fake_f(fll_program_parameter_process_verbosity_standard));
return;
if ((main->program.parameters.array[parameters[i]].result & f_console_result_found_e) && !(main->program.parameters.array[parameters[i]].result & f_console_result_value_e)) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & fake_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, names[i]);
}
// @todo fix this to print an error about the actual invalid character so that it can be investigated.
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fake_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
if (fake_print_error_fallback(&main->program.error, macro_fake_f(f_utf_is_word_dash_plus)) == F_false) {
fll_program_print_error_parameter_process(&main->program.error, f_console_symbol_long_normal_s, names[i]);
}
if (main->setting.state.status == F_false) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & fake_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fake_print_error_parameter_not_word(&main->program.error, f_console_symbol_long_normal_s, names[i], main->program.parameters.arguments.array[index]);
return;
main->setting.state.status = f_path_directory_cleanup(main->program.parameters.arguments.array[index], variable[i]);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fake_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
if (fake_print_error_fallback(&main->program.error, macro_fake_f(f_path_directory_cleanup)) == F_false) {
fll_program_print_error_parameter_process(&main->program.error, f_console_symbol_long_normal_s, names[i]);
main->setting.state.status = f_memory_array_resize(0, sizeof(f_char_t), (void **) &variable[i]->string, &variable[i]->used, &variable[i]->size);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fake_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fake_print_error(&main->program.error, macro_fake_f(f_memory_array_resize));
return;
if (!variable[i]->used) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & fake_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fake_print_error_parameter_not_empty(&main->program.error, f_console_symbol_long_normal_s, names[i], main->program.parameters.arguments.array[index]);
return;
main->setting.state.status = f_memory_array_resize(0, sizeof(f_char_t), (void **) &variable[i]->string, &variable[i]->used, &variable[i]->size);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fake_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fake_print_error(&main->program.error, macro_fake_f(f_memory_array_resize));
return;
main->setting.state.status = F_status_set_error(F_parameter);
if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
- if ((main->setting.flag & fake_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, names[i]);
}
main->setting.state.status = fll_program_parameter_additional_rip(main->program.parameters.arguments.array, main->program.parameters.array[parameters[i]].values, variable[i]);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fake_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
if (fake_print_error_fallback(&main->program.error, macro_fake_f(fll_program_parameter_additional_rip)) == F_false) {
fll_program_print_error_parameter_process(&main->program.error, f_console_symbol_long_normal_s, names[i]);
main->setting.state.status = f_utf_is_word_dash_plus(main->program.parameters.arguments.array[i].string + j, width_max, F_false);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fake_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
// @todo fix this to print an error about the actual invalid character so that it can be investigated.
if (fake_print_error_fallback(&main->program.error, macro_fake_f(f_utf_is_word_dash_plus)) == F_false) {
if (main->setting.state.status == F_false) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & fake_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fake_print_error_parameter_not_word(&main->program.error, f_console_symbol_long_normal_s, names[i], main->program.parameters.arguments.array[i]);
return;
main->setting.state.status = f_memory_array_increase_by(1, sizeof(uint8_t), (void **) &main->setting.operations.array, &main->setting.operations.used, &main->setting.operations.size);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fake_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fake_print_error(&main->program.error, macro_fake_f(f_memory_array_increase_by));
return;
* - operation_make: The make operation is designated (or enabled as default).
* - operation_skeleton: The skeleton operation is designated.
* - pipe: Use the input pipe.
- * - print_first: When set, print new line to message output on program begin after loading settings.
- * - print_last: When set, print new line to message output on program end.
* - separate: Enable printing of separators.
* - strip_invalid: Using strip invalid character mode.
* - verify: Using verify mode.
fake_main_flag_operation_make_e = 0x200,
fake_main_flag_operation_skeleton_e = 0x400,
fake_main_flag_pipe_e = 0x800,
- fake_main_flag_print_first_e = 0x1000,
- fake_main_flag_print_last_e = 0x2000,
- fake_main_flag_separate_e = 0x4000,
- fake_main_flag_strip_invalid_e = 0x8000,
- fake_main_flag_verify_e = 0x10000,
- fake_main_flag_version_e = 0x20000,
- fake_main_flag_version_copyright_help_e = 0x20021,
+ fake_main_flag_separate_e = 0x1000,
+ fake_main_flag_strip_invalid_e = 0x2000,
+ fake_main_flag_verify_e = 0x4000,
+ fake_main_flag_version_e = 0x8000,
+ fake_main_flag_version_copyright_help_e = 0x8021,
}; // enum
#endif // _di_fake_main_flag_e_
#ifndef _di_fake_main_
void fake_main(fake_main_t * const main) {
- if (!main) return;
-
- if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fake_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
- return;
- }
-
- if ((main->setting.flag & fake_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
+ if (!main || F_status_is_error(main->setting.state.status)) return;
main->setting.state.status = F_okay;
fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
- if ((main->setting.flag & fake_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
return;
}
fake_print_error_parameter_operation_not_with(&main->program.error, fake_other_operation_build_s, fake_other_operation_make_s);
- if ((main->setting.flag & fake_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
return;
}
if (F_status_is_error(main->setting.state.status)) {
fake_data_delete(&data);
- if ((main->setting.flag & fake_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
return;
}
}
}
- if ((main->setting.flag & fake_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fake_data_delete(&data);
}
#endif // _di_fake_main_
main->setting.state.step_small = firewall_allocation_small_d;
- if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
- main->setting.flag &= ~firewall_main_flag_print_first_e;
- }
- else {
- main->setting.flag |= firewall_main_flag_print_first_e;
- }
-
- if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
- main->setting.flag &= ~firewall_main_flag_print_last_e;
- }
- else {
- main->setting.flag |= firewall_main_flag_print_last_e;
- }
-
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & firewall_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
firewall_print_error(&main->program.error, macro_firewall_f(f_console_parameter_process));
return;
main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & firewall_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
firewall_print_error(&main->program.error, macro_firewall_f(fll_program_parameter_process_context_standard));
return;
main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & firewall_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
firewall_print_error(&main->program.error, macro_firewall_f(fll_program_parameter_process_verbosity_standard));
return;
* - operation_stop_restart: A helper flag representing both the stop and restart operation flag set.
* - operation_stop_restart_lock: A helper flag representing both the stop, restart, and lock operation flag set.
* - pipe: Use the input pipe.
- * - print_first: When set, print new line to message output on program begin after loading settings.
- * - print_last: When set, print new line to message output on program end.
* - version: Print version.
* - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
*/
firewall_main_flag_operation_stop_restart_e = 0x208,
firewall_main_flag_operation_stop_restart_lock_e = 0x20c,
firewall_main_flag_pipe_e = 0x400,
- firewall_main_flag_print_first_e = 0x800,
- firewall_main_flag_print_last_e = 0x1000,
- firewall_main_flag_version_e = 0x2000,
- firewall_main_flag_version_copyright_help_e = 0x2003,
+ firewall_main_flag_version_e = 0x800,
+ firewall_main_flag_version_copyright_help_e = 0x803,
}; // enum
#endif // _di_firewall_main_flag_e_
#ifndef _di_firewall_main_
void firewall_main(firewall_main_t * const main) {
- if (!main) return;
-
- if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & firewall_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
- return;
- }
-
- if ((main->setting.flag & firewall_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
+ if (!main || F_status_is_error(main->setting.state.status)) return;
main->setting.state.status = F_okay;
fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
- if ((main->setting.flag & firewall_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
return;
}
firewall_print_error_operation_specified_not(&main->program.error);
}
- if ((main->setting.flag & firewall_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
if (F_status_is_error(main->setting.state.status) || main->setting.state.status == F_interrupt) return;
main->setting.state.status = F_okay;
main->setting.state.step_small = fss_identify_allocation_small_d;
- if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
- main->setting.flag &= ~fss_identify_main_flag_print_first_e;
- }
- else {
- main->setting.flag |= fss_identify_main_flag_print_first_e;
- }
-
- if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
- main->setting.flag &= ~fss_identify_main_flag_print_last_e;
- }
- else {
- main->setting.flag |= fss_identify_main_flag_print_last_e;
- }
-
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_identify_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fss_identify_print_error(&main->program.error, macro_fss_identify_f(f_console_parameter_process));
return;
main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_identify_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fss_identify_print_error(&main->program.error, macro_fss_identify_f(fll_program_parameter_process_context_standard));
return;
main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_identify_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fss_identify_print_error(&main->program.error, macro_fss_identify_f(fll_program_parameter_process_verbosity_standard));
return;
}
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_identify_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_integer_not(&main->program.error, f_console_symbol_long_normal_s, fss_identify_long_line_s, main->program.parameters.arguments.array[index]);
return;
else if (main->program.parameters.array[fss_identify_parameter_line_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & fss_identify_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, fss_identify_long_line_s);
return;
main->setting.state.status = f_memory_array_increase_by(main->program.parameters.array[fss_identify_parameter_name_e].values.used, sizeof(f_string_dynamic_t), (void **) &main->setting.names.array, &main->setting.names.used, &main->setting.names.size);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_identify_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fss_identify_print_error(&main->program.error, macro_fss_identify_f(f_memory_array_increase_by));
return;
main->setting.state.status = f_string_dynamic_append_nulless(main->program.parameters.arguments.array[index], &main->setting.names.array[i]);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_identify_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fss_identify_print_error(&main->program.error, macro_fss_identify_f(f_string_dynamic_append_nulless));
break;
main->setting.state.status = f_utf_is_word_dash(main->setting.names.array[i].string + j, main->setting.names.array[i].used, F_true);
if (F_status_is_error(main->setting.state.status)) {
- if (F_status_is_error_not(main->setting.state.status)) {
- if ((main->setting.flag & fss_identify_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
- }
-
fss_identify_print_error(&main->program.error, macro_fss_identify_f(f_utf_is_word_dash));
return;
if (F_status_is_error_not(main->setting.state.status)) {
status = F_status_set_error(F_parameter);
-
- if ((main->setting.flag & fss_identify_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
}
fss_identify_print_error_parameter_file_name_invalid(&main->program.error, index, main->setting.names.array[i]);
else {
if (F_status_is_error_not(main->setting.state.status)) {
status = F_status_set_error(F_parameter);
-
- if ((main->setting.flag & fss_identify_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
}
fss_identify_print_error_parameter_file_name_empty(&main->program.error, index);
else if (main->program.parameters.array[fss_identify_parameter_name_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & fss_identify_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, fss_identify_long_name_s);
return;
main->setting.state.status = f_memory_array_increase_by(main->program.parameters.remaining.used, sizeof(f_string_dynamic_t), (void **) &main->setting.files.array, &main->setting.files.used, &main->setting.files.size);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_identify_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fss_identify_print_error(&main->program.error, macro_fss_identify_f(f_memory_array_increase_by));
return;
if (!(main->setting.flag & fss_identify_main_flag_pipe_e | fss_identify_main_flag_file_from_e)) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & fss_identify_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fss_identify_print_error_no_from(&main->program.error);
return;
if (main->setting.flag & (fss_identify_main_flag_content_e | fss_identify_main_flag_object_e)) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & fss_identify_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
fll_program_print_error_parameter_cannot_use_with(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, main->setting.flag & fss_identify_main_flag_content_e ? fss_identify_long_content_s : fss_identify_long_object_s, fss_identify_long_total_s);
}
* - name: Select using this full or partial type name or code.
* - object: Use the object (The "FSS" part of "FSS-0000").
* - pipe: Use the input pipe.
- * - print_first: When set, print new line to message output on program begin after loading settings.
- * - print_last: When set, print new line to message output on program end.
* - total: Print the total Identifiers found.
* - version: Print version.
* - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
fss_identify_main_flag_name_e = 0x80,
fss_identify_main_flag_object_e = 0x100,
fss_identify_main_flag_pipe_e = 0x200,
- fss_identify_main_flag_print_first_e = 0x400,
- fss_identify_main_flag_print_last_e = 0x800,
- fss_identify_main_flag_total_e = 0x1000,
- fss_identify_main_flag_version_e = 0x2000,
- fss_identify_main_flag_version_copyright_help_e = 0x2022,
+ fss_identify_main_flag_total_e = 0x400,
+ fss_identify_main_flag_version_e = 0x800,
+ fss_identify_main_flag_version_copyright_help_e = 0x822,
}; // enum
#endif // _di_fss_identify_main_flag_e_
#ifndef _di_fss_identify_main_
void fss_identify_main(fss_identify_main_t * const main) {
- if (!main) return;
-
- if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_identify_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
- return;
- }
-
- if ((main->setting.flag & fss_identify_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
+ if (!main || F_status_is_error(main->setting.state.status)) return;
main->setting.state.status = F_okay;
fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
- if ((main->setting.flag & fss_identify_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
return;
}
}
}
- if ((main->setting.flag & fss_identify_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
if (F_status_is_error(main->setting.state.status) || main->setting.state.status == F_interrupt) return;
main->setting.state.status = F_okay;
main->setting.state.step_small = fss_read_allocation_small_d;
- if (parameters->array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
- main->setting.flag &= ~fss_read_main_flag_print_first_e;
- }
- else {
- main->setting.flag |= fss_read_main_flag_print_first_e;
- }
-
- if (parameters->array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
- main->setting.flag &= ~fss_read_main_flag_print_last_e;
- }
- else {
- main->setting.flag |= fss_read_main_flag_print_last_e;
- }
-
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fss_read_print_error(&main->program.error, macro_fss_read_f(f_console_parameter_process));
return;
main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fss_read_print_error(&main->program.error, macro_fss_read_f(fll_program_parameter_process_context_standard));
return;
main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fss_read_print_error(&main->program.error, macro_fss_read_f(fll_program_parameter_process_verbosity_standard));
return;
else if (parameters->array[parameter_code[i]].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & fss_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fss_read_print_error_parameter_requires_message(&main->program.error, f_console_symbol_long_normal_s, parameter_name[i], parameter_message[i]);
return;
main->setting.state.status = F_status_set_error(F_parameter);
if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
- if ((main->setting.flag & fss_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_cannot_use_with(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_read_long_columns_s, parameter_name[i]);
}
main->setting.state.status = F_status_set_error(F_parameter);
if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
- if ((main->setting.flag & fss_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_cannot_use_with(
&main->program.error, f_console_symbol_long_normal_s,
f_console_symbol_long_normal_s,
if (!length) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & fss_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_empty_value(&main->program.error, f_console_symbol_long_normal_s, fss_read_long_delimit_s);
return;
main->setting.state.status = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, parameters->arguments.array[index], main->setting.range, &main->setting.delimit_depth);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_error_parameter_integer_print(&main->program.error, F_status_set_fine(main->setting.state.status), macro_fss_read_f(fl_conversion_dynamic_partial_to_unsigned_detect), F_true, fss_read_long_delimit_s, parameters->arguments.array[index]);
return;
} // while
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_error_file_print(&main->program.error, F_status_set_fine(main->setting.state.status), macro_fss_read_f(f_file_stream_read_block), fll_error_file_flag_fallback_e, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e);
return;
main->setting.state.status = f_file_stream_open(file_data->name, f_string_empty_s, &file);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_error_file_print(&main->program.error, F_status_set_fine(main->setting.state.status), macro_fss_read_f(f_file_stream_open), fll_error_file_flag_fallback_e, parameters->arguments.array[index], f_file_operation_open_s, fll_error_file_type_file_e);
break;
main->setting.state.status = f_file_size(file_data->name, F_true, &size_file);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_error_file_print(&main->program.error, F_status_set_fine(main->setting.state.status), macro_fss_read_f(f_file_size), fll_error_file_flag_fallback_e, parameters->arguments.array[index], f_file_operation_read_s, fll_error_file_type_file_e);
break;
main->setting.state.status = f_memory_array_increase_by(size_file + 1, sizeof(f_char_t), (void **) &main->setting.buffer.string, &main->setting.buffer.used, &main->setting.buffer.size);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_error_file_print(&main->program.error, F_status_set_fine(main->setting.state.status), macro_fss_read_f(f_memory_array_increase_by), fll_error_file_flag_fallback_e, parameters->arguments.array[index], f_file_operation_process_s, fll_error_file_type_file_e);
break;
if (F_status_is_error(main->setting.state.status)) {
if (F_status_set_fine(main->setting.state.status) != F_interrupt) {
- if ((main->setting.flag & fss_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_error_file_print(&main->program.error, F_status_set_fine(main->setting.state.status), macro_fss_read_f(f_file_stream_read_until), fll_error_file_flag_fallback_e, parameters->arguments.array[index], f_file_operation_read_s, fll_error_file_type_file_e);
}
main->setting.state.status = fss_read_depths_resize(i, &main->setting.depths);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fss_read_print_error(&main->program.error, macro_fss_read_f(fss_read_depths_resize));
return;
main->setting.state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, parameters->arguments.array[position_depth], ¤t->depth);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_error_parameter_integer_print(&main->program.error, F_status_set_fine(main->setting.state.status), macro_fss_read_f(fl_conversion_dynamic_to_unsigned_detect), F_true, fss_read_long_depth_s, parameters->arguments.array[position_depth]);
return;
main->setting.state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, parameters->arguments.array[current->index_at], ¤t->value_at);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_error_parameter_integer_print(&main->program.error, F_status_set_fine(main->setting.state.status), macro_fss_read_f(fl_conversion_dynamic_to_unsigned_detect), F_true, fss_read_long_at_s, parameters->arguments.array[current->index_at]);
return;
}
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fss_read_print_error(&main->program.error, (parameters->array[fss_read_parameter_trim_e].result & f_console_result_found_e) ? macro_fss_read_f(f_rip_dynamic) : macro_fss_read_f(f_string_dynamic_append));
return;
if (current->depth == main->setting.depths.array[j].depth) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & fss_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fss_read_print_error_parameter_value_once_only_number(&main->program.error, f_console_symbol_long_normal_s, fss_read_long_depth_s, current->depth);
return;
if (current->depth > main->setting.depths.array[j].depth) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & fss_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fss_read_print_error_parameter_value_before_value_number(&main->program.error, f_console_symbol_long_normal_s, fss_read_long_depth_s, current->depth, main->setting.depths.array[j].depth);
return;
* - payload_warn: Treat missing or invalid payload as a warning (when using FSS Payload and related).
* - pipe: Use the input pipe.
* - pipe_format: Print using the special pipe format.
- * - print_first: When set, print new line to message output on program begin after loading settings.
- * - print_last: When set, print new line to message output on program end.
* - quote_content: Designate that the standard supports quotes on Content.
* - quote_object: Designate that the standard supports quotes on Objects.
* - select: A specific Content at a given position is to be selected (Think of this as select a column for some Content).
fss_read_main_flag_payload_warn_e = 0x100000,
fss_read_main_flag_pipe_e = 0x200000,
fss_read_main_flag_pipe_format_e = 0x400000,
- fss_read_main_flag_print_first_e = 0x800000,
- fss_read_main_flag_print_last_e = 0x1000000,
- fss_read_main_flag_quote_content_e = 0x2000000,
- fss_read_main_flag_quote_object_e = 0x4000000,
- fss_read_main_flag_select_e = 0x8000000,
- fss_read_main_flag_total_e = 0x10000000,
- fss_read_main_flag_trim_e = 0x20000000,
- fss_read_main_flag_trim_object_e = 0x40000000,
- fss_read_main_flag_version_e = 0x80000000,
- fss_read_main_flag_version_copyright_help_e = 0x80000420,
+ fss_read_main_flag_quote_content_e = 0x800000,
+ fss_read_main_flag_quote_object_e = 0x1000000,
+ fss_read_main_flag_select_e = 0x2000000,
+ fss_read_main_flag_total_e = 0x4000000,
+ fss_read_main_flag_trim_e = 0x8000000,
+ fss_read_main_flag_trim_object_e = 0x10000000,
+ fss_read_main_flag_version_e = 0x20000000,
+ fss_read_main_flag_version_copyright_help_e = 0x20000420,
}; // enum
#endif // _di_fss_read_main_flag_e_
fss_read_main_t * const main = (fss_read_main_t *) void_main;
- if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_read_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
- return;
- }
-
- if ((main->setting.flag & fss_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
+ if (F_status_is_error(main->setting.state.status)) return;
main->setting.state.status = F_okay;
fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
- if ((main->setting.flag & fss_read_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
return;
}
main->callback.process_normal(void_main);
}
}
-
- if ((main->setting.flag & fss_read_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
}
#endif // _di_fss_read_main_
main->setting.state.status = f_string_dynamic_append_assure(f_string_eol_s, &main->setting.buffer);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_error_file_print(&main->program.error, F_status_set_fine(main->setting.state.status), macro_fss_read_f(f_string_dynamic_append_assure), fll_error_file_flag_fallback_e, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e);
}
}
generate_operate_test_standard() {
standard=$(echo "${standard}" | sed -e 's|^test-||')
- fss_read +FLn -A ${standard} -c ${file_source} > ${test_current}content.expect &&
- fss_read +FLn -A ${standard} -cO ${file_source} > ${test_current}content-original.expect &&
- fss_read +FLn -A ${standard} -ct ${file_source} > ${test_current}content-total.expect &&
- fss_read +FLn -A ${standard} -cT ${file_source} > ${test_current}content-trim.expect &&
- fss_read +FLn -A ${standard} -cl 0 ${file_source} > ${test_current}content-line-0.expect &&
- fss_read +FLn -A ${standard} -cl 1 ${file_source} > ${test_current}content-line-1.expect &&
- fss_read +FLn -A ${standard} -cl 5 ${file_source} > ${test_current}content-line-5.expect &&
- fss_read +FLn -A ${standard} -cl 6 ${file_source} > ${test_current}content-line-6.expect &&
- fss_read +FLn -A ${standard} -cl 100 ${file_source} > ${test_current}content-line-100.expect &&
- fss_read +FLn -A ${standard} -cs 0 ${file_source} > ${test_current}content-select-0.expect &&
- fss_read +FLn -A ${standard} -cs 1 ${file_source} > ${test_current}content-select-1.expect &&
- fss_read +FLn -A ${standard} -cs 5 ${file_source} > ${test_current}content-select-5.expect &&
- fss_read +FLn -A ${standard} -cs 6 ${file_source} > ${test_current}content-select-6.expect &&
- fss_read +FLn -A ${standard} -cs 100 ${file_source} > ${test_current}content-select-100.expect &&
- fss_read +FLn -A ${standard} -cC ${file_source} > ${test_current}content-columns.expect &&
- fss_read +FLn -A ${standard} -ca 0 ${file_source} > ${test_current}content-at-0.expect &&
- fss_read +FLn -A ${standard} -ca 1 ${file_source} > ${test_current}content-at-1.expect &&
- fss_read +FLn -A ${standard} -ca 5 ${file_source} > ${test_current}content-at-5.expect &&
- fss_read +FLn -A ${standard} -ca 6 ${file_source} > ${test_current}content-at-6.expect &&
- fss_read +FLn -A ${standard} -ca 100 ${file_source} > ${test_current}content-at-100.expect &&
- fss_read +FLn -A ${standard} -cn hi ${file_source} > ${test_current}content-name-hi.expect &&
- fss_read +FLn -A ${standard} -cn a ${file_source} > ${test_current}content-name-a.expect &&
- fss_read +FLn -A ${standard} -cn "" ${file_source} > ${test_current}content-name-.expect &&
- fss_read +FLn -A ${standard} -cn мир ${file_source} > ${test_current}content-name-мир.expect &&
- fss_read +FLn -A ${standard} -cn "привет has space" ${file_source} > ${test_current}content-name-привет.expect &&
- fss_read +FLn -A ${standard} -cnt hi ${file_source} > ${test_current}content-name-hi-total.expect &&
- fss_read +FLn -A ${standard} -cnt a ${file_source} > ${test_current}content-name-a-total.expect &&
- fss_read +FLn -A ${standard} -cnt "" ${file_source} > ${test_current}content-name--total.expect &&
- fss_read +FLn -A ${standard} -cnt мир ${file_source} > ${test_current}content-name-мир-total.expect &&
- fss_read +FLn -A ${standard} -cnt "привет has space" ${file_source} > ${test_current}content-name-привет-total.expect &&
- fss_read +FLn -A ${standard} -cns hi 0 ${file_source} > ${test_current}content-name-hi-select-0.expect &&
- fss_read +FLn -A ${standard} -cns hi 1 ${file_source} > ${test_current}content-name-hi-select-1.expect &&
- fss_read +FLn -A ${standard} -cns a 0 ${file_source} > ${test_current}content-name-a-select-0.expect &&
- fss_read +FLn -A ${standard} -cns a 1 ${file_source} > ${test_current}content-name-a-select-1.expect &&
- fss_read +FLn -A ${standard} -cns a 2 ${file_source} > ${test_current}content-name-a-select-2.expect &&
- fss_read +FLn -A ${standard} -cns a 5 ${file_source} > ${test_current}content-name-a-select-5.expect &&
- fss_read +FLn -A ${standard} -cns a 6 ${file_source} > ${test_current}content-name-a-select-6.expect &&
- fss_read +FLn -A ${standard} -cns a 100 ${file_source} > ${test_current}content-name-a-select-100.expect &&
- fss_read +FLn -A ${standard} -cns "" 0 ${file_source} > ${test_current}content-name--select-0.expect &&
- fss_read +FLn -A ${standard} -cns "" 1 ${file_source} > ${test_current}content-name--select-1.expect &&
- fss_read +FLn -A ${standard} -cns мир 0 ${file_source} > ${test_current}content-name-мир-select-0.expect &&
- fss_read +FLn -A ${standard} -cns мир 1 ${file_source} > ${test_current}content-name-мир-select-1.expect &&
- fss_read +FLn -A ${standard} -cns "привет has space" 0 ${file_source} > ${test_current}content-name-привет-select-0.expect &&
- fss_read +FLn -A ${standard} -cns "привет has space" 1 ${file_source} > ${test_current}content-name-привет-select-1.expect &&
- fss_read +FLn -A ${standard} -cnst hi 0 ${file_source} > ${test_current}content-name-hi-select-0-total.expect &&
- fss_read +FLn -A ${standard} -cnst hi 1 ${file_source} > ${test_current}content-name-hi-select-1-total.expect &&
- fss_read +FLn -A ${standard} -cnst a 0 ${file_source} > ${test_current}content-name-a-select-0-total.expect &&
- fss_read +FLn -A ${standard} -cnst a 1 ${file_source} > ${test_current}content-name-a-select-1-total.expect &&
- fss_read +FLn -A ${standard} -cnst a 2 ${file_source} > ${test_current}content-name-a-select-2-total.expect &&
- fss_read +FLn -A ${standard} -cnst a 5 ${file_source} > ${test_current}content-name-a-select-5-total.expect &&
- fss_read +FLn -A ${standard} -cnst a 6 ${file_source} > ${test_current}content-name-a-select-6-total.expect &&
- fss_read +FLn -A ${standard} -cnst a 100 ${file_source} > ${test_current}content-name-a-select-100-total.expect &&
- fss_read +FLn -A ${standard} -cnst "" 0 ${file_source} > ${test_current}content-name--select-0-total.expect &&
- fss_read +FLn -A ${standard} -cnst "" 1 ${file_source} > ${test_current}content-name--select-1-total.expect &&
- fss_read +FLn -A ${standard} -cnst мир 0 ${file_source} > ${test_current}content-name-мир-select-0-total.expect &&
- fss_read +FLn -A ${standard} -cnst мир 1 ${file_source} > ${test_current}content-name-мир-select-1-total.expect &&
- fss_read +FLn -A ${standard} -cnst "привет has space" 0 ${file_source} > ${test_current}content-name-привет-select-0-total.expect &&
- fss_read +FLn -A ${standard} -cnst "привет has space" 1 ${file_source} > ${test_current}content-name-привет-select-1-total.expect &&
-
- fss_read +FLn -A ${standard} -o ${file_source} > ${test_current}object.expect &&
- fss_read +FLn -A ${standard} -oO ${file_source} > ${test_current}object-original.expect &&
- fss_read +FLn -A ${standard} -ot ${file_source} > ${test_current}object-total.expect &&
- fss_read +FLn -A ${standard} -oT ${file_source} > ${test_current}object-trim.expect &&
- fss_read +FLn -A ${standard} -ol 0 ${file_source} > ${test_current}object-line-0.expect &&
- fss_read +FLn -A ${standard} -ol 1 ${file_source} > ${test_current}object-line-1.expect &&
- fss_read +FLn -A ${standard} -ol 5 ${file_source} > ${test_current}object-line-5.expect &&
- fss_read +FLn -A ${standard} -ol 6 ${file_source} > ${test_current}object-line-6.expect &&
- fss_read +FLn -A ${standard} -ol 100 ${file_source} > ${test_current}object-line-100.expect &&
- fss_read +FLn -A ${standard} -os 0 ${file_source} > ${test_current}object-select-0.expect &&
- fss_read +FLn -A ${standard} -os 1 ${file_source} > ${test_current}object-select-1.expect &&
- fss_read +FLn -A ${standard} -os 5 ${file_source} > ${test_current}object-select-5.expect &&
- fss_read +FLn -A ${standard} -os 6 ${file_source} > ${test_current}object-select-6.expect &&
- fss_read +FLn -A ${standard} -os 100 ${file_source} > ${test_current}object-select-100.expect &&
- fss_read +FLn -A ${standard} -oC ${file_source} > ${test_current}object-columns.expect &&
- fss_read +FLn -A ${standard} -oa 0 ${file_source} > ${test_current}object-at-0.expect &&
- fss_read +FLn -A ${standard} -oa 1 ${file_source} > ${test_current}object-at-1.expect &&
- fss_read +FLn -A ${standard} -oa 5 ${file_source} > ${test_current}object-at-5.expect &&
- fss_read +FLn -A ${standard} -oa 6 ${file_source} > ${test_current}object-at-6.expect &&
- fss_read +FLn -A ${standard} -oa 100 ${file_source} > ${test_current}object-at-100.expect &&
- fss_read +FLn -A ${standard} -cn hi ${file_source} > ${test_current}object-name-hi.expect &&
- fss_read +FLn -A ${standard} -cn "" ${file_source} > ${test_current}object-name-.expect &&
- fss_read +FLn -A ${standard} -cn мир ${file_source} > ${test_current}object-name-мир.expect &&
- fss_read +FLn -A ${standard} -cn "привет has space" ${file_source} > ${test_current}object-name-привет.expect &&
- fss_read +FLn -A ${standard} -cn a ${file_source} > ${test_current}object-name-a.expect &&
- fss_read +FLn -A ${standard} -cnt hi ${file_source} > ${test_current}object-name-hi-total.expect &&
- fss_read +FLn -A ${standard} -cnt a ${file_source} > ${test_current}object-name-a-total.expect &&
- fss_read +FLn -A ${standard} -cnt "" ${file_source} > ${test_current}object-name--total.expect &&
- fss_read +FLn -A ${standard} -cnt мир ${file_source} > ${test_current}object-name-мир-total.expect &&
- fss_read +FLn -A ${standard} -cnt "привет has space" ${file_source} > ${test_current}object-name-привет-total.expect &&
- fss_read +FLn -A ${standard} -cns hi 0 ${file_source} > ${test_current}object-name-hi-select-0.expect &&
- fss_read +FLn -A ${standard} -cns hi 1 ${file_source} > ${test_current}object-name-hi-select-1.expect &&
- fss_read +FLn -A ${standard} -cns a 0 ${file_source} > ${test_current}object-name-a-select-0.expect &&
- fss_read +FLn -A ${standard} -cns a 1 ${file_source} > ${test_current}object-name-a-select-1.expect &&
- fss_read +FLn -A ${standard} -cns a 2 ${file_source} > ${test_current}object-name-a-select-2.expect &&
- fss_read +FLn -A ${standard} -cns a 5 ${file_source} > ${test_current}object-name-a-select-5.expect &&
- fss_read +FLn -A ${standard} -cns a 6 ${file_source} > ${test_current}object-name-a-select-6.expect &&
- fss_read +FLn -A ${standard} -cns a 100 ${file_source} > ${test_current}object-name-a-select-100.expect &&
- fss_read +FLn -A ${standard} -cns "" 0 ${file_source} > ${test_current}object-name--select-0.expect &&
- fss_read +FLn -A ${standard} -cns "" 1 ${file_source} > ${test_current}object-name--select-1.expect &&
- fss_read +FLn -A ${standard} -cns мир 0 ${file_source} > ${test_current}object-name-мир-select-0.expect &&
- fss_read +FLn -A ${standard} -cns мир 1 ${file_source} > ${test_current}object-name-мир-select-1.expect &&
- fss_read +FLn -A ${standard} -cns привет 0 ${file_source} > ${test_current}object-name-привет-select-0.expect &&
- fss_read +FLn -A ${standard} -cns привет 1 ${file_source} > ${test_current}object-name-привет-select-1.expect &&
- fss_read +FLn -A ${standard} -cnst hi 0 ${file_source} > ${test_current}object-name-hi-select-0-total.expect &&
- fss_read +FLn -A ${standard} -cnst hi 1 ${file_source} > ${test_current}object-name-hi-select-1-total.expect &&
- fss_read +FLn -A ${standard} -cnst a 0 ${file_source} > ${test_current}object-name-a-select-0-total.expect &&
- fss_read +FLn -A ${standard} -cnst a 1 ${file_source} > ${test_current}object-name-a-select-1-total.expect &&
- fss_read +FLn -A ${standard} -cnst a 2 ${file_source} > ${test_current}object-name-a-select-2-total.expect &&
- fss_read +FLn -A ${standard} -cnst a 5 ${file_source} > ${test_current}object-name-a-select-5-total.expect &&
- fss_read +FLn -A ${standard} -cnst a 6 ${file_source} > ${test_current}object-name-a-select-6-total.expect &&
- fss_read +FLn -A ${standard} -cnst a 100 ${file_source} > ${test_current}object-name-a-select-100-total.expect &&
- fss_read +FLn -A ${standard} -cnst "" 0 ${file_source} > ${test_current}object-name--select-0-total.expect &&
- fss_read +FLn -A ${standard} -cnst "" 1 ${file_source} > ${test_current}object-name--select-1-total.expect &&
- fss_read +FLn -A ${standard} -cnst мир 0 ${file_source} > ${test_current}object-name-мир-select-0-total.expect &&
- fss_read +FLn -A ${standard} -cnst мир 1 ${file_source} > ${test_current}object-name-мир-select-1-total.expect &&
- fss_read +FLn -A ${standard} -cnst "привет has space" 0 ${file_source} > ${test_current}object-name-привет-select-0-total.expect &&
- fss_read +FLn -A ${standard} -cnst "привет has space" 1 ${file_source} > ${test_current}object-name-привет-select-1-total.expect &&
-
- fss_read +FLn -A ${standard} -oc ${file_source} > ${test_current}object_and_content.expect &&
- fss_read +FLn -A ${standard} -ocO ${file_source} > ${test_current}object_and_content-original.expect &&
- fss_read +FLn -A ${standard} -oct ${file_source} > ${test_current}object_and_content-total.expect &&
- fss_read +FLn -A ${standard} -ocT ${file_source} > ${test_current}object_and_content-trim.expect &&
- fss_read +FLn -A ${standard} -ocl 0 ${file_source} > ${test_current}object_and_content-line-0.expect &&
- fss_read +FLn -A ${standard} -ocl 1 ${file_source} > ${test_current}object_and_content-line-1.expect &&
- fss_read +FLn -A ${standard} -ocl 5 ${file_source} > ${test_current}object_and_content-line-5.expect &&
- fss_read +FLn -A ${standard} -ocl 6 ${file_source} > ${test_current}object_and_content-line-6.expect &&
- fss_read +FLn -A ${standard} -ocl 100 ${file_source} > ${test_current}object_and_content-line-100.expect &&
- fss_read +FLn -A ${standard} -ocs 0 ${file_source} > ${test_current}object_and_content-select-0.expect &&
- fss_read +FLn -A ${standard} -ocs 1 ${file_source} > ${test_current}object_and_content-select-1.expect &&
- fss_read +FLn -A ${standard} -ocs 5 ${file_source} > ${test_current}object_and_content-select-5.expect &&
- fss_read +FLn -A ${standard} -ocs 6 ${file_source} > ${test_current}object_and_content-select-6.expect &&
- fss_read +FLn -A ${standard} -ocs 100 ${file_source} > ${test_current}object_and_content-select-100.expect &&
- fss_read +FLn -A ${standard} -ocC ${file_source} > ${test_current}object_and_content-columns.expect &&
- fss_read +FLn -A ${standard} -oca 0 ${file_source} > ${test_current}object_and_content-at-0.expect &&
- fss_read +FLn -A ${standard} -oca 1 ${file_source} > ${test_current}object_and_content-at-1.expect &&
- fss_read +FLn -A ${standard} -oca 5 ${file_source} > ${test_current}object_and_content-at-5.expect &&
- fss_read +FLn -A ${standard} -oca 6 ${file_source} > ${test_current}object_and_content-at-6.expect &&
- fss_read +FLn -A ${standard} -oca 100 ${file_source} > ${test_current}object_and_content-at-100.expect &&
- fss_read +FLn -A ${standard} -cn hi ${file_source} > ${test_current}object_and_content-name-hi.expect &&
- fss_read +FLn -A ${standard} -cn a ${file_source} > ${test_current}object_and_content-name-a.expect &&
- fss_read +FLn -A ${standard} -cn "" ${file_source} > ${test_current}object_and_content-name-.expect &&
- fss_read +FLn -A ${standard} -cn мир ${file_source} > ${test_current}object_and_content-name-мир.expect &&
- fss_read +FLn -A ${standard} -cn привет ${file_source} > ${test_current}object_and_content-name-привет.expect &&
- fss_read +FLn -A ${standard} -cnt hi ${file_source} > ${test_current}object_and_content-name-hi-total.expect &&
- fss_read +FLn -A ${standard} -cnt a ${file_source} > ${test_current}object_and_content-name-a-total.expect &&
- fss_read +FLn -A ${standard} -cnt "" ${file_source} > ${test_current}object_and_content-name--total.expect &&
- fss_read +FLn -A ${standard} -cnt мир ${file_source} > ${test_current}object_and_content-name-мир-total.expect &&
- fss_read +FLn -A ${standard} -cnt "привет has space" ${file_source} > ${test_current}object_and_content-name-привет-total.expect &&
- fss_read +FLn -A ${standard} -cns hi 0 ${file_source} > ${test_current}object_and_content-name-hi-select-0.expect &&
- fss_read +FLn -A ${standard} -cns hi 1 ${file_source} > ${test_current}object_and_content-name-hi-select-1.expect &&
- fss_read +FLn -A ${standard} -cns a 0 ${file_source} > ${test_current}object_and_content-name-a-select-0.expect &&
- fss_read +FLn -A ${standard} -cns a 1 ${file_source} > ${test_current}object_and_content-name-a-select-1.expect &&
- fss_read +FLn -A ${standard} -cns a 2 ${file_source} > ${test_current}object_and_content-name-a-select-2.expect &&
- fss_read +FLn -A ${standard} -cns a 5 ${file_source} > ${test_current}object_and_content-name-a-select-5.expect &&
- fss_read +FLn -A ${standard} -cns a 6 ${file_source} > ${test_current}object_and_content-name-a-select-6.expect &&
- fss_read +FLn -A ${standard} -cns a 100 ${file_source} > ${test_current}object_and_content-name-a-select-100.expect &&
- fss_read +FLn -A ${standard} -cns "" 0 ${file_source} > ${test_current}object_and_content-name--select-0.expect &&
- fss_read +FLn -A ${standard} -cns "" 1 ${file_source} > ${test_current}object_and_content-name--select-1.expect &&
- fss_read +FLn -A ${standard} -cns мир 0 ${file_source} > ${test_current}object_and_content-name-мир-select-0.expect &&
- fss_read +FLn -A ${standard} -cns мир 1 ${file_source} > ${test_current}object_and_content-name-мир-select-1.expect &&
- fss_read +FLn -A ${standard} -cns "привет has space" 0 ${file_source} > ${test_current}object_and_content-name-привет-select-0.expect &&
- fss_read +FLn -A ${standard} -cns "привет has space" 1 ${file_source} > ${test_current}object_and_content-name-привет-select-1.expect &&
- fss_read +FLn -A ${standard} -cnst hi 0 ${file_source} > ${test_current}object_and_content-name-hi-select-0-total.expect &&
- fss_read +FLn -A ${standard} -cnst hi 1 ${file_source} > ${test_current}object_and_content-name-hi-select-1-total.expect &&
- fss_read +FLn -A ${standard} -cnst a 0 ${file_source} > ${test_current}object_and_content-name-a-select-0-total.expect &&
- fss_read +FLn -A ${standard} -cnst a 1 ${file_source} > ${test_current}object_and_content-name-a-select-1-total.expect &&
- fss_read +FLn -A ${standard} -cnst a 2 ${file_source} > ${test_current}object_and_content-name-a-select-2-total.expect &&
- fss_read +FLn -A ${standard} -cnst a 5 ${file_source} > ${test_current}object_and_content-name-a-select-5-total.expect &&
- fss_read +FLn -A ${standard} -cnst a 6 ${file_source} > ${test_current}object_and_content-name-a-select-6-total.expect &&
- fss_read +FLn -A ${standard} -cnst a 100 ${file_source} > ${test_current}object_and_content-name-a-select-100-total.expect &&
- fss_read +FLn -A ${standard} -cnst "" 0 ${file_source} > ${test_current}object_and_content-name--select-0-total.expect &&
- fss_read +FLn -A ${standard} -cnst "" 1 ${file_source} > ${test_current}object_and_content-name--select-1-total.expect &&
- fss_read +FLn -A ${standard} -cnst мир 0 ${file_source} > ${test_current}object_and_content-name-мир-select-0-total.expect &&
- fss_read +FLn -A ${standard} -cnst мир 1 ${file_source} > ${test_current}object_and_content-name-мир-select-1-total.expect &&
- fss_read +FLn -A ${standard} -cnst "привет has space" 0 ${file_source} > ${test_current}object_and_content-name-привет-select-0-total.expect &&
- fss_read +FLn -A ${standard} -cnst "привет has space" 1 ${file_source} > ${test_current}object_and_content-name-привет-select-1-total.expect &&
+ fss_read +n -A ${standard} -c ${file_source} > ${test_current}content.expect &&
+ fss_read +n -A ${standard} -cO ${file_source} > ${test_current}content-original.expect &&
+ fss_read +n -A ${standard} -ct ${file_source} > ${test_current}content-total.expect &&
+ fss_read +n -A ${standard} -cT ${file_source} > ${test_current}content-trim.expect &&
+ fss_read +n -A ${standard} -cl 0 ${file_source} > ${test_current}content-line-0.expect &&
+ fss_read +n -A ${standard} -cl 1 ${file_source} > ${test_current}content-line-1.expect &&
+ fss_read +n -A ${standard} -cl 5 ${file_source} > ${test_current}content-line-5.expect &&
+ fss_read +n -A ${standard} -cl 6 ${file_source} > ${test_current}content-line-6.expect &&
+ fss_read +n -A ${standard} -cl 100 ${file_source} > ${test_current}content-line-100.expect &&
+ fss_read +n -A ${standard} -cs 0 ${file_source} > ${test_current}content-select-0.expect &&
+ fss_read +n -A ${standard} -cs 1 ${file_source} > ${test_current}content-select-1.expect &&
+ fss_read +n -A ${standard} -cs 5 ${file_source} > ${test_current}content-select-5.expect &&
+ fss_read +n -A ${standard} -cs 6 ${file_source} > ${test_current}content-select-6.expect &&
+ fss_read +n -A ${standard} -cs 100 ${file_source} > ${test_current}content-select-100.expect &&
+ fss_read +n -A ${standard} -cC ${file_source} > ${test_current}content-columns.expect &&
+ fss_read +n -A ${standard} -ca 0 ${file_source} > ${test_current}content-at-0.expect &&
+ fss_read +n -A ${standard} -ca 1 ${file_source} > ${test_current}content-at-1.expect &&
+ fss_read +n -A ${standard} -ca 5 ${file_source} > ${test_current}content-at-5.expect &&
+ fss_read +n -A ${standard} -ca 6 ${file_source} > ${test_current}content-at-6.expect &&
+ fss_read +n -A ${standard} -ca 100 ${file_source} > ${test_current}content-at-100.expect &&
+ fss_read +n -A ${standard} -cn hi ${file_source} > ${test_current}content-name-hi.expect &&
+ fss_read +n -A ${standard} -cn a ${file_source} > ${test_current}content-name-a.expect &&
+ fss_read +n -A ${standard} -cn "" ${file_source} > ${test_current}content-name-.expect &&
+ fss_read +n -A ${standard} -cn мир ${file_source} > ${test_current}content-name-мир.expect &&
+ fss_read +n -A ${standard} -cn "привет has space" ${file_source} > ${test_current}content-name-привет.expect &&
+ fss_read +n -A ${standard} -cnt hi ${file_source} > ${test_current}content-name-hi-total.expect &&
+ fss_read +n -A ${standard} -cnt a ${file_source} > ${test_current}content-name-a-total.expect &&
+ fss_read +n -A ${standard} -cnt "" ${file_source} > ${test_current}content-name--total.expect &&
+ fss_read +n -A ${standard} -cnt мир ${file_source} > ${test_current}content-name-мир-total.expect &&
+ fss_read +n -A ${standard} -cnt "привет has space" ${file_source} > ${test_current}content-name-привет-total.expect &&
+ fss_read +n -A ${standard} -cns hi 0 ${file_source} > ${test_current}content-name-hi-select-0.expect &&
+ fss_read +n -A ${standard} -cns hi 1 ${file_source} > ${test_current}content-name-hi-select-1.expect &&
+ fss_read +n -A ${standard} -cns a 0 ${file_source} > ${test_current}content-name-a-select-0.expect &&
+ fss_read +n -A ${standard} -cns a 1 ${file_source} > ${test_current}content-name-a-select-1.expect &&
+ fss_read +n -A ${standard} -cns a 2 ${file_source} > ${test_current}content-name-a-select-2.expect &&
+ fss_read +n -A ${standard} -cns a 5 ${file_source} > ${test_current}content-name-a-select-5.expect &&
+ fss_read +n -A ${standard} -cns a 6 ${file_source} > ${test_current}content-name-a-select-6.expect &&
+ fss_read +n -A ${standard} -cns a 100 ${file_source} > ${test_current}content-name-a-select-100.expect &&
+ fss_read +n -A ${standard} -cns "" 0 ${file_source} > ${test_current}content-name--select-0.expect &&
+ fss_read +n -A ${standard} -cns "" 1 ${file_source} > ${test_current}content-name--select-1.expect &&
+ fss_read +n -A ${standard} -cns мир 0 ${file_source} > ${test_current}content-name-мир-select-0.expect &&
+ fss_read +n -A ${standard} -cns мир 1 ${file_source} > ${test_current}content-name-мир-select-1.expect &&
+ fss_read +n -A ${standard} -cns "привет has space" 0 ${file_source} > ${test_current}content-name-привет-select-0.expect &&
+ fss_read +n -A ${standard} -cns "привет has space" 1 ${file_source} > ${test_current}content-name-привет-select-1.expect &&
+ fss_read +n -A ${standard} -cnst hi 0 ${file_source} > ${test_current}content-name-hi-select-0-total.expect &&
+ fss_read +n -A ${standard} -cnst hi 1 ${file_source} > ${test_current}content-name-hi-select-1-total.expect &&
+ fss_read +n -A ${standard} -cnst a 0 ${file_source} > ${test_current}content-name-a-select-0-total.expect &&
+ fss_read +n -A ${standard} -cnst a 1 ${file_source} > ${test_current}content-name-a-select-1-total.expect &&
+ fss_read +n -A ${standard} -cnst a 2 ${file_source} > ${test_current}content-name-a-select-2-total.expect &&
+ fss_read +n -A ${standard} -cnst a 5 ${file_source} > ${test_current}content-name-a-select-5-total.expect &&
+ fss_read +n -A ${standard} -cnst a 6 ${file_source} > ${test_current}content-name-a-select-6-total.expect &&
+ fss_read +n -A ${standard} -cnst a 100 ${file_source} > ${test_current}content-name-a-select-100-total.expect &&
+ fss_read +n -A ${standard} -cnst "" 0 ${file_source} > ${test_current}content-name--select-0-total.expect &&
+ fss_read +n -A ${standard} -cnst "" 1 ${file_source} > ${test_current}content-name--select-1-total.expect &&
+ fss_read +n -A ${standard} -cnst мир 0 ${file_source} > ${test_current}content-name-мир-select-0-total.expect &&
+ fss_read +n -A ${standard} -cnst мир 1 ${file_source} > ${test_current}content-name-мир-select-1-total.expect &&
+ fss_read +n -A ${standard} -cnst "привет has space" 0 ${file_source} > ${test_current}content-name-привет-select-0-total.expect &&
+ fss_read +n -A ${standard} -cnst "привет has space" 1 ${file_source} > ${test_current}content-name-привет-select-1-total.expect &&
+
+ fss_read +n -A ${standard} -o ${file_source} > ${test_current}object.expect &&
+ fss_read +n -A ${standard} -oO ${file_source} > ${test_current}object-original.expect &&
+ fss_read +n -A ${standard} -ot ${file_source} > ${test_current}object-total.expect &&
+ fss_read +n -A ${standard} -oT ${file_source} > ${test_current}object-trim.expect &&
+ fss_read +n -A ${standard} -ol 0 ${file_source} > ${test_current}object-line-0.expect &&
+ fss_read +n -A ${standard} -ol 1 ${file_source} > ${test_current}object-line-1.expect &&
+ fss_read +n -A ${standard} -ol 5 ${file_source} > ${test_current}object-line-5.expect &&
+ fss_read +n -A ${standard} -ol 6 ${file_source} > ${test_current}object-line-6.expect &&
+ fss_read +n -A ${standard} -ol 100 ${file_source} > ${test_current}object-line-100.expect &&
+ fss_read +n -A ${standard} -os 0 ${file_source} > ${test_current}object-select-0.expect &&
+ fss_read +n -A ${standard} -os 1 ${file_source} > ${test_current}object-select-1.expect &&
+ fss_read +n -A ${standard} -os 5 ${file_source} > ${test_current}object-select-5.expect &&
+ fss_read +n -A ${standard} -os 6 ${file_source} > ${test_current}object-select-6.expect &&
+ fss_read +n -A ${standard} -os 100 ${file_source} > ${test_current}object-select-100.expect &&
+ fss_read +n -A ${standard} -oC ${file_source} > ${test_current}object-columns.expect &&
+ fss_read +n -A ${standard} -oa 0 ${file_source} > ${test_current}object-at-0.expect &&
+ fss_read +n -A ${standard} -oa 1 ${file_source} > ${test_current}object-at-1.expect &&
+ fss_read +n -A ${standard} -oa 5 ${file_source} > ${test_current}object-at-5.expect &&
+ fss_read +n -A ${standard} -oa 6 ${file_source} > ${test_current}object-at-6.expect &&
+ fss_read +n -A ${standard} -oa 100 ${file_source} > ${test_current}object-at-100.expect &&
+ fss_read +n -A ${standard} -cn hi ${file_source} > ${test_current}object-name-hi.expect &&
+ fss_read +n -A ${standard} -cn "" ${file_source} > ${test_current}object-name-.expect &&
+ fss_read +n -A ${standard} -cn мир ${file_source} > ${test_current}object-name-мир.expect &&
+ fss_read +n -A ${standard} -cn "привет has space" ${file_source} > ${test_current}object-name-привет.expect &&
+ fss_read +n -A ${standard} -cn a ${file_source} > ${test_current}object-name-a.expect &&
+ fss_read +n -A ${standard} -cnt hi ${file_source} > ${test_current}object-name-hi-total.expect &&
+ fss_read +n -A ${standard} -cnt a ${file_source} > ${test_current}object-name-a-total.expect &&
+ fss_read +n -A ${standard} -cnt "" ${file_source} > ${test_current}object-name--total.expect &&
+ fss_read +n -A ${standard} -cnt мир ${file_source} > ${test_current}object-name-мир-total.expect &&
+ fss_read +n -A ${standard} -cnt "привет has space" ${file_source} > ${test_current}object-name-привет-total.expect &&
+ fss_read +n -A ${standard} -cns hi 0 ${file_source} > ${test_current}object-name-hi-select-0.expect &&
+ fss_read +n -A ${standard} -cns hi 1 ${file_source} > ${test_current}object-name-hi-select-1.expect &&
+ fss_read +n -A ${standard} -cns a 0 ${file_source} > ${test_current}object-name-a-select-0.expect &&
+ fss_read +n -A ${standard} -cns a 1 ${file_source} > ${test_current}object-name-a-select-1.expect &&
+ fss_read +n -A ${standard} -cns a 2 ${file_source} > ${test_current}object-name-a-select-2.expect &&
+ fss_read +n -A ${standard} -cns a 5 ${file_source} > ${test_current}object-name-a-select-5.expect &&
+ fss_read +n -A ${standard} -cns a 6 ${file_source} > ${test_current}object-name-a-select-6.expect &&
+ fss_read +n -A ${standard} -cns a 100 ${file_source} > ${test_current}object-name-a-select-100.expect &&
+ fss_read +n -A ${standard} -cns "" 0 ${file_source} > ${test_current}object-name--select-0.expect &&
+ fss_read +n -A ${standard} -cns "" 1 ${file_source} > ${test_current}object-name--select-1.expect &&
+ fss_read +n -A ${standard} -cns мир 0 ${file_source} > ${test_current}object-name-мир-select-0.expect &&
+ fss_read +n -A ${standard} -cns мир 1 ${file_source} > ${test_current}object-name-мир-select-1.expect &&
+ fss_read +n -A ${standard} -cns привет 0 ${file_source} > ${test_current}object-name-привет-select-0.expect &&
+ fss_read +n -A ${standard} -cns привет 1 ${file_source} > ${test_current}object-name-привет-select-1.expect &&
+ fss_read +n -A ${standard} -cnst hi 0 ${file_source} > ${test_current}object-name-hi-select-0-total.expect &&
+ fss_read +n -A ${standard} -cnst hi 1 ${file_source} > ${test_current}object-name-hi-select-1-total.expect &&
+ fss_read +n -A ${standard} -cnst a 0 ${file_source} > ${test_current}object-name-a-select-0-total.expect &&
+ fss_read +n -A ${standard} -cnst a 1 ${file_source} > ${test_current}object-name-a-select-1-total.expect &&
+ fss_read +n -A ${standard} -cnst a 2 ${file_source} > ${test_current}object-name-a-select-2-total.expect &&
+ fss_read +n -A ${standard} -cnst a 5 ${file_source} > ${test_current}object-name-a-select-5-total.expect &&
+ fss_read +n -A ${standard} -cnst a 6 ${file_source} > ${test_current}object-name-a-select-6-total.expect &&
+ fss_read +n -A ${standard} -cnst a 100 ${file_source} > ${test_current}object-name-a-select-100-total.expect &&
+ fss_read +n -A ${standard} -cnst "" 0 ${file_source} > ${test_current}object-name--select-0-total.expect &&
+ fss_read +n -A ${standard} -cnst "" 1 ${file_source} > ${test_current}object-name--select-1-total.expect &&
+ fss_read +n -A ${standard} -cnst мир 0 ${file_source} > ${test_current}object-name-мир-select-0-total.expect &&
+ fss_read +n -A ${standard} -cnst мир 1 ${file_source} > ${test_current}object-name-мир-select-1-total.expect &&
+ fss_read +n -A ${standard} -cnst "привет has space" 0 ${file_source} > ${test_current}object-name-привет-select-0-total.expect &&
+ fss_read +n -A ${standard} -cnst "привет has space" 1 ${file_source} > ${test_current}object-name-привет-select-1-total.expect &&
+
+ fss_read +n -A ${standard} -oc ${file_source} > ${test_current}object_and_content.expect &&
+ fss_read +n -A ${standard} -ocO ${file_source} > ${test_current}object_and_content-original.expect &&
+ fss_read +n -A ${standard} -oct ${file_source} > ${test_current}object_and_content-total.expect &&
+ fss_read +n -A ${standard} -ocT ${file_source} > ${test_current}object_and_content-trim.expect &&
+ fss_read +n -A ${standard} -ocl 0 ${file_source} > ${test_current}object_and_content-line-0.expect &&
+ fss_read +n -A ${standard} -ocl 1 ${file_source} > ${test_current}object_and_content-line-1.expect &&
+ fss_read +n -A ${standard} -ocl 5 ${file_source} > ${test_current}object_and_content-line-5.expect &&
+ fss_read +n -A ${standard} -ocl 6 ${file_source} > ${test_current}object_and_content-line-6.expect &&
+ fss_read +n -A ${standard} -ocl 100 ${file_source} > ${test_current}object_and_content-line-100.expect &&
+ fss_read +n -A ${standard} -ocs 0 ${file_source} > ${test_current}object_and_content-select-0.expect &&
+ fss_read +n -A ${standard} -ocs 1 ${file_source} > ${test_current}object_and_content-select-1.expect &&
+ fss_read +n -A ${standard} -ocs 5 ${file_source} > ${test_current}object_and_content-select-5.expect &&
+ fss_read +n -A ${standard} -ocs 6 ${file_source} > ${test_current}object_and_content-select-6.expect &&
+ fss_read +n -A ${standard} -ocs 100 ${file_source} > ${test_current}object_and_content-select-100.expect &&
+ fss_read +n -A ${standard} -ocC ${file_source} > ${test_current}object_and_content-columns.expect &&
+ fss_read +n -A ${standard} -oca 0 ${file_source} > ${test_current}object_and_content-at-0.expect &&
+ fss_read +n -A ${standard} -oca 1 ${file_source} > ${test_current}object_and_content-at-1.expect &&
+ fss_read +n -A ${standard} -oca 5 ${file_source} > ${test_current}object_and_content-at-5.expect &&
+ fss_read +n -A ${standard} -oca 6 ${file_source} > ${test_current}object_and_content-at-6.expect &&
+ fss_read +n -A ${standard} -oca 100 ${file_source} > ${test_current}object_and_content-at-100.expect &&
+ fss_read +n -A ${standard} -cn hi ${file_source} > ${test_current}object_and_content-name-hi.expect &&
+ fss_read +n -A ${standard} -cn a ${file_source} > ${test_current}object_and_content-name-a.expect &&
+ fss_read +n -A ${standard} -cn "" ${file_source} > ${test_current}object_and_content-name-.expect &&
+ fss_read +n -A ${standard} -cn мир ${file_source} > ${test_current}object_and_content-name-мир.expect &&
+ fss_read +n -A ${standard} -cn привет ${file_source} > ${test_current}object_and_content-name-привет.expect &&
+ fss_read +n -A ${standard} -cnt hi ${file_source} > ${test_current}object_and_content-name-hi-total.expect &&
+ fss_read +n -A ${standard} -cnt a ${file_source} > ${test_current}object_and_content-name-a-total.expect &&
+ fss_read +n -A ${standard} -cnt "" ${file_source} > ${test_current}object_and_content-name--total.expect &&
+ fss_read +n -A ${standard} -cnt мир ${file_source} > ${test_current}object_and_content-name-мир-total.expect &&
+ fss_read +n -A ${standard} -cnt "привет has space" ${file_source} > ${test_current}object_and_content-name-привет-total.expect &&
+ fss_read +n -A ${standard} -cns hi 0 ${file_source} > ${test_current}object_and_content-name-hi-select-0.expect &&
+ fss_read +n -A ${standard} -cns hi 1 ${file_source} > ${test_current}object_and_content-name-hi-select-1.expect &&
+ fss_read +n -A ${standard} -cns a 0 ${file_source} > ${test_current}object_and_content-name-a-select-0.expect &&
+ fss_read +n -A ${standard} -cns a 1 ${file_source} > ${test_current}object_and_content-name-a-select-1.expect &&
+ fss_read +n -A ${standard} -cns a 2 ${file_source} > ${test_current}object_and_content-name-a-select-2.expect &&
+ fss_read +n -A ${standard} -cns a 5 ${file_source} > ${test_current}object_and_content-name-a-select-5.expect &&
+ fss_read +n -A ${standard} -cns a 6 ${file_source} > ${test_current}object_and_content-name-a-select-6.expect &&
+ fss_read +n -A ${standard} -cns a 100 ${file_source} > ${test_current}object_and_content-name-a-select-100.expect &&
+ fss_read +n -A ${standard} -cns "" 0 ${file_source} > ${test_current}object_and_content-name--select-0.expect &&
+ fss_read +n -A ${standard} -cns "" 1 ${file_source} > ${test_current}object_and_content-name--select-1.expect &&
+ fss_read +n -A ${standard} -cns мир 0 ${file_source} > ${test_current}object_and_content-name-мир-select-0.expect &&
+ fss_read +n -A ${standard} -cns мир 1 ${file_source} > ${test_current}object_and_content-name-мир-select-1.expect &&
+ fss_read +n -A ${standard} -cns "привет has space" 0 ${file_source} > ${test_current}object_and_content-name-привет-select-0.expect &&
+ fss_read +n -A ${standard} -cns "привет has space" 1 ${file_source} > ${test_current}object_and_content-name-привет-select-1.expect &&
+ fss_read +n -A ${standard} -cnst hi 0 ${file_source} > ${test_current}object_and_content-name-hi-select-0-total.expect &&
+ fss_read +n -A ${standard} -cnst hi 1 ${file_source} > ${test_current}object_and_content-name-hi-select-1-total.expect &&
+ fss_read +n -A ${standard} -cnst a 0 ${file_source} > ${test_current}object_and_content-name-a-select-0-total.expect &&
+ fss_read +n -A ${standard} -cnst a 1 ${file_source} > ${test_current}object_and_content-name-a-select-1-total.expect &&
+ fss_read +n -A ${standard} -cnst a 2 ${file_source} > ${test_current}object_and_content-name-a-select-2-total.expect &&
+ fss_read +n -A ${standard} -cnst a 5 ${file_source} > ${test_current}object_and_content-name-a-select-5-total.expect &&
+ fss_read +n -A ${standard} -cnst a 6 ${file_source} > ${test_current}object_and_content-name-a-select-6-total.expect &&
+ fss_read +n -A ${standard} -cnst a 100 ${file_source} > ${test_current}object_and_content-name-a-select-100-total.expect &&
+ fss_read +n -A ${standard} -cnst "" 0 ${file_source} > ${test_current}object_and_content-name--select-0-total.expect &&
+ fss_read +n -A ${standard} -cnst "" 1 ${file_source} > ${test_current}object_and_content-name--select-1-total.expect &&
+ fss_read +n -A ${standard} -cnst мир 0 ${file_source} > ${test_current}object_and_content-name-мир-select-0-total.expect &&
+ fss_read +n -A ${standard} -cnst мир 1 ${file_source} > ${test_current}object_and_content-name-мир-select-1-total.expect &&
+ fss_read +n -A ${standard} -cnst "привет has space" 0 ${file_source} > ${test_current}object_and_content-name-привет-select-0-total.expect &&
+ fss_read +n -A ${standard} -cnst "привет has space" 1 ${file_source} > ${test_current}object_and_content-name-привет-select-1-total.expect &&
echo "Generation Complete"
main->setting.state.step_small = fss_write_allocation_small_d;
- if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
- main->setting.flag &= ~fss_write_main_flag_print_first_e;
- }
- else {
- main->setting.flag |= fss_write_main_flag_print_first_e;
- }
-
- if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
- main->setting.flag &= ~fss_write_main_flag_print_last_e;
- }
- else {
- main->setting.flag |= fss_write_main_flag_print_last_e;
- }
-
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fss_write_print_error(&main->program.error, macro_fss_write_f(f_console_parameter_process));
return;
main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fss_write_print_error(&main->program.error, macro_fss_write_f(fll_program_parameter_process_context_standard));
return;
main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fss_write_print_error(&main->program.error, macro_fss_write_f(fll_program_parameter_process_verbosity_standard));
return;
if (main->program.parameters.array[fss_write_parameter_file_e].values.used > 1) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_must_specify_once(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_file_s);
return;
main->setting.state.status = f_file_stream_open(main->program.parameters.arguments.array[index], f_string_empty_s, &main->program.output.to);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fss_write_print_error_file(&main->program.error, macro_fss_write_f(f_file_stream_open), main->program.parameters.arguments.array[index], f_file_operation_open_s, fll_error_file_type_file_e);
return;
else if (main->program.parameters.array[fss_write_parameter_file_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_file_s);
return;
main->setting.state.status = f_memory_arrays_resize(values->used, sizeof(f_string_dynamic_t), (void **) &main->setting.objects.array, &main->setting.objects.used, &main->setting.objects.size, &f_string_dynamics_delete_callback);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fss_write_print_error(&main->program.error, macro_fss_write_f(f_memory_arrays_resize));
return;
else if (main->program.parameters.array[fss_write_parameter_object_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_object_s);
return;
if (main->program.parameters.array[fss_write_parameter_content_e].values.used > main->program.parameters.array[fss_write_parameter_object_e].values.used) {
main->setting.state.status = F_status_set_error(F_support_not);
- if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fss_write_print_error_one_content_only(&main->program.error);
return;
main->setting.state.status = f_memory_arrays_resize(values_object->used, sizeof(f_string_dynamic_t), (void **) &main->setting.contentss.array, &main->setting.contentss.used, &main->setting.contentss.size, &f_string_dynamics_delete_callback);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fss_write_print_error(&main->program.error, macro_fss_write_f(f_memory_arrays_resize));
return;
main->setting.state.status = f_memory_array_increase_by(total, sizeof(f_string_dynamic_t), (void **) &main->setting.contentss.array[j].array, &main->setting.contentss.array[j].used, &main->setting.contentss.array[j].size);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fss_write_print_error(&main->program.error, macro_fss_write_f(f_memory_array_increase_by));
return;
else if (main->program.parameters.array[fss_write_parameter_content_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_content_s);
return;
main->setting.state.status = f_string_dynamic_append_nulless(main->program.parameters.arguments.array[index], &main->setting.prepend);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fss_write_print_error(&main->program.error, macro_fss_write_f(f_string_dynamic_append_nulless));
return;
for (; range.start < main->program.parameters.arguments.array[index].used; range.start++) {
if (f_fss_is_space(main->program.parameters.arguments.array[index], range, &main->setting.state) == F_false) {
- if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
if (F_status_is_error(main->setting.state.status)) {
fss_write_print_error(&main->program.error, macro_fss_write_f(f_fss_is_space));
}
else if (main->program.parameters.array[fss_write_parameter_prepend_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_prepend_s);
return;
if (main->program.parameters.array[fss_write_parameter_ignore_e].values.used % 2) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_missing_value_requires_amount(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, fss_write_string_two_s);
return;
main->setting.state.status = f_memory_array_increase_by(values_data->used, sizeof(f_ranges_t), (void **) &main->setting.ignoress.array, &main->setting.ignoress.used, &main->setting.ignoress.size);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fss_write_print_error(&main->program.error, macro_fss_write_f(f_memory_array_increase_by));
return;
main->setting.state.status = f_memory_array_increase_by(total, sizeof(f_range_t), (void **) &main->setting.ignoress.array[j].array, &main->setting.ignoress.array[j].used, &main->setting.ignoress.array[j].size);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fss_write_print_error(&main->program.error, macro_fss_write_f(f_memory_array_increase_by));
return;
main->setting.state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, main->program.parameters.arguments.array[index], &main->setting.ignoress.array[j].array[main->setting.ignoress.array[j].used].start);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_integer_not(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, main->program.parameters.arguments.array[index]);
return;
main->setting.state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, main->program.parameters.arguments.array[index], &main->setting.ignoress.array[j].array[main->setting.ignoress.array[j].used].stop);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_integer_not(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, main->program.parameters.arguments.array[index]);
return;
if (main->setting.ignoress.array[j].array[main->setting.ignoress.array[j].used].stop > main->setting.ignoress.array[j].array[main->setting.ignoress.array[j].used].start) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_range_start_before_stop(
&main->program.error,
f_console_symbol_long_normal_s,
main->setting.state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, main->program.parameters.arguments.array[index], &number.start);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_integer_not(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, main->program.parameters.arguments.array[index]);
return;
main->setting.state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, main->program.parameters.arguments.array[index], &number.stop);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_integer_not(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, main->program.parameters.arguments.array[index]);
return;
if (number.start > number.stop) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_range_start_before_stop(
&main->program.error,
f_console_symbol_long_normal_s,
else if (main->program.parameters.array[fss_write_parameter_ignore_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_ignore_s);
if (main->program.parameters.array[has_cannots[i][0]].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_cannot_use_with(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, has_string[i], has_cannots_string[i][0]);
return;
if (main->program.parameters.array[has_cannots[i][1]].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_cannot_use_with(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, has_string[i], has_cannots_string[i][1]);
return;
if (main->program.parameters.array[fss_write_parameter_object_e].locations_sub.used > main->program.parameters.array[fss_write_parameter_content_e].locations_sub.used && !(main->setting.flag & fss_write_main_flag_partial_e)) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fss_write_print_error_parameter_same_times_at_least(&main->program.error);
return;
if (main->program.parameters.array[fss_write_parameter_content_e].result & f_console_result_value_e) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_cannot_use_with_xor(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_write_long_partial_s, fss_write_long_object_s, fss_write_long_content_s);
return;
* - object_open: The Object open characters are to be printed.
* - partial: Do not write end of Object/Content character.
* - pipe: Use the input pipe.
- * - print_first: When set, print new line to message output on program begin after loading settings.
- * - print_last: When set, print new line to message output on program end.
* - trim: Trim Object names.
* - version: Print version.
* - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
fss_write_main_flag_partial_e = 0x400,
fss_write_main_flag_pipe_e = 0x800,
fss_write_main_flag_prepend_e = 0x1000,
- fss_write_main_flag_print_first_e = 0x2000,
- fss_write_main_flag_print_last_e = 0x4000,
- fss_write_main_flag_trim_e = 0x8000,
- fss_write_main_flag_version_e = 0x10000,
- fss_write_main_flag_version_copyright_help_e = 0x10050,
+ fss_write_main_flag_trim_e = 0x2000,
+ fss_write_main_flag_version_e = 0x4000,
+ fss_write_main_flag_version_copyright_help_e = 0x4050,
}; // enum
#endif // _di_fss_write_main_flag_e_
fss_write_main_t * const main = (fss_write_main_t *) void_main;
- if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & fss_write_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
- return;
- }
-
- if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
+ if (F_status_is_error(main->setting.state.status)) return;
main->setting.state.status = F_okay;
fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
- if ((main->setting.flag & fss_write_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
return;
}
}
}
}
-
- if ((main->setting.flag & fss_write_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
}
#endif // _di_fss_write_main_
main->setting.state.step_small = iki_read_allocation_small_d;
- if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
- main->setting.flag &= ~iki_read_main_flag_print_first_e;
- }
- else {
- main->setting.flag |= iki_read_main_flag_print_first_e;
- }
-
- if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
- main->setting.flag &= ~iki_read_main_flag_print_last_e;
- }
- else {
- main->setting.flag |= iki_read_main_flag_print_last_e;
- }
-
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
iki_read_print_error(&main->program.error, macro_iki_read_f(f_console_parameter_process));
return;
main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
iki_read_print_error(&main->program.error, macro_iki_read_f(fll_program_parameter_process_context_standard));
return;
main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
iki_read_print_error(&main->program.error, macro_iki_read_f(fll_program_parameter_process_verbosity_standard));
return;
if (!(main->program.parameters.remaining.used || (main->program.pipe & fll_program_data_pipe_input_e))) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_missing_file(&main->program.error);
return;
if (main->program.parameters.array[iki_read_parameter_whole_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_cannot_use_with(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, iki_read_long_at_s, iki_read_long_whole_s);
return;
if (F_status_is_error(main->setting.state.status)) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_integer_not(&main->program.error, f_console_symbol_long_normal_s, iki_read_long_at_s, main->program.parameters.arguments.array[index]);
return;
else if (main->program.parameters.array[iki_read_parameter_at_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, iki_read_long_at_s);
return;
if (F_status_is_error(main->setting.state.status)) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_integer_not(&main->program.error, f_console_symbol_long_normal_s, iki_read_long_line_s, main->program.parameters.arguments.array[index]);
return;
else if (main->program.parameters.array[iki_read_parameter_line_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, iki_read_long_line_s);
return;
main->setting.state.status = f_memory_array_increase_by(main->program.parameters.array[iki_read_parameter_name_e].values.used, sizeof(f_string_dynamic_t), (void **) &main->setting.names.array, &main->setting.names.used, &main->setting.names.size);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
iki_read_print_error(&main->program.error, macro_iki_read_f(f_memory_array_increase_by));
return;
} // for
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
iki_read_print_error(&main->program.error, macro_iki_read_f(f_string_dynamics_append));
return;
else if (main->program.parameters.array[iki_read_parameter_name_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, iki_read_long_name_s);
return;
if ((main->program.parameters.array[iki_read_parameter_replace_e].result & f_console_result_found_e) || main->program.parameters.array[iki_read_parameter_replace_e].values.used % 2) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_missing_value_requires_amount(&main->program.error, f_console_symbol_long_normal_s, iki_read_long_replace_s, iki_read_string_two_s);
return;
main->setting.state.status = f_memory_array_increase_by(main->program.parameters.array[iki_read_parameter_replace_e].values.used / 2, sizeof(f_string_map_t), (void **) &main->setting.replace.array, &main->setting.replace.used, &main->setting.replace.size);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
iki_read_print_error(&main->program.error, macro_iki_read_f(f_memory_array_increase_by));
return;
}
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
iki_read_print_error(&main->program.error, macro_iki_read_f(f_memory_array_resize));
return;
if ((main->program.parameters.array[iki_read_parameter_wrap_e].result & f_console_result_found_e) || main->program.parameters.array[iki_read_parameter_wrap_e].values.used % 3) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_missing_value_requires_amount(&main->program.error, f_console_symbol_long_normal_s, iki_read_long_wrap_s, iki_read_string_three_s);
return;
main->setting.state.status = f_memory_array_increase_by(main->program.parameters.array[iki_read_parameter_wrap_e].values.used / 3, sizeof(f_string_triple_t), (void **) &main->setting.wrap.array, &main->setting.wrap.used, &main->setting.wrap.size);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
iki_read_print_error(&main->program.error, macro_iki_read_f(f_memory_array_increase_by));
return;
}
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
iki_read_print_error(&main->program.error, macro_iki_read_f(f_memory_array_resize));
return;
if (main->program.parameters.array[ids[i]].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_cannot_use_with(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, iki_read_long_literal_s, names[i]);
return;
if (main->program.parameters.array[ids[i]].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_cannot_use_with(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, iki_read_long_object_s, names[i]);
return;
if (main->program.parameters.array[iki_read_parameter_total_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_cannot_use_with(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, iki_read_long_content_s, iki_read_long_total_s);
return;
if (main->program.parameters.array[iki_read_parameter_whole_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_cannot_use_with(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, iki_read_long_total_s, iki_read_long_wrap_s);
return;
main->setting.state.status = f_memory_arrays_resize(main->program.parameters.remaining.used, sizeof(f_string_dynamic_t), (void **) &main->setting.files.array, &main->setting.files.used, &main->setting.files.size, &f_string_dynamics_delete_callback);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
iki_read_print_error(&main->program.error, macro_iki_read_f(f_memory_arrays_resize));
return;
main->setting.state.status = f_memory_array_resize(0, sizeof(f_char_t), (void **) &main->setting.files.array[main->setting.files.used].string, &main->setting.files.array[main->setting.files.used].used, &main->setting.files.array[main->setting.files.used].size);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
iki_read_print_error(&main->program.error, macro_iki_read_f(f_memory_array_resize));
return;
main->setting.state.status = f_file_exists(main->setting.files.array[main->setting.files.used], F_true);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_error_file_print(&main->program.error, F_status_set_fine(main->setting.state.status), macro_iki_read_f(f_file_exists), fll_error_file_flag_fallback_e, main->setting.files.array[main->setting.files.used], f_file_operation_verify_s, fll_error_file_type_file_e);
return;
if ((parameter.result & f_console_result_found_e) || parameter.values.used % 3) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_missing_value_requires_amount(&main->program.error, f_console_symbol_long_normal_s, name, iki_read_string_three_s);
return F_false;
main->setting.state.status = f_memory_array_increase_by(parameter.values.used / 3, sizeof(f_string_triple_t), (void **) &triple->array, &triple->used, &triple->size);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
iki_read_print_error(&main->program.error, macro_iki_read_f(f_memory_array_increase_by));
return F_false;
}
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
iki_read_print_error(&main->program.error, macro_iki_read_f(f_memory_array_resize));
return F_false;
* - name: Selecting using a specific Vocabulary name.
* - object: Print Objects.
* - pipe: Use the input pipe.
- * - print_first: When set, print new line to message output on program begin after loading settings.
- * - print_last: When set, print new line to message output on program end.
* - replace: Using re-assignments.
* - replace: Using replacements.
* - substitute: Using substitutions.
iki_read_main_flag_name_e = 0x40,
iki_read_main_flag_object_e = 0x80,
iki_read_main_flag_pipe_e = 0x100,
- iki_read_main_flag_print_first_e = 0x200,
- iki_read_main_flag_print_last_e = 0x400,
- iki_read_main_flag_reassign_e = 0x800,
- iki_read_main_flag_replace_e = 0x1000,
- iki_read_main_flag_substitute_e = 0x2000,
- iki_read_main_flag_total_e = 0x4000,
- iki_read_main_flag_version_e = 0x8000,
+ iki_read_main_flag_reassign_e = 0x200,
+ iki_read_main_flag_replace_e = 0x400,
+ iki_read_main_flag_substitute_e = 0x800,
+ iki_read_main_flag_total_e = 0x1000,
+ iki_read_main_flag_version_e = 0x2000,
iki_read_main_flag_version_copyright_help_e = 0x800c,
- iki_read_main_flag_whole_e = 0x10000,
- iki_read_main_flag_wrap_e = 0x20000,
+ iki_read_main_flag_whole_e = 0x4000,
+ iki_read_main_flag_wrap_e = 0x8000,
}; // enum
#endif // _di_iki_read_main_flag_e_
#ifndef _di_iki_read_main_
void iki_read_main(iki_read_main_t * const main) {
- if (!main) return;
-
- if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & iki_read_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
- return;
- }
-
- if ((main->setting.flag & iki_read_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
+ if (!main || F_status_is_error(main->setting.state.status)) return;
main->setting.state.status = F_okay;
fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
- if ((main->setting.flag & iki_read_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
return;
}
f_file_stream_close(&file);
}
}
-
- if ((main->setting.flag & iki_read_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
}
#endif // _di_iki_read_main_
main->setting.state.step_small = iki_write_allocation_small_d;
- if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
- main->setting.flag &= ~iki_write_main_flag_print_first_e;
- }
- else {
- main->setting.flag |= iki_write_main_flag_print_first_e;
- }
-
- if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
- main->setting.flag &= ~iki_write_main_flag_print_last_e;
- }
- else {
- main->setting.flag |= iki_write_main_flag_print_last_e;
- }
-
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & iki_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
iki_write_print_error(&main->program.error, macro_iki_write_f(f_console_parameter_process));
return;
main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & iki_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
iki_write_print_error(&main->program.error, macro_iki_write_f(fll_program_parameter_process_context_standard));
return;
main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & iki_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
iki_write_print_error(&main->program.error, macro_iki_write_f(fll_program_parameter_process_verbosity_standard));
return;
if (main->program.parameters.array[iki_write_parameter_file_e].values.used > 1) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & iki_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_must_specify_once(&main->program.error, f_console_symbol_long_normal_s, iki_write_long_file_s);
return;
main->setting.state.status = f_file_stream_open(main->program.parameters.arguments.array[index], f_string_empty_s, &main->program.output.to);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & iki_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_error_file_print(&main->program.error, F_status_set_fine(main->setting.state.status), macro_iki_write_f(f_file_stream_open), fll_error_file_flag_fallback_e, main->program.parameters.arguments.array[index], f_file_operation_open_s, fll_error_file_type_file_e);
return;
else if (main->program.parameters.array[iki_write_parameter_file_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & iki_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, iki_write_long_file_s);
return;
main->setting.state.status = f_memory_arrays_resize(values->used, sizeof(f_string_dynamic_t), (void **) &main->setting.objects.array, &main->setting.objects.used, &main->setting.objects.size, &f_string_dynamics_delete_callback);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & iki_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
iki_write_print_error(&main->program.error, macro_iki_write_f(f_memory_arrays_resize));
return;
else if (main->program.parameters.array[iki_write_parameter_object_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & iki_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, iki_write_long_object_s);
return;
main->setting.state.status = f_memory_arrays_resize(values->used, sizeof(f_string_dynamic_t), (void **) &main->setting.contents.array, &main->setting.contents.used, &main->setting.contents.size, &f_string_dynamics_delete_callback);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & iki_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
iki_write_print_error(&main->program.error, macro_iki_write_f(f_memory_arrays_resize));
return;
else if (main->program.parameters.array[iki_write_parameter_content_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & iki_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, iki_write_long_content_s);
return;
if (!(main->program.pipe & fll_program_data_pipe_input_e) && !(main->setting.flag & (iki_write_main_flag_content_e | iki_write_parameter_object_e))) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & iki_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
iki_write_print_error_main_missing(&main->program.error);
return;
* - help: Print help.
* - object: The Object being written is specified.
* - pipe: Use the input pipe.
- * - print_first: When set, print new line to message output on program begin after loading settings.
- * - print_last: When set, print new line to message output on program end.
- * - print_last: The Object being written is specified.
* - version: Print version.
* - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
* - wrap: Wrap the vocabulary.
iki_write_main_flag_help_e = 0x8,
iki_write_main_flag_object_e = 0x10,
iki_write_main_flag_pipe_e = 0x20,
- iki_write_main_flag_print_first_e = 0x40,
- iki_write_main_flag_print_last_e = 0x80,
- iki_write_main_flag_version_e = 0x100,
- iki_write_main_flag_version_copyright_help_e = 0x10a,
- iki_write_main_flag_wrap_e = 0x200,
+ iki_write_main_flag_version_e = 0x40,
+ iki_write_main_flag_version_copyright_help_e = 0x4a,
+ iki_write_main_flag_wrap_e = 0x80,
}; // enum
#endif // _di_iki_write_main_flag_e_
#ifndef _di_iki_write_main_
void iki_write_main(iki_write_main_t * const main) {
- if (!main) return;
-
- if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & iki_write_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
- return;
- }
-
- if ((main->setting.flag & iki_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
+ if (!main || F_status_is_error(main->setting.state.status)) return;
main->setting.state.status = F_okay;
fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
- if ((main->setting.flag & iki_write_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
return;
}
fll_print_dynamic_raw(f_string_eol_s, main->program.output.to);
} // for
}
-
- if ((main->setting.flag & iki_write_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
}
#endif // _di_iki_write_main_
main->setting.state.step_small = status_code_allocation_small_d;
- if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
- main->setting.flag &= ~status_code_main_flag_print_first_e;
- }
- else {
- main->setting.flag |= status_code_main_flag_print_first_e;
- }
-
- if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
- main->setting.flag &= ~status_code_main_flag_print_last_e;
- }
- else {
- main->setting.flag |= status_code_main_flag_print_last_e;
- }
-
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & status_code_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
status_code_print_error(&main->program.error, macro_status_code_f(f_console_parameter_process));
return;
main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & status_code_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
status_code_print_error(&main->program.error, macro_status_code_f(fll_program_parameter_process_context_standard));
return;
main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & status_code_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
status_code_print_error(&main->program.error, macro_status_code_f(fll_program_parameter_process_verbosity_standard));
return;
if (!(main->setting.flag & status_code_main_flag_number_e)) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & status_code_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
status_code_print_error_cannot_error_warning_number(&main->program.error);
return;
if (main->setting.flag & status_code_main_flag_fine_e) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & status_code_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_cannot_use_with(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, status_code_long_error_s, status_code_long_fine_s);
return;
else if (main->setting.flag & status_code_main_flag_warning_e && main->setting.flag & status_code_main_flag_fine_e) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & status_code_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_cannot_use_with(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, status_code_long_warning_s, status_code_long_fine_s);
return;
if (main->program.parameters.remaining.used == 0 && !(main->program.pipe & fll_program_data_pipe_input_e)) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & status_code_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
status_code_print_error_no_status_codes(&main->program.error);
return;
* - help: Print help.
* - number: Operate in number mode.
* - pipe: Use the input pipe.
- * - print_first: When set, print new line to message output on program begin after loading settings.
- * - print_last: When set, print new line to message output on program end.
* - version: Print version.
* - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
* - warning: Check if status is "warning".
status_code_main_flag_help_e = 0x8,
status_code_main_flag_number_e = 0x10,
status_code_main_flag_pipe_e = 0x20,
- status_code_main_flag_print_first_e = 0x40,
- status_code_main_flag_print_last_e = 0x80,
- status_code_main_flag_version_e = 0x100,
- status_code_main_flag_version_copyright_help_e = 0x109,
- status_code_main_flag_warning_e = 0x200,
+ status_code_main_flag_version_e = 0x40,
+ status_code_main_flag_version_copyright_help_e = 0x49,
+ status_code_main_flag_warning_e = 0x80,
}; // enum
#endif // _di_status_code_main_flag_e_
#ifndef _di_status_code_main_
void status_code_main(status_code_main_t * const main) {
- if (!main) return;
-
- if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & status_code_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
- return;
- }
-
- if ((main->setting.flag & status_code_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
+ if (!main || F_status_is_error(main->setting.state.status)) return;
if (!main->setting.status_string_from || !main->setting.status_string_to) {
if (!main->setting.status_string_from) {
status_code_print_error_invalid_callback(&main->program.error, macro_status_code_f(status_string_to));
}
- if ((main->setting.flag & status_code_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
main->setting.state.status = F_status_set_error(F_parameter);
return;
fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
- if ((main->setting.flag & status_code_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
return;
}
if (main->setting.state.status == F_status_set_error(F_interrupt)) {
fll_program_print_signal_received(&main->program.warning, main->program.signal_received);
}
-
- if ((main->setting.flag & status_code_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
}
#endif // _di_status_code_main_
main->setting.state.step_small = utf8_allocation_small_d;
- if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) {
- main->setting.flag &= ~utf8_main_flag_print_first_e;
- }
- else {
- main->setting.flag |= utf8_main_flag_print_first_e;
- }
-
- if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) {
- main->setting.flag &= ~utf8_main_flag_print_last_e;
- }
- else {
- main->setting.flag |= utf8_main_flag_print_last_e;
- }
-
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & utf8_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
utf8_print_error(&main->program.error, macro_utf8_f(f_console_parameter_process));
return;
main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & utf8_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
utf8_print_error(&main->program.error, macro_utf8_f(fll_program_parameter_process_context_standard));
return;
main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & utf8_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
utf8_print_error(&main->program.error, macro_utf8_f(fll_program_parameter_process_verbosity_standard));
return;
main->setting.state.status = f_console_parameter_prioritize_right(main->program.parameters, choices, &choice);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & utf8_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
utf8_print_error(&main->program.error, macro_utf8_f(f_console_parameter_prioritize_right));
return;
main->setting.state.status = f_console_parameter_prioritize_right(main->program.parameters, choices, &choice);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & utf8_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
utf8_print_error(&main->program.error, macro_utf8_f(f_console_parameter_prioritize_right));
return;
if (main->program.parameters.array[utf8_parameter_to_file_e].values.used > 1) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & utf8_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
utf8_print_error_parameter_file_to_too_many(&main->program.error);
return;
main->setting.state.status = f_memory_array_increase_by(1, sizeof(f_string_dynamic_t), (void **) &main->setting.path_files_to.array, &main->setting.path_files_to.used, &main->setting.path_files_to.size);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & utf8_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
utf8_print_error(&main->program.error, macro_utf8_f(f_memory_array_increase_by));
return;
main->setting.state.status = f_string_dynamic_append_nulless(main->program.parameters.arguments.array[main->program.parameters.array[utf8_parameter_to_file_e].values.array[0]], &main->setting.path_files_to.array[0]);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & utf8_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
utf8_print_error(&main->program.error, macro_utf8_f(f_string_dynamic_append_nulless));
return;
main->setting.state.status = f_file_stream_open(main->program.parameters.arguments.array[main->program.parameters.array[utf8_parameter_to_file_e].values.array[0]], f_file_open_mode_write_append_s, &main->program.output.to);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & utf8_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
utf8_print_error_file(&main->program.error, macro_utf8_f(f_file_stream_open), main->program.parameters.arguments.array[main->program.parameters.array[utf8_parameter_to_file_e].values.array[0]], f_file_operation_open_s, fll_error_file_type_file_e);
return;
main->setting.flag |= utf8_main_flag_file_to_e;
}
else {
- if ((main->setting.flag & utf8_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
utf8_print_error_parameter_file_name_empty(&main->program.error, main->program.parameters.array[utf8_parameter_to_file_e].values.array[0]);
main->setting.state.status = F_status_set_error(F_parameter);
else if (main->program.parameters.array[utf8_parameter_to_file_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & utf8_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, utf8_long_to_file_s);
return;
main->setting.state.status = f_memory_array_increase_by(main->program.parameters.array[utf8_parameter_from_file_e].values.used, sizeof(f_string_dynamic_t), (void **) &main->setting.path_files_from.array, &main->setting.path_files_from.used, &main->setting.path_files_from.size);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & utf8_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
utf8_print_error(&main->program.error, macro_utf8_f(f_memory_array_increase_by));
return;
main->setting.state.status = f_string_dynamic_append(main->program.parameters.arguments.array[index], &main->setting.path_files_from.array[i]);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & utf8_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), macro_utf8_f(f_string_dynamic_append_nulless), fll_error_file_flag_fallback_e);
break;
}
}
else {
- if (F_status_is_error_not(main->setting.state.status)) {
- if ((main->setting.flag & utf8_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
- }
-
utf8_print_error_parameter_file_name_empty(&main->program.error, index);
if (F_status_is_error_not(main->setting.state.status)) {
else if (main->program.parameters.array[utf8_parameter_from_file_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & utf8_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, utf8_long_from_file_s);
return;
main->setting.state.status = f_memory_array_increase_by(main->program.parameters.remaining.used, sizeof(f_string_dynamic_t), (void **) &main->setting.remaining.array, &main->setting.remaining.used, &main->setting.remaining.size);
if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & utf8_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
utf8_print_error(&main->program.error, macro_utf8_f(f_memory_array_increase_by));
return;
if (!((main->setting.flag & (utf8_main_flag_pipe_e | utf8_main_flag_file_from_e)) || main->program.parameters.remaining.used)) {
main->setting.state.status = F_status_set_error(F_parameter);
- if ((main->setting.flag & utf8_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
utf8_print_error_no_from(&main->program.error);
return;
* - header: Enable printing of headers.
* - help: Print help.
* - pipe: Use the input pipe.
- * - print_first: When set, print new line to message output on program begin after loading settings.
- * - print_last: When set, print new line to message output on program end.
* - separate: Enable printing of separators.
* - strip_invalid: Using strip invalid character mode.
* - verify: Using verify mode.
utf8_main_flag_header_e = 0x8,
utf8_main_flag_help_e = 0x10,
utf8_main_flag_pipe_e = 0x20,
- utf8_main_flag_print_first_e = 0x40,
- utf8_main_flag_print_last_e = 0x80,
- utf8_main_flag_separate_e = 0x100,
- utf8_main_flag_strip_invalid_e = 0x200,
- utf8_main_flag_verify_e = 0x400,
- utf8_main_flag_version_e = 0x800,
- utf8_main_flag_version_copyright_help_e = 0x811,
+ utf8_main_flag_separate_e = 0x40,
+ utf8_main_flag_strip_invalid_e = 0x80,
+ utf8_main_flag_verify_e = 0x100,
+ utf8_main_flag_version_e = 0x200,
+ utf8_main_flag_version_copyright_help_e = 0x211,
}; // enum
#endif // _di_utf8_main_flag_e_
#ifndef _di_utf8_main_
void utf8_main(utf8_main_t * const main) {
- if (!main) return;
-
- if (F_status_is_error(main->setting.state.status)) {
- if ((main->setting.flag & utf8_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
- return;
- }
-
- if ((main->setting.flag & utf8_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
+ if (!main || F_status_is_error(main->setting.state.status)) return;
main->setting.state.status = F_okay;
fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
- if ((main->setting.flag & utf8_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
-
return;
}
} // for
}
- if ((main->setting.flag & utf8_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
-
- // The last line for data is not printed under certain circumstances, but when last line is printed to screen, print an extra last line.
- if (F_status_is_error_not(main->setting.state.status) && F_status_set_fine(main->setting.state.status) != F_interrupt) {
- if (!(main->setting.flag & (utf8_main_flag_file_to_e | utf8_main_flag_header_e | utf8_main_flag_separate_e))) {
- fll_print_dynamic_raw(f_string_eol_s, main->program.message.to);
- }
- }
- }
-
if (F_status_is_error(main->setting.state.status) || main->setting.state.status == F_interrupt) return;
main->setting.state.status = (main->setting.flag & utf8_main_flag_verify_e) ? valid : F_okay;