* complete copyright information.
*/
-#include <h/mh.h>
+#include "h/mh.h"
+#include "sbr/m_gmprot.h"
+#include "sbr/m_getfld.h"
+#include "sbr/getarguments.h"
+#include "sbr/smatch.h"
+#include "sbr/cpydata.h"
+#include "sbr/m_atoi.h"
+#include "sbr/context_save.h"
+#include "sbr/ambigsw.h"
+#include "sbr/print_version.h"
+#include "sbr/print_help.h"
+#include "sbr/error.h"
#include <fcntl.h>
-#include <h/signals.h>
+#include "h/signals.h"
#include "h/done.h"
-#include <h/utils.h>
+#include "h/utils.h"
#include "sbr/m_mktemp.h"
#include <setjmp.h>
static struct termios tio;
static bool wtuser;
-static int sigint = 0;
+static bool sigint;
static jmp_buf sigenv;
/*
int
main (int argc, char **argv)
{
- int body = 1, prepend = 1, rapid = 0;
- int doteof = 0, fdi, fdo, i, state;
+ bool body = true;
+ bool prepend = true;
+ bool rapid = false;
+ bool doteof = false;
+ int fdi, fdo, i, state;
char *cp, *drft = NULL, *erasep = NULL;
char *killp = NULL, name[NAMESZ], field[NMH_BUFSIZ];
char buffer[BUFSIZ];
continue;
case PREPSW:
- prepend++;
+ prepend = true;
continue;
case NPREPSW:
- prepend = 0;
+ prepend = false;
continue;
case RAPDSW:
- rapid++;
+ rapid = true;
continue;
case NRAPDSW:
- rapid = 0;
+ rapid = false;
continue;
case BODYSW:
- body++;
+ body = true;
continue;
case NBODYSW:
- body = 0;
+ body = false;
continue;
case DOTSW:
- doteof++;
+ doteof = true;
continue;
case NDOTSW:
- doteof = 0;
+ doteof = false;
continue;
}
} else {
tio.c_cc[VERASE] = save_erase;
}
- sigint = 0;
+ sigint = false;
SIGNAL2 (SIGINT, intrser);
/*
if (wtuser)
longjmp (sigenv, NOTOK);
- sigint++;
+ sigint = true;
}