add "filename" member in Raw (raw file) struct
This commit is contained in:
parent
537cedbafe
commit
663991ce70
|
|
@ -685,6 +685,7 @@ void free_rawfile(Raw **rawptr, int dr)
|
||||||
}
|
}
|
||||||
if(raw->npoints) my_free(_ALLOC_ID_, &raw->npoints);
|
if(raw->npoints) my_free(_ALLOC_ID_, &raw->npoints);
|
||||||
if(raw->schname) my_free(_ALLOC_ID_, &raw->schname);
|
if(raw->schname) my_free(_ALLOC_ID_, &raw->schname);
|
||||||
|
my_strncpy(raw->filename, "", S(raw->filename));
|
||||||
if(raw->table.table) int_hash_free(&raw->table);
|
if(raw->table.table) int_hash_free(&raw->table);
|
||||||
my_free(_ALLOC_ID_, rawptr);
|
my_free(_ALLOC_ID_, rawptr);
|
||||||
if(deleted && dr) draw();
|
if(deleted && dr) draw();
|
||||||
|
|
@ -780,6 +781,7 @@ int raw_read(const char *f, Raw **rawptr, const char *type)
|
||||||
if(fd) {
|
if(fd) {
|
||||||
if((res = read_dataset(fd, rawptr, type)) == 1) {
|
if((res = read_dataset(fd, rawptr, type)) == 1) {
|
||||||
int i;
|
int i;
|
||||||
|
my_strncpy(raw->filename, f, S(raw->filename));
|
||||||
my_strdup2(_ALLOC_ID_, &raw->schname, xctx->sch[xctx->currsch]);
|
my_strdup2(_ALLOC_ID_, &raw->schname, xctx->sch[xctx->currsch]);
|
||||||
raw->level = xctx->currsch;
|
raw->level = xctx->currsch;
|
||||||
raw->allpoints = 0;
|
raw->allpoints = 0;
|
||||||
|
|
@ -922,6 +924,7 @@ int table_read(const char *f)
|
||||||
if(res == 1) {
|
if(res == 1) {
|
||||||
int i;
|
int i;
|
||||||
my_strdup2(_ALLOC_ID_, &xctx->raw->schname, xctx->sch[xctx->currsch]);
|
my_strdup2(_ALLOC_ID_, &xctx->raw->schname, xctx->sch[xctx->currsch]);
|
||||||
|
my_strncpy(xctx->raw->filename, f, S(xctx->raw->filename));
|
||||||
xctx->raw->level = xctx->currsch;
|
xctx->raw->level = xctx->currsch;
|
||||||
xctx->raw->allpoints = 0;
|
xctx->raw->allpoints = 0;
|
||||||
for(i = 0; i < xctx->raw->datasets; ++i) {
|
for(i = 0; i < xctx->raw->datasets; ++i) {
|
||||||
|
|
|
||||||
|
|
@ -766,6 +766,7 @@ struct hilight_hashentry
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/* spice raw file specific data */
|
/* spice raw file specific data */
|
||||||
char **names;
|
char **names;
|
||||||
|
char filename[PATH_MAX];
|
||||||
SPICE_DATA **values;
|
SPICE_DATA **values;
|
||||||
int nvars;
|
int nvars;
|
||||||
int *npoints;
|
int *npoints;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue