Compare commits

...

48 Commits

Author SHA1 Message Date
David Lawrence Ramsey
8a890962f8 GNU nano 2.0.3
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4054 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-29 12:33:45 +00:00
David Lawrence Ramsey
50ee461ff5 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4053 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-29 12:19:24 +00:00
David Lawrence Ramsey
15c9b9a3a2 in ru.po, fix incorrect "Project-Id-Version" entry and misplaced space
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4052 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-29 12:18:36 +00:00
David Lawrence Ramsey
f8770d632e add updated Russian translation
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4051 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-29 12:17:46 +00:00
David Lawrence Ramsey
2ceb858030 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4050 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-28 20:20:30 +00:00
David Lawrence Ramsey
35bd350c03 add missing blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4049 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-28 19:49:05 +00:00
David Lawrence Ramsey
b995263309 update README.CVS for the 2.0 branch of nano
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4048 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-28 19:47:39 +00:00
David Lawrence Ramsey
b1eb0ee20b formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4047 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-28 16:27:04 +00:00
David Lawrence Ramsey
86058fa97f formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4046 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-17 16:24:24 +00:00
David Lawrence Ramsey
ec71964386 in Makefile.am, add README.CVS to EXTRA_DIST, so that nano's CVS
checkout instructions aren't only available in its CVS snapshots


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4045 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-16 19:09:11 +00:00
David Lawrence Ramsey
a4ede3c21e cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4044 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-16 18:59:41 +00:00
David Lawrence Ramsey
99c61e207f fix still more misplaced space
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4043 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-14 15:06:32 +00:00
David Lawrence Ramsey
2aa69bcf27 fix yet more misplaced space
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4042 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-14 01:21:05 +00:00
David Lawrence Ramsey
3c019ef217 fix still more misplaced space
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4041 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-14 01:18:06 +00:00
David Lawrence Ramsey
870dc48ef0 fix more misplaced space
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4040 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-14 01:12:11 +00:00
David Lawrence Ramsey
6dfd398531 fix typos and/or misplaced space
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4039 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-13 20:39:19 +00:00
David Lawrence Ramsey
a9003419e1 fix typos and more misplaced space
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4038 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-13 20:05:23 +00:00
David Lawrence Ramsey
33b0c6874a typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4037 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-13 16:46:17 +00:00
David Lawrence Ramsey
0e1df431a8 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4036 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-12 02:58:12 +00:00
David Lawrence Ramsey
d8d19ba324 add missing changelog entry
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4035 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-11 23:12:51 +00:00
David Lawrence Ramsey
5314b8dd8a still more miscellaneous comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4034 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-11 23:11:46 +00:00
David Lawrence Ramsey
cc91cf41a0 in do_writeout(), when setting retval to the return value of
write_(marked_)?file(), use the "?" operator instead of an if/else
clause


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4033 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-11 23:10:03 +00:00
David Lawrence Ramsey
e44cd2dfba yet more miscellaneous comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4032 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-11 22:54:55 +00:00
David Lawrence Ramsey
9e7b2d572c more miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4031 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-11 22:46:22 +00:00
David Lawrence Ramsey
30ca7d5219 still more miscellaneous comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4030 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-11 21:52:29 +00:00
David Lawrence Ramsey
6e1cd2d2f3 more miscellaneous comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4029 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-11 21:47:06 +00:00
David Lawrence Ramsey
4154d08362 miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4028 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-11 21:36:29 +00:00
David Lawrence Ramsey
8310cd3de6 simplify the commands that generate HTML documentation in order to
remove unnecessary usage of cat


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4027 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-11 19:32:32 +00:00
David Lawrence Ramsey
f38b27e0a1 add missing changelog entry
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4026 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-09 23:42:50 +00:00
David Lawrence Ramsey
9eaa50d69c more miscellaneous comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4025 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-09 23:42:34 +00:00
David Lawrence Ramsey
61848f172a typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4024 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-09 23:40:24 +00:00
David Lawrence Ramsey
0ec34ac28a make regexp_init() return a bool instead of an int
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4023 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-09 23:35:02 +00:00
David Lawrence Ramsey
cb04b56c92 more miscellaneous comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4022 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-09 22:56:56 +00:00
David Lawrence Ramsey
5d7a1017ef don't generate the HTML versions of the nanorc manpages if nano is built
without nanorc support


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4021 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-06 23:21:24 +00:00
David Lawrence Ramsey
9009890726 don't install the nanorc manpages if nano is built without nanorc
support


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4020 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-06 18:06:02 +00:00
David Lawrence Ramsey
4554520805 in doc/man/fr/Makefile.am, set mandir before setting man_MANS, to more
closely match doc/man/Makefile.am


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4019 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-06 16:23:34 +00:00
David Lawrence Ramsey
70afb990b3 typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4018 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-06 13:00:59 +00:00
David Lawrence Ramsey
b5ba9df80f fix misplaced space
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4017 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-06 12:59:03 +00:00
David Lawrence Ramsey
904a510ee1 typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4016 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-02 20:10:11 +00:00
David Lawrence Ramsey
c4592f3a55 fix changelog entry
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4015 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-01 22:22:34 +00:00
David Lawrence Ramsey
44e671f2de in doc/faq.html, update section 4.1 to describe how to open files with
names beginning with '+' at specified columns as well as lines


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4014 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-01 16:57:57 +00:00
David Lawrence Ramsey
ce270393be import the latest version of glib-2.0.m4
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4013 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-01 14:25:58 +00:00
David Lawrence Ramsey
6335fb54d5 miscellaneous comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4012 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-01 05:15:32 +00:00
David Lawrence Ramsey
4b1c73ee17 more miscellaneous cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4011 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-30 23:24:50 +00:00
David Lawrence Ramsey
bd34da7d1d in README, add another cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4010 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-30 23:23:02 +00:00
David Lawrence Ramsey
0c7e6d7aed preemptively update the version number
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4009 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-30 23:07:22 +00:00
David Lawrence Ramsey
fc77fde448 per Mike Frysinger's patch, in doc/syntax/python.nanorc, improve string
highlighting regexes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4008 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-24 18:17:28 +00:00
David Lawrence Ramsey
e9252c55e2 Back to CVS
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4007 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-21 02:48:02 +00:00
59 changed files with 28608 additions and 20292 deletions

456
ChangeLog

File diff suppressed because it is too large Load Diff

View File

@@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = gnu no-dependencies
SUBDIRS = doc m4 po src
EXTRA_DIST = ABOUT-NLS AUTHORS BUGS COPYING ChangeLog INSTALL NEWS \
README THANKS TODO UPGRADE config.rpath install-sh \
missing mkinstalldirs nano.spec
README README.CVS THANKS TODO UPGRADE config.rpath \
install-sh missing mkinstalldirs nano.spec
ACLOCAL_AMFLAGS = -I m4

11
NEWS
View File

@@ -1,3 +1,10 @@
2007.01.29 - GNU nano 2.0.3 flows toward its ending. This release
contains several minor optimizations to make the
executable a little smaller under some circumstances,
some translation updates, improvements to the color
syntax for Python, and still more minor documentation
updates. Have fun.
2006.12.20 - GNU nano 2.0.2 forges ahead. This release fixes a segfault
when trying to save in a nonexistent directory; fixes
handling of strings containing nulls at the "Write File",
@@ -220,8 +227,8 @@
and replacing all text in a file now properly updates
the screen in all cases. New features include sample
regexes for patch files, improvements to the sample
regexes for C files, and support for strings
greater than 1023 characters and/or containing nulls in
regexes for C files, and support for strings greater
than 1023 characters and/or containing nulls in
.nano_history. Additionally, the full justify keystroke
has been changed to match current Pico, and whitespace
display mode is now turned off by default. Enjoy.

4
README
View File

@@ -19,7 +19,7 @@ Overview
The nano editor is now an official GNU package. For more
information on GNU and the Free Software Foundation, please see
http://www.gnu.org.
http://www.gnu.org/.
How to compile and install nano
@@ -67,6 +67,4 @@ Current Status
GNU nano has reached its third stable milestone, 2.0.x.
Chris Allegretta (chrisa@asty.org)
$Id$

View File

@@ -42,11 +42,7 @@ If you're using a C shell (e.g. tcsh or csh), do
After that's set up, cd to your src directory and use the following
command to download the CVS tree:
$ cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/nano checkout nano
If you want to download the stable CVS branch, add "-r nano_1_2_branch":
$ cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/nano checkout -r nano_1_2_branch nano
$ cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/nano checkout -r nano_2_0_branch nano
Generate the configure script

View File

@@ -19,7 +19,7 @@
#
# $Id$
AC_INIT([GNU nano], [2.0.2], [nano-devel@gnu.org], [nano])
AC_INIT([GNU nano], [2.0.3], [nano-devel@gnu.org], [nano])
AC_CONFIG_SRCDIR([src/nano.c])
AC_CANONICAL_TARGET([])
AM_INIT_AUTOMAKE
@@ -372,6 +372,7 @@ int main(void)
esac], [AC_MSG_RESULT(no)])
AM_CONDITIONAL(USE_COLOR, test x$color_support = xyes)
AM_CONDITIONAL(USE_NANORC, test x$nanorc_support = xyes)
dnl Checks for functions.

View File

@@ -84,7 +84,7 @@
<h2><a name="1.5"></a>1.5. Why the name change from TIP?</h2>
<blockquote><p>On January 10, 2000, TIP was officially renamed to nano because of a namespace conflict with another program called 'tip'. The original 'tip' program &quot;establishes a full duplex terminal connection to a remote host&quot;, and was included with many older Unix systems (and newer ones like Solaris). The conflict was not noticed at first because there is no 'tip' utility included with most GNU/Linux distributions (where nano was developed).</p></blockquote>
<h2><a name="1.6"></a>1.6. What is the current version of nano?</h2>
<blockquote><p>The current version of nano *should* be 2.0.2. Of course, you should always check the nano homepage to see what the latest and greatest version is.</p></blockquote>
<blockquote><p>The current version of nano *should* be 2.0.3. Of course, you should always check the nano homepage to see what the latest and greatest version is.</p></blockquote>
<h2><a name="1.7"></a>1.7. I want to read the man page without having to download the program!</h2>
<blockquote><p>Jeez, demanding, aren't we? Okay, look <a href="http://www.nano-editor.org/dist/v2.0/nano.1.html">here</a>.</p></blockquote>
<hr width="100%">
@@ -171,9 +171,11 @@
<hr width="100%">
<h1><a name="4"></a>4. Running</h1>
<h2><a name="4.1"></a>4.1. How do I open a file with a name beginning with '+' from the command line?</h2>
<blockquote><p>If a command line option that begins with '+' is followed by another option, the former is always treated as a starting line number and the latter is always treated as a filename. If a command line option that begins with '+' isn't followed by another option, it's always treated as a filename. Examples:</p>
<blockquote><p>If a command line option that begins with '+' is followed by another option, the former is always treated as a starting line and column number and the latter is always treated as a filename. If a command line option that begins with '+' isn't followed by another option, it's always treated as a filename. Examples:</p>
<p>To open '+filename.txt' starting on line 1: <b>nano +filename.txt</b><br>
To open '+filename.txt' starting on line 10: <b>nano +10 +filename.txt</b><br>
To open '+filename.txt' starting on line 1, column 20: <b>nano +,20 +filename.txt</b><br>
To open '+filename.txt' starting on line 10, column 20: <b>nano +10,20 +filename.txt</b><br>
To open '+filename.txt' starting on line 1 and 'filename.txt' starting on line 10 (if nano has been compiled with multibuffer support): <b>nano +1 +filename.txt +20 filename.txt</b></p></blockquote>
<h2><a name="4.2"></a>4.2. Ack! My Backspace/Delete/Enter/Meta/double bucky key doesn't seem to work! What can I do?</h2>
<blockquote><p>Try setting your $TERM variable to 'vt100'. nano doesn't yet support every term entry under the sun.</p>
@@ -254,7 +256,8 @@
<h2><a name="7.5"></a>7.5. Can I have CVS write access?</h2>
<blockquote><p>Re-read Section <a href="#7.4">7.4</a> and you should know the answer.</p></blockquote>
<h2><a name="8"></a>8. ChangeLog</h2>
<blockquote><p>2006/11/25 - Add miscellaneous wording and capitalization fixes. (DLR)<br>
<blockquote><p>2007/01/01 - Update section 4.1 to describe how to open files with names beginning with '+' at specified columns as well as lines. (DLR)<br>
2006/11/25 - Add miscellaneous wording and capitalization fixes. (DLR)<br>
2006/10/28 - Update various links for the 2.0 branch of nano. (DLR)<br>
2006/10/06 - Update the question in section 4.13 to match the version of it in the answer section. (DLR)<br>
2006/07/25 - Update section 5.3 again to not state &quot;the latest development version&quot; before 1.3.12, as it's no longer accurate. Also add some minor spacing fixes. (DLR)<br>

View File

@@ -4,15 +4,22 @@ else
SUBDIRS =
endif
if USE_NANORC
man_MANS = nano.1 nanorc.5 rnano.1
BUILT_SOURCES = nano.1.html nanorc.5.html rnano.1.html
else
man_MANS = nano.1 rnano.1
BUILT_SOURCES = nano.1.html rnano.1.html
endif
nano_man_mans = nano.1 nanorc.5 rnano.1
nano_built_sources = nano.1.html nanorc.5.html rnano.1.html
nano.1.html: nano.1
cat $< | groff -t -mandoc -Thtml > $@
groff -t -mandoc -Thtml < $< > $@
nanorc.5.html: nanorc.5
cat $< | groff -t -mandoc -Thtml > $@
groff -t -mandoc -Thtml < $< > $@
rnano.1.html: rnano.1
cat $< | groff -t -mandoc -Thtml > $@
groff -t -mandoc -Thtml < $< > $@
EXTRA_DIST = $(man_MANS) $(BUILT_SOURCES)
EXTRA_DIST = $(nano_man_mans) $(nano_built_sources)

View File

@@ -1,14 +1,21 @@
man_MANS = nano.1 nanorc.5 rnano.1
mandir = @mandir@/fr
if USE_NANORC
man_MANS = nano.1 nanorc.5 rnano.1
BUILT_SOURCES = nano.1.html nanorc.5.html rnano.1.html
else
man_MANS = nano.1 rnano.1
BUILT_SOURCES = nano.1.html rnano.1.html
endif
nano_man_mans = nano.1 nanorc.5 rnano.1
nano_built_sources = nano.1.html nanorc.5.html rnano.1.html
nano.1.html: nano.1
cat $< | groff -t -mandoc -Thtml > $@
groff -t -mandoc -Thtml < $< > $@
nanorc.5.html: nanorc.5
cat $< | groff -t -mandoc -Thtml > $@
groff -t -mandoc -Thtml < $< > $@
rnano.1.html: rnano.1
cat $< | groff -t -mandoc -Thtml > $@
groff -t -mandoc -Thtml < $< > $@
EXTRA_DIST = $(man_MANS) $(BUILT_SOURCES)
EXTRA_DIST = $(nano_man_mans) $(nano_built_sources)

View File

@@ -3,6 +3,7 @@
syntax "python" "\.py$"
icolor brightblue "def [0-9A-Z_]+"
color brightcyan "\<(and|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|map|not|or|pass|print|raise|return|try|while)\>"
color brightgreen "["'].*[^\\]["']" "["']{3}.*[^\\]["']{3}"
color brightgreen "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}"
color brightgreen "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}"
color brightgreen start=""""[^"]" end=""""" start="'''[^']" end="'''"
color brightred "#.*$"

View File

@@ -5,6 +5,6 @@ MAKEINFO = makeinfo --no-split
BUILT_SOURCES = nano.html
nano.html: nano.texi
cat $< | makeinfo --no-split --html > $@
makeinfo --no-split --html < $< > $@
EXTRA_DIST = $(info_TEXINFOS) $(BUILT_SOURCES)

View File

@@ -19,6 +19,9 @@ AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run
gmodule)
pkg_config_args="$pkg_config_args gmodule-2.0"
;;
gmodule-no-export)
pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
;;
gobject)
pkg_config_args="$pkg_config_args gobject-2.0"
;;

View File

@@ -1,7 +1,25 @@
2007-01-29 David Lawrence Ramsey <pooka109@cox.net>
* ru.po: Updated Russian translation by Dimitriy Ryazantcev.
* ru.po: Fix incorrect "Project-Id-Version" entry and misplaced
space.
2007-01-13 David Lawrence Ramsey <pooka109@cox.net>
* es.po: Fix misplaced space.
* eu.po: Fix typos and misplaced space.
* fr.po: Fix misplaced space.
* gl.po: Fix typos and misplaced space.
* nb.po: Fix typos and more misplaced space.
2007-01-06 David Lawrence Ramsey <pooka109@cox.net>
* nb.po: Fix misplaced space.
2006-12-06 David Lawrence Ramsey <pooka109@cox.net>
* hu.po: Removed unneeded duplicate plural forms again.
* ms.po: Fixed incorrect "Project-Id-Version" entry.
* ms.po: Fix incorrect "Project-Id-Version" entry.
2006-12-06 Jordi Mallach <jordi@gnu.org>
@@ -12,7 +30,7 @@
2006-11-20 David Lawrence Ramsey <pooka109@cox.net>
* tr.po: Removed unneeded blank plural forms, as gettext 0.15
generates errors upon encountering them.
generates errors upon encountering them.
2006-10-25 Jordi Mallach <jordi@gnu.org>
@@ -93,9 +111,9 @@
2006-08-15 David Lawrence Ramsey <pooka109@cox.net>
* hu.po: Removed unneeded duplicate plural forms, as gettext
0.15 generates errors upon encountering them.
0.15 generates errors upon encountering them.
* id.po: Removed unneeded duplicate plural forms, as gettext
0.15 generates errors upon encountering them.
0.15 generates errors upon encountering them.
2006-06-20 Jordi Mallach <jordi@gnu.org>
@@ -106,9 +124,9 @@
2006-06-20 David Lawrence Ramsey <pooka109@cox.net>
* fr.po: Fixed incorrect "Project-Id-Version" entry.
* hu.po: Fixed incorrect "Project-Id-Version" entry.
* it.po: Fixed incorrect "Project-Id-Version" entry.
* fr.po: Fix incorrect "Project-Id-Version" entry.
* hu.po: Fix incorrect "Project-Id-Version" entry.
* it.po: Fix incorrect "Project-Id-Version" entry.
2006-06-19 Jordi Mallach <jordi@gnu.org>

643
po/bg.po

File diff suppressed because it is too large Load Diff

677
po/ca.po

File diff suppressed because it is too large Load Diff

2867
po/cs.po

File diff suppressed because it is too large Load Diff

2841
po/da.po

File diff suppressed because it is too large Load Diff

673
po/de.po

File diff suppressed because it is too large Load Diff

664
po/es.po

File diff suppressed because it is too large Load Diff

665
po/eu.po

File diff suppressed because it is too large Load Diff

2685
po/fi.po

File diff suppressed because it is too large Load Diff

690
po/fr.po

File diff suppressed because it is too large Load Diff

655
po/ga.po

File diff suppressed because it is too large Load Diff

692
po/gl.po

File diff suppressed because it is too large Load Diff

649
po/hu.po

File diff suppressed because it is too large Load Diff

2829
po/id.po

File diff suppressed because it is too large Load Diff

646
po/it.po

File diff suppressed because it is too large Load Diff

1084
po/ms.po

File diff suppressed because it is too large Load Diff

674
po/nb.po

File diff suppressed because it is too large Load Diff

642
po/nl.po

File diff suppressed because it is too large Load Diff

2805
po/nn.po

File diff suppressed because it is too large Load Diff

2848
po/pl.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

2356
po/ro.po

File diff suppressed because it is too large Load Diff

3116
po/ru.po

File diff suppressed because it is too large Load Diff

2481
po/rw.po

File diff suppressed because it is too large Load Diff

2928
po/sr.po

File diff suppressed because it is too large Load Diff

653
po/sv.po

File diff suppressed because it is too large Load Diff

3162
po/tr.po

File diff suppressed because it is too large Load Diff

2843
po/uk.po

File diff suppressed because it is too large Load Diff

1972
po/vi.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@
* browser.c *
* *
* Copyright (C) 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program 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 2, or (at your option) *
@@ -44,7 +44,7 @@ static size_t selected = 0;
static bool search_last_file = FALSE;
/* Have we gone past the last file while searching? */
/* Our main file browser function. path is the tilde-expanded path to
/* Our main file browser function. path is the tilde-expanded path we
* start browsing from. */
char *do_browser(char *path, DIR *dir)
{
@@ -57,7 +57,7 @@ char *do_browser(char *path, DIR *dir)
/* The directory we were in, if any, before backing up via
* browsing to "..". */
char *ans = NULL;
/* The last answer the user typed on the statusbar. */
/* The last answer the user typed at the statusbar prompt. */
size_t old_selected;
/* The selected file we had before the current selected file. */
@@ -844,9 +844,8 @@ int filesearch_init(void)
#ifdef HAVE_REGEX_H
/* Use last_search if answer is an empty string, or
* answer if it isn't. */
if (ISSET(USE_REGEXP) &&
regexp_init((i == -2) ? last_search :
answer) == 0)
if (ISSET(USE_REGEXP) && !regexp_init((i == -2) ?
last_search : answer))
return -1;
#endif
break;
@@ -1030,7 +1029,7 @@ void do_fileresearch(void)
if (last_search[0] != '\0') {
#ifdef HAVE_REGEX_H
/* Since answer is "", use last_search! */
if (ISSET(USE_REGEXP) && regexp_init(last_search) == 0)
if (ISSET(USE_REGEXP) && !regexp_init(last_search))
return;
#endif

View File

@@ -3,7 +3,7 @@
* chars.c *
* *
* Copyright (C) 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program 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 2, or (at your option) *
@@ -38,9 +38,8 @@ static bool use_utf8 = FALSE;
/* Whether we've enabled UTF-8 support. */
static const wchar_t bad_wchar = 0xFFFD;
/* If we get an invalid multibyte sequence, we treat it as
* Unicode FFFD (Replacement Character), unless we're
* determining if it's a control character or searching for a
* match to it. */
* Unicode FFFD (Replacement Character), unless we're searching
* for a match to it. */
static const char *const bad_mbchar = "\xEF\xBF\xBD";
static const int bad_mbchar_len = 3;

View File

@@ -3,7 +3,7 @@
* color.c *
* *
* Copyright (C) 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program 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 2, or (at your option) *
@@ -29,7 +29,7 @@
#ifdef ENABLE_COLOR
/* For each syntax list entry, go through the list of colors and assign
* color pairs. */
* the color pairs. */
void set_colorpairs(void)
{
const syntaxtype *this_syntax = syntaxes;

View File

@@ -3,7 +3,7 @@
* cut.c *
* *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program 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 2, or (at your option) *
@@ -146,7 +146,7 @@ void do_cut_text(
if (copy_text) {
if (cutbuffer != NULL) {
/* If the cutbuffer isn't empty, save where it currently
* ends. This is where the new text will be added. */
* ends. This is where we'll add the new text. */
cb_save = cutbottom;
cb_save_len = strlen(cutbottom->data);
}
@@ -173,12 +173,12 @@ void do_cut_text(
cut_marked();
openfile->mark_set = FALSE;
} else if (ISSET(CUT_TO_END))
/* Otherwise, if the CUT_TO_END flag is set, move all text up to
* the end of the line into the cutbuffer. */
/* If the CUT_TO_END flag is set, move all text up to the end of
* the line into the cutbuffer. */
cut_to_eol();
else
#endif
/* Otherwise, move the entire line into the cutbuffer. */
/* Move the entire line into the cutbuffer. */
cut_line();
#ifndef NANO_TINY

View File

@@ -3,7 +3,7 @@
* files.c *
* *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program 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 2, or (at your option) *
@@ -579,9 +579,9 @@ void read_file(FILE *f, const char *filename)
* "New File" if the file is missing. Otherwise, say "[filename] not
* found".
*
* Return -2 if we say "New File". Otherwise, -1 if the file isn't
* opened, 0 otherwise. The file might still have an error while
* reading with a 0 return value. *f is set to the opened file. */
* Return -2 if we say "New File", -1 if the file isn't opened, and 0
* otherwise. The file might still have an error while reading with a 0
* return value. *f is set to the opened file. */
int open_file(const char *filename, bool newfie, FILE **f)
{
struct stat fileinfo;
@@ -681,7 +681,7 @@ void do_insertfile(
int i;
const char *msg;
char *ans = mallocstrcpy(NULL, "");
/* The last answer the user typed on the statusbar. */
/* The last answer the user typed at the statusbar prompt. */
filestruct *edittop_save = openfile->edittop;
size_t current_x_save = openfile->current_x;
ssize_t current_y_save = openfile->current_y;
@@ -1250,28 +1250,27 @@ int copy_file(FILE *inn, FILE *out)
return retval;
}
/* Write a file out. If f_open isn't NULL, we assume that it is a
* stream associated with the file, and we don't try to open it
/* Write a file out to disk. If f_open isn't NULL, we assume that it is
* a stream associated with the file, and we don't try to open it
* ourselves. If tmp is TRUE, we set the umask to disallow anyone else
* from accessing the file, we don't set the filename to its name, and
* we don't print out how many lines we wrote on the statusbar.
*
* tmp means we are writing a temporary file in a secure fashion. We
* use it when spell checking or dumping the file on an error.
* use it when spell checking or dumping the file on an error. If
* append is APPEND, it means we are appending instead of overwriting.
* If append is PREPEND, it means we are prepending instead of
* overwriting. If nonamechange is TRUE, we don't change the current
* filename. nonamechange is ignored if tmp is FALSE, we're appending,
* or we're prepending.
*
* append == APPEND means we are appending instead of overwriting.
* append == PREPEND means we are prepending instead of overwriting.
*
* nonamechange means don't change the current filename. It is ignored
* if tmp is FALSE or if we're appending/prepending.
*
* Return 0 on success or -1 on error. */
int write_file(const char *name, FILE *f_open, bool tmp, append_type
* Return TRUE on success or FALSE on error. */
bool write_file(const char *name, FILE *f_open, bool tmp, append_type
append, bool nonamechange)
{
int retval = -1;
bool retval = FALSE;
/* Instead of returning in this function, you should always
* merely set retval and then goto cleanup_and_exit. */
* set retval and then goto cleanup_and_exit. */
size_t lineswritten = 0;
const filestruct *fileptr = openfile->fileage;
int fd;
@@ -1686,7 +1685,7 @@ int write_file(const char *name, FILE *f_open, bool tmp, append_type
titlebar(NULL);
}
retval = 0;
retval = TRUE;
cleanup_and_exit:
free(realname);
@@ -1697,11 +1696,12 @@ int write_file(const char *name, FILE *f_open, bool tmp, append_type
}
#ifndef NANO_TINY
/* Write a marked selection from a file out. */
int write_marked_file(const char *name, FILE *f_open, bool tmp,
/* Write a marked selection from a file out to disk. Return TRUE on
* success or FALSE on error. */
bool write_marked_file(const char *name, FILE *f_open, bool tmp,
append_type append)
{
int retval = -1;
bool retval;
bool old_modified = openfile->modified;
/* write_file() unsets the modified flag. */
bool added_magicline = FALSE;
@@ -1746,16 +1746,17 @@ int write_marked_file(const char *name, FILE *f_open, bool tmp,
/* Write the current file to disk. If the mark is on, write the current
* marked selection to disk. If exiting is TRUE, write the file to disk
* regardless of whether the mark is on, and without prompting if the
* TEMP_FILE flag is set. */
int do_writeout(bool exiting)
* TEMP_FILE flag is set. Return TRUE on success or FALSE on error. */
bool do_writeout(bool exiting)
{
int i, retval = 0;
int i;
append_type append = OVERWRITE;
char *ans;
/* The last answer the user typed on the statusbar. */
/* The last answer the user typed at the statusbar prompt. */
#ifdef NANO_EXTRA
static bool did_credits = FALSE;
#endif
bool retval = FALSE;
currshortcut = writefile_list;
@@ -1764,7 +1765,7 @@ int do_writeout(bool exiting)
FALSE);
/* Write succeeded. */
if (retval == 0)
if (retval)
return retval;
}
@@ -1820,7 +1821,7 @@ int do_writeout(bool exiting)
* encoded null), treat it as though it's blank. */
if (i < 0 || answer[0] == '\n') {
statusbar(_("Cancelled"));
retval = -1;
retval = FALSE;
break;
} else {
ans = mallocstrcpy(ans, answer);
@@ -1874,7 +1875,7 @@ int do_writeout(bool exiting)
strcasecmp(answer, "zzy") == 0) {
do_credits();
did_credits = TRUE;
retval = -1;
retval = FALSE;
break;
}
#endif
@@ -1940,16 +1941,16 @@ int do_writeout(bool exiting)
sunder(answer);
align(&answer);
#ifndef NANO_TINY
/* Here's where we allow the selected text to be written to
* a separate file. If we're using restricted mode, this is
* disabled, since it allows reading from or writing to
* files not specified on the command line. */
if (!ISSET(RESTRICTED) && !exiting && openfile->mark_set)
retval = write_marked_file(answer, NULL, FALSE, append);
else
retval =
#ifndef NANO_TINY
(!ISSET(RESTRICTED) && !exiting && openfile->mark_set) ?
write_marked_file(answer, NULL, FALSE, append) :
#endif
retval = write_file(answer, NULL, FALSE, append, FALSE);
write_file(answer, NULL, FALSE, append, FALSE);
break;
}
@@ -2049,15 +2050,19 @@ void free_chararray(char **array, size_t len)
#endif
#ifndef DISABLE_TABCOMP
/* Is the given file a directory? */
int is_dir(const char *buf)
/* Is the given path a directory? */
bool is_dir(const char *buf)
{
char *dirptr = real_dir_from_tilde(buf);
char *dirptr;
struct stat fileinfo;
int retval = (stat(dirptr, &fileinfo) != -1 &&
S_ISDIR(fileinfo.st_mode));
bool retval;
assert(buf != NULL && dirptr != buf);
assert(buf != NULL);
dirptr = real_dir_from_tilde(buf);
retval = (stat(dirptr, &fileinfo) != -1 &&
S_ISDIR(fileinfo.st_mode));
free(dirptr);

View File

@@ -3,7 +3,7 @@
* global.c *
* *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program 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 2, or (at your option) *
@@ -110,7 +110,7 @@ size_t quotelen;
#endif
char *answer = NULL;
/* The answer string used in the statusbar prompt. */
/* 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

View File

@@ -3,7 +3,7 @@
* help.c *
* *
* Copyright (C) 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program 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 2, or (at your option) *
@@ -51,7 +51,7 @@ void do_help(void (*refresh_func)(void))
/* The current shortcut list. */
#endif
const char *ptr;
/* The current line of help text. */
/* The current line of the help text. */
size_t old_line = (size_t)-1;
/* The line we were on before the current line. */

View File

@@ -3,7 +3,7 @@
* move.c *
* *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program 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 2, or (at your option) *
@@ -272,8 +272,7 @@ bool do_next_word(bool allow_punct, bool allow_update)
free(char_mb);
/* If we haven't found it, leave the cursor at the end of the
* file. */
/* If we haven't found it, move to the end of the file. */
if (openfile->current == NULL)
openfile->current = openfile->filebot;
@@ -371,8 +370,7 @@ bool do_prev_word(bool allow_punct, bool allow_update)
}
}
/* If we haven't found it, leave the cursor at the beginning of the
* file. */
/* If we haven't found it, move to the beginning of the file. */
if (openfile->current == NULL)
openfile->current = openfile->fileage;
/* If we've found it, move backward until we find the character

View File

@@ -3,7 +3,7 @@
* nano.c *
* *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program 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 2, or (at your option) *
@@ -47,7 +47,7 @@ static bool no_rcfiles = FALSE;
static struct termios oldterm;
/* The user's original terminal settings. */
static struct sigaction act;
/* For all our fun signal handlers. */
/* Used to set up all our fun signal handlers. */
/* Create a new filestruct node. Note that we do not set prevnode->next
* to the new line. */
@@ -168,8 +168,8 @@ void renumber(filestruct *fileptr)
fileptr->lineno = ++line;
}
/* Partition a filestruct so it begins at (top, top_x) and ends at (bot,
* bot_x). */
/* Partition a filestruct so that it begins at (top, top_x) and ends at
* (bot, bot_x). */
partition *partition_filestruct(filestruct *top, size_t top_x,
filestruct *bot, size_t bot_x)
{
@@ -221,8 +221,8 @@ partition *partition_filestruct(filestruct *top, size_t top_x,
return p;
}
/* Unpartition a filestruct so it begins at (fileage, 0) and ends at
* (filebot, strlen(filebot->data)) again. */
/* Unpartition a filestruct so that it begins at (fileage, 0) and ends
* at (filebot, strlen(filebot->data)) again. */
void unpartition_filestruct(partition **p)
{
char *tmp;
@@ -523,7 +523,7 @@ void print_view_warning(void)
statusbar(_("Key invalid in view mode"));
}
/* What we do when we're all set to exit. */
/* Make nano exit gracefully. */
void finish(void)
{
/* Blank the statusbar (and shortcut list, if applicable), and move
@@ -547,10 +547,11 @@ void finish(void)
thanks_for_all_the_fish();
#endif
/* Get out. */
exit(0);
}
/* Die (gracefully?). */
/* Make nano die gracefully. */
void die(const char *msg, ...)
{
va_list ap;
@@ -605,15 +606,14 @@ void die_save_file(const char *die_filename)
if (ISSET(RESTRICTED))
return;
/* If we can't save, we have REAL bad problems, but we might as well
* TRY. */
/* If we can't save, we have really bad problems, but we might as
* well try. */
if (die_filename[0] == '\0')
die_filename = "nano";
retval = get_next_filename(die_filename, ".save");
if (retval[0] != '\0')
failed = (write_file(retval, NULL, TRUE, OVERWRITE,
TRUE) == -1);
failed = !write_file(retval, NULL, TRUE, OVERWRITE, TRUE);
if (!failed)
fprintf(stderr, _("\nBuffer written to %s\n"), retval);
@@ -698,7 +698,7 @@ void mouse_init(void)
/* Print one usage string to the screen. This cuts down on duplicate
* strings to translate, and leaves out the parts that shouldn't be
* translatable (the flag names). */
* translatable (i.e. the flag names). */
void print_opt_full(const char *shortflag
#ifdef HAVE_GETOPT_LONG
, const char *longflag
@@ -924,6 +924,11 @@ void nano_disabled_msg(void)
statusbar(_("Sorry, support for this function has been disabled"));
}
/* If the current file buffer has been modified, and the TEMP_FILE flag
* isn't set, ask whether or not to save the file buffer. If the
* TEMP_FILE flag is set, save it unconditionally. Then, if more than
* one file buffer is open, close the current file buffer and switch to
* the next one. If only one file buffer is open, exit from nano. */
void do_exit(void)
{
int i;
@@ -946,7 +951,7 @@ void do_exit(void)
/* If the user chose not to save, or if the user chose to save and
* the save succeeded, we're ready to exit. */
if (i == 0 || (i == 1 && do_writeout(TRUE) == 0)) {
if (i == 0 || (i == 1 && do_writeout(TRUE))) {
#ifdef ENABLE_MULTIBUFFER
/* Exit only if there are no more open file buffers. */
if (!close_buffer())

View File

@@ -3,7 +3,7 @@
* nano.h *
* *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program 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 2, or (at your option) *
@@ -50,7 +50,7 @@
#define ISSET(bit) ((flags & bit) != 0)
#define TOGGLE(bit) flags ^= bit
/* Macros for character allocation, etc. */
/* Macros for character allocation and more. */
#define charalloc(howmuch) (char *)nmalloc((howmuch) * sizeof(char))
#define charealloc(ptr, howmuch) (char *)nrealloc(ptr, (howmuch) * sizeof(char))
#define charmove(dest, src, n) memmove(dest, src, (n) * sizeof(char))

View File

@@ -3,7 +3,7 @@
* prompt.c *
* *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program 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 2, or (at your option) *
@@ -28,7 +28,7 @@
#include <string.h>
static char *prompt = NULL;
/* The prompt string for statusbar questions. */
/* The prompt string used for statusbar questions. */
static size_t statusbar_x = (size_t)-1;
/* The cursor position in answer. */
static size_t statusbar_pww = (size_t)-1;

View File

@@ -3,7 +3,7 @@
* proto.h *
* *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program 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 2, or (at your option) *
@@ -26,8 +26,7 @@
#include "nano.h"
/* All public external variables. See global.c for their
* descriptions. */
/* All external variables. See global.c for their descriptions. */
#ifndef NANO_TINY
extern sigjmp_buf jump_buf;
extern bool jump_buf_main;
@@ -142,7 +141,7 @@ extern int reverse_attr;
extern char *homedir;
/* All public functions in browser.c. */
/* All functions in browser.c. */
#ifndef DISABLE_BROWSER
char *do_browser(char *path, DIR *dir);
char *do_browse_from(const char *inpath);
@@ -161,7 +160,7 @@ void do_last_file(void);
char *striponedir(const char *path);
#endif
/* All public functions in chars.c. */
/* All functions in chars.c. */
#ifdef ENABLE_UTF8
void utf8_init(void);
bool using_utf8(void);
@@ -243,14 +242,14 @@ bool is_valid_unicode(wchar_t wc);
bool is_valid_mbstring(const char *s);
#endif
/* All public functions in color.c. */
/* All functions in color.c. */
#ifdef ENABLE_COLOR
void set_colorpairs(void);
void color_init(void);
void color_update(void);
#endif
/* All public functions in cut.c. */
/* All functions in cut.c. */
void cutbuffer_reset(void);
void cut_line(void);
#ifndef NANO_TINY
@@ -272,7 +271,7 @@ void do_cut_till_end(void);
#endif
void do_uncut_text(void);
/* All public functions in files.c. */
/* All functions in files.c. */
void make_new_buffer(void);
void initialize_buffer(void);
void initialize_buffer_text(void);
@@ -311,13 +310,13 @@ bool check_operating_dir(const char *currpath, bool allow_tabcomp);
void init_backup_dir(void);
#endif
int copy_file(FILE *inn, FILE *out);
int write_file(const char *name, FILE *f_open, bool tmp, append_type
bool write_file(const char *name, FILE *f_open, bool tmp, append_type
append, bool nonamechange);
#ifndef NANO_TINY
int write_marked_file(const char *name, FILE *f_open, bool tmp,
bool write_marked_file(const char *name, FILE *f_open, bool tmp,
append_type append);
#endif
int do_writeout(bool exiting);
bool do_writeout(bool exiting);
void do_writeout_void(void);
char *real_dir_from_tilde(const char *buf);
#if !defined(DISABLE_TABCOMP) || !defined(DISABLE_BROWSER)
@@ -325,6 +324,7 @@ int diralphasort(const void *va, const void *vb);
void free_chararray(char **array, size_t len);
#endif
#ifndef DISABLE_TABCOMP
bool is_dir(const char *buf);
char **username_tab_completion(const char *buf, size_t *num_matches,
size_t buflen);
char **cwd_tab_completion(const char *buf, bool allow_files, size_t
@@ -340,7 +340,7 @@ bool writehist(FILE *hist, filestruct *histhead);
void save_history(void);
#endif
/* All public functions in global.c. */
/* All functions in global.c. */
size_t length_of_list(const shortcut *s);
#ifndef NANO_TINY
void toggle_init_one(int val
@@ -362,7 +362,7 @@ void free_shortcutage(shortcut **shortcutage);
void thanks_for_all_the_fish(void);
#endif
/* All public functions in help.c. */
/* All functions in help.c. */
#ifndef DISABLE_HELP
void do_help(void (*refresh_func)(void));
void do_help_void(void);
@@ -374,7 +374,7 @@ void parse_help_input(int *kbinput, bool *meta_key, bool *func_key);
size_t help_line_len(const char *ptr);
#endif
/* All public functions in move.c. */
/* All functions in move.c. */
void do_first_line(void);
void do_last_line(void);
void do_page_up(void);
@@ -418,7 +418,7 @@ void do_scroll_down(void);
void do_left(void);
void do_right(void);
/* All public functions in nano.c. */
/* All functions in nano.c. */
filestruct *make_new_node(filestruct *prevnode);
filestruct *copy_node(const filestruct *src);
void splice_node(filestruct *begin, filestruct *newnode, filestruct
@@ -489,7 +489,7 @@ bool do_mouse(void);
#endif
void do_output(char *output, size_t output_len, bool allow_cntrls);
/* All public functions in prompt.c. */
/* All functions in prompt.c. */
int do_statusbar_input(bool *meta_key, bool *func_key, bool *s_or_t,
bool *ran_func, bool *finished, bool allow_funcs, void
(*refresh_func)(void));
@@ -546,7 +546,7 @@ int do_prompt(bool allow_tabs,
void do_prompt_abort(void);
int do_yesno_prompt(bool all, const char *msg);
/* All public functions in rcfile.c. */
/* All functions in rcfile.c. */
#ifdef ENABLE_NANORC
void rcfile_error(const char *msg, ...);
char *parse_next_word(char *ptr);
@@ -567,9 +567,9 @@ void parse_rcfile(FILE *rcstream
void do_rcfile(void);
#endif
/* All public functions in search.c. */
/* All functions in search.c. */
#ifdef HAVE_REGEX_H
int regexp_init(const char *regexp);
bool regexp_init(const char *regexp);
void regexp_cleanup(void);
#endif
void not_found_msg(const char *str);
@@ -623,7 +623,7 @@ char *get_history_completion(filestruct **h, const char *s, size_t len);
#endif
#endif
/* All public functions in text.c. */
/* All functions in text.c. */
#ifndef NANO_TINY
void do_mark(void);
#endif
@@ -680,7 +680,7 @@ void do_wordlinechar_count(void);
#endif
void do_verbatim_input(void);
/* All public functions in utils.c. */
/* All functions in utils.c. */
int digits(size_t n);
void get_homedir(void);
bool parse_num(const char *str, ssize_t *val);
@@ -728,7 +728,7 @@ void dump_filestruct(const filestruct *inptr);
void dump_filestruct_reverse(void);
#endif
/* All public functions in winio.c. */
/* All functions in winio.c. */
void get_key_buffer(WINDOW *win);
size_t get_key_buffer_len(void);
void unget_input(int *input, size_t input_len);

View File

@@ -3,7 +3,7 @@
* rcfile.c *
* *
* Copyright (C) 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program 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 2, or (at your option) *
@@ -97,8 +97,7 @@ static const rcoption rcopts[] = {
static bool errors = FALSE;
/* Whether we got any errors while parsing an rcfile. */
static size_t lineno = 0;
/* If we did, the line number where the current error
* occurred. */
/* If we did, the line number where the last error occurred. */
static char *nanorc = NULL;
/* The path to the rcfile we're parsing. */
#ifdef ENABLE_COLOR

View File

@@ -3,7 +3,7 @@
* search.c *
* *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program 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 2, or (at your option) *
@@ -39,21 +39,20 @@ static bool history_changed = FALSE;
static bool regexp_compiled = FALSE;
/* Have we compiled any regular expressions? */
/* Regular expression helper functions. */
/* Compile the given regular expression. Return value 0 means the
* expression was invalid, and we wrote an error message on the status
* bar. Return value 1 means success. */
int regexp_init(const char *regexp)
/* Compile the regular expression regexp to see if it's valid. Return
* TRUE if it is, or FALSE otherwise. */
bool regexp_init(const char *regexp)
{
int rc = regcomp(&search_regexp, regexp, REG_EXTENDED
int rc;
assert(!regexp_compiled);
rc = regcomp(&search_regexp, regexp, REG_EXTENDED
#ifndef NANO_TINY
| (ISSET(CASE_SENSITIVE) ? 0 : REG_ICASE)
#endif
);
assert(!regexp_compiled);
if (rc != 0) {
size_t len = regerror(rc, &search_regexp, NULL, 0);
char *str = charalloc(len);
@@ -61,11 +60,13 @@ int regexp_init(const char *regexp)
regerror(rc, &search_regexp, str, len);
statusbar(_("Bad regex \"%s\": %s"), regexp, str);
free(str);
return 0;
return FALSE;
}
regexp_compiled = TRUE;
return 1;
return TRUE;
}
/* Decompile the compiled regular expression we used in the last
@@ -218,9 +219,8 @@ int search_init(bool replacing, bool use_answer)
#ifdef HAVE_REGEX_H
/* Use last_search if answer is an empty string, or
* answer if it isn't. */
if (ISSET(USE_REGEXP) &&
regexp_init((i == -2) ? last_search :
answer) == 0)
if (ISSET(USE_REGEXP) && !regexp_init((i == -2) ?
last_search : answer))
return -1;
#endif
break;
@@ -511,7 +511,7 @@ void do_research(void)
if (last_search[0] != '\0') {
#ifdef HAVE_REGEX_H
/* Since answer is "", use last_search! */
if (ISSET(USE_REGEXP) && regexp_init(last_search) == 0)
if (ISSET(USE_REGEXP) && !regexp_init(last_search))
return;
#endif
@@ -977,7 +977,7 @@ void do_gotolinecolumn(ssize_t line, ssize_t column, bool use_answer,
if (interactive) {
char *ans = mallocstrcpy(NULL, answer);
/* Ask for it. */
/* Ask for the line and column. */
int i = do_prompt(FALSE,
#ifndef DISABLE_TABCOMP
TRUE,

View File

@@ -3,7 +3,7 @@
* text.c *
* *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program 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 2, or (at your option) *
@@ -191,11 +191,11 @@ void do_tab(void)
}
#ifndef NANO_TINY
/* Indent or unindent the current line (or all lines covered by the mark
* if the mark is on) len columns, depending on whether len is positive
* or negative. If the TABS_TO_SPACES flag is set, indent/unindent by
* len spaces. Otherwise, indent/unindent by (len / tabsize) tabs and
* (len % tabsize) spaces. */
/* Indent or unindent the current line (or, if the mark is on, all lines
* covered by the mark) len columns, depending on whether len is
* positive or negative. If the TABS_TO_SPACES flag is set, indent or
* unindent by len spaces. Otherwise, indent or unindent by (len /
* tabsize) tabs and (len % tabsize) spaces. */
void do_indent(ssize_t cols)
{
bool indent_changed = FALSE;
@@ -2197,7 +2197,7 @@ const char *do_alt_speller(char *tempfile_name)
if (!WIFEXITED(alt_spell_status) ||
WEXITSTATUS(alt_spell_status) != 0) {
char *altspell_error;
char *alt_spell_error;
char *invoke_error = _("Error invoking \"%s\"");
#ifndef NANO_TINY
@@ -2205,11 +2205,11 @@ const char *do_alt_speller(char *tempfile_name)
openfile->mark_set = old_mark_set;
#endif
altspell_error =
alt_spell_error =
charalloc(strlen(invoke_error) +
strlen(alt_speller) + 1);
sprintf(altspell_error, invoke_error, alt_speller);
return altspell_error;
sprintf(alt_spell_error, invoke_error, alt_speller);
return alt_spell_error;
}
#ifndef NANO_TINY
@@ -2301,7 +2301,7 @@ const char *do_alt_speller(char *tempfile_name)
* specified, use it. Otherwise, use the internal spell checker. */
void do_spell(void)
{
int i;
bool status;
FILE *temp_file;
char *temp = safe_tempfile(&temp_file);
const char *spell_msg;
@@ -2311,14 +2311,14 @@ void do_spell(void)
return;
}
i =
status =
#ifndef NANO_TINY
(openfile->mark_set) ? write_marked_file(temp, temp_file, TRUE,
openfile->mark_set ? write_marked_file(temp, temp_file, TRUE,
OVERWRITE) :
#endif
write_file(temp, temp_file, TRUE, OVERWRITE, FALSE);
if (i == -1) {
if (!status) {
statusbar(_("Error writing temp file: %s"), strerror(errno));
free(temp);
return;

View File

@@ -3,7 +3,7 @@
* utils.c *
* *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program 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 2, or (at your option) *
@@ -46,7 +46,7 @@ int digits(size_t n)
}
/* Return the user's home directory. We use $HOME, and if that fails,
* we fall back on getpwuid(). */
* we fall back on the home directory of the effective user ID. */
void get_homedir(void)
{
if (homedir == NULL) {

View File

@@ -3,7 +3,7 @@
* winio.c *
* *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* Copyright (C) 2005, 2006, 2007 David Lawrence Ramsey *
* This program 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 2, or (at your option) *
@@ -30,8 +30,8 @@
#include <ctype.h>
static int *key_buffer = NULL;
/* The keystroke buffer, containing all the keystrokes we have
* at a given point. */
/* The keystroke buffer, containing all the keystrokes we
* haven't handled yet at a given point. */
static size_t key_buffer_len = 0;
/* The length of the keystroke buffer. */
static int statusblank = 0;
@@ -3213,7 +3213,7 @@ void do_credits(void)
"",
"",
"(c) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta",
"(c) 2005, 2006 David Lawrence Ramsey",
"(c) 2005, 2006, 2007 David Lawrence Ramsey",
"",
"",
"",