An alternative to the ftw() is desired.
The function, fl_directory_do() is provided to perform generic recursive tasks.
This is based off of the fl_directory_copy() function.
This is not yet tested and there may be changes in the future once this is tested.
I noticed some things that could be improved in fl_directory_copy().
The recursion structure is actually specific to fl_directory_copy(), so rename it with "copy" in the name.
Add additional status codes that might be useful:
- F_bottom
- F_bottom_not
- F_character
- F_character_not
- F_fifo
- F_fifo_not
- F_middle
- F_middle_not
- F_regular
- F_regular_not
- F_top
- F_top_not
Provide a standard macro initializer and use it to make project maintenance easier.
This reduces lines of code in the programs.
Update the program flags:
- Use "in" and "out" instead of "to" and "from".
- Separate the "file" from the now "in" and "out".
Update the build settings files, making sure the locale and language environment variables are exposed by default.
Relocate the utf-8 code that previously didn't properly get properly relocated.
#define _di_f_directory_mode_
//#define _di_f_directory_open_
#define _di_f_directory_open_at_
-//#define _di_f_directory_recurse_delete_
-#define _di_f_directory_recurse_destroy_
-//#define _di_f_directory_recurse_flag_e_
-//#define _di_f_directory_recurse_t_
+//#define _di_f_directory_recurse_copy_delete_
+#define _di_f_directory_recurse_copy_destroy_
+//#define _di_f_directory_recurse_copy_flag_e_
+//#define _di_f_directory_recurse_copy_t_
+#define _di_f_directory_recurse_do_delete_
+#define _di_f_directory_recurse_do_destroy_
+#define _di_f_directory_recurse_do_flag_e_
+#define _di_f_directory_recurse_do_t_
//#define _di_f_directory_remove_
//#define _di_f_directory_remove_custom_
#define _di_f_directory_s_
//#define _di_fl_directory_copy_
//#define _di_fl_directory_create_
+#define _di_fl_directory_do_
//#define _di_fl_directory_list_
#define _di_fl_directory_path_pop_
#define _di_fl_directory_path_push_
#endif // _di_f_directory_max_d_
/**
- * Directory recurse flags.
+ * Directory recurse copy flags.
*
- * f_directory_recurse_flag_*:
+ * f_directory_recurse_copy_flag_*_e:
* - none: No flags are set.
* - clone: Operate as clone instead of as copy, if applicable.
* - dereference: Dereference symbolic links rather than operating on the link itself.
* - owner: File flag representing copying the owner.
* - top: Operate on top directory and not just inside the directory.
*/
-#ifndef _di_f_directory_recurse_flag_e_
+#ifndef _di_f_directory_recurse_copy_flag_e_
enum {
- f_directory_recurse_flag_none_e = 0,
- f_directory_recurse_flag_clone_e = 0x1,
- f_directory_recurse_flag_dereference_e = 0x2,
- f_directory_recurse_flag_exclusive_e = 0x4,
- f_directory_recurse_flag_group_e = 0x8,
- f_directory_recurse_flag_owner_e = 0x10,
- f_directory_recurse_flag_top_e = 0x20,
+ f_directory_recurse_copy_flag_none_e = 0,
+ f_directory_recurse_copy_flag_clone_e = 0x1,
+ f_directory_recurse_copy_flag_dereference_e = 0x2,
+ f_directory_recurse_copy_flag_exclusive_e = 0x4,
+ f_directory_recurse_copy_flag_group_e = 0x8,
+ f_directory_recurse_copy_flag_owner_e = 0x10,
+ f_directory_recurse_copy_flag_top_e = 0x20,
}; // enum
-#endif // _di_f_directory_recurse_flag_e_
+#endif // _di_f_directory_recurse_copy_flag_e_
+
+/**
+ * Directory recurse do flags.
+ *
+ * f_directory_recurse_do_flag_*_e:
+ * For the recurse flag property.
+ * - none: No flags are set.
+ * - dereference: Dereference symbolic links rather than operating on the link itself.
+ * - first: Operate on directory first (before recursion).
+ * - last: Operate on directory last (after recursion).
+ * - top: Operate on top-most directory, or for the callback parameter, designate that this is the top path.
+ *
+ * For the action callback parameter.
+ * - block: File is a block.
+ * - character: File is a character.
+ * - directory: File is a directory.
+ * - fifo: File is a file-in/file-out.
+ * - link: File is a link.
+ * - regular: File is a regular file.
+ * - socket: File is a socket.
+ * - unknown: File is an unknown type.
+ */
+#ifndef _di_f_directory_recurse_do_flag_e_
+ enum {
+
+ // For the recurse flag property.
+ f_directory_recurse_do_flag_none_e = 0,
+ f_directory_recurse_do_flag_dereference_e = 0x1,
+ f_directory_recurse_do_flag_first_e = 0x2,
+ f_directory_recurse_do_flag_last_e = 0x4,
+ f_directory_recurse_do_flag_top_e = 0x8,
+
+ // For the action callback parameter.
+ f_directory_recurse_do_flag_block_e = 0x10,
+ f_directory_recurse_do_flag_character_e = 0x20,
+ f_directory_recurse_do_flag_directory_e = 0x40,
+ f_directory_recurse_do_flag_fifo_e = 0x80,
+ f_directory_recurse_do_flag_link_e = 0x100,
+ f_directory_recurse_do_flag_regular_e = 0x200,
+ f_directory_recurse_do_flag_socket_e = 0x400,
+ f_directory_recurse_do_flag_unknown_e = 0x800,
+ }; // enum
+#endif // _di_f_directory_recurse_do_flag_e_
#ifdef __cplusplus
} // extern "C"
}
#endif // _di_f_directory_listing_destroy_
-#ifndef _di_f_directory_recurse_delete_
- f_status_t f_directory_recurse_delete(f_directory_recurse_t * const recurse) {
+#ifndef _di_f_directory_recurse_copy_delete_
+ f_status_t f_directory_recurse_copy_delete(f_directory_recurse_copy_t * const recurse) {
#ifndef _di_level_0_parameter_checking_
if (!recurse) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return F_none;
}
-#endif // _di_f_directory_recurse_delete_
+#endif // _di_f_directory_recurse_copy_delete_
-#ifndef _di_f_directory_recurse_destroy_
- f_status_t f_directory_recurse_destroy(f_directory_recurse_t * const recurse) {
+#ifndef _di_f_directory_recurse_copy_destroy_
+ f_status_t f_directory_recurse_copy_destroy(f_directory_recurse_copy_t * const recurse) {
#ifndef _di_level_0_parameter_checking_
if (!recurse) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return F_none;
}
-#endif // _di_f_directory_recurse_destroy_
+#endif // _di_f_directory_recurse_copy_destroy_
+
+#ifndef _di_f_directory_recurse_do_delete_
+ f_status_t f_directory_recurse_do_delete(f_directory_recurse_do_t * const recurse) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!recurse) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ f_directory_listing_delete(&recurse->listing);
+
+ return F_none;
+ }
+#endif // _di_f_directory_recurse_do_delete_
+
+#ifndef _di_f_directory_recurse_do_destroy_
+ f_status_t f_directory_recurse_do_destroy(f_directory_recurse_do_t * const recurse) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!recurse) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ f_directory_listing_destroy(&recurse->listing);
+
+ return F_none;
+ }
+#endif // _di_f_directory_recurse_do_destroy_
#ifndef _di_f_directory_statuss_adjust_
f_status_t f_directory_statuss_adjust(const f_array_length_t length, f_directory_statuss_t * const statuss) {
#endif // _di_f_directory_statuss_t_
/**
- * A structure containing directory recursion information.
+ * A structure containing directory recursion information for copy or clone operations.
*
* The flag is processed as follows (using f_file_stat_flags_*_e):
* - f_file_stat_flag_exclusive_e:
*
* (For a clone operation, the file mode is always copied.)
*
- * The failure() and verbose() callbacks provide full access to this f_directory_recurse_t structure.
+ * The verbose() callbacks provide full access to this f_directory_recurse_copy_t structure.
* These callbacks must take care to properly modify the structure or they could cause security, integrity, or functionality problems.
*
* flag: A set of flags used exclusively by the directory recurse process (not to be confused with state.flag).
* destination_top: A pointer to the top destination string, used for error handling and printing (generally assigned internally).
* verbose: A callback used for printing verbose messages (Set to NULL to not use).
*
- * The macro_f_directory_recurse_t_initialize_1() all arguments.
- * The macro_f_directory_recurse_t_initialize_2() all arguments except for internally managed source, destination, mode, and depth.
+ * The macro_f_directory_recurse_copy_t_initialize_1() all arguments.
+ * The macro_f_directory_recurse_copy_t_initialize_2() all arguments except for internally managed source, destination, mode, and depth.
*/
-#ifndef _di_f_directory_recurse_t_
+#ifndef _di_f_directory_recurse_copy_t_
typedef struct {
f_number_unsigned_t max_depth;
f_number_unsigned_t size_block;
const f_string_static_t *destination_top;
void (*verbose)(const f_string_static_t source, const f_string_static_t destination, void * const recurse);
- } f_directory_recurse_t;
+ } f_directory_recurse_copy_t;
- #define f_directory_recurse_t_initialize { \
+ #define f_directory_recurse_copy_t_initialize { \
F_directory_max_recurse_depth_d, \
F_file_default_read_size_d, \
F_file_flag_write_only_d, \
0, \
}
- #define macro_f_directory_recurse_t_initialize_1(max_depth, size_block, flag, depth, mode, state, listing, source, source_top, destination, destination_top, verbose) { \
+ #define macro_f_directory_recurse_copy_t_initialize_1(max_depth, size_block, flag, depth, mode, state, listing, source, source_top, destination, destination_top, verbose) { \
max_depth, \
size_block, \
flag, \
verbose, \
}
- #define macro_f_directory_recurse_t_initialize_2(max_depth, size_block, flag, depth, mode, state, verbose) { \
+ #define macro_f_directory_recurse_copy_t_initialize_2(max_depth, size_block, flag, depth, mode, state, verbose) { \
max_depth, \
size_block, \
flag, \
0, \
verbose, \
}
-#endif // _di_f_directory_recurse_t_
+#endif // _di_f_directory_recurse_copy_t_
+
+/**
+ * A structure containing directory recursion information.
+ *
+ * The action() callbacks provide full access to this f_directory_recurse_do_t structure.
+ * The callback must take care to properly modify the structure or they could cause security, integrity, or functionality problems.
+ * The action callback may set any of the following on the state.status to have the following effects:
+ * - Any status (with error bit set): Immediately return as error.
+ * - F_break: Break out of the current loop.
+ * - F_continue: Skip to the next iteration in the current loop.
+ * - F_done: immedately return as success but do nothing else in this recursion.
+ *
+ * max_depth: The maximum recursion depth to use.
+ * depth: A number representing the depth recursed thus far (generally assigned internally).
+ * flag: A set of flags used exclusively by the directory recurse process (not to be confused with state.flag).
+ * state: A pointer to the state information.
+ * listing: A directory listing structure used internally to help reduce repeated memory allocation overhead.
+ * path: A pointer to the current path string, used for error handling and printing (generally assigned internally).
+ * path_top: A pointer to the top path string, used for error handling and printing (generally assigned internally).
+ * action: A callback used for performing some action (this is required to do anything).
+ *
+ * The macro_f_directory_recurse_do_t_initialize_1() all arguments.
+ * The macro_f_directory_recurse_do_t_initialize_2() all arguments except for internally managed source, destination, mode, and depth.
+ */
+#ifndef _di_f_directory_recurse_do_t_
+ typedef struct {
+ f_number_unsigned_t max_depth;
+ f_array_length_t depth;
+ uint8_t flag;
+
+ f_state_t state;
+ f_directory_listing_t listing;
+
+ const f_string_static_t *path;
+ const f_string_static_t *path_top;
+
+ void (*action)(void * const recurse, const uint16_t flag);
+ } f_directory_recurse_do_t;
+
+ #define f_directory_recurse_do_t_initialize { \
+ F_directory_max_recurse_depth_d, \
+ 0, \
+ f_directory_recurse_do_flag_none_e, \
+ f_state_t_initialize, \
+ f_directory_listing_t_initialize, \
+ 0, \
+ 0, \
+ 0, \
+ }
+
+ #define macro_f_directory_recurse_do_t_initialize_1(max_depth, depth, flag, state, listing, path, path_top, action) { \
+ max_depth, \
+ depth, \
+ flag, \
+ state, \
+ listing, \
+ path, \
+ path_top, \
+ action, \
+ }
+
+ #define macro_f_directory_recurse_do_t_initialize_2(max_depth, depth, flag, state, action) { \
+ max_depth, \
+ depth,\
+ flag, \
+ state, \
+ f_directory_listing_t_initialize, \
+ 0, \
+ 0, \
+ action, \
+ }
+#endif // _di_f_directory_recurse_do_t_
/**
* Delete all arrays within the listing.
*
* @see f_string_dynamics_resize()
*/
-#ifndef _di_f_directory_recurse_delete_
- extern f_status_t f_directory_recurse_delete(f_directory_recurse_t * const recurse);
-#endif // _di_f_directory_recurse_delete_
+#ifndef _di_f_directory_recurse_copy_delete_
+ extern f_status_t f_directory_recurse_copy_delete(f_directory_recurse_copy_t * const recurse);
+#endif // _di_f_directory_recurse_copy_delete_
+
+/**
+ * Destroy all non-pointer based dynamic arrays within the recurse.
+ *
+ * @param recurse
+ * The recurse to fully destroy.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_string_dynamics_adjust().
+ *
+ * @see f_string_dynamics_adjust()
+ */
+#ifndef _di_f_directory_recurse_copy_destroy_
+ extern f_status_t f_directory_recurse_copy_destroy(f_directory_recurse_copy_t * const recurse);
+#endif // _di_f_directory_recurse_copy_destroy_
+
+/**
+ * Delete all non-pointer based dynamic arrays within the recurse.
+ *
+ * @param recurse
+ * The recurse to fully delete.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_string_dynamics_resize().
+ *
+ * @see f_string_dynamics_resize()
+ */
+#ifndef _di_f_directory_recurse_do_delete_
+ extern f_status_t f_directory_recurse_do_delete(f_directory_recurse_do_t * const recurse);
+#endif // _di_f_directory_recurse_do_delete_
/**
* Destroy all non-pointer based dynamic arrays within the recurse.
*
* @see f_string_dynamics_adjust()
*/
-#ifndef _di_f_directory_recurse_destroy_
- extern f_status_t f_directory_recurse_destroy(f_directory_recurse_t * const recurse);
-#endif // _di_f_directory_recurse_destroy_
+#ifndef _di_f_directory_recurse_do_destroy_
+ extern f_status_t f_directory_recurse_do_destroy(f_directory_recurse_do_t * const recurse);
+#endif // _di_f_directory_recurse_do_destroy_
/**
* Resize all parts of the directory statuss structure using the same length.
F_block_not,
F_body,
F_body_not,
+ F_bottom,
+ F_bottom_not,
F_bound,
F_bound_not,
F_break,
F_call_not,
F_capability,
F_capability_not,
+ F_character,
+ F_character_not,
F_child,
F_child_not,
F_complete,
F_failure_not,
F_family,
F_family_not,
+ F_fifo,
+ F_fifo_not,
F_first,
F_first_not,
F_footer,
F_memory_not,
F_message,
F_message_not,
+ F_middle,
+ F_middle_not,
F_minor,
F_minor_not,
F_moderate,
F_recover_not,
F_recurse,
F_recurse_not,
+ F_regular,
+ F_regular_not,
F_relative,
F_relative_not,
F_remote,
F_time_out,
F_too_large,
F_too_small,
+ F_top,
+ F_top_not,
F_type,
F_type_not,
F_user,
const f_string_static_t f_status_block_not_s = macro_f_string_static_t_initialize(F_status_block_not_s, 0, F_status_block_not_s_length);
const f_string_static_t f_status_body_s = macro_f_string_static_t_initialize(F_status_body_s, 0, F_status_body_s_length);
const f_string_static_t f_status_body_not_s = macro_f_string_static_t_initialize(F_status_body_not_s, 0, F_status_body_not_s_length);
+ const f_string_static_t f_status_bottom_s = macro_f_string_static_t_initialize(F_status_bottom_s, 0, F_status_bottom_s_length);
+ const f_string_static_t f_status_bottom_not_s = macro_f_string_static_t_initialize(F_status_bottom_not_s, 0, F_status_bottom_not_s_length);
const f_string_static_t f_status_bound_s = macro_f_string_static_t_initialize(F_status_bound_s, 0, F_status_bound_s_length);
const f_string_static_t f_status_bound_not_s = macro_f_string_static_t_initialize(F_status_bound_not_s, 0, F_status_bound_not_s_length);
const f_string_static_t f_status_break_s = macro_f_string_static_t_initialize(F_status_break_s, 0, F_status_break_s_length);
const f_string_static_t f_status_call_not_s = macro_f_string_static_t_initialize(F_status_call_not_s, 0, F_status_call_not_s_length);
const f_string_static_t f_status_capability_s = macro_f_string_static_t_initialize(F_status_capability_s, 0, F_status_capability_s_length);
const f_string_static_t f_status_capability_not_s = macro_f_string_static_t_initialize(F_status_capability_not_s, 0, F_status_capability_not_s_length);
+ const f_string_static_t f_status_character_s = macro_f_string_static_t_initialize(F_status_character_s, 0, F_status_character_s_length);
+ const f_string_static_t f_status_character_not_s = macro_f_string_static_t_initialize(F_status_character_not_s, 0, F_status_character_not_s_length);
const f_string_static_t f_status_child_s = macro_f_string_static_t_initialize(F_status_child_s, 0, F_status_child_s_length);
const f_string_static_t f_status_child_not_s = macro_f_string_static_t_initialize(F_status_child_not_s, 0, F_status_child_not_s_length);
const f_string_static_t f_status_complete_s = macro_f_string_static_t_initialize(F_status_complete_s, 0, F_status_complete_s_length);
const f_string_static_t f_status_failure_not_s = macro_f_string_static_t_initialize(F_status_failure_not_s, 0, F_status_failure_not_s_length);
const f_string_static_t f_status_family_s = macro_f_string_static_t_initialize(F_status_family_s, 0, F_status_family_s_length);
const f_string_static_t f_status_family_not_s = macro_f_string_static_t_initialize(F_status_family_not_s, 0, F_status_family_not_s_length);
+ const f_string_static_t f_status_fifo_s = macro_f_string_static_t_initialize(F_status_fifo_s, 0, F_status_fifo_s_length);
+ const f_string_static_t f_status_fifo_not_s = macro_f_string_static_t_initialize(F_status_fifo_not_s, 0, F_status_fifo_not_s_length);
const f_string_static_t f_status_first_s = macro_f_string_static_t_initialize(F_status_first_s, 0, F_status_first_s_length);
const f_string_static_t f_status_first_not_s = macro_f_string_static_t_initialize(F_status_first_not_s, 0, F_status_first_not_s_length);
const f_string_static_t f_status_footer_s = macro_f_string_static_t_initialize(F_status_footer_s, 0, F_status_footer_s_length);
const f_string_static_t f_status_memory_not_s = macro_f_string_static_t_initialize(F_status_memory_not_s, 0, F_status_memory_not_s_length);
const f_string_static_t f_status_message_s = macro_f_string_static_t_initialize(F_status_message_s, 0, F_status_message_s_length);
const f_string_static_t f_status_message_not_s = macro_f_string_static_t_initialize(F_status_message_not_s, 0, F_status_message_not_s_length);
+ const f_string_static_t f_status_middle_s = macro_f_string_static_t_initialize(F_status_middle_s, 0, F_status_middle_s_length);
+ const f_string_static_t f_status_middle_not_s = macro_f_string_static_t_initialize(F_status_middle_not_s, 0, F_status_middle_not_s_length);
const f_string_static_t f_status_minor_s = macro_f_string_static_t_initialize(F_status_minor_s, 0, F_status_minor_s_length);
const f_string_static_t f_status_minor_not_s = macro_f_string_static_t_initialize(F_status_minor_not_s, 0, F_status_minor_not_s_length);
const f_string_static_t f_status_moderate_s = macro_f_string_static_t_initialize(F_status_moderate_s, 0, F_status_moderate_s_length);
const f_string_static_t f_status_recover_not_s = macro_f_string_static_t_initialize(F_status_recover_not_s, 0, F_status_recover_not_s_length);
const f_string_static_t f_status_recurse_s = macro_f_string_static_t_initialize(F_status_recurse_s, 0, F_status_recurse_s_length);
const f_string_static_t f_status_recurse_not_s = macro_f_string_static_t_initialize(F_status_recurse_not_s, 0, F_status_recurse_not_s_length);
+ const f_string_static_t f_status_regular_s = macro_f_string_static_t_initialize(F_status_regular_s, 0, F_status_regular_s_length);
+ const f_string_static_t f_status_regular_not_s = macro_f_string_static_t_initialize(F_status_regular_not_s, 0, F_status_regular_not_s_length);
const f_string_static_t f_status_relative_s = macro_f_string_static_t_initialize(F_status_relative_s, 0, F_status_relative_s_length);
const f_string_static_t f_status_relative_not_s = macro_f_string_static_t_initialize(F_status_relative_not_s, 0, F_status_relative_not_s_length);
const f_string_static_t f_status_remote_s = macro_f_string_static_t_initialize(F_status_remote_s, 0, F_status_remote_s_length);
const f_string_static_t f_status_time_out_s = macro_f_string_static_t_initialize(F_status_time_out_s, 0, F_status_time_out_s_length);
const f_string_static_t f_status_too_large_s = macro_f_string_static_t_initialize(F_status_too_large_s, 0, F_status_too_large_s_length);
const f_string_static_t f_status_too_small_s = macro_f_string_static_t_initialize(F_status_too_small_s, 0, F_status_too_small_s_length);
+ const f_string_static_t f_status_top_s = macro_f_string_static_t_initialize(F_status_top_s, 0, F_status_top_s_length);
+ const f_string_static_t f_status_top_not_s = macro_f_string_static_t_initialize(F_status_top_not_s, 0, F_status_top_not_s_length);
const f_string_static_t f_status_type_s = macro_f_string_static_t_initialize(F_status_type_s, 0, F_status_type_s_length);
const f_string_static_t f_status_type_not_s = macro_f_string_static_t_initialize(F_status_type_not_s, 0, F_status_type_not_s_length);
const f_string_static_t f_status_success_s = macro_f_string_static_t_initialize(F_status_success_s, 0, F_status_success_s_length);
break;
+ case F_bottom:
+ *name = f_status_bottom_s;
+
+ break;
+
+ case F_bottom_not:
+ *name = f_status_bottom_not_s;
+
+ break;
+
case F_bound:
*name = f_status_bound_s;
break;
+ case F_character:
+ *name = f_status_character_s;
+
+ break;
+
+ case F_character_not:
+ *name = f_status_character_not_s;
+
+ break;
+
case F_child:
*name = f_status_child_s;
break;
+ case F_fifo:
+ *name = f_status_fifo_s;
+
+ break;
+
+ case F_fifo_not:
+ *name = f_status_fifo_not_s;
+
+ break;
+
case F_first:
*name = f_status_first_s;
break;
+ case F_middle:
+ *name = f_status_middle_s;
+
+ break;
+
+ case F_middle_not:
+ *name = f_status_middle_not_s;
+
+ break;
+
case F_minor:
*name = f_status_minor_s;
break;
+ case F_regular:
+ *name = f_status_regular_s;
+
+ break;
+
+ case F_regular_not:
+ *name = f_status_regular_not_s;
+
+ break;
+
case F_relative:
*name = f_status_relative_s;
break;
+ case F_top:
+ *name = f_status_top_s;
+
+ break;
+
+ case F_top_not:
+ *name = f_status_top_not_s;
+
+ break;
+
case F_type:
*name = f_status_type_s;
#define F_status_block_not_s "F_block_not"
#define F_status_body_s "F_body"
#define F_status_body_not_s "F_body_not"
+ #define F_status_bottom_s "F_bottom"
+ #define F_status_bottom_not_s "F_bottom_not"
#define F_status_bound_s "F_bound"
#define F_status_bound_not_s "F_bound_not"
#define F_status_break_s "F_break"
#define F_status_call_not_s "F_call_not"
#define F_status_capability_s "F_capability"
#define F_status_capability_not_s "F_capability_not"
+ #define F_status_character_s "F_character"
+ #define F_status_character_not_s "F_character_not"
#define F_status_child_s "F_child"
#define F_status_child_not_s "F_child_not"
#define F_status_complete_s "F_complete"
#define F_status_failure_not_s "F_failure_not"
#define F_status_family_s "F_family"
#define F_status_family_not_s "F_family_not"
+ #define F_status_fifo_s "F_fifo"
+ #define F_status_fifo_not_s "F_fifo_not"
#define F_status_first_s "F_first"
#define F_status_first_not_s "F_first_not"
#define F_status_footer_s "F_footer"
#define F_status_memory_not_s "F_memory_not"
#define F_status_message_s "F_message"
#define F_status_message_not_s "F_message_not"
+ #define F_status_middle_s "F_middle"
+ #define F_status_middle_not_s "F_middle_not"
#define F_status_minor_s "F_minor"
#define F_status_minor_not_s "F_minor_not"
#define F_status_moderate_s "F_moderate"
#define F_status_recover_not_s "F_recover_not"
#define F_status_recurse_s "F_recurse"
#define F_status_recurse_not_s "F_recurse_not"
+ #define F_status_regular_s "F_regular"
+ #define F_status_regular_not_s "F_regular_not"
#define F_status_relative_s "F_relative"
#define F_status_relative_not_s "F_relative_not"
#define F_status_remote_s "F_remote"
#define F_status_time_out_s "F_time_out"
#define F_status_too_large_s "F_too_large"
#define F_status_too_small_s "F_too_small"
+ #define F_status_top_s "F_top"
+ #define F_status_top_not_s "F_top_not"
#define F_status_type_s "F_type"
#define F_status_type_not_s "F_type_not"
#define F_status_success_s "F_success"
#define F_status_success_not_s "F_success_not"
- #define F_status_support_s "F_support"
- #define F_status_support_not_s "F_support_not"
+ #define F_status_support_s "F_support"
+ #define F_status_support_not_s "F_support_not"
#define F_status_user_s "F_user"
#define F_status_user_not_s "F_user_not"
#define F_status_utf_s "F_utf"
#define F_status_block_not_s_length 11
#define F_status_body_s_length 6
#define F_status_body_not_s_length 10
+ #define F_status_bottom_s_length 8
+ #define F_status_bottom_not_s_length 12
#define F_status_bound_s_length 7
#define F_status_bound_not_s_length 11
#define F_status_call_s_length 6
#define F_status_call_not_s_length 10
#define F_status_capability_s_length 12
#define F_status_capability_not_s_length 16
+ #define F_status_character_s_length 11
+ #define F_status_character_not_s_length 15
#define F_status_child_s_length 7
#define F_status_child_not_s_length 11
#define F_status_complete_s_length 10
#define F_status_failure_not_s_length 13
#define F_status_family_s_length 8
#define F_status_family_not_s_length 12
+ #define F_status_fifo_s_length 6
+ #define F_status_fifo_not_s_length 10
#define F_status_first_s_length 7
#define F_status_first_not_s_length 11
#define F_status_footer_s_length 8
#define F_status_memory_not_s_length 12
#define F_status_message_s_length 9
#define F_status_message_not_s_length 13
+ #define F_status_middle_s_length 8
+ #define F_status_middle_not_s_length 12
#define F_status_minor_s_length 7
#define F_status_minor_not_s_length 11
#define F_status_moderate_s_length 10
#define F_status_recover_not_s_length 13
#define F_status_recurse_s_length 9
#define F_status_recurse_not_s_length 13
+ #define F_status_regular_s_length 9
+ #define F_status_regular_not_s_length 13
#define F_status_relative_s_length 10
#define F_status_relative_not_s_length 14
#define F_status_remote_s_length 8
#define F_status_time_out_s_length 10
#define F_status_too_large_s_length 11
#define F_status_too_small_s_length 11
+ #define F_status_top_s_length 5
+ #define F_status_top_not_s_length 9
#define F_status_type_s_length 6
#define F_status_type_not_s_length 10
#define F_status_user_s_length 6
extern const f_string_static_t f_status_block_not_s;
extern const f_string_static_t f_status_body_s;
extern const f_string_static_t f_status_body_not_s;
+ extern const f_string_static_t f_status_bottom_s;
+ extern const f_string_static_t f_status_bottom_not_s;
extern const f_string_static_t f_status_bound_s;
extern const f_string_static_t f_status_bound_not_s;
extern const f_string_static_t f_status_break_s;
extern const f_string_static_t f_status_call_not_s;
extern const f_string_static_t f_status_capability_s;
extern const f_string_static_t f_status_capability_not_s;
+ extern const f_string_static_t f_status_character_s;
+ extern const f_string_static_t f_status_character_not_s;
extern const f_string_static_t f_status_child_s;
extern const f_string_static_t f_status_child_not_s;
extern const f_string_static_t f_status_complete_s;
extern const f_string_static_t f_status_failure_not_s;
extern const f_string_static_t f_status_family_s;
extern const f_string_static_t f_status_family_not_s;
+ extern const f_string_static_t f_status_fifo_s;
+ extern const f_string_static_t f_status_fifo_not_s;
extern const f_string_static_t f_status_first_s;
extern const f_string_static_t f_status_first_not_s;
extern const f_string_static_t f_status_footer_s;
extern const f_string_static_t f_status_memory_not_s;
extern const f_string_static_t f_status_message_s;
extern const f_string_static_t f_status_message_not_s;
+ extern const f_string_static_t f_status_middle_s;
+ extern const f_string_static_t f_status_middle_not_s;
extern const f_string_static_t f_status_minor_s;
extern const f_string_static_t f_status_minor_not_s;
extern const f_string_static_t f_status_moderate_s;
extern const f_string_static_t f_status_recover_not_s;
extern const f_string_static_t f_status_recurse_s;
extern const f_string_static_t f_status_recurse_not_s;
+ extern const f_string_static_t f_status_regular_s;
+ extern const f_string_static_t f_status_regular_not_s;
extern const f_string_static_t f_status_relative_s;
extern const f_string_static_t f_status_relative_not_s;
extern const f_string_static_t f_status_remote_s;
extern const f_string_static_t f_status_time_out_s;
extern const f_string_static_t f_status_too_large_s;
extern const f_string_static_t f_status_too_small_s;
+ extern const f_string_static_t f_status_top_s;
+ extern const f_string_static_t f_status_top_not_s;
extern const f_string_static_t f_status_type_s;
extern const f_string_static_t f_status_type_not_s;
extern const f_string_static_t f_status_success_s;
#endif // _di_fl_directory_create_
#ifndef _di_fl_directory_copy_
- void fl_directory_copy(const f_string_static_t source, const f_string_static_t destination, f_directory_recurse_t * const recurse) {
+ void fl_directory_copy(const f_string_static_t source, const f_string_static_t destination, f_directory_recurse_copy_t * const recurse) {
#ifndef _di_level_1_parameter_checking_
if (!recurse) return;
#endif // _di_level_1_parameter_checking_
recurse->destination = recurse->destination_top;
recurse->destination_top = &destination;
recurse->depth = 0;
- recurse->mode = recurse->mode;
recurse->state.status = F_none;
recurse->state.data = (void *) recurse;
return;
}
- if (recurse->flag & f_directory_recurse_flag_top_e) {
- if (recurse->flag & f_directory_recurse_flag_clone_e) {
+ if (recurse->flag & f_directory_recurse_copy_flag_top_e) {
+ if (recurse->flag & f_directory_recurse_copy_flag_clone_e) {
struct stat source_stat;
memset(&source_stat, 0, sizeof(struct stat));
- recurse->state.status = f_file_stat(*recurse->source_top, recurse->flag & f_directory_recurse_flag_dereference_e, &source_stat);
+ recurse->state.status = f_file_stat(*recurse->source_top, recurse->flag & f_directory_recurse_copy_flag_dereference_e, &source_stat);
if (F_status_is_error_not(recurse->state.status)) {
recurse->state.status = f_directory_exists(*recurse->destination_top);
if (F_status_is_error_not(recurse->state.status)) {
if (recurse->state.status == F_true) {
- if (recurse->flag & f_directory_recurse_flag_exclusive_e) {
+ if (recurse->flag & f_directory_recurse_copy_flag_exclusive_e) {
recurse->state.status = F_status_set_error(F_directory_found);
}
else {
}
}
- if (F_status_is_error_not(recurse->state.status) && (recurse->flag & (f_directory_recurse_flag_group_e | f_directory_recurse_flag_owner_e))) {
- recurse->state.status = f_file_role_change(*recurse->destination_top, (recurse->flag & f_directory_recurse_flag_owner_e) ? source_stat.st_uid : -1, (recurse->flag & f_directory_recurse_flag_group_e) ? source_stat.st_gid : -1, recurse->flag & f_directory_recurse_flag_dereference_e);
+ if (F_status_is_error_not(recurse->state.status) && (recurse->flag & (f_directory_recurse_copy_flag_group_e | f_directory_recurse_copy_flag_owner_e))) {
+ recurse->state.status = f_file_role_change(*recurse->destination_top, (recurse->flag & f_directory_recurse_copy_flag_owner_e) ? source_stat.st_uid : -1, (recurse->flag & f_directory_recurse_copy_flag_group_e) ? source_stat.st_gid : -1, recurse->flag & f_directory_recurse_copy_flag_dereference_e);
}
}
else {
if (recurse->state.status == F_true) {
- if (recurse->flag & f_directory_recurse_flag_exclusive_e) {
+ if (recurse->flag & f_directory_recurse_copy_flag_exclusive_e) {
recurse->state.status = F_status_set_error(F_directory_found);
}
else {
}
#endif // _di_fl_directory_copy_
+#ifndef _di_fl_directory_do_
+ void fl_directory_do(const f_string_static_t path, f_directory_recurse_do_t * const recurse) {
+ #ifndef _di_level_1_parameter_checking_
+ if (!recurse) return;
+
+ if (!recurse->action) {
+ recurse->state.status = F_status_set_error(F_parameter);
+ return;
+ }
+ #endif // _di_level_1_parameter_checking_
+
+ recurse->path = recurse->path_top;
+ recurse->path_top = &path;
+ recurse->depth = 0;
+ recurse->state.status = F_none;
+ recurse->state.data = (void *) recurse;
+
+ if (!recurse->path_top->used) {
+ recurse->state.status = F_data_not;
+
+ if (recurse->state.handle) {
+ recurse->state.handle(&recurse->state, (void *) recurse);
+ }
+
+ return;
+ }
+
+ recurse->state.status = f_directory_exists(*recurse->path_top);
+
+ if (recurse->state.status == F_false) {
+ recurse->state.status = F_status_set_error(F_directory_not);
+ }
+
+ if (F_status_is_error(recurse->state.status)) {
+ if (recurse->state.handle) {
+ recurse->state.handle(&recurse->state, (void *) recurse);
+ }
+
+ return;
+ }
+
+ if ((recurse->flag & f_directory_recurse_do_flag_top_e) && (recurse->flag & f_directory_recurse_do_flag_first_e)) {
+ recurse->action((void *) recurse, f_directory_recurse_do_flag_top_e | f_directory_recurse_do_flag_first_e);
+ }
+
+ if (F_status_is_error_not(recurse->state.status)) {
+ if (recurse->max_depth) {
+ f_array_length_t i = recurse->path_top->used;
+
+ // Do not allow null termination or trailing path separators in the string's length calculation.
+ for (; i > 0; --i) {
+
+ if (!recurse->path_top->string[i - 1]) continue;
+ if (recurse->path_top->string[i - 1] == f_path_separator_s.string[0]) continue;
+
+ break;
+ } // for
+
+ const f_string_static_t static_path = macro_f_string_static_t_initialize(recurse->path_top->string, recurse->path_top->size, i);
+
+ recurse->path = &static_path;
+ recurse->depth = 1;
+
+ private_fl_directory_do_recurse(recurse);
+
+ recurse->path = recurse->path_top;
+ recurse->depth = 0;
+ }
+ else {
+ recurse->state.status = F_none;
+ }
+ }
+
+ if (F_status_is_error_not(recurse->state.status)) {
+ if ((recurse->flag & f_directory_recurse_do_flag_top_e) && (recurse->flag & f_directory_recurse_do_flag_last_e)) {
+ recurse->action((void *) recurse, f_directory_recurse_do_flag_top_e | f_directory_recurse_do_flag_last_e);
+ }
+ }
+
+ if (F_status_is_error(recurse->state.status)) {
+ if (recurse->state.handle) {
+ recurse->state.handle(&recurse->state, (void *) &recurse);
+ }
+ }
+ else {
+ recurse->state.status = F_none;
+ }
+ }
+#endif // _di_fl_directory_do_
+
#ifndef _di_fl_directory_list_
f_status_t fl_directory_list(const f_string_static_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing_t * const listing) {
#ifndef _di_level_1_parameter_checking_
* The source and destination must be NULL terminated.
*
* Symbolic links are by default not followed, they are copied as the symbolic link itself.
- * Set the f_directory_recurse_flag_dereference_e to follow the symbolic links rather than copying the link itself.
+ * Set the f_directory_recurse_copy_flag_dereference_e to follow the symbolic links rather than copying the link itself.
*
* This does not copy unknown file types.
*
- * If recurse.flag has f_directory_recurse_flag_top_e set, then this operates on the top directory otherwise only the content within the directory is operated on.
+ * If recurse.flag has f_directory_recurse_copy_flag_top_e set, then this operates on the top directory otherwise only the content within the directory is operated on.
*
- * If recurse.flag has f_directory_recurse_flag_clone_e set, then this operates a clone operation rather than a copy operation.
+ * If recurse.flag has f_directory_recurse_copy_flag_clone_e set, then this operates a clone operation rather than a copy operation.
*
- * When using f_directory_recurse_flag_clone_e, the recurse.mode is not used.
- * When not using f_directory_recurse_flag_clone_e, the recurse.mode is used and should be set accordingly.
+ * When using f_directory_recurse_copy_flag_clone_e, the recurse.mode is not used.
+ * When not using f_directory_recurse_copy_flag_clone_e, the recurse.mode is used and should be set accordingly.
* To not used recurse.mode, set the point to NULL.
*
* The recurse.state.handle() callback is used for processing and reporting errors.
* @see f_file_stat()
*/
#ifndef _di_fl_directory_copy_
- extern void fl_directory_copy(const f_string_static_t source, const f_string_static_t destination, f_directory_recurse_t * const recurse);
+ extern void fl_directory_copy(const f_string_static_t source, const f_string_static_t destination, f_directory_recurse_copy_t * const recurse);
#endif // _di_fl_directory_copy_
/**
+ * Perform a recursive action on some directory.
+ *
+ * This is intended to be used as an alternative to functions like fl_directory_list(), giving more control over the recursion process.
+ *
+ * @param path
+ * The directory file path.
+ * Must be NULL terminated.
+ * @param recurse
+ * The directory recurse data.
+ * This must not be NULL.
+ *
+ * This alters recurse.state.status:
+ * F_none on success.
+ * F_data_not if source.used or destination.used is 0.
+ *
+ * F_directory_not (with error bit) if the source directory does not exist.
+ * F_failure (with error bit) for any other failure, failures might be populated with individual status codes.
+ *
+ * Errors (with error bit) from: f_directory_create().
+ * Errors (with error bit) from: f_directory_exists().
+ * Errors (with error bit) from: f_string_dynamic_resize().
+ * Errors (with error bit) from: f_string_dynamics_resize().
+ * Errors (with error bit) from: f_file_mode_set().
+ * Errors (with error bit) from: f_file_role_change().
+ * Errors (with error bit) from: f_file_stat().
+ *
+ * @see f_directory_create()
+ * @see f_directory_exists()
+ * @see f_string_dynamic_resize()
+ * @see f_string_dynamics_resize()
+ * @see f_file_mode_set()
+ * @see f_file_role_change()
+ * @see f_file_stat()
+ */
+#ifndef _di_fl_directory_do_
+ extern void fl_directory_do(const f_string_static_t path, f_directory_recurse_do_t * const recurse);
+#endif // _di_fl_directory_do_
+
+/**
* For some given path, print the names of each file and/or directory inside the directory, stored as a directory listing.
*
* Allows specifying a custom filter and custom sort.
#endif
#if !defined(_di_fl_directory_copy_)
- void private_fl_directory_copy_recurse(f_directory_recurse_t * const recurse) {
+ void private_fl_directory_copy_recurse(f_directory_recurse_copy_t * const recurse) {
f_string_dynamics_t directories_original = f_string_dynamics_t_initialize;
recurse->listing.socket.used = 0;
recurse->listing.unknown.used = 0;
- recurse->state.status = private_fl_directory_list(*recurse->source, 0, 0, recurse->flag & f_directory_recurse_flag_dereference_e, &recurse->listing);
+ recurse->state.status = private_fl_directory_list(*recurse->source, 0, 0, recurse->flag & f_directory_recurse_copy_flag_dereference_e, &recurse->listing);
if (F_status_is_error(recurse->state.status)) {
for (uint8_t i = 0; i < 7; ++i) {
for (j = 0; F_status_is_fine(recurse->state.status) && j < list[i]->used; ++j) {
+
+ if (recurse->state.interrupt) {
+ recurse->state.interrupt((void *) &recurse->state, (void *) recurse);
+ if (F_status_set_fine(recurse->state.status) == F_interrupt) break;
+ }
+
private_fl_directory_copy_recurse_file(list[i]->array[j], recurse);
} // for
break;
}
- if (recurse->flag & f_directory_recurse_flag_clone_e) {
+ if (recurse->flag & f_directory_recurse_copy_flag_clone_e) {
struct stat source_stat;
memset(&source_stat, 0, sizeof(struct stat));
- recurse->state.status = f_file_stat(source_sub, recurse->flag & f_directory_recurse_flag_dereference_e, &source_stat);
+ recurse->state.status = f_file_stat(source_sub, recurse->flag & f_directory_recurse_copy_flag_dereference_e, &source_stat);
if (F_status_is_error(recurse->state.status)) break;
recurse->state.status = f_directory_exists(destination_sub);
if (F_status_is_error(recurse->state.status)) break;
if (recurse->state.status == F_true) {
- if (recurse->flag & f_directory_recurse_flag_exclusive_e) {
+ if (recurse->flag & f_directory_recurse_copy_flag_exclusive_e) {
recurse->state.status = F_status_set_error(F_directory_found);
break;
if (F_status_is_error(recurse->state.status)) break;
}
- if (recurse->flag & (f_directory_recurse_flag_group_e | f_directory_recurse_flag_owner_e)) {
- recurse->state.status = f_file_role_change(destination_sub, (recurse->flag & f_directory_recurse_flag_owner_e) ? source_stat.st_uid : -1, (recurse->flag & f_directory_recurse_flag_group_e) ? source_stat.st_gid : -1, recurse->flag & f_directory_recurse_flag_dereference_e);
+ if (recurse->flag & (f_directory_recurse_copy_flag_group_e | f_directory_recurse_copy_flag_owner_e)) {
+ recurse->state.status = f_file_role_change(destination_sub, (recurse->flag & f_directory_recurse_copy_flag_owner_e) ? source_stat.st_uid : -1, (recurse->flag & f_directory_recurse_copy_flag_group_e) ? source_stat.st_gid : -1, recurse->flag & f_directory_recurse_copy_flag_dereference_e);
if (F_status_is_error(recurse->state.status)) break;
}
}
else {
if (recurse->state.status == F_true) {
- if (recurse->flag & f_directory_recurse_flag_exclusive_e) {
+ if (recurse->flag & f_directory_recurse_copy_flag_exclusive_e) {
recurse->state.status = F_status_set_error(F_directory_found);
break;
}
// Errors in the recursed function are handled outside the recursed function here.
- if (F_status_is_error(recurse->state.status)) {
+ else if (F_status_is_error(recurse->state.status)) {
if (recurse->state.handle) {
recurse->state.handle(&recurse->state, (void *) &recurse);
}
#endif // !defined(_di_fl_directory_copy_)
#if !defined(_di_fl_directory_copy_)
- void private_fl_directory_copy_recurse_file(const f_string_static_t file, f_directory_recurse_t * const recurse) {
+ void private_fl_directory_copy_recurse_file(const f_string_static_t file, f_directory_recurse_copy_t * const recurse) {
f_string_static_t path_source = f_string_static_t_initialize;
f_string_static_t path_destination = f_string_static_t_initialize;
path_destination_string[recurse->destination->used + file.used + 1] = 0;
f_status_t status = F_none;
- int flag = (recurse->flag & f_directory_recurse_flag_dereference_e) ? 0 : f_file_stat_flag_reference_e;
+ int flag = (recurse->flag & f_directory_recurse_copy_flag_dereference_e) ? 0 : f_file_stat_flag_reference_e;
- if (recurse->flag & f_directory_recurse_flag_exclusive_e) {
+ if (recurse->flag & f_directory_recurse_copy_flag_exclusive_e) {
flag |= f_file_stat_flag_exclusive_e;
}
- if (recurse->flag & f_directory_recurse_flag_group_e) {
+ if (recurse->flag & f_directory_recurse_copy_flag_group_e) {
flag |= f_file_stat_flag_group_e;
}
- if (recurse->flag & f_directory_recurse_flag_owner_e) {
+ if (recurse->flag & f_directory_recurse_copy_flag_owner_e) {
flag |= f_file_stat_flag_owner_e;
}
- if (recurse->flag & f_directory_recurse_flag_clone_e) {
+ if (recurse->flag & f_directory_recurse_copy_flag_clone_e) {
recurse->state.status = f_file_clone(path_source, path_destination, recurse->size_block, flag);
}
else {
}
#endif // !defined(_di_fl_directory_copy_)
-#if !defined(_di_fl_directory_copy_) || !defined(_di_fl_directory_list_)
+#if !defined(_di_fl_directory_do_)
+ void private_fl_directory_do_recurse(f_directory_recurse_do_t * const recurse) {
+
+ f_string_dynamics_t directories_original = f_string_dynamics_t_initialize;
+
+ directories_original.array = recurse->listing.directory.array;
+ directories_original.used = recurse->listing.directory.used;
+ directories_original.size = recurse->listing.directory.size;
+
+ recurse->listing.directory.array = 0;
+ recurse->listing.directory.used = 0;
+ recurse->listing.directory.size = 0;
+
+ // Use a clean set for each recursion.
+ recurse->listing.block.used = 0;
+ recurse->listing.character.used = 0;
+ recurse->listing.directory.used = 0;
+ recurse->listing.regular.used = 0;
+ recurse->listing.link.used = 0;
+ recurse->listing.fifo.used = 0;
+ recurse->listing.socket.used = 0;
+ recurse->listing.unknown.used = 0;
+
+ recurse->state.status = private_fl_directory_list(*recurse->path, 0, 0, recurse->flag & f_directory_recurse_do_flag_dereference_e, &recurse->listing);
+
+ if (F_status_is_error(recurse->state.status)) {
+
+ // Only the directory is to be freed because all others are preserved between recursions.
+ f_string_dynamics_resize(0, &recurse->listing.directory);
+
+ recurse->listing.directory.array = directories_original.array;
+ recurse->listing.directory.used = directories_original.used;
+ recurse->listing.directory.size = directories_original.size;
+
+ return;
+ }
+
+ recurse->state.status = F_none;
+
+ {
+ f_string_dynamics_t * const list[] = {
+ &recurse->listing.block,
+ &recurse->listing.character,
+ &recurse->listing.regular,
+ &recurse->listing.link,
+ &recurse->listing.fifo,
+ &recurse->listing.socket,
+ &recurse->listing.unknown,
+ };
+
+ const uint16_t flags[] = {
+ f_directory_recurse_do_flag_block_e,
+ f_directory_recurse_do_flag_character_e,
+ f_directory_recurse_do_flag_regular_e,
+ f_directory_recurse_do_flag_link_e,
+ f_directory_recurse_do_flag_fifo_e,
+ f_directory_recurse_do_flag_socket_e,
+ f_directory_recurse_do_flag_unknown_e,
+ };
+
+ //
+
+ f_array_length_t j = 0;
+
+ for (uint8_t i = 0; i < 7; ++i) {
+
+ for (j = 0; j < list[i]->used; ++j) {
+
+ if (recurse->state.interrupt) {
+ recurse->state.interrupt((void *) &recurse->state, (void *) recurse);
+ if (F_status_set_fine(recurse->state.status) == F_interrupt) break;
+ }
+
+ recurse->state.status = F_none;
+
+ recurse->action((void *) recurse, flags[i]);
+ if (F_status_is_error(recurse->state.status)) break;
+ if (recurse->state.status == F_break) break;
+ if (recurse->state.status == F_done) break;
+ } // for
+
+ if (F_status_is_error(recurse->state.status)) break;
+ if (recurse->state.status == F_done) break;
+
+ list[i]->used = 0;
+
+ // Use an upper limit when retaining memory between recursion calls.
+ if (list[i]->size > F_directory_max_list_d) {
+ recurse->state.status = f_string_dynamics_resize(F_directory_max_list_d, list[i]);
+ if (F_status_is_error(recurse->state.status)) break;
+ }
+
+ for (j = 0; j < list[i]->used; ++j) {
+
+ list[i]->array[j].used = 0;
+
+ if (list[i]->array[j].size > F_directory_max_string_d) {
+ recurse->state.status = f_string_dynamic_resize(F_directory_max_string_d, &list[i]->array[j]);
+ if (F_status_is_error(recurse->state.status)) break;
+ }
+ } // for
+ } // for
+ }
+
+ if (recurse->state.status != F_done && F_status_is_error_not(recurse->state.status)) {
+ for (f_array_length_t i = 0; i < recurse->listing.directory.used; ++i) {
+
+ if (recurse->state.interrupt) {
+ recurse->state.interrupt((void *) &recurse->state, (void *) recurse);
+ if (F_status_set_fine(recurse->state.status) == F_interrupt) break;
+ }
+
+ f_string_static_t path_sub = f_string_static_t_initialize;
+
+ path_sub.used = recurse->path->used + recurse->listing.directory.array[i].used + 1;
+ path_sub.size = path_sub.used;
+
+ f_char_t path_full_sub[path_sub.used + 1];
+
+ memcpy(path_full_sub, recurse->path->string, sizeof(f_char_t) * recurse->path->used);
+ memcpy(path_full_sub + recurse->path->used + 1, recurse->listing.directory.array[i].string, sizeof(f_char_t) * recurse->listing.directory.array[i].used);
+
+ path_full_sub[recurse->path->used] = f_path_separator_s.string[0];
+ path_full_sub[path_sub.used] = 0;
+
+ path_sub.string = path_full_sub;
+
+ recurse->state.status = f_directory_exists(path_sub);
+ if (F_status_is_error(recurse->state.status)) break;
+
+ if (recurse->state.status == F_false) {
+ recurse->state.status = F_status_set_error(F_directory);
+
+ break;
+ }
+
+ if (recurse->flag & f_directory_recurse_do_flag_first_e) {
+ recurse->action((void *) recurse, f_directory_recurse_do_flag_first_e);
+ }
+
+ if (recurse->depth < recurse->max_depth) {
+ recurse->path = (f_string_static_t * const) & path_sub;
+
+ ++recurse->depth;
+
+ private_fl_directory_do_recurse(recurse);
+
+ // Data must be restored after recursion.
+ recurse->path = (f_string_static_t * const) & path_sub;
+
+ // Success inside the recursed function is handled inside the recursed function, so handle at the current depth.
+ if (recurse->state.status == F_none) {
+ --recurse->depth;
+ }
+
+ // Errors in the recursed function are handled outside the recursed function here.
+ else if (F_status_is_error(recurse->state.status)) {
+ if (recurse->state.handle) {
+ recurse->state.handle(&recurse->state, (void *) &recurse);
+ }
+
+ recurse->state.status = F_failure;
+ }
+
+ // Error is now handled or is done, so update the depth and exit.
+ if (recurse->state.status == F_done || recurse->state.status == F_failure) {
+ --recurse->depth;
+
+ break;
+ }
+ }
+
+ recurse->state.status = F_none;
+
+ if (recurse->flag & f_directory_recurse_do_flag_last_e) {
+ recurse->action((void *) recurse, f_directory_recurse_do_flag_last_e);
+ }
+
+ recurse->state.status = F_none;
+ } // for
+ }
+
+ // Only the directory is to be freed because all others are preserved between recursions.
+ f_string_dynamics_resize(0, &recurse->listing.directory);
+
+ recurse->listing.directory.array = directories_original.array;
+ recurse->listing.directory.used = directories_original.used;
+ recurse->listing.directory.size = directories_original.size;
+ }
+#endif // !defined(_di_fl_directory_do_)
+
+#if !defined(_di_fl_directory_copy_) || !defined(_di_fl_directory_do_) || !defined(_di_fl_directory_list_)
f_status_t private_fl_directory_list(const f_string_static_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing_t * const listing) {
struct dirent **entity = 0;
return F_none;
}
-#endif // !defined(_di_fl_directory_copy_) || !defined(_di_fl_directory_list_)
+#endif // !defined(_di_fl_directory_copy_) || !defined(_di_fl_directory_do_) || !defined(_di_fl_directory_list_)
#if !defined(_di_fl_directory_path_push_) || !defined(_di_fl_directory_path_push_dynamic_)
f_status_t private_fl_directory_path_push(const f_string_static_t source, f_string_dynamic_t * const destination) {
*
* Intended to be shared to each of the different implementation variations.
*
- * @param source
- * The source file path.
- * Must be NULL terminated.
- * @param destination
- * The destination file path.
- * Must be NULL terminated.
* @param recurse
* The directory recurse data.
- * @param depth
- * The current depth.
*
* @return
* F_none on success.
* @see fl_directory_copy()
*/
#if !defined(_di_fl_directory_copy_)
- extern void private_fl_directory_copy_recurse(f_directory_recurse_t * const recurse) F_attribute_visibility_internal_d;
+ extern void private_fl_directory_copy_recurse(f_directory_recurse_copy_t * const recurse) F_attribute_visibility_internal_d;
#endif // !defined(_di_fl_directory_copy_)
/**
* Will only copy a single file and record any detected errors.
*
* @param file
- * The name of the file within source to copy into destination.
- * Must be NULL terminated.
- * @param source
- * The source file path.
- * Must be NULL terminated.
- * @param destination
- * The destination file path.
- * Must be NULL terminated.
- * @param mode
- * The mode for each file type.
+ * The name of the current file.
* @param recurse
* The directory recurse data.
*
* @see fl_directory_copy()
*/
#if !defined(_di_fl_directory_copy_)
- extern void private_fl_directory_copy_recurse_file(const f_string_static_t file, f_directory_recurse_t * const recurse) F_attribute_visibility_internal_d;
+ extern void private_fl_directory_copy_recurse_file(const f_string_static_t file, f_directory_recurse_copy_t * const recurse) F_attribute_visibility_internal_d;
#endif // !defined(_di_fl_directory_copy_)
/**
+ * Private implementation of fl_directory_do().
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param recurse
+ * The directory recurse data.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_failure (with error bit) for any other failure, failures might be populated with individual status codes.
+ *
+ * @see fl_directory_do()
+ */
+#if !defined(_di_fl_directory_do_)
+ extern void private_fl_directory_do_recurse(f_directory_recurse_do_t * const recurse) F_attribute_visibility_internal_d;
+#endif // !defined(_di_fl_directory_do_)
+
+/**
* A special function intended to be used directly by fl_directory_list().
*
* @param path
* @see f_string_dynamics_increase_by()
*
* @see fl_directory_copy()
+ * @see fl_directory_do()
* @see fl_directory_list()
*/
-#if !defined(_di_fl_directory_copy_) || !defined(_di_fl_directory_list_)
+#if !defined(_di_fl_directory_copy_) || !defined(_di_fl_directory_do_) || !defined(_di_fl_directory_list_)
extern f_status_t private_fl_directory_list(const f_string_static_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing_t * const listing) F_attribute_visibility_internal_d;
-#endif // !defined(_di_fl_directory_copy_) || !defined(_di_fl_directory_list_)
+#endif // !defined(_di_fl_directory_copy_) || !defined(_di_fl_directory_do_) || !defined(_di_fl_directory_list_)
/**
* Private implementation of fl_directory_path_push().
#endif // _di_fll_file_mode_set_all_
#ifndef _di_fll_file_move_
- void fll_file_move(const f_string_static_t source, const f_string_static_t destination, f_directory_recurse_t * const recurse) {
+ void fll_file_move(const f_string_static_t source, const f_string_static_t destination, f_directory_recurse_copy_t * const recurse) {
#ifndef _di_level_2_parameter_checking_
if (!recurse) return;
#endif // _di_level_2_parameter_checking_
if (recurse->state.status == F_true) {
const uint8_t flag_original = recurse->flag;
- recurse->flag = f_directory_recurse_flag_clone_e;
+ recurse->flag = f_directory_recurse_copy_flag_clone_e;
fl_directory_copy(source, destination, recurse);
* @see fl_directory_copy()
*/
#ifndef _di_fll_file_move_
- extern void fll_file_move(const f_string_static_t source, const f_string_static_t destination, f_directory_recurse_t * const recurse);
+ extern void fll_file_move(const f_string_static_t source, const f_string_static_t destination, f_directory_recurse_copy_t * const recurse);
#endif // _di_fll_file_move_
/**
* The umask() has design flaws as per specification that requires the umask be changed to read the value!
* As a work-around, a umask variable is provided here so that umask() only ever need be called once.
*
+ * The macro macro_fll_program_console_parameter_standard_initialize provides the standard program parameters to include when initializing the parameters variable.
+ * The last comma is not provided, the caller should add the comma to macro_fll_program_console_parameter_standard_initialize as necessary.
+ *
* parameters: The state of pre-defined parameters passed to the program.
* environment: Environment variables passed to the program.
*
debug, \
context, \
}
+
+ #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)
#endif // _di_fll_program_data_t_
/**
return F_none;
}
+ if (fl_string_dynamic_compare(name, f_status_bottom_s) == F_equal_to) {
+ *code = F_bottom;
+
+ return F_none;
+ }
+
+ if (fl_string_dynamic_compare(name, f_status_bottom_not_s) == F_equal_to) {
+ *code = F_bottom_not;
+
+ return F_none;
+ }
+
if (fl_string_dynamic_compare(name, f_status_bound_s) == F_equal_to) {
*code = F_bound;
return F_none;
}
+ if (fl_string_dynamic_compare(name, f_status_character_s) == F_equal_to) {
+ *code = F_character;
+
+ return F_none;
+ }
+
+ if (fl_string_dynamic_compare(name, f_status_character_not_s) == F_equal_to) {
+ *code = F_character_not;
+
+ return F_none;
+ }
+
if (fl_string_dynamic_compare(name, f_status_child_not_s) == F_equal_to) {
*code = F_child_not;
return F_none;
}
+ if (fl_string_dynamic_compare(name, f_status_fifo_s) == F_equal_to) {
+ *code = F_fifo;
+
+ return F_none;
+ }
+
+ if (fl_string_dynamic_compare(name, f_status_fifo_not_s) == F_equal_to) {
+ *code = F_fifo_not;
+
+ return F_none;
+ }
+
if (fl_string_dynamic_compare(name, f_status_first_s) == F_equal_to) {
*code = F_first;
return F_none;
}
+ if (fl_string_dynamic_compare(name, f_status_middle_s) == F_equal_to) {
+ *code = F_middle;
+
+ return F_none;
+ }
+
+ if (fl_string_dynamic_compare(name, f_status_middle_not_s) == F_equal_to) {
+ *code = F_middle_not;
+
+ return F_none;
+ }
+
if (fl_string_dynamic_compare(name, f_status_minor_s) == F_equal_to) {
*code = F_minor;
return F_none;
}
+ if (fl_string_dynamic_compare(name, f_status_regular_s) == F_equal_to) {
+ *code = F_regular;
+
+ return F_none;
+ }
+
+ if (fl_string_dynamic_compare(name, f_status_regular_not_s) == F_equal_to) {
+ *code = F_regular_not;
+
+ return F_none;
+ }
+
if (fl_string_dynamic_compare(name, f_status_relative_s) == F_equal_to) {
*code = F_relative;
return F_none;
}
+ if (fl_string_dynamic_compare(name, f_status_top_s) == F_equal_to) {
+ *code = F_top;
+
+ return F_none;
+ }
+
+ if (fl_string_dynamic_compare(name, f_status_top_not_s) == F_equal_to) {
+ *code = F_top_not;
+
+ return F_none;
+ }
+
if (fl_string_dynamic_compare(name, f_status_type_s) == F_equal_to) {
*code = F_type;
/**
* The program defines.
*
- * byte_dump_*:
+ * byte_dump_*_d:
* - allocation_console: An allocation step used for small buffers specifically for console parameter.
* - allocation_large: An allocation step used for buffers that are anticipated to have large buffers.
* - allocation_small: An allocation step used for buffers that are anticipated to have small buffers.
#define byte_dump_console_parameter_t_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_fll_program_console_parameter_standard_initialize, \
\
macro_f_console_parameter_t_initialize_3(byte_dump_short_binary_s, byte_dump_long_binary_s, 0, f_console_flag_normal_e), \
macro_f_console_parameter_t_initialize_3(byte_dump_short_decimal_s, byte_dump_long_decimal_s, 0, f_console_flag_normal_e), \
byte_dump_main_t data = byte_dump_main_t_initialize;
- data.program.debug.flag |= byte_dump_print_flag_debug_e;
- data.program.error.flag |= byte_dump_print_flag_error_e;
- data.program.message.flag |= byte_dump_print_flag_message_e;
- data.program.warning.flag |= byte_dump_print_flag_warning_e;
+ data.program.debug.flag |= byte_dump_print_flag_debug_e | byte_dump_print_flag_out_e;
+ data.program.error.flag |= byte_dump_print_flag_error_e | byte_dump_print_flag_out_e;
+ data.program.output.flag |= byte_dump_print_flag_out_e;
+ data.program.message.flag |= byte_dump_print_flag_message_e | byte_dump_print_flag_out_e;
+ data.program.warning.flag |= byte_dump_print_flag_warning_e | byte_dump_print_flag_out_e;
+ data.program.error.custom = (void *) &data;
+ data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
data.program.output.custom = (void *) &data;
- data.program.error.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.program.debug.custom = (void *) &data;
f_console_parameter_t parameters[] = byte_dump_console_parameter_t_initialize;
data.program.parameters.array = parameters;
search_static yes
environment PATH LD_LIBRARY_PATH
+environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
#defines -D_di_libcap_ -D_di_thread_support_
defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
/**
* The program defines.
*
- * control_*:
+ * control_*_d:
* - allocation_console: An allocation step used for small buffers specifically for console parameter.
* - allocation_large: An allocation step used for buffers that are anticipated to have large buffers.
* - allocation_small: An allocation step used for buffers that are anticipated to have small buffers.
#define control_console_parameter_t_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_fll_program_console_parameter_standard_initialize, \
\
macro_f_console_parameter_t_initialize_3(control_short_name_s, control_long_name_s, 1, f_console_flag_normal_e), \
macro_f_console_parameter_t_initialize_3(control_short_return_s, control_long_return_s, 1, f_console_flag_normal_e), \
control_main_t data = control_main_t_initialize;
- data.program.debug.flag |= control_print_flag_debug_e;
- data.program.error.flag |= control_print_flag_error_e;
- data.program.message.flag |= control_print_flag_message_e;
- data.program.warning.flag |= control_print_flag_warning_e;
+ data.program.debug.flag |= control_print_flag_debug_e | control_print_flag_out_e;
+ data.program.error.flag |= control_print_flag_error_e | control_print_flag_out_e;
+ data.program.output.flag |= control_print_flag_out_e;
+ data.program.message.flag |= control_print_flag_message_e | control_print_flag_out_e;
+ data.program.warning.flag |= control_print_flag_warning_e | control_print_flag_out_e;
+ data.program.error.custom = (void *) &data;
+ data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
data.program.output.custom = (void *) &data;
- data.program.error.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.program.debug.custom = (void *) &data;
f_console_parameter_t parameters[] = control_console_parameter_t_initialize;
data.program.parameters.array = parameters;
search_static yes
environment PATH LD_LIBRARY_PATH
+environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
#defines -D_di_libcap_ -D_di_thread_support_
defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
/**
* The program defines.
*
- * controller_*:
+ * controller_*_d:
* - allocation_console: An allocation step used for small buffers specifically for console parameter.
* - allocation_large: An allocation step used for buffers that are anticipated to have large buffers.
* - allocation_small: An allocation step used for buffers that are anticipated to have small buffers.
#define controller_console_parameter_t_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_fll_program_console_parameter_standard_initialize, \
\
macro_f_console_parameter_t_initialize_3(controller_short_cgroup_s, controller_long_cgroup_s, 1, f_console_flag_normal_e), \
macro_f_console_parameter_t_initialize_3(controller_short_daemon_s, controller_long_daemon_s, 0, f_console_flag_normal_e), \
controller_main_t data = controller_main_t_initialize;
- data.program.debug.flag |= controller_print_flag_debug_e;
- data.program.error.flag |= controller_print_flag_error_e;
- data.program.message.flag |= controller_print_flag_message_e;
- data.program.warning.flag |= controller_print_flag_warning_e;
+ data.program.debug.flag |= controller_print_flag_debug_e | controller_print_flag_out_e;
+ data.program.error.flag |= controller_print_flag_error_e | controller_print_flag_out_e;
+ data.program.output.flag |= controller_print_flag_out_e;
+ data.program.message.flag |= controller_print_flag_message_e | controller_print_flag_out_e;
+ data.program.warning.flag |= controller_print_flag_warning_e | controller_print_flag_out_e;
+ data.program.error.custom = (void *) &data;
+ data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
data.program.output.custom = (void *) &data;
- data.program.error.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.program.debug.custom = (void *) &data;
f_console_parameter_t parameters[] = controller_console_parameter_t_initialize;
data.program.parameters.array = parameters;
search_static yes
environment PATH LD_LIBRARY_PATH
+environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
#defines -D_di_libcap_ -D_di_thread_support_
defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
memcpy(path_source.string, source.string, sizeof(f_char_t) * source.used);
- f_directory_recurse_t recurse = f_directory_recurse_t_initialize;
+ f_directory_recurse_copy_t recurse = f_directory_recurse_copy_t_initialize;
recurse.verbose = &fake_print_verbose_recursive_copy;
- //recurse.failures = &failures; // @fixme this now needs to be handled by a callback in recurse (recurse.state.handle)., maybe make this a callback on f_directory_recurse_t?
+ //recurse.failures = &failures; // @fixme this now needs to be handled by a callback in recurse (recurse.state.handle)., maybe make this a callback on f_directory_recurse_copy_t?
recurse.mode = mode;
for (f_array_length_t i = 0; i < files.used; ++i) {
data->main->setting.state.status = F_none;
} // for
- f_directory_recurse_delete(&recurse);
+ f_directory_recurse_copy_delete(&recurse);
f_string_dynamic_resize(0, &path_source);
f_string_dynamic_resize(0, &destination_file);
#define fake_console_parameter_t_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_fll_program_console_parameter_standard_initialize, \
\
macro_f_console_parameter_t_initialize_3(fake_short_build_s, fake_long_build_s, 1, f_console_flag_normal_e), \
macro_f_console_parameter_t_initialize_3(fake_short_data_s, fake_long_data_s, 1, f_console_flag_normal_e), \
* Flags for fine-tuned print control.
*
* fake_print_flag_*_e:
- * - none: No flags set.
- * - debug: Stream is for debug printing.
- * - error: Stream is for error printing.
- * - message: Stream is for message printing.
- * - warning: Stream is for warning printing.
- * - file_to: Stream is a destination file.
- * - file_from: Stream is a source file.
+ * - none: No flags set.
+ * - debug: Stream is for debug printing.
+ * - error: Stream is for error printing.
+ * - in: Stream is a source file.
+ * - message: Stream is for message printing.
+ * - out: Stream is a destination file.
+ * - warning: Stream is for warning printing.
*/
#ifndef _di_fake_print_flag_e_
enum {
- fake_print_flag_none_e = 0x0,
- fake_print_flag_debug_e = 0x1,
- fake_print_flag_error_e = 0x2,
- fake_print_flag_message_e = 0x4,
- fake_print_flag_warning_e = 0x8,
- fake_print_flag_file_to_e = 0x10,
- fake_print_flag_file_from_e = 0x20,
+ fake_print_flag_none_e = 0x0,
+ fake_print_flag_debug_e = 0x1,
+ fake_print_flag_error_e = 0x2,
+ fake_print_flag_file_e = 0x4,
+ fake_print_flag_in_e = 0x8,
+ fake_print_flag_out_e = 0x10,
+ fake_print_flag_message_e = 0x20,
+ fake_print_flag_warning_e = 0x40,
}; // enum
#endif // _di_fake_print_flag_e_
fake_main_t data = fake_main_t_initialize;
- data.program.debug.flag |= fake_print_flag_debug_e;
- data.program.error.flag |= fake_print_flag_error_e;
- data.program.message.flag |= fake_print_flag_message_e;
- data.program.warning.flag |= fake_print_flag_warning_e;
+ data.program.debug.flag |= fake_print_flag_debug_e | fake_print_flag_out_e;
+ data.program.error.flag |= fake_print_flag_error_e | fake_print_flag_out_e;
+ data.program.output.flag |= fake_print_flag_out_e;
+ data.program.message.flag |= fake_print_flag_message_e | fake_print_flag_out_e;
+ data.program.warning.flag |= fake_print_flag_warning_e | fake_print_flag_out_e;
+ data.program.error.custom = (void *) &data;
+ data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
data.program.output.custom = (void *) &data;
- data.program.error.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.program.debug.custom = (void *) &data;
data.setting.flag |= fake_main_flag_enable_documents_e;
data.setting.flag |= fake_main_flag_enable_shared_e;
const f_array_length_t total = data_make->cache_arguments.used - 1;
f_string_static_t destination = f_string_static_t_initialize;
- f_directory_recurse_t recurse = f_directory_recurse_t_initialize;
+ f_directory_recurse_copy_t recurse = f_directory_recurse_copy_t_initialize;
if (data_make->main->program.error.verbosity > f_console_verbosity_normal_e) {
recurse.state.custom = data_make->main;
data_make->main->setting.state.status = F_status_set_error(F_failure);
- f_directory_recurse_delete(&recurse);
+ f_directory_recurse_copy_delete(&recurse);
return;
}
data_make->main->setting.state.status = F_status_set_error(F_failure);
- f_directory_recurse_delete(&recurse);
+ f_directory_recurse_copy_delete(&recurse);
return;
}
if (data_make->main->setting.state.status == F_true) {
if (clone) {
- recurse.flag |= f_directory_recurse_flag_clone_e;
+ recurse.flag |= f_directory_recurse_copy_flag_clone_e;
}
else {
- recurse.flag -= recurse.flag & f_directory_recurse_flag_clone_e;
+ recurse.flag -= recurse.flag & f_directory_recurse_copy_flag_clone_e;
}
fl_directory_copy(data_make->cache_arguments.array[i], destination, &recurse);
}
} // for
- f_directory_recurse_delete(&recurse);
+ f_directory_recurse_copy_delete(&recurse);
if (F_status_is_error_not(data_make->main->setting.state.status)) {
data_make->main->setting.state.status = F_none;
const f_array_length_t total = data_make->cache_arguments.used -1;
- f_directory_recurse_t recurse = f_directory_recurse_t_initialize;
+ f_directory_recurse_copy_t recurse = f_directory_recurse_copy_t_initialize;
f_string_static_t destination = f_string_static_t_initialize;
if (data_make->main->program.error.verbosity > f_console_verbosity_normal_e) {
data_make->main->setting.state.status = F_status_set_error(F_failure);
- f_directory_recurse_delete(&recurse);
+ f_directory_recurse_copy_delete(&recurse);
return;
}
data_make->main->setting.state.status = F_status_set_error(F_failure);
- f_directory_recurse_delete(&recurse);
+ f_directory_recurse_copy_delete(&recurse);
return;
}
data_make->main->setting.state.status = F_status_set_error(F_failure);
- f_directory_recurse_delete(&recurse);
+ f_directory_recurse_copy_delete(&recurse);
return;
}
} // for
- f_directory_recurse_delete(&recurse);
+ f_directory_recurse_copy_delete(&recurse);
data_make->main->setting.state.status = F_none;
}
if (!void_recurse) return;
- f_directory_recurse_t * const recurse = (f_directory_recurse_t * const) void_recurse;
+ f_directory_recurse_copy_t * const recurse = (f_directory_recurse_copy_t * const) void_recurse;
if (!recurse->state.custom) {
recurse->state.status = F_output_not;
if (!void_recurse) return;
- f_directory_recurse_t * const recurse = (f_directory_recurse_t * const) void_recurse;
+ f_directory_recurse_copy_t * const recurse = (f_directory_recurse_copy_t * const) void_recurse;
if (!recurse->state.custom) {
recurse->state.status = F_output_not;
if (!void_recurse) return;
- f_directory_recurse_t * const recurse = (f_directory_recurse_t * const) void_recurse;
+ f_directory_recurse_copy_t * const recurse = (f_directory_recurse_copy_t * const) void_recurse;
if (!recurse->state.custom) {
recurse->state.status = F_output_not;
/**
* Helper function for performing a verbose print for a file clone operation.
*
- * This is intended to be passed as a callback to f_directory_recurse_t.verbose.
- * The f_directory_recurse_t.state.custom must be the fake_data_t.
+ * This is intended to be passed as a callback to f_directory_recurse_copy_t.verbose.
+ * The f_directory_recurse_copy_t.state.custom must be the fake_data_t.
*
* @param source
* The source string.
/**
* Helper function for performing a verbose print for a file copy operation.
*
- * This is intended to be passed as a callback to f_directory_recurse_t.verbose.
- * The f_directory_recurse_t.state.custom must be the fake_data_t.
+ * This is intended to be passed as a callback to f_directory_recurse_copy_t.verbose.
+ * The f_directory_recurse_copy_t.state.custom must be the fake_data_t.
*
* @param source
* The source string.
/**
* Print a verbose message for when a file is moved.
*
- * This is intended to be passed as a callback to f_directory_recurse_t.verbose.
- * The f_directory_recurse_t.state.custom must be the fake_data_t.
+ * This is intended to be passed as a callback to f_directory_recurse_copy_t.verbose.
+ * The f_directory_recurse_copy_t.state.custom must be the fake_data_t.
*
* @param source
* The source string.
search_static yes
environment PATH LD_LIBRARY_PATH
+environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
#defines -D_di_libcap_ -D_di_thread_support_
defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
/**
* The program defines.
*
- * firewall_*:
+ * firewall_*_d:
* - allocation_console: An allocation step used for small buffers specifically for console parameter.
* - allocation_large: An allocation step used for buffers that are anticipated to have large buffers.
* - allocation_small: An allocation step used for buffers that are anticipated to have small buffers.
firewall_main_t data = firewall_main_t_initialize;
- data.program.debug.flag |= firewall_read_print_flag_debug_e;
- data.program.error.flag |= firewall_read_print_flag_error_e;
- data.program.message.flag |= firewall_read_print_flag_message_e;
- data.program.warning.flag |= firewall_read_print_flag_warning_e;
+ data.program.debug.flag |= firewall_print_flag_debug_e | firewall_print_flag_out_e;
+ data.program.error.flag |= firewall_print_flag_error_e | firewall_print_flag_out_e;
+ data.program.output.flag |= firewall_print_flag_out_e;
+ data.program.message.flag |= firewall_print_flag_message_e | firewall_print_flag_out_e;
+ data.program.warning.flag |= firewall_print_flag_warning_e | firewall_print_flag_out_e;
+ data.program.error.custom = (void *) &data;
+ data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
data.program.output.custom = (void *) &data;
- data.program.error.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.program.debug.custom = (void *) &data;
f_console_parameter_t parameters[] = firewall_console_parameter_t_initialize;
data.program.parameters.array = parameters;
search_static yes
environment PATH LD_LIBRARY_PATH
+environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
#defines -D_di_libcap_ -D_di_thread_support_
defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
/**
* The program defines.
*
- * fss_basic_list_read_*:
+ * fss_basic_list_read_*_d:
* - allocation_console: An allocation step used for small buffers specifically for console parameter.
* - allocation_large: An allocation step used for buffers that are anticipated to have large buffers.
* - allocation_small: An allocation step used for buffers that are anticipated to have small buffers.
#define fss_basic_list_read_console_parameter_t_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_fll_program_console_parameter_standard_initialize, \
\
macro_f_console_parameter_t_initialize_3(fss_basic_list_read_short_at_s, fss_basic_list_read_long_at_s, 0, 1, f_console_flag_normal_e), \
macro_f_console_parameter_t_initialize_3(fss_basic_list_read_short_content_s, fss_basic_list_read_long_content_s, 0, 0, f_console_flag_normal_e), \
fss_basic_list_read_main_t data = fss_basic_list_read_main_t_initialize;
- data.program.debug.flag |= fss_basic_list_read_print_flag_debug_e;
- data.program.error.flag |= fss_basic_list_read_print_flag_error_e;
- data.program.message.flag |= fss_basic_list_read_print_flag_message_e;
- data.program.warning.flag |= fss_basic_list_read_print_flag_warning_e;
+ data.program.debug.flag |= fss_basic_list_read_print_flag_debug_e | fss_basic_list_read_print_flag_out_e;
+ data.program.error.flag |= fss_basic_list_read_print_flag_error_e | fss_basic_list_read_print_flag_out_e;
+ data.program.output.flag |= fss_basic_list_read_print_flag_out_e;
+ data.program.message.flag |= fss_basic_list_read_print_flag_message_e | fss_basic_list_read_print_flag_out_e;
+ data.program.warning.flag |= fss_basic_list_read_print_flag_warning_e | fss_basic_list_read_print_flag_out_e;
+ data.program.error.custom = (void *) &data;
+ data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
data.program.output.custom = (void *) &data;
- data.program.error.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.program.debug.custom = (void *) &data;
f_console_parameter_t parameters[] = fss_basic_list_read_console_parameter_t_initialize;
data.program.parameters.array = parameters;
search_static yes
environment PATH LD_LIBRARY_PATH
+environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
#defines -D_di_libcap_ -D_di_thread_support_
defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
/**
* The program defines.
*
- * fss_basic_read_*:
+ * fss_basic_read_*_d:
* - allocation_console: An allocation step used for small buffers specifically for console parameter.
* - allocation_large: An allocation step used for buffers that are anticipated to have large buffers.
* - allocation_small: An allocation step used for buffers that are anticipated to have small buffers.
#define fss_basic_read_console_parameter_t_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_fll_program_console_parameter_standard_initialize, \
\
macro_f_console_parameter_t_initialize_3(fss_basic_read_short_at_s, fss_basic_read_long_at_s, 0, 1, f_console_flag_normal_e), \
macro_f_console_parameter_t_initialize_3(fss_basic_read_short_content_s, fss_basic_read_long_content_s, 0, 0, f_console_flag_normal_e), \
fss_basic_read_main_t data = fss_basic_read_main_t_initialize;
- data.program.debug.flag |= fss_basic_read_print_flag_debug_e;
- data.program.error.flag |= fss_basic_read_print_flag_error_e;
- data.program.message.flag |= fss_basic_read_print_flag_message_e;
- data.program.warning.flag |= fss_basic_read_print_flag_warning_e;
+ data.program.debug.flag |= fss_basic_read_print_flag_debug_e | fss_basic_read_print_flag_out_e;
+ data.program.error.flag |= fss_basic_read_print_flag_error_e | fss_basic_read_print_flag_out_e;
+ data.program.output.flag |= fss_basic_read_print_flag_out_e;
+ data.program.message.flag |= fss_basic_read_print_flag_message_e | fss_basic_read_print_flag_out_e;
+ data.program.warning.flag |= fss_basic_read_print_flag_warning_e | fss_basic_read_print_flag_out_e;
+ data.program.error.custom = (void *) &data;
+ data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
data.program.output.custom = (void *) &data;
- data.program.error.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.program.debug.custom = (void *) &data;
f_console_parameter_t parameters[] = fss_basic_read_console_parameter_t_initialize;
data.program.parameters.array = parameters;
search_static yes
environment PATH LD_LIBRARY_PATH
+environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
#defines -D_di_libcap_ -D_di_thread_support_
defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
/**
* The program defines.
*
- * fss_embedded_list_read_*:
+ * fss_embedded_list_read_*_d:
* - allocation_console: An allocation step used for small buffers specifically for console parameter.
* - allocation_large: An allocation step used for buffers that are anticipated to have large buffers.
* - allocation_small: An allocation step used for buffers that are anticipated to have small buffers.
#define fss_embedded_list_read_console_parameter_t_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_fll_program_console_parameter_standard_initialize, \
\
macro_f_console_parameter_t_initialize_3(fss_embedded_list_read_short_at_s.string, fss_embedded_list_read_long_at_s.string, 0, 1, f_console_flag_normal_e), \
macro_f_console_parameter_t_initialize_3(fss_embedded_list_read_short_content_s.string, fss_embedded_list_read_long_content_s.string, 0, 0, f_console_flag_normal_e), \
fss_embedded_list_read_main_t data = fss_embedded_list_read_main_t_initialize;
- data.program.debug.flag |= fss_embedded_list_read_print_flag_debug_e;
- data.program.error.flag |= fss_embedded_list_read_print_flag_error_e;
- data.program.message.flag |= fss_embedded_list_read_print_flag_message_e;
- data.program.warning.flag |= fss_embedded_list_read_print_flag_warning_e;
+ data.program.debug.flag |= fss_embedded_list_read_print_flag_debug_e | fss_embedded_list_read_print_flag_out_e;
+ data.program.error.flag |= fss_embedded_list_read_print_flag_error_e | fss_embedded_list_read_print_flag_out_e;
+ data.program.output.flag |= fss_embedded_list_read_print_flag_out_e;
+ data.program.message.flag |= fss_embedded_list_read_print_flag_message_e | fss_embedded_list_read_print_flag_out_e;
+ data.program.warning.flag |= fss_embedded_list_read_print_flag_warning_e | fss_embedded_list_read_print_flag_out_e;
+ data.program.error.custom = (void *) &data;
+ data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
data.program.output.custom = (void *) &data;
- data.program.error.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.program.debug.custom = (void *) &data;
f_console_parameter_t parameters[] = fss_embedded_list_read_console_parameter_t_initialize;
data.program.parameters.array = parameters;
search_static yes
environment PATH LD_LIBRARY_PATH
+environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
#defines -D_di_libcap_ -D_di_thread_support_
defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
/**
* The program defines.
*
- * fss_extended_list_read_*:
+ * fss_extended_list_read_*_d:
* - allocation_console: An allocation step used for small buffers specifically for console parameter.
* - allocation_large: An allocation step used for buffers that are anticipated to have large buffers.
* - allocation_small: An allocation step used for buffers that are anticipated to have small buffers.
#define fss_extended_list_read_console_parameter_t_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_fll_program_console_parameter_standard_initialize, \
\
macro_f_console_parameter_t_initialize_3(fss_extended_list_read_short_at_s, fss_extended_list_read_long_at_s, 0, 1, f_console_flag_normal_e), \
macro_f_console_parameter_t_initialize_3(fss_extended_list_read_short_content_s, fss_extended_list_read_long_content_s, 0, 0, f_console_flag_normal_e), \
fss_extended_list_read_main_t data = fss_extended_list_read_main_t_initialize;
- data.program.debug.flag |= fss_extended_list_read_print_flag_debug_e;
- data.program.error.flag |= fss_extended_list_read_print_flag_error_e;
- data.program.message.flag |= fss_extended_list_read_print_flag_message_e;
- data.program.warning.flag |= fss_extended_list_read_print_flag_warning_e;
+ data.program.debug.flag |= fss_extended_list_read_print_flag_debug_e | fss_extended_list_read_print_flag_out_e;
+ data.program.error.flag |= fss_extended_list_read_print_flag_error_e | fss_extended_list_read_print_flag_out_e;
+ data.program.output.flag |= fss_extended_list_read_print_flag_out_e;
+ data.program.message.flag |= fss_extended_list_read_print_flag_message_e | fss_extended_list_read_print_flag_out_e;
+ data.program.warning.flag |= fss_extended_list_read_print_flag_warning_e | fss_extended_list_read_print_flag_out_e;
+ data.program.error.custom = (void *) &data;
+ data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
data.program.output.custom = (void *) &data;
- data.program.error.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.program.debug.custom = (void *) &data;
f_console_parameter_t parameters[] = fss_extended_list_read_console_parameter_t_initialize;
data.program.parameters.array = parameters;
search_static yes
environment PATH LD_LIBRARY_PATH
+environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
#defines -D_di_libcap_ -D_di_thread_support_
defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
/**
* The program pipe strings.
*
- * fss_extended_read_pipe_*:
+ * fss_extended_read_pipe_*_d:
* - name: A name used to represent the pipe when printing file names.
* - content_end: A code used to represent the end of Content for use in binary formats.
* - content_ignore: A code used to represent the ignoring Content for use in binary formats.
#define fss_extended_read_console_parameter_t_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_fll_program_console_parameter_standard_initialize, \
\
macro_f_console_parameter_t_initialize_3(fss_extended_read_short_content_s, fss_extended_read_long_content_s, 0, 0, f_console_flag_normal_e), \
macro_f_console_parameter_t_initialize_3(fss_extended_read_short_columns_s, fss_extended_read_long_columns_s, 0, 0, f_console_flag_normal_e), \
fss_extended_read_main_t data = fss_extended_read_main_t_initialize;
- data.program.debug.flag |= fss_extended_read_print_flag_debug_e;
- data.program.error.flag |= fss_extended_read_print_flag_error_e;
- data.program.message.flag |= fss_extended_read_print_flag_message_e;
- data.program.warning.flag |= fss_extended_read_print_flag_warning_e;
+ data.program.debug.flag |= fss_extended_read_print_flag_debug_e | fss_extended_read_print_flag_out_e;
+ data.program.error.flag |= fss_extended_read_print_flag_error_e | fss_extended_read_print_flag_out_e;
+ data.program.output.flag |= fss_extended_read_print_flag_out_e;
+ data.program.message.flag |= fss_extended_read_print_flag_message_e | fss_extended_read_print_flag_out_e;
+ data.program.warning.flag |= fss_extended_read_print_flag_warning_e | fss_extended_read_print_flag_out_e;
+ data.program.error.custom = (void *) &data;
+ data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
data.program.output.custom = (void *) &data;
- data.program.error.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.program.debug.custom = (void *) &data;
f_console_parameter_t parameters[] = fss_extended_read_console_parameter_t_initialize;
data.program.parameters.array = parameters;
search_static yes
environment PATH LD_LIBRARY_PATH
+environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
#defines -D_di_libcap_ -D_di_thread_support_
defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
/**
* The program defines.
*
- * fss_identify_*:
+ * fss_identify_*_d:
* - allocation_console: An allocation step used for small buffers specifically for console parameter.
* - allocation_large: An allocation step used for buffers that are anticipated to have large buffers.
* - allocation_small: An allocation step used for buffers that are anticipated to have small buffers.
#define fss_identify_console_parameter_t_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_fll_program_console_parameter_standard_initialize, \
\
macro_f_console_parameter_t_initialize_3(fss_identify_short_content_s, fss_identify_long_content_s, 0, 0, f_console_flag_normal_e), \
macro_f_console_parameter_t_initialize_3(fss_identify_short_line_s, fss_identify_long_line_s, 0, 1, f_console_flag_normal_e), \
fss_identify_main_t data = fss_identify_main_t_initialize;
- data.program.debug.flag |= fss_identify_print_flag_debug_e;
- data.program.error.flag |= fss_identify_print_flag_error_e;
- data.program.message.flag |= fss_identify_print_flag_message_e;
- data.program.warning.flag |= fss_identify_print_flag_warning_e;
+ data.program.debug.flag |= fss_identify_print_flag_debug_e | fss_identify_print_flag_out_e;
+ data.program.error.flag |= fss_identify_print_flag_error_e | fss_identify_print_flag_out_e;
+ data.program.output.flag |= fss_identify_print_flag_out_e;
+ data.program.message.flag |= fss_identify_print_flag_message_e | fss_identify_print_flag_out_e;
+ data.program.warning.flag |= fss_identify_print_flag_warning_e | fss_identify_print_flag_out_e;
+ data.program.error.custom = (void *) &data;
+ data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
data.program.output.custom = (void *) &data;
- data.program.error.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.program.debug.custom = (void *) &data;
f_console_parameter_t parameters[] = fss_identify_console_parameter_t_initialize;
data.program.parameters.array = parameters;
search_static yes
environment PATH LD_LIBRARY_PATH
+environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
#defines -D_di_libcap_ -D_di_thread_support_
defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
#define fss_payload_read_console_parameter_t_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_fll_program_console_parameter_standard_initialize, \
\
macro_f_console_parameter_t_initialize_3(fss_payload_read_short_at_s, fss_payload_read_long_at_s, 0, 1, f_console_flag_normal_e), \
macro_f_console_parameter_t_initialize_3(fss_payload_read_short_content_s, fss_payload_read_long_content_s, 0, 0, f_console_flag_normal_e), \
fss_payload_read_main_t data = fss_payload_read_main_t_initialize;
- data.program.debug.flag |= fss_payload_read_print_flag_debug_e;
- data.program.error.flag |= fss_payload_read_print_flag_error_e;
- data.program.message.flag |= fss_payload_read_print_flag_message_e;
- data.program.warning.flag |= fss_payload_read_print_flag_warning_e;
+ data.program.debug.flag |= fss_payload_read_print_flag_debug_e | fss_payload_read_print_flag_out_e;
+ data.program.error.flag |= fss_payload_read_print_flag_error_e | fss_payload_read_print_flag_out_e;
+ data.program.output.flag |= fss_payload_read_print_flag_out_e;
+ data.program.message.flag |= fss_payload_read_print_flag_message_e | fss_payload_read_print_flag_out_e;
+ data.program.warning.flag |= fss_payload_read_print_flag_warning_e | fss_payload_read_print_flag_out_e;
+ data.program.error.custom = (void *) &data;
+ data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
data.program.output.custom = (void *) &data;
- data.program.error.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.program.debug.custom = (void *) &data;
f_console_parameter_t parameters[] = fss_payload_read_console_parameter_t_initialize;
data.program.parameters.array = parameters;
search_static yes
environment PATH LD_LIBRARY_PATH
+environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
#defines -D_di_libcap_ -D_di_thread_support_
defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
fss_write_main_t data = fss_write_main_t_initialize;
- data.program.debug.flag |= fss_write_print_flag_debug_e;
- data.program.error.flag |= fss_write_print_flag_error_e;
- data.program.message.flag |= fss_write_print_flag_message_e;
- data.program.warning.flag |= fss_write_print_flag_warning_e;
+ data.program.debug.flag |= fss_write_print_flag_debug_e | fss_write_print_flag_out_e;
+ data.program.error.flag |= fss_write_print_flag_error_e | fss_write_print_flag_out_e;
+ data.program.output.flag |= fss_write_print_flag_out_e;
+ data.program.message.flag |= fss_write_print_flag_message_e | fss_write_print_flag_out_e;
+ data.program.warning.flag |= fss_write_print_flag_warning_e | fss_write_print_flag_out_e;
+ data.program.error.custom = (void *) &data;
+ data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
data.program.output.custom = (void *) &data;
- data.program.error.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.program.debug.custom = (void *) &data;
data.setting.state.custom = (void *) &data;
data.setting.standard = fss_write_basic_standard_s;
fss_write_main_t data = fss_write_main_t_initialize;
- data.program.debug.flag |= fss_write_print_flag_debug_e;
- data.program.error.flag |= fss_write_print_flag_error_e;
- data.program.message.flag |= fss_write_print_flag_message_e;
- data.program.warning.flag |= fss_write_print_flag_warning_e;
+ data.program.debug.flag |= fss_write_print_flag_debug_e | fss_write_print_flag_out_e;
+ data.program.error.flag |= fss_write_print_flag_error_e | fss_write_print_flag_out_e;
+ data.program.output.flag |= fss_write_print_flag_out_e;
+ data.program.message.flag |= fss_write_print_flag_message_e | fss_write_print_flag_out_e;
+ data.program.warning.flag |= fss_write_print_flag_warning_e | fss_write_print_flag_out_e;
+ data.program.error.custom = (void *) &data;
+ data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
data.program.output.custom = (void *) &data;
- data.program.error.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.program.debug.custom = (void *) &data;
data.setting.state.custom = (void *) &data;
data.setting.standard = fss_write_basic_list_standard_s;
fss_write_main_t data = fss_write_main_t_initialize;
- data.program.debug.flag |= fss_write_print_flag_debug_e;
- data.program.error.flag |= fss_write_print_flag_error_e;
- data.program.message.flag |= fss_write_print_flag_message_e;
- data.program.warning.flag |= fss_write_print_flag_warning_e;
+ data.program.debug.flag |= fss_write_print_flag_debug_e | fss_write_print_flag_out_e;
+ data.program.error.flag |= fss_write_print_flag_error_e | fss_write_print_flag_out_e;
+ data.program.output.flag |= fss_write_print_flag_out_e;
+ data.program.message.flag |= fss_write_print_flag_message_e | fss_write_print_flag_out_e;
+ data.program.warning.flag |= fss_write_print_flag_warning_e | fss_write_print_flag_out_e;
+ data.program.error.custom = (void *) &data;
+ data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
data.program.output.custom = (void *) &data;
- data.program.error.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.program.debug.custom = (void *) &data;
data.setting.state.custom = (void *) &data;
data.setting.standard = fss_write_embedded_list_standard_s;
fss_write_main_t data = fss_write_main_t_initialize;
- data.program.debug.flag |= fss_write_print_flag_debug_e;
- data.program.error.flag |= fss_write_print_flag_error_e;
- data.program.message.flag |= fss_write_print_flag_message_e;
- data.program.warning.flag |= fss_write_print_flag_warning_e;
+ data.program.debug.flag |= fss_write_print_flag_debug_e | fss_write_print_flag_out_e;
+ data.program.error.flag |= fss_write_print_flag_error_e | fss_write_print_flag_out_e;
+ data.program.output.flag |= fss_write_print_flag_out_e;
+ data.program.message.flag |= fss_write_print_flag_message_e | fss_write_print_flag_out_e;
+ data.program.warning.flag |= fss_write_print_flag_warning_e | fss_write_print_flag_out_e;
+ data.program.error.custom = (void *) &data;
+ data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
data.program.output.custom = (void *) &data;
- data.program.error.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.program.debug.custom = (void *) &data;
data.setting.state.custom = (void *) &data;
data.setting.standard = fss_write_extended_standard_s;
fss_write_main_t data = fss_write_main_t_initialize;
- data.program.debug.flag |= fss_write_print_flag_debug_e;
- data.program.error.flag |= fss_write_print_flag_error_e;
- data.program.message.flag |= fss_write_print_flag_message_e;
- data.program.warning.flag |= fss_write_print_flag_warning_e;
+ data.program.debug.flag |= fss_write_print_flag_debug_e | fss_write_print_flag_out_e;
+ data.program.error.flag |= fss_write_print_flag_error_e | fss_write_print_flag_out_e;
+ data.program.output.flag |= fss_write_print_flag_out_e;
+ data.program.message.flag |= fss_write_print_flag_message_e | fss_write_print_flag_out_e;
+ data.program.warning.flag |= fss_write_print_flag_warning_e | fss_write_print_flag_out_e;
+ data.program.error.custom = (void *) &data;
+ data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
data.program.output.custom = (void *) &data;
- data.program.error.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.program.debug.custom = (void *) &data;
data.setting.state.custom = (void *) &data;
data.setting.standard = fss_write_extended_list_standard_s;
/**
* The program default defines.
*
- * fss_write_*:
+ * fss_write_*_d:
* - allocation_console: An allocation step used for small buffers specifically for console parameter.
* - allocation_large: An allocation step used for buffers that are anticipated to have large buffers.
* - allocation_small: An allocation step used for buffers that are anticipated to have small buffers.
#define fss_write_console_parameter_t_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_fll_program_console_parameter_standard_initialize, \
\
macro_f_console_parameter_t_initialize_3(fss_write_short_as_s, fss_write_long_as_s, 1, f_console_flag_normal_e), \
macro_f_console_parameter_t_initialize_3(fss_write_short_backtick_s, fss_write_long_backtick_s, 0, f_console_flag_normal_e), \
* Flags for fine-tuned print control.
*
* fss_write_print_flag_*_e:
- * - none: No flags set.
- * - debug: Stream is for debug printing.
- * - error: Stream is for error printing.
- * - message: Stream is for message printing.
- * - warning: Stream is for warning printing.
- * - file_to: Stream is a destination file.
- * - file_from: Stream is a source file.
+ * - none: No flags set.
+ * - debug: Stream is for debug printing.
+ * - error: Stream is for error printing.
+ * - in: Stream is a source file.
+ * - message: Stream is for message printing.
+ * - out: Stream is a destination file.
+ * - warning: Stream is for warning printing.
*/
#ifndef _di_fss_write_print_flag_e_
enum {
- fss_write_print_flag_none_e = 0x0,
- fss_write_print_flag_debug_e = 0x1,
- fss_write_print_flag_error_e = 0x2,
- fss_write_print_flag_message_e = 0x4,
- fss_write_print_flag_warning_e = 0x8,
- fss_write_print_flag_file_to_e = 0x10,
- fss_write_print_flag_file_from_e = 0x20,
+ fss_write_print_flag_none_e = 0x0,
+ fss_write_print_flag_debug_e = 0x1,
+ fss_write_print_flag_error_e = 0x2,
+ fss_write_print_flag_file_e = 0x4,
+ fss_write_print_flag_in_e = 0x8,
+ fss_write_print_flag_out_e = 0x10,
+ fss_write_print_flag_message_e = 0x20,
+ fss_write_print_flag_warning_e = 0x40,
}; // enum
#endif // _di_fss_write_print_flag_e_
fss_write_main_t data = fss_write_main_t_initialize;
- data.program.debug.flag |= fss_write_print_flag_debug_e;
- data.program.error.flag |= fss_write_print_flag_error_e;
- data.program.message.flag |= fss_write_print_flag_message_e;
- data.program.warning.flag |= fss_write_print_flag_warning_e;
+ data.program.debug.flag |= fss_write_print_flag_debug_e | fss_write_print_flag_out_e;
+ data.program.error.flag |= fss_write_print_flag_error_e | fss_write_print_flag_out_e;
+ data.program.output.flag |= fss_write_print_flag_out_e;
+ data.program.message.flag |= fss_write_print_flag_message_e | fss_write_print_flag_out_e;
+ data.program.warning.flag |= fss_write_print_flag_warning_e | fss_write_print_flag_out_e;
+ data.program.error.custom = (void *) &data;
+ data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
data.program.output.custom = (void *) &data;
- data.program.error.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.program.debug.custom = (void *) &data;
data.setting.state.custom = (void *) &data;
fss_write_main_t data = fss_write_main_t_initialize;
- data.program.debug.flag |= fss_write_print_flag_debug_e;
- data.program.error.flag |= fss_write_print_flag_error_e;
- data.program.message.flag |= fss_write_print_flag_message_e;
- data.program.warning.flag |= fss_write_print_flag_warning_e;
+ data.program.debug.flag |= fss_write_print_flag_debug_e | fss_write_print_flag_out_e;
+ data.program.error.flag |= fss_write_print_flag_error_e | fss_write_print_flag_out_e;
+ data.program.output.flag |= fss_write_print_flag_out_e;
+ data.program.message.flag |= fss_write_print_flag_message_e | fss_write_print_flag_out_e;
+ data.program.warning.flag |= fss_write_print_flag_warning_e | fss_write_print_flag_out_e;
+ data.program.error.custom = (void *) &data;
+ data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
data.program.output.custom = (void *) &data;
- data.program.error.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.program.debug.custom = (void *) &data;
data.setting.state.custom = (void *) &data;
data.setting.standard = fss_write_payload_standard_s;
search_static yes
environment PATH LD_LIBRARY_PATH
+environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
#defines -D_di_libcap_ -D_di_thread_support_
defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
search_static yes
environment PATH LD_LIBRARY_PATH
+environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
#defines -D_di_libcap_ -D_di_thread_support_
defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
search_static yes
environment PATH LD_LIBRARY_PATH
+environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
#defines -D_di_libcap_ -D_di_thread_support_
defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
search_static yes
environment PATH LD_LIBRARY_PATH
+environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
#defines -D_di_libcap_ -D_di_thread_support_
defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
search_static yes
environment PATH LD_LIBRARY_PATH
+environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
#defines -D_di_libcap_ -D_di_thread_support_
defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
search_static yes
environment PATH LD_LIBRARY_PATH
+environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
#defines -D_di_libcap_ -D_di_thread_support_
defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
search_static yes
environment PATH LD_LIBRARY_PATH
+environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
#defines -D_di_libcap_ -D_di_thread_support_
defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
search_static yes
environment PATH LD_LIBRARY_PATH
+environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
#defines -D_di_libcap_ -D_di_thread_support_
defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
/**
* The program defines.
*
- * iki_read_*:
+ * iki_read_*_d:
* - allocation_console: An allocation step used for small buffers specifically for console parameter.
* - allocation_large: An allocation step used for buffers that are anticipated to have large buffers.
* - allocation_small: An allocation step used for buffers that are anticipated to have small buffers.
#define iki_read_console_parameter_t_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_fll_program_console_parameter_standard_initialize, \
\
macro_f_console_parameter_t_initialize_3(iki_read_short_at_s, iki_read_long_at_s, 1, f_console_flag_normal_e), \
macro_f_console_parameter_t_initialize_3(iki_read_short_content_s, iki_read_long_content_s, 0, f_console_flag_normal_e), \
* Flags for fine-tuned print control.
*
* iki_read_print_flag_*_e:
- * - none: No flags set.
- * - debug: Stream is for debug printing.
- * - error: Stream is for error printing.
- * - message: Stream is for message printing.
- * - warning: Stream is for warning printing.
- * - file_to: Stream is a destination file.
- * - file_from: Stream is a source file.
+ * - none: No flags set.
+ * - debug: Stream is for debug printing.
+ * - error: Stream is for error printing.
+ * - in: Stream is a source file.
+ * - message: Stream is for message printing.
+ * - out: Stream is a destination file.
+ * - warning: Stream is for warning printing.
*/
#ifndef _di_iki_read_print_flag_e_
enum {
- iki_read_print_flag_none_e = 0x0,
- iki_read_print_flag_debug_e = 0x1,
- iki_read_print_flag_error_e = 0x2,
- iki_read_print_flag_message_e = 0x4,
- iki_read_print_flag_warning_e = 0x8,
- iki_read_print_flag_file_to_e = 0x10,
- iki_read_print_flag_file_from_e = 0x20,
+ iki_read_print_flag_none_e = 0x0,
+ iki_read_print_flag_debug_e = 0x1,
+ iki_read_print_flag_error_e = 0x2,
+ iki_read_print_flag_file_e = 0x4,
+ iki_read_print_flag_in_e = 0x8,
+ iki_read_print_flag_out_e = 0x10,
+ iki_read_print_flag_message_e = 0x20,
+ iki_read_print_flag_warning_e = 0x40,
}; // enum
#endif // _di_iki_read_print_flag_e_
iki_read_main_t data = iki_read_main_t_initialize;
- data.program.debug.flag |= iki_read_print_flag_debug_e;
- data.program.error.flag |= iki_read_print_flag_error_e;
- data.program.message.flag |= iki_read_print_flag_message_e;
- data.program.warning.flag |= iki_read_print_flag_warning_e;
+ data.program.debug.flag |= iki_read_print_flag_debug_e | iki_read_print_flag_out_e;
+ data.program.error.flag |= iki_read_print_flag_error_e | iki_read_print_flag_out_e;
+ data.program.output.flag |= iki_read_print_flag_out_e;
+ data.program.message.flag |= iki_read_print_flag_message_e | iki_read_print_flag_out_e;
+ data.program.warning.flag |= iki_read_print_flag_warning_e | iki_read_print_flag_out_e;
+ data.program.error.custom = (void *) &data;
+ data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
data.program.output.custom = (void *) &data;
- data.program.error.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.program.debug.custom = (void *) &data;
data.setting.state.custom = (void *) &data;
data.setting.state.handle = &fll_program_standard_signal_handle;
search_static yes
environment PATH LD_LIBRARY_PATH
+environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
#defines -D_di_libcap_ -D_di_thread_support_
defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
/**
* The program defines.
*
- * iki_write_*:
+ * iki_write_*_d:
* - allocation_console: An allocation step used for small buffers specifically for console parameter.
* - allocation_large: An allocation step used for buffers that are anticipated to have large buffers.
* - allocation_small: An allocation step used for buffers that are anticipated to have small buffers.
#define iki_write_console_parameter_t_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_fll_program_console_parameter_standard_initialize, \
\
macro_f_console_parameter_t_initialize_3(iki_write_short_backtick_s, iki_write_long_backtick_s, 0, f_console_flag_normal_e), \
macro_f_console_parameter_t_initialize_3(iki_write_short_content_s, iki_write_long_content_s, 1, f_console_flag_normal_e), \
* Flags for fine-tuned print control.
*
* iki_write_print_flag_*_e:
- * - none: No flags set.
- * - debug: Stream is for debug printing.
- * - error: Stream is for error printing.
- * - message: Stream is for message printing.
- * - warning: Stream is for warning printing.
- * - file_to: Stream is a destination file.
- * - file_from: Stream is a source file.
+ * - none: No flags set.
+ * - debug: Stream is for debug printing.
+ * - error: Stream is for error printing.
+ * - in: Stream is a source file.
+ * - message: Stream is for message printing.
+ * - out: Stream is a destination file.
+ * - warning: Stream is for warning printing.
*/
#ifndef _di_iki_write_print_flag_e_
enum {
- iki_write_print_flag_none_e = 0x0,
- iki_write_print_flag_debug_e = 0x1,
- iki_write_print_flag_error_e = 0x2,
- iki_write_print_flag_message_e = 0x4,
- iki_write_print_flag_warning_e = 0x8,
- iki_write_print_flag_file_to_e = 0x10,
- iki_write_print_flag_file_from_e = 0x20,
+ iki_write_print_flag_none_e = 0x0,
+ iki_write_print_flag_debug_e = 0x1,
+ iki_write_print_flag_error_e = 0x2,
+ iki_write_print_flag_file_e = 0x4,
+ iki_write_print_flag_in_e = 0x8,
+ iki_write_print_flag_out_e = 0x10,
+ iki_write_print_flag_message_e = 0x20,
+ iki_write_print_flag_warning_e = 0x40,
}; // enum
#endif // _di_iki_write_print_flag_e_
iki_write_main_t data = iki_write_main_t_initialize;
- data.program.debug.flag |= iki_write_print_flag_debug_e;
- data.program.error.flag |= iki_write_print_flag_error_e;
- data.program.message.flag |= iki_write_print_flag_message_e;
- data.program.warning.flag |= iki_write_print_flag_warning_e;
+ data.program.debug.flag |= iki_write_print_flag_debug_e | iki_write_print_flag_out_e;
+ data.program.error.flag |= iki_write_print_flag_error_e | iki_write_print_flag_out_e;
+ data.program.output.flag |= iki_write_print_flag_out_e;
+ data.program.message.flag |= iki_write_print_flag_message_e | iki_write_print_flag_out_e;
+ data.program.warning.flag |= iki_write_print_flag_warning_e | iki_write_print_flag_out_e;
+ data.program.error.custom = (void *) &data;
+ data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
data.program.output.custom = (void *) &data;
- data.program.error.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.program.debug.custom = (void *) &data;
f_console_parameter_t parameters[] = iki_write_console_parameter_t_initialize;
data.program.parameters.array = parameters;
search_static yes
environment PATH LD_LIBRARY_PATH
+environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
#defines -D_di_libcap_ -D_di_thread_support_
defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
status_code_main_t data = status_code_main_t_initialize;
- data.program.debug.flag |= status_code_print_flag_debug_e;
- data.program.error.flag |= status_code_print_flag_error_e;
- data.program.message.flag |= status_code_print_flag_message_e;
- data.program.warning.flag |= status_code_print_flag_warning_e;
+ data.program.debug.flag |= status_code_print_flag_debug_e | status_code_print_flag_out_e;
+ data.program.error.flag |= status_code_print_flag_error_e | status_code_print_flag_out_e;
+ data.program.output.flag |= status_code_print_flag_out_e;
+ data.program.message.flag |= status_code_print_flag_message_e | status_code_print_flag_out_e;
+ data.program.warning.flag |= status_code_print_flag_warning_e | status_code_print_flag_out_e;
+ data.program.error.custom = (void *) &data;
+ data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
data.program.output.custom = (void *) &data;
- data.program.error.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.program.debug.custom = (void *) &data;
data.setting.program_name = &status_code_fss_program_name_s;
data.setting.program_name_long = &status_code_fss_program_name_long_s;
/**
* The program defines.
*
- * status_code_*:
+ * status_code_*_d:
* - allocation_console: An allocation step used for small buffers specifically for console parameter.
* - allocation_large: An allocation step used for buffers that are anticipated to have large buffers.
* - allocation_small: An allocation step used for buffers that are anticipated to have small buffers.
#define status_code_console_parameter_t_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_fll_program_console_parameter_standard_initialize, \
\
macro_f_console_parameter_t_initialize_3(status_code_short_fine_s, status_code_long_fine_s, 0, f_console_flag_normal_e), \
macro_f_console_parameter_t_initialize_3(status_code_short_warning_s, status_code_long_warning_s, 0, f_console_flag_normal_e), \
* Flags for fine-tuned print control.
*
* status_code_print_flag_*_e:
- * - none: No flags set.
- * - debug: Stream is for debug printing.
- * - error: Stream is for error printing.
- * - message: Stream is for message printing.
- * - warning: Stream is for warning printing.
- * - file_to: Stream is a destination file.
- * - file_from: Stream is a source file.
+ * - none: No flags set.
+ * - debug: Stream is for debug printing.
+ * - error: Stream is for error printing.
+ * - in: Stream is a source file.
+ * - message: Stream is for message printing.
+ * - out: Stream is a destination file.
+ * - warning: Stream is for warning printing.
*/
#ifndef _di_status_code_print_flag_e_
enum {
- status_code_print_flag_none_e = 0x0,
- status_code_print_flag_debug_e = 0x1,
- status_code_print_flag_error_e = 0x2,
- status_code_print_flag_message_e = 0x4,
- status_code_print_flag_warning_e = 0x8,
- status_code_print_flag_file_to_e = 0x10,
- status_code_print_flag_file_from_e = 0x20,
+ status_code_print_flag_none_e = 0x0,
+ status_code_print_flag_debug_e = 0x1,
+ status_code_print_flag_error_e = 0x2,
+ status_code_print_flag_file_e = 0x4,
+ status_code_print_flag_in_e = 0x8,
+ status_code_print_flag_out_e = 0x10,
+ status_code_print_flag_message_e = 0x20,
+ status_code_print_flag_warning_e = 0x40,
}; // enum
#endif // _di_status_code_print_flag_e_
status_code_main_t data = status_code_main_t_initialize;
- data.program.debug.flag |= status_code_print_flag_debug_e;
- data.program.error.flag |= status_code_print_flag_error_e;
- data.program.message.flag |= status_code_print_flag_message_e;
- data.program.warning.flag |= status_code_print_flag_warning_e;
+ data.program.debug.flag |= status_code_print_flag_debug_e | status_code_print_flag_out_e;
+ data.program.error.flag |= status_code_print_flag_error_e | status_code_print_flag_out_e;
+ data.program.output.flag |= status_code_print_flag_out_e;
+ data.program.message.flag |= status_code_print_flag_message_e | status_code_print_flag_out_e;
+ data.program.warning.flag |= status_code_print_flag_warning_e | status_code_print_flag_out_e;
+ data.program.error.custom = (void *) &data;
+ data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
data.program.output.custom = (void *) &data;
- data.program.error.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.program.debug.custom = (void *) &data;
data.setting.program_name = &status_code_program_name_s;
data.setting.program_name_long = &status_code_program_name_long_s;
* - F_signal_termination
*
* @param main
- * The main program data.
- * @param setting
- * The main program settings.
+ * The main program data and settings.
*
- * This alters setting.state.status:
+ * This alters main.setting.state.status:
* F_none on success.
* F_true on success when performing verification and verify passed.
* F_false on success when performing verification and verify failed.
search_static yes
environment PATH LD_LIBRARY_PATH
+environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
#defines -D_di_libcap_ -D_di_thread_support_
defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
search_static yes
environment PATH LD_LIBRARY_PATH
+environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
#defines -D_di_libcap_ -D_di_thread_support_
defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
search_static yes
environment PATH LD_LIBRARY_PATH
+environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
#defines -D_di_libcap_ -D_di_thread_support_
defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_
/**
* The program defines.
*
- * utf8_*:
+ * utf8_*_d:
* - allocation_console: An allocation step used for small buffers specifically for console parameter.
* - allocation_large: An allocation step used for buffers that are anticipated to have large buffers.
* - allocation_small: An allocation step used for buffers that are anticipated to have small buffers.
#define utf8_console_parameter_t_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_fll_program_console_parameter_standard_initialize, \
\
macro_f_console_parameter_t_initialize_3(utf8_short_from_bytesequence_s, utf8_long_from_bytesequence_s, 0, f_console_flag_normal_e), \
macro_f_console_parameter_t_initialize_3(utf8_short_from_codepoint_s, utf8_long_from_codepoint_s, 0, f_console_flag_normal_e), \
* Flags for fine-tuned print control.
*
* utf8_print_flag_*_e:
- * - none: No flags set.
- * - debug: Stream is for debug printing.
- * - error: Stream is for error printing.
- * - message: Stream is for message printing.
- * - warning: Stream is for warning printing.
- * - file_to: Stream is a destination file.
- * - file_from: Stream is a source file.
+ * - none: No flags set.
+ * - debug: Stream is for debug printing.
+ * - error: Stream is for error printing.
+ * - in: Stream is a source file.
+ * - message: Stream is for message printing.
+ * - out: Stream is a destination file.
+ * - warning: Stream is for warning printing.
*/
#ifndef _di_utf8_print_flag_e_
enum {
- utf8_print_flag_none_e = 0x0,
- utf8_print_flag_debug_e = 0x1,
- utf8_print_flag_error_e = 0x2,
- utf8_print_flag_message_e = 0x4,
- utf8_print_flag_warning_e = 0x8,
- utf8_print_flag_file_to_e = 0x10,
- utf8_print_flag_file_from_e = 0x20,
+ utf8_print_flag_none_e = 0x0,
+ utf8_print_flag_debug_e = 0x1,
+ utf8_print_flag_error_e = 0x2,
+ utf8_print_flag_file_e = 0x4,
+ utf8_print_flag_in_e = 0x8,
+ utf8_print_flag_out_e = 0x10,
+ utf8_print_flag_message_e = 0x20,
+ utf8_print_flag_warning_e = 0x40,
}; // enum
#endif // _di_utf8_print_flag_e_
#endif
/**
- * Set to at least 4 to provide a UTF-8 friendly allocation step.
- */
-#ifndef _di_utf8_default_d_
- #define utf8_default_allocation_step_d 16
-#endif // _di_utf8_default_d_
-
-/**
- * The program defines.
- *
- * utf8_*:
- * - allocation_console: An allocation step used for small buffers specifically for console parameter.
- * - allocation_large: An allocation step used for buffers that are anticipated to have large buffers.
- * - allocation_small: An allocation step used for buffers that are anticipated to have small buffers.
- * - signal_check: Number of iterations before performing signal check in non-threaded signal handling.
- */
-#ifndef _di_utf8_d_
- #define utf8_allocation_console_d 4
- #define utf8_allocation_large_d 256
- #define utf8_allocation_small_d 16
- #define utf8_signal_check_d 20000
-#endif // _di_utf8_d_
-
-/**
* The utf8 main program settings.
*
* This is passed to the program-specific main entry point to designate program settings.
utf8_main_t data = utf8_main_t_initialize;
- data.program.debug.flag |= utf8_print_flag_debug_e;
- data.program.error.flag |= utf8_print_flag_error_e;
- data.program.message.flag |= utf8_print_flag_message_e;
- data.program.warning.flag |= utf8_print_flag_warning_e;
+ data.program.debug.flag |= utf8_print_flag_debug_e | utf8_print_flag_out_e;
+ data.program.error.flag |= utf8_print_flag_error_e | utf8_print_flag_out_e;
+ data.program.output.flag |= utf8_print_flag_out_e;
+ data.program.message.flag |= utf8_print_flag_message_e | utf8_print_flag_out_e;
+ data.program.warning.flag |= utf8_print_flag_warning_e | utf8_print_flag_out_e;
+ data.program.error.custom = (void *) &data;
+ data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
data.program.output.custom = (void *) &data;
- data.program.error.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.program.debug.custom = (void *) &data;
f_console_parameter_t parameters[] = utf8_console_parameter_t_initialize;
search_static yes
environment PATH LD_LIBRARY_PATH
+environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH
#defines -D_di_libcap_ -D_di_thread_support_
defines -D_libcap_legacy_only_ -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_