Normalizing whitespace around '==' comparison.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4776 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
родитель
d0691d9485
Коммит
5bd359dbb9
@ -3,13 +3,14 @@
|
||||
non-blocking mode for keyboard input.
|
||||
* src/winio.c: Relocate and correct a few comments.
|
||||
* README.SVN: To build nano from svn, ssh is not required.
|
||||
* src/*.c: Normalize whitespace around '==' comparison.
|
||||
|
||||
2014-04-14 Benno Schulenberg <bensberg@justemail.net>
|
||||
* src/{proto.h,cut.c,nano.c,text.c}: Remove the unused parameter
|
||||
'file_bot' from copy_from_filestruct(), and rename the other.
|
||||
* src/*: Remove the unused parameter 'func_key' from get_shortcut(),
|
||||
and subsequently from parse_browser_input() and parse_help_input().
|
||||
* src/*: Whitespace adjustments, plus a few comment tweaks.
|
||||
* src/*: Adjust some whitespace and tweak a few comments.
|
||||
* src/winio.c (getfuncfromkey): Elide variable and condense comment.
|
||||
* src/text.c (break_line): Initialize a variable to avoid a compiler
|
||||
warning, rename it to be more apt, add a comment, tweak some others,
|
||||
@ -107,7 +108,7 @@
|
||||
* src/rcfile.c (check_vitals_mapped): Do not allow 'set quiet'
|
||||
to suppress a fatal-error message, make sure the user sees it.
|
||||
* src/color.c: Comment tweaks.
|
||||
* src/{*.h,*.c}, configure.ac:Convert all occurrences of
|
||||
* src/{*.h,*.c}, configure.ac: Convert all occurrences of
|
||||
#ifdef ENABLE_COLOR to #ifndef DISABLE_COLOR.
|
||||
* src/nano.h: Comment tweaks.
|
||||
* configure.ac: Move the enabling stuff to after the disablers.
|
||||
@ -148,7 +149,7 @@
|
||||
variable possibly being used uninitialized.
|
||||
|
||||
2014-03-31 Chris Allegretta <chrisa@asty.org>
|
||||
* doc/syntax/go.nanorc: basic go syntax highlighting
|
||||
* doc/syntax/go.nanorc: New file, basic go syntax highlighting.
|
||||
|
||||
2014-03-30 Benno Schulenberg <bensberg@justemail.net>
|
||||
* doc/syntax/changelog.nanorc: New file, first attempt at colouring
|
||||
|
@ -844,7 +844,7 @@ int filesearch_init(void)
|
||||
TOGGLE(CASE_SENSITIVE);
|
||||
backupstring = mallocstrcpy(backupstring, answer);
|
||||
return 1;
|
||||
} else if (s && s->scfunc == backwards_void) {
|
||||
} else if (s && s->scfunc == backwards_void) {
|
||||
TOGGLE(BACKWARDS_SEARCH);
|
||||
backupstring = mallocstrcpy(backupstring, answer);
|
||||
return 1;
|
||||
|
@ -397,7 +397,7 @@ void reset_multis(filestruct *fileptr, bool force)
|
||||
* things changed drastically for the precalculated multi values. */
|
||||
nobegin = regexec(tmpcolor->start, fileptr->data, 1, &startmatch, 0);
|
||||
noend = regexec(tmpcolor->end, fileptr->data, 1, &endmatch, 0);
|
||||
if (fileptr->multidata[tmpcolor->id] == CWHOLELINE) {
|
||||
if (fileptr->multidata[tmpcolor->id] == CWHOLELINE) {
|
||||
if (nobegin && noend)
|
||||
continue;
|
||||
} else if (fileptr->multidata[tmpcolor->id] == CNONE) {
|
||||
|
@ -2971,7 +2971,7 @@ void load_history(void)
|
||||
|
||||
|
||||
if (stat(legacyhist, &hstat) != -1 && stat(nanohist, &hstat) == -1) {
|
||||
if (rename(legacyhist, nanohist) == -1)
|
||||
if (rename(legacyhist, nanohist) == -1)
|
||||
history_error(N_("Detected a legacy nano history file (%s) which I tried to move\nto the preferred location (%s) but encountered an error: %s"),
|
||||
legacyhist, nanohist, strerror(errno));
|
||||
else
|
||||
|
@ -269,11 +269,11 @@ void ext_cmd_void(void)
|
||||
/* Set type of function based on the string. */
|
||||
function_type strtokeytype(const char *str)
|
||||
{
|
||||
if (str[0] == 'M' || str[0] == 'm')
|
||||
if (str[0] == 'M' || str[0] == 'm')
|
||||
return META;
|
||||
else if (str[0] == '^')
|
||||
return CONTROL;
|
||||
else if (str[0] == 'F' || str[0] == 'f')
|
||||
else if (str[0] == 'F' || str[0] == 'f')
|
||||
return FKEY;
|
||||
else
|
||||
return RAWINPUT;
|
||||
|
@ -398,9 +398,8 @@ void help_init(void)
|
||||
size_t endis_len = strlen(_("enable/disable"));
|
||||
|
||||
for (s = sclist; s != NULL; s = s->next)
|
||||
if (s->scfunc == do_toggle_void)
|
||||
if (s->scfunc == do_toggle_void)
|
||||
allocsize += strlen(_(flagtostr(s->toggle))) + endis_len + 9;
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1891,7 +1891,7 @@ void precalc_multicolorinfo(void)
|
||||
goto precalc_cleanup;
|
||||
}
|
||||
|
||||
while ((nostart = regexec(tmpcolor->start, &fileptr->data[startx], 1, &startmatch, 0)) == 0) {
|
||||
while ((nostart = regexec(tmpcolor->start, &fileptr->data[startx], 1, &startmatch, 0)) == 0) {
|
||||
/* Look for end, and start marking how many lines are
|
||||
* encompassed which should speed up rendering later. */
|
||||
startx += startmatch.rm_eo;
|
||||
@ -1900,7 +1900,7 @@ void precalc_multicolorinfo(void)
|
||||
#endif
|
||||
|
||||
/* Look on this line first for end. */
|
||||
if (regexec(tmpcolor->end, &fileptr->data[startx], 1, &endmatch, 0) == 0) {
|
||||
if (regexec(tmpcolor->end, &fileptr->data[startx], 1, &endmatch, 0) == 0) {
|
||||
startx += endmatch.rm_eo;
|
||||
fileptr->multidata[tmpcolor->id] |= CSTARTENDHERE;
|
||||
#ifdef DEBUG
|
||||
|
12
src/prompt.c
12
src/prompt.c
@ -126,7 +126,7 @@ int do_statusbar_input(bool *meta_key, bool *func_key, bool *have_shortcut,
|
||||
/* If we got a shortcut, or if there aren't any other characters
|
||||
* waiting after the one we read in, we need to display all the
|
||||
* characters in the input buffer if it isn't empty. */
|
||||
if (*have_shortcut || get_key_buffer_len() == 0) {
|
||||
if (*have_shortcut || get_key_buffer_len() == 0) {
|
||||
if (kbinput != NULL) {
|
||||
/* Display all the characters in the input buffer at
|
||||
* once, filtering out control characters. */
|
||||
@ -226,8 +226,8 @@ int do_statusbar_input(bool *meta_key, bool *func_key, bool *have_shortcut,
|
||||
* that we're done after running or trying to run their
|
||||
* associated functions. */
|
||||
f = sctofunc((sc *) s);
|
||||
if (s->scfunc != 0 && s->execute == TRUE) {
|
||||
*ran_func = TRUE;
|
||||
if (s->scfunc != 0 && s->execute == TRUE) {
|
||||
*ran_func = TRUE;
|
||||
if (f && (!ISSET(VIEW_MODE) || (f->viewok)))
|
||||
f->scfunc();
|
||||
}
|
||||
@ -1099,7 +1099,7 @@ fprintf(stderr, "get_prompt_string: answer = \"%s\", statusbar_x = %lu\n", answe
|
||||
* we've finished putting in an answer, reset the statusbar cursor
|
||||
* position too. */
|
||||
if (s) {
|
||||
if (s->scfunc == do_cancel || s->scfunc == do_enter_void ||
|
||||
if (s->scfunc == do_cancel || s->scfunc == do_enter_void ||
|
||||
ran_func) {
|
||||
statusbar_x = old_statusbar_x;
|
||||
statusbar_pww = old_pww;
|
||||
@ -1186,7 +1186,7 @@ int do_prompt(bool allow_tabs,
|
||||
|
||||
/* If we left the prompt via Cancel or Enter, set the return value
|
||||
* properly. */
|
||||
if (s && s->scfunc == do_cancel)
|
||||
if (s && s->scfunc == do_cancel)
|
||||
retval = -1;
|
||||
else if (s && s->scfunc == do_enter_void)
|
||||
retval = (*answer == '\0') ? -2 : 0;
|
||||
@ -1296,7 +1296,7 @@ int do_yesno_prompt(bool all, const char *msg)
|
||||
kbinput = get_kbinput(bottomwin, &meta_key, &func_key);
|
||||
s = get_shortcut(currmenu, &kbinput, &meta_key);
|
||||
|
||||
if (s && s->scfunc == do_cancel)
|
||||
if (s && s->scfunc == do_cancel)
|
||||
ok = -1;
|
||||
#ifndef DISABLE_MOUSE
|
||||
else if (kbinput == KEY_MOUSE) {
|
||||
|
@ -1044,7 +1044,7 @@ void do_gotolinecolumn(ssize_t line, ssize_t column, bool use_answer,
|
||||
|
||||
s = get_shortcut(currmenu, &i, &meta_key);
|
||||
|
||||
if (s && s->scfunc == gototext_void) {
|
||||
if (s && s->scfunc == gototext_void) {
|
||||
/* Keep answer up on the statusbar. */
|
||||
search_init(TRUE, TRUE);
|
||||
|
||||
|
@ -145,7 +145,7 @@ void do_delete(void)
|
||||
|
||||
set_modified();
|
||||
|
||||
if (edit_refresh_needed == FALSE)
|
||||
if (edit_refresh_needed == FALSE)
|
||||
update_line(openfile->current, openfile->current_x);
|
||||
}
|
||||
|
||||
@ -2705,7 +2705,7 @@ const char *do_int_speller(const char *tempfile_name)
|
||||
if (WIFEXITED(spell_status) == 0 || WEXITSTATUS(spell_status))
|
||||
return _("Error invoking \"spell\"");
|
||||
|
||||
if (WIFEXITED(sort_status) == 0 || WEXITSTATUS(sort_status))
|
||||
if (WIFEXITED(sort_status) == 0 || WEXITSTATUS(sort_status))
|
||||
return _("Error invoking \"sort -f\"");
|
||||
|
||||
if (WIFEXITED(uniq_status) == 0 || WEXITSTATUS(uniq_status))
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user