From b9c0159cd608af0ec96e5825b3477942c195813e Mon Sep 17 00:00:00 2001 From: rlar Date: Thu, 17 May 2012 19:06:08 +0200 Subject: [PATCH] misccoms.c, noask --- src/frontend/misccoms.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/frontend/misccoms.c b/src/frontend/misccoms.c index c41806db4..4359ccf78 100644 --- a/src/frontend/misccoms.c +++ b/src/frontend/misccoms.c @@ -36,20 +36,14 @@ com_quit(wordlist *wl) struct plot *pl; int ncc = 0, npl = 0; char buf[64]; - bool noask; - noask = cp_getvar("noaskquit", CP_BOOL, NULL); + bool noask = + (wl && wl->wl_word && cieq(wl->wl_word, "noask")) || + cp_getvar("noaskquit", CP_BOOL, NULL); gr_clean(); cp_ccon(FALSE); - if(wl) - if(wl->wl_word) - if(cieq(wl->wl_word, "noask")) { - byemesg(); - exit(EXIT_NORMAL); - } - /* Make sure the guy really wants to quit. */ if (!ft_nutmeg && !noask) { for (cc = ft_circuits; cc; cc = cc->ci_next)