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

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