Fixed the "writeall force" command, which was behaving exactly the

same as "writeall", meaning that "force" was not being honored and
only cells that were modified were being written, in either case.
This commit is contained in:
Tim Edwards 2019-06-04 16:17:17 -04:00
parent 8170dbe01f
commit 8f7db3942c
1 changed files with 9 additions and 6 deletions

View File

@ -1736,17 +1736,20 @@ CmdWriteall(w, cmd)
int cmdWriteallFunc();
static char *force[] = { "force", 0 };
int argc;
int flags = CDMODIFIED | CDBOXESCHANGED | CDSTAMPSCHANGED;
if ((cmd->tx_argc >= 2) && (Lookup(cmd->tx_argv[1], force) < 0))
if (cmd->tx_argc >= 2)
{
TxError("Usage: %s [force [cellname ...]]\n", cmd->tx_argv[0]);
return;
flags = 0;
if (Lookup(cmd->tx_argv[1], force) < 0)
{
TxError("Usage: %s [force [cellname ...]]\n", cmd->tx_argv[0]);
return;
}
}
DBUpdateStamps();
argc = cmd->tx_argc;
(void) DBCellSrDefs(CDMODIFIED|CDBOXESCHANGED|CDSTAMPSCHANGED,
cmdWriteallFunc, (ClientData)cmd);
(void) DBCellSrDefs(flags, cmdWriteallFunc, (ClientData)cmd);
cmd->tx_argc = argc;
}