Tweaking comments and removing some superfluous blank lines.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4608 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Benno Schulenberg 2014-02-25 21:27:22 +00:00
parent ccb02f7740
commit 7f87393fa9
2 changed files with 35 additions and 44 deletions

View File

@ -1,5 +1,8 @@
2014-02-25 Benno Schulenberg <bensberg@justemail.net> 2014-02-25 Benno Schulenberg <bensberg@justemail.net>
* NEWS - Fix some typos and wordings, and rewrap a few lines. * NEWS - Fix some typos and wordings, and rewrap a few lines.
* src/global.c - Correcting some translator comments, removal
of a few superfluous blank lines, and some pedantic comment
tweaks (mainly adding missing periods and stars).
2014-02-25 Mike Frysinger <vapier@gentoo.org> 2014-02-25 Mike Frysinger <vapier@gentoo.org>
* src/Makefile.am - Rename 'INCLUDES' to 'AM_CPPFLAGS', since * src/Makefile.am - Rename 'INCLUDES' to 'AM_CPPFLAGS', since

View File

@ -67,7 +67,7 @@ WINDOW *bottomwin;
int editwinrows = 0; int editwinrows = 0;
/* How many rows does the edit window take up? */ /* How many rows does the edit window take up? */
int maxrows = 0; int maxrows = 0;
/* How many usable lines are there (due to soft wrapping) */ /* How many usable lines there are (due to soft wrapping). */
filestruct *cutbuffer = NULL; filestruct *cutbuffer = NULL;
/* The buffer where we store cut text. */ /* The buffer where we store cut text. */
@ -159,17 +159,17 @@ char *syntaxstr = NULL;
bool edit_refresh_needed = 0; bool edit_refresh_needed = 0;
/* Did a command mangle enough of the buffer refresh that we /* Did a command mangle enough of the buffer refresh that we
should repaint the screen */ * should repaint the screen? */
const shortcut *currshortcut; const shortcut *currshortcut;
/* The current shortcut list we're using. */ /* The current shortcut list we're using. */
int currmenu; int currmenu;
/* The currently loaded menu */ /* The currently loaded menu. */
sc *sclist = NULL; sc *sclist = NULL;
/* New shortcut key struct */ /* New shortcut key struct. */
subnfunc *allfuncs = NULL; subnfunc *allfuncs = NULL;
/* New struct for the function list */ /* New struct for the function list. */
#ifndef NANO_TINY #ifndef NANO_TINY
filestruct *search_history = NULL; filestruct *search_history = NULL;
@ -185,7 +185,7 @@ filestruct *replaceage = NULL;
filestruct *replacebot = NULL; filestruct *replacebot = NULL;
/* The bottom of the replace string history list. */ /* The bottom of the replace string history list. */
poshiststruct *poshistory; poshiststruct *poshistory;
/* The cursor position history list */ /* The cursor position history list. */
#endif #endif
/* Regular expressions. */ /* Regular expressions. */
@ -203,7 +203,7 @@ int reverse_attr = A_REVERSE;
char *homedir = NULL; char *homedir = NULL;
/* The user's home directory, from $HOME or /etc/passwd. */ /* The user's home directory, from $HOME or /etc/passwd. */
/* Return the number of entries in the shortcut list s for a given menu. */ /* Return the number of entries in the shortcut list for a given menu. */
size_t length_of_list(int menu) size_t length_of_list(int menu)
{ {
subnfunc *f; subnfunc *f;
@ -220,7 +220,7 @@ size_t length_of_list(int menu)
return i; return i;
} }
/* Just throw this here */ /* Just throw this here. */
void case_sens_void(void) void case_sens_void(void)
{ {
} }
@ -264,7 +264,7 @@ void ext_cmd_void(void)
{ {
} }
/* Set type of function based on the string */ /* Set type of function based on the string. */
function_type strtokeytype(const char *str) function_type strtokeytype(const char *str)
{ {
if (str[0] == 'M' || str[0] == 'm') if (str[0] == 'M' || str[0] == 'm')
@ -277,8 +277,8 @@ function_type strtokeytype(const char *str)
return RAWINPUT; return RAWINPUT;
} }
/* Add a string to the new function list strict. /* Add a string to the new function list struct.
Does not allow updates, yet anyway */ * Does not allow updates, not yet anyway. */
void add_to_funcs(void (*func)(void), int menus, const char *desc, const char *help, void add_to_funcs(void (*func)(void), int menus, const char *desc, const char *help,
bool blank_after, bool viewok) bool blank_after, bool viewok)
{ {
@ -353,8 +353,8 @@ const sc *first_sc_for(int menu, void (*func)(void))
} }
/* Add a string to the new shortcut list implementation /* Add a string to the new shortcut list implementation.
Allows updates to existing entries in the list */ * Allows updates to existing entries in the list. */
void add_to_sclist(int menu, const char *scstring, void (*func)(void), int toggle, int execute) void add_to_sclist(int menu, const char *scstring, void (*func)(void), int toggle, int execute)
{ {
sc *s; sc *s;
@ -393,7 +393,7 @@ void add_to_sclist(int menu, const char *scstring, void (*func)(void), int toggl
} }
/* Assign one menu's shortcuts to another function */ /* Assign one menu's shortcuts to another function. */
void replace_scs_for(void (*oldfunc)(void), void (*newfunc)(void)) void replace_scs_for(void (*oldfunc)(void), void (*newfunc)(void))
{ {
sc *s; sc *s;
@ -409,7 +409,7 @@ void replace_scs_for(void (*oldfunc)(void), void (*newfunc)(void))
/* Return the given menu's first shortcut sequence, or the default value /* Return the given menu's first shortcut sequence, or the default value
(2nd arg). Assumes currmenu for the menu to check*/ * (2nd arg). Assumes currmenu for the menu to check. */
int sc_seq_or (void (*func)(void), int defaultval) int sc_seq_or (void (*func)(void), int defaultval)
{ {
const sc *s = first_sc_for(currmenu, func); const sc *s = first_sc_for(currmenu, func);
@ -421,8 +421,8 @@ int sc_seq_or (void (*func)(void), int defaultval)
} }
/* Assign the info to the shortcut struct /* Assign the info to the shortcut struct.
Assumes keystr is already assigned, naturally */ * Assumes keystr is already assigned, naturally. */
void assign_keyinfo(sc *s) void assign_keyinfo(sc *s)
{ {
if (s->type == CONTROL) { if (s->type == CONTROL) {
@ -437,7 +437,7 @@ void assign_keyinfo(sc *s)
} else /* RAWINPUT */ } else /* RAWINPUT */
s->seq = (int) s->keystr[0]; s->seq = (int) s->keystr[0];
/* Override some keys which don't bind as nicely as we'd like */ /* Override some keys which don't bind as nicely as we'd like. */
if (s->type == CONTROL && (!strcasecmp(&s->keystr[1], "space"))) if (s->type == CONTROL && (!strcasecmp(&s->keystr[1], "space")))
s->seq = 0; s->seq = 0;
else if (s->type == META && (!strcasecmp(&s->keystr[2], "space"))) else if (s->type == META && (!strcasecmp(&s->keystr[2], "space")))
@ -474,7 +474,6 @@ void assign_keyinfo(sc *s)
} }
#ifdef DEBUG #ifdef DEBUG
void print_sclist(void) void print_sclist(void)
{ {
sc *s; sc *s;
@ -487,13 +486,12 @@ void print_sclist(void)
else else
fprintf(stderr, "Hmm, didnt find a func for \"%s\"\n", s->keystr); fprintf(stderr, "Hmm, didnt find a func for \"%s\"\n", s->keystr);
} }
} }
#endif #endif
/* Stuff we need to make at least static here so we can access it below */ /* Stuff we need to make at least static here so we can access it below. */
/* TRANSLATORS: Try to keep the next five strings at most 10 characters. */ /* TRANSLATORS: Try to keep the next six strings at most 10 characters. */
const char *cancel_msg = N_("Cancel"); const char *cancel_msg = N_("Cancel");
const char *replace_msg = N_("Replace"); const char *replace_msg = N_("Replace");
const char *no_replace_msg = N_("No Replace"); const char *no_replace_msg = N_("No Replace");
@ -507,7 +505,7 @@ const char *backwards_msg = N_("Backwards");
const char *regexp_msg = N_("Regexp"); const char *regexp_msg = N_("Regexp");
#endif #endif
/* Stuff we want to just stun out if we're in TINY mode */ /* Stuff we want to just stun out if we're in TINY mode. */
#ifdef NANO_TINY #ifdef NANO_TINY
const char *gototext_msg = ""; const char *gototext_msg = "";
const char *do_para_begin_msg = ""; const char *do_para_begin_msg = "";
@ -529,7 +527,7 @@ const char *goto_dir_msg;
const char *ext_cmd_msg = ""; const char *ext_cmd_msg = "";
#else #else
/* TRANSLATORS: Try to keep the next five strings at most 10 characters. */ /* TRANSLATORS: Try to keep the next three strings at most 10 characters. */
const char *prev_history_msg = N_("PrevHstory"); const char *prev_history_msg = N_("PrevHstory");
const char *next_history_msg = N_("NextHstory"); const char *next_history_msg = N_("NextHstory");
const char *gototext_msg = N_("Go To Text"); const char *gototext_msg = N_("Go To Text");
@ -554,8 +552,8 @@ const char *goto_dir_msg = N_("Go To Dir");
#endif /* NANO_TINY */ #endif /* NANO_TINY */
/* Initialize all shortcut lists. If unjustify is TRUE, replace the /* Initialize all shortcut lists. If unjustify is TRUE, replace
* Uncut shortcut in the main shortcut list with UnJustify. */ * the Uncut shortcut in the main shortcut list with UnJustify. */
void shortcut_init(bool unjustify) void shortcut_init(bool unjustify)
{ {
/* TRANSLATORS: Try to keep the following strings at most 10 characters. */ /* TRANSLATORS: Try to keep the following strings at most 10 characters. */
@ -587,11 +585,11 @@ void shortcut_init(bool unjustify)
#endif #endif
#ifndef DISABLE_JUSTIFY #ifndef DISABLE_JUSTIFY
/* TRANSLATORS: The next long series of strings are shortcut descriptions;
* they are best kept shorter than 56 characters, but may be longer. */
const char *nano_justify_msg = N_("Justify the current paragraph"); const char *nano_justify_msg = N_("Justify the current paragraph");
#endif #endif
#ifndef DISABLE_HELP #ifndef DISABLE_HELP
/* TRANSLATORS: The next long series of strings are shortcut descriptions;
* they are best kept shorter than 56 characters, but may be longer. */
const char *nano_cancel_msg = N_("Cancel the current function"); const char *nano_cancel_msg = N_("Cancel the current function");
const char *nano_help_msg = N_("Display this help text"); const char *nano_help_msg = N_("Display this help text");
const char *nano_exit_msg = const char *nano_exit_msg =
@ -817,7 +815,6 @@ void shortcut_init(bool unjustify)
/* TRANSLATORS: Try to keep this at most 10 characters. */ /* TRANSLATORS: Try to keep this at most 10 characters. */
add_to_funcs(do_uncut_text, MMAIN, N_("UnJustify"), "", add_to_funcs(do_uncut_text, MMAIN, N_("UnJustify"), "",
FALSE, NOVIEW); FALSE, NOVIEW);
else else
/* TRANSLATORS: Try to keep this at most 10 characters. */ /* TRANSLATORS: Try to keep this at most 10 characters. */
add_to_funcs(do_uncut_text, MMAIN, N_("UnCut Text"), IFSCHELP(nano_uncut_msg), add_to_funcs(do_uncut_text, MMAIN, N_("UnCut Text"), IFSCHELP(nano_uncut_msg),
@ -851,7 +848,6 @@ void shortcut_init(bool unjustify)
(MMAIN|MWHEREIS|MREPLACE|MREPLACE2|MGOTOLINE), (MMAIN|MWHEREIS|MREPLACE|MREPLACE2|MGOTOLINE),
last_line_msg, IFSCHELP(nano_lastline_msg), TRUE, VIEW); last_line_msg, IFSCHELP(nano_lastline_msg), TRUE, VIEW);
add_to_funcs(do_gotolinecolumn_void, (MMAIN|MWHEREIS), add_to_funcs(do_gotolinecolumn_void, (MMAIN|MWHEREIS),
go_to_line_msg, IFSCHELP(nano_gotoline_msg), FALSE, VIEW); go_to_line_msg, IFSCHELP(nano_gotoline_msg), FALSE, VIEW);
@ -861,9 +857,7 @@ void shortcut_init(bool unjustify)
FALSE, VIEW); FALSE, VIEW);
#endif #endif
add_to_funcs(do_replace, (MMAIN|MWHEREIS), replace_msg, IFSCHELP(nano_replace_msg), add_to_funcs(do_replace, (MMAIN|MWHEREIS), replace_msg, IFSCHELP(nano_replace_msg),
#ifndef NANO_TINY #ifndef NANO_TINY
FALSE, FALSE,
#else #else
@ -872,7 +866,6 @@ void shortcut_init(bool unjustify)
NOVIEW); NOVIEW);
#ifndef NANO_TINY #ifndef NANO_TINY
add_to_funcs(do_mark, MMAIN, N_("Mark Text"), add_to_funcs(do_mark, MMAIN, N_("Mark Text"),
IFSCHELP(nano_mark_msg), FALSE, VIEW); IFSCHELP(nano_mark_msg), FALSE, VIEW);
@ -895,7 +888,6 @@ void shortcut_init(bool unjustify)
add_to_funcs(do_redo, MMAIN, N_("Redo"), add_to_funcs(do_redo, MMAIN, N_("Redo"),
IFSCHELP(nano_redo_msg), TRUE, NOVIEW); IFSCHELP(nano_redo_msg), TRUE, NOVIEW);
} }
#endif #endif
add_to_funcs(do_right, MMAIN, N_("Forward"), IFSCHELP(nano_forward_msg), add_to_funcs(do_right, MMAIN, N_("Forward"), IFSCHELP(nano_forward_msg),
@ -1104,22 +1096,19 @@ void shortcut_init(bool unjustify)
insert_file_msg, IFSCHELP(nano_insert_msg), FALSE, VIEW); insert_file_msg, IFSCHELP(nano_insert_msg), FALSE, VIEW);
#ifdef ENABLE_MULTIBUFFER #ifdef ENABLE_MULTIBUFFER
add_to_funcs( new_buffer_void, MEXTCMD, add_to_funcs( new_buffer_void, MEXTCMD,
new_buffer_msg, IFSCHELP(nano_multibuffer_msg), FALSE, NOVIEW); new_buffer_msg, IFSCHELP(nano_multibuffer_msg), FALSE, NOVIEW);
#endif #endif
#endif #endif /* NANO_TINY */
#ifndef DISABLE_HELP #ifndef DISABLE_HELP
add_to_funcs(edit_refresh, MHELP, add_to_funcs(edit_refresh, MHELP,
refresh_msg, nano_refresh_msg, FALSE, VIEW); refresh_msg, nano_refresh_msg, FALSE, VIEW);
add_to_funcs(do_exit, MHELP, exit_msg, IFSCHELP(nano_exit_msg), FALSE, VIEW); add_to_funcs(do_exit, MHELP, exit_msg, IFSCHELP(nano_exit_msg), FALSE, VIEW);
#endif #endif
#ifndef DISABLE_BROWSER #ifndef DISABLE_BROWSER
add_to_funcs(do_first_file, add_to_funcs(do_first_file,
(MBROWSER|MWHEREISFILE), (MBROWSER|MWHEREISFILE),
first_file_msg, IFSCHELP(nano_firstfile_msg), FALSE, VIEW); first_file_msg, IFSCHELP(nano_firstfile_msg), FALSE, VIEW);
@ -1367,8 +1356,8 @@ const subnfunc *sctofunc(sc *s)
} }
#ifndef NANO_TINY #ifndef NANO_TINY
/* Now lets come up with a single (hopefully) /* Now let's come up with a single (hopefully)
function to get a string for each flag */ * function to get a string for each flag. */
const char *flagtostr(int flag) const char *flagtostr(int flag)
{ {
switch (flag) { switch (flag) {
@ -1413,7 +1402,7 @@ const char *flagtostr(int flag)
#endif /* NANO_TINY */ #endif /* NANO_TINY */
/* Interpret the string given by the rc file and return a /* Interpret the string given by the rc file and return a
shortcut struct, complete with proper value for execute */ * shortcut struct, complete with proper value for execute. */
sc *strtosc(int menu, char *input) sc *strtosc(int menu, char *input)
{ {
sc *s; sc *s;
@ -1665,7 +1654,7 @@ sc *strtosc(int menu, char *input)
} }
#ifdef ENABLE_NANORC #ifdef ENABLE_NANORC
/* Same thing as abnove but for the menu */ /* Same thing as above but for the menu. */
int strtomenu(char *input) int strtomenu(char *input)
{ {
if (!strcasecmp(input, "all")) if (!strcasecmp(input, "all"))
@ -1809,4 +1798,3 @@ void thanks_for_all_the_fish(void)
} }
#endif /* DEBUG */ #endif /* DEBUG */