remake  4.3+dbg-1.5
quit.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2004-2005, 2007-2009, 2011, 2020 R. Bernstein
3 <rocky@gnu.org>
4 This file is part of GNU Make (remake variant).
5 
6 GNU Make is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10 
11 GNU Make is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15 
16 You should have received a copy of the GNU General Public License
17 along with GNU Make; see the file COPYING. If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
20 /* Terminate execution. */
21 static debug_return_t
22 dbg_cmd_quit(char *psz_arg)
23 {
24  if (!psz_arg || !*psz_arg) {
26  dbg_msg("remake: That's all, folks...\n");
28  } else {
29  int rc=0;
30  if (get_int(psz_arg, &rc, true)) {
31  dbg_msg("remake: That's all, folks...\n");
32  die(rc);
33  }
34  }
35  return debug_readloop;
36 }
37 
38 static void
39 dbg_cmd_quit_init(unsigned int c)
40 {
41  short_command[c].func = &dbg_cmd_quit;
42  short_command[c].use = _("quit [exit-status]");
43 }
44 
45 /*
46  * Local variables:
47  * c-file-style: "gnu"
48  * indent-tabs-mode: nil
49  * End:
50  */
int in_debugger
debug_return_t
Definition: trace.h:32
#define _(msgid)
Definition: make.h:293
Definition: trace.h:40
void die(int)
void dbg_msg()
Definition: debug.h:59
bool get_int(const char *psz_arg, int *pi_result, bool b_warn)