1.0.8.2-1.0.8.3.gz
patches · 2.1 KB · 2010-03-30
Download « Back to the patches list
Common subdirectories: /usr/home/clay/1.0.8.2/dgd/bin and dgd/bin
Common subdirectories: /usr/home/clay/1.0.8.2/dgd/doc and dgd/doc
Common subdirectories: /usr/home/clay/1.0.8.2/dgd/mud and dgd/mud
Common subdirectories: /usr/home/clay/1.0.8.2/dgd/pkg and dgd/pkg
Common subdirectories: /usr/home/clay/1.0.8.2/dgd/src and dgd/src
Common subdirectories: /usr/home/clay/1.0.8.2/dgd/tmp and dgd/tmp
Common subdirectories: /usr/home/clay/1.0.8.2/dgd/doc/kfun and dgd/doc/kfun
diff -cr /usr/home/clay/1.0.8.2/dgd/src/Changelog dgd/src/Changelog
*** /usr/home/clay/1.0.8.2/dgd/src/Changelog Thu Aug 18 17:16:10 1994
--- dgd/src/Changelog Sat Sep 3 13:53:54 1994
***************
*** 712,714 ****
--- 712,716 ----
- call_trace() could give incorrect arguments for varargs functions.
- Fixed a bug which could occur for strval[i] = intval.
+ - Attempt to use telnet linemode. This makes *BSD telnet usable, let's hope
+ nothing else breaks.
diff -cr /usr/home/clay/1.0.8.2/dgd/src/comm.c dgd/src/comm.c
*** /usr/home/clay/1.0.8.2/dgd/src/comm.c Sat Jul 16 22:32:16 1994
--- dgd/src/comm.c Sat Sep 3 13:53:54 1994
***************
*** 6,11 ****
--- 6,17 ----
# include "interpret.h"
# include "comm.h"
+ # ifndef TELOPT_LINEMODE
+ # define TELOPT_LINEMODE 34 /* linemode option */
+ # define LM_MODE 1
+ # define MODE_EDIT 0x01
+ # endif
+
typedef struct _user_ {
union {
object *obj; /* associated object */
***************
*** 21,36 ****
char outbuf[OUTBUF_SIZE]; /* output buffer */
} user;
! # define CF_ECHO 0x01
! # define CF_TELNET 0x02
! # define CF_GA 0x04
! # define CF_SEENCR 0x08
# define TS_DATA 0
# define TS_IAC 1
# define TS_DO 2
# define TS_DONT 3
! # define TS_IGNORE 4
static user **users; /* array of users */
static int maxusers; /* max # of users */
--- 27,47 ----
char outbuf[OUTBUF_SIZE]; /* output buffer */
} user;
! /* flags */
! # define CF_ECHO 0x01 /* client echoes input */
! # define CF_TELNET 0x02 /* telnet connection */
! # define CF_GA 0x04 /* send GA after prompt */
! # define CF_SEENCR 0x08 /* just seen a CR */
+ /* state */
# define TS_DATA 0
# define TS_IAC 1
# define TS_DO 2
# define TS_DONT 3
! # define TS_WILL 4
! # define TS_WONT 5
! # define TS_SB 6
! # define TS_SE 7
static user **users; /* array of users */
static int maxusers; /* max # of users */
***************
*** 75,81 ****
connection *conn;
bool telnet;
{
! static char echo_on[] = { IAC, WONT, TELOPT_ECHO };
register user **usr;
if (obj->flags & (O_USER | O_EDITOR)) {
--- 86,92 ----
connection *conn;
bool telnet;
{
! static char init[] = { IAC, WONT, TELOPT_ECHO, IAC, DO, TELOPT_LINEMODE };
register user **usr;
if (obj->flags & (O_USER | O_EDITOR)) {
***************
*** 92,99 ****
(*usr)->outbufsz = 0;
(*usr)->conn = conn;
if (telnet) {
! /* start with echo on */
! conn_write(conn, echo_on, 3);
(*usr)->flags = CF_TELNET | CF_ECHO;
(*usr)->state = TS_DATA;
(*usr)->newlines = 0;
--- 103,110 ----
(*usr)->outbufsz = 0;
(*usr)->conn = conn;
if (telnet) {
! /* initialize connection */
! conn_write(conn, init, sizeof(init));
(*usr)->flags = CF_TELNET | CF_ECHO;
(*usr)->state = TS_DATA;
(*usr)->newlines = 0;
***************
*** 342,352 ****
return (object *) NULL;
}
} else {
! static char intr[] = { '\177' };
! static char brk[] = { '\034' };
! static char tm[] = { IAC, WILL, TELOPT_TM };
! static char will_sga[] = { IAC, WILL, TELOPT_SGA };
! static char wont_sga[] = { IAC, WONT, TELOPT_SGA };
register user **usr;
for (i = maxusers, usr = users; i > 0; --i, usr++) {
--- 353,365 ----
return (object *) NULL;
}
} else {
! static char intr[] = { '\177' };
! static char brk[] = { '\034' };
! static char tm[] = { IAC, WILL, TELOPT_TM };
! static char will_sga[] = { IAC, WILL, TELOPT_SGA };
! static char wont_sga[] = { IAC, WONT, TELOPT_SGA };
! static char mode_edit[] = { IAC, SB, TELOPT_LINEMODE, LM_MODE,
! MODE_EDIT, IAC, SE };
register user **usr;
for (i = maxusers, usr = users; i > 0; --i, usr++) {
***************
*** 420,429 ****
break;
case WILL:
case WONT:
! state = TS_IGNORE;
break;
case IP:
conn_write((*usr)->conn, intr, 1);
state = TS_DATA;
--- 433,449 ----
break;
case WILL:
+ state = TS_WILL;
+ break;
+
case WONT:
! state = TS_WONT;
break;
+ case SB:
+ state = TS_SB;
+ break;
+
case IP:
conn_write((*usr)->conn, intr, 1);
state = TS_DATA;
***************
*** 435,440 ****
--- 455,461 ----
break;
default:
+ /* let's hope it wasn't important */
state = TS_DATA;
break;
}
***************
*** 455,463 ****
flags |= CF_GA;
conn_write((*usr)->conn, wont_sga, 3);
}
/* fall through */
! case TS_IGNORE:
state = TS_DATA;
break;
}
p++;
--- 476,506 ----
flags |= CF_GA;
conn_write((*usr)->conn, wont_sga, 3);
}
+ state = TS_DATA;
+ break;
+
+ case TS_WILL:
+ if (UCHAR(*p) == TELOPT_LINEMODE) {
+ /* linemode confirmed; now request editing */
+ conn_write((*usr)->conn, mode_edit, 7);
+ }
/* fall through */
! case TS_WONT:
state = TS_DATA;
+ break;
+
+ case TS_SB:
+ /* skip to the end */
+ if (UCHAR(*p) == IAC) {
+ state = TS_SE;
+ }
+ break;
+
+ case TS_SE:
+ if (UCHAR(*p) == SE) {
+ /* end of subnegotiation */
+ state = TS_DATA;
+ }
break;
}
p++;
Common subdirectories: /usr/home/clay/1.0.8.2/dgd/src/comp and dgd/src/comp
Common subdirectories: /usr/home/clay/1.0.8.2/dgd/src/ed and dgd/src/ed
Common subdirectories: /usr/home/clay/1.0.8.2/dgd/src/host and dgd/src/host
Common subdirectories: /usr/home/clay/1.0.8.2/dgd/src/kfun and dgd/src/kfun
Common subdirectories: /usr/home/clay/1.0.8.2/dgd/src/lex and dgd/src/lex
Common subdirectories: /usr/home/clay/1.0.8.2/dgd/src/lpc and dgd/src/lpc
diff -cr /usr/home/clay/1.0.8.2/dgd/src/version.h dgd/src/version.h
*** /usr/home/clay/1.0.8.2/dgd/src/version.h Thu Aug 18 17:21:14 1994
--- dgd/src/version.h Sat Sep 3 13:53:55 1994
***************
*** 1 ****
! # define VERSION "1.0.8.2"
--- 1 ----
! # define VERSION "1.0.8.3"
diff -cr /usr/home/clay/1.0.8.2/dgd/src/xfloat.h dgd/src/xfloat.h
*** /usr/home/clay/1.0.8.2/dgd/src/xfloat.h Sat Apr 30 21:21:27 1994
--- dgd/src/xfloat.h Mon Aug 22 18:41:18 1994
***************
*** 15,21 ****
extern void flt_ftoa P((xfloat*, char*));
extern void flt_itof P((Int, xfloat*));
extern Int flt_ftoi P((xfloat*));
- extern bool flt_isint P((xfloat*));
extern void flt_add P((xfloat*, xfloat*));
extern void flt_sub P((xfloat*, xfloat*));
--- 15,20 ----
Common subdirectories: /usr/home/clay/1.0.8.2/dgd/src/host/atarist and dgd/src/host/atarist
Common subdirectories: /usr/home/clay/1.0.8.2/dgd/src/host/mac and dgd/src/host/mac
Common subdirectories: /usr/home/clay/1.0.8.2/dgd/src/host/minix68k and dgd/src/host/minix68k
Common subdirectories: /usr/home/clay/1.0.8.2/dgd/src/host/pc and dgd/src/host/pc
diff -cr /usr/home/clay/1.0.8.2/dgd/src/host/telnet.h dgd/src/host/telnet.h
*** /usr/home/clay/1.0.8.2/dgd/src/host/telnet.h Sun Mar 13 16:09:16 1994
--- dgd/src/host/telnet.h Sat Sep 3 13:53:54 1994
***************
*** 7,15 ****
--- 7,17 ----
# define DO 253 /* do */
# define WONT 252 /* won't */
# define WILL 251 /* will */
+ # define SB 250 /* begin subnegotiation */
# define GA 249 /* go ahead */
# define IP 244 /* interrupt process */
# define BREAK 243 /* break */
+ # define SE 240 /* end subnegotiation */
/* options */
# define TELOPT_ECHO 1 /* echo */
Common subdirectories: /usr/home/clay/1.0.8.2/dgd/src/host/unix and dgd/src/host/unix