2011-10-12 00:32:59 +05:30
|
|
|
|
/* top_nls.h - provide the basis for future nls translations */
|
|
|
|
|
/*
|
2012-02-09 11:30:00 +05:30
|
|
|
|
* Copyright (c) 2011-2012, by: James C. Warner
|
2011-10-12 00:32:59 +05:30
|
|
|
|
* All rights reserved. 8921 Hilloway Road
|
|
|
|
|
* Eden Prairie, Minnesota 55347 USA
|
|
|
|
|
*
|
|
|
|
|
* This file may be used subject to the terms and conditions of the
|
|
|
|
|
* GNU Library General Public License Version 2, or any later version
|
|
|
|
|
* at your option, as published by the Free Software Foundation.
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU Library General Public License for more details.
|
|
|
|
|
*/
|
|
|
|
|
/* For contributions to this program, the author wishes to thank:
|
|
|
|
|
* Craig Small, <csmall@small.dropbear.id.au>
|
|
|
|
|
* Sami Kerola, <kerolasa@iki.fi>
|
|
|
|
|
*/
|
|
|
|
|
#ifndef _Itop_nls
|
|
|
|
|
#define _Itop_nls
|
|
|
|
|
|
|
|
|
|
/*
|
2012-09-19 12:32:02 +05:30
|
|
|
|
* These are our string tables with the following contents:
|
|
|
|
|
* Head : column headings with varying size limits
|
2011-10-12 00:32:59 +05:30
|
|
|
|
* Desc : field descriptions not to exceed 20 screen positions
|
|
|
|
|
* Norm : regular text possibly also containing c-format specifiers
|
|
|
|
|
* Uniq : show_special specially formatted strings
|
2011-12-29 23:20:32 +05:30
|
|
|
|
*
|
2011-10-12 00:32:59 +05:30
|
|
|
|
* The latter table presents the greatest translation challenge !
|
2011-12-29 23:20:32 +05:30
|
|
|
|
*
|
|
|
|
|
* 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
|
2011-10-12 00:32:59 +05:30
|
|
|
|
*/
|
2012-09-19 12:32:02 +05:30
|
|
|
|
extern const char *Head_nlstab[];
|
2011-10-12 00:32:59 +05:30
|
|
|
|
extern const char *Desc_nlstab[];
|
|
|
|
|
extern const char *Norm_nlstab[];
|
|
|
|
|
extern const char *Uniq_nlstab[];
|
|
|
|
|
|
|
|
|
|
/*
|
2011-10-15 06:28:02 +05:30
|
|
|
|
* Simple optional macros to ease table access.
|
2011-10-12 00:32:59 +05:30
|
|
|
|
* The N_txt and N_fmt macros are interchangeable but
|
|
|
|
|
* highlight the two types of strings found in Norm_nlstable.
|
|
|
|
|
*/
|
2012-09-19 12:32:02 +05:30
|
|
|
|
#define N_col(e) Head_nlstab[e]
|
2011-10-12 00:32:59 +05:30
|
|
|
|
#define N_fld(e) Desc_nlstab[e]
|
|
|
|
|
#define N_txt(e) Norm_nlstab[e]
|
|
|
|
|
#define N_fmt(e) Norm_nlstab[e]
|
|
|
|
|
#define N_unq(e) Uniq_nlstab[e]
|
|
|
|
|
|
|
|
|
|
/*
|
2012-09-19 12:32:02 +05:30
|
|
|
|
* These enums are the means to access two of our four tables.
|
|
|
|
|
* The Head_nlstab and Desc_nlstab are accessed with standard
|
|
|
|
|
* top pflag enums.
|
2011-10-12 00:32:59 +05:30
|
|
|
|
*
|
|
|
|
|
* The norm_nls enums carry a suffix distinguishing plain text
|
|
|
|
|
* from any text also containiing c-format specifiers.
|
|
|
|
|
*/
|
|
|
|
|
enum norm_nls {
|
|
|
|
|
AMT_kilobyte_txt, AMT_megabyte_txt, AMT_gigabyte_txt, BAD_delayint_fmt,
|
2011-10-14 22:15:44 +05:30
|
|
|
|
BAD_integers_txt, BAD_max_task_txt, BAD_mon_pids_fmt, BAD_niterate_fmt,
|
2011-10-12 00:32:59 +05:30
|
|
|
|
BAD_numfloat_txt, BAD_signalid_txt, BAD_username_txt, BAD_widtharg_fmt,
|
|
|
|
|
CHOOSE_group_txt, COLORS_nomap_txt, DELAY_badarg_txt, DELAY_change_fmt,
|
2011-10-14 22:15:44 +05:30
|
|
|
|
DELAY_secure_txt, DISABLED_cmd_txt, DISABLED_win_fmt, EXIT_signals_fmt,
|
|
|
|
|
FAIL_alloc_c_txt, FAIL_alloc_r_txt, FAIL_openlib_fmt, FAIL_rc_open_fmt,
|
2011-10-12 00:32:59 +05:30
|
|
|
|
FAIL_re_nice_fmt, FAIL_sigmask_fmt, FAIL_signals_fmt, FAIL_sigstop_fmt,
|
|
|
|
|
FAIL_statget_txt, FAIL_statopn_fmt, FAIL_tty_get_txt, FAIL_tty_mod_fmt,
|
2011-12-21 02:13:54 +05:30
|
|
|
|
FAIL_tty_raw_fmt, FAIL_widecpu_txt, FAIL_widepid_txt, FIND_no_find_fmt,
|
|
|
|
|
FIND_no_next_txt, FOREST_modes_fmt, FOREST_views_txt, GET_find_str_txt,
|
|
|
|
|
GET_max_task_fmt, GET_nice_num_fmt, GET_pid2kill_txt, GET_pid2nice_txt,
|
|
|
|
|
GET_sigs_num_fmt, GET_user_ids_txt, HELP_cmdline_fmt, HILIGHT_cant_txt,
|
|
|
|
|
IRIX_curmode_fmt, LIMIT_exceed_fmt, MISSING_args_fmt, NAME_windows_fmt,
|
|
|
|
|
NOT_onsecure_txt, NOT_smp_cpus_txt, OFF_one_word_txt, ON_word_only_txt,
|
|
|
|
|
RC_bad_entry_fmt, RC_bad_files_fmt, SCROLL_coord_fmt, SELECT_clash_txt,
|
|
|
|
|
THREADS_show_fmt, TIME_accumed_fmt, UNKNOWN_cmds_txt, UNKNOWN_opts_fmt,
|
|
|
|
|
USAGE_abbrev_txt, WORD_allcpus_txt, WORD_another_txt, WORD_eachcpu_fmt,
|
2011-11-07 14:38:27 +05:30
|
|
|
|
WORD_process_txt, WORD_threads_txt, WRITE_rcfile_fmt, WRONG_switch_fmt,
|
2012-09-21 11:31:01 +05:30
|
|
|
|
XTRA_fixwide_fmt,
|
top: honor the restrictive, crufty old top rcfile
At one time, new top silently defaulted when an rcfile
was found to be incompatible. This is exactly what
the old top did. However, after some discussion it
was decided top should alert the user and thereby
save the system administrator some headaches.
Now, some are upset over the fatal error, proving you
can't please everybody. But in all fairness, given
the difficulty of customizing old top, any reluctance
to delete an old saved rcfile is understandable.
To ease transition to this new top, old style rcfiles
will now be honored and converted to the new format.
And if not disabled at ./configure time via CFLAGS,
a user will be warned when an old style rcfile is
about to be overwritten using the 'W' command.
Lastly, the config validation logic was enhanced to
help ensure both types of rcfile haven't been edited
manually and possibly made unuseable.
Reported-By: sergio <mailbox@sergio.spb.ru>
Bug-Debian: http://bugs.debian.org/651213
Reported-By: martin f krafft <madduck@debian.org>
Bug-Debian: http://bugs.debian.org/651863
Signed-off-by: Jim Warner <james.warner@comcast.net>
2012-03-01 11:29:59 +05:30
|
|
|
|
#ifndef WARN_CFG_OFF
|
|
|
|
|
XTRA_warncfg_txt,
|
|
|
|
|
#endif
|
2011-10-12 00:32:59 +05:30
|
|
|
|
norm_MAX
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
enum uniq_nls {
|
|
|
|
|
KEYS_helpbas_fmt, KEYS_helpext_fmt, WINDOWS_help_fmt, COLOR_custom_fmt,
|
|
|
|
|
FIELD_header_fmt, MEMORY_lines_fmt, STATE_line_1_fmt, STATE_lin2x4_fmt,
|
|
|
|
|
STATE_lin2x5_fmt, STATE_lin2x6_fmt, STATE_lin2x7_fmt,
|
|
|
|
|
uniq_MAX
|
|
|
|
|
};
|
|
|
|
|
|
2011-11-06 05:04:50 +05:30
|
|
|
|
void initialize_nls (void);
|
2011-10-12 00:32:59 +05:30
|
|
|
|
|
|
|
|
|
#endif /* _Itop_nls */
|
|
|
|
|
|