Patch to add -y option.
authorSeb/The Removers <SebRmv@jagware.org>
Fri, 15 Aug 2014 08:23:49 +0000 (10:23 +0200)
committerShamus Hammons <jlhamm@acm.org>
Fri, 28 Feb 2020 23:13:26 +0000 (17:13 -0600)
rln.c

diff --git a/rln.c b/rln.c
index 23b2fea77f8df642a65f53f03cb118a47c32f0c8..43678377824ec1dcbbae5a3f07db49f8ac9deb20 100644 (file)
--- a/rln.c
+++ b/rln.c
@@ -2977,6 +2977,22 @@ int doargs(int argc, char * argv[])
 
                                wflag = 1;
                                break;
+                       case 'y':
+                       case 'Y':
+                               if (i >= argc)
+                               {
+                                       printf("No directory filename following -y switch\n");
+                                       return 1;
+                               }
+
+                               if (strlen(argv[i]) > FARGSIZE * 3)
+                               {
+                                       printf("Directory file name too long (sorry!)\n");
+                                       return 1;
+                               }
+
+                               strcpy(libdir, argv[i++]);
+                               break;
                        case 'z':
                        case 'Z':                                       // Suppress banner flag
                                if (zflag)