#if defined(__BEOS__) || defined(MICRO) || defined(WIN32) || defined(OS2)
extern void FDECL(nethack_exit,(int));
#else
-#define nethack_exit exit
+# define nethack_exit exit
#endif
#define done_stopprint program_state.stopprint
# define NH_abort_() Abort(0)
#else
# ifdef SYSV
-# define NH_abort_() (void) abort()
+# define NH_abort_() (void) abort()
# else
# ifdef WIN32
-# define NH_abort_() win32_abort()
+# define NH_abort_() win32_abort()
# else
-# define NH_abort_() abort()
+# define NH_abort_() abort()
# endif
-# endif
-#endif
+# endif /* !SYSV */
+#endif /* !AMIGA */
#ifdef PANICTRACE
# include <errno.h>
# endif
static void NDECL(NH_abort);
-#ifndef NO_SIGNAL
+# ifndef NO_SIGNAL
static void FDECL(panictrace_handler, (int));
-#endif
+# endif
static boolean NDECL(NH_panictrace_glibc);
static boolean NDECL(NH_panictrace_gdb);
-#ifndef NO_SIGNAL
+# ifndef NO_SIGNAL
/*ARGSUSED*/
void
panictrace_handler(sig_unused) /* called as signal() handler, so sent at least one arg */
int sig_unused;
{
-# define SIG_MSG "\nSignal received.\n"
+# define SIG_MSG "\nSignal received.\n"
(void) write(2, SIG_MSG, sizeof(SIG_MSG)-1);
NH_abort();
}
panictrace_setsignals(set)
boolean set;
{
-# define SETSIGNAL(sig) (void) signal(sig, set?(SIG_RET_TYPE)panictrace_handler:SIG_DFL);
+# define SETSIGNAL(sig) (void) signal(sig, set?(SIG_RET_TYPE)panictrace_handler:SIG_DFL);
# ifdef SIGILL
SETSIGNAL(SIGILL);
# endif
# ifdef SIGEMT
SETSIGNAL(SIGEMT);
# endif
-# undef SETSIGNAL
+# undef SETSIGNAL
}
-#endif
+# endif /* NO_SIGNAL */
static void
NH_abort(){
NH_panictrace_glibc() || (gdb_prio && NH_panictrace_gdb());
}
+# ifndef NO_SIGNAL
panictrace_setsignals(FALSE);
+# endif
NH_abort_();
}
return TRUE;
# else
return FALSE;
-# endif
+# endif /* !PANICTRACE_GLIBC */
}
# ifdef PANICTRACE_GDB
# ifndef GDBPATH
# define GDBPATH "/usr/bin/gdb"
# endif
-# endif
-# endif
+# endif /* !SYSCF */
+# endif /* PANICTRACE_GDB */
static boolean
NH_panictrace_gdb(){
}
# else
return FALSE;
-# endif
+# endif /* !PANICTRACE_GDB */
}
-#endif
+#endif /* PANICTRACE */
/*
* The order of these needs to match the macros in hack.h.