[PATCH 29/31] more: remove unnecessary variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



No longer needed when siglongjmp() magic is gone.

Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 text-utils/more.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/text-utils/more.c b/text-utils/more.c
index 84c2108..449f9cd 100644
--- a/text-utils/more.c
+++ b/text-utils/more.c
@@ -181,7 +181,6 @@ struct more_control {
 		ul_glitch:1,		/* terminal is underlining in glitch mode */
 		ul_opt:1,		/* underline as best we can */
 		underlining:1,		/* is underlining going on */
-		within:1,		/* true if we are within a file, false if we are between files */
 		wrap_margin:1;		/* set if automargins */
 };
 
@@ -791,8 +790,7 @@ static void change_file(struct more_control *ctl, int nskip)
 	if (nskip > 0) {
 		if (ctl->argv_position + nskip > ctl->nfiles - 1)
 			nskip = ctl->nfiles - ctl->argv_position - 1;
-	} else if (ctl->within)
-		ctl->argv_position++;
+	}
 	ctl->argv_position += nskip;
 	if (ctl->argv_position < 0)
 		ctl->argv_position = 0;
@@ -1952,11 +1950,8 @@ static void display_file(struct more_control *ctl, FILE *f, char *initbuf, int l
 		}
 		if (ctl->no_tty)
 			copy_file(f);
-		else {
-			ctl->within = 1;
+		else
 			screen(ctl, f, left);
-			ctl->within = 0;
-		}
 	}
 	fflush(stdout);
 	fclose(f);
-- 
2.3.0

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux