# -DAUTHENTICATE
CXXFLAGS += -DUSE_TERMIO -DKLUDGELINEMODE
LIBS += $(LIBTERMCAP)
LIBS += $(LIBTERMCAP) -lcurses
SRCS = commands.cc main.cc network.cc ring.cc sys_bsd.cc telnet.cc \
terminal.cc tn3270.cc utilities.cc genget.cc environ.cc netlink.cc
return 0;
}
static char *rcname = 0;
char *rcname = NULL;
static char rcbuf[128];
void cmdrc(const char *m1, const char *m2) {
FILE *rcfile;
strcpy(m1save, m1);
m1 = m1save;
if (rcname == 0) {
if (asprintf (&rcname, "%s/.telnetrc", getenv ("HOME")) == -1)
rcname = getenv("HOME");
{
if (rcname)
perror ("asprintf");
strcpy(rcbuf, rcname);
return;
else
rcbuf[0] = '\0';
strcat(rcbuf, "/.telnetrc");
rcname = rcbuf;
rcfile = fopen(rcname, "r");
if (!rcfile) return;
continue;
process_command(&cmdtab, margc, margv);
free (rcname);
fclose(rcfile);
#include "../version.h"
#include <stdlib.h>
#include <sys/types.h>
#include <getopt.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
char net_rcsid[] =
"$Id: network.cc,v 1.15 1996/08/13 08:09:58 dholland Exp $";
#include <sys/time.h>
#include <termios.h>
#include <signal.h>
#include <errno.h>
#include <ctype.h>
#include "ring.h"
CFLAGS += '-DISSUE_FILE="/etc/issue.net"' -DPARANOID_TTYS \
-DNO_REVOKE -DKLUDGELINEMODE -DDIAGNOSTICS
# LIBS += $(LIBTERMCAP)
LIBS += -lutil
OBJS = telnetd.o state.o termstat.o slc.o sys_term.o utility.o \
global.o setproctitle.o
#endif
netoprintf("\r\n[%s : yes]\r\n", host_name);
netoprintf("\r\n[Yes]\r\n");
void doeof(void) {
void
netoprintf(const char *fmt, ...)
int len, maxsize;
int len = 0, maxsize;
va_list ap;
int done=0;
while (!done) {
maxsize = sizeof(netobuf) - (nfrontp - netobuf);
if (maxsize < 0) {
/* no way this is gonna fit - try to flush some */
netflush();
if (maxsize < 0)
break;
va_start(ap, fmt);
len = vsnprintf(nfrontp, maxsize, fmt, ap);
va_end(ap);
if (len<0 || len==maxsize) {
if (len<=0 || len==maxsize) {
/* didn't fit */