#include <h/fmt_scan.h>
#include <h/tws.h>
#include <h/utils.h>
-#include <setjmp.h>
+#include <h/m_setjmp.h>
#include <signal.h>
/*
static struct mcomp *fmttl = NULL;
static struct mcomp global = {
- NULL, NULL, "", NULL, NULL, 0, -1, 80, -1, 40, BELL, 0
+ NULL, NULL, NULL, NULL, NULL, NULL, 0, -1, 80, -1, 40, BELL, NULL
};
static struct mcomp holder = {
- NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, NOCOMPONENT, 0
+ NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, NOCOMPONENT, NULL
};
struct pair {
static int ontty = NOTTY;
static int row;
-static int column;
+static unsigned int column;
static int lm;
static int llim;
static int ovoff;
static int term;
-static int wid;
+static unsigned int wid;
static char *ovtxt;
FILE *fp = NULL;
struct mcomp *c1;
- switch (setjmp (env)) {
+ switch (m_setjmp (env)) {
case OK:
if (fname) {
fp = mhl_action ? (*mhl_action) (fname) : fopen (fname, "r");
if (cchdr) {
if (flag == TWOCOMP)
count = (c1->c_cwidth >= 0) ? c1->c_cwidth
- : strlen (c2->c_name) + 2;
+ : (int) strlen (c2->c_name) + 2;
else
- count = (c1->c_cwidth >= 0) ? c1->c_cwidth
+ count = (c1->c_cwidth >= 0) ? (size_t) c1->c_cwidth
: strlen (c1->c_text ? c1->c_text : c1->c_name) + 2;
}
count += c1->c_offset;
static void
intrser (int i)
{
-#ifndef RELIABLE_SIGNALS
- SIGNAL (SIGINT, intrser);
-#endif
+ NMH_UNUSED (i);
discard (stdout);
putchar ('\n');
static void
pipeser (int i)
{
-#ifndef RELIABLE_SIGNALS
- SIGNAL (SIGPIPE, pipeser);
-#endif
+ NMH_UNUSED (i);
done (NOTOK);
}
static void
quitser (int i)
{
-#ifndef RELIABLE_SIGNALS
- SIGNAL (SIGQUIT, quitser);
-#endif
+ NMH_UNUSED (i);
putchar ('\n');
fflush (stdout);
return NOTOK;
}
- for (i = 0; (child_id = vfork()) == NOTOK && i < 5; i++)
+ for (i = 0; (child_id = m_vfork()) == NOTOK && i < 5; i++)
sleep (5);
switch (child_id) {
char *cp = NULL;
struct mcomp *c1;
- switch (setjmp (mhlenv)) {
+ switch (m_setjmp (mhlenv)) {
case OK:
cp = invo_name;
sleepsw = 0; /* XXX */
if (pipe (pd) == NOTOK)
adios ("pipe", "unable to");
- switch (m_pid = vfork ()) {
+ switch (m_pid = m_vfork()) {
case NOTOK:
adios ("fork", "unable to");