Blame SOURCES/netkit-ftp-0.17-longnames.patch

f0a907
--- netkit-ftp-0.17/ftp/cmds.c.longnames	2006-07-25 11:13:55.000000000 +0200
f0a907
+++ netkit-ftp-0.17/ftp/cmds.c	2006-07-24 17:52:10.000000000 +0200
f0a907
@@ -1057,10 +1057,9 @@
f0a907
 status(void)
f0a907
 {
f0a907
 	int i;
f0a907
-
f0a907
-	if (connected)
f0a907
+	if (connected) 
f0a907
 		printf("Connected to %s.\n", hostname);
f0a907
-	else
f0a907
+	else 
f0a907
 		printf("Not connected.\n");
f0a907
 	if (!proxy) {
f0a907
 		pswitch(1);
f0a907
@@ -1081,7 +1080,7 @@
f0a907
 		onoff(runique));
f0a907
 	printf("Case: %s; CR stripping: %s\n",onoff(mcase),onoff(crflag));
f0a907
 	if (ntflag) {
f0a907
-		printf("Ntrans: (in) %s (out) %s\n", ntin,ntout);
f0a907
+		printf("Ntrans: (in) %s (out) %s\n",ntin,ntout);
f0a907
 	}
f0a907
 	else {
f0a907
 		printf("Ntrans: off\n");
f0a907
@@ -1948,14 +1947,14 @@
f0a907
 	}
f0a907
 	ntflag++;
f0a907
 	code = ntflag;
f0a907
-	(void) strncpy(ntin, argv[1], 16);
f0a907
-	ntin[16] = '\0';
f0a907
+	(void) strncpy(ntin, argv[1], NTRANS_MAX);
f0a907
+	ntin[NTRANS_MAX] = '\0';
f0a907
 	if (argc == 2) {
f0a907
 		ntout[0] = '\0';
f0a907
 		return;
f0a907
 	}
f0a907
-	(void) strncpy(ntout, argv[2], 16);
f0a907
-	ntout[16] = '\0';
f0a907
+	(void) strncpy(ntout, argv[2], NTRANS_MAX);
f0a907
+ 	ntout[NTRANS_MAX] = '\0';
f0a907
 }
f0a907
 
f0a907
 static char *
f0a907
@@ -1965,10 +1964,10 @@
f0a907
 	char *cp1, *cp2 = new;
f0a907
 	register int i, ostop, found;
f0a907
 
f0a907
-	for (ostop = 0; *(ntout + ostop) && ostop < 16; ostop++);
f0a907
+	for (ostop = 0; *(ntout + ostop) && ostop < NTRANS_MAX; ostop++);
f0a907
 	for (cp1 = name; *cp1; cp1++) {
f0a907
 		found = 0;
f0a907
-		for (i = 0; *(ntin + i) && i < 16; i++) {
f0a907
+		for (i = 0; *(ntin + i) && i < NTRANS_MAX; i++) {
f0a907
 			if (*cp1 == *(ntin + i)) {
f0a907
 				found++;
f0a907
 				if (i < ostop) {
f0a907
--- netkit-ftp-0.17/ftp/ftp.c.longnames	2006-07-25 11:13:56.000000000 +0200
f0a907
+++ netkit-ftp-0.17/ftp/ftp.c	2006-07-24 17:46:14.000000000 +0200
f0a907
@@ -1656,8 +1656,8 @@
f0a907
 		int runqe;
f0a907
 		int mcse;
f0a907
 		int ntflg;
f0a907
-		char nti[17];
f0a907
-		char nto[17];
f0a907
+		char nti[NTRANS_MAX+1];
f0a907
+		char nto[NTRANS_MAX+1];
f0a907
 		int mapflg;
f0a907
 		char mi[MAXPATHLEN];
f0a907
 		char mo[MAXPATHLEN];
f0a907
@@ -1712,11 +1712,11 @@
f0a907
 	mcase = op->mcse;
f0a907
 	ip->ntflg = ntflag;
f0a907
 	ntflag = op->ntflg;
f0a907
-	(void) strncpy(ip->nti, ntin, 16);
f0a907
-	(ip->nti)[16] = '\0';		/* shouldn't use strlen */
f0a907
+	(void) strncpy(ip->nti, ntin, NTRANS_MAX);
f0a907
+	(ip->nti)[NTRANS_MAX] = '\0';		/* shouldn't use strlen */
f0a907
 	(void) strcpy(ntin, op->nti);
f0a907
-	(void) strncpy(ip->nto, ntout, 16);
f0a907
-	(ip->nto)[16] = '\0';
f0a907
+	(void) strncpy(ip->nto, ntout, NTRANS_MAX);
f0a907
+	(ip->nto)[NTRANS_MAX] = '\0';
f0a907
 	(void) strcpy(ntout, op->nto);
f0a907
 	ip->mapflg = mapflag;
f0a907
 	mapflag = op->mapflg;
f0a907
--- netkit-ftp-0.17/ftp/ftp_var.h.longnames	2006-07-25 11:13:56.000000000 +0200
f0a907
+++ netkit-ftp-0.17/ftp/ftp_var.h	2006-07-24 15:49:37.000000000 +0200
f0a907
@@ -42,6 +42,7 @@
f0a907
 
f0a907
 #include <setjmp.h>
f0a907
 #include <sys/param.h>
f0a907
+#define NTRANS_MAX	64
f0a907
 
f0a907
 /*
f0a907
  * Tick counter step size.
f0a907
@@ -82,8 +83,8 @@
f0a907
 Extern char     pasv[64];       /* passive port for proxy data connection */
f0a907
 Extern int      passivemode;    /* passive mode enabled */
f0a907
 Extern char	*altarg;	/* argv[1] with no shell-like preprocessing  */
f0a907
-Extern char	ntin[17];	/* input translation table */
f0a907
-Extern char	ntout[17];	/* output translation table */
f0a907
+Extern char	ntin[NTRANS_MAX+1];	/* input translation table */
f0a907
+Extern char	ntout[NTRANS_MAX+1];	/* output translation table */
f0a907
 Extern char	mapin[MAXPATHLEN];	/* input map template */
f0a907
 Extern char	mapout[MAXPATHLEN];	/* output map template */
f0a907
 Extern char	typename[32];		/* name of file transfer type */