mirror of
git://git.sv.gnu.org/nano.git
synced 2025-01-21 00:32:07 +03:00
tweaks: preen some comments, and reshuffle a few ifdefs
This commit is contained in:
parent
bace664fbc
commit
57d1755d10
32
src/global.c
32
src/global.c
@ -1,5 +1,5 @@
|
||||
/**************************************************************************
|
||||
* global.c -- This file is part of GNU nano. *
|
||||
* global.c -- This file is part of GNU nano. *
|
||||
* *
|
||||
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, *
|
||||
* 2008, 2009, 2010, 2011, 2013, 2014 Free Software Foundation, Inc. *
|
||||
@ -89,13 +89,13 @@ int maxrows = 0;
|
||||
filestruct *cutbuffer = NULL;
|
||||
/* The buffer where we store cut text. */
|
||||
filestruct *cutbottom = NULL;
|
||||
/* The last line in the cutbuffer. */
|
||||
#ifndef DISABLE_JUSTIFY
|
||||
filestruct *jusbuffer = NULL;
|
||||
/* The buffer where we store unjustified text. */
|
||||
#endif
|
||||
partition *filepart = NULL;
|
||||
/* The partition where we store a portion of the current
|
||||
* file. */
|
||||
/* The "partition" where we store a portion of the current file. */
|
||||
openfilestruct *openfile = NULL;
|
||||
/* The list of all open file buffers. */
|
||||
|
||||
@ -128,7 +128,7 @@ char *quoteerr = NULL;
|
||||
size_t quotelen;
|
||||
/* The length of the quoting string in bytes. */
|
||||
#endif
|
||||
#endif
|
||||
#endif /* !DISABLE_JUSTIFY */
|
||||
|
||||
char *word_chars = NULL;
|
||||
/* Nonalphanumeric characters that also form words. */
|
||||
@ -140,8 +140,7 @@ char *answer = NULL;
|
||||
/* The answer string used by the statusbar prompt. */
|
||||
|
||||
ssize_t tabsize = -1;
|
||||
/* The width of a tab in spaces. The default value is set in
|
||||
* main(). */
|
||||
/* The width of a tab in spaces. The default is set in main(). */
|
||||
|
||||
#ifndef NANO_TINY
|
||||
char *backup_dir = NULL;
|
||||
@ -179,15 +178,15 @@ bool refresh_needed = FALSE;
|
||||
int currmenu = MMOST;
|
||||
/* The currently active menu, initialized to a dummy value. */
|
||||
sc *sclist = NULL;
|
||||
/* Pointer to the start of the shortcuts list. */
|
||||
/* The start of the shortcuts list. */
|
||||
subnfunc *allfuncs = NULL;
|
||||
/* Pointer to the start of the functions list. */
|
||||
/* The start of the functions list. */
|
||||
subnfunc *tailfunc;
|
||||
/* Pointer to the last function in the list. */
|
||||
/* The last function in the list. */
|
||||
subnfunc *exitfunc;
|
||||
/* Pointer to the special Exit/Close item. */
|
||||
/* A pointer to the special Exit/Close item. */
|
||||
subnfunc *uncutfunc;
|
||||
/* Pointer to the special Uncut/Unjustify item. */
|
||||
/* A pointer to the special Uncut/Unjustify item. */
|
||||
|
||||
#ifndef DISABLE_HISTORIES
|
||||
filestruct *search_history = NULL;
|
||||
@ -206,7 +205,6 @@ poshiststruct *position_history = NULL;
|
||||
/* The cursor position history list. */
|
||||
#endif
|
||||
|
||||
/* Regular expressions. */
|
||||
#ifdef HAVE_REGEX_H
|
||||
regex_t search_regexp;
|
||||
/* The compiled regular expression to use in searches. */
|
||||
@ -216,7 +214,7 @@ regmatch_t regmatches[10];
|
||||
#endif
|
||||
|
||||
int hilite_attribute = A_REVERSE;
|
||||
/* The curses attribute we use for reverse video. */
|
||||
/* The curses attribute we use to highlight something. */
|
||||
#ifndef DISABLE_COLOR
|
||||
char* specified_color_combo[] = {};
|
||||
/* The color combinations as specified in the rcfile. */
|
||||
@ -227,6 +225,7 @@ int interface_color_pair[] = {};
|
||||
char *homedir = NULL;
|
||||
/* The user's home directory, from $HOME or /etc/passwd. */
|
||||
|
||||
|
||||
/* Return the number of entries in the shortcut list for a given menu. */
|
||||
size_t length_of_list(int menu)
|
||||
{
|
||||
@ -1572,8 +1571,8 @@ sc *strtosc(const char *input)
|
||||
else if (!strcasecmp(input, "lastfile"))
|
||||
s->scfunc = do_last_file;
|
||||
#endif
|
||||
#ifndef NANO_TINY
|
||||
else {
|
||||
#ifndef NANO_TINY
|
||||
s->scfunc = do_toggle_void;
|
||||
if (!strcasecmp(input, "nohelp"))
|
||||
s->toggle = NO_HELP;
|
||||
@ -1617,14 +1616,13 @@ sc *strtosc(const char *input)
|
||||
s->toggle = NO_CONVERT;
|
||||
else if (!strcasecmp(input, "suspendenable"))
|
||||
s->toggle = SUSPEND;
|
||||
else
|
||||
#endif /* !NANO_TINY */
|
||||
else {
|
||||
{
|
||||
free(s);
|
||||
return NULL;
|
||||
}
|
||||
#ifndef NANO_TINY
|
||||
}
|
||||
#endif
|
||||
return s;
|
||||
}
|
||||
|
||||
|
@ -1178,9 +1178,9 @@ void stdin_pager(void)
|
||||
tcsetattr(0, TCSANOW, &oldterm);
|
||||
fprintf(stderr, _("Reading from stdin, ^C to abort\n"));
|
||||
|
||||
#ifndef NANO_TINY
|
||||
/* Enable interpretation of the special control keys so that
|
||||
* we get SIGINT when Ctrl-C is pressed. */
|
||||
#ifndef NANO_TINY
|
||||
enable_signals();
|
||||
#endif
|
||||
|
||||
@ -1300,7 +1300,7 @@ RETSIGTYPE do_continue(int signal)
|
||||
/* Restore the terminal to its previous state. */
|
||||
terminal_init();
|
||||
|
||||
/* Redraw the contents of the windows that need it. */
|
||||
/* Wipe statusbar; redraw titlebar and edit window (and help lines). */
|
||||
blank_statusbar();
|
||||
wnoutrefresh(bottomwin);
|
||||
total_refresh();
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, *
|
||||
* 2008, 2009, 2010, 2011, 2013, 2014 Free Software Foundation, Inc. *
|
||||
* Copyright (C) 2014, 2015, 2016 Benno Schulenberg *
|
||||
*
|
||||
* *
|
||||
* GNU nano is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published *
|
||||
* by the Free Software Foundation, either version 3 of the License, *
|
||||
|
Loading…
Reference in New Issue
Block a user