Comply with the recent addition to the IKI specification that designates backticks as a quote alternative to single and double quotes.
Fix several inconsistencies observed, such as "quoted" vs "quote".
The code is inconsistently using a type code and a literal character for passing the desired quote.
This is probably a long lost incomplete refactor.
Change all of the FSS code to accept the character as a uint8_t.
Get rid of the f_fss_quote_t and related, replacing them with uint8_t.
Get rid of the f_fss_delimit_* macros.
These are redundant and it is simpler just to use the f_fss_* variants.
Rename F_fss_delimit_placeholder_s to F_string_placeholder_s (and similar).
The flags for single and double quotes are not needed when the charaacter is being explicitly set.
for (f_array_length_t i = 0; i < delimits.used; ++i) {
if (delimits.array[i] < buffer->used) {
- buffer->string[delimits.array[i]] = f_fss_delimit_placeholder_s.string[0];
+ buffer->string[delimits.array[i]] = f_fss_placeholder_s.string[0];
}
} // for
for (f_array_length_t i = 0; i < delimits.used; ++i) {
if (delimits.array[i] < buffer->used && delimits.array[i] >= range.start && delimits.array[i] <= range.stop) {
- buffer->string[delimits.array[i]] = f_fss_delimit_placeholder_s.string[0];
+ buffer->string[delimits.array[i]] = f_fss_placeholder_s.string[0];
}
} // for
if (range->start >= buffer.used) return F_none_eos;
if (range->start > range->stop) return F_none_stop;
- if (buffer.string[range->start] != f_fss_delimit_placeholder_s.string[0]) break;
+ if (buffer.string[range->start] != f_fss_placeholder_s.string[0]) break;
} // for
return F_none;
return F_none_eol;
}
- if (buffer.string[range->start] == f_fss_delimit_placeholder_s.string[0]) {
+ if (buffer.string[range->start] == f_fss_placeholder_s.string[0]) {
++range->start;
continue;
* FSS-specific types.
*/
#ifndef _di_f_fss_types_t_
- #define F_fss_brace_close_s F_string_ascii_brace_close_s
- #define F_fss_brace_open_s F_string_ascii_brace_open_s
- #define F_fss_colon_s F_string_ascii_colon_s
- #define F_fss_minus_s F_string_ascii_minus_s
- #define F_fss_f_s F_string_ascii_f_s
- #define F_fss_pound_s F_string_ascii_pound_s
- #define F_fss_quote_double_s F_string_ascii_quote_double_s
- #define F_fss_quote_single_s F_string_ascii_quote_single_s
- #define F_fss_s_s F_string_ascii_s_s
- #define F_fss_slash_s F_string_ascii_slash_backward_s
- #define F_fss_space_s F_string_ascii_space_s
- #define F_fss_underscore_s F_string_ascii_underscore_s
-
- #define F_fss_brace_close_s_length F_string_ascii_brace_close_s_length
- #define F_fss_brace_open_s_length F_string_ascii_brace_open_s_length
- #define F_fss_colon_s_length F_string_ascii_colon_s_length
- #define F_fss_minus_s_length F_string_ascii_minus_s_length
- #define F_fss_f_s_length F_string_ascii_f_s_length
- #define F_fss_pound_s_length F_string_ascii_pound_s_length
- #define F_fss_quote_double_s_length F_string_ascii_quote_double_s_length
- #define F_fss_quote_single_s_length F_string_ascii_quote_single_s_length
- #define F_fss_s_s_length F_string_ascii_s_s_length
- #define F_fss_slash_s_length F_string_ascii_slash_backward_s_length
- #define F_fss_space_s_length F_string_ascii_space_s_length
- #define F_fss_underscore_s_length F_string_ascii_underscore_s_length
-
- #define f_fss_brace_close_s f_string_ascii_brace_close_s
- #define f_fss_brace_open_s f_string_ascii_brace_open_s
- #define f_fss_colon_s f_string_ascii_colon_s
- #define f_fss_minus_s f_string_ascii_minus_s
- #define f_fss_f_s f_string_ascii_f_s
- #define f_fss_pound_s f_string_ascii_pound_s
- #define f_fss_quote_double_s f_string_ascii_quote_double_s
- #define f_fss_quote_single_s f_string_ascii_quote_single_s
- #define f_fss_s_s f_string_ascii_s_s
- #define f_fss_slash_s f_string_ascii_slash_backward_s
- #define f_fss_space_s f_string_ascii_space_s
- #define f_fss_underscore_s f_string_ascii_underscore_s
+ #define F_fss_brace_close_s F_string_ascii_brace_close_s
+ #define F_fss_brace_open_s F_string_ascii_brace_open_s
+ #define F_fss_colon_s F_string_ascii_colon_s
+ #define F_fss_minus_s F_string_ascii_minus_s
+ #define F_fss_f_s F_string_ascii_f_s
+ #define F_fss_pound_s F_string_ascii_pound_s
+ #define F_fss_quote_backtick_s F_string_ascii_grave_s
+ #define F_fss_quote_double_s F_string_ascii_quote_double_s
+ #define F_fss_quote_single_s F_string_ascii_quote_single_s
+ #define F_fss_s_s F_string_ascii_s_s
+ #define F_fss_slash_s F_string_ascii_slash_backward_s
+ #define F_fss_space_s F_string_ascii_space_s
+ #define F_fss_underscore_s F_string_ascii_underscore_s
+
+ #define F_fss_brace_close_s_length F_string_ascii_brace_close_s_length
+ #define F_fss_brace_open_s_length F_string_ascii_brace_open_s_length
+ #define F_fss_colon_s_length F_string_ascii_colon_s_length
+ #define F_fss_minus_s_length F_string_ascii_minus_s_length
+ #define F_fss_f_s_length F_string_ascii_f_s_length
+ #define F_fss_pound_s_length F_string_ascii_pound_s_length
+ #define F_fss_quote_backtick_s_length F_string_ascii_grave_s_length
+ #define F_fss_quote_double_s_length F_string_ascii_quote_double_s_length
+ #define F_fss_quote_single_s_length F_string_ascii_quote_single_s_length
+ #define F_fss_s_s_length F_string_ascii_s_s_length
+ #define F_fss_slash_s_length F_string_ascii_slash_backward_s_length
+ #define F_fss_space_s_length F_string_ascii_space_s_length
+ #define F_fss_underscore_s_length F_string_ascii_underscore_s_length
+
+ #define f_fss_brace_close_s f_string_ascii_brace_close_s
+ #define f_fss_brace_open_s f_string_ascii_brace_open_s
+ #define f_fss_colon_s f_string_ascii_colon_s
+ #define f_fss_minus_s f_string_ascii_minus_s
+ #define f_fss_f_s f_string_ascii_f_s
+ #define f_fss_pound_s f_string_ascii_pound_s
+ #define f_fss_quote_backtick_s f_string_ascii_grave_s
+ #define f_fss_quote_double_s f_string_ascii_quote_double_s
+ #define f_fss_quote_single_s f_string_ascii_quote_single_s
+ #define f_fss_s_s f_string_ascii_s_s
+ #define f_fss_slash_s f_string_ascii_slash_backward_s
+ #define f_fss_space_s f_string_ascii_space_s
+ #define f_fss_underscore_s f_string_ascii_underscore_s
#define f_fss_comment_s f_fss_pound_s
#define f_fss_eol_s f_string_eol_s
* FSS-specific delimiters.
*/
#ifndef _di_f_fss_delimiters_
- #define F_fss_delimit_placeholder_s F_string_placeholder_s
- #define F_fss_delimit_quote_single_s F_fss_quote_single_s
- #define F_fss_delimit_quote_double_s F_fss_quote_double_s
- #define F_fss_delimit_slash_s F_fss_slash_s
-
- #define F_fss_delimit_placeholder_s_length F_string_placeholder_s_length
- #define F_fss_delimit_quote_single_s_length F_fss_quote_single_s_length
- #define F_fss_delimit_quote_double_s_length F_fss_quote_double_s_length
- #define F_fss_delimit_slash_s_length F_fss_slash_s_length
-
- #define f_fss_delimit_placeholder_s f_string_placeholder_s
- #define f_fss_delimit_quote_single_s f_fss_quote_single_s
- #define f_fss_delimit_quote_double_s f_fss_quote_double_s
- #define f_fss_delimit_slash_s f_fss_slash_s
+ #define F_fss_placeholder_s F_string_placeholder_s
+
+ #define F_fss_placeholder_s_length F_string_placeholder_s_length
+
+ #define f_fss_placeholder_s f_string_placeholder_s
#endif //_di_f_fss_delimiters_
/**
f_fss_objects_t objects;
f_fss_contents_t contents;
- f_fss_quotess_t quotess;
+ f_uint8ss_t quotess;
} f_fss_named_t;
- #define f_fss_named_t_initialize { f_fss_object_t_initialize, f_fss_objects_t_initialize, f_fss_contents_t_initialize, f_fss_quotess_t_initialize }
+ #define f_fss_named_t_initialize { f_fss_object_t_initialize, f_fss_objects_t_initialize, f_fss_contents_t_initialize, f_uint8ss_t_initialize }
#define macro_f_fss_named_t_initialize(name, objects, contents, quotess) macro_f_array_lengths_t_initialize(name, objects, contents, quotess)
macro_f_fss_object_t_clear(named.name) \
macro_f_fss_objects_t_clear(named.objects) \
macro_f_fss_contents_t_clear(named.contents) \
- macro_f_fss_quotess_t_clear(named.quotess)
+ macro_f_uint8ss_t_clear(named.quotess)
#define macro_f_fss_named_t_resize(status, named, length) status = f_fss_named_resize(length, &named);
#define macro_f_fss_named_t_adjust(status, named, length) status = f_fss_named_adjust(length, &named);
* Types for FSS quote.
*
* f_fss_quote_type_*:
- * - none: Not a quote.
- * - single: Quote type is a single quote.
- * - double: Quote type is a double quote.
+ * - none: Not a quote.
+ * - backtick: Quote type is a backtick.
+ * - double: Quote type is a double quote.
+ * - single: Quote type is a single quote.
*/
#ifndef _di_f_fss_quote_type_
enum {
f_fss_quote_type_none_e = 0,
- f_fss_quote_type_single_e,
+ f_fss_quote_type_backtick_e,
f_fss_quote_type_double_e,
+ f_fss_quote_type_single_e,
};
#endif // _di_f_fss_quote_type_
-/**
- * A number representing a quote type fom the FSS quote type enumeration.
- */
-#ifndef _di_f_fss_quote_t_
- typedef uint8_t f_fss_quote_t;
-
- #define macro_f_fss_quote_t_initialize(quote) quote
-#endif // _di_f_fss_quote_t_
-
-/**
- * An array of f_fss_quote_t.
- *
- * array: The array of fss quote.
- * size: Total amount of allocated space.
- * used: Total number of allocated spaces used.
- */
-#ifndef _di_f_fss_quotes_t_
- typedef f_uint8s_t f_fss_quotes_t;
-
- #define f_fss_quotes_t_initialize f_uint8s_t_initialize
-
- #define macro_f_fss_quotes_t_initialize(array, size, used) { array, size, used }
- #define macro_f_fss_quotes_t_initialize2(array, length) { array, length, length }
-
- #define macro_f_fss_quotes_t_clear(quotes) macro_f_uint8s_t_clear(quotes)
-
- #define macro_f_fss_quotes_t_resize(status, quotes, length) macro_f_uint8s_t_resize(status, quotes, length)
- #define macro_f_fss_quotes_t_adjust(status, quotes, length) macro_f_uint8s_t_adjust(status, quotes, length)
-
- #define macro_f_fss_quotes_t_delete_simple(quotes) macro_f_uint8s_t_delete_simple(quotes)
- #define macro_f_fss_quotes_t_destroy_simple(quotes) macro_f_uint8s_t_destroy_simple(quotes)
-
- #define macro_f_fss_quotes_t_increase(status, step, quotes) macro_f_uint8s_t_increase(status, step, quotes)
- #define macro_f_fss_quotes_t_increase_by(status, quotes, amount) macro_f_uint8s_t_increase_by(status, quotes, amount)
- #define macro_f_fss_quotes_t_decrease_by(status, quotes, amount) macro_f_uint8s_t_decrease_by(status, quotes, amount)
- #define macro_f_fss_quotes_t_decimate_by(status, quotes, amount) macro_f_uint8s_t_decimate_by(status, quotes, amount)
-#endif // _di_f_fss_quotes_t_
-
-/**
- * An array of f_fss_quotes_t.
- *
- * array: The array of an array of fss quote.
- * size: Total amount of allocated space.
- * used: Total number of allocated spaces used.
- */
-#ifndef _di_f_fss_quotess_t_
- typedef f_uint8ss_t f_fss_quotess_t;
-
- #define f_fss_quotess_t_initialize f_uint8ss_t_initialize
-
- #define macro_f_fss_quotess_t_initialize(array, size, used) { array, size, used }
- #define macro_f_fss_quotess_t_initialize2(array, length) { array, length, length }
-
- #define macro_f_fss_quotess_t_clear(quotess) macro_f_uint8ss_t_clear(quotess)
-
- #define macro_f_fss_quotess_t_resize(status, quotess, length) macro_f_uint8ss_t_resize(status, quotess, length)
- #define macro_f_fss_quotess_t_adjust(status, quotess, length) macro_f_uint8ss_t_adjust(status, quotess, length)
-
- #define macro_f_fss_quotess_t_delete_simple(quotess) macro_f_uint8ss_t_delete_simple(quotess)
- #define macro_f_fss_quotess_t_destroy_simple(quotess) macro_f_uint8ss_t_destroy_simple(quotess)
-
- #define macro_f_fss_quotess_t_increase(status, step, quotess) macro_f_uint8ss_t_increase(status, step, quotess)
- #define macro_f_fss_quotess_t_increase_by(status, quotess, amount) macro_f_uint8ss_t_increase_by(status, quotess, amount)
- #define macro_f_fss_quotess_t_decrease_by(status, quotess, amount) macro_f_uint8ss_t_decrease_by(status, quotess, amount)
- #define macro_f_fss_quotess_t_decimate_by(status, quotess, amount) macro_f_uint8ss_t_decimate_by(status, quotess, amount)
-#endif // _di_f_fss_quotess_t_
-
#ifdef __cplusplus
} // extern "C"
#endif
f_fss_objects_t objects;
f_fss_contents_t contents;
- f_fss_quotes_t objects_quote;
- f_fss_quotess_t contents_quote;
+ f_uint8s_t objects_quote;
+ f_uint8ss_t contents_quote;
} f_fss_set_quote_t;
- #define f_fss_set_quote_t_initialize { f_fss_objects_t_initialize, f_fss_contents_t_initialize, f_fss_quotes_t_initialize, f_fss_quotess_t_initialize }
+ #define f_fss_set_quote_t_initialize { f_fss_objects_t_initialize, f_fss_contents_t_initialize, f_uint8s_t_initialize, f_uint8ss_t_initialize }
#define macro_f_fss_set_quote_t_initialize(objects, contents, objects_quote, contents_quote) { objects, contents, objects_quote, contents_quote }
#define macro_f_fss_set_quote_t_clear(set) \
macro_f_fss_objects_t_clear(set.objects) \
macro_f_fss_contents_t_clear(set.contents) \
- macro_f_fss_quotes_t_clear(set.objects_quote) \
- macro_f_fss_quotess_t_clear(set.contents_quote)
+ macro_f_uint8s_t_clear(set.objects_quote) \
+ macro_f_uint8ss_t_clear(set.contents_quote)
#define macro_f_fss_set_quote_t_resize(status, set_quote, length) status = f_fss_set_quote_resize(length, &set_quote);
#define macro_f_fss_set_quote_t_adjust(status, set_quote, length) status = f_fss_set_quote_adjust(length, &set_quote);
macro_f_fss_contents_t_adjust(status, set_quote->contents, length);
if (F_status_is_error(status)) return status;
- macro_f_fss_quotes_t_adjust(status, set_quote->objects_quote, length);
+ macro_f_uint8s_t_adjust(status, set_quote->objects_quote, length);
if (F_status_is_error(status)) return status;
- macro_f_fss_quotess_t_adjust(status, set_quote->contents_quote, length);
+ macro_f_uint8ss_t_adjust(status, set_quote->contents_quote, length);
if (F_status_is_error(status)) return status;
return F_none;
macro_f_fss_contents_t_resize(status, set_quote->contents, length);
if (F_status_is_error(status)) return status;
- macro_f_fss_quotes_t_resize(status, set_quote->objects_quote, length);
+ macro_f_uint8s_t_resize(status, set_quote->objects_quote, length);
if (F_status_is_error(status)) return status;
- macro_f_fss_quotess_t_resize(status, set_quote->contents_quote, length);
+ macro_f_uint8ss_t_resize(status, set_quote->contents_quote, length);
if (F_status_is_error(status)) return status;
return F_none;
macro_f_fss_contents_t_adjust(status, set_quotes->array[i].contents, 0);
if (F_status_is_error(status)) return status;
- macro_f_fss_quotes_t_adjust(status, set_quotes->array[i].objects_quote, 0);
+ macro_f_uint8s_t_adjust(status, set_quotes->array[i].objects_quote, 0);
if (F_status_is_error(status)) return status;
- macro_f_fss_quotess_t_adjust(status, set_quotes->array[i].contents_quote, 0);
+ macro_f_uint8ss_t_adjust(status, set_quotes->array[i].contents_quote, 0);
if (F_status_is_error(status)) return status;
} // for
macro_f_fss_contents_t_resize(status, set_quotes->array[i].contents, 0);
if (F_status_is_error(status)) return status;
- macro_f_fss_quotes_t_resize(status, set_quotes->array[i].objects_quote, 0);
+ macro_f_uint8s_t_resize(status, set_quotes->array[i].objects_quote, 0);
if (F_status_is_error(status)) return status;
- macro_f_fss_quotess_t_resize(status, set_quotes->array[i].contents_quote, 0);
+ macro_f_uint8ss_t_resize(status, set_quotes->array[i].contents_quote, 0);
if (F_status_is_error(status)) return status;
} // for
*
* Errors (with error bit) from: macro_f_fss_contents_t_adjust().
* Errors (with error bit) from: macro_f_fss_objects_t_adjust().
- * Errors (with error bit) from: macro_f_fss_quotes_t_adjust().
- * Errors (with error bit) from: macro_f_fss_quotess_t_adjust().
+ * Errors (with error bit) from: macro_f_uint8s_t_adjust().
+ * Errors (with error bit) from: macro_f_uint8ss_t_adjust().
*
* @see macro_f_fss_contents_t_adjust()
* @see macro_f_fss_objects_t_adjust()
- * @see macro_f_fss_quotes_t_adjust()
- * @see macro_f_fss_quotess_t_adjust()
+ * @see macro_f_uint8s_t_adjust()
+ * @see macro_f_uint8ss_t_adjust()
*
* @see f_fss_set_quote_adjust()
* @see f_fss_set_quote_decimate_by()
*
* Errors (with error bit) from: macro_f_fss_contents_t_resize().
* Errors (with error bit) from: macro_f_fss_objects_t_resize().
- * Errors (with error bit) from: macro_f_fss_quotes_t_resize().
- * Errors (with error bit) from: macro_f_fss_quotess_t_resize().
+ * Errors (with error bit) from: macro_f_uint8s_t_resize().
+ * Errors (with error bit) from: macro_f_uint8ss_t_resize().
*
* @see macro_f_fss_contents_t_resize()
* @see macro_f_fss_objects_t_resize()
- * @see macro_f_fss_quotes_t_resize()
- * @see macro_f_fss_quotess_t_resize()
+ * @see macro_f_uint8s_t_resize()
+ * @see macro_f_uint8ss_t_resize()
*
* @see f_fss_set_quote_decrease_by()
* @see f_fss_set_quote_increase()
*
* Errors (with error bit) from: macro_f_fss_contents_t_adjust().
* Errors (with error bit) from: macro_f_fss_objects_t_adjust().
- * Errors (with error bit) from: macro_f_fss_quotes_t_adjust().
- * Errors (with error bit) from: macro_f_fss_quotess_t_adjust().
+ * Errors (with error bit) from: macro_f_uint8s_t_adjust().
+ * Errors (with error bit) from: macro_f_uint8ss_t_adjust().
* Errors (with error bit) from: f_memory_adjust().
*
* @see macro_f_fss_contents_t_adjust()
* @see macro_f_fss_objects_t_adjust()
- * @see macro_f_fss_quotes_t_adjust()
- * @see macro_f_fss_quotess_t_adjust()
+ * @see macro_f_uint8s_t_adjust()
+ * @see macro_f_uint8ss_t_adjust()
*
* @see f_fss_set_quotes_adjust()
* @see f_fss_set_quotes_decimate_by()
*
* Errors (with error bit) from: macro_f_fss_contents_t_resize().
* Errors (with error bit) from: macro_f_fss_objects_t_resize().
- * Errors (with error bit) from: macro_f_fss_quotes_t_resize().
- * Errors (with error bit) from: macro_f_fss_quotess_t_resize().
+ * Errors (with error bit) from: macro_f_uint8s_t_resize().
+ * Errors (with error bit) from: macro_f_uint8ss_t_resize().
* Errors (with error bit) from: f_memory_resize().
*
* @see macro_f_fss_contents_t_resize()
* @see macro_f_fss_objects_t_resize()
- * @see macro_f_fss_quotes_t_resize()
- * @see macro_f_fss_quotess_t_resize()
+ * @see macro_f_uint8s_t_resize()
+ * @see macro_f_uint8ss_t_resize()
*
* @see f_fss_set_quotes_decrease_by()
* @see f_fss_set_quotes_increase()
return F_status_set_error(F_none_eol);
}
- if (content.string[range->start] == f_fss_delimit_placeholder_s.string[0]) continue;
+ if (content.string[range->start] == f_fss_placeholder_s.string[0]) continue;
destination->string[destination->used++] = content.string[range->start];
} // for
#endif // _di_fl_fss_basic_content_write_
#ifndef _di_fl_fss_basic_object_read_
- f_status_t fl_fss_basic_object_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_object_t * const found, f_fss_quote_t * const quote, f_fss_delimits_t * const delimits) {
+ f_status_t fl_fss_basic_object_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_object_t * const found, uint8_t * const quote, f_fss_delimits_t * const delimits) {
#ifndef _di_level_1_parameter_checking_
if (!range) return F_status_set_error(F_parameter);
if (!found) return F_status_set_error(F_parameter);
#endif // _di_fl_fss_basic_object_read_
#ifndef _di_fl_fss_basic_object_write_
- f_status_t fl_fss_basic_object_write(const f_string_static_t object, const f_fss_quote_t quote, const uint8_t complete, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination) {
+ f_status_t fl_fss_basic_object_write(const f_string_static_t object, const uint8_t quote, const uint8_t complete, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination) {
#ifndef _di_level_1_parameter_checking_
if (!range) return F_status_set_error(F_parameter);
if (!destination) return F_status_set_error(F_parameter);
const f_array_length_t destination_used = destination->used;
- f_status_t status = private_fl_fss_basic_write(F_true, object, quote ? quote : f_fss_delimit_quote_double_s.string[0], state, range, destination);
+ f_status_t status = private_fl_fss_basic_write(F_true, object, quote ? quote : f_fss_quote_double_s.string[0], state, range, destination);
if (status == F_data_not_stop || status == F_data_not_eos) {
- // Objects cannot be empty, so write a quoted empty string.
+ // Objects cannot be empty, so write a quote empty string.
const f_status_t status_allocation = f_string_dynamic_increase_by(2, destination);
if (F_status_is_error(status_allocation)) {
return status_allocation;
}
- destination->string[destination->used++] = quote ? f_fss_delimit_quote_single_s.string[0] : f_fss_delimit_quote_double_s.string[0];
- destination->string[destination->used++] = quote ? f_fss_delimit_quote_single_s.string[0] : f_fss_delimit_quote_double_s.string[0];
+ destination->string[destination->used++] = quote ? quote : f_fss_quote_double_s.string[0];
+ destination->string[destination->used++] = quote ? quote : f_fss_quote_double_s.string[0];
}
if (complete == f_fss_complete_partial_e || complete == f_fss_complete_partial_trim_e || complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e) {
f_status_t status2 = F_none;
if (complete == f_fss_complete_full_trim_e) {
- status2 = private_fl_fss_basic_write_object_trim(quote ? quote : f_fss_delimit_quote_double_s.string[0], destination_used, state, destination);
+ status2 = private_fl_fss_basic_write_object_trim(quote ? quote : f_fss_quote_double_s.string[0], destination_used, state, destination);
if (F_status_is_error(status2)) {
destination->used = destination_used;
* @param found
* A location where a valid object was found.
* @param quote
- * This will store whether or not this object is quote and what quote is in use.
+ * This will store the quote character to use (if value is 0, then there is not quote).
* Set pointer address to 0 to not use.
* @param delimits
* A delimits array representing where delimits exist within the buffer.
* @see f_utf_buffer_increment()
*/
#ifndef _di_fl_fss_basic_object_read_
- extern f_status_t fl_fss_basic_object_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_object_t * const found, f_fss_quote_t * const quote, f_fss_delimits_t * const delimits);
+ extern f_status_t fl_fss_basic_object_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_object_t * const found, uint8_t * const quote, f_fss_delimits_t * const delimits);
#endif // _di_fl_fss_basic_object_read_
/**
* The string to write as (does not stop at NULLS, they are ignored and not written).
* @param quote
* If 0, then double quotes are auto-inserted, when required.
- * Otherwise, this is the type of quote to wrap the object in when writing.
+ * Otherwise, this is quote character to wrap the object in when writing.
* @param complete
* If f_fss_complete_none_e, then only the object name is written.
* If f_fss_complete_full_e, this will write any appropriate open and close aspects of this object.
* @see f_string_dynamic_increase_by()
*/
#ifndef _di_fl_fss_basic_object_write_
- extern f_status_t fl_fss_basic_object_write(const f_string_static_t object, const f_fss_quote_t quote, const uint8_t complete, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination);
+ extern f_status_t fl_fss_basic_object_write(const f_string_static_t object, const uint8_t quote, const uint8_t complete, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination);
#endif // _di_fl_fss_basic_object_write_
#ifdef __cplusplus
continue;
}
- if (buffer.string[range->start] == f_fss_delimit_slash_s.string[0]) {
+ if (buffer.string[range->start] == f_fss_slash_s.string[0]) {
slash_first = range->start;
slash_count = 1;
}
}
- if (buffer.string[range->start] == f_fss_delimit_placeholder_s.string[0]) continue;
- if (buffer.string[range->start] != f_fss_delimit_slash_s.string[0]) break;
+ if (buffer.string[range->start] == f_fss_placeholder_s.string[0]) continue;
+ if (buffer.string[range->start] != f_fss_slash_s.string[0]) break;
++slash_count;
} // for
while (slash_count > 0) {
- if (buffer.string[range->start] == f_fss_delimit_slash_s.string[0]) {
+ if (buffer.string[range->start] == f_fss_slash_s.string[0]) {
if (slash_count % 2 == 1) {
delimits->array[delimits->used++] = range->start;
}
}
}
- if (content.string[range->start] == f_fss_delimit_slash_s.string[0] && !is_comment) {
+ if (content.string[range->start] == f_fss_slash_s.string[0] && !is_comment) {
slash_count = 1;
if (do_prepend) {
}
}
- if (content.string[range->start] == f_fss_delimit_placeholder_s.string[0]) continue;
- if (content.string[range->start] != f_fss_delimit_slash_s.string[0]) break;
+ if (content.string[range->start] == f_fss_placeholder_s.string[0]) continue;
+ if (content.string[range->start] != f_fss_slash_s.string[0]) break;
- destination->string[destination->used++] = f_fss_delimit_slash_s.string[0];
+ destination->string[destination->used++] = f_fss_slash_s.string[0];
++slash_count;
} // for
if (F_status_is_error(status)) break;
while (--slash_count) {
- destination->string[destination->used++] = f_fss_delimit_slash_s.string[0];
+ destination->string[destination->used++] = f_fss_slash_s.string[0];
} // while
- destination->string[destination->used++] = f_fss_delimit_slash_s.string[0];
+ destination->string[destination->used++] = f_fss_slash_s.string[0];
destination->string[destination->used++] = f_fss_basic_list_open_s.string[0];
range->start = start + 1;
status = f_string_dynamic_increase_by(3, destination);
if (F_status_is_error(status)) break;
- destination->string[destination->used++] = f_fss_delimit_slash_s.string[0];
+ destination->string[destination->used++] = f_fss_slash_s.string[0];
destination->string[destination->used++] = f_fss_basic_list_open_s.string[0];
range->start = start + 1;
}
}
- if (content.string[range->start] != f_fss_delimit_placeholder_s.string[0]) {
+ if (content.string[range->start] != f_fss_placeholder_s.string[0]) {
if (do_prepend) {
status = f_string_dynamic_append(*prepend, destination);
if (F_status_is_error(status)) break;
// Check to see if a newline exists, at the end.
if (destination->used) {
for (i = destination->used - 1; i > 0; --i) {
- if (destination->string[i] != f_fss_delimit_placeholder_s.string[0]) break;
+ if (destination->string[i] != f_fss_placeholder_s.string[0]) break;
} // for
}
}
}
- if (buffer.string[range->start] == f_fss_delimit_slash_s.string[0]) {
+ if (buffer.string[range->start] == f_fss_slash_s.string[0]) {
slash_first = range->start;
slash_count = 1;
}
}
- if (buffer.string[range->start] == f_fss_delimit_placeholder_s.string[0]) {
+ if (buffer.string[range->start] == f_fss_placeholder_s.string[0]) {
continue;
- } else if (buffer.string[range->start] != f_fss_delimit_slash_s.string[0]) {
+ } else if (buffer.string[range->start] != f_fss_slash_s.string[0]) {
break;
}
if (slash_count % 2 == 0) {
while (slash_count > 0) {
- if (buffer.string[range->start] == f_fss_delimit_slash_s.string[0]) {
+ if (buffer.string[range->start] == f_fss_slash_s.string[0]) {
if (slash_count % 2 == 1) {
delimits->array[delimits->used] = range->start;
++delimits->used;
status = f_string_dynamic_increase(state.step_large, destination);
if (F_status_is_error(status)) break;
- destination->string[destination->used++] = f_fss_delimit_slash_s.string[0];
+ destination->string[destination->used++] = f_fss_slash_s.string[0];
break;
}
if (status == F_true) break;
// Objects will not have leading white spaces, but having this does not result in an invalid object, so just write the provided spaces.
- if (object.string[range->start] != f_fss_delimit_placeholder_s.string[0]) {
+ if (object.string[range->start] != f_fss_placeholder_s.string[0]) {
if (object.string[range->start] == f_fss_eol_s.string[0]) {
status = F_status_set_error(F_none_eol);
}
}
- if (object.string[range->start] == f_fss_delimit_slash_s.string[0]) {
+ if (object.string[range->start] == f_fss_slash_s.string[0]) {
slash_count = 1;
for (++range->start; range->start <= range->stop && range->start < object.used; ++range->start) {
}
}
- if (object.string[range->start] == f_fss_delimit_placeholder_s.string[0]) continue;
- if (object.string[range->start] != f_fss_delimit_slash_s.string[0]) break;
+ if (object.string[range->start] == f_fss_placeholder_s.string[0]) continue;
+ if (object.string[range->start] != f_fss_slash_s.string[0]) break;
++slash_count;
} // for
if (F_status_is_error(status)) break;
while (--slash_count) {
- destination->string[destination->used++] = f_fss_delimit_slash_s.string[0];
+ destination->string[destination->used++] = f_fss_slash_s.string[0];
} // while
if (range->start > range->stop || range->start >= object.used) break;
}
- if (object.string[range->start] != f_fss_delimit_placeholder_s.string[0]) {
+ if (object.string[range->start] != f_fss_placeholder_s.string[0]) {
if (object.string[range->start] == f_fss_eol_s.string[0]) {
status = F_status_set_error(F_none_eol);
continue;
}
- if (buffer.string[range->start] == f_fss_delimit_slash_s.string[0]) {
+ if (buffer.string[range->start] == f_fss_slash_s.string[0]) {
slash_first = range->start;
slash_last = range->start;
slashes.array[depth] = 1;
position_previous = range->start++;
- while (range->start <= range->stop && range->start < buffer.used && (buffer.string[range->start] == f_fss_delimit_placeholder_s.string[0] || buffer.string[range->start] == f_fss_delimit_slash_s.string[0])) {
+ while (range->start <= range->stop && range->start < buffer.used && (buffer.string[range->start] == f_fss_placeholder_s.string[0] || buffer.string[range->start] == f_fss_slash_s.string[0])) {
if (state.interrupt) {
status = state.interrupt((void *) &state, 0);
position_previous = range->start;
- if (buffer.string[range->start] == f_fss_delimit_slash_s.string[0]) {
+ if (buffer.string[range->start] == f_fss_slash_s.string[0]) {
slash_last = range->start++;
++slashes.array[depth];
}
break;
}
- if (buffer.string[range->start] != f_fss_delimit_placeholder_s.string[0]) {
+ if (buffer.string[range->start] != f_fss_placeholder_s.string[0]) {
status = f_fss_is_space(state, buffer, *range);
if (F_status_is_error(status)) break;
// Apply slash delimits, only slashes and placeholders should be present.
while (slashes.array[depth]) {
- if (buffer.string[range->start] == f_fss_delimit_slash_s.string[0]) {
+ if (buffer.string[range->start] == f_fss_slash_s.string[0]) {
if (slashes.array[depth] % 2 == 1) {
delimits->array[delimits->used++] = range->start;
}
if (buffer.string[range->start] == f_fss_eol_s.string[0]) break;
- if (buffer.string[range->start] != f_fss_delimit_placeholder_s.string[0]) {
+ if (buffer.string[range->start] != f_fss_placeholder_s.string[0]) {
status = f_fss_is_space(state, buffer, *range);
if (F_status_is_error(status)) break;
if (buffer.string[range->start] == f_fss_eol_s.string[0]) break;
- if (buffer.string[range->start] != f_fss_delimit_placeholder_s.string[0]) {
+ if (buffer.string[range->start] != f_fss_placeholder_s.string[0]) {
status = f_fss_is_space(state, buffer, *range);
if (F_status_is_error(status)) break;
}
}
- if (content.string[range->start] == f_fss_delimit_slash_s.string[0] && !is_comment) {
+ if (content.string[range->start] == f_fss_slash_s.string[0] && !is_comment) {
slash_count = 1;
if (do_prepend) {
}
}
- if (content.string[range->start] == f_fss_delimit_placeholder_s.string[0]) continue;
- if (content.string[range->start] != f_fss_delimit_slash_s.string[0]) break;
+ if (content.string[range->start] == f_fss_placeholder_s.string[0]) continue;
+ if (content.string[range->start] != f_fss_slash_s.string[0]) break;
- destination->string[destination->used++] = f_fss_delimit_slash_s.string[0];
+ destination->string[destination->used++] = f_fss_slash_s.string[0];
++slash_count;
} // for
if (content.string[range->start] == f_fss_embedded_list_open_s.string[0]) {
while (--slash_count) {
- destination->string[destination->used++] = f_fss_delimit_slash_s.string[0];
+ destination->string[destination->used++] = f_fss_slash_s.string[0];
} // while
}
- destination->string[destination->used++] = f_fss_delimit_slash_s.string[0];
+ destination->string[destination->used++] = f_fss_slash_s.string[0];
destination->string[destination->used++] = content.string[start];
range->start = start + 1;
status = f_string_dynamic_increase_by(3, destination);
if (F_status_is_error(status)) break;
- destination->string[destination->used++] = f_fss_delimit_slash_s.string[0];
+ destination->string[destination->used++] = f_fss_slash_s.string[0];
destination->string[destination->used++] = content.string[start];
range->start = start + 1;
break;
}
- if (content.string[range->start] != f_fss_delimit_placeholder_s.string[0]) {
+ if (content.string[range->start] != f_fss_placeholder_s.string[0]) {
if (do_prepend) {
status = f_string_dynamic_append(*prepend, destination);
if (F_status_is_error(status)) break;
}
}
- if (buffer.string[range->start] == f_fss_delimit_slash_s.string[0]) {
+ if (buffer.string[range->start] == f_fss_slash_s.string[0]) {
slash_first = range->start;
slash_count = 1;
status = f_utf_buffer_increment(buffer, range, 1);
if (F_status_is_error(status)) break;
- while (range->start <= range->stop && range->start < buffer.used && (buffer.string[range->start] == f_fss_delimit_placeholder_s.string[0] || buffer.string[range->start] == f_fss_delimit_slash_s.string[0])) {
+ while (range->start <= range->stop && range->start < buffer.used && (buffer.string[range->start] == f_fss_placeholder_s.string[0] || buffer.string[range->start] == f_fss_slash_s.string[0])) {
if (state.interrupt) {
status = state.interrupt((void *) &state, 0);
}
}
- if (buffer.string[range->start] == f_fss_delimit_slash_s.string[0]) slash_count++;
+ if (buffer.string[range->start] == f_fss_slash_s.string[0]) slash_count++;
status = f_utf_buffer_increment(buffer, range, 1);
if (F_status_is_error(status)) break;
if (slash_count % 2 == 0) {
while (slash_count > 0) {
- if (buffer.string[range->start] == f_fss_delimit_slash_s.string[0]) {
+ if (buffer.string[range->start] == f_fss_slash_s.string[0]) {
if (slash_count % 2 == 1) {
delimits->array[delimits->used++] = range->start;
}
status = f_string_dynamic_increase(state.step_large, destination);
if (F_status_is_error(status)) break;
- destination->string[destination->used++] = f_fss_delimit_slash_s.string[0];
+ destination->string[destination->used++] = f_fss_slash_s.string[0];
break;
}
if (status == F_true) break;
// Objects will not have leading white spaces, but having this does not result in an invalid object, so just write the provided spaces.
- if (object.string[range->start] != f_fss_delimit_placeholder_s.string[0]) {
+ if (object.string[range->start] != f_fss_placeholder_s.string[0]) {
if (object.string[range->start] == f_fss_eol_s.string[0]) {
status = F_status_set_error(F_none_eol);
}
}
- if (object.string[range->start] == f_fss_delimit_slash_s.string[0]) {
+ if (object.string[range->start] == f_fss_slash_s.string[0]) {
slash_count = 1;
for (++range->start; range->start <= range->stop && range->start < object.used; ++range->start) {
}
}
- if (object.string[range->start] == f_fss_delimit_placeholder_s.string[0]) continue;
- if (object.string[range->start] != f_fss_delimit_slash_s.string[0]) break;
+ if (object.string[range->start] == f_fss_placeholder_s.string[0]) continue;
+ if (object.string[range->start] != f_fss_slash_s.string[0]) break;
++slash_count;
} // for
if (F_status_is_error(status)) break;
while (--slash_count) {
- destination->string[destination->used++] = f_fss_delimit_slash_s.string[0];
+ destination->string[destination->used++] = f_fss_slash_s.string[0];
} // while
if (range->start > range->stop || range->start >= object.used) {
}
}
- if (object.string[range->start] != f_fss_delimit_placeholder_s.string[0]) {
+ if (object.string[range->start] != f_fss_placeholder_s.string[0]) {
if (object.string[range->start] == f_fss_eol_s.string[0]) {
status = F_status_set_error(F_none_eol);
#endif
#ifndef _di_fl_fss_extended_content_read_
- f_status_t fl_fss_extended_content_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_content_t * const found, f_fss_quotes_t * const quotes, f_fss_delimits_t * const delimits) {
+ f_status_t fl_fss_extended_content_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_content_t * const found, f_uint8s_t * const quotes, f_fss_delimits_t * const delimits) {
#ifndef _di_level_1_parameter_checking_
if (!range) return F_status_set_error(F_parameter);
if (!found) return F_status_set_error(F_parameter);
const f_array_length_t quotes_used = quotes ? quotes->used : 0;
uint8_t content_found = 0;
- f_fss_quote_t quoted = f_fss_quote_type_none_e;
+ uint8_t quote = 0;
while (range->start <= range->stop && range->start < buffer.used) {
f_string_range_t content_partial = f_string_range_t_initialize;
- quoted = f_fss_quote_type_none_e;
+ quote = 0;
- status = private_fl_fss_basic_read(buffer, F_false, state, range, &content_partial, "ed, delimits);
+ status = private_fl_fss_basic_read(buffer, F_false, state, range, &content_partial, "e, delimits);
if (status == F_fss_found_object || status == F_fss_found_object_content_not) {
status_allocate = f_string_ranges_increase(state.step_small, found);
found->array[found->used++] = content_partial;
if (quotes) {
- if (quoted == f_fss_quote_type_double_e) {
- quotes->array[quotes->used] = f_string_ascii_quote_double_s.string[0];
+ if (quote == f_fss_quote_type_double_e) {
+ quotes->array[quotes->used] = f_fss_quote_double_s.string[0];
}
- else if (quoted == f_fss_quote_type_single_e) {
- quotes->array[quotes->used] = f_string_ascii_quote_single_s.string[0];
+ else if (quote == f_fss_quote_type_single_e) {
+ quotes->array[quotes->used] = f_fss_quote_single_s.string[0];
+ }
+ else if (quote == f_fss_quote_type_backtick_e) {
+ quotes->array[quotes->used] = f_fss_quote_backtick_s.string[0];
}
else {
quotes->array[quotes->used] = 0;
#endif // _di_fl_fss_extended_content_read_
#ifndef _di_fl_fss_extended_content_write_
- f_status_t fl_fss_extended_content_write(const f_string_static_t content, const f_fss_quote_t quoted, const uint8_t complete, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination) {
+ f_status_t fl_fss_extended_content_write(const f_string_static_t content, const uint8_t quote, const uint8_t complete, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination) {
#ifndef _di_level_1_parameter_checking_
if (!range) return F_status_set_error(F_parameter);
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
// This operates exactly like an object, syntax-wise.
- const f_status_t status = private_fl_fss_basic_write(F_false, content, quoted ? quoted : f_fss_delimit_quote_double_s.string[0], state, range, destination);
+ const f_status_t status = private_fl_fss_basic_write(F_false, content, quote ? quote : f_fss_quote_double_s.string[0], state, range, destination);
if (status == F_data_not_stop || status == F_data_not_eos) {
- // Content that is empty must be represented by a quoted empty string.
+ // Content that is empty must be represented by a quote empty string.
const f_status_t status_allocation = f_string_dynamic_increase_by(4, destination);
if (F_status_is_error(status_allocation)) return status_allocation;
- destination->string[destination->used++] = quoted ? f_fss_delimit_quote_single_s.string[0] : f_fss_delimit_quote_double_s.string[0];
- destination->string[destination->used++] = quoted ? f_fss_delimit_quote_single_s.string[0] : f_fss_delimit_quote_double_s.string[0];
+ destination->string[destination->used++] = quote ? quote : f_fss_quote_double_s.string[0];
+ destination->string[destination->used++] = quote ? quote : f_fss_quote_double_s.string[0];
// Content should be terminated, even if empty.
if (complete == f_fss_complete_partial_e || complete == f_fss_complete_partial_trim_e || complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e || complete == f_fss_complete_next_e) {
#endif // _di_fl_fss_extended_content_write_
#ifndef _di_fl_fss_extended_object_read_
- f_status_t fl_fss_extended_object_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_object_t * const found, f_fss_quote_t * const quoted, f_fss_delimits_t * const delimits) {
+ f_status_t fl_fss_extended_object_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_object_t * const found, uint8_t * const quote, f_fss_delimits_t * const delimits) {
#ifndef _di_level_1_parameter_checking_
if (!range) return F_status_set_error(F_parameter);
if (!found) return F_status_set_error(F_parameter);
const f_array_length_t delimits_used = delimits->used;
- const f_status_t status = private_fl_fss_basic_read(buffer, F_true, state, range, found, quoted, delimits);
+ const f_status_t status = private_fl_fss_basic_read(buffer, F_true, state, range, found, quote, delimits);
if (F_status_is_error(status) || status == F_fss_found_object_not || status == F_data_not || status == F_data_not_eos || status == F_data_not_stop) {
delimits->used = delimits_used;
#endif // _di_fl_fss_extended_object_read_
#ifndef _di_fl_fss_extended_object_write_
-f_status_t fl_fss_extended_object_write(const f_string_static_t object, const f_fss_quote_t quoted, const uint8_t complete, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination) {
+f_status_t fl_fss_extended_object_write(const f_string_static_t object, const uint8_t quote, const uint8_t complete, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination) {
#ifndef _di_level_1_parameter_checking_
if (!range) return F_status_set_error(F_parameter);
if (!destination) return F_status_set_error(F_parameter);
const f_array_length_t used_start = destination->used;
- f_status_t status = private_fl_fss_basic_write(F_true, object, quoted ? quoted : f_fss_delimit_quote_double_s.string[0], state, range, destination);
+ f_status_t status = private_fl_fss_basic_write(F_true, object, quote ? quote : f_fss_quote_double_s.string[0], state, range, destination);
if (status == F_data_not_stop || status == F_data_not_eos) {
- // Objects cannot be empty, so write a quoted empty string.
+ // Objects cannot be empty, so write a quote empty string.
const f_status_t status_allocation = f_string_dynamic_increase_by(2, destination);
if (F_status_is_error(status_allocation)) return status_allocation;
- destination->string[destination->used++] = quoted ? f_fss_delimit_quote_single_s.string[0] : f_fss_delimit_quote_double_s.string[0];
- destination->string[destination->used++] = quoted ? f_fss_delimit_quote_single_s.string[0] : f_fss_delimit_quote_double_s.string[0];
+ destination->string[destination->used++] = quote ? quote : f_fss_quote_double_s.string[0];
+ destination->string[destination->used++] = quote ? quote : f_fss_quote_double_s.string[0];
}
if (complete == f_fss_complete_partial_e || complete == f_fss_complete_partial_trim_e || complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e) {
f_status_t status2 = F_none;
if (complete == f_fss_complete_full_trim_e) {
- status2 = private_fl_fss_basic_write_object_trim(quoted ? quoted : f_fss_delimit_quote_double_s.string[0], used_start, state, destination);
+ status2 = private_fl_fss_basic_write_object_trim(quote ? quote : f_fss_quote_double_s.string[0], used_start, state, destination);
if (F_status_is_error(status2)) return status2;
}
* @see fl_fss_extended_content_read()
*/
#ifndef _di_fl_fss_extended_content_read_
- extern f_status_t fl_fss_extended_content_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_content_t * const found, f_fss_quotes_t * const quotes, f_fss_delimits_t * const delimits);
+ extern f_status_t fl_fss_extended_content_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_content_t * const found, f_uint8s_t * const quotes, f_fss_delimits_t * const delimits);
#endif // _di_fl_fss_extended_content_read_
/**
*
* @param content
* The string to write as (does not stop at NULLS, they are ignored and not written).
- * @param quoted
+ * @param quote
* If 0, then double quotes are auto-inserted, when required.
- * Otherwise, this is the type of quote to wrap the object in when writing.
+ * Otherwise, this is quote character to wrap the object in when writing.
* @param complete
* If f_fss_complete_none_e, then only the content is written.
* If f_fss_complete_next_e, then the content followed by any appropriate "next" character separating one content from the next, if applicable.
* @see fl_fss_extended_content_write()
*/
#ifndef _di_fl_fss_extended_content_write_
- extern f_status_t fl_fss_extended_content_write(const f_string_static_t content, const f_fss_quote_t quoted, const uint8_t complete, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination);
+ extern f_status_t fl_fss_extended_content_write(const f_string_static_t content, const uint8_t quote, const uint8_t complete, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination);
#endif // _di_fl_fss_extended_content_write_
/**
* A start location past the stop location or buffer used means that the entire range was processed.
* @param found
* A location where a valid object was found.
- * @param quoted
- * This will store whether or not this object is quoted and what quote is in use.
+ * @param quote
+ * This will store the quote character to use (if value is 0, then there is not quote).
* Set pointer address to 0 to not use.
* @param delimits
* A delimits array representing where delimits exist within the buffer.
* @see fl_fss_extended_content_read()
*/
#ifndef _di_fl_fss_extended_object_read_
- extern f_status_t fl_fss_extended_object_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_object_t * const found, f_fss_quote_t * const quoted, f_fss_delimits_t * const delimits);
+ extern f_status_t fl_fss_extended_object_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_object_t * const found, uint8_t * const quote, f_fss_delimits_t * const delimits);
#endif // _di_fl_fss_extended_object_read_
/**
*
* @param object
* The string to write as (does not stop at NULLS, they are ignored and not written).
- * @param quoted
+ * @param quote
* If 0, then double quotes are auto-inserted, when required.
- * Otherwise, this is the type of quote to wrap the object in when writing.
+ * Otherwise, this is quote character to wrap the object in when writing.
* @param complete
* If f_fss_complete_none_e, then only the object name is written.
* If f_fss_complete_full_e, this will write any appropriate open and close aspects of this object.
* @see f_string_dynamic_increase_by()
*/
#ifndef _di_fl_fss_extended_object_write_
- extern f_status_t fl_fss_extended_object_write(const f_string_static_t object, const f_fss_quote_t quoted, const uint8_t complete, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination);
+ extern f_status_t fl_fss_extended_object_write(const f_string_static_t object, const uint8_t quote, const uint8_t complete, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination);
#endif // _di_fl_fss_extended_object_write_
#ifdef __cplusplus
if (status == F_none_eos || status == F_none_stop) break;
- if (buffer.string[range->start] == f_fss_delimit_slash_s.string[0]) {
+ if (buffer.string[range->start] == f_fss_slash_s.string[0]) {
slash_first = range->start;
slash_count = 1;
}
}
- if (buffer.string[range->start] == f_fss_delimit_placeholder_s.string[0]) continue;
- if (buffer.string[range->start] != f_fss_delimit_slash_s.string[0]) break;
+ if (buffer.string[range->start] == f_fss_placeholder_s.string[0]) continue;
+ if (buffer.string[range->start] != f_fss_slash_s.string[0]) break;
++slash_count;
} // for
}
}
- if (content.string[range->start] == f_fss_delimit_slash_s.string[0] && !is_comment) {
+ if (content.string[range->start] == f_fss_slash_s.string[0] && !is_comment) {
slash_count = 1;
if (do_prepend) {
}
}
- if (content.string[range->start] == f_fss_delimit_placeholder_s.string[0]) continue;
- if (content.string[range->start] != f_fss_delimit_slash_s.string[0]) break;
+ if (content.string[range->start] == f_fss_placeholder_s.string[0]) continue;
+ if (content.string[range->start] != f_fss_slash_s.string[0]) break;
- destination->string[destination->used++] = f_fss_delimit_slash_s.string[0];
+ destination->string[destination->used++] = f_fss_slash_s.string[0];
++slash_count;
} // for
status = f_string_dynamic_increase_by(2, destination);
if (F_status_is_error(status)) break;
- destination->string[destination->used++] = f_fss_delimit_slash_s.string[0];
+ destination->string[destination->used++] = f_fss_slash_s.string[0];
destination->string[destination->used++] = f_fss_extended_list_close_s.string[0];
range->start = start + 1;
status = f_string_dynamic_increase_by(2, destination);
if (F_status_is_error(status)) break;
- destination->string[destination->used++] = f_fss_delimit_slash_s.string[0];
+ destination->string[destination->used++] = f_fss_slash_s.string[0];
destination->string[destination->used++] = content.string[start];
range->start = start + 1;
break;
}
- if (content.string[range->start] != f_fss_delimit_placeholder_s.string[0]) {
+ if (content.string[range->start] != f_fss_placeholder_s.string[0]) {
if (do_prepend) {
status = f_string_dynamic_append(*prepend, destination);
if (F_status_is_error(status)) break;
}
}
- if (buffer.string[range->start] == f_fss_delimit_slash_s.string[0]) {
+ if (buffer.string[range->start] == f_fss_slash_s.string[0]) {
slash_first = range->start;
slash_count = 1;
status = f_utf_buffer_increment(buffer, range, 1);
if (F_status_is_error(status)) break;
- while (range->start <= range->stop && range->start < buffer.used && (buffer.string[range->start] == f_fss_delimit_placeholder_s.string[0] || buffer.string[range->start] == f_fss_delimit_slash_s.string[0])) {
+ while (range->start <= range->stop && range->start < buffer.used && (buffer.string[range->start] == f_fss_placeholder_s.string[0] || buffer.string[range->start] == f_fss_slash_s.string[0])) {
if (state.interrupt) {
status = state.interrupt((void *) &state, 0);
}
}
- if (buffer.string[range->start] == f_fss_delimit_slash_s.string[0]) ++slash_count;
+ if (buffer.string[range->start] == f_fss_slash_s.string[0]) ++slash_count;
status = f_utf_buffer_increment(buffer, range, 1);
if (F_status_is_error(status)) break;
if (slash_count % 2 == 0) {
while (slash_count > 0) {
- if (buffer.string[range->start] == f_fss_delimit_slash_s.string[0]) {
+ if (buffer.string[range->start] == f_fss_slash_s.string[0]) {
if (slash_count % 2 == 1) {
delimits->array[delimits->used++] = range->start;
}
status = f_string_dynamic_increase(state.step_large, destination);
if (F_status_is_error(status)) break;
- destination->string[destination->used++] = f_fss_delimit_slash_s.string[0];
+ destination->string[destination->used++] = f_fss_slash_s.string[0];
break;
}
if (status == F_true) break;
// Objects will not have leading white spaces, but having this does not result in an invalid object, so just write the provided spaces.
- if (object.string[range->start] != f_fss_delimit_placeholder_s.string[0]) {
+ if (object.string[range->start] != f_fss_placeholder_s.string[0]) {
if (object.string[range->start] == f_fss_eol_s.string[0]) {
status = F_status_set_error(F_none_eol);
}
}
- if (object.string[range->start] == f_fss_delimit_slash_s.string[0]) {
+ if (object.string[range->start] == f_fss_slash_s.string[0]) {
slash_count = 1;
for (++range->start; range->start <= range->stop && range->start < object.used; ++range->start) {
}
}
- if (object.string[range->start] == f_fss_delimit_placeholder_s.string[0]) continue;
- if (object.string[range->start] != f_fss_delimit_slash_s.string[0]) break;
+ if (object.string[range->start] == f_fss_placeholder_s.string[0]) continue;
+ if (object.string[range->start] != f_fss_slash_s.string[0]) break;
++slash_count;
} // for
if (F_status_is_error(status)) break;
while (--slash_count) {
- destination->string[destination->used++] = f_fss_delimit_slash_s.string[0];
+ destination->string[destination->used++] = f_fss_slash_s.string[0];
} // while
if (range->start > range->stop || range->start >= object.used) {
}
}
- if (object.string[range->start] != f_fss_delimit_placeholder_s.string[0]) {
+ if (object.string[range->start] != f_fss_placeholder_s.string[0]) {
if (object.string[range->start] == f_fss_eol_s.string[0]) {
status = F_status_set_error(F_none_eol);
}
}
- if (buffer.string[range->start] == f_fss_delimit_placeholder_s.string[0]) continue;
+ if (buffer.string[range->start] == f_fss_placeholder_s.string[0]) continue;
if (buffer.string[range->start] == f_fss_eol_s.string[0]) break;
status = f_string_dynamic_increase(state.step_large, destination);
}
}
- if (destination->string[destination_range.start] == f_fss_delimit_placeholder_s.string[0]) continue;
+ if (destination->string[destination_range.start] == f_fss_placeholder_s.string[0]) continue;
status = f_fss_is_space(state, *destination, destination_range);
width = macro_f_utf_byte_width(destination->string[destination_range.start]);
for (i = 0; i < width; ++i) {
- destination->string[destination_range.start + i] = f_fss_delimit_placeholder_s.string[0];
+ destination->string[destination_range.start + i] = f_fss_placeholder_s.string[0];
} // for
} // for
}
}
- if (destination->string[destination_range.start] == f_fss_delimit_placeholder_s.string[0]) {
+ if (destination->string[destination_range.start] == f_fss_placeholder_s.string[0]) {
--destination->used;
continue;
#endif // !defined(_di_fl_fss_basic_list_object_write_) || !defined(_di_fl_fss_extended_list_object_write_)
#if !defined(_di_fl_fss_basic_object_read_) || !defined(_di_fl_fss_extended_object_read_) || !defined(_di_fl_fss_extended_content_read_)
- f_status_t private_fl_fss_basic_read(const f_string_static_t buffer, const bool object_as, f_state_t state, f_string_range_t * const range, f_fss_object_t * const found, f_fss_quote_t *quoted, f_fss_delimits_t * const delimits) {
+ f_status_t private_fl_fss_basic_read(const f_string_static_t buffer, const bool object_as, f_state_t state, f_string_range_t * const range, f_fss_object_t * const found, uint8_t * const quote, f_fss_delimits_t * const delimits) {
f_status_t status = f_fss_skip_past_space(state, buffer, range);
if (F_status_is_error(status)) return status;
return F_fss_found_object_not;
}
- // Handle quoted support.
+ // Handle quote support.
f_char_t quote_found = 0;
- if (quoted) {
- *quoted = f_fss_quote_type_none_e;
+ if (quote) {
+ *quote = 0;
}
// Identify where the object begins.
- if (buffer.string[range->start] == f_fss_delimit_slash_s.string[0]) {
+ if (buffer.string[range->start] == f_fss_slash_s.string[0]) {
f_array_length_t first_slash = range->start;
found->start = range->start;
continue;
}
- if (buffer.string[range->start] != f_fss_delimit_slash_s.string[0]) {
+ if (buffer.string[range->start] != f_fss_slash_s.string[0]) {
status = f_fss_is_space(state, buffer, *range);
if (F_status_is_error(status)) return status;
return F_none_stop;
}
- if (buffer.string[range->start] == f_fss_delimit_quote_single_s.string[0] || buffer.string[range->start] == f_fss_delimit_quote_double_s.string[0] || (object_as && buffer.string[range->start] == f_fss_comment_s.string[0])) {
+ if (buffer.string[range->start] == f_fss_quote_single_s.string[0] || buffer.string[range->start] == f_fss_quote_double_s.string[0] || buffer.string[range->start] == f_fss_quote_backtick_s.string[0] || (object_as && buffer.string[range->start] == f_fss_comment_s.string[0])) {
- // Only the first slash before a quoted needs to be escaped (or not) as once there is a slash before a quoted, this cannot ever be a quote object.
+ // Only the first slash before a quote needs to be escaped (or not) as once there is a slash before a quote, this cannot ever be a quote object.
// This simplifies the number of slashes needed.
status = f_array_lengths_increase(state.step_small, delimits);
if (F_status_is_error(status)) return status;
if (F_status_is_error(status)) return status;
}
}
- else if (buffer.string[range->start] == f_fss_delimit_quote_single_s.string[0] || buffer.string[range->start] == f_fss_delimit_quote_double_s.string[0]) {
+ else if (buffer.string[range->start] == f_fss_quote_single_s.string[0] || buffer.string[range->start] == f_fss_quote_double_s.string[0] || buffer.string[range->start] == f_fss_quote_backtick_s.string[0]) {
quote_found = buffer.string[range->start];
status = f_utf_buffer_increment(buffer, range, 1);
}
}
- if (buffer.string[range->start] == f_fss_delimit_slash_s.string[0]) {
+ if (buffer.string[range->start] == f_fss_slash_s.string[0]) {
first_slash = range->start;
slash_count = 1;
}
}
- if (buffer.string[range->start] == f_fss_delimit_placeholder_s.string[0]) {
+ if (buffer.string[range->start] == f_fss_placeholder_s.string[0]) {
status = f_utf_buffer_increment(buffer, range, 1);
if (F_status_is_error(status)) return status;
continue;
}
- else if (buffer.string[range->start] != f_fss_delimit_slash_s.string[0]) {
+ else if (buffer.string[range->start] != f_fss_slash_s.string[0]) {
break;
}
if (buffer.string[range->start] == quote_found) {
location = range->start;
- // Check to see if there is a whitespace, EOS, or EOL after the quoted, if not, then this is not a closing quoted and delimits do not apply.
+ // Check to see if there is a whitespace, EOS, or EOL after the quote, if not, then this is not a closing quote and delimits do not apply.
if (range->start + 1 <= range->stop && range->start + 1 < buffer.used) {
++range->start;
if (range->start > range->stop || range->start >= buffer.used) {
- // EOS or EOL was reached, so it is a valid closing quoted.
+ // EOS or EOL was reached, so it is a valid closing quote.
// (for EOL, this is always TRUE, for EOS this could be false but there is no way to know this, so assume TRUE.)
status = F_true;
}
}
else {
- // EOS or EOL was reached, so it is a valid closing quoted.
+ // EOS or EOL was reached, so it is a valid closing quote.
// (for EOL, this is always TRUE, for EOS this could be false but there is no way to know this, so assume TRUE.)
status = F_true;
}
if (status == F_true) {
- if (quoted) {
- if (quote_found == f_fss_delimit_quote_single_s.string[0]) {
- *quoted = f_fss_quote_type_single_e;
- }
- else if (quote_found == f_fss_delimit_quote_double_s.string[0]) {
- *quoted = f_fss_quote_type_double_e;
+ if (quote) {
+ if (quote_found == f_fss_quote_single_s.string[0] || quote_found == f_fss_quote_double_s.string[0] || quote_found == f_fss_quote_backtick_s.string[0]) {
+ *quote = quote_found;
}
else {
- *quoted = f_fss_quote_type_none_e;
+ *quote = 0;
}
}
while (slash_count > 0) {
- if (buffer.string[range->start] == f_fss_delimit_slash_s.string[0]) {
+ if (buffer.string[range->start] == f_fss_slash_s.string[0]) {
if (slash_count % 2 == 1) {
delimits->array[delimits->used] = range->start;
++delimits->used;
range->start = location + 1;
- while (buffer.string[range->start] == f_fss_delimit_placeholder_s.string[0]) {
+ while (buffer.string[range->start] == f_fss_placeholder_s.string[0]) {
if (state.interrupt) {
status = state.interrupt((void *) &state, 0);
while (slash_count > 0) {
- if (buffer.string[range->start] == f_fss_delimit_slash_s.string[0]) {
+ if (buffer.string[range->start] == f_fss_slash_s.string[0]) {
if (slash_count % 2 == 1) {
delimits->array[delimits->used++] = range->start;
}
}
else if (buffer.string[range->start] == quote_found) {
- // Check to see if there is a whitespace, EOS, or EOL after the quoted, if not, then this is not a closing quoted.
+ // Check to see if there is a whitespace, EOS, or EOL after the quote, if not, then this is not a closing quote.
location = range->start;
if (range->start + 1 <= range->stop && range->start + 1 < buffer.used) {
if (range->start > range->stop || range->start >= buffer.used) {
- // EOS or EOL was reached, so it is a valid closing quoted.
+ // EOS or EOL was reached, so it is a valid closing quote.
// (for EOL, this is always TRUE, for EOS this could be false but there is no way to know this, so assume TRUE.)
status = F_true;
}
}
else {
- // EOS or EOL was reached, so it is a valid closing quoted.
+ // EOS or EOL was reached, so it is a valid closing quote.
// (for EOL, this is always TRUE, for EOS this could be false but there is no way to know this, so assume TRUE.)
status = F_true;
}
range->start = location;
if (status == F_true) {
- if (quoted) {
- if (quote_found == f_fss_delimit_quote_single_s.string[0]) {
- *quoted = f_fss_quote_type_single_e;
- }
- else if (quote_found == f_fss_delimit_quote_double_s.string[0]) {
- *quoted = f_fss_quote_type_double_e;
+ if (quote) {
+ if (quote_found == f_fss_quote_single_s.string[0] || quote_found == f_fss_quote_double_s.string[0] || quote_found == f_fss_quote_backtick_s.string[0]) {
+ *quote = quote_found;
}
else {
- *quoted = f_fss_quote_type_none_e;
+ *quote = f_fss_quote_type_none_e;
}
}
return F_fss_found_object;
}
- if (buffer.string[range->start] != f_fss_delimit_placeholder_s.string[0]) {
+ if (buffer.string[range->start] != f_fss_placeholder_s.string[0]) {
while (range->start <= range->stop && range->start < buffer.used && buffer.string[range->start] != f_fss_eol_s.string[0]) {
if (state.interrupt) {
#endif // !defined(_di_fl_fss_basic_object_read_) || !defined(_di_fl_fss_extended_object_read_)
#if !defined(_di_fl_fss_basic_object_write_) || !defined(_di_fl_fss_extended_object_write_) || !defined(_di_fl_fss_extended_content_write_)
- f_status_t private_fl_fss_basic_write(const bool object_as, const f_string_static_t object, const f_fss_quote_t quoted, f_state_t state, f_string_range_t *range, f_string_dynamic_t *destination) {
+ f_status_t private_fl_fss_basic_write(const bool object_as, const f_string_static_t object, const uint8_t quote, f_state_t state, f_string_range_t *range, f_string_dynamic_t *destination) {
f_status_t status = f_fss_skip_past_space(state, object, range);
if (F_status_is_error(status)) return status;
f_array_length_t item_total = 0;
f_array_length_t i = 0;
- const f_char_t quote_char = quoted == f_fss_quote_type_double_e ? f_string_ascii_quote_double_s.string[0] : f_string_ascii_quote_single_s.string[0];
+ const f_char_t quote_char = quote ? quote : f_string_ascii_quote_double_s.string[0];
// Use placeholders for potential quote and potential delimited quote to avoid doing things such as memmove().
- destination->string[destination->used++] = f_fss_delimit_placeholder_s.string[0];
- destination->string[destination->used++] = f_fss_delimit_placeholder_s.string[0];
+ destination->string[destination->used++] = f_fss_placeholder_s.string[0];
+ destination->string[destination->used++] = f_fss_placeholder_s.string[0];
- // If there is an initial quote, then this must be quoted and the existing quote must be delimited.
+ // If there is an initial quote, then this must be quote and the existing quote must be delimited.
if (object.string[input_start] == quote_char) {
quoted_is = F_true;
}
}
}
- if (object.string[range->start] == f_fss_delimit_slash_s.string[0]) {
+ if (object.string[range->start] == f_fss_slash_s.string[0]) {
item_first = range->start++;
item_total = 1;
}
}
- if (object.string[range->start] == f_fss_delimit_slash_s.string[0]) {
+ if (object.string[range->start] == f_fss_slash_s.string[0]) {
++item_total;
}
- else if (object.string[range->start] != f_fss_delimit_placeholder_s.string[0]) {
+ else if (object.string[range->start] != f_fss_placeholder_s.string[0]) {
break;
}
} // for
if (range->start > range->stop || range->start >= object.used) {
- // Slashes before the final quote must be escaped when quoted, add the delimit slashes.
+ // Slashes before the final quote must be escaped when quote, add the delimit slashes.
if (quoted_is) {
// If this is the first quote, then only a single delimit slash is needed.
status = f_string_dynamic_increase(state.step_large, destination);
if (F_status_is_error(status)) break;
- destination->string[destination->used++] = f_fss_delimit_slash_s.string[0];
+ destination->string[destination->used++] = f_fss_slash_s.string[0];
}
else {
status = f_string_dynamic_increase_by(item_total, destination);
if (F_status_is_error(status)) break;
for (i = 0; i < item_total; ++i) {
- destination->string[destination->used++] = f_fss_delimit_slash_s.string[0];
+ destination->string[destination->used++] = f_fss_slash_s.string[0];
} // for
}
}
if (F_status_is_error(status)) break;
for (i = 0; i < item_total; ++i) {
- destination->string[destination->used++] = f_fss_delimit_slash_s.string[0];
+ destination->string[destination->used++] = f_fss_slash_s.string[0];
} // for
break;
if (F_status_is_error(status)) break;
for (i = 0; i < item_total; ++i) {
- destination->string[destination->used++] = f_fss_delimit_slash_s.string[0];
+ destination->string[destination->used++] = f_fss_slash_s.string[0];
} // for
destination->string[destination->used++] = quote_char;
break;
}
- // if any space is found after a quote after a slash, then this must be delimited and quoted.
+ // if any space is found after a quote after a slash, then this must be delimited and quote.
status = f_fss_is_space(state, object, *range);
if (F_status_is_error(status)) break;
status = f_string_dynamic_increase(state.step_large, destination);
if (F_status_is_error(status)) break;
- destination->string[destination->used++] = f_fss_delimit_slash_s.string[0];
+ destination->string[destination->used++] = f_fss_slash_s.string[0];
}
else {
status = f_string_dynamic_increase_by(item_total, destination);
if (F_status_is_error(status)) break;
for (i = 0; i < item_total; ++i) {
- destination->string[destination->used++] = f_fss_delimit_slash_s.string[0];
+ destination->string[destination->used++] = f_fss_slash_s.string[0];
} // for
}
}
if (F_status_is_error(status)) break;
for (i = 0; i < item_total; ++i) {
- destination->string[destination->used++] = f_fss_delimit_slash_s.string[0];
+ destination->string[destination->used++] = f_fss_slash_s.string[0];
} // for
destination->string[destination->used++] = quote_char;
}
else if (object_as && object.string[range->start] == f_fss_comment_s.string[0]) {
- // Only the first slash needs to be escaped for a comment, and then only if not quoted.
+ // Only the first slash needs to be escaped for a comment, and then only if not quote.
if (item_first == input_start) {
commented = F_true;
}
if (F_status_is_error(status)) break;
for (i = 0; i < item_total; ++i) {
- destination->string[destination->used++] = f_fss_delimit_slash_s.string[0];
+ destination->string[destination->used++] = f_fss_slash_s.string[0];
} // for
destination->string[destination->used++] = object.string[range->start++];
}
else {
- // If any space is found, then this must be quoted.
+ // If any space is found, then this must be quote.
status = f_fss_is_space(state, object, *range);
if (F_status_is_error(status)) break;
// There is nothing to delimit, so all slashes should be printed as is.
for (i = 0; i < item_total; ++i) {
- destination->string[destination->used++] = f_fss_delimit_slash_s.string[0];
+ destination->string[destination->used++] = f_fss_slash_s.string[0];
} // for
status = f_string_dynamic_increase_by(width, destination);
status = f_string_dynamic_increase(state.step_large, destination);
if (F_status_is_error(status)) break;
- destination->string[used_start + 1] = f_fss_delimit_slash_s.string[0];
+ destination->string[used_start + 1] = f_fss_slash_s.string[0];
}
status = f_fss_skip_past_delimit(state, object, range);
continue;
}
- // If any space is found, then this must be quoted.
+ // If any space is found, then this must be quote.
status = f_fss_is_space(state, object, *range);
if (F_status_is_error(status)) break;
status = f_string_dynamic_increase(state.step_large, destination);
if (F_status_is_error(status)) break;
- destination->string[destination->used++] = f_fss_delimit_slash_s.string[0];
+ destination->string[destination->used++] = f_fss_slash_s.string[0];
}
quoted_is = F_true;
break;
}
- else if (object.string[range->start] != f_fss_delimit_placeholder_s.string[0]) {
+ else if (object.string[range->start] != f_fss_placeholder_s.string[0]) {
if (!quoted_is) {
status = f_fss_is_space(state, object, *range);
if (F_status_is_error(status)) break;
}
}
- if (object.string[i] != f_fss_delimit_placeholder_s.string[0]) break;
+ if (object.string[i] != f_fss_placeholder_s.string[0]) break;
} // for
// Only when followed by a space must the start quote be delimited.
}
}
else {
- destination->string[used_start + 1] = f_fss_delimit_placeholder_s.string[0];
+ destination->string[used_start + 1] = f_fss_placeholder_s.string[0];
}
}
}
}
else if (commented) {
- destination->string[used_start] = f_fss_delimit_slash_s.string[0];
+ destination->string[used_start] = f_fss_slash_s.string[0];
}
if (range->start > range->stop) {
#endif // !defined(_di_fl_fss_basic_object_write_) || !defined(_di_fl_fss_extended_object_write_) || !defined(_di_fl_fss_extended_content_write_)
#if !defined(_di_fl_fss_basic_object_write_) || !defined(_di_fl_fss_extended_object_write_)
- f_status_t private_fl_fss_basic_write_object_trim(const f_fss_quote_t quoted, const f_array_length_t used_start, f_state_t state, f_string_dynamic_t * const destination) {
+ f_status_t private_fl_fss_basic_write_object_trim(const uint8_t quote, const f_array_length_t used_start, f_state_t state, f_string_dynamic_t * const destination) {
f_status_t status = F_none;
f_string_range_t destination_range = macro_f_string_range_t_initialize2(destination->used);
f_array_length_t i = 0;
uint8_t width = 0;
- const f_char_t quote_char = quoted == f_fss_quote_type_double_e ? f_string_ascii_quote_double_s.string[0] : f_string_ascii_quote_single_s.string[0];
+ const f_char_t quote_char = quote ? quote : f_string_ascii_quote_double_s.string[0];
- // If there are any spaces, then this will be quoted so find the first non-placeholder character.
+ // If there are any spaces, then this will be quote so find the first non-placeholder character.
for (; destination_range.start < destination->used; ++destination_range.start) {
if (state.interrupt) {
}
}
- if (destination->string[destination_range.start] != f_fss_delimit_placeholder_s.string[0]) break;
+ if (destination->string[destination_range.start] != f_fss_placeholder_s.string[0]) break;
} // for
if (destination->string[destination_range.start] == quote_char) {
}
}
- if (destination->string[destination_range.start] == f_fss_delimit_placeholder_s.string[0]) continue;
+ if (destination->string[destination_range.start] == f_fss_placeholder_s.string[0]) continue;
status = f_fss_is_space(state, *destination, destination_range);
width = macro_f_utf_byte_width(destination->string[destination_range.start]);
for (i = 0; i < width; ++i) {
- destination->string[destination_range.start + i] = f_fss_delimit_placeholder_s.string[0];
+ destination->string[destination_range.start + i] = f_fss_placeholder_s.string[0];
} // for
} // for
}
}
- if (destination->string[destination_range.start] == f_fss_delimit_placeholder_s.string[0]) continue;
+ if (destination->string[destination_range.start] == f_fss_placeholder_s.string[0]) continue;
status = f_fss_is_space(state, *destination, destination_range);
width = macro_f_utf_byte_width(destination->string[destination_range.start]);
for (i = 0; i < width; ++i) {
- destination->string[destination_range.start + i] = f_fss_delimit_placeholder_s.string[0];
+ destination->string[destination_range.start + i] = f_fss_placeholder_s.string[0];
} // for
} // for
} // for
if (destination_range.start == rear) {
- destination->string[front] = f_fss_delimit_placeholder_s.string[0];
- destination->string[rear] = f_fss_delimit_placeholder_s.string[0];
+ destination->string[front] = f_fss_placeholder_s.string[0];
+ destination->string[rear] = f_fss_placeholder_s.string[0];
}
}
* A start location past the stop location or buffer used means that the entire range was processed.
* @param found
* A set of all locations where a valid object was found.
- * @param quoted
- * This will store whether or not this object is quoted and what quote is in use.
+ * @param quote
+ * This will store the quote character to use (if value is 0, then there is not quote).
* Set pointer address to 0 to not use.
* @param delimits
* An array of delimits detected during processing.
* @see fl_fss_extended_content_read()
*/
#if !defined(_di_fl_fss_basic_object_read_) || !defined(_di_fl_fss_extended_object_read_) || !defined(_di_fl_fss_extended_content_read_)
- extern f_status_t private_fl_fss_basic_read(const f_string_static_t buffer, const bool object_as, f_state_t state, f_string_range_t * const range, f_fss_object_t * const found, f_fss_quote_t * const quoted, f_fss_delimits_t * const delimits) F_attribute_visibility_internal_d;
+ extern f_status_t private_fl_fss_basic_read(const f_string_static_t buffer, const bool object_as, f_state_t state, f_string_range_t * const range, f_fss_object_t * const found, uint8_t * const quote, f_fss_delimits_t * const delimits) F_attribute_visibility_internal_d;
#endif // !defined(_di_fl_fss_basic_object_read_) || !defined(_di_fl_fss_extended_object_read_) || !defined(_di_fl_fss_extended_content_read_)
/**
* As Content, this does nothing special in regards to a leading '#'.
* @param object
* The string to write as (does not stop at NULLS, they are ignored and not written).
- * @param quoted
- * If 0, then double quotes are auto-inserted, if needed.
- * Otherwise, this is the type of quote to wrap the object in when writing.
+ * @param quote
+ * If 0, then double quotes are auto-inserted, when required.
+ * Otherwise, this is quote character to wrap the object in when writing.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no print_error().
* @see fl_fss_extended_content_write()
*/
#if !defined(fl_fss_basic_object_write) || !defined(fl_fss_extended_object_write) || !defined(_di_fl_fss_extended_content_write_)
- extern f_status_t private_fl_fss_basic_write(const bool object_as, const f_string_static_t object, const f_fss_quote_t quoted, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination) F_attribute_visibility_internal_d;
+ extern f_status_t private_fl_fss_basic_write(const bool object_as, const f_string_static_t object, const uint8_t quote, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination) F_attribute_visibility_internal_d;
#endif // !defined(fl_fss_basic_object_write) || !defined(fl_fss_extended_object_write) || !defined(_di_fl_fss_extended_content_write_)
/**
* Trim a given object used by the basic and extended object write functions.
*
- * @param quoted
+ * @param quote
* If 0, then double quotes are auto-inserted, when required.
- * Otherwise, this is the type of quote to wrap the object in when writing.
+ * Otherwise, this is quote character to wrap the object in when writing.
* @param used_start
* The destination.used value before any operations were perfomed.
* @param state
* @see fl_fss_extended_object_write()
*/
#if !defined(_di_fl_fss_basic_object_write_) || !defined(_di_fl_fss_extended_object_write_)
- extern f_status_t private_fl_fss_basic_write_object_trim(const f_fss_quote_t quoted, const f_array_length_t used_start, f_state_t state, f_string_dynamic_t * const destination) F_attribute_visibility_internal_d;
+ extern f_status_t private_fl_fss_basic_write_object_trim(const uint8_t quote, const f_array_length_t used_start, f_state_t state, f_string_dynamic_t * const destination) F_attribute_visibility_internal_d;
#endif // !defined(_di_fl_fss_basic_object_write_) || !defined(_di_fl_fss_extended_object_write_)
#ifdef __cplusplus
#endif
#ifndef _di_fll_fss_basic_read_
- f_status_t fll_fss_basic_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_objects_t * const objects, f_fss_contents_t * const contents, f_fss_quotes_t * const objects_quoted, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits) {
+ f_status_t fll_fss_basic_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_objects_t * const objects, f_fss_contents_t * const contents, f_uint8s_t * const objects_quoted, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits) {
#ifndef _di_level_2_parameter_checking_
if (!range) return F_status_set_error(F_parameter);
if (!objects) return F_status_set_error(F_parameter);
bool found_data = F_false;
- f_fss_quote_t *quoted_object = 0;
+ uint8_t *quoted_object = 0;
do {
status = f_string_ranges_increase(state.step_small, objects);
#endif // _di_fll_fss_basic_read_
#ifndef _di_fll_fss_basic_write_
- f_status_t fll_fss_basic_write(const f_string_static_t object, const f_string_static_t content, const f_fss_quote_t quote, f_state_t state, f_string_dynamic_t * const destination) {
+ f_status_t fll_fss_basic_write(const f_string_static_t object, const f_string_static_t content, const uint8_t quote, f_state_t state, f_string_dynamic_t * const destination) {
#ifndef _di_level_2_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
* @see fl_fss_basic_object_read()
*/
#ifndef _di_fll_fss_basic_read_
- extern f_status_t fll_fss_basic_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_objects_t * const objects, f_fss_contents_t * const contents, f_fss_quotes_t * const objects_quoted, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits);
+ extern f_status_t fll_fss_basic_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_objects_t * const objects, f_fss_contents_t * const contents, f_uint8s_t * const objects_quoted, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits);
#endif // _di_fll_fss_basic_read_
/**
* A string representing the content.
* @param quote
* If 0, then double quotes are auto-inserted, when required.
- * Otherwise, this is the type of quote to wrap the object in when writing.
+ * Otherwise, this is quote character to wrap the object in when writing.
* @param state
A state for providing flags and handling interrupts during long running operations.
* There is no print_error().
* @see fl_fss_basic_object_write()
*/
#ifndef _di_fll_fss_basic_write_
- extern f_status_t fll_fss_basic_write(const f_string_static_t object, const f_string_static_t content, const f_fss_quote_t quote, f_state_t state, f_string_dynamic_t * const destination);
+ extern f_status_t fll_fss_basic_write(const f_string_static_t object, const f_string_static_t content, const uint8_t quote, f_state_t state, f_string_dynamic_t * const destination);
#endif // _di_fll_fss_basic_write_
#ifdef __cplusplus
#endif
#ifndef _di_fll_fss_extended_read_
- f_status_t fll_fss_extended_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_objects_t * const objects, f_fss_contents_t * const contents, f_fss_quotes_t * const objects_quoted, f_fss_quotess_t * const contents_quoted, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits) {
+ f_status_t fll_fss_extended_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_objects_t * const objects, f_fss_contents_t * const contents, f_uint8s_t * const objects_quoted, f_uint8ss_t * const contents_quoted, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits) {
#ifndef _di_level_2_parameter_checking_
if (!range) return F_status_set_error(F_parameter);
if (!objects) return F_status_set_error(F_parameter);
bool found_data = F_false;
- f_fss_quote_t *quoted_object = 0;
- f_fss_quotes_t *quoted_content = 0;
+ uint8_t *quoted_object = 0;
+ f_uint8s_t *quoted_content = 0;
do {
status = f_string_ranges_increase(state.step_small, objects);
#endif // _di_fll_fss_extended_read_
#ifndef _di_fll_fss_extended_write_
- f_status_t fll_fss_extended_write(const f_string_static_t object, const f_string_statics_t contents, const f_fss_quote_t quote, f_state_t state, f_string_dynamic_t * const destination) {
+ f_status_t fll_fss_extended_write(const f_string_static_t object, const f_string_statics_t contents, const uint8_t quote, f_state_t state, f_string_dynamic_t * const destination) {
#ifndef _di_level_2_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
* @see fl_fss_extended_object_read()
*/
#ifndef _di_fll_fss_extended_read_
- extern f_status_t fll_fss_extended_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_objects_t * const objects, f_fss_contents_t * const contents, f_fss_quotes_t * const objects_quoted, f_fss_quotess_t * const contents_quoted, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits);
+ extern f_status_t fll_fss_extended_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_objects_t * const objects, f_fss_contents_t * const contents, f_uint8s_t * const objects_quoted, f_uint8ss_t * const contents_quoted, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits);
#endif // _di_fll_fss_extended_read_
/**
* An array of strings representing multiple content to write.
* @param quote
* If 0, then double quotes are auto-inserted, when required.
- * Otherwise, this is the type of quote to wrap the object in when writing.
+ * Otherwise, this is quote character to wrap the object in when writing.
* @param state
A state for providing flags and handling interrupts during long running operations.
* There is no print_error().
* @see fl_fss_extended_object_write()
*/
#ifndef _di_fll_fss_extended_write_
- extern f_status_t fll_fss_extended_write(const f_string_static_t object, const f_string_statics_t contents, const f_fss_quote_t quote, f_state_t state, f_string_dynamic_t * const destination);
+ extern f_status_t fll_fss_extended_write(const f_string_static_t object, const f_string_statics_t contents, const uint8_t quote, f_state_t state, f_string_dynamic_t * const destination);
#endif // _di_fll_fss_extended_write_
#ifdef __cplusplus
#endif // _di_fake_make_operate_
#ifndef _di_fake_make_operate_expand_
- void fake_make_operate_expand(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_fss_content_t content, const f_fss_quotes_t quotes, f_status_t * const status) {
+ void fake_make_operate_expand(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_fss_content_t content, const f_uint8s_t quotes, f_status_t * const status) {
if (F_status_is_error(*status)) return;
if (!content.used) return;
#endif // _di_fake_make_operate_expand_
#ifndef _di_fake_make_operate_expand_build_
- f_status_t fake_make_operate_expand_build(fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name) {
+ f_status_t fake_make_operate_expand_build(fake_make_data_t * const data_make, const uint8_t quote, const f_string_range_t range_name) {
f_status_t status = F_none;
f_string_dynamic_t value = f_string_dynamic_t_initialize;
return F_false;
}
- if (quoted) {
+ if (quote) {
status = f_string_dynamic_append_nulless(value, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
}
else {
#endif // _di_fake_make_operate_expand_build_
#ifndef _di_fake_make_operate_expand_context_
- f_status_t fake_make_operate_expand_context(fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name) {
+ f_status_t fake_make_operate_expand_context(fake_make_data_t * const data_make, const uint8_t quote, const f_string_range_t range_name) {
f_status_t status = F_none;
const f_string_static_t *context = 0;
} // for
if (context) {
- if (quoted) {
+ if (quote) {
status = f_string_dynamic_append_nulless(*context, &data_make->cache_arguments.array[data_make->cache_arguments.used]);
}
else {
#endif // _di_fake_make_operate_expand_context_
#ifndef _di_fake_make_operate_expand_environment_
- f_status_t fake_make_operate_expand_environment(fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name) {
+ f_status_t fake_make_operate_expand_environment(fake_make_data_t * const data_make, const uint8_t quote, const f_string_range_t range_name) {
f_status_t status = F_none;
if (F_status_is_error(status)) return status;
- if (!quoted) {
+ if (!quote) {
++data_make->cache_arguments.used;
}
* The section name.
* @param content
* The content array.
- * @param quoteds
- * The array of quoted associated with the content.
+ * @param quotes
+ * The array of quotes associated with the content.
* @param status
* The return status.
*
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_make_operate_expand_
- extern void fake_make_operate_expand(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_fss_content_t content, const f_fss_quotes_t quoteds, f_status_t * const status) F_attribute_visibility_internal_d;
+ extern void fake_make_operate_expand(fake_make_data_t * const data_make, const f_string_range_t section_name, const f_fss_content_t content, const f_uint8s_t quotes, f_status_t * const status) F_attribute_visibility_internal_d;
#endif // _di_fake_make_operate_expand_
/**
*
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
- * @param quoted
- * The quoted associated with the content.
+ * @param quote
+ * The quote associated with the content.
* @param range_name
* The range representing the variable content name string within the data_make->buffer.
*
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_make_operate_expand_context_
- extern f_status_t fake_make_operate_expand_context(fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name) F_attribute_visibility_internal_d;
+ extern f_status_t fake_make_operate_expand_context(fake_make_data_t * const data_make, const uint8_t quote, const f_string_range_t range_name) F_attribute_visibility_internal_d;
#endif // _di_fake_make_operate_expand_context_
/**
*
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
- * @param quoted
- * The quoted associated with the content.
+ * @param quote
+ * The quote associated with the content.
* @param range_name
* The range representing the variable content name string within the data_make->buffer.
*
* @see f_string_dynamics_increase()
*/
#ifndef _di_fake_make_operate_expand_environment_
- extern f_status_t fake_make_operate_expand_environment(fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name) F_attribute_visibility_internal_d;
+ extern f_status_t fake_make_operate_expand_environment(fake_make_data_t * const data_make, const uint8_t quote, const f_string_range_t range_name) F_attribute_visibility_internal_d;
#endif // _di_fake_make_operate_expand_environment_
/**
*
* @param data_make
* All make related setting data, including data from the fakefile and the build settings file.
- * @param quoted
- * The quoted associated with the content.
+ * @param quote
+ * The quote associated with the content.
* @param range_name
* The range representing the variable content name string within the data_make->buffer.
*
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_make_operate_expand_build_
- extern f_status_t fake_make_operate_expand_build(fake_make_data_t * const data_make, const f_fss_quote_t quoted, const f_string_range_t range_name) F_attribute_visibility_internal_d;
+ extern f_status_t fake_make_operate_expand_build(fake_make_data_t * const data_make, const uint8_t quote, const f_string_range_t range_name) F_attribute_visibility_internal_d;
#endif // _di_fake_make_operate_expand_build_
/**
// Copy the string character by character, ignoring placeholders.
for (j = local->chain_objects.array[i].start; j <= local->chain_objects.array[i].stop; ++j) {
- if (local->buffer.string[j] == f_fss_delimit_placeholder_s.string[0]) continue;
+ if (local->buffer.string[j] == f_fss_placeholder_s.string[0]) continue;
data->chains.array[data->chains.used].string[data->chains.array[data->chains.used].used++] = local->buffer.string[j];
arguments.array[1].string[arguments.array[1].used++] = local->buffer.string[j];
f_fss_delimits_t delimits_object;
f_fss_delimits_t delimits_content;
f_fss_comments_t comments;
- f_fss_quotes_t quotes;
+ f_uint8s_t quotes;
} fss_basic_list_read_data_t;
#define fss_basic_list_read_data_t_initialize \
f_fss_contents_t_initialize, \
f_fss_delimits_t_initialize, \
f_fss_delimits_t_initialize, \
- f_fss_quotes_t_initialize, \
+ f_uint8s_t_initialize, \
f_fss_comments_t_initialize, \
}
#endif // _di_fss_basic_list_read_data_t_
}
}
- f_fss_quote_t quoted = f_fss_quote_type_double_e;
+ uint8_t quote = f_fss_quote_double_s;
if (F_status_is_error_not(status)) {
if (main->parameters.array[fss_basic_list_write_parameter_double_e].result & f_console_result_found_e) {
if (main->parameters.array[fss_basic_list_write_parameter_single_e].result & f_console_result_found_e) {
if (main->parameters.array[fss_basic_list_write_parameter_double_e].location < main->parameters.array[fss_basic_list_write_parameter_single_e].location) {
- quoted = f_fss_quote_type_single_e;
+ quote = f_fss_quote_single_s;
}
}
}
else if (main->parameters.array[fss_basic_list_write_parameter_single_e].result & f_console_result_found_e) {
- quoted = f_fss_quote_type_single_e;
+ quote = f_fss_quote_single_s;
}
}
if (F_status_is_error_not(status)) {
if (main->pipe & fll_program_data_pipe_input_e) {
- status = fss_basic_list_write_process_pipe(main, output, quoted, &buffer);
+ status = fss_basic_list_write_process_pipe(main, output, quote, &buffer);
if (F_status_is_error(status)) {
if (main->error.verbosity > f_console_verbosity_quiet_e) {
index = main->parameters.array[fss_basic_list_write_parameter_object_e].values.array[i];
- status = fss_basic_list_write_process(main, output, quoted, &argv[index], 0, &buffer);
+ status = fss_basic_list_write_process(main, output, quote, &argv[index], 0, &buffer);
if (F_status_is_error(status)) break;
} // for
}
index = main->parameters.array[fss_basic_list_write_parameter_content_e].values.array[i];
- status = fss_basic_list_write_process(main, output, quoted, 0, &argv[index], &buffer);
+ status = fss_basic_list_write_process(main, output, quote, 0, &argv[index], &buffer);
if (F_status_is_error(status)) break;
} // for
}
index = main->parameters.array[fss_basic_list_write_parameter_object_e].values.array[i];
- status = fss_basic_list_write_process(main, output, quoted, &argv[index], &argv[main->parameters.array[fss_basic_list_write_parameter_content_e].values.array[i]], &buffer);
+ status = fss_basic_list_write_process(main, output, quote, &argv[index], &argv[main->parameters.array[fss_basic_list_write_parameter_content_e].values.array[i]], &buffer);
if (F_status_is_error(status)) break;
} // for
}
#endif // _di_fss_basic_list_write_error_parameter_value_missing_print_
#ifndef _di_fss_basic_list_write_process_
- f_status_t fss_basic_list_write_process(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, f_string_dynamic_t * const buffer) {
+ f_status_t fss_basic_list_write_process(fll_program_data_t * const main, const f_file_t output, const uint8_t quote, const f_string_static_t *object, const f_string_static_t *content, f_string_dynamic_t * const buffer) {
f_status_t status = F_none;
f_state_t state = macro_f_state_t_initialize(fss_basic_list_write_common_allocation_large_d, fss_basic_list_write_common_allocation_small_d, 0, 0, &fll_program_standard_signal_state, 0, (void *) main, 0);
#endif // _di_fss_basic_list_write_process_
#ifndef _di_fss_basic_list_write_process_pipe_
- f_status_t fss_basic_list_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t * const buffer) {
+ f_status_t fss_basic_list_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const uint8_t quote, f_string_dynamic_t * const buffer) {
f_status_t status = F_none;
f_status_t status_pipe = F_none;
* F_failure (with error bit) for any other failure.
*/
#ifndef _di_fss_basic_list_write_process_
- extern f_status_t fss_basic_list_write_process(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, f_string_dynamic_t * const buffer) F_attribute_visibility_internal_d;
+ extern f_status_t fss_basic_list_write_process(fll_program_data_t * const main, const f_file_t output, const uint8_t quote, const f_string_static_t *object, const f_string_static_t *content, f_string_dynamic_t * const buffer) F_attribute_visibility_internal_d;
#endif // _di_fss_basic_list_write_process_
/**
* F_failure (with error bit) for any other failure.
*/
#ifndef _di_fss_basic_list_write_process_pipe_
- extern f_status_t fss_basic_list_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t * const buffer) F_attribute_visibility_internal_d;
+ extern f_status_t fss_basic_list_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const uint8_t quote, f_string_dynamic_t * const buffer) F_attribute_visibility_internal_d;
#endif // _di_fss_basic_list_write_process_pipe_
#ifdef __cplusplus
macro_f_fss_contents_t_delete_simple(data->contents);
macro_f_fss_objects_t_delete_simple(data->objects);
macro_f_fss_delimits_t_delete_simple(data->delimits);
- macro_f_fss_quotes_t_delete_simple(data->quotes);
+ macro_f_uint8s_t_delete_simple(data->quotes);
}
#endif // _di_fss_basic_read_data_delete_simple_
f_fss_objects_t objects;
f_fss_contents_t contents;
f_fss_delimits_t delimits;
- f_fss_quotes_t quotes;
+ f_uint8s_t quotes;
} fss_basic_read_data_t;
#define fss_basic_read_data_t_initialize \
f_fss_objects_t_initialize, \
f_fss_contents_t_initialize, \
f_fss_delimits_t_initialize, \
- f_fss_quotes_t_initialize, \
+ f_uint8s_t_initialize, \
}
#endif // _di_fss_basic_read_data_t_
if (data->option & fss_basic_read_data_option_trim_d) {
if (data->option & fss_basic_read_data_option_original_d) {
if (data->quotes.array[at]) {
- f_print_dynamic_raw(data->quotes.array[at] == f_fss_quote_type_single_e ? f_fss_quote_single_s : f_fss_quote_double_s, main->output.to);
+ f_print_dynamic_raw(
+ data->quotes.array[at] == f_fss_quote_type_single_e
+ ? f_fss_quote_single_s
+ : data->quotes.array[at] == f_fss_quote_type_backtick_e
+ ? f_fss_quote_backtick_s,
+ : f_fss_quote_double_s,
+ main->output.to
+ );
}
fl_print_trim_dynamic_partial(data->buffer, data->objects.array[at], main->output.to);
if (data->quotes.array[at]) {
- f_print_dynamic_raw(data->quotes.array[at] == f_fss_quote_type_single_e ? f_fss_quote_single_s : f_fss_quote_double_s, main->output.to);
+ f_print_dynamic_raw(
+ data->quotes.array[at] == f_fss_quote_type_single_e
+ ? f_fss_quote_single_s
+ : data->quotes.array[at] == f_fss_quote_type_backtick_e
+ ? f_fss_quote_backtick_s,
+ : f_fss_quote_double_s,
+ main->output.to
+ );
}
}
else {
else {
if (data->option & fss_basic_read_data_option_original_d) {
if (data->quotes.array[at]) {
- f_print_dynamic_raw(data->quotes.array[at] == f_fss_quote_type_single_e ? f_fss_quote_single_s : f_fss_quote_double_s, main->output.to);
+ f_print_dynamic_raw(
+ data->quotes.array[at] == f_fss_quote_type_single_e
+ ? f_fss_quote_single_s
+ : data->quotes.array[at] == f_fss_quote_type_backtick_e
+ ? f_fss_quote_backtick_s,
+ : f_fss_quote_double_s,
+ main->output.to
+ );
}
f_print_dynamic_partial(data->buffer, data->objects.array[at], main->output.to);
if (data->quotes.array[at]) {
- f_print_dynamic_raw(data->quotes.array[at] == f_fss_quote_type_single_e ? f_fss_quote_single_s : f_fss_quote_double_s, main->output.to);
+ f_print_dynamic_raw(
+ data->quotes.array[at] == f_fss_quote_type_single_e
+ ? f_fss_quote_single_s
+ : data->quotes.array[at] == f_fss_quote_type_backtick_e
+ ? f_fss_quote_backtick_s,
+ : f_fss_quote_double_s,
+ main->output.to
+ );
}
}
else {
}
}
- f_fss_quote_t quote = f_fss_quote_type_double_e;
+ uint8_t quote = f_fss_quote_double_s;
if (F_status_is_error_not(status)) {
if (main->parameters.array[fss_basic_write_parameter_double_e].result & f_console_result_found_e) {
if (main->parameters.array[fss_basic_write_parameter_single_e].result & f_console_result_found_e) {
if (main->parameters.array[fss_basic_write_parameter_double_e].location < main->parameters.array[fss_basic_write_parameter_single_e].location) {
- quote = f_fss_quote_type_single_e;
+ quote = f_fss_quote_single_s;
}
}
}
else if (main->parameters.array[fss_basic_write_parameter_single_e].result & f_console_result_found_e) {
- quote = f_fss_quote_type_single_e;
+ quote = f_fss_quote_single_s;
}
}
#endif // _di_fss_basic_write_error_parameter_unsupported_eol_print_
#ifndef _di_fss_basic_write_process_
- f_status_t fss_basic_write_process(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, f_string_dynamic_t *buffer) {
+ f_status_t fss_basic_write_process(fll_program_data_t * const main, const f_file_t output, const uint8_t quote, const f_string_static_t *object, const f_string_static_t *content, f_string_dynamic_t *buffer) {
f_status_t status = F_none;
f_state_t state = macro_f_state_t_initialize(fss_basic_write_common_allocation_large_d, fss_basic_write_common_allocation_small_d, 0, 0, &fll_program_standard_signal_state, 0, (void *) main, 0);
#endif // _di_fss_basic_write_process_
#ifndef _di_fss_basic_write_process_pipe_
- f_status_t fss_basic_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer) {
+ f_status_t fss_basic_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const uint8_t quote, f_string_dynamic_t *buffer) {
f_status_t status = F_none;
f_status_t status_pipe = F_none;
* F_failure (with error bit) for any other failure.
*/
#ifndef _di_fss_basic_write_process_
- extern f_status_t fss_basic_write_process(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
+ extern f_status_t fss_basic_write_process(fll_program_data_t * const main, const f_file_t output, const uint8_t quote, const f_string_static_t *object, const f_string_static_t *content, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
#endif // _di_fss_basic_write_process_
/**
* F_failure (with error bit) for any other failure.
*/
#ifndef _di_fss_basic_write_process_pipe_
- extern f_status_t fss_basic_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
+ extern f_status_t fss_basic_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const uint8_t quote, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
#endif // _di_fss_basic_write_process_pipe_
#ifdef __cplusplus
for (; i < comments->used; ++i) {
for (j = comments->array[i].start; j <= comments->array[i].stop; ++j) {
- data->buffer.string[j] = f_fss_delimit_placeholder_s.string[0];
+ data->buffer.string[j] = f_fss_placeholder_s.string[0];
} // for
} // for
}
}
}
- f_fss_quote_t quote = f_fss_quote_type_double_e;
+ uint8_t quote = f_fss_quote_double_s;
if (F_status_is_error_not(status)) {
if (main->parameters.array[fss_embedded_list_write_parameter_double_e].result & f_console_result_found_e) {
if (main->parameters.array[fss_embedded_list_write_parameter_single_e].result & f_console_result_found_e) {
if (main->parameters.array[fss_embedded_list_write_parameter_double_e].location < main->parameters.array[fss_embedded_list_write_parameter_single_e].location) {
- quote = f_fss_quote_type_single_e;
+ quote = f_fss_quote_single_s;
}
}
}
else if (main->parameters.array[fss_embedded_list_write_parameter_single_e].result & f_console_result_found_e) {
- quote = f_fss_quote_type_single_e;
+ quote = f_fss_quote_single_s;
}
}
#endif // _di_fss_embedded_list_write_error_parameter_value_missing_print_
#ifndef _di_fss_embedded_list_write_process_
- f_status_t fss_embedded_list_write_process(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, const f_string_ranges_t *ignore, f_string_dynamic_t *buffer) {
+ f_status_t fss_embedded_list_write_process(fll_program_data_t * const main, const f_file_t output, const uint8_t quote, const f_string_static_t *object, const f_string_static_t *content, const f_string_ranges_t *ignore, f_string_dynamic_t *buffer) {
f_status_t status = F_none;
f_state_t state = macro_f_state_t_initialize(fss_embedded_list_write_common_allocation_large_d, fss_embedded_list_write_common_allocation_small_d, 0, 0, &fll_program_standard_signal_state, 0, (void *) main, 0);
#endif // _di_fss_embedded_list_write_process_
#ifndef _di_fss_embedded_list_write_process_pipe_
- f_status_t fss_embedded_list_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer, f_string_ranges_t *ignore) {
+ f_status_t fss_embedded_list_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const uint8_t quote, f_string_dynamic_t *buffer, f_string_ranges_t *ignore) {
f_status_t status = F_none;
f_status_t status_pipe = F_none;
* F_failure (with error bit) for any other failure.
*/
#ifndef _di_fss_embedded_list_write_process_
- extern f_status_t fss_embedded_list_write_process(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, const f_string_ranges_t *ignore, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
+ extern f_status_t fss_embedded_list_write_process(fll_program_data_t * const main, const f_file_t output, const uint8_t quote, const f_string_static_t *object, const f_string_static_t *content, const f_string_ranges_t *ignore, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
#endif // _di_fss_embedded_list_write_process_
/**
* F_failure (with error bit) for any other failure.
*/
#ifndef _di_fss_embedded_list_write_process_pipe_
- extern f_status_t fss_embedded_list_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer, f_string_ranges_t *ignore) F_attribute_visibility_internal_d;
+ extern f_status_t fss_embedded_list_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const uint8_t quote, f_string_dynamic_t *buffer, f_string_ranges_t *ignore) F_attribute_visibility_internal_d;
#endif // _di_fss_embedded_list_write_process_pipe_
/**
f_fss_contents_t contents;
f_fss_delimits_t delimits_object;
f_fss_delimits_t delimits_content;
- f_fss_quotes_t quotes;
+ f_uint8s_t quotes;
f_fss_comments_t comments;
} fss_extended_list_read_data_t;
f_fss_contents_t_initialize, \
f_fss_delimits_t_initialize, \
f_fss_delimits_t_initialize, \
- f_fss_quotes_t_initialize, \
+ f_uint8s_t_initialize, \
f_fss_comments_t_initialize, \
}
#endif // _di_fss_extended_list_read_data_t_
while (k >= data->contents.array[i].array[0].start) {
- if (data->buffer.string[k] == f_fss_delimit_placeholder_s.string[0]) {
+ if (data->buffer.string[k] == f_fss_placeholder_s.string[0]) {
--k;
continue;
}
}
- f_fss_quote_t quote = f_fss_quote_type_double_e;
+ uint8_t quote = f_fss_quote_double_s;
if (F_status_is_error_not(status)) {
if (main->parameters.array[fss_extended_list_write_parameter_double_e].result & f_console_result_found_e) {
if (main->parameters.array[fss_extended_list_write_parameter_single_e].result & f_console_result_found_e) {
if (main->parameters.array[fss_extended_list_write_parameter_double_e].location < main->parameters.array[fss_extended_list_write_parameter_single_e].location) {
- quote = f_fss_quote_type_single_e;
+ quote = f_fss_quote_single_s;
}
}
}
else if (main->parameters.array[fss_extended_list_write_parameter_single_e].result & f_console_result_found_e) {
- quote = f_fss_quote_type_single_e;
+ quote = f_fss_quote_single_s;
}
}
#endif // _di_fss_extended_list_write_error_parameter_value_missing_print_
#ifndef _di_fss_extended_list_write_process_
- f_status_t fss_extended_list_write_process(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, const f_string_ranges_t *ignore, f_string_dynamic_t *buffer) {
+ f_status_t fss_extended_list_write_process(fll_program_data_t * const main, const f_file_t output, const uint8_t quote, const f_string_static_t *object, const f_string_static_t *content, const f_string_ranges_t *ignore, f_string_dynamic_t *buffer) {
f_status_t status = F_none;
f_state_t state = macro_f_state_t_initialize(fss_extended_list_write_common_allocation_large_d, fss_extended_list_write_common_allocation_small_d, 0, 0, &fll_program_standard_signal_state, 0, (void *) main, 0);
#endif // _di_fss_extended_list_write_process_
#ifndef _di_fss_extended_list_write_process_pipe_
- f_status_t fss_extended_list_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer, f_string_ranges_t *ignore) {
+ f_status_t fss_extended_list_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const uint8_t quote, f_string_dynamic_t *buffer, f_string_ranges_t *ignore) {
f_status_t status = F_none;
f_status_t status_pipe = F_none;
* F_failure (with error bit) for any other failure.
*/
#ifndef _di_fss_extended_list_write_process_
- extern f_status_t fss_extended_list_write_process(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_static_t *content, const f_string_ranges_t *ignore, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
+ extern f_status_t fss_extended_list_write_process(fll_program_data_t * const main, const f_file_t output, const uint8_t quote, const f_string_static_t *object, const f_string_static_t *content, const f_string_ranges_t *ignore, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
#endif // _di_fss_extended_list_write_process_
/**
* F_failure (with error bit) for any other failure.
*/
#ifndef _di_fss_extended_list_write_process_pipe_
- extern f_status_t fss_extended_list_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer, f_string_ranges_t *ignore) F_attribute_visibility_internal_d;
+ extern f_status_t fss_extended_list_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const uint8_t quote, f_string_dynamic_t *buffer, f_string_ranges_t *ignore) F_attribute_visibility_internal_d;
#endif // _di_fss_extended_list_write_process_pipe_
/**
macro_f_fss_objects_t_delete_simple(data->objects);
macro_f_fss_delimits_t_delete_simple(data->delimits_object);
macro_f_fss_delimits_t_delete_simple(data->delimits_content);
- macro_f_fss_quotes_t_delete_simple(data->quotes_object);
- macro_f_fss_quotess_t_delete_simple(data->quotes_content);
+ macro_f_uint8s_t_delete_simple(data->quotes_object);
+ macro_f_uint8ss_t_delete_simple(data->quotes_content);
}
#endif // _di_fss_extended_read_data_delete_simple_
f_fss_contents_t contents;
f_fss_delimits_t delimits_object;
f_fss_delimits_t delimits_content;
- f_fss_quotes_t quotes_object;
- f_fss_quotess_t quotes_content;
+ f_uint8s_t quotes_object;
+ f_uint8ss_t quotes_content;
} fss_extended_read_data_t;
#define fss_extended_read_data_t_initialize \
f_fss_contents_t_initialize, \
f_fss_delimits_t_initialize, \
f_fss_delimits_t_initialize, \
- f_fss_quotes_t_initialize, \
- f_fss_quotess_t_initialize, \
+ f_uint8s_t_initialize, \
+ f_uint8ss_t_initialize, \
}
#endif // _di_fss_extended_read_data_t_
if (data->option & fss_extended_read_data_option_object_d) {
if (data->option & fss_extended_read_data_option_trim_d) {
if ((data->option & fss_extended_read_data_option_original_d) && data->quotes_object.array[at]) {
- f_print_dynamic_raw(data->quotes_object.array[at] == f_fss_quote_type_single_e ? f_fss_quote_single_s : f_fss_quote_double_s, main->output.to);
+ f_print_dynamic_raw(
+ data->quotes_object.array[at] == f_fss_quote_type_single_e
+ ? f_fss_quote_single_s
+ : data->quotes_object.array[at] == f_fss_quote_type_backtick_e
+ ? f_fss_quote_backtick_s,
+ : f_fss_quote_double_s,
+ main->output.to
+ );
}
fl_print_trim_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.to);
if ((data->option & fss_extended_read_data_option_original_d) && data->quotes_object.array[at]) {
- f_print_dynamic_raw(data->quotes_object.array[at] == f_fss_quote_type_single_e ? f_fss_quote_single_s : f_fss_quote_double_s, main->output.to);
+ f_print_dynamic_raw(
+ data->quotes_object.array[at] == f_fss_quote_type_single_e
+ ? f_fss_quote_single_s
+ : data->quotes_object.array[at] == f_fss_quote_type_backtick_e
+ ? f_fss_quote_backtick_s,
+ : f_fss_quote_double_s,
+ main->output.to
+ );
}
}
else {
if ((data->option & fss_extended_read_data_option_original_d) && data->quotes_object.array[at]) {
- f_print_dynamic_raw(data->quotes_object.array[at] == f_fss_quote_type_single_e ? f_fss_quote_single_s : f_fss_quote_double_s, main->output.to);
+ f_print_dynamic_raw(
+ data->quotes_object.array[at] == f_fss_quote_type_single_e
+ ? f_fss_quote_single_s
+ : data->quotes_object.array[at] == f_fss_quote_type_backtick_e
+ ? f_fss_quote_backtick_s,
+ : f_fss_quote_double_s,
+ main->output.to
+ );
}
f_print_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.to);
if ((data->option & fss_extended_read_data_option_original_d) && data->quotes_object.array[at]) {
- f_print_dynamic_raw(data->quotes_object.array[at] == f_fss_quote_type_single_e ? f_fss_quote_single_s : f_fss_quote_double_s, main->output.to);
+ f_print_dynamic_raw(
+ data->quotes_object.array[at] == f_fss_quote_type_single_e
+ ? f_fss_quote_single_s
+ : data->quotes_object.array[at] == f_fss_quote_type_backtick_e
+ ? f_fss_quote_backtick_s,
+ : f_fss_quote_double_s,
+ main->output.to
+ );
}
}
content_printed = F_true;
if ((data->option & fss_extended_read_data_option_original_d) && data->quotes_content.array[at].array[data->select]) {
- f_print_dynamic_raw(data->quotes_content.array[at].array[data->select] == f_fss_quote_type_single_e ? f_fss_quote_single_s : f_fss_quote_double_s, main->output.to);
+ data->quotes_content.array[at].array[data->select] == f_fss_quote_type_single_e
+ ? f_fss_quote_single_s
+ : data->quotes_content.array[at].array[data->select] == f_fss_quote_type_backtick_e
+ ? f_fss_quote_backtick_s
+ : f_fss_quote_double_s,
+ main->output.to
+ );
}
f_print_except_dynamic_partial(data->buffer, data->contents.array[at].array[data->select], delimits_content, main->output.to);
if ((data->option & fss_extended_read_data_option_original_d) && data->quotes_content.array[at].array[data->select]) {
- f_print_dynamic_raw(data->quotes_content.array[at].array[data->select] == f_fss_quote_type_single_e ? f_fss_quote_single_s : f_fss_quote_double_s, main->output.to);
+ f_print_dynamic_raw(
+ data->quotes_content.array[at].array[data->select] == f_fss_quote_type_single_e
+ ? f_fss_quote_single_s
+ : data->quotes_content.array[at].array[data->select] == f_fss_quote_type_backtick_e
+ ? f_fss_quote_backtick_s
+ : f_fss_quote_double_s,
+ main->output.to
+ );
}
}
}
content_printed = F_true;
if ((data->option & fss_extended_read_data_option_original_d) && data->quotes_content.array[at].array[i]) {
- f_print_dynamic_raw(data->quotes_content.array[at].array[i] == f_fss_quote_type_single_e ? f_fss_quote_single_s : f_fss_quote_double_s, main->output.to);
+ f_print_dynamic_raw(
+ data->quotes_content.array[at].array[i] == f_fss_quote_type_single_e
+ ? f_fss_quote_single_s
+ : data->quotes_content.array[at].array[i] == f_fss_quote_type_backtick_e
+ ? f_fss_quote_backtick_s,
+ : f_fss_quote_double_s,
+ main->output.to
+ );
}
f_print_except_dynamic_partial(data->buffer, data->contents.array[at].array[i], delimits_content, main->output.to);
if ((data->option & fss_extended_read_data_option_original_d) && data->quotes_content.array[at].array[i]) {
- f_print_dynamic_raw(data->quotes_content.array[at].array[i] == f_fss_quote_type_single_e ? f_fss_quote_single_s : f_fss_quote_double_s, main->output.to);
+ f_print_dynamic_raw(
+ data->quotes_content.array[at].array[i] == f_fss_quote_type_single_e
+ ? f_fss_quote_single_s
+ : data->quotes_content.array[at].array[i] == f_fss_quote_type_backtick_e
+ ? f_fss_quote_backtick_s,
+ : f_fss_quote_double_s,
+ main->output.to
+ );
}
if (i + 1 < data->contents.array[at].used && data->contents.array[at].array[i + 1].start <= data->contents.array[at].array[i + 1].stop) {
}
else {
if ((data->option & fss_extended_read_data_option_original_d) && data->quotes_object.array[at]) {
- f_print_character_safely(data->quotes_object.array[at] == f_fss_quote_type_single_e ? f_fss_quote_single_s.string[0] : f_fss_quote_double_s.string[0], main->output.to);
+ f_print_dynamic_raw(
+ data->quotes_object.array[at] == f_fss_quote_type_single_e
+ ? f_fss_quote_single_s
+ : data->quotes_object.array[at] == f_fss_quote_type_backtick_e
+ ? f_fss_quote_backtick_s
+ : f_fss_quote_double_s,
+ main->output.to
+ );
}
fss_extended_read_print_at(main, i, *delimits_object, *delimits_content, data);
if ((data->option & fss_extended_read_data_option_original_d) && data->quotes_object.array[at]) {
- f_print_character_safely(data->quotes_object.array[at] == f_fss_quote_type_single_e ? f_fss_quote_single_s.string[0] : f_fss_quote_double_s.string[0], main->output.to);
+ f_print_dynamic_raw(
+ data->quotes_object.array[at] == f_fss_quote_type_single_e
+ ? f_fss_quote_single_s
+ : data->quotes_object.array[at] == f_fss_quote_type_backtick_e
+ ? f_fss_quote_backtick_s
+ : f_fss_quote_double_s,
+ main->output.to
+ );
}
}
}
}
else {
if ((data->option & fss_extended_read_data_option_original_d) && data->quotes_content.array[at].array[i]) {
- f_print_character_safely(data->quotes_content.array[at].array[i] == f_fss_quote_type_single_e ? f_fss_quote_single_s.string[0] : f_fss_quote_double_s.string[0], main->output.to);
+ f_print_dynamic_raw(
+ data->quotes_content.array[at].array[i] == f_fss_quote_type_single_e
+ ? f_fss_quote_single_s
+ : data->quotes_content.array[at].array[i] == f_fss_quote_type_backtick_e
+ ? f_fss_quote_backtick_s
+ : f_fss_quote_double_s,
+ main->output.to
+ );
}
fss_extended_read_print_at(main, i, *delimits_object, *delimits_content, data);
if ((data->option & fss_extended_read_data_option_original_d) && data->quotes_content.array[at].array[i]) {
- f_print_character_safely(data->quotes_content.array[at].array[i] == f_fss_quote_type_single_e ? f_fss_quote_single_s.string[0] : f_fss_quote_double_s.string[0], main->output.to);
+ f_print_dynamic_raw(
+ data->quotes_content.array[at].array[i] == f_fss_quote_type_single_e
+ ? f_fss_quote_single_s
+ : data->quotes_content.array[at].array[i] == f_fss_quote_type_backtick_e
+ ? f_fss_quote_backtick_s
+ : f_fss_quote_double_s,
+ main->output.to
+ );
}
}
}
}
- f_fss_quote_t quote = f_fss_quote_type_double_e;
+ uint8_t quote = f_fss_quote_double_s;
if (F_status_is_error_not(status)) {
if (main->parameters.array[fss_extended_write_parameter_double_e].result & f_console_result_found_e) {
if (main->parameters.array[fss_extended_write_parameter_single_e].result & f_console_result_found_e) {
if (main->parameters.array[fss_extended_write_parameter_double_e].location < main->parameters.array[fss_extended_write_parameter_single_e].location) {
- quote = f_fss_quote_type_single_e;
+ quote = f_fss_quote_single_s;
}
}
}
else if (main->parameters.array[fss_extended_write_parameter_single_e].result & f_console_result_found_e) {
- quote = f_fss_quote_type_single_e;
+ quote = f_fss_quote_single_s;
}
}
#endif // _di_fss_extended_write_error_parameter_unsupported_eol_print_
#ifndef _di_fss_extended_write_process_
- f_status_t fss_extended_write_process(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_statics_t *contents, f_string_dynamic_t *buffer) {
+ f_status_t fss_extended_write_process(fll_program_data_t * const main, const f_file_t output, const uint8_t quote, const f_string_static_t *object, const f_string_statics_t *contents, f_string_dynamic_t *buffer) {
f_status_t status = F_none;
f_state_t state = macro_f_state_t_initialize(fss_extended_write_common_allocation_large_d, fss_extended_write_common_allocation_small_d, 0, 0, &fll_program_standard_signal_state, 0, (void *) main, 0);
#endif // _di_fss_extended_write_process_
#ifndef _di_fss_extended_write_process_pipe_
- f_status_t fss_extended_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer) {
+ f_status_t fss_extended_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const uint8_t quote, f_string_dynamic_t *buffer) {
f_status_t status = F_none;
f_status_t status_pipe = F_none;
* F_failure (with error bit) for any other failure.
*/
#ifndef _di_fss_extended_write_process_
- extern f_status_t fss_extended_write_process(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, const f_string_static_t *object, const f_string_statics_t *contents, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
+ extern f_status_t fss_extended_write_process(fll_program_data_t * const main, const f_file_t output, const uint8_t quote, const f_string_static_t *object, const f_string_statics_t *contents, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
#endif // _di_fss_extended_write_process_
/**
* F_failure (with error bit) for any other failure.
*/
#ifndef _di_fss_extended_write_process_pipe_
- extern f_status_t fss_extended_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const f_fss_quote_t quote, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
+ extern f_status_t fss_extended_write_process_pipe(fll_program_data_t * const main, const f_file_t output, const uint8_t quote, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
#endif // _di_fss_extended_write_process_pipe_
#ifdef __cplusplus
macro_f_fss_contents_t_delete_simple(data->contents_header);
macro_f_fss_objects_t_delete_simple(data->objects);
macro_f_fss_objects_t_delete_simple(data->objects_header);
- macro_f_fss_quotes_t_delete_simple(data->quotes_object_header);
- macro_f_fss_quotess_t_delete_simple(data->quotes_content_header);
+ macro_f_uint8s_t_delete_simple(data->quotes_object_header);
+ macro_f_uint8ss_t_delete_simple(data->quotes_content_header);
macro_f_fss_delimits_t_delete_simple(data->delimits_object);
macro_f_fss_delimits_t_delete_simple(data->delimits_object_header);
macro_f_fss_delimits_t_delete_simple(data->delimits_content);
f_fss_objects_t objects_header;
f_fss_contents_t contents;
f_fss_contents_t contents_header;
- f_fss_quotes_t quotes_object_header;
- f_fss_quotess_t quotes_content_header;
+ f_uint8s_t quotes_object_header;
+ f_uint8ss_t quotes_content_header;
f_fss_delimits_t delimits_object;
f_fss_delimits_t delimits_object_header;
f_fss_delimits_t delimits_content;
f_fss_delimits_t delimits_content_header;
f_fss_comments_t comments;
- f_fss_quotes_t quotes;
+ f_uint8s_t quotes;
} fss_payload_read_data_t;
#define fss_payload_read_data_t_initialize \
f_fss_objects_t_initialize, \
f_fss_contents_t_initialize, \
f_fss_contents_t_initialize, \
- f_fss_quotes_t_initialize, \
- f_fss_quotess_t_initialize, \
+ f_uint8s_t_initialize, \
+ f_uint8ss_t_initialize, \
f_fss_delimits_t_initialize, \
f_fss_delimits_t_initialize, \
f_fss_delimits_t_initialize, \
f_fss_delimits_t_initialize, \
- f_fss_quotes_t_initialize, \
+ f_uint8s_t_initialize, \
f_fss_comments_t_initialize, \
}
#endif // _di_fss_payload_read_data_t_
if (data->option & fss_payload_read_data_option_object_d) {
if (data->option & fss_payload_read_data_option_trim_d) {
if ((data->option & fss_payload_read_data_option_original_d) && data->quotes_object_header.array[at]) {
- f_print_dynamic_raw(data->quotes_object_header.array[at] == f_fss_quote_type_single_e ? f_fss_quote_single_s : f_fss_quote_double_s, main->output.to);
+ f_print_dynamic_raw(
+ data->quotes_object_header.array[at] == f_fss_quote_type_single_e
+ ? f_fss_quote_single_s
+ : data->quotes_object_header.array[at] == f_fss_quote_type_backtick_e
+ ? f_fss_quote_backtick_s,
+ : f_fss_quote_double_s,
+ main->output.to
+ );
}
fl_print_trim_except_dynamic_partial(data->buffer, data->objects_header.array[at], delimits_object, main->output.to);
if ((data->option & fss_payload_read_data_option_original_d) && data->quotes_object_header.array[at]) {
- f_print_dynamic_raw(data->quotes_object_header.array[at] == f_fss_quote_type_single_e ? f_fss_quote_single_s : f_fss_quote_double_s, main->output.to);
+ f_print_dynamic_raw(
+ data->quotes_object_header.array[at] == f_fss_quote_type_single_e
+ ? f_fss_quote_single_s
+ : data->quotes_object_header.array[at] == f_fss_quote_type_backtick_e
+ ? f_fss_quote_backtick_s,
+ : f_fss_quote_double_s,
+ main->output.to
+ );
}
}
else {
if ((data->option & fss_payload_read_data_option_original_d) && data->quotes_object_header.array[at]) {
- f_print_dynamic_raw(data->quotes_object_header.array[at] == f_fss_quote_type_single_e ? f_fss_quote_single_s : f_fss_quote_double_s, main->output.to);
+ f_print_dynamic_raw(
+ data->quotes_object_header.array[at] == f_fss_quote_type_single_e
+ ? f_fss_quote_single_s
+ : data->quotes_object_header.array[at] == f_fss_quote_type_backtick_e
+ ? f_fss_quote_backtick_s,
+ : f_fss_quote_double_s,
+ main->output.to
+ );
}
f_print_except_dynamic_partial(data->buffer, data->objects_header.array[at], delimits_object, main->output.to);
if ((data->option & fss_payload_read_data_option_original_d) && data->quotes_object_header.array[at]) {
- f_print_dynamic_raw(data->quotes_object_header.array[at] == f_fss_quote_type_single_e ? f_fss_quote_single_s : f_fss_quote_double_s, main->output.to);
+ f_print_dynamic_raw(
+ data->quotes_object_header.array[at] == f_fss_quote_type_single_e
+ ? f_fss_quote_single_s
+ : data->quotes_object_header.array[at] == f_fss_quote_type_backtick_e
+ ? f_fss_quote_backtick_s,
+ : f_fss_quote_double_s,
+ main->output.to
+ );
}
}
content_printed = F_true;
if ((data->option & fss_payload_read_data_option_original_d) && data->quotes_content_header.array[at].array[data->select]) {
- f_print_dynamic_raw(data->quotes_content_header.array[at].array[data->select] == f_fss_quote_type_single_e ? f_fss_quote_single_s : f_fss_quote_double_s, main->output.to);
+ f_print_dynamic_raw(
+ data->quotes_content_header.array[at].array[data->select] == f_fss_quote_type_single_e
+ ? f_fss_quote_single_s
+ : data->quotes_content_header.array[at].array[data->select] == f_fss_quote_type_backtick_e
+ ? f_fss_quote_backtick_s
+ : f_fss_quote_double_s,
+ main->output.to
+ );
}
f_print_except_dynamic_partial(data->buffer, data->contents_header.array[at].array[data->select], delimits_content, main->output.to);
if ((data->option & fss_payload_read_data_option_original_d) && data->quotes_content_header.array[at].array[data->select]) {
- f_print_dynamic_raw(data->quotes_content_header.array[at].array[data->select] == f_fss_quote_type_single_e ? f_fss_quote_single_s : f_fss_quote_double_s, main->output.to);
+ f_print_dynamic_raw(
+ data->quotes_content_header.array[at].array[data->select] == f_fss_quote_type_single_e
+ ? f_fss_quote_single_s
+ : data->quotes_content_header.array[at].array[data->select] == f_fss_quote_type_backtick_e
+ ? f_fss_quote_backtick_s
+ : f_fss_quote_double_s,
+ main->output.to
+ );
}
}
}
content_printed = F_true;
if ((data->option & fss_payload_read_data_option_original_d) && data->quotes_content_header.array[at].array[i]) {
- f_print_dynamic_raw(data->quotes_content_header.array[at].array[i] == f_fss_quote_type_single_e ? f_fss_quote_single_s : f_fss_quote_double_s, main->output.to);
+ f_print_dynamic_raw(
+ data->quotes_content_header.array[at].array[i] == f_fss_quote_type_single_e
+ ? f_fss_quote_single_s
+ : data->quotes_content_header.array[at].array[i] == f_fss_quote_type_backtick_e
+ ? f_fss_quote_backtick_s
+ : f_fss_quote_double_s,
+ main->output.to
+ );
}
f_print_except_dynamic_partial(data->buffer, data->contents_header.array[at].array[i], delimits_content, main->output.to);
if ((data->option & fss_payload_read_data_option_original_d) && data->quotes_content_header.array[at].array[i]) {
- f_print_dynamic_raw(data->quotes_content_header.array[at].array[i] == f_fss_quote_type_single_e ? f_fss_quote_single_s : f_fss_quote_double_s, main->output.to);
+ f_print_dynamic_raw(
+ data->quotes_content_header.array[at].array[i] == f_fss_quote_type_single_e
+ ? f_fss_quote_single_s
+ : data->quotes_content_header.array[at].array[i] == f_fss_quote_type_backtick_e
+ ? f_fss_quote_backtick_s
+ : f_fss_quote_double_s,
+ main->output.to
+ );
}
if (i + 1 < data->contents_header.array[at].used && data->contents_header.array[at].array[i + 1].start <= data->contents_header.array[at].array[i + 1].stop) {
}
else {
if ((data->option & fss_payload_read_data_option_original_d) && data->quotes_object_header.array[at]) {
- f_print_character_safely(data->quotes_object_header.array[at] == f_fss_quote_type_single_e ? f_fss_quote_single_s.string[0] : f_fss_quote_double_s.string[0], main->output.to);
+ f_print_dynamic_raw(
+ data->quotes_object_header.array[at] == f_fss_quote_type_single_e
+ ? f_fss_quote_single_s
+ : data->quotes_object_header.array[at] == f_fss_quote_type_backtick_e
+ ? f_fss_quote_backtick_s
+ : f_fss_quote_double_s,
+ main->output.to
+ );
}
fss_payload_read_print_at_extended(main, i, *delimits_object, *delimits_content, data);
if ((data->option & fss_payload_read_data_option_original_d) && data->quotes_object_header.array[at]) {
- f_print_character_safely(data->quotes_object_header.array[at] == f_fss_quote_type_single_e ? f_fss_quote_single_s.string[0] : f_fss_quote_double_s.string[0], main->output.to);
+ f_print_dynamic_raw(
+ data->quotes_object_header.array[at] == f_fss_quote_type_single_e
+ ? f_fss_quote_single_s
+ : data->quotes_object_header.array[at] == f_fss_quote_type_backtick_e
+ ? f_fss_quote_backtick_s
+ : f_fss_quote_double_s,
+ main->output.to
+ );
}
}
}
}
else {
if ((data->option & fss_payload_read_data_option_original_d) && data->quotes_content_header.array[at].array[i]) {
- f_print_character_safely(data->quotes_content_header.array[at].array[i] == f_fss_quote_type_single_e ? f_fss_quote_single_s.string[0] : f_fss_quote_double_s.string[0], main->output.to);
+ f_print_dynamic_raw(
+ data->quotes_content_header.array[at].array[i] == f_fss_quote_type_single_e
+ ? f_fss_quote_single_s
+ : data->quotes_content_header.array[at].array[i] == f_fss_quote_type_backtick_e
+ ? f_fss_quote_backtick_s
+ : f_fss_quote_double_s,
+ main->output.to
+ );
}
fss_payload_read_print_at_extended(main, i, *delimits_object, *delimits_content, data);
if ((data->option & fss_payload_read_data_option_original_d) && data->quotes_content_header.array[at].array[i]) {
- f_print_character_safely(data->quotes_content_header.array[at].array[i] == f_fss_quote_type_single_e ? f_fss_quote_single_s.string[0] : f_fss_quote_double_s.string[0], main->output.to);
+ f_print_dynamic_raw(
+ data->quotes_content_header.array[at].array[i] == f_fss_quote_type_single_e
+ ? f_fss_quote_single_s
+ : data->quotes_content_header.array[at].array[i] == f_fss_quote_type_backtick_e
+ ? f_fss_quote_backtick_s
+ : f_fss_quote_double_s,
+ main->output.to
+ );
}
}
if (macro_fss_write_setting(setting)->flag & fss_write_flag_partial_e) {
macro_fss_write_setting(setting)->status = fl_fss_basic_object_write(
*macro_fss_write_setting(setting)->object,
- (macro_fss_write_setting(setting)->flag & fss_write_flag_single_e) ? f_fss_quote_type_single_e : f_fss_quote_type_double_e,
+ macro_fss_write_setting(setting)->quote.used
+ ? macro_fss_write_setting(setting)->quote.string[0]
+ : f_fss_quote_double_s.string[0],
f_fss_complete_none_e,
macro_fss_write_setting(setting)->state,
¯o_fss_write_setting(setting)->range,
else {
macro_fss_write_setting(setting)->status = fl_fss_basic_object_write(
*macro_fss_write_setting(setting)->object,
- (macro_fss_write_setting(setting)->flag & fss_write_flag_single_e) ? f_fss_quote_type_single_e : f_fss_quote_type_double_e,
+ macro_fss_write_setting(setting)->quote.used
+ ? macro_fss_write_setting(setting)->quote.string[0]
+ : f_fss_quote_double_s.string[0],
(macro_fss_write_setting(setting)->flag & fss_write_flag_trim_e) ? f_fss_complete_full_trim_e : f_fss_complete_full_e,
macro_fss_write_setting(setting)->state,
¯o_fss_write_setting(setting)->range,
if (macro_fss_write_setting(setting)->flag & fss_write_flag_partial_e) {
macro_fss_write_setting(setting)->status = fl_fss_extended_content_write(
*macro_fss_write_setting(setting)->content,
- (macro_fss_write_setting(setting)->flag & fss_write_flag_single_e) ? f_fss_quote_type_single_e : f_fss_quote_type_double_e,
+ macro_fss_write_setting(setting)->quote.used
+ ? macro_fss_write_setting(setting)->quote.string[0]
+ : f_fss_quote_double_s.string[0],
f_fss_complete_none_e, // @fixme each of these needs to have "partial", "trim", etc..
macro_fss_write_setting(setting)->state,
¯o_fss_write_setting(setting)->range,
else {
macro_fss_write_setting(setting)->status = fl_fss_extended_content_write(
*macro_fss_write_setting(setting)->content,
- (macro_fss_write_setting(setting)->flag & fss_write_flag_single_e) ? f_fss_quote_type_single_e : f_fss_quote_type_double_e,
+ macro_fss_write_setting(setting)->quote.used
+ ? macro_fss_write_setting(setting)->quote.string[0]
+ : f_fss_quote_double_s.string[0],
(macro_fss_write_setting(setting)->flag & fss_write_flag_trim_e) ? f_fss_complete_full_trim_e : f_fss_complete_full_e,
macro_fss_write_setting(setting)->state,
¯o_fss_write_setting(setting)->range,
if (macro_fss_write_setting(setting)->flag & fss_write_flag_partial_e) {
macro_fss_write_setting(setting)->status = fl_fss_extended_object_write(
*macro_fss_write_setting(setting)->object,
- (macro_fss_write_setting(setting)->flag & fss_write_flag_single_e) ? f_fss_quote_type_single_e : f_fss_quote_type_double_e,
+ macro_fss_write_setting(setting)->quote.used
+ ? macro_fss_write_setting(setting)->quote.string[0]
+ : f_fss_quote_double_s.string[0],
f_fss_complete_none_e,
macro_fss_write_setting(setting)->state,
¯o_fss_write_setting(setting)->range,
else {
macro_fss_write_setting(setting)->status = fl_fss_extended_object_write(
*macro_fss_write_setting(setting)->object,
- (macro_fss_write_setting(setting)->flag & fss_write_flag_single_e) ? f_fss_quote_type_single_e : f_fss_quote_type_double_e,
+ macro_fss_write_setting(setting)->quote.used
+ ? macro_fss_write_setting(setting)->quote.string[0]
+ : f_fss_quote_double_s.string[0],
(macro_fss_write_setting(setting)->flag & fss_write_flag_trim_e) ? f_fss_complete_full_trim_e : f_fss_complete_full_e,
macro_fss_write_setting(setting)->state,
¯o_fss_write_setting(setting)->range,
#ifndef _di_fss_write_parameters_
const f_string_static_t fss_write_short_as_s = macro_f_string_static_t_initialize(FSS_WRITE_short_as_s, 0, FSS_WRITE_short_as_s_length);
+ const f_string_static_t fss_write_short_backtick_s = macro_f_string_static_t_initialize(FSS_WRITE_short_backtick_s, 0, FSS_WRITE_short_backtick_s_length);
const f_string_static_t fss_write_short_content_s = macro_f_string_static_t_initialize(FSS_WRITE_short_content_s, 0, FSS_WRITE_short_content_s_length);
const f_string_static_t fss_write_short_double_s = macro_f_string_static_t_initialize(FSS_WRITE_short_double_s, 0, FSS_WRITE_short_double_s_length);
const f_string_static_t fss_write_short_file_s = macro_f_string_static_t_initialize(FSS_WRITE_short_file_s, 0, FSS_WRITE_short_file_s_length);
const f_string_static_t fss_write_short_trim_s = macro_f_string_static_t_initialize(FSS_WRITE_short_trim_s, 0, FSS_WRITE_short_trim_s_length);
const f_string_static_t fss_write_long_as_s = macro_f_string_static_t_initialize(FSS_WRITE_long_as_s, 0, FSS_WRITE_long_as_s_length);
+ const f_string_static_t fss_write_long_backtick_s = macro_f_string_static_t_initialize(FSS_WRITE_long_backtick_s, 0, FSS_WRITE_long_backtick_s_length);
const f_string_static_t fss_write_long_content_s = macro_f_string_static_t_initialize(FSS_WRITE_long_content_s, 0, FSS_WRITE_long_content_s_length);
const f_string_static_t fss_write_long_double_s = macro_f_string_static_t_initialize(FSS_WRITE_long_double_s, 0, FSS_WRITE_long_double_s_length);
const f_string_static_t fss_write_long_file_s = macro_f_string_static_t_initialize(FSS_WRITE_long_file_s, 0, FSS_WRITE_long_file_s_length);
if (main->parameters.array[fss_write_parameter_single_e].result & f_console_result_found_e) {
if (main->parameters.array[fss_write_parameter_double_e].location < main->parameters.array[fss_write_parameter_single_e].location) {
setting->quote = f_fss_quote_single_s;
+
+ if (main->parameters.array[fss_write_parameter_backtick_e].result & f_console_result_found_e) {
+ if (main->parameters.array[fss_write_parameter_single_e].location < main->parameters.array[fss_write_parameter_backtick_e].location) {
+ setting->quote = f_fss_quote_backtick_s;
+ }
+ }
+ }
+ else if (main->parameters.array[fss_write_parameter_backtick_e].result & f_console_result_found_e) {
+ if (main->parameters.array[fss_write_parameter_double_e].location < main->parameters.array[fss_write_parameter_backtick_e].location) {
+ setting->quote = f_fss_quote_backtick_s;
+ }
+ }
+ }
+ else if (main->parameters.array[fss_write_parameter_backtick_e].result & f_console_result_found_e) {
+ if (main->parameters.array[fss_write_parameter_double_e].location < main->parameters.array[fss_write_parameter_backtick_e].location) {
+ setting->quote = f_fss_quote_backtick_s;
}
}
}
else if (main->parameters.array[fss_write_parameter_single_e].result & f_console_result_found_e) {
setting->quote = f_fss_quote_single_s;
+
+ if (main->parameters.array[fss_write_parameter_backtick_e].result & f_console_result_found_e) {
+ if (main->parameters.array[fss_write_parameter_single_e].location < main->parameters.array[fss_write_parameter_backtick_e].location) {
+ setting->quote = f_fss_quote_backtick_s;
+ }
+ }
+ }
+ else if (main->parameters.array[fss_write_parameter_backtick_e].result & f_console_result_found_e) {
+ setting->quote = f_fss_quote_backtick_s;
}
if (main->parameters.array[fss_write_parameter_trim_e].result & f_console_result_found_e) {
* The main program parameters.
*/
#ifndef _di_fss_write_parameters_
- #define FSS_WRITE_short_as_s "a"
- #define FSS_WRITE_short_content_s "c"
- #define FSS_WRITE_short_double_s "d"
- #define FSS_WRITE_short_file_s "f"
- #define FSS_WRITE_short_ignore_s "I"
- #define FSS_WRITE_short_object_s "o"
- #define FSS_WRITE_short_partial_s "p"
- #define FSS_WRITE_short_prepend_s "P"
- #define FSS_WRITE_short_single_s "s"
- #define FSS_WRITE_short_trim_s "T"
-
- #define FSS_WRITE_long_as_s "as"
- #define FSS_WRITE_long_content_s "content"
- #define FSS_WRITE_long_double_s "double"
- #define FSS_WRITE_long_file_s "file"
- #define FSS_WRITE_long_ignore_s "ignore"
- #define FSS_WRITE_long_object_s "object"
- #define FSS_WRITE_long_partial_s "partial"
- #define FSS_WRITE_long_prepend_s "prepend"
- #define FSS_WRITE_long_single_s "single"
- #define FSS_WRITE_long_trim_s "trim"
-
- #define FSS_WRITE_short_as_s_length 1
- #define FSS_WRITE_short_content_s_length 1
- #define FSS_WRITE_short_double_s_length 1
- #define FSS_WRITE_short_file_s_length 1
- #define FSS_WRITE_short_ignore_s_length 1
- #define FSS_WRITE_short_object_s_length 1
- #define FSS_WRITE_short_partial_s_length 1
- #define FSS_WRITE_short_prepend_s_length 1
- #define FSS_WRITE_short_single_s_length 1
- #define FSS_WRITE_short_trim_s_length 1
-
- #define FSS_WRITE_long_as_s_length 2
- #define FSS_WRITE_long_content_s_length 7
- #define FSS_WRITE_long_double_s_length 6
- #define FSS_WRITE_long_file_s_length 4
- #define FSS_WRITE_long_ignore_s_length 6
- #define FSS_WRITE_long_object_s_length 6
- #define FSS_WRITE_long_partial_s_length 7
- #define FSS_WRITE_long_prepend_s_length 7
- #define FSS_WRITE_long_single_s_length 6
- #define FSS_WRITE_long_trim_s_length 4
+ #define FSS_WRITE_short_as_s "a"
+ #define FSS_WRITE_short_backtick_s "b"
+ #define FSS_WRITE_short_content_s "c"
+ #define FSS_WRITE_short_double_s "d"
+ #define FSS_WRITE_short_file_s "f"
+ #define FSS_WRITE_short_ignore_s "I"
+ #define FSS_WRITE_short_object_s "o"
+ #define FSS_WRITE_short_partial_s "p"
+ #define FSS_WRITE_short_prepend_s "P"
+ #define FSS_WRITE_short_single_s "s"
+ #define FSS_WRITE_short_trim_s "T"
+
+ #define FSS_WRITE_long_as_s "as"
+ #define FSS_WRITE_long_backtick_s "backtick"
+ #define FSS_WRITE_long_content_s "content"
+ #define FSS_WRITE_long_double_s "double"
+ #define FSS_WRITE_long_file_s "file"
+ #define FSS_WRITE_long_ignore_s "ignore"
+ #define FSS_WRITE_long_object_s "object"
+ #define FSS_WRITE_long_partial_s "partial"
+ #define FSS_WRITE_long_prepend_s "prepend"
+ #define FSS_WRITE_long_single_s "single"
+ #define FSS_WRITE_long_trim_s "trim"
+
+ #define FSS_WRITE_short_as_s_length 1
+ #define FSS_WRITE_short_backtick_s_length 1
+ #define FSS_WRITE_short_content_s_length 1
+ #define FSS_WRITE_short_double_s_length 1
+ #define FSS_WRITE_short_file_s_length 1
+ #define FSS_WRITE_short_ignore_s_length 1
+ #define FSS_WRITE_short_object_s_length 1
+ #define FSS_WRITE_short_partial_s_length 1
+ #define FSS_WRITE_short_prepend_s_length 1
+ #define FSS_WRITE_short_single_s_length 1
+ #define FSS_WRITE_short_trim_s_length 1
+
+ #define FSS_WRITE_long_as_s_length 2
+ #define FSS_WRITE_long_backtick_s_length 8
+ #define FSS_WRITE_long_content_s_length 7
+ #define FSS_WRITE_long_double_s_length 6
+ #define FSS_WRITE_long_file_s_length 4
+ #define FSS_WRITE_long_ignore_s_length 6
+ #define FSS_WRITE_long_object_s_length 6
+ #define FSS_WRITE_long_partial_s_length 7
+ #define FSS_WRITE_long_prepend_s_length 7
+ #define FSS_WRITE_long_single_s_length 6
+ #define FSS_WRITE_long_trim_s_length 4
extern const f_string_static_t fss_write_short_as_s;
+ extern const f_string_static_t fss_write_short_backtick_s;
extern const f_string_static_t fss_write_short_content_s;
extern const f_string_static_t fss_write_short_double_s;
extern const f_string_static_t fss_write_short_file_s;
extern const f_string_static_t fss_write_short_trim_s;
extern const f_string_static_t fss_write_long_as_s;
+ extern const f_string_static_t fss_write_long_backtick_s;
extern const f_string_static_t fss_write_long_content_s;
extern const f_string_static_t fss_write_long_double_s;
extern const f_string_static_t fss_write_long_file_s;
fss_write_parameter_line_last_no_e,
fss_write_parameter_as_e,
+ fss_write_parameter_backtick_e,
fss_write_parameter_content_e,
fss_write_parameter_double_e,
fss_write_parameter_file_e,
macro_f_console_parameter_t_initialize4(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e), \
\
macro_f_console_parameter_t_initialize2(fss_write_short_as_s.string, fss_write_long_as_s.string, 0, 1, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize2(fss_write_short_backtick_s.string, fss_write_long_backtick_s.string, 0, 0, f_console_flag_normal_e), \
macro_f_console_parameter_t_initialize2(fss_write_short_content_s.string, fss_write_long_content_s.string, 0, 1, f_console_flag_normal_e), \
macro_f_console_parameter_t_initialize2(fss_write_short_double_s.string, fss_write_long_double_s.string, 0, 0, f_console_flag_normal_e), \
macro_f_console_parameter_t_initialize2(fss_write_short_file_s.string, fss_write_long_file_s.string, 0, 1, f_console_flag_normal_e), \
macro_f_console_parameter_t_initialize2(fss_write_short_trim_s.string, fss_write_long_trim_s.string, 0, 0, f_console_flag_normal_e), \
}
- #define fss_write_total_parameters_d 22
+ #define fss_write_total_parameters_d 23
#endif // _di_fss_write_parameters_
/**
* - none: No modes in use.
* - content: The Content being written is specified.
* - content_multiple: Designate that multiple Content is allowed for an Object for this standard rather than a single Content per Object.
- * - double: Operate using double quotes.
* - file_to: Using a specified destination file.
* - help: Print help.
* - ignore: Ignore a given range within a Content (specify flag before setting loading to designate ignores is supported by standard).
* - object: The Object being written is specified.
* - partial: Do not write end of Object/Content character.
* - prepend: Prepend the given white space characters to the start of each multi-line Content.
- * - single: Operate using single quotes.
* - trim: Trim Object names.
* - version: Print version.
*/
fss_write_flag_none_e = 0x0,
fss_write_flag_content_e = 0x1,
fss_write_flag_content_multiple_e = 0x2,
- fss_write_flag_double_e = 0x4,
- fss_write_flag_file_to_e = 0x8,
- fss_write_flag_help_e = 0x10,
- fss_write_flag_ignore_e = 0x20,
- fss_write_flag_object_e = 0x40,
- fss_write_flag_partial_e = 0x80,
- fss_write_flag_prepend_e = 0x100,
- fss_write_flag_single_e = 0x200,
- fss_write_flag_trim_e = 0x400,
- fss_write_flag_version_e = 0x800,
+ fss_write_flag_file_to_e = 0x4,
+ fss_write_flag_help_e = 0x8,
+ fss_write_flag_ignore_e = 0x10,
+ fss_write_flag_object_e = 0x20,
+ fss_write_flag_partial_e = 0x40,
+ fss_write_flag_prepend_e = 0x80,
+ fss_write_flag_trim_e = 0x100,
+ fss_write_flag_version_e = 0x200,
};
#endif // _di_fss_write_flag_e_