This starts the work for the handling of the depths.
I noticed the tests now pass despite the depths being incomplete.
Looks like I need to add some runtime tests for depths for both 0.6 and 0.7.
This brings in the runtime test expects from the 0.6 branch.
I have some brain storming to do so that I can determine how I want to handle the depth processing logic.
I decided that now is a good time to add support for the Object close.
This is to address the problem where I cannot print the original Object close for FSS Extended List and FSS Embedded List.
The reason being that the necessary data is not actually recorded.
I have not yet updated the unit tests.
I have not yet did any actual tests to confirm that this works.
I have not yet actually utilized this in the FSS Extended List Read and FSS Embedded List Read programs.
I have only made the low level changes and made sure everything compiles.
* Any resizing must be manually performed on each applicable property.
*
* Properties:
- * - object: The object.
- * - content: The content associated with the object.
- * - parent: A location referencing a parrent object or content that this object content is nested under.
+ * - object: The Object.
+ * - close: The range representing where the Object closes for standards that require closing characters (such as after the Content).
+ * - content: The Content associated with the Object.
+ * - parent: A location referencing a parrent Object or Content that this Object Content is nested under.
*/
#ifndef _di_f_fss_item_t_
typedef struct {
f_range_t object;
+ f_range_t close;
f_ranges_t content;
f_number_unsigned_t parent;
} f_fss_item_t;
- #define f_fss_item_t_initialize { f_range_t_initialize, f_ranges_t_initialize, 0 }
+ #define f_fss_item_t_initialize { f_range_t_initialize, f_range_t_initialize, f_ranges_t_initialize, 0 }
- #define macro_f_fss_item_t_initialize_1(object, content, parent) macro_f_number_unsigneds_t_initialize_1(object, content, parent)
+ #define macro_f_fss_item_t_initialize_1(object, close, content, parent) macro_f_number_unsigneds_t_initialize_1(object, close, content, parent)
#define macro_f_fss_item_t_clear(item) \
macro_f_range_t_clear(item.object); \
+ macro_f_range_t_clear(item.close); \
macro_f_ranges_t_clear(item.content); \
item.parent = 0;
#endif // _di_f_fss_item_t_
* The start location will be updated as the buffer is being processed.
* The start location will represent where the read stopped on return.
* A start location past the stop location or buffer used means that the entire range was processed.
+ *
+ * Must not be NULL.
* @param found
* A set of all locations where a valid content was found.
+ *
+ * Must not be NULL.
* @param delimits
* A delimits array representing where delimits exist within the buffer.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
* If f_fss_complete_full_e, this will write any appropriate open and close aspects of this content, including the final newline.
* @param range
* The start/stop location within the content string to write as an content.
+ *
+ * Must not be NULL.
* @param destination
* The buffer where the content is written to.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
* The start location will be updated as the buffer is being processed.
* The start location will represent where the read stopped on return.
* A start location past the stop location or buffer used means that the entire range was processed.
+ *
+ * Must not be NULL.
* @param found
* A location where a valid object was found.
+ *
+ * Must not be NULL.
* @param quote
* (optional) This will store the quote type representing the character to use (from the f_fss_quote_type_*_e).
*
* Set to NULL to not use.
* @param delimits
* A delimits array representing where delimits exist within the buffer.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
* If f_fss_complete_partial_trim, this will write any appropriate open and close aspects of this object, but will omit whitespace before and after the object (inside the quotes).
* @param range
* The start/stop location within the object string to write as an object.
+ *
+ * Must not be NULL.
* @param destination
* The buffer where the object is written to.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
* The start location will be updated as the buffer is being processed.
* The start location will represent where the read stopped on return.
* A start location past the stop location or buffer used means that the entire range was processed.
+ *
+ * Must not be NULL.
* @param found
* A set of all locations where a valid content was found.
+ *
+ * Must not be NULL.
* @param delimits
* A delimits array representing where delimits exist within the buffer.
+ *
+ * Must not be NULL.
* @param comments
* An array of ranges representing where comments are found within any valid content.
* This only stores comments found within valid content only.
* The comment range will include the trailing newline.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
* Set to NULL to not use.
* @param range
* The start/stop location within the content string to write as an content.
+ *
+ * Must not be NULL.
* @param destination
* The buffer where the content is written to.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
* The start location will be updated as the buffer is being processed.
* The start location will represent where the read stopped on return.
* A start location past the stop location or buffer used means that the entire range was processed.
+ *
+ * Must not be NULL.
* @param found
* A location where a valid object was found.
+ *
+ * Must not be NULL.
* @param delimits
* A delimits array representing where delimits exist within the buffer.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
* If f_fss_complete_partial_tim, this will write any appropriate open and close aspects of this object, but will omit whitespace before and after the object.
* @param range
* The start/stop location within the object string to write as an object.
+ *
+ * Must not be NULL.
* @param destination
* The buffer where the object is written to.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
f_fss_skip_past_delimit(buffer, range, state);
if (F_status_is_error(state->status)) return;
- if (state->status == F_data_not) return;
- if (state->status == F_okay_eos || state->status == F_okay_stop) return;
+ if (state->status == F_data_not || state->status == F_okay_eos || state->status == F_okay_stop) return;
fl_fss_data_embedded_list_t * const cache = (fl_fss_data_embedded_list_t *) state->data;
state->status = f_memory_array_increase(state->step_small, sizeof(f_fss_nest_t), (void **) &found->depth, &found->used, &found->size);
if (F_status_is_error(state->status)) return;
- state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &cache->objects->array, &cache->objects->used, &cache->objects->size);
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_range_t), (void **) &cache->objects->array, &cache->objects->used, &cache->objects->size);
if (F_status_is_error(state->status)) return;
state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &cache->positions->array, &cache->positions->used, &cache->positions->size);
delimits->array[delimits->used++] = comment_delimit;
}
+ found->depth[depth].array[position].close.start = line_start;
+ found->depth[depth].array[position].close.stop = range->start - 1;
+
newline_last = range->start;
line_start = range->start + 1;
graph_first = 0x1;
#define fl_fss_data_embedded_list_t_initialize { 0, 0, 0 }
- #define macro_fl_fss_data_embedded_list_t_initialize_1(objects, positions, slashes) { objects, positions, slashes }
+ #define macro_fl_fss_data_embedded_list_t_initialize_1(objects, closes, positions, slashes) { objects, positions, slashes }
#define macro_fl_fss_data_embedded_list_t_clear(data) \
data.objects = 0; \
* The start location will be updated as the buffer is being processed.
* The start location will represent where the read stopped on return.
* A start location past the stop location or buffer used means that the entire range was processed.
+ *
+ * Must not be NULL.
* @param found
* A set of all locations where a valid content was found.
+ *
+ * Must not be NULL.
* @param delimits
* A delimits array representing where delimits exist within the buffer.
+ *
+ * Must not be NULL.
* @param comments
* An array of ranges representing where comments are found within any valid content.
* This only stores comments found within valid content only.
* The comment range will include the trailing newline.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
* Set to NULL to not use.
* @param range
* The start/stop location within the content string to write as an content.
+ *
+ * Must not be NULL.
* @param destination
* The buffer where the content is written to.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
* The start location will be updated as the buffer is being processed.
* The start location will represent where the read stopped on return.
* A start location past the stop location or buffer used means that the entire range was processed.
+ *
+ * Must not be NULL.
* @param found
* A location where a valid object was found.
+ *
+ * Must not be NULL.
* @param delimits
* A delimits array representing where delimits exist within the buffer.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
* If f_fss_complete_partial_tim, this will write any appropriate open and close aspects of this object, but will omit whitespace before and after the object.
* @param range
* The start/stop location within the object string to write as an object.
+ *
+ * Must not be NULL.
* @param destination
* The buffer where the object is written to.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
* The start location will be updated as the buffer is being processed.
* The start location will represent where the read stopped on return.
* A start location past the stop location or buffer used means that the entire range was processed.
+ *
+ * Must not be NULL.
* @param found
* A set of all locations where a valid content was found.
+ *
+ * Must not be NULL.
* @param quotes
* (optional) This will store the quote type representing the character to use (from the f_fss_quote_type_*_e).
* Each index in quotes represents a position within the found array index.
* Set to NULL to not use.
* @param delimits
* A delimits array representing where delimits exist within the buffer.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
* If f_fss_complete_full_e, this will write any appropriate open and close aspects of this content, including the final newline.
* @param range
* The start/stop location within the content string to write as an content.
+ *
+ * Must not be NULL.
* @param destination
* The buffer where the content is written to.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
* The start location will be updated as the buffer is being processed.
* The start location will represent where the read stopped on return.
* A start location past the stop location or buffer used means that the entire range was processed.
+ *
+ * Must not be NULL.
* @param found
* A location where a valid object was found.
+ *
+ * Must not be NULL.
* @param quote
* (optional) This will store the quote type representing the character to use (from the f_fss_quote_type_*_e).
*
* Set to NULL to not use.
* @param delimits
* A delimits array representing where delimits exist within the buffer.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
* If f_fss_complete_partial_e, this will write any appropriate open and close aspects of this object.
* @param range
* The start/stop location within the object string to write as an object.
+ *
+ * Must not be NULL.
* @param destination
* The buffer where the object is written to.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
#endif
#ifndef _di_fl_fss_extended_list_content_read_
- void fl_fss_extended_list_content_read(const f_string_static_t buffer, f_range_t * const range, f_ranges_t * const found, f_number_unsigneds_t * const delimits, f_ranges_t * const comments, f_state_t * const state) {
+ void fl_fss_extended_list_content_read(const f_string_static_t buffer, f_range_t * const range, f_ranges_t * const found, f_range_t * const close, f_number_unsigneds_t * const delimits, f_ranges_t * const comments, f_state_t * const state) {
#ifndef _di_level_1_parameter_checking_
if (!state) return;
- if (!range || !found || !delimits || !comments) {
+ if (!range || !found || !close || !delimits || !comments) {
state->status = F_status_set_error(F_parameter);
return;
f_number_unsigned_t newline_last = range->start;
f_number_unsigned_t slash_first = 0;
f_number_unsigned_t slash_count = 0;
- f_number_unsigned_t start = 0;
+ f_number_unsigned_t line_start = 0;
// Identify where the content ends.
while (range->start <= range->stop && range->start < buffer.used) {
if (state->status == F_okay_eol) {
newline_last = range->start++;
+ line_start = range->start;
continue;
}
// Found a valid content close, set stop point to last newline.
if (buffer.string[range->start] == f_fss_eol_s.string[0]) {
+ close->start = line_start;
+ close->stop = range->start - 1;
+
++range->start;
// If the last newline is the entire start, then there is no Content.
if (buffer.string[range->start] == f_fss_comment_s.string[0]) {
// The newline_last is initialized to the range->start, which may not actually be a new line.
- if (buffer.string[newline_last] == f_string_eol_s.string[0]) {
- start = newline_last + 1;
- }
- else {
- start = newline_last;
- }
+ line_start = (buffer.string[newline_last] == f_string_eol_s.string[0]) ? newline_last + 1 : newline_last;
f_fss_seek_to_eol(buffer, range, state);
if (F_status_is_error(state->status)) break;
newline_last = range->start;
}
- comments->array[comments->used].start = start;
+ comments->array[comments->used].start = line_start;
comments->array[comments->used++].stop = range->start++;
+ // The newline_last is initialized to the range->start, which may not actually be a new line.
+ line_start = (buffer.string[newline_last] == f_string_eol_s.string[0]) ? newline_last + 1 : newline_last;
+
continue;
}
* The start location will be updated as the buffer is being processed.
* The start location will represent where the read stopped on return.
* A start location past the stop location or buffer used means that the entire range was processed.
+ *
+ * Must not be NULL.
* @param found
* A set of all locations where a valid content was found.
+ *
+ * Must not be NULL.
+ * @param close
+ * A location where a valid Object close is found.
+ *
+ * Must not be NULL.
* @param delimits
* A delimits array representing where delimits exist within the buffer.
+ *
+ * Must not be NULL.
* @param comments
* An array of ranges representing where comments are found within any valid content.
* This only stores comments found within valid content only.
* The comment range will include the trailing newline.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
* @see f_utf_buffer_increment()
*/
#ifndef _di_fl_fss_extended_list_content_read_
- extern void fl_fss_extended_list_content_read(const f_string_static_t buffer, f_range_t * const range, f_ranges_t * const found, f_number_unsigneds_t * const delimits, f_ranges_t * const comments, f_state_t * const state);
+ extern void fl_fss_extended_list_content_read(const f_string_static_t buffer, f_range_t * const range, f_ranges_t * const found, f_range_t * const close, f_number_unsigneds_t * const delimits, f_ranges_t * const comments, f_state_t * const state);
#endif // _di_fl_fss_extended_list_content_read_
/**
* Set to NULL to not use.
* @param range
* The start/stop location within the content string to write as an content.
+ *
+ * Must not be NULL.
* @param destination
* The buffer where the content is written to.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
* The start location will be updated as the buffer is being processed.
* The start location will represent where the read stopped on return.
* A start location past the stop location or buffer used means that the entire range was processed.
+ *
+ * Must not be NULL.
* @param found
- * A location where a valid object was found.
+ * A location where a valid Object is found.
+ *
+ * Must not be NULL.
* @param delimits
* A delimits array representing where delimits exist within the buffer.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
* If f_fss_complete_partial_tim, this will write any appropriate open and close aspects of this object, but will omit whitespace before and after the object.
* @param range
* The start/stop location within the object string to write as an object.
+ *
+ * Must not be NULL.
* @param destination
* The buffer where the object is written to.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
*
* @param data
* The fl_fss_payload_header_state_t pointer.
+ *
* Must not be NULL.
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
* The internal.range is modified.
+ *
* Must not be NULL.
* @param buffer
* The buffer to write using the FLL Extended (FSS-0001) format.
+ *
* Must not be NULL.
*
* @return
*
* @param data
* The fl_fss_payload_header_state_t pointer.
+ *
* Must not be NULL.
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
* The internal.range is modified.
+ *
* Must not be NULL.
* @param buffer
* The buffer to write using the FLL Extended (FSS-0001) format.
+ *
* Must not be NULL.
* @param append_on_empty
* Append the quoted empty string when the this flag is set.
*
* @param data
* The fl_fss_payload_header_state_t pointer.
+ *
* Must not be NULL.
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
* The internal.range is modified.
+ *
* Must not be NULL.
* @param destination
* The buffer to append to.
+ *
* Must not be NULL.
* @param separator
* The separate to use between each quoted empty string.
*
* @param data
* The fl_fss_payload_header_state_t pointer.
+ *
* Must not be NULL.
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
* The internal.range is modified.
+ *
* Must not be NULL.
* @param destination
* The buffer to append to.
+ *
* Must not be NULL.
* @param separator
* The separate to use between each quoted empty string.
* @param data
* The fl_fss_payload_header_state_t pointer.
* This modifies data.cache.
+ *
* Must not be NULL.
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
* Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
+ *
* Must not be NULL.
* @param buffers
* The array of dynamic strings to read from.
+ *
* Must not be NULL.
* @param destinations
* A map of strings representing the header names and values after being safely converted into the valid payload header format.
* This built header names and values are appended onto this.
* This is updated as appropriate.
+ *
* Must not be NULL.
*
* @return
*
* @param data
* The fl_fss_payload_header_state_t pointer.
+ *
* Must not be NULL.
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
* Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
+ *
* Must not be NULL.
* @param map
* The map to read from.
+ *
* Must not be NULL.
* @param destinations
* A map of strings representing the header names and values after being safely converted into the valid payload header format.
* This built header names and values are appended onto this.
* This is updated as appropriate.
+ *
* Must not be NULL.
*
* @return
*
* @param data
* The fl_fss_payload_header_state_t pointer.
+ *
* Must not be NULL.
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
* Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
+ *
* Must not be NULL.
* @param map
* The map to read from.
+ *
* Must not be NULL.
* @param destinations
* A map of strings representing the header names and values after being safely converted into the valid payload header format.
* This built header names and values are appended onto this.
* This is updated as appropriate.
+ *
* Must not be NULL.
*
* @return
*
* @param data
* The fl_fss_payload_header_state_t pointer.
+ *
* Must not be NULL.
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
* Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
+ *
* Must not be NULL.
* @param maps
* The maps to read from.
+ *
* Must not be NULL.
* @param destinations
* A map of strings representing the header names and values after being safely converted into the valid payload header format.
* This built header names and values are appended onto this.
* This is updated as appropriate.
+ *
* Must not be NULL.
*
* @return
*
* @param data
* The fl_fss_payload_header_state_t pointer.
+ *
* Must not be NULL.
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
* Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
+ *
* Must not be NULL.
* @param maps
* The maps to read from.
+ *
* Must not be NULL.
* @param destinations
* A map of strings representing the header names and values after being safely converted into the valid payload header format.
* This built header names and values are appended onto this.
* This is updated as appropriate.
+ *
* Must not be NULL.
*
* @return
* The fl_fss_payload_header_state_t pointer.
* This caller must reset data.cache.used as needed.
* If data.cache.used is not 0, then this will append a space before adding the converted number.
+ *
* Must not be NULL.
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
* Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
+ *
* Must not be NULL.
* @param number
* The signed number.
+ *
* Must not be NULL.
*
* @return
* Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
+ *
* Must not be NULL.
* @param number
* The unsigned number.
+ *
* Must not be NULL.
*
* @return
* @param data
* The fl_fss_payload_header_state_t pointer.
* This modifies data.cache.
+ *
* Must not be NULL.
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
* Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
+ *
* Must not be NULL.
* @param quantity
* The quantity to process.
* A map of strings representing the header names and values after being safely converted into the valid payload header format.
* This built header names and values are appended onto this.
* This is updated as appropriate.
+ *
* Must not be NULL.
*
* @return
* @param data
* The fl_fss_payload_header_state_t pointer.
* This modifies data.cache.
+ *
* Must not be NULL.
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
* Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
+ *
* Must not be NULL.
- * @param quantity
- * The quantity to process.
+ * @param quantitys
+ * The quantitys to process.
* @param destinations
* A map of strings representing the header names and values after being safely converted into the valid payload header format.
* This built header names and values are appended onto this.
* This is updated as appropriate.
+ *
* Must not be NULL.
*
* @return
* @param data
* The fl_fss_payload_header_state_t pointer.
* This modifies data.cache.
+ *
* Must not be NULL.
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
* Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
+ *
* Must not be NULL.
* @param range
* The range to process.
* A map of strings representing the header names and values after being safely converted into the valid payload header format.
* This built header names and values are appended onto this.
* This is updated as appropriate.
+ *
* Must not be NULL.
*
* @return
* @param data
* The fl_fss_payload_header_state_t pointer.
* This modifies data.cache.
+ *
* Must not be NULL.
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
* Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
+ *
* Must not be NULL.
* @param range
* The range to process.
* A map of strings representing the header names and values after being safely converted into the valid payload header format.
* This built header names and values are appended onto this.
* This is updated as appropriate.
+ *
* Must not be NULL.
*
* @return
* @param data
* The fl_fss_payload_header_state_t pointer.
* This modifies data.cache.
+ *
* Must not be NULL.
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
* Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
+ *
* Must not be NULL.
* @param buffers
* The array of NULL terminated strings to read from.
+ *
* Must not be NULL.
* @param destinations
* A map of strings representing the header names and values after being safely converted into the valid payload header format.
* This built header names and values are appended onto this.
* This is updated as appropriate.
+ *
* Must not be NULL.
*
* @return
* @param data
* The fl_fss_payload_header_state_t pointer.
* This modifies data.cache.
+ *
* Must not be NULL.
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
* Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
+ *
* Must not be NULL.
* @param triple
* The triple to process.
* A map of strings representing the header names and values after being safely converted into the valid payload header format.
* This built header names and values are appended onto this.
* This is updated as appropriate.
+ *
* Must not be NULL.
*
* @return
* @param data
* The fl_fss_payload_header_state_t pointer.
* This modifies data.cache.
+ *
* Must not be NULL.
* @param state
* The state passed directly from the fl_fss_payload_header_map() parameters.
* Must not be NULL.
* @param internal
* The internal state, fl_fss_payload_header_internal_t, created inside of fl_fss_payload_header_map().
+ *
* Must not be NULL.
- * @param triple
- * The triple to process.
+ * @param triples
+ * The triples to process.
* @param destinations
* A map of strings representing the header names and values after being safely converted into the valid payload header format.
* This built header names and values are appended onto this.
* This is updated as appropriate.
+ *
* Must not be NULL.
*
* @return
* The buffer to read from.
* @param range
* The range within the buffer that is currently being read.
+ *
+ * Must not be NULL.
* @param objects
* This will be populated with all valid objects found.
+ *
+ * Must not be NULL.
* @param contents
* This will be populated with all valid contents found.
+ *
+ * Must not be NULL.
* @param objects_quoted
* (optional) An array mapped to each object in objects representing the quote type discovered (from the f_fss_quote_type_*_e), if any.
*
* @param objects_delimits
* An array of delimits for objects detected during processing.
* The caller is expected to decide if and when to process them.
+ *
+ * Must not be NULL.
* @param contents_delimits
* (optional) An array of delimits for contents detected during processing.
* The caller is expected to decide if and when to process them.
+ *
* Set to NULL and all delimits will instead utilize objects_delimits.
* @param state
A state for providing flags and handling interrupts during long running operations.
* Otherwise, this is quote character to wrap the object in when writing.
* @param destination
* The buffer where the content is written to.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
* The buffer to read from.
* @param range
* The range within the buffer that is currently being read.
+ *
+ * Must not be NULL.
* @param objects
* This will be populated with all valid objects found.
+ *
+ * Must not be NULL.
* @param contents
* This will be populated with all valid contents found.
+ *
+ * Must not be NULL.
* @param objects_delimits
* An array of delimits for objects detected during processing.
* The caller is expected to decide if and when to process them.
+ *
+ * Must not be NULL.
* @param contents_delimits
* (optional) An array of delimits for contents detected during processing.
* The caller is expected to decide if and when to process them.
+ *
* Set to NULL and all delimits will instead utilize objects_delimits.
* @param comments
* An array of ranges representing where comments are found within any valid content.
* This only stores comments found within valid content only.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
* Set to NULL to not use.
* @param destination
* The buffer to write to.
+ *
+ * Must not be NULL.
* @param state
A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
* @see fl_fss_basic_list_object_write()
*/
#ifndef _di_fll_fss_basic_list_write_
- extern void fll_fss_basic_list_write(const f_string_static_t object, const f_string_static_t content, const f_string_static_t *content_prepend, f_string_dynamic_t * const destination, f_state_t * const state);
+ extern void fll_fss_basic_list_write(const f_string_static_t object, const f_string_static_t content, const f_string_static_t * const content_prepend, f_string_dynamic_t * const destination, f_state_t * const state);
#endif // _di_fll_fss_basic_list_write_
#ifdef __cplusplus
#endif // _di_fll_fss_embedded_list_read_
#ifndef _di_fll_fss_embedded_list_write_
- void fll_fss_embedded_list_write(const f_string_static_t object, const f_string_static_t content, const f_string_static_t *content_prepend, const f_ranges_t *ignore, f_string_dynamic_t * const destination, f_state_t * const state) {
+ void fll_fss_embedded_list_write(const f_string_static_t object, const f_string_static_t content, const f_string_static_t * const content_prepend, const f_ranges_t * const ignore, f_string_dynamic_t * const destination, f_state_t * const state) {
#ifndef _di_level_2_parameter_checking_
if (!state) return;
#endif // _di_level_2_parameter_checking_
* The range within the buffer that is currently being read.
* @param nest
* An nested set of all objects and content.
+ *
+ * Must not be NULL.
* @param objects_delimits
* An array of delimits for objects detected during processing.
* The caller is expected to decide if and when to process them.
+ *
+ * Must not be NULL.
* @param contents_delimits
* (optional) An array of delimits for contents detected during processing.
* The caller is expected to decide if and when to process them.
+ *
* Set to NULL and all delimits will instead utilize objects_delimits.
* @param comments
* An array of ranges representing where comments are found within any valid content.
* This only stores comments found within valid content only.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
* Set to NULL to not use.
* @param destination
* The buffer where the content is written to.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
* @see fl_fss_embedded_list_object_write()
*/
#ifndef _di_fll_fss_embedded_list_write_
- extern void fll_fss_embedded_list_write(const f_string_static_t object, const f_string_static_t content, const f_string_static_t *content_prepend, const f_ranges_t *ignore, f_string_dynamic_t * const destination, f_state_t * const state);
+ extern void fll_fss_embedded_list_write(const f_string_static_t object, const f_string_static_t content, const f_string_static_t * const content_prepend, const f_ranges_t * const ignore, f_string_dynamic_t * const destination, f_state_t * const state);
#endif // _di_fll_fss_embedded_list_write_
#ifdef __cplusplus
* The buffer to read from.
* @param range
* The range within the buffer that is currently being read.
+ *
+ * Must not be NULL.
* @param objects
* This will be populated with all valid objects found.
+ *
+ * Must not be NULL.
* @param contents
* This will be populated with all valid contents found.
+ *
+ * Must not be NULL.
* @param objects_quoted
* (optional) An array mapped to each object in objects representing the quote type discovered (from the f_fss_quote_type_*_e), if any.
*
* @param objects_delimits
* An array of delimits for objects detected during processing.
* The caller is expected to decide if and when to process them.
+ *
+ * Must not be NULL.
* @param contents_delimits
* (optional) An array of delimits for contents detected during processing.
* The caller is expected to decide if and when to process them.
+ *
* Set to NULL and all delimits will instead utilize objects_delimits.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* Otherwise, this is quote character to wrap the object in when writing.
* @param destination
* The buffer where the content is written to.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
#endif
#ifndef _di_fll_fss_extended_list_read_
- void fll_fss_extended_list_read(const f_string_static_t buffer, f_range_t * const range, f_ranges_t * const objects, f_rangess_t * const contents, f_number_unsigneds_t * const objects_delimits, f_number_unsigneds_t * const contents_delimits, f_ranges_t * const comments, f_state_t * const state) {
+ void fll_fss_extended_list_read(const f_string_static_t buffer, f_range_t * const range, f_ranges_t * const objects, f_ranges_t * const closes, f_rangess_t * const contents, f_number_unsigneds_t * const objects_delimits, f_number_unsigneds_t * const contents_delimits, f_ranges_t * const comments, f_state_t * const state) {
#ifndef _di_level_2_parameter_checking_
if (!state) return;
- if (!range || !objects || !contents) {
+ if (!range || !objects || !closes || !contents) {
state->status = F_status_set_error(F_parameter);
return;
state->status = f_memory_array_increase(state->step_small, sizeof(f_range_t), (void **) &objects->array, &objects->used, &objects->size);
if (F_status_is_error(state->status)) return;
+ state->status = f_memory_array_increase(state->step_small, sizeof(f_range_t), (void **) &closes->array, &closes->used, &closes->size);
+ if (F_status_is_error(state->status)) return;
+
state->status = f_memory_array_increase(state->step_small, sizeof(f_ranges_t), (void **) &contents->array, &contents->used, &contents->size);
if (F_status_is_error(state->status)) return;
found_data = F_true;
contents->array[contents->used].used = 0;
- fl_fss_extended_list_content_read(buffer, range, &contents->array[contents->used], contents_delimits ? contents_delimits : objects_delimits, comments, state);
+ fl_fss_extended_list_content_read(buffer, range, &contents->array[contents->used], &closes->array[closes->used], contents_delimits ? contents_delimits : objects_delimits, comments, state);
if (F_status_is_error(state->status)) return;
break;
#endif // _di_fll_fss_extended_list_read_
#ifndef _di_fll_fss_extended_list_write_
- void fll_fss_extended_list_write(const f_string_static_t object, const f_string_static_t content, const f_string_static_t *content_prepend, const f_ranges_t *ignore, f_string_dynamic_t * const destination, f_state_t * const state) {
+ void fll_fss_extended_list_write(const f_string_static_t object, const f_string_static_t content, const f_string_static_t * const content_prepend, const f_ranges_t * const ignore, f_string_dynamic_t * const destination, f_state_t * const state) {
#ifndef _di_level_2_parameter_checking_
if (!state) return;
#endif // _di_level_2_parameter_checking_
* The buffer to read from.
* @param range
* The range within the buffer that is currently being read.
+ *
+ * Must not be NULL.
* @param objects
* This will be populated with all valid objects found.
+ *
+ * Must not be NULL.
+ * @param closes
+ * This will be populated with all close location of found Objects.
+ *
+ * Must not be NULL.
* @param contents
* This will be populated with all valid contents found.
+ *
+ * Must not be NULL.
* @param objects_delimits
* An array of delimits for objects detected during processing.
* The caller is expected to decide if and when to process them.
+ *
+ * Must not be NULL.
* @param contents_delimits
* (optional) An array of delimits for contents detected during processing.
* The caller is expected to decide if and when to process them.
+ *
* Set to NULL 0 and all delimits will instead utilize objects_delimits.
* @param comments
* An array of ranges representing where comments are found within any valid content.
* This only stores comments found within valid content only.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
* @see fl_fss_extended_list_object_read()
*/
#ifndef _di_fll_fss_extended_list_read_
- extern void fll_fss_extended_list_read(const f_string_static_t buffer, f_range_t * const range, f_ranges_t * const objects, f_rangess_t * const contents, f_number_unsigneds_t * const objects_delimits, f_number_unsigneds_t * const contents_delimits, f_ranges_t * const comments, f_state_t * const state);
+ extern void fll_fss_extended_list_read(const f_string_static_t buffer, f_range_t * const range, f_ranges_t * const objects, f_ranges_t * const closes, f_rangess_t * const contents, f_number_unsigneds_t * const objects_delimits, f_number_unsigneds_t * const contents_delimits, f_ranges_t * const comments, f_state_t * const state);
#endif // _di_fll_fss_extended_list_read_
/**
* Set to NULL to not use.
* @param destination
* The buffer where the content is written to.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
* @see fl_fss_extended_list_object_write()
*/
#ifndef _di_fll_fss_extended_list_write_
- extern void fll_fss_extended_list_write(const f_string_static_t object, const f_string_static_t content, const f_string_static_t *content_prepend, const f_ranges_t *ignore, f_string_dynamic_t * const destination, f_state_t * const state);
+ extern void fll_fss_extended_list_write(const f_string_static_t object, const f_string_static_t content, const f_string_static_t * const content_prepend, const f_ranges_t * const ignore, f_string_dynamic_t * const destination, f_state_t * const state);
#endif // _di_fll_fss_extended_list_write_
#ifdef __cplusplus
* The buffer to read from.
* @param range
* The range within the buffer that is currently being read.
+ *
+ * Must not be NULL.
* @param objects
* This will be populated with all valid objects found.
+ *
+ * Must not be NULL.
* @param contents
* This will be populated with all valid contents found.
+ *
+ * Must not be NULL.
* @param objects_delimits
* An array of delimits for objects detected during processing.
* The caller is expected to decide if and when to process them.
+ *
+ * Must not be NULL.
* @param contents_delimits
* (optional) An array of delimits for contents detected during processing.
* The caller is expected to decide if and when to process them.
+ *
* Set to NULL and all delimits will instead utilize objects_delimits.
* @param comments
* An array of ranges representing where comments are found within any valid content.
* This only stores comments found within valid content only.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
* Set to NULL to not use.
* @param destination
* The buffer to append to.
+ *
+ * Must not be NULL.
* @param state
* A state for providing flags and handling interrupts during long running operations.
* There is no state.handle().
{
f_state_t state = main->setting.state;
- fl_fss_data_embedded_list_t cache = macro_fl_fss_data_embedded_list_t_initialize_1(&main->cache.objects, &main->cache.positions, &main->cache.slashes);
+ fl_fss_data_embedded_list_t cache = macro_fl_fss_data_embedded_list_t_initialize_1(&main->cache.objects, &main->cache.closes, &main->cache.positions, &main->cache.slashes);
state.data = (void *) &cache;
}
}
- fss_read_ensure_quotes_length(main);
-
- if (F_status_is_error(main->setting.state.status)) {
- fss_read_print_error(&main->program.error, macro_fss_read_f(fss_read_ensure_quotes_length));
-
- return;
- }
-
main->setting.state.status = F_okay;
}
#endif // _di_fss_read_embedded_list_process_load_
void fss_read_embedded_list_process_normal_determine_depth(fss_read_main_t * const main) {
if (!main) return;
+ if (!main->setting.nest.used || !main->setting.nest.depth[0].used || !main->setting.depths.used) return;
+
+ f_number_unsigned_t depth = main->setting.depths.array[0].depth;
+
+ if (depth >= main->setting.nest.used) {
+ main->setting.state.status = F_status_set_error(F_parameter);
- if (main->setting.flag & fss_read_main_flag_depth_d) {
- // @todo determine depth and dynamically construct the objects and therefore content based on any of --at, --depth, and --name.
return;
}
- if (!main->setting.nest.used || !main->setting.nest.depth[0].used) return;
+ if ((main->setting.flag & fss_read_main_flag_depth_d) && main->setting.nest.used > 1) {
+ f_number_unsigned_t i = 0;
- main->setting.objects.used = 0;
- main->setting.contents.used = 0;
+ // @todo make an array of depths based on size.
+ // @todo determine which ones have --at or --name used for them.
+
+ //if (main->setting.nest.depth[depth].array[main->setting.objects.used].content.used) {
- main->setting.state.status = f_memory_array_resize(main->setting.nest.depth[0].used, sizeof(f_range_t), (void **) &main->setting.objects.array, &main->setting.objects.used, &main->setting.objects.size);
+ //main->setting.depth
+ //main->setting.nest.depth
+
+ //for (; i < main->setting.objects.used; ++i) {
+ //} // for
+
+ // @todo determine depth and dynamically construct the objects and therefore content based on any of --at, --depth, and --name.
+ return;
+ }
+
+ main->setting.state.status = f_memory_array_resize(main->setting.nest.depth[depth].used, sizeof(f_range_t), (void **) &main->setting.objects.array, &main->setting.objects.used, &main->setting.objects.size);
if (F_status_is_error(main->setting.state.status)) return;
- main->setting.state.status = f_memory_array_resize(main->setting.nest.depth[0].used, sizeof(f_ranges_t), (void **) &main->setting.contents.array, &main->setting.contents.used, &main->setting.contents.size);
+ main->setting.state.status = f_memory_array_resize(main->setting.nest.depth[depth].used, sizeof(f_ranges_t), (void **) &main->setting.contents.array, &main->setting.contents.used, &main->setting.contents.size);
if (F_status_is_error(main->setting.state.status)) return;
- for (; main->setting.objects.used < main->setting.nest.depth[0].used; ++main->setting.objects.used) {
+ for (; main->setting.objects.used < main->setting.nest.depth[depth].used; ++main->setting.objects.used) {
- main->setting.objects.array[main->setting.objects.used] = main->setting.nest.depth[0].array[main->setting.objects.used].object;
+ main->setting.objects.array[main->setting.objects.used] = main->setting.nest.depth[depth].array[main->setting.objects.used].object;
// Use a static array for the inner Content that points to the depth, and so ensure the size is 0 to designate this is not dynamically allocated here.
- if (main->setting.nest.depth[0].array[main->setting.objects.used].content.used) {
- main->setting.contents.array[main->setting.objects.used].array = main->setting.nest.depth[0].array[main->setting.objects.used].content.array;
- main->setting.contents.array[main->setting.objects.used].used = main->setting.nest.depth[0].array[main->setting.objects.used].content.used;
+ if (main->setting.nest.depth[depth].array[main->setting.objects.used].content.used) {
+ main->setting.contents.array[main->setting.objects.used].array = main->setting.nest.depth[depth].array[main->setting.objects.used].content.array;
+ main->setting.contents.array[main->setting.objects.used].used = main->setting.nest.depth[depth].array[main->setting.objects.used].content.used;
main->setting.contents.array[main->setting.objects.used].size = 0;
- main->setting.contents.array[main->setting.objects.used].used = main->setting.nest.depth[0].array[main->setting.objects.used].content.used;
}
else {
main->setting.contents.array[main->setting.objects.used].array = 0;
} // for
main->setting.contents.used = main->setting.objects.used;
+
+ fss_read_ensure_quotes_length(main);
}
#endif // _di_fss_read_embedded_list_process_normal_determine_depth_
fss_read_main_t * const main = (fss_read_main_t *) void_main;
- fll_fss_extended_list_read(main->setting.buffer, &main->setting.range, &main->setting.objects, &main->setting.contents, &main->setting.delimits_object, &main->setting.delimits_content, &main->setting.comments, &main->setting.state);
+ fll_fss_extended_list_read(main->setting.buffer, &main->setting.range, &main->setting.objects, &main->setting.closes, &main->setting.contents, &main->setting.delimits_object, &main->setting.delimits_content, &main->setting.comments, &main->setting.state);
if (F_status_is_error(main->setting.state.status)) {
if (F_status_set_fine(main->setting.state.status) == F_interrupt) return;
} // for
} // for
+ if (main->setting.depths.used) {
+ main->setting.depth = main->setting.depths.array[0];
+ }
+
main->setting.state.status = F_okay;
}
#endif // _di_fss_read_setting_load_depth_
* - name: A specific Object name has been requested.
* - object: The Object is to be printed.
* - object_as_line: The Object is counted as its own line for the purpose of -l/--line or any other similar behavior.
+ * - object_content: A helper flag representing object and content flag bits being set.
* - object_trim: Empty space before an after Objects are ignored while processing without affecting printing behavior.
* - original: Enable original printing, where the quotes are printed and no delimits are applied.
* - payload_create: Create the payload Object with empty Content if the payload Object is missing (when using FSS Payload and related).
#define fss_read_main_flag_name_d 0x4000
#define fss_read_main_flag_object_d 0x8000
#define fss_read_main_flag_object_as_line_d 0x10000
+ #define fss_read_main_flag_object_content_d 0x8004
#define fss_read_main_flag_object_trim_d 0x20000
#define fss_read_main_flag_original_d 0x40000
#define fss_read_main_flag_payload_create_d 0x80000
f_memory_array_resize(0, sizeof(f_char_t), (void **) &setting->buffer.string, &setting->buffer.used, &setting->buffer.size);
f_memory_array_resize(0, sizeof(f_range_t), (void **) &setting->objects.array, &setting->objects.used, &setting->objects.size);
+ f_memory_array_resize(0, sizeof(f_range_t), (void **) &setting->closes.array, &setting->closes.used, &setting->closes.size);
f_memory_array_resize(0, sizeof(f_range_t), (void **) &setting->comments.array, &setting->comments.used, &setting->comments.size);
f_memory_arrays_resize(0, sizeof(f_ranges_t), (void **) &setting->contents.array, &setting->contents.used, &setting->contents.size, &f_rangess_delete_callback);
/**
* The FSS Read cache.
*
- * objects: An objects array used by the fll_fss_embedded_list_read() function.
+ * objects: An Objects array used by the fll_fss_embedded_list_read() function.
+ * closes: An Object closes array used by the fll_fss_embedded_list_read() function.
* positions: A positions array used by the fll_fss_embedded_list_read() function.
* slashes: A slashes array used by the fll_fss_embedded_list_read() function.
*/
#ifndef _di_fss_read_cache_t_
typedef struct {
f_ranges_t objects;
+ f_ranges_t closes;
f_number_unsigneds_t positions;
f_number_unsigneds_t slashes;
} fss_read_cache_t;
- #define fss_read_cache_t_initialize { f_ranges_t_initialize, f_number_unsigneds_t_initialize, f_number_unsigneds_t_initialize }
+ #define fss_read_cache_t_initialize { f_ranges_t_initialize, f_ranges_t_initialize, f_number_unsigneds_t_initialize, f_number_unsigneds_t_initialize }
#endif // _di_fss_read_cache_t_
/**
* range: A range used in conjunction with some buffer during processing.
*
* files: A statically allocated array of files for designating where in the buffer a file is represented.
+ * depth: The active depth to use.
* depths: The array of parameters for each given depth.
*
* standard: A human-friendly string describing the standard in use, such as "FSS-0000 (Basic)".
f_range_t range;
fss_read_files_t files;
+ fss_read_depth_t depth;
fss_read_depths_t depths;
f_string_static_t standard;
f_string_dynamic_t buffer;
+ f_ranges_t closes;
f_ranges_t comments;
f_rangess_t contents;
f_number_unsigneds_t delimits_object;
0, \
f_range_t_initialize, \
fss_read_files_t_initialize, \
+ fss_read_depth_t_initialize, \
fss_read_depths_t_initialize, \
f_string_static_t_initialize, \
f_string_dynamic_t_initialize, \
f_ranges_t_initialize, \
+ f_ranges_t_initialize, \
f_rangess_t_initialize, \
f_number_unsigneds_t_initialize, \
f_number_unsigneds_t_initialize, \
return;
}
- if (main->setting.flag & (fss_read_main_flag_object_d | fss_read_main_flag_content_d)) {
+ if (main->setting.flag & fss_read_main_flag_object_content_d) {
if (main->callback.process_normal) {
main->callback.process_normal(void_main);
}
// For depth, most standards do not support nesting, so any depth greater than 0 can be predicted without processing the buffer.
// For select, most standards do not support multiple select, so any select greater than 0 can be predicted without processing the buffer.
- if (!(main->setting.flag & fss_read_main_flag_depth_multiple_d) && main->setting.depths.array[0].depth || !(main->setting.flag & fss_read_main_flag_content_multiple_d) && ((main->setting.flag & fss_read_main_flag_select_d) && main->setting.select)) {
+ if (!(main->setting.flag & fss_read_main_flag_depth_multiple_d) && main->setting.depth.depth || !(main->setting.flag & fss_read_main_flag_content_multiple_d) && ((main->setting.flag & fss_read_main_flag_select_d) && main->setting.select)) {
if (main->setting.flag & fss_read_main_flag_total_d) {
fss_read_print_number(&main->program.output, 0);
}
fss_read_main_t * const main = (fss_read_main_t *) void_main;
- if (main->setting.depths.array[0].value_at >= main->setting.objects.used) {
+ if (main->setting.depth.value_at >= main->setting.objects.used) {
if (main->setting.flag & (fss_read_main_flag_columns_d | fss_read_main_flag_total_d)) {
fss_read_print_number(&main->program.output, 0);
}
if (!names[i]) continue;
if (fss_read_signal_check(main)) return;
- if (at == main->setting.depths.array[0].value_at) {
+ if (at == main->setting.depth.value_at) {
if (main->setting.flag & fss_read_main_flag_line_d) {
// If using "--at" for standards that only support one line per Object, then the only valid line is line 0.
fss_read_main_t * const main = (fss_read_main_t *) void_main;
- if (main->setting.depths.array[0].index_name) {
+ if (main->setting.depth.index_name) {
f_number_unsigned_t i = 0;
memset(names, F_false, sizeof(bool) * main->setting.objects.used);
if (fss_read_signal_check(main)) return;
- if (f_compare_dynamic_partial_except_trim_dynamic(main->setting.depths.array[0].value_name, main->setting.buffer, main->setting.objects.array[i], fss_read_except_none_c, main->setting.delimits_object) == F_equal_to) {
+ if (f_compare_dynamic_partial_except_trim_dynamic(main->setting.depth.value_name, main->setting.buffer, main->setting.objects.array[i], fss_read_except_none_c, main->setting.delimits_object) == F_equal_to) {
names[i] = F_true;
}
} // for
if (fss_read_signal_check(main)) return;
- if (f_compare_dynamic_partial_except_dynamic(main->setting.depths.array[0].value_name, main->setting.buffer, main->setting.objects.array[i], fss_read_except_none_c, main->setting.delimits_object) == F_equal_to) {
+ if (f_compare_dynamic_partial_except_dynamic(main->setting.depth.value_name, main->setting.buffer, main->setting.objects.array[i], fss_read_except_none_c, main->setting.delimits_object) == F_equal_to) {
names[i] = F_true;
}
} // for
if (fss_read_signal_check(main)) return;
if (main->setting.flag & fss_read_main_flag_at_d) {
- if (main->setting.depths.array[0].value_at != i) continue;
+ if (main->setting.depth.value_at != i) continue;
}
if (main->setting.contents.array[i].used) {
if (!names[i]) continue;
if (fss_read_signal_check(main)) return;
- // @fixme all uses of "depths" may need to be changed so that standards that handle depth and those that don't select the currect structure at places like this.
- if (at < main->setting.depths.array[0].value_at) {
+ if (at < main->setting.depth.value_at) {
++at;
continue;
if (fss_read_signal_check(main)) return;
if (main->setting.flag & fss_read_main_flag_at_d) {
- if (main->setting.depths.array[0].value_at != at) continue;
+ if (main->setting.depth.value_at != at) continue;
}
if (main->setting.flag & fss_read_main_flag_object_d) {
if (fss_read_signal_check(main)) return;
if (main->setting.flag & fss_read_main_flag_at_d) {
- if (main->setting.depths.array[0].value_at != at) continue;
+ if (main->setting.depth.value_at != at) continue;
}
if (!(main->setting.flag & fss_read_main_flag_object_d) && (main->setting.flag & fss_read_main_flag_content_d)) {
- b c
- e f
- g h
- мир
- z
- quoted, "yep".
- \"and so does this" "have space"
- But still a valid list.
- Check this.
- ...
- a second "a".
+1
- b c
- e f
- g h
- мир
- z
- quoted, "yep".
- \"and so does this" "have space"
- But still a valid list.
- Check this.
- ...
- a second "a".
+1
- e f
- g h
- a second "a".
+1
- e f
- g h
- a second "a".
+1
-empty
-d
-a
-привет
-y
-"мир"
-привет has space
-"This is quoted"
-AlsoGood
-hi
-привет has space
-a
-also_empty
+1
empty
-d
-a
-привет
-y
-"мир"
-привет has space
-"This is quoted"
-AlsoGood
-hi
-привет has space
-a
-also_empty
-empty
d
-a
-привет
-y
-"мир"
-привет has space
-"This is quoted"
-AlsoGood
-hi
-привет has space
-a
-also_empty
-empty
-d
-a
-привет
-y
-"мир"
-привет has space
-"This is quoted"
-AlsoGood
-hi
-привет has space
-a
-also_empty
-empty
-d
-a
-привет
-y
"мир"
-привет has space
-"This is quoted"
-AlsoGood
-hi
-привет has space
-a
-also_empty
-empty
-d
-a
-привет
-y
-"мир"
привет has space
-"This is quoted"
-AlsoGood
-hi
-привет has space
-a
-also_empty
-empty{
-}
-d{
- b c
-}
-a{
- e f
- g h
-}
-привет{
- мир
-}
-y {
- z
-}
-"мир"{
- quoted, "yep".
-}
-привет has space{
- \"and so does this" "have space"
-}
-"This is quoted"{
- But still a valid list.
-}
-AlsoGood{
-}
-hi {
- Check this.
-}
-привет has space {
- ...
-}
-a{
- a second "a".
-}
-also_empty{
-}
+1
-empty{
-}
-d{
- b c
-}
-a{
- e f
- g h
-}
-привет{
- мир
-}
-y {
- z
-}
-"мир"{
- quoted, "yep".
-}
-привет has space{
- \"and so does this" "have space"
-}
-"This is quoted"{
- But still a valid list.
-}
-AlsoGood{
-}
-hi {
- Check this.
-}
-привет has space {
- ...
-}
-a{
- a second "a".
-}
-also_empty{
-}
+1
empty{
-}
-d{
- b c
-}
-a{
- e f
- g h
-}
-привет{
- мир
-}
-y {
- z
-}
-"мир"{
- quoted, "yep".
-}
-привет has space{
- \"and so does this" "have space"
-}
-"This is quoted"{
- But still a valid list.
-}
-AlsoGood{
-}
-hi {
- Check this.
-}
-привет has space {
- ...
-}
-a{
- a second "a".
-}
-also_empty{
-}
-empty{
-}
-d{
- b c
-}
-a{
- e f
- g h
-}
-привет{
- мир
-}
-y {
- z
-}
-"мир"{
- quoted, "yep".
-}
-привет has space{
- \"and so does this" "have space"
-}
-"This is quoted"{
- But still a valid list.
-}
-AlsoGood{
-}
-hi {
- Check this.
-}
-привет has space {
- ...
-}
-a{
- a second "a".
-}
-also_empty{
}
-empty{
-}
-d{
- b c
-}
-a{
- e f
- g h
-}
-привет{
- мир
-}
-y {
- z
-}
-"мир"{
- quoted, "yep".
-}
-привет has space{
- \"and so does this" "have space"
-}
-"This is quoted"{
- But still a valid list.
-}
-AlsoGood{
-}
-hi {
- Check this.
-}
-привет has space {
- ...
-}
-a{
- a second "a".
-}
-also_empty{
-}
-empty{
-}
-d{
- b c
-}
a{
- e f
- g h
-}
-привет{
- мир
-}
-y {
- z
-}
-"мир"{
- quoted, "yep".
-}
-привет has space{
- \"and so does this" "have space"
-}
-"This is quoted"{
- But still a valid list.
-}
-AlsoGood{
-}
-hi {
- Check this.
-}
-привет has space {
- ...
-}
-a{
- a second "a".
-}
-also_empty{
-}
-empty{
-}
-d{
- b c
-}
-a{
e f
- g h
-}
-привет{
- мир
-}
-y {
- z
-}
-"мир"{
- quoted, "yep".
-}
-привет has space{
- \"and so does this" "have space"
-}
-"This is quoted"{
- But still a valid list.
-}
-AlsoGood{
-}
-hi {
- Check this.
-}
-привет has space {
- ...
-}
-a{
- a second "a".
-}
-also_empty{
-}
-a{
- e f
- g h
-}
-a{
- a second "a".
-}
+1
-a{
- e f
- g h
-}
-a{
- a second "a".
-}
+1
- The object name is an empty string.
- Quotes aren't supported here, so this is not an empty object..
-}
+1
-a{
-}
-hi{
-}
-a{
-}
-a {
-}
-{
- The object name is an empty string.
-}
-{
-}
-""{
- Quotes aren't supported here, so this is not an empty object..
-}
-}
+1
-a{
-}
-hi{
-}
-a{
-}
-a {
-}
-{
- The object name is an empty string.
-}
-{
-}
-""{
- Quotes aren't supported here, so this is not an empty object..
-}
-}
+1
a{
-}
-hi{
-}
-a{
-}
-a {
-}
-{
- The object name is an empty string.
-}
-{
-}
-""{
- Quotes aren't supported here, so this is not an empty object..
-}
-}
-a{
-}
-hi{
-}
-a{
-}
-a {
-}
-{
- The object name is an empty string.
-}
-{
-}
-""{
- Quotes aren't supported here, so this is not an empty object..
-}
}
-a{
-}
-hi{
-}
-a{
-}
-a {
-}
-{
- The object name is an empty string.
-}
-{
-}
-""{
- Quotes aren't supported here, so this is not an empty object..
-}
-}
-a{
-}
-hi{
-}
-a{
-}
-a {
-}
-{
- The object name is an empty string.
-}
-{
-}
-""{
- Quotes aren't supported here, so this is not an empty object..
-}
}
-a{
-}
-hi{
-}
-a{
-}
a {
-}
-{
- The object name is an empty string.
-}
-{
-}
-""{
- Quotes aren't supported here, so this is not an empty object..
-}
-}
-a b привет
-c d
- # not a comment
- \\# nor is this.
-\# even this is not.
-привет мир a
-
- # a valid list:
- with content.
- another "A" list.
- quoted, "yep".
- # has a comment
- But this is not a comment.
- not a list\:
- a b привет
- c d
- привет мир a
-
- yep.
- fin
+1
-a b привет
-c d
- # not a comment
- \\# nor is this.
-\# even this is not.
-привет мир a
-
- # a valid list:
- with content.
- another "A" list.
- quoted, "yep".
- # has a comment
- But this is not a comment.
- not a list\:
- a b привет
- c d
- привет мир a
-
- yep.
- fin
+1
-a b привет
-c d
- # not a comment
- \\# nor is this.
-\# even this is not.
-привет мир a
-
- # a valid list:
- with content.
- another "A" list.
+1
-a b привет
-c d
- # not a comment
- \\# nor is this.
-\# even this is not.
-привет мир a
-
- # a valid list:
- with content.
- another "A" list.
+1
- # has a comment
But this is not a comment.
- # has a comment
But this is not a comment.
with content.
another "A" list.
quoted, "yep".
- # has a comment
But this is not a comment.
not a list\:
a b привет
with content.
another "A" list.
quoted, "yep".
- # has a comment
But this is not a comment.
not a list\:
a b привет
with content.
another "A" list.
quoted, "yep".
- # has a comment
But this is not a comment.
not a list\:
a b привет
with content.
another "A" list.
quoted, "yep".
- # has a comment
But this is not a comment.
not a list\:
a b привет
with content.
another "A" list.
quoted, "yep".
- # has a comment
But this is not a comment.
not a list\:
a b привет
-a
-a
-"мир"
-привет has space
-empty
-hi
-has spaces
+1
a
-a
-"мир"
-привет has space
-empty
-hi
-has spaces
a
-a
-"мир"
-привет has space
-empty
-hi
-has spaces
-a
-a
-"мир"
-привет has space
-empty
-hi
-has spaces
-a
-a
-"мир"
-привет has space
-empty
hi
-has spaces
-a
-a
-"мир"
-привет has space
-empty
-hi
has spaces
-a{
-a b привет
-c d
- # not a comment
- \\# nor is this.
-\# even this is not.
-привет мир a
-
- # a valid list:
- with content.
-}
-a{
- another "A" list.
-}
-"мир"{
- quoted, "yep".
-}
-привет has space{
- # has a comment
- But this is not a comment.
-}
-empty{
-}
-hi{
- not a list\:
- a b привет
- c d
- привет мир a
-
-}
-has spaces {
- yep.
- fin
-}
+1
-a{
-a b привет
-c d
- # not a comment
- \\# nor is this.
-\# even this is not.
-привет мир a
-
- # a valid list:
- with content.
-}
-a{
- another "A" list.
-}
-"мир"{
- quoted, "yep".
-}
-привет has space{
- # has a comment
- But this is not a comment.
-}
-empty{
-}
-hi{
- not a list\:
- a b привет
- c d
- привет мир a
-
-}
-has spaces {
- yep.
- fin
-}
+1
a{
-a b привет
-c d
- # not a comment
- \\# nor is this.
-\# even this is not.
-привет мир a
-
- # a valid list:
- with content.
-}
-a{
- another "A" list.
-}
-"мир"{
- quoted, "yep".
-}
-привет has space{
- # has a comment
- But this is not a comment.
-}
-empty{
-}
-hi{
- not a list\:
- a b привет
- c d
- привет мир a
-
-}
-has spaces {
- yep.
- fin
-}
-a{
a b привет
-c d
- # not a comment
- \\# nor is this.
-\# even this is not.
-привет мир a
-
- # a valid list:
- with content.
-}
-a{
- another "A" list.
-}
-"мир"{
- quoted, "yep".
-}
-привет has space{
- # has a comment
- But this is not a comment.
-}
-empty{
-}
-hi{
- not a list\:
- a b привет
- c d
- привет мир a
-
-}
-has spaces {
- yep.
- fin
-}
-a{
-a b привет
-c d
- # not a comment
- \\# nor is this.
-\# even this is not.
-привет мир a
-
- # a valid list:
- with content.
-}
-a{
- another "A" list.
-}
-"мир"{
- quoted, "yep".
-}
-привет has space{
- # has a comment
- But this is not a comment.
-}
-empty{
-}
-hi{
- not a list\:
- a b привет
- c d
- привет мир a
-
-}
-has spaces {
- yep.
- fin
-}
-a{
-a b привет
-c d
- # not a comment
- \\# nor is this.
-\# even this is not.
-привет мир a
-
- # a valid list:
- with content.
-}
-a{
- another "A" list.
-}
-"мир"{
- quoted, "yep".
-}
-привет has space{
- # has a comment
- But this is not a comment.
-}
-empty{
-}
-hi{
- not a list\:
- a b привет
- c d
- привет мир a
-
-}
-has spaces {
- yep.
- fin
-}
+\\# even this is not.
-a{
-a b привет
-c d
- # not a comment
- \\# nor is this.
-\# even this is not.
привет мир a
-
- # a valid list:
- with content.
-}
-a{
- another "A" list.
-}
-"мир"{
- quoted, "yep".
-}
-привет has space{
- # has a comment
- But this is not a comment.
-}
-empty{
-}
-hi{
- not a list\:
- a b привет
- c d
- привет мир a
-
-}
-has spaces {
- yep.
- fin
-}
-a{
-a b привет
-c d
- # not a comment
- \\# nor is this.
-\# even this is not.
-привет мир a
-
- # a valid list:
- with content.
-}
-a{
- another "A" list.
-}
+1
-a{
-a b привет
-c d
- # not a comment
- \\# nor is this.
-\# even this is not.
-привет мир a
-
- # a valid list:
- with content.
-}
-a{
- another "A" list.
-}
+1
привет has space{
- # has a comment
But this is not a comment.
}
quoted, "yep".
}
привет has space{
- # has a comment
But this is not a comment.
}
empty{
quoted, "yep".
}
привет has space{
- # has a comment
But this is not a comment.
}
empty{
quoted, "yep".
}
привет has space{
- # has a comment
But this is not a comment.
}
empty{
quoted, "yep".
}
привет has space{
- # has a comment
But this is not a comment.
}
empty{