Compare commits
23 Commits
v1.1.99pre
...
v1.2.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa4593124d | ||
|
|
8151ba5a1a | ||
|
|
4b376a4982 | ||
|
|
e1e0fd634b | ||
|
|
0f4a7dc53a | ||
|
|
e2a9e3c5fa | ||
|
|
db469d8666 | ||
|
|
8f711b8d6b | ||
|
|
d845193a1d | ||
|
|
53c3b47bf9 | ||
|
|
23f575628a | ||
|
|
723399a3a2 | ||
|
|
dbc3ec72e1 | ||
|
|
2b4ead9cb8 | ||
|
|
a7a78decb6 | ||
|
|
593a0678b8 | ||
|
|
9658c4cd82 | ||
|
|
e0516f330f | ||
|
|
33ac7b9181 | ||
|
|
1aa8541c5c | ||
|
|
fc71eb5f72 | ||
|
|
07e2000094 | ||
|
|
3d3325129c |
115
ChangeLog
115
ChangeLog
@@ -1,3 +1,95 @@
|
||||
GNU nano 1.2.1 - 2003.04.19
|
||||
- General:
|
||||
- Translation updates (see po/ChangeLog for details).
|
||||
- Work around broken regexec() on some systems that segfaults
|
||||
when passed an empty string. New function regexec_safe().
|
||||
(David Benbennick)
|
||||
- Fix various bugs with search string history logging: don't
|
||||
print a broken error message and freeze if ~/.nano_history is
|
||||
unreadable, actually show an error message in save_history()
|
||||
if ~/.nano_history is unwritable, and prevent ~/.nano_history
|
||||
from being completely overwritten by save_history() if it's
|
||||
unreadable but writable. (David Benbennick)
|
||||
- Only unset KEEP_CUTBUFFER in main() when we do something other
|
||||
than cut text in the main input loop, instead of unsetting it
|
||||
all over the place (which, as written, didn't handle cases
|
||||
like a cut followed by M-Space properly). Also, instead of
|
||||
checking for keyhandled's not being set inside the for loops,
|
||||
do it in if blocks surrounding the for loops to increase
|
||||
efficiency. (David Benbennick) DLR: Also unset KEEP_CUTBUFFER
|
||||
if we hit a shortcut key other than the one for cutting text.
|
||||
- Make it so a marked cut immediately followed by an unmarked
|
||||
cut tacks the latter's text onto the end of the former's text
|
||||
instead of putting it on a new line, as Pico does. (DLR)
|
||||
- Convert instances of "(char *)nrealloc()" to the macro
|
||||
charealloc(), which does the same thing. (DLR)
|
||||
- Change justify_mode from a boolean int to a flag (DLR).
|
||||
- cut.c:
|
||||
do_cut_text()
|
||||
- Tweak where KEEP_CUTBUFFER is set so that a marked cut
|
||||
immediately followed by an unmarked cut preserves the
|
||||
cutbuffer between the two. (David Benbennick) DLR: Also
|
||||
properly set KEEP_CUTBUFFER in tiny mode.
|
||||
do_uncut_text()
|
||||
- If we're about to uncut on the magicline, always make a new
|
||||
magicline in advance, as Pico does. (DLR)
|
||||
- global.c:
|
||||
shortcut_init()
|
||||
- Simplify the #ifdef used to enable file insertion in view mode
|
||||
if multibuffer support has been compiled in. (DLR)
|
||||
- nano.c:
|
||||
justify_format()
|
||||
- If we shave spaces off the end of the line, make sure totsize
|
||||
is properly updated. (DLR; much simplified by David
|
||||
Benbennick)
|
||||
- nano.h:
|
||||
- Simplify #ifdefs relating to HAVE_STRCASECMP and
|
||||
HAVE_STRNCASECMP. (David Benbennick)
|
||||
- search.c:
|
||||
goto_abort()
|
||||
- Removed, with all instances replaced with display_main_list(),
|
||||
since with the removal of all the scattered calls to
|
||||
SET(KEEP_CUTBUFFER), that function was all that was left of
|
||||
it. (DLR)
|
||||
do_find_bracket()
|
||||
- If a matching bracket wasn't found, call update_line() after
|
||||
setting current and current_x back to their original values,
|
||||
in case current_x's original value is greater than the width
|
||||
of the screen. (DLR)
|
||||
- winio.c:
|
||||
nanogetstr()
|
||||
- Remove a few unnecessary breaks occurring immediately after
|
||||
gotos, and properly interpret the up and down arrow keys when
|
||||
ALT_KEYPAD is set. (DLR)
|
||||
- configure.ac:
|
||||
- Enable autodetection of broken regexec(). (DLR) Re-added
|
||||
regex.h check to ensure compile under Debian w/autoconf 1.6.
|
||||
- README:
|
||||
- Update obsolete 1.1.x information.
|
||||
- TODO:
|
||||
- Fix typo. (David Benbennick)
|
||||
- faq.html:
|
||||
- Update RPM links for nano 1.2.x. (DLR)
|
||||
|
||||
GNU nano 1.2.0 - 2003.02.19
|
||||
- General:
|
||||
- Translation updates (see po/ChangeLog for details).
|
||||
- files.c:
|
||||
read_file()
|
||||
- If the file we're loading has already been detected as a DOS
|
||||
or Mac formatted file, don't turn on NOCONVERT if we find
|
||||
binary chars in it. This is because if it's detected as
|
||||
DOS/Mac format, at least one line has already been converted,
|
||||
so setting NOCONVERT (which is supposed to signal that none
|
||||
of the file should be converted) makes no sense. (DLR)
|
||||
- nano.c:
|
||||
justify_format()
|
||||
- Fix ugly behavior when wrapping spaces at the end of long
|
||||
words (David Benbennick).
|
||||
- nanorc.5:
|
||||
- Fix formatting error and update copyright year (Jordi).
|
||||
- Several enhancements (David Benbennick).
|
||||
|
||||
GNU nano 1.1.99pre3 - 2003.02.13
|
||||
- General:
|
||||
- Translation updates (see po/ChangeLog for details).
|
||||
@@ -9,31 +101,32 @@ GNU nano 1.1.99pre3 - 2003.02.13
|
||||
nano.c:global_init(), window_init(), and handle_sigwinch().
|
||||
New macro MIN_EDITOR_COLS replaces MIN_FILL_LENGTH
|
||||
(David Benbennick).
|
||||
- Change ngettext macro to P_(), to avoid a clash with the reserved C
|
||||
__ identifier (Jordi).
|
||||
- Change ngettext macro to P_(), to avoid a clash with the
|
||||
reserved C __ identifier (Jordi).
|
||||
- Memory leak fixes for files.c:do_insertfile(),do_browser(),
|
||||
nano.c:do_spell(), and search.c:do_replace() (David Benbennick).
|
||||
nano.c:do_spell(), and search.c:do_replace() (David
|
||||
Benbennick).
|
||||
- Remove do_preserve_msg, as using -p still gives Pico-style
|
||||
string behavior, so an annoying message every invocation is
|
||||
probably unneeded (all cheer).
|
||||
- Change resetpos function to be global (now called
|
||||
- Change resetpos function to be global (now called
|
||||
resetstatuspos. Fixes annoying but small odd problem with
|
||||
cursor placement when inserting a file. This needs to be done
|
||||
better in 1.3 (originally by David Lawrence Ramsey).
|
||||
Added this issue to TODO.
|
||||
cursor placement when inserting a file. This needs to be done
|
||||
better in 1.3 (originally by David Lawrence Ramsey). Added
|
||||
this issue to TODO.
|
||||
- files.c:
|
||||
cwd_tab_completion()
|
||||
- Memory leak fix (David Benbennick).
|
||||
intput_tab()
|
||||
- Fix assumption that matches is null terminated (David
|
||||
- Fix assumption that matches is null terminated (David
|
||||
Benbennick).
|
||||
load_history()
|
||||
- Fix segfault on loading huge strings from history file
|
||||
- Fix segfault on loading huge strings from history file
|
||||
(David Benbennick).
|
||||
load_history(), save_history()
|
||||
- Changed to look at $HOME before getpwuid(geteuid()), see
|
||||
details in comment for rcfile.c:do_rcfile().
|
||||
real_dir_from_tidle()
|
||||
real_dir_from_tilde()
|
||||
- Change check for the running user's home dir to use
|
||||
getpwuid(geteuid()) rather than a getpwent() loop
|
||||
(suggested by Jordi).
|
||||
@@ -46,7 +139,7 @@ GNU nano 1.1.99pre3 - 2003.02.13
|
||||
nano.c:line_len(). (David Benbennick).
|
||||
do_justify()
|
||||
- Add regfree() to quote regex (David Benbennick).
|
||||
- Only copy previous indent if AUTOINDENT is set (David
|
||||
- Only copy previous indent if AUTOINDENT is set (David
|
||||
Benbennick).
|
||||
do_suspend()
|
||||
- Fix untranslated message (David Benbennick).
|
||||
|
||||
16
NEWS
16
NEWS
@@ -1,3 +1,19 @@
|
||||
2003.04.19 - Happy Easter! GNU nano 1.2.1 is released. This release
|
||||
features a new check for broken regexec()
|
||||
implementations and some variable, function and macro
|
||||
cleanups. Fixes are included for search history,
|
||||
cutting marked text, alt keyboard mode, and the usual
|
||||
translation and documentation updates.
|
||||
|
||||
2003.02.19 - GNU nano 1.2.0 is released. Few changes from pre3, just
|
||||
some doc and translation updates, and bugfixes for
|
||||
justify and file conversion. For those of you who
|
||||
haven't kept up with the 1.1 unstable series, v1.2
|
||||
brings nanorc support, color syntax highlighting,
|
||||
multiple file buffers, search/replace history and much
|
||||
much more. Please reade the UPGRADE file for details,
|
||||
and enjoy GNU nano 1.2.0.
|
||||
|
||||
2003.02.13 - GNU nano 1.1.99pre3 "The last testing version, no
|
||||
really!" is released. This release includes fixes for
|
||||
wrapping (again), resizing, color syntax highlighting,
|
||||
|
||||
29
README
29
README
@@ -56,32 +56,9 @@ Mailing List and Bug Reports
|
||||
|
||||
Current Status
|
||||
|
||||
This is the 1.1 or unstable branch of nano. New features
|
||||
will be added and things will be changed around and basically
|
||||
stability is not guaranteed. If this is not what you're
|
||||
interested in, please use the latest 1.0.x release of nano.
|
||||
|
||||
New features in this branch include:
|
||||
+ .nanorc file support (--enable-nanorc configure option,
|
||||
see sample.nanorc file)
|
||||
+ Negative -r value for "#cols from right", allows dynamic adjustment
|
||||
of wrap margin based on window size.
|
||||
+ Write marked text to separate file (^O after selecting with ^^).
|
||||
+ Append to file (Meta-A at write file menu).
|
||||
+ Multiple file buffers! (--enable-multibuffer configure option,
|
||||
--multibuffer, -F cmdline flag, Meta-F toggle, then ^R to load).
|
||||
+ Better compatibility with Pico. Mouse mode now supports clicking
|
||||
shortcuts and files in browser, search toggles that are Pico
|
||||
extensions moved to Meta keys so as to not interfere with Pico
|
||||
control sequences.
|
||||
+ Smooth scrolling through files, instead of the jerky half-page
|
||||
down, half-page up method. This is available by using the
|
||||
-S or --smooth switch, or the Meta-S toggle.
|
||||
+ Better non-*nix file support. GNU nano now automatically
|
||||
converts files from DOS format or Mac format to standard file
|
||||
format. It can also write files in either format by using the
|
||||
appropriate command line (-D, --dos or -M, --mac) or toggle
|
||||
(Meta-D, Meta-O).
|
||||
GNU nano has reaching its second major milestone, 1.2.x. Development
|
||||
of new features will continue in the 1.3.x branch, while 1.2.x
|
||||
versions will be dedicated to bugfixing and polishing.
|
||||
|
||||
Chris Allegretta (chrisa@asty.org)
|
||||
|
||||
|
||||
2
TODO
2
TODO
@@ -19,7 +19,7 @@ For version 1.4:
|
||||
- UTF-8 support.
|
||||
- Support for Pico's paragraph searching ability.
|
||||
- Undo/Redo key?
|
||||
- Remindable keys?
|
||||
- Rebindable keys?
|
||||
- Keystroke to implement "Add next sequence as raw" like vi's ^V.
|
||||
- Spell check selected text only.
|
||||
- Make "To line" (^W^T) and "Read from Command" (^R^X) re-enter their
|
||||
|
||||
2
UPGRADE
2
UPGRADE
@@ -6,7 +6,7 @@ Visible changes since 1.0
|
||||
* Editor Features
|
||||
- Complete Pico compatibility (--pico has been removed, and -p means
|
||||
something else, see below).
|
||||
- nanorc support.
|
||||
- nanorc support (see nanorc.sample included in sources).
|
||||
- Smooth scrolling (-S).
|
||||
- Searching of matching brace/bracket/etc.
|
||||
- Help for all editor features.
|
||||
|
||||
15
configure.ac
15
configure.ac
@@ -19,7 +19,7 @@
|
||||
#
|
||||
# $Id$
|
||||
|
||||
AC_INIT([GNU Nano], [1.1.99pre3], [nano-devel@gnu.org], [nano])
|
||||
AC_INIT([GNU Nano], [1.2.1], [nano-devel@gnu.org], [nano])
|
||||
AC_CONFIG_SRCDIR([nano.c])
|
||||
AM_INIT_AUTOMAKE
|
||||
AM_CONFIG_HEADER([config.h:config.h.in])
|
||||
@@ -38,12 +38,22 @@ AM_GNU_GETTEXT([external], [need-ngettext])
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(fcntl.h getopt.h libintl.h limits.h regex.h termio.h termios.h unistd.h)
|
||||
AC_CHECK_HEADER(regex.h,
|
||||
AC_MSG_CHECKING([for broken regexec])
|
||||
AC_TRY_RUN([
|
||||
#include <sys/types.h>
|
||||
#include <regex.h>
|
||||
int main() { regex_t reg; size_t n; regmatch_t r; regcomp(®, ".", 0); regexec(®, "", n, &r, 0); return 0; }],
|
||||
AC_MSG_RESULT(no),
|
||||
AC_MSG_RESULT(yes); AC_DEFINE(BROKEN_REGEXEC, 1, [Define this if your regexec() function segfaults when passed an empty string.])
|
||||
)
|
||||
)
|
||||
|
||||
dnl options
|
||||
AC_ARG_ENABLE(debug,
|
||||
[ --enable-debug Enable debugging (disabled by default)],
|
||||
[if test x$enableval = xyes; then
|
||||
AC_DEFINE(DEBUG, 1, [Define this to enable nano debug messages and assert warnings.])
|
||||
AC_DEFINE(DEBUG, 1, [Define this to enable nano debug messages and assert warnings.])
|
||||
debug_support=yes
|
||||
fi])
|
||||
|
||||
@@ -125,7 +135,6 @@ AC_ARG_ENABLE(wrapping-as-root,
|
||||
AC_DEFINE(DISABLE_ROOTWRAP, 1, [Define this to disable wrapping as root by default.])
|
||||
fi])
|
||||
|
||||
|
||||
AC_ARG_ENABLE(color,
|
||||
[ --enable-color Enable color and syntax highlighting],
|
||||
[if test x$enableval = xyes; then
|
||||
|
||||
51
cut.c
51
cut.c
@@ -29,6 +29,12 @@
|
||||
#include "nano.h"
|
||||
|
||||
static int marked_cut; /* Is the cutbuffer from a mark? */
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
static int concatenate_cut; /* Should we add this cut string to the
|
||||
end of the last one? */
|
||||
#endif
|
||||
|
||||
static filestruct *cutbottom = NULL;
|
||||
/* Pointer to end of cutbuffer */
|
||||
|
||||
@@ -47,6 +53,15 @@ void add_to_cutbuffer(filestruct *inptr)
|
||||
if (cutbuffer == NULL) {
|
||||
cutbuffer = inptr;
|
||||
inptr->prev = NULL;
|
||||
#ifndef NANO_SMALL
|
||||
} else if (concatenate_cut && !ISSET(JUSTIFY_MODE)) {
|
||||
/* Just tack the text in inptr onto the text in cutbottom,
|
||||
unless we're backing up lines while justifying text. */
|
||||
cutbottom->data = charealloc(cutbottom->data,
|
||||
strlen(cutbottom->data) + strlen(inptr->data) + 1);
|
||||
strcat(cutbottom->data, inptr->data);
|
||||
return;
|
||||
#endif
|
||||
} else {
|
||||
cutbottom->next = inptr;
|
||||
inptr->prev = cutbottom;
|
||||
@@ -118,15 +133,13 @@ void cut_marked_segment(filestruct *top, size_t top_x, filestruct *bot,
|
||||
move text from the end forward first. */
|
||||
memmove(top->data + top_x, bot->data + bot_x,
|
||||
newsize - top_x);
|
||||
top->data = (char *)nrealloc(top->data,
|
||||
sizeof(char) * newsize);
|
||||
top->data = charealloc(top->data, newsize);
|
||||
} else {
|
||||
totsize -= bot_x + 1;
|
||||
|
||||
/* Here, the remainder line might get longer, so we
|
||||
realloc() it first. */
|
||||
top->data = (char *)nrealloc(top->data,
|
||||
sizeof(char) * newsize);
|
||||
top->data = charealloc(top->data, newsize);
|
||||
memmove(top->data + top_x, bot->data + bot_x,
|
||||
newsize - top_x);
|
||||
}
|
||||
@@ -172,6 +185,9 @@ void cut_marked_segment(filestruct *top, size_t top_x, filestruct *bot,
|
||||
new_magicline();
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG
|
||||
dump_buffer(cutbuffer);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -190,6 +206,9 @@ int do_cut_text(void)
|
||||
free_filestruct(cutbuffer);
|
||||
cutbuffer = NULL;
|
||||
marked_cut = 0;
|
||||
#ifndef NANO_SMALL
|
||||
concatenate_cut = 0;
|
||||
#endif
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, _("Blew away cutbuffer =)\n"));
|
||||
#endif
|
||||
@@ -204,6 +223,8 @@ int do_cut_text(void)
|
||||
)
|
||||
return 0;
|
||||
|
||||
SET(KEEP_CUTBUFFER);
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
if (ISSET(CUT_TO_END) && !ISSET(MARK_ISSET)) {
|
||||
assert(current_x >= 0 && current_x <= strlen(current->data));
|
||||
@@ -223,12 +244,10 @@ int do_cut_text(void)
|
||||
}
|
||||
|
||||
do_delete();
|
||||
SET(KEEP_CUTBUFFER);
|
||||
marked_cut = 2;
|
||||
return 1;
|
||||
} else {
|
||||
SET(MARK_ISSET);
|
||||
SET(KEEP_CUTBUFFER);
|
||||
|
||||
mark_beginx = strlen(current->data);
|
||||
mark_beginbuf = current;
|
||||
@@ -249,6 +268,11 @@ int do_cut_text(void)
|
||||
placewewant = xplustabs();
|
||||
UNSET(MARK_ISSET);
|
||||
|
||||
/* If we just did a marked cut of part of a line, we should add
|
||||
the first line of any cut done immediately afterward to the
|
||||
end of this cut, as Pico does. */
|
||||
if (current == mark_beginbuf && current_x < strlen(current->data))
|
||||
concatenate_cut = 1;
|
||||
marked_cut = 1;
|
||||
if (dontupdate)
|
||||
edit_refresh();
|
||||
@@ -283,8 +307,10 @@ int do_cut_text(void)
|
||||
edit_refresh();
|
||||
set_modified();
|
||||
marked_cut = 0;
|
||||
#ifndef NANO_SMALL
|
||||
concatenate_cut = 0;
|
||||
#endif
|
||||
placewewant = 0;
|
||||
SET(KEEP_CUTBUFFER);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -312,6 +338,11 @@ int do_uncut_text(void)
|
||||
placewewant = 0;
|
||||
}
|
||||
|
||||
/* If we're going to uncut on the magicline, always make a new
|
||||
magicline in advance. */
|
||||
if (current->next == NULL)
|
||||
new_magicline();
|
||||
|
||||
if (marked_cut == 0 || cutbuffer->next != NULL)
|
||||
{
|
||||
newbuf = copy_filestruct(cutbuffer);
|
||||
@@ -338,10 +369,6 @@ int do_uncut_text(void)
|
||||
|
||||
current_x += buf_len;
|
||||
totsize += buf_len;
|
||||
/* If we've uncut a line, make sure there's a magicline after
|
||||
it */
|
||||
if (current->next == NULL)
|
||||
new_magicline();
|
||||
|
||||
placewewant = xplustabs();
|
||||
update_cursor();
|
||||
@@ -426,7 +453,6 @@ int do_uncut_text(void)
|
||||
edit_update(current, CENTER);
|
||||
else
|
||||
edit_refresh();
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -464,6 +490,5 @@ int do_uncut_text(void)
|
||||
#endif
|
||||
|
||||
set_modified();
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
return 1;
|
||||
}
|
||||
|
||||
15
faq.html
15
faq.html
@@ -36,7 +36,7 @@
|
||||
<a href="#4.3">4.3. Nano crashes when I resize my window. How can I fix that?</a><br>
|
||||
<a href="#4.4">4.4. [version 1.1.12 and earlier] Why does nano show ^\ in the shortcut list instead of ^J?</a><br>
|
||||
<a href="#4.5a">4.5a. [version 1.1.12 and earlier] When I type in a search string, the string I last searched for is already in front of my cursor! What happened?!</a><br>
|
||||
<a href="#4.5b">4.5b. [version 1.2.0 and later] Hey, the search string behavior has reverted, it's now like Pico, what happened to the consistency?</a><br>
|
||||
<a href="#4.5b">4.5b. [version 1.2.1 and later] Hey, the search string behavior has reverted, it's now like Pico, what happened to the consistency?</a><br>
|
||||
<a href="#4.6">4.6. I get the message "NumLock glitch detected. Keypad will malfunction with NumLock off." What gives?</a><br>
|
||||
<a href="#4.7">4.7. How do I make nano my default editor (in Pine, mutt, etc.)?</a></p></blockquote>
|
||||
<h2><a href="#5">5. Internationalization</a></h2>
|
||||
@@ -77,9 +77,9 @@
|
||||
<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 "establishes a full duplex terminal connection to a remote host", 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 1.1.99pre3. 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 1.2.1. 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/v1.1/nano.1.html">here</a>.</p></blockquote>
|
||||
<blockquote><p>Jeez, demanding, aren't we? Okay, look <a href="http://www.nano-editor.org/dist/v1.2/nano.1.html">here</a>.</p></blockquote>
|
||||
<hr width="100%">
|
||||
<h1><a name="2"></a>2. Where to get GNU nano.</h1>
|
||||
<h2><a name="2.1"></a>2.1. FTP and WWW sites that carry nano.</h2>
|
||||
@@ -93,8 +93,8 @@
|
||||
<h2><a name="2.2"></a>2.2. RedHat and derivatives (.rpm) packages.</h2>
|
||||
<blockquote>
|
||||
<ul>
|
||||
<li><a href="http://www.nano-editor.org/dist/v1.0/RPMS/">http://www.nano-editor.org/dist/v1.0/RPMS/</a></li>
|
||||
<li><a href="http://www.ewtoo.org/~astyanax/nano/dist/v1.0/RPMS/">http://www.ewtoo.org/~astyanax/nano/dist/v1.0/RPMS/</a></li>
|
||||
<li><a href="http://www.nano-editor.org/dist/v1.2/RPMS/">http://www.nano-editor.org/dist/v1.2/RPMS/</a></li>
|
||||
<li><a href="http://www.ewtoo.org/~astyanax/nano/dist/v1.2/RPMS/">http://www.ewtoo.org/~astyanax/nano/dist/v1.2/RPMS/</a></li>
|
||||
</ul>
|
||||
<p>Additionally, check out the RedHat contribs section at:</p>
|
||||
<ul>
|
||||
@@ -175,7 +175,7 @@
|
||||
<a name="4.5"></a>
|
||||
<h2><a name="4.5a"></a>4.5a. [version 1.1.12 and earlier] When I type in a search string, the string I last searched for is already in front of my cursor! What happened?!</h2>
|
||||
<blockquote><p>In nano version 0.9.20, the default is to have a completely consistent user interface across all user input functions. This means that regardless of whether you're being asked for a filename to insert or write, or a string to search for, the previous value is already inserted before the cursor. If you prefer the old behavior, use the Pico emulation mode (-p or --pico) or just hit Meta-P while in nano (see the ^G help text for more details).</p></blockquote>
|
||||
<h2><a name="4.5b"></a>4.5b. [version 1.2.0 and later] Hey, the search string behavior has reverted, it's now like Pico, what happened to the consistency?</h2>
|
||||
<h2><a name="4.5b"></a>4.5b. [version 1.2.1 and later] Hey, the search string behavior has reverted, it's now like Pico, what happened to the consistency?</h2>
|
||||
<blockquote><p>It was decided that consistency was nice, but people are used to Pico's inconsistent behavior. Also, in version 1.1.99pre1, search and replace history was introduced. If you wish to edit your previous search/replace entry (or any previous entry), you can do so by hitting the up arrow to cycle through your history. This method allows the best of both worlds: You don't need to erase the previous string if you want to enter a new one, but you can with one keystroke recall previous entries for editing. Therefore there is now no "Pico mode", nano is and has always been a Pico <b>clone</b>, and clones by default should be compatible.</p></blockquote>
|
||||
<h2><a name="4.6"></a>4.6. I get the message "NumLock glitch detected. Keypad will malfunction with NumLock off." What gives?</h2>
|
||||
<blockquote><p>Nano (and actually almost all console editors) has issues when cycling the NumLock key in certain X terminals (rxvt, aterm, wterm, etc...). When you switch NumLock from on to off, you put the terminal into an "application mode" that changes what sequences are sent by the keypad. These sequences vary sufficiently from terminal to terminal that it is nearly impossible to work around them from within nano.</p>
|
||||
@@ -223,7 +223,7 @@
|
||||
help-nano - <a href="http://mail.gnu.org/mailman/listinfo/help-nano/">http://mail.gnu.org/mailman/listinfo/help-nano/</a><br>
|
||||
nano-devel - <a href="http://mail.gnu.org/mailman/listinfo/nano-devel/">http://mail.gnu.org/mailman/listinfo/nano-devel/</a></p></blockquote>
|
||||
<h2><a name="7.2"></a>7.2. I want to send the development team a big load of cash (or just a thank you).</h2>
|
||||
<blockquote><p>That's fine. Send it <a href="mailto:nano-devel@gnu.org">our way</a>! Better yet, fix a <a href="http://www.nano-editor.org/dist/v1.1/BUGS">bug</a> in the program or implement a <a href="http://www.nano-editor.org/dist/v1.1/TODO">cool feature</a> and send us that instead (though cash is fine too).</p></blockquote>
|
||||
<blockquote><p>That's fine. Send it <a href="mailto:nano-devel@gnu.org">our way</a>! Better yet, fix a <a href="http://www.nano-editor.org/dist/v1.2/BUGS">bug</a> in the program or implement a <a href="http://www.nano-editor.org/dist/v1.2/TODO">cool feature</a> and send us that instead (though cash is fine too).</p></blockquote>
|
||||
<h2><a name="7.3"></a>7.3. How do I submit a patch?</h2>
|
||||
<blockquote><p>See Section <a href="#7.2">7.2</a>.</p></blockquote>
|
||||
<h2><a name="7.4"></a>7.4. How do I join the development team?</h2>
|
||||
@@ -233,6 +233,7 @@
|
||||
<h2><a name="8"></a>8. ChangeLog</h2>
|
||||
<blockquote>
|
||||
<p>
|
||||
2003/02/23 - Updated RPM links for nano 1.2.x. (DLR).<br>
|
||||
2003/01/16 - Split section 4.5 into 4.5a and 4.5b for search string behavior. Added --enable-all docs.<br>
|
||||
2002/12/28 - More misc. fixes (David Benbennick, DLR).<br>
|
||||
2002/10/25 - Misc. fixes and link updates (DLR).<br>
|
||||
|
||||
19
files.c
19
files.c
@@ -185,9 +185,11 @@ int read_file(FILE *f, const char *filename, int quiet)
|
||||
input = (char)input_int;
|
||||
#ifndef NANO_SMALL
|
||||
/* If the file has binary chars in it, don't stupidly
|
||||
assume it's a DOS or Mac formatted file! */
|
||||
if (!ISSET(NO_CONVERT) && is_cntrl_char((int)input) != 0
|
||||
&& input != '\t' && input != '\r' && input != '\n')
|
||||
assume it's a DOS or Mac formatted file if it hasn't been
|
||||
detected as one already! */
|
||||
if (fileformat == 0 && !ISSET(NO_CONVERT)
|
||||
&& is_cntrl_char((int)input) != 0 && input != '\t'
|
||||
&& input != '\r' && input != '\n')
|
||||
SET(NO_CONVERT);
|
||||
#endif
|
||||
|
||||
@@ -493,7 +495,6 @@ int do_insertfile(int loading_file)
|
||||
_("Command to execute"));
|
||||
if (ts == -1 || answer == NULL || answer[0] == '\0') {
|
||||
statusbar(_("Cancelled"));
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
display_main_list();
|
||||
return 0;
|
||||
}
|
||||
@@ -616,7 +617,6 @@ int do_insertfile(int loading_file)
|
||||
free(inspath);
|
||||
inspath = NULL;
|
||||
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
display_main_list();
|
||||
return i;
|
||||
}
|
||||
@@ -1896,8 +1896,8 @@ char *real_dir_from_tilde(const char *buf)
|
||||
for (i = 1; buf[i] != '/' && buf[i] != '\0'; i++)
|
||||
;
|
||||
|
||||
/* Determine home directory using getpwent(), don't rely on
|
||||
$HOME */
|
||||
/* Determine home directory using getpwuid() or getpwent(),
|
||||
don't rely on $HOME */
|
||||
if (i == 1)
|
||||
userdata = getpwuid(geteuid());
|
||||
else {
|
||||
@@ -2890,8 +2890,11 @@ void load_history(void)
|
||||
if (homenv != NULL || userage != NULL) {
|
||||
hist = fopen(nanohist, "r");
|
||||
if (!hist) {
|
||||
if (errno != ENOENT)
|
||||
if (errno != ENOENT) {
|
||||
/* Don't save history when we quit. */
|
||||
UNSET(HISTORYLOG);
|
||||
rcfile_error(_("Unable to open ~/.nano_history file, %s"), strerror(errno));
|
||||
}
|
||||
free(nanohist);
|
||||
} else {
|
||||
buf = charalloc(1024);
|
||||
|
||||
13
global.c
13
global.c
@@ -439,16 +439,15 @@ void shortcut_init(int unjustify)
|
||||
IFHELP(nano_justify_msg, 0), NANO_JUSTIFY_FKEY, 0,
|
||||
NOVIEW, do_justify);
|
||||
|
||||
/* this is so we can view multiple files */
|
||||
sc_init_one(&main_list, NANO_INSERTFILE_KEY, _("Read File"),
|
||||
IFHELP(nano_insert_msg, 0), NANO_INSERTFILE_FKEY, 0,
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
/* this is so we can view multiple files */
|
||||
sc_init_one(&main_list, NANO_INSERTFILE_KEY, _("Read File"),
|
||||
IFHELP(nano_insert_msg, 0),
|
||||
NANO_INSERTFILE_FKEY, 0, VIEW, do_insertfile_void);
|
||||
VIEW
|
||||
#else
|
||||
sc_init_one(&main_list, NANO_INSERTFILE_KEY, _("Read File"),
|
||||
IFHELP(nano_insert_msg, 0),
|
||||
NANO_INSERTFILE_FKEY, 0, NOVIEW, do_insertfile_void);
|
||||
NOVIEW
|
||||
#endif
|
||||
, do_insertfile_void);
|
||||
|
||||
sc_init_one(&main_list, NANO_WHEREIS_KEY, _("Where Is"),
|
||||
IFHELP(nano_whereis_msg, 0),
|
||||
|
||||
8
move.c
8
move.c
@@ -30,7 +30,6 @@
|
||||
|
||||
int do_home(void)
|
||||
{
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
current_x = 0;
|
||||
placewewant = 0;
|
||||
update_line(current, current_x);
|
||||
@@ -39,7 +38,6 @@ int do_home(void)
|
||||
|
||||
int do_end(void)
|
||||
{
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
current_x = strlen(current->data);
|
||||
placewewant = xplustabs();
|
||||
update_line(current, current_x);
|
||||
@@ -89,7 +87,6 @@ int do_page_up(void)
|
||||
edit_update(current, TOP);
|
||||
update_cursor();
|
||||
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
check_statblank();
|
||||
return 1;
|
||||
}
|
||||
@@ -132,7 +129,6 @@ int do_page_down(void)
|
||||
}
|
||||
|
||||
update_cursor();
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
check_statblank();
|
||||
return 1;
|
||||
}
|
||||
@@ -151,7 +147,6 @@ int do_up(void)
|
||||
update_line(current, current_x);
|
||||
} else
|
||||
page_up();
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
check_statblank();
|
||||
}
|
||||
return 1;
|
||||
@@ -162,7 +157,6 @@ int do_up(void)
|
||||
int do_down(void)
|
||||
{
|
||||
wrap_reset();
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
check_statblank();
|
||||
|
||||
if (current->next == NULL)
|
||||
@@ -207,7 +201,6 @@ int do_left(void)
|
||||
}
|
||||
placewewant = xplustabs();
|
||||
update_line(current, current_x);
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
check_statblank();
|
||||
return 1;
|
||||
}
|
||||
@@ -224,7 +217,6 @@ int do_right(void)
|
||||
}
|
||||
placewewant = xplustabs();
|
||||
update_line(current, current_x);
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
check_statblank();
|
||||
return 1;
|
||||
}
|
||||
|
||||
141
nano.c
141
nano.c
@@ -66,18 +66,6 @@ static sigjmp_buf jmpbuf; /* Used to return to mainloop after SIGWINCH */
|
||||
/* What we do when we're all set to exit */
|
||||
RETSIGTYPE finish(int sigage)
|
||||
{
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
#ifdef ENABLE_NANORC
|
||||
/* do here so errors about ./nano_history
|
||||
don't confuse user */
|
||||
if (!ISSET(NO_RCFILE) && ISSET(HISTORYLOG))
|
||||
save_history();
|
||||
#endif
|
||||
free_history(&search_history);
|
||||
free_history(&replace_history);
|
||||
#endif
|
||||
|
||||
keypad(edit, TRUE);
|
||||
keypad(bottomwin, TRUE);
|
||||
|
||||
@@ -93,6 +81,11 @@ RETSIGTYPE finish(int sigage)
|
||||
/* Restore the old term settings */
|
||||
tcsetattr(0, TCSANOW, &oldterm);
|
||||
|
||||
#if !defined(NANO_SMALL) && defined(ENABLE_NANORC)
|
||||
if (!ISSET(NO_RCFILE) && ISSET(HISTORYLOG))
|
||||
save_history();
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
thanks_for_all_the_fish();
|
||||
#endif
|
||||
@@ -1025,8 +1018,6 @@ void do_char(char ch)
|
||||
if (refresh)
|
||||
edit_refresh();
|
||||
#endif
|
||||
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
}
|
||||
|
||||
int do_backspace(void)
|
||||
@@ -1100,7 +1091,6 @@ int do_backspace(void)
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, _("After, data = \"%s\"\n"), current->data);
|
||||
#endif
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
refresh = 1;
|
||||
}
|
||||
|
||||
@@ -1159,7 +1149,6 @@ int do_delete(void)
|
||||
|
||||
totsize--;
|
||||
set_modified();
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
update_line(current, current_x);
|
||||
if (refresh)
|
||||
edit_refresh();
|
||||
@@ -2042,12 +2031,12 @@ int justify_format(int changes_allowed, filestruct *line, size_t skip)
|
||||
/* These four asserts are assumptions about the input data. */
|
||||
assert(line != NULL);
|
||||
assert(line->data != NULL);
|
||||
assert(skip <= strlen(line->data));
|
||||
assert(skip < strlen(line->data));
|
||||
assert(line->data[skip] != ' ' && line->data[skip] != '\t');
|
||||
|
||||
back = line->data + skip;
|
||||
front = back;
|
||||
for (; *front; front++) {
|
||||
for (front = back; ; front++) {
|
||||
int remove_space = 0;
|
||||
/* Do we want to remove this space? */
|
||||
|
||||
@@ -2057,11 +2046,11 @@ int justify_format(int changes_allowed, filestruct *line, size_t skip)
|
||||
*front = ' ';
|
||||
}
|
||||
/* these tests are safe since line->data + skip is not a space */
|
||||
if (*front == ' ' && *(front - 1) == ' ') {
|
||||
if ((*front == '\0' || *front == ' ') && *(front - 1) == ' ') {
|
||||
const char *bob = front - 2;
|
||||
|
||||
remove_space = 1;
|
||||
for (bob = front - 2; bob >= line->data + skip; bob--) {
|
||||
for (bob = back - 2; bob >= line->data + skip; bob--) {
|
||||
if (strchr(punct, *bob) != NULL) {
|
||||
remove_space = 0;
|
||||
break;
|
||||
@@ -2080,28 +2069,25 @@ int justify_format(int changes_allowed, filestruct *line, size_t skip)
|
||||
if (mark_beginbuf == line && back - line->data < mark_beginx)
|
||||
mark_beginx--;
|
||||
#endif
|
||||
if (*front == '\0')
|
||||
*(back - 1) = '\0';
|
||||
} else {
|
||||
*back = *front;
|
||||
back++;
|
||||
}
|
||||
if (*front == '\0')
|
||||
break;
|
||||
}
|
||||
|
||||
/* Remove spaces from the end of the line, except maintain 1 after a
|
||||
* sentence punctuation. */
|
||||
while (line->data < back && *(back - 1) == ' ')
|
||||
back--;
|
||||
if (line->data < back && *back == ' ' &&
|
||||
strchr(punct, *(back - 1)) != NULL)
|
||||
back++;
|
||||
if (!changes_allowed && back != front)
|
||||
return 1;
|
||||
back--;
|
||||
assert(*back == '\0' && *front == '\0');
|
||||
|
||||
/* This assert merely documents a fact about the loop above. */
|
||||
assert(changes_allowed != 0 || back == front);
|
||||
|
||||
/* Now back is the new end of line->data. */
|
||||
if (back != front) {
|
||||
totsize += back - line->data - strlen(line->data);
|
||||
totsize -= front - back;
|
||||
null_at(&line->data, back - line->data);
|
||||
#ifndef NANO_SMALL
|
||||
if (mark_beginbuf == line && back - line->data < mark_beginx)
|
||||
@@ -2253,7 +2239,7 @@ int break_line(const char *line, int goal, int force)
|
||||
/* No space found short enough. */
|
||||
if (force)
|
||||
for(; *line != '\0'; line++, cur_loc++)
|
||||
if (*line == ' ' && *(line + 1) != ' ')
|
||||
if (*line == ' ' && *(line + 1) != ' ' && *(line + 1) != '\0')
|
||||
return cur_loc;
|
||||
return -1;
|
||||
}
|
||||
@@ -2438,6 +2424,7 @@ int do_justify(void)
|
||||
|
||||
/* Next step, we loop through the lines of this paragraph, justifying
|
||||
* each one individually. */
|
||||
SET(JUSTIFY_MODE);
|
||||
for(; par_len > 0; current_y++, par_len--) {
|
||||
size_t line_len;
|
||||
size_t display_len;
|
||||
@@ -2501,9 +2488,8 @@ int do_justify(void)
|
||||
|
||||
indent_len = quote_len +
|
||||
indent_length(current->next->data + quote_len);
|
||||
current->next->data = (char *)nrealloc(current->next->data,
|
||||
sizeof(char) * (next_line_len + line_len -
|
||||
break_pos + 1));
|
||||
current->next->data = charealloc(current->next->data,
|
||||
next_line_len + line_len - break_pos + 1);
|
||||
|
||||
memmove(current->next->data + indent_len + line_len - break_pos,
|
||||
current->next->data + indent_len,
|
||||
@@ -2547,7 +2533,7 @@ int do_justify(void)
|
||||
fill - display_len - 1, FALSE);
|
||||
assert(break_pos != -1);
|
||||
|
||||
current->data = (char *)nrealloc(current->data,
|
||||
current->data = charealloc(current->data,
|
||||
line_len + break_pos + 2);
|
||||
current->data[line_len] = ' ';
|
||||
strncpy(current->data + line_len + 1,
|
||||
@@ -2590,6 +2576,8 @@ int do_justify(void)
|
||||
continue_loc:
|
||||
current = current->next;
|
||||
}
|
||||
UNSET(JUSTIFY_MODE);
|
||||
|
||||
/* We are now done justifying the paragraph. There are cleanup things to
|
||||
* do, and we check for unjustify. */
|
||||
|
||||
@@ -2674,10 +2662,9 @@ int do_justify(void)
|
||||
}
|
||||
edit_refresh();
|
||||
}
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
cutbuffer = cutbuffer_save;
|
||||
blank_statusbar_refresh();
|
||||
/* display shortcut list without UnCut */
|
||||
/* display shortcut list with UnCut */
|
||||
shortcut_init(0);
|
||||
display_main_list();
|
||||
|
||||
@@ -3320,6 +3307,14 @@ int main(int argc, char *argv[])
|
||||
#endif
|
||||
#endif /* ENABLE_NANORC */
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
history_init();
|
||||
#ifdef ENABLE_NANORC
|
||||
if (!ISSET(NO_RCFILE) && ISSET(HISTORYLOG))
|
||||
load_history();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_OPERATINGDIR
|
||||
/* Set up the operating directory. This entails chdir()ing there,
|
||||
so that file reads and writes will be based there. */
|
||||
@@ -3399,17 +3394,6 @@ int main(int argc, char *argv[])
|
||||
keypad(bottomwin, TRUE);
|
||||
}
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
history_init();
|
||||
#ifdef ENABLE_NANORC
|
||||
if (!ISSET(NO_RCFILE) && ISSET(HISTORYLOG))
|
||||
load_history();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, _("Main: bottom win\n"));
|
||||
#endif
|
||||
@@ -3645,20 +3629,25 @@ int main(int argc, char *argv[])
|
||||
kbinput <= 'Z' && kbinput == s->altval - 32)) {
|
||||
if (ISSET(VIEW_MODE) && !s->viewok)
|
||||
print_view_warning();
|
||||
else
|
||||
else {
|
||||
if (s->func != do_cut_text)
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
s->func();
|
||||
}
|
||||
keyhandled = 1;
|
||||
break;
|
||||
}
|
||||
#ifndef NANO_SMALL
|
||||
/* And for toggle switches */
|
||||
for (t = toggles; t != NULL && !keyhandled; t = t->next)
|
||||
if (kbinput == t->val || (t->val >= 'a' &&
|
||||
t->val <= 'z' && kbinput == t->val - 32)) {
|
||||
do_toggle(t);
|
||||
keyhandled = 1;
|
||||
break;
|
||||
}
|
||||
if (!keyhandled)
|
||||
/* And for toggle switches */
|
||||
for (t = toggles; t != NULL; t = t->next)
|
||||
if (kbinput == t->val || (t->val >= 'a' &&
|
||||
t->val <= 'z' && kbinput == t->val - 32)) {
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
do_toggle(t);
|
||||
keyhandled = 1;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, _("I got Alt-%c! (%d)\n"), kbinput,
|
||||
@@ -3688,25 +3677,33 @@ int main(int argc, char *argv[])
|
||||
/* Look through the main shortcut list to see if we've hit a
|
||||
shortcut key */
|
||||
|
||||
if (!keyhandled)
|
||||
#if !defined(DISABLE_BROWSER) || !defined (DISABLE_HELP) || (!defined(DISABLE_MOUSE) && defined(NCURSES_MOUSE_VERSION))
|
||||
for (s = currshortcut; s != NULL && !keyhandled; s = s->next) {
|
||||
for (s = currshortcut; s != NULL && !keyhandled; s = s->next) {
|
||||
#else
|
||||
for (s = main_list; s != NULL && !keyhandled; s = s->next) {
|
||||
for (s = main_list; s != NULL && !keyhandled; s = s->next) {
|
||||
#endif
|
||||
if (kbinput == s->val ||
|
||||
(s->misc1 && kbinput == s->misc1) ||
|
||||
(s->misc2 && kbinput == s->misc2)) {
|
||||
if (ISSET(VIEW_MODE) && !s->viewok)
|
||||
print_view_warning();
|
||||
else
|
||||
s->func();
|
||||
keyhandled = 1;
|
||||
/* Rarely, the value of s can change after s->func(),
|
||||
leading to problems; get around this by breaking out
|
||||
explicitly once we successfully handle a shortcut */
|
||||
break;
|
||||
if (kbinput == s->val ||
|
||||
(s->misc1 && kbinput == s->misc1) ||
|
||||
(s->misc2 && kbinput == s->misc2)) {
|
||||
if (ISSET(VIEW_MODE) && !s->viewok)
|
||||
print_view_warning();
|
||||
else {
|
||||
if (s->func != do_cut_text)
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
s->func();
|
||||
}
|
||||
keyhandled = 1;
|
||||
/* Rarely, the value of s can change after
|
||||
s->func(), leading to problems; get around this
|
||||
by breaking out explicitly once we successfully
|
||||
handle a shortcut */
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!keyhandled)
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
|
||||
#ifdef _POSIX_VDISABLE
|
||||
/* Don't even think about changing this string */
|
||||
|
||||
17
nano.h
17
nano.h
@@ -35,6 +35,9 @@
|
||||
/* Define charalloc as a macro rather than duplicating code */
|
||||
#define charalloc(howmuch) (char *)nmalloc((howmuch) * sizeof(char))
|
||||
#define charealloc(ptr, howmuch) (char *)nrealloc(ptr, (howmuch) * sizeof(char))
|
||||
#ifdef BROKEN_REGEXEC
|
||||
#define regexec(preg, string, nmatch, pmatch, eflags) regexec_safe(preg, string, nmatch, pmatch, eflags)
|
||||
#endif
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
/* For the backup file copy ... */
|
||||
@@ -76,13 +79,12 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_STRCASECMP) || !defined(HAVE_STRNCASECMP)
|
||||
# ifndef HAVE_STRCASECMP
|
||||
# define strcasecmp strcmp
|
||||
# endif
|
||||
# ifndef HAVE_STRNCASECMP
|
||||
# define strncasecmp strncmp
|
||||
# endif
|
||||
#ifndef HAVE_STRCASECMP
|
||||
#define strcasecmp strcmp
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRNCASECMP
|
||||
#define strncasecmp strncmp
|
||||
#endif
|
||||
|
||||
/* HP-UX 10 & 11 do not seem to support KEY_HOME and KEY_END */
|
||||
@@ -250,6 +252,7 @@ typedef struct historyheadtype {
|
||||
#define PRESERVE (1<<28)
|
||||
#define HISTORY_CHANGED (1<<29)
|
||||
#define HISTORYLOG (1<<30)
|
||||
#define JUSTIFY_MODE (1<<31)
|
||||
|
||||
/* Control key sequences, changing these would be very very bad */
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Release : %{rel}
|
||||
Copyright : GPL
|
||||
Group : Console/Editors
|
||||
URL : http://www.nano-editor.org
|
||||
Source : http://www.nano-editor.org/dist/v1.1/%{name}-%{ver}.tar.gz
|
||||
Source : http://www.nano-editor.org/dist/v1.2/%{name}-%{ver}.tar.gz
|
||||
BuildRoot : /var/tmp/%{name}-buildroot
|
||||
Requires : ncurses
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
@c Run `makeinfo' rather than `texinfo-format-buffer'.
|
||||
@smallbook
|
||||
@set EDITION 0.1
|
||||
@set VERSION 1.1.99pre3
|
||||
@set VERSION 1.2.1
|
||||
@set UPDATED 17 Jan 2003
|
||||
|
||||
@dircategory Editors
|
||||
@@ -23,7 +23,7 @@
|
||||
@titlepage
|
||||
@title GNU @code{nano}
|
||||
@subtitle a small and friendly text editor.
|
||||
@subtitle version 1.1.99pre3
|
||||
@subtitle version 1.2.1
|
||||
|
||||
@author Chris Allegretta
|
||||
@page
|
||||
@@ -387,7 +387,7 @@ are certain differences between the editors:
|
||||
|
||||
@table @code
|
||||
@item Search and Replace History
|
||||
As of version 1.1.99pre3 of @code{nano}, text entered as search or replace
|
||||
As of version 1.2.1 of @code{nano}, text entered as search or replace
|
||||
strings will be stored and can be accessed with the up/down
|
||||
arrow keys. Previously, @code{nano} offered a more consistent, but incompatible
|
||||
with Pico, method for entering search and replace strings. In the old
|
||||
@@ -425,7 +425,7 @@ replace it. The @code{nano} implementation will stop at each search
|
||||
string found and query whether to replace this instance or not. The
|
||||
internal spell checker operates similarly. Note that these is no way
|
||||
to force these functions to behave in the Pico fashion. As of
|
||||
version 1.1.99pre3, misspelled words are sorted and trimmed for
|
||||
version 1.2.1, misspelled words are sorted and trimmed for
|
||||
uniqueness in the internal spell checker such that the words 'apple'
|
||||
and 'Apple' will be prompted for correction separately.
|
||||
@end table
|
||||
|
||||
33
nanorc.5
33
nanorc.5
@@ -1,18 +1,18 @@
|
||||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.\" nanorc.5 is Copyright (C) 1999, 2000, 2001, 2002, 2003
|
||||
.\" Free Software Foundation, Inc.
|
||||
.\" nanorc.5 is Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
.\"
|
||||
.\" This is free documentation, see the latest version of the GNU General
|
||||
.\" Public License for copying conditions. There is NO warranty.
|
||||
.\"
|
||||
.\" $Id$
|
||||
.TH NANORC 5 "February 9, 2003"
|
||||
.TH NANORC 5 "February 14, 2003"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
.SH NAME
|
||||
nanorc \- GNU nano's rcfile
|
||||
.SH SYNOPSIS
|
||||
.B /etc/nanorc
|
||||
.br
|
||||
.B $HOME/.nanorc
|
||||
.br
|
||||
.SH DESCRIPTION
|
||||
@@ -34,6 +34,8 @@ GNU nano will read one command per line.
|
||||
Options in rcfiles take precedence over nano's defaults, and command line
|
||||
options override rcfile settings.
|
||||
|
||||
Options are unset by default, except for options that take an argument.
|
||||
|
||||
The supported commands and arguments are:
|
||||
|
||||
.TP 3
|
||||
@@ -44,13 +46,14 @@ Use auto-indentation.
|
||||
Create backup files in filename~.
|
||||
.TP
|
||||
\fBset/unset const\fP
|
||||
Constantly update the cursor position.
|
||||
Constantly display the cursor position in the status bar.
|
||||
.TP
|
||||
\fBset/unset cut\fP
|
||||
Use cut to end of line with ^K by default.
|
||||
.TP
|
||||
\fBset fill \fIn\fP\fP
|
||||
Set the column where lines will be wrapped at to \fIn\fP.
|
||||
Wrap lines at column number \fIn\fP. If \fIn\fP is 0 or less, the line
|
||||
length will be the screen width less \fIn\fP. The default value is -8.
|
||||
.TP
|
||||
\fBset/unset keypad\fP
|
||||
Use alternate keypad routines.
|
||||
@@ -71,16 +74,23 @@ Don't display the help lists at the bottom of the screen.
|
||||
Don't wrap text at all.
|
||||
.TP
|
||||
\fBset operatingdir "\fIdirectory\fP"\fP
|
||||
Set operating directory (chroots the user to \fIdirectory\fP and below).
|
||||
\fBnano\fP will only read and write files inside \fIdirectory\fP and its
|
||||
subdirectories. Also, the current directory is changed to here, so files
|
||||
are inserted from this dir. By default the operating directory feature is
|
||||
turned off.
|
||||
.TP
|
||||
\fBset/unset preserve\fP
|
||||
Preserve the XON and XOFF keys (^Q and ^S).
|
||||
.TP
|
||||
\fBset quotestr "\fIstring\fP"\fP
|
||||
The email-quote string. This is a "regular expression" if your
|
||||
system supports them, otherwise a literal string.
|
||||
Default value is set quotestr "^([ \t]*[|>:}#])+" if you have regexps,
|
||||
otherwise set quotestr "> ".
|
||||
The email-quote string, used to justify email-quoted paragraphs. This is
|
||||
an "extended regular expression" if your system supports them, otherwise a
|
||||
literal string. The default value is
|
||||
|
||||
set quotestr "^([ \\t]*[|>:}#])+"
|
||||
|
||||
if you have regexps, otherwise set quotestr "> ". Note that '\\t' above
|
||||
stands for a literal Tab character.
|
||||
.TP
|
||||
\fBset/unset regexp\fP
|
||||
Do regular expression searches by default.
|
||||
@@ -89,7 +99,8 @@ Do regular expression searches by default.
|
||||
Use smooth scrolling by default.
|
||||
.TP
|
||||
\fBset speller \fIspellprog\fP\fP
|
||||
Use spelling checker \fIspellprog\fP instead of the default (spell).
|
||||
Use spelling checker \fIspellprog\fP instead of the built-in one, which
|
||||
calls \fIspell\fP.
|
||||
.TP
|
||||
\fBset/unset suspend\fP
|
||||
Allow nano to be suspended with ^Z.
|
||||
|
||||
49
po/ChangeLog
49
po/ChangeLog
@@ -1,3 +1,52 @@
|
||||
2003-04-12 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ms.po: Updated Malay translation by Sharuzzaman Ahmat Raslan.
|
||||
|
||||
2003-04-04 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
|
||||
2003-03-17 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ms.po: Updated Malay translation by Sharuzzaman Ahmat Raslan.
|
||||
|
||||
2003-03-10 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* da.po: Updated Danish translation by Keld Simonsen.
|
||||
|
||||
2003-03-06 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ms.po: Updated Malay translation by Sharuzzaman Ahmat Raslan.
|
||||
* id.po: Updated Indonesian translation by Tedi Heriyanto.
|
||||
|
||||
2003-02-23 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* nl.po: Updated Dutch translation by Guus Sliepen.
|
||||
|
||||
2003-02-19 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fi.po: Updated Finnish translation by Kalle Olavi Niemitalo.
|
||||
* es.po: Updated Spanish translation by Ricardo Javier Cárdenes
|
||||
Medina.
|
||||
|
||||
2003-02-17 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* de.po: Updated German translation by Michael Piefel.
|
||||
* ru.po: Updated Russian translation by Sergey A. Ribalchenko.
|
||||
* uk.po: Updated Ukrainian translation by Sergey A. Ribalchenko.
|
||||
|
||||
2003-02-16 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* gl.po: Updated Galician translation by Jacobo Tarrío.
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
|
||||
2003-02-15 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
* nl.po: Updated Dutch translation by Guus Sliepen.
|
||||
* sv.po: Updated Swedish translation by Christian Rose.
|
||||
* ca.po: Updated Catalan translation.
|
||||
|
||||
2003-02-13 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ru.po: Updated Russian translation from Sergey A. Ribalchenko.
|
||||
|
||||
168
po/nano.pot
168
po/nano.pot
@@ -7,7 +7,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"POT-Creation-Date: 2003-02-13 22:18-0500\n"
|
||||
"POT-Creation-Date: 2003-02-19 20:17-0500\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@@ -25,260 +25,260 @@ msgstr ""
|
||||
msgid "Blew away cutbuffer =)\n"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:315
|
||||
#: files.c:317
|
||||
#, c-format
|
||||
msgid "Read %d line (Converted from Mac format)"
|
||||
msgid_plural "Read %d lines (Converted from Mac format)"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: files.c:319
|
||||
#: files.c:321
|
||||
#, c-format
|
||||
msgid "Read %d line (Converted from DOS format)"
|
||||
msgid_plural "Read %d lines (Converted from DOS format)"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: files.c:324
|
||||
#: files.c:326
|
||||
#, c-format
|
||||
msgid "Read %d line"
|
||||
msgid_plural "Read %d lines"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: files.c:341 search.c:58
|
||||
#: files.c:343 search.c:58
|
||||
#, c-format
|
||||
msgid "\"%s\" not found"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:345
|
||||
#: files.c:347
|
||||
msgid "New File"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:351
|
||||
#: files.c:353
|
||||
#, c-format
|
||||
msgid "\"%s\" is a directory"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:352
|
||||
#: files.c:354
|
||||
#, c-format
|
||||
msgid "File \"%s\" is a device file"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:370
|
||||
#: files.c:372
|
||||
msgid "Reading File"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:446
|
||||
#: files.c:448
|
||||
#, c-format
|
||||
msgid "File to insert into new buffer [from %s] "
|
||||
msgstr ""
|
||||
|
||||
#: files.c:454
|
||||
#: files.c:456
|
||||
#, c-format
|
||||
msgid "File to insert [from %s] "
|
||||
msgstr ""
|
||||
|
||||
#: files.c:465
|
||||
#: files.c:467
|
||||
msgid "File to insert into new buffer [from ./] "
|
||||
msgstr ""
|
||||
|
||||
#: files.c:472
|
||||
#: files.c:474
|
||||
msgid "File to insert [from ./] "
|
||||
msgstr ""
|
||||
|
||||
#: files.c:477 files.c:736 files.c:793 files.c:881 files.c:893 files.c:944
|
||||
#: files.c:955 files.c:1815
|
||||
#: files.c:479 files.c:738 files.c:795 files.c:883 files.c:895 files.c:946
|
||||
#: files.c:957 files.c:1817
|
||||
#, c-format
|
||||
msgid "filename is %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:493
|
||||
#: files.c:495
|
||||
msgid "Command to execute"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:495 files.c:608 files.c:1340 files.c:1776 nano.c:2739
|
||||
#: files.c:497 files.c:610 files.c:1342 files.c:1778 nano.c:2736
|
||||
msgid "Cancelled"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:517
|
||||
#: files.c:519
|
||||
#, c-format
|
||||
msgid "Can't insert file from outside of %s"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:632
|
||||
#: files.c:634
|
||||
msgid "Key illegal in non-multibuffer mode"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:704 nano.c:572
|
||||
#: files.c:706 nano.c:572
|
||||
#, c-format
|
||||
msgid "%s: free'd a node, YAY!\n"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:709 nano.c:577
|
||||
#: files.c:711 nano.c:577
|
||||
#, c-format
|
||||
msgid "%s: free'd last node.\n"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:873 files.c:936
|
||||
#: files.c:875 files.c:938
|
||||
msgid "No more open files"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:900 files.c:963
|
||||
#: files.c:902 files.c:965
|
||||
#, c-format
|
||||
msgid "Switched to %s"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:1353
|
||||
#: files.c:1355
|
||||
#, c-format
|
||||
msgid "Can't write outside of %s"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:1384
|
||||
#: files.c:1386
|
||||
#, c-format
|
||||
msgid "Could not read %s for backup: %s"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:1395
|
||||
#: files.c:1397
|
||||
#, c-format
|
||||
msgid "Couldn't write backup: %s"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:1401
|
||||
#: files.c:1403
|
||||
#, c-format
|
||||
msgid "Backing up %s to %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:1413
|
||||
#: files.c:1415
|
||||
#, c-format
|
||||
msgid "Could not set permissions %o on backup %s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:1419
|
||||
#: files.c:1421
|
||||
#, c-format
|
||||
msgid "Could not set owner %d/group %d on backup %s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:1424
|
||||
#: files.c:1426
|
||||
#, c-format
|
||||
msgid "Could not set access/modification time on backup %s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:1459 files.c:1475 files.c:1487 files.c:1509 files.c:1542
|
||||
#: files.c:1549 files.c:1561
|
||||
#: files.c:1461 files.c:1477 files.c:1489 files.c:1511 files.c:1544
|
||||
#: files.c:1551 files.c:1563
|
||||
#, c-format
|
||||
msgid "Could not open file for writing: %s"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:1516
|
||||
#: files.c:1518
|
||||
#, c-format
|
||||
msgid "Wrote >%s\n"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:1572
|
||||
#: files.c:1574
|
||||
#, c-format
|
||||
msgid "Could not close %s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:1584 files.c:1589 files.c:1617
|
||||
#: files.c:1586 files.c:1591 files.c:1619
|
||||
#, c-format
|
||||
msgid "Could not reopen %s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:1594 files.c:1600 files.c:1609
|
||||
#: files.c:1596 files.c:1602 files.c:1611
|
||||
#, c-format
|
||||
msgid "Could not open %s for prepend: %s"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:1647 files.c:1656 files.c:1661
|
||||
#: files.c:1649 files.c:1658 files.c:1663
|
||||
#, c-format
|
||||
msgid "Could not open %s for writing: %s"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:1668
|
||||
#: files.c:1670
|
||||
#, c-format
|
||||
msgid "Could not set permissions %o on %s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:1684
|
||||
#: files.c:1686
|
||||
#, c-format
|
||||
msgid "Wrote %d line"
|
||||
msgid_plural "Wrote %d lines"
|
||||
msgstr[0] ""
|
||||
msgstr[1] ""
|
||||
|
||||
#: files.c:1730
|
||||
#: files.c:1732
|
||||
msgid " [Mac Format]"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:1732
|
||||
#: files.c:1734
|
||||
msgid " [DOS Format]"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:1737
|
||||
#: files.c:1739
|
||||
msgid " [Backup]"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:1745
|
||||
#: files.c:1747
|
||||
msgid "Prepend Selection to File"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:1748
|
||||
#: files.c:1750
|
||||
msgid "Append Selection to File"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:1751
|
||||
#: files.c:1753
|
||||
msgid "Write Selection to File"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:1755 files.c:1766
|
||||
#: files.c:1757 files.c:1768
|
||||
msgid "File Name to Prepend to"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:1758 files.c:1769
|
||||
#: files.c:1760 files.c:1771
|
||||
msgid "File Name to Append to"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:1761 files.c:1772
|
||||
#: files.c:1763 files.c:1774
|
||||
msgid "File Name to Write"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:1830
|
||||
#: files.c:1832
|
||||
msgid "File exists, OVERWRITE ?"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:2319
|
||||
#: files.c:2321
|
||||
msgid "(more)"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:2624
|
||||
#: files.c:2626
|
||||
msgid "Can't move up a directory"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:2635 files.c:2708
|
||||
#: files.c:2637 files.c:2710
|
||||
#, c-format
|
||||
msgid "Can't go outside of %s in restricted mode"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:2642 files.c:2669 files.c:2716
|
||||
#: files.c:2644 files.c:2671 files.c:2718
|
||||
#, c-format
|
||||
msgid "Can't open \"%s\": %s"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:2690
|
||||
#: files.c:2692
|
||||
msgid "Goto Directory"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:2695
|
||||
#: files.c:2697
|
||||
msgid "Goto Cancelled"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:2894
|
||||
#: files.c:2896
|
||||
#, c-format
|
||||
msgid "Unable to open ~/.nano_history file, %s"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:2943 files.c:2952 files.c:2957 files.c:2964
|
||||
#: files.c:2945 files.c:2954 files.c:2959 files.c:2966
|
||||
#, c-format
|
||||
msgid "Unable to write ~/.nano_history file, %s"
|
||||
msgstr ""
|
||||
@@ -1192,118 +1192,118 @@ msgstr ""
|
||||
msgid "Finished checking spelling"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:2347
|
||||
#: nano.c:2344
|
||||
#, c-format
|
||||
msgid "Bad quote string %s: %s"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:2612
|
||||
#: nano.c:2609
|
||||
msgid "Can now UnJustify!"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:2709
|
||||
#: nano.c:2706
|
||||
msgid "Save modified buffer (ANSWERING \"No\" WILL DESTROY CHANGES) ? "
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:2809
|
||||
#: nano.c:2806
|
||||
msgid "Received SIGHUP or SIGTERM\n"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:2816
|
||||
#: nano.c:2813
|
||||
msgid "Use \"fg\" to return to nano"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:2889
|
||||
#: nano.c:2886
|
||||
msgid "Cannot resize top win"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:2891
|
||||
#: nano.c:2888
|
||||
msgid "Cannot move top win"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:2893
|
||||
#: nano.c:2890
|
||||
msgid "Cannot resize edit win"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:2895
|
||||
#: nano.c:2892
|
||||
msgid "Cannot move edit win"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:2897
|
||||
#: nano.c:2894
|
||||
msgid "Cannot resize bottom win"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:2899
|
||||
#: nano.c:2896
|
||||
msgid "Cannot move bottom win"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:2932
|
||||
#: nano.c:2929
|
||||
msgid "NumLock glitch detected. Keypad will malfunction with NumLock off"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:2981
|
||||
#: nano.c:2978
|
||||
msgid "enabled"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:2981
|
||||
#: nano.c:2978
|
||||
msgid "disabled"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:3173
|
||||
#: nano.c:3170
|
||||
msgid "Tab size is too small for nano...\n"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:3389
|
||||
#: nano.c:3386
|
||||
msgid "Main: set up windows\n"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:3414
|
||||
#: nano.c:3411
|
||||
msgid "Main: bottom win\n"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:3420
|
||||
#: nano.c:3417
|
||||
msgid "Main: open file\n"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:3477
|
||||
#: nano.c:3474
|
||||
#, c-format
|
||||
msgid "AHA! %c (%d)\n"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:3497
|
||||
#: nano.c:3494
|
||||
#, c-format
|
||||
msgid "I got Alt-O-%c! (%d)\n"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:3524
|
||||
#: nano.c:3521
|
||||
#, c-format
|
||||
msgid "I got Alt-[-1-%c! (%d)\n"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:3554
|
||||
#: nano.c:3551
|
||||
#, c-format
|
||||
msgid "I got Alt-[-2-%c! (%d)\n"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:3623
|
||||
#: nano.c:3620
|
||||
#, c-format
|
||||
msgid "I got Alt-[-%c! (%d)\n"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:3664
|
||||
#: nano.c:3661
|
||||
#, c-format
|
||||
msgid "I got Alt-%c! (%d)\n"
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:3714
|
||||
#: nano.c:3711
|
||||
msgid "XOFF ignored, mumble mumble."
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:3716
|
||||
#: nano.c:3713
|
||||
msgid "XON ignored, mumble mumble."
|
||||
msgstr ""
|
||||
|
||||
#: nano.c:3755
|
||||
#: nano.c:3752
|
||||
#, c-format
|
||||
msgid "I got %c (%d)!\n"
|
||||
msgstr ""
|
||||
|
||||
474
po/pt_BR.po
474
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
6
proto.h
6
proto.h
@@ -106,7 +106,6 @@ extern const shortcut *currshortcut;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_REGEX_H
|
||||
extern int use_regexp, regexp_compiled;
|
||||
extern regex_t search_regexp;
|
||||
extern regmatch_t regmatches[10];
|
||||
#ifdef ENABLE_COLOR
|
||||
@@ -367,7 +366,6 @@ char *replace_line(void);
|
||||
int do_replace_loop(const char *prevanswer, const filestruct *begin,
|
||||
int *beginx, int wholewords, int *i);
|
||||
int do_replace(void);
|
||||
void goto_abort(void);
|
||||
int do_gotoline(int line, int save_pos);
|
||||
int do_gotoline_void(void);
|
||||
#if defined (ENABLE_MULTIBUFFER) || !defined (DISABLE_SPELLER)
|
||||
@@ -391,6 +389,10 @@ void save_history(void);
|
||||
#endif
|
||||
|
||||
/* Public functions in utils.c */
|
||||
#ifdef BROKEN_REGEXEC
|
||||
int regexec_safe(const regex_t *preg, const char *string, size_t nmatch,
|
||||
regmatch_t pmatch[], int eflags);
|
||||
#endif
|
||||
int is_cntrl_char(int c);
|
||||
int num_of_digits(int n);
|
||||
void align(char **strp);
|
||||
|
||||
1
rcfile.c
1
rcfile.c
@@ -676,6 +676,7 @@ void do_rcfile(void)
|
||||
fclose(rcstream);
|
||||
}
|
||||
}
|
||||
lineno = 0;
|
||||
|
||||
free(nanorc);
|
||||
#ifdef ENABLE_COLOR
|
||||
|
||||
14
search.c
14
search.c
@@ -67,7 +67,6 @@ void not_found_msg(const char *str)
|
||||
|
||||
void search_abort(void)
|
||||
{
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
display_main_list();
|
||||
wrefresh(bottomwin);
|
||||
if (ISSET(MARK_ISSET))
|
||||
@@ -768,12 +767,6 @@ int do_replace(void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
void goto_abort(void)
|
||||
{
|
||||
UNSET(KEEP_CUTBUFFER);
|
||||
display_main_list();
|
||||
}
|
||||
|
||||
int do_gotoline(int line, int save_pos)
|
||||
{
|
||||
if (line <= 0) { /* Ask for it */
|
||||
@@ -787,7 +780,7 @@ int do_gotoline(int line, int save_pos)
|
||||
if (st == -1 || st == -2)
|
||||
statusbar(_("Aborted"));
|
||||
if (st != 0) {
|
||||
goto_abort();
|
||||
display_main_list();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -796,7 +789,7 @@ int do_gotoline(int line, int save_pos)
|
||||
/* Bounds check */
|
||||
if (line <= 0) {
|
||||
statusbar(_("Come on, be reasonable"));
|
||||
goto_abort();
|
||||
display_main_list();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -813,7 +806,7 @@ int do_gotoline(int line, int save_pos)
|
||||
else
|
||||
edit_update(current, CENTER);
|
||||
placewewant = 0;
|
||||
goto_abort();
|
||||
display_main_list();
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -909,6 +902,7 @@ int do_find_bracket(void)
|
||||
statusbar(_("No matching bracket"));
|
||||
current_x = current_x_save;
|
||||
current = current_save;
|
||||
update_line(current, current_x);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
14
utils.c
14
utils.c
@@ -30,6 +30,18 @@
|
||||
#include "proto.h"
|
||||
#include "nano.h"
|
||||
|
||||
#ifdef BROKEN_REGEXEC
|
||||
#undef regexec
|
||||
int regexec_safe(const regex_t *preg, const char *string, size_t nmatch,
|
||||
regmatch_t pmatch[], int eflags)
|
||||
{
|
||||
if (string != NULL && *string != '\0')
|
||||
return regexec(preg, string, nmatch, pmatch, eflags);
|
||||
return REG_NOMATCH;
|
||||
}
|
||||
#define regexec(preg, string, nmatch, pmatch, eflags) regexec_safe(preg, string, nmatch, pmatch, eflags)
|
||||
#endif
|
||||
|
||||
int is_cntrl_char(int c)
|
||||
{
|
||||
return (-128 <= c && c < -96) || (0 <= c && c < 32) ||
|
||||
@@ -62,7 +74,7 @@ void align(char **strp)
|
||||
void null_at(char **data, size_t index)
|
||||
{
|
||||
assert(data != NULL);
|
||||
*data = (char *)nrealloc(*data, sizeof(char) * (index + 1));
|
||||
*data = charealloc(*data, index + 1);
|
||||
(*data)[index] = '\0';
|
||||
}
|
||||
|
||||
|
||||
21
winio.c
21
winio.c
@@ -221,7 +221,7 @@ int nanogetstr(int allowtabs, const char *buf, const char *def,
|
||||
if (x == -1 || x > xend || resetstatuspos)
|
||||
x = xend;
|
||||
|
||||
answer = (char *)nrealloc(answer, xend + 1);
|
||||
answer = charealloc(answer, xend + 1);
|
||||
if (xend > 0)
|
||||
strcpy(answer, def);
|
||||
else
|
||||
@@ -358,6 +358,7 @@ int nanogetstr(int allowtabs, const char *buf, const char *def,
|
||||
case KEY_UP:
|
||||
case NANO_UP_KEY:
|
||||
#ifndef NANO_SMALL
|
||||
do_upkey:
|
||||
if (history_list != NULL) {
|
||||
|
||||
/* If there's no previous temp holder, or if we already
|
||||
@@ -383,6 +384,7 @@ int nanogetstr(int allowtabs, const char *buf, const char *def,
|
||||
case KEY_DOWN:
|
||||
case NANO_DOWN_KEY:
|
||||
#ifndef NANO_SMALL
|
||||
do_downkey:
|
||||
if (history_list != NULL) {
|
||||
/* get newer search from the history list */
|
||||
if ((history = get_history_newer(history_list)) != NULL) {
|
||||
@@ -421,6 +423,18 @@ int nanogetstr(int allowtabs, const char *buf, const char *def,
|
||||
break;
|
||||
case '[':
|
||||
switch (kbinput = wgetch(edit)) {
|
||||
case 'A':
|
||||
#ifndef NANO_SMALL
|
||||
goto do_upkey;
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
case 'B':
|
||||
#ifndef NANO_SMALL
|
||||
goto do_downkey;
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
case 'C':
|
||||
if (x < xend)
|
||||
x++;
|
||||
@@ -836,7 +850,6 @@ void edit_add(const filestruct *fileptr, int yval, int start
|
||||
if (paintlen == COLS)
|
||||
goto skip_step_two;
|
||||
|
||||
|
||||
step_two: /* Second step, we look for starts on this line. */
|
||||
start_col = 0;
|
||||
while (start_col < start + COLS) {
|
||||
@@ -1532,19 +1545,15 @@ int do_help(void)
|
||||
case '5': /* Alt-[-5 = Page Up */
|
||||
wgetch(edit);
|
||||
goto do_pageupkey;
|
||||
break;
|
||||
case 'V': /* Alt-[-V = Page Up in Hurd Console */
|
||||
case 'I': /* Alt-[-I = Page Up - FreeBSD Console */
|
||||
goto do_pageupkey;
|
||||
break;
|
||||
case '6': /* Alt-[-6 = Page Down */
|
||||
wgetch(edit);
|
||||
goto do_pagedownkey;
|
||||
break;
|
||||
case 'U': /* Alt-[-U = Page Down in Hurd Console */
|
||||
case 'G': /* Alt-[-G = Page Down - FreeBSD Console */
|
||||
goto do_pagedownkey;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user