Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs24-19fa
git_rec_nano
Commits
57d1755d
Commit
57d1755d
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: preen some comments, and reshuffle a few ifdefs
parent
bace664f
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/global.c
+15
-17
src/global.c
src/nano.c
+2
-2
src/nano.c
src/nano.h
+1
-1
src/nano.h
with
18 additions
and
20 deletions
+18
-20
src/global.c
View file @
57d1755d
/**************************************************************************
* 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 t
he start of the shortcuts list. */
/*
T
he start of the shortcuts list. */
subnfunc
*
allfuncs
=
NULL
;
/*
Pointer to t
he start of the functions list. */
/*
T
he start of the functions list. */
subnfunc
*
tailfunc
;
/*
Pointer to t
he last function in the list. */
/*
T
he last function in the list. */
subnfunc
*
exitfunc
;
/*
P
ointer to the special Exit/Close item. */
/*
A p
ointer to the special Exit/Close item. */
subnfunc
*
uncutfunc
;
/*
P
ointer to the special Uncut/Unjustify item. */
/*
A p
ointer 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
;
}
...
...
This diff is collapsed.
Click to expand it.
src/nano.c
View file @
57d1755d
...
...
@@ -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
();
...
...
This diff is collapsed.
Click to expand it.
src/nano.h
View file @
57d1755d
...
...
@@ -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, *
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help