From cf7933b99d0c91bd741c4e21e345926e3eef3e86 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Mon, 25 Nov 2024 12:48:25 +0100 Subject: [PATCH] save.c: do not assume complex data for `constants` raw file sections, deduce data type from Flags line (both complex and real constants sections exist) --- src/save.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/save.c b/src/save.c index 7138c6a5..573fbb13 100644 --- a/src/save.c +++ b/src/save.c @@ -613,7 +613,6 @@ static int read_dataset(FILE *fd, Raw **rawptr, const char *type) if(type) { if(!my_strcasecmp(type, "spectrum")) type = "ac"; else if(!my_strcasecmp(type, "sp")) type = "ac"; - else if(!my_strcasecmp(type, "constants")) type = "ac"; } while((line = my_fgets(fd, NULL))) { my_strdup2(_ALLOC_ID_, &lowerline, line); @@ -691,7 +690,6 @@ static int read_dataset(FILE *fd, Raw **rawptr, const char *type) else if(!strncmp(line, "Plotname:", 9) && ( strstr(lowerline, "ac analysis") || strstr(lowerline, "spectrum") || - strstr(lowerline, "constants") || strstr(lowerline, "sp analysis")) ) { ac = 1; if(!type) type = "ac"; @@ -707,7 +705,7 @@ static int read_dataset(FILE *fd, Raw **rawptr, const char *type) if(name[0]) { if(!type) type = name; if(!strcmp(type, name)) sim_type = name; - dbg(dbglev, "read_dataset(): ac sim_type=%s\n", sim_type ? sim_type : ""); + dbg(dbglev, "read_dataset(): sim_type=%s\n", sim_type ? sim_type : ""); } } /* points and vars are needed for all sections (also ones we are not interested in) @@ -1223,7 +1221,6 @@ int extra_rawfile(int what, const char *file, const char *type, double sweep1, d if(type) { if(!my_strcasecmp(type, "spectrum")) type = "ac"; else if(!my_strcasecmp(type, "sp")) type = "ac"; - else if(!my_strcasecmp(type, "constants")) type = "ac"; } for(i = 0; i < xctx->extra_raw_n; i++) { if(xctx->extra_raw_arr[i]->sim_type &&