-/* $OpenBSD: commands.c,v 1.65 2014/07/20 09:59:42 guenther Exp $ */
+/* $OpenBSD: commands.c,v 1.66 2014/07/20 10:18:10 guenther Exp $ */
/* $NetBSD: commands.c,v 1.14 1996/03/24 22:03:48 jtk Exp $ */
/*
if ((s = GETSEND(argv[i])) == 0) {
fprintf(stderr, "Telnet 'send' error - argument disappeared!\r\n");
quit();
- /*NOTREACHED*/
}
if (s->handler) {
count++;
return 1;
}
- /*VARARGS*/
static int
togcrmod()
{
return 1;
}
- /*VARARGS*/
int
telnetsuspend()
{
return 1;
}
- /*ARGSUSED*/
int
shell(argc, argv)
int argc;
return 1;
}
- /*VARARGS*/
static int
bye(argc, argv)
int argc; /* Number of arguments */
/* reset options */
tninit();
}
- if ((argc != 2) || (strcmp(argv[1], "fromquit") != 0)) {
+ if ((argc != 2) || (strcmp(argv[1], "fromquit") != 0))
longjmp(toplevel, 1);
- /* NOTREACHED */
- }
- return 0; /* NOTREACHED */
+ return 0;
}
void
quit();
}
-/*VARARGS*/
static int
logout()
{
/*
* Print status about the connection.
*/
- /*ARGSUSED*/
static int
status(argc, argv)
int argc;
telnet(user);
(void) NetClose(net);
ExitString("Connection closed by foreign host.\r\n",1);
- /*NOTREACHED*/
- return 0;
}
#define HELPINDENT (sizeof ("connect"))
if (rlogin != _POSIX_VDISABLE)
printf("%s> ", prompt);
if (fgets(line, sizeof(line), stdin) == NULL) {
- if (feof(stdin) || ferror(stdin)) {
+ if (feof(stdin) || ferror(stdin))
quit();
- /*NOTREACHED*/
- }
break;
}
}
}
}
if (!top) {
- if (!connected) {
+ if (!connected)
longjmp(toplevel, 1);
- /*NOTREACHED*/
- }
setconnmode(0);
}
}
-/* $OpenBSD: externs.h,v 1.24 2014/07/20 09:31:25 guenther Exp $ */
+/* $OpenBSD: externs.h,v 1.25 2014/07/20 10:18:10 guenther Exp $ */
/* $KTH: externs.h,v 1.16 1997/11/29 02:28:35 joda Exp $ */
/*
/* main.c */
void tninit(void);
-void usage(void);
/* network.c */
void EmptyTerminal(void);
void SetForExit(void);
__dead void Exit(int returnCode);
-void ExitString(char *string, int returnCode);
+__dead void ExitString(char *string, int returnCode);
extern struct termios new_tc;
-/* $OpenBSD: main.c,v 1.26 2014/07/20 08:12:45 guenther Exp $ */
+/* $OpenBSD: main.c,v 1.27 2014/07/20 10:18:10 guenther Exp $ */
/* $NetBSD: main.c,v 1.5 1996/02/28 21:04:05 thorpej Exp $ */
/*
init_sys();
}
- void
-usage()
+static __dead void
+usage(void)
{
extern char *__progname;
case '?':
default:
usage();
- /* NOTREACHED */
}
}
-/* $OpenBSD: network.c,v 1.14 2014/07/20 08:56:47 guenther Exp $ */
+/* $OpenBSD: network.c,v 1.15 2014/07/20 10:18:10 guenther Exp $ */
/* $NetBSD: network.c,v 1.5 1996/02/28 21:04:06 thorpej Exp $ */
/*
(void)NetClose(net);
ring_clear_mark(&netoring);
longjmp(peerdied, -1);
- /*NOTREACHED*/
}
n = 0;
}
-/* $OpenBSD: sys_bsd.c,v 1.23 2014/07/20 09:59:42 guenther Exp $ */
+/* $OpenBSD: sys_bsd.c,v 1.24 2014/07/20 10:18:10 guenther Exp $ */
/* $NetBSD: sys_bsd.c,v 1.11 1996/02/28 21:04:10 thorpej Exp $ */
/*
* Various signal handling routines.
*/
- /* ARGSUSED */
void
deadpeer(sig)
int sig;
longjmp(peerdied, -1);
}
- /* ARGSUSED */
void
intr(sig)
int sig;
longjmp(toplevel, -1);
}
- /* ARGSUSED */
void
intr2(sig)
int sig;
}
}
- /* ARGSUSED */
void
susp(sig)
int sig;
}
#ifdef SIGWINCH
- /* ARGSUSED */
void
sendwin(sig)
int sig;
#endif
#ifdef SIGINFO
- /* ARGSUSED */
void
ayt(sig)
int sig;
-/* $OpenBSD: telnet.c,v 1.25 2014/07/20 08:56:47 guenther Exp $ */
+/* $OpenBSD: telnet.c,v 1.26 2014/07/20 10:18:10 guenther Exp $ */
/* $NetBSD: telnet.c,v 1.7 1996/02/28 21:04:15 thorpej Exp $ */
/*
TELQUAL_IS, name, IAC, SE);
ring_supply_data(&netoring, temp, len);
printsub('>', &temp[2], len-2);
- } else {
+ } else
ExitString("No room in buffer for terminal type.\n", 1);
- /*NOTREACHED*/
- }
}
break;
case TELOPT_TSPEED: