read_dataset(): better get name of unknown sim types from raw file
This commit is contained in:
parent
52291c562d
commit
0bc0f8e5eb
|
|
@ -546,8 +546,11 @@ static int read_dataset(FILE *fd, Raw **rawptr, const char *type)
|
||||||
}
|
}
|
||||||
else if(!strncmp(line, "Plotname:", 9)) {
|
else if(!strncmp(line, "Plotname:", 9)) {
|
||||||
char name[PATH_MAX];
|
char name[PATH_MAX];
|
||||||
n = sscanf(line, "Plotname: %s", name);
|
char *ptr;
|
||||||
if(n==1) {
|
my_strncpy(name, line + 10, S(name));
|
||||||
|
ptr = strchr(name ,'\n');
|
||||||
|
if(ptr) *ptr = '\0';
|
||||||
|
if(name[0]) {
|
||||||
if(!type) type = name;
|
if(!type) type = name;
|
||||||
if(!strcmp(type, name)) sim_type = name;
|
if(!strcmp(type, name)) sim_type = name;
|
||||||
dbg(dbglev, "read_dataset(): ac sim_type=%s\n", sim_type ? sim_type : "<NULL>");
|
dbg(dbglev, "read_dataset(): ac sim_type=%s\n", sim_type ? sim_type : "<NULL>");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue