From: Jim Warner Date: Thu, 29 Dec 2011 17:50:32 +0000 (-0600) Subject: top: update some programmer documentation (no logic, just comments) X-Git-Tag: v3.3.2~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e64b6f70d7c99db01d7270c27f09de5b02cacebb;p=procps-ng top: update some programmer documentation (no logic, just comments) This commit corrects some outdated programmer comments. Additionally, certain nls justifications might become increasingly obscure with the passage of time so some previous nls commit text has been added as comments. --- diff --git a/top/top.c b/top/top.c index 1d9ee5e4..095ebe46 100644 --- a/top/top.c +++ b/top/top.c @@ -1775,7 +1775,7 @@ always: /*###### Library Interface #############################################*/ /* - * This guy's modeled on libproc's 'five_cpu_numbers' function except + * This guy's modeled on libproc's 'eight_cpu_numbers' function except * we preserve all cpu data in our CPU_t array which is organized * as follows: * cpus[0] thru cpus[n] == tics for each separate cpu diff --git a/top/top.h b/top/top.h index 7f76b776..c8d2fc83 100644 --- a/top/top.h +++ b/top/top.h @@ -96,8 +96,8 @@ -- mostly just to pinpoint source code usage/dependancies */ #define SCREENMAX 512 /* the above might seem pretty stingy, until you consider that with every - one of top's fields displayed it's less than 200 bytes of column header - -- so SCREENMAX provides for all fields plus a 300+ byte command line */ + field displayed the column header would be approximately 250 bytes + -- so SCREENMAX provides for all fields plus a 250+ byte command line */ #define CAPBUFSIZ 32 #define CLRBUFSIZ 64 #define PFLAGSSIZ 64 diff --git a/top/top_nls.h b/top/top_nls.h index 3f554e63..a6d7c1f9 100644 --- a/top/top_nls.h +++ b/top/top_nls.h @@ -24,7 +24,17 @@ * Desc : field descriptions not to exceed 20 screen positions * Norm : regular text possibly also containing c-format specifiers * Uniq : show_special specially formatted strings + * * The latter table presents the greatest translation challenge ! + * + * We go to the trouble of creating the nls string tables to achieve + * these objectives: + * + the overhead of repeated runtime calls to gettext() + * will be avoided + * + the order of the strings in the template (.pot) file + * can be completely controlled + * + none of the important translator only comments will + * clutter and obscure the main program */ extern const char *Desc_nlstab[]; extern const char *Norm_nlstab[];