shithub: scc

Download patch

ref: b600cb8e454bb8ee0116933b96372dd604bbe495
parent: aa72a4301ac8e8f0a527672e2794b36773c6a381
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Mon Feb 19 16:14:11 EST 2018

[ar] Remove iflag

It is totally equivalent to bflag, so we can use only one of them.

--- a/ar/main.c
+++ b/ar/main.c
@@ -15,7 +15,7 @@
 
 char *argv0;
 
-static int bflag, iflag, vflag, cflag, lflag, uflag, aflag, haslist;
+static int bflag, vflag, cflag, lflag, uflag, aflag, haslist;
 static char *posname, *tmpafile1, *tmpafile2;
 
 struct arop {
@@ -238,7 +238,7 @@
 	while ((c = getc(op->tmp)) != EOF)
 		putc(c, op->dst);
 
-	if (bflag || iflag)
+	if (bflag)
 		copy(&op->hdr, op->size, op->src, op->dst);
 }
 
@@ -256,7 +256,7 @@
 	for ( ; *list; ++list)
 		archive(*list, op->dst, 'a');
 
-	if (bflag || iflag)
+	if (bflag)
 		copy(&op->hdr, op->size, op->src, op->dst);
 }
 
@@ -618,13 +618,9 @@
 		pos++;
 		posname = EARGF(usage());
 		break;
+	case 'i':
 	case 'b':
 		bflag = 1;
-		pos++;
-		posname = EARGF(usage());
-		break;
-	case 'i':
-		iflag = 1;
 		pos++;
 		posname = EARGF(usage());
 		break;