Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

select more cell <instance> does not work. #295

Open
d-m-bailey opened this issue Mar 28, 2024 · 0 comments · May be fixed by #296
Open

select more cell <instance> does not work. #295

d-m-bailey opened this issue Mar 28, 2024 · 0 comments · May be fixed by #296

Comments

@d-m-bailey
Copy link

magic version 8.3.465

Opening a hierarchical layout and executing cellname childinst will give a list of use instance names.

select cell <instance_name> will select one cell, but select more cell <instance_name> gives the following error

Couldn't find a cell use named "at"

This is caused by the argument count being decremented (for example, after processing more or less), but not accounted for when adding a coordinate value.
For example, in commands/CmdRS.c tx_argc is decremented here

        if (!strncmp(cmd->tx_argv[1], "more", arg1len))
        {
            more = TRUE;
            less = FALSE;
            optionArgs = &cmd->tx_argv[2];
            cmd->tx_argc--;
        }

but when coordinates added to original command array, since tx_argc hasa been decremented, the last value will be overwritten with at.

            {
                char *aptr;
                int i;

                window = CmdGetRootPoint((Point *) NULL, &scx.scx_area);

                /* Recast command with "at x y" at the end for logging */
                for (i = 0; i < cmd->tx_argc; i++)
                {
                    aptr = cmd->tx_argv[i] + strlen(cmd->tx_argv[i]);
                    *aptr = ' ';
                }
                sprintf(aptr + 1, "at %di %di", scx.scx_area.r_xbot,
                                scx.scx_area.r_ybot);
                TxRebuildCommand(cmd);

            }

Pull request will be posted shortly.

@d-m-bailey d-m-bailey linked a pull request Mar 28, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant