#include "../include/fileutils.h"
#include "../include/nls.h"
+#include "../proc/alloc.h"
#include "../proc/devname.h"
#include "../proc/numa.h"
#include "../proc/procps.h"
Frames_signal = BREAK_sig;
(void)dont_care_sig;
} // end: sig_resize
+
+
+ /*
+ * Handles libproc memory errors, so our tty can be reset */
+static void xalloc_our_handler (const char *fmts, ...) {
+ static char buf[MEDBUFSIZ];
+ va_list va;
+
+ va_start(va, fmts);
+ vsnprintf(buf, sizeof(buf), fmts, va);
+ va_end(va);
+ scat(buf, "\n");
+ bye_bye(buf);
+} // end: xalloc_our_handler
\f
/*###### Special UTF-8 Multi-Byte support ##############################*/
// accommodate nls/gettext potential translations
initialize_nls();
+ // override default library memory alloc error handler
+ xalloc_err_handler = xalloc_our_handler;
+
// establish cpu particulars
#ifdef PRETEND8CPUS
smp_num_cpus = 8;
//atic void sig_endpgm (int dont_care_sig);
//atic void sig_paused (int dont_care_sig);
//atic void sig_resize (int dont_care_sig);
+//atic void xalloc_our_handler (const char *fmts, ...);
/*------ Special UTF-8 Multi-Byte support ------------------------------*/
/*atic char UTF8_tab[] = { ... } */
//atic int utf8_delta (const char *str);