Compare commits

..

No commits in common. "27cb06afe29684318d4cc941ae1c7e598a07be2b" and "8455491c11af28bf04b914817fd81aa9ca765726" have entirely different histories.

7 changed files with 10 additions and 9062 deletions

View File

@ -387,7 +387,7 @@ void gds_parse_date(const char *buffer, int length, struct gds_time_field *mod_d
int parse_gds_from_file(const char *filename, GList **library_list)
{
char *workbuff;
char workbuff[1024];
int read;
int i;
int run = 1;
@ -404,12 +404,6 @@ int parse_gds_from_file(const char *filename, GList **library_list)
lib_list = *library_list;
/* Allocate working buffer */
workbuff = (char *)malloc(sizeof(char)*128*1024);
if(!workbuff)
return -100;
/* open File */
gds_file = fopen(filename, "r");
if (gds_file == NULL) {
@ -434,7 +428,8 @@ int parse_gds_from_file(const char *filename, GList **library_list)
break;
}
rec_data_length = gds_convert_unsigend_int16(workbuff);
rec_data_length = (uint16_t)((((uint16_t)(workbuff[0])) << 8) |
(uint16_t)(workbuff[1]));
if (rec_data_length < 4) {
/* Possible Zero-Padding: */
@ -457,7 +452,8 @@ int parse_gds_from_file(const char *filename, GList **library_list)
GDS_ERROR("Unexpected end of file");
break;
}
rec_type = gds_convert_unsigend_int16(workbuff);
rec_type = (uint16_t)((((uint16_t)(workbuff[0])) << 8) |
(uint16_t)(workbuff[1]));
/* if begin: Allocate structures */
switch (rec_type) {
@ -599,8 +595,7 @@ int parse_gds_from_file(const char *filename, GList **library_list)
read = fread(workbuff, sizeof(char), rec_data_length, gds_file);
if (read != rec_data_length) {
GDS_ERROR("Could not read enough data: requested: %u, read: %u | Type: %04x\n",
(unsigned int)rec_data_length, (unsigned int)read, (unsigned int)rec_type);
GDS_ERROR("Could not read enough data");
run = -5;
break;
}
@ -701,15 +696,10 @@ int parse_gds_from_file(const char *filename, GList **library_list)
fclose(gds_file);
if (!run) {
/* Iterate and find references to cells */
g_list_foreach(lib_list, scan_library_references, NULL);
}
/* Iterate and find references to cells */
g_list_foreach(lib_list, scan_library_references, NULL);
*library_list = lib_list;
free(workbuff);
return run;
}

View File

@ -164,16 +164,6 @@ void render_cell_to_code(struct gds_cell *cell, GList *layer_infos, FILE *tex_fi
/* 10 kB Line working buffer should be enough */
working_line = g_string_new_len(NULL, LATEX_LINE_BUFFER_KB*1024);
/* standalone foo */
g_string_printf(working_line, "\\newif\\iftestmode\n\\testmodefalse %% Change to true for standalone rendering\n");
WRITEOUT_BUFFER(working_line);
g_string_printf(working_line, "\\iftestmode\n");
WRITEOUT_BUFFER(working_line);
g_string_printf(working_line, "\\documentclass[tikz]{standalone}\n\\usepackage{xcolor}\n\\usetikzlibrary{ocgx}\n\\begin{document}\n");
WRITEOUT_BUFFER(working_line);
g_string_printf(working_line, "\\fi\n");
WRITEOUT_BUFFER(working_line);
/* Write layer definitions */
write_layer_definitions(tex_file, layer_infos, working_line);
@ -188,13 +178,6 @@ void render_cell_to_code(struct gds_cell *cell, GList *layer_infos, FILE *tex_fi
g_string_printf(working_line, "\\end{tikzpicture}\n");
WRITEOUT_BUFFER(working_line);
g_string_printf(working_line, "\\iftestmode\n");
WRITEOUT_BUFFER(working_line);
g_string_printf(working_line, "\\end{document}\n");
WRITEOUT_BUFFER(working_line);
g_string_printf(working_line, "\\fi\n");
WRITEOUT_BUFFER(working_line);
fflush(tex_file);
g_string_free(working_line, TRUE);
}

View File

@ -1,2 +1,2 @@
*.log
*.aux
layout.tex
toplevel.pdf

View File

@ -1,2 +0,0 @@
2,0.203922,0.396078,0.643137,1.000000,1,BOTTOM-Layer
1,0.450980,0.823529,0.086275,1.000000,1,TOP-Layer

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long