The work continues, focusing on preparing fss_write for handling all currently written fss_*_write programs.
This should also pave the way for supporting other fss-???? standards than are currently directly represented.
The individual write programs will be linked to the same library fss_write is.
These individual write programs will act as if they were passed the "--as XXXX".
For example, fss_basic_list would operate the same as "fss_write -a fss-0002".
Some of the programs may have vastly different functionality than others.
In any case that code can be shared that code will be shared.
+++ /dev/null
-#include "fss_write_basic.h"
-#include "private-common.h"
-#include "private-basic.h"
-#include "../main/fss_write.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _di_fss_write_basic_process_help_
- void fss_write_basic_process_help(fll_program_data_t * const main, fss_write_setting_t * const setting) {
-
- fss_write_basic_print_help(main, setting);
- }
-#endif // _di_fss_write_basic_process_help_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-#include "basic.h"
+#include "fss_write.h"
#ifdef __cplusplus
extern "C" {
#ifndef _di_fss_write_basic_strings_
const f_string_static_t fss_write_basic_standard_s = macro_f_string_static_t_initialize(FSS_WRITE_basic_standard_s, 0, FSS_WRITE_basic_standard_s_length);
+
+ const f_string_static_t fss_write_format_code_short_0000_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_short_0000_s, 0, FSS_WRITE_format_code_short_0000_s_length);
+ const f_string_static_t fss_write_format_code_long_0000_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_long_0000_s, 0, FSS_WRITE_format_code_long_0000_s_length);
+ const f_string_static_t fss_write_format_code_human_0000_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_human_0000_s, 0, FSS_WRITE_format_code_human_0000_s_length);
#endif // _di_fss_write_basic_strings_
#ifdef __cplusplus
#ifndef _di_fss_write_basic_strings_
#define FSS_WRITE_basic_standard_s "FSS-0000 (Basic)"
+ #define FSS_WRITE_format_code_short_0000_s "0000"
+ #define FSS_WRITE_format_code_long_0000_s "fss-0000"
+ #define FSS_WRITE_format_code_human_0000_s "basic"
+
#define FSS_WRITE_basic_standard_s_length 16
+ #define FSS_WRITE_format_code_short_0000_s_length 4
+ #define FSS_WRITE_format_code_long_0000_s_length 8
+ #define FSS_WRITE_format_code_human_0000_s_length 5
+
extern const f_string_static_t fss_write_basic_standard_s;
+
+ extern const f_string_static_t fss_write_format_code_short_0000_s;
+ extern const f_string_static_t fss_write_format_code_long_0000_s;
+ extern const f_string_static_t fss_write_format_code_human_0000_s;
#endif // _di_fss_write_basic_strings_
#ifdef __cplusplus
--- /dev/null
+#include "fss_write.h"
+#include "private-common.h"
+#include "private-write.h"
+#include "../main/fss_write.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_fss_write_basic_process_help_
+ void fss_write_basic_process_help(fll_program_data_t * const main, void * const setting) {
+
+ fss_write_basic_print_help((fss_write_setting_t *) setting, main->message);
+ }
+#endif // _di_fss_write_basic_process_help_
+
+#ifndef _di_fss_write_basic_process_normal_
+ void fss_write_basic_process_normal(fll_program_data_t * const main, void * const setting) {
+
+ // @todo
+ }
+#endif // _di_fss_write_basic_process_normal_
+
+#ifndef _di_fss_write_basic_process_pipe_
+ void fss_write_basic_process_pipe(fll_program_data_t * const main, void * const setting) {
+
+ // @todo
+ }
+#endif // _di_fss_write_basic_process_pipe_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
#include <fll/level_0/console.h>
#include <fll/level_0/conversion.h>
#include <fll/level_0/file.h>
+#include <fll/level_0/fss.h>
#include <fll/level_0/pipe.h>
#include <fll/level_0/print.h>
#include <fll/level_0/signal.h>
* The main program data.
* @param setting
* The main program settings.
+ * Must be of type (fss_write_setting_t *).
+ *
+ * This does not alter setting.status.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_write_basic_process_help_
+ extern void fss_write_basic_process_help(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_basic_process_help_
+
+/**
+ * Process normally, writing to the output.
+ *
+ * @param main
+ * The main program data.
+ * @param setting
+ * The main program settings.
+ * Must be of type (fss_write_setting_t *).
*
* This alters setting.status:
* F_none on success.
* F_interrupt on (exit) signal received.
*
* F_parameter (with error bit) if main is NULL or setting is NULL.
+ */
+#ifndef _di_fss_write_basic_process_normal_
+ extern void fss_write_basic_process_normal(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_basic_process_normal_
+
+/**
+ * Process the pipe, reading from the pipe and writing to the output.
*
- * @return
- * F_none on success.
- * F_failure (with error bit) for any other failure.
+ * @param main
+ * The main program data.
+ * @param setting
+ * The main program settings.
+ * Must be of type (fss_write_setting_t *).
+ *
+ * This alters setting.status:
+ * F_none on success.
+ * F_data_not on success but pipe contained no relevant data.
+ * F_basic on success and the basic has been printed.
+ * F_interrupt on (exit) signal received.
+ *
+ * F_parameter (with error bit) if main is NULL or setting is NULL.
*/
-#ifndef _di_fss_write_basic_process_help_
- extern void fss_write_basic_process_help(fll_program_data_t * const main, fss_write_setting_t * const setting);
-#endif // _di_fss_write_basic_process_help_
+#ifndef _di_fss_write_basic_process_pipe_
+ extern void fss_write_basic_process_pipe(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_basic_process_pipe_
#ifdef __cplusplus
} // extern "C"
-#include "basic.h"
+#include "fss_write.h"
int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
fll_program_data_t data = fll_program_data_t_initialize;
fss_write_setting_t setting = fss_write_setting_t_initialize;
setting.state.data = (void *) &data;
- setting.process_help = &fss_write_basic_print_help;
+ setting.process_help = &fss_write_basic_process_help;
setting.process_pipe = &fss_write_basic_process_pipe;
setting.process_normal = &fss_write_basic_process_normal;
-#include "basic.h"
+#include "fss_write.h"
#include "private-common.h"
#ifdef __cplusplus
fss_write_print_help(setting, print);
+ f_print_dynamic_raw(f_string_eol_s, print.to);
+
fll_program_print_help_usage(print, fss_write_program_name_s, f_string_empty_s);
// @todo
-#include "basic.h"
+#include "fss_write.h"
#include "private-common.h"
#ifdef __cplusplus
-#include "basic.h"
+#include "fss_write.h"
#include "private-common.h"
#include "private-print.h"
-#include "basic.h"
+#include "fss_write.h"
#include "private-common.h"
#include "private-write.h"
+++ /dev/null
-#include "fss_write_basic_list.h"
-#include "private-common.h"
-#include "private-basic_list.h"
-#include "../main/fss_write.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _di_fss_write_basic_list_process_help_
- void fss_write_basic_list_process_help(fll_program_data_t * const main, fss_write_setting_t * const setting) {
-
- fss_write_basic_list_print_help(main, setting);
- }
-#endif // _di_fss_write_basic_list_process_help_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-#include "basic_list.h"
+#include "fss_write.h"
#ifdef __cplusplus
extern "C" {
#ifndef _di_fss_write_basic_list_strings_
const f_string_static_t fss_write_basic_list_standard_s = macro_f_string_static_t_initialize(FSS_WRITE_basic_list_standard_s, 0, FSS_WRITE_basic_list_standard_s_length);
+
+ const f_string_static_t fss_write_format_code_short_0002_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_short_0002_s, 0, FSS_WRITE_format_code_short_0002_s_length);
+ const f_string_static_t fss_write_format_code_long_0002_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_long_0002_s, 0, FSS_WRITE_format_code_long_0002_s_length);
+ const f_string_static_t fss_write_format_code_human_0002_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_human_0002_s, 0, FSS_WRITE_format_code_human_0002_s_length);
#endif // _di_fss_write_basic_list_strings_
#ifdef __cplusplus
#ifndef _di_fss_write_basic_list_strings_
#define FSS_WRITE_basic_list_standard_s "FSS-0002 (Basic List)"
+ #define FSS_WRITE_format_code_short_0002_s "0002"
+ #define FSS_WRITE_format_code_long_0002_s "fss-0002"
+ #define FSS_WRITE_format_code_human_0002_s "basic list"
+
#define FSS_WRITE_basic_list_standard_s_length 21
+ #define FSS_WRITE_format_code_short_0002_s_length 4
+ #define FSS_WRITE_format_code_long_0002_s_length 8
+ #define FSS_WRITE_format_code_human_0002_s_length 10
+
extern const f_string_static_t fss_write_basic_list_standard_s;
+
+ extern const f_string_static_t fss_write_format_code_short_0002_s;
+ extern const f_string_static_t fss_write_format_code_long_0002_s;
+ extern const f_string_static_t fss_write_format_code_human_0002_s;
#endif // _di_fss_write_basic_list_strings_
#ifdef __cplusplus
--- /dev/null
+#include "fss_write.h"
+#include "private-common.h"
+#include "private-write.h"
+#include "../main/fss_write.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_fss_write_basic_list_process_help_
+ void fss_write_basic_list_process_help(fll_program_data_t * const main, void * const setting) {
+
+ fss_write_basic_list_print_help((fss_write_setting_t *) setting, main->message);
+ }
+#endif // _di_fss_write_basic_list_process_help_
+
+#ifndef _di_fss_write_basic_list_process_normal_
+ void fss_write_basic_list_process_normal(fll_program_data_t * const main, void * const setting) {
+
+ // @todo
+ }
+#endif // _di_fss_write_basic_list_process_normal_
+
+#ifndef _di_fss_write_basic_list_process_pipe_
+ void fss_write_basic_list_process_pipe(fll_program_data_t * const main, void * const setting) {
+
+ // @todo
+ }
+#endif // _di_fss_write_basic_list_process_pipe_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
#include <fll/level_0/console.h>
#include <fll/level_0/conversion.h>
#include <fll/level_0/file.h>
+#include <fll/level_0/fss.h>
#include <fll/level_0/pipe.h>
#include <fll/level_0/print.h>
#include <fll/level_0/signal.h>
* The main program data.
* @param setting
* The main program settings.
+ * Must be of type (fss_write_setting_t *).
+ *
+ * This does not alter setting.status.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_write_basic_list_process_help_
+ extern void fss_write_basic_list_process_help(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_basic_list_process_help_
+
+/**
+ * Process normally, writing to the output.
+ *
+ * @param main
+ * The main program data.
+ * @param setting
+ * The main program settings.
+ * Must be of type (fss_write_setting_t *).
*
* This alters setting.status:
* F_none on success.
* F_interrupt on (exit) signal received.
*
* F_parameter (with error bit) if main is NULL or setting is NULL.
+ */
+#ifndef _di_fss_write_basic_list_process_normal_
+ extern void fss_write_basic_list_process_normal(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_basic_list_process_normal_
+
+/**
+ * Process the pipe, reading from the pipe and writing to the output.
*
- * @return
- * F_none on success.
- * F_failure (with error bit) for any other failure.
+ * @param main
+ * The main program data.
+ * @param setting
+ * The main program settings.
+ * Must be of type (fss_write_setting_t *).
+ *
+ * This alters setting.status:
+ * F_none on success.
+ * F_data_not on success but pipe contained no relevant data.
+ * F_basic_list on success and the basic_list has been printed.
+ * F_interrupt on (exit) signal received.
+ *
+ * F_parameter (with error bit) if main is NULL or setting is NULL.
*/
-#ifndef _di_fss_write_basic_list_process_help_
- extern void fss_write_basic_list_process_help(fll_program_data_t * const main, fss_write_setting_t * const setting);
-#endif // _di_fss_write_basic_list_process_help_
+#ifndef _di_fss_write_basic_list_process_pipe_
+ extern void fss_write_basic_list_process_pipe(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_basic_list_process_pipe_
#ifdef __cplusplus
} // extern "C"
-#include "basic_list.h"
+#include "fss_write.h"
int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
fll_program_data_t data = fll_program_data_t_initialize;
fss_write_setting_t setting = fss_write_setting_t_initialize;
setting.state.data = (void *) &data;
- setting.process_help = &fss_write_basic_list_print_help;
+ setting.process_help = &fss_write_basic_list_process_help;
setting.process_pipe = &fss_write_basic_list_process_pipe;
setting.process_normal = &fss_write_basic_list_process_normal;
-#include "basic_list.h"
+#include "fss_write.h"
#include "private-common.h"
#ifdef __cplusplus
fss_write_print_help(setting, print);
+ f_print_dynamic_raw(f_string_eol_s, print.to);
+
fll_program_print_help_usage(print, fss_write_program_name_s, f_string_empty_s);
// @todo
-#include "basic_list.h"
+#include "fss_write.h"
#include "private-common.h"
#ifdef __cplusplus
-#include "basic_list.h"
+#include "fss_write.h"
#include "private-common.h"
#include "private-print.h"
-#include "basic_list.h"
+#include "fss_write.h"
#include "private-common.h"
#include "private-write.h"
-#include "embedded_list.h"
+#include "fss_write.h"
#ifdef __cplusplus
extern "C" {
#ifndef _di_fss_write_embedded_list_strings_
const f_string_static_t fss_write_embedded_list_standard_s = macro_f_string_static_t_initialize(FSS_WRITE_embedded_list_standard_s, 0, FSS_WRITE_embedded_list_standard_s_length);
+
+ const f_string_static_t fss_write_format_code_short_0008_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_short_0008_s, 0, FSS_WRITE_format_code_short_0008_s_length);
+ const f_string_static_t fss_write_format_code_long_0008_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_long_0008_s, 0, FSS_WRITE_format_code_long_0008_s_length);
+ const f_string_static_t fss_write_format_code_human_0008_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_human_0008_s, 0, FSS_WRITE_format_code_human_0008_s_length);
#endif // _di_fss_write_embedded_list_strings_
#ifdef __cplusplus
#define FSS_WRITE_embedded_list_standard_s_length 24
extern const f_string_static_t fss_write_embedded_list_standard_s;
+
+ #define FSS_WRITE_format_code_short_0008_s "0008"
+ #define FSS_WRITE_format_code_long_0008_s "fss-0008"
+ #define FSS_WRITE_format_code_human_0008_s "basic"
+
+ #define FSS_WRITE_basic_standard_s_length 16
+
+ #define FSS_WRITE_format_code_short_0008_s_length 4
+ #define FSS_WRITE_format_code_long_0008_s_length 8
+ #define FSS_WRITE_format_code_human_0008_s_length 5
+
+ extern const f_string_static_t fss_write_basic_standard_s;
+
+ extern const f_string_static_t fss_write_format_code_short_0008_s;
+ extern const f_string_static_t fss_write_format_code_long_0008_s;
+ extern const f_string_static_t fss_write_format_code_human_0008_s;
#endif // _di_fss_write_embedded_list_strings_
#ifdef __cplusplus
+++ /dev/null
-#include "fss_write_embedded_list.h"
-#include "private-common.h"
-#include "private-embedded_list.h"
-#include "../main/fss_write.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _di_fss_write_embedded_list_process_help_
- void fss_write_embedded_list_process_help(fll_program_data_t * const main, fss_write_setting_t * const setting) {
-
- fss_write_embedded_list_print_help(main, setting);
- }
-#endif // _di_fss_write_embedded_list_process_help_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
--- /dev/null
+#include "fss_write.h"
+#include "private-common.h"
+#include "private-write.h"
+#include "../main/fss_write.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_fss_write_embedded_list_process_help_
+ void fss_write_embedded_list_process_help(fll_program_data_t * const main, void * const setting) {
+
+ fss_write_embedded_list_print_help((fss_write_setting_t *) setting, main->message);
+ }
+#endif // _di_fss_write_embedded_list_process_help_
+
+#ifndef _di_fss_write_embedded_list_process_normal_
+ void fss_write_embedded_list_process_normal(fll_program_data_t * const main, void * const setting) {
+
+ // @todo
+ }
+#endif // _di_fss_write_embedded_list_process_normal_
+
+#ifndef _di_fss_write_embedded_list_process_pipe_
+ void fss_write_embedded_list_process_pipe(fll_program_data_t * const main, void * const setting) {
+
+ // @todo
+ }
+#endif // _di_fss_write_embedded_list_process_pipe_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
#include <fll/level_0/console.h>
#include <fll/level_0/conversion.h>
#include <fll/level_0/file.h>
+#include <fll/level_0/fss.h>
#include <fll/level_0/pipe.h>
#include <fll/level_0/print.h>
#include <fll/level_0/signal.h>
* The main program data.
* @param setting
* The main program settings.
+ * Must be of type (fss_write_setting_t *).
+ *
+ * This does not alter setting.status.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_write_embedded_list_process_help_
+ extern void fss_write_embedded_list_process_help(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_embedded_list_process_help_
+
+/**
+ * Process normally, writing to the output.
+ *
+ * @param main
+ * The main program data.
+ * @param setting
+ * The main program settings.
+ * Must be of type (fss_write_setting_t *).
*
* This alters setting.status:
* F_none on success.
* F_interrupt on (exit) signal received.
*
* F_parameter (with error bit) if main is NULL or setting is NULL.
+ */
+#ifndef _di_fss_write_embedded_list_process_normal_
+ extern void fss_write_embedded_list_process_normal(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_embedded_list_process_normal_
+
+/**
+ * Process the pipe, reading from the pipe and writing to the output.
*
- * @return
- * F_none on success.
- * F_failure (with error bit) for any other failure.
+ * @param main
+ * The main program data.
+ * @param setting
+ * The main program settings.
+ * Must be of type (fss_write_setting_t *).
+ *
+ * This alters setting.status:
+ * F_none on success.
+ * F_data_not on success but pipe contained no relevant data.
+ * F_embedded_list on success and the embedded_list has been printed.
+ * F_interrupt on (exit) signal received.
+ *
+ * F_parameter (with error bit) if main is NULL or setting is NULL.
*/
-#ifndef _di_fss_write_embedded_list_process_help_
- extern void fss_write_embedded_list_process_help(fll_program_data_t * const main, fss_write_setting_t * const setting);
-#endif // _di_fss_write_embedded_list_process_help_
+#ifndef _di_fss_write_embedded_list_process_pipe_
+ extern void fss_write_embedded_list_process_pipe(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_embedded_list_process_pipe_
#ifdef __cplusplus
} // extern "C"
-#include "embedded_list.h"
+#include "fss_write.h"
int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
fll_program_data_t data = fll_program_data_t_initialize;
fss_write_setting_t setting = fss_write_setting_t_initialize;
setting.state.data = (void *) &data;
- setting.process_help = &fss_write_embedded_list_print_help;
+ setting.process_help = &fss_write_embedded_list_process_help;
setting.process_pipe = &fss_write_embedded_list_process_pipe;
setting.process_normal = &fss_write_embedded_list_process_normal;
-#include "embedded_list.h"
+#include "fss_write.h"
#include "private-common.h"
#ifdef __cplusplus
fss_write_print_help(setting, print);
+ f_print_dynamic_raw(f_string_eol_s, print.to);
+
fll_program_print_help_usage(print, fss_write_program_name_s, f_string_empty_s);
// @todo
-#include "embedded_list.h"
+#include "fss_write.h"
#include "private-common.h"
#ifdef __cplusplus
-#include "embedded_list.h"
+#include "fss_write.h"
#include "private-common.h"
#include "private-print.h"
-#include "embedded_list.h"
+#include "fss_write.h"
#include "private-common.h"
#include "private-write.h"
-#include "extended.h"
+#include "fss_write.h"
#ifdef __cplusplus
extern "C" {
#ifndef _di_fss_write_extended_strings_
const f_string_static_t fss_write_extended_standard_s = macro_f_string_static_t_initialize(FSS_WRITE_extended_standard_s, 0, FSS_WRITE_extended_standard_s_length);
+
+ const f_string_static_t fss_write_format_code_short_0001_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_short_0001_s, 0, FSS_WRITE_format_code_short_0001_s_length);
+ const f_string_static_t fss_write_format_code_long_0001_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_long_0001_s, 0, FSS_WRITE_format_code_long_0001_s_length);
+ const f_string_static_t fss_write_format_code_human_0001_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_human_0001_s, 0, FSS_WRITE_format_code_human_0001_s_length);
#endif // _di_fss_write_extended_strings_
#ifdef __cplusplus
#ifndef _di_fss_write_extended_strings_
#define FSS_WRITE_extended_standard_s "FSS-0001 (Extended)"
+ #define FSS_WRITE_format_code_short_0001_s "0001"
+ #define FSS_WRITE_format_code_long_0001_s "fss-0001"
+ #define FSS_WRITE_format_code_human_0001_s "extended"
+
#define FSS_WRITE_extended_standard_s_length 19
+ #define FSS_WRITE_format_code_short_0001_s_length 4
+ #define FSS_WRITE_format_code_long_0001_s_length 8
+ #define FSS_WRITE_format_code_human_0001_s_length 8
+
extern const f_string_static_t fss_write_extended_standard_s;
+
+ extern const f_string_static_t fss_write_format_code_short_0001_s;
+ extern const f_string_static_t fss_write_format_code_long_0001_s;
+ extern const f_string_static_t fss_write_format_code_human_0001_s;
#endif // _di_fss_write_extended_strings_
#ifdef __cplusplus
+++ /dev/null
-#include "fss_write_extended.h"
-#include "private-common.h"
-#include "private-extended.h"
-#include "../main/fss_write.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _di_fss_write_extended_process_help_
- void fss_write_extended_process_help(fll_program_data_t * const main, fss_write_setting_t * const setting) {
-
- fss_write_extended_print_help(main, setting);
- }
-#endif // _di_fss_write_extended_process_help_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
--- /dev/null
+#include "fss_write.h"
+#include "private-common.h"
+#include "private-write.h"
+#include "../main/fss_write.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_fss_write_extended_process_help_
+ void fss_write_extended_process_help(fll_program_data_t * const main, void * const setting) {
+
+ fss_write_extended_print_help((fss_write_setting_t *) setting, main->message);
+ }
+#endif // _di_fss_write_extended_process_help_
+
+#ifndef _di_fss_write_extended_process_normal_
+ void fss_write_extended_process_normal(fll_program_data_t * const main, void * const setting) {
+
+ // @todo
+ }
+#endif // _di_fss_write_extended_process_normal_
+
+#ifndef _di_fss_write_extended_process_pipe_
+ void fss_write_extended_process_pipe(fll_program_data_t * const main, void * const setting) {
+
+ // @todo
+ }
+#endif // _di_fss_write_extended_process_pipe_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
#include <fll/level_0/console.h>
#include <fll/level_0/conversion.h>
#include <fll/level_0/file.h>
+#include <fll/level_0/fss.h>
#include <fll/level_0/pipe.h>
#include <fll/level_0/print.h>
#include <fll/level_0/signal.h>
#ifdef __cplusplus
extern "C" {
#endif
-
/**
* Process help for FSS-0001 (Extended).
*
* The main program data.
* @param setting
* The main program settings.
+ * Must be of type (fss_write_setting_t *).
+ *
+ * This does not alter setting.status.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_write_extended_process_help_
+ extern void fss_write_extended_process_help(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_extended_process_help_
+
+/**
+ * Process normally, writing to the output.
+ *
+ * @param main
+ * The main program data.
+ * @param setting
+ * The main program settings.
+ * Must be of type (fss_write_setting_t *).
*
* This alters setting.status:
* F_none on success.
* F_interrupt on (exit) signal received.
*
* F_parameter (with error bit) if main is NULL or setting is NULL.
+ */
+#ifndef _di_fss_write_extended_process_normal_
+ extern void fss_write_extended_process_normal(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_extended_process_normal_
+
+/**
+ * Process the pipe, reading from the pipe and writing to the output.
*
- * @return
- * F_none on success.
- * F_failure (with error bit) for any other failure.
+ * @param main
+ * The main program data.
+ * @param setting
+ * The main program settings.
+ * Must be of type (fss_write_setting_t *).
+ *
+ * This alters setting.status:
+ * F_none on success.
+ * F_data_not on success but pipe contained no relevant data.
+ * F_extended on success and the extended has been printed.
+ * F_interrupt on (exit) signal received.
+ *
+ * F_parameter (with error bit) if main is NULL or setting is NULL.
*/
-#ifndef _di_fss_write_extended_process_help_
- extern void fss_write_extended_process_help(fll_program_data_t * const main, fss_write_setting_t * const setting);
-#endif // _di_fss_write_extended_process_help_
+#ifndef _di_fss_write_extended_process_pipe_
+ extern void fss_write_extended_process_pipe(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_extended_process_pipe_
#ifdef __cplusplus
} // extern "C"
-#include "extended.h"
+#include "fss_write.h"
int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
fll_program_data_t data = fll_program_data_t_initialize;
fss_write_setting_t setting = fss_write_setting_t_initialize;
setting.state.data = (void *) &data;
- setting.process_help = &fss_write_extended_print_help;
+ setting.process_help = &fss_write_extended_process_help;
setting.process_pipe = &fss_write_extended_process_pipe;
setting.process_normal = &fss_write_extended_process_normal;
-#include "extended.h"
+#include "fss_write.h"
#include "private-common.h"
#ifdef __cplusplus
fss_write_print_help(setting, print);
+ f_print_dynamic_raw(f_string_eol_s, print.to);
+
fll_program_print_help_usage(print, fss_write_program_name_s, f_string_empty_s);
// @todo
-#include "extended.h"
+#include "fss_write.h"
#include "private-common.h"
#ifdef __cplusplus
-#include "extended.h"
+#include "fss_write.h"
#include "private-common.h"
#include "private-print.h"
-#include "extended.h"
+#include "fss_write.h"
#include "private-common.h"
#include "private-write.h"
-#include "extended_list.h"
+#include "fss_write.h"
#ifdef __cplusplus
extern "C" {
#ifndef _di_fss_write_extended_list_strings_
const f_string_static_t fss_write_extended_list_standard_s = macro_f_string_static_t_initialize(FSS_WRITE_extended_list_standard_s, 0, FSS_WRITE_extended_list_standard_s_length);
+
+ const f_string_static_t fss_write_format_code_short_0003_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_short_0003_s, 0, FSS_WRITE_format_code_short_0003_s_length);
+ const f_string_static_t fss_write_format_code_long_0003_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_long_0003_s, 0, FSS_WRITE_format_code_long_0003_s_length);
+ const f_string_static_t fss_write_format_code_human_0003_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_human_0003_s, 0, FSS_WRITE_format_code_human_0003_s_length);
#endif // _di_fss_write_extended_list_strings_
#ifdef __cplusplus
* The FSS-0001 (Extended List) specific strings.
*/
#ifndef _di_fss_write_extended_list_strings_
- #define FSS_WRITE_extended_list_standard_s "FSS-0001 (Extended List)"
+ #define FSS_WRITE_extended_list_standard_s "FSS-0003 (Extended List)"
+
+ #define FSS_WRITE_format_code_short_0003_s "0003"
+ #define FSS_WRITE_format_code_long_0003_s "fss-0003"
+ #define FSS_WRITE_format_code_human_0003_s "extended list"
#define FSS_WRITE_extended_list_standard_s_length 24
+ #define FSS_WRITE_format_code_short_0003_s_length 4
+ #define FSS_WRITE_format_code_long_0003_s_length 8
+ #define FSS_WRITE_format_code_human_0003_s_length 13
+
extern const f_string_static_t fss_write_extended_list_standard_s;
+
+ extern const f_string_static_t fss_write_format_code_short_0003_s;
+ extern const f_string_static_t fss_write_format_code_long_0003_s;
+ extern const f_string_static_t fss_write_format_code_human_0003_s;
#endif // _di_fss_write_extended_list_strings_
#ifdef __cplusplus
+++ /dev/null
-#include "fss_write_extended_list.h"
-#include "private-common.h"
-#include "private-extended_list.h"
-#include "../main/fss_write.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _di_fss_write_extended_list_process_help_
- void fss_write_extended_list_process_help(fll_program_data_t * const main, fss_write_setting_t * const setting) {
-
- fss_write_extended_list_print_help(main, setting);
- }
-#endif // _di_fss_write_extended_list_process_help_
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
--- /dev/null
+#include "fss_write.h"
+#include "private-common.h"
+#include "private-write.h"
+#include "../main/fss_write.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_fss_write_extended_list_process_help_
+ void fss_write_extended_list_process_help(fll_program_data_t * const main, void * const setting) {
+
+ fss_write_extended_list_print_help((fss_write_setting_t *) setting, main->message);
+ }
+#endif // _di_fss_write_extended_list_process_help_
+
+#ifndef _di_fss_write_extended_list_process_normal_
+ void fss_write_extended_list_process_normal(fll_program_data_t * const main, void * const setting) {
+
+ // @todo
+ }
+#endif // _di_fss_write_extended_list_process_normal_
+
+#ifndef _di_fss_write_extended_list_process_pipe_
+ void fss_write_extended_list_process_pipe(fll_program_data_t * const main, void * const setting) {
+
+ // @todo
+ }
+#endif // _di_fss_write_extended_list_process_pipe_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
#include <fll/level_0/console.h>
#include <fll/level_0/conversion.h>
#include <fll/level_0/file.h>
+#include <fll/level_0/fss.h>
#include <fll/level_0/pipe.h>
#include <fll/level_0/print.h>
#include <fll/level_0/signal.h>
#include <fll/level_2/program.h>
// FSS Write includes.
-#include <program/fss_write/extended/common.h>
+#include <program/fss_write/extended_list/common.h>
#include <program/fss_write/main/common.h>
-#include <program/fss_write/extended/print.h>
+#include <program/fss_write/extended_list/print.h>
#include <program/fss_write/main/print.h>
#ifdef __cplusplus
* The main program data.
* @param setting
* The main program settings.
+ * Must be of type (fss_write_setting_t *).
+ *
+ * This does not alter setting.status.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_write_extended_list_process_help_
+ extern void fss_write_extended_list_process_help(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_extended_list_process_help_
+
+/**
+ * Process normally, writing to the output.
+ *
+ * @param main
+ * The main program data.
+ * @param setting
+ * The main program settings.
+ * Must be of type (fss_write_setting_t *).
*
* This alters setting.status:
* F_none on success.
* F_interrupt on (exit) signal received.
*
* F_parameter (with error bit) if main is NULL or setting is NULL.
+ */
+#ifndef _di_fss_write_extended_list_process_normal_
+ extern void fss_write_extended_list_process_normal(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_extended_list_process_normal_
+
+/**
+ * Process the pipe, reading from the pipe and writing to the output.
*
- * @return
- * F_none on success.
- * F_failure (with error bit) for any other failure.
+ * @param main
+ * The main program data.
+ * @param setting
+ * The main program settings.
+ * Must be of type (fss_write_setting_t *).
+ *
+ * This alters setting.status:
+ * F_none on success.
+ * F_data_not on success but pipe contained no relevant data.
+ * F_extended_list on success and the extended_list has been printed.
+ * F_interrupt on (exit) signal received.
+ *
+ * F_parameter (with error bit) if main is NULL or setting is NULL.
*/
-#ifndef _di_fss_write_extended_list_process_help_
- extern void fss_write_extended_list_process_help(fll_program_data_t * const main, fss_write_setting_t * const setting);
-#endif // _di_fss_write_extended_list_process_help_
+#ifndef _di_fss_write_extended_list_process_pipe_
+ extern void fss_write_extended_list_process_pipe(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_extended_list_process_pipe_
#ifdef __cplusplus
} // extern "C"
-#include "extended_list.h"
+#include "fss_write.h"
int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
fll_program_data_t data = fll_program_data_t_initialize;
fss_write_setting_t setting = fss_write_setting_t_initialize;
setting.state.data = (void *) &data;
- setting.process_help = &fss_write_extended_list_print_help;
+ setting.process_help = &fss_write_extended_list_process_help;
setting.process_pipe = &fss_write_extended_list_process_pipe;
setting.process_normal = &fss_write_extended_list_process_normal;
-#include "extended_list.h"
+#include "fss_write.h"
#include "private-common.h"
#ifdef __cplusplus
fss_write_print_help(setting, print);
+ f_print_dynamic_raw(f_string_eol_s, print.to);
+
fll_program_print_help_usage(print, fss_write_program_name_s, f_string_empty_s);
// @todo
-#include "extended_list.h"
+#include "fss_write.h"
#include "private-common.h"
#ifdef __cplusplus
-#include "extended_list.h"
+#include "fss_write.h"
#include "private-common.h"
#include "private-print.h"
-#include "extended_list.h"
+#include "fss_write.h"
#include "private-common.h"
#include "private-write.h"
#endif // _di_fss_write_defines_
/**
+ * Designate the supported formats for the main (fss_write) program.
+ *
+ * These are intended to be used for communicating or selecting an "--as" option.
+ *
+ * The digit value of the codes are intended to exactly match the numeric representation.
+ *
+ * fss_write_format_code_*_e:
+ * - 0000: The FSS-0000 (Basic) format.
+ * - 0001: The FSS-0001 (Extended) format.
+ * - 0002: The FSS-0002 (Basic List) format.
+ * - 0003: The FSS-0003 (Extended List) format.
+ * - 0008: The FSS-0008 (Embedded List) format.
+ * - 000e: The FSS-000E (Payload) format.
+ */
+#ifndef _di_fss_write_formats_
+ enum {
+ fss_write_format_code_0000_e = 0x0,
+ fss_write_format_code_0001_e = 0x1,
+ fss_write_format_code_0002_e = 0x2,
+ fss_write_format_code_0003_e = 0x3,
+ fss_write_format_code_0008_e = 0x8,
+ fss_write_format_code_000e_e = 0xe,
+ };
+#endif // _di_fss_write_formats_
+
+/**
* A collection of static strings associated with FSS Payload Write.
*/
#ifndef _di_fss_write_strings_
f_string_dynamics_t objects;
f_string_dynamics_t contents;
- void (*process_help)(fll_program_data_t * const main, fss_write_setting_t * const setting);
- void (*process_normal)(fll_program_data_t * const main, fss_write_setting_t * const setting);
- void (*process_pipe)(fll_program_data_t * const main, fss_write_setting_t * const setting);
+ void (*process_help)(fll_program_data_t * const main, void * const setting);
+ void (*process_normal)(fll_program_data_t * const main, void * const setting);
+ void (*process_pipe)(fll_program_data_t * const main, void * const setting);
} fss_write_setting_t;
#define fss_write_setting_t_initialize \
setting->status = F_none;
if (setting->flag & fss_write_main_flag_help_e) {
- fss_write_print_help(setting, main->message);
+ setting->process_help(main, (void *) setting);
return;
}
#include <fll/level_0/console.h>
#include <fll/level_0/conversion.h>
#include <fll/level_0/file.h>
+#include <fll/level_0/fss.h>
#include <fll/level_0/pipe.h>
#include <fll/level_0/print.h>
#include <fll/level_0/signal.h>
// FLL-1 includes.
#include <fll/level_1/conversion.h>
-#include <fll/level_1/fss/basic_list.h>
#include <fll/level_1/print.h>
#include <fll/level_1/string.h>
// FLL-2 includes.
#include <fll/level_2/error.h>
-#include <fll/level_2/fss/payload.h>
#include <fll/level_2/print.h>
#include <fll/level_2/program.h>
// FSS Write includes.
-#include <program/fss_write/common.h>
-#include <program/fss_write/print.h>
+#include <program/fss_write/main/common.h>
+#include <program/fss_write/main/print.h>
#ifdef __cplusplus
extern "C" {
#include "fss_write.h"
-#include "basic/basic.h"
-#include "basic_list/basic_list.h"
-#include "extended/extended.h"
-#include "extended_list/extended_list.h"
-#include "embedded_list/embedded_list.h"
-#include "payload/payload.h"
+#include "main.h"
+#include "../basic/fss_write.h"
+#include "../basic_list/fss_write.h"
+#include "../extended/fss_write.h"
+#include "../extended_list/fss_write.h"
+#include "../embedded_list/fss_write.h"
+#include "../payload/fss_write.h"
int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
setting.state.data = (void *) &data;
// Default to Basic.
- setting.process_help = &fss_write_basic_print_help;
+ setting.process_help = &fss_write_main_process_help;
setting.process_pipe = &fss_write_basic_process_pipe;
setting.process_normal = &fss_write_basic_process_normal;
return F_status_is_error(setting.status) ? 1 : 0;
}
+
+#ifndef _di_fss_write_main_process_help_
+ void fss_write_main_process_help(fll_program_data_t * const main, void * const void_setting) {
+
+ fss_write_setting_t * const setting = (fss_write_setting_t *) void_setting;
+
+ f_file_stream_lock(main->message.to);
+
+ f_print_dynamic_raw(setting->line_first, main->message.to);
+
+ fll_program_print_help_header(main->message, fss_write_program_name_long_s, fss_write_program_version_s);
+
+ fss_write_print_help(setting, main->message);
+
+ fll_program_print_help_option(main->message, fss_write_short_as_s, fss_write_long_as_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Designate the supported format to write as.");
+
+ f_print_dynamic_raw(f_string_eol_s, main->message.to);
+ f_print_dynamic_raw(f_string_eol_s, main->message.to);
+
+ fll_program_print_help_usage(main->message, fss_write_program_name_s, f_string_empty_s);
+
+ f_print_dynamic_raw(f_string_eol_s, main->message.to);
+
+ fl_print_format(" The '%[%r%r%]' parameter supports the following standards with the specified possible case-sensitive values%r", main->message.to, main->message.set->notable, f_console_symbol_long_normal_s, fss_write_long_as_s, main->message.set->notable, f_string_eol_s);
+
+ // FSS-0000 (Basic)
+ fl_print_format(" - As %[%r%] format: ", main->message.to, main->message.set->notable, fss_write_basic_standard_s, main->message.set->notable);
+ fl_print_format("'%[%r%]', ", main->message.to, main->message.set->notable, fss_write_format_code_short_0000_s, main->message.set->notable);
+ fl_print_format("'%[%r%]', or ", main->message.to, main->message.set->notable, fss_write_format_code_long_0000_s, main->message.set->notable);
+ fl_print_format("'%[%r%]'.%r", main->message.to, main->message.set->notable, fss_write_format_code_human_0000_s, main->message.set->notable, f_string_eol_s);
+
+ // FSS-0001 (Extended)
+ fl_print_format(" - As %[%r%] format: ", main->message.to, main->message.set->notable, fss_write_extended_standard_s, main->message.set->notable);
+ fl_print_format("'%[%r%]', ", main->message.to, main->message.set->notable, fss_write_format_code_short_0001_s, main->message.set->notable);
+ fl_print_format("'%[%r%]', or ", main->message.to, main->message.set->notable, fss_write_format_code_long_0001_s, main->message.set->notable);
+ fl_print_format("'%[%r%]'.%r", main->message.to, main->message.set->notable, fss_write_format_code_human_0001_s, main->message.set->notable, f_string_eol_s);
+
+ // FSS-0002 (Basic List)
+ fl_print_format(" - As %[%r%] format: ", main->message.to, main->message.set->notable, fss_write_basic_list_standard_s, main->message.set->notable);
+ fl_print_format("'%[%r%]', ", main->message.to, main->message.set->notable, fss_write_format_code_short_0002_s, main->message.set->notable);
+ fl_print_format("'%[%r%]', or ", main->message.to, main->message.set->notable, fss_write_format_code_long_0002_s, main->message.set->notable);
+ fl_print_format("'%[%r%]'.%r", main->message.to, main->message.set->notable, fss_write_format_code_human_0002_s, main->message.set->notable, f_string_eol_s);
+
+ // FSS-0003 (Extended List)
+ fl_print_format(" - As %[%r%] format: ", main->message.to, main->message.set->notable, fss_write_extended_list_standard_s, main->message.set->notable);
+ fl_print_format("'%[%r%]', ", main->message.to, main->message.set->notable, fss_write_format_code_short_0003_s, main->message.set->notable);
+ fl_print_format("'%[%r%]', or ", main->message.to, main->message.set->notable, fss_write_format_code_long_0003_s, main->message.set->notable);
+ fl_print_format("'%[%r%]'.%r", main->message.to, main->message.set->notable, fss_write_format_code_human_0003_s, main->message.set->notable, f_string_eol_s);
+
+ // FSS-0008 (Embedded List)
+ fl_print_format(" - As %[%r%] format: ", main->message.to, main->message.set->notable, fss_write_embedded_list_standard_s, main->message.set->notable);
+ fl_print_format("'%[%r%]', ", main->message.to, main->message.set->notable, fss_write_format_code_short_0008_s, main->message.set->notable);
+ fl_print_format("'%[%r%]', or ", main->message.to, main->message.set->notable, fss_write_format_code_long_0008_s, main->message.set->notable);
+ fl_print_format("'%[%r%]'.%r", main->message.to, main->message.set->notable, fss_write_format_code_human_0008_s, main->message.set->notable, f_string_eol_s);
+
+ // FSS-000E (Payload)
+ fl_print_format(" - As %[%r%] format: ", main->message.to, main->message.set->notable, fss_write_payload_standard_s, main->message.set->notable);
+ fl_print_format("'%[%r%]', ", main->message.to, main->message.set->notable, fss_write_format_code_short_000e_s, main->message.set->notable);
+ fl_print_format("'%[%r%]', or ", main->message.to, main->message.set->notable, fss_write_format_code_long_000e_s, main->message.set->notable);
+ fl_print_format("'%[%r%]'.%r", main->message.to, main->message.set->notable, fss_write_format_code_human_000e_s, main->message.set->notable, f_string_eol_s);
+
+ f_print_dynamic_raw(f_string_eol_s, main->message.to);
+
+ fl_print_format(" The %[%r%] format is the default when no ", main->message.to, main->message.set->notable, fss_write_basic_standard_s, main->message.set->notable);
+ fl_print_format("'%[%r%r%]' is specified.%r", main->message.to, main->message.set->notable, f_console_symbol_long_normal_s, fss_write_long_as_s, main->message.set->notable, f_string_eol_s);
+
+ f_print_dynamic_raw(setting->line_last, main->message.to);
+
+ f_file_stream_flush(main->message.to);
+ f_file_stream_unlock(main->message.to);
+ }
+#endif // _di_fss_write_main_process_help_
--- /dev/null
+/**
+ * FLL - Level 3
+ *
+ * Project: FSS Write
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ *
+ * This file is only ever included by main/main.c and should not normally be included anywhere else.
+ * Anything that wants to include this should be providing the "main" program functionality in some manner.
+ * Any program utilizing this should link to the "main" program library.
+ */
+#ifndef _fss_write_main_h
+#define _fss_write_main_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Process printing help for when not specifying "--as".
+ *
+ * @param main
+ * The main program data.
+ * @param setting
+ * The main program settings.
+ * Must be of type (fss_write_setting_t *).
+ *
+ * This does not alter setting.status.
+ *
+ * @return
+ * F_none on success.
+ * F_output_not on success, but no printing is performed.
+ */
+#ifndef _di_fss_write_main_process_help_
+ extern void fss_write_main_process_help(fll_program_data_t * const main, void * const setting);
+#endif // _di_fss_write_main_process_help_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _fss_write_main_h
fll_program_print_help_option(print, fss_write_short_trim_s, fss_write_long_trim_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Trim Object names.");
f_print_dynamic_raw(f_string_eol_s, print.to);
- f_print_dynamic_raw(f_string_eol_s, print.to);
}
#endif // _di_fss_write_print_help_
-#include "payload.h"
+#include "fss_write.h"
#ifdef __cplusplus
extern "C" {
#ifndef _di_fss_write_payload_strings_
const f_string_static_t fss_write_payload_standard_s = macro_f_string_static_t_initialize(FSS_WRITE_payload_standard_s, 0, FSS_WRITE_payload_standard_s_length);
+
+ const f_string_static_t fss_write_format_code_short_000e_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_short_000e_s, 0, FSS_WRITE_format_code_short_000e_s_length);
+ const f_string_static_t fss_write_format_code_long_000e_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_long_000e_s, 0, FSS_WRITE_format_code_long_000e_s_length);
+ const f_string_static_t fss_write_format_code_human_000e_s = macro_f_string_static_t_initialize(FSS_WRITE_format_code_human_000e_s, 0, FSS_WRITE_format_code_human_000e_s_length);
#endif // _di_fss_write_payload_strings_
#ifdef __cplusplus
#ifndef _di_fss_write_payload_strings_
#define FSS_WRITE_payload_standard_s "FSS-000E (Payload)"
+ #define FSS_WRITE_format_code_short_000e_s "000e"
+ #define FSS_WRITE_format_code_long_000e_s "fss-000e"
+ #define FSS_WRITE_format_code_human_000e_s "payload"
+
#define FSS_WRITE_payload_standard_s_length 18
+ #define FSS_WRITE_format_code_short_000e_s_length 4
+ #define FSS_WRITE_format_code_long_000e_s_length 8
+ #define FSS_WRITE_format_code_human_000e_s_length 7
+
extern const f_string_static_t fss_write_payload_standard_s;
+
+ extern const f_string_static_t fss_write_format_code_short_000e_s;
+ extern const f_string_static_t fss_write_format_code_long_000e_s;
+ extern const f_string_static_t fss_write_format_code_human_000e_s;
#endif // _di_fss_write_payload_strings_
#ifdef __cplusplus
-#include "fss_write_payload.h"
+#include "fss_write.h"
#include "private-common.h"
-#include "private-payload.h"
+#include "private-write.h"
#include "../main/fss_write.h"
#ifdef __cplusplus
#endif
#ifndef _di_fss_write_payload_process_help_
- void fss_write_payload_process_help(fll_program_data_t * const main, fss_write_setting_t * const setting) {
+ void fss_write_payload_process_help(fll_program_data_t * const main, void * const setting) {
- fss_write_payload_print_help(main, setting);
+ fss_write_payload_print_help((fss_write_setting_t *) setting, main->message);
}
#endif // _di_fss_write_payload_process_help_
#ifndef _di_fss_write_payload_process_normal_
- void fss_write_payload_process_normal(fll_program_data_t * const main, fss_write_setting_t * const setting) {
+ void fss_write_payload_process_normal(fll_program_data_t * const main, void * const void_setting) {
+ fss_write_setting_t * const setting = (fss_write_setting_t *) void_setting;
f_string_statics_t *objects = &setting->objects;
f_string_statics_t *contents = &setting->contents;
f_string_statics_t *data = &setting->objects;
#endif // _di_fss_write_payload_process_normal_
#ifndef _di_fss_write_payload_process_pipe_
- void fss_write_payload_process_pipe(fll_program_data_t * const main, fss_write_setting_t * const setting) {
+ void fss_write_payload_process_pipe(fll_program_data_t * const main, void * const void_setting) {
+ fss_write_setting_t * const setting = (fss_write_setting_t *) void_setting;
f_status_t status_pipe = F_none;
f_file_t input = f_file_t_initialize;
input.id = F_type_descriptor_input_d;
printed |= 0x2;
// Designate to read next block from pipe.
- range.start = 1;fss_write_payload_process_set
+ range.start = 1; // fss_write_payload_process_set ??
range.stop = 0;
continue;
if (main->error.verbosity > f_console_verbosity_quiet_e) {
fss_write_print_line_first_locked(setting, main->error);
- fss_write_print_error_one_content_only(setting, main->error, "FSS-000E (Payload)");
+ fss_write_print_error_one_content_only(setting, main->error, fss_write_payload_standard_s);
fss_write_print_line_last_locked(setting, main->error);
}
setting->status = F_status_set_error(F_supported_not);
fss_write_print_line_first_locked(setting, main->error);
- fss_write_print_error_unsupported_eol(setting, main->error);
+ fss_write_print_error_unsupported_eol(setting, main->error, fss_write_payload_standard_s);
fss_write_print_line_last_locked(setting, main->error);
return;
setting->status = F_status_set_error(F_supported_not);
fss_write_print_line_first_locked(setting, main->error);
- fss_write_print_error_unsupported_eol(setting, main->error);
+ fss_write_print_error_unsupported_eol(setting, main->error, fss_write_payload_standard_s);
fss_write_print_line_last_locked(setting, main->error);
return;
#include <fll/level_0/console.h>
#include <fll/level_0/conversion.h>
#include <fll/level_0/file.h>
+#include <fll/level_0/fss.h>
#include <fll/level_0/pipe.h>
#include <fll/level_0/print.h>
#include <fll/level_0/signal.h>
* The main program data.
* @param setting
* The main program settings.
+ * Must be of type (fss_write_setting_t *).
*
- * This alters setting.status:
- * F_none on success.
- * F_interrupt on (exit) signal received.
- *
- * F_parameter (with error bit) if main is NULL or setting is NULL.
+ * This does not alter setting.status.
*
* @return
* F_none on success.
- * F_failure (with error bit) for any other failure.
+ * F_output_not on success, but no printing is performed.
*/
#ifndef _di_fss_write_payload_process_help_
- extern void fss_write_payload_process_help(fll_program_data_t * const main, fss_write_setting_t * const setting);
+ extern void fss_write_payload_process_help(fll_program_data_t * const main, void * const setting);
#endif // _di_fss_write_payload_process_help_
/**
* The main program data.
* @param setting
* The main program settings.
+ * Must be of type (fss_write_setting_t *).
*
* This alters setting.status:
* F_none on success.
* F_parameter (with error bit) if main is NULL or setting is NULL.
*/
#ifndef _di_fss_write_payload_process_normal_
- extern void fss_write_payload_process_normal(fll_program_data_t * const main, fss_write_setting_t * const setting);
+ extern void fss_write_payload_process_normal(fll_program_data_t * const main, void * const setting);
#endif // _di_fss_write_payload_process_normal_
/**
* The main program data.
* @param setting
* The main program settings.
+ * Must be of type (fss_write_setting_t *).
*
* This alters setting.status:
* F_none on success.
* F_parameter (with error bit) if main is NULL or setting is NULL.
*/
#ifndef _di_fss_write_payload_process_pipe_
- extern void fss_write_payload_process_pipe(fll_program_data_t * const main, fss_write_setting_t * const setting);
+ extern void fss_write_payload_process_pipe(fll_program_data_t * const main, void * const setting);
#endif // _di_fss_write_payload_process_pipe_
/**
* The content to escape and print.
* Set pointer address to 0 to not use.
*/
-#ifndef _di_fss_write_process_payload_set_
- extern void fss_write_process_payload_set(fll_program_data_t * const main, fss_write_setting_t * const setting, const f_string_static_t *object, const f_string_static_t *content);
-#endif // _di_fss_write_process_payload_set_
+#ifndef _di_fss_write_payload_process_set_
+ extern void fss_write_payload_process_set(fll_program_data_t * const main, fss_write_setting_t * const setting, const f_string_static_t *object, const f_string_static_t *content);
+#endif // _di_fss_write_payload_process_set_
#ifdef __cplusplus
} // extern "C"
-#include "payload.h"
+#include "fss_write.h"
int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
fll_program_data_t data = fll_program_data_t_initialize;
fss_write_setting_t setting = fss_write_setting_t_initialize;
setting.state.data = (void *) &data;
- setting.process_help = &fss_write_payload_print_help;
+ setting.process_help = &fss_write_payload_process_help;
setting.process_pipe = &fss_write_payload_process_pipe;
setting.process_normal = &fss_write_payload_process_normal;
-#include "payload.h"
+#include "fss_write.h"
#include "private-common.h"
#ifdef __cplusplus
fss_write_print_help(setting, print);
+ f_print_dynamic_raw(f_string_eol_s, print.to);
+
fll_program_print_help_usage(print, fss_write_program_name_s, f_string_empty_s);
fl_print_format("%r The pipe uses the Backspace character '%[\\b%]' (%[U+0008%]) to designate the start of a Content.%r", print.to, f_string_eol_s, print.set->notable, print.set->notable, print.set->notable, print.set->notable, f_string_eol_s);
-#include "payload.h"
+#include "fss_write.h"
#include "private-common.h"
#ifdef __cplusplus
-#include "payload.h"
+#include "fss_write.h"
#include "private-common.h"
#include "private-print.h"
-#include "payload.h"
+#include "fss_write.h"
#include "private-common.h"
#include "private-write.h"
build_sources_program main/main.c
-build_sources_headers main/fss_write.h main/common.h main/print.h main/private-common.h main/private-write.h
+build_sources_headers main/main.h main/fss_write.h main/common.h main/print.h main/private-common.h main/private-write.h
build_sources_headers basic/fss_write.h basic/common.h basic/print.h basic/private-common.h basic/private-write.h basic/private-print.h
build_sources_headers basic_list/fss_write.h basic_list/common.h basic_list/print.h basic_list/private-common.h basic_list/private-write.h basic_list/private-print.h
build_sources_headers embedded_list/fss_write.h embedded_list/common.h embedded_list/print.h embedded_list/private-common.h embedded_list/private-write.h embedded_list/private-print.h