"Remember to set tenex mode when transferring binary files from this
machine."
Just a little cleanup. Unfortunately, my TOPS20 system isn't running
at the moment, so I wasn't able to fully test this...
bonus: this diff also removes references to ebcdic.
Index: cmds.c
===================================================================
RCS file: /cvs/src/usr.bin/ftp/cmds.c,v
retrieving revision 1.73
diff -u -p -r1.73 cmds.c
--- cmds.c 16 Jan 2015 06:40:08 -0000 1.73
+++ cmds.c 17 Jan 2015 07:33:03 -0000
@@ -98,18 +98,6 @@ setascii(int argc, char *argv[])
}
/*
- * Set tenex transfer type.
- */
-/*ARGSUSED*/
-void
-settenex(int argc, char *argv[])
-{
-
- stype[1] = "tenex";
- settype(2, stype);
-}
-
-/*
* Set file transfer mode.
*/
/*ARGSUSED*/
Index: cmds.h
===================================================================
RCS file: /cvs/src/usr.bin/ftp/cmds.h,v
retrieving revision 1.1
diff -u -p -r1.1 cmds.h
--- cmds.h 5 May 2009 19:35:30 -0000 1.1
+++ cmds.h 17 Jan 2015 07:38:41 -0000
@@ -17,7 +17,6 @@
*/
void setascii(int, char **);
-void settenex(int, char **);
void setftmode(int, char **);
void setform(int, char **);
void setstruct(int, char **);
Index: cmdtab.c
===================================================================
RCS file: /cvs/src/usr.bin/ftp/cmdtab.c,v
retrieving revision 1.27
diff -u -p -r1.27 cmdtab.c
--- cmdtab.c 6 Jan 2013 22:12:28 -0000 1.27
+++ cmdtab.c 17 Jan 2015 07:37:20 -0000
@@ -111,7 +111,6 @@ char statushelp[] = "show current status
char structhelp[] = "set file transfer structure";
char suniquehelp[] = "toggle store unique on remote machine";
char systemhelp[] = "show remote system type";
-char tenexhelp[] = "set tenex file transfer type";
char tracehelp[] = "toggle packet tracing";
char typehelp[] = "set file transfer type";
char umaskhelp[] = "get (set) umask on remote side";
@@ -201,7 +200,6 @@ struct cmd cmdtab[] = {
{ "struct", H(structhelp), 0, 1, 1, CMPL0 setstruct },
{ "sunique", H(suniquehelp), 0, 0, 1, CMPL0 setsunique },
{ "system", H(systemhelp), 0, 1, 1, CMPL0 syst },
- { "tenex", H(tenexhelp), 0, 1, 1, CMPL0 settenex },
{ "trace", H(tracehelp), 0, 0, 0, CMPL0 settrace },
{ "type", H(typehelp), 0, 1, 1, CMPL0 settype },
{ "umask", H(umaskhelp), 0, 1, 1, CMPL0 do_umask },
Index: ftp.1
===================================================================
RCS file: /cvs/src/usr.bin/ftp/ftp.1,v
retrieving revision 1.94
diff -u -p -r1.94 ftp.1
--- ftp.1 15 Nov 2014 14:41:02 -0000 1.94
+++ ftp.1 17 Jan 2015 07:36:50 -0000
@@ -1224,11 +1224,6 @@ The remote server will report the unique
Default value is off.
.It Ic system
Show the type of operating system running on the remote machine.
-.It Ic tenex
-Set the file transfer type to that needed to
-talk to
-.Tn TENEX
-machines.
.It Ic trace Op Ic on | off
Toggle packet tracing.
.It Ic type Op Ar type-name
@@ -1525,17 +1520,10 @@ The
may be one of
.Dq ascii ,
.Dq binary ,
-.Dq image ,
-.Dq ebcdic
-.Pq currently not supported
or
-.Dq tenex
-(local byte size 8, for PDP-10's and PDP-20's mostly).
+.Dq image .
.Nm
-supports the ASCII and image types of file transfer,
-plus local byte size 8 for
-.Ic tenex
-mode transfers.
+supports the ASCII and image types of file transfer.
.Pp
.Nm
supports only the default values for the remaining
Index: ftp.c
===================================================================
RCS file: /cvs/src/usr.bin/ftp/ftp.c,v
retrieving revision 1.89
diff -u -p -r1.89 ftp.c
--- ftp.c 16 Jan 2015 06:40:08 -0000 1.89
+++ ftp.c 17 Jan 2015 07:39:54 -0000
@@ -707,7 +707,6 @@ sendrequest(const char *cmd, const char
rc = fseeko(fin, restart_point, SEEK_SET);
break;
case TYPE_I:
- case TYPE_L:
if (lseek(fileno(fin), restart_point, SEEK_SET) != -1)
rc = 0;
break;
@@ -759,7 +758,6 @@ sendrequest(const char *cmd, const char
switch (curtype) {
case TYPE_I:
- case TYPE_L:
d = 0;
while ((c = read(fileno(fin), buf, sizeof(buf))) > 0) {
may_send_noop_char();
@@ -1075,7 +1073,6 @@ recvrequest(const char *cmd, const char
switch (curtype) {
case TYPE_I:
- case TYPE_L:
if (restart_point &&
lseek(fileno(fout), restart_point, SEEK_SET) < 0) {
warn("local: %s", local);
Index: small.c
===================================================================
RCS file: /cvs/src/usr.bin/ftp/small.c,v
retrieving revision 1.3
diff -u -p -r1.3 small.c
--- small.c 16 Jan 2015 06:40:08 -0000 1.3
+++ small.c 17 Jan 2015 07:44:45 -0000
@@ -91,13 +91,10 @@ struct types {
char *t_name;
char *t_mode;
int t_type;
- char *t_arg;
} types[] = {
- { "ascii", "A", TYPE_A, 0 },
- { "binary", "I", TYPE_I, 0 },
- { "image", "I", TYPE_I, 0 },
- { "ebcdic", "E", TYPE_E, 0 },
- { "tenex", "L", TYPE_L, bytename },
+ { "ascii", "A", TYPE_A },
+ { "binary", "I", TYPE_I },
+ { "image", "I", TYPE_I },
{ NULL }
};
@@ -136,10 +133,7 @@ settype(int argc, char *argv[])
code = -1;
return;
}
- if ((p->t_arg != NULL) && (*(p->t_arg) != '\0'))
- comret = command("TYPE %s %s", p->t_mode, p->t_arg);
- else
- comret = command("TYPE %s", p->t_mode);
+ comret = command("TYPE %s", p->t_mode);
if (comret == COMPLETE) {
(void)strlcpy(typename, p->t_name, sizeof typename);
curtype = type = p->t_type;
Index: util.c
===================================================================
RCS file: /cvs/src/usr.bin/ftp/util.c,v
retrieving revision 1.68
diff -u -p -r1.68 util.c
--- util.c 16 Jan 2015 06:40:08 -0000 1.68
+++ util.c 17 Jan 2015 07:32:33 -0000
@@ -209,11 +209,6 @@ setpeer(int argc, char *argv[])
unix_proxy = 0;
else
unix_server = 0;
- if (overbose &&
- !strncmp(reply_string, "215 TOPS20", 10))
- fputs(
-"Remember to set tenex mode when transferring binary files from this
machine.\n",
- ttyout);
}
verbose = overbose;
#endif /* unix || BSD */