- Added bridge functions to histmemsec to make it look more like histmem
- Modifed many modules using histmem to work also with histmemsec - Extended tasker with task names and task groups - There is a new taskobj which allows to list tasks and to interact with them. - Task now supports running Tcl functions as tasks - There is a new experimental sctcomtask module which allows to define communication tasks against a scriptcontext. This is a new feature which should facilitate writing sequential scripts using asynchronous communication. - A fix to make spss7 work when there are no switches - ORION support for single X. TRICS measures crystals hanging down, ORION standing up SKIPPED: psi/ease.c psi/faverage.c psi/jvlprot.c psi/make_gen psi/pardef.c psi/polterwrite.c psi/psi.c psi/sinq.c psi/spss7.c
This commit is contained in:
84
sicsobj.c
84
sicsobj.c
@ -36,56 +36,6 @@ void DefaultFree(void *data)
|
||||
free(data);
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void saveSICSNodeBroken(pHdb node, char *prefix, FILE * fd)
|
||||
{
|
||||
/*
|
||||
nodes with the property __save are saved
|
||||
special cases:
|
||||
__save=update: a hupdate command is used instead of a set command
|
||||
__save=kids: save kids, but not the value of this node
|
||||
*/
|
||||
char newprefix[1024], val[20];
|
||||
char path[MAX_HDB_PATH];
|
||||
pHdb child;
|
||||
hdbValue v;
|
||||
pDynString data = NULL;
|
||||
char *cmd;
|
||||
char *str, *value;
|
||||
|
||||
cmd = GetHdbProp(node, "creationCmd");
|
||||
if (cmd != NULL) {
|
||||
GetHdbPath(node, path, sizeof path);
|
||||
fprintf(fd, cmd, prefix, path);
|
||||
fprintf(fd, "\n");
|
||||
}
|
||||
if (GetHdbProperty(node, "__save", val, 20) == 1) {
|
||||
if (strcasecmp(val, "kids") != 0) {
|
||||
GetHipadabaPar(node, &v, NULL);
|
||||
data = formatValue(v, node);
|
||||
if (data != NULL) {
|
||||
value = GetCharArray(data);
|
||||
str = Arg2Tcl(1, &value, NULL, 0);
|
||||
if (strcasecmp(val, "update") == 0) {
|
||||
GetHdbPath(node, path, sizeof path);
|
||||
fprintf(fd, "hupdate %s %s\n", path, str);
|
||||
} else {
|
||||
fprintf(fd, "%s %s\n", prefix, str);
|
||||
}
|
||||
DeleteDynString(data);
|
||||
free(str);
|
||||
}
|
||||
ReleaseHdbValue(&v);
|
||||
}
|
||||
}
|
||||
child = node->child;
|
||||
while (child != NULL) {
|
||||
snprintf(newprefix, 1024, "%s/%s", prefix, child->name);
|
||||
saveSICSNodeBroken(child, newprefix, fd);
|
||||
child = child->next;
|
||||
}
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void saveSICSNode(pHdb node, char *prefix, FILE * fd)
|
||||
{
|
||||
@ -144,40 +94,6 @@ int SaveSICSOBJ(void *data, char *name, FILE * fd)
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
int SaveSICSOBJBroken(void *data, char *name, FILE * fd)
|
||||
{
|
||||
pSICSOBJ self = (pSICSOBJ) data;
|
||||
char prefix[1024];
|
||||
char path[MAX_HDB_PATH];
|
||||
pHdb node;
|
||||
char *cmd;
|
||||
|
||||
if (self != NULL && self->objectNode != NULL) {
|
||||
/*
|
||||
node = self->objectNode->child;
|
||||
cmd = GetHdbProp(self->objectNode, "creationCmd");
|
||||
if (cmd != NULL) {
|
||||
GetHdbPath(self->objectNode, path, sizeof path);
|
||||
fprintf(fd, cmd, name, path);
|
||||
fprintf(fd, "\n");
|
||||
}
|
||||
while (node != NULL) {
|
||||
snprintf(prefix, 1024, "%s %s", name, node->name);
|
||||
saveSICSNode(node, prefix, fd);
|
||||
node = node->next;
|
||||
}
|
||||
*/
|
||||
node = self->objectNode;
|
||||
snprintf(prefix, 1024, "%s %s", name, node->name);
|
||||
saveSICSNode(node, prefix, fd);
|
||||
fprintf(fd, "\n");
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void KillSICSOBJfromNode(void *userData)
|
||||
{
|
||||
|
Reference in New Issue
Block a user