- added general binary scriptcontext protocoll
- improved some drivers
This commit is contained in:
12
pardef.c
12
pardef.c
@ -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;
|
||||
|
Reference in New Issue
Block a user