Rename functions of mapping parser
This commit is contained in:
parent
f237004e6c
commit
a99a469cf0
@ -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));
|
dstream = g_data_input_stream_new(G_INPUT_STREAM(stream));
|
||||||
i = 0;
|
i = 0;
|
||||||
do {
|
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 (res == 0) {
|
||||||
if (!layer_export)
|
if (!layer_export)
|
||||||
continue;
|
continue;
|
||||||
|
@ -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));
|
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 */
|
/* skip broken line */
|
||||||
if (result == 1)
|
if (result == 1)
|
||||||
continue;
|
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) {
|
for (temp = le_list; temp != NULL; temp = temp->next) {
|
||||||
/* To be sure it is a valid string */
|
/* To be sure it is a valid string */
|
||||||
workbuff[0] = 0;
|
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);
|
fwrite(workbuff, sizeof(char), strlen(workbuff), file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include "mapping-parser.h"
|
#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;
|
int ret;
|
||||||
gsize len;
|
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;
|
int i;
|
||||||
GString *string;
|
GString *string;
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
* @param color RGBA color.
|
* @param color RGBA color.
|
||||||
* @return 1 if malformatted line, 0 if parsing was successful and parameters are valid, -1 if file end
|
* @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
|
* @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 line_buffer buffer to write to
|
||||||
* @param max_len Maximum length that cna be used in \p line_buffer
|
* @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);
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user