#include <termios.h>
#include <pwd.h>
-#include <h/m_setjmp.h>
+#include <setjmp.h>
#include <signal.h>
#include <h/msh.h>
#include <h/vmhsbr.h>
*/
void fsetup (char *);
void setup (char *);
-FILE *msh_ready (int, int);
void readids (int);
int readid (int);
void display_info (int);
static int read_file (long, int);
static void m_gMsgs (int);
-FILE *msh_ready (int, int);
static int check_folder (int);
static void scanrange (int, int);
static void scanstring (char *);
case HELPSW:
snprintf (buf, sizeof(buf), "%s [switches] file", invo_name);
print_help (buf, switches, 1);
- done (1);
+ done (0);
case VERSIONSW:
print_version(invo_name);
- done (1);
+ done (0);
case IDSW:
if (!(cp = *argp++) || *cp == '-')
FILE *
msh_ready (int msgnum, int full)
{
- NMH_UNUSED (full);
register int msgp;
int fd;
char *cp;
+ NMH_UNUSED (full);
if (yp) {
fclose (yp);
return Msgs[msgnum].m_bboard_id;
zp = msh_ready (msgnum, 0);
- for (state = FLD;;)
- switch (state = m_getfld (state, name, buf, sizeof(buf), zp)) {
+ for (state = FLD;;) {
+ int bufsz = sizeof buf;
+ switch (state = m_getfld (state, name, buf, &bufsz, zp)) {
case FLD:
case FLDEOF:
case FLDPLUS:
if (!mh_strcasecmp (name, BBoard_ID)) {
bp = getcpy (buf);
while (state == FLDPLUS) {
- state = m_getfld (state, name, buf, sizeof(buf), zp);
+ bufsz = sizeof buf;
+ state = m_getfld (state, name, buf, &bufsz, zp);
bp = add (buf, bp);
}
i = atoi (bp);
continue;
}
while (state == FLDPLUS)
- state = m_getfld (state, name, buf, sizeof(buf), zp);
+ bufsz = sizeof buf;
+ state = m_getfld (state, name, buf, &bufsz, zp);
if (state != FLDEOF)
continue;
default:
return 0;
}
+ }
}
{
int status;
- switch (m_setjmp (peerenv)) {
+ switch (setjmp (peerenv)) {
case OK:
SIGNAL (SIGALRM, alrmser);
alarm (ALARM);