Modified the "cmdDumpParseArgs()" routine (used, for instance, by

the "getcell" command) so that the "parent" and "child" arguments
will accept the standard syntax for coordinates used by most other
commands (will accept SI units or trailing suffix i/l for internal
or lambda units).
This commit is contained in:
Tim Edwards 2021-05-23 14:09:50 -04:00
parent 5e02726f7f
commit e6f17735b8
1 changed files with 6 additions and 16 deletions

View File

@ -4396,15 +4396,10 @@ cmdDumpParseArgs(cmdName, w, cmd, dummy, scx)
TxError("Keyword must be followed by a reference point\n");
goto usage;
}
if (StrIsInt(av[1]))
else if (ac == 3)
{
childPoint.p_x = atoi(av[1]);
if (ac < 3 || !StrIsInt(av[2]))
{
TxError("Must provide two coordinates\n");
goto usage;
}
childPoint.p_y = atoi(av[2]);
childPoint.p_x = cmdParseCoord(w, av[1], TRUE, TRUE);
childPoint.p_y = cmdParseCoord(w, av[2], TRUE, FALSE);
av += 3;
ac -= 3;
}
@ -4455,15 +4450,10 @@ cmdDumpParseArgs(cmdName, w, cmd, dummy, scx)
TxError("Keyword must be followed by a reference point\n");
goto usage;
}
if (StrIsInt(av[1]))
else if (ac == 3)
{
editPoint.p_x = atoi(av[1]);
if (ac < 3 || !StrIsInt(av[2]))
{
TxError("Must provide two coordinates\n");
goto usage;
}
editPoint.p_y = atoi(av[2]);
editPoint.p_x = cmdParseCoord(w, av[1], TRUE, TRUE);
editPoint.p_y = cmdParseCoord(w, av[2], TRUE, FALSE);
av += 3;
ac -= 3;
GeoTransPoint(&EditToRootTransform, &editPoint,