Rename functions of mapping parser

This commit is contained in:
Mario Hüttel 2019-03-25 17:56:57 +01:00
parent f237004e6c
commit a99a469cf0
4 changed files with 7 additions and 7 deletions

View File

@ -98,7 +98,7 @@ void command_line_convert_gds(char *gds_name, char *pdf_name, char *tex_name, gb
dstream = g_data_input_stream_new(G_INPUT_STREAM(stream));
i = 0;
do {
res = load_csv_line(dstream, &layer_export, &layer_name, &layer, &layer_color);
res = mapping_parser_load_line(dstream, &layer_export, &layer_name, &layer, &layer_color);
if (res == 0) {
if (!layer_export)
continue;

View File

@ -592,7 +592,7 @@ static void layer_selector_load_layer_mapping_from_file(LayerSelector *self, gch
gtk_container_remove(GTK_CONTAINER(self->list_box), GTK_WIDGET(le));
}
while((result = load_csv_line(dstream, &export, &name, &layer, &color)) >= 0) {
while((result = mapping_parser_load_line(dstream, &export, &name, &layer, &color)) >= 0) {
/* skip broken line */
if (result == 1)
continue;
@ -678,7 +678,7 @@ static void layer_selector_save_layer_mapping_data(LayerSelector *self, const gc
for (temp = le_list; temp != NULL; temp = temp->next) {
/* To be sure it is a valid string */
workbuff[0] = 0;
create_csv_line(LAYER_ELEMENT(temp->data), workbuff, sizeof(workbuff));
mapping_parser_gen_csv_line(LAYER_ELEMENT(temp->data), workbuff, sizeof(workbuff));
fwrite(workbuff, sizeof(char), strlen(workbuff), file);
}

View File

@ -31,7 +31,7 @@
#include "mapping-parser.h"
int load_csv_line(GDataInputStream *stream, gboolean *export, char **name, int *layer, GdkRGBA *color)
int mapping_parser_load_line(GDataInputStream *stream, gboolean *export, char **name, int *layer, GdkRGBA *color)
{
int ret;
gsize len;
@ -94,7 +94,7 @@ ret_direct:
}
void create_csv_line(LayerElement *layer_element, char *line_buffer, size_t max_len)
void mapping_parser_gen_csv_line(LayerElement *layer_element, char *line_buffer, size_t max_len)
{
int i;
GString *string;

View File

@ -43,7 +43,7 @@
* @param color RGBA color.
* @return 1 if malformatted line, 0 if parsing was successful and parameters are valid, -1 if file end
*/
int load_csv_line(GDataInputStream *stream, gboolean *export, char **name, int *layer, GdkRGBA *color);
int mapping_parser_load_line(GDataInputStream *stream, gboolean *export, char **name, int *layer, GdkRGBA *color);
/**
* @brief Create Line for LayerMapping file with supplied information
@ -51,7 +51,7 @@ int load_csv_line(GDataInputStream *stream, gboolean *export, char **name, int *
* @param line_buffer buffer to write to
* @param max_len Maximum length that cna be used in \p line_buffer
*/
void create_csv_line(LayerElement *layer_element, char *line_buffer, size_t max_len);
void mapping_parser_gen_csv_line(LayerElement *layer_element, char *line_buffer, size_t max_len);
/** @} */