Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 64632 | Differences between
and this patch

Collapse All | Expand All

(-)./netkit-telnet-0.17/telnet/Makefile (-1 / +1 lines)
Lines 7-13 Link Here
7
7
8
# -DAUTHENTICATE
8
# -DAUTHENTICATE
9
CXXFLAGS += -DUSE_TERMIO -DKLUDGELINEMODE
9
CXXFLAGS += -DUSE_TERMIO -DKLUDGELINEMODE
10
LIBS += $(LIBTERMCAP)
10
LIBS += $(LIBTERMCAP) -lcurses
11
11
12
SRCS = commands.cc main.cc network.cc ring.cc sys_bsd.cc telnet.cc \
12
SRCS = commands.cc main.cc network.cc ring.cc sys_bsd.cc telnet.cc \
13
	terminal.cc tn3270.cc utilities.cc genget.cc environ.cc netlink.cc
13
	terminal.cc tn3270.cc utilities.cc genget.cc environ.cc netlink.cc
(-)./netkit-telnet-0.17/telnet/commands.cc (-11 / +7 lines)
Lines 2013-2020 Link Here
2013
    return 0;
2013
    return 0;
2014
}
2014
}
2015
2015
2016
static char *rcname = 0;
2016
char *rcname = NULL;
2017
static char rcbuf[128];
2018
2017
2019
void cmdrc(const char *m1, const char *m2) {
2018
void cmdrc(const char *m1, const char *m2) {
2020
    FILE *rcfile;
2019
    FILE *rcfile;
Lines 2028-2042 Link Here
2028
    strcpy(m1save, m1);
2027
    strcpy(m1save, m1);
2029
    m1 = m1save;
2028
    m1 = m1save;
2030
2029
2031
    if (rcname == 0) {
2030
	if (asprintf (&rcname, "%s/.telnetrc", getenv ("HOME")) == -1)
2032
	rcname = getenv("HOME");
2031
	{
2033
	if (rcname)
2032
		perror ("asprintf");
2034
	    strcpy(rcbuf, rcname);
2033
		return;
2035
	else
2034
	}
2036
	    rcbuf[0] = '\0';
2037
	strcat(rcbuf, "/.telnetrc");
2038
	rcname = rcbuf;
2039
    }
2040
2035
2041
    rcfile = fopen(rcname, "r");
2036
    rcfile = fopen(rcname, "r");
2042
    if (!rcfile) return;
2037
    if (!rcfile) return;
Lines 2070-2075 Link Here
2070
	    continue;
2065
	    continue;
2071
	process_command(&cmdtab, margc, margv);
2066
	process_command(&cmdtab, margc, margv);
2072
    }
2067
    }
2068
    free (rcname);
2073
    fclose(rcfile);
2069
    fclose(rcfile);
2074
}
2070
}
2075
2071
(-)./netkit-telnet-0.17/telnet/main.cc (+1 lines)
Lines 43-48 Link Here
43
43
44
#include "../version.h"
44
#include "../version.h"
45
45
46
#include <stdlib.h>
46
#include <sys/types.h>
47
#include <sys/types.h>
47
#include <getopt.h>
48
#include <getopt.h>
48
#include <string.h>
49
#include <string.h>
(-)./netkit-telnet-0.17/telnet/netlink.cc (+1 lines)
Lines 2-7 Link Here
2
#include <stdio.h>
2
#include <stdio.h>
3
#include <unistd.h>
3
#include <unistd.h>
4
#include <stdlib.h>
4
#include <stdlib.h>
5
#include <string.h>
5
#include <sys/socket.h>
6
#include <sys/socket.h>
6
#include <netinet/in.h>
7
#include <netinet/in.h>
7
#include <arpa/inet.h>
8
#include <arpa/inet.h>
(-)./netkit-telnet-0.17/telnet/network.cc (+1 lines)
Lines 37-42 Link Here
37
char net_rcsid[] = 
37
char net_rcsid[] = 
38
  "$Id: network.cc,v 1.15 1996/08/13 08:09:58 dholland Exp $";
38
  "$Id: network.cc,v 1.15 1996/08/13 08:09:58 dholland Exp $";
39
39
40
#include <stdlib.h>
40
#include <sys/types.h>
41
#include <sys/types.h>
41
#include <sys/socket.h>
42
#include <sys/socket.h>
42
#include <sys/time.h>
43
#include <sys/time.h>
(-)./netkit-telnet-0.17/telnet/terminal.cc (+2 lines)
Lines 41-46 Link Here
41
#include <sys/types.h>
41
#include <sys/types.h>
42
#include <sys/time.h>
42
#include <sys/time.h>
43
#include <termios.h>
43
#include <termios.h>
44
#include <string.h>
45
#include <stdlib.h>
44
#include <unistd.h>
46
#include <unistd.h>
45
#include <signal.h>
47
#include <signal.h>
46
#include <errno.h>
48
#include <errno.h>
(-)./netkit-telnet-0.17/telnet/utilities.cc (+2 lines)
Lines 46-51 Link Here
46
#include <sys/time.h>
46
#include <sys/time.h>
47
#include <sys/socket.h>
47
#include <sys/socket.h>
48
#include <unistd.h>
48
#include <unistd.h>
49
#include <string.h>
50
#include <stdlib.h>
49
#include <ctype.h>
51
#include <ctype.h>
50
52
51
#include "ring.h"
53
#include "ring.h"
(-)./netkit-telnet-0.17/telnetd/Makefile (-1 / +1 lines)
Lines 10-16 Link Here
10
10
11
CFLAGS += '-DISSUE_FILE="/etc/issue.net"' -DPARANOID_TTYS \
11
CFLAGS += '-DISSUE_FILE="/etc/issue.net"' -DPARANOID_TTYS \
12
	   -DNO_REVOKE -DKLUDGELINEMODE -DDIAGNOSTICS
12
	   -DNO_REVOKE -DKLUDGELINEMODE -DDIAGNOSTICS
13
# LIBS += $(LIBTERMCAP)
13
LIBS += -lutil
14
14
15
OBJS = telnetd.o state.o termstat.o slc.o sys_term.o utility.o \
15
OBJS = telnetd.o state.o termstat.o slc.o sys_term.o utility.o \
16
	global.o setproctitle.o
16
	global.o setproctitle.o
(-)./netkit-telnet-0.17/telnetd/telnetd.c (-1 / +1 lines)
Lines 1146-1152 Link Here
1146
	return;
1146
	return;
1147
    }
1147
    }
1148
#endif
1148
#endif
1149
    netoprintf("\r\n[%s : yes]\r\n", host_name);
1149
	netoprintf("\r\n[Yes]\r\n");
1150
}
1150
}
1151
1151
1152
void doeof(void) {
1152
void doeof(void) {
(-)./netkit-telnet-0.17/telnetd/utility.c (-3 / +9 lines)
Lines 55-72 Link Here
55
void
55
void
56
netoprintf(const char *fmt, ...)
56
netoprintf(const char *fmt, ...)
57
{
57
{
58
   int len, maxsize;
58
   int len = 0, maxsize;
59
   va_list ap;
59
   va_list ap;
60
   int done=0;
60
   int done=0;
61
61
62
   while (!done) {
62
   while (!done) {
63
      maxsize = sizeof(netobuf) - (nfrontp - netobuf);
63
      maxsize = sizeof(netobuf) - (nfrontp - netobuf);
64
64
	if (maxsize < 0) {
65
		/* no way this is gonna fit - try to flush some */
66
		netflush();
67
		maxsize = sizeof(netobuf) - (nfrontp - netobuf);
68
		if (maxsize < 0)
69
		break;
70
	}
65
      va_start(ap, fmt);
71
      va_start(ap, fmt);
66
      len = vsnprintf(nfrontp, maxsize, fmt, ap);
72
      len = vsnprintf(nfrontp, maxsize, fmt, ap);
67
      va_end(ap);
73
      va_end(ap);
68
74
69
      if (len<0 || len==maxsize) {
75
      if (len<=0 || len==maxsize) {
70
	 /* didn't fit */
76
	 /* didn't fit */
71
	 netflush();
77
	 netflush();
72
      }
78
      }

Return to bug 64632