summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Warner <james.warner@comcast.net>2011-10-24 17:20:45 -0500
committerCraig Small <csmall@enc.com.au>2011-12-22 23:48:04 +1100
commit26b4e0e1c63dc5264e9297f9b4d3952f8f7556b8 (patch)
treeb7347b27f0dcebd5120d34c75a7422f385435efa
parentda35f4a36449f321bd77677a1ec4781fb4139160 (diff)
downloadprocps-ng-26b4e0e1c63dc5264e9297f9b4d3952f8f7556b8.tar.gz
top: optimization for show_special function
-rw-r--r--top/top.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/top/top.c b/top/top.c
index 88392f4..614710c 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;