From 4bea0aadcf037dcec5f22f79a9e13f75b9cc9daa Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sun, 27 Jan 2019 12:41:53 +0100 Subject: [PATCH] use fcn plot_get --- src/frontend/vectors.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/frontend/vectors.c b/src/frontend/vectors.c index 76c59e50a..12f86719f 100644 --- a/src/frontend/vectors.c +++ b/src/frontend/vectors.c @@ -1000,13 +1000,9 @@ plot_setcur(char *name) plot_cur = prev_pl; return; } - for (pl = plot_list; pl; pl = pl->pl_next) - if (plot_prefix(name, pl->pl_typename)) - break; - if (!pl) { - fprintf(cp_err, "Error: no such plot named %s\n", name); + pl = get_plot(name); + if (!pl) return; - } /* va: we skip cp_kwswitch, because it confuses the keyword-tree management for * repeated op-commands. When however cp_kwswitch is necessary for other * reasons, we should hold the original keyword table pointer in an