From 26b4e0e1c63dc5264e9297f9b4d3952f8f7556b8 Mon Sep 17 00:00:00 2001 From: Jim Warner Date: Mon, 24 Oct 2011 17:20:45 -0500 Subject: [PATCH] top: optimization for show_special function --- top/top.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/top/top.c b/top/top.c index 88392f4d..614710c0 100644 --- a/top/top.c +++ b/top/top.c @@ -705,7 +705,7 @@ static inline void show_scroll (void) { * what will fit within the current screen width. * Our special formatting consists of: * "some text <_delimiter_> some more text <_delimiter_>...\n" - * Where <_delimiter_> is a two bye combination consisting of a + * Where <_delimiter_> is a two byte combination consisting of a * tilde followed by an ascii digit in the the range of 1 - 8. * examples: ~1, ~5, ~8, etc. * The tilde is effectively stripped and the next digit @@ -767,7 +767,7 @@ static void show_special (int interact, const char *glob) { snprintf(tmp, sizeof(tmp), "%s%.*s%s", Curwin->captab[ch], room, sub_beg, Caps_off); rp = scat(rp, tmp); room -= (sub_end - sub_beg); - sub_beg = (sub_end += (ch ? 2 : 1)); + sub_beg = (sub_end += 2); break; default: // nothin' special, just text ++sub_end;