diff --git a/top/top.c b/top/top.c index cf94739a..88392f4d 100644 --- a/top/top.c +++ b/top/top.c @@ -705,10 +705,13 @@ 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 single byte in the range of: - * \001 through \010 (in decimalizee, 1 - 8) - * and is used to select an 'attribute' from a capabilities table - * which is then applied to the *preceding* substring. + * Where <_delimiter_> is a two bye 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 + * converted to an index which is then used to select an + * 'attribute' from a capabilities table. That attribute + * is then applied to the *preceding* substring. * Once recognized, the delimiter is replaced with a null character * and viola, we've got a substring ready to output! Strings or * substrings without delimiters will receive the Cap_norm attribute. @@ -723,8 +726,7 @@ static inline void show_scroll (void) { * Tabs must always be avoided or our efforts are wasted and * lines will wrap. To lessen but not eliminate the risk of * terminfo string truncation, such non-display stuff should - * be placed at the beginning of a "short" line. - * (and as for tabs, gimme 1 more color then no worries, mate) */ + * be placed at the beginning of a "short" line. */ static void show_special (int interact, const char *glob) { /* note: the following is for documentation only, the real captab is now found in a group's WIN_t ! @@ -740,7 +742,7 @@ static void show_special (int interact, const char *glob) { /* ( pssst, after adding the termcap transitions, row may ) ( exceed 300+ bytes, even in an 80x24 terminal window! ) */ char tmp[SMLBUFSIZ], lin[MEDBUFSIZ], row[LRGBUFSIZ]; - char *rp, *cap, *lin_end, *sub_beg, *sub_end; + char *rp, *lin_end, *sub_beg, *sub_end; int room; // handle multiple lines passed in a bunch @@ -754,17 +756,18 @@ static void show_special (int interact, const char *glob) { *(rp = row) = '\0'; while (*sub_beg) { - switch (*sub_end) { + int ch = *sub_end; + if ('~' == ch) ch = *(sub_end + 1) - '0'; + switch (ch) { case 0: // no end delim, captab makes normal *(sub_end + 1) = '\0'; // extend str end, then fall through *(sub_end + 2) = '\0'; // ( +1 optimization for usual path ) case 1 ... 8: - cap = Curwin->captab[(int)*sub_end]; *sub_end = '\0'; - snprintf(tmp, sizeof(tmp), "%s%.*s%s", cap, room, sub_beg, Caps_off); + 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; + sub_beg = (sub_end += (ch ? 2 : 1)); break; default: // nothin' special, just text ++sub_end; diff --git a/top/top_nls.c b/top/top_nls.c index 5e1e663f..66a9123a 100644 --- a/top/top_nls.c +++ b/top/top_nls.c @@ -59,7 +59,10 @@ static void build_desc_nlstab (void) { char buf[SMLBUFSIZ]; /* ----------------------------------------------------------------------- -. Note for Translators: +. Note #1 for Translators: +. It is strongly recommend that the --no-wrap command line option +. be used with all supporting translation tools, when available. +. . The following single lines contain only plain text used as . the descriptions under Field Management when the 'f' key is typed. . @@ -144,8 +147,8 @@ static void build_desc_nlstab (void) { snprintf(buf, sizeof(buf), "%s", _("Supp Groups Names")); Desc_nlstab[P_SGN] = strdup(buf); snprintf(buf, sizeof(buf), "%s", _("Thread Group Id")); -#ifdef OOMEM_ENABLE Desc_nlstab[P_TGD] = strdup(buf); +#ifdef OOMEM_ENABLE snprintf(buf, sizeof(buf), "%s", _("oom_adjustment (2^X)")); Desc_nlstab[P_OOA] = strdup(buf); snprintf(buf, sizeof(buf), "%s", _("oom_score (badness)")); @@ -161,7 +164,10 @@ static void build_norm_nlstab (void) { char buf[MEDBUFSIZ]; /* ----------------------------------------------------------------------- -. Note for Translators: +. Note #2 for Translators: +. It is strongly recommend that the --no-wrap command line option +. be used with all supporting translation tools, when available. +. . This group of lines contains both plain text and c-format strings. . . Some strings reflect switches used to affect the running program @@ -229,8 +235,8 @@ static void build_norm_nlstab (void) { snprintf(buf, sizeof(buf), "%s", _("Off")); Norm_nlstab[OFF_one_word_txt] = strdup(buf); -/* Translation Hint: Only the following words should be translated - . delay, limit, user, cols */ +/* Translation Hint #1: Only the following words should be translated + . delay, limit, user, cols */ snprintf(buf, sizeof(buf), "%s", _(" -hv | -bcHiSs -d delay -n limit -u|U user | -p pid[,pid] -w [cols]")); Norm_nlstab[USAGE_abbrev_txt] = strdup(buf); @@ -390,18 +396,21 @@ static void build_uniq_nsltab (void) { char buf[BIGBUFSIZ]; /* ----------------------------------------------------------------------- -. Note for Translators: +. Note #3 for Translators: +. It is strongly recommend that the --no-wrap command line option +. be used with all supporting translation tools, when available. +. . The next several text groups contain special escape sequences . representing values used to index a table at run-time. . -. Each such sequence consists of a slash and exactly 3 numbers. -. Examples would be '\002', '\020', etc. In at least one case, -. another number follows those 3 numbers, making it appear as -. though the escape sequence is \0011. +. Each such sequence consists of a tilde (~) followed by an ascii +. number in the rage of '1' - '8'. Examples are '~2', '~8', etc. +. These escape sequences must never themselves be translated but +. could be deleted. . -. If you remove those escape sequences, it would make translation -. easier. However, the ability to display colors and bold text at -. run-time will have been lost. +. If you remove these escape sequences (both tilde and number) it +. would make translation easier. However, the ability to display +. colors and bold text at run-time will have been lost. . . Additionally, each of these text groups was designed to display . in a 80x24 terminal window. Hopefully, any translations will @@ -413,157 +422,165 @@ static void build_uniq_nsltab (void) { . */ snprintf(buf, sizeof(buf), "%s", _("" - "Help for Interactive Commands\002 - %s\n" - "Window \001%s\006: \001Cumulative mode \003%s\002. \001System\006: \001Delay \003%.1f secs\002; \001Secure mode \003%s\002.\n" + "Help for Interactive Commands~2 - %s\n" + "Window ~1%s~6: ~1Cumulative mode ~3%s~2. ~1System~6: ~1Delay ~3%.1f secs~2; ~1Secure mode ~3%s~2.\n" "\n" - " Z\005,\001B\005 Global: '\001Z\002' change color mappings; '\001B\002' disable/enable bold\n" - " l,t,m Toggle Summaries: '\001l\002' load avg; '\001t\002' task/cpu stats; '\001m\002' mem info\n" - " 1,I Toggle SMP view: '\0011\002' single/separate states; '\001I\002' Irix/Solaris mode\n" + " Z~5,~1B~5 Global: '~1Z~2' change color mappings; '~1B~2' disable/enable bold\n" + " l,t,m Toggle Summaries: '~1l~2' load avg; '~1t~2' task/cpu stats; '~1m~2' mem info\n" + " 1,I Toggle SMP view: '~11~2' single/separate states; '~1I~2' Irix/Solaris mode\n" " f,F Manage Fields: add/remove; change order; select sort field\n" "\n" - " <,> . Move sort field: '\001<\002' next col left; '\001>\002' next col right\n" - " R,H,V . Toggle: '\001R\002' norm/rev sort; '\001H\002' show threads; '\001V\002' forest view\n" - " c,i,S . Toggle: '\001c\002' cmd name/line; '\001i\002' idle tasks; '\001S\002' cumulative time\n" - " x\005,\001y\005 . Toggle highlights: '\001x\002' sort field; '\001y\002' running tasks\n" - " z\005,\001b\005 . Toggle: '\001z\002' color/mono; '\001b\002' bold/reverse (only if 'x' or 'y')\n" - " u,U . Show: '\001u\002' effective user; '\001U\002' real, saved, file or effective user\n" + " <,> . Move sort field: '~1<~2' next col left; '~1>~2' next col right\n" + " R,H,V . Toggle: '~1R~2' norm/rev sort; '~1H~2' show threads; '~1V~2' forest view\n" + " c,i,S . Toggle: '~1c~2' cmd name/line; '~1i~2' idle tasks; '~1S~2' cumulative time\n" + " x~5,~1y~5 . Toggle highlights: '~1x~2' sort field; '~1y~2' running tasks\n" + " z~5,~1b~5 . Toggle: '~1z~2' color/mono; '~1b~2' bold/reverse (only if 'x' or 'y')\n" + " u,U . Show: '~1u~2' effective user; '~1U~2' real, saved, file or effective user\n" " n or # . Set maximum tasks displayed\n" - " C,... . Toggle scroll coordinates msg for: \001up\002,\001down\002,\001left\002,right\002,\001home\002,\001end\002\n" + " C,... . Toggle scroll coordinates msg for: ~1up~2,~1down~2,~1left~2,right~2,~1home~2,~1end~2\n" "\n" "%s" " W Write configuration file\n" " q Quit\n" - " ( commands shown with '.' require a \001visible\002 task display \001window\002 ) \n" - "Press '\001h\002' or '\001?\002' for help with \001Windows\002,\n" + " ( commands shown with '.' require a ~1visible~2 task display ~1window~2 ) \n" + "Press '~1h~2' or '~1?~2' for help with ~1Windows~2,\n" "any other key to continue " "")); Uniq_nlstab[KEYS_helpbas_fmt] = strdup(buf); -/* Translation Hint: As is true for the text above, the "keys" shown to the left and - . also imbedded in the translatable text (along with escape seqs) - . should never themselves be translated. */ +/* Translation Hint #2: As is true for the text above, the "keys" shown to the left and + . also imbedded in the translatable text (along with escape seqs) + . should never themselves be translated. */ snprintf(buf, sizeof(buf), "%s", _("" - " k,r Manipulate tasks: '\001k\002' kill; '\001r\002' renice\n" + " k,r Manipulate tasks: '~1k~2' kill; '~1r~2' renice\n" " d or s Set update interval\n" "")); Uniq_nlstab[KEYS_helpext_fmt] = strdup(buf); snprintf(buf, sizeof(buf), "%s", _("" - "Help for Windows / Field Groups\002 - \"Current Window\" = \001 %s \006\n" + "Help for Windows / Field Groups~2 - \"Current Window\" = ~1 %s ~6\n" "\n" - ". Use multiple \001windows\002, each with separate config opts (color,fields,sort,etc)\n" - ". The 'current' window controls the \001Summary Area\002 and responds to your \001Commands\002\n" - " . that window's \001task display\002 can be turned \001Off\002 & \001On\002, growing/shrinking others\n" - " . with \001NO\002 task display, some commands will be \001disabled\002 ('i','R','n','c', etc)\n" - " until a \001different window\002 has been activated, making it the 'current' window\n" - ". You \001change\002 the 'current' window by: \001 1\002) cycling forward/backward;\001 2\002) choosing\n" - " a specific field group; or\001 3\002) exiting the color mapping or fields screens\n" - ". Commands \001available anytime -------------\002\n" - " A . Alternate display mode toggle, show \001Single\002 / \001Multiple\002 windows\n" + ". Use multiple ~1windows~2, each with separate config opts (color,fields,sort,etc)\n" + ". The 'current' window controls the ~1Summary Area~2 and responds to your ~1Commands~2\n" + " . that window's ~1task display~2 can be turned ~1Off~2 & ~1On~2, growing/shrinking others\n" + " . with ~1NO~2 task display, some commands will be ~1disabled~2 ('i','R','n','c', etc)\n" + " until a ~1different window~2 has been activated, making it the 'current' window\n" + ". You ~1change~2 the 'current' window by: ~1 1~2) cycling forward/backward;~1 2~2) choosing\n" + " a specific field group; or~1 3~2) exiting the color mapping or fields screens\n" + ". Commands ~1available anytime -------------~2\n" + " A . Alternate display mode toggle, show ~1Single~2 / ~1Multiple~2 windows\n" " g . Choose another field group and make it 'current', or change now\n" - " by selecting a number from: \001 1\002 =%s;\001 2\002 =%s;\001 3\002 =%s; or\001 4\002 =%s\n" - ". Commands \001requiring\002 '\001A\002' mode\001 -------------\002\n" - " G . Change the \001Name\005 of the 'current' window/field group\n" - " \001*\004 a , w . Cycle through all four windows: '\001a\005' Forward; '\001w\005' Backward\n" - " \001*\004 - , _ . Show/Hide: '\001-\005' \001Current\002 window; '\001_\005' all \001Visible\002/\001Invisible\002\n" + " by selecting a number from: ~1 1~2 =%s;~1 2~2 =%s;~1 3~2 =%s; or~1 4~2 =%s\n" + ". Commands ~1requiring~2 '~1A~2' mode~1 -------------~2\n" + " G . Change the ~1Name~5 of the 'current' window/field group\n" + " ~1*~4 a , w . Cycle through all four windows: '~1a~5' Forward; '~1w~5' Backward\n" + " ~1*~4 - , _ . Show/Hide: '~1-~5' ~1Current~2 window; '~1_~5' all ~1Visible~2/~1Invisible~2\n" " The screen will be divided evenly between task displays. But you can make\n" - " some \001larger\002 or \001smaller\002, using '\001n\002' and '\001i\002' commands. Then later you could:\n" - " \001*\004 = , + . Rebalance tasks: '\001=\005' \001Current\002 window; '\001+\005' \001Every\002 window\n" - " (this also forces the \001current\002 or \001every\002 window to become visible)\n" + " some ~1larger~2 or ~1smaller~2, using '~1n~2' and '~1i~2' commands. Then later you could:\n" + " ~1*~4 = , + . Rebalance tasks: '~1=~5' ~1Current~2 window; '~1+~5' ~1Every~2 window\n" + " (this also forces the ~1current~2 or ~1every~2 window to become visible)\n" "\n" - "In '\001A\002' mode, '\001*\004' keys are your \001essential\002 commands. Please try the '\001a\002' and '\001w\002'\n" + "In '~1A~2' mode, '~1*~4' keys are your ~1essential~2 commands. Please try the '~1a~2' and '~1w~2'\n" "commands plus the 'g' sub-commands NOW. Press to make 'Current' " "")); Uniq_nlstab[WINDOWS_help_fmt] = strdup(buf); /* ----------------------------------------------------------------------- -. Note for Translators: +. Note #4 for Translators: . The following 'Help for color mapping' simulated screen should -. probably NOT be translated due to complications caused by the -. xgettext program. -. -. Some escape sequences will be converted as follows and there is -. unfortunately NO way to prevent it. -. \007 --> \a -. \010 --> \b -. -. This means they will be lost in the clutter of other text. Besides, -. the simulated screen is terribly hard to follow in this form and any -. translation will likely produce extremly unpleasing results that are +. probably NOT be translated. It is terribly hard to follow in this +. form and any translation could produce unpleasing results that are . unlikely to parallel the running top program. +. +. If you decide to proceed with translation, do the following lines +. only taking care not to disturbe the '~' + number sequence. +. +. " Tasks:~3 64 ~2total,~3 2 ~3running,~3 62 ~2sleeping,~3 0 ~2stopped,~3\n" +. " %%Cpu(s):~3 76.5 ~2user,~3 11.2 ~2system,~3 0.0 ~2nice,~3 12.3 ~2idle~3\n" +. +. " available toggles: ~1B~2 =disable bold globally (~1%s~2),\n" +. ~1z~2 =color/mono (~1%s~2), ~1b~2 =tasks \"bold\"/reverse (~1%s~2)\n" +. +. "Select ~1target~2 as upper case letter:\n" +. " S~2 = Summary Data,~1 M~2 = Messages/Prompts,\n" +. " H~2 = Column Heads,~1 T~2 = Task Information\n" +. "Select ~1color~2 as number:\n" +. " 0~2 = black,~1 1~2 = red, ~1 2~2 = green,~1 3~2 = yellow,\n" +. " 4~2 = blue, ~1 5~2 = magenta,~1 6~2 = cyan, ~1 7~2 = white\n" +. . */ snprintf(buf, sizeof(buf), "%s", _("" - "Help for color mapping\002 - %s\n" - "current window: \001%s\006\n" + "Help for color mapping~2 - %s\n" + "current window: ~1%s~6\n" "\n" " color - 04:25:44 up 8 days, 50 min, 7 users, load average:\n" - " Tasks:\003 64 \002total,\003 2 \003running,\003 62 \002sleeping,\003 0 \002stopped,\003\n" - " %%Cpu(s):\003 76.5 \002user,\003 11.2 \002system,\003 0.0 \002nice,\003 12.3 \002idle\003\n" - " \001 Nasty Message! \004 -or- \001Input Prompt\005\n" - " \001 PID TTY PR NI %%CPU TIME+ VIRT SWAP S COMMAND \006\n" - " 17284 \010pts/2 \007 8 0 0.0 0:00.75 1380 0 S /bin/bash \010\n" - " \001 8601 pts/1 7 -10 0.4 0:00.03 916 0 R color -b -z\007\n" - " 11005 \010? \007 9 0 0.0 0:02.50 2852 1008 S amor -sessi\010\n" - " available toggles: \001B\002 =disable bold globally (\001%s\002),\n" - " \001z\002 =color/mono (\001%s\002), \001b\002 =tasks \"bold\"/reverse (\001%s\002)\n" + " Tasks:~3 64 ~2total,~3 2 ~3running,~3 62 ~2sleeping,~3 0 ~2stopped,~3\n" + " %%Cpu(s):~3 76.5 ~2user,~3 11.2 ~2system,~3 0.0 ~2nice,~3 12.3 ~2idle~3\n" + " ~1 Nasty Message! ~4 -or- ~1Input Prompt~5\n" + " ~1 PID TTY PR NI %%CPU TIME+ VIRT SWAP S COMMAND ~6\n" + " 17284 ~8pts/2 ~7 8 0 0.0 0:00.75 1380 0 S /bin/bash ~8\n" + " ~1 8601 pts/1 7 -10 0.4 0:00.03 916 0 R color -b -z~7\n" + " 11005 ~8? ~7 9 0 0.0 0:02.50 2852 1008 S amor -sessi~8\n" + " available toggles: ~1B~2 =disable bold globally (~1%s~2),\n" + " ~1z~2 =color/mono (~1%s~2), ~1b~2 =tasks \"bold\"/reverse (~1%s~2)\n" "\n" - "Select \001target\002 as upper case letter:\n" - " S\002 = Summary Data,\001 M\002 = Messages/Prompts,\n" - " H\002 = Column Heads,\001 T\002 = Task Information\n" - "Select \001color\002 as number:\n" - " 0\002 = black,\001 1\002 = red, \001 2\002 = green,\001 3\002 = yellow,\n" - " 4\002 = blue, \001 5\002 = magenta,\001 6\002 = cyan, \001 7\002 = white\n" + "Select ~1target~2 as upper case letter:\n" + " S~2 = Summary Data,~1 M~2 = Messages/Prompts,\n" + " H~2 = Column Heads,~1 T~2 = Task Information\n" + "Select ~1color~2 as number:\n" + " 0~2 = black,~1 1~2 = red, ~1 2~2 = green,~1 3~2 = yellow,\n" + " 4~2 = blue, ~1 5~2 = magenta,~1 6~2 = cyan, ~1 7~2 = white\n" "\n" - "Selected: \001target\002 \001 %c \004; \001color\002 \001 %d \004\n" - " press 'q' to abort changes to window '\001%s\002'\n" + "Selected: ~1target~2 ~1 %c ~4; ~1color~2 ~1 %d ~4\n" + " press 'q' to abort changes to window '~1%s~2'\n" " press 'a' or 'w' to commit & change another, to commit and end " "")); Uniq_nlstab[COLOR_custom_fmt] = strdup(buf); snprintf(buf, sizeof(buf), "%s", _("" - "Fields Management\002 for window \001%s\006, whose current sort field is \001%s\002\n" + "Fields Management~2 for window ~1%s~6, whose current sort field is ~1%s~2\n" " Navigate with Up/Dn, Right selects for move then or Left commits,\n" " 'd' or toggles display, 's' sets sort. Use 'q' or to end! " "")); Uniq_nlstab[FIELD_header_fmt] = strdup(buf); - snprintf(buf, sizeof(buf), "%s", _("%s:\003" - " %3u \002total,\003 %3u \002running,\003 %3u \002sleeping,\003 %3u \002stopped,\003 %3u \002zombie\003\n" + snprintf(buf, sizeof(buf), "%s", _("%s:~3" + " %3u ~2total,~3 %3u ~2running,~3 %3u ~2sleeping,~3 %3u ~2stopped,~3 %3u ~2zombie~3\n" "")); Uniq_nlstab[STATE_line_1_fmt] = strdup(buf); - snprintf(buf, sizeof(buf), "%s", _("%%%s\003" - " %#5.1f \002user,\003 %#5.1f \002system,\003 %#5.1f \002nice,\003 %#5.1f \002idle\003\n" + snprintf(buf, sizeof(buf), "%s", _("%%%s~3" + " %#5.1f ~2user,~3 %#5.1f ~2system,~3 %#5.1f ~2nice,~3 %#5.1f ~2idle~3\n" "")); Uniq_nlstab[STATE_lin2x4_fmt] = strdup(buf); - snprintf(buf, sizeof(buf), "%s", _("%%%s\003" - " %#5.1f \002user,\003 %#5.1f \002system,\003 %#5.1f \002nice,\003 %#5.1f \002idle,\003 %#5.1f \002IO-wait\003\n" + snprintf(buf, sizeof(buf), "%s", _("%%%s~3" + " %#5.1f ~2user,~3 %#5.1f ~2system,~3 %#5.1f ~2nice,~3 %#5.1f ~2idle,~3 %#5.1f ~2IO-wait~3\n" "")); Uniq_nlstab[STATE_lin2x5_fmt] = strdup(buf); -/* Translation Hint: Only the following abbreviations need be translated - . us = user, sy = system, ni = nice, id = idle, wa = wait, - . hi hardware interrupt, si = software interrupt */ - snprintf(buf, sizeof(buf), "%s", _("%%%s\003" - " %#5.1f \002us,\003 %#5.1f \002sy,\003 %#5.1f \002ni,\003 %#5.1f \002id,\003 %#5.1f \002wa,\003 %#5.1f \002hi,\003 %#5.1f \002si\003\n" +/* Translation Hint #3: Only the following abbreviations need be translated + . us = user, sy = system, ni = nice, id = idle, wa = wait, + . hi hardware interrupt, si = software interrupt */ + snprintf(buf, sizeof(buf), "%s", _("%%%s~3" + " %#5.1f ~2us,~3 %#5.1f ~2sy,~3 %#5.1f ~2ni,~3 %#5.1f ~2id,~3 %#5.1f ~2wa,~3 %#5.1f ~2hi,~3 %#5.1f ~2si~3\n" "")); Uniq_nlstab[STATE_lin2x6_fmt] = strdup(buf); -/* Translation Hint: Only the following abbreviations need be translated - . us = user, sy = system, ni = nice, id = idle, wa = wait, - . hi hardware interrupt, si = software interrupt, st = steal time */ - snprintf(buf, sizeof(buf), "%s", _("%%%s\003" - "%#5.1f \002us,\003%#5.1f \002sy,\003%#5.1f \002ni,\003%#5.1f \002id,\003%#5.1f \002wa,\003%#5.1f \002hi,\003%#5.1f \002si,\003%#5.1f \002st\003\n" +/* Translation Hint #4: Only the following abbreviations need be translated + . us = user, sy = system, ni = nice, id = idle, wa = wait, + . hi hardware interrupt, si = software interrupt, st = steal time */ + snprintf(buf, sizeof(buf), "%s", _("%%%s~3" + "%#5.1f ~2us,~3%#5.1f ~2sy,~3%#5.1f ~2ni,~3%#5.1f ~2id,~3%#5.1f ~2wa,~3%#5.1f ~2hi,~3%#5.1f ~2si,~3%#5.1f ~2st~3\n" "")); Uniq_nlstab[STATE_lin2x7_fmt] = strdup(buf); -/* Translation Hint: Only the following need be translated +/* Translation Hint #5: Only the following need be translated . abbreviations: Mem = physical memory/ram, Swap = the linux swap file . words: total, used, free, buffers, cached */ snprintf(buf, sizeof(buf), "%s", _("" - "%s Mem: \003 %8lu \002total,\003 %8lu \002used,\003 %8lu \002free,\003 %8lu \002buffers\003\n" - "%s Swap:\003 %8lu \002total,\003 %8lu \002used,\003 %8lu \002free,\003 %8lu \002cached\003\n" + "%s Mem: ~3 %8lu ~2total,~3 %8lu ~2used,~3 %8lu ~2free,~3 %8lu ~2buffers~3\n" + "%s Swap:~3 %8lu ~2total,~3 %8lu ~2used,~3 %8lu ~2free,~3 %8lu ~2cached~3\n" "")); Uniq_nlstab[MEMORY_lines_fmt] = strdup(buf); }