extern NORETURN void nomem (long) ATTR_NORETURN;
-/* Reasons for calling return_to_top_level. */
+/* Reasons for calling return_to_top_level. Note: enum value 0 is
+ reserved for internal use as the return value from an initial
+ setjmp(). */
enum return_reason
{
/* User interrupt. */
- RETURN_QUIT,
+ RETURN_QUIT = 1,
/* Any other error. */
RETURN_ERROR
};
#define ALL_CLEANUPS ((struct cleanup *)0)
-#define RETURN_MASK_QUIT (1 << (int)RETURN_QUIT)
-#define RETURN_MASK_ERROR (1 << (int)RETURN_ERROR)
-#define RETURN_MASK_ALL (RETURN_MASK_QUIT | RETURN_MASK_ERROR)
+#define RETURN_MASK(reason) (1 << (int)(reason))
+#define RETURN_MASK_QUIT RETURN_MASK (RETURN_QUIT)
+#define RETURN_MASK_ERROR RETURN_MASK (RETURN_ERROR)
+#define RETURN_MASK_ALL (RETURN_MASK_QUIT | RETURN_MASK_ERROR)
typedef int return_mask;
extern NORETURN void return_to_top_level (enum return_reason) ATTR_NORETURN;
/* Hooks for alternate command interfaces. */
+#ifdef UI_OUT
+/* The name of the interpreter if specified on the command line. */
+extern char *interpreter_p;
+#endif
+
+/* If a given interpreter matches INTERPRETER_P then it should update
+ command_loop_hook and init_ui_hook with the per-interpreter
+ implementation. */
+/* FIXME: command_loop_hook and init_ui_hook should be moved here. */
+
struct target_waitstatus;
struct cmd_list_element;