- added general binary scriptcontext protocoll

- improved some drivers
This commit is contained in:
zolliker
2010-09-02 11:41:31 +00:00
parent 1e9f9d408c
commit bc2c9e5a3e
10 changed files with 528 additions and 27 deletions

View File

@ -282,11 +282,11 @@ static int ParSaveAll(void *object, char *name, FILE * fil)
ctx->saveFile = fil;
assert(0 == strcasecmp(o->name, name));
if (o->creationCmd) {
fprintf(fil, "if {[catch { %s }] == 0} {\n", o->creationCmd);
fprintf(fil, "%s\n", o->creationCmd);
}
ParDo(0, o, PAR_SAVE, NULL);
if (o->creationCmd) {
fprintf(fil, " %s endinit\n}\n", name);
fprintf(fil, "%s endinit\n\n", name);
}
ctx->saveFile = NULL;
ret = ctx->returnValue;
@ -940,10 +940,10 @@ ParOp ParWhat(int numeric)
}
if (ctx->par->saveLog) {
if (ctx->par->log) {
fprintf(ctx->saveFile, " %s log %s %s\n", ctx->obj->name,
fprintf(ctx->saveFile, "%s log %s %s\n", ctx->obj->name,
ctx->parName, LoggerName(ctx->par->log));
} else {
fprintf(ctx->saveFile, " %s unlog %s\n", ctx->obj->name,
fprintf(ctx->saveFile, "%s unlog %s\n", ctx->obj->name,
ctx->parName);
}
}
@ -1104,10 +1104,10 @@ void ParOut(char *buf)
break;
case PAR_SAVE:
if (strchr(buf, '\n') != NULL) {
fprintf(ctx->saveFile, " %s %s {%s}\n", ctx->obj->name,
fprintf(ctx->saveFile, "%s %s {%s}\n", ctx->obj->name,
ctx->parName, buf);
} else {
fprintf(ctx->saveFile, " %s %s %s\n", ctx->obj->name,
fprintf(ctx->saveFile, "%s %s %s\n", ctx->obj->name,
ctx->parName, buf);
}
break;