Compare commits

...

1267 Commits

Author SHA1 Message Date
David Lawrence Ramsey
665b1fbac6 GNU nano 1.3.8
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2803 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-30 17:16:16 +00:00
David Lawrence Ramsey
5cbe08fc03 remove unneeded clearok(TRUE) from total_redraw()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2802 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-30 16:18:35 +00:00
David Lawrence Ramsey
73bf89fa56 make do_yesno() refresh the edit window as well as the statusbar before
getting input, as statusq() does


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2801 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-30 05:56:39 +00:00
David Lawrence Ramsey
a73025d731 in do_replace_highlight(), call wnoutrefresh(edit) to make sure that the
highlight is drawn properly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2800 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-30 04:17:18 +00:00
David Lawrence Ramsey
7bde05399f in do_replace_highlight(), rename variable highlight_flag to highlight,
for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2799 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-30 03:55:55 +00:00
David Lawrence Ramsey
6168cb7391 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2798 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-30 03:53:28 +00:00
David Lawrence Ramsey
44e0c03fff in do_yesno(), het input from bottomwin instead of edit, so that the
cursor isn't erroneously put in the edit window while we wait for an
answer


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2797 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-29 19:01:11 +00:00
David Lawrence Ramsey
1aee5cc599 more int -> bool conversions
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2796 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-29 18:17:54 +00:00
David Lawrence Ramsey
85c0b3c37e improve version()'s output
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2795 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-29 17:10:58 +00:00
David Lawrence Ramsey
69163af499 in POTFILES.in, remove source files that contain no translatable strings
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2794 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-29 02:19:02 +00:00
David Lawrence Ramsey
f816119b36 in find_paragraph(), reset placewewant as well as current_x to 0, in
order to avoid a potential screen update problem


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2793 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-29 01:27:33 +00:00
David Lawrence Ramsey
5beae58597 add one missing type change
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2792 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-29 00:17:18 +00:00
David Lawrence Ramsey
4e05b755ed in do_cursorpos(), if constant is TRUE, only display the cursor position
when disable_cursorpos is FALSE; don't refuse to display it when the
cursor position hasn't changed, as that doesn't always keep it properly
updated


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2791 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 20:04:14 +00:00
David Lawrence Ramsey
a96c819b50 more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2790 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 19:56:14 +00:00
David Lawrence Ramsey
5593e20964 more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2789 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 19:49:15 +00:00
David Lawrence Ramsey
651853aa21 add missing blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2788 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 18:57:28 +00:00
David Lawrence Ramsey
9e21c62c68 formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2787 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 17:51:28 +00:00
David Lawrence Ramsey
43d3e9324b comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2786 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 17:35:20 +00:00
David Lawrence Ramsey
b2072b0999 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2785 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 14:59:38 +00:00
David Lawrence Ramsey
9905b6ae74 rework the credits handling to display Florian König's name properly
whether we're in a UTF-8 locale or not.  This requires a minor hack, but
it's better than requiring a massive function that we only use once


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2784 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 07:26:11 +00:00
David Lawrence Ramsey
3b2fdb00e4 add missing blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2783 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 07:16:13 +00:00
David Lawrence Ramsey
2cf6d717f1 add various type changes to avoid problems on systems where int and
ssize_t are different sizes.  Make filestruct->lineno a ssize_t (so that
we can avoid negative line numbers at the "Go To Line" prompt),
current_y a ssize_t (in order to hold the maximum difference between two
filestruct->lineno's), totlines a size_t, and change related variables
to match


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2782 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 06:25:34 +00:00
David Lawrence Ramsey
6ad6b85862 more miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2781 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 06:16:30 +00:00
David Lawrence Ramsey
18d6a7ae1a in do_justify(), save placewewant, and restore it if we unjustify, in
order to avoid a potential screen update problem


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2780 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 06:05:54 +00:00
David Lawrence Ramsey
5423680d67 in edit_redraw(), make do_refresh a bool instead of an int
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2779 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 05:56:16 +00:00
David Lawrence Ramsey
7f7c66c237 remove now-unused search_last_line global
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2778 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-28 05:27:20 +00:00
David Lawrence Ramsey
b8351c1c8b per Mike Frysinger's suggestion, in the "nanorc" regexes, put "^" back
in the comment regex so that we don't match strings containing #'s
anymore


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2777 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-27 12:25:17 +00:00
David Lawrence Ramsey
27ae93d26b clarify and consolidate the descriptions of the "fill" and "tabsize"
options in the documentation (e.g. "fill 0" acts just like "fill
[negative number]")


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2776 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-27 05:01:32 +00:00
David Lawrence Ramsey
95a2db7a4a add missing "?" to the color name regex of the "nanorc" regexes, so that
regexes like "color ,green" won't be colored as though they're invalid


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2775 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-27 03:47:52 +00:00
David Lawrence Ramsey
23555f29ba add support for case insensitive expression matching when using color
syntax highlighting, via the "icolor" directive, and add it to those
regexes that can use it (ported from Brand Huntsman's old patch)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2774 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-27 03:07:10 +00:00
David Lawrence Ramsey
a899ab185f simplify the file extension regex for groff
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2773 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-27 03:04:49 +00:00
David Lawrence Ramsey
c5632a7e40 add Mike Frysinger's GCC builtins regex to the "c-file" regexes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2772 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-27 02:56:59 +00:00
David Lawrence Ramsey
9c351e8831 punctuation fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2771 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-26 23:35:55 +00:00
David Lawrence Ramsey
23d3b7457b do the same thing for the equivalent regex for assembler files
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2770 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-26 23:16:14 +00:00
David Lawrence Ramsey
85f6a2daab more last-minute comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2769 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-26 22:59:54 +00:00
David Lawrence Ramsey
6ea410e14e add missing int -> bool conversion
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2768 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-26 22:32:51 +00:00
David Lawrence Ramsey
d4471ebe0e in do_toggle(), properly treat color syntax highlighting as enabled by
default, and only treat wrapping as enabled by default when
DISABLE_WRAPPING isn't defined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2767 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-26 20:05:01 +00:00
David Lawrence Ramsey
7f77e1dcdd apparently a "[[:space:]]" doesn't work properly inside a "[^ ... ]";
replace it with a literal space and a literal tab, so that include files
are properly colored again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2766 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-26 19:49:53 +00:00
David Lawrence Ramsey
a8824a197e per Mike Frysinger's suggestion, change the word detection functions'
behavior back to what it was before (for now, until there's a way for
the user to control it), as their new behavior makes them harder to use
when editing source code; by the same token, leave word count's behavior
the way it is, since it's generally not used when editing source code


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2765 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-26 19:03:48 +00:00
David Lawrence Ramsey
059ba19ff7 add Mike Frysinger's regexes for assembler files
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2764 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-26 03:32:03 +00:00
David Lawrence Ramsey
bec2606ce2 in nanorc.sample, banish " " whever possible in favor of "[[:space:]]"
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2763 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-26 03:26:24 +00:00
David Lawrence Ramsey
9d658cec7a add "cxx" and "hxx" to the list of extensions that the "c-file" regexes
apply to, and add "warning" and "error" to them as well


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2762 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-26 02:55:04 +00:00
David Lawrence Ramsey
fe7d53e51e last-minute comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2761 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-25 20:56:36 +00:00
David Lawrence Ramsey
5e50e2f51e in disable_flow_control() and enable_flow_control(), only turn off flow
control on input, as it might be needed for output on slow terminals


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2760 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-23 22:28:56 +00:00
David Lawrence Ramsey
b2ca88cc74 more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2759 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-22 02:31:12 +00:00
David Lawrence Ramsey
7a3f49c019 remove all instances of charcpy() and replace them with strncpy(), for
ease of maintenance


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2758 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-22 00:24:11 +00:00
David Lawrence Ramsey
bebfc6da0f put back erroneously removed bits
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2757 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 22:48:38 +00:00
David Lawrence Ramsey
0517c482e4 typo fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2756 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 22:37:47 +00:00
David Lawrence Ramsey
16799baccd change some instances of charcpy() back to strncpy(), as the latter's
numm-termination is needed in some places


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2755 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 22:32:50 +00:00
David Lawrence Ramsey
d4ea5b69c5 oops; do_yesno() doesn't need display_string(); it only needs to use
actual_x() to get the actual number of characters in buf when it calls
mvwaddnstr()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2754 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 21:03:06 +00:00
David Lawrence Ramsey
8d5beb560c in titlebar(), handle VERLEN's being a UTF-8 string
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2753 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 20:37:04 +00:00
David Lawrence Ramsey
ba61cc382f fix total_redraw() so that it always keeps the cursor in the same window
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2752 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 20:16:26 +00:00
David Lawrence Ramsey
3f301dd437 in do_yesno(), add a missing assert, and use display_string() to display
the prompt, so that we don't end it in the middle of a multibyte
character if it's more than (COLS - 1) bytes long


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2751 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 19:47:39 +00:00
David Lawrence Ramsey
c3e52f16ba per Jordi's suggestion, change the toggle for -E/--tabstospaces to
Meta-Q


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2750 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 17:44:01 +00:00
David Lawrence Ramsey
b725353ab7 per Jordi's suggestion, remove the Meta-U toggle for -U/--quickblank;
the rcfile option is enough for those that use it regularly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2749 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 16:19:47 +00:00
David Lawrence Ramsey
99466bfa71 more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2748 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 15:47:39 +00:00
David Lawrence Ramsey
261da14301 revert last change, since it'll cause problems with arguments containing
spaces


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2747 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 15:41:46 +00:00
David Lawrence Ramsey
6dd67790df in configure.ac, add a few more minor consistency fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2746 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 15:32:12 +00:00
David Lawrence Ramsey
01e13ea1c1 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2745 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 04:16:12 +00:00
David Lawrence Ramsey
68c10963c4 revert last change, as the multibyte strcoll() functions can't handle
e.g. 2-to-1 character conversions as the original strcoll() can


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2744 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 04:11:04 +00:00
David Lawrence Ramsey
d0c4d378b4 add a multibyte case-insensitive version of strcoll(), and make
diralphasort() use it so that filenames are sorted properly according to
the current locale


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2743 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 03:26:58 +00:00
David Lawrence Ramsey
6c25819c34 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2742 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 01:41:46 +00:00
David Lawrence Ramsey
bd11c0171b recover properly when the alternate spell checker fails
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2741 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 01:33:31 +00:00
David Lawrence Ramsey
739fc8ac3d make sure the function checks are *really* in alphabetical order
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2740 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-20 23:10:24 +00:00
David Lawrence Ramsey
8d0fb01ff2 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2739 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-20 21:17:01 +00:00
David Lawrence Ramsey
d7cf373358 typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2738 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-20 21:03:57 +00:00
David Lawrence Ramsey
e0a0d23f78 remove unnecessary variables from and add missing asserts to
control_mbrep()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2737 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-20 20:58:41 +00:00
David Lawrence Ramsey
da419bcbe4 typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2736 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-20 03:01:04 +00:00
David Lawrence Ramsey
b2bff724da update the "Feature Toggles" section in nano.texi to match current nano
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2735 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-19 22:22:01 +00:00
David Lawrence Ramsey
a62e8e3de9 when reading color syntax names or sorting filenames, use mbstrcasecmp()
instead of strcasecmp() to compare them, in case they're UTF-8


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2734 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-19 21:10:48 +00:00
David Lawrence Ramsey
483f3ac1b5 in read_line(), rename variable len to buf_len, for consistency
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2733 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-19 19:57:13 +00:00
David Lawrence Ramsey
90d505cc4a comment and indentation fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2732 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 22:33:55 +00:00
David Lawrence Ramsey
9c6d78669e remove the reset_cursor() call in statusq(), as it erroneously leaves
the cursor in the edit window when we're at the "Save File Under
Different Name" prompt


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2731 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 22:33:24 +00:00
David Lawrence Ramsey
5290e1bc84 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2730 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 20:47:41 +00:00
David Lawrence Ramsey
b5aaf72b6a in configure.ac, check for possibly unavailable functions in
alphabetical order


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2729 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 20:08:43 +00:00
David Lawrence Ramsey
1ea53709d8 formatting fixes for Makefile.am and m4/Makefile.am
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2728 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 19:56:30 +00:00
David Lawrence Ramsey
0227ccca7c formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2727 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 17:20:54 +00:00
David Lawrence Ramsey
25799f6862 in configure.ac, check for get_wch() instead of wget_wch() to determine
if there's a wide curses library, as it's a more generic function


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2726 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 17:06:02 +00:00
David Lawrence Ramsey
c54c4d1eea rename total_update() total_redraw() for consistency
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2725 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 15:49:17 +00:00
David Lawrence Ramsey
7431fe5e93 work around slang brain damage in total_update()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2724 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 15:15:48 +00:00
David Lawrence Ramsey
166da9c893 fix still more minor display update problems
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2723 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 14:30:40 +00:00
David Lawrence Ramsey
cd0210ff3e fix more minor screen update problems
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2722 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 14:05:21 +00:00
David Lawrence Ramsey
7098ec233c n is ignored in the mbstowcs() call, so it can be 0 instead of
(size_t)-1


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2721 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 05:15:08 +00:00
David Lawrence Ramsey
62898233ac in statusq(), call wrefresh(bottomwin) after getting an answer and
blanking out the statusbar, to make sure that the blanking is done; this
fixes a problem where the statusbar is not properly blanked after using
the "Go To Line" prompt with the NO_HELP flag set


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2720 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 04:32:26 +00:00
David Lawrence Ramsey
26e637bf12 in toggle_init(), reorder the toggles to put more toggles with similar
functions together


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2719 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 03:37:56 +00:00
David Lawrence Ramsey
d873447f5f clarify the description of the line wrapping toggle
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2718 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 03:03:32 +00:00
David Lawrence Ramsey
84635cd8e8 change the short option for --restricted from -Z to -R
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2717 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 22:53:41 +00:00
David Lawrence Ramsey
03987abebd fix misplaced long option
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2716 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 22:50:55 +00:00
David Lawrence Ramsey
c661853315 add comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2715 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 22:33:15 +00:00
David Lawrence Ramsey
4f673d802c add a description of -U/--quickblank to nano.texi, plus a few more
miscellaneous documentation fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2714 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 22:11:43 +00:00
David Lawrence Ramsey
bf51aa4c0a QUICK_BLANK and CONST_UPDATE shouldn't be working at the same time, as
they make the statusbar blank and redraw itself far too many times, and
it makes no sense to use them together anyway; also, clean up
check_statusblank() a little


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2713 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 21:52:59 +00:00
David Lawrence Ramsey
954aba7430 formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2712 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 21:21:10 +00:00
David Lawrence Ramsey
3435a0ff64 rename the CONSTUPDATE flag to CONST_UPDATE, and clarify its description
in the help text


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2711 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 21:08:13 +00:00
David Lawrence Ramsey
66357b5462 add missing #ifdef
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2710 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 19:09:18 +00:00
David Lawrence Ramsey
e29111f7ec add -U/--quickblank option, a Meta-U toggle, and a "quickblank" rcfile
option to blank the statusbar after 1 keystroke instead of 25; note that
this is disabled when NANO_SMALL is defined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2709 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 19:06:25 +00:00
David Lawrence Ramsey
6399000a48 move all the rcfile options disabled by NANO_SMALL to the end, for
consistency with the long options in nano.c


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2708 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 19:01:00 +00:00
David Lawrence Ramsey
ea01474c4b since the DISABLE_CURPOS flag is only used in winio.c, reduce it to a
static bool there


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2707 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 18:27:00 +00:00
David Lawrence Ramsey
077d0647c9 in statusbar(), set statusblank to 25 instead of 26, to match current
Pico


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2706 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 18:14:03 +00:00
David Lawrence Ramsey
9b494fa90c more miscellaneous documentation updates
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2705 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 18:00:16 +00:00
David Lawrence Ramsey
18a89a6cef more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2704 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 17:37:46 +00:00
David Lawrence Ramsey
c4ca596a90 various #ifdef fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2703 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 20:58:19 +00:00
David Lawrence Ramsey
5c8197d78f miscellaneous cleanups in do_find_bracket(): rename variables for
consistency, and save the search direction and regexp setting in two
bools instead of one flags variable


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2702 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 20:41:20 +00:00
David Lawrence Ramsey
62e117421f add "backwards" and "casesensitive" to the "rcfile" regexes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2701 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 18:56:00 +00:00
David Lawrence Ramsey
f3ecffd24d add the "regexp" rcfile option back in at DB's suggestion, the
"casesensitive" and "backwards" rcfile options for consistency,
documentation updates, and related cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2700 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 18:48:30 +00:00
David Lawrence Ramsey
f774017801 document the new Meta-E toggle
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2699 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 18:35:55 +00:00
David Lawrence Ramsey
d1cc007136 in usage(), remove inaccurate default listed for -Q/--quotestr
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2698 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 17:26:01 +00:00
David Lawrence Ramsey
25fb1025e9 fix assert
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2697 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 12:43:08 +00:00
David Lawrence Ramsey
a9a3f4f599 fix compilation with --enable-debug
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2696 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 12:17:23 +00:00
David Lawrence Ramsey
e6a55fa1e5 remove stray "]"
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2695 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 12:16:24 +00:00
David Lawrence Ramsey
95f7a7431e wording fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2694 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 03:11:39 +00:00
David Lawrence Ramsey
fa6c29cc2e in shortcut_init(), clarify the description of ^X when
--enable-multibuffer is used


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2693 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 03:07:05 +00:00
David Lawrence Ramsey
b2b6976bd9 change the SMOOTHSCROLL flag to the SMOOTH_SCROLL flag
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2692 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 02:13:10 +00:00
David Lawrence Ramsey
7a4aaa53a1 change the NO_UTF8 flag to the USE_UTF8 flag, and reverse its meaning
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2691 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 02:09:57 +00:00
David Lawrence Ramsey
77d0feae05 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2690 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 01:56:51 +00:00
David Lawrence Ramsey
c1b960947e comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2689 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 01:37:13 +00:00
David Lawrence Ramsey
4846ce7a6a fix memory leak
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2688 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 01:36:10 +00:00
David Lawrence Ramsey
34c75746c2 add the "tabstospaces" option to the "rcfile" regexes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2687 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 01:25:11 +00:00
David Lawrence Ramsey
3129c2928b move the "tabstospaces" option in nanorc.sample down so the options are
in alphabetical order again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2686 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-16 01:18:56 +00:00
David Lawrence Ramsey
21374584e2 fix changelog entry
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2685 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 23:36:08 +00:00
David Lawrence Ramsey
a2ea733e3b comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2684 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 23:35:53 +00:00
David Lawrence Ramsey
40ad177210 revert erroneous help_init() changes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2683 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 23:33:54 +00:00
David Lawrence Ramsey
6f143c8124 add the ability to convert (non-verbatim input) typed tabs to spaces
using the -E/--tabstospaces command line options, the "tabstospaces"
rcfile option, and the toggle Meta-E; also, change the short command
line option for --backupdir from -E to -C


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2682 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 23:20:56 +00:00
David Lawrence Ramsey
072f86c5f9 in do_spell(), if the spell-checker printed any error messages onscreen,
make sure they're cleared off


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2681 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 20:21:02 +00:00
David Lawrence Ramsey
f271f9c962 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2680 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 19:26:48 +00:00
David Lawrence Ramsey
5a6caf0ca8 in do_int_spell_fix(), display highlighted misspelled words using
display_string(), as do_replace_loop() does


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2679 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 19:21:04 +00:00
David Lawrence Ramsey
da72453859 add missing blank lines
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2678 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 19:15:14 +00:00
David Lawrence Ramsey
203026c632 make --enable-extra only define NANO_EXTRA, and update associated
documentation


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2677 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 18:53:47 +00:00
David Lawrence Ramsey
ed7ad33802 change wint_t's back to wchar_t's to fix compilation on Mac OS 10.4.1
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2676 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 16:07:14 +00:00
Jordi Mallach
ff6c1997b9 Typo fix by Jens Seidel.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2675 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 16:05:42 +00:00
David Lawrence Ramsey
a01690c410 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2674 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 07:38:25 +00:00
David Lawrence Ramsey
ff1a0ea32b cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2673 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 07:34:09 +00:00
David Lawrence Ramsey
42e271d2d3 in do_browser(), make mouse clicks in the browser window work properly
when the MORE_SPACE flag is set


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2672 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 07:32:58 +00:00
David Lawrence Ramsey
9c06f34ef9 more miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2671 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 07:18:30 +00:00
David Lawrence Ramsey
ab41ab9246 fix #ifdefs so that nano compiles with NANO_SMALL defined and
DISABLE_TABCOMP undefined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2670 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 06:30:05 +00:00
David Lawrence Ramsey
2515ccc0a0 *more* cleanups to chars.c and related code
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2669 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 06:04:08 +00:00
David Lawrence Ramsey
d1323e4e35 formatting and comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2668 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 03:56:36 +00:00
David Lawrence Ramsey
7ae1a79641 formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2667 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 03:15:45 +00:00
David Lawrence Ramsey
e221311f2e don't count punctuation when searching for a whole word in
is_whole_word()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2666 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 03:03:45 +00:00
David Lawrence Ramsey
d26f1ebdf1 in open_prevnext_file(), move up a misplaced assert and rename a
variable


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2665 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 03:01:41 +00:00
David Lawrence Ramsey
1e64db6629 more miscellaneous fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2664 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-14 23:38:41 +00:00
David Lawrence Ramsey
ce9d299c47 revert the changes to the behavior of Esc Esc [3-digit number from 000
to 255], as it still won't let us type all possible bytes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2663 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-14 23:38:08 +00:00
David Lawrence Ramsey
bdfa927d62 more miscellaneous cleanups
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2662 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-14 23:36:13 +00:00
David Lawrence Ramsey
789867b6a0 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2661 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-14 04:22:32 +00:00
David Lawrence Ramsey
3a4eb48d5c minor faq updates
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2660 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-14 02:32:37 +00:00
David Lawrence Ramsey
bfc183ba10 more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2659 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-14 02:24:25 +00:00
David Lawrence Ramsey
6209e0eb15 yet *another* cleanup
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2658 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-14 02:08:25 +00:00
David Lawrence Ramsey
e534aae701 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2657 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-14 02:03:56 +00:00
David Lawrence Ramsey
d5d4dde1eb improve detection of blank characters in the "punct" and "brackets"
rcfile options


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2656 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-14 01:55:56 +00:00
David Lawrence Ramsey
42af2216fe yet another cleanup
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2655 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 20:19:03 +00:00
David Lawrence Ramsey
356d2482c5 nisw?blank() should return int, not bool, to match isblank()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2654 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 19:51:56 +00:00
David Lawrence Ramsey
399fe939f9 change the behavior of Esc Esc [3-digit number from 000 to 255] so that
it enters the byte with that value regardless of whether we're in UTF-8
mode or not, and update the help text to mention this; this will allow
searching for and replacing raw bytes with their equivalent multibyte
sequences as entered using verbatim input


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2653 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 17:26:19 +00:00
David Lawrence Ramsey
40c3cd1aa9 in the "nanorc" regexes in nanorc.sample, tweak the "comment" regex to
color comments that don't start at the beginning of a line


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2652 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 16:41:48 +00:00
David Lawrence Ramsey
b300af3f63 simplify is_valid_mbstring() by making it use mbstowcs()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2651 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 15:56:29 +00:00
David Lawrence Ramsey
30d0a81656 don't work around invalid multibyte sequences in rcfile options anymore,
but generate errors


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2650 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 14:50:32 +00:00
David Lawrence Ramsey
6a0d5b8fec miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2649 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 14:00:22 +00:00
David Lawrence Ramsey
7b601fdbe1 still more cleanups to chars.c and related code
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2648 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 13:25:36 +00:00
David Lawrence Ramsey
8b698f4a29 more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2647 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 05:16:55 +00:00
David Lawrence Ramsey
9880afc47a remove unneeded blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2646 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 05:13:14 +00:00
David Lawrence Ramsey
5ed8819f35 revert the simplification of the display_string() call in
do_replace_loop(), as it breaks display in some ways


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2645 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 04:37:28 +00:00
David Lawrence Ramsey
7291daabe3 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2644 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 04:11:20 +00:00
David Lawrence Ramsey
d2edb8a538 when doing history string tab completion, skip over an exact match
unless it's the only match, as the old history code did


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2643 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 03:52:33 +00:00
David Lawrence Ramsey
33d07ef055 in do_replace_loop(), simplify the display_string() call that we use to
get the word that we're going to highlight


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2642 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 03:19:50 +00:00
David Lawrence Ramsey
f26d386191 simplify the word detection code
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2641 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 02:48:52 +00:00
David Lawrence Ramsey
67287088dc detect words more accurately by taking punctuation into account, and
convert all word-detecting functions to use the same wrapper function
for ease of maintenance


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2640 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 02:40:04 +00:00
David Lawrence Ramsey
d16d0bfb9a document cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2639 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 02:24:17 +00:00
David Lawrence Ramsey
5b9f52265a cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2638 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 02:22:44 +00:00
David Lawrence Ramsey
a049c8364f in shortcut_init(), allow the mark to be used in view mode, as Pico does
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2637 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-12 23:53:28 +00:00
David Lawrence Ramsey
1a76845aa5 fix changelog entry
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2636 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-12 23:49:05 +00:00
David Lawrence Ramsey
e90f0b8a33 when the mark is on, only do a word count on the marked text
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2635 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-12 23:20:20 +00:00
David Lawrence Ramsey
d232fa2fc3 remove unnecessary screen update
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2634 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-12 22:40:09 +00:00
David Lawrence Ramsey
e010edd1f8 implement word count via Meta-D at the main window
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2633 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-12 22:31:03 +00:00
David Lawrence Ramsey
19462616d4 one last cleanup to chars.c
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2632 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-12 18:05:42 +00:00
David Lawrence Ramsey
d8640480c3 various cleanups to chars.c and related code
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2631 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-12 17:48:46 +00:00
David Lawrence Ramsey
6315e2ff39 in do_tab(), remove unneeded variable kbinput
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2630 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-12 16:45:37 +00:00
David Lawrence Ramsey
068edf44fc more formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2629 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-12 16:13:44 +00:00
David Lawrence Ramsey
aeeb96e628 cosmetic and formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2628 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-12 16:00:09 +00:00
David Lawrence Ramsey
3db0dc3d8d add macro charset(), a wrapper that calls memset(), and use it in
resize_variables()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2627 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-12 15:24:36 +00:00
David Lawrence Ramsey
c00f658026 in resize_variables(), use sizeof(char) in the memset() that initializes
hblank instead of assuming that the size of a char is 1


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2626 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-12 15:19:11 +00:00
David Lawrence Ramsey
8767da4e63 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2625 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-12 02:14:48 +00:00
David Lawrence Ramsey
d0d5b8fc0e in display_string(), don't check for multicolumn characters if the NO_UTF8 flag isn't set
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2624 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-10 20:45:54 +00:00
David Lawrence Ramsey
44491acfef in color_to_int(), assert that colorname isn't NULL, since that case is
now handled elsewhere; also clarify an error message in parse_colors()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2623 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-09 14:04:08 +00:00
David Lawrence Ramsey
8bcac8ad26 in disable_extended_input(), disable extended output processing as well
as extended input processing; also rename it to disable_extended_io()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2622 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-09 04:02:57 +00:00
David Lawrence Ramsey
53aca71420 formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2621 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-09 04:00:03 +00:00
David Lawrence Ramsey
a9d45bba01 in parse_colors(), properly generate an error if we get a color
directive without a regex string


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2620 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-09 01:09:00 +00:00
David Lawrence Ramsey
a644af58a3 update documentation for the "color" regex
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2619 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-08 21:30:50 +00:00
David Lawrence Ramsey
7c78b45e76 in parse_colors(), properly parse a background color without a
foreground color


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2618 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-08 21:17:32 +00:00
David Lawrence Ramsey
746214d5aa make parse_line_column() consistent with the color regex-parsing code
and go back to returning an error on strings like "3,"


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2617 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-08 21:16:14 +00:00
David Lawrence Ramsey
0df61f1aac cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2616 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-08 20:23:06 +00:00
David Lawrence Ramsey
4428975e95 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2615 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-08 20:13:38 +00:00
David Lawrence Ramsey
c7935e20b7 revert the conversion of each line to a valid multibyte string, as it
doesn't take encodings other than ASCII and Latin-1 into account and
hence isn't accurate enough


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2614 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-08 20:12:57 +00:00
David Lawrence Ramsey
01458cd380 clarify changelog entry
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2613 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-08 19:57:31 +00:00
David Lawrence Ramsey
7bf86e1707 when reading a file in, make sure each line is a valid multibyte string
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2612 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-08 19:50:02 +00:00
David Lawrence Ramsey
23d3cf4515 in doc/faq.html, update the question about the FAQ to mention the
current maintainer


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2611 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-08 18:46:51 +00:00
David Lawrence Ramsey
9af6a203fb typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2610 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-08 02:28:06 +00:00
David Lawrence Ramsey
092af14a82 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2609 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-08 01:35:10 +00:00
Jordi Mallach
3da5580c9c Fix French mandir.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2608 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-07 22:23:45 +00:00
David Lawrence Ramsey
3925bdafda fix erroneous #ifdef that caused a compilation problem when
--enable-nanorc wasn't used and --enable-extra was, and make sure we put
back the keystroke that breaks us out of the credits (if any)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2607 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-07 03:20:35 +00:00
David Lawrence Ramsey
f47f150c82 preemptively update the version number
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2606 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-07 02:25:23 +00:00
David Lawrence Ramsey
457847f0fe add else's
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2605 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-06 19:35:53 +00:00
David Lawrence Ramsey
7e62d109ba in do_insertfile(), set i to 0 when we get a filename via the file
browser, so that it's read in properly when we exit the file browser


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2604 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-06 19:25:29 +00:00
David Lawrence Ramsey
193b0e56f3 add missing blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2603 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-06 18:41:17 +00:00
David Lawrence Ramsey
9b108c2110 in shortcut_init(), remove unnecessary "Refresh" placeholder in the file
browser shortcut list; also add a few formatting fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2602 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-06 18:38:16 +00:00
David Lawrence Ramsey
da33153379 in do_yesno(), allow refreshing the screen via Ctrl-L, as Pico does
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2601 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-06 17:00:08 +00:00
David Lawrence Ramsey
f4595bb5ae in die(), if the current filestruct's been partitioned, unpartition it
before saving the associated file


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2600 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-06 16:27:18 +00:00
David Lawrence Ramsey
c4dbdd55f5 in do_replace_loop(), when moving to the next match, update the screen
using edit_refresh() instead of edit_redraw(), as the latter won't work
properly when we've replaced one or more instances of a string in copy
and haven't yet updated current->data to match copy


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2599 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-06 03:46:32 +00:00
David Lawrence Ramsey
d29b9d5bd6 fix another memory corruption problem in display_string() found by
valgrind


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2598 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-06 03:17:07 +00:00
David Lawrence Ramsey
810d02c6a4 add const
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2597 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-06 01:53:48 +00:00
David Lawrence Ramsey
f99acbf29a make parse_line_column() more consistent: don't return an error on
strings like "3," since we don't return one on strings like ",3"


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2596 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-05 23:12:18 +00:00
David Lawrence Ramsey
6fdc81ae04 various umask-related cleanups
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2595 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-05 19:33:27 +00:00
David Lawrence Ramsey
81dabf2be7 formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2594 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-05 19:20:36 +00:00
David Lawrence Ramsey
3db02389f4 in safe_tempfile(), open a newly created temporary file in "r+b" mode
instead of "w+b" mode, since the latter truncates the file if it already
exists, and we don't need to do that since it's an error if the file
already exists


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2593 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-05 19:18:11 +00:00
David Lawrence Ramsey
cc81436f81 move check_linenumbers() down so that it's near the other debugging
routines


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2592 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-05 19:08:59 +00:00
David Lawrence Ramsey
6529ab434a remove unneeded blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2591 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-04 01:16:46 +00:00
David Lawrence Ramsey
160c5fec87 remove erroneous extra prototype
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2590 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-04 00:24:22 +00:00
David Lawrence Ramsey
81e49a0d4a fix #ifdef
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2589 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-03 21:00:55 +00:00
David Lawrence Ramsey
c10d8ffe9f for consistency, remove -R/--regexp command line option, and allow the
toggle unconditionally


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2588 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-03 20:51:39 +00:00
David Lawrence Ramsey
8fda94246b remove erroneous if block in update_history() preventing the history
list position from being properly moved to the bottom in some cases


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2587 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-03 20:18:46 +00:00
David Lawrence Ramsey
1addd601bc really fix bad #ifdefs; history functions are left out when NANO_SMALL
is defined, and history saving and loading functions are left out when
NANO_SMALL is defined and/or ENABLE_NANORC isn't defined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2586 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-03 19:28:30 +00:00
David Lawrence Ramsey
8e15674c70 fix more bad #ifdefs
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2585 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-03 19:11:27 +00:00
David Lawrence Ramsey
5854a87070 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2584 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-03 19:10:47 +00:00
David Lawrence Ramsey
47ae0d764e remove now-unnecessary null_at()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2583 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-03 14:30:52 +00:00
David Lawrence Ramsey
73857558ec typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2582 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-03 04:09:45 +00:00
David Lawrence Ramsey
854b71d775 in configure.ac, don't refer to the built-in file browser as crappy
anymore


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2581 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-03 01:43:56 +00:00
David Lawrence Ramsey
cef24f2254 fix #ifdefs so the tiny version of nano compiles again; prepending a
file now uses safe_tempfile() instead of mkstemp() directly, and
safe_tempfile() requires get_full_path() and check_writable_directory()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2580 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-03 01:36:05 +00:00
David Lawrence Ramsey
8d07efac66 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2579 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-03 01:33:04 +00:00
David Lawrence Ramsey
d922f199a7 define last_kbinput inside the right #ifdef block
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2578 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-02 19:50:18 +00:00
David Lawrence Ramsey
34bdc35d94 readd tab completion of history strings, with a few minor tweaks
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2577 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-02 18:41:31 +00:00
David Lawrence Ramsey
1726050ef9 fix more bad #ifdefs, and add a few formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2576 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-02 05:50:58 +00:00
David Lawrence Ramsey
8234f672d4 typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2575 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-02 02:32:39 +00:00
David Lawrence Ramsey
95778fda70 fix mismatched #ifdefs
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2574 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-02 02:27:12 +00:00
David Lawrence Ramsey
dac3bca274 clarify a comment, and don't try to display the buffer name in
die_save_file() if it's been blanked out by get_next_file()'s failure to
find a unique filename


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2573 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-01 04:23:52 +00:00
David Lawrence Ramsey
e0b55138b9 add missing blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2572 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-31 17:35:11 +00:00
David Lawrence Ramsey
5e068c6031 rework the file-writing routines so that they can work properly with
already-opened files, such as the mkstemp()-created files used by the
spell-checking code


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2571 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-31 04:28:15 +00:00
David Lawrence Ramsey
bec2f20da0 formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2570 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-31 03:39:59 +00:00
David Lawrence Ramsey
d20c0c34f5 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2569 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-31 03:36:15 +00:00
David Lawrence Ramsey
0998a64fb9 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2568 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-31 03:33:30 +00:00
David Lawrence Ramsey
527f1743f6 add documentation updates for -E/--backupdir's new ability to make
filenames unique, and preemptively update the version number


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2567 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-30 02:09:21 +00:00
David Lawrence Ramsey
54b74cee91 in die(), tweak the message displayed when a backup file can't be
written, so as to not duplicate a translted string


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2566 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-29 23:03:28 +00:00
David Lawrence Ramsey
b9b572236a when using a backup directory, make sure all the filenames written are
unique by using get_next_filename() when necessary


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2565 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-29 02:22:55 +00:00
David Lawrence Ramsey
df2a82509b fix mismatched subscript
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2564 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-28 23:51:03 +00:00
David Lawrence Ramsey
1a1ea3d42f cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2563 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-28 23:32:45 +00:00
David Lawrence Ramsey
15aaa2c31a miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2562 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-28 23:21:30 +00:00
David Lawrence Ramsey
10796ac2fc cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2561 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-27 13:50:31 +00:00
David Lawrence Ramsey
aff5a1c6b1 add multibyte/wide character support to input_tab(), so that we don't
end up with a string that contains only part of a multibyte character
during tab completion


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2560 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-27 13:06:18 +00:00
David Lawrence Ramsey
217f241be5 document bool fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2559 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-27 03:57:01 +00:00
David Lawrence Ramsey
11846fa576 bool fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2558 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-27 03:52:21 +00:00
David Lawrence Ramsey
32fe95d35e revert last change for now, as it breaks the display of filename matches
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2557 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 19:48:41 +00:00
David Lawrence Ramsey
920e350d85 in input_tab(), make sure that we don't set *place to the middle of a
multibyte character


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2556 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 19:14:42 +00:00
David Lawrence Ramsey
e5b23bd2ff formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2555 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 18:57:56 +00:00
David Lawrence Ramsey
7de678798a cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2554 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 18:20:05 +00:00
David Lawrence Ramsey
638cbe5407 yet another comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2553 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 18:11:32 +00:00
David Lawrence Ramsey
0e0fef03c5 typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2552 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 18:05:22 +00:00
David Lawrence Ramsey
f1d3d9581a more miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2551 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 18:03:17 +00:00
David Lawrence Ramsey
40e4acf55e port over DB's (better) equivalent of the last fix, and tweak a few
comments


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2550 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 06:09:07 +00:00
David Lawrence Ramsey
5d8d0b19be remove redundancy
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2549 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 05:53:29 +00:00
David Lawrence Ramsey
86d8fc37d7 remove unneeded blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2548 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 05:50:46 +00:00
David Lawrence Ramsey
e8bb90bd2b fix changelog entry
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2547 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 05:39:53 +00:00
David Lawrence Ramsey
e2ce2792a3 remove redundancy
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2546 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 05:33:57 +00:00
David Lawrence Ramsey
045d130cfa really fix one of the last fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2545 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 05:27:19 +00:00
David Lawrence Ramsey
31b159c1b3 add various fixes to avoid a hang and several potential assertion
failures when building with DEBUG defined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2544 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 05:17:13 +00:00
David Lawrence Ramsey
e4acb69611 another comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2543 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 04:00:39 +00:00
David Lawrence Ramsey
e3970f503c replace all instances of strncpy() with charcpy(), since the only
difference between them is that the former pads strings with nulls when
they're longer than the number of characters specified, which doesn't
appear to be used anywhere


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2542 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 03:47:24 +00:00
David Lawrence Ramsey
16f88134f7 more miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2541 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 03:32:41 +00:00
David Lawrence Ramsey
8b3266e83c fix inaccurate comments
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2540 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 02:46:42 +00:00
David Lawrence Ramsey
0a8ec176e4 really fix the off-by-one errors in LINE,COLUMN parsing; the column
number in do_gotolinecolumn() should always be one-based


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2539 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-25 18:44:37 +00:00
David Lawrence Ramsey
86a9452702 in configure.ac, add minor tweaks to some of the test blocks to avoid
XSI:isms


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2538 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-24 22:20:39 +00:00
David Lawrence Ramsey
c5e9a434b1 fix one last off-by-one error that occurs when do_gotolinecolumn() is
used interactively


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2537 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-23 20:16:29 +00:00
David Lawrence Ramsey
67e3b93861 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2536 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-23 18:49:28 +00:00
David Lawrence Ramsey
e5bc1c45ce oops; free magichistory *properly* when we don't need it anymore
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2535 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-23 17:19:32 +00:00
David Lawrence Ramsey
2fba43c842 free magichistory when we don't need it anymore
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2534 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-23 17:14:46 +00:00
David Lawrence Ramsey
934f9687bb overhaul the history code to work more consistently, and clean up
various parts of it; note that history tab completion has been removed


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2533 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-23 16:30:06 +00:00
Jordi Mallach
7ae4cc6964 Updated French from the TP.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2532 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-23 11:49:50 +00:00
David Lawrence Ramsey
0f476b99b7 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2531 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-22 04:16:36 +00:00
David Lawrence Ramsey
30f164a015 in save_history(), properly save history when in view mode
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2530 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-21 22:41:23 +00:00
David Lawrence Ramsey
86ce3903f9 in usage(), add formatting fixes and a missing N_()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2529 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-21 17:15:46 +00:00
David Lawrence Ramsey
6f25a67833 various minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2528 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-20 02:57:05 +00:00
David Lawrence Ramsey
5754201944 when calling do_gotolinecolymn(), default to the current line and column
if the ones passed in are unspecified or invalid


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2527 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-17 22:27:15 +00:00
David Lawrence Ramsey
172767187e in do_gotolinecolumn(), start the search for a line from fileage instead
of current (again)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2526 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-17 22:01:55 +00:00
David Lawrence Ramsey
d3d37433ae mention the support for moving to a different column in the prompt
formerly known as the "Go to Line" prompt, and also in the help text
where possible


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2525 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-17 21:49:19 +00:00
David Lawrence Ramsey
f83e5e2b13 fix off-by-one problems with COLUMN; it should be zero-based
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2524 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-17 18:29:05 +00:00
David Lawrence Ramsey
650b39c43d set placewewant more efficiently
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2523 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-17 18:15:00 +00:00
David Lawrence Ramsey
9245f97960 more LINE,COLUMN-related work: fix problems parsing it, and allow it at
the (soon-to-be-renamed) "Go to Line" prompt


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2522 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-17 18:06:26 +00:00
David Lawrence Ramsey
60a9bddcf6 formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2521 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-17 16:54:34 +00:00
David Lawrence Ramsey
e1ce92c90f in do_gotoline(), properly show an error message if we try to go to line
0, since the first line in the file is 1


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2520 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-17 01:55:44 +00:00
David Lawrence Ramsey
c5659d320e add error detection to parse_line_column()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2519 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-17 00:25:50 +00:00
David Lawrence Ramsey
2f0cd35322 add missing comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2518 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-16 23:33:53 +00:00
David Lawrence Ramsey
b68c01b753 move duplicate code from the +LINE,COLUMN feature into a separate
function, parse_line_column()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2517 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-16 23:23:15 +00:00
David Lawrence Ramsey
50995bd024 rename another variable
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2516 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-16 20:13:09 +00:00
David Lawrence Ramsey
9c8baed321 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2515 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-16 19:43:04 +00:00
David Lawrence Ramsey
775eeba38a add the ability to open a file on a specified column as well as a
specified line, by allowing an argument of the form +LINE,COLUMN


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2514 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-16 18:38:16 +00:00
David Lawrence Ramsey
6e925cf330 update the Free Software Foundation's mailing address in various
comments


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2510 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-15 19:57:17 +00:00
David Lawrence Ramsey
066713e87e more indentation fixes and one more cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2509 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-14 23:21:02 +00:00
David Lawrence Ramsey
546f5b3d8a rename a few more variables, and fix some indentation
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2508 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-14 23:14:47 +00:00
David Lawrence Ramsey
e781ddf3b1 still more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2507 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-14 22:44:16 +00:00
David Lawrence Ramsey
6d39f4ba66 document a renamed variable
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2506 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-14 21:19:15 +00:00
David Lawrence Ramsey
5ebd73f9a5 more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2505 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-14 20:52:20 +00:00
David Lawrence Ramsey
02173c05dc in cut_line(), set placewewant properly after cutting a line, to avoid a
problem where the screen won't be updated if (a) we're not on the first
page when we cut the line, and (b) immediately after we cut the line, we
hit End to move to the end of the line after it


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2504 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-14 18:41:25 +00:00
David Lawrence Ramsey
7f4dd35406 another cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2503 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-08 17:08:51 +00:00
David Lawrence Ramsey
8f5e50991b cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2502 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-06 17:03:53 +00:00
David Lawrence Ramsey
340e5ca881 revert one last change that was causing breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2501 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-03 21:42:04 +00:00
David Lawrence Ramsey
75f4b7cb84 remove redundant code
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2500 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-03 21:35:58 +00:00
David Lawrence Ramsey
5e73eec3cc revert one of the previous changes; we don't really need a shortcut for
moving to the next search/replace history string, as we don't have one
for tab completion either


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2499 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-03 20:57:13 +00:00
David Lawrence Ramsey
0f83c89b09 rearrange nanogetstr() to fix breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2498 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-03 03:18:44 +00:00
David Lawrence Ramsey
6bc26a9a8b revert some attempts at simplifying the search/replace history code that
were causing breakage; make "previous history" and "next history" use
separate keys; and display them as "^P" and "^N" instead of using one
sentinel value for both, so that clicking on them with the mouse works
again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2497 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-02 21:48:34 +00:00
David Lawrence Ramsey
198bd592ff document the simplification of a history check in nanogetstr(), and
remove an extra parenthesis so it actually compiles (oops)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2496 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-29 13:16:05 +00:00
David Lawrence Ramsey
fcdfb7f75f more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2495 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-29 04:32:38 +00:00
David Lawrence Ramsey
e41e8dbead more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2494 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-29 03:28:27 +00:00
David Lawrence Ramsey
10f880c62f remove a redundant check in get_history_newer(), and add a few comment
fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2493 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-29 03:24:43 +00:00
Jordi Mallach
5e360dc065 Updated Malay from the TP.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2492 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-27 06:14:48 +00:00
David Lawrence Ramsey
6595b715d0 oops; in do_output(), properly allow wrapping when we insert a tab, for
consistency; this is incompatible with Pico, but Pico doesn't wrap
properly when other control characters are on a line, either, so its
behavior with regard to tabs is apparently a bug; besides, we wrap at
all other blank characters, including multibyte ones, so we shouldn't
make an exception for tabs


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2491 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-26 17:21:47 +00:00
Jordi Mallach
56c1e34e5a Update Norwegian bokmaal from the TP.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2490 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-26 04:47:03 +00:00
David Lawrence Ramsey
e4cb3158fd in do_output(), fix an off-by-one error that allowed wrapping when we
inserted a tab, for Pico compatibility


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2489 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-25 22:48:58 +00:00
David Lawrence Ramsey
6439330d59 in shortcut_init(), move the "Refresh" and "Exit" shortcuts to the
beginning of the help browser shortcut list, for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2488 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-25 21:48:22 +00:00
David Lawrence Ramsey
0bfec6e58d minor bits: fix slang compilation by calling clearok(TRUE) and
wrefresh() on edit instead of curscr, since slang's curses emulation
doesn't include a curscr equivalent; and revert Jordi's removal of a
space in the main help text, as its second paragraph won't be properly
indented by one space without it


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2487 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-25 20:08:29 +00:00
David Lawrence Ramsey
29be8031df comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2486 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-20 14:55:46 +00:00
Jordi Mallach
c5fe41cec8 Update Malay, Romanian and Traditional Chinese from the TP.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2485 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-20 13:26:41 +00:00
Jordi Mallach
72bff8eee4 Err, stable branch has been nano_1_2 for the last two years, doh!
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2484 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-20 13:24:39 +00:00
Jordi Mallach
d4a1c0ad29 Credit Vietnamese translator.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2483 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-20 13:22:08 +00:00
David Lawrence Ramsey
1ccada16ae actually, since copy_file() doesn't allocate ever-increasing space for a
file, it should read the file BUFSIZ bytes at a time; remove erroneous
changelog entry


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2482 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-19 22:37:01 +00:00
David Lawrence Ramsey
5b2f17e591 change all hardcoded instances of 128 bytes to MAX_BUF_SIZE, and #define
MAX_BUF_SIZE as 128 in nano.h


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2481 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-19 21:47:01 +00:00
David Lawrence Ramsey
3705924fc8 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2480 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-19 20:13:13 +00:00
David Lawrence Ramsey
c596c0c4da miscellaneous bits: make get_next_filename() use an unsigned long, make
num_of_digits() take a size_t instead of a ssize_t, and rename
num_of_digits() to digits()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2479 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-19 16:32:08 +00:00
David Lawrence Ramsey
9cf1df1f06 in do_browser() and do_help(), don't treat NANO_CANCEL_KEY as
NANO_EXIT_KEY anymore, for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2478 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-19 03:15:21 +00:00
Jordi Mallach
56074a1da6 Update Vietnamese from the TP.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2477 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-18 15:37:49 +00:00
Jordi Mallach
f79a3fa51a Catalan, Italian and Romanian updates from the TP.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2476 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-18 12:40:38 +00:00
Jordi Mallach
b9180f4a82 Remove bogus space from help text.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2475 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-18 12:31:11 +00:00
David Lawrence Ramsey
ad11460eb7 remove more unneeded clearok(TRUE)'s, and avoid an unnecessary update
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2474 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-16 18:27:57 +00:00
David Lawrence Ramsey
04652518fd simplify total_update() to call clearok(TRUE) and wrefresh() on curscr,
which updates the entire screen in fewer function calls


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2473 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-16 18:07:37 +00:00
David Lawrence Ramsey
22425a204d cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2472 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-16 15:57:19 +00:00
David Lawrence Ramsey
e527e458f4 various #include fixes: since proto.h includes nano.h, only include the
former in source files; also add an #include guard to proto.h, and make
the config.h #include in nano.h match the config.h #includes everywhere
else


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2471 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-15 18:07:26 +00:00
David Lawrence Ramsey
ac71fdde97 more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2470 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-15 17:48:20 +00:00
David Lawrence Ramsey
ffda704ef6 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2469 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-14 17:08:35 +00:00
David Lawrence Ramsey
6a244b689f various minor bits: add miscellaneous comment fixes; in
get_next_filename(), use a long instead of an int for the number
prepended to the filename; and in num_of_digits(), use a ssize_t instead
of an int


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2468 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-14 03:52:28 +00:00
David Lawrence Ramsey
c2b07472e2 in print1opt_full(), if desc should be empty, allow it to be NULL
instead of "", since the latter is not necessarily translated as ""


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2467 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-14 03:13:49 +00:00
Jordi Mallach
f1aed80922 Updated Spanish from the TP.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2466 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-13 22:58:51 +00:00
Jordi Mallach
95660ee4d9 Added Vietnamese translation by Phan Vinh Thinh <teppi82@gmail.com>.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2465 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-13 14:26:02 +00:00
David Lawrence Ramsey
ddedf2dbd4 Back to CVS
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2464 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-10 03:59:53 +00:00
David Lawrence Ramsey
c32a5e7b4e GNU nano 1.3.7
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2462 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-10 03:58:44 +00:00
David Lawrence Ramsey
a3e5fad059 in configure.ac, mention explicitly that the check for the broken
regexec() is needed for glibc 2.2.3


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2461 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-09 14:47:54 +00:00
Jordi Mallach
7accda6dd7 Fix format definitions...
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2460 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-09 12:09:15 +00:00
Jordi Mallach
b9f28013a7 Added Plural-Forms to zh_TW.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2459 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-09 09:48:45 +00:00
David Lawrence Ramsey
c504dffa39 in nanogetstr(), fix a misplaced break and some indentation
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2458 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-09 04:10:58 +00:00
David Lawrence Ramsey
fc0ebe982d remove inaccurate comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2457 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-09 03:51:00 +00:00
David Lawrence Ramsey
dcb4e3a66d clarify comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2456 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-08 20:27:02 +00:00
David Lawrence Ramsey
00762ffaeb add comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2455 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-08 20:06:08 +00:00
David Lawrence Ramsey
4857728f6e remove unneeded blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2454 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-08 17:10:59 +00:00
Jordi Mallach
c0718343f5 Updated Catalan, Italian and Traditional Chinese.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2453 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-08 09:02:49 +00:00
David Lawrence Ramsey
d9a4dedd35 remove TODO item about allowing the editing of UTF-8 as raw bytes when
the NO_CONVERT flag is used, as it will be practically impossible to get
right (since displayed non-editable strings should always be parsed as
UTF-8, whether the edited text is or not, and the switching back and
forth between raw and normal mode when editing text and displaying it
will be far too complicated)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2452 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-07 02:45:28 +00:00
Jordi Mallach
de85d63520 Added Kinyarwanda translation.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2451 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-06 08:13:08 +00:00
David Lawrence Ramsey
53d7bce68a remove unneeded space
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2450 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-05 14:18:41 +00:00
Jordi Mallach
a716bf42bc Updated Romanian and French from the TP.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2449 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-04 23:20:32 +00:00
David Lawrence Ramsey
403e0feced in nanorc.sample, break up overly long perl and nanorc regexes into
separate regexes of no more than 256 bytes, as POSIX-compliant regexp
implementations can reject regexes of over 256 bytes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2448 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-01 19:45:35 +00:00
David Lawrence Ramsey
e61e2c6f49 preemptively update the version number
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2447 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-31 19:47:17 +00:00
David Lawrence Ramsey
d4a071e492 in do_insertfile(), fix handling of blank filenames in multibuffer mode
so that they work properly again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2446 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-31 17:00:43 +00:00
David Lawrence Ramsey
894d80fc5d add missing blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2445 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-31 05:26:06 +00:00
David Lawrence Ramsey
612caef65f in statusq(), make sure that the vsnprintf(foo) call and foo's
subsequent null termination both take the proper number of bytes when
using multibyte characters, so that multibyte prompt strings aren't
prematurely cut off


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2444 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-31 00:11:43 +00:00
David Lawrence Ramsey
88ad64d597 in do_insertfile(), fix a problem where going into the help browser at
the "Insert File" prompt would always result in the current answer's
being used as the filename afterward


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2443 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-30 23:52:02 +00:00
David Lawrence Ramsey
aa683853d4 in help_init(), avoid a warning when compiling with -pedantic by
breaking overly long help text up into separate chunks, and add a few
wording fixes to the help text as well


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2442 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-30 18:11:59 +00:00
David Lawrence Ramsey
050469c595 move bool from the C++-specific line to the C-specific line, since C99
defines it


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2441 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-30 17:10:57 +00:00
David Lawrence Ramsey
4811b81456 in nanorc.sample, merge Neil Brown's C++ regexes into the "c-file"
regexes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2440 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-30 17:03:43 +00:00
David Lawrence Ramsey
050b13ae5d cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2439 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-29 23:10:20 +00:00
David Lawrence Ramsey
6a84684571 add more documentation fixes for consistency
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2438 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-27 04:30:33 +00:00
David Lawrence Ramsey
caac92012d in parse_rcfile(), fix a debugging message to display the long value of
a flag properly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2437 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-27 01:34:40 +00:00
David Lawrence Ramsey
32a285c1eb various documentation fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2436 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-26 23:15:51 +00:00
David Lawrence Ramsey
b80d49f071 make sure that all references to cut-to-end are left out when NANO_SMALL
is defined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2435 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-26 22:49:46 +00:00
David Lawrence Ramsey
fe605247cb per DB's patch, in main(), change 0 to NULL in the option struct where
needed


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2434 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-26 22:49:08 +00:00
David Lawrence Ramsey
78d05481db update changelog
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2433 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-26 20:53:40 +00:00
David Lawrence Ramsey
b56ca1b7bb cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2432 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-26 20:50:59 +00:00
David Lawrence Ramsey
d37f6a3f5c add missing blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2431 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-26 20:41:36 +00:00
David Lawrence Ramsey
5f3695bdb5 in make_mbchar(), remove an unneeded assert
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2430 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-26 06:54:36 +00:00
David Lawrence Ramsey
d8367986ce cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2429 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-26 04:49:01 +00:00
David Lawrence Ramsey
6e0ed3c1c6 add various portability and potential segfault fixes involving getcwd()
calls


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2428 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-26 04:42:28 +00:00
David Lawrence Ramsey
c15583da31 in configure.ac, tweak a few more things to make sure that everything
still works properly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2427 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-25 23:19:04 +00:00
David Lawrence Ramsey
8ac9087d75 in configure.ac, per Mike Frysinger's patch, add support for
--enable-utf8 and --disable-utf8 options, with slang support and a few
other tweaks added by me


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2426 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-25 22:25:24 +00:00
David Lawrence Ramsey
c8857a2c26 in cut_to_eol(), fix an inaccurate comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2425 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-25 06:24:13 +00:00
David Lawrence Ramsey
297851a647 in titlebar(), make sure that the (mv)?waddnstr() calls take the proper
number of bytes when using multibyte characters, so that multibyte
strings aren't prematurely cut off; also allow the "View" state to be
displayed when a filename is passed in, in case we're in multibuffer
mode and inside the file browser


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2424 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-25 05:00:32 +00:00
David Lawrence Ramsey
cb4f14b8ce add missing blank lines
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2423 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-24 22:28:25 +00:00
David Lawrence Ramsey
263b447323 per Mike Frysinger's patch, in move_mbleft(), fix assert to reference
the proper variable, so that nano builds with DEBUG defined again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2422 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-23 05:56:11 +00:00
David Lawrence Ramsey
bc6a36e40d move macro definition
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2421 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-22 20:17:38 +00:00
David Lawrence Ramsey
eb5092226d cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2419 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-22 04:50:11 +00:00
David Lawrence Ramsey
cf4db89d56 in help_line_len(), make the text display more flexible, and closer to
what nano 1.2.x does


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2418 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-22 03:59:32 +00:00
David Lawrence Ramsey
4e0b1ae332 add missing space in the help text, and fix an allocsize-related assert
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2417 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-22 03:58:51 +00:00
David Lawrence Ramsey
c4daf5d49e in help_init(), when calculating allocsize, take multibyte characters
into account, and keep the column number limits consistent


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2416 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-22 02:51:01 +00:00
David Lawrence Ramsey
b41df4a140 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2415 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-22 02:50:24 +00:00
David Lawrence Ramsey
a853e2d650 in do_justify(), move break_pos after the space earlier, as do_wrap()
does with wrap_loc, as it's more efficient


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2414 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-22 02:17:36 +00:00
David Lawrence Ramsey
6b94e95ec9 in find_paragraph(), fix a problem where a search for the next paragraph
would skip over certain cases of one-line paragraphs


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2413 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-22 01:53:57 +00:00
David Lawrence Ramsey
aad85151ae in do_justify(), instead of breaking a line at a space and readding the
space afterwards, just break the line after the space, as it's more
efficient


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2412 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-22 01:25:34 +00:00
David Lawrence Ramsey
7ec8d7c6a3 remove unneeded space
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2411 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-21 08:03:46 +00:00
David Lawrence Ramsey
39e8ce6f8e in printopt(), add DB's tweaks to make sure longflag isn't passed in
when HAVE_GETOPT_LONG isn't defined, and rework the special case of
options that are ignored for Pico compatibility so that they display
more neatly when HAVE_GETOPT_LONG isn't defined; in usage(), fix an
erroneous #ifdef that resulted in the -d/--rebinddelete and -k/--cut
options' not being printed when NANO_SMALL was defined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2410 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-21 07:24:47 +00:00
David Lawrence Ramsey
afbcf68c1a more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2409 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-21 06:33:41 +00:00
David Lawrence Ramsey
b9dec213be document cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2408 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-21 06:14:45 +00:00
David Lawrence Ramsey
928babf8a1 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2407 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-21 06:12:07 +00:00
David Lawrence Ramsey
2d825bae79 after (re)initializing the terminal, make sure the cursor is always
turned on


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2406 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-20 21:20:47 +00:00
David Lawrence Ramsey
3dfc879f63 Back to CVS
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2405 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-20 20:04:59 +00:00
David Lawrence Ramsey
bec01bd97d GNU nano 1.3.6
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2403 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-20 20:02:51 +00:00
David Lawrence Ramsey
3dd744f392 and make the locale string checks use the #defined strcasestr() alias if
necessary


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2402 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-20 07:26:47 +00:00
David Lawrence Ramsey
adc30a839b put the old #defined aliases for strcasecmp(), strncasecmp(),
strcasestr(), and strnlen() back with the #defined aliases for getline()
and getdelim(), as they make things simpler


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2401 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-20 07:24:49 +00:00
David Lawrence Ramsey
8974efa27b when checking the locale string, use nstrcasestr() if we don't have
strcasestr()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2400 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-20 06:50:26 +00:00
David Lawrence Ramsey
d96ee5260a add asserts to do_wrap()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2399 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-20 03:10:31 +00:00
David Lawrence Ramsey
ba1ab86db5 check for a UTF-8-supporting version of slang
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2398 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-20 02:50:31 +00:00
David Lawrence Ramsey
1fc55a268f miscellaneous documentation updates
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2397 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-19 21:33:13 +00:00
David Lawrence Ramsey
543ecf65a6 update changelog again
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2396 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-19 21:20:20 +00:00
David Lawrence Ramsey
735b30c13f minor indentation fix for configure.ac, and mention UTF-8 support in
AUTHORS


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2395 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-19 21:19:26 +00:00
David Lawrence Ramsey
40e211bcec add full multibyte character support to do_wrap()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2394 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-19 21:15:30 +00:00
David Lawrence Ramsey
9bd56204ee add multibyte character support to help_line_len(), so that UTF-8 help
text is wrapped properly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2393 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-18 21:29:33 +00:00
David Lawrence Ramsey
d456bfa10d add more locale string checks beyond case-sensitive "UTF-8" so that we
can better detect UTF-8 locales, adapted from Debian's UTF-8 patch for
slang


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2392 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-18 19:07:25 +00:00
David Lawrence Ramsey
22a3564a2e update changelog
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2391 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-18 05:26:54 +00:00
David Lawrence Ramsey
d44a005e3d make the #ifdef around indent_len() match that of its prototype, so that
we can compile with NANO_SMALL and !DISABLE_JUSTIFY again; also add a
comment fix


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2390 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-18 05:20:54 +00:00
David Lawrence Ramsey
df21a2cbdf minor documentation fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2389 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-18 04:38:19 +00:00
David Lawrence Ramsey
b349c80f0d allow refreshing of the file browser window, as Pico does
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2388 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-17 19:10:29 +00:00
David Lawrence Ramsey
85616c499b add missing blank line, and rename total_blank() to total_update(), as
the latter is more accurate


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2387 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-17 18:11:08 +00:00
David Lawrence Ramsey
b9ddb80123 allow refreshing of the help browser window, as Pico does, and remove a
few stray spaces from the main help text


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2386 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-17 17:56:48 +00:00
David Lawrence Ramsey
27f2b258d3 initialize indent_string later in the justify code, so as to avoid a
possible memory leak


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2385 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-17 05:08:15 +00:00
David Lawrence Ramsey
102d01da6c fix justify code regression: if we're justifying the entire file, and we
haven't found any paragraph(s), we should refresh the screen and get out
instead of breaking out of the loop and acting as though we've justified
something, so as to avoid a segfault


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2384 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-17 04:48:14 +00:00
David Lawrence Ramsey
fd81a7189b fix paragraph searching code regression: if trying to move to the line
after the end of the next paragraph leaves us on the same line where we
were before, the search should fail in order to avoid an infinite loop


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2383 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-17 04:24:12 +00:00
David Lawrence Ramsey
efec641a82 control characters can only be properly filtered out in both non-UTF-8
and UTF-8 mode inside the output routines, so do it there instead of
inside the input routines


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2382 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-17 03:52:08 +00:00
David Lawrence Ramsey
77abec7ecf fix misplaced #endif
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2381 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-16 17:00:27 +00:00
David Lawrence Ramsey
ba5b12c1fa comment clarifications
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2380 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-16 16:40:21 +00:00
David Lawrence Ramsey
40ea2a2ea0 actually, we can swallow non-ASCII control characters if we're not in
UTF-8 mode


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2379 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-16 16:32:33 +00:00
David Lawrence Ramsey
496488c5d2 when getting printable input from the edit window or statusbar prompt,
don't swallow non-ASCII control characters, since they're parts of UTF-8
sequences


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2378 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-16 15:34:22 +00:00
David Lawrence Ramsey
a17a130d6c add debugging statement
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2377 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-16 14:39:42 +00:00
David Lawrence Ramsey
2161fa6254 check for wget_wch() again instead of get_wch() when looking for the
wide version of curses, since get_wch() might be a macro instead of a
function


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2376 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-16 03:03:41 +00:00
David Lawrence Ramsey
bb0060eb96 documentation update
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2375 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-15 07:20:52 +00:00
David Lawrence Ramsey
631242dd96 a few last minor fixes to do_credits()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2374 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-15 07:06:54 +00:00
David Lawrence Ramsey
4dc5838ccc in do_credits(), display Florian König's name properly in UTF-8 mode;
since we can't dynamically set that element of the array to its UTF-8
equivalent when in UTF-8 mode, we have to use the ISO-8859-1 version and
pass every string in the credits through make_mbstring() to make sure
they're all UTF-8 (sigh)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2373 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-15 06:58:02 +00:00
David Lawrence Ramsey
0099a8f45c fix potential memory corruption problem in make_mbstring(), and also fix
compilation with -pedantic


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2372 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-15 06:34:09 +00:00
David Lawrence Ramsey
38156d4491 make the rest of the justify code support multibyte characters
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2371 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-15 05:44:03 +00:00
David Lawrence Ramsey
666644efbc fix more inaccurate comments
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2370 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-14 20:32:00 +00:00
David Lawrence Ramsey
15540051ac when justifying, don't remove a space after a duplicate character in
punct anymore, as it doesn't really make us more compatible with Pico


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2369 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-14 20:06:23 +00:00
David Lawrence Ramsey
7b918c76ee add missing blank lines
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2368 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-14 19:17:27 +00:00
David Lawrence Ramsey
7d7e7d58ad fix erroneous #ifdef
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2367 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-14 18:54:33 +00:00
David Lawrence Ramsey
f0195a8839 make sure all rcfile arguments are valid multibyte strings
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2366 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-14 18:47:21 +00:00
David Lawrence Ramsey
08c70ae1e9 formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2365 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-14 17:47:17 +00:00
David Lawrence Ramsey
9389ca29cf add more multibyte character support to break_line()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2364 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-14 06:14:02 +00:00
David Lawrence Ramsey
af40eeaa06 more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2363 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-14 04:31:44 +00:00
David Lawrence Ramsey
b159605a5b add missing blank lines
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2362 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-14 00:38:36 +00:00
David Lawrence Ramsey
801a8b51d1 remove erroneous if clause in the overhauled justify code
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2361 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-14 00:29:37 +00:00
David Lawrence Ramsey
ff4a487efa overhaul the paragraph-searching code to make it simpler too
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2360 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-13 21:12:25 +00:00
David Lawrence Ramsey
9ec5db8b42 comment improvement
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2359 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-13 20:39:33 +00:00
David Lawrence Ramsey
8d0d3abb72 more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2358 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-13 16:42:36 +00:00
David Lawrence Ramsey
7f9ed903ec fix regressions caused by the justify overhaul: when adjusting the mark,
take the indentation length into account, and don't declare an
indent_len variable inside a loop when we already have one outside


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2357 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-13 16:05:47 +00:00
David Lawrence Ramsey
96b21be5cf fix regression caused by the justify overhaul: when justifying a quoted
paragraph, don't put the indentation of the first line at the beginning
of every broken line unless that indentation was at the beginning of
every line originally


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2356 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-13 15:48:36 +00:00
David Lawrence Ramsey
7253929a55 fix erroneous comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2355 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-13 06:03:33 +00:00
David Lawrence Ramsey
e9ac1d7930 overhaul the justify code to make it leave the right number of spaces at
the ends of the lines of a paragraph, and also to make it simpler


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2354 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-13 03:28:37 +00:00
David Lawrence Ramsey
59fe758a10 fix problem where mark_beginx wouldn't be saved properly in
backup_lines(), and add a few more cosmetic fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2353 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-12 20:29:22 +00:00
David Lawrence Ramsey
cefd29e9fe undo erroneous tweaks
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2352 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-11 20:32:06 +00:00
David Lawrence Ramsey
bca59d6ac0 add a slightly tweaked version of Mike Frysinger's manpage regex, and do
various documentation updates


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2351 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-11 20:22:48 +00:00
David Lawrence Ramsey
800dd18fa4 when using slang, call the right function to enable UTF-8 support
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2350 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-11 17:46:01 +00:00
David Lawrence Ramsey
b1d9b418b8 formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2349 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-11 04:22:34 +00:00
David Lawrence Ramsey
e0fb4d5641 improve the handling of whitespace display mode in multibyte locales:
use new function make_mbstring() instead of display_string() to make
sure the multibyte string is valid and interpreted properly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2348 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-11 04:03:32 +00:00
Jordi Mallach
55dfc3d3e9 Updated Malay from the TP.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2347 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-10 23:55:20 +00:00
David Lawrence Ramsey
6e60db6989 make whitespace display mode work with multibyte characters
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2346 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-10 22:52:21 +00:00
David Lawrence Ramsey
202d3c2f97 add DB's overhaul of the rcfile parsing code and related miscellaneous
bits


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2345 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-10 20:55:11 +00:00
David Lawrence Ramsey
40f11ae622 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2344 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-10 17:35:41 +00:00
David Lawrence Ramsey
3cf525d46f fix wording problem
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2343 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-09 23:20:56 +00:00
David Lawrence Ramsey
23f7e1b138 make the latest faq entry more accurate
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2342 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-09 23:14:01 +00:00
David Lawrence Ramsey
256a8908aa add faq entry about how to open files with names starting with '+'s
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2341 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-09 22:53:11 +00:00
David Lawrence Ramsey
b199caef7d make sure that the universal statusbar prompt functions are fully in
sync with their edit window counterparts, and add a few cosmetic fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2340 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-09 20:35:10 +00:00
David Lawrence Ramsey
c275dc575a attempt at fixing a problem tracked down by Jim Uhl, where nano will go
into an infinite loop if the terminal it's running in dies unexpectedly
due to a signal


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2339 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-08 17:45:36 +00:00
David Lawrence Ramsey
9d69169072 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2338 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-08 16:41:53 +00:00
David Lawrence Ramsey
09b1c02c62 reorganize changelog a bit
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2337 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-04 18:25:56 +00:00
David Lawrence Ramsey
5f9acfeee5 add a few more missing blank lines, and fix two instances where totsize
is miscalculated in multibyte/wide character mode


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2336 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-04 17:09:41 +00:00
David Lawrence Ramsey
9adace8c76 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2335 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-04 15:09:55 +00:00
David Lawrence Ramsey
bd2eb289fb comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2334 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-02 19:34:59 +00:00
David Lawrence Ramsey
e6bbee8fe4 formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2333 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-01 23:36:34 +00:00
David Lawrence Ramsey
7e110bd28f add missing blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2332 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-01 23:21:21 +00:00
David Lawrence Ramsey
eb4d81f3c1 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2331 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-01 22:47:00 +00:00
David Lawrence Ramsey
aed09427f8 remove unneeded blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2330 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-25 21:06:43 +00:00
David Lawrence Ramsey
5d2ab88f0e another cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2329 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-25 20:29:44 +00:00
David Lawrence Ramsey
65ef166a40 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2328 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-25 20:21:45 +00:00
David Lawrence Ramsey
b6e79fddaf start adding multibyte/wide character support to the help browser code
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2327 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-25 19:17:57 +00:00
David Lawrence Ramsey
0c23aed600 fix erroneous statusbar message truncation with multibyte strings
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2326 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-23 22:10:38 +00:00
David Lawrence Ramsey
ad96aff50d rework things so that strrchrn() is no longer needed, and remove it
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2325 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-22 23:22:37 +00:00
David Lawrence Ramsey
60e329e3b2 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2324 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-22 22:24:14 +00:00
David Lawrence Ramsey
32f56814c7 remove unnecessary #include
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2323 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-14 18:25:32 +00:00
David Lawrence Ramsey
45edf361a8 mention typo fix in changelog
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2322 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-14 05:38:06 +00:00
David Lawrence Ramsey
4c75faa211 typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2321 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-14 05:37:09 +00:00
David Lawrence Ramsey
7d367710ae add DB's overhaul of the file browser code to increase efficiency and
add multibyte character support, plus a few tweaks of mine


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2320 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-14 05:00:15 +00:00
David Lawrence Ramsey
b680326c37 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2319 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-12 23:59:20 +00:00
David Lawrence Ramsey
e1c16b3744 add multibyte character support to is_whole_word(), plus a comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2318 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-12 23:09:27 +00:00
David Lawrence Ramsey
bc14941e34 fix misplaced #ifdefs
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2317 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-11 20:23:00 +00:00
David Lawrence Ramsey
1b9d3f9898 port over DB's overhaul of safe_tempnam() and his changes to
check_operating_dir() to make it use boolean values (plus a few more
boolean-related tweaks of mine); also stop wrapping the bad_chr
parameter of parse_mbchar() in #ifdefs for cleanliness, as the
allow_tabcomp parameter of check_operating_dir() isn't wrapped in
#ifdefs, and don't set bad_chr to TRUE when we get a null byte in a
multibyte string, as it's not an invalid multibyte character


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2316 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-11 20:09:11 +00:00
David Lawrence Ramsey
2724c88717 set statusbar_xend properly when doing tab completion
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2315 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-11 16:23:56 +00:00
David Lawrence Ramsey
54dca7b7b3 revert diralphasort() tweak
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2314 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-11 16:02:54 +00:00
David Lawrence Ramsey
0df875a45d cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2313 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-10 02:26:08 +00:00
David Lawrence Ramsey
d7ca85c86c add DB's overhauls of get_full_path() and check_writable_directory(),
plus a few tweaks of mine


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2312 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-09 18:56:21 +00:00
David Lawrence Ramsey
d9661dc301 remove inaccurate comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2311 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-08 21:48:15 +00:00
David Lawrence Ramsey
0b80f936bf add missing #ifdef
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2310 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-08 20:39:28 +00:00
David Lawrence Ramsey
65e6ecb1d4 add DB's pverhaul the tab completion code and a few related functions to
increase efficiency and support multibyte characters; also add a few
miscellaneous tweaks of mine


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2309 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-08 20:37:53 +00:00
David Lawrence Ramsey
daa533a767 fix off-by-one error when calculating totsize in read_file(), introduced
when totsize was converted to hold the total number of multibyte
characters


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2308 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-07 05:31:51 +00:00
David Lawrence Ramsey
3eeb823f92 add multibyte character support to indent_length(), convert the "smart
home" routines to use it (since it returns the number of bytes taken up
by spacing characters at the beginning of the line), and rearrange a few
initializations near asserts


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2307 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-31 18:59:30 +00:00
David Lawrence Ramsey
2921be2f38 when detecting wide character support in curses, check for get_wch()
instead of wget_wch()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2306 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-28 20:09:45 +00:00
David Lawrence Ramsey
d15de73bf3 properly enable UTF-8 support when using slang
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2305 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-28 19:37:23 +00:00
David Lawrence Ramsey
798e67e0a1 tweak get_mouseinput() to work properly when -O/--morespace is used
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2304 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-28 19:11:51 +00:00
David Lawrence Ramsey
96de1b0650 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2303 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-27 21:00:10 +00:00
David Lawrence Ramsey
23c44504ad miscellaneous bits: change flags to an unsigned long and totsize to a
size_t, store the number of multibyte characters instead of the number
of single-byte characters in totsize, and add a few formatting fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2302 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-27 20:49:07 +00:00
David Lawrence Ramsey
7c60eab744 tweak do_mouse() to work properly when -O/--morespace is used
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2301 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-27 06:35:56 +00:00
David Lawrence Ramsey
3f9c63589e turn string functions that don't take length arguments into wrappers for
the versions that take length arguments, add multibyte equivalent of
strlen(), and fix potential segfault in mbstrnlen()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2300 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-25 19:21:11 +00:00
David Lawrence Ramsey
14ace1711d in edit_add(), make sure we use the right variable when painting marked
selections, and add a few cosmetic tweaks


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2299 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-24 21:51:07 +00:00
David Lawrence Ramsey
3e93c63e60 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2298 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-24 14:57:57 +00:00
David Lawrence Ramsey
83ba47a964 add another cleanup
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2297 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-24 01:21:09 +00:00
David Lawrence Ramsey
345260c624 add multibyte version of revstrcasestr()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2296 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-24 01:14:17 +00:00
David Lawrence Ramsey
3ee4cf3027 cosmetic and formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2295 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-22 20:49:14 +00:00
David Lawrence Ramsey
17b8a36d17 rename a variable in the strcasestr() equivalent order to match DB's
original cleanup of it, and port the change to the multibyte version too


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2294 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-22 19:56:16 +00:00
David Lawrence Ramsey
42abfe057e add multibyte equivalent of strcasestr(), plus some miscellaneous
cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2293 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-22 18:24:16 +00:00
David Lawrence Ramsey
159bdfdc60 add support for characters to the "c-file" regexes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2292 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-20 16:40:24 +00:00
David Lawrence Ramsey
122ae849b8 oops; replace the previous tweak with a proper merge of DB's code with
the no_more_space() function


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2290 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-19 20:55:42 +00:00
David Lawrence Ramsey
5040666fbb add DB's (slightly tweaked) changes to make resizing more flexible, and
also add his replacement of RETSIGTYPE with void, which avoids some
potential problems


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2289 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-19 19:52:42 +00:00
David Lawrence Ramsey
b80077dae3 add support for moving to the next or previous word at the statusbar
prompt


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2288 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-18 21:25:38 +00:00
David Lawrence Ramsey
314be2cfa9 formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2287 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-18 21:12:28 +00:00
David Lawrence Ramsey
21954765ca reorganization: move revstrstr() back to chars.c, and move is_byte()
there too, since they both deal with strings and hence characters


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2286 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-18 17:00:00 +00:00
David Lawrence Ramsey
2bd22761ac #define fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2285 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-18 16:43:18 +00:00
Jordi Mallach
d23277fbc9 Updated Brazilian Portuguese translation.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2284 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-18 09:41:30 +00:00
David Lawrence Ramsey
4ce3b49597 update documentation copyright years and modification dates
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2283 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-17 05:35:00 +00:00
David Lawrence Ramsey
5cc14f2f9a various documentation updates
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2282 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-17 05:24:26 +00:00
David Lawrence Ramsey
637b8bb36c add -O/--morespace command line option, plus a corresponding Meta-O
toggle and a "morespace" rcfile option; when these are used, the
normally-unused blank line below the titlebar will be treated as part of
the edit window


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2281 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-17 05:06:55 +00:00
David Lawrence Ramsey
65658ef574 make sure the multibyte string operations operate using multibyte
character counts instead of byte character counts


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2280 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-16 20:05:36 +00:00
David Lawrence Ramsey
18d616f253 put revstrstr() back in utils.c, as it's case sensitive and hance should
work with multibyte strings as-is


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2279 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-16 19:30:48 +00:00
David Lawrence Ramsey
c5e21dafb7 assert fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2278 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-16 18:58:03 +00:00
David Lawrence Ramsey
3a1fc8f0ab start making multibyte equivalents of the string functions in utils.c
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2277 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-16 18:49:19 +00:00
David Lawrence Ramsey
721fe6704a improve the checks needed to determine if wide character support is
available


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2276 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-16 17:48:49 +00:00
David Lawrence Ramsey
63d8f2b42f remove duplicate prototype
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2275 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-16 17:01:51 +00:00
David Lawrence Ramsey
776cf3771d tweak do_next_word() and do_prev_word() to make sure they don't parse
the same multibyte character twice


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2274 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-15 15:05:20 +00:00
David Lawrence Ramsey
ce0451348c make do_prev_word() work with multibyte strings, and update various
comments in do_next_word() and do_prev_word()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2273 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-15 00:34:57 +00:00
David Lawrence Ramsey
31055b3ba8 add missing free()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2272 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 22:08:18 +00:00
David Lawrence Ramsey
7801d7bed9 revert previously added extra calls to move_mbright(); it's more
efficient to just add the return value of parse_char() directly instead
of having move_mbright() return it (except in the cursor movement
functions, which should be kept simple)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2271 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 21:59:01 +00:00
David Lawrence Ramsey
d24fbb760d rename move_left() and move_right() to move_mbleft() and move_mbright(),
and move them to chars.c


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2270 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 21:50:32 +00:00
David Lawrence Ramsey
1fe2eebf74 add multibyte and wide equivalents of isalnum(), make do_next_word()
work with multibyte strings, and tweak the "smart home" routines to use
move_right() for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2269 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 21:33:47 +00:00
David Lawrence Ramsey
52e5f23184 more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2268 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 21:26:38 +00:00
David Lawrence Ramsey
b3aeb13682 add missing changelog update
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2267 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 21:19:06 +00:00
David Lawrence Ramsey
c4c45aa532 make do_statusbar_cut_text() respect the CUT_TO_END flag
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2266 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 21:10:14 +00:00
David Lawrence Ramsey
e3013e3ed0 in src/Makefile.am, if we're installing and the "rnano" symlink already
exists, remove it so that we can create it again without an error


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2265 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 18:47:42 +00:00
David Lawrence Ramsey
f6e4d33afc tweak new_file() to use mallocstrcpy() instead of charalloc() followed
by a null character initialization, for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2264 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 17:17:11 +00:00
David Lawrence Ramsey
1bdccc5281 use the right number of characters when calling the multibyte equivalent
of strnlen()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2263 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 15:27:33 +00:00
David Lawrence Ramsey
9b95ca8c29 minor fixes involving is_byte()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2262 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 06:02:10 +00:00
David Lawrence Ramsey
8eb9c029be fix the previous fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2261 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 04:45:18 +00:00
David Lawrence Ramsey
8f2906ba61 fix the multibyte equivalent of strnlen() so that it actually works
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2260 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 04:38:48 +00:00
David Lawrence Ramsey
5508cc5b0a move nstrnlen() to chars.c, and add a multibyte equivalent of strnlen()
to it


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2259 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 04:22:14 +00:00
David Lawrence Ramsey
49ff08b251 add missing memory corruption fix to do_statusbar_output()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2258 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 04:13:45 +00:00
David Lawrence Ramsey
116c828c50 add asserts, plus a few more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2257 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 03:22:54 +00:00
David Lawrence Ramsey
78dadd4550 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2256 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-13 15:24:05 +00:00
David Lawrence Ramsey
ea9370f231 a few forgotten copyright year updates
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2255 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-12 19:29:44 +00:00
David Lawrence Ramsey
610929c6ed the is_xxx_char() functions should take unsigned ints for consistency
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2254 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-12 18:46:08 +00:00
David Lawrence Ramsey
c1e3d941a5 fix problem where displaying multiline regexes that have their start on
one page of a line and their end on a different page of the same line
would paint past the end of the regex by tweaking DB's changes to add
multibyte string support to edit_add(); now calculate paintlen the same
way the original working code did, but keep accounting for multibyte
characters as DB'S new code did


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2253 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-12 18:23:09 +00:00
David Lawrence Ramsey
487d08cad0 use actual UTF-8 in do_credits()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2252 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-12 18:16:17 +00:00
David Lawrence Ramsey
0c9df578ea add comments
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2251 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-12 16:20:18 +00:00
David Lawrence Ramsey
8a31afdc55 make the "smart home" routines handle multibyte blank characters
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2250 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-12 05:10:53 +00:00
David Lawrence Ramsey
4c6956b433 add minor fixes to make the displaying of invalid multibyte sequences
work again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2249 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-12 04:32:43 +00:00
David Lawrence Ramsey
b54155c4a4 massive updates to multibyte/wide character support; deal with multibyte
characters and strings instead of wide characters and strings as much as
possible, and move multibyte/wide character-specific functions into
their own source file, chars.c


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2248 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-12 03:25:57 +00:00
David Lawrence Ramsey
775d46daf9 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2247 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-11 23:08:36 +00:00
David Lawrence Ramsey
cac0293bce miscellaneous high-level input routine fixes: in do_statusbar_input(),
indicate when we run a normal shortcut's associated function with the
ran_func parameter, reset the statusbar cursor position when we do, and
don't call print_view_warning() when we try to run a function not
allowed in view mode; also apply the first of these changes to
do_input() so that both the edit window and statusbar routines are in
sync again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2246 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-11 23:05:05 +00:00
David Lawrence Ramsey
577298a3f9 remove display_string_len() again for the time being, since it's still
prone to off-by-one errors that lead to memory corruption and I can't
find anything obviously wrong with it; always allocate enough space for
len columns of text now; any extra space that isn't used will be removed
by the null_at() call at the end of display_string() anyway


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2245 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-08 07:21:41 +00:00
David Lawrence Ramsey
f4a799aaec more minor shortcut-related fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2244 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-08 06:16:19 +00:00
David Lawrence Ramsey
35e9713543 remove erroneous #ifdef around a currshortcut reference, do another int
-> bool conversion, and change a value of 0 for func to NULL in all
sc_init_one() calls


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2243 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-08 06:04:19 +00:00
David Lawrence Ramsey
d96851f534 miscellaneous cleanups for the multibyte parsing functions
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2242 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-07 22:39:43 +00:00
David Lawrence Ramsey
12054fe11b add a cosmetic fix and a fix for a potential compilation problem exposed
by -pedantic


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2241 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-07 22:37:01 +00:00
David Lawrence Ramsey
1307aae01a minor utility tweaks
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2240 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-07 19:02:47 +00:00
David Lawrence Ramsey
6d594a9cbb really fix the memory corruption problem in display_string()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2239 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-05 21:43:43 +00:00
David Lawrence Ramsey
9ac20c85b0 remove redundant code
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2238 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-05 20:41:55 +00:00
David Lawrence Ramsey
0251bdb0a5 fix display problem caused by the memory corruption fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2237 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-05 19:05:04 +00:00
David Lawrence Ramsey
8ec1e2d903 when NANO_WIDE is defined, use MB_CUR_MAX only when the NO_UTF8 flag is
not set


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2236 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-05 18:33:04 +00:00
David Lawrence Ramsey
851bea2ccd remove now-unneeded comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2235 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-05 17:04:03 +00:00
David Lawrence Ramsey
bbd63e136d fix potential memory corruption in display_string() when adding UTF-8
characters, found by valgrind (and caused by a bad merge of part of DB's
code)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2234 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-05 16:59:49 +00:00
David Lawrence Ramsey
28e19f8bbc fix potential memory corruption in do_output() when adding UTF-8
characters, found by valgrind


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2233 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-05 15:42:45 +00:00
David Lawrence Ramsey
9dffac90e7 put back two of the hacks of DB's that are actually needed (we need one
since we can't add half a two-column character to converted in
display_string(), and we need the other to keep the "$" from spilling
over to the next line if the line contains two-column characters in the
right places)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2232 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-05 06:09:34 +00:00
David Lawrence Ramsey
930b1d7809 remove DB's hacks to work around problems with ncurses' display of
two-column characters at the beginnings and ends of long lines (i.e,
lines with $'s added), as the problems don't occur with ncurses 5.4, and
there's no easy way to fix the same type of problem with doing a regex
replace of "^" on a line beginning with a two-column character


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2231 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-05 05:22:42 +00:00
David Lawrence Ramsey
913db834d2 add DB's (modified) UTF-8 support tweaks to do_replace_highlight()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2230 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-05 05:08:14 +00:00
David Lawrence Ramsey
b6fbdd00cf tweak the charealloc() in do_output() to more closely match the old
charealloc() in do_char(), to avoid another memory corruption problem


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2229 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-04 04:02:45 +00:00
David Lawrence Ramsey
d90d64f718 set the value of alloc_len properly again, as in DB's patch, in order to
avoid memory corruption problems


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2228 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-04 03:09:55 +00:00
David Lawrence Ramsey
179f0ea742 undo the initialization of index, as the warning was indirectly caused
by a missing snippet of code that also broke color regex display, and
add the aforementioned snippet


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2227 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-04 02:55:45 +00:00
David Lawrence Ramsey
22e5eff432 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2226 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-03 22:56:38 +00:00
David Lawrence Ramsey
4d709f351c make sure index is initialized in order to avoid a warning
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2225 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-03 22:29:42 +00:00
David Lawrence Ramsey
68e3016557 add DB's (modified) UTF-8 support tweaks to edit_add(); they're not
perfect, but they work better than what's currently there


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2224 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-03 22:23:00 +00:00
David Lawrence Ramsey
2524a70a49 fix assert
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2223 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-03 21:34:55 +00:00
David Lawrence Ramsey
f647c48035 update more documentation dealing with double-Escape and verbatim input
of characters in decimal and hexadecimal, including the changelog


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2222 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-03 20:07:26 +00:00
David Lawrence Ramsey
f0a53f02a1 readd get_byte_kbinput(), modify get_word_kbinput() to handle
hexadecimal instead of decimal values, make normal input use
get_byte_kbinput(), make verbatim input use get_word_kbinput(), and
update faq.html to mention these changes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2221 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-03 19:56:56 +00:00
David Lawrence Ramsey
423326fc71 another int -> bool conversion
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2220 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-03 19:14:39 +00:00
David Lawrence Ramsey
956da0d0e1 miscellaneous fixes: skip over invalid wide characters, and if wcwidth()
returns -1, don't add its value to any column counter; also update
another copyright year


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2219 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-03 06:56:38 +00:00
David Lawrence Ramsey
6e1cd06b96 when we get a newline via verbatim input at the statusbar prompt, set
input to NANO_ENTER_KEY so that the cursor position is reset properly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2218 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-02 23:50:29 +00:00
David Lawrence Ramsey
1b1e8b632f add missing NANO_SMALL #ifdef
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2217 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-02 23:35:19 +00:00
David Lawrence Ramsey
d9ad76ba3c properly handle newlines read in via verbatim input at the statusbar
prompt


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2216 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-02 22:35:31 +00:00
David Lawrence Ramsey
11c83d3ed3 implement verbatim input for the statusbar prompt
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2215 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-02 21:26:53 +00:00
David Lawrence Ramsey
b8a2a6d7e5 in do_input() and do_statusbar_input(), func_key is an int* and not an
int; fix bad code due to the latter assumption


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2214 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-02 21:13:36 +00:00
David Lawrence Ramsey
08cd7ef274 fix an assert, update another copyright year, and add a few more of DB's
tweaks to fix a few minor bugs with UTF-8 display at the statusbar
prompt


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2213 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-02 20:30:15 +00:00
David Lawrence Ramsey
4840cb557f get rid of the last remnant of the NO_UTF8 toggle that I erroneously
left in


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2212 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-01 07:55:15 +00:00
David Lawrence Ramsey
295d172f2d implement cutting from the current position to the end of the file,
using Ctrl-X from the search prompt and Meta-T from the edit window;
also update the copyright years of more modified files


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2211 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-01 07:43:32 +00:00
David Lawrence Ramsey
c13b7f0699 overhaul the high-level input routines for the statusbar to make them
more flexible, among other things, and add UTF-8 support to them in the
process; also update the copyright years of the modified files


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2210 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-01 07:28:15 +00:00
David Lawrence Ramsey
3e81914b82 miscellaneous bits: fix the full justify segfault in a way that doesn't
break some normal full justifies, do a few more int -> bool conversions,
and fix a comment


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2209 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-31 04:10:28 +00:00
David Lawrence Ramsey
0d847aadd9 handle wctomb() failure in parse_char() too
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2208 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-29 22:05:02 +00:00
David Lawrence Ramsey
f282428a42 handle wctomb() failures properly in display_stirng_len() and
display_string()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2207 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-29 21:32:22 +00:00
David Lawrence Ramsey
4d97a588e6 cosmetic totsize-related cleanups
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2206 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-29 16:42:48 +00:00
David Lawrence Ramsey
c8ade44741 set totsize properly when deleting a character or backspacing over it
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2205 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-28 22:36:13 +00:00
David Lawrence Ramsey
a9b9913c6b properly increment start_col when the line begins with a character that
takes up two columns


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2204 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-27 23:35:25 +00:00
David Lawrence Ramsey
c195820456 clarify the warning message when sufficient wide character support isn't
found, and merge missing part of DB's patch to handle tabs properly in
display_string()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2203 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-27 23:21:34 +00:00
David Lawrence Ramsey
6a643cd596 fix the NANO_WIDE #ifdefs again, and put display_string_len() back in
now that it doesn't corrupt memory anymore (as far as I can tell)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2202 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-27 23:11:59 +00:00
David Lawrence Ramsey
a35bdd1f03 add a few missing NANO_WIDE #ifdefs, and remove display_string_len()
until I can fix it to no longer cause memory corruption


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2201 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-27 18:53:38 +00:00
David Lawrence Ramsey
4fd76bab73 configure.ac and related cleanups
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2200 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-24 18:11:53 +00:00
David Lawrence Ramsey
fe3627ddfd fix display problem caused by backwards comparisons of column and
start_col


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2199 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-24 17:52:17 +00:00
David Lawrence Ramsey
61a71403f4 revert last change, as it's actually redundant, and fix a few comments
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2198 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-24 15:45:36 +00:00
David Lawrence Ramsey
7ddca3a9a6 fix if block
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2197 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-24 15:23:10 +00:00
David Lawrence Ramsey
1903ace275 fix statusbar() and onekey() to properly handle multibyte strings too
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2196 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-24 00:43:41 +00:00
David Lawrence Ramsey
93c4a5656b #ifdef fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2195 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-23 21:32:27 +00:00
David Lawrence Ramsey
9ec76e5573 remove command line and rcfile option for --noutf8, as UTF-8 support is
now autodetected, and add #ifdefs around two variables that are unused
when NANO_WIDE isn't defined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2194 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-23 19:55:57 +00:00
David Lawrence Ramsey
fc693210d5 more steps toward UTF-8 support: port all the parts of DB's UTF-8 patch
that I currently understand to current CVS, with modifications of mine
to autodetect UTF-8 support and to display multibyte strings instead of
wide strings


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2193 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-23 17:43:27 +00:00
David Lawrence Ramsey
c0b9d19ed7 yet another cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2192 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-22 21:38:43 +00:00
David Lawrence Ramsey
415b5d91cf fix misplaced #ifdef
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2191 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-21 16:39:45 +00:00
David Lawrence Ramsey
3ba9c3512c check for wget_wch() instead of addwstr() when looking for a wide
version of curses


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2190 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-20 15:39:12 +00:00
David Lawrence Ramsey
f3bea022d6 revert erroneous change
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2189 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-20 01:18:49 +00:00
David Lawrence Ramsey
6a2f068c7f still more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2188 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-20 01:13:55 +00:00
David Lawrence Ramsey
e750fe68cf another cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2187 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-18 22:43:23 +00:00
David Lawrence Ramsey
4564170c61 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2186 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-18 20:29:42 +00:00
Jordi Mallach
6eea1473b4 Updated Italian translation.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2185 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-15 19:42:07 +00:00
Jordi Mallach
fbba5bf249 Updated Swedish translation.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2184 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-15 09:06:30 +00:00
Jordi Mallach
6a2f58e2ef Updated Swedish translation by Christian Rose.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2183 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-13 17:29:42 +00:00
David Lawrence Ramsey
78ea5e4a8a improvements to wide/multibyte character input and output, using wide
curses functions where applicable


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2182 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-12 19:04:56 +00:00
David Lawrence Ramsey
164bf36ea8 add missing reset
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2181 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-09 17:00:15 +00:00
David Lawrence Ramsey
c2ac02ff46 add missing casts
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2180 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-09 03:05:45 +00:00
David Lawrence Ramsey
abc9423709 check for nulls and newlines earlier in do_output(), and add a few more
cosmetic fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2179 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-08 23:24:31 +00:00
David Lawrence Ramsey
60448895f6 reset the mbtowc() and wctomb() state machines at the right places
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2178 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-08 16:52:52 +00:00
David Lawrence Ramsey
263240c7c7 when adding to the keystroke buffer, filter out bad keystrokes with one
pass instead of two


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2177 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-08 15:47:38 +00:00
David Lawrence Ramsey
32085a88e8 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2176 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-08 04:00:26 +00:00
David Lawrence Ramsey
eae97caa83 go back to storing multibyte characters in non-dynamically allocated
arrays of MB_LEN_MAX length, as it's less complex


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2175 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-07 22:24:03 +00:00
David Lawrence Ramsey
43953bba6f store multibyte characters in dynamically allocated arrays of MB_CUR_MAX
length, and add a few comment fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2174 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-07 21:23:39 +00:00
David Lawrence Ramsey
91851f3e60 rename a few variables for consistency
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2173 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-07 21:22:48 +00:00
David Lawrence Ramsey
bed32a370b comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2172 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-07 18:05:38 +00:00
David Lawrence Ramsey
f812e4f7d9 rearrange a few variables
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2171 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-07 17:35:14 +00:00
David Lawrence Ramsey
10820de467 fix bad cast
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2168 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-07 05:02:21 +00:00
Jordi Mallach
98b61e3702 Italian and Romanian update.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2167 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-06 23:44:55 +00:00
David Lawrence Ramsey
95a0224820 miscellaneous fixes for the buffered inout and output routines and their
associated UTF-8 handling: have unget_input() filter out invalid wide
characters, put back the result of a word sequence instead of returning
it directly, don't erroneously filter out keystrokes if they're neither
extended keypad values nor ASCII characters, and add a few comment
tweaks


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2166 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-06 04:14:42 +00:00
David Lawrence Ramsey
eb711b034b formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2165 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-05 22:24:39 +00:00
David Lawrence Ramsey
bfcba16761 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2164 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-05 06:11:01 +00:00
David Lawrence Ramsey
2c70a4e608 document the last titlebar() change
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2163 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-05 06:03:46 +00:00
David Lawrence Ramsey
bce3aad885 in titlebar(), space should be an int instead of a size_t
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2162 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-05 06:02:39 +00:00
David Lawrence Ramsey
f326ed7910 add some miscellaneous fixes for titlebar()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2161 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-05 05:42:46 +00:00
David Lawrence Ramsey
846658eb6b when we get the whitespace display toggle, update the titlebar as well
as the edit window, in case the filename displayed on the titlebar
contains spaces or tabs; also add a few miscellaneous cosmetic fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2160 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-05 04:18:26 +00:00
David Lawrence Ramsey
c41285fb0b fix entry
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2159 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-04 21:09:35 +00:00
David Lawrence Ramsey
9c3edc026b add return to the "c-file" regexes in nanorc.sample
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2158 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-04 18:14:12 +00:00
David Lawrence Ramsey
7483571f7f massive overhaul to support buffered input and output, the first steps
toward proper wide character input and output, etc.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2157 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-04 17:41:52 +00:00
David Lawrence Ramsey
68ebb61fb1 fix potential segfault when doing a full justify
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2156 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-04 17:36:14 +00:00
David Lawrence Ramsey
fc54d6e431 per Jeremy Huddleston's patch, fix compilation problem caused by
break_line()'s returning int when it should return ssize_t according to
its prototype


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2155 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-02 17:37:09 +00:00
Jordi Mallach
c0e42bd3c5 Update Catalan, French and Norwegian from the TP.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2154 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-01 16:31:29 +00:00
David Lawrence Ramsey
3ece0b9aeb change references to "open files" to "open file buffers" for
consistency, and add DB's changes to die() so that it works properly
with the overhauled multibuffer routines


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2153 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-01 15:11:27 +00:00
David Lawrence Ramsey
1483ee3db1 remove malfunctioning wide character support, and add a few
miscellaneous fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2152 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-29 00:30:07 +00:00
David Lawrence Ramsey
63e73cbd14 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2151 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-28 04:52:57 +00:00
David Lawrence Ramsey
53d3db4ba6 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2150 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-28 03:53:01 +00:00
David Lawrence Ramsey
832db768a4 typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2149 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-27 23:28:39 +00:00
David Lawrence Ramsey
6ecbdd30b1 remove specific references to control key shortcuts in configure.ac
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2148 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-27 21:39:01 +00:00
David Lawrence Ramsey
40a6c8cb64 more formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2147 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-27 21:10:11 +00:00
David Lawrence Ramsey
800ee0d3f9 remove another unneeded blank space
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2146 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-27 20:42:46 +00:00
David Lawrence Ramsey
7a6fb48cf5 remove unneeded blank spaces
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2145 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-27 20:39:26 +00:00
David Lawrence Ramsey
62a217d35d formatting and cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2144 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-27 16:54:00 +00:00
David Lawrence Ramsey
c109549a7e in unget_kbinput(), free s after the wctomb() call, since we don't need
it after that


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2143 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-27 15:18:34 +00:00
David Lawrence Ramsey
15dbc6ef07 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2142 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-27 15:07:07 +00:00
David Lawrence Ramsey
c82997d460 in get_verbatim_kbinput(), don't pass v_kbinput in as a parameter, since
we're dynamically allocating it and then returning it


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2141 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-27 15:00:18 +00:00
David Lawrence Ramsey
08eab72517 add debug messages to get_shortcut() and get_toggle()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2140 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-27 06:43:06 +00:00
David Lawrence Ramsey
e08765dca5 formatting and cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2139 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-26 20:17:49 +00:00
David Lawrence Ramsey
ca018c3e23 in get_full_path(), remove unneeded NANO_SMALL #ifdef, so that it's
included whenever its prototype is, and so it can compile when
DISABLE_OPERATINGDIR isn't defined and NANO_SMALL is


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2138 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-26 20:14:19 +00:00
David Lawrence Ramsey
2dbcc801bf formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2137 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-26 18:10:07 +00:00
David Lawrence Ramsey
698263ca5c in the low-level input routines, make the ascii_digits variables ints
instead of size_t's, since they will only hold very small values


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2136 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-25 05:05:41 +00:00
David Lawrence Ramsey
12642edfc9 formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2135 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-25 04:56:50 +00:00
David Lawrence Ramsey
5b3dd0f423 add DB's overhaul of the multibuffer code for efficiency, plus a few
tweaks and additions of mine


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2134 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-25 04:39:07 +00:00
David Lawrence Ramsey
329d6a3259 formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2133 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-24 23:46:04 +00:00
David Lawrence Ramsey
8a2c0ba4b6 formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2132 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-24 20:36:36 +00:00
David Lawrence Ramsey
eeec999548 oops again; adding an extra magicline unconditionally when uncutting is
inconsistent with how file insertion behaves, so it apparently is a bug;
revert the previous behavior


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2131 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-24 20:12:57 +00:00
David Lawrence Ramsey
cc89513f14 oops; Pico's adding a new magicline unconditionally when uncutting
leaves the cursor on the current magicline is actually consistent (and
hence not a bug), so duplicate that behavior again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2130 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-23 23:42:12 +00:00
David Lawrence Ramsey
6e738ac712 formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2129 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-23 22:30:32 +00:00
David Lawrence Ramsey
d994ad5284 in get_edit_input(), readd parameter allow_funcs, as it's now needed as
a workaround for when unjustified text is stored in the justify buffer
and either the justify or the full justify shortcut is hit


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2128 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-23 21:40:26 +00:00
David Lawrence Ramsey
304129315c in shortcut_init(), fix misplaced #endif keeping the "Full Justify"
shortcut in the search shortcut list from being included when NANO_SMALL
is defined but DISABLE_JUSTIFY isn't


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2127 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-23 20:42:35 +00:00
David Lawrence Ramsey
4d6ec37676 in do_cut_text(), if keep_cutbuffer is FALSE, only blow away the text in
the cutbuffer if the cutbuffer isn't empty


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2126 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-23 17:59:32 +00:00
David Lawrence Ramsey
bc3b92605e comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2125 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-23 04:17:19 +00:00
David Lawrence Ramsey
93c8405bfa overhaul the cutting and uncutting routines and the justify-related
routines to back up and restore unjustified text to use the partitioning
code, as it greatly simplifies how they work; also back up and restore
unjustified text in its own buffer instead of the cutbuffer, and add a
few minor bug fixes to the overhauled routines


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2124 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-23 04:08:28 +00:00
David Lawrence Ramsey
b5a7a5a2d6 in do_wrap(), make wrap_loc and word_back ssize_t's, to match fill, and
add a few minor cosmetic fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2123 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-23 03:42:43 +00:00
David Lawrence Ramsey
962202e4fa Back to CVS
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2122 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-22 17:58:06 +00:00
David Lawrence Ramsey
2c86dc6dc9 GNU nano 1.3.5
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2120 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-22 17:55:17 +00:00
David Lawrence Ramsey
3de81bc33d in do_replace_loop(), treat real_current as current and real_current_x
as current_x instead of using copies of them (which aren't kept up to
date) when calling findnextstr(); this fixes a problem where the search
can wrap when it shouldn't and skip over all matches after the wrap
point


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2119 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-22 17:08:41 +00:00
David Lawrence Ramsey
3f35864b10 fix get_totals() so it properly handles NULL parameters, and restore
totlines after marked spell-check the way the justify routine does
instead of saving it and readding it later


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2118 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-22 16:04:18 +00:00
David Lawrence Ramsey
74d87073f0 unpartition_filestruct() should take a partition** instead of a
partition*, so that the partition it refers to is properly set to NULL


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2117 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-22 00:16:23 +00:00
David Lawrence Ramsey
e56d936bd4 documentation fix: list sh as an example of a Bourne shell
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2116 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-21 18:51:30 +00:00
David Lawrence Ramsey
831c640e62 in README.CVS, mention the need for ssh to do cvs checkouts
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2115 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-21 18:44:23 +00:00
David Lawrence Ramsey
b908a36d60 add another cvs command fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2114 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-21 17:50:23 +00:00
David Lawrence Ramsey
b75763e07e update the given cvs commands in README.CVS so that they work again
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2113 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-21 17:45:25 +00:00
David Lawrence Ramsey
188f169e1d in README.CVS, mention the requirement for groff in order to create html
versions of the manpages


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2112 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-20 16:16:47 +00:00
Jordi Mallach
c0d3b20bdc Get rid of config.rpath.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2111 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-20 00:39:02 +00:00
Jordi Mallach
42ca620e11 Updated French translation.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2110 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-18 22:25:16 +00:00
Jordi Mallach
69a90c6b3b Updated Malay translation.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2109 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-18 22:13:47 +00:00
Jordi Mallach
d7b632560c Don't use DEFS to define stuff. Use INCLUDES instead.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2108 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-18 00:05:14 +00:00
Jordi Mallach
55381aa614 Include <config.h> only if HAVE_CONFIG_H.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2107 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-17 23:17:05 +00:00
David Lawrence Ramsey
f6159047bc use top_x and bot_x where possible instead of recalculating entire
string lengths


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2106 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-17 20:47:14 +00:00
David Lawrence Ramsey
4db3d0adf7 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2105 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-17 17:44:29 +00:00
David Lawrence Ramsey
6b769e5f5b formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2104 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-17 16:59:34 +00:00
David Lawrence Ramsey
0317c86a8a fix breakage of ASCII character sequence mode introduced with the UTF-8
sequence support


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2103 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-16 22:51:07 +00:00
David Lawrence Ramsey
a98fd75b32 spell Ulf Härnhammar's name right
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2102 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-16 13:09:43 +00:00
David Lawrence Ramsey
8091d334a3 add Ulf Harnhammar's input_tab() segfault fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2101 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-16 02:23:10 +00:00
David Lawrence Ramsey
9df069cc5f comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2100 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-16 02:20:48 +00:00
David Lawrence Ramsey
97b9046239 document the last fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2099 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-15 23:10:56 +00:00
David Lawrence Ramsey
036a3d4646 fix cursor placement problem when inserting into the current buffer at
the bottom of the edit window with smooth scrolling on


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2098 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-15 21:49:21 +00:00
David Lawrence Ramsey
4a3879f1ed fix cursor placement problem when inserting into the current buffer at
the top of the edit window


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2097 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-15 20:42:31 +00:00
David Lawrence Ramsey
56cf034a12 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2096 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-15 18:44:30 +00:00
David Lawrence Ramsey
649b431171 in cut_marked_segment(), respect concatenate_cut, as we need to use it
if we do a marked cut and immediately follow it with a cut-to-end (which
uses that function)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2095 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-13 01:32:17 +00:00
David Lawrence Ramsey
bfb98f8bd4 in do_cut_text(), set concatenate_cut to TRUE unconditionally when doing
a marked cut; this fixes an incompatibility with Pico where an extra
line is uncut if we do a marked cut that includes the magicline and
immediately follow it with an unmarked cut


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2094 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-12 21:46:14 +00:00
David Lawrence Ramsey
8001e27e67 yet more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2093 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-12 00:48:18 +00:00
David Lawrence Ramsey
907725fde8 revert the handle_sigwinch() change, as other breakage occurs when
resizing or continuing from a suspend after a justify and it can't be
properly fixed without a rewrite


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2092 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-12 00:09:20 +00:00
David Lawrence Ramsey
8781fc62cb fix entry
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2091 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-11 22:02:48 +00:00
David Lawrence Ramsey
1f1ebb85b7 in handle_sigwinch(), call shortcut_init(FALSE) defore redisplaying the
main list, so that "UnJustify" isn't erroneously displayed when we
justify, suspend, and then continue; also add a few last cosmetic fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2090 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-11 21:50:01 +00:00
David Lawrence Ramsey
e3016d90aa in m4/Makefile.am, add glib-2.0.m4 to EXTRA_DIST, so that nano builds
from CVS with automake 1.7.x again; for some reason, automake 1.9.x
didn't have a problem with its (erroneously) being left out; also add
some formatting fixes to other Makefile.am's dealing with too many or
too few blank lines


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2089 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-11 14:35:31 +00:00
David Lawrence Ramsey
6299b0d752 improve another assertion
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2088 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-08 03:22:23 +00:00
David Lawrence Ramsey
2c31540fa9 improve assertion
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2087 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-08 03:19:10 +00:00
David Lawrence Ramsey
fd9da07e6c fix enum/#define conflict
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2086 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-07 23:05:48 +00:00
David Lawrence Ramsey
fdd3becc1e allow blank buffers at the "Execute Command" prompt, and document it in
the help text


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2085 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-07 21:30:55 +00:00
David Lawrence Ramsey
c136f75f62 don't create a new buffer if we're in multibuffer mode and command
execution mode


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2084 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-07 18:35:53 +00:00
David Lawrence Ramsey
a084ad94f7 in multibuffer mode, using a blank filename at the "Read File" prompt
shouldn't cancel out of it


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2083 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-07 18:22:33 +00:00
David Lawrence Ramsey
c15802f8c3 partition the filestruct properly when executing a command
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2082 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-07 18:09:41 +00:00
David Lawrence Ramsey
7105cf4f8e formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2081 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-07 16:13:19 +00:00
David Lawrence Ramsey
02085d7b92 in the search prompt shortcut list, move "Full Justify" to after
"History", so that the latter is visible onscreen again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2080 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-07 16:04:18 +00:00
David Lawrence Ramsey
50af6ea21e in proto.h, add missing NANO_SMALL #ifdef around the
cut_marked_segment() prototype


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2079 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-07 15:29:40 +00:00
David Lawrence Ramsey
8ae06a86b8 comment update
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2078 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-07 01:26:39 +00:00
David Lawrence Ramsey
29f446ec40 don't let remove_magicline() remove the magicline if it's the only line
in the file


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2077 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-07 01:22:20 +00:00
David Lawrence Ramsey
eb5d8383c8 preemptively update the version number in the documentation
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2076 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-06 21:26:09 +00:00
David Lawrence Ramsey
00cca05ebb in do_uncut_text(), maintain current_y's value when uncutting blocks so
that smooth scrolling works correctly; also add a few miscellaneous
cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2075 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-06 20:33:43 +00:00
David Lawrence Ramsey
8c16bacbbf more int -> bool conversions
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2074 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-06 15:10:57 +00:00
David Lawrence Ramsey
bde3e0e294 in both the internal and alternate spell checker, put the beginning and
the end of the mark at the beginning and the end of the spell-checked
text


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2073 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-06 02:37:25 +00:00
David Lawrence Ramsey
cb09337993 rearrange a few if blocks for consistency
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2072 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-06 00:18:27 +00:00
David Lawrence Ramsey
46c604a14e oops; only work around the problem of the mark's being in the middle of
a spell checked word if the mark was on in the first place


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2071 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-05 23:55:58 +00:00
David Lawrence Ramsey
90e59c1a18 when doing marked spell-check, properly handle the case where the mark
ends in the middle of a word and that word is spell-checked; also move
the logic to detect an upside-down mark to mark_order() instead of using
the same logic in three different places, and rename a few variables for
consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2070 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-05 23:03:03 +00:00
David Lawrence Ramsey
93eb293fbb more faq updates: add questions about selecting text in an X terminal
when mouse support is turned on and typing F13-F16 when the keyboard
only has F1-F12, plus a few other miscellaneous bits


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2069 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-05 18:01:33 +00:00
David Lawrence Ramsey
d5402232ac document the last update
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2068 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-05 17:29:43 +00:00
David Lawrence Ramsey
0432e70850 fixed FAQ inaccuracy: Pico compatibility mode was made the default in
nano 1.1.99pre1, not 1.2.2


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2067 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-05 17:09:11 +00:00
David Lawrence Ramsey
78d644a635 don't change the file format when we insert another file into the
current one


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2066 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-05 16:24:35 +00:00
David Lawrence Ramsey
1c293d2e28 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2065 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-05 16:22:27 +00:00
David Lawrence Ramsey
31f99361b6 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2064 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-05 16:01:04 +00:00
David Lawrence Ramsey
3d67c11473 fix entry: "... opened the file, added all of it to the cutbuffer,
closed the file, and uncut at the current cursor position" is clearer


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2063 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-05 15:39:36 +00:00
David Lawrence Ramsey
b73c0c0b09 if we're not inserting a file into a new buffer, partition the current
buffer so that it's effectively a new buffer just before inserting the
file, and only restore placewewant afterwards; this is the same behavior
we would get if we opened the file, added all of it to the cutbuffer,
uncut at the current cursor position, and closed the file


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2062 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-05 15:25:53 +00:00
David Lawrence Ramsey
1539837fe0 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2061 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-05 15:03:12 +00:00
David Lawrence Ramsey
dcc201b5b2 clean up the partitioning-related if blocks
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2060 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-05 14:37:18 +00:00
David Lawrence Ramsey
f643fc2149 remove a bit of redundant code, and add a few more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2059 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-04 17:42:41 +00:00
David Lawrence Ramsey
f978f040bd when (un)partitioning, don't save or restore fileage or filebot if
they're the same as top or bot; also add a few comment fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2058 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-04 16:45:48 +00:00
David Lawrence Ramsey
8cbd4cb67f avoid potential segfaults while unpartitioning a filestruct
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2057 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-04 15:31:43 +00:00
David Lawrence Ramsey
07e2589f80 in cut.c, make marked_line a static enum instead of a static int, and
add a few formatting cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2056 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-04 13:47:28 +00:00
David Lawrence Ramsey
be246c008b fix entry
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2055 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-04 13:40:58 +00:00
David Lawrence Ramsey
3e0c8a614d remove the DOS_FILE and MAC_FILE flags, as they're only used in files.c,
and replace them with a static file_format enum; change the
openfilestruct structure accordingly in order to handle this; also add a
few miscellaneous cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2054 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-04 04:08:18 +00:00
David Lawrence Ramsey
84d0d59cbb remove most redundant includes of sys/stat.h; it's included in nano.h,
so it doesn't need to be included in files that include nano.h


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2053 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-04 03:53:11 +00:00
David Lawrence Ramsey
164c79883b remove unneeded space
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2052 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-04 03:27:48 +00:00
David Lawrence Ramsey
e1ee22fba2 in search_init(), when we're replacing and the mark is on, display a
prompt indicating that we're replacing text only in the selection
instead of the usual prompt


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2051 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-03 23:05:11 +00:00
David Lawrence Ramsey
40bdb686aa add code to partition a filestruct between a set of arbitrary
coordinates; given the coordinates of the beginning and end of the mark,
this allows proper and easier handling of saving marked selections,
replacing text only in marked selections, and spell-checking marked
selections using either the internal or alternate spell checker; do all
these using a global partition structure


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2050 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-03 22:03:41 +00:00
David Lawrence Ramsey
29f03dcff9 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2049 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-03 21:11:38 +00:00
David Lawrence Ramsey
182b2c936f in do_replace_loop(), make real_current_x a const filestruct* again
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2048 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-03 16:02:41 +00:00
David Lawrence Ramsey
6d9aa085d1 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2047 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-03 14:58:04 +00:00
David Lawrence Ramsey
99869f54b5 fix crash in mallocstrncpy() call
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2046 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-02 20:48:37 +00:00
David Lawrence Ramsey
4a1fc558cf add new function mallocstrncpy()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2045 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-02 15:18:30 +00:00
David Lawrence Ramsey
1e1f572c51 in get_kbinput(), make sure meta_key and func_key are set properly in
all cases


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2044 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-02 02:48:02 +00:00
David Lawrence Ramsey
4b4b608806 leave "Mark Text" and "Where Is Next" out entirely when NANO_SMALL is
defined; since they aren't in the visible main list, there's no point in
having them in but disabled; also add a few formatting fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2043 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-01 22:54:40 +00:00
David Lawrence Ramsey
8381fdd83a add new key aliases: F15 for "Mark Text" and F16 for "Where Is Next";
also add support for their corresponding escape sequences


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2042 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-01 22:40:02 +00:00
David Lawrence Ramsey
d402e71a2f document the help browser display fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2041 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-01 22:37:36 +00:00
David Lawrence Ramsey
2e83a50e95 properly handle the case of a function key with no preceding control key
in the help browser


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2040 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-01 22:35:26 +00:00
David Lawrence Ramsey
3d002ed602 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2039 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-31 22:45:24 +00:00
David Lawrence Ramsey
add65085d6 add missing attribution
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2038 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-31 14:40:40 +00:00
David Lawrence Ramsey
e5e88fd9f2 fix problem found by Rocco: make search_last_line static to search.c
instead of local to findnextstr() so that search wrapping detection
works properly again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2037 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-31 13:20:30 +00:00
David Lawrence Ramsey
85f8f46c40 remove erroneous entry
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2036 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-31 13:13:19 +00:00
David Lawrence Ramsey
687776b1a8 make mark_beginx a size_t instead of an int
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2035 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-30 01:16:08 +00:00
David Lawrence Ramsey
7a97e18667 make current_x a size_t instead of an int
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2034 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-30 01:03:15 +00:00
David Lawrence Ramsey
59f5e04fa8 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2033 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-29 15:48:40 +00:00
David Lawrence Ramsey
ace1037faf cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2032 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-29 15:42:02 +00:00
David Lawrence Ramsey
77b284af68 revert the marked replace code; it's hackish, and there appears to be no
easy way to make it work with the internal spell checker as is; it
should eventually be reimplemented to work at the findnextstr() level


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2031 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-27 02:21:01 +00:00
David Lawrence Ramsey
233f336112 add missing blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2030 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-27 02:15:44 +00:00
David Lawrence Ramsey
d4ca9f2acb cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2029 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-26 21:14:56 +00:00
David Lawrence Ramsey
9bf486fe5d in do_replace_loop(), add new parameter canceled, set to TRUE if we
canceled at the prompt and FALSE otherwise; use it to make sure that
canceling works properly in all cases when using the internal spell
checker


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2028 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-26 20:58:30 +00:00
David Lawrence Ramsey
410efe9a47 add Rocco Corsi's patch to fix a problem in do_int_spell_fix() where if
the cursor is in the middle of a file, the spell checker will sometimes
only correct the misspelled word instances that appear before the cursor
position and then stop


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2027 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-26 16:54:19 +00:00
David Lawrence Ramsey
1758640682 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2026 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-26 16:29:21 +00:00
David Lawrence Ramsey
0ff01a92bc put DB's old efficiency tweaks back in bottombars()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2025 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-25 15:00:38 +00:00
David Lawrence Ramsey
cc823ab6d6 cosmetic fix: "Hurd console" -> "Mach console"
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2024 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-24 22:51:39 +00:00
David Lawrence Ramsey
cfa4a9c4fe remove the global DOS/Mac format toggles, for consistency with other
file operations like Append/Prepend that are specific to the "Write
File" prompt, and change the Mac format toggle to Meta-M, since that no
longer conflicts with the mouse support toggle; update the documentation
accordingly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2023 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-24 17:20:31 +00:00
David Lawrence Ramsey
e93e03e1dc in nano.1 and nano.texi, eliminate references to the now removed
-D/--dos and -M/--mac command line options


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2022 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-24 16:47:54 +00:00
David Lawrence Ramsey
c151b475e7 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2021 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-24 16:45:40 +00:00
David Lawrence Ramsey
da952f8ded consistency fix for the ^^ help entry
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2020 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-24 16:18:17 +00:00
David Lawrence Ramsey
2690bafa15 add missing parentheses
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2019 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-23 14:59:32 +00:00
David Lawrence Ramsey
e7c4168ee1 consistency fix for the ^I help entry
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2018 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-23 14:53:07 +00:00
David Lawrence Ramsey
9abd1d18e4 simplify the key-interpreting logic in get_shortcut()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2017 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-23 13:50:57 +00:00
David Lawrence Ramsey
7975408f66 fix wrong word
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2016 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-23 02:48:13 +00:00
David Lawrence Ramsey
c59979f067 add UTF-8 support to unget_kbinput(), and fix a minor memory leak in the
UTF-8 support code in get_kbinput()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2015 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-23 02:47:39 +00:00
David Lawrence Ramsey
bf1346f342 in main(), tweak the command line parsing routine so that multiple +LINE
flags are properly interpreted in multibuffer mode


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2014 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-22 20:25:56 +00:00
David Lawrence Ramsey
6a715b69a7 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2013 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-22 16:11:55 +00:00
David Lawrence Ramsey
ca92becf9d apply patch from DB: in write_file(), if we've tried to write to an
unwritable file and we're not prepending, tempname is NULL when it's
passed to unlink(); this can cause problems if unlink() can't handle
NULL, so don't call it in that case


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2012 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-22 03:33:54 +00:00
David Lawrence Ramsey
2c4e34cfce another indentation fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2011 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-22 03:30:39 +00:00
David Lawrence Ramsey
d9fb3e6bde remove more unneeded casts, and add an indentation fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2010 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-21 22:49:51 +00:00
David Lawrence Ramsey
1601c28976 remove unnecessary casts
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2009 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-21 22:06:40 +00:00
David Lawrence Ramsey
fe65657f6f in nanorc.sample, change the included speller value to "aspell -x -c";
the -x option makes aspell not create backup files, and this is
consistent with the internal spell checker's behavior


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2008 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-21 17:11:40 +00:00
David Lawrence Ramsey
484352241e in do_replace_loop(), check for more than one wrap at the right place
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2007 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-21 16:51:45 +00:00
David Lawrence Ramsey
2eb745939e when saving or changing file positions, be sure not to ignore
placewewant; also move a misplaced changelog entry


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2006 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-21 16:25:44 +00:00
David Lawrence Ramsey
3288925efb do the check for being outside the mark after the zero-length regexes
check, so that zero-length regex replaces work properly again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2005 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-21 15:44:36 +00:00
David Lawrence Ramsey
9819ed031b fix infinite loop when we're doing a replace of marked text and the only
matches found are outside the marked text


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2004 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-21 15:32:11 +00:00
David Lawrence Ramsey
27fbc69ec4 yet more search code cleanups
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2003 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-19 21:09:37 +00:00
David Lawrence Ramsey
53752e8f9a fix findnextstr() so wholewords works properly with regular expressions
and in conjunction with no_sameline, and add a few other minor cosmetic
fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2002 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-18 22:19:22 +00:00
David Lawrence Ramsey
b802e70208 add glib-2.0.m4 from glib 2.4.7 to the m4 directory; this is needed to
detect glib 2.x on systems that may not have it installed


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2001 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-18 19:28:10 +00:00
David Lawrence Ramsey
db85ac7564 rely on glib 2.x only if the system doesn't have v?snprintf(), and
update README.CVS accordingly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2000 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-18 14:13:28 +00:00
David Lawrence Ramsey
cbc13a2a62 add missing line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1999 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-18 02:17:18 +00:00
David Lawrence Ramsey
c6899cb734 document the last miscellaneous fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1998 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-18 02:11:46 +00:00
David Lawrence Ramsey
2cc2a57dea rearrange the mark-handling code in do_replace_loop() a bit, and add one
more miscellaneous fix


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1997 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-18 02:06:53 +00:00
David Lawrence Ramsey
381d483986 help text updates, and a few more miscellaneous fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1996 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-18 01:51:43 +00:00
David Lawrence Ramsey
6be5339265 more minor cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1995 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-16 15:41:57 +00:00
David Lawrence Ramsey
439fbe3e93 in do_alt_speller(), call terminal_init() unconditionally after running
the alternate spell checker, so that the terminal state is properly
restored in all cases


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1994 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-16 04:56:34 +00:00
David Lawrence Ramsey
9cf7b28248 another minor cleanup
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1993 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-15 16:35:34 +00:00
David Lawrence Ramsey
4b7e3c3efa minor cleanups
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1992 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-15 16:25:56 +00:00
David Lawrence Ramsey
fc965a4869 make the UTF-8 character reading support work in more instances
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1991 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-15 01:51:36 +00:00
David Lawrence Ramsey
1f204c0204 fix spurious warning message in do_gotoline() that was introduced when
it was overhauled, and also fix some indentation in statusq()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1990 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-15 01:39:46 +00:00
David Lawrence Ramsey
4e8e495301 add support for reading in UTF-8 sequences to some of the low-level
input functions


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1989 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-14 21:59:45 +00:00
David Lawrence Ramsey
a870ca2d72 simplify the curses library tests in configure.ac by checking for
initscr() instead of tgetent() where possible


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1988 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-14 21:59:00 +00:00
David Lawrence Ramsey
5780b24759 make get_escape_seq_kbinput()'s escape_seq parameter a const int*, since
it's never modified


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1987 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-14 20:48:38 +00:00
David Lawrence Ramsey
e53181d423 remove resetstatuspos prototype left over from when it was global
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1986 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-14 20:36:47 +00:00
David Lawrence Ramsey
646bf9111c add missing word
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1985 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-11 14:00:46 +00:00
David Lawrence Ramsey
49d5c1bf1c minor fixes involving case insensitive searches and NANO_SMALL
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1984 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-11 13:55:33 +00:00
David Lawrence Ramsey
731e7f28e7 oops, Pico doesn't preserve placewewant when inserting a file; we do it
for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1983 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-09 20:16:17 +00:00
David Lawrence Ramsey
1929982ec3 in do_insertfile(), when inserting a file in non-multibuffer mode,
preserve placewewant as well as current_x, for compatibility with Pico


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1982 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-09 20:12:04 +00:00
David Lawrence Ramsey
b6377c9d14 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1981 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-09 20:10:55 +00:00
David Lawrence Ramsey
b112fe627d fix backwards #ifdefs
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1980 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-09 17:15:46 +00:00
David Lawrence Ramsey
d93ee682c0 in do_int_spell_fix(), move the REVERSE_SEARCH flag toggling into the
NANO_SMALL #ifdef, since the tiny version of nano doesn't support
reverse searching; also, turn the USE_REGEXP flag off during spell
checking in order to avoid a potential segfault


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1979 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-09 16:59:43 +00:00
David Lawrence Ramsey
3497666a21 in do_replace_loop(), if the mark is on when we start, skip over all
matches not found inside the marked text; this makes marked spell
checking when using the internal spell checker work as expected, and
also allows replacing only marked text when the mark is on


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1978 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-09 16:26:32 +00:00
David Lawrence Ramsey
491cad3e5d miscellaneous cleanups in do_replace_loop(): set current to real_current
and current_x to current_x_save, only turn the mark off and call
edit_refresh() if the mark was originally on, and make length_change a
ssize_t


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1977 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-08 23:06:01 +00:00
David Lawrence Ramsey
f3b10e8e05 another comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1976 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-08 20:37:44 +00:00
David Lawrence Ramsey
6b1c2adc86 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1975 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-08 20:34:53 +00:00
David Lawrence Ramsey
7cfea8bb8c in mark_order(), add check for MARK_ISSET's not being set; also make one
more int -> bool conversion and cosmetic fix


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1974 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-08 15:35:33 +00:00
David Lawrence Ramsey
28caf14863 remove the -D/--dos and -M/--mac command line options, as they aren't
much use with the new file format autodetection


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1973 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-07 20:54:52 +00:00
Jordi Mallach
211dc82738 Update Basque translation by Mikel Olasagasti.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1972 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-07 17:36:56 +00:00
David Lawrence Ramsey
b6d97c15ac remove DOS line endings, and fix a typo in a comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1971 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-06 21:11:21 +00:00
David Lawrence Ramsey
487149e713 in do_insertfile(), add missing #ifdefs around the wrap_reset() call so
that nano compiles with wrapping disabled again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1970 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-05 20:24:48 +00:00
David Lawrence Ramsey
045883aa34 really fix the resetstatus problems this time, and add a few other
miscellaneous fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1969 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-05 20:11:31 +00:00
David Lawrence Ramsey
056c5ef4a6 another int -> bool conversion
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1968 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-05 16:14:19 +00:00
David Lawrence Ramsey
b49daec3f2 in do_insertfile(), if file browsing succeeds, copy the filename we
browsed to into ans, put back Enter, and show the prompt one last time
so that it's exited properly and the cursor position at the statusbar is
reset


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1967 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-05 02:46:24 +00:00
David Lawrence Ramsey
4dd723a095 make resetstatuspos static to just statusq()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1966 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-05 02:29:52 +00:00
David Lawrence Ramsey
d532f197b0 add parameter use_answer to search_init(); when it's TRUE, only set
backupstring to answer, so that we can preserve the text of the
statusbar when switching to the search prompt from the "Go To Line"
prompt; also, set backupstring before doing anything else, add one minor
efficiency tweak, and preserve the text of the statusbar no matter what
when switching from the search prompt to the "Go To Line" prompt, since
the toggling works both ways now and non-numeric text shouldn't be lost
when going only one of those ways


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1965 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-04 22:37:56 +00:00
David Lawrence Ramsey
e663dcd6aa comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1964 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-04 22:35:43 +00:00
David Lawrence Ramsey
4c9e8f4211 remove redundancy erroneously introduced when adding the ^T toggle to
the "Go To Line" prompt


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1963 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-04 16:01:37 +00:00
David Lawrence Ramsey
77e02a3e74 add another cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1962 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-04 15:53:40 +00:00
David Lawrence Ramsey
951d7148d1 add minor cosmetic fixes, and do another int -> bool conversion
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1961 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-04 15:23:47 +00:00
David Lawrence Ramsey
f1c395da79 remove stray dash
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1960 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-03 19:26:13 +00:00
David Lawrence Ramsey
3e189a8b9c in open_(prev|next)_file(), translate the "New Buffer" string when
displaying "Switched to" messages on the statusbar; also do a few more
int -> bool conversions


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1959 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-03 19:18:48 +00:00
David Lawrence Ramsey
7c1f17ab6d after reading in a file and detecting the format it's in, set the file
format flags (DOS_FILE and MAC_FILE) to match, and preserve them across
multiple file buffers


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1958 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-03 13:47:26 +00:00
David Lawrence Ramsey
360191c434 consistency fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1957 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-01 21:37:36 +00:00
David Lawrence Ramsey
ca744153fd add missing blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1956 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-01 18:47:17 +00:00
David Lawrence Ramsey
be908f6992 for consistency, make do_insertfile() take a parameter to indicate
whether it's in "Execute Command" mode; also add continue and goto to
the "c-file" regexes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1955 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-01 18:34:30 +00:00
David Lawrence Ramsey
e5d8f32834 add a bunch of key-related fixes: put Meta-( (Meta-9), Meta-) (Meta-0),
and Meta-J back in the shortcut list since Meta-G is used in the file
browser and not as a toggle, tweak nanogetstr() and statusq() so that
resetstatuspos can be reduced to a static bool, change the names of some
keys to be more consistent, and add the ^R^X^X and ^W^T^T shortcuts
(note that the latter doesn't preserve the contents of the statusbar yet
when ^T is pressed at the "Go To Line" prompt), and add a few other
miscellaneous tweaks


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1954 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-30 22:07:21 +00:00
David Lawrence Ramsey
47e82b1752 fix #ifdef breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1953 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-28 22:21:46 +00:00
David Lawrence Ramsey
04a8d1c040 add a multibuffer mode toggle to the "Execute Command" prompt, for
consistency with the "Read File" prompt


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1952 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-28 22:14:58 +00:00
David Lawrence Ramsey
03225330dc simplify do_insertfile() by reusing variables where possible
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1951 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-28 20:50:50 +00:00
David Lawrence Ramsey
25884f3bdb more int -> bool conversions
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1950 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-28 20:37:03 +00:00
David Lawrence Ramsey
9bab9ff5b4 consistency fix: the convention for shortcuts lists other than the main
list is apparently to only allow meta shortcuts as toggles, so only
allow the meta shortcuts for searching for the beginning and end of the
paragraph and justifying the entire file to go in the main list


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1949 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-28 16:51:08 +00:00
David Lawrence Ramsey
670a56c241 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1948 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-28 16:03:03 +00:00
David Lawrence Ramsey
9b6e476a46 resetstatuspos should be a bool, not an int
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1947 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-28 15:58:56 +00:00
David Lawrence Ramsey
1e7297116b in shortcut_init(), change an erroneous _() around the "New Buffer"
string to N_()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1946 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-28 15:17:47 +00:00
David Lawrence Ramsey
b77ec62cde for consistency, at the "Go To Line" prompt, display "Cancelled" instead
of "Aborted" if we cancel


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1945 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-28 15:06:15 +00:00
David Lawrence Ramsey
45f971d69b add missing func_key reference
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1944 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-27 01:10:48 +00:00
David Lawrence Ramsey
eb16f43cf9 add a func_key flag to the low-level input functions and the currently
existing high-level input functions, to indicate extended keypad values


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1943 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-27 01:04:50 +00:00
David Lawrence Ramsey
72d8e54f6e refresh the screen when Ctrl-L is pressed at the statusbar prompt, as
Pico does


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1942 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-25 00:45:07 +00:00
David Lawrence Ramsey
09b34ed34e cosmetic comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1941 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-24 21:48:40 +00:00
David Lawrence Ramsey
f3ca80e11d remove redundant include of limits.h from nano.c
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1940 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-23 21:52:58 +00:00
David Lawrence Ramsey
013344c4c5 turn off extended input processing (the IEXTEN termios flag) as nano
1.2.x does


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1939 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-22 22:45:08 +00:00
David Lawrence Ramsey
d08348b99c make some ints that use the value of fill and can be greater than COLS
ssize_t's for consistency, and add a few minor cosmetic fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1938 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-18 22:02:21 +00:00
David Lawrence Ramsey
e6ef8b9bb9 revert the blocking of meta sequences in main(), as it doesn't solve the
problem of meta sequences' sometimes being interpreted as printable
characters when they shouldn't be


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1937 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-12 22:01:38 +00:00
David Lawrence Ramsey
807657b0fe document keeping meta sequences from getting through to do_char() in the
changelog, and update a related comment


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1936 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-12 21:40:04 +00:00
David Lawrence Ramsey
f887298c6e don't let meta sequences get through to do_char()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1935 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-12 21:30:36 +00:00
David Lawrence Ramsey
db6015c7d7 make the help menu shortcut display more flexible, add more intuitive
aliases for moving to the beginning and end of a paragraph and
justifying the entire file, and make those aliases available in the main
shortcut list too, since Pico's practice of putting them in the search
menu is rather odd


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1934 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-11 21:41:13 +00:00
David Lawrence Ramsey
fd73c462f4 for more compatibility with Pico, remove extra space after a character
in punct if that character is the same as the one before it


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1933 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-11 21:28:36 +00:00
Jordi Mallach
12d5b2f6bd Updated manpages by Jean-Philippe.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1932 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-10 22:18:53 +00:00
David Lawrence Ramsey
c7ca28a6ba make get_edit_input() respect view mode, and clarify its changelog entry
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1931 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-07 21:51:49 +00:00
David Lawrence Ramsey
6ccf0e2386 minor cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1930 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-07 15:45:14 +00:00
David Lawrence Ramsey
1a5c4c691c when calling AC_TRY_RUN() to test for a broken regexec() function, set
the fourth parameter to default to "no" (since it apparently only occurs
on glibc 2.2.3-based systems) so that cross-compiling will work


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1929 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-07 00:48:49 +00:00
David Lawrence Ramsey
02517e0a0f add DB's overhaul of the file loading code to increase efficiency,
remove ugly workarounds for most cases of edittop's or current's being
NULL (as those cases no longer occur due to the overhaul), and remove
detection of binary files (since it wasn't always accurate and will only
cause problems when UTF-8 support is added); also add a few minor fixes
of mine


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1928 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-05 21:40:31 +00:00
David Lawrence Ramsey
8bf08097ee remove reference to @includedir@ in src/Makefile.am, as it's unneeded
and can break cross-compilation


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1927 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-01 22:08:57 +00:00
Jordi Mallach
1fabded68f Updated French manpages from Jean-Philippe.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1926 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-31 18:26:28 +00:00
Jordi Mallach
30d82b787d Update Spanish translation from Javi.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1925 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-31 18:13:07 +00:00
Jordi Mallach
cc79a9ae96 Updated translations.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1924 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-31 00:23:16 +00:00
Jordi Mallach
66e19ba5f3 Updated French translation by Jean-Philippe Guérard.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1923 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-31 00:22:02 +00:00
David Lawrence Ramsey
2a60ea8fe3 in nanorc.sample, remove specific references to control key shortcuts
other than XON and XOFF


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1922 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-29 14:42:03 +00:00
David Lawrence Ramsey
4aece064db remove snippet of edit_update() that's redundant now that findnextstr()
maintains current_y properly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1921 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-28 16:34:28 +00:00
David Lawrence Ramsey
6da969e44b work around the need to put back the first non-escape character when
reading an escape sequence


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1920 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-28 15:51:07 +00:00
David Lawrence Ramsey
146bb6026a in do_insertfile(), readd the NANO_SMALL #ifdef around the start_again:
label to avoid a warning


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1919 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-27 21:02:38 +00:00
David Lawrence Ramsey
c510042bcd do more int ->bool conversions, change the order of the parameters in
findnextstr(), and make findnextstr() maintain the value of current_y
too


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1918 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-27 20:28:34 +00:00
David Lawrence Ramsey
50c7f2de2f have edit_refresh() call edit_update() with NONE when smooth scrolling
is on so that smooth scrolling applies everywhere instead of just to the
movement functions, fix a potential infinite loop when edit_update() is
called with NONE and current_y is greater than (editwinrows - 1), and
have do_para_begin() and do_para_end() maintain current_y as
do_justify() does (and as they did before)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1917 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-27 17:02:05 +00:00
Jordi Mallach
0c4c58e457 Updated Catalan and German.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1916 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-27 10:18:47 +00:00
David Lawrence Ramsey
20b83508f4 simplify edit_update() so as not to require the fileptr parameter
anymore, since it's set to current in all calls


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1915 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-26 18:07:58 +00:00
David Lawrence Ramsey
d1322107a5 do another int -> bool conversion, and simplify the search/replace
"Cancelled" messages


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1914 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-26 04:22:54 +00:00
David Lawrence Ramsey
fe0d366ce2 in get_mouseinput(), make clicking on meta shortcuts work properly
again, and properly handle the case of whereis_list's being longer than
MAIN_VISIBLE as bottombars() does


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1913 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-26 01:43:16 +00:00
David Lawrence Ramsey
a16b27f102 remove redundant #ifdef
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1912 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-26 01:29:25 +00:00
David Lawrence Ramsey
dfca1c4ea6 add unget_kbinput(), a wrapper for ungetch()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1911 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-25 16:37:06 +00:00
David Lawrence Ramsey
a0b5ba2f7f convert ints to bools in the low-level input routines, and consolidate
the high-level input routines for the edit window


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1910 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-25 15:39:10 +00:00
David Lawrence Ramsey
19420aac9d add missing brackets around an if statement block in parse_rcfile() so
that parsing the numeric argument after "tabsize" works properly again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1909 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-18 16:14:18 +00:00
David Lawrence Ramsey
013e8d1eb1 Back to CVS
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1908 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-17 20:44:31 +00:00
David Lawrence Ramsey
c6718cf209 GNU nano 1.3.4
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1906 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-17 20:38:44 +00:00
David Lawrence Ramsey
a88347069c add missing #ifdefs
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1905 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-17 20:34:57 +00:00
David Lawrence Ramsey
35fb55aba2 and add last missing bit
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1904 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-17 19:28:54 +00:00
David Lawrence Ramsey
c08368bd19 fix the last ngetdelim() tweak
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1903 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-17 19:20:05 +00:00
David Lawrence Ramsey
b4041d6821 better document the ngetdelim() tweaks
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1902 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-17 16:04:48 +00:00
David Lawrence Ramsey
95f3812db1 add a few last tweaks to ngetdelim()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1901 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-17 16:00:29 +00:00
David Lawrence Ramsey
a27bd65057 per DB's patch, overhaul the rcfile and history file reading and writing
routines to fix a few fundamental problems and limitations; also add
getline() and getdelim() equivalents adapted from GNU mailutils 0.5 (and
tweaked to better integrate with nano), since the patch uses getline()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1900 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-17 05:23:38 +00:00
David Lawrence Ramsey
bb50b305d5 a few more #ifdef tweaks, plus a few cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1899 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-12 21:43:00 +00:00
David Lawrence Ramsey
7e8dd19a72 more #ifdef tweaks
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1898 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-12 20:06:20 +00:00
David Lawrence Ramsey
df13e3beef tweak some #ifdefs to avoid warnings when compiling with
--disable-wrapping, --disable-justify, or a combination of the two


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1897 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-12 19:48:21 +00:00
David Lawrence Ramsey
7dfec43f42 per DB's patch, show the "Press Return To Continue" prompt if we can't
read the .nano_history file while starting nano


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1896 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-12 15:20:14 +00:00
David Lawrence Ramsey
69a28122c1 make sure that the shortcut list properly displays "Close" when reading
in multiple files on the command line


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1895 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-12 04:34:00 +00:00
David Lawrence Ramsey
76356bd05b and do int -> bool conversions for the prototypes too
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1894 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-12 04:30:22 +00:00
David Lawrence Ramsey
82dc1c17f2 add more int -> bool conversions
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1893 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-12 03:27:54 +00:00
David Lawrence Ramsey
95e39e5f46 add missing error message simplifications from before
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1892 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-12 02:52:14 +00:00
David Lawrence Ramsey
1e7f1ea1e8 indentation fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1891 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-12 02:11:35 +00:00
David Lawrence Ramsey
6420d445c2 add a bunch of DB's miscellaneous fixes, plus a few of mine
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1890 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-11 05:13:08 +00:00
David Lawrence Ramsey
049e4a5db3 per DB's patch, simplify the saving of emergency files in die(),
die_save_file(), and get_next_filename()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1889 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-10 23:05:59 +00:00
David Lawrence Ramsey
6b24856c2f add titlebar() calls before all open_file() calls and remove the
titlebar() call after them, so that the titlebar is displayed properly
for all file(s) loaded; also add missing int -> bool conversion


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1888 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-07 22:33:14 +00:00
David Lawrence Ramsey
c7b6ac5afe cosmetic fixes for the getopt_(long)?() calls and the switch block
dealing with the command line options


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1887 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-07 22:00:02 +00:00
David Lawrence Ramsey
00d7798756 per DB's patch, convert a few parts of files.c to use bool so that
open_pipe()'s failure is handled properly again, and add various
#ifdefs to fix a few warnings and compilation problems that occur when
everything is enabled manually including NANO_SMALL


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1886 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-07 21:27:37 +00:00
David Lawrence Ramsey
ce62e82a93 per DB's patch, convert nano.c to use bools wherever needed, add a few
efficiency tweaks, and fix a few minor bugs in help_init() where "Up"
and "Space" might not be displayed properly and the help browser
wouldn't work if fewer than 24 columns were available


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1885 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-05 22:10:22 +00:00
David Lawrence Ramsey
73cd1a5ded document DB's warning fixes when ENABLE_NLS is undefined and the
-fwritable-strings option is used, which were part of his last patch to
convert more translated strings to use N_()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1884 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-05 21:57:48 +00:00
David Lawrence Ramsey
76f63ff58d per DB's patch, convert more of nano to use N_() when possible; also add
a few more minor cosmetic fixes of mine


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1883 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-05 15:45:09 +00:00
David Lawrence Ramsey
22fac783f5 per DB's patch, don't translate the option strings for -Z/--restricted;
also add a few more minor cosmetic fixes of mine


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1882 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-05 15:16:19 +00:00
David Lawrence Ramsey
c53ab2a854 tweak parse_num() to return a bool, and fix backwards test of its value
so that numeric values will be preserved when switching to the "Go To
Line" prompt again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1881 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-04 18:24:53 +00:00
David Lawrence Ramsey
4d44d2de0e make lastwastab and list use TRUE and FALSE instead of 1 and 0, make
them bools in the process, and make a few other minor cosmetic cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1880 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-01 22:35:31 +00:00
David Lawrence Ramsey
8bf9ba0c16 tweak the spec file to properly package the "rnano" symlink
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1879 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-01 22:00:29 +00:00
David Lawrence Ramsey
76fb3eccda automatically install a symlink "rnano" pointing to nano
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1878 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-01 16:09:15 +00:00
David Lawrence Ramsey
b8c479a9e9 add DB's fix for a problem where quoted justify wouldn't work if
HAVE_REGEX_H wasn't set, and don't treat the return values of the string
comparison functions as boolean anymore


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1877 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-31 14:10:23 +00:00
David Lawrence Ramsey
a6d26d04fd rcfile tweaks: prompt only once for all rcfile errors instead of once
for each separate error, make sure all the messages end in newlines,
etc.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1876 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-30 22:52:44 +00:00
David Lawrence Ramsey
906257932f add my display tweak to do_replace(), my efficiency tweaks to
do_gotoline(), and DB's efficiency tweaks to do_gotopos()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1875 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-30 20:21:34 +00:00
David Lawrence Ramsey
9ef3adbc1d add a consistency fix for do_enter() and a few minor cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1874 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-30 17:30:17 +00:00
David Lawrence Ramsey
819c7f0327 add DB's overhaul of the paragraph searching code and some of the
justify code, as it makes some code much more understandable and fixes a
bug where searching for the previous paragraph would move the cursor too
high in one case


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1873 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-30 03:54:34 +00:00
David Lawrence Ramsey
f56cc9e0e9 in do_replace_loop(), make sure old_pww is updated to the current value
of placewewant when a new match is found, so that edit_redraw() will
redraw the screen properly when only placewewant changes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1872 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-29 14:32:17 +00:00
David Lawrence Ramsey
360093a652 add a few missing placewewant size_t conversions
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1871 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-28 20:53:55 +00:00
David Lawrence Ramsey
86e851b4e7 per DB's patch, convert placewewant to a size_t; also add a few
miscellaneous fixes of mine


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1870 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-28 20:46:25 +00:00
David Lawrence Ramsey
2d140c2980 add various improvements to the "c-file" regexes by Mike Frysinger, with
a few additions of mine


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1869 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-28 13:50:43 +00:00
David Lawrence Ramsey
7d3817fb3e add Mike Frysinger's sample regexes for patch files
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1868 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-28 13:03:06 +00:00
David Lawrence Ramsey
331e659e98 minor cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1867 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-27 19:40:39 +00:00
David Lawrence Ramsey
8aaf03000b move the main terminal initialization functions, aside from initscr(),
into a new terminal_init() function, and convert nano to use it; also,
when reloading the newly spell-checked temporary file in
do_alt_speller(), call terminal_init() to make sure that all the
original terminal settings are restored, as a curses-based alternative
spell checker (e.g. aspell) can change them


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1866 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-27 16:46:35 +00:00
David Lawrence Ramsey
ad1fd0d968 per Junichi Uekawa's patch in Debian's version of nano, call setlocale()
outside the ENABLE_NLS #ifdef, since UTF-8 support (specifically, the
wide character handling functions it needs) won't work properly if the
locale isn't set, whether NLS is enabled or not


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1865 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-27 15:46:58 +00:00
David Lawrence Ramsey
1536f8613d fix spacing problem in the "Save Under Different Name" prompt
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1864 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-24 16:50:20 +00:00
David Lawrence Ramsey
c41d428b41 fix variable names
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1863 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-23 12:51:40 +00:00
David Lawrence Ramsey
8037fe076b a few miscellaneous Pico compatibility tweaks and bugfixes (most
importantly, a fix for a segfault when trying to full-justify a file
with no paragraphs)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1862 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-23 12:30:40 +00:00
David Lawrence Ramsey
94b975ce7c restore erroneously removed toggle* casts
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1861 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-20 12:57:34 +00:00
David Lawrence Ramsey
04419b9702 and reset tabsize and wrap_at to their default values if invalid rcfile
entries are specified for them


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1860 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-18 18:13:54 +00:00
David Lawrence Ramsey
36dd87b1fb properly handle invalid tab sizes in nanorc files and make a few more
cosmetic cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1859 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-18 17:43:43 +00:00
David Lawrence Ramsey
24f10c30c3 revert change to debugging statement that shouldn't be there yet
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1858 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-17 20:01:45 +00:00
David Lawrence Ramsey
fd3039a8e7 cut down on redundant inclusions of <sys/types.h>, include it in proto.h
per DB's patch, and make a few more minor cosmetic cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1857 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-17 19:49:12 +00:00
David Lawrence Ramsey
fb8bf40efb further clarify one toggle description
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1856 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-13 17:43:08 +00:00
David Lawrence Ramsey
aea4dabf59 per DB's patch, remove some unneeded reset_cursor() calls, move the one
in the main input loop to the top, and remove the apparently unneeded
wrefresh() call in the main input loop


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1855 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-13 17:09:24 +00:00
David Lawrence Ramsey
300b87fda6 add missing part of the variable type changes in do_gotoline()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1854 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-12 16:26:55 +00:00
David Lawrence Ramsey
49c3f2406d port over DB's number parsing code and related bits, with a few minor
changes of mine, and add a few related variable type changes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1853 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-12 16:07:14 +00:00
David Lawrence Ramsey
576bf331ef various changes to cut down on binary size: per DB's patch, add new N_()
macro to mark strings that aren't translated immediately and convert
nano to use it where needed, overhaul the shortcut list and toggle list
initialization code for efficiency, and replace rcfile_msg() with
rcfile_error(); also add a few minor miscellaneous cleanups by DB and
myself


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1852 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-12 03:10:30 +00:00
David Lawrence Ramsey
d717d4bac6 add another missing part of DB's patch (read_file() should be returning
void instead of int), and rearrange one NANO_SMALL #ifdef for better
readability


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1851 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-10 16:53:17 +00:00
David Lawrence Ramsey
0273829353 add one last spacing fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1850 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-08 17:29:27 +00:00
David Lawrence Ramsey
f708037715 add another prototype fix and a few spacing fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1849 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-08 17:15:10 +00:00
David Lawrence Ramsey
a5dda84a07 per DB's patch, remove unused global variable search_offscreen
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1848 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-08 15:27:04 +00:00
David Lawrence Ramsey
0af8604ec9 more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1847 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-07 23:26:08 +00:00
David Lawrence Ramsey
ec721c8e80 another missing piece of DB's patch: the toggle and rcoption structs
should use longs to store their flags too


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1846 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-07 15:20:52 +00:00
David Lawrence Ramsey
2ad320926f add another missing part of DB's patch to convert flags and related
variables into longs: toggle_init_one() should take a long instead of an
int for its flag parameter


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1845 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-07 14:36:44 +00:00
David Lawrence Ramsey
962cc74620 add missing part of DB's patch to convert flags and related variables
into longs: file_flags should be declared as a long instead of an int


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1844 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-07 13:57:52 +00:00
David Lawrence Ramsey
25529074d3 put back erroneously removed initialization of original_umask
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1843 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-06 14:02:44 +00:00
David Lawrence Ramsey
f7b5d930a9 if we're in restricted mode and the filename isn't blank, disable tab
completion at the "Write File" prompt, since we can't change the
filename in that case; also remove an unneeded trailing space


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1842 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-05 14:27:29 +00:00
David Lawrence Ramsey
309fbcbddf fix inaccurate comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1841 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-03 14:34:03 +00:00
David Lawrence Ramsey
4693864a78 fix bug in do_justify() in a better way: add on_next_line flag, used to
indicate when we've moved to the next line after justifying the current
line, and only run the respacing routine when it's true; this keeps the
respacing routine from erroneously being run more than once on the same
line


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1840 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-03 14:15:58 +00:00
David Lawrence Ramsey
01a6bf4f9a fix bug in do_justify(): if all the text from the next line has been
moved to the current line and the next line has been deleted, continue
the justification loop from there and skip the respacing routine in
order to avoid running it more than once on the same line (since it
assumes that we've moved to the next line, which isn't true in that
case)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1839 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-03 05:23:19 +00:00
David Lawrence Ramsey
c8c69d5449 for consistency with nano 1.2.x and with other editors, make the mode of
newly created files 666 instead of 600 before it's modified by the
umask; also add a few more minor comment fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1838 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-03 03:22:23 +00:00
David Lawrence Ramsey
edab0cc0a5 a few cleanups and consistency fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1837 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-03 03:09:12 +00:00
David Lawrence Ramsey
72e51ab037 per DB's patch (with a few updates of mine), convert the shortcut list
functions and most related functions to return void instead of int, as
the return values of all those functions are essentially unused; also
add a few related miscellaneous cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1836 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-02 14:31:03 +00:00
David Lawrence Ramsey
74912c6090 add missing cosmetic fix from before
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1835 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-01 19:41:09 +00:00
David Lawrence Ramsey
ebd0d7c859 more minor cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1834 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-01 18:59:52 +00:00
David Lawrence Ramsey
0fb841a78a per DB's patch, tweak the code to update the edit window just before
getting statusbar input for efficiency, and update bottomwin just before
then too


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1833 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-01 17:04:23 +00:00
David Lawrence Ramsey
cff5558394 per Jon Oberheide's patch, fix erroneous debugging statement so that
nano compiles with --enable-debug again


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1832 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-30 12:28:15 +00:00
David Lawrence Ramsey
db357a1ece per Mike Frysinger's patch, have whitespace display default to off
instead of on


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1831 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-29 12:36:25 +00:00
David Lawrence Ramsey
a539fce4ad fix erroneous #ifdef so that nano compiles with --disable-justify again
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1830 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-29 00:43:56 +00:00
David Lawrence Ramsey
d36715e8ac Back to CVS
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1829 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-28 13:23:37 +00:00
David Lawrence Ramsey
e1151561ad GNU nano 1.3.3
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1827 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-28 13:17:33 +00:00
David Lawrence Ramsey
dbde9d7577 refactor the code to search for the beginning of a paragraph a bit to
fix some inaccuracies and eliminate the need for recursion; it now uses
almost the same logic as the code to search for the end of a paragraph,
which makes it somewhat easier to understand


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1823 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-27 00:54:08 +00:00
David Lawrence Ramsey
524534405b a few last minor cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1822 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-26 15:24:16 +00:00
Jordi Mallach
21ad762998 Add a translation comment so translators use both their shortcuts as well as the English ones.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1818 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-25 22:43:09 +00:00
Jordi Mallach
d350727726 Fix XSI:ism in config.rpath.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1817 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-25 22:34:18 +00:00
David Lawrence Ramsey
91bc83a97a call justify_format() just after backup_lines() instead of inside it, so
that full justification doesn't erroneously justify non-paragraph lines
in the file


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1815 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-25 01:52:10 +00:00
David Lawrence Ramsey
537a880856 minor cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1814 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-24 22:39:24 +00:00
David Lawrence Ramsey
85529b37c6 make the former flag same_line_wrap use TRUE and FALSE, add missing part
of DB's do_wrap() tweaks (the initialization of new_line_wrap to 0), and
wrap a few overly long comments


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1813 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-22 15:38:47 +00:00
David Lawrence Ramsey
973a96be62 add minor comment fixes, and also fix a problem where the escape
sequence for F3 on the FreeBSD console wasn't interpreted properly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1812 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-22 14:30:18 +00:00
David Lawrence Ramsey
4e1a98c9c3 fix inaccurate comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1810 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-15 01:48:51 +00:00
David Lawrence Ramsey
45eda52d7e do_yesno() comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1809 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-12 21:20:33 +00:00
David Lawrence Ramsey
74af3a7419 clean up main() a bit
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1808 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-12 21:03:14 +00:00
David Lawrence Ramsey
3b0729cf5d fix slightly misplaced break
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1807 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-12 02:10:07 +00:00
David Lawrence Ramsey
2b6c3018b0 remove unneeded justify_format() call from do_justify() which caused
problems if the original paragraph was one line long and ended with a
tab or tabs; unjustification would restore the justify_format()ted line
instead of the original line


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1806 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-10 01:35:02 +00:00
David Lawrence Ramsey
452513750b per CHAO Wei-Lun's patch, add missing "[dir]" and missing _()'s to the
"-E [dir]/--backupdir=[dir]" strings in usage()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1805 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-09 08:36:46 +00:00
David Lawrence Ramsey
a9a6ce09d6 justification fix: if the last line of a justified paragraph has a space
on the end of it, the space should be removed


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1804 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-05 22:09:56 +00:00
David Lawrence Ramsey
7ea39efdbd document the functions that were removed when the input routines were
converted to use state machines


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1803 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-04 22:36:42 +00:00
David Lawrence Ramsey
d8974451f0 add an extra break and move an #endif down to fix a potential problem
when NANO_SMALL is defined or KEY_RESIZE isn't, and when PDCURSES isn't
defined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1802 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-04 22:28:55 +00:00
David Lawrence Ramsey
e65e639465 properly handle it when get_escape_seq_kbinput() returns ERR for an
escape sequence that is recognized but which should be ignored


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1801 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-04 18:18:17 +00:00
David Lawrence Ramsey
16eb518dcd support KEY_A1, KEY_A3, KEY_C1, and KEY_C3 on the numeric keypad
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1800 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-03 20:26:12 +00:00
David Lawrence Ramsey
498e13df30 document the use of the SPELL environment variable
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1799 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-01 22:56:34 +00:00
David Lawrence Ramsey
ae064bf255 don't rely on the return value of curs_set(), as it's broken on e.g.
slang; instead, explicitly turn the cursor off where we need to


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1798 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-01 20:38:00 +00:00
David Lawrence Ramsey
e7638ea75f cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1797 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-01 19:49:38 +00:00
David Lawrence Ramsey
ce1d7652f3 edit_redraw() should update when we're not on the first page and/or when
we're not on the same page as before, not just in the former case


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1796 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-01 18:32:36 +00:00
Jordi Mallach
0675c2f355 Update docs about Chinese contributor.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1795 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-01 15:29:31 +00:00
Jordi Mallach
18b583d55b 2004-06-01 Jordi Mallach <jordi@gnu.org>
* zh_TW.po: Added Chinese (Taiwan) translation by
	CHAO Wei-Lun <chaoweilun@pcmail.com.tw>.
	* LINGUAS: Added "zh_TW".


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1794 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-01 15:13:19 +00:00
David Lawrence Ramsey
9a527f5a17 add DB's tweaks to do_wrap(), plus a few minor bits of mine (convert
some ints to size_t's and convert the int wrapping to use TRUE and FALSE
since it's used as a boolean)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1793 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-31 14:58:59 +00:00
David Lawrence Ramsey
684b19380e fix comment inaccuracies
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1792 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-31 14:47:12 +00:00
David Lawrence Ramsey
4a80fcff4e oops; for consistency with e.g. color syntax highlighting (which, like
whitespace display, is specified in the rcfile), whitespace display
should be on by default


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1791 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-30 04:19:27 +00:00
David Lawrence Ramsey
f521b60f52 for consistency, whitespace display should be off by default, not on
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1790 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-30 03:56:52 +00:00
David Lawrence Ramsey
28260475bb add spaces to the ends of the "Overwrite" and "Different Name" prompts,
for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1789 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-30 03:23:39 +00:00
David Lawrence Ramsey
c21790d6d9 edit_redraw() fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1788 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-30 03:19:52 +00:00
David Lawrence Ramsey
be26561620 add DB's changes to allow scrolling through the help browser text with
the arrow keys as well as the paging keys


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1787 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-29 20:38:08 +00:00
David Lawrence Ramsey
b6a4b10daf document cosmetic reorganization of rcfile.c, and readd an "else" I
accidentally removed while doing it


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1786 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-29 17:20:01 +00:00
David Lawrence Ramsey
8d911991a3 add a few comment fixes and an explicit check in rcfile.c for
rcopts[i].name's being "tabsize" (to avoid a spurious error under some
circumstances about tabsize's being 0 when there's no tabsize entry in
the rcfile)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1785 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-29 17:05:52 +00:00
David Lawrence Ramsey
89bb93733a a few last cosmetic reorderings and fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1784 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-29 16:47:52 +00:00
David Lawrence Ramsey
2c62b07d2b allow the changing of closing punctuation and closing brackets (used in
justification) via the rcfile


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1783 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-29 16:38:57 +00:00
David Lawrence Ramsey
483ea32c75 add Mike Frysinger's patch (with minor modifications) to allow
displaying other characters, specified in the rcfile, for the first
characters of tabs and spaces


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1782 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-29 16:25:30 +00:00
David Lawrence Ramsey
c833d9e80f since KEEP_CUTBUFFER is only used in cut.c, make it a static variable in
cut.c instead of a flag, and unset it in other files via the new
function cutbuffer_reset()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1781 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-29 15:36:58 +00:00
David Lawrence Ramsey
12e066f9d4 fix minor omission: the smarthome option was documented in nanorc.5 as
well as nano.1


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1780 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-29 14:13:02 +00:00
David Lawrence Ramsey
9d325a03d9 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1779 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-29 03:03:52 +00:00
David Lawrence Ramsey
32e3b88e09 add some comments better explaining what is disabled in restricted mode
and why


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1778 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-29 01:20:17 +00:00
David Lawrence Ramsey
dd7cc7230e don't bother initializing the backup directory or reading $SPELL for the
alternative spell checker if we're in restricted mode, since both
backups and spell checking are disabled then


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1777 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-28 23:45:25 +00:00
David Lawrence Ramsey
3aedb36e68 check $SPELL for an alternative spell checker if we didn't get one from
the command line and/or rcfile, as Pico does


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1776 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-28 22:42:41 +00:00
David Lawrence Ramsey
570ea8969b add missing cast to char
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1775 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-28 21:02:32 +00:00
David Lawrence Ramsey
2ed225f78d overhaul the routines for movement and related things to eliminate
unneeded screen redraws


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1774 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-28 20:44:09 +00:00
David Lawrence Ramsey
48ae986730 refactor the low-level input routines into main routines that get the
input and state machines that interpret the input


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1773 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-28 17:23:33 +00:00
David Lawrence Ramsey
d12fd4b1fb add code to statusq() to *really* not allow "Full Justify" while in view
mode


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1772 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-28 15:05:56 +00:00
David Lawrence Ramsey
0aa2264687 fix problems caused by cut and paste of the do_para_end() shortcut for
the do_full_justify() shortcut: don't allow the latter to work in view
mode, and have it display its own message instead of the do_para_end()
shortcut's message


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1771 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-28 14:42:50 +00:00
David Lawrence Ramsey
2f0d03b4a2 make write_marked() always call write_file() with nonamechange set to
TRUE (and hence no longer take a namechange parameter itself) to fix a
bug where writing a selection would change the current filename, and
make die_save_file() do the same since we don't need to change the
current filename if we're writing emergency backup files


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1770 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-28 00:15:28 +00:00
David Lawrence Ramsey
228148b87a add DB's tweaks to do_enter() and remove the now-unused center_cursor()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1769 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-27 20:09:52 +00:00
David Lawrence Ramsey
c372488179 treat search_last_line as a boolean everywhere, and remove some unneeded
trailing spaces


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1768 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-27 18:39:16 +00:00
David Lawrence Ramsey
8328fc2439 properly account for padding in titlebar()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1767 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-25 23:34:43 +00:00
David Lawrence Ramsey
da141063e3 per DB's patch, make finish() accept and return void, since none of the
calls to finish() set sigage to anything other than 0 or use its return
value


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1766 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-25 19:41:11 +00:00
David Lawrence Ramsey
0d29555a13 cosmetic fix: reorder enums
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1765 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-25 02:33:27 +00:00
David Lawrence Ramsey
c279a63100 per DB's patch, also remove the now-unused center_cursor()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1764 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-25 01:49:58 +00:00
David Lawrence Ramsey
5a8995a097 per DB's patch, remove the now-unused edit_refresh_clearok()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1763 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-24 19:47:08 +00:00
David Lawrence Ramsey
32613fa3f6 comment fixes for consistency: "Meta" -> "meta"
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1762 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-24 18:40:41 +00:00
David Lawrence Ramsey
2e3aeae5bc convert do_para_search() to use an enum to specify its search type
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1761 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-24 05:52:35 +00:00
David Lawrence Ramsey
32d19ce47c comment fix for consistency: "magic line" -> "magicline"
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1760 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-24 05:05:07 +00:00
David Lawrence Ramsey
a9fcaa589a comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1759 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-24 02:58:05 +00:00
David Lawrence Ramsey
1b525e9ad6 switch test around in do_prev_word() for consistency with do_next_word()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1758 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-24 02:35:02 +00:00
David Lawrence Ramsey
4be15f0158 move do_(first|last)_line() to move.c
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1757 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-23 21:33:23 +00:00
David Lawrence Ramsey
4178db0328 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1756 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-23 21:23:23 +00:00
David Lawrence Ramsey
1dcf36a370 add missing bit
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1755 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-23 21:17:56 +00:00
David Lawrence Ramsey
fa394047ba add DB's changes to titlebar() (with a few tweaks of mine) to make it
handle shorter screen widths better and display the filename using
display_string(), my strnlen() equivalent so the new titlebar() will
work on systems without strnlen(), and a few of DB's other minor changes
to make other display-related functions handle shorter screen widths
better, among other things


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1754 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-23 21:11:14 +00:00
David Lawrence Ramsey
bcebe325f0 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1753 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-22 20:38:33 +00:00
David Lawrence Ramsey
14bf80399f add missing #ifdefs around prototypes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1752 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-22 20:19:15 +00:00
David Lawrence Ramsey
c7acf69cb2 add smart home key
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1751 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-22 20:15:20 +00:00
David Lawrence Ramsey
684e7ebd37 comment fix: justify_format() could have just left out a space at the
end of the line instead of removing it


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1750 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-20 14:31:15 +00:00
David Lawrence Ramsey
8e4adcdac3 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1749 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-20 03:29:33 +00:00
David Lawrence Ramsey
e608f94a6f go back to cbreak mode and disable_signals() instead of raw mode, as
disable_signals() doesn't take up much space and we need one fewer slang
workaround that way


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1748 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-19 16:04:27 +00:00
David Lawrence Ramsey
fd462b164e comment fix: ^J should be Ctrl-J
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1747 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-19 15:41:17 +00:00
David Lawrence Ramsey
837a02b256 add missing bit from DB's refactoring of do_credits(): translate the
messages in xlcredits[] after they're initialized in order to avoid an
error when compiling with -pedantic


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1746 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-18 15:23:31 +00:00
David Lawrence Ramsey
d7fd200a6a minor overhaul of terminal-related things
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1745 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-18 01:20:36 +00:00
David Lawrence Ramsey
36e363f525 and remove unneccessary initialization
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1744 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-17 20:38:00 +00:00
David Lawrence Ramsey
1cadddd111 tweak justification so that it works the same way as the current version
of Pico does


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1743 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-17 20:32:51 +00:00
David Lawrence Ramsey
7097d7b6d2 remove some unneeded edit_update()s in do_para_search() and do_justify()
per DB's patch, and simplify an if statement in do_justify()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1742 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-17 16:11:18 +00:00
David Lawrence Ramsey
1d43db879e if multibuffer support is compiled in, properly read in multiple files
at the command line even if multibuffer mode isn't turned on


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1740 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-14 17:57:00 +00:00
David Lawrence Ramsey
97133f5963 in main(), don't open the first file in quiet mode, since if we do, an
error message won't be shown if it's unreadable


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1739 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-14 17:39:19 +00:00
David Lawrence Ramsey
fda18c3935 one last comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1738 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-14 03:50:49 +00:00
David Lawrence Ramsey
d4693cb0be the last of the minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1737 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-14 01:17:25 +00:00
David Lawrence Ramsey
021960dfb7 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1736 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-13 23:19:01 +00:00
David Lawrence Ramsey
68a44a4905 one last minor cosmetic change
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1735 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-13 23:05:14 +00:00
David Lawrence Ramsey
f613ca78c6 minor cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1734 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-13 22:23:58 +00:00
David Lawrence Ramsey
94e7094cee minor cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1733 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-13 18:04:31 +00:00
David Lawrence Ramsey
1122c85e34 reformat the test programs in configure.ac to be on multiple lines for
greater readability, and remove unnecessary inclusion of stdio.h in the
slang tests


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1732 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-13 17:46:57 +00:00
David Lawrence Ramsey
8d3e7f3217 add support for Pico's ability to justify the entire file at once ("full
justify", accessible via ^W^J)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1731 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-13 17:28:03 +00:00
David Lawrence Ramsey
9830d7500f add isblank() equivalent and use it instead of checking for (tab or
space) all over the code, properly detect whether we have strcasestr()
and only use nstristr() if we don't, and bump up CVS build requirements
to account for setting _GNU_SOURCE when running the test programs for
both


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1730 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-13 17:19:54 +00:00
David Lawrence Ramsey
71d0a1fab3 nanorc.sample updates: add missing mouse entry, and add backupdir and
mouse entries to the nanorc sample regexes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1729 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-08 00:06:15 +00:00
David Lawrence Ramsey
2c4c788477 fix more info page inaccuracies
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1728 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-07 18:00:20 +00:00
David Lawrence Ramsey
5aa39834aa disable "Where Is Next" in tiny mode
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1727 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-05 21:36:50 +00:00
David Lawrence Ramsey
a849ab12ea fix minor inconsistency
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1726 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-01 04:13:06 +00:00
David Lawrence Ramsey
0381c2199d clarifications to comments explaining exactly what control characters
and escape sequences are supported


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1725 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-01 01:21:38 +00:00
David Lawrence Ramsey
4b741b9c7b add DB's overhaul of regexp_init() and a few other regex-related bits,
and convert REGEXP_COMPILED to a static int in search.c, since it's only
used there


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1724 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-04-30 19:40:03 +00:00
David Lawrence Ramsey
d893fa946d add restricted mode, per IO ERROR's patch
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1723 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-04-30 04:49:02 +00:00
David Lawrence Ramsey
e5b2f83031 in edit_add(), do minor cosmetic reformatting and remove unused int
searched_later_lines


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1722 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-04-29 06:30:36 +00:00
David Lawrence Ramsey
d62b63492a remove another unused prototype
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1721 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-04-28 21:49:30 +00:00
David Lawrence Ramsey
b88234049d spell Christian Weisgerber's name right
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1720 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-04-27 21:06:11 +00:00
David Lawrence Ramsey
dc35cb8e16 use napms() instead of nanosleep(), as it does the same thing (aside
from taking an argument in milliseconds instead of microseconds) and
curses includes it


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1719 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-04-24 18:30:23 +00:00
David Lawrence Ramsey
0a25808f34 work around the NumLock glitch
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1718 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-04-23 18:02:37 +00:00
David Lawrence Ramsey
805547fed0 make the verbatim and escape sequence input routines use size_t's to
hold lengths, and use a properly cast nrealloc() instead of an uncast
realloc() in the former


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1717 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-04-22 03:41:04 +00:00
David Lawrence Ramsey
45108343c8 cosmetic changelog fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1716 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-04-21 23:04:55 +00:00
David Lawrence Ramsey
f38230ae6d a few more minor cleanups
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1715 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-04-21 22:25:16 +00:00
David Lawrence Ramsey
9be546b2f3 fix info page inaccuracies
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1714 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-04-20 19:19:21 +00:00
David Lawrence Ramsey
604caf3d6c DB's changes to do_delete(), and a few more minor bits
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1713 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-04-19 02:44:13 +00:00
David Lawrence Ramsey
07d3febe1b remove apparently unneeded leaveok() calls per DB's patch, and make a
few cosmetic cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1712 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-04-16 05:15:11 +00:00
David Lawrence Ramsey
e1e7cb250e fix debugging output in get_verbatim_kbinput()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1711 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-04-15 06:15:55 +00:00
David Lawrence Ramsey
edc1ea4c16 wrong place; signal_init() should be called after the input mode (cbreak
or raw) is set in order to work properly; also clarify related comments


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1710 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-04-07 01:07:50 +00:00
David Lawrence Ramsey
d7db0a6dbf the signal_init() should be called before the other input mode-changing
code in handle_sigwinch()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1709 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-04-07 00:51:41 +00:00
David Lawrence Ramsey
5520e85ee4 make sure the special control keys are handled the same way after a
continue or a window resize


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1708 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-04-07 00:44:35 +00:00
David Lawrence Ramsey
a3370c4232 miscellaneous fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1707 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-04-05 01:08:14 +00:00
David Lawrence Ramsey
befb25a4e6 Back to CVS
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1706 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-31 18:53:07 +00:00
David Lawrence Ramsey
f70f0cf6bd GNU nano 1.3.2
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1704 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-31 18:42:52 +00:00
David Lawrence Ramsey
44e7f82e0e minor tweaks; also remove the need for the JUSTIFY_MODE flag
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1703 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-30 04:17:10 +00:00
David Lawrence Ramsey
0b047c561d fix error in changelog and add missing size_t cast
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1702 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-29 23:09:08 +00:00
David Lawrence Ramsey
ce991bb3ad set the input mode before turning the keypad on, and don't turn the
keypad on in a window before that window's initialized (oddly, ncurses
didn't segfault on the latter, but slang did)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1701 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-29 18:36:39 +00:00
David Lawrence Ramsey
fd1768a902 minor bits
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1700 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-19 21:57:56 +00:00
David Lawrence Ramsey
1576d537a6 rename a few variables and make a few cosmetic cleanups
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1699 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-19 21:46:34 +00:00
David Lawrence Ramsey
7947544460 fix entry
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1698 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-19 20:47:57 +00:00
David Lawrence Ramsey
b977515bd7 avoid any more editbot-related segfaults by removing the last of the
references to it, as in DB's patch


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1697 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-19 02:15:42 +00:00
David Lawrence Ramsey
aca5d04f42 typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1696 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-19 01:35:57 +00:00
David Lawrence Ramsey
6aec4b85e6 fix potential memory corruption problems caused by passing answer in as
the value of def in statusq(), etc.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1695 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-15 20:26:30 +00:00
David Lawrence Ramsey
dc10ecbbd6 revert the Meta-P and Meta-N aliases for the paragraph searches for now;
Meta-P was being interpreted as such even when it was used for the
Prepend toggle at the writeout prompt


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1694 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-15 20:03:01 +00:00
David Lawrence Ramsey
b6aa42864e add DB's similar simplification of do_prev_word() too
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1693 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-14 01:42:17 +00:00
David Lawrence Ramsey
bf3c93e268 add DB's patch to simplify do_next_word() and remove references to
editbot in it so as to avoid a segfault


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1692 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-13 19:42:58 +00:00
David Lawrence Ramsey
c6908f28b7 minor bits
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1691 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-11 02:20:25 +00:00
David Lawrence Ramsey
58924035c8 minor comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1690 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-08 19:53:11 +00:00
David Lawrence Ramsey
2a464cb07d fix error I made when porting over DB's refactored search code: the
strstr() call used in forward case-sensitive searches was using the
wrong variable, which made all such searches fail


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1689 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-07 21:16:18 +00:00
David Lawrence Ramsey
35557c555c change instances of "int main ()" to "int main(void)"
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1688 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-07 15:14:56 +00:00
David Lawrence Ramsey
221ebcdf70 remove trailing space
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1687 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-05 20:47:15 +00:00
David Lawrence Ramsey
da35251e98 wrap one reference to NANO_EXTCMD_KEY in a NANO_SMALL #ifdef
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1686 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-05 20:04:44 +00:00
David Lawrence Ramsey
a9cd41c42d minor comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1685 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-05 19:54:58 +00:00
David Lawrence Ramsey
37be3edebc remove redundant line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1684 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-05 03:14:52 +00:00
David Lawrence Ramsey
5ae684fc81 TODO update: clarify the paragraph searching item, and add item for
filename searches in the file browser


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1683 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-04 23:48:26 +00:00
David Lawrence Ramsey
d7f5ad9786 add function key aliases for NANO_FIRSTLINE_KEY and NANO_LASTLINE_KEY,
and make sure statusbar input handles both them and NANO_HELP_FKEY
properly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1682 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-04 19:30:53 +00:00
David Lawrence Ramsey
a619ae69bf Tom Bates' nsr-tandem-nsk port, plus a few tweaks of mine, take 2
(according to comments, including floss.h in nano.h does work)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1681 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-04 06:33:52 +00:00
David Lawrence Ramsey
8911e235ba revert the tweaked nsr-tandem-nsk port for now, pending further comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1680 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-03 06:00:22 +00:00
David Lawrence Ramsey
ce364e2a57 minor capitalization fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1679 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-03 01:25:46 +00:00
David Lawrence Ramsey
ea43a1dbca cosmetic #ifdef tweak
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1678 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-02 22:52:57 +00:00
David Lawrence Ramsey
b34c683f3f Tom Bates' nsr-tandem-nsk port, plus a few tweaks of mine
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1677 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-02 21:31:31 +00:00
David Lawrence Ramsey
ba7b1681a2 set the associated function for unjustify to 0 instead of
do_uncut_text(), since it's currently unused


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1676 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-29 20:07:14 +00:00
David Lawrence Ramsey
588ca6b79e fix typo
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1675 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-28 16:30:28 +00:00
David Lawrence Ramsey
04e42a6bcc Martin Ehmsen's backup directory patch, with a few minor changes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1674 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-28 16:24:31 +00:00
David Lawrence Ramsey
6a2877d399 add another blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1673 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-28 02:08:15 +00:00
David Lawrence Ramsey
81e157cd38 fix too-long line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1672 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-28 01:58:21 +00:00
David Lawrence Ramsey
807681ac7e add blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1671 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-27 20:50:01 +00:00
David Lawrence Ramsey
281e0563c6 decouple the paragraph searching code and the justification code
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1670 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-27 18:54:04 +00:00
David Lawrence Ramsey
95b7bdbdb0 minor cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1669 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-27 03:21:23 +00:00
David Lawrence Ramsey
24ae56cd4b a few minor cleanups
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1668 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-27 03:06:28 +00:00
David Lawrence Ramsey
60b942c64f minor comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1667 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-26 21:09:28 +00:00
David Lawrence Ramsey
b55e382dfc move the leaveok() calls back to edit_refresh() from update_line()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1666 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-25 06:25:12 +00:00
David Lawrence Ramsey
3af54d3ff5 remove the redundant filestat() and replace it with stat() in the one
place it's called


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1665 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-25 04:43:27 +00:00
David Lawrence Ramsey
37853fd4ce and update the dates on the documentation
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1664 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-25 04:01:33 +00:00
David Lawrence Ramsey
475a2a7410 clarify the -T/--tabsize option in the documentation too
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1663 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-25 03:58:46 +00:00
David Lawrence Ramsey
a7c9364641 clarify the description of -T/--tabsize a bit in usage(), and add extra
{}'s to sunder() and unsunder() to make them a bit easier to read


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1662 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-25 03:19:29 +00:00
David Lawrence Ramsey
f5300af90a only include time.h in winio.c if NANO_EXTRA is defined, since we only
need it for nanosleep() in do_credits()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1661 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-24 20:48:12 +00:00
David Lawrence Ramsey
1044d74fd3 add DB's refactored search code and a few of his minor display code
changes, plus a few minor search and display fixes of mine


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1660 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-24 20:41:39 +00:00
Jordi Mallach
656dd9c7eb Updated Malay translation by Sharuzzaman Ahmat Raslan.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1657 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-24 14:01:20 +00:00
David Lawrence Ramsey
369732ff81 handle pending sigwinches better, etc.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1652 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-16 20:32:40 +00:00
David Lawrence Ramsey
795a16b959 add more intuitive Meta-key aliases for ^W^W and ^W^O
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1651 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-07 05:03:25 +00:00
David Lawrence Ramsey
b7e5cf6538 fix comment inaccuracy
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1650 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-07 03:39:48 +00:00
David Lawrence Ramsey
d390dd8ea7 minor cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1649 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-07 03:38:02 +00:00
David Lawrence Ramsey
815cba87e5 forgot a cast
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1648 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-07 03:07:01 +00:00
David Lawrence Ramsey
cb34a67ea1 make the saving of marked status in open_files->file_flags work properly
again; a tweak to the ISSET() macro in 1.3.0 to make it only return 0 or
1 broke it


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1647 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-06 21:20:05 +00:00
David Lawrence Ramsey
ee383dbd6c get_verbatim_kbinput() should use an int*, not a char*, for consistency
with get_kbinput()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1646 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-06 03:07:10 +00:00
David Lawrence Ramsey
1bc9219beb one last minor comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1645 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-03 17:36:55 +00:00
David Lawrence Ramsey
00c2054780 don't allow verbatim input in view mode
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1644 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-01 06:27:59 +00:00
David Lawrence Ramsey
250267777c minor comment clarification
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1643 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-31 16:43:20 +00:00
David Lawrence Ramsey
be66a6b078 fix minor FAQ inaccuracy
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1642 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-30 21:31:57 +00:00
David Lawrence Ramsey
53809440f3 and switch to cbreak mode in handle_sigwinch() too
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1641 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-30 04:29:52 +00:00
David Lawrence Ramsey
273d2ce2d5 set keypad() to TRUE in handle_sigwinch() in case we resize during
verbatim input, and fix backwards _POSIX_VDISABLE #ifdefs so that raw()
and cbreak() are called properly in get_verbatim_kbinput()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1640 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-30 04:20:28 +00:00
David Lawrence Ramsey
c91696e6df add function key alias for unjustify
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1639 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-29 04:16:23 +00:00
David Lawrence Ramsey
d03216a1ac use raw mode in get_verbatim_kbinput(), so that we don't have to deal
with interrupt-generating keys there


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1638 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-28 18:21:21 +00:00
David Lawrence Ramsey
58f6d836d9 set keypad() to FALSE while reading in verbatim input, to deal with a
bit of xterm weirdness, and update a few keypad-related comments


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1637 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-27 07:12:47 +00:00
David Lawrence Ramsey
2897d2b8b8 actually block SIGQUIT in signal_init()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1636 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-26 20:56:20 +00:00
David Lawrence Ramsey
0ee54d9fb2 comment accuracy fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1635 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-26 20:18:52 +00:00
David Lawrence Ramsey
1eadebe21f minor capitalization fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1634 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-25 21:36:38 +00:00
David Lawrence Ramsey
35961c4252 add the ability to spell-check only marked text when the mark is on
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1633 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-23 19:34:03 +00:00
David Lawrence Ramsey
c2c5a51e52 add support for escape sequences for F1-F14 where conflicts don't occur
(and resurrect abcd() to make that job easier), additional comments, and
a few minor cosmetic cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1632 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-23 19:26:17 +00:00
David Lawrence Ramsey
66081d4e70 consistency tweak for get_page_start()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1631 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-22 07:25:31 +00:00
David Lawrence Ramsey
fdece4621f add explanatory comment to do_credits()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1630 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-19 18:15:03 +00:00
David Lawrence Ramsey
250613665f don't use "kbinput = wgetch(win)" as a switch value in
get_accepted_kbinput()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1629 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-16 19:12:46 +00:00
David Lawrence Ramsey
70bd6e0dcb and document my tweak to do_writeout() from before
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1628 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-15 16:08:42 +00:00
David Lawrence Ramsey
41151ac50d add DB's fix for a do_replace_loop() segfault
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1627 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-15 05:47:03 +00:00
David Lawrence Ramsey
3e3fab5a0f wrt DB's overhaul of the cutting code and related file-writing code:
document the changes to the latter (in write_file() and do_writeout())
in the Changelog; I stupidly forgot to do this before


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1626 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-15 05:12:41 +00:00
David Lawrence Ramsey
62187d9ced remove other spurious "L"
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1625 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-14 22:45:05 +00:00
David Lawrence Ramsey
9da0831dbf remove spurious "L"
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1624 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-14 22:40:38 +00:00
David Lawrence Ramsey
e97c8d5918 use nanosleep() instead of usleep(); the latter is only standard under
BSD, whereas the former is POSIX compliant


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1623 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-14 19:26:29 +00:00
David Lawrence Ramsey
9591ee5d0a typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1622 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-14 16:51:06 +00:00
David Lawrence Ramsey
760a2dc9b2 if color support is enabled, we only need to call edit_refresh() to
properly paint multi-line color regexes when COLOR_SYNTAX is set


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1621 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-14 06:38:00 +00:00
David Lawrence Ramsey
c53a92d973 on systems that need raw(), call it once instead of every time through
the input/output loop in main()


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1620 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-12 03:28:06 +00:00
David Lawrence Ramsey
d5be947021 remove a few more unneeded spaces
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1619 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-10 06:12:04 +00:00
David Lawrence Ramsey
f0b3009400 minor fixes for the README
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1618 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-10 06:02:05 +00:00
David Lawrence Ramsey
606dfda47a Back to CVS
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1617 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-09 23:26:54 +00:00
David Lawrence Ramsey
fa1497b38f GNU nano 1.3.1
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1615 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-09 23:22:02 +00:00
David Lawrence Ramsey
6481c3fb2d update the year in do_credits() too
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1614 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-09 23:06:54 +00:00
David Lawrence Ramsey
f28f50e6b5 update the copyright years on the source files to 2004 (adding a few
minor comment tweaks so that all the source files are covered)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1613 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-09 23:04:55 +00:00
David Lawrence Ramsey
f8ddf31bfb remove now-unnecessary initialization of kbinput in main()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1612 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-09 22:38:09 +00:00
David Lawrence Ramsey
9e45a47054 add formatting and typo fixes for NEWS, and add version numbers (minus
"-cvs" suffixes) to the manpages


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1611 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-06 17:12:28 +00:00
David Lawrence Ramsey
9b5bd42978 minor comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1610 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-06 01:45:04 +00:00
David Lawrence Ramsey
47162bc428 add verbatim input question and a few minor fixes to the faq
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1609 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-05 19:01:53 +00:00
David Lawrence Ramsey
e190ff30f2 find all beginning-of-line and/or end-of-line regexes once per line, not
just the zero-length ones; this fixes multiple replaces occurring with
them in conjunction with "*"


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1608 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-03 21:42:25 +00:00
David Lawrence Ramsey
afb75f22b2 clean up a bit of weirdness in do_replace_loop()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1606 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-12-29 02:15:23 +00:00
David Lawrence Ramsey
32559294e8 comment addition, minor cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1605 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-12-28 03:56:04 +00:00
David Lawrence Ramsey
c2946fbe09 typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1603 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-12-24 21:47:28 +00:00
David Lawrence Ramsey
2a4ab6d29d and wrap the zero-length regex displaying code in a HAVE_REGEX_H #define
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1602 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-12-24 08:29:49 +00:00
David Lawrence Ramsey
76c4b33ef4 display a highlighted space for zero-length regex matches, so that we
have a reference point when we're replacing them


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1601 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-12-24 08:17:54 +00:00
David Lawrence Ramsey
8213850df6 add DB's overhaul of the cutting code and related file-writing code, his
fixes to check_operating_dir(), and a few minor cleanups and fixes of
mine


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1600 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-12-24 08:03:54 +00:00
David Lawrence Ramsey
f427694400 the last of the low-level input overhaul: make the global shortcut list
use NANO_NO_KEY to represent no key value, add the NANO_HISTORY_KEY
sentinel value, add support for many more escape sequences for those
terminals that generate them, add DB's extensibility tweaks to
do_yesno(), make ASCII 128 act like Backspace when -d is used, add
various cleanups to the low-level input functions, and make the last of
the low-level input routines use the new low-level input functions


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1599 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-12-24 03:33:09 +00:00
David Lawrence Ramsey
18394ac621 fix search/replace misbehaviors for good (I hope)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1598 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-12-24 03:13:44 +00:00
David Lawrence Ramsey
d29146040b minor redundancy fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1597 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-11-30 02:22:22 +00:00
David Lawrence Ramsey
a593f538dd another low-level input overhaul: split out low-level mouse input,
remove references to ncurses key values from the global shortcut list
and restructure it to specify function key values when needed, hook up
verbatim input to the edit window, and do a few miscellaneous cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1596 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-11-28 19:47:42 +00:00
David Lawrence Ramsey
45cfbece4c replace the old fix for infinite regex replacement loops with something
that works better and is less hackish


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1595 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-11-28 16:04:24 +00:00
Jordi Mallach
895e65ce1a Updated Romanian translation by Laurentiu Buzdugan.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1594 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-11-25 11:30:05 +00:00
David Lawrence Ramsey
4dca76f2e9 add check for glib 2.x
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1592 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-11-20 00:15:52 +00:00
David Lawrence Ramsey
82a8f91392 minor tabbing fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1591 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-11-20 00:14:16 +00:00
David Lawrence Ramsey
bc503c80db don't prompt if we're saving only a selection of a file under a
different name


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1590 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-11-19 23:59:14 +00:00
Jordi Mallach
a5d8e54ab9 Added Danilo Segan (Serbian).
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1589 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-11-06 10:47:44 +00:00
Jordi Mallach
10dd6c7714 Added Serbian translation (Danilo Segan).
Recoded ChangeLog to UTF-8.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1586 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-11-06 10:39:38 +00:00
David Lawrence Ramsey
4e25410680 minor cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1585 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-11-05 22:04:08 +00:00
David Lawrence Ramsey
637f6e50c0 update nano.spec.in for the 1.3 branch
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1584 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-11-04 18:34:44 +00:00
David Lawrence Ramsey
7776ef9149 work around problem with Backspace's generating ASCII 127 on Linux
sometimes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1583 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-11-04 18:32:35 +00:00
David Lawrence Ramsey
8fa1976796 allow WHEREIS_NEXT_KEY to be used in view mode
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1582 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-11-03 00:13:21 +00:00
David Lawrence Ramsey
7127857924 prompt before saving the current file under a different name
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1581 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-10-31 17:58:44 +00:00
David Lawrence Ramsey
b7cb6a38c8 avoid infinite loop when doing a forward regex replace of "$"
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1580 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-10-31 17:53:38 +00:00
Jordi Mallach
b78649b664 Patch from Martin-Eric Racine <q-funk@pp.fishpool.fi> to accept "Yy" and "Nn" as well as the Finnish letters in Yes/No prompts.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1579 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-10-30 13:10:32 +00:00
David Lawrence Ramsey
95114c1bc4 Back to CVS
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1577 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-10-23 01:09:43 +00:00
David Lawrence Ramsey
133f7b16ea GNU nano 1.3.0
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1575 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-10-22 17:15:12 +00:00
David Lawrence Ramsey
8bbd1eb89f minor comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1574 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-10-22 16:27:18 +00:00
David Lawrence Ramsey
f6cf4a7d7c avoid having duplicate case values when some key values are missing
(assume ERR is -1 when doing so)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1573 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-10-22 16:20:47 +00:00
David Lawrence Ramsey
13dfdb2493 document the setting of EXTRA_DIST
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1572 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-10-22 15:37:13 +00:00
David Lawrence Ramsey
699412175d set EXTRA_DIST so that 'make dist" and "make distcheck" actually include
the manual pages and their HTML versions


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1571 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-10-22 15:36:15 +00:00
Jordi Mallach
3a420879d6 Create html manpages when building nano.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1570 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-10-19 23:30:48 +00:00
David Lawrence Ramsey
c1f630e914 SunOS 5.9 doesn't define KEY_RESIZE either
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1569 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-10-18 20:21:52 +00:00
Jordi Mallach
5f34d6e3b0 Updated Catalan translation.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1568 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-10-18 10:59:55 +00:00
David Lawrence Ramsey
25307257c9 Changelog update: fix problem with KEY_RESIZE's not being defined on
SunOS 5.7 and 5.8


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1567 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-10-10 04:42:48 +00:00
David Lawrence Ramsey
bb7e2cbfad fix problem with KEY_RESIZE's not being defined on SunOS 5.7 and 5.8
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1566 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-10-10 04:38:17 +00:00
David Lawrence Ramsey
f5b256bb9f miscellaneous #define cleanups
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1565 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-10-03 20:26:25 +00:00
David Lawrence Ramsey
4dcd070cdf fix problems with the marking highlight's being drawn improperly in some
cases


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1564 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-10-03 04:20:28 +00:00
David Lawrence Ramsey
0362c58b37 add missing set of parentheses
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1563 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-09-30 03:31:56 +00:00
David Lawrence Ramsey
99bede34e7 have nano handle SIGHUP/SIGTERM properly when it's suspended
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1562 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-09-29 07:21:11 +00:00
David Lawrence Ramsey
2dd7ed14bc a few last missing minor bits of DB's refactored display code
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1561 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-09-29 05:15:24 +00:00
David Lawrence Ramsey
f03c78b382 DB's minor efficiency tweak for do_mark()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1560 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-09-28 21:26:49 +00:00
David Lawrence Ramsey
5dcba30395 a few missing minor bits of DB's refactored display code
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1559 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-09-28 19:15:18 +00:00
David Lawrence Ramsey
7bf00de84f set fileformat back to 0 after reading in a file to prevent erroneous
conversion messages from showing up when we read in more files


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1558 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-09-23 04:25:05 +00:00
David Lawrence Ramsey
a3831ab2b8 minor cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1557 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-09-22 16:26:40 +00:00
David Lawrence Ramsey
f0b7dcaa99 remove abcd(); the low-level input overhaul left it unused
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1556 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-09-22 15:46:21 +00:00
David Lawrence Ramsey
9eff7465d9 all our memmove() function calls work on char*'s, so we can use the
charmove() macro for them instead


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1554 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-09-16 02:04:00 +00:00
David Lawrence Ramsey
da8fd8f894 a few minor fixes for low-level keyboard input
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1553 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-09-16 01:22:31 +00:00
David Lawrence Ramsey
5ffbec56f6 port over some of DB's refactored display code, most importantly the
display_string() function, and convert some parts of nano to use it


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1552 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-09-16 01:16:49 +00:00
Jordi Mallach
b23554fa25 2003-09-12 Jordi Mallach <jordi@gnu.org>
* POTFILES.in: Updated path to sources.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1551 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-09-12 00:25:04 +00:00
David Lawrence Ramsey
1356a0a72d change enum "topmidbotnone" to "topmidnone", since we no longer have a
BOTTOM option


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1550 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-09-10 20:31:02 +00:00
David Lawrence Ramsey
c97acfb2d6 since the SAMELINEWRAP flag is only used in nano.c, convert it to a
static int there and free up space for one more flag; also make a few
misc. cleanups involving #ifdefs


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1549 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-09-10 20:08:00 +00:00
David Lawrence Ramsey
14509a3aa2 capitalize one last rcfile message I missed before
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1548 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-09-10 17:15:12 +00:00
David Lawrence Ramsey
7f47d42289 don't let the user type in ASCII 127 at the statusbar prompt
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1547 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-09-08 18:01:49 +00:00
David Lawrence Ramsey
d91ab6e912 DB's movement code overhaul (smooth paging, etc.) with a few of my fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1546 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-09-07 23:57:24 +00:00
David Lawrence Ramsey
dc9c40a56d Brand Huntsman's improved nanorc regexes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1545 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-09-07 23:54:57 +00:00
David Lawrence Ramsey
e0a9f50a64 fix slang compilation problem
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1544 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-09-07 05:32:24 +00:00
Jordi Mallach
298b975264 Major package reorganization:
- Move code to src/.
- Move docs to doc/:
  + texi doc to doc/texinfo/
  + original manual pages to doc/man/
  + translated manual pages to doc/man/xx/


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1543 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-09-07 00:44:12 +00:00
David Lawrence Ramsey
417b03a4c3 make sure the "historylog" option isn't included in tiny mode
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1542 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-09-06 21:44:37 +00:00
David Lawrence Ramsey
21cc550752 minor nanorc.sample fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1541 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-09-06 19:04:02 +00:00
David Lawrence Ramsey
3bd9628b38 minor rcfile fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1540 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-09-06 05:09:32 +00:00
David Lawrence Ramsey
74ea836fcc slightly simplify paragraph searching code
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1539 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-09-04 23:22:47 +00:00
David Lawrence Ramsey
8faf305d0c add paragraph searching ability
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1538 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-09-04 20:25:29 +00:00
Jordi Mallach
954b00de74 Updated French translation by Jean-Philippe Guérard.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1537 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-09-01 21:54:27 +00:00
David Lawrence Ramsey
79c849a4a9 fix indentation of a label
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1536 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-09-01 16:34:12 +00:00
David Lawrence Ramsey
cb7ee0e491 one last documentation fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1535 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-08-31 17:08:59 +00:00
David Lawrence Ramsey
aaad3af523 documentation updates
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1534 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-08-31 16:44:10 +00:00
David Lawrence Ramsey
ec290f2385 fix bug where calculated filename space on the titlebar is short by one
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1533 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-08-30 19:05:40 +00:00
David Lawrence Ramsey
27863665ca fix Meta-X's turning the keypad off under ncurses
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1532 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-08-29 21:31:37 +00:00
David Lawrence Ramsey
ba6fd42b3c move line wrapping toggle entry to global.c
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1531 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-08-23 21:16:02 +00:00
David Lawrence Ramsey
e04970675f Wouter van Hemel's "Where Is Next" patch
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1530 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-08-23 21:11:06 +00:00
Jordi Mallach
222feaa953 Updated Turkish translation by A. Murat EREN.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1526 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-08-17 19:41:07 +00:00
David Lawrence Ramsey
10187610f8 minor changelog fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1525 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-08-17 05:40:45 +00:00
David Lawrence Ramsey
a9cebd8054 remove unneeded breaks at the ends of default: clauses
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1524 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-08-17 03:31:57 +00:00
David Lawrence Ramsey
4d7c260270 low-level input overhaul
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1523 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-08-17 02:48:43 +00:00
Chris Allegretta
f3fee5db91 Update the ChangeLog too
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1522 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-08-12 02:40:47 +00:00
Chris Allegretta
21599f805b Update stable/development series maintainership in the AUTHORS file
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1519 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-08-12 02:37:01 +00:00
Chris Allegretta
6954f05276 add 1.3 fork info, change version to 1.2.99-cvs
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1518 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-08-12 02:34:03 +00:00
Chris Allegretta
194c26f879 Back to CVS
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1517 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-08-12 02:01:17 +00:00
Chris Allegretta
3364214200 GNU nano 1.2.2 release
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1515 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-08-12 01:49:20 +00:00
Chris Allegretta
c30fc242c3 - winio.c:nanogetstr() - Fix problem where pressing down,up,down does not blank the search prompt but keeps the previous search (DLR)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1514 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-08-11 00:32:45 +00:00
Jordi Mallach
66d60099a2 Updated Catalan translation.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1513 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-08-05 21:39:12 +00:00
Jordi Mallach
f9390afbd1 Remove gettext marks from debug messages.
Add translator comments for short statusbar messages.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1512 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-08-05 19:31:12 +00:00
Chris Allegretta
4f5335d93e Add DLR's excellent workaround for strcasecmp not being available
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1511 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-08-04 02:51:12 +00:00
Chris Allegretta
653d614439 Use DLR's home/end patch instead of mine, because it's cleaner and remove some unneeded code in do_help()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1510 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-08-04 02:12:03 +00:00
Chris Allegretta
13f094e80e - winio.c:nanogetstr() - Add handler for Alt-[-H and F as home and end when -K is used. Basically a workaround until a cleaner way can be found.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1509 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-08-04 00:59:27 +00:00
David Lawrence Ramsey
6d97d18fba faq update for inability to see color when nano is compiled w/color support
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1508 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-07-02 14:20:11 +00:00
David Lawrence Ramsey
b764eb6663 a few more manpage fixes, and a resync of their html versions
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1507 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-06-29 02:25:46 +00:00
David Lawrence Ramsey
70047eef7d miscellaneous cleanups, updates, and fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1506 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-06-14 20:41:34 +00:00
Jordi Mallach
d995e9a762 More formatting fixes for nanorc.5 from Jean-Philippe.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1505 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-06-11 16:38:35 +00:00
Jordi Mallach
9e74ade187 Add Geir Helland to THANKS.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1504 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-06-11 15:52:34 +00:00
Jordi Mallach
a1475aedd2 Updated Norwegian bokmal translation by Geir Helland.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1503 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-06-11 15:50:58 +00:00
Jordi Mallach
5b63eafd83 Formatting fixes for nano.1 from Jean-Philippe.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1502 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-06-11 10:17:20 +00:00
Jordi Mallach
67fa8935aa More French updates.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1501 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-06-10 14:35:19 +00:00
Jordi Mallach
b111f57082 Updated French translation by Jean-Philippe Guérard.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1500 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-06-10 13:12:49 +00:00
Jordi Mallach
023e9cda99 Updated German translation by Michael Piefel.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1499 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-06-02 12:34:57 +00:00
Jordi Mallach
4654cd19bd Updated Malay translation by Sharuzzaman Ahmat Raslan.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1498 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-05-06 14:02:44 +00:00
Jordi Mallach
2e6d0ca131 Added Laurentiu Buzdugan, for Romanian.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1497 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-04-24 18:23:56 +00:00
Jordi Mallach
d8ce36e6e1 Added "ro" (Romanian).
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1496 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-04-24 18:21:38 +00:00
Jordi Mallach
cccc511fef New Romanian translation and Indonesian update.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1495 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-04-24 18:20:11 +00:00
Chris Allegretta
ffe575f509 Back to CVS
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1494 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-04-20 16:25:46 +00:00
91 changed files with 45611 additions and 31178 deletions

View File

@@ -11,6 +11,7 @@ config.h
config.h.in
config.log
config.status
config.rpath
configure
config.guess
config.sub
@@ -18,10 +19,7 @@ depcomp
install-sh
missing
mkinstalldirs
nano
nano.info
nano.spec
stamp-h
stamp-h.in
stamp-h1
texinfo.tex

26
AUTHORS
View File

@@ -1,10 +1,16 @@
$Id$
This file lists people who have made significant contribution to the nano
editor. Please see the ChangeLog for specific changes by author.
This file lists people who have made significant contribution to the
nano editor. Please see the ChangeLog for specific changes by author.
-------------------------------------------------------------------------
Chris Allegretta <chrisa@asty.org>
* Main program author and maintainer.
* Original program author, stable series maintainer.
David Lawrence Ramsey <pooka_regent@sluggy.net>
* Development series maintainer. Multiple buffer support,
operating dir (-o) option, bug fixes for display routines,
wrapping code, spelling fixes, const mode, parts of the UTF-8
support, and various other fixes.
Jordi Mallach <jordi@sindominio.net>
* Debian package maintainer, fellow bug squasher.
@@ -21,15 +27,11 @@ Robert Siemborski <rjs3@andrew.cmu.edu>
edit display routines.
Rocco Corsi <rocco.corsi@sympatico.ca>
* Internal spelling code, many optimizations and bug fixes for
findnextstr and search-related functions, various display and
file handling fixes.
David Lawrence Ramsey <pooka_regent@sluggy.net>
* Multiple buffer support, operating dir (-o) option, bug fixes
for display routines, wrapping code, spelling fixes, const
mode and various other fixes.
* Internal spelling code, many optimizations and bug fixes for
findnextstr() and search-related functions, various display
and file handling fixes.
David Benbennick <dbenbenn@math.cornell.edu>
* Wrap and justify bugfixes/enhancements, new color syntax
code, memleak fixes and other miscellaneous fixes.
code, memleak fixes, parts of the UTF-8 support, and other
miscellaneous fixes.

2853
ChangeLog

File diff suppressed because it is too large Load Diff

View File

@@ -1,36 +1,10 @@
## $Id$
AUTOMAKE_OPTIONS = gnu no-dependencies
DEFS= -DSYSCONFDIR=\"$(sysconfdir)\"
SUBDIRS = doc m4 po src
bin_PROGRAMS = nano
nano_SOURCES = color.c \
cut.c \
files.c \
global.c \
move.c \
nano.c \
nano.h \
proto.h \
rcfile.c \
search.c \
utils.c \
winio.c
man_MANS = nano.1 nanorc.5
nano_LDADD = @GLIB_LIBS@ @LIBINTL@
info_TEXINFOS = nano.texi
MAKEINFO = makeinfo --no-split
EXTRA_DIST = ABOUT-NLS AUTHORS BUGS COPYING ChangeLog INSTALL NEWS \
README THANKS TODO UPGRADE config.rpath install-sh missing \
mkinstalldirs nano.1.html nanorc.5.html faq.html \
nanorc.sample nano.spec $(man_MANS)
SUBDIRS = po m4
localedir = $(datadir)/locale
INCLUDES = -Iintl -DLOCALEDIR=\"$(localedir)\" -I@includedir@
EXTRA_DIST = ABOUT-NLS AUTHORS BUGS COPYING ChangeLog INSTALL NEWS \
README THANKS TODO UPGRADE config.rpath install-sh \
missing mkinstalldirs nano.spec
ACLOCAL_AMFLAGS = -I m4

1006
NEWS

File diff suppressed because it is too large Load Diff

46
README
View File

@@ -7,19 +7,20 @@ Overview
wonderfully easy-to-use and friendly Pico text editor.
First and foremost is its license: the Pine suite does not use the
GPL or a GPL-friendly license, and has unclear restrictions on
redistribution. Because of this, Pine and Pico are not included with
many GNU/Linux distributions. Also, other features (like goto line
number or search and replace) were unavailable until recently or
require a command line flag. Yuck.
GPL or a GPL-friendly license, and has unclear restrictions on
redistribution. Because of this, Pine and Pico are not included
with many GNU/Linux distributions. Also, other features (like goto
line number or search and replace) were unavailable until recently
or require a command line flag. Yuck.
nano aims to solve these problems by emulating the functionality of
Pico as closely as possible while addressing the problems above and
perhaps providing other extra functionality.
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.
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.
How to compile and install nano
Download the nano source code, then:
@@ -28,37 +29,40 @@ How to compile and install nano
./configure
make
make install
It's that simple. Use --prefix with configure to override the
It's that simple. Use --prefix with configure to override the
default installation directory of /usr/local.
Web Page
http://www.nano-editor.org
http://www.nano-editor.org/
Mailing List and Bug Reports
Savannah hosts all the nano-related mailing-lists.
+ info-nano@gnu.org is a very low traffic list
used to announce new Nano versions or other important information
about the project.
used to announce new nano versions or other important
information about the project.
+ help-nano@gnu.org is for those seeking to get help without
wanting to hear about the technical details of its
development.
+ nano-devel@gnu.org is the list used by the people
that make Nano and a general development discussion list, with
that make nano and a general development discussion list, with
moderate traffic.
To subscribe, send email to nano-<name>-request@gnu.org
with a subject of "subscribe", where <name> is the list you want to
To subscribe, send email to nano-<name>-request@gnu.org with a
subject of "subscribe", where <name> is the list you want to
subscribe to.
For general bug reports, send a description of the problem to
nano@nano-editor.org or directly to the development list.
Current Status
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.
GNU nano has reached its second stable milestone, 1.2.x.
Development of new features continues in the 1.3.x branch, while
1.2.x versions are dedicated to bug-fixing and polishing.
Chris Allegretta (chrisa@asty.org)

View File

@@ -1,38 +1,46 @@
INSTRUCTIONS TO COMPILE AND INSTALL NANO CVS VERSIONS
-----------------------------------------------------
GNU nano is available from CVS, but building this needs a bit
more care than the official stable and unstable tarballs.
GNU nano is available from CVS, but building this needs a bit more care
than the official stable and unstable tarballs.
To successfully compile GNU nano from CVS, you'll need the
following packages:
To successfully compile GNU nano from CVS, you'll need the following
packages:
- autoconf (version >= 2.52)
- automake (version >= 1.6, 1.7.x recommended)
- autoconf (version >= 2.54)
- automake (version >= 1.7)
- gettext (version >= 0.11.5)
- groff
- texinfo
- cvs
- glib (if your system doesn't have snprintf() and/or vsnprintf())
- make, gcc and the normal development libraries (ncurses, etc)
These should be available on your GNU mirror.
- ssh (with support for the SSH version 2 protocol)
- glib 2.x (if your system doesn't have snprintf() and/or vsnprintf())
- make, gcc and the normal development libraries (curses or slang, etc.)
These should be available on your GNU mirror. Note that you'll need a
version of curses or slang with wide character support if you want nano
to use UTF-8.
To download the CVS tree, execute the following command:
$ cvs -z3 -d:pserver:anoncvs@subversions.gnu.org:/cvsroot/nano login
and press enter at the password prompt.
Then, do
$ cvs -z3 -d:pserver:anoncvs@subversions.gnu.org:/cvsroot/nano checkout nano
and the nano tree will download.
If you want to checkout the stable CVS branch, append -r nano_1_0_branch:
$ cvs -z3 -d:pserver:anonymous@subversions.gnu.org:/cvsroot/nano checkout -r nano_1_0_branch nano
First, you need to set up cvs to download the CVS tree using ssh. If
you're using a Bourne shell (e.g. bash or sh), do
$ export CVS_RSH=ssh
If you're using a C shell (e.g. tcsh or csh), do
$ setenv CVS_RSH ssh
After it's set up, use the following command to download the CVS tree:
$ cvs -z3 -d:ext:anoncvs@savannah.gnu.org:/cvsroot/nano checkout nano
If you want to download the stable CVS branch, add "-r nano_1_2_branch":
$ cvs -z3 -d:ext:anoncvs@savannah.gnu.org:/cvsroot/nano checkout -r nano_1_2_branch nano
Once you have the sources in the "nano" directory, cd into it, and
execute the "autogen.sh" script in the top dir. This will setup a
configure script and Makefile.in, and you will be ready to compile with
execute the "autogen.sh" script in the top directory. This will set up
a configure script and Makefile.in, and you will be ready to compile
with
$ ./configure [--add-options-here] && make
Once it's done compiling,
$ make install
(as root) should put the required files in their respective directories.
Please submit any bugs in the CVS branch to nano-devel@gnu.org.

8
THANKS
View File

@@ -2,13 +2,16 @@ The following people have helped GNU nano in some way or another.
If we missed you here, let us know!
Sharuzzaman Ahmat Raslan <sharuzzaman@excite.com>
Bahasa Melayu translator
Malay translator
Laurentiu Buzdugan <buzdugan@voyager.net> Romanian translator
CHAO Wei-Lun <chaoweilun@pcmail.com.tw> Traditional Chinese translator
Ricardo Cárdenes Medina <ricardo@conisys.com> Spanish translator
Marco Colombo <magicdice@inwind.it> Italian translator
Karl Eichwalder <keichwa@gmx.net> German translator
Doruk Fisek <dfisek@fisek.com.tr> Turkish translator
Jean-Philippe Guérard <jean-philippe.guerard@laposte.net>
French translator
Geir Helland Norwegian bokmål translator
Tedi Heriyanto <tedi_h@gmx.net> Indonesian translator
Václav Haisman <V.Haisman@sh.cvut.cz> Czech translator
Szabolcs Horvath <horvaths@janus.gimsz.sulinet.hu>
@@ -26,6 +29,7 @@ Sergey A. Ribalchenko <fisher@obu.ck.ua> Russian, Ukrainian translator
Michel Robitaille <robitail@IRO.UMontreal.CA> French translator
Christian Rose <menthos@menthos.com> Swedish translator
Stig E Sandoe <stig@ii.uib.no> Norwegian bokmål translator
Danilo Segan <dsegan@gmx.net> Serbian translator
Keld Simonsen <keld@dkuug.dk> Danish translator
Guus Sliepen <guus@nl.linux.org> Dutch translator
Cezary Sliwa <sliwa@cft.edu.pl> Polish translator
@@ -33,6 +37,7 @@ Pierre Tane <tanep@bigfoot.com> French translator
Jacobo Tarrío <jtarrio@trasno.net> Galician translator
Kjetil Torgrim Homme <kjetilho@linpro.no> Norwegian nynorsk translator
Miquel Vidal <miquel@sindominio.net> Catalan translator
Phan Vinh Thinh <teppi82@gmail.com> Vietnamese translator
Pauli Virtanen <pauli.virtanen@saunalahti.fi> Finnish translator
Peio Ziarsolo <peio@sindominio.net> Basque translator
@@ -49,5 +54,4 @@ Jeremy Robichaud <robicj@yahoo.com> Beta tester
Bill Soudan <wes0472@rit.edu> Regex code, etc
Ken Tyler <kent@werple.net.au> Search fixes and more
$Id$

42
TODO
View File

@@ -1,34 +1,40 @@
TODO file (? means the feature may be implemented, but not definitely)
-----------------------------------------------------------------------------
For version 1.4:
- UTF-8 support. [DONE]
- Support for paragraph searches. [DONE]
- Support for justifying the entire file at once. [DONE]
- Support for filename searches in the file browser.
- Undo/Redo keys?
- Rebindable keys?
- Keystroke to implement "Add next sequence as raw" like vi's ^V. [DONE]
- Spell check selected text only. [DONE]
- Make "To Line" (^W^T) and "Read from Command" (^R^X) reenter their
parent menu when their keystroke is entered a second time (^W^T^T and
(^R^X^X) (requires figuring out when to keep cursor position and when
not to). [DONE]
- Fix resetstatuspos global which we shouldn't have. [DONE]
- Rewrite the nano FAQ in SGML.
Old requests:
For version 1.2:
- Single line scroll up/down? [DONE]
- Color syntax highlighting? (certainly seems like there's a demand for it.)
- Color syntax highlighting? (certainly seems like there's a demand for
it.) [DONE]
- .nanorc [DONE]
- Backup making (filename~)? [DONE]
- Search (etc.) string history [DONE]
- Implement Pico's -j and -g flags, as they are pretty easy to do. [DONE]
- Implement Pico's -j and -g flags, as they are pretty easy to do.
[DONE]
- Make mouse support work with clicking on the shortcuts (-m). Must
make global variable pointing to current shortcut list to determine what
keystroke to ungetch(). [DONE].
make global variable pointing to current shortcut list to determine
what keystroke to ungetch(). [DONE].
- Implement -o (chroot of sorts) [DONE]
- Allow -r to take a negative argument, meaning right margin instead of
left (allows resizing that way), formerly -W arg. [DONE]
For version 1.4:
- UTF-8 support.
- Support for Pico's paragraph searching ability.
- Undo/Redo key?
- 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
parent menu when their keystroke is entered a second time (^W^T^T and
(^R^X^X)(requires figuring out when to keep cursor pos and when not to).
- Fix resetstatuspos global which we shouldn't have.
Old requests:
For version 1.0:
- Implement Spelling [DONE]
- Implement Help [DONE]

View File

@@ -1,513 +0,0 @@
#! /bin/sh
# Output a system dependent set of variables, describing how to set the
# run time search path of shared libraries in an executable.
#
# Copyright 1996-2002 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# 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 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
#
# The first argument passed to this file is the canonical host specification,
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
# should be set by the caller.
#
# The set of defined variables is at the end of this script.
# All known linkers require a `.a' archive for static linking (except M$VC,
# which needs '.lib').
libext=a
shlibext=
host="$1"
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
wl=
if test "$GCC" = yes; then
wl='-Wl,'
else
case "$host_os" in
aix3* | aix4* | aix5*)
wl='-Wl,'
;;
hpux9* | hpux10* | hpux11*)
wl='-Wl,'
;;
irix5* | irix6*)
wl='-Wl,'
;;
linux*)
echo '__INTEL_COMPILER' > conftest.$ac_ext
if $CC -E conftest.$ac_ext >/dev/null | grep __INTEL_COMPILER >/dev/null
then
:
else
# Intel icc
wl='-Qoption,ld,'
fi
;;
osf3* | osf4* | osf5*)
wl='-Wl,'
;;
solaris*)
wl='-Wl,'
;;
sunos4*)
wl='-Qoption ld '
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
if test "x$host_vendor" = xsni; then
wl='-LD'
else
wl='-Wl,'
fi
;;
esac
fi
hardcode_libdir_flag_spec=
hardcode_libdir_separator=
hardcode_direct=no
hardcode_minus_L=no
case "$host_os" in
cygwin* | mingw* | pw32*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
if test "$GCC" != yes; then
with_gnu_ld=no
fi
;;
openbsd*)
with_gnu_ld=no
;;
esac
ld_shlibs=yes
if test "$with_gnu_ld" = yes; then
case "$host_os" in
aix3* | aix4* | aix5*)
# On AIX, the GNU linker is very broken
ld_shlibs=no
;;
amigaos*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
# Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
# that the semantics of dynamic libraries on AmigaOS, at least up
# to version 4, is to share data among multiple programs linked
# with the same dynamic library. Since this doesn't match the
# behavior of shared libraries on other platforms, we can use
# them.
ld_shlibs=no
;;
beos*)
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
cygwin* | mingw* | pw32*)
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
;;
solaris* | sysv5*)
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
ld_shlibs=no
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
sunos4*)
hardcode_direct=yes
;;
*)
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
:
else
ld_shlibs=no
fi
;;
esac
if test "$ld_shlibs" = yes; then
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
fi
else
case "$host_os" in
aix3*)
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
hardcode_minus_L=yes
if test "$GCC" = yes; then
# Neither direct hardcoding nor static linking is supported with a
# broken collect2.
hardcode_direct=unsupported
fi
;;
aix4* | aix5*)
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
aix_use_runtimelinking=no
else
aix_use_runtimelinking=no
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
# need to do runtime linking.
case $host_os in aix4.[23]|aix4.[23].*|aix5*)
for ld_flag in $LDFLAGS; do
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
aix_use_runtimelinking=yes
break
fi
done
esac
fi
hardcode_direct=yes
hardcode_libdir_separator=':'
if test "$GCC" = yes; then
case $host_os in aix4.[012]|aix4.[012].*)
collect2name=`${CC} -print-prog-name=collect2`
if test -f "$collect2name" && \
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
hardcode_direct=yes
else
# We have old collect2
hardcode_direct=unsupported
hardcode_minus_L=yes
hardcode_libdir_flag_spec='-L$libdir'
hardcode_libdir_separator=
fi
esac
fi
if test "$aix_use_runtimelinking" = yes; then
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
else
if test "$host_cpu" = ia64; then
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
else
hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
fi
fi
;;
amigaos*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
# see comment about different semantics on the GNU ld section
ld_shlibs=no
;;
cygwin* | mingw* | pw32*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec=' '
libext=lib
;;
darwin* | rhapsody*)
hardcode_direct=yes
;;
freebsd1*)
ld_shlibs=no
;;
freebsd2.2*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
freebsd2*)
hardcode_direct=yes
hardcode_minus_L=yes
;;
freebsd*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
hpux9* | hpux10* | hpux11*)
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
hardcode_minus_L=yes # Not in the search PATH, but as the default
# location of the library.
;;
irix5* | irix6*)
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
netbsd*)
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
newsos6)
hardcode_direct=yes
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
openbsd*)
hardcode_direct=yes
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
else
case "$host_os" in
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
hardcode_libdir_flag_spec='-R$libdir'
;;
*)
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
;;
esac
fi
;;
os2*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
;;
osf3*)
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
osf4* | osf5*)
if test "$GCC" = yes; then
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
# Both cc and cxx compiler support -rpath directly
hardcode_libdir_flag_spec='-rpath $libdir'
fi
hardcode_libdir_separator=:
;;
sco3.2v5*)
;;
solaris*)
hardcode_libdir_flag_spec='-R$libdir'
;;
sunos4*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_direct=yes
hardcode_minus_L=yes
;;
sysv4)
if test "x$host_vendor" = xsno; then
hardcode_direct=yes # is this really true???
else
hardcode_direct=no # Motorola manual says yes, but my tests say they lie
fi
;;
sysv4.3*)
;;
sysv5*)
hardcode_libdir_flag_spec=
;;
uts4*)
hardcode_libdir_flag_spec='-L$libdir'
;;
dgux*)
hardcode_libdir_flag_spec='-L$libdir'
;;
sysv4*MP*)
if test -d /usr/nec; then
ld_shlibs=yes
fi
;;
sysv4.2uw2*)
hardcode_direct=yes
hardcode_minus_L=no
;;
sysv5uw7* | unixware7*)
;;
*)
ld_shlibs=no
;;
esac
fi
# Check dynamic linker characteristics
libname_spec='lib$name'
sys_lib_dlsearch_path_spec="/lib /usr/lib"
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
case "$host_os" in
aix3*)
shlibext=so
;;
aix4* | aix5*)
shlibext=so
;;
amigaos*)
shlibext=ixlibrary
;;
beos*)
shlibext=so
;;
bsdi4*)
shlibext=so
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
;;
cygwin* | mingw* | pw32*)
case $GCC,$host_os in
yes,cygwin*)
shlibext=dll.a
;;
yes,mingw*)
shlibext=dll
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
;;
yes,pw32*)
shlibext=dll
;;
*)
shlibext=dll
;;
esac
;;
darwin* | rhapsody*)
shlibext=dylib
;;
freebsd1*)
;;
freebsd*)
shlibext=so
;;
gnu*)
shlibext=so
;;
hpux9* | hpux10* | hpux11*)
shlibext=sl
;;
irix5* | irix6*)
shlibext=so
case "$host_os" in
irix5*)
libsuff= shlibsuff=
;;
*)
case $LD in
*-32|*"-32 ") libsuff= shlibsuff= ;;
*-n32|*"-n32 ") libsuff=32 shlibsuff=N32 ;;
*-64|*"-64 ") libsuff=64 shlibsuff=64 ;;
*) libsuff= shlibsuff= ;;
esac
;;
esac
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
;;
linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
;;
linux-gnu*)
shlibext=so
;;
netbsd*)
shlibext=so
;;
newsos6)
shlibext=so
;;
openbsd*)
shlibext=so
;;
os2*)
libname_spec='$name'
shlibext=dll
;;
osf3* | osf4* | osf5*)
shlibext=so
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
sco3.2v5*)
shlibext=so
;;
solaris*)
shlibext=so
;;
sunos4*)
shlibext=so
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
shlibext=so
case "$host_vendor" in
motorola)
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
;;
esac
;;
uts4*)
shlibext=so
;;
dgux*)
shlibext=so
;;
sysv4*MP*)
if test -d /usr/nec; then
shlibext=so
fi
;;
esac
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
escaped_sys_lib_search_path_spec=`echo "X$sys_lib_search_path_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
escaped_sys_lib_dlsearch_path_spec=`echo "X$sys_lib_dlsearch_path_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
# How to pass a linker flag through the compiler.
wl="$escaped_wl"
# Static library suffix (normally "a").
libext="$libext"
# Shared library suffix (normally "so").
shlibext="$shlibext"
# Flag to hardcode \$libdir into a binary during linking.
# This must work even if \$libdir does not exist.
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
# Whether we need a single -rpath flag with a separated argument.
hardcode_libdir_separator="$hardcode_libdir_separator"
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
# resulting binary.
hardcode_direct="$hardcode_direct"
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
# resulting binary.
hardcode_minus_L="$hardcode_minus_L"
# Compile-time system search path for libraries
sys_lib_search_path_spec="$escaped_sys_lib_search_path_spec"
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec="$escaped_sys_lib_dlsearch_path_spec"
EOF

View File

@@ -2,138 +2,153 @@
#
# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
#
# GNU Nano is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# GNU nano is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any
# later version.
#
# GNU Nano is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# GNU nano is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Nano; if not, write to the Free Software
# Foundation, Inc.
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# along with GNU nano; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
# USA.
#
# $Id$
AC_INIT([GNU Nano], [1.2.1], [nano-devel@gnu.org], [nano])
AC_CONFIG_SRCDIR([nano.c])
AC_INIT([GNU nano], [1.3.8], [nano-devel@gnu.org], [nano])
AC_CONFIG_SRCDIR([src/nano.c])
AC_CANONICAL_TARGET([])
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER([config.h:config.h.in])
AC_CONFIG_HEADERS([config.h])
AC_PREREQ(2.52)
AC_PREREQ(2.54)
dnl Checks for programs.
AC_GNU_SOURCE
AC_PROG_CC
AC_PROG_LN_S
AC_ISC_POSIX
AC_SYS_LARGEFILE
dnl Internationalization macros.
AM_GNU_GETTEXT_VERSION(0.11.5)
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_HEADERS(fcntl.h getopt.h libintl.h limits.h regex.h termios.h wchar.h wctype.h)
AC_CHECK_HEADER(regex.h,
AC_MSG_CHECKING([for broken regexec])
AC_MSG_CHECKING([for broken regexec from glibc 2.2.3])
AC_TRY_RUN([
#include <sys/types.h>
#include <regex.h>
int main() { regex_t reg; size_t n; regmatch_t r; regcomp(&reg, ".", 0); regexec(&reg, "", n, &r, 0); return 0; }],
int main(void)
{
regex_t reg;
size_t n = 1;
regmatch_t r;
regcomp(&reg, "\\<", 0);
regexec(&reg, "", n, &r, 0);
regfree(&reg);
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.])
)
)
AC_MSG_RESULT(yes)
AC_DEFINE(BROKEN_REGEXEC, 1, [Define this if your regexec() function segfaults when passed an empty string under certain conditions, as the one from glibc 2.2.3 does.]),
AC_MSG_RESULT([cross-compiling; assuming no])))
dnl Checks for options.
dnl options
AC_ARG_ENABLE(debug,
[ --enable-debug Enable debugging (disabled by default)],
[if test x$enableval = xyes; then
[if test x$enableval = xyes; then
AC_DEFINE(DEBUG, 1, [Define this to enable nano debug messages and assert warnings.])
debug_support=yes
fi])
fi])
if test "$debug_support" != "yes"; then
if test x$debug_support != xyes; then
AC_DEFINE(NDEBUG, 1, [Shut up the assert warnings :-)])
fi
AC_ARG_ENABLE(extra,
[ --enable-extra Enable extra (optional) functions, including easter eggs],
[ --enable-extra Enable extra features, currently only easter eggs],
[if test x$enableval = xyes; then
AC_DEFINE(NANO_EXTRA, 1, [Define this to enable the extra stuff.]) extra_support=yes
AC_DEFINE(ENABLE_MULTIBUFFER, 1, [Define this to enable multiple file buffers.]) multibuffer_support=yes
fi])
fi])
AC_ARG_ENABLE(tiny,
[ --enable-tiny Disable features for the sake of size],
[if test x$enableval = xyes; then
AC_DEFINE(NANO_SMALL, 1, [Define this to make the nano executable as small as possible.]) tiny_support=yes
AC_DEFINE(DISABLE_BROWSER, 1, [Define this to disable the built-in (crappy) file browser.])
AC_DEFINE(DISABLE_HELP, 1, [Define this to disable the ^G help menu.])
AC_DEFINE(DISABLE_BROWSER, 1, [Define this to disable the built-in file browser.])
AC_DEFINE(DISABLE_HELP, 1, [Define this to disable the help menu.])
AC_DEFINE(DISABLE_JUSTIFY, 1, [Define this to disable the justify routine.])
AC_DEFINE(DISABLE_MOUSE, 1, [Define this to disable the mouse functions.])
AC_DEFINE(DISABLE_OPERATINGDIR, 1, [Define this to disable setting of the operating directory (chroot of sorts).])
AC_DEFINE(DISABLE_SPELLER, 1, [Define this to disable the use(full|less) spelling functions.])
AC_DEFINE(DISABLE_TABCOMP, 1, [Define to disable the tab completion code Chris worked so hard on!])
fi])
fi])
AC_ARG_ENABLE(browser,
[ --disable-browser Disable mini file browser],
[if test x$enableval != xyes; then
AC_DEFINE(DISABLE_BROWSER, 1, [Define this to disable the built-in (crappy) file browser.])
fi])
[if test x$enableval != xyes; then
AC_DEFINE(DISABLE_BROWSER, 1, [Define this to disable the built-in file browser.])
fi])
AC_ARG_ENABLE(help,
[ --disable-help Disable help function (^G)],
[if test x$enableval != xyes; then
AC_DEFINE(DISABLE_HELP, 1, [Define this to disable the ^G help menu.])
fi])
[ --disable-help Disable help function],
[if test x$enableval != xyes; then
AC_DEFINE(DISABLE_HELP, 1, [Define this to disable the help menu.])
fi])
AC_ARG_ENABLE(justify,
[ --disable-justify Disable justify/unjustify function],
[if test x$enableval != xyes; then
[if test x$enableval != xyes; then
AC_DEFINE(DISABLE_JUSTIFY, 1, [Define this to disable the justify routine.])
fi])
fi])
AC_ARG_ENABLE(mouse,
[ --disable-mouse Disable mouse support (and -m flag)],
[if test x$enableval != xyes; then
[if test x$enableval != xyes; then
AC_DEFINE(DISABLE_MOUSE, 1, [Define this to disable the mouse functions.])
fi])
fi])
AC_ARG_ENABLE(operatingdir,
[ --disable-operatingdir Disable setting of operating directory (chroot of sorts)],
[if test x$enableval != xyes; then
[if test x$enableval != xyes; then
AC_DEFINE(DISABLE_OPERATINGDIR, 1, [Define this to disable setting of the operating directory (chroot of sorts).])
fi])
fi])
AC_ARG_ENABLE(speller,
[ --disable-speller Disable spell checker function],
[if test x$enableval != xyes; then
[if test x$enableval != xyes; then
AC_DEFINE(DISABLE_SPELLER, 1, [Define this to disable the use(full|less) spelling functions.])
fi])
fi])
AC_ARG_ENABLE(tabcomp,
[ --disable-tabcomp Disable tab completion code for a smaller binary],
[if test x$enableval != xyes; then
[if test x$enableval != xyes; then
AC_DEFINE(DISABLE_TABCOMP, 1, [Define to disable the tab completion code Chris worked so hard on!])
fi])
fi])
AC_ARG_ENABLE(wrapping,
[ --disable-wrapping Disable all wrapping of text (and -w flag)],
[if test x$enableval != xyes; then
[if test x$enableval != xyes; then
AC_DEFINE(DISABLE_WRAPPING, 1, [Define this to disable any and all text wrapping.])
fi])
fi])
AC_ARG_ENABLE(wrapping-as-root,
[ --disable-wrapping-as-root Disable wrapping of text as root by default],
[if test x$enableval != xyes; then
[if test x$enableval != xyes; then
AC_DEFINE(DISABLE_ROOTWRAP, 1, [Define this to disable wrapping as root by default.])
fi])
fi])
AC_ARG_ENABLE(color,
[ --enable-color Enable color and syntax highlighting],
@@ -141,7 +156,6 @@ AC_ARG_ENABLE(color,
AC_DEFINE(ENABLE_NANORC, 1, [Define this to use the .nanorc file.]) nanorc_support=yes
AC_DEFINE(ENABLE_COLOR, 1, [Define this to have syntax highlighting, requires ENABLE_NANORC too!]) color_support=yes
AC_MSG_WARN([
***********************************************************************
*** WARNING: Color support is far from perfect, but functional. ***
*** Be careful with syntax in your .nanorc or nano may malfunction. ***
@@ -153,13 +167,13 @@ AC_ARG_ENABLE(multibuffer,
[ --enable-multibuffer Enable multiple file buffers],
[if test x$enableval = xyes; then
AC_DEFINE(ENABLE_MULTIBUFFER, 1, [Define this to enable multiple file buffers.]) multibuffer_support=yes
fi])
fi])
AC_ARG_ENABLE(nanorc,
[ --enable-nanorc Enable use of .nanorc file],
[if test x$enableval = xyes; then
AC_DEFINE(ENABLE_NANORC, 1, [Define this to use the .nanorc file.]) nanorc_support=yes
fi])
fi])
AC_ARG_ENABLE(all,
[ --enable-all Enable ALL extra nano functionality (kitchen sink option)],
@@ -169,14 +183,24 @@ AC_ARG_ENABLE(all,
AC_DEFINE(ENABLE_MULTIBUFFER, 1, [Define this to enable multiple file buffers.]) multibuffer_support=yes
AC_DEFINE(NANO_EXTRA, 1, [Define this to enable the extra stuff.]) extra_support=yes
AC_MSG_WARN([
***********************************************************************
*** WARNING: Color support is far from perfect, but functional. ***
*** Be careful with syntax in your .nanorc or nano may malfunction. ***
***********************************************************************
])
])
fi])
AC_MSG_CHECKING([whether to enable UTF-8 support])
AC_ARG_ENABLE(utf8,
[ --enable-utf8 Enable UTF-8 support],
[if test x$enableval = xyes; then
enable_utf8=yes
else
enable_utf8=no
fi],
[enable_utf8=auto])
AC_MSG_RESULT($enable_utf8)
AC_MSG_CHECKING([whether to use slang])
CURSES_LIB_NAME=""
AC_ARG_WITH(slang,
@@ -188,99 +212,205 @@ AC_ARG_WITH(slang,
*)
AC_MSG_RESULT(yes)
if test "$with_slang" != "yes"; then
if test x$with_slang != xyes; then
# Add additional search path
LDFLAGS="-L$with_slang/lib $LDFLAGS"
CPPFLAGS="-I$with_slang/include $CPPFLAGS"
fi
AC_CHECK_HEADER(slcurses.h,
AC_MSG_CHECKING([for SLtt_initialize in -lslang])
_libs=$LIBS
LIBS="$LIBS -lslang"
AC_TRY_RUN([
#include <stdio.h>
#include <slcurses.h>
int main () { SLtt_initialize (NULL); return 0; }],
[AC_MSG_RESULT(yes)
AC_DEFINE(USE_SLANG, 1, [Define to use the slang wrappers for curses instead of native curses.])
slang_support=yes
if test "$with_slang" != "yes"; then
CURSES_LIB="-L${with_slang}/lib -lslang"
else
CURSES_LIB="-lslang"
fi
CURSES_LIB_NAME=slang], [
AC_MSG_RESULT(no)
# We might need the term library
for termlib in ncurses curses termcap terminfo termlib; do
AC_CHECK_LIB([${termlib}], tputs, [tcap="-l$termlib"])
test -n "$tcap" && break
done
AC_MSG_CHECKING([for SLtt_initialize in -lslang $tcap])
LIBS="$LIBS $tcap"
if test x$enable_utf8 != xno; then
AC_CHECK_HEADER(slcurses.h,
AC_MSG_CHECKING([for SLutf8_enable in -lslang])
_libs=$LIBS
LIBS="$LIBS -lslang"
AC_TRY_RUN([
#include <stdio.h>
#include <slcurses.h>
int main () { SLtt_initialize (NULL); return 0; }],
int main(void)
{
SLutf8_enable(TRUE);
return 0;
}],
[AC_MSG_RESULT(yes)
AC_DEFINE(USE_SLANG, 1, [Define to use the slang wrappers for curses instead of native curses.])
slang_support=yes
if test "$with_slang" != "yes"; then
CURSES_LIB="-L${with_slang}/lib -lslang $tcap"
CURSES_LIB_WIDE=yes
if test x$with_slang != xyes; then
CURSES_LIB="-L${with_slang}/lib -lslang"
else
CURSES_LIB="-lslang $tcap"
CURSES_LIB="-lslang"
fi
CURSES_LIB_NAME=slang], [
AC_MSG_RESULT(no)
# We might need the math library
AC_MSG_CHECKING([for SLtt_initialize in -lslang $tcap -lm])
LIBS="$LIBS -lm"
CURSES_LIB_NAME=slang],
[AC_MSG_RESULT(no)
# We might need the term library
for termlib in ncurses curses termcap terminfo termlib; do
AC_CHECK_LIB([${termlib}], tputs, [tcap="-l$termlib"])
test -n "$tcap" && break
done
AC_MSG_CHECKING([for SLutf8_enable in -lslang $tcap])
LIBS="$LIBS $tcap"
AC_TRY_RUN([
#include <stdio.h>
#include <slcurses.h>
int main () { SLtt_initialize (NULL); return 0; }],
int main(void)
{
SLutf8_enable(TRUE);
return 0;
}],
[AC_MSG_RESULT(yes)
AC_DEFINE(USE_SLANG, 1, [Define to use the slang wrappers for curses instead of native curses.])
slang_support=yes
if test "$with_slang" != "yes"; then
CURSES_LIB="-L${with_slang}/lib -lslang $tcap -lm"
CURSES_LIB_WIDE=yes
if test x$with_slang != xyes; then
CURSES_LIB="-L${with_slang}/lib -lslang $tcap"
else
CURSES_LIB="-lslang $tcap -lm"
CURSES_LIB="-lslang $tcap"
fi
CURSES_LIB_NAME=slang],
[AC_MSG_RESULT(no)],
AC_MSG_WARN([*** Can not use slang when cross-compiling]))],
AC_MSG_WARN([*** Can not use slang when cross-compiling]))],
AC_MSG_WARN([*** Can not use slang when cross-compiling])),
[AC_MSG_RESULT(no)
# We might need the math library
AC_MSG_CHECKING([for SLutf8_enable in -lslang $tcap -lm])
LIBS="$LIBS -lm"
AC_TRY_RUN([
#include <slcurses.h>
int main(void)
{
SLutf8_enable(TRUE);
return 0;
}],
[AC_MSG_RESULT(yes)
AC_DEFINE(USE_SLANG, 1, [Define to use the slang wrappers for curses instead of native curses.])
slang_support=yes
CURSES_LIB_WIDE=yes
if test x$with_slang != xyes; then
CURSES_LIB="-L${with_slang}/lib -lslang $tcap -lm"
else
CURSES_LIB="-lslang $tcap -lm"
fi
CURSES_LIB_NAME=slang],
[AC_MSG_RESULT(no)],
AC_MSG_WARN([*** Can not use slang when cross-compiling]))],
AC_MSG_WARN([*** Can not use slang when cross-compiling]))],
AC_MSG_WARN([*** Can not use slang when cross-compiling])),
AC_MSG_ERROR([
*** The header file slcurses.h was not found. If you wish to use
*** slang support this header file is required. Please either
*** install a version of slang that includes the slcurses.h file or
*** do not call the configure script with --with-slang
]))
]))
fi
test "${_libs+set}" = "set" && LIBS=$_libs
if eval "test x$CURSES_LIB_NAME = x"; then
# Reset libs if the above slang tests failed
if test x$enable_utf8 != xno; then
LIBS=$_libs
fi
if test "$with_slang" != "yes"; then
AC_CHECK_HEADER(slcurses.h,
AC_MSG_CHECKING([for SLtt_initialize in -lslang])
_libs=$LIBS
LIBS="$LIBS -lslang"
AC_TRY_RUN([
#include <slcurses.h>
int main(void)
{
SLtt_initialize(NULL);
return 0;
}],
[AC_MSG_RESULT(yes)
AC_DEFINE(USE_SLANG, 1, [Define to use the slang wrappers for curses instead of native curses.])
slang_support=yes
if test x$with_slang != xyes; then
CURSES_LIB="-L${with_slang}/lib -lslang"
else
CURSES_LIB="-lslang"
fi
CURSES_LIB_NAME=slang],
[AC_MSG_RESULT(no)
# We might need the term library
for termlib in ncurses curses termcap terminfo termlib; do
AC_CHECK_LIB([${termlib}], tputs, [tcap="-l$termlib"])
test -n "$tcap" && break
done
AC_MSG_CHECKING([for SLtt_initialize in -lslang $tcap])
LIBS="$LIBS $tcap"
AC_TRY_RUN([
#include <slcurses.h>
int main(void)
{
SLtt_initialize(NULL);
return 0;
}],
[AC_MSG_RESULT(yes)
AC_DEFINE(USE_SLANG, 1, [Define to use the slang wrappers for curses instead of native curses.])
slang_support=yes
if test x$with_slang != xyes; then
CURSES_LIB="-L${with_slang}/lib -lslang $tcap"
else
CURSES_LIB="-lslang $tcap"
fi
CURSES_LIB_NAME=slang],
[AC_MSG_RESULT(no)
# We might need the math library
AC_MSG_CHECKING([for SLtt_initialize in -lslang $tcap -lm])
LIBS="$LIBS -lm"
AC_TRY_RUN([
#include <slcurses.h>
int main(void)
{
SLtt_initialize(NULL);
return 0;
}],
[AC_MSG_RESULT(yes)
AC_DEFINE(USE_SLANG, 1, [Define to use the slang wrappers for curses instead of native curses.])
slang_support=yes
if test x$with_slang != xyes; then
CURSES_LIB="-L${with_slang}/lib -lslang $tcap -lm"
else
CURSES_LIB="-lslang $tcap -lm"
fi
CURSES_LIB_NAME=slang],
[AC_MSG_RESULT(no)],
AC_MSG_WARN([*** Can not use slang when cross-compiling]))],
AC_MSG_WARN([*** Can not use slang when cross-compiling]))],
AC_MSG_WARN([*** Can not use slang when cross-compiling])),
AC_MSG_ERROR([
*** The header file slcurses.h was not found. If you wish to use
*** slang support this header file is required. Please either
*** install a version of slang that includes the slcurses.h file or
*** do not call the configure script with --with-slang
]))
fi
if test "${_libs+set}" = "set"; then
LIBS=$_libs
fi
if test x$with_slang != xyes; then
LDFLAGS=${_ldflags}
fi
;;
esac], [AC_MSG_RESULT(no)])
dnl Checks for functions
AC_CHECK_FUNCS(snprintf vsnprintf strcasecmp strncasecmp)
if test "x$ac_cv_func_snprintf" = "xno" -o "xac_cv_func_vsnprintf" = "xno"
then
AM_PATH_GLIB(1.2.4,,
[AC_MSG_ERROR([
*** snprintf() and/or vsnprintf() not found. GLIB not found either.
dnl Checks for functions.
AC_CHECK_FUNCS(getdelim getline isblank snprintf strcasecmp strcasestr strncasecmp strnlen vsnprintf)
if test x$enable_utf8 != xno; then
AC_CHECK_FUNCS(iswalnum iswblank iswpunct iswspace mblen mbstowcs mbtowc wctomb wcwidth)
fi
if test x$ac_cv_func_snprintf = xno || test x$ac_cv_func_vsnprintf = xno; then
AM_PATH_GLIB_2_0(2.0.0,,
AC_MSG_ERROR([
*** snprintf() and/or vsnprintf() not found. GLIB 2.x not found either.
*** You need both snprintf() and vsnprintf(). Alternatively you can
*** install the GLIB library which can be found at ftp://ftp.gtk.org/.])],
glib)
glib_cflags=`$GLIB_CONFIG --cflags glib`
glib_libs=`$GLIB_CONFIG --libs glib`
*** install the GLIB library which can be found at ftp://ftp.gtk.org/.]),
glib)
fi
dnl Checks for typedefs, structures, and compiler characteristics.
@@ -292,74 +422,93 @@ AC_CHECK_FUNCS(getopt_long)
dnl Checks for libraries.
if eval "test x$CURSES_LIB_NAME = x"; then
AC_CHECK_HEADERS(ncurses.h)
if eval "test x$CURSES_LIB_NAME = x"
then
AC_CHECK_HEADERS(curses.h ncurses.h)
AC_CHECK_LIB(ncurses, tgetent, [CURSES_LIB="-lncurses" CURSES_LIB_NAME=ncurses])
fi
if test x$enable_utf8 != xno; then
AC_CHECK_LIB(ncursesw, get_wch, [CURSES_LIB="-lncursesw" CURSES_LIB_NAME=ncursesw CURSES_LIB_WIDE=yes])
fi
if eval "test x$CURSES_LIB_NAME = x"
then
AC_CHECK_LIB(curses, tgetent, [CURSES_LIB="-lcurses" CURSES_LIB_NAME=curses])
fi
# Fallback for PDCurses and less useful curses libs...
if eval "test x$CURSES_LIB_NAME = x"
then
AC_CHECK_LIB(curses, initscr, [CURSES_LIB="-lcurses" CURSES_LIB_NAME=curses])
fi
if eval "test x$CURSES_LIB_NAME = x"
then
AC_CHECK_LIB(termcap, tgetent, [CURSES_LIB="-ltermcap" CURSES_LIB_NAME=termcap])
fi
if eval "test x$CURSES_LIB_NAME = x"
then
AC_MSG_WARN([
*** No termcap lib available, consider getting the official ncurses
*** distribution from ftp://ftp.gnu.org/pub/gnu/ncurses if you get
*** errors compiling nano.])
else
AC_MSG_RESULT([Using $CURSES_LIB_NAME as the termcap library])
fi
AC_CHECK_LIB([$CURSES_LIB_NAME], use_default_colors, AC_DEFINE(HAVE_USE_DEFAULT_COLORS, 1, [Define this if your curses library has the use_default_colors command.]))
if test x$slang_support != xyes; then
AC_CHECK_LIB([$CURSES_LIB_NAME], wresize, AC_DEFINE(HAVE_WRESIZE, 1, [Define this if you have the wresize function in your ncurses-type library.]))
AC_CHECK_LIB([$CURSES_LIB_NAME], resizeterm, AC_DEFINE(HAVE_RESIZETERM, 1, [Define this if you have the resizeterm function in your ncurses-type library.]))
# Taken from aumix (can't tell from the variable name?)
AC_CACHE_CHECK([for private member _use_keypad in WINDOW],
aumix_cv_struct_window_usekeypad,
[AC_TRY_COMPILE([#ifdef HAVE_NCURSES_H
#include <ncurses.h>
#else
#include <curses.h>
#endif], [WINDOW w; w._use_keypad;],
aumix_cv_struct_window_usekeypad=yes, aumix_cv_struct_window_usekeypad=no)])
if test $aumix_cv_struct_window_usekeypad = yes; then
AC_DEFINE(HAVE_USEKEYPAD, 1, [Define this if your curses lib has the _use_keypad flag.])
if eval "test x$CURSES_LIB_NAME = x"; then
AC_CHECK_LIB(ncurses, initscr, [CURSES_LIB="-lncurses" CURSES_LIB_NAME=ncurses])
fi
fi
dnl Parse any configure options
if eval "test x$CURSES_LIB_NAME = x"; then
AC_CHECK_HEADERS(curses.h)
if test x$enable_utf8 != xno; then
AC_CHECK_LIB(curses, get_wch, [CURSES_LIB="-lcurses" CURSES_LIB_NAME=curses CURSES_LIB_WIDE=yes])
fi
if eval "test x$CURSES_LIB_NAME = x"; then
AC_CHECK_LIB(curses, initscr, [CURSES_LIB="-lcurses" CURSES_LIB_NAME=curses])
fi
fi
if eval "test x$CURSES_LIB_NAME = x"; then
AC_MSG_WARN([
*** No curses lib available. Consider getting the official ncurses
*** distribution from ftp://ftp.gnu.org/pub/gnu/ncurses if you get
*** errors compiling nano.])
else
AC_MSG_RESULT([Using $CURSES_LIB_NAME as the curses library])
fi
AC_CHECK_LIB([$CURSES_LIB_NAME], use_default_colors, AC_DEFINE(HAVE_USE_DEFAULT_COLORS, 1, [Define this if your curses library has the use_default_colors command.]))
dnl Parse any configure options.
LIBS="$LIBS $CURSES_LIB"
AC_SUBST(CURSES_LIB)
if test "x$glib_cflags" != "x"
then
CFLAGS="$CFLAGS $glib_cflags"
if test "x$GLIB_CFLAGS" != "x"; then
CFLAGS="$CFLAGS $GLIB_CFLAGS"
fi
if test "x$glib_libs" != "x"
then
LDFLAGS="$LDFLAGS $glib_libs"
if test "x$GLIB_LIBS" != "x"; then
LDFLAGS="$LDFLAGS $GLIB_LIBS"
fi
AC_CONFIG_FILES([Makefile m4/Makefile po/Makefile.in nano.spec])
if test x$enable_utf8 != xno && \
test x$CURSES_LIB_WIDE = xyes && \
test x$ac_cv_func_iswalnum = xyes && \
test x$ac_cv_func_iswpunct = xyes && \
(test x$ac_cv_func_iswblank = xyes || test x$ac_cv_func_iswspace = xyes) && \
test x$ac_cv_func_mblen = xyes && \
test x$ac_cv_func_mbstowcs = xyes && \
test x$ac_cv_func_mbtowc = xyes && \
test x$ac_cv_func_wctomb = xyes && \
test x$ac_cv_func_wcwidth = xyes; then
AC_DEFINE(NANO_WIDE, 1, [Define this if your system has sufficient wide character support (a wide curses library, iswalnum(), iswpunct(), iswblank() or iswspace(), mblen(), mbstowcs(), mbtowc(), wctomb(), and wcwidth()).])
else
if test x$enable_utf8 = xyes; then
AC_MSG_ERROR([
*** UTF-8 support was requested, but insufficient UTF-8 support was
*** detected in your curses and/or C libraries. Please verify that your
*** slang was built with UTF-8 support or your curses was built with
*** wide character support, and that your C library was built with wide
*** character support.])
elif test x$enable_utf8 != xno; then
AC_MSG_WARN([
*** Insufficient UTF-8 support was detected in your curses and/or C
*** libraries. If you want UTF-8 support, please verify that your slang
*** was built with UTF-8 support or your curses was built with wide
*** character support, and that your C library was built with wide
*** character support.])
fi
fi
AC_CONFIG_FILES([
Makefile
doc/Makefile
doc/man/Makefile
doc/man/fr/Makefile
doc/texinfo/Makefile
m4/Makefile
po/Makefile.in
src/Makefile
nano.spec
])
AC_OUTPUT

494
cut.c
View File

@@ -1,494 +0,0 @@
/* $Id$ */
/**************************************************************************
* cut.c *
* *
* Copyright (C) 1999-2003 Chris Allegretta *
* 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) *
* any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
* *
**************************************************************************/
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "proto.h"
#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 */
filestruct *get_cutbottom(void)
{
return cutbottom;
}
void add_to_cutbuffer(filestruct *inptr)
{
#ifdef DEBUG
fprintf(stderr, _("add_to_cutbuffer() called with inptr->data = %s\n"),
inptr->data);
#endif
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;
}
inptr->next = NULL;
cutbottom = inptr;
}
#ifndef NANO_SMALL
/* Cut a marked segment instead of a whole line.
*
* The first cut character is top->data[top_x]. Unless top == bot, the
* last cut line has length bot_x. That is, if bot_x > 0 then we cut to
* bot->data[bot_x - 1].
*
* destructive is whether to actually modify the file structure, if not
* then just copy the buffer into cutbuffer and don't pull it from the
* file.
*
* If destructive, then we maintain totsize, totlines, filebot, the
* magic line, and line numbers. Also, we set current and current_x so
* the cursor will be on the first character after what was cut. We do
* not do any screen updates. */
void cut_marked_segment(filestruct *top, size_t top_x, filestruct *bot,
size_t bot_x, int destructive)
{
filestruct *tmp, *next;
size_t newsize;
if (top == bot && top_x == bot_x)
return;
assert(top != NULL && bot != NULL);
/* Make top be no later than bot. */
if (top->lineno > bot->lineno) {
filestruct *swap = top;
int swap2 = top_x;
top = bot;
bot = swap;
top_x = bot_x;
bot_x = swap2;
} else if (top == bot && top_x > bot_x) {
/* And bot_x can't be an earlier character than top_x. */
int swap = top_x;
top_x = bot_x;
bot_x = swap;
}
/* Make the first cut line manually. */
tmp = copy_node(top);
newsize = (top == bot ? bot_x - top_x : strlen(top->data + top_x));
memmove(tmp->data, top->data + top_x, newsize);
null_at(&tmp->data, newsize);
add_to_cutbuffer(tmp);
/* And make the remainder line manually too. */
if (destructive) {
current_x = top_x;
totsize -= newsize;
totlines -= bot->lineno - top->lineno;
newsize = top_x + strlen(bot->data + bot_x) + 1;
if (top == bot) {
/* In this case, the remainder line is shorter, so we must
move text from the end forward first. */
memmove(top->data + top_x, bot->data + bot_x,
newsize - top_x);
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 = charealloc(top->data, newsize);
memmove(top->data + top_x, bot->data + bot_x,
newsize - top_x);
}
}
if (top == bot) {
#ifdef DEBUG
dump_buffer(cutbuffer);
#endif
return;
}
tmp = top->next;
while (tmp != bot) {
next = tmp->next;
if (!destructive)
tmp = copy_node(tmp);
else
totsize -= strlen(tmp->data) + 1;
add_to_cutbuffer(tmp);
tmp = next;
}
/* Make the last cut line manually. */
tmp = copy_node(bot);
null_at(&tmp->data, bot_x);
add_to_cutbuffer(tmp);
#ifdef DEBUG
dump_buffer(cutbuffer);
#endif
if (destructive) {
top->next = bot->next;
if (top->next != NULL)
top->next->prev = top;
delete_node(bot);
renumber(top);
current = top;
if (bot == filebot) {
filebot = top;
assert(bot_x == 0);
if (top_x > 0)
new_magicline();
}
}
#ifdef DEBUG
dump_buffer(cutbuffer);
#endif
}
#endif
int do_cut_text(void)
{
filestruct *fileptr;
#ifndef NANO_SMALL
int dontupdate = 0;
#endif
assert(current != NULL && current->data != NULL);
check_statblank();
if (!ISSET(KEEP_CUTBUFFER)) {
free_filestruct(cutbuffer);
cutbuffer = NULL;
marked_cut = 0;
#ifndef NANO_SMALL
concatenate_cut = 0;
#endif
#ifdef DEBUG
fprintf(stderr, _("Blew away cutbuffer =)\n"));
#endif
}
/* You can't cut the magic line except with the mark. But
trying does clear the cutbuffer if KEEP_CUTBUFFER is not set. */
if (current == filebot
#ifndef NANO_SMALL
&& !ISSET(MARK_ISSET)
#endif
)
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));
if (current->data[current_x] == '\0') {
/* If the line is empty and we didn't just cut a non-blank
line, create a dummy line and add it to the cutbuffer */
if (marked_cut != 1 && current->next != filebot) {
filestruct *junk = make_new_node(current);
junk->data = charalloc(1);
junk->data[0] = '\0';
add_to_cutbuffer(junk);
#ifdef DEBUG
dump_buffer(cutbuffer);
#endif
}
do_delete();
marked_cut = 2;
return 1;
} else {
SET(MARK_ISSET);
mark_beginx = strlen(current->data);
mark_beginbuf = current;
dontupdate = 1;
}
}
if (ISSET(MARK_ISSET)) {
/* Don't do_update() and move the screen position if the marked
area lies entirely within the screen buffer */
dontupdate |= current->lineno >= edittop->lineno &&
current->lineno <= editbot->lineno &&
mark_beginbuf->lineno >= edittop->lineno &&
mark_beginbuf->lineno <= editbot->lineno;
cut_marked_segment(current, current_x, mark_beginbuf,
mark_beginx, 1);
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();
else
edit_update(current, CENTER);
set_modified();
return 1;
}
#endif /* !NANO_SMALL */
totlines--;
totsize -= strlen(current->data) + 1;
fileptr = current;
current = current->next;
current->prev = fileptr->prev;
add_to_cutbuffer(fileptr);
#ifdef DEBUG
dump_buffer(cutbuffer);
#endif
if (fileptr == fileage)
fileage = current;
else
current->prev->next = current;
if (fileptr == edittop)
edittop = current;
renumber(current);
current_x = 0;
edit_refresh();
set_modified();
marked_cut = 0;
#ifndef NANO_SMALL
concatenate_cut = 0;
#endif
placewewant = 0;
return 1;
}
int do_uncut_text(void)
{
filestruct *tmp = current, *fileptr = current;
filestruct *newbuf = NULL, *newend = NULL;
char *tmpstr, *tmpstr2;
filestruct *hold = current;
int i;
wrap_reset();
check_statblank();
if (cutbuffer == NULL || fileptr == NULL)
return 0; /* AIEEEEEEEEEEEE */
/* If we're uncutting a previously non-marked block, uncut to end if
we're not at the beginning of the line. If we are at the
beginning of the line, set placewewant to 0. Pico does both of
these. */
if (marked_cut == 0) {
if (current_x != 0)
marked_cut = 2;
else
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);
for (newend = newbuf; newend->next != NULL && newend != NULL;
newend = newend->next)
totlines++;
}
/* Hook newbuf into fileptr */
if (marked_cut != 0) {
int recenter_me = 0;
/* Should we eventually use edit_update(CENTER)? */
/* If there's only one line in the cutbuffer */
if (cutbuffer->next == NULL) {
size_t buf_len = strlen(cutbuffer->data);
size_t cur_len = strlen(current->data);
current->data = nrealloc(current->data, cur_len + buf_len + 1);
memmove(current->data + current_x + buf_len,
current->data + current_x, cur_len - current_x + 1);
strncpy(current->data + current_x, cutbuffer->data, buf_len);
/* Use strncpy() to not copy the terminal '\0'. */
current_x += buf_len;
totsize += buf_len;
placewewant = xplustabs();
update_cursor();
} else { /* yuck -- no kidding! */
tmp = current->next;
/* New beginning */
tmpstr = charalloc(current_x + strlen(newbuf->data) + 1);
strncpy(tmpstr, current->data, current_x);
strcpy(&tmpstr[current_x], newbuf->data);
totsize += strlen(newbuf->data) + strlen(newend->data) + 1;
/* New end */
tmpstr2 = charalloc(strlen(newend->data) +
strlen(&current->data[current_x]) + 1);
strcpy(tmpstr2, newend->data);
strcat(tmpstr2, &current->data[current_x]);
free(current->data);
current->data = tmpstr;
current->next = newbuf->next;
newbuf->next->prev = current;
delete_node(newbuf);
current_x = strlen(newend->data);
placewewant = xplustabs();
free(newend->data);
newend->data = tmpstr2;
newend->next = tmp;
/* If tmp isn't null, we're in the middle: update the
prev pointer. If it IS null, we're at the end; update
the filebot pointer */
if (tmp != NULL)
tmp->prev = newend;
else {
/* Fix the editbot pointer too */
if (editbot == filebot)
editbot = newend;
filebot = newend;
new_magicline();
}
/* Now why don't we update the totsize also */
for (tmp = current->next; tmp != newend; tmp = tmp->next)
totsize += strlen(tmp->data) + 1;
current = newend;
if (editbot->lineno < newend->lineno)
recenter_me = 1;
}
/* If marked cut == 2, that means that we're doing a cut to end
and we don't want anything else on the line, so we have to
screw up all the work we just did and separate the line.
There must be a better way to do this, but not at 1AM on a
work night. */
if (marked_cut == 2) {
tmp = make_new_node(current);
tmp->data = mallocstrcpy(NULL, current->data + current_x);
splice_node(current, tmp, current->next);
null_at(&current->data, current_x);
current = current->next;
current_x = 0;
placewewant = 0;
/* Extra line added, update stuff */
totlines++;
totsize++;
}
/* Renumber from BEFORE where we pasted ;) */
renumber(hold);
#ifdef DEBUG
dump_buffer(fileage);
dump_buffer(cutbuffer);
#endif
set_modified();
if (recenter_me)
edit_update(current, CENTER);
else
edit_refresh();
return 0;
}
if (fileptr != fileage) {
tmp = fileptr->prev;
tmp->next = newbuf;
newbuf->prev = tmp;
} else
fileage = newbuf;
totlines++; /* Unmarked uncuts don't split lines */
/* This is so uncutting at the top of the buffer will work => */
if (current_y == 0)
edittop = newbuf;
/* Connect the end of the buffer to the filestruct */
newend->next = fileptr;
fileptr->prev = newend;
/* Recalculate size *sigh* */
for (tmp = newbuf; tmp != fileptr; tmp = tmp->next)
totsize += strlen(tmp->data) + 1;
i = editbot->lineno;
renumber(newbuf);
/* Center the screen if we've moved beyond the line numbers of both
the old and new editbots */
if (i < newend->lineno && editbot->lineno < newend->lineno)
edit_update(fileptr, CENTER);
else
edit_refresh();
#ifdef DEBUG
dump_buffer_reverse();
#endif
set_modified();
return 1;
}

2
doc/.cvsignore Normal file
View File

@@ -0,0 +1,2 @@
Makefile
Makefile.in

3
doc/Makefile.am Normal file
View File

@@ -0,0 +1,3 @@
SUBDIRS = man texinfo
EXTRA_DIST = faq.html nanorc.sample

View File

@@ -3,10 +3,9 @@
<head>
<title>The GNU nano editor FAQ</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.73 [en] (X11; U; Linux 2.2.16 i586) [Netscape]">
</head>
<body text="#330000" bgcolor="#ffffff" link="#0000ef" vlink="#51188e" alink="#ff0000">
<h1>The nano FAQ</h1>
<h1>The GNU nano editor FAQ</h1>
<h2>Table of Contents</h2>
<h2><a href="#1">1. General</a></h2>
<blockquote><p><a href="#1.1">1.1 About this FAQ</a><br>
@@ -25,20 +24,24 @@
<blockquote><p><a href="#3.1">3.1. How do I install the RPM or DEB package?</a><br>
<a href="#3.2">3.2. Compiling from source: WHAT THE HECK DO I DO NOW?</a><br>
<a href="#3.3">3.3. Why does everything go into /usr/local?</a><br>
<a href="#3.4">3.4. I get errors about 'bindtextdomain','gettext' and/or 'gettextdomain'. What can I do about it?</a><br>
<a href="#3.4">3.4. I get errors about 'bindtextdomain','gettext', and/or 'gettextdomain'. What can I do about it?</a><br>
<a href="#3.5">3.5. Nano should automatically run strip on the binary when installing it!</a><br>
<a href="#3.6">3.6. How can I make the executable smaller? This is too bloated!</a><br>
<a href="#3.7">3.7. Tell me more about this multibuffer stuff!</a><br>
<a href="#3.8">3.8. How do I make a .nanorc file that nano will read when I start it?</a></p></blockquote>
<a href="#3.8">3.8. Tell me more about this verbatim input stuff!</a><br>
<a href="#3.9">3.9. How do I make a .nanorc file that nano will read when I start it?</a></p></blockquote>
<h2><a href="#4">4. Running</a></h2>
<blockquote><p><a href="#4.1">4.1. Ack! My backspace/delete/enter/double bucky/meta key doesn't seem to work! What can I do?</a><br>
<a href="#4.2">4.2. Nano crashes when I type &lt;insert keystroke here&gt;!</a><br>
<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.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 &quot;NumLock glitch detected. Keypad will malfunction with NumLock off.&quot; 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>
<blockquote><p><a href="#4.1">4.1. How do I open a file with a name beginning with '+' from the command line?</a><br>
<a href="#4.2">4.2. Ack! My backspace/delete/enter/double bucky/meta key doesn't seem to work! What can I do?</a><br>
<a href="#4.3">4.3. How do I type the F13-F16 keys shown in the help browser? My keyboard only has F1-F12!</a><br>
<a href="#4.4">4.4. Nano crashes when I type &lt;insert keystroke here&gt;!</a><br>
<a href="#4.5">4.5. Nano crashes when I resize my window. How can I fix that?</a><br>
<a href="#4.6">4.6. [version 1.1.12 and earlier] Why does nano show ^\ in the shortcut list instead of ^J?</a><br>
<a href="#4.7a">4.7a. [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.7b">4.7b. [version 1.1.99pre1 and later] Hey, the search string behavior has reverted, it's now like Pico, what happened to the consistency?</a><br>
<a href="#4.8">4.8. How do I make nano my default editor (in Pine, mutt, etc.)?</a><br>
<a href="#4.9">4.9. I've compiled nano with color support, but I don't see any color when I run it!</a><br>
<a href="#4.10">4.10. How do I select text for the clipboard in an X terminal when I'm running nano in one and nano's mouse support is turned on?</a></p></blockquote>
<h2><a href="#5">5. Internationalization</a></h2>
<blockquote><p><a href="#5.1">5.1. There's no translation for my language!</a><br>
<a href="#5.2">5.2. I don't like the translation for &lt;x&gt; in my language. How can I fix it?</a></p></blockquote>
@@ -50,7 +53,7 @@
<a href="#6.5">6.5. Why doesn't UW simply change their license?</a><br>
<a href="#6.6">6.6. What if tomorrow UW changes the license to be truly Free Software?</a></p></blockquote>
<h2><a href="#7">7. Miscellaneous</a></h2>
<blockquote><p><a href="#7.1">7.1. Nano related mailing lists.</a><br>
<blockquote><p><a href="#7.1">7.1. Nano-related mailing lists.</a><br>
<a href="#7.2">7.2. I want to send the development team a big load of cash (or just a thank you).</a><br>
<a href="#7.3">7.3. How do I submit a patch?</a><br>
<a href="#7.4">7.4. How do I join the development team?</a><br>
@@ -59,7 +62,7 @@
<hr width="100%">
<h1><a name="1"></a>1. General</h1>
<h2><a name="1.1"></a>1.1 About this FAQ</h2>
<blockquote><p>This FAQ was written and is maintained by Chris Allegretta &lt;<a href="mailto:chrisa@asty.org">chrisa@asty.org</a>&gt;, who also happens to be the creator of nano. Maybe someone else will volunteer to maintain this FAQ someday, who knows...</p></blockquote>
<blockquote><p>This FAQ was originally written and maintained by Chris Allegretta &lt;<a href="mailto:chrisa@asty.org">chrisa@asty.org</a>&gt;, who also happens to be the creator of nano. It is currently maintained by David Lawrence Ramsey &lt;<a href="mailto:pooka_regent@sluggy.net">pooka_regent@sluggy.net</a>&gt;. Maybe someone else will volunteer to maintain this FAQ someday, who knows...</p></blockquote>
<h2><a name="1.2"></a>1.2. How do I contribute to it?</h2>
<blockquote><p>Your best bet is to send it to the nano email address, <a href="mailto:nano@nano-editor.org">nano@nano-editor.org</a> and if it is useful enough it will be included in future versions.</p></blockquote>
<h2><a name="1.3"></a>1.3. What is GNU nano?</h2>
@@ -77,9 +80,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 &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 1.2.1. 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.3.8. 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.2/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.3/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>
@@ -132,55 +135,65 @@
<blockquote><p>Well, that's what the <b>configure</b> script defaults to. If you wish to change this, simply do this:</p>
<p><b>./configure --prefix=/usr</b></p>
<p>to put nano into /usr/bin when you run <b>make install</b>.</p></blockquote>
<h2><a name="3.4"></a>3.4. I get errors about 'bindtextdomain', 'gettext' and/or 'gettextdomain'. What can I do about it?</h2>
<h2><a name="3.4"></a>3.4. I get errors about 'bindtextdomain', 'gettext', and/or 'gettextdomain'. What can I do about it?</h2>
<blockquote><p>Try doing a <b>./configure --with-included-gettext</b> and see if that solves your problem. You may need to do a <b>make clean; make</b> to get it to work fully.</p></blockquote>
<h2><a name="3.5"></a>3.5. Nano should automatically run strip on the binary when installing it!</h2>
<blockquote><p>Actually, it does, but you have to use <b>make install-strip</b>. The default make install does not, and will not, run strip automatically.</p></blockquote>
<h2><a name="3.6"></a>3.6. How can I make the executable smaller? This is too bloated!</h2>
<blockquote><p>Actually, there are several parts of the editor that can be disabled. You can pass arguments to the <b>configure</b> script that disable certain features. Here's a brief list:</p>
<pre>
<b>--disable-tabcomp</b> Disables tab completion code for a smaller binary
<b>--disable-tabcomp</b> Disable tab completion code for a smaller
binary
<b>--disable-justify</b> Disable justify/unjustify function
<b>--disable-speller</b> Disables spell checker function
<b>--disable-help</b> Disables help function (^G)
<b>--disable-browser</b> Disables mini file browser
<b>--disable-wrapping</b> Disables all wrapping of text (and -w flag)
<b>--disable-mouse</b> Disables mouse support (and -m flag)
<b>--disable-speller</b> Disable spell checker function
<b>--disable-help</b> Disable help function
<b>--disable-browser</b> Disable mini file browser
<b>--disable-wrapping</b> Disable all wrapping of text (and -w flag)
<b>--disable-mouse</b> Disable mouse support (and -m flag)
<b>--disable-operatingdir</b> Disable setting of operating directory</pre>
<p>There's also the <b>--enable-tiny</b> option which disables everything above, as well as some larger chunks of the program (like the marker code that you use Control-^ to select with). Also, if you know you aren't going to be using other languages you can use <b>--disable-nls</b> to disable internationalization and save a few K to a few dozen K depending on if you have locale support on your system. And finally there's always good old <b>strip</b> to strip all debugging code and code that exists in libraries on your system.</p>
<p>If, on the other hand, you can't live without bells and whistles, you could try:</p>
<pre>
<b>--enable-extra</b> Enable extra functions, including easter eggs
<b>--enable-extra</b> Enable extra features, currently only easter eggs
<b>--enable-nanorc</b> Enable use of .nanorc file
<b>--enable-color</b> Enables color and syntax highlighting
<b>--enable-multibuffer</b> Enables having multiple file buffers open
<b>--enable-all</b> Enables all of the above features</pre></blockquote>
<b>--enable-color</b> Enable color and syntax highlighting
<b>--enable-multibuffer</b> Enable having multiple file buffers open
<b>--enable-all</b> Enable all of the above features
<b>--disable-wrapping-as-root</b>
Turn off wrapping of text by default when the
user is root</pre></blockquote>
<h2><a name="3.7"></a>3.7. Tell me more about this multibuffer stuff!</h2>
<blockquote><p>To use multiple file buffers, you must be using nano 1.1.12 or newer, and you must have configured nano with <b>--enable-multibuffer</b> or <b>--enable-extra</b> (use nano -V to check). Then when you want to enable inserting a file into its own buffer instead of into the current file, just hit <b>Meta-F</b>, then insert the file as normal with <b>^R</b>. If you always want files to be loaded into their own buffers, use the <b>--multibuffer</b> or <b>-F</b> flag when you invoke nano. </p>
<blockquote><p>To use multiple file buffers, you must be using nano 1.1.0 or newer, and you must have configured nano with <b>--enable-multibuffer</b> (use nano -V to check). Then when you want to enable inserting a file into its own buffer instead of into the current file, just hit <b>Meta-F</b>, then insert the file as normal with <b>^R</b>. If you always want files to be loaded into their own buffers, use the <b>--multibuffer</b> or <b>-F</b> flag when you invoke nano.</p>
<p>You can move between the buffers you have open with the <b>Meta-&lt;</b> and <b>Meta-&gt;</b> keys, or more easily with <b>Meta-,</b> and <b>Meta-.</b> (clear as mud, right? =-). When you have more than one file buffer open, the ^X shortcut will say &quot;Close&quot;, instead of the normal &quot;Exit&quot; when only one buffer is open.</p></blockquote>
<h2><a name="3.8"></a>3.8. How do I make a .nanorc file that nano will read when I start it?</h2>
<blockquote>It's not hard at all! But, your version of nano must have been compiled with <b>--enable-nanorc</b>, and again must be version 1.1.12 or newer (use nano -V to check your version and compiled features). Then simply copy the <b>nanorc.sample</b> that came with the nano source or your nano package (most likely in /usr/doc/nano) to .nanorc in your home directory. If you didn't get one, the syntax is simple. Flags are turned on and off by using the word <b>set</b> and the getopt_long flag for the feature, for example &quot;set pico&quot; or &quot;set nowrap&quot;.</blockquote>
<h2><a name="3.8"></a>3.8. Tell me more about this verbatim input stuff!</h2>
<blockquote><p>To use verbatim input, you must be using nano 1.3.1 or newer. When you want to insert a literal character into the file you're editing, such as a control character that nano usually treats as a command, first press <b>Meta-V</b>. (If you're not at a prompt, you'll get the message &quot;Verbatim Input&quot;.) Then press the key(s) that generate the character you want.</p>
<p>Alternatively, you can press <b>Meta-V</b> and then type a four-digit hexadecimal code from 0000 to ffff (case-insensitive), and the character with the corresponding value will be inserted instead.</p></blockquote>
<h2><a name="3.9"></a>3.9. How do I make a .nanorc file that nano will read when I start it?</h2>
<blockquote><p>It's not hard at all! But, your version of nano must have been compiled with <b>--enable-nanorc</b>, and again must be version 1.1.12 or newer (use nano -V to check your version and compiled features). Then simply copy the <b>nanorc.sample</b> that came with the nano source or your nano package (most likely in /usr/doc/nano) to .nanorc in your home directory. If you didn't get one, the syntax is simple. Flags are turned on and off by using the word <b>set</b> and the getopt_long flag for the feature, for example &quot;set nowrap&quot; or &quot;set suspend&quot;.</p></blockquote>
<hr width="100%">
<h1><a name="4"></a>4. Running</h1>
<h2><a name="4.1"></a>4.1. Ack! My backspace/delete/enter/double bucky/meta key doesn't seem to work! What can I do?</h2>
<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>
<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 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/double bucky/meta 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>
<p>Bourne shell users (like bash): <b>export TERM=vt100</b><br>
<p>Bourne shell users (bash and sh): <b>export TERM=vt100</b><br>
C Shell users (tcsh and csh): <b>setenv TERM vt100</b></p></blockquote>
<h2><a name="4.2"></a>4.2. Nano crashes when I type &lt;insert keystroke here&gt;!</h2>
<h2><a name="4.3"></a>4.3. How do I type the F13-F16 keys shown in the help browser? My keyboard only has F1-F12!</h2>
<blockquote><p>It depends on the terminal type you're using. On some terminals, such as the FreeBSD console, xterm, konsole, and gnome-terminal, Shift-F1 to Shift-F4 will generate F13 to F16. On other terminals, such as the Linux console, rxvt, or Eterm, Shift-F3 to Shift-F6 will generate F13 to F16.</p></blockquote>
<h2><a name="4.4"></a>4.4. Nano crashes when I type &lt;insert keystroke here&gt;!</h2>
<blockquote><p>If you aren't trying some bizarre keystroke combination with some bizarre $TERM entry, chances are you have found a bug. You are welcome to submit it to the <a href="mailto:nano-devel@gnu.org">nano-devel</a> list or to <a href="mailto:nano@nano-editor.org">nano@nano-editor.org</a>.</p></blockquote>
<h2><a name="4.3"></a>4.3. Nano crashes when I resize my window. How can I fix that?</h2>
<h2><a name="4.5"></a>4.5. Nano crashes when I resize my window. How can I fix that?</h2>
<blockquote><p>Older versions of nano had this problem, please upgrade to a newer version (at least 0.9.9 would be great, 0.9.12 is recommended).</p></blockquote>
<h2><a name="4.4"></a>4.4. [version 1.1.12 and earlier] Why does nano show ^\ in the shortcut list instead of ^J?</h2>
<h2><a name="4.6"></a>4.6. [version 1.1.12 and earlier] Why does nano show ^\ in the shortcut list instead of ^J?</h2>
<blockquote><p>The help (^G) and justify (^J) function were among the last to be written. To show the improvements that nano had over Pico (go to line # and replace), ^_ and ^\ were put on the shortcut list. Later, ^G came back in place of ^_ as it proved to be very valuable for new Unix users. If you use the <b>-p</b> option to nano (or hit Meta-P) you will get the same shortcuts at the bottom as Pico.</p></blockquote>
<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>
<h2><a name="4.7a"></a>4.7a. [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.1 and later] Hey, the search string behavior has reverted, it's now like Pico, what happened to the consistency?</h2>
<h2><a name="4.7b"></a>4.7b. [version 1.1.99pre1 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 &quot;NumLock glitch detected. Keypad will malfunction with NumLock off.&quot; 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 &quot;application mode&quot; 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>
<p>In a nutshell, if you want to be able to use the keypad with the arrow and page up/down functionality, you have to exit nano and reset your terminal (presumably with &quot;reset&quot; or &quot;stty sane&quot; or similar) and then run nano again with NumLock off. If you know an easier way to restore &quot;normal mode&quot;, please mail <a href="mailto:nano@nano-editor.org">nano@nano-editor.org</a>.</p></blockquote>
<h2><a name="4.7"></a>4.7. How do I make nano my default editor (in Pine, mutt, etc.)?</h2>
<h2><a name="4.8"></a>4.8. How do I make nano my default editor (in Pine, mutt, etc.)?</h2>
<blockquote><p>You need to make nano your $EDITOR. If you want this to be saved, you should put a line like this in your <b>.bashrc</b> if you use bash (or <b>.zshrc</b> if you believe in zsh):</p>
<p><b>export EDITOR=/usr/local/bin/nano</b></p>
<p>or if you use tcsh put this in your <b>.cshrc</b> file:</p>
@@ -193,6 +206,10 @@
<p>Mutt users should see an effect immediately the next time you log in, no further configuration is needed. However, if you want to let people know you use nano to compose your email messages, you can put a line like this in your <b>.muttrc</b>:</p>
<p><b>my_hdr X-Composer: nano x.y.z</b></p>
<p>Again, replace x.y.z with the version of nano you use.</p></blockquote>
<h2><a name="4.9"></a>4.9. I've compiled nano with color support, but I don't see any color when I run it!</h2>
<blockquote><p>If you want nano to actually use color, you have to specify the color configurations you want it to use in your .nanorc. Some example configurations are in the <b>nanorc.sample</b> that comes with the nano source or your nano package. See Section <a href="#3.9">3.9</a>.</p></blockquote>
<h2><a name="4.10"></a>4.10. How do I select text for the clipboard in an X terminal when I'm running nano in one and nano's mouse support is turned on?</h2>
<blockquote><p>Try holding down the Shift key and selecting the text as you normally would.</p></blockquote>
<hr width="100%">
<h1><a name="5"></a>5. Internationalization</h1>
<h2><a name="5.1"></a>5.1. There's no translation for my language!</h2>
@@ -217,13 +234,13 @@
<blockquote><p>Honestly nothing would make me happier than to see that happen. Nano would continue to be developed independently until such time as Pico had all the features nano did or the projects merged. That just does not seem very likely given that there has been no sign of any changes in the past few years in a positive direction.</p></blockquote>
<hr width="100%">
<h1><a name="7"></a>7. Miscellaneous</h1>
<h2><a name="7.1"></a>7.1. Nano related mailing lists.</h2>
<h2><a name="7.1"></a>7.1. Nano-related mailing lists.</h2>
<blockquote><p>There are three mailing lists for nano hosted at <a href="http://savannah.gnu.org/">Savannah</a>, info-nano, help-nano and nano-devel. Info-nano is a very low traffic list where new versions of nano are announced (surprise!) Help-nano is for getting help with the editor without needing to hear all of the development issues surrounding it. Nano-devel is a normally low, sometimes high traffic list for discussing the present and future development of nano. Here are links to where you can sign up for a given list:</p>
<p>info-nano - <a href="http://mail.gnu.org/mailman/listinfo/info-nano/">http://mail.gnu.org/mailman/listinfo/info-nano/</a><br>
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.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>
<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.3/BUGS">bug</a> in the program or implement a <a href="http://www.nano-editor.org/dist/v1.3/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,8 +250,19 @@
<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>
2005/06/15 - Update description of --enable-extra, and add missing line breaks. (DLR)<br>
2005/06/13 - Minor capitalization and wording fixes. (DLR)<br>
2005/06/08 - Updated section 1.1 to mention the current maintainer. (DLR)<br>
2005/03/09 - Added question about opening files with names beginning with '+'s, and added a few more miscellaneous cosmetic fixes. (DLR)<br>
2005/01/03 - Removed now-inaccurate note about verbatim input's not working at prompts, and update its description to mention that it handles hexadecimal values now. (DLR)<br>
2004/11/21 - Listed sh as an example of a Bourne shell. (DLR)<br>
2004/11/05 - Fixed inaccuracy: Pico compatibility mode was made the default in nano 1.1.99pre1, not 1.2.2. Also added question about how to type F13-F16 on terminals lacking keys past F12 (suggested by Chris), question about how to select text for the clipboard in X terminals with nano's mouse support turned on (answer found by Joseph Birthisel), and misc. fixes and link updates. (DLR)<br>
2004/04/07 - Removed NumLock glitch question, as it's no longer needed. (DLR)<br>
2004/01/30 - Fixed inaccuracy: multibuffer mode was first in nano 1.1.0, not 1.1.12. (DLR)<br>
2003/12/31 - Added question about the new verbatim input function, and a few minor fixes. Removed reference to &quot;set pico&quot; (DLR).<br>
2003/07/02 - Added question about nano's not showing color when it's compiled with color support (DLR; suggested by Jordi).<br>
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>
2002/09/10 - Another typo fix (DLR).<br>

4
doc/man/.cvsignore Normal file
View File

@@ -0,0 +1,4 @@
Makefile
Makefile.in
nanorc.5.html
nano.1.html

12
doc/man/Makefile.am Normal file
View File

@@ -0,0 +1,12 @@
SUBDIRS = fr
man_MANS = nano.1 nanorc.5
BUILT_SOURCES = nano.1.html nanorc.5.html
nano.1.html: nano.1
cat $< | groff -t -mandoc -Thtml > $@
nanorc.5.html: nanorc.5
cat $< | groff -t -mandoc -Thtml > $@
EXTRA_DIST = $(man_MANS) $(BUILT_SOURCES)

4
doc/man/fr/.cvsignore Normal file
View File

@@ -0,0 +1,4 @@
Makefile
Makefile.in
nanorc.5.html
nano.1.html

12
doc/man/fr/Makefile.am Normal file
View File

@@ -0,0 +1,12 @@
man_MANS = nano.1 nanorc.5
mandir = @mandir@/fr
BUILT_SOURCES = nano.1.html nanorc.5.html
nano.1.html: nano.1
cat $< | groff -t -mandoc -Thtml > $@
nanorc.5.html: nanorc.5
cat $< | groff -t -mandoc -Thtml > $@
EXTRA_DIST = $(man_MANS) $(BUILT_SOURCES)

246
doc/man/fr/nano.1 Normal file
View File

@@ -0,0 +1,246 @@
.\" Hey, EMACS: -*- nroff -*-
.\" nano.1 is copyright (C) 1999, 2000, 2001, 2002, 2003 by
.\" Chris Allegretta <chrisa@asty.org>
.\"
.\" (c) 2003-2004 Jean-Philippe Guérard <jean-philippe.guerard@corbeaunoir.org>
.\" pour l'adaptation française
.\"
.\" This is free documentation, see the latest version of the GNU General
.\" Public License for copying conditions. There is NO warranty.
.\"
.\" Ce document est libre. Reportez-vous à la dernière version de la
.\" licence publique générale GNU (GNU GPL) pour connaître ses
.\" conditions d'utilisation. AUCUNE garantie n'est offerte.
.\"
.\" $Id$
.TH NANO 1 "version 1.3.4" "17 août 2004"
.\" Please adjust this date whenever revising the manpage.
.\" Merci de modifier ces dates à chaque mise à jour de cette page.
.\"
.SH NOM
nano \- NAno un NOuvel éditeur, un clone libre et amélioré de Pico
.SH SYNOPSIS
.B nano
.I [\+LIGNE]\ [options]\ [fichier]
.br
.SH DESCRIPTION
Cette page de manuel décrit brièvement la commande \fBnano\fR.
.PP
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
.\" \fI<whatever>\fP escape sequences to invoke bold face and italics,
.\" respectively.
\fBnano\fR est un éditeur petit, sympathique et libre, qui vise à remplacer
Pico, l'éditeur par défaut du paquet non libre Pine. \fBnano\fR ne se
contentant pas de copier l'interface et l'ergonomie de Pico, il offre
également certaines fonctions manquantes (ou désactivées par défaut)
dans Pico. Ces fonctionnalités sont, par exemple, les fonctions de
recherche et de remplacement, et la possibilité de sauter directement à un
numéro de ligne.
.SH OPTIONS
.TP
.B \+\fILIGNE\fR
Démarre avec le curseur positionné à la ligne numéro \fILIGNE\fR.
.TP
.B \-A (\-\-smarthome)
Active le fonctionnement évolué de la touche «\ Début\ ». Lorsque cette
touche est pressée à n'importe quel endroit excepté au tout début du
texte d'une ligne (i.\ e. au premier caractère non blanc), le curseur se
positionnera à ce début de ligne (qu'il soit en avant ou en arrière). Si
le curseur est déjà au tout début de la ligne, il se placera au vrai
début de la ligne.
.TP
.B \-B (\-\-backup)
Lors de l'écriture d'un fichier, crée une copie de sécurité de la
version précédente, en ajoutant un tilde (~) au nom du fichier.
.TP
.B \-D (\-\-dos)
Écrit le fichier au format DOS.
.TP
.B \-E \fIrépertoire\fP (\-\-backupdir=\fIrépertoire\fP)
Définit le répertoire utilisé par \fBnano\fP pour enregistrer les copies
de sécurité si celles-ci sont activées.
.TP
.B \-F (\-\-multibuffer)
Active le mode multifichier, autorisant l'édition simultanée de plusieurs
fichiers, si ce mode est disponible.
.TP
.B \-H (\-\-historylog)
Enregistre les chaînes ayant fait l'objet d'une recherche ou d'un
remplacement dans le fichier \fI~/.nano_history\fR afin de permettre leur
réutilisation. Ceci n'est possible que si \fBnano\fR est configuré pour
utiliser les fichiers nanorc.
.TP
.B \-I (\-\-ignorercfiles)
N'utilise pas les fichiers \fISYSCONFDIR/nanorc\fR et \fI~/.nanorc\fR, même si
\fBnano\fR est capable de les utiliser.
.TP
.B \-M (\-\-mac)
Écrit le fichier au format Mac.
.TP
.B \-N (\-\-noconvert)
Désactive la conversion automatique des fichiers depuis les formats Mac et
DOS.
.TP
.B \-Q \fIchaîne\fP (\-\-quotestr=\fIchaîne\fP)
Définit le préfixe par défaut des citations. Nano utilise ce préfixe
pour réaliser une justification correcte des citations. Si nano est
capable d'utiliser des expressions rationnelles, le préfixe par défaut
sera "^([\ \\t]*[|>:}#])+", sinon, ce sera ">\ ".
.TP
.B \-R (\-\-regexp)
Active l'utilisation d'expressions rationnelles lors des recherches, ainsi
que la possibilité d'utiliser \\n dans les chaînes de remplacement pour
faire référence à la n-ième sous-expression du motif de recherche, si
cette fonction est disponible.
.TP
.B \-S (\-\-smooth)
Active le défilement progressif. Le texte défilera ligne-par-ligne au lieu
de défiler morceau-par-morceau.
.TP
.B \-T \fInombre\fP (\-\-tabsize=\fInombre\fP)
Définit la taille (largeur) des tabulations.
.TP
.B \-V (\-\-version)
Affiche le numéro de version et l'auteur.
.TP
.B \-Y \fIchaîne\fP (\-\-syntax=\fIchaîne\fP)
Indique quel mode de colorisation syntaxique adopter, parmi les modes
définis dans le fichier \fI.nanorc\fR, si cette fonctionnalité est
disponible.
.TP
.B \-Z (\-\-restricted)
Mode restreint\ : aucune lecture ou écriture de fichiers non indiqués
sur la ligne de commande, pas de lecture des fichiers nanorc,
interdiction de suspendre et interdiction de sauvegarder (ou d'ajouter
en tête ou en fin) un fichier ayant déjà un nom sous un nom différent.
Cette option peut aussi être activée en appelant \fBnano\fP sous un nom
commençant par «\ r\ » (par exemple «\ rnano\ »).
.TP
.B \-c (\-\-const)
Affiche en permanence la position du curseur.
.TP
.B \-d (\-\-rebinddelete)
Interprète différemment la touche «\ Supprimer\ », afin que les touches
«\ Effacement arrière\ » et «\ Supprimer\ » fonctionnent correctement.
Vous devriez n'avoir besoin de cette option que si la touche
«\ Effacement arrière\ » produit l'effet de la touche «\ Supprimer\ »
sur votre système.
.TP
.B \-h (\-\-help)
Affiche un résumé des options disponibles en ligne de commande.
.TP
.B \-i (\-\-autoindent)
Indentation automatique. Commence chaque nouvelle ligne au même niveau que
la ligne précédente. Utile pour l'édition de code source.
.TP
.B \-k (\-\-cut)
^K coupe le texte du curseur à la fin de la ligne, au lieu de couper la
ligne entière.
.TP
.B \-l (\-\-nofollow)
Si le fichier édité est un lien symbolique, remplace le lien par le
nouveau fichier, sans le suivre. Ce mode ne serait-il pas utile pour éditer
les fichiers de \fI/tmp\fR ?
.TP
.B \-m (\-\-mouse)
Active l'utilisation de la souris (si elle est disponible sur votre
système).
.TP
.B \-o \fIrépertoire\fP (\-\-operatingdir=\fIrépertoire\fP)
Définit le répertoire de travail. Demande à nano de mettre en place
quelque chose de similaire à un environnement d'exécution restreint
(\fIchroot\fR).
.TP
.B \-p (\-\-preserve)
Préserve les séquences XON et XOFF (^Q et ^S), afin qu'elle soient reçues
par le terminal.
.TP
.B \-r \fIcolonne\fP (\-\-fill=\fIcolonne\fP)
Passe automatiquement à la ligne à la colonne \fIcolonne\fR. Par défaut, le
passage à la ligne se fait à la taille de l'écran moins huit. Si la
valeur indiquée est négative, le point de passage à la ligne sera
calculé relativement au bord droit de l'écran. Cela permet de faire varier
le point de passage à la ligne lorsque l'on change la taille de l'écran.
.TP
.B \-s \fIprogramme\fP (\-\-speller=\fIprogramme\fP)
Choix d'un correcteur orthographique de remplacement.
.TP
.B \-t (\-\-tempfile)
S'il a été modifié, le fichier sera sauvegardé automatiquement sans
demande de confirmation. Identique à l'option -t de Pico.
.TP
.B \-v (\-\-view)
Mode visualisation (lecture seule).
.TP
.B \-w (\-\-nowrap)
Désactive le passage automatique à la ligne.
.TP
.B \-x (\-\-nohelp)
Désactive la barre d'aide affichée en bas de l'écran.
.TP
.B \-z (\-\-suspend)
Autorise à suspendre l'éditeur.
.TP
.B \-a, \-b, \-e, \-f, \-g, \-j
Ignoré, pour être compatible avec Pico.
.SH "FICHIERS D'INITIALISATION"
\fBnano\fR lit les fichiers d'initialisation dans l'ordre suivant\ :
\fISYSCONFDIR/nanorc\fR, puis \fI~/.nanorc\fR. Référez-vous à la page de manuel
de \fBnanorc\fR(5) et au fichier-exemple \fInanorc.sample\fR qui devrait être
livré avec \fBnano\fR.
.SH NOTES
Si aucun correcteur orthographique de remplacement n'est indiqué dans la
ligne de commande ou dans le fichier nanorc, \fBnano\fR prendra
la commande indiquée par la variable d'environnement \fBSPELL\fR si
elle est définie.
Dans certains cas, \fBnano\fR essaiera de sauvegarder le fichier en cours
d'édition dans un fichier de secours. Cela arrivera principalement si
\fBnano\fR reçoit un signal SIGHUP ou SIGTERM, ou bien se trouve à court de
mémoire. Le nom de ce fichier de secours sera \fInano.save\fR si le fichier en
cours n'avait pas encore de nom, ou sera composé du nom du fichier en cours
suivi du suffixe «\ .save\ ». Si un fichier de ce nom existe déjà dans
le répertoire, un «\ .save\ » et un nombre seront ajoutés à la fin du
nom du fichier en cours afin de le rendre unique (par exemple,
«\ .save.1\ »). En mode multifichier, \fBnano\fR réalisera une
sauvegarde de tous les fichiers en cours dans leurs fichiers de secours
respectifs.
.SH BOGUES
Merci de nous faire parvenir vos commentaires et de nous signaler les
bogues, en écrivant, en anglais, à \fBnano@nano-editor.org\fR.
La liste de discussion anglophone \fBnano\fR est disponible via
\fBnano-devel@gnu.org\fR.
Pour vous abonner, envoyez un courrier électronique à
\fBnano-devel-request@gnu.org\fR, ayant pour objet «\ subscribe\ ».
.SH "SITE INTERNET"
http://www.nano-editor.org/
.SH "VOIR AUSSI"
.PD 0
.TP
\fBnanorc\fR(5)
.PP
\fI/usr/share/doc/nano/\fR (ou son équivalent sur votre système)
.SH AUTEUR
Chris Allegretta <chrisa@asty.org> et d'autres (voir les fichiers
\fIAUTHORS\fR et \fITHANKS\fR pour plus d'information). Cette page de manuel a
été initialement rédigée par Jordi Mallach
<jordi@sindominio.net> pour le système GNU Debian (mais elle peut
être utilisée par d'autres).
.SH TRADUCTION
Adaptation française du 4\ septembre\ 2004 par
Jean-Philippe\ Guérard\ <jean-philippe.guerard@corbeaunoir.org>.

230
doc/man/fr/nanorc.5 Normal file
View File

@@ -0,0 +1,230 @@
.\" Hey, EMACS: -*- nroff -*-
.\" nanorc.5 is Copyright (C) 2003 Free Software Foundation, Inc.
.\"
.\" (c) 2003-2004 Jean-Philippe Guérard <jean-philippe.guerard@corbeaunoir.org>
.\" pour l'adaptation française
.\"
.\" This is free documentation, see the latest version of the GNU General
.\" Public License for copying conditions. There is NO warranty.
.\"
.\" Ce document est libre. Reportez-vous à la dernière version de la
.\" licence publique générale GNU (GNU GPL) pour connaître ses
.\" conditions d'utilisation. AUCUNE garantie n'est offerte.
.\"
.\" $Id$
.TH NANORC 5 "version 1.3.4" "17 août 2004"
.\" Please adjust this date whenever revising the manpage.
.\" Merci de modifier ces dates à chaque mise à jour de cette page.
.SH NOM
nanorc \- fichier de configuration de l'éditeur nano du projet GNU
.SH DESCRIPTION
Cette page de manuel décrit brièvement le fichier de configuration de
l'éditeur \fBnano\fP du projet GNU.
.PP
\fBnano\fP est un petit éditeur sympathique et libre, qui vise à
remplacer Pico, l'éditeur par défaut du paquet non-libre Pine.
\fBnano\fP ne se contentant pas de copier l'interface et l'ergonomie de
Pico, il offre également certaines fonctionnalités manquantes (ou
désactivées par défaut) de Pico. Ces fonctionnalités sont, par exemple,
les fonctions de recherche et de remplacement, et la possibilité de
sauter directement à un numéro de ligne.
.PP
Le fichier \fInanorc\fP contient les paramètres par défaut de
\fBnano\fP. Lors de son démarrage, nano commence par lire le fichier de
configuration général \fISYSCONFDIR/nanorc\fP, puis lit le fichier de
configuration personnel de l'utilisateur \fI~/.nanorc\fP.
.SH OPTIONS
Le fichier de configuration accepte une série de commandes «\ set\ »
(activer) et «\ unset\ » (désactiver), qui permettent de définir la
configuration de nano au démarrage sans avoir à utiliser d'options sur
la ligne de commande.
De plus, les mots clefs «\ syntax\ » (syntaxe) et «\ color\ » (couleur)
sont utilisés pour définir les règles de colorisation pour différents
motifs de texte. Nano lira une commande par ligne.
Les options du fichier de configuration ont priorité sur les valeurs par
défaut utilisées par nano. Les options de la ligne de commande sont
prioritaires par rapport aux options du fichier de configuration.
Les options sont désactivées (unset) par défaut, sauf les options
prenant un argument.
Les commandes et arguments reconnus sont\ :
.TP 3
\fBset/unset autoindent\fP
Active l'indentation automatique.
.TP
\fBset/unset backup\fP
Crée des copie de sécurité nommées
.IR nom_du_fichier~ .
.TP
\fBset/unset const\fP
Affiche en permanence la position du curseur dans la ligne d'état.
.TP
\fBset/unset cut\fP
Par défaut, ^K coupe le texte du curseur jusqu'à la fin de la ligne, au
lieu de couper la ligne entière.
.TP
\fBset fill \fIn\fP\fP
Passe automatiquement à la ligne à la colonne \fIn\fP. Si la valeur
indiquée est 0 ou moins, la longueur de la ligne sera égale à la largeur
de l'écran moins \fIn\fP. La valeur par défaut est -8.
.TP
\fBset/unset historylog\fP
Active l'utilisation de
.I ~/.nano_history
pour enregistrer et relire les chaînes ayant fait l'objet d'une
recherche ou d'un remplacement.
.TP
\fBset/unset multibuffer\fP
Mode multifichier\ : permet de charger les fichiers dans leur propre
espace.
.TP
\fBset/unset noconvert\fP
Pas de conversion depuis les formats DOS et Mac.
.TP
\fBset/unset nofollow\fP
Ne suit pas les liens symboliques lors de l'écriture des fichiers.
.TP
\fBset/unset nohelp\fP
Désactive les lignes d'aide affichée en bas de l'écran.
.TP
\fBset/unset nowrap\fP
Désactive le passage automatique à la ligne.
.TP
\fBset operatingdir "\fIrépertoire\fP"\fP
\fBnano\fP ne lira et n'écrira des fichiers qu'à l'intérieur du
\fIrépertoire\fP et de ses sous-répertoires. De plus, celui-ci devient
le répertoire courant, afin que les fichiers soient lus depuis ce
répertoire. Par défaut, cette fonction est désactivée.
.TP
\fBset/unset preserve\fP
Préserve les séquences XON et XOFF (^Q et ^S).
.TP
\fBset punct "\fIchaîne\fP"\fP
Définit les caractères interprétés comme des ponctuations terminales.
Ces caractères ne peuvent inclure d'espaces ou de tabulations. Seules les
ponctuations terminales, éventuellement suivies de crochets fermants,
peuvent terminer une phrase.
(N.D.T.\ : ce réglage permet de conserver 2\ espaces au lieu d'une
derrière les ponctuations terminales lors de la justification, ce qui
correspond aux normes typographiques anglo-saxonnes, mais n'a pas lieu
d'être en français. Pour le français, le plus simple est d'indiquer dans
le fichier nanorc une chaîne vide pour ce paramètre.)
.TP
\fBset quotestr "\fIchaîne\fP"\fP
Définit le préfixe par défaut utilisé pour les citations dans les
courriers électroniques. Ce préfixe est utilisé pour réaliser une
justification correcte de ces citations. Il s'agira, si votre système le
permet, d'une «\ expression rationnelle étendue\ ». Dans le cas
contraire, il s'agira d'une chaîne de texte brut. Si vous disposez des
expressions rationnelles, la valeur par défaut sera\ :
set quotestr "^([\ \\t]*[|>:}#])+"
Sinon, ce sera ">\ ". Notez que le «\ \\t\ » ci-dessus correspond à un
caractère de tabulation.
.TP
\fBset/unset rebinddelete\fP
Interprète différemment la touche «\ Supprimer\ », afin que les touches
«\ Effacement arrière\ » et «\ Supprimer\ » fonctionnent correctement.
Vous devriez uniquement avoir besoin de cette option si la touche
«\ Effacement arrière\ » produit l'effet de la touche «\ Supprimer\ »
sur votre système.
.TP
\fBset/unset regexp\fP
Utilise par défaut des expressions rationnelles pour les recherches.
.TP
\fBset/unset smarthome\fP
Active le fonctionnement évolué de la touche «\ Début\ ». Lorsque cette
touche est pressée à n'importe quel endroit excepté au tout début du
texte d'une ligne (i.\ e. au premier caractère non-blanc), le curseur se
positionnera à ce début de ligne (qu'il soit en avant ou en arrière). Si
le curseur est déjà au tout début de la ligne, il se placera au vrai
début de la ligne.
.TP
\fBset/unset smooth\fP
Active le défilement ligne-par-ligne du texte.
.TP
\fBset speller \fIprogramme\fP\fP
Utilise le correcteur orthographique \fIprogramme\fP au lieu du
correcteur intégré, qui s'appuie sur \fIspell\fP.
.TP
\fBset/unset suspend\fP
Autorise à suspendre nano avec ^Z.
.TP
\fBset tabsize \fIn\fP\fP
Utilise une largeur de tabulation de \fIn\fP au lieu de la valeur par
défaut (8). Cette valeur doit être supérieur à 0.
.TP
\fBset/unset tempfile\fP
S'il a été modifié, le fichier sera sauvegardé automatiquement en
quittant, sans demande de confirmation.
.TP
\fBset/unset view\fP
Interdit la modification du fichier.
.TP
\fBset whitespace "\fIchaîne\fP"\fP
Définit les deux caractères utilisés pour afficher les premiers
caractères de tabulations et d'espaces. Cela ne doit pas être
des caractère de contrôle.
.TP
.B syntax "\fIchaîne\fP" ["\fImotif_de_fichier\fP" ... ]
Définit une syntaxe nommée \fIchaîne\fP qui pourra être activé via
l'option \fB-Y\fP, ou qui sera automatiquement activé si le nom du
fichier en cours correspond au \fImotif_de_fichier\fP. Toutes les
instructions suivantes de colorisation \fBcolor\fP s'appliqueront à
cette syntaxe, jusqu'à la définition d'une nouvelle syntaxe.
.TP
.B color \fIcouleur_texte\fP[,\fIcouleur_fond\fP] "\fImotif\fP" ...
Pour la syntaxe en cours, affiche toutes les expressions correspondant à
l'expression rationnelle \fImotif\fP en utilisant la couleur de texte
\fIcouleur_texte\fP et éventuellement la couleur de fond
\fIcouleur_fond\fP. Les couleurs acceptées par \fBnano\fP pour le
texte et le fond sont\ : \fIwhite\fP (blanc), \fIblack\fP (noir),
\fIred\fP (rouge), \fIblue\fP (bleu), \fIgreen\fP (vert), \fIyellow\fP
(jaune), \fImagenta\fP, et \fIcyan\fP. Vous pouvez ajouter à
ces couleurs le préfixe \fIbright\fP pour obtenir une couleur plus
lumineuse. Si votre terminal est capable de gérer la transparence, ne
pas spécifier de \fIcouleur_fond\fP indique à \fBnano\fP d'essayer
d'utiliser un fond transparent.
.TP
.B color \fIcouleur_texte\fP[,\fIcouleur_fond\fP] start="\fImotif_début\fP" end="\fImotif_fin\fP"
Affiche les expressions commençant par \fImotif_début\fP et se terminant
par \fImotif_fin\fP en utilisant la couleur de texte \fIcouleur_texte\fP
et éventuellement la couleur de fond \fIcouleur_fond\fP. Cela permet à
la colorisation syntaxique de s'étendre sur plusieurs lignes. Notez que
toutes les occurrences successives de \fImotif_début\fP après le
\fImotif_début\fP initial seront surlignées jusqu'à la prochaine instance
de \fImotif_fin\fP.
.SH FICHIERS
.TP
.I $SYSCONFDIR/nanorc
Fichier de configuration général
.TP
.I ~/.nanorc
Fichier de configuration personnel
.SH VOIR AUSSI
.PD 0
.TP
\fBnano\fP(1)
.PP
\fI/usr/share/doc/nano/examples/nanorc.sample\fP (ou son équivalent sur
votre système)
.SH AUTEUR
Chris Allegretta <chrisa@asty.org> et d'autres (voir les fichiers
\fIAUTHORS\fP et \fITHANKS\fP pour plus d'information). Cette page de
manuel a été rédigée par Jordi Mallach <jordi@gnu.org>.
.SH TRADUCTION
Adaptation française du 4\ septembre\ 2004 par
Jean-Philippe\ Guérard\ <jean-philippe.guerard@corbeaunoir.org>.

214
doc/man/nano.1 Normal file
View File

@@ -0,0 +1,214 @@
.\" Hey, EMACS: -*- nroff -*-
.\" nano.1 is copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 by
.\" Chris Allegretta <chrisa@asty.org>
.\"
.\" This is free documentation, see the latest version of the GNU General
.\" Public License for copying conditions. There is NO warranty.
.\"
.\" $Id$
.TH NANO 1 "version 1.3.8" "June 27, 2005"
.\" Please adjust this date whenever revising the manpage.
.\"
.SH NAME
nano \- Nano's ANOther editor, an enhanced free Pico clone
.SH SYNOPSIS
.B nano
.I [\+LINE,COLUMN]\ [options]\ [file]
.br
.SH DESCRIPTION
This manual page documents briefly the \fBnano\fP command.
.PP
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
.\" \fI<whatever>\fP escape sequences to invoke bold face and italics,
.\" respectively.
\fBnano\fP is a small, free and friendly editor which aims to replace
Pico, the default editor included in the non-free Pine package. Rather
than just copying Pico's look and feel, \fBnano\fP also implements some
missing (or disabled by default) features in Pico, such as "search and
replace" and "go to line number".
.SH OPTIONS
.TP
.B \+\fILINE\fP,\fICOLUMN\fP
Places cursor at line number \fILINE\fP and column number \fICOLUMN\fP
on startup, instead of the default of line 1, column 1.
.TP
.B \-?
Same as \fB-h (\-\-help)\fP.
.TP
.B \-A (\-\-smarthome)
Make the Home key smarter. When Home is pressed anywhere but at the
very beginning of non-whitespace characters on a line, the cursor will
jump to that beginning (either forwards or backwards). If the cursor is
already at that position, it will jump to the true beginning of the
line.
.TP
.B \-B (\-\-backup)
When saving a file, back up the previous version of it to the current
filename suffixed with a ~.
.TP
.B \-C \fIdir\fP (\-\-backupdir=\fIdir\fP)
Set the directory where \fBnano\fP puts unique backup files if file
backups are enabled.
.TP
.B \-E (\-\-tabstospaces)
Convert typed tabs to spaces.
.TP
.B \-F (\-\-multibuffer)
Enable multiple file buffers, if available.
.TP
.B \-H (\-\-historylog)
Log search and replace strings to \fI~/.nano_history\fP so they can be
stored for later editing, if nanorc support is configured.
.TP
.B \-I (\-\-ignorercfiles)
Don't look at \fISYSCONFDIR/nanorc\fP or \fI~/.nanorc\fP, if nanorc
support is available.
.TP
.B \-N (\-\-noconvert)
Disable automatic conversion of files from DOS/Mac format.
.TP
.B \-O (\-\-morespace)
Use the blank line below the titlebar as extra editing space.
.TP
.B \-Q \fIstr\fP (\-\-quotestr=\fIstr\fP)
Set the quoting string for justifying. The default is
"^([\ \\t]*[|>:}#])+" if regular expression support is available, or
">\ " otherwise.
.TP
.B \-R (\-\-restricted)
Restricted mode: Don't read or write to any file not specified on the
command line, read any nanorc files, allow suspending, or allow a file
to be appended to, prepended to, or saved under a different name if it
already has one. Also accessible by invoking \fBnano\fP with any name
beginning with 'r' (e.g. "rnano").
.TP
.B \-S (\-\-smooth)
Enable smooth scrolling. Text will scroll line-by-line, instead of the
usual chunk-by-chunk behavior.
.TP
.B \-T \fIcols\fP (\-\-tabsize=\fIcols\fP)
Set the size (width) of a tab to \fIcols\fP columns. The value of
\fIcols\fP must be greater than 0. The default value is 8.
.TP
.B \-U (\-\-quickblank)
Do quick statusbar blanking. Statusbar messages will disappear after 1
keystroke instead of 25. Note that \fB-c\fP cancels this out.
.TP
.B \-V (\-\-version)
Show the current version number and author.
.TP
.B \-Y \fIstr\fP (\-\-syntax=\fIstr\fP)
Specify a specific syntax highlighting from the \fInanorc\fP to use, if
available.
.TP
.B \-c (\-\-const)
Constantly show the cursor position. Note that this cancels out
\fB-U\fP.
.TP
.B \-d (\-\-rebinddelete)
Interpret the Delete key differently so that both Backspace and Delete
work properly. You should only need to use this option if Backspace
acts like Delete on your system.
.TP
.B \-h (\-\-help)
Display a summary of command line options.
.TP
.B \-i (\-\-autoindent)
Indent new lines to the previous line's indentation. Useful when
editing source code.
.TP
.B \-k (\-\-cut)
Enable cut from cursor to end of line.
.TP
.B \-l (\-\-nofollow)
If the file being edited is a symbolic link, replace the link with
a new file instead of following it. Good for editing files in
\fI/tmp\fP, perhaps?
.TP
.B \-m (\-\-mouse)
Enable mouse support (if available for your system).
.TP
.B \-o \fIdir\fP (\-\-operatingdir=\fIdir\fP)
Set operating directory. Makes nano set up something similar to a
chroot.
.TP
.B \-p (\-\-preserve)
Preserve the XON and XOFF sequences (^Q and ^S) so they will be caught
by the terminal.
.TP
.B \-r \fIcols\fP (\-\-fill=\fIcols\fP)
Wrap lines at column \fIcols\fP. If this value is 0 or less, wrapping
will occur at the width of the screen less \fIcols\fP columns, allowing
the wrap point to vary along with the width of the screen if the screen
is resized. The default value is -8.
.TP
.B \-s \fIprog\fP (\-\-speller=\fIprog\fP)
Enable alternative spell checker command.
.TP
.B \-t (\-\-tempfile)
Always save changed buffer without prompting. Same as Pico's \fB-t\fP
option.
.TP
.B \-v (\-\-view)
View file (read only) mode.
.TP
.B \-w (\-\-nowrap)
Disable wrapping of long lines.
.TP
.B \-x (\-\-nohelp)
Disable help screen at bottom of editor.
.TP
.B \-z (\-\-suspend)
Enable suspend ability.
.TP
.B \-a, \-b, \-e, \-f, \-g, \-j
Ignored, for compatibility with Pico.
.SH INITIALIZATION FILE
\fBnano\fP will read initialization files in the following order:
\fISYSCONFDIR/nanorc\fP, then \fI~/.nanorc\fP. Please see
\fBnanorc(5)\fP and the example file \fBnanorc.sample\fP, both of which
should be provided with \fBnano\fP.
.SH NOTES
If no alternative spell checker command is specified on the command
line or in one of the nanorc files, \fBnano\fP will check the
\fBSPELL\fP environment variable for one.
\fBnano\fP will try to dump the buffer into an emergency file in some
cases. Mainly, this will happen if \fBnano\fP receives a SIGHUP or
SIGTERM or runs out of memory, when it will write the buffer into a file
named \fInano.save\fP if the buffer didn't have a name already, or will
add a ".save" suffix to the current filename. If an emergency file with
that name already exists in the current directory, ".save" and a number
(e.g. ".save.1") will be suffixed to the current filename in order to
make it unique. In multibuffer mode, \fBnano\fP will write all the open
buffers to their respective emergency files.
.SH BUGS
Please send any comments or bug reports to \fBnano@nano-editor.org\fP.
The \fBnano\fP mailing list is available from \fBnano-devel@gnu.org\fP.
To subscribe, email to \fBnano-devel-request@gnu.org\fP with a subject
of "subscribe".
.SH HOMEPAGE
http://www.nano-editor.org/
.SH SEE ALSO
.PD 0
.TP
\fBnanorc\fP(5)
.PP
\fI/usr/share/doc/nano/\fP (or equivalent on your system)
.SH AUTHOR
Chris Allegretta <chrisa@asty.org>, et al (see \fIAUTHORS\fP and
\fITHANKS\fP for details). This manual page was originally written by
Jordi Mallach <jordi@sindominio.net>, for the Debian GNU system (but may
be used by others).

218
doc/man/nanorc.5 Normal file
View File

@@ -0,0 +1,218 @@
.\" Hey, EMACS: -*- nroff -*-
.\" nanorc.5 is Copyright (C) 2003, 2004, 2005 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 "version 1.3.8" "June 27, 2005"
.\" Please adjust this date whenever revising the manpage.
.\"
.SH NAME
nanorc \- GNU nano's rcfile
.SH DESCRIPTION
This manual page documents GNU \fBnano\fP's rcfile.
.PP
\fBnano\fP is a small, free and friendly editor which aims to replace
Pico, the default editor included in the non-free Pine package. Rather
than just copying Pico's look and feel, \fBnano\fP also implements some
missing (or disabled by default) features in Pico, such as "search and
replace" and "go to line number".
.PP
The \fInanorc\fP file contains the default settings for \fBnano\fP.
During startup, \fBnano\fP will first read its system-wide settings from
\fISYSCONFDIR/nanorc\fP, and then user-specific settings from
\fI~/.nanorc\fP.
.SH OPTIONS
The configuration file accepts a series of "set" and "unset" commands,
which can be used to configure nano on startup without using the
command-line options. Additionally, the "syntax", "color", and "icolor"
keywords are used to define syntax highlighting rules for different text
patterns. 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
.B set/unset autoindent
Use auto-indentation.
.TP
.B set/unset backup
Create backup files in \fIfilename~\fP.
.TP
.B set backupdir "\fIdirectory\fP"
Set the directory where \fBnano\fP puts unique backup files if file
backups are enabled.
.TP
.B set/unset backwards
Do backwards searches by default.
.TP
.B set brackets "\fIstring\fP"
Set the characters treated as closing brackets. They cannot contain
blank characters. Only closing punctuation, optionally followed by
closing brackets, can end sentences.
.TP
.B set/unset casesensitive
Do case sensitive searches by default.
.TP
.B set/unset const
Constantly display the cursor position in the status bar.
.TP
.B set/unset cut
Use cut to end of line by default.
.TP
.B set fill \fIn\fP
Wrap lines at column number \fIn\fP. If \fIn\fP is 0 or less, the
maximum line length will be the screen width less \fIn\fP columns. The
default value is -8.
.TP
.B set/unset historylog
Enable \fI~/.nano_history\fP for saving and reading search/replace
strings.
.TP
.B set/unset morespace
Allow use of the blank line below the titlebar as extra editing space.
.TP
.B set/unset mouse
Enable mouse support, so that mouse clicks can be used to set the mark
and run shortcuts.
.TP
.B set/unset multibuffer
Allow inserting files into their own buffers.
.TP
.B set/unset noconvert
Don't convert files from DOS/Mac format.
.TP
.B set/unset nofollow
Don't follow symlinks when writing files.
.TP
.B set/unset nohelp
Don't display the help lists at the bottom of the screen.
.TP
.B set/unset nowrap
Don't wrap text at all.
.TP
.B set operatingdir "\fIdirectory\fP"
\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
.B set/unset preserve
Preserve the XON and XOFF keys (^Q and ^S).
.TP
.B set punct "\fIstring\fP"
Set the characters treated as closing punctuation. They cannot contain
blank characters. Only closing punctuation, optionally followed by
closing brackets, can end sentences.
.TP
.B set quickblank
Do quick statusbar blanking. Statusbar messages will disappear after 1
keystroke instead of 25.
.TP
.B set quotestr "\fIstring\fP"
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
.B set/unset rebinddelete
Interpret the Delete key differently so that both Backspace and Delete
work properly. You should only need to use this option if Backspace
acts like Delete on your system.
.TP
.B set/unset regexp
Do regular expression searches by default.
.TP
.B set/unset smarthome
Make the Home key smarter. When Home is pressed anywhere but at the
very beginning of non-whitespace characters on a line, the cursor will
jump to that beginning (either forwards or backwards). If the cursor is
already at that position, it will jump to the true beginning of the
line.
.TP
.B set/unset smooth
Use smooth scrolling by default.
.TP
.B set speller \fIspellprog\fP
Use spelling checker \fIspellprog\fP instead of the built-in one, which
calls \fIspell\fP.
.TP
.B set/unset suspend
Allow nano to be suspended.
.TP
.B set tabsize \fIn\fP
Use a tab size of \fIn\fP columns. The value of \fIn\fP must be greater
than 0. The default value is 8.
.TP
.B set/unset tabstospaces
Convert typed tabs to spaces.
.TP
.B set/unset tempfile
Save automatically on exit, don't prompt.
.TP
.B set/unset view
Disallow file modification.
.TP
.B set whitespace "\fIstring\fP"
Set the two characters used to display the first characters of tabs and
spaces. They must be single-column characters.
.TP
.B syntax "\fIstr\fP" ["\fIfileregex\fP" ... ]
Defines a syntax named \fIstr\fP which can be activated via the \fB-Y\fP
flag, or will be automatically activated if the current filename matches
\fIfileregex\fP. All following \fBcolor\fP and \fBicolor\fP statements
will apply to \fIsyntax\fP until a new syntax is defined.
.TP
.B color \fIfgcolor\fP,\fIbgcolor\fP "\fIregex\fP" ...
For the currently defined syntax, display all expressions matching
\fIregex\fP with foreground color \fIfgcolor\fP and background color
\fIbgcolor\fP, at least one of which must be specified. Legal colors
for foreground and background color are: white, black, red, blue, green,
yellow, magenta, and cyan. You may use the prefix "bright" to force a
stronger color highlight for the foreground. If your terminal supports
transparency, not specifying a \fIbgcolor\fP tells \fBnano\fP to attempt
to use a transparent background.
.TP
.B icolor \fIfgcolor\fP,\fIbgcolor\fP "\fIregex\fP" ...
Same as above, except that the expression matching is case insensitive.
.TP
.B color \fIfgcolor\fP,\fIbgcolor\fP start="\fIsr\fP" end="\fIer\fP"
Display expressions which start with \fIsr\fP and end with \fIer\fP
with foreground color \fIfgcolor\fP and background color \fIbgcolor\fP,
at least one of which must be specified. This allows syntax
highlighting to span multiple lines. Note that all subsequent instances
of \fIsr\fP after an initial \fIsr\fP is found will be highlighted until
the first instance of \fIer\fP.
.TP
.B icolor \fIfgcolor\fP,\fIbgcolor\fP start="\fIsr\fP" end="\fIer\fP"
Same as above, except that the expression matching is case insensitive.
.SH FILES
.TP
.I SYSCONFDIR/nanorc
System-wide configuration file
.TP
.I ~/.nanorc
Per-user configuration file
.SH SEE ALSO
.PD 0
.TP
\fBnano\fP(1)
.PP
\fI/usr/share/doc/nano/examples/nanorc.sample\fP (or equivalent on your
system)
.SH AUTHOR
Chris Allegretta <chrisa@asty.org>, et al (see \fIAUTHORS\fP and
\fITHANKS\fP for details). This manual page was written by Jordi
Mallach <jordi@gnu.org>.

314
doc/nanorc.sample Normal file
View File

@@ -0,0 +1,314 @@
## Sample initialization file for GNU nano
## Please note that you must have configured nano with --enable-nanorc
## for this file to be read! Also note that characters specially
## interpreted by the shell should not be escaped here.
##
## To make sure a value is not enabled, use "unset <option>"
##
## For the options that take parameters, the default value is given.
## Other options are unset by default.
## Use auto-indentation.
# set autoindent
## Backup files to filename~.
# set backup
## The directory to put unique backup files in.
# set backupdir ""
## Do backwards searches by default.
# set backwards
## The characters treated as closing brackets. They cannot contain
## blank characters. Only closing punctuation, optionally followed by
## closing brackets, can end sentences.
##
# set brackets "'")}]>"
## Do case sensitive searches by default.
# set casesensitive
## Constantly display the cursor position in the statusbar. Note that
## this cancels out "quickblank".
# set const
## Use cut to end of line by default.
# set cut
## Set the line length for wrapping text and justifying paragraphs.
## If fill is 0 or less, the line length will be the screen width less
## this number.
##
# set fill -8
## Enable ~/.nano_history for saving and reading search/replace strings.
# set historylog
## Use the blank line below the titlebar as extra editing space.
# set morespace
## Enable mouse support, so that mouse clicks can be used to set the
## mark and run shortcuts.
# set mouse
## Allow multiple file buffers (inserting a file will put it into a
## separate buffer). You must have configured with --enable-multibuffer
## for this to work.
##
# set multibuffer
## Don't convert files from DOS/Mac format.
# set noconvert
## Don't follow symlinks when writing files.
# set nofollow
## Don't display the helpful shortcut lists at the bottom of the screen.
# set nohelp
## Don't wrap text at all.
# set nowrap
## Set operating directory. nano will not read or write files outside
## this directory and its subdirectories. Also, the current directory
## is changed to here, so files are inserted from this dir. A blank
## string means the operating directory feature is turned off.
##
# set operatingdir ""
## Preserve the XON and XOFF keys (^Q and ^S).
# set preserve
## The characters treated as closing punctuation. They cannot contain
## blank characters. Only closing punctuation, optionally followed by
## closing brackets, can end sentences.
##
# set punct ".?!"
## Do quick statusbar blanking. Statusbar messages will disappear after
## 1 keystroke instead of 25. Note that "const" cancels this out.
##
# set quickblank
## 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. Default:
# set quotestr "^([ ]*[\|>:}#])+"
## if you have regexps, otherwise:
# set quotestr "> "
## You can get old nano quoted-justify behavior via:
# set quotestr "(> )+"
## Fix Backspace/Delete confusion problem.
# set rebinddelete
## Do extended regular expression searches by default.
# set regexp
## Make the Home key smarter. When Home is pressed anywhere but at the
## very beginning of non-whitespace characters on a line, the cursor
## will jump to that beginning (either forwards or backwards). If the
## cursor is already at that position, it will jump to the true
## beginning of the line.
# set smarthome
## Use smooth scrolling as the default.
# set smooth
## Use this spelling checker instead of the internal one. This option
## does not properly have a default value.
##
# set speller "aspell -x -c"
## Allow nano to be suspended.
# set suspend
## Use this tab size instead of the default; it must be greater than 0.
# set tabsize 8
## Convert typed tabs to spaces.
# set tabstospaces
## Save automatically on exit, don't prompt.
# set tempfile
## Disallow file modification; why would you want this in an rcfile? ;)
# set view
## The two single-column characters used to display the first characters
## of tabs and spaces. 187 decimal (00BB hexadecimal) and 183 decimal
## (00B7 hexadecimal) seem to be good values for these.
# set whitespace " "
## Color setup
##
## Format:
##
## syntax "short description" ["filename regex" ...]
##
## color foreground,background "regex" ["regex"...]
## or
## icolor foreground,background "regex" ["regex"...]
##
## "color" will do case sensitive matches, while "icolor" will do case
## insensitive matches.
##
## Legal colors: white, black, red, blue, green, yellow, magenta, cyan.
## You may use the prefix "bright" to mean a stronger color highlight
## for the foreground.
##
## To use multi-line regexes, use the start="regex" end="regex" format.
##
## If your system supports transparency, not specifying a background
## color will use a transparent color. If you don't want this, be sure
## to set the background color to black or white.
##
# syntax "c-file" "\.(c|C|cc|cpp|cxx|h|H|hh|hpp|hxx)$"
# color red "\<[A-Z_]{2,}\>"
# color green "\<(float|double|bool|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|signed|unsigned|inline)\>"
# color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>"
# color brightyellow "\<(for|if|while|do|else|case|default|switch|goto|continue|break|return)\>"
# color brightyellow "\<(try|throw|catch|operator|new|delete)\>"
# color brightcyan "^[[:space:]]*#[[:space:]]*(define|undef|include|ifn?def|endif|elif|else|if|warning|error)"
# color brightmagenta "'([^\]|(\\['abfnrtv\\]))'" "'\\(([0-7][0-7]?)|([0-3][0-7][0-7]))'" "'\\x[0-9A-Fa-f][0-9A-Fa-f]?'"
##
## GCC builtins
##
# color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(asm|builtin|inline|restrict|typeof)__"
##
## You will in general want your comments and strings to come last,
## because syntax highlighting rules will be applied in the order they
## are read in.
##
# color brightyellow "<[^= ]*>" ""(\\.|[^\"])*""
##
## This string is VERY resource intensive!!!
# color brightyellow start=""(\\.|[^\"])*\\[[:space:]]*$" end="^(\\.|[^\"])*""
##
## And we want to have some nice comment highlighting too
# color brightblue "//.*"
# color brightblue start="/\*" end="\*/"
## Here is a short example for HTML
# syntax "HTML" "\.html$"
# color blue start="<" end=">"
# color red "&[^;[[:space:]]]*;"
## Here is a short example for TeX files
# syntax "TeX" "\.tex$"
# color green "\\.|\\[A-Za-z]*"
# color magenta "[{}]"
# color blue "%.*"
## Here is an example for quoted emails (under e.g. mutt)
# syntax "mutt"
# color green "^>.*"
## Here is an example for groff
##
# syntax "groff" "\.m[ems]$" "\.tmac$" "^tmac." ".rof"
## The argument of .nr or .ds
# color cyan "^\.ds [^[[:space:]]]*"
# color cyan "^\.nr [^[[:space:]]]*"
## Single character escapes
# color brightmagenta "\\."
## Highlight the argument of \f or \s in the same color
# color brightmagenta "\\f."
# color brightmagenta "\\f\(.."
# color brightmagenta "\\s(\+|\-)?[0-9]"
## \n
# color cyan "(\\|\\\\)n."
# color cyan "(\\|\\\\)n\(.."
# color cyan start="(\\|\\\\)n\[" end="]"
## Requests
# color brightgreen "^\.[[:space:]]*[^[[:space:]]]*"
## Comments
# color yellow "^\.\\\".*$"
## Strings
# color green "(\\|\\\\)\*."
# color green "(\\|\\\\)\*\(.."
# color green start="(\\|\\\\)\*\[" end="]"
## Characters
# color brightred "\\\(.."
# color brightred start="\\\[" end="]"
## Macro arguments
# color brightcyan "\\\\\$[1-9]"
## Here is an example for perl
##
# syntax "perl" "\.p[lm]$"
# color red "\<(accept|alarm|atan2|bin(d|mode)|c(aller|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork))\>" "\<(get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join)\>" "\<(keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek(dir)?)\>" "\<(se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr(y)?|truncate|umask)\>" "\<(un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\>"
# color magenta "\<(continue|else|elsif|do|for|foreach|if|unless|until|while|eq|ne|lt|gt|le|ge|cmp|x|my|sub|use|package|can|isa)\>"
# color cyan start="[$@%]" end="( |\\W|-)"
# color yellow "".*"|qq\|.*\|"
# color white "[sm]/.*/"
# color white start="(^use| = new)" end=";"
# color green "#.*"
# color yellow start="<< 'STOP'" end="STOP"
## Here is an example for Java source
##
# syntax "Java source" "\.java$"
# color green "\<(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\>"
# color red "\<(break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\>"
# color cyan "\<(abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\>"
# color red ""[^\"]*""
# color yellow "\<(true|false|null)\>"
# color blue "//.*"
# color blue start="/\*" end="\*/"
# color brightblue start="/\*\*" end="\*/"
# color brightgreen,green "[[:space:]]+$"
## Here is an example for patch files
##
# syntax "patch" "\.(patch|diff)$"
# color brightgreen "^\+.*"
# color green "^\+\+\+.*"
# color brightblue "^ .*"
# color brightred "^-.*"
# color red "^---.*"
# color brightyellow "^@@.*"
# color magenta "^diff.*"
## Here is an example for manpages
##
# syntax "manpage" "\.[1-9]x?$"
# color green "\.(S|T)H.*$"
# color brightgreen "\.(S|T)H" "\.TP"
# color brightred "\.(BR?|I[PR]?).*$"
# color brightblue "\.(BR?|I[PR]?|PP)"
# color brightwhite "\\f[BIPR]"
# color yellow "\.(br|DS|RS|RE|PD)"
## Here is an example for assembler
##
# syntax "asm-file" "\.(S|s|asm)$"
# color red "\<[A-Z_]{2,}\>"
# color brightgreen "\.(data|subsection|text)"
# color green "\.(align|file|globl|global|hidden|section|size|type|weak)"
# color brightyellow "\.(ascii|asciz|byte|double|float|hword|int|long|short|single|struct|word)"
# icolor brightred "^[[:space:]]*[._A-Z0-9]*:"
# color brightcyan "^[[:space:]]*#[[:space:]]*(define|undef|include|ifn?def|endif|elif|else|if|warning|error)"
## Highlight strings (note: VERY resource intensive)
# color brightyellow "<[^= ]*>" ""(\\.|[^\"])*""
# color brightyellow start=""(\\.|[^\"])*\\[[:space:]]*$" end="^(\\.|[^\"])*""
## Highlight comments
# color brightblue "//.*"
# color brightblue start="/\*" end="\*/"
## Here is an example for your .nanorc
##
# syntax "nanorc" "(\.|/|)nanorc$"
## highlight possible errors and parameters
# icolor brightwhite "^[[:space:]]*(set|unset|syntax|i?color).*$"
## set, unset and syntax
# icolor cyan "^[[:space:]]*(set|unset)[[:space:]]+(autoindent|backup|backupdir|backwards|brackets|casesensitive|const|cut|fill|historylog|morespace|mouse|multibuffer|noconvert|nofollow|nohelp|nowrap|operatingdir|preserve|punct|quickblank|quotestr|rebinddelete)\>" "^[[:space:]]*(set|unset)[[:space:]]+(regexp|smarthome|smooth|speller|suspend|tabsize|tabstospaces|tempfile|view|whitespace)\>"
# icolor green "^[[:space:]]*(set|unset|syntax)\>"
## colors
# icolor yellow "^[[:space:]]*i?color[[:space:]]*(bright)?(white|black|red|blue|green|yellow|magenta|cyan)?(,(white|black|red|blue|green|yellow|magenta|cyan))?\>"
# icolor magenta "^[[:space:]]*i?color\>" "\<(start|end)="
## strings
# icolor white "\"(\\.|[^\"])*\""
## comments
# icolor blue "^[[:space:]]*#.*$"

4
doc/texinfo/.cvsignore Normal file
View File

@@ -0,0 +1,4 @@
Makefile
Makefile.in
nano.info
texinfo.tex

5
doc/texinfo/Makefile.am Normal file
View File

@@ -0,0 +1,5 @@
info_TEXINFOS = nano.texi
MAKEINFO = makeinfo --no-split
EXTRA_DIST = nano.info

View File

@@ -8,8 +8,8 @@
@c Run `makeinfo' rather than `texinfo-format-buffer'.
@smallbook
@set EDITION 0.1
@set VERSION 1.2.1
@set UPDATED 17 Jan 2003
@set VERSION 1.3.8
@set UPDATED 27 Jun 2005
@dircategory Editors
@direntry
@@ -23,7 +23,7 @@
@titlepage
@title GNU @code{nano}
@subtitle a small and friendly text editor.
@subtitle version 1.2.1
@subtitle version 1.3.8
@author Chris Allegretta
@page
@@ -33,7 +33,7 @@ editor.
This manual is part of the GNU @code{nano} distribution.@*
@sp4
Copyright (C) 1999, 2000, 2001, 2002 Chris Allegretta.
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 Chris Allegretta.
Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
@@ -91,14 +91,14 @@ internationalization support, and filename tab completion.
@node Overview, Command Line Options, Introduction, Introduction
@section Overview
@code{nano} +LINE [GNU long option] [option] [ @var{file ...} ]
@code{nano} +LINE,COLUMN [GNU long option] [option] [ @var{file ...} ]
The original goal for @code{nano} was a complete bug-for-bug compatible
emulation of Pico, but nano's main goal is to be as compatible as
possible while offering a superset of Pico's functionality.
Also see @xref{Pico Compatibility}, for other differences.
emulation of Pico, but @code{nano}'s main goal is to be as compatible as
possible while offering a superset of Pico's functionality. Also see
@xref{Pico Compatibility}, for other differences.
Email bug reports to @email{nano@@nano-editor.org}.
Email bug reports to @email{nano@@nano-editor.org}.
@node Command Line Options, , Overview, Introduction
@section Command Line Options
@@ -106,29 +106,38 @@ Email bug reports to @email{nano@@nano-editor.org}.
@code{nano} takes the following options from the command line:
@table @code
@item +LINE,COLUMN
Start at line number LINE and column number COLUMN instead of the
default of line 1, column 1.
@item -?
Same as @code{-h, --help}.
@item -A, --smarthome
Make the Home key smarter. When Home is pressed anywhere but at the
very beginning of non-whitespace characters on a line, the cursor will
jump to that beginning (either forwards or backwards). If the cursor is
already at that position, it will jump to the true beginning of the
line.
@item -B, --backup
When saving a file, back up the previous version of it to the current
filename suffixed with a ~.
@item -D, --dos
Write file in DOS format.
@item -C, --backupdir=[dir]
Set the directory where @code{nano} puts unique backup files if file
backups are enabled.
@item -E, --tabstospaces
Convert typed tabs to spaces.
@item -F, --multibuffer
Enable multiple file buffers, if available.
@item -I, --ignorercfiles
Don't look at $SYSCONFDIR/nanorc or ~/.nanorc, if nanorc support is
Don't look at SYSCONFDIR/nanorc or ~/.nanorc, if nanorc support is
available.
@item -K, --keypad
Do not use the ncurses keypad() call unless necessary. Try this flag if
you find that the arrow keys on the numeric keypad do not work for you
under @code{nano}.
@item -M, --mac
Write file in Mac format.
@item -N, --noconvert
Do not convert files from DOS/Mac format.
@@ -142,16 +151,25 @@ Set the quoting string for justifying. The default is
if regular expression support is available, or ``> '' otherwise. Note
that @code{\t} above stands for a literal Tab character.
@item -R, --regexp
Turn on regular expression search and search/replace.
@item -R, --restricted
Restricted mode: Don't read or write to any file not specified on the
command line, read any nanorc files, allow suspending, or allow a file
to be appended to, prepended to, or saved under a different name if it
already has one. Also accessible by invoking @code{nano} with any name
beginning with 'r' (e.g. "rnano").
@item -S, --smooth
Enable smooth scrolling.
@item -T [num], --tabsize=[num]
Set the displayed tab length to [num] columns.
@item -T [num], --tabsize=[#cols]
Set the displayed tab length to #cols columns. The value of #cols must
be greater than 0. The default value is 8.
@item -V, --version
@item -U, --quickblank
Do quick statusbar blanking. Statusbar messages will disappear after 1
keystroke instead of 25. Note that -c cancels this out.
@item -V, --version
Print the version number and copyright and quit.
@item -Y, --syntax=[str]
@@ -160,6 +178,12 @@ available.
@item -c, --const
Constantly display the cursor position and line number on the statusbar.
Note that this cancels out -U.
@item -d, --rebinddelete
Interpret the Delete key differently so that both Backspace and Delete
work properly. You should only need to use this option if Backspace
acts like Delete on your system.
@item -h, --help
Print the usage and exit.
@@ -169,35 +193,35 @@ Automatically indent new lines to the same number of spaces and tabs as
the previous line.
@item -k, --cut
Makes ^K cut from the current cursor position to the end of the current
line.
Cut from the current cursor position to the end of the current line.
@item -l, --nofollow
When writing files, if the given file is a symbolic link it is removed
When writing files, if the given file is a symbolic link, it is removed
and a new file is created.
@item -m, --mouse
Enables the use of the mouse to select text (currently only useful for
running under the X window system).
running under the X Window System).
@item -o [dir], --operatingdir=[dir]
Set operating directory. Makes @code{nano} set up something similar to a
chroot.
Set operating directory. Makes @code{nano} set up something similar to
a chroot.
@item -p, --preserve
Preserve the ^Q (XON) and ^S (XOFF) sequences so data being sent to the editor
can be can be stopped and started.
Preserve the ^Q (XON) and ^S (XOFF) sequences so data being sent to the
editor can be can be stopped and started.
@item -r [#cols], --fill=[#cols].
Wrap lines at column #cols. By default this is the width of the screen,
less eight. If this value is negative, wrapping will occur at #cols from
the right of the screen, allowing it to vary along with the screen width
if the screen is resized.
Wrap lines at column #cols. If this value is 0 or less, wrapping will
occur at #cols less the width of the screen, allowing it to vary along
with the width of the screen if the screen is resized. The default
value is -8.
@item -s [prog], --speller=[prog]
Invoke [prog] as the spell checker. By default, @code{nano} uses its
own interactive spell checker that requires the @code{spell} program be
installed on your system.
Invoke [prog] as the spell checker. By default, @code{nano} uses the
command specified in the SPELL environment variable, or, if SPELL is not
set, its own interactive spell checker that requires the @code{spell}
program to be installed on your system.
@item -t, --tempfile
Do not ask whether or not to save the current contents of the file when
@@ -206,21 +230,21 @@ composer of a mailer program.
@anchor{Expert Mode}
@item -x, --nohelp
In Expert Mode, the Shortcut Lists will not appear at the bottom of the
screen. This affects the location of the statusbar as well, as in Expert
Mode it is located at the very bottom of the editor.
In Expert Mode, the Shortcut Lists will not appear at the bottom of the
screen. This affects the location of the statusbar as well, as in
Expert Mode it is located at the very bottom of the editor.
Note: When accessing the help system, Expert Mode is temporarily disabled
to display the help system navigation keys.
Note: When accessing the help system, Expert Mode is temporarily
disabled to display the help system navigation keys.
@item -v, --view
Do not allow the contents of the file to be altered. Note that this
flag should NOT be used in place of correct file permissions to implement
a read-only file.
flag should NOT be used in place of correct file permissions to
implement a read-only file.
@item -w, --nowrap
Do not wrap long lines at any length. This option overrides any value for
-r.
Do not wrap long lines at any length. This option overrides any value
for -r.
@item -z, --suspend
Enable suspend ability of @code{nano} using the system's suspend
@@ -228,9 +252,6 @@ keystroke (usually ^Z).
@item -a, -b, -e, -f, -g, -j
Ignored, for compatibility with Pico.
@item +LINE
Start at line number LINE instead of the default of line 1.
@end table
@node Editor Basics, Online Help, Introduction, Top
@@ -249,38 +270,41 @@ Start at line number LINE instead of the default of line 1.
All key sequences in @code{nano} are entered using the keyboard.
@code{nano} is a ``modeless'' editor. All keys with the exception of
Control and Meta key sequences will enter text into the file being
edited.
edited.
@node Special Functions, The Titlebar, Entering Text, Editor Basics
@section Special Functions
Special functions use the Control key (displayed in the help and
shortcut lists as ^) or the Meta key (displayed as M).
shortcut lists as ^), the Meta key (displayed as M), or the Esc key.
@itemize @bullet
@item
Control key sequences are entered by holding down the Control key and
pressing the desired letter.
pressing the desired key, or by pressing the Esc key twice and pressing
the desired key.
@item
Meta key sequences can be entered in a number of
possible ways: Pressing the Escape key, then releasing it and pressing
the desired key, or holding down the Alt key while pressing the desired
key. This varies from keyboard to keyboard, and certain commercial
operating systems ``swallow'' the Alt key so that it never reaches the
application. If your operating system does this, you should use the
Escape key to generate Meta key sequences.
Pressing Esc twice and then typing a three-digit number from 000 to 255
will enter the character with the corresponding ASCII code.
@item
Meta key sequences can be entered in a number of possible ways: Pressing
the Escape key, then releasing it and pressing the desired key, or
holding down the Alt key while pressing the desired key. This varies
from keyboard to keyboard, and certain commercial operating systems
``swallow'' the Alt key so that it never reaches the application. If
your operating system does this, you should use the Escape key to
generate Meta key sequences.
@end itemize
@node The Titlebar, The Statusbar, Special Functions, Editor Basics
@section The Titlebar
The titlebar is the line displayed at the top of the editor. There are
three sections: left, center and right. The section on the left displays
the version of @code{nano} being used. The center section displays the
current file name, or ``New Buffer'' if the file has not yet been named.
The section on the right will display ``Modified'' if the file has been
modified since it was last saved or opened.
three sections: left, center and right. The section on the left
displays the version of @code{nano} being used. The center section
displays the current file name, or ``New Buffer'' if the file has not
yet been named. The section on the right will display ``Modified'' if
the file has been modified since it was last saved or opened.
Special modes: When @code{nano} is in ``File browser'' mode, the center
section will display the current directory instead of the filename.
@@ -302,13 +326,13 @@ the statusbar.
@section Shortcut Lists
The Shortcut Lists are the two lines at the bottom of the screen which
show some of the more commonly used functions in the editor.
show some of the more commonly used functions in the editor.
@node Online Help, Feature Toggles, Editor Basics, Top
@chapter Online Help
The online help system in @code{nano} is available by pressing ^G.
It is fairly self explanatory, documenting the various parts of the
It is fairly self explanatory, documenting the various parts of the
editor and available keystrokes. Navigation is via the ^Y (Page Up)
and ^V (Page Down) keys. ^X exits the help system.
@@ -317,51 +341,62 @@ and ^V (Page Down) keys. ^X exits the help system.
@chapter Feature Toggles
Toggles allow you to change certain aspects of the editor that
would normally be done via command line flags. They are invoked via
certain Meta key sequences. @xref{Special Functions}, for more info.
would normally be done via command line flags. They are invoked via
certain Meta key sequences. @xref{Special Functions}, for more info.
The following global toggles are available:
@table @code
@item Backup File Toggle (Meta-B)
@item Backup Files Toggle (Meta-B)
toggles the -B (@code{--backup}) command line flag.
@item DOS Format Toggle (Meta-D)
toggles the -D (@code{--dos}) command line flag.
@item Constant Cursor Position Display Toggle (Meta-C)
toggles the -c (@code{--const}) command line flag.
@item Multiple Files Toggle (Meta-F)
@item Multiple File Buffers Toggle (Meta-F)
toggles the -F (@code{--multibuffer}) command line flag.
@item AutoIndent Toggle (Meta-I)
@item Smart Home Key Toggle (Meta-H)
toggles the -A (@code{--smarthome}) command line flag.
@item Auto Indent Toggle (Meta-I)
toggles the -i (@code{--autoindent}) command line flag.
@item Cut To End Toggle (Meta-K)
toggles the -k (@code{--cut}) command line flag.
@item Mouse Toggle (Meta-M)
@item Long Line Wrapping Toggle (Meta-L)
toggles the -w (@code{--nowrap}) command line flag.
@item Mouse Support Toggle (Meta-M)
toggles the -m (@code{--mouse}) command line flag.
@item Mac Format Toggle (Meta-O)
toggles the -M (@code{--mac}) command line flag.
@item No Conversion From DOS/Mac Format Toggle (Meta-N)
toggles the -N (@code{--noconvert}) command line flag.
@item More Space For Editing Toggle (Meta-O)
toggles the -O (@code{--morespace}) command line flag.
@item Whitespace Display Toggle (Meta-P)
toggles whitespace display mode if you have a "whitespace" option in
your .nanorc.
@item Tabs to Spaces Toggle (Meta-Q)
toggles the -E (@code{--tabstospaces}) command line flag.
@item Smooth Scrolling Toggle (Meta-S)
toggles the -S (@code{--smooth}) command line flag.
@item AutoWrap Toggle (Meta-W)
toggles the -w (@code{--nowrap}) command line flag.
@item Expert/Nohelp Toggle (Meta-X)
@item Expert/No Help Toggle (Meta-X)
toggles the -x (@code{--nohelp}) command line flag.
@item Color Syntax Highlighting Toggle (Meta-Y)
toggles color syntax highlighting if you have color syntaxes in your
.nanorc.
@item Suspend Toggle (Meta-Z)
toggles the -z (@code{--suspend}) command line flag.
@item Open Previous File Toggle (Meta-<)
changes buffer to previously loaded file.
@item Open Next File Toggle (Meta->)
changes buffer to next loaded file.
@end table
@@ -375,7 +410,7 @@ find the desired file.
Basic movement in the file browser is accomplished with the arrow keys
and page up/down. The behavior of the enter (or `s') key varies by what
is currently selected. If the currently selected object is a directory,
the file browser will enter and display the contents of the directory.
the file browser will enter and display the contents of the directory.
If the object is a file, this filename and path are copied to the
statusbar and the file browser is exited.
@@ -387,17 +422,18 @@ are certain differences between the editors:
@table @code
@item Search and Replace History
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
method, previous entries would be displayed by default as editable text
in front of the cursor, as opposed to being bracketed and uneditable as
it is in Pico. The old behavior could be made compatible with Pico via the
@code{-p} flag, but recent versions of Pico use the @code{-p} flag
to preserve the XON and XOFF sequences within the editor. Since with the new
method search and replace strings can still be edited by simply
hitting the up arrow key once, the old method was removed completely.
As of version 1.1.99pre1 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 method, previous entries would be displayed by default as
editable text in front of the cursor, as opposed to being bracketed and
uneditable as it is in Pico. The old behavior could be made compatible
with Pico via the @code{-p} flag, but recent versions of Pico use the
@code{-p} flag to preserve the XON and XOFF sequences within the editor.
Since with the new method search and replace strings can still be edited
by simply hitting the up arrow key once, the old method was removed
completely.
@item Writing or Appending Selected Text to Files
@@ -405,13 +441,12 @@ Text selected using the Control-Caret (^^) key can be written out or
appended to a new or existing file using the Writeout key (^O).
@item Toggles
Many options which alter the functionality of the program can be
"toggled" on or off using Meta key sequences, meaning the program does
not have to be restarted to turn a particular feature of the editor
on or off. Please see the internal help function (^G) for a list of
what functions can be toggled for a particular version of
@code{nano}. Also see @xref{Feature Toggles}, though this may be out
of date.
Many options which alter the functionality of the program can be
"toggled" on or off using Meta key sequences, meaning the program does
not have to be restarted to turn a particular feature of the editor on
or off. Please see the internal help function (^G) for a list of what
functions can be toggled for a particular version of @code{nano}. Also
see @xref{Feature Toggles}, though this may be out of date.
@item Cursor Position Display
The output of the "Display Cursor Position" in @code{nano} displays
@@ -420,24 +455,25 @@ position of the cursor.
@item Interactive Replace and Spell Checker
It is worth noting that the @code{nano} replace function is interactive,
i.e. it does not stop after one search string is found and automatically
i.e, it does not stop after one search string is found and automatically
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.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.
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.99pre1, 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
@node Building and Configure Options, , Pico Compatibility, Top
@chapter Building and Configure Options
Building @code{nano} from source is fairly straightforward if you are familiar
with compiling programs with autoconf support:
Building @code{nano} from source is fairly straightforward if you are
familiar with compiling programs with autoconf support:
@itemize @bullet
@item tar xvfz nano-x.y.z.tar.gz (where x.y.z is the version of nano)
@item tar xvfz nano-x.y.z.tar.gz (where x.y.z is the version of
@code{nano})
@item cd nano-x.y.z/
@item ./configure
@item make
@@ -486,13 +522,12 @@ Disable all word wrapping in the editor. This also eliminates the -w
command line flag, as nonwrapping is then the default behavior.
@item --disable-nls
Disables Native Language support. This will make the available GNU
Disables Native Language support. This will make the available GNU
@code{nano} translations unusable.
@item --with-slang
Compiling GNU @code{nano} with Slang is supported, and will make the
binary notably smaller than if compiled with ncurses or other curses
libraries.
Compiling @code{nano} with Slang is supported, and will make the binary
notably smaller than if compiled with ncurses or other curses libraries.
@end table

2978
files.c

File diff suppressed because it is too large Load Diff

907
global.c
View File

@@ -1,907 +0,0 @@
/* $Id$ */
/**************************************************************************
* global.c *
* *
* Copyright (C) 1999-2003 Chris Allegretta *
* 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) *
* any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
* *
**************************************************************************/
#include "config.h"
#include <stdlib.h>
#include <assert.h>
#include <sys/stat.h>
#include "proto.h"
#include "nano.h"
/* Global variables */
/* wrap_at might be set in rcfile.c or nano.c */
int wrap_at = -CHARS_FROM_EOL;/* Right justified fill value, allows resize */
char *last_search = NULL; /* Last string we searched for */
char *last_replace = NULL; /* Last replacement string */
int search_last_line; /* Is this the last search line? */
int search_offscreen; /* Search lines not displayed */
int flags = 0; /* Our new flag containing many options */
WINDOW *edit; /* The file portion of the editor */
WINDOW *topwin; /* Top line of screen */
WINDOW *bottomwin; /* Bottom buffer */
char *filename = NULL; /* Name of the file */
#ifndef NANO_SMALL
struct stat originalfilestat; /* Stat for the file as we loaded it */
#endif
int editwinrows = 0; /* How many rows long is the edit
window? */
filestruct *current; /* Current buffer pointer */
int current_x = 0, current_y = 0; /* Current position of X and Y in
the editor - relative to edit
window (0,0) */
filestruct *fileage = NULL; /* Our file buffer */
filestruct *edittop = NULL; /* Pointer to the top of the edit
buffer with respect to the
file struct */
filestruct *editbot = NULL; /* Same for the bottom */
filestruct *filebot = NULL; /* Last node in the file struct */
filestruct *cutbuffer = NULL; /* A place to store cut text */
#ifdef ENABLE_MULTIBUFFER
openfilestruct *open_files = NULL; /* The list of open files */
#endif
#ifndef DISABLE_JUSTIFY
char *quotestr = NULL; /* Quote string. The default value is
set in main(). */
#endif
int resetstatuspos; /* Hack for resetting the status bar
cursor position */
char *answer = NULL; /* Answer str to many questions */
int totlines = 0; /* Total number of lines in the file */
long totsize = 0; /* Total number of bytes in the file */
int placewewant = 0; /* The column we'd like the cursor
to jump to when we go to the
next or previous line */
int tabsize = -1; /* Our internal tabsize variable. The
default value 8 is set in main(). */
char *hblank = NULL; /* A horizontal blank line */
#ifndef DISABLE_HELP
char *help_text; /* The text in the help window */
#endif
/* More stuff for the marker select */
#ifndef NANO_SMALL
filestruct *mark_beginbuf; /* the begin marker buffer */
int mark_beginx; /* X value in the string to start */
#endif
#ifndef DISABLE_OPERATINGDIR
char *operating_dir = NULL; /* Operating directory, which we can't */
char *full_operating_dir = NULL;/* go higher than */
#endif
#ifndef DISABLE_SPELLER
char *alt_speller = NULL; /* Alternative spell command */
#endif
shortcut *main_list = NULL;
shortcut *whereis_list = NULL;
shortcut *replace_list = NULL;
shortcut *replace_list_2 = NULL; /* 2nd half of replace dialog */
shortcut *goto_list = NULL;
shortcut *writefile_list = NULL;
shortcut *insertfile_list = NULL;
#ifndef DISABLE_HELP
shortcut *help_list = NULL;
#endif
#ifndef DISABLE_SPELLER
shortcut *spell_list = NULL;
#endif
#ifndef NANO_SMALL
shortcut *extcmd_list = NULL;
#endif
#ifndef DISABLE_BROWSER
shortcut *browser_list = NULL;
shortcut *gotodir_list = NULL;
#endif
#ifdef ENABLE_COLOR
const colortype *colorstrings = NULL;
syntaxtype *syntaxes = NULL;
char *syntaxstr = NULL;
#endif
#if !defined(DISABLE_BROWSER) || !defined(DISABLE_HELP) || (!defined(DISABLE_MOUSE) && defined(NCURSES_MOUSE_VERSION))
const shortcut *currshortcut; /* Current shortcut list we're using */
#endif
#ifndef NANO_SMALL
toggle *toggles = NULL;
#endif
#ifndef NANO_SMALL
historyheadtype search_history;
historyheadtype replace_history;
#endif
/* Regular expressions */
#ifdef HAVE_REGEX_H
regex_t search_regexp; /* Global to store compiled search regexp */
regmatch_t regmatches[10]; /* Match positions for parenthetical
subexpressions, max of 10 */
#endif
int curses_ended = FALSE; /* Indicates to statusbar() to simply
* write to stderr, since endwin() has
* ended curses mode. */
int length_of_list(const shortcut *s)
{
int i = 0;
for (; s != NULL; s = s->next)
i++;
return i;
}
/* Initialize a struct *without* our lovely braces =( */
void sc_init_one(shortcut **shortcutage, int key, const char *desc,
#ifndef DISABLE_HELP
const char *help,
#endif
int alt, int misc1, int misc2, int view, int (*func) (void))
{
shortcut *s;
if (*shortcutage == NULL) {
*shortcutage = nmalloc(sizeof(shortcut));
s = *shortcutage;
} else {
for (s = *shortcutage; s->next != NULL; s = s->next)
;
s->next = nmalloc(sizeof(shortcut));
s = s->next;
}
s->val = key;
s->desc = desc;
#ifndef DISABLE_HELP
s->help = help;
#endif
s->altval = alt;
s->misc1 = misc1;
s->misc2 = misc2;
s->viewok = view;
s->func = func;
s->next = NULL;
}
#ifndef NANO_SMALL
/* Create one new toggle structure, at the end of the toggles
* linked list. */
void toggle_init_one(int val, const char *desc, int flag)
{
toggle *u;
if (toggles == NULL) {
toggles = nmalloc(sizeof(toggle));
u = toggles;
} else {
for (u = toggles; u->next != NULL; u = u->next)
;
u->next = nmalloc(sizeof(toggle));
u = u->next;
}
u->val = val;
u->desc = desc;
u->flag = flag;
u->next = NULL;
}
void toggle_init(void)
{
char *toggle_const_msg, *toggle_autoindent_msg, *toggle_suspend_msg,
*toggle_nohelp_msg, *toggle_cuttoend_msg,
*toggle_noconvert_msg, *toggle_dos_msg, *toggle_mac_msg,
*toggle_backup_msg, *toggle_smooth_msg;
#if !defined(DISABLE_MOUSE) && defined(NCURSES_MOUSE_VERSION)
char *toggle_mouse_msg;
#endif
#ifndef DISABLE_WRAPPING
char *toggle_wrap_msg;
#endif
#ifdef ENABLE_MULTIBUFFER
char *toggle_load_msg;
#endif
#ifdef ENABLE_COLOR
char *toggle_syntax_msg;
#endif
/* There is no need to reinitialize the toggles. They can't
change. */
if (toggles != NULL)
return;
toggle_const_msg = _("Constant cursor position");
toggle_autoindent_msg = _("Auto indent");
toggle_suspend_msg = _("Suspend");
toggle_nohelp_msg = _("Help mode");
#if !defined(DISABLE_MOUSE) && defined(NCURSES_MOUSE_VERSION)
toggle_mouse_msg = _("Mouse support");
#endif
toggle_cuttoend_msg = _("Cut to end");
toggle_noconvert_msg = _("No conversion from DOS/Mac format");
toggle_dos_msg = _("Writing file in DOS format");
toggle_mac_msg = _("Writing file in Mac format");
toggle_backup_msg = _("Backing up file");
toggle_smooth_msg = _("Smooth scrolling");
#ifdef ENABLE_COLOR
toggle_syntax_msg = _("Color syntax highlighting");
#endif
#ifndef DISABLE_WRAPPING
toggle_wrap_msg = _("Auto wrap");
#endif
#ifdef ENABLE_MULTIBUFFER
toggle_load_msg = _("Multiple file buffers");
#endif
toggle_init_one(TOGGLE_CONST_KEY, toggle_const_msg, CONSTUPDATE);
toggle_init_one(TOGGLE_AUTOINDENT_KEY, toggle_autoindent_msg, AUTOINDENT);
toggle_init_one(TOGGLE_SUSPEND_KEY, toggle_suspend_msg, SUSPEND);
toggle_init_one(TOGGLE_NOHELP_KEY, toggle_nohelp_msg, NO_HELP);
#ifndef DISABLE_WRAPPING
toggle_init_one(TOGGLE_WRAP_KEY, toggle_wrap_msg, NO_WRAP);
#endif
#if !defined(DISABLE_MOUSE) && defined(NCURSES_MOUSE_VERSION)
toggle_init_one(TOGGLE_MOUSE_KEY, toggle_mouse_msg, USE_MOUSE);
#endif
toggle_init_one(TOGGLE_CUTTOEND_KEY, toggle_cuttoend_msg, CUT_TO_END);
#ifdef ENABLE_MULTIBUFFER
toggle_init_one(TOGGLE_LOAD_KEY, toggle_load_msg, MULTIBUFFER);
#endif
toggle_init_one(TOGGLE_NOCONVERT_KEY, toggle_noconvert_msg, NO_CONVERT);
toggle_init_one(TOGGLE_DOS_KEY, toggle_dos_msg, DOS_FILE);
toggle_init_one(TOGGLE_MAC_KEY, toggle_mac_msg, MAC_FILE);
toggle_init_one(TOGGLE_BACKUP_KEY, toggle_backup_msg, BACKUP_FILE);
toggle_init_one(TOGGLE_SMOOTH_KEY, toggle_smooth_msg, SMOOTHSCROLL);
#ifdef ENABLE_COLOR
toggle_init_one(TOGGLE_SYNTAX_KEY, toggle_syntax_msg, COLOR_SYNTAX);
#endif
}
#ifdef DEBUG
/* Deallocate all of the toggles. */
void free_toggles(void)
{
while (toggles != NULL) {
toggle *pt = toggles; /* Think "previous toggle" */
toggles = toggles->next;
free(pt);
}
}
#endif
#endif /* !NANO_SMALL */
/* Deallocate the given shortcut. */
void free_shortcutage(shortcut **shortcutage)
{
assert(shortcutage != NULL);
while (*shortcutage != NULL) {
shortcut *ps = *shortcutage;
*shortcutage = (*shortcutage)->next;
free(ps);
}
}
void shortcut_init(int unjustify)
{
#ifndef DISABLE_HELP
const char *nano_help_msg = "", *nano_writeout_msg = "", *nano_exit_msg =
"", *nano_goto_msg = "", *nano_justify_msg =
"", *nano_replace_msg = "", *nano_insert_msg =
"", *nano_whereis_msg = "", *nano_prevpage_msg =
"", *nano_nextpage_msg = "", *nano_cut_msg =
"", *nano_uncut_msg = "", *nano_cursorpos_msg =
"", *nano_spell_msg = "", *nano_up_msg = "", *nano_down_msg =
"", *nano_forward_msg = "", *nano_back_msg = "", *nano_home_msg =
"", *nano_end_msg = "", *nano_firstline_msg =
"", *nano_lastline_msg = "", *nano_refresh_msg =
"", *nano_mark_msg = "", *nano_delete_msg =
"", *nano_backspace_msg = "", *nano_tab_msg =
"", *nano_enter_msg = "", *nano_cancel_msg =
"", *nano_unjustify_msg = "", *nano_append_msg =
"", *nano_prepend_msg = "", *nano_tofiles_msg =
"", *nano_gotodir_msg = "", *nano_case_msg =
"", *nano_reverse_msg = "", *nano_execute_msg =
"", *nano_dos_msg = "", *nano_mac_msg =
"", *nano_backup_msg = "", *nano_editstr_msg = "";
#ifdef ENABLE_MULTIBUFFER
const char *nano_openprev_msg = "", *nano_opennext_msg =
"", *nano_multibuffer_msg = "";
#endif
#ifdef HAVE_REGEX_H
const char *nano_regexp_msg = "", *nano_bracket_msg = "";
#endif
nano_help_msg = _("Invoke the help menu");
nano_writeout_msg = _("Write the current file to disk");
#ifdef ENABLE_MULTIBUFFER
nano_exit_msg = _("Close currently loaded file/Exit from nano");
#else
nano_exit_msg = _("Exit from nano");
#endif
nano_goto_msg = _("Go to a specific line number");
nano_justify_msg = _("Justify the current paragraph");
nano_unjustify_msg = _("Unjustify after a justify");
nano_replace_msg = _("Replace text within the editor");
nano_insert_msg = _("Insert another file into the current one");
nano_whereis_msg = _("Search for text within the editor");
nano_prevpage_msg = _("Move to the previous screen");
nano_nextpage_msg = _("Move to the next screen");
nano_cut_msg = _("Cut the current line and store it in the cutbuffer");
nano_uncut_msg = _("Uncut from the cutbuffer into the current line");
nano_cursorpos_msg = _("Show the position of the cursor");
nano_spell_msg = _("Invoke the spell checker, if available");
nano_up_msg = _("Move up one line");
nano_down_msg = _("Move down one line");
nano_forward_msg = _("Move forward one character");
nano_back_msg = _("Move back one character");
nano_home_msg = _("Move to the beginning of the current line");
nano_end_msg = _("Move to the end of the current line");
nano_firstline_msg = _("Go to the first line of the file");
nano_lastline_msg = _("Go to the last line of the file");
nano_refresh_msg = _("Refresh (redraw) the current screen");
nano_mark_msg = _("Mark text at the current cursor location");
nano_delete_msg = _("Delete the character under the cursor");
nano_backspace_msg =
_("Delete the character to the left of the cursor");
nano_tab_msg = _("Insert a tab character");
nano_enter_msg = _("Insert a carriage return at the cursor position");
nano_case_msg =
_("Make the current search or replace case (in)sensitive");
nano_tofiles_msg = _("Go to file browser");
nano_execute_msg = _("Execute external command");
nano_gotodir_msg = _("Go to directory");
nano_cancel_msg = _("Cancel the current function");
nano_append_msg = _("Append to the current file");
nano_prepend_msg = _("Prepend to the current file");
nano_reverse_msg = _("Search backwards");
nano_dos_msg = _("Write file out in DOS format");
nano_mac_msg = _("Write file out in Mac format");
nano_backup_msg = _("Back up original file when saving");
nano_editstr_msg = _("Edit the previous search/replace strings");
#ifdef HAVE_REGEX_H
nano_regexp_msg = _("Use regular expressions");
nano_bracket_msg = _("Find other bracket");
#endif
#ifdef ENABLE_MULTIBUFFER
nano_openprev_msg = _("Open previously loaded file");
nano_opennext_msg = _("Open next loaded file");
nano_multibuffer_msg = _("Toggle insert into new buffer");
#endif
#endif /* !DISABLE_HELP */
free_shortcutage(&main_list);
/* The following macro is to be used in calling sc_init_one. The point is
* that sc_init_one takes 9 arguments, unless DISABLE_HELP is defined,
* when the fourth one should not be there. */
#ifdef DISABLE_HELP
# define IFHELP(help, nextvar) nextvar
#else
# define IFHELP(help, nextvar) help, nextvar
#endif
sc_init_one(&main_list, NANO_HELP_KEY, _("Get Help"),
IFHELP(nano_help_msg, 0), NANO_HELP_FKEY, 0, VIEW,
do_help);
#ifdef ENABLE_MULTIBUFFER
if (open_files != NULL && (open_files->prev != NULL || open_files->next != NULL))
sc_init_one(&main_list, NANO_EXIT_KEY, _("Close"),
IFHELP(nano_exit_msg, 0), NANO_EXIT_FKEY, 0, VIEW,
do_exit);
else
#endif
sc_init_one(&main_list, NANO_EXIT_KEY, _("Exit"),
IFHELP(nano_exit_msg, 0), NANO_EXIT_FKEY, 0, VIEW,
do_exit);
sc_init_one(&main_list, NANO_WRITEOUT_KEY, _("WriteOut"),
IFHELP(nano_writeout_msg, 0),
NANO_WRITEOUT_FKEY, 0, NOVIEW, do_writeout_void);
sc_init_one(&main_list, NANO_JUSTIFY_KEY, _("Justify"),
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
VIEW
#else
NOVIEW
#endif
, do_insertfile_void);
sc_init_one(&main_list, NANO_WHEREIS_KEY, _("Where Is"),
IFHELP(nano_whereis_msg, 0),
NANO_WHEREIS_FKEY, 0, VIEW, do_search);
sc_init_one(&main_list, NANO_PREVPAGE_KEY, _("Prev Page"),
IFHELP(nano_prevpage_msg, 0),
NANO_PREVPAGE_FKEY, KEY_PPAGE, VIEW, do_page_up);
sc_init_one(&main_list, NANO_NEXTPAGE_KEY, _("Next Page"),
IFHELP(nano_nextpage_msg, 0),
NANO_NEXTPAGE_FKEY, KEY_NPAGE, VIEW, do_page_down);
sc_init_one(&main_list, NANO_CUT_KEY, _("Cut Text"),
IFHELP(nano_cut_msg, 0),
NANO_CUT_FKEY, 0, NOVIEW, do_cut_text);
if (unjustify)
sc_init_one(&main_list, NANO_UNJUSTIFY_KEY, _("UnJustify"),
IFHELP(nano_unjustify_msg, 0),
0, 0, NOVIEW, do_uncut_text);
else
sc_init_one(&main_list, NANO_UNCUT_KEY, _("UnCut Txt"),
IFHELP(nano_uncut_msg, 0),
NANO_UNCUT_FKEY, 0, NOVIEW, do_uncut_text);
sc_init_one(&main_list, NANO_CURSORPOS_KEY, _("Cur Pos"),
IFHELP(nano_cursorpos_msg, 0),
NANO_CURSORPOS_FKEY, 0, VIEW, do_cursorpos_void);
sc_init_one(&main_list, NANO_SPELL_KEY, _("To Spell"),
IFHELP(nano_spell_msg, 0),
NANO_SPELL_FKEY, 0, NOVIEW, do_spell);
sc_init_one(&main_list, NANO_UP_KEY, _("Up"),
IFHELP(nano_up_msg, 0),
KEY_UP, 0, VIEW, do_up);
sc_init_one(&main_list, NANO_DOWN_KEY, _("Down"),
IFHELP(nano_down_msg, 0),
KEY_DOWN, 0, VIEW, do_down);
sc_init_one(&main_list, NANO_FORWARD_KEY, _("Forward"),
IFHELP(nano_forward_msg, 0),
KEY_RIGHT, 0, VIEW, do_right);
sc_init_one(&main_list, NANO_BACK_KEY, _("Back"),
IFHELP(nano_back_msg, 0),
KEY_LEFT, 0, VIEW, do_left);
sc_init_one(&main_list, NANO_HOME_KEY, _("Home"),
IFHELP(nano_home_msg, 0),
KEY_HOME, 362, VIEW, do_home);
sc_init_one(&main_list, NANO_END_KEY, _("End"),
IFHELP(nano_end_msg, 0),
KEY_END, 385, VIEW, do_end);
sc_init_one(&main_list, NANO_REFRESH_KEY, _("Refresh"),
IFHELP(nano_refresh_msg, 0),
0, 0, VIEW, total_refresh);
sc_init_one(&main_list, NANO_MARK_KEY, _("Mark Text"),
IFHELP(nano_mark_msg, NANO_ALT_MARK_KEY),
0, 0, NOVIEW, do_mark);
sc_init_one(&main_list, NANO_DELETE_KEY, _("Delete"),
IFHELP(nano_delete_msg, 0), KEY_DC,
NANO_CONTROL_D, NOVIEW, do_delete);
sc_init_one(&main_list, NANO_BACKSPACE_KEY, _("Backspace"),
IFHELP(nano_backspace_msg, 0),
KEY_BACKSPACE, 127, NOVIEW, do_backspace);
sc_init_one(&main_list, NANO_TAB_KEY, _("Tab"),
IFHELP(nano_tab_msg, 0), 0, 0, NOVIEW, do_tab);
sc_init_one(&main_list, NANO_REPLACE_KEY, _("Replace"),
IFHELP(nano_replace_msg, NANO_ALT_REPLACE_KEY),
NANO_REPLACE_FKEY, 0, NOVIEW, do_replace);
sc_init_one(&main_list, NANO_ENTER_KEY, _("Enter"),
IFHELP(nano_enter_msg, 0),
KEY_ENTER, NANO_CONTROL_M, NOVIEW, do_enter);
sc_init_one(&main_list, NANO_GOTO_KEY, _("Go To Line"),
IFHELP(nano_goto_msg, NANO_ALT_GOTO_KEY),
NANO_GOTO_FKEY, 0, VIEW, do_gotoline_void);
#ifndef NANO_SMALL
sc_init_one(&main_list, NANO_NEXTWORD_KEY, _("Next Word"),
IFHELP(_("Move forward one word"), 0),
0, 0, VIEW, do_next_word);
sc_init_one(&main_list, -9, _("Prev Word"),
IFHELP(_("Move backward one word"), NANO_PREVWORD_KEY), 0, 0,
VIEW, do_prev_word);
#endif
#if !defined(NANO_SMALL) && defined(HAVE_REGEX_H)
sc_init_one(&main_list, -9, _("Find Other Bracket"),
IFHELP(nano_bracket_msg, NANO_BRACKET_KEY),
0, 0, VIEW, do_find_bracket);
#endif
#ifdef ENABLE_MULTIBUFFER
sc_init_one(&main_list, -9, _("Previous File"),
IFHELP(nano_openprev_msg, NANO_OPENPREV_KEY),
0, 0, VIEW, open_prevfile_void);
sc_init_one(&main_list, -9, _("Next File"),
IFHELP(nano_opennext_msg, NANO_OPENNEXT_KEY),
0, 0, VIEW, open_nextfile_void);
#endif
free_shortcutage(&whereis_list);
sc_init_one(&whereis_list, NANO_HELP_KEY, _("Get Help"),
IFHELP(nano_help_msg, 0), 0, 0, VIEW, do_help);
sc_init_one(&whereis_list, NANO_CANCEL_KEY, _("Cancel"),
IFHELP(nano_cancel_msg, 0), 0, 0, VIEW, 0);
sc_init_one(&whereis_list, NANO_FIRSTLINE_KEY, _("First Line"),
IFHELP(nano_firstline_msg, 0),
0, 0, VIEW, do_first_line);
sc_init_one(&whereis_list, NANO_LASTLINE_KEY, _("Last Line"),
IFHELP(nano_lastline_msg, 0), 0, 0, VIEW, do_last_line);
sc_init_one(&whereis_list, NANO_OTHERSEARCH_KEY, _("Replace"),
IFHELP(nano_replace_msg, 0), 0, 0, VIEW, do_replace);
sc_init_one(&whereis_list, NANO_FROMSEARCHTOGOTO_KEY, _("Go To Line"),
IFHELP(nano_goto_msg, 0), 0, 0, VIEW, do_gotoline_void);
#ifndef NANO_SMALL
sc_init_one(&whereis_list, TOGGLE_CASE_KEY, _("Case Sens"),
IFHELP(nano_case_msg, 0), 0, 0, VIEW, 0);
sc_init_one(&whereis_list, TOGGLE_BACKWARDS_KEY, _("Direction"),
IFHELP(nano_reverse_msg, 0), 0, 0, VIEW, 0);
#ifdef HAVE_REGEX_H
sc_init_one(&whereis_list, TOGGLE_REGEXP_KEY, _("Regexp"),
IFHELP(nano_regexp_msg, 0), 0, 0, VIEW, 0);
#endif
#ifndef NANO_SMALL
sc_init_one(&whereis_list, KEY_UP, _("History"),
IFHELP(nano_editstr_msg, 0), NANO_UP_KEY, 0, VIEW, 0);
#endif
#endif /* !NANO_SMALL */
free_shortcutage(&replace_list);
sc_init_one(&replace_list, NANO_HELP_KEY, _("Get Help"),
IFHELP(nano_help_msg, 0), 0, 0, VIEW, do_help);
sc_init_one(&replace_list, NANO_CANCEL_KEY, _("Cancel"),
IFHELP(nano_cancel_msg, 0), 0, 0, VIEW, 0);
sc_init_one(&replace_list, NANO_FIRSTLINE_KEY, _("First Line"),
IFHELP(nano_firstline_msg, 0), 0, 0, VIEW, do_first_line);
sc_init_one(&replace_list, NANO_LASTLINE_KEY, _("Last Line"),
IFHELP(nano_lastline_msg, 0), 0, 0, VIEW, do_last_line);
sc_init_one(&replace_list, NANO_OTHERSEARCH_KEY, _("No Replace"),
IFHELP(nano_whereis_msg, 0), 0, 0, VIEW, do_search);
sc_init_one(&replace_list, NANO_FROMSEARCHTOGOTO_KEY, _("Go To Line"),
IFHELP(nano_goto_msg, 0), 0, 0, VIEW, do_gotoline_void);
#ifndef NANO_SMALL
sc_init_one(&replace_list, TOGGLE_CASE_KEY, _("Case Sens"),
IFHELP(nano_case_msg, 0), 0, 0, VIEW, 0);
sc_init_one(&replace_list, TOGGLE_BACKWARDS_KEY, _("Direction"),
IFHELP(nano_reverse_msg, 0), 0, 0, VIEW, 0);
#ifdef HAVE_REGEX_H
sc_init_one(&replace_list, TOGGLE_REGEXP_KEY, _("Regexp"),
IFHELP(nano_regexp_msg, 0), 0, 0, VIEW, 0);
#endif
sc_init_one(&replace_list, KEY_UP, _("History"),
IFHELP(nano_editstr_msg, 0), NANO_UP_KEY, 0, VIEW, 0);
#endif /* !NANO_SMALL */
free_shortcutage(&replace_list_2);
sc_init_one(&replace_list_2, NANO_HELP_KEY, _("Get Help"),
IFHELP(nano_help_msg, 0), 0, 0, VIEW, do_help);
sc_init_one(&replace_list_2, NANO_CANCEL_KEY, _("Cancel"),
IFHELP(nano_cancel_msg, 0), 0, 0, VIEW, 0);
sc_init_one(&replace_list_2, NANO_FIRSTLINE_KEY, _("First Line"),
IFHELP(nano_firstline_msg, 0), 0, 0, VIEW, do_first_line);
sc_init_one(&replace_list_2, NANO_LASTLINE_KEY, _("Last Line"),
IFHELP(nano_lastline_msg, 0), 0, 0, VIEW, do_last_line);
#ifndef NANO_SMALL
sc_init_one(&replace_list_2, KEY_UP, _("History"),
IFHELP(nano_editstr_msg, 0), NANO_UP_KEY, 0, VIEW, 0);
#endif
free_shortcutage(&goto_list);
sc_init_one(&goto_list, NANO_HELP_KEY, _("Get Help"),
IFHELP(nano_help_msg, 0), 0, 0, VIEW, do_help);
sc_init_one(&goto_list, NANO_CANCEL_KEY, _("Cancel"),
IFHELP(nano_cancel_msg, 0), 0, 0, VIEW, 0);
sc_init_one(&goto_list, NANO_FIRSTLINE_KEY, _("First Line"),
IFHELP(nano_firstline_msg, 0), 0, 0, VIEW, do_first_line);
sc_init_one(&goto_list, NANO_LASTLINE_KEY, _("Last Line"),
IFHELP(nano_lastline_msg, 0), 0, 0, VIEW, do_last_line);
#ifndef DISABLE_HELP
free_shortcutage(&help_list);
sc_init_one(&help_list, NANO_PREVPAGE_KEY, _("Prev Page"),
IFHELP(nano_prevpage_msg, 0), NANO_PREVPAGE_FKEY,
KEY_PPAGE, VIEW, do_page_up);
sc_init_one(&help_list, NANO_NEXTPAGE_KEY, _("Next Page"),
IFHELP(nano_nextpage_msg, 0),
NANO_NEXTPAGE_FKEY, KEY_NPAGE, VIEW, do_page_down);
sc_init_one(&help_list, NANO_EXIT_KEY, _("Exit"),
IFHELP(nano_exit_msg, 0), NANO_EXIT_FKEY, 0, VIEW,
do_exit);
#endif
free_shortcutage(&writefile_list);
sc_init_one(&writefile_list, NANO_HELP_KEY, _("Get Help"),
IFHELP(nano_help_msg, 0), 0, 0, VIEW, do_help);
#ifndef DISABLE_BROWSER
sc_init_one(&writefile_list, NANO_TOFILES_KEY, _("To Files"),
IFHELP(nano_tofiles_msg, 0), 0, 0, NOVIEW, 0);
#endif
#ifndef NANO_SMALL
sc_init_one(&writefile_list, TOGGLE_DOS_KEY, _("DOS Format"),
IFHELP(nano_dos_msg, 0), 0, 0, NOVIEW, 0);
sc_init_one(&writefile_list, TOGGLE_MAC_KEY, _("Mac Format"),
IFHELP(nano_mac_msg, 0), 0, 0, NOVIEW, 0);
#endif
sc_init_one(&writefile_list, NANO_APPEND_KEY, _("Append"),
IFHELP(nano_append_msg, 0), 0, 0, NOVIEW, 0);
sc_init_one(&writefile_list, NANO_PREPEND_KEY, _("Prepend"),
IFHELP(nano_prepend_msg, 0), 0, 0, NOVIEW, 0);
#ifndef NANO_SMALL
sc_init_one(&writefile_list, TOGGLE_BACKUP_KEY, _("Backup File"),
IFHELP(nano_backup_msg, 0), 0, 0, NOVIEW, 0);
#endif
sc_init_one(&writefile_list, NANO_CANCEL_KEY, _("Cancel"),
IFHELP(nano_cancel_msg, 0), 0, 0, VIEW, 0);
free_shortcutage(&insertfile_list);
sc_init_one(&insertfile_list, NANO_HELP_KEY, _("Get Help"),
IFHELP(nano_help_msg, 0), 0, 0, VIEW, do_help);
sc_init_one(&insertfile_list, NANO_CANCEL_KEY, _("Cancel"),
IFHELP(nano_cancel_msg, 0), 0, 0, VIEW, 0);
#ifndef DISABLE_BROWSER
sc_init_one(&insertfile_list, NANO_TOFILES_KEY, _("To Files"),
IFHELP(nano_tofiles_msg, 0), 0, 0, NOVIEW, 0);
#endif
#ifndef NANO_SMALL
sc_init_one(&insertfile_list, NANO_EXTCMD_KEY, _("Execute Command"),
IFHELP(nano_execute_msg, 0), 0, 0, NOVIEW, 0);
#ifdef ENABLE_MULTIBUFFER
sc_init_one(&insertfile_list, TOGGLE_LOAD_KEY, _("New Buffer"),
IFHELP(nano_multibuffer_msg, 0), 0, 0, NOVIEW, 0);
#endif
#endif
#ifndef DISABLE_SPELLER
free_shortcutage(&spell_list);
sc_init_one(&spell_list, NANO_HELP_KEY, _("Get Help"),
IFHELP(nano_help_msg, 0), 0, 0, VIEW, do_help);
sc_init_one(&spell_list, NANO_CANCEL_KEY, _("Cancel"),
IFHELP(nano_cancel_msg, 0), 0, 0, VIEW, 0);
#endif
#ifndef NANO_SMALL
free_shortcutage(&extcmd_list);
sc_init_one(&extcmd_list, NANO_HELP_KEY, _("Get Help"),
IFHELP(nano_help_msg, 0), 0, 0, VIEW, do_help);
sc_init_one(&extcmd_list, NANO_CANCEL_KEY, _("Cancel"),
IFHELP(nano_cancel_msg, 0), 0, 0, VIEW, 0);
#endif
#ifndef DISABLE_BROWSER
free_shortcutage(&browser_list);
sc_init_one(&browser_list, NANO_HELP_KEY, _("Get Help"),
IFHELP(nano_help_msg, 0), 0, 0, VIEW, do_help);
sc_init_one(&browser_list, NANO_CANCEL_KEY, _("Cancel"),
IFHELP(nano_cancel_msg, 0), NANO_EXIT_FKEY, 0, VIEW, 0);
sc_init_one(&browser_list, NANO_PREVPAGE_KEY, _("Prev Page"),
IFHELP(nano_prevpage_msg, 0), NANO_PREVPAGE_FKEY,
KEY_PPAGE, VIEW, 0);
sc_init_one(&browser_list, NANO_NEXTPAGE_KEY, _("Next Page"),
IFHELP(nano_nextpage_msg, 0), NANO_NEXTPAGE_FKEY,
KEY_NPAGE, VIEW, 0);
sc_init_one(&browser_list, NANO_GOTO_KEY, _("Go To Dir"),
IFHELP(nano_gotodir_msg, NANO_ALT_GOTO_KEY),
NANO_GOTO_FKEY, 0, VIEW, 0);
free_shortcutage(&gotodir_list);
sc_init_one(&gotodir_list, NANO_HELP_KEY, _("Get Help"),
IFHELP(nano_help_msg, 0), 0, 0, VIEW, do_help);
sc_init_one(&gotodir_list, NANO_CANCEL_KEY, _("Cancel"),
IFHELP(nano_cancel_msg, 0), 0, 0, VIEW, 0);
#endif
#if !defined(DISABLE_BROWSER) || !defined(DISABLE_HELP) || (!defined(DISABLE_MOUSE) && defined(NCURSES_MOUSE_VERSION))
currshortcut = main_list;
#endif
#ifndef NANO_SMALL
toggle_init();
#endif
}
/* This function is called just before calling exit(). Practically, the
* only effect is to cause a segmentation fault if the various data
* structures got bolloxed earlier. Thus, we don't bother having this
* function unless debugging is turned on. */
#ifdef DEBUG
/* added by SPK for memory cleanup, gracefully return our malloc()s */
void thanks_for_all_the_fish(void)
{
#ifndef DISABLE_JUSTIFY
if (quotestr != NULL)
free(quotestr);
#endif
#ifndef DISABLE_OPERATINGDIR
if (operating_dir != NULL)
free(operating_dir);
if (full_operating_dir != NULL)
free(full_operating_dir);
#endif
if (last_search != NULL)
free(last_search);
if (last_replace != NULL)
free(last_replace);
if (hblank != NULL)
free(hblank);
#ifndef DISABLE_SPELLER
if (alt_speller != NULL)
free(alt_speller);
#endif
#ifndef DISABLE_HELP
if (help_text != NULL)
free(help_text);
#endif
if (filename != NULL)
free(filename);
if (answer != NULL)
free(answer);
if (cutbuffer != NULL)
free_filestruct(cutbuffer);
free_shortcutage(&main_list);
free_shortcutage(&whereis_list);
free_shortcutage(&replace_list);
free_shortcutage(&replace_list_2);
free_shortcutage(&goto_list);
free_shortcutage(&writefile_list);
free_shortcutage(&insertfile_list);
#ifndef DISABLE_HELP
free_shortcutage(&help_list);
#endif
#ifndef DISABLE_SPELLER
free_shortcutage(&spell_list);
#endif
#ifndef NANO_SMALL
free_shortcutage(&extcmd_list);
#endif
#ifndef DISABLE_BROWSER
free_shortcutage(&browser_list);
free_shortcutage(&gotodir_list);
#endif
#ifndef NANO_SMALL
free_toggles();
#endif
#ifdef ENABLE_MULTIBUFFER
if (open_files != NULL) {
/* We free the memory associated with each open file. */
while (open_files->prev != NULL)
open_files = open_files->prev;
free_openfilestruct(open_files);
}
#else
free_filestruct(fileage);
#endif
#ifdef ENABLE_COLOR
free(syntaxstr);
while (syntaxes != NULL) {
syntaxtype *bill = syntaxes;
free(syntaxes->desc);
while (syntaxes->extensions != NULL) {
exttype *bob = syntaxes->extensions;
syntaxes->extensions = bob->next;
regfree(&bob->val);
free(bob);
}
while (syntaxes->color != NULL) {
colortype *bob = syntaxes->color;
syntaxes->color = bob->next;
regfree(&bob->start);
if (bob->end != NULL)
regfree(bob->end);
free(bob->end);
free(bob);
}
syntaxes = syntaxes->next;
free(bill);
}
#endif /* ENABLE_COLOR */
#ifndef NANO_SMALL
/* free history lists */
free_history(&search_history);
free_history(&replace_history);
#endif
}
#endif /* DEBUG */

View File

@@ -1,4 +1,5 @@
EXTRA_DIST = ulonglong.m4 intdiv0.m4 inttypes.m4 inttypes_h.m4 inttypes-pri.m4 \
stdint_h.m4 uintmax_t.m4 isc-posix.m4 lib-ld.m4 lib-link.m4 \
lib-prefix.m4 codeset.m4 glibc21.m4 progtest.m4 gettext.m4 \
iconv.m4 lcmessage.m4
EXTRA_DIST = codeset.m4 gettext.m4 glib-2.0.m4 glibc21.m4 iconv.m4 \
intdiv0.m4 inttypes_h.m4 inttypes.m4 inttypes-pri.m4 \
isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 \
lib-prefix.m4 progtest.m4 stdint_h.m4 uintmax_t.m4 \
ulonglong.m4

212
m4/glib-2.0.m4 Normal file
View File

@@ -0,0 +1,212 @@
# Configure paths for GLIB
# Owen Taylor 1997-2001
dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject or
dnl gthread is specified in MODULES, pass to pkg-config
dnl
AC_DEFUN([AM_PATH_GLIB_2_0],
[dnl
dnl Get the cflags and libraries from pkg-config
dnl
AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
, enable_glibtest=yes)
pkg_config_args=glib-2.0
for module in . $4
do
case "$module" in
gmodule)
pkg_config_args="$pkg_config_args gmodule-2.0"
;;
gobject)
pkg_config_args="$pkg_config_args gobject-2.0"
;;
gthread)
pkg_config_args="$pkg_config_args gthread-2.0"
;;
esac
done
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
no_glib=""
if test x$PKG_CONFIG != xno ; then
if $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then
:
else
echo *** pkg-config too old; version 0.7 or better required.
no_glib=yes
PKG_CONFIG=no
fi
else
no_glib=yes
fi
min_glib_version=ifelse([$1], ,2.0.0,$1)
AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
if test x$PKG_CONFIG != xno ; then
## don't try to run the test against uninstalled libtool libs
if $PKG_CONFIG --uninstalled $pkg_config_args; then
echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
enable_glibtest=no
fi
if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
:
else
no_glib=yes
fi
fi
if test x"$no_glib" = x ; then
GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_glibtest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GLIB_CFLAGS"
LIBS="$GLIB_LIBS $LIBS"
dnl
dnl Now check if the installed GLIB is sufficiently new. (Also sanity
dnl checks the results of pkg-config to some extent)
dnl
rm -f conf.glibtest
AC_TRY_RUN([
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
int
main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.glibtest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = g_strdup("$min_glib_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_glib_version");
exit(1);
}
if ((glib_major_version != $glib_config_major_version) ||
(glib_minor_version != $glib_config_minor_version) ||
(glib_micro_version != $glib_config_micro_version))
{
printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
$glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
glib_major_version, glib_minor_version, glib_micro_version);
printf ("*** was found! If pkg-config was correct, then it is best\n");
printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
printf("*** required on your system.\n");
printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
printf("*** to point to the correct configuration files\n");
}
else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
(glib_minor_version != GLIB_MINOR_VERSION) ||
(glib_micro_version != GLIB_MICRO_VERSION))
{
printf("*** GLIB header files (version %d.%d.%d) do not match\n",
GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
printf("*** library (version %d.%d.%d)\n",
glib_major_version, glib_minor_version, glib_micro_version);
}
else
{
if ((glib_major_version > major) ||
((glib_major_version == major) && (glib_minor_version > minor)) ||
((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
glib_major_version, glib_minor_version, glib_micro_version);
printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
major, minor, micro);
printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
printf("***\n");
printf("*** If you have already installed a sufficiently new version, this error\n");
printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
printf("*** being found. The easiest way to fix this is to remove the old version\n");
printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
printf("*** correct copy of pkg-config. (In this case, you will have to\n");
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
printf("*** so that the correct libraries are found at run-time))\n");
}
}
return 1;
}
],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
if test "x$no_glib" = x ; then
AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$PKG_CONFIG" = "no" ; then
echo "*** A new enough version of pkg-config was not found."
echo "*** See http://www.freedesktop.org/software/pkgconfig/"
else
if test -f conf.glibtest ; then
:
else
echo "*** Could not run GLIB test program, checking why..."
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GLIB_CFLAGS"
LIBS="$LIBS $GLIB_LIBS"
AC_TRY_LINK([
#include <glib.h>
#include <stdio.h>
], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding GLIB or finding the wrong"
echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
GLIB_CFLAGS=""
GLIB_LIBS=""
GLIB_GENMARSHAL=""
GOBJECT_QUERY=""
GLIB_MKENUMS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
AC_SUBST(GLIB_GENMARSHAL)
AC_SUBST(GOBJECT_QUERY)
AC_SUBST(GLIB_MKENUMS)
rm -f conf.glibtest
])

222
move.c
View File

@@ -1,222 +0,0 @@
/* $Id$ */
/**************************************************************************
* move.c *
* *
* Copyright (C) 1999-2003 Chris Allegretta *
* 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) *
* any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
* *
**************************************************************************/
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "proto.h"
#include "nano.h"
int do_home(void)
{
current_x = 0;
placewewant = 0;
update_line(current, current_x);
return 1;
}
int do_end(void)
{
current_x = strlen(current->data);
placewewant = xplustabs();
update_line(current, current_x);
return 1;
}
void page_up(void)
{
if (edittop != fileage) {
#ifndef NANO_SMALL
if (ISSET(SMOOTHSCROLL))
edit_update(edittop->prev, TOP);
else
#endif
{
edit_update(edittop, CENTER);
/* Now that we've updated the edit window, edittop might be
at the top of the file; if so, just move the cursor up one
line and don't center it. */
if (edittop != fileage)
center_cursor();
else
reset_cursor();
}
} else
current_y = 0;
update_cursor();
}
int do_page_up(void)
{
int i;
wrap_reset();
current_x = 0;
placewewant = 0;
if (current == fileage)
return 0;
current_y = 0;
current = edittop;
for (i = 0; i <= editwinrows - 3 && current->prev != NULL; i++)
current = current->prev;
edit_update(current, TOP);
update_cursor();
check_statblank();
return 1;
}
int do_page_down(void)
{
wrap_reset();
current_x = 0;
placewewant = 0;
if (current == filebot)
return 0;
/* AHEM, if we only have a screen or less of text, DON'T do an
edit_update(), just move the cursor to editbot! */
if (edittop == fileage && editbot == filebot && totlines < editwinrows) {
current = editbot;
reset_cursor();
#ifndef NANO_SMALL
/* ...unless marking is on, in which case we need it to update
the highlight. */
if (ISSET(MARK_ISSET))
edit_update(current, NONE);
#endif
} else if (editbot != filebot || edittop == fileage) {
current_y = 0;
current = editbot;
if (current->prev != NULL)
current = current->prev;
if (current->prev != NULL)
current = current->prev;
edit_update(current, TOP);
} else {
while (current != filebot) {
current = current->next;
current_y++;
}
edit_update(edittop, TOP);
}
update_cursor();
check_statblank();
return 1;
}
int do_up(void)
{
wrap_reset();
if (current->prev != NULL) {
current_x = actual_x(current->prev, placewewant);
current = current->prev;
if (current_y > 0) {
update_line(current->next, 0);
/* It is necessary to change current first, so the mark
display will change! */
current_y--;
update_line(current, current_x);
} else
page_up();
check_statblank();
}
return 1;
}
/* Return value 1 means we moved down, 0 means we were already at the
* bottom. */
int do_down(void)
{
wrap_reset();
check_statblank();
if (current->next == NULL)
return 0;
current = current->next;
current_x = actual_x(current, placewewant);
/* Note current_y is zero-based. This test checks for the cursor's
* being on the last row of the edit window. */
if (current_y == editwinrows - 1) {
#ifndef NANO_SMALL
if (ISSET(SMOOTHSCROLL)) {
/* In this case current_y does not change. The cursor
* remains at the bottom of the edit window. */
edittop = edittop->next;
editbot = editbot->next;
edit_refresh();
} else
#endif
{
/* Set edittop so editbot->next (or else editbot) is
* centered, and set current_y = editwinrows / 2. */
edit_update(editbot->next != NULL ? editbot->next : editbot, CENTER);
center_cursor();
}
} else {
update_line(current->prev, 0);
update_line(current, current_x);
current_y++;
}
return 1;
}
int do_left(void)
{
if (current_x > 0)
current_x--;
else if (current != fileage) {
do_up();
current_x = strlen(current->data);
}
placewewant = xplustabs();
update_line(current, current_x);
check_statblank();
return 1;
}
int do_right(void)
{
assert(current_x <= strlen(current->data));
if (current->data[current_x] != '\0')
current_x++;
else if (current->next != NULL) {
do_down();
current_x = 0;
}
placewewant = xplustabs();
update_line(current, current_x);
check_statblank();
return 1;
}

188
nano.1
View File

@@ -1,188 +0,0 @@
.\" Hey, EMACS: -*- nroff -*-
.\" nano.1 is copyright (C) 1999, 2000, 2001, 2002, 2003 by
.\" Chris Allegretta <chrisa@asty.org>
.\"
.\" This is free documentation, see the latest version of the GNU General
.\" Public License for copying conditions. There is NO warranty.
.\"
.\" $Id$
.TH NANO 1 "February 9, 2003"
.\" Please adjust this date whenever revising the manpage.
.\"
.SH NAME
nano \- Nano's ANOther editor, an enhanced free Pico clone
.SH SYNOPSIS
.B nano
.I [\+LINE]\ [options]\ [file]
.br
.SH DESCRIPTION
This manual page documents briefly the \fBnano\fP command.
.PP
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
.\" \fI<whatever>\fP escape sequences to invoke bold face and italics,
.\" respectively.
\fBnano\fP is a small, free and friendly editor which aims to replace
Pico, the default editor included in the non-free Pine package. Rather
than just copying Pico's look and feel, \fBnano\fP also implements some
missing (or disabled by default) features in Pico, such as "search and
replace" and "go to line number".
.SH OPTIONS
.TP
.B \+\fILINE\fP
Places cursor at \fILINE\fP on startup.
.TP
.B \-B (\-\-backup)
When saving a file, back up the previous version of it to the current
filename suffixed with a ~.
.TP
.B \-D (\-\-dos)
Write file in DOS format.
.TP
.B \-F (\-\-multibuffer)
Enable multiple file buffers, if available.
.TP
.B \-H (\-\-historylog)
Log search and replace strings to ~/.nano_history so they may be
stored for later editing, if nanorc support is configured.
.TP
.B \-I (\-\-ignorercfiles)
Don't look at $SYSCONFDIR/nanorc or ~/.nanorc, if nanorc support is
available.
.TP
.B \-K (\-\-keypad)
Do not use the ncurses keypad() call unless necessary. Try this flag if
you find that the arrow keys on the numeric keypad do not work for you
under nano.
.TP
.B \-M (\-\-mac)
Write file in Mac format.
.TP
.B \-N (\-\-noconvert)
Disable automatic conversion of files from DOS/Mac format.
.TP
.B \-Q \fIstr\fP (\-\-quotestr=\fIstr\fP)
Set the quoting string for justifying. The default is
"^([ \\t]*[|>:}#])+" if regular expression support is available, or
"> " otherwise.
.TP
.B \-R (\-\-regexp)
Enable regular expression matching for search strings, as well as
\\n subexpression replacement for replace strings, if available.
.TP
.B \-S (\-\-smooth)
Enable smooth scrolling. Text will scroll line-by-line, instead of the
usual chunk-by-chunk behavior.
.TP
.B \-T \fInum\fP (\-\-tabsize=\fInum\fP)
Set the size (width) of a tab.
.TP
.B \-V (\-\-version)
Show the current version number and author.
.TP
.B \-Y \fIstr\fP (\-\-syntax=\fIstr\fP)
Specify a specific syntax highlighting from the .nanorc to use, if
available.
.TP
.B \-c (\-\-const)
Constantly show the cursor position.
.TP
.B \-h (\-\-help)
Display a summary of command line options.
.TP
.B \-i (\-\-autoindent)
Indent new lines to the previous line's indentation. Useful when editing
source code.
.TP
.B \-k (\-\-cut)
Enable cut from cursor to end of line with ^K.
.TP
.B \-l (\-\-nofollow)
If the file being edited is a symbolic link, replace the link with
a new file, do not follow it. Good for editing files in /tmp, perhaps?
.TP
.B \-m (\-\-mouse)
Enable mouse support (if available for your system).
.TP
.B \-o \fIdir\fP (\-\-operatingdir=\fIdir\fP)
Set operating directory. Makes nano set up something similar to a
chroot.
.TP
.B \-p (\-\-preserve)
Preserve the XON and XOFF sequences (^Q and ^S) so they will be
caught by the terminal.
.TP
.B \-r \fIcols\fP (\-\-fill=\fIcols\fP)
Wrap lines at column \fIcols\fP. By default, this is the width of the
screen, less eight. If this value is negative, wrapping will occur at
\fIcols\fP columns from the right of the screen, allowing the wrap point
to vary along with the screen width if resized.
.TP
.B \-s \fIprog\fP (\-\-speller=\fIprog\fP)
Enable alternative spell checker command.
.TP
.B \-t (\-\-tempfile)
Always save changed buffer without prompting. Same as Pico -t option.
.TP
.B \-v (\-\-view)
View file (read only) mode.
.TP
.B \-w (\-\-nowrap)
Disable wrapping of long lines.
.TP
.B \-x (\-\-nohelp)
Disable help screen at bottom of editor.
.TP
.B \-z (\-\-suspend)
Enable suspend ability.
.TP
.B \-a, \-b, \-e, \-f, \-g, \-j
Ignored, for compatibility with Pico.
.SH INITIALIZATION FILE
\fBnano\fP will read initialization files in the following
order: $SYSCONFDIR/nanorc, then ~/.nanorc. Please see nanorc(5) and
the example file \fBnanorc.sample\fP which should be provided with
\fBnano\fP.
.SH NOTES
\fBnano\fP will try to dump the buffer into an emergency file in some
cases. Mainly, this will happen if \fBnano\fP receives a SIGHUP or
SIGTERM or runs out of memory, when it will write the buffer into a file
named "nano.save" if the buffer didn't have a name already, or will add
a ".save" suffix to the current filename. If an emergency file with that
name already exists in the current directory, ".save" and a number (e.g.
".save.1") will be suffixed to the current filename in order to make it
unique. In multibuffer mode, \fBnano\fP will write all the open buffers
to the respective emergency files.
.SH BUGS
Please send any comments or bug reports to
.br
.B nano@nano-editor.org.
.br
The \fBnano\fP mailing list is available from
.br
.B nano-devel@gnu.org.
To subscribe, email to nano-devel-request@gnu.org with a
subject of "subscribe".
.SH HOMEPAGE
http://www.nano-editor.org/
.SH SEE ALSO
.PD 0
.TP
\fBnanorc\fP(5)
.PP
\fI/usr/share/doc/nano/\fP (or equivalent on your system)
.SH AUTHOR
Chris Allegretta <chrisa@asty.org>, et al (see AUTHORS and THANKS for
details).
This manual page was originally written by Jordi Mallach
<jordi@sindominio.net>, for the Debian GNU system (but may be
used by others).

View File

@@ -1,272 +0,0 @@
<HTML><HEAD><TITLE>Manpage of NANO</TITLE>
</HEAD><BODY>
<H1>NANO</H1>
Section: User Commands (1)<BR>Updated: February 9, 2003<BR><A HREF="#index">Index</A>
<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<P>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
nano - Nano's ANOther editor, an enhanced free Pico clone
<P>
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>nano</B>
<I>[+LINE]&nbsp;[options]&nbsp;[file]</I>
<BR>
<P>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
This manual page documents briefly the <B>nano</B> command.
<P>
<B>nano</B> is a small, free and friendly editor which aims to replace
Pico, the default editor included in the non-free Pine package. Rather
than just copying Pico's look and feel, <B>nano</B> also implements some
missing (or disabled by default) features in Pico, such as &quot;search and
replace&quot; and &quot;go to line number&quot;.
<P>
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT><B>+</B><I>LINE</I>
<DD>
Places cursor at <I>LINE</I> on startup.
<DT><B>-B (--backup)</B>
<DD>
When saving a file, back up the previous version of it to the current
filename suffixed with a ~.
<DT><B>-D (--dos)</B>
<DD>
Write file in DOS format.
<DT><B>-F (--multibuffer)</B>
<DD>
Enable multiple file buffers, if available.
<DT><B>-H (--historylog)</B>
<DD>
Log search and replace strings to ~/.nano_history so they may be
stored for later editing, if nanorc support is configured.
<DT><B>-I (--ignorercfiles)</B>
<DD>
Don't look at $SYSCONFDIR/nanorc or ~/.nanorc, if nanorc support is
available.
<DT><B>-K (--keypad)</B>
<DD>
Do not use the ncurses keypad() call unless necessary. Try this flag if
you find that the arrow keys on the numeric keypad do not work for you
under nano.
<DT><B>-M (--mac)</B>
<DD>
Write file in Mac format.
<DT><B>-N (--noconvert)</B>
<DD>
Disable automatic conversion of files from DOS/Mac format.
<DT><B>-Q </B><I>str</I> (--quotestr=<I>str</I>)
<DD>
Set the quoting string for justifying. The default is
&quot;^([ \t]*[|&gt;:}#])+&quot; if regular expression support is available, or
&quot;&gt; &quot; otherwise.
<DT><B>-R (--regexp)</B>
<DD>
Enable regular expression matching for search strings, as well as
\n subexpression replacement for replace strings, if available.
<DT><B>-S (--smooth)</B>
<DD>
Enable smooth scrolling. Text will scroll line-by-line, instead of the
usual chunk-by-chunk behavior.
<DT><B>-T </B><I>num</I> (--tabsize=<I>num</I>)
<DD>
Set the size (width) of a tab.
<DT><B>-V (--version)</B>
<DD>
Show the current version number and author.
<DT><B>-Y </B><I>str</I> (--syntax=<I>str</I>)
<DD>
Specify a specific syntax highlighting from the .nanorc to use, if
available.
<DT><B>-c (--const)</B>
<DD>
Constantly show the cursor position.
<DT><B>-h (--help)</B>
<DD>
Display a summary of command line options.
<DT><B>-i (--autoindent)</B>
<DD>
Indent new lines to the previous line's indentation. Useful when editing
source code.
<DT><B>-k (--cut)</B>
<DD>
Enable cut from cursor to end of line with ^K.
<DT><B>-l (--nofollow)</B>
<DD>
If the file being edited is a symbolic link, replace the link with
a new file, do not follow it. Good for editing files in /tmp, perhaps?
<DT><B>-m (--mouse)</B>
<DD>
Enable mouse support (if available for your system).
<DT><B>-o </B><I>dir</I> (--operatingdir=<I>dir</I>)
<DD>
Set operating directory. Makes nano set up something similar to a
chroot.
<DT><B>-p (--preserve)</B>
<DD>
Preserve the XON and XOFF sequences (^Q and ^S) so they will be
caught by the terminal.
<DT><B>-r </B><I>cols</I> (--fill=<I>cols</I>)
<DD>
Wrap lines at column <I>cols</I>. By default, this is the width of the
screen, less eight. If this value is negative, wrapping will occur at
<I>cols</I> columns from the right of the screen, allowing the wrap point
to vary along with the screen width if resized.
<DT><B>-s </B><I>prog</I> (--speller=<I>prog</I>)
<DD>
Enable alternative spell checker command.
<DT><B>-t (--tempfile)</B>
<DD>
Always save changed buffer without prompting. Same as Pico -t option.
<DT><B>-v (--view)</B>
<DD>
View file (read only) mode.
<DT><B>-w (--nowrap)</B>
<DD>
Disable wrapping of long lines.
<DT><B>-x (--nohelp)</B>
<DD>
Disable help screen at bottom of editor.
<DT><B>-z (--suspend)</B>
<DD>
Enable suspend ability.
<DT><B>-a, -b, -e, -f, -g, -j</B>
<DD>
Ignored, for compatibility with Pico.
<P>
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>INITIALIZATION FILE</H2>
<B>nano</B> will read initialization files in the following
order: $SYSCONFDIR/nanorc, then ~/.nanorc. Please see <A HREF="http://localhost/cgi-bin/man/man2html?5+nanorc">nanorc</A>(5) and
the example file <B>nanorc.sample</B> which should be provided with
<B>nano</B>.
<P>
<A NAME="lbAG">&nbsp;</A>
<H2>NOTES</H2>
<B>nano</B> will try to dump the buffer into an emergency file in some
cases. Mainly, this will happen if <B>nano</B> receives a SIGHUP or
SIGTERM or runs out of memory, when it will write the buffer into a file
named &quot;nano.save&quot; if the buffer didn't have a name already, or will add
a &quot;.save&quot; suffix to the current filename. If an emergency file with that
name already exists in the current directory, &quot;.save&quot; and a number (e.g.
&quot;.save.1&quot;) will be suffixed to the current filename in order to make it
unique. In multibuffer mode, <B>nano</B> will write all the open buffers
to the respective emergency files.
<P>
<A NAME="lbAH">&nbsp;</A>
<H2>BUGS</H2>
Please send any comments or bug reports to
<BR>
<B><A HREF="mailto:nano@nano-editor.org">nano@nano-editor.org</A>.</B>
<BR>
The <B>nano</B> mailing list is available from
<BR>
<B><A HREF="mailto:nano-devel@gnu.org">nano-devel@gnu.org</A>.</B>
To subscribe, email to <A HREF="mailto:nano-devel-request@gnu.org">nano-devel-request@gnu.org</A> with a
subject of &quot;subscribe&quot;.
<P>
<A NAME="lbAI">&nbsp;</A>
<H2>HOMEPAGE</H2>
<A HREF="http://www.nano-editor.org/">http://www.nano-editor.org/</A>
<P>
<A NAME="lbAJ">&nbsp;</A>
<H2>SEE ALSO</H2>
<DL COMPACT>
<DT><B><A HREF="http://localhost/cgi-bin/man/man2html?5+nanorc">nanorc</A></B>(5)<DD>
</DL>
<P>
<I>/usr/share/doc/nano/</I> (or equivalent on your system)
<P>
<A NAME="lbAK">&nbsp;</A>
<H2>AUTHOR</H2>
Chris Allegretta &lt;<A HREF="mailto:chrisa@asty.org">chrisa@asty.org</A>&gt;, et al (see AUTHORS and THANKS for
details).
This manual page was originally written by Jordi Mallach
&lt;<A HREF="mailto:jordi@sindominio.net">jordi@sindominio.net</A>&gt;, for the Debian GNU system (but may be
used by others).
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT><A HREF="#lbAB">NAME</A><DD>
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT><A HREF="#lbAE">OPTIONS</A><DD>
<DT><A HREF="#lbAF">INITIALIZATION FILE</A><DD>
<DT><A HREF="#lbAG">NOTES</A><DD>
<DT><A HREF="#lbAH">BUGS</A><DD>
<DT><A HREF="#lbAI">HOMEPAGE</A><DD>
<DT><A HREF="#lbAJ">SEE ALSO</A><DD>
<DT><A HREF="#lbAK">AUTHOR</A><DD>
</DL>
<HR>
This document was created by
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 04:08:28 GMT, February 13, 2003
</BODY>
</HTML>

3767
nano.c

File diff suppressed because it is too large Load Diff

434
nano.h
View File

@@ -1,434 +0,0 @@
/* $Id$ */
/**************************************************************************
* nano.h *
* *
* Copyright (C) 1999-2003 Chris Allegretta *
* 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) *
* any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
* *
**************************************************************************/
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
#ifndef NANO_H
#define NANO_H 1
/* Macros for the flags int... */
#define SET(bit) flags |= bit
#define UNSET(bit) flags &= ~bit
#define ISSET(bit) (flags & bit)
#define TOGGLE(bit) flags ^= bit
/* 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 ... */
# define COPYFILEBLOCKSIZE 1024
#endif
#ifdef USE_SLANG /* Slang support enabled */
#include <slcurses.h>
#define KEY_IC SL_KEY_IC
#define KEY_DC SL_KEY_DELETE
#elif defined(HAVE_NCURSES_H)
#include <ncurses.h>
#else /* Uh oh */
#include <curses.h>
#endif /* CURSES_H */
#ifdef ENABLE_NLS
# ifdef HAVE_LIBINTL_H
# include <libintl.h>
# endif
# define _(string) gettext(string)
# define P_(singular, plural, number) ngettext(singular, plural, number)
#else
# define _(string) (string)
# define P_(singular, plural, number) (number == 1 ? singular : plural)
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include "config.h"
#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF)
#include <glib.h>
# ifndef HAVE_SNPRINTF
# define snprintf g_snprintf
# endif
# ifndef HAVE_VSNPRINTF
# define vsnprintf g_vsnprintf
# endif
#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 */
#ifndef KEY_HOME
#define KEY_HOME -1
#endif /* KEY_HOME */
#ifndef KEY_END
#define KEY_END -1
#endif /* KEY_END */
/* Snatch these out of the ncurses defs, so we can use them in search
history regardless of whether we're using ncurses or not */
#if !defined(KEY_UP) || !defined(KEY_DOWN)
#define KEY_UP 0403
#define KEY_DOWN 0402
#endif /* !KEY_UP || !KEY_DOWN */
#define VERMSG "GNU nano " VERSION
#if defined(DISABLE_WRAPPING) && defined(DISABLE_JUSTIFY)
#define DISABLE_WRAPJUSTIFY 1
#endif
/* Structure types */
typedef struct filestruct {
char *data;
struct filestruct *next; /* Next node */
struct filestruct *prev; /* Previous node */
int lineno; /* The line number */
} filestruct;
#ifdef ENABLE_MULTIBUFFER
typedef struct openfilestruct {
char *filename;
#ifndef NANO_SMALL
struct stat originalfilestat;
#endif
struct openfilestruct *next; /* Next node */
struct openfilestruct *prev; /* Previous node */
struct filestruct *fileage; /* Current file */
struct filestruct *filebot; /* Current file's last line */
#ifndef NANO_SMALL
struct filestruct *file_mark_beginbuf;
/* Current file's beginning marked line */
int file_mark_beginx; /* Current file's beginning marked line's
x-coordinate position */
#endif
int file_current_x; /* Current file's x-coordinate position */
int file_current_y; /* Current file's y-coordinate position */
int file_flags; /* Current file's flags: modification
status (and marking status, if
available) */
int file_placewewant; /* Current file's place we want */
int file_totlines; /* Current file's total number of lines */
long file_totsize; /* Current file's total size */
int file_lineno; /* Current file's line number */
} openfilestruct;
#endif
typedef struct shortcut {
int val; /* Actual sequence that generates the keystroke */
int altval; /* Alt key # for this function, or 0 for none */
int misc1; /* Other int functions we want bound */
int misc2;
int viewok; /* is this function legal in view mode? */
int (*func) (void); /* Function to call when we catch this key */
const char *desc; /* Description, e.g. "Page Up" */
#ifndef DISABLE_HELP
const char *help; /* Help file entry text */
#endif
struct shortcut *next;
} shortcut;
#ifndef NANO_SMALL
typedef struct toggle {
int val; /* Sequence to toggle the key. Should only need 1 */
const char *desc; /* Description for when toggle is, uh, toggled,
e.g. "Pico Messages"; we'll append Enabled or
Disabled */
int flag; /* What flag actually gets toggled */
struct toggle *next;
} toggle;
#endif /* !NANO_SMALL */
#ifdef ENABLE_NANORC
typedef struct rcoption {
const char *name;
int flag;
} rcoption;
#endif /* ENABLE_NANORC */
#ifdef ENABLE_COLOR
typedef struct colortype {
int fg; /* fg color */
int bg; /* bg color */
int bright; /* Is this color A_BOLD? */
int pairnum; /* Color pair number used for this fg/bg */
regex_t start; /* Start (or all) of the regex string */
regex_t *end; /* End of the regex string */
struct colortype *next;
} colortype;
typedef struct exttype {
regex_t val; /* The extensions that match this syntax. */
struct exttype *next;
} exttype;
typedef struct syntaxtype {
char *desc; /* Name of this syntax type */
exttype *extensions; /* List of extensions that this applies to */
colortype *color; /* color struct for this syntax */
struct syntaxtype *next;
} syntaxtype;
#endif /* ENABLE_COLOR */
#ifndef NANO_SMALL
typedef struct historytype {
struct historytype *next;
struct historytype *prev;
char *data;
} historytype;
typedef struct historyheadtype {
struct historytype *next; /* keep *next and *prev members together */
struct historytype *prev; /* and in same order as in historytype */
struct historytype *tail;
struct historytype *current;
int count;
int len;
} historyheadtype;
#endif /* !NANO_SMALL */
/* Bitwise flags so we can save space (or more correctly, not waste it) */
#define MODIFIED (1<<0)
#define KEEP_CUTBUFFER (1<<1)
#define CASE_SENSITIVE (1<<2)
#define MARK_ISSET (1<<3)
#define CONSTUPDATE (1<<4)
#define NO_HELP (1<<5)
#define NOFOLLOW_SYMLINKS (1<<6)
#define SUSPEND (1<<7)
#define NO_WRAP (1<<8)
#define AUTOINDENT (1<<9)
#define SAMELINEWRAP (1<<10)
#define VIEW_MODE (1<<11)
#define USE_MOUSE (1<<12)
#define USE_REGEXP (1<<13)
#define REGEXP_COMPILED (1<<14)
#define TEMP_OPT (1<<15)
#define CUT_TO_END (1<<16)
#define REVERSE_SEARCH (1<<17)
#define MULTIBUFFER (1<<18)
#define DOS_FILE (1<<19)
#define MAC_FILE (1<<20)
#define SMOOTHSCROLL (1<<21)
#define DISABLE_CURPOS (1<<22) /* Damn, we still need it */
#define ALT_KEYPAD (1<<23)
#define NO_CONVERT (1<<24)
#define BACKUP_FILE (1<<25)
#define NO_RCFILE (1<<26)
#define COLOR_SYNTAX (1<<27)
#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 */
#define NANO_CONTROL_SPACE 0
#define NANO_CONTROL_A 1
#define NANO_CONTROL_B 2
#define NANO_CONTROL_C 3
#define NANO_CONTROL_D 4
#define NANO_CONTROL_E 5
#define NANO_CONTROL_F 6
#define NANO_CONTROL_G 7
#define NANO_CONTROL_H 8
#define NANO_CONTROL_I 9
#define NANO_CONTROL_J 10
#define NANO_CONTROL_K 11
#define NANO_CONTROL_L 12
#define NANO_CONTROL_M 13
#define NANO_CONTROL_N 14
#define NANO_CONTROL_O 15
#define NANO_CONTROL_P 16
#define NANO_CONTROL_Q 17
#define NANO_CONTROL_R 18
#define NANO_CONTROL_S 19
#define NANO_CONTROL_T 20
#define NANO_CONTROL_U 21
#define NANO_CONTROL_V 22
#define NANO_CONTROL_W 23
#define NANO_CONTROL_X 24
#define NANO_CONTROL_Y 25
#define NANO_CONTROL_Z 26
#define NANO_CONTROL_4 28
#define NANO_CONTROL_5 29
#define NANO_CONTROL_6 30
#define NANO_CONTROL_7 31
#define NANO_ALT_A 'a'
#define NANO_ALT_B 'b'
#define NANO_ALT_C 'c'
#define NANO_ALT_D 'd'
#define NANO_ALT_E 'e'
#define NANO_ALT_F 'f'
#define NANO_ALT_G 'g'
#define NANO_ALT_H 'h'
#define NANO_ALT_I 'i'
#define NANO_ALT_J 'j'
#define NANO_ALT_K 'k'
#define NANO_ALT_L 'l'
#define NANO_ALT_M 'm'
#define NANO_ALT_N 'n'
#define NANO_ALT_O 'o'
#define NANO_ALT_P 'p'
#define NANO_ALT_Q 'q'
#define NANO_ALT_R 'r'
#define NANO_ALT_S 's'
#define NANO_ALT_T 't'
#define NANO_ALT_U 'u'
#define NANO_ALT_V 'v'
#define NANO_ALT_W 'w'
#define NANO_ALT_X 'x'
#define NANO_ALT_Y 'y'
#define NANO_ALT_Z 'z'
#define NANO_ALT_PERIOD '.'
#define NANO_ALT_COMMA ','
#define NANO_ALT_LCARAT '<'
#define NANO_ALT_RCARAT '>'
#define NANO_ALT_BRACKET ']'
#define NANO_ALT_SPACE ' '
/* Some semi-changeable keybindings; don't play with unless you're sure you
know what you're doing */
#define NANO_INSERTFILE_KEY NANO_CONTROL_R
#define NANO_INSERTFILE_FKEY KEY_F(5)
#define NANO_EXIT_KEY NANO_CONTROL_X
#define NANO_EXIT_FKEY KEY_F(2)
#define NANO_WRITEOUT_KEY NANO_CONTROL_O
#define NANO_WRITEOUT_FKEY KEY_F(3)
#define NANO_GOTO_KEY NANO_CONTROL_7
#define NANO_GOTO_FKEY KEY_F(13)
#define NANO_ALT_GOTO_KEY NANO_ALT_G
#define NANO_HELP_KEY NANO_CONTROL_G
#define NANO_HELP_FKEY KEY_F(1)
#define NANO_WHEREIS_KEY NANO_CONTROL_W
#define NANO_WHEREIS_FKEY KEY_F(6)
#define NANO_REPLACE_KEY NANO_CONTROL_4
#define NANO_REPLACE_FKEY KEY_F(14)
#define NANO_ALT_REPLACE_KEY NANO_ALT_R
#define NANO_OTHERSEARCH_KEY NANO_CONTROL_R
#define NANO_PREVPAGE_KEY NANO_CONTROL_Y
#define NANO_PREVPAGE_FKEY KEY_F(7)
#define NANO_NEXTPAGE_KEY NANO_CONTROL_V
#define NANO_NEXTPAGE_FKEY KEY_F(8)
#define NANO_CUT_KEY NANO_CONTROL_K
#define NANO_CUT_FKEY KEY_F(9)
#define NANO_UNCUT_KEY NANO_CONTROL_U
#define NANO_UNCUT_FKEY KEY_F(10)
#define NANO_CURSORPOS_KEY NANO_CONTROL_C
#define NANO_CURSORPOS_FKEY KEY_F(11)
#define NANO_SPELL_KEY NANO_CONTROL_T
#define NANO_SPELL_FKEY KEY_F(12)
#define NANO_FIRSTLINE_KEY NANO_PREVPAGE_KEY
#define NANO_LASTLINE_KEY NANO_NEXTPAGE_KEY
#define NANO_CANCEL_KEY NANO_CONTROL_C
#define NANO_REFRESH_KEY NANO_CONTROL_L
#define NANO_JUSTIFY_KEY NANO_CONTROL_J
#define NANO_JUSTIFY_FKEY KEY_F(4)
#define NANO_UNJUSTIFY_KEY NANO_CONTROL_U
#define NANO_UP_KEY NANO_CONTROL_P
#define NANO_DOWN_KEY NANO_CONTROL_N
#define NANO_FORWARD_KEY NANO_CONTROL_F
#define NANO_BACK_KEY NANO_CONTROL_B
#define NANO_MARK_KEY NANO_CONTROL_6
#define NANO_ALT_MARK_KEY NANO_ALT_A
#define NANO_HOME_KEY NANO_CONTROL_A
#define NANO_END_KEY NANO_CONTROL_E
#define NANO_DELETE_KEY NANO_CONTROL_D
#define NANO_BACKSPACE_KEY NANO_CONTROL_H
#define NANO_TAB_KEY NANO_CONTROL_I
#define NANO_SUSPEND_KEY NANO_CONTROL_Z
#define NANO_ENTER_KEY NANO_CONTROL_M
#define NANO_FROMSEARCHTOGOTO_KEY NANO_CONTROL_T
#define NANO_TOFILES_KEY NANO_CONTROL_T
#define NANO_APPEND_KEY NANO_ALT_A
#define NANO_PREPEND_KEY NANO_ALT_P
#define NANO_OPENPREV_KEY NANO_ALT_LCARAT
#define NANO_OPENNEXT_KEY NANO_ALT_RCARAT
#define NANO_OPENPREV_ALTKEY NANO_ALT_COMMA
#define NANO_OPENNEXT_ALTKEY NANO_ALT_PERIOD
#define NANO_BRACKET_KEY NANO_ALT_BRACKET
#define NANO_EXTCMD_KEY NANO_CONTROL_X
#define NANO_NEXTWORD_KEY NANO_CONTROL_SPACE
#define NANO_PREVWORD_KEY NANO_ALT_SPACE
#ifndef NANO_SMALL
/* Toggles do not exist with NANO_SMALL. */
#define TOGGLE_CONST_KEY NANO_ALT_C
#define TOGGLE_AUTOINDENT_KEY NANO_ALT_I
#define TOGGLE_SUSPEND_KEY NANO_ALT_Z
#define TOGGLE_NOHELP_KEY NANO_ALT_X
#define TOGGLE_MOUSE_KEY NANO_ALT_M
#define TOGGLE_CUTTOEND_KEY NANO_ALT_K
#define TOGGLE_REGEXP_KEY NANO_ALT_R
#define TOGGLE_WRAP_KEY NANO_ALT_W
#define TOGGLE_BACKWARDS_KEY NANO_ALT_B
#define TOGGLE_CASE_KEY NANO_ALT_C
#define TOGGLE_LOAD_KEY NANO_ALT_F
#define TOGGLE_DOS_KEY NANO_ALT_D
#define TOGGLE_MAC_KEY NANO_ALT_O
#define TOGGLE_SMOOTH_KEY NANO_ALT_S
#define TOGGLE_NOCONVERT_KEY NANO_ALT_N
#define TOGGLE_BACKUP_KEY NANO_ALT_B
#define TOGGLE_SYNTAX_KEY NANO_ALT_Y
#endif /* !NANO_SMALL */
#define MAIN_VISIBLE 12
#define VIEW 1
#define NOVIEW 0
typedef enum {
CENTER, TOP, NONE
} topmidbotnone;
/* Minimum editor window rows required for nano to work correctly */
#define MIN_EDITOR_ROWS 3
/* Minimum editor window cols required for nano to work correctly */
#define MIN_EDITOR_COLS 10
/* Default number of characters from end-of-line where text wrapping
occurs */
#define CHARS_FROM_EOL 8
/* Maximum number of search history strings saved, same value used for
replace history */
#define MAX_SEARCH_HISTORY 100
#endif /* !NANO_H */

View File

@@ -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.2/%{name}-%{ver}.tar.gz
Source : http://www.nano-editor.org/dist/v1.3/%{name}-%{ver}.tar.gz
BuildRoot : /var/tmp/%{name}-buildroot
Requires : ncurses
@@ -30,8 +30,8 @@ make DESTDIR="$RPM_BUILD_ROOT" install
%files
%defattr(-,root,root)
%doc AUTHORS BUGS COPYING ChangeLog INSTALL NEWS README THANKS TODO nanorc.sample
%{_bindir}/nano
%doc AUTHORS BUGS COPYING ChangeLog INSTALL NEWS README THANKS TODO doc/faq.html doc/nanorc.sample
%{_bindir}/*
%{_mandir}/*/*
%{_datadir}/locale/*/LC_MESSAGES/nano.mo
%{_infodir}/nano.info*

154
nanorc.5
View File

@@ -1,154 +0,0 @@
.\" Hey, EMACS: -*- nroff -*-
.\" 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 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
This manual page documents GNU \fBnano\fP's rcfile.
.PP
\fBnano\fP is a small, free and friendly editor which aims to replace
Pico, the default editor included in the non-free Pine package. Rather
than just copying Pico's look and feel, \fBnano\fP also implements some
missing (or disabled by default) features in Pico, such as "search and
replace" and "go to line number".
.SH OPTIONS
The configuration file accepts a series of "set" and "unset" commands,
which can be used to configure nano on startup without using the
command-line options. Additionally, the "syntax" and "color" keywords
are used to define syntax highlighting rules for different text patterns.
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
\fBset/unset autoindent\fP
Use auto-indentation.
.TP
\fBset/unset backup\fP
Create backup files in filename~.
.TP
\fBset/unset const\fP
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
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.
.TP
\fBset/unset multibuffer\fP
Allow inserting files into their own buffers.
.TP
\fBset/unset noconvert\fP
Don't convert files from DOS/Mac format.
.TP
\fBset/unset nofollow\fP
Don't follow symlinks when writing files.
.TP
\fBset/unset nohelp\fP
Don't display the help lists at the bottom of the screen.
.TP
\fBset/unset nowrap\fP
Don't wrap text at all.
.TP
\fBset operatingdir "\fIdirectory\fP"\fP
\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, 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.
.TP
\fBset/unset smooth\fP
Use smooth scrolling by default.
.TP
\fBset speller \fIspellprog\fP\fP
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.
.TP
\fBset tabsize \fIn\fP\fP
Use a tab size of \fIn\fP instead of the default (8); must be greater
than 0.
.TP
\fBset/unset tempfile\fP
Save automatically on exit, don't prompt.
.TP
\fBset/unset historylog\fP
Enable ~/.nano_history for saving and reading search/replace strings.
.TP
\fBset/unset view\fP
Disallow file modification.
.TP
.B syntax "\fIstr\fP" ["\fIfileregex\fP" ... ]
Defines a syntax named \fIstr\fP which can be activated via the
\fB-Y\fP flag, or will be automatically activated if the current
filename matches \fIfileregex\fP. All following \fBcolor\fP statements
will apply to \fIsyntax\fP until a new syntax is defined.
.TP
.B color \fIfgcolor\fP[,\fIbgcolor\fP] "\fIregex\fP" ...
For the currently defined syntax, display all expressions matching
\fIregex\fP with foreground color \fIfgcolor\fP and optional background
color \fIbgcolor\fP. Legal colors for foreground and background color are:
white, black, red, blue, green, yellow, magenta, and cyan. You may use
the prefix "bright" to force a stronger color highlight. If your
terminal supports transparency, not specifying a \fIbgcolor\fP tells
\fBnano\fP to attempt to use a transparent background.
.TP
.B color \fIfgcolor\fP[,\fIbgcolor\fP] start="\fIsr\fP" end="\fIer\fP"
Display expressions which start with \fIsr\fP and end with \fIer\fP
with foreground color \fIfgcolor\fP and optional
background color \fIbgcolor\fP. This allows syntax highlighting to span
multiple lines. Note that all subsequent instances of \fIsr\fP after
an initial \fIsr\fP is found will be highlighted until the first
instance of \fIer\fP.
\fI
.SH SEE ALSO
.PD 0
.TP
\fBnano\fP(1)
.PP
\fI/usr/share/doc/nano/examples/nanorc.sample\fP (or equivalent on your system)
.SH AUTHOR
Chris Allegretta <chrisa@asty.org>, et al (see AUTHORS and THANKS for
details).
This manual page was written by Jordi Mallach <jordi@gnu.org>.

View File

@@ -1,160 +0,0 @@
<HTML><HEAD><TITLE>Manpage of NANORC</TITLE>
</HEAD><BODY>
<H1>NANORC</H1>
Section: File Formats (5)<BR>Updated: February 9, 2003<BR><A HREF="#index">Index</A>
<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
nanorc - GNU nano's rcfile
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>/etc/nanorc</B>
<B>$HOME/.nanorc</B>
<BR>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
This manual page documents GNU <B>nano</B>'s rcfile.
<P>
<B>nano</B> is a small, free and friendly editor which aims to replace
Pico, the default editor included in the non-free Pine package. Rather
than just copying Pico's look and feel, <B>nano</B> also implements some
missing (or disabled by default) features in Pico, such as &quot;search and
replace&quot; and &quot;go to line number&quot;.
<P>
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
The configuration file accepts a series of &quot;set&quot; and &quot;unset&quot; commands,
which can be used to configure nano on startup without using the
command-line options. Additionally, the &quot;syntax&quot; and &quot;color&quot; keywords
are used to define syntax highlighting rules for different text patterns.
GNU nano will read one command per line.
<P>
Options in rcfiles take precedence over nano's defaults, and command line
options override rcfile settings.
<P>
The supported commands and arguments are:
<P>
<DL COMPACT>
<DT><B>set/unset autoindent</B><DD>
Use auto-indentation.
<DT><B>set/unset backup</B><DD>
Create backup files in filename~.
<DT><B>set/unset const</B><DD>
Constantly update the cursor position.
<DT><B>set/unset cut</B><DD>
Use cut to end of line with ^K by default.
<DT><B>set fill </B><I>n</I><DD>
Set the column where lines will be wrapped at to <I>n</I>.
<DT><B>set/unset keypad</B><DD>
Use alternate keypad routines.
<DT><B>set/unset multibuffer</B><DD>
Allow inserting files into their own buffers.
<DT><B>set/unset noconvert</B><DD>
Don't convert files from DOS/Mac format.
<DT><B>set/unset nofollow</B><DD>
Don't follow symlinks when writing files.
<DT><B>set/unset nohelp</B><DD>
Don't display the help lists at the bottom of the screen.
<DT><B>set/unset nowrap</B><DD>
Don't wrap text at all.
<DT><B>set operatingdir &quot;</B><I>directory</I>&quot;<DD>
Set operating directory (chroots the user to <I>directory</I> and below).
<DT><B>set/unset preserve</B><DD>
Preserve the XON and XOFF keys (^Q and ^S).
<DT><B>set quotestr &quot;</B><I>string</I>&quot;<DD>
The email-quote string. This is a &quot;regular expression&quot; if your
system supports them, otherwise a literal string.
Default value is set quotestr &quot;^([ ]*[|&gt;:}#])+&quot; if you have regexps,
otherwise set quotestr &quot;&gt; &quot;.
<DT><B>set/unset regexp</B><DD>
Do regular expression searches by default.
<DT><B>set/unset smooth</B><DD>
Use smooth scrolling by default.
<DT><B>set speller </B><I>spellprog</I><DD>
Use spelling checker <I>spellprog</I> instead of the default (spell).
<DT><B>set/unset suspend</B><DD>
Allow nano to be suspended with ^Z.
<DT><B>set tabsize </B><I>n</I><DD>
Use a tab size of <I>n</I> instead of the default (8); must be greater
than 0.
<DT><B>set/unset tempfile</B><DD>
Save automatically on exit, don't prompt.
<DT><B>set/unset historylog</B><DD>
Enable ~/.nano_history for saving and reading search/replace strings.
<DT><B>set/unset view</B><DD>
Disallow file modification.
<DT><B>syntax </B><I>str</I> [<I>fileregex</I> ... ]
<DD>
Defines a syntax named <I>str</I> which can be activated via the
<B>-Y</B> flag, or will be automatically activated if the current
filename matches <I>fileregex</I>. All following <B>color</B> statements
will apply to <I>syntax</I> until a new syntax is defined.
<DT><B>color </B><I>fgcolor</I>[,<I>bgcolor</I>] <I>regex</I> ...
<DD>
For the currently defined syntax, display all expressions matching
<I>regex</I> with foreground color <I>fgcolor</I> and optional background
color <I>bgcolor</I>. Legal colors for foreground and background color are:
white, black, red, blue, green, yellow, magenta, and cyan. You may use
the prefix &quot;bright&quot; to force a stronger color highlight. If your
terminal supports transparency, not specifying a <I>bgcolor</I> tells
<B>nano</B> to attempt to use a transparent background.
<DT><B>color </B><I>fgcolor</I>[,<I>bgcolor</I>] start=<I>sr</I> end=<I>er</I>
<DD>
Display expressions which start with <I>sr</I> and end with <I>er</I>
with foreground color <I>fgcolor</I> and optional
background color <I>bgcolor</I>. This allows syntax highlighting to span
multiple lines. Note that all subsequent instances of <I>sr</I> after
an initial <I>sr</I> is found will be highlighted until the first
instance of <I>er</I>.
<I>
<P>
</DL>
</I><A NAME="lbAF">&nbsp;</A>
<H2>SEE ALSO</H2>
<DL COMPACT>
<DT><B><A HREF="http://localhost/cgi-bin/man/man2html?1+nano">nano</A></B>(1)<DD>
</DL>
<P>
<I>/usr/share/doc/nano/examples/nanorc.sample</I> (or equivalent on your system)
<A NAME="lbAG">&nbsp;</A>
<H2>AUTHOR</H2>
Chris Allegretta &lt;<A HREF="mailto:chrisa@asty.org">chrisa@asty.org</A>&gt;, et al (see AUTHORS and THANKS for
details).
This manual page was written by Jordi Mallach &lt;<A HREF="mailto:jordi@gnu.org">jordi@gnu.org</A>&gt;.
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT><A HREF="#lbAB">NAME</A><DD>
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT><A HREF="#lbAE">OPTIONS</A><DD>
<DT><A HREF="#lbAF">SEE ALSO</A><DD>
<DT><A HREF="#lbAG">AUTHOR</A><DD>
</DL>
<HR>
This document was created by
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 04:08:33 GMT, February 13, 2003
</BODY>
</HTML>

View File

@@ -1,177 +0,0 @@
## Sample initialization file for GNU nano
## Please note that you must have configured nano with
## --enable-nanorc for this file to be read!
##
## To make sure a value is not enabled, use "unset <option>"
## Use auto-indentation
# set autoindent
## Backup files to filename~
# set backup
## Constantly update the cursor position
# set const
## Use cut to end of line with ^K by default
# set cut
## Use this value instead of the default
## An out-of-range negative value can make nano die complaining that the
## screen is too small
## set fill -8
## Use alternate keypad routines
# set keypad
## Allow multiple file buffers (using ^R inserts into separate buffer)
## You must have configured with --enable-multibuffer or --enable-extra
## for this to work
##
## set multibuffer
## Don't convert files from DOS/Mac format
# set noconvert
## Don't follow symlinks when writing files
# set nofollow
## Don't display the help lists at the bottom of the screen
# set nohelp
## Don't wrap text at all
# set nowrap
## Set operating directory (chroot of sorts)
# set operatingdir "~"
## Preserve the XON and XOFF keys (^Q and ^S)
# set preserve
## The email-quote string. This is a "regular expression" if your
## system supports them, otherwise a literal string. Default
# set quotestr "^([ \t]*[|>:}#])+" if you have regexps, otherwise
# set quotestr "> ".
## You can get old nano quoted-justify behavior via:
# set quotestr "(> )+"
## Do regular expression searches by default
# set regexp
## Use smooth scrolling as the default
# set smooth
## Use this spelling checker instead of the default one
# set speller aspell
## Allow nano to be suspended with ^Z
# set suspend
## Use this tab size instead of the default; it must be greater than 0
# set tabsize 4
## Save automatically on exit, don't prompt
# set tempfile
## Enable ~/.nano_history for saving and reading search/replace strings.
# set historylog
## Disallow file modification, why would you want this in an rc file? ;)
# set view
## Color setup
## Format:
## syntax "short description" ["filename regex" ...]
## color foreground,background "regex" ["regex"...]
##
## Legal colors are: white, black, red, blue, green, yellow, magenta,
## cyan. You may use the prefix "bright" to mean a stronger color
## highlight.
##
## To use multi-line regexes use the start="regex" end="regex" format.
##
## If your system supports transparency, not specifying a background
## color will use a transparent color. If you don't want this, be sure
## to set the background color to black or white.
# syntax "c-file" ".*\.c$" ".*\.h$"
# color red "\<[A-Z_]{2,}\>"
# color green "\<float\>" "\<char\>" "\<int\>" "\<void\>"
# color green "\<static\>" "\<const\>" "\<struct\>"
# color brightyellow "\<if\>" "\<while\>" "\<do\>" "\<else\>" "\<case\>" "\<switch\>"
# color brightcyan "#define" "#include" "#ifn*def" "#endif"
# color brightcyan "#elif" "#else" "#if"
## You will in general want your comments and strings to come last,
## because syntax highlighting rules will be applied in the order they
## are read in. Note that quotes in regexes should not be escaped (use "
## instead of \").
# color brightyellow "<[^= ]*>" ""(\\.|[^\"])*""
## This string is VERY resource intensive!!!
# color brightyellow start=""(\\.|[^\"])*\\( | )*$" end="^(\\.|[^\"])*""
## And we want to have some nice comment highlighting too
# color brightblue "//.*"
# color brightblue start="/\*" end="\*/"
## Here are some short examples for TeX files and HTML
# syntax "HTML" "\.html$"
#
# color blue start="<" end=">"
# color red "&([^; ])*;"
#
# syntax "TeX" "\.tex$"
#
# color green "\\(.|([A-Za-z]*))"
# color magenta "\{" "\}"
# color blue "%.*"
## For this you will probably want to set your editor to "nano -Y mutt"
# syntax "mutt"
# color green "^>.*"
## Here is are examples for groff and for your .nanorc
#syntax "groff" "\.ms$" "\.mm$" "\.me$" "\.tmac$" "^tmac." ".rof"
## The argument of .nr or .ds
#color cyan "^\.ds [^ ]*"
#color cyan "^\.nr [^ ]*"
## Single character escapes
#color brightmagenta "\\."
## Highlight the argument of \f or \s in the same colour
#color brightmagenta "\\f."
#color brightmagenta "\\f\(.."
#color brightmagenta "\\s(\+|\-)?[0-9]"
## \n
#color cyan "(\\|\\\\)n."
#color cyan "(\\|\\\\)n\(.."
#color cyan start="(\\|\\\\)n\[" end="]"
## Requests
#color brightgreen "^\. *[^ ]*"
## Comments
#color yellow "^\.\\\".*$"
## Strings
#color green "(\\|\\\\)\*."
#color green "(\\|\\\\)\*\(.."
#color green start="(\\|\\\\)\*\[" end="]"
## Characters
#color brightred "\\\(.."
#color brightred start="\\\[" end="]"
## Macro arguments
#color brightcyan "\\\\\$[1-9]"
#syntax "nanorc" "[\.]*nanorc$"
#color white "^ *(set|unset).*$"
#color cyan "^ *(set|unset) (autoindent|backup|const|cut|fill|keypad|multibuffer|noconvert|nofollow|nohelp|nowrap|operatingdir|preserve|quotestr|regexp|smooth|speller|suspend|tabsize|tempfile|historylog|view)"
#color brightwhite "^ *syntax [^ ]*"
#color brightblue "^ *set\>" "^ *unset\>" "^ *syntax\>"
#color white "^ *color\>.*"
#color yellow "^ *color (bright)?(white|black|red|blue|green|yellow|magenta|cyan)\>"
#color magenta "^ *color\>"
#color green "^#.*$"

View File

@@ -1,10 +1,225 @@
2005-06-28 David Lawrence Ramsey <pooka_regent@sluggy.net>
* POTFILES.in: Remove source files that contain no translatable
strings.
2005-06-19 David Lawrence Ramsey <pooka_regent@sluggy.net>
* pt_BR.po: Typo fix.
2005-06-15 Jordi Mallach <jordi@gnu.org>
* de.po: Typo fix by Jens Seidel.
2005-05-23 Jordi Mallach <jordi@gnu.org>
* fr.po: Updated French translation by
Jean-Philippe Guérard.
2005-04-27 Jordi Mallach <jordi@gnu.org>
* ms.po: Updated Malay translation by
Sharuzzaman Ahmat Raslan.
2005-04-22 Jordi Mallach <jordi@gnu.org>
* ca.po: Updated Norwegian bokmål translation by
Geir Helland.
2005-04-20 Jordi Mallach <jordi@gnu.org>
* ms.po: Updated Malay translation by
Sharuzzaman Ahmat Raslan.
* ro.po: Updated Romanian translation by Laurentiu Buzdugan.
* zh_TW.po: Updated Traditional Chinese translation by
CHAO Wei-Lun.
2005-04-18 Jordi Mallach <jordi@gnu.org>
* vi.po: Updated Vietnamese translation by Phan Vinh Thinh.
2005-04-18 Jordi Mallach <jordi@gnu.org>
* ca.po: Updated Catalan translation.
* it.po: Updated Italian translation by Marco Colombo.
* ro.po: Updated Romanian translation by Laurentiu Buzdugan.
2005-04-14 Jordi Mallach <jordi@gnu.org>
* es.po: Updated Spanish translation by
Ricardo Javier Cárdenes Medina.
2005-04-13 Jordi Mallach <jordi@gnu.org>
* vi.po: New Vietnamese translation by Phan Vinh Thinh.
* LINGUAS: Added "vi".
2005-04-09 Jordi Mallach <jordi@gnu.org>
* zh_TW.po: Added Plural-Forms header and fix format specification
typos.
2005-04-08 Jordi Mallach <jordi@gnu.org>
* ca.po: Updated Catalan translation.
* it.po: Updated Italian translation by Marco Colombo.
* zh_TW.po: Updated Traditional Chinese translation by
CHAO Wei-Lun.
2005-04-06 Jordi Mallach <jordi@gnu.org>
* rw.po: New Kinyarwanda translation by Steve Murphy.
* LINGUAS: Added "rw".
2005-04-05 Jordi Mallach <jordi@gnu.org>
* fr.po: Updated French translation by
Jean-Philippe Guérard.
* ro.po: Updated Romanian translation by
Laurentiu Buzdugan.
2005-03-11 Jordi Mallach <jordi@gnu.org>
* ms.po: Updated Malay translation by
Sharuzzaman Ahmat Raslan.
2005-01-17 Jordi Mallach <jordi@gnu.org>
* pt_BR.po: Updated Brazilian Portuguese translation by
Joao Victor Duarte Martins.
2004-12-15 Jordi Mallach <jordi@gnu.org>
* it.po: Updated Italian translation by Marco Colombo.
2004-12-15 Jordi Mallach <jordi@gnu.org>
* sv.po: Updated Swedish translation by Christian Rose.
2004-12-13 Jordi Mallach <jordi@gnu.org>
* sv.po: Updated Swedish translation by Christian Rose.
2004-12-07 Jordi Mallach <jordi@gnu.org>
* it.po: Updated Italian translation by
Marco Colombo.
* ro.po: Updated Romanian translation by
Laurentiu Buzdugan.
2004-12-01 Jordi Mallach <jordi@gnu.org>
* ca.po: Updated Catalan translation.
* nb: Updated Norwegian bokmål translation by
Geir Helland.
* fr.po: Updated French translation by
Jean-Philippe Guérard.
2004-11-18 Jordi Mallach <jordi@gnu.org>
* fr.po: Updated French translation by
Jean-Philippe Guérard.
2004-11-18 Jordi Mallach <jordi@gnu.org>
* ms.po: Updated Malay translation by
Sharuzzaman Ahmat Raslan.
2004-10-07 Jordi Mallach <jordi@gnu.org>
* eu.po: Updated Basque translation by
Mikel Olasagasti.
2004-08-31 Jordi Mallach <jordi@gnu.org>
* es.po: Updated Spanish translation by
Ricardo Javier Cárdenes Medina.
2004-08-31 Jordi Mallach <jordi@gnu.org>
* fr.po: Updated Catalan translation by
Jean-Philippe Guérard.
2004-08-27 Jordi Mallach <jordi@gnu.org>
* ca.po: Updated Catalan translation.
* de.po: Updated German translation by Michael Piefel.
2004-06-01 Jordi Mallach <jordi@gnu.org>
* zh_TW.po: Added Traditional Chinese translation by
CHAO Wei-Lun <chaoweilun@pcmail.com.tw>.
* LINGUAS: Added "zh_TW".
2004-02-24 Jordi Mallach <jordi@gnu.org>
* ms.po: Updated Malay translation by Sharuzzaman Ahmat Raslan.
2003-11-25 Jordi Mallach <jordi@gnu.org>
* ro.po: Updated Romanian translation by Laurentiu Buzdugan.
2003-11-06 Jordi Mallach <jordi@gnu.org>
* sr.po: Added Serbian translation by Danilo Segan <dsegan@gmx.net>.
* LINGUAS: Added "sr" (Serbian), and alphabetize.
* ChangeLog: Recoded as UTF-8.
2003-10-30 Jordi Mallach <jordi@gnu.org>
* fi.po: Patch from Martin-Eric Racine <q-funk@pp.fishpool.fi>
to accept "Yy" and "Nn" as well as the Finnish letters in Yes/No
prompts.
2003-10-18 Jordi Mallach <jordi@gnu.org>
* ca.po: Updated Catalan translation.
2003-09-12 Jordi Mallach <jordi@gnu.org>
* POTFILES.in: Updated path to sources.
2003-09-01 Jordi Mallach <jordi@gnu.org>
* fr.po: Updated French translation by Jean-Philippe Guérard.
2003-08-17 Jordi Mallach <jordi@gnu.org>
* tr.po: Updated Turkish translation by A. Murat EREN.
2003-08-05 Jordi Mallach <jordi@gnu.org>
* ca.po: Updated Catalan translation.
2003-06-11 Jordi Mallach <jordi@gnu.org>
* nb.po: Updated Norwegian bokmål translation by Geir Helland.
2003-06-10 Jordi Mallach <jordi@gnu.org>
* fr.po: Updated French translation by Jean-Philippe Guérard.
2003-06-02 Jordi Mallach <jordi@gnu.org>
* de.po: Updated German translation by Michael Piefel.
2003-05-06 Jordi Mallach <jordi@gnu.org>
* ms.po: Updated Malay translation by Sharuzzaman Ahmat Raslan.
2003-04-24 Jordi Mallach <jordi@gnu.org>
* ro.po: New Romanian translation by Laurentiu Buzdugan.
* id.po: Updated Indonesian translation by Tedi Heriyanto.
* LINGUAS: Added "ro" (Romanian).
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.
* fr.po: Updated French translation by Jean-Philippe Guérard.
2003-03-17 Jordi Mallach <jordi@gnu.org>
@@ -26,7 +241,7 @@
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
* es.po: Updated Spanish translation by Ricardo Javier Cárdenes
Medina.
2003-02-17 Jordi Mallach <jordi@gnu.org>
@@ -37,12 +252,12 @@
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.
* 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.
* 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.
@@ -69,8 +284,8 @@
2003-02-08 Jordi Mallach <jordi@gnu.org>
* it.po: Updated Italian translation by Marco Colombo.
* gl.po: Updated Galician translation by Jacobo Tarrío.
* es.po: Updated Spanish translation by Ricardo Javier Cárdenes
* gl.po: Updated Galician translation by Jacobo Tarrío.
* es.po: Updated Spanish translation by Ricardo Javier Cárdenes
Medina.
2003-02-06 Jordi Mallach <jordi@gnu.org>
@@ -81,13 +296,13 @@
2003-02-04 Jordi Mallach <jordi@gnu.org>
* ca.po: Updated Catalan translation.
* fr.po: Updated French translation by Jean-Philippe Guérard.
* fr.po: Updated French translation by Jean-Philippe Guérard.
* uk.po: Updated Ukrainian translation by Sergey A. Ribalchenko.
* de.po: Updated German translation by Michael Piefel.
2003-01-27 Jordi Mallach <jordi@gnu.org>
* es.po: Updated translation by Ricardo Javier Cárdenes Medina.
* es.po: Updated translation by Ricardo Javier Cárdenes Medina.
2002-01-26 Jordi Mallach <jordi@gnu.org>
@@ -95,7 +310,7 @@
2002-01-25 Jordi Mallach <jordi@gnu.org>
* gl.po: Updated translation by Jacobo Tarrío.
* gl.po: Updated translation by Jacobo Tarrío.
2002-01-22 Jordi Mallach <jordi@gnu.org>
@@ -103,13 +318,13 @@
2003-01-21 Jordi Mallach <jordi@gnu.org>
* fr.po: Updated translation by Jean-Philippe Guérard.
* fr.po: Updated translation by Jean-Philippe Guérard.
* ms.po: Updated translation by Sharuzzaman Ahmat Raslan.
* uk.po: Updated translation by Sergey A. Ribalchenko.
2003-01-18 Jordi Mallach <jordi@gnu.org>
* fr.po: Updated translation by Jean-Philippe Guérard.
* fr.po: Updated translation by Jean-Philippe Guérard.
* sv.po: Updated translation by Christian Rose.
* nl.po: Updated translation by Guus Sliepen.
* ca.po: Updated translation.
@@ -133,7 +348,7 @@
2002-12-14 Jordi Mallach <jordi@sindominio.net>
* fr.po: Updated translation by Jean-Philippe Guérard.
* fr.po: Updated translation by Jean-Philippe Guérard.
* tr.po: New Turkish translation by Doruk Fisek.
2002-11-10 Jordi Mallach <jordi@sindominio.net>
@@ -153,22 +368,22 @@
2002-10-29 Jordi Mallach <jordi@sindominio.net>
* id.po: Updated translation by Tedi Heriyanto.
* fr.po: Updated translation by Jean-Philippe Guérard.
* fr.po: Updated translation by Jean-Philippe Guérard.
2002-10-27 Jordi Mallach <jordi@sindominio.net>
* fr.po: Updated translation by Jean-Philippe Guérard.
* fr.po: Updated translation by Jean-Philippe Guérard.
2002-10-26 Jordi Mallach <jordi@sindominio.net>
* es.po: Updated translation by Ricardo Javier Cárdenes Medina.
* es.po: Updated translation by Ricardo Javier Cárdenes Medina.
2002-10-26 Jordi Mallach <jordi@sindominio.net>
* gl.po: Updated translation by Jacobo Tarrío.
* gl.po: Updated translation by Jacobo Tarrío.
* sv.po: Updated translation by Christian Rose.
* de.po: Updated translation by Michael Piefel.
* fr.po: Updated translation by Jean-Philippe Guérard.
* fr.po: Updated translation by Jean-Philippe Guérard.
* ca.po: Updated translation.
2002-10-17 Jordi Mallach <jordi@sindominio.net>
@@ -177,11 +392,11 @@
2002-10-14 Jordi Mallach <jordi@sindominio.net>
* fr.po: Updated translation by Jean-Philippe Guérard.
* fr.po: Updated translation by Jean-Philippe Guérard.
2002-10-13 Jordi Mallach <jordi@sindominio.net>
* es.po: Updated translation by Ricardo Javier Cárdenes Medina.
* es.po: Updated translation by Ricardo Javier Cárdenes Medina.
2002-10-08 Jordi Mallach <jordi@sindominio.net>
@@ -199,7 +414,7 @@
2002-10-07 Jordi Mallach <jordi@sindominio.net>
* sv.po: Updated translation by Christian Rose.
* gl.po: Updated translation by Jacobo Tarrío.
* gl.po: Updated translation by Jacobo Tarrío.
* pl.po: Updated translation by Wojciech Kotwica.
2002-09-08 Jordi Mallach <jordi@sindominio.net>
@@ -208,7 +423,7 @@
2002-09-08 Jordi Mallach <jordi@sindominio.net>
* fr.po: Updated translation by Jean-Philippe Guérard.
* fr.po: Updated translation by Jean-Philippe Guérard.
* da.po: Updated translation by Keld Simonsen.
2002-08-19 Jordi Mallach <jordi@sindominio.net>
@@ -218,15 +433,15 @@
2002-07-31 Jordi Mallach <jordi@sindominio.net>
* gl.po: Updated translation by Jacobo Tarrío.
* gl.po: Updated translation by Jacobo Tarrío.
2002-07-31 Jordi Mallach <jordi@sindominio.net>
* es.po: Updated translation by Ricardo Javier Cárdenes Medina.
* es.po: Updated translation by Ricardo Javier Cárdenes Medina.
2002-07-31 Jordi Mallach <jordi@sindominio.net>
* fr.po: Updated translation by Jean-Philippe Guérard.
* fr.po: Updated translation by Jean-Philippe Guérard.
2002-07-30 Jordi Mallach <jordi@sindominio.net>
@@ -276,13 +491,13 @@
2002-05-13 Jordi Mallach <jordi@sindominio.net>
* fr.po: Updated translation by Jean-Philippe Guérard.
* fr.po: Updated translation by Jean-Philippe Guérard.
* de.po: Updated translation by Michael Piefel.
2002-05-13 Jordi Mallach <jordi@sindominio.net>
* it.po: Updated translation by Marco Colombo.
* gl.po: Updated translation by Jacobo Tarrío.
* gl.po: Updated translation by Jacobo Tarrío.
* ca.po: Updated translation.
* es.po: Updated translation.
@@ -319,7 +534,7 @@
* gl.po: Updated translation by Jacobo Tarrio.
* de.po: Updated translation by Michael Piefel.
* fr.po: Updated translation by Jean-Philippe Guérard.
* fr.po: Updated translation by Jean-Philippe Guérard.
* ca.po: Updated.
* es.po: Updated.
@@ -337,7 +552,7 @@
2002-03-17 Jordi Mallach <jordi@sindominio.net>
* fr.po: Updated translation by Jean-Philippe Guérard.
* fr.po: Updated translation by Jean-Philippe Guérard.
2002-03-15 Jordi Mallach <jordi@sindominio.net>
@@ -360,7 +575,7 @@
2002-03-11 Jordi Mallach <jordi@sindominio.net>
* fr.po: Updated translation by Jean-Philippe Guérard.
* fr.po: Updated translation by Jean-Philippe Guérard.
2002-03-09 Jordi Mallach <jordi@sindominio.net>
@@ -408,7 +623,7 @@
2002-02-06 Jordi Mallach <jordi@sindominio.net>
* cs.po: Incomplete update by Václav Haisman.
* cs.po: Incomplete update by Václav Haisman.
2002-01-27 Jordi Mallach <jordi@sindominio.net>
@@ -416,14 +631,14 @@
2002-01-26 Jordi Mallach <jordi@sindominio.net>
* fr.po: Updated translation by Jean-Philippe Guérard.
* fr.po: Updated translation by Jean-Philippe Guérard.
* nn.po: Updated translation by Kjetil Torgrim Homme.
* de.po: Updated translation by Michael Piefel.
2002-01-25 Jordi Mallach <jordi@sindominio.net>
* sv.po: Updated translation by Christian Rose.
* fr.po: Updated translation by Jean-Philippe Guérard.
* fr.po: Updated translation by Jean-Philippe Guérard.
2002-01-25 Jordi Mallach <jordi@sindominio.net>
@@ -454,21 +669,21 @@
* no.po: Removed, replaced by nn.po.
* nn.po: Updated translation by Kjetil Torgrim Homme.
* nb.po: New Norwegian bokmål translation by Stig E Sandoe.
* nb.po: New Norwegian bokmål translation by Stig E Sandoe.
2002-01-12 Jordi Mallach <jordi@sindominio.net>
* fr.po: Updated translation by Jean-Philippe Guérard.
* fr.po: Updated translation by Jean-Philippe Guérard.
2002-01-10 Jordi Mallach <jordi@sindominio.net>
* fr.po: Updated translation by Jean-Philippe Guérard.
* fr.po: Updated translation by Jean-Philippe Guérard.
2002-01-08 Jordi Mallach <jordi@sindominio.net>
* ru.po, uk.po: Updated translations by Sergey A.
Ribalchenko.
* fr.po: Updated translation by Jean-Philippe Guérard.
* fr.po: Updated translation by Jean-Philippe Guérard.
2002-01-07 Jordi Mallach <jordi@sindominio.net>

View File

@@ -1,2 +1,2 @@
# List of available languages.
es de fr it id fi hu ca cs gl uk ru sv nn nl da pl nb ms pt_BR tr eu
ca cs da de es eu fi fr gl hu id it ms nb nl nn pl pt_BR ro ru rw sr sv tr uk vi zh_TW

View File

@@ -1,17 +1,10 @@
# $Id$
# List of source files containing translatable strings.
# Package source files
cut.c
files.c
global.c
move.c
nano.c
rcfile.c
search.c
utils.c
winio.c
# Package header files
nano.h
proto.h
src/files.c
src/global.c
src/nano.c
src/rcfile.c
src/search.c
src/utils.c
src/winio.c

2529
po/ca.po

File diff suppressed because it is too large Load Diff

431
po/cs.po
View File

@@ -6,7 +6,8 @@
msgid ""
msgstr ""
"Project-Id-Version: nano 1.1.6\n"
"POT-Creation-Date: 2003-04-19 23:02-0400\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2003-08-11 21:49-0400\n"
"PO-Revision-Date: 2002-01-30 16:03+0100\n"
"Last-Translator: Václav Haisman <V.Haisman@sh.cvut.cz>\n"
"Language-Team: Czech <cs@li.org>\n"
@@ -14,15 +15,6 @@ msgstr ""
"Content-Type: text/plain; charset=iso-8859-2\n"
"Content-Transfer-Encoding: 8bit\n"
#: cut.c:49
#, fuzzy, c-format
msgid "add_to_cutbuffer() called with inptr->data = %s\n"
msgstr "add_to_cutbuffer voláno s inptr->data = %s\n"
#: cut.c:213
msgid "Blew away cutbuffer =)\n"
msgstr "Blew away cutbuffer =)\n"
#: files.c:317
#, fuzzy, c-format
msgid "Read %d line (Converted from Mac format)"
@@ -86,12 +78,6 @@ msgstr "Soubor pro vlo
msgid "File to insert [from ./] "
msgstr "Soubor pro vlo¾ení [z ./] "
#: files.c:479 files.c:736 files.c:793 files.c:881 files.c:893 files.c:944
#: files.c:955 files.c:1815
#, fuzzy, c-format
msgid "filename is %s\n"
msgstr "jméno souboru je %s"
#: files.c:495
msgid "Command to execute"
msgstr ""
@@ -110,16 +96,6 @@ msgstr "Nelze vlo
msgid "Key illegal in non-multibuffer mode"
msgstr "Klávesa nepøípustná v ne-vicebufferovém módu"
#: files.c:704 nano.c:565
#, fuzzy, c-format
msgid "%s: free'd a node, YAY!\n"
msgstr "delete_node(): uzel uvolnìn, YAY!\n"
#: files.c:709 nano.c:570
#, fuzzy, c-format
msgid "%s: free'd last node.\n"
msgstr "delete_node(): poslední uzel uvolnìn.\n"
#: files.c:873 files.c:936
msgid "No more open files"
msgstr "®ádné dal¹í otevøené soubory"
@@ -144,11 +120,6 @@ msgstr "Nemohu otev
msgid "Couldn't write backup: %s"
msgstr "Nemohu zavøít %s: %s"
#: files.c:1401
#, c-format
msgid "Backing up %s to %s\n"
msgstr ""
#: files.c:1413
#, fuzzy, c-format
msgid "Could not set permissions %o on backup %s: %s"
@@ -170,11 +141,6 @@ msgstr "Nemohu nastavit p
msgid "Could not open file for writing: %s"
msgstr "Nemohu otevøít soubor pro zápis: %s"
#: files.c:1516
#, c-format
msgid "Wrote >%s\n"
msgstr "Zapsáno >%s\n"
#: files.c:1572
#, c-format
msgid "Could not close %s: %s"
@@ -549,228 +515,228 @@ msgstr "Otev
msgid "Toggle insert into new buffer"
msgstr ""
#: global.c:418 global.c:565 global.c:605 global.c:641 global.c:660
#: global.c:690 global.c:722 global.c:744 global.c:754 global.c:764
#: global.c:784
#: global.c:418 global.c:578 global.c:627 global.c:664 global.c:683
#: global.c:713 global.c:751 global.c:775 global.c:785 global.c:795
#: global.c:816
msgid "Get Help"
msgstr "Nápovìda"
#: global.c:424
#: global.c:425
msgid "Close"
msgstr "Zavøít"
#: global.c:430 global.c:683
#: global.c:432 global.c:706
msgid "Exit"
msgstr "Konec"
#: global.c:434
#: global.c:437
msgid "WriteOut"
msgstr "Zapi¹"
#: global.c:438
#: global.c:442
msgid "Justify"
msgstr "Zarovnání"
#: global.c:443
#: global.c:448
#, fuzzy
msgid "Read File"
msgstr "Èíst Soubor"
#: global.c:452
#: global.c:458
msgid "Where Is"
msgstr "Kde Je"
#: global.c:456 global.c:675 global.c:770
#: global.c:463 global.c:698 global.c:801
msgid "Prev Page"
msgstr "Pøedchozí Strana"
#: global.c:460 global.c:679 global.c:774
#: global.c:468 global.c:702 global.c:805
msgid "Next Page"
msgstr "Dal¹í Strana"
#: global.c:464
#: global.c:473
msgid "Cut Text"
msgstr "Vyjmi Text"
#: global.c:469
#: global.c:479
msgid "UnJustify"
msgstr "OdZarovnej"
#: global.c:473
#: global.c:484
msgid "UnCut Txt"
msgstr "Zru¹ vyjmutí textu"
#: global.c:477
#: global.c:489
msgid "Cur Pos"
msgstr "Pozice Kurzoru"
#: global.c:481
#: global.c:494
msgid "To Spell"
msgstr "Pravopis"
#: global.c:485 nano.c:420 winio.c:604
#: global.c:498 nano.c:420 winio.c:655
msgid "Up"
msgstr "Nahoru"
#: global.c:489
#: global.c:502
msgid "Down"
msgstr "Dolu"
#: global.c:493
#: global.c:506
msgid "Forward"
msgstr "Dopøedu"
#: global.c:497
#: global.c:510
msgid "Back"
msgstr "Zpìt"
#: global.c:501
#: global.c:514
msgid "Home"
msgstr "Domù"
#: global.c:505
#: global.c:518
msgid "End"
msgstr "Konec"
#: global.c:509
#: global.c:522
msgid "Refresh"
msgstr "Obnovit"
#: global.c:513
#: global.c:526
#, fuzzy
msgid "Mark Text"
msgstr "Oznaè Text"
#: global.c:517
#: global.c:530
msgid "Delete"
msgstr "Smazat"
#: global.c:521
#: global.c:534
msgid "Backspace"
msgstr "Backspace"
#: global.c:525
#: global.c:538
msgid "Tab"
msgstr "Tab"
#: global.c:528 global.c:578
#: global.c:541 global.c:595
#, fuzzy
msgid "Replace"
msgstr "Zámìna"
#: global.c:532
#: global.c:545
msgid "Enter"
msgstr "Enter"
#: global.c:536 global.c:581 global.c:620
#: global.c:549 global.c:599 global.c:643
#, fuzzy
msgid "Go To Line"
msgstr "Jdi na Øádku"
#: global.c:541
#: global.c:554
msgid "Next Word"
msgstr ""
#: global.c:542
#: global.c:555
#, fuzzy
msgid "Move forward one word"
msgstr "Pøesun o znak dopøedu"
#: global.c:545
#: global.c:558
msgid "Prev Word"
msgstr ""
#: global.c:546
#: global.c:559
#, fuzzy
msgid "Move backward one word"
msgstr "Pøesun o znak zpìt"
#: global.c:550
#: global.c:563
msgid "Find Other Bracket"
msgstr "Najdi závorku"
#: global.c:555
#: global.c:568
msgid "Previous File"
msgstr ""
#: global.c:558
#: global.c:571
#, fuzzy
msgid "Next File"
msgstr "Nový Soubor"
#: global.c:568 global.c:608 global.c:644 global.c:663 global.c:717
#: global.c:725 global.c:747 global.c:757 global.c:767 global.c:787
#: winio.c:1272
#: global.c:582 global.c:630 global.c:667 global.c:686 global.c:746
#: global.c:754 global.c:778 global.c:788 global.c:798 global.c:819
#: winio.c:1323
msgid "Cancel"
msgstr "Storno"
#: global.c:571 global.c:611 global.c:647 global.c:666
#: global.c:586 global.c:633 global.c:670 global.c:689
msgid "First Line"
msgstr "První Øádka"
#: global.c:575 global.c:614 global.c:650 global.c:669
#: global.c:591 global.c:636 global.c:673 global.c:692
msgid "Last Line"
msgstr "Poslední Øádka"
#: global.c:585 global.c:624
#: global.c:604 global.c:647
msgid "Case Sens"
msgstr "Case Sens"
#: global.c:588 global.c:627
#: global.c:608 global.c:650
#, fuzzy
msgid "Direction"
msgstr "Jdi na Øádku"
#: global.c:592 global.c:631
#: global.c:613 global.c:654
msgid "Regexp"
msgstr "Regexp"
#: global.c:597 global.c:635 global.c:654
#: global.c:619 global.c:658 global.c:677
msgid "History"
msgstr ""
#: global.c:617
#: global.c:640
#, fuzzy
msgid "No Replace"
msgstr "Bez zámìny"
#: global.c:694 global.c:729
#: global.c:718 global.c:758
#, fuzzy
msgid "To Files"
msgstr "K Souborùm"
#: global.c:699
#: global.c:724
msgid "DOS Format"
msgstr ""
#: global.c:702
#: global.c:728
msgid "Mac Format"
msgstr ""
#: global.c:706
#: global.c:733
#, fuzzy
msgid "Append"
msgstr "Pøidat"
#: global.c:709
#: global.c:737
#, fuzzy
msgid "Prepend"
msgstr "Pøidat"
#: global.c:713
#: global.c:742
#, fuzzy
msgid "Backup File"
msgstr "Backspace"
#: global.c:733
#: global.c:763
msgid "Execute Command"
msgstr ""
#: global.c:736 winio.c:545
#: global.c:767 winio.c:596
msgid "New Buffer"
msgstr "Nový Buffer"
#: global.c:778
#: global.c:810
#, fuzzy
msgid "Go To Dir"
msgstr "Jdi do adresáøe"
@@ -1262,16 +1228,6 @@ msgstr "Nemou vyvolat program \"ispell\""
msgid "Could not fork"
msgstr "Nemou vyvolat program \"ispell\""
#: nano.c:1032
#, c-format
msgid "current->data now = \"%s\"\n"
msgstr "current->data nyní = \"%s\"\n"
#: nano.c:1092
#, c-format
msgid "After, data = \"%s\"\n"
msgstr "Poté, data = \"%s\"\n"
#: nano.c:1365
msgid "Mark Set"
msgstr "Znaèka Nastavena"
@@ -1398,48 +1354,6 @@ msgstr "zak
msgid "Tab size is too small for nano...\n"
msgstr "Okno je moc malé pro Nano..."
#: nano.c:3384
msgid "Main: set up windows\n"
msgstr "Main: nastav okna\n"
#: nano.c:3398
msgid "Main: bottom win\n"
msgstr "Main: spodní okno\n"
#: nano.c:3404
msgid "Main: open file\n"
msgstr "Main: otevøi soubor\n"
#: nano.c:3461
#, fuzzy, c-format
msgid "AHA! %c (%d)\n"
msgstr "Aha! '%c' (%d)\n"
#: nano.c:3481
#, fuzzy, c-format
msgid "I got Alt-O-%c! (%d)\n"
msgstr "Mám Alt-O-%c! (%d)\n"
#: nano.c:3508
#, fuzzy, c-format
msgid "I got Alt-[-1-%c! (%d)\n"
msgstr "Mám Alt-[-1-%c! (%d)\n"
#: nano.c:3538
#, fuzzy, c-format
msgid "I got Alt-[-2-%c! (%d)\n"
msgstr "Mám Alt-[-2-%c! (%d)\n"
#: nano.c:3607
#, c-format
msgid "I got Alt-[-%c! (%d)\n"
msgstr "Mám Alt-[-%c! (%d)\n"
#: nano.c:3653
#, c-format
msgid "I got Alt-%c! (%d)\n"
msgstr "Mám Alt-%c! (%d)\n"
#: nano.c:3711
msgid "XOFF ignored, mumble mumble."
msgstr ""
@@ -1448,11 +1362,6 @@ msgstr ""
msgid "XON ignored, mumble mumble."
msgstr ""
#: nano.c:3752
#, fuzzy, c-format
msgid "I got %c (%d)!\n"
msgstr "Mám Alt-%c! (%d)\n"
#: rcfile.c:103
#, c-format
msgid "Error in %s on line %d: "
@@ -1498,14 +1407,6 @@ msgstr "regex
msgid "Missing syntax name"
msgstr "Chybìjící jméno barvy"
#: rcfile.c:298
msgid "Adding new syntax after 1st\n"
msgstr ""
#: rcfile.c:306
msgid "Starting a new syntax type\n"
msgstr ""
#: rcfile.c:352
msgid "Missing color name"
msgstr "Chybìjící jméno barvy"
@@ -1514,16 +1415,6 @@ msgstr "Chyb
msgid "Cannot add a color directive without a syntax line"
msgstr ""
#: rcfile.c:420
#, c-format
msgid "Starting a new colorstring for fg %d bg %d\n"
msgstr ""
#: rcfile.c:428
#, c-format
msgid "Adding new entry for fg %d bg %d\n"
msgstr ""
#: rcfile.c:437
#, fuzzy
msgid "\"start=\" requires a corresponding \"end=\""
@@ -1531,21 +1422,11 @@ msgstr ""
"\n"
"\t\"start=\" musí mít korespondující \"end=\""
#: rcfile.c:486
#, fuzzy, c-format
msgid "%s: Read a comment\n"
msgstr "parse_rcfile: Èíst komentáø\n"
#: rcfile.c:509
#, c-format
msgid "command %s not understood"
msgstr "pøíkazu %s nebylo porozumìno"
#: rcfile.c:521
#, fuzzy, c-format
msgid "%s: Parsing option %s\n"
msgstr "parse_rcfile: Volba parsování %s\n"
#: rcfile.c:541
#, c-format
msgid "option %s requires an argument"
@@ -1561,16 +1442,6 @@ msgstr "
msgid "requested tab size %d invalid"
msgstr "¾ádaná velikost tab %d je moc malá"
#: rcfile.c:598
#, c-format
msgid "set flag %d!\n"
msgstr "nastav vlajku %d!\n"
#: rcfile.c:604
#, c-format
msgid "unset flag %d!\n"
msgstr "zru¹ vlajku %d!\n"
#: rcfile.c:614
msgid "Errors found in .nanorc file"
msgstr "Nalezeny chyby v souboru .nanorc"
@@ -1672,141 +1543,207 @@ msgstr "Nen
msgid "No matching bracket"
msgstr "Není korespondující závorka"
#: utils.c:225 utils.c:235
#: utils.c:257 utils.c:267
#, fuzzy
msgid "nano is out of memory!"
msgstr "nano: malloc: nedostatek pamìti!"
#: winio.c:90
#, fuzzy, c-format
msgid "actual_x for xplus=%d returns %d\n"
msgstr "actual_x_from_start pro xplus=%d vrátilo %d\n"
#: winio.c:245 winio.c:473
#, fuzzy, c-format
msgid "Aha! '%c' (%d)\n"
msgstr "Aha! '%c' (%d)\n"
#: winio.c:496
#, c-format
msgid "input '%c' (%d)\n"
msgstr "vstup '%c' (%d)\n"
#: winio.c:549
#: winio.c:600
msgid " File: ..."
msgstr " Soubor: ..."
#: winio.c:551
#: winio.c:602
#, fuzzy
msgid " DIR: ..."
msgstr " Adresáø: ..."
#: winio.c:556
#: winio.c:607
#, fuzzy
msgid "File: "
msgstr "Soubor: ..."
#: winio.c:559
#: winio.c:610
#, fuzzy
msgid " DIR: "
msgstr " Adresáø: ..."
#: winio.c:564
#: winio.c:615
#, fuzzy
msgid " Modified "
msgstr "Zmìnìn"
#: winio.c:566
#: winio.c:617
msgid " View "
msgstr ""
#: winio.c:752
#: winio.c:803
msgid "Refusing 0 length regex match"
msgstr ""
#: winio.c:1064
#, c-format
msgid "Moved to (%d, %d) in edit buffer\n"
msgstr "Pøesunut na (%d, %d) v editovacím bufferu\n"
#: winio.c:1215
#, c-format
msgid "I got \"%s\"\n"
msgstr "Mám \"%s\"\n"
#: winio.c:1246
#: winio.c:1297
msgid "Yy"
msgstr "Aa"
#: winio.c:1247
#: winio.c:1298
msgid "Nn"
msgstr "Nn"
#: winio.c:1248
#: winio.c:1299
msgid "Aa"
msgstr "Vv"
#: winio.c:1259
#: winio.c:1310
msgid "Yes"
msgstr "Ano"
#: winio.c:1264
#: winio.c:1315
msgid "All"
msgstr "V¹e"
#: winio.c:1269
#: winio.c:1320
msgid "No"
msgstr "Ne"
#: winio.c:1448
#: winio.c:1499
#, fuzzy, c-format
msgid "line %ld/%ld (%d%%), col %lu/%lu (%d%%), char %lu/%ld (%d%%)"
msgstr "øádka %d z %d (%.0f%%), znak %ld z %ld (%.0f%%)"
#: winio.c:1704
msgid "Dumping file buffer to stderr...\n"
msgstr "Vyhazuji souborový buffer od stderr...\n"
#: winio.c:1706
msgid "Dumping cutbuffer to stderr...\n"
msgstr "Vyhazuji cutbuffer do stderr...\n"
#: winio.c:1708
msgid "Dumping a buffer to stderr...\n"
msgstr "Vyhazuji buffer do stderr...\n"
#: winio.c:1789
#: winio.c:1838
msgid "The nano text editor"
msgstr "Nano texotvý editor"
#: winio.c:1790
#: winio.c:1839
msgid "version "
msgstr "verze "
#: winio.c:1791
#: winio.c:1840
msgid "Brought to you by:"
msgstr "Pøinesen k Vám od:"
#: winio.c:1792
#: winio.c:1841
msgid "Special thanks to:"
msgstr "Speciální díky:"
#: winio.c:1793
#: winio.c:1842
msgid "The Free Software Foundation"
msgstr "The Free Software Foundation"
#: winio.c:1794
#: winio.c:1843
msgid "For ncurses:"
msgstr ""
#: winio.c:1795
#: winio.c:1844
msgid "and anyone else we forgot..."
msgstr "a komukoliv na koho jsme zapomìli..."
#: winio.c:1796
#: winio.c:1845
msgid "Thank you for using nano!\n"
msgstr "Dìkuji za u¾ívání nano!\n"
#, fuzzy
#~ msgid "add_to_cutbuffer() called with inptr->data = %s\n"
#~ msgstr "add_to_cutbuffer voláno s inptr->data = %s\n"
#~ msgid "Blew away cutbuffer =)\n"
#~ msgstr "Blew away cutbuffer =)\n"
#, fuzzy
#~ msgid "filename is %s\n"
#~ msgstr "jméno souboru je %s"
#, fuzzy
#~ msgid "%s: free'd a node, YAY!\n"
#~ msgstr "delete_node(): uzel uvolnìn, YAY!\n"
#, fuzzy
#~ msgid "%s: free'd last node.\n"
#~ msgstr "delete_node(): poslední uzel uvolnìn.\n"
#~ msgid "Wrote >%s\n"
#~ msgstr "Zapsáno >%s\n"
#~ msgid "current->data now = \"%s\"\n"
#~ msgstr "current->data nyní = \"%s\"\n"
#~ msgid "After, data = \"%s\"\n"
#~ msgstr "Poté, data = \"%s\"\n"
#~ msgid "Main: set up windows\n"
#~ msgstr "Main: nastav okna\n"
#~ msgid "Main: bottom win\n"
#~ msgstr "Main: spodní okno\n"
#~ msgid "Main: open file\n"
#~ msgstr "Main: otevøi soubor\n"
#, fuzzy
#~ msgid "AHA! %c (%d)\n"
#~ msgstr "Aha! '%c' (%d)\n"
#, fuzzy
#~ msgid "I got Alt-O-%c! (%d)\n"
#~ msgstr "Mám Alt-O-%c! (%d)\n"
#, fuzzy
#~ msgid "I got Alt-[-1-%c! (%d)\n"
#~ msgstr "Mám Alt-[-1-%c! (%d)\n"
#, fuzzy
#~ msgid "I got Alt-[-2-%c! (%d)\n"
#~ msgstr "Mám Alt-[-2-%c! (%d)\n"
#~ msgid "I got Alt-[-%c! (%d)\n"
#~ msgstr "Mám Alt-[-%c! (%d)\n"
#~ msgid "I got Alt-%c! (%d)\n"
#~ msgstr "Mám Alt-%c! (%d)\n"
#, fuzzy
#~ msgid "I got %c (%d)!\n"
#~ msgstr "Mám Alt-%c! (%d)\n"
#, fuzzy
#~ msgid "%s: Read a comment\n"
#~ msgstr "parse_rcfile: Èíst komentáø\n"
#, fuzzy
#~ msgid "%s: Parsing option %s\n"
#~ msgstr "parse_rcfile: Volba parsování %s\n"
#~ msgid "set flag %d!\n"
#~ msgstr "nastav vlajku %d!\n"
#~ msgid "unset flag %d!\n"
#~ msgstr "zru¹ vlajku %d!\n"
#, fuzzy
#~ msgid "actual_x for xplus=%d returns %d\n"
#~ msgstr "actual_x_from_start pro xplus=%d vrátilo %d\n"
#, fuzzy
#~ msgid "Aha! '%c' (%d)\n"
#~ msgstr "Aha! '%c' (%d)\n"
#~ msgid "input '%c' (%d)\n"
#~ msgstr "vstup '%c' (%d)\n"
#~ msgid "Moved to (%d, %d) in edit buffer\n"
#~ msgstr "Pøesunut na (%d, %d) v editovacím bufferu\n"
#~ msgid "I got \"%s\"\n"
#~ msgstr "Mám \"%s\"\n"
#~ msgid "Dumping file buffer to stderr...\n"
#~ msgstr "Vyhazuji souborový buffer od stderr...\n"
#~ msgid "Dumping cutbuffer to stderr...\n"
#~ msgstr "Vyhazuji cutbuffer do stderr...\n"
#~ msgid "Dumping a buffer to stderr...\n"
#~ msgstr "Vyhazuji buffer do stderr...\n"
#~ msgid "Can't visit parent in restricted mode"
#~ msgstr "Nemohu nav¹tívit rodièe v omezeném re¾imu"

439
po/da.po
View File

@@ -5,7 +5,8 @@
msgid ""
msgstr ""
"Project-Id-Version: nano 1.2.0\n"
"POT-Creation-Date: 2003-04-19 23:02-0400\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2003-08-11 21:49-0400\n"
"PO-Revision-Date: 2003-03-08 22:27+0100\n"
"Last-Translator: Keld Simonsen <keld@dkuug.dk>\n"
"Language-Team: Danish <dansk@klid.dk>\n"
@@ -14,15 +15,6 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: cut.c:49
#, c-format
msgid "add_to_cutbuffer() called with inptr->data = %s\n"
msgstr "add_to_cutbuffer() kaldt med inptr->data = %s\n"
#: cut.c:213
msgid "Blew away cutbuffer =)\n"
msgstr "Sprængte udklipsbufferen =)\n"
#: files.c:317
#, c-format
msgid "Read %d line (Converted from Mac format)"
@@ -85,12 +77,6 @@ msgstr "Fil at inds
msgid "File to insert [from ./] "
msgstr "Fil at indsætte [fra ./] "
#: files.c:479 files.c:736 files.c:793 files.c:881 files.c:893 files.c:944
#: files.c:955 files.c:1815
#, c-format
msgid "filename is %s\n"
msgstr "filnavnet er %s\n"
#: files.c:495
msgid "Command to execute"
msgstr "Kommando der skal udføres"
@@ -108,16 +94,6 @@ msgstr "Kan ikke inds
msgid "Key illegal in non-multibuffer mode"
msgstr "Tasten ugyldig i ikke-multibuffer-tilstand"
#: files.c:704 nano.c:565
#, c-format
msgid "%s: free'd a node, YAY!\n"
msgstr "%s: frigjorde en knude, JUBII!\n"
#: files.c:709 nano.c:570
#, c-format
msgid "%s: free'd last node.\n"
msgstr "%s: frigjorde sidste knude.\n"
#: files.c:873 files.c:936
msgid "No more open files"
msgstr "Ikke flere åbne filer"
@@ -142,11 +118,6 @@ msgstr "Kunde ikke
msgid "Couldn't write backup: %s"
msgstr "Kunne ikke skrive sikkerhedskopi: %s"
#: files.c:1401
#, c-format
msgid "Backing up %s to %s\n"
msgstr "Sikkerhedskopierer %s til %s\n"
#: files.c:1413
#, c-format
msgid "Could not set permissions %o on backup %s: %s"
@@ -168,11 +139,6 @@ msgstr "Kunne ikke s
msgid "Could not open file for writing: %s"
msgstr "Kunne ikke åbne filen for skrivning: %s"
#: files.c:1516
#, c-format
msgid "Wrote >%s\n"
msgstr "Skrev >%s\n"
#: files.c:1572
#, c-format
msgid "Could not close %s: %s"
@@ -526,215 +492,215 @@ msgid "Toggle insert into new buffer"
msgstr "Skift mellem indsætning i ny buffer eller ej"
# kontrollér at den finns
#: global.c:418 global.c:565 global.c:605 global.c:641 global.c:660
#: global.c:690 global.c:722 global.c:744 global.c:754 global.c:764
#: global.c:784
#: global.c:418 global.c:578 global.c:627 global.c:664 global.c:683
#: global.c:713 global.c:751 global.c:775 global.c:785 global.c:795
#: global.c:816
msgid "Get Help"
msgstr "Få hjælp"
#: global.c:424
#: global.c:425
msgid "Close"
msgstr "Luk"
#: global.c:430 global.c:683
#: global.c:432 global.c:706
msgid "Exit"
msgstr "Afslut"
#: global.c:434
#: global.c:437
msgid "WriteOut"
msgstr "Gem"
#: global.c:438
#: global.c:442
msgid "Justify"
msgstr "Ombryd"
#: global.c:443
#: global.c:448
msgid "Read File"
msgstr "Læs fil"
#: global.c:452
#: global.c:458
msgid "Where Is"
msgstr "Hvor findes"
#: global.c:456 global.c:675 global.c:770
#: global.c:463 global.c:698 global.c:801
msgid "Prev Page"
msgstr "Forrige"
#: global.c:460 global.c:679 global.c:774
#: global.c:468 global.c:702 global.c:805
msgid "Next Page"
msgstr "Næste"
#: global.c:464
#: global.c:473
msgid "Cut Text"
msgstr "Klip ud"
#: global.c:469
#: global.c:479
msgid "UnJustify"
msgstr "Ingen ombrydning"
#: global.c:473
#: global.c:484
msgid "UnCut Txt"
msgstr "Ingen udklipning"
#: global.c:477
#: global.c:489
msgid "Cur Pos"
msgstr "Akt. pos"
#: global.c:481
#: global.c:494
msgid "To Spell"
msgstr "Stavekontr."
#: global.c:485 nano.c:420 winio.c:604
#: global.c:498 nano.c:420 winio.c:655
msgid "Up"
msgstr "Op"
#: global.c:489
#: global.c:502
msgid "Down"
msgstr "Ned"
#: global.c:493
#: global.c:506
msgid "Forward"
msgstr "Fremad"
#: global.c:497
#: global.c:510
msgid "Back"
msgstr "Bagud"
#: global.c:501
#: global.c:514
msgid "Home"
msgstr "Hjem"
#: global.c:505
#: global.c:518
msgid "End"
msgstr "Slut"
#: global.c:509
#: global.c:522
msgid "Refresh"
msgstr "Opdatér"
#: global.c:513
#: global.c:526
msgid "Mark Text"
msgstr "Markér tekst"
#: global.c:517
#: global.c:530
msgid "Delete"
msgstr "Fjern"
#: global.c:521
#: global.c:534
msgid "Backspace"
msgstr "Slet baglæns"
#: global.c:525
#: global.c:538
msgid "Tab"
msgstr "Tabulator"
#: global.c:528 global.c:578
#: global.c:541 global.c:595
msgid "Replace"
msgstr "Erstat"
#: global.c:532
#: global.c:545
msgid "Enter"
msgstr "Enter"
#: global.c:536 global.c:581 global.c:620
#: global.c:549 global.c:599 global.c:643
msgid "Go To Line"
msgstr "Gå til linje"
#: global.c:541
#: global.c:554
msgid "Next Word"
msgstr "Næste ord"
#: global.c:542
#: global.c:555
msgid "Move forward one word"
msgstr "Gå et ord fremad"
#: global.c:545
#: global.c:558
msgid "Prev Word"
msgstr "Foregående ord"
#: global.c:546
#: global.c:559
msgid "Move backward one word"
msgstr "Gå et ord bagud"
#: global.c:550
#: global.c:563
msgid "Find Other Bracket"
msgstr "Find anden klamme"
#: global.c:555
#: global.c:568
msgid "Previous File"
msgstr "Foregående fil"
#: global.c:558
#: global.c:571
msgid "Next File"
msgstr "Næste fil"
#: global.c:568 global.c:608 global.c:644 global.c:663 global.c:717
#: global.c:725 global.c:747 global.c:757 global.c:767 global.c:787
#: winio.c:1272
#: global.c:582 global.c:630 global.c:667 global.c:686 global.c:746
#: global.c:754 global.c:778 global.c:788 global.c:798 global.c:819
#: winio.c:1323
msgid "Cancel"
msgstr "Annullér"
#: global.c:571 global.c:611 global.c:647 global.c:666
#: global.c:586 global.c:633 global.c:670 global.c:689
msgid "First Line"
msgstr "Første linje"
#: global.c:575 global.c:614 global.c:650 global.c:669
#: global.c:591 global.c:636 global.c:673 global.c:692
msgid "Last Line"
msgstr "Sidste linje"
#: global.c:585 global.c:624
#: global.c:604 global.c:647
msgid "Case Sens"
msgstr "Versalfølsom"
#: global.c:588 global.c:627
#: global.c:608 global.c:650
msgid "Direction"
msgstr "Retning"
#: global.c:592 global.c:631
#: global.c:613 global.c:654
msgid "Regexp"
msgstr "Regudtr"
#: global.c:597 global.c:635 global.c:654
#: global.c:619 global.c:658 global.c:677
msgid "History"
msgstr "Historik"
#: global.c:617
#: global.c:640
msgid "No Replace"
msgstr "Ingen erstatning"
#: global.c:694 global.c:729
#: global.c:718 global.c:758
msgid "To Files"
msgstr "Til filer"
#: global.c:699
#: global.c:724
msgid "DOS Format"
msgstr "DOS-format"
#: global.c:702
#: global.c:728
msgid "Mac Format"
msgstr "Mac-format"
#: global.c:706
#: global.c:733
msgid "Append"
msgstr "Tilføj ved enden"
#: global.c:709
#: global.c:737
msgid "Prepend"
msgstr "Tilføj ved begyndelsen"
#: global.c:713
#: global.c:742
msgid "Backup File"
msgstr "Sikkerhedskopiér fil"
#: global.c:733
#: global.c:763
msgid "Execute Command"
msgstr "Udfør kommando"
#: global.c:736 winio.c:545
#: global.c:767 winio.c:596
msgid "New Buffer"
msgstr "Ny buffer"
#: global.c:778
#: global.c:810
msgid "Go To Dir"
msgstr "Gå til katalog"
@@ -1234,16 +1200,6 @@ msgstr "Kunne ikke overf
msgid "Could not fork"
msgstr "Kunne ikke forgrene"
#: nano.c:1032
#, c-format
msgid "current->data now = \"%s\"\n"
msgstr "current->data nu = \"%s\"\n"
#: nano.c:1092
#, c-format
msgid "After, data = \"%s\"\n"
msgstr "Efter, data = \"%s\"\n"
#: nano.c:1365
msgid "Mark Set"
msgstr "Markering sat"
@@ -1364,49 +1320,6 @@ msgstr "deaktiveret"
msgid "Tab size is too small for nano...\n"
msgstr "Tabulatorstørrelsen er for lille til Nano...\n"
#: nano.c:3384
msgid "Main: set up windows\n"
msgstr "Main: konfigurér vindue\n"
#: nano.c:3398
msgid "Main: bottom win\n"
msgstr "Main: bundvindue\n"
#: nano.c:3404
msgid "Main: open file\n"
msgstr "Main: åbn fil\n"
# Osæker.
#: nano.c:3461
#, c-format
msgid "AHA! %c (%d)\n"
msgstr "Aha! '%c' (%d)\n"
#: nano.c:3481
#, c-format
msgid "I got Alt-O-%c! (%d)\n"
msgstr "Jeg modtog Alt-O-%c! (%d)\n"
#: nano.c:3508
#, c-format
msgid "I got Alt-[-1-%c! (%d)\n"
msgstr "Jeg modtog Alt-[-1-%c! (%d)\n"
#: nano.c:3538
#, c-format
msgid "I got Alt-[-2-%c! (%d)\n"
msgstr "Jeg modtog Alt-[-2-%c! (%d)\n"
#: nano.c:3607
#, c-format
msgid "I got Alt-[-%c! (%d)\n"
msgstr "Jeg modtog Alt-[-%c! (%d)\n"
#: nano.c:3653
#, c-format
msgid "I got Alt-%c! (%d)\n"
msgstr "Jeg modtog Alt-%c! (%d)\n"
#: nano.c:3711
msgid "XOFF ignored, mumble mumble."
msgstr "XOFF ignoreret, mumle mumle."
@@ -1415,11 +1328,6 @@ msgstr "XOFF ignoreret, mumle mumle."
msgid "XON ignored, mumble mumble."
msgstr "XON ignoreret, mumle mumle."
#: nano.c:3752
#, c-format
msgid "I got %c (%d)!\n"
msgstr "Jeg modtog %c (%d)!\n"
#: rcfile.c:103
#, c-format
msgid "Error in %s on line %d: "
@@ -1464,14 +1372,6 @@ msgstr "regex-strenge skal begynde og ende med et \" tegn\n"
msgid "Missing syntax name"
msgstr "Mangler syntaksnavn"
#: rcfile.c:298
msgid "Adding new syntax after 1st\n"
msgstr "Tilføjer ny syntaks efter første\n"
#: rcfile.c:306
msgid "Starting a new syntax type\n"
msgstr "Starter en ny syntakstype\n"
#: rcfile.c:352
msgid "Missing color name"
msgstr "Mangler farvenavn"
@@ -1480,35 +1380,15 @@ msgstr "Mangler farvenavn"
msgid "Cannot add a color directive without a syntax line"
msgstr "Kan ikke tilføje farveordre uden en syntakslinje"
#: rcfile.c:420
#, c-format
msgid "Starting a new colorstring for fg %d bg %d\n"
msgstr "Starter en ny farvestreng for fg %d bg %d\n"
#: rcfile.c:428
#, c-format
msgid "Adding new entry for fg %d bg %d\n"
msgstr "Tilføjer ny indgang for fg %d bg %d\n"
#: rcfile.c:437
msgid "\"start=\" requires a corresponding \"end=\""
msgstr "\"start=\" kræver et tilsvarende \"end=\""
#: rcfile.c:486
#, c-format
msgid "%s: Read a comment\n"
msgstr "%s: Læs en kommentar\n"
#: rcfile.c:509
#, c-format
msgid "command %s not understood"
msgstr "kommando %s ikke forstået"
#: rcfile.c:521
#, c-format
msgid "%s: Parsing option %s\n"
msgstr "%s: Fortolker valgmulighed %s\n"
#: rcfile.c:541
#, c-format
msgid "option %s requires an argument"
@@ -1524,16 +1404,6 @@ msgstr "
msgid "requested tab size %d invalid"
msgstr "ønsket tab-størrelse %d ugyldig"
#: rcfile.c:598
#, c-format
msgid "set flag %d!\n"
msgstr "sæt flag %d!\n"
#: rcfile.c:604
#, c-format
msgid "unset flag %d!\n"
msgstr "fjern flag %d!\n"
#: rcfile.c:614
msgid "Errors found in .nanorc file"
msgstr "Fejl fundet i .nanorc-fil"
@@ -1632,138 +1502,207 @@ msgstr "Ikke en klamme"
msgid "No matching bracket"
msgstr "Ingen tilsvarende klamme"
#: utils.c:225 utils.c:235
#: utils.c:257 utils.c:267
msgid "nano is out of memory!"
msgstr "nano har ikke mere hukommelse!"
#: winio.c:90
#, c-format
msgid "actual_x for xplus=%d returns %d\n"
msgstr "actual_x for xplus=%d returnerede %d\n"
# Osæker.
#: winio.c:245 winio.c:473
#, c-format
msgid "Aha! '%c' (%d)\n"
msgstr "Aha! '%c' (%d)\n"
# Osæker.
#: winio.c:496
#, c-format
msgid "input '%c' (%d)\n"
msgstr "inddata \"%c\" (%d)\n"
#: winio.c:549
#: winio.c:600
msgid " File: ..."
msgstr " Fil:..."
#: winio.c:551
#: winio.c:602
msgid " DIR: ..."
msgstr " KAT:..."
#: winio.c:556
#: winio.c:607
msgid "File: "
msgstr "Fil: "
#: winio.c:559
#: winio.c:610
msgid " DIR: "
msgstr " KAT:"
#: winio.c:564
#: winio.c:615
msgid " Modified "
msgstr " Ændret "
#: winio.c:566
#: winio.c:617
msgid " View "
msgstr " Se "
#: winio.c:752
#: winio.c:803
msgid "Refusing 0 length regex match"
msgstr "Afviser regex-træffer med længen 0"
#: winio.c:1064
#, c-format
msgid "Moved to (%d, %d) in edit buffer\n"
msgstr "Gik til (%d, %d) i redigeringsbufferen\n"
#: winio.c:1215
#, c-format
msgid "I got \"%s\"\n"
msgstr "Jeg modtog \"%s\"\n"
#: winio.c:1246
#: winio.c:1297
msgid "Yy"
msgstr "JjYy"
#: winio.c:1247
#: winio.c:1298
msgid "Nn"
msgstr "Nn"
#: winio.c:1248
#: winio.c:1299
msgid "Aa"
msgstr "Aa"
#: winio.c:1259
#: winio.c:1310
msgid "Yes"
msgstr "Ja"
#: winio.c:1264
#: winio.c:1315
msgid "All"
msgstr "Alle"
#: winio.c:1269
#: winio.c:1320
msgid "No"
msgstr "Nej"
#: winio.c:1448
#: winio.c:1499
#, c-format
msgid "line %ld/%ld (%d%%), col %lu/%lu (%d%%), char %lu/%ld (%d%%)"
msgstr "linje %ld/%ld (%d%%), kol %lu/%lu (%d%%), tegn %lu/%ld (%d%%)"
#: winio.c:1704
msgid "Dumping file buffer to stderr...\n"
msgstr "Dumper filbufferen til standard fejl...\n"
#: winio.c:1706
msgid "Dumping cutbuffer to stderr...\n"
msgstr "Dumper udklipsbufferen til standard fejl...\n"
#: winio.c:1708
msgid "Dumping a buffer to stderr...\n"
msgstr "Dumper en buffer til standard fejl...\n"
#: winio.c:1789
#: winio.c:1838
msgid "The nano text editor"
msgstr "Tekstredigereren nano"
#: winio.c:1790
#: winio.c:1839
msgid "version "
msgstr "version "
#: winio.c:1791
#: winio.c:1840
msgid "Brought to you by:"
msgstr "Præsenteres af:"
#: winio.c:1792
#: winio.c:1841
msgid "Special thanks to:"
msgstr "Særlig tak til:"
#: winio.c:1793
#: winio.c:1842
msgid "The Free Software Foundation"
msgstr "Free Software Foundation"
#: winio.c:1794
#: winio.c:1843
msgid "For ncurses:"
msgstr "For ncurses:"
#: winio.c:1795
#: winio.c:1844
msgid "and anyone else we forgot..."
msgstr "og alle andre som vi har glemt..."
#: winio.c:1796
#: winio.c:1845
msgid "Thank you for using nano!\n"
msgstr "Tak for at du bruger nano!\n"
#~ msgid "add_to_cutbuffer() called with inptr->data = %s\n"
#~ msgstr "add_to_cutbuffer() kaldt med inptr->data = %s\n"
#~ msgid "Blew away cutbuffer =)\n"
#~ msgstr "Sprængte udklipsbufferen =)\n"
#~ msgid "filename is %s\n"
#~ msgstr "filnavnet er %s\n"
#~ msgid "%s: free'd a node, YAY!\n"
#~ msgstr "%s: frigjorde en knude, JUBII!\n"
#~ msgid "%s: free'd last node.\n"
#~ msgstr "%s: frigjorde sidste knude.\n"
#~ msgid "Backing up %s to %s\n"
#~ msgstr "Sikkerhedskopierer %s til %s\n"
#~ msgid "Wrote >%s\n"
#~ msgstr "Skrev >%s\n"
#~ msgid "current->data now = \"%s\"\n"
#~ msgstr "current->data nu = \"%s\"\n"
#~ msgid "After, data = \"%s\"\n"
#~ msgstr "Efter, data = \"%s\"\n"
#~ msgid "Main: set up windows\n"
#~ msgstr "Main: konfigurér vindue\n"
#~ msgid "Main: bottom win\n"
#~ msgstr "Main: bundvindue\n"
#~ msgid "Main: open file\n"
#~ msgstr "Main: åbn fil\n"
# Osæker.
#~ msgid "AHA! %c (%d)\n"
#~ msgstr "Aha! '%c' (%d)\n"
#~ msgid "I got Alt-O-%c! (%d)\n"
#~ msgstr "Jeg modtog Alt-O-%c! (%d)\n"
#~ msgid "I got Alt-[-1-%c! (%d)\n"
#~ msgstr "Jeg modtog Alt-[-1-%c! (%d)\n"
#~ msgid "I got Alt-[-2-%c! (%d)\n"
#~ msgstr "Jeg modtog Alt-[-2-%c! (%d)\n"
#~ msgid "I got Alt-[-%c! (%d)\n"
#~ msgstr "Jeg modtog Alt-[-%c! (%d)\n"
#~ msgid "I got Alt-%c! (%d)\n"
#~ msgstr "Jeg modtog Alt-%c! (%d)\n"
#~ msgid "I got %c (%d)!\n"
#~ msgstr "Jeg modtog %c (%d)!\n"
#~ msgid "Adding new syntax after 1st\n"
#~ msgstr "Tilføjer ny syntaks efter første\n"
#~ msgid "Starting a new syntax type\n"
#~ msgstr "Starter en ny syntakstype\n"
#~ msgid "Starting a new colorstring for fg %d bg %d\n"
#~ msgstr "Starter en ny farvestreng for fg %d bg %d\n"
#~ msgid "Adding new entry for fg %d bg %d\n"
#~ msgstr "Tilføjer ny indgang for fg %d bg %d\n"
#~ msgid "%s: Read a comment\n"
#~ msgstr "%s: Læs en kommentar\n"
#~ msgid "%s: Parsing option %s\n"
#~ msgstr "%s: Fortolker valgmulighed %s\n"
#~ msgid "set flag %d!\n"
#~ msgstr "sæt flag %d!\n"
#~ msgid "unset flag %d!\n"
#~ msgstr "fjern flag %d!\n"
#~ msgid "actual_x for xplus=%d returns %d\n"
#~ msgstr "actual_x for xplus=%d returnerede %d\n"
# Osæker.
#~ msgid "Aha! '%c' (%d)\n"
#~ msgstr "Aha! '%c' (%d)\n"
# Osæker.
#~ msgid "input '%c' (%d)\n"
#~ msgstr "inddata \"%c\" (%d)\n"
#~ msgid "Moved to (%d, %d) in edit buffer\n"
#~ msgstr "Gik til (%d, %d) i redigeringsbufferen\n"
#~ msgid "I got \"%s\"\n"
#~ msgstr "Jeg modtog \"%s\"\n"
#~ msgid "Dumping file buffer to stderr...\n"
#~ msgstr "Dumper filbufferen til standard fejl...\n"
#~ msgid "Dumping cutbuffer to stderr...\n"
#~ msgstr "Dumper udklipsbufferen til standard fejl...\n"
#~ msgid "Dumping a buffer to stderr...\n"
#~ msgstr "Dumper en buffer til standard fejl...\n"
#~ msgid "read_line: not on first line and prev is NULL"
#~ msgstr "read_line: ikke på første linje og foregående er NULL"

2095
po/de.po

File diff suppressed because it is too large Load Diff

2349
po/es.po

File diff suppressed because it is too large Load Diff

2392
po/eu.po

File diff suppressed because it is too large Load Diff

437
po/fi.po
View File

@@ -7,7 +7,8 @@
msgid ""
msgstr ""
"Project-Id-Version: nano 1.1.99pre3\n"
"POT-Creation-Date: 2003-04-19 23:02-0400\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2003-08-11 21:49-0400\n"
"PO-Revision-Date: 2003-02-17 22:32+0200\n"
"Last-Translator: Kalle Olavi Niemitalo <kon@iki.fi>\n"
"Language-Team: Finnish <fi@li.org>\n"
@@ -16,15 +17,6 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
#: cut.c:49
#, c-format
msgid "add_to_cutbuffer() called with inptr->data = %s\n"
msgstr "add_to_cutbuffer() kutsuttu, inptr->data = %s\n"
#: cut.c:213
msgid "Blew away cutbuffer =)\n"
msgstr "Leiketila katosi =)\n"
#: files.c:317
#, c-format
msgid "Read %d line (Converted from Mac format)"
@@ -89,12 +81,6 @@ msgstr "Uuteen puskuriin lis
msgid "File to insert [from ./] "
msgstr "Lisättävä tiedosto [hakemistosta ./] "
#: files.c:479 files.c:736 files.c:793 files.c:881 files.c:893 files.c:944
#: files.c:955 files.c:1815
#, c-format
msgid "filename is %s\n"
msgstr "tiedoston nimi on %s\n"
#: files.c:495
msgid "Command to execute"
msgstr "Suoritettava komento"
@@ -114,16 +100,6 @@ msgstr "Ei voi lis
msgid "Key illegal in non-multibuffer mode"
msgstr "Virheellinen näppäin yhden puskurin tilassa"
#: files.c:704 nano.c:565
#, c-format
msgid "%s: free'd a node, YAY!\n"
msgstr "%s: solmu vapautettu, YAY!\n"
#: files.c:709 nano.c:570
#, c-format
msgid "%s: free'd last node.\n"
msgstr "%s: viimeinen solmu vapautettu.\n"
#: files.c:873 files.c:936
msgid "No more open files"
msgstr "Ei muita avoimia tiedostoja"
@@ -150,11 +126,6 @@ msgstr "Tiedostoa %s ei voitu lukea varmuuskopioitavaksi: %s"
msgid "Couldn't write backup: %s"
msgstr "Varmuuskopiota ei voitu kirjoittaa: %s"
#: files.c:1401
#, c-format
msgid "Backing up %s to %s\n"
msgstr "Kopioin tiedoston %s tiedostoksi %s\n"
# Allatiivi kuulostaa väärältä.
#: files.c:1413
#, c-format
@@ -194,11 +165,6 @@ msgstr "Varmuuskopion %s k
msgid "Could not open file for writing: %s"
msgstr "Tiedostoa ei voitu avata kirjoitettavaksi: %s"
#: files.c:1516
#, c-format
msgid "Wrote >%s\n"
msgstr "Kirjoitettu: >%s\n"
#: files.c:1572
#, c-format
msgid "Could not close %s: %s"
@@ -566,225 +532,225 @@ msgstr "Avaa seuraava ladattu tiedosto"
msgid "Toggle insert into new buffer"
msgstr "Vaihda lisätäänkö tiedosto samaan vai uuteen puskuriin"
#: global.c:418 global.c:565 global.c:605 global.c:641 global.c:660
#: global.c:690 global.c:722 global.c:744 global.c:754 global.c:764
#: global.c:784
#: global.c:418 global.c:578 global.c:627 global.c:664 global.c:683
#: global.c:713 global.c:751 global.c:775 global.c:785 global.c:795
#: global.c:816
msgid "Get Help"
msgstr "Ohjeita"
#: global.c:424
#: global.c:425
msgid "Close"
msgstr "Sulje"
#: global.c:430 global.c:683
#: global.c:432 global.c:706
msgid "Exit"
msgstr "Lopeta"
#: global.c:434
#: global.c:437
msgid "WriteOut"
msgstr "Kirjoita"
#: global.c:438
#: global.c:442
msgid "Justify"
msgstr "Tasaa"
#: global.c:443
#: global.c:448
msgid "Read File"
msgstr "Lue tied."
#: global.c:452
#: global.c:458
msgid "Where Is"
msgstr "Etsi"
#: global.c:456 global.c:675 global.c:770
#: global.c:463 global.c:698 global.c:801
msgid "Prev Page"
msgstr "Ed. sivu"
#: global.c:460 global.c:679 global.c:774
#: global.c:468 global.c:702 global.c:805
msgid "Next Page"
msgstr "Seur. sivu"
#: global.c:464
#: global.c:473
msgid "Cut Text"
msgstr "Leikkaa"
# 80 sarakkeen näytöllä mahtuu 10 merkkiä, mieluummin 9.
#: global.c:469
#: global.c:479
msgid "UnJustify"
msgstr "Epätasaa"
#: global.c:473
#: global.c:484
msgid "UnCut Txt"
msgstr "Liitä"
#: global.c:477
#: global.c:489
msgid "Cur Pos"
msgstr "Sijainti"
#: global.c:481
#: global.c:494
msgid "To Spell"
msgstr "Oikolue"
#: global.c:485 nano.c:420 winio.c:604
#: global.c:498 nano.c:420 winio.c:655
msgid "Up"
msgstr "Ylös"
#: global.c:489
#: global.c:502
msgid "Down"
msgstr "Alas"
#: global.c:493
#: global.c:506
msgid "Forward"
msgstr "Eteenpäin"
#: global.c:497
#: global.c:510
msgid "Back"
msgstr "Takaisin"
#: global.c:501
#: global.c:514
msgid "Home"
msgstr "Home"
#: global.c:505
#: global.c:518
msgid "End"
msgstr "End"
# "Päivitä"?
#: global.c:509
#: global.c:522
msgid "Refresh"
msgstr "Piirrä uudelleen"
#: global.c:513
#: global.c:526
msgid "Mark Text"
msgstr "Merkitse tekstiä"
#: global.c:517
#: global.c:530
msgid "Delete"
msgstr "Poista"
#: global.c:521
#: global.c:534
msgid "Backspace"
msgstr "Askelpalautin"
#: global.c:525
#: global.c:538
msgid "Tab"
msgstr "Sarkain"
#: global.c:528 global.c:578
#: global.c:541 global.c:595
msgid "Replace"
msgstr "Korvaa"
#: global.c:532
#: global.c:545
msgid "Enter"
msgstr "Enter"
# Tämä on "Etsi"-valikossa.
# 80 sarakkeen näytöllä mahtuu 13 merkkiä, mieluummin 12.
# Huomaa myös "Go To Line Help Text".
#: global.c:536 global.c:581 global.c:620
#: global.c:549 global.c:599 global.c:643
msgid "Go To Line"
msgstr "Rivinumero"
#: global.c:541
#: global.c:554
msgid "Next Word"
msgstr "Seuraava sana"
#: global.c:542
#: global.c:555
msgid "Move forward one word"
msgstr "Siirry yksi sana eteenpäin"
#: global.c:545
#: global.c:558
msgid "Prev Word"
msgstr "Edellinen sana"
#: global.c:546
#: global.c:559
msgid "Move backward one word"
msgstr "Siirry yksi sana taaksepäin"
#: global.c:550
#: global.c:563
msgid "Find Other Bracket"
msgstr "Etsi toinen sulje"
#: global.c:555
#: global.c:568
msgid "Previous File"
msgstr "Edellinen tiedosto"
#: global.c:558
#: global.c:571
msgid "Next File"
msgstr "Seuraava tiedosto"
#: global.c:568 global.c:608 global.c:644 global.c:663 global.c:717
#: global.c:725 global.c:747 global.c:757 global.c:767 global.c:787
#: winio.c:1272
#: global.c:582 global.c:630 global.c:667 global.c:686 global.c:746
#: global.c:754 global.c:778 global.c:788 global.c:798 global.c:819
#: winio.c:1323
msgid "Cancel"
msgstr "Peru"
#: global.c:571 global.c:611 global.c:647 global.c:666
#: global.c:586 global.c:633 global.c:670 global.c:689
msgid "First Line"
msgstr "1. rivi"
#: global.c:575 global.c:614 global.c:650 global.c:669
#: global.c:591 global.c:636 global.c:673 global.c:692
msgid "Last Line"
msgstr "Viim. rivi"
#: global.c:585 global.c:624
#: global.c:604 global.c:647
msgid "Case Sens"
msgstr "Kirj. koko"
#: global.c:588 global.c:627
#: global.c:608 global.c:650
msgid "Direction"
msgstr "Suunta"
# "Äiti, mikä on säännöke?" "Kai se joku pikku sääntö on."
#: global.c:592 global.c:631
#: global.c:613 global.c:654
msgid "Regexp"
msgstr "Säännöke"
# Tämä on Etsi-valikossa.
# 80 sarakkeen näytöllä mahtuu 11 merkkiä.
#: global.c:597 global.c:635 global.c:654
#: global.c:619 global.c:658 global.c:677
msgid "History"
msgstr "Historia"
#: global.c:617
#: global.c:640
msgid "No Replace"
msgstr "Älä korvaa"
# Tämä on Kirjoita tiedosto- ja Lisää tiedosto -valikoissa.
# 80 sarakkeen näytöllä mahtuu 17 merkkiä, mieluummin 16.
#: global.c:694 global.c:729
#: global.c:718 global.c:758
msgid "To Files"
msgstr "Tiedostoselain"
#: global.c:699
#: global.c:724
msgid "DOS Format"
msgstr "DOS-muoto"
#: global.c:702
#: global.c:728
msgid "Mac Format"
msgstr "Mac-muoto"
#: global.c:706
#: global.c:733
msgid "Append"
msgstr "Lisää loppuun"
#: global.c:709
#: global.c:737
msgid "Prepend"
msgstr "Lisää alkuun"
#: global.c:713
#: global.c:742
msgid "Backup File"
msgstr "Varmuuskopio"
#: global.c:733
#: global.c:763
msgid "Execute Command"
msgstr "Suorita komento"
#: global.c:736 winio.c:545
#: global.c:767 winio.c:596
msgid "New Buffer"
msgstr "Uusi teksti"
#: global.c:778
#: global.c:810
msgid "Go To Dir"
msgstr "Siirry hakemistoon"
@@ -1285,16 +1251,6 @@ msgstr "Ei voitu tehd
msgid "Could not fork"
msgstr "Ei voitu tehdä lapsiprosessia"
#: nano.c:1032
#, c-format
msgid "current->data now = \"%s\"\n"
msgstr "current->data nyt = \"%s\"\n"
#: nano.c:1092
#, c-format
msgid "After, data = \"%s\"\n"
msgstr "Jälkeenpäin data = \"%s\"\n"
#: nano.c:1365
msgid "Mark Set"
msgstr "Merkintä alkoi"
@@ -1416,48 +1372,6 @@ msgstr "ei k
msgid "Tab size is too small for nano...\n"
msgstr "Sarkaimen leveys on liian pieni Nanolle...\n"
#: nano.c:3384
msgid "Main: set up windows\n"
msgstr "Pääohjelma: ikkunoiden asettelu\n"
#: nano.c:3398
msgid "Main: bottom win\n"
msgstr "Pääohjelma: alaikkuna\n"
#: nano.c:3404
msgid "Main: open file\n"
msgstr "Pääohjelma: avaa tiedosto\n"
#: nano.c:3461
#, c-format
msgid "AHA! %c (%d)\n"
msgstr "Ahaa! %c (%d)\n"
#: nano.c:3481
#, c-format
msgid "I got Alt-O-%c! (%d)\n"
msgstr "Vastaanotettu Alt-O-%c! (%d)\n"
#: nano.c:3508
#, c-format
msgid "I got Alt-[-1-%c! (%d)\n"
msgstr "Vastaanotettu Alt-[-1-%c! (%d)\n"
#: nano.c:3538
#, c-format
msgid "I got Alt-[-2-%c! (%d)\n"
msgstr "Vastaanotettu Alt-[-2-%c! (%d)\n"
#: nano.c:3607
#, c-format
msgid "I got Alt-[-%c! (%d)\n"
msgstr "Vastaanotettu Alt-[-%c! (%d)\n"
#: nano.c:3653
#, c-format
msgid "I got Alt-%c! (%d)\n"
msgstr "Vastaanotettu Alt-%c! (%d)\n"
#: nano.c:3711
msgid "XOFF ignored, mumble mumble."
msgstr "XOFF:ia ei käytetä, mutinaa"
@@ -1466,11 +1380,6 @@ msgstr "XOFF:ia ei k
msgid "XON ignored, mumble mumble."
msgstr "XON:ia ei käytetä, mutinaa"
#: nano.c:3752
#, c-format
msgid "I got %c (%d)!\n"
msgstr "Vastaanotettu %c (%d)!\n"
#: rcfile.c:103
#, c-format
msgid "Error in %s on line %d: "
@@ -1515,14 +1424,6 @@ msgstr "s
msgid "Missing syntax name"
msgstr "Puuttuva syntaksin nimi"
#: rcfile.c:298
msgid "Adding new syntax after 1st\n"
msgstr "Lisään syntaksin ensimmäisen jälkeen\n"
#: rcfile.c:306
msgid "Starting a new syntax type\n"
msgstr "Aloitan uuden syntaksityypin\n"
#: rcfile.c:352
msgid "Missing color name"
msgstr "Puuttuva värin nimi"
@@ -1531,35 +1432,15 @@ msgstr "Puuttuva v
msgid "Cannot add a color directive without a syntax line"
msgstr "En voi lisätä väriohjetta ilman syntaksiriviä"
#: rcfile.c:420
#, c-format
msgid "Starting a new colorstring for fg %d bg %d\n"
msgstr "Aloitan uuden värimerkkijonon fg: %d bg: %d\n"
#: rcfile.c:428
#, c-format
msgid "Adding new entry for fg %d bg %d\n"
msgstr "Lisään uuden määrityksen fg: %d bg: %d\n"
#: rcfile.c:437
msgid "\"start=\" requires a corresponding \"end=\""
msgstr "\"start=\" vaatii vastaavan \"end=\":n"
#: rcfile.c:486
#, c-format
msgid "%s: Read a comment\n"
msgstr "%s: Luki kommentin\n"
#: rcfile.c:509
#, c-format
msgid "command %s not understood"
msgstr "tuntematon komento %s"
#: rcfile.c:521
#, c-format
msgid "%s: Parsing option %s\n"
msgstr "%s: Tulkitsee asetusta %s\n"
#: rcfile.c:541
#, c-format
msgid "option %s requires an argument"
@@ -1577,16 +1458,6 @@ msgstr "haluttu rivinpituus %d ei kelpaa"
msgid "requested tab size %d invalid"
msgstr "haluttu sarkaimen koko %d ei kelpaa"
#: rcfile.c:598
#, c-format
msgid "set flag %d!\n"
msgstr "asetti lipun %d!\n"
#: rcfile.c:604
#, c-format
msgid "unset flag %d!\n"
msgstr "poisti lipun %d!\n"
#: rcfile.c:614
msgid "Errors found in .nanorc file"
msgstr "Tiedostossa .nanorc oli virheitä"
@@ -1687,137 +1558,205 @@ msgstr "Ei ole suljemerkki"
msgid "No matching bracket"
msgstr "Ei vastaavaa suljetta"
#: utils.c:225 utils.c:235
#: utils.c:257 utils.c:267
msgid "nano is out of memory!"
msgstr "Nanolta loppui muisti!"
#: winio.c:90
#, c-format
msgid "actual_x for xplus=%d returns %d\n"
msgstr "actual_x parametrilla xplus=%d palauttaa %d\n"
#: winio.c:245 winio.c:473
#, c-format
msgid "Aha! '%c' (%d)\n"
msgstr "Ahaa! '%c' (%d)\n"
#: winio.c:496
#, c-format
msgid "input '%c' (%d)\n"
msgstr "syöte '%c' (%d)\n"
#: winio.c:549
#: winio.c:600
msgid " File: ..."
msgstr " Tiedosto: ..."
#: winio.c:551
#: winio.c:602
msgid " DIR: ..."
msgstr " HAKEMISTO: ..."
#: winio.c:556
#: winio.c:607
msgid "File: "
msgstr "Tiedosto: "
#: winio.c:559
#: winio.c:610
msgid " DIR: "
msgstr " HAKEMISTO: "
#: winio.c:564
#: winio.c:615
msgid " Modified "
msgstr " Muokattu "
#: winio.c:566
#: winio.c:617
msgid " View "
msgstr " Näkymä "
#: winio.c:752
#: winio.c:803
msgid "Refusing 0 length regex match"
msgstr "En hyväksy 0-pituista säännöllisen lausekkeen osumaa"
#: winio.c:1064
#, c-format
msgid "Moved to (%d, %d) in edit buffer\n"
msgstr "Kohtaan (%d,%d) siirrytty muokkausruudussa\n"
#: winio.c:1215
#, c-format
msgid "I got \"%s\"\n"
msgstr "Saatiin \"%s\"\n"
#: winio.c:1246
#: winio.c:1297
msgid "Yy"
msgstr "Kk"
msgstr "KkYy"
#: winio.c:1247
#: winio.c:1298
msgid "Nn"
msgstr "Ee"
msgstr "EeNn"
#: winio.c:1248
#: winio.c:1299
msgid "Aa"
msgstr "aA"
#: winio.c:1259
#: winio.c:1310
msgid "Yes"
msgstr "Kyllä"
#: winio.c:1264
#: winio.c:1315
msgid "All"
msgstr "Kaikki"
#: winio.c:1269
#: winio.c:1320
msgid "No"
msgstr "Ei"
#: winio.c:1448
#: winio.c:1499
#, c-format
msgid "line %ld/%ld (%d%%), col %lu/%lu (%d%%), char %lu/%ld (%d%%)"
msgstr "rivi %ld/%ld (%d%%), sarake %lu/%lu (%d%%), merkki %lu/%ld (%d%%)"
#: winio.c:1704
msgid "Dumping file buffer to stderr...\n"
msgstr "Syöttää tiedoston stderriin...\n"
#: winio.c:1706
msgid "Dumping cutbuffer to stderr...\n"
msgstr "Syöttää leiketilan stderriin...\n"
#: winio.c:1708
msgid "Dumping a buffer to stderr...\n"
msgstr "Syöttää tekstin stderriin...\n"
#: winio.c:1789
#: winio.c:1838
msgid "The nano text editor"
msgstr "Nano-editori"
#: winio.c:1790
#: winio.c:1839
msgid "version "
msgstr "versio "
#: winio.c:1791
#: winio.c:1840
msgid "Brought to you by:"
msgstr "Tehneet:"
#: winio.c:1792
#: winio.c:1841
msgid "Special thanks to:"
msgstr "Erikoiskiitokset:"
#: winio.c:1793
#: winio.c:1842
msgid "The Free Software Foundation"
msgstr "Free Software Foundation"
# Special thanks to: (nimiä) For ncurses: (nimiä)
#: winio.c:1794
#: winio.c:1843
msgid "For ncurses:"
msgstr "Ncursesista:"
#: winio.c:1795
#: winio.c:1844
msgid "and anyone else we forgot..."
msgstr "ja kaikille muille, jotka unohdimme..."
#: winio.c:1796
#: winio.c:1845
msgid "Thank you for using nano!\n"
msgstr "Kiitos Nanon käyttämisestä!\n"
#~ msgid "add_to_cutbuffer() called with inptr->data = %s\n"
#~ msgstr "add_to_cutbuffer() kutsuttu, inptr->data = %s\n"
#~ msgid "Blew away cutbuffer =)\n"
#~ msgstr "Leiketila katosi =)\n"
#~ msgid "filename is %s\n"
#~ msgstr "tiedoston nimi on %s\n"
#~ msgid "%s: free'd a node, YAY!\n"
#~ msgstr "%s: solmu vapautettu, YAY!\n"
#~ msgid "%s: free'd last node.\n"
#~ msgstr "%s: viimeinen solmu vapautettu.\n"
#~ msgid "Backing up %s to %s\n"
#~ msgstr "Kopioin tiedoston %s tiedostoksi %s\n"
#~ msgid "Wrote >%s\n"
#~ msgstr "Kirjoitettu: >%s\n"
#~ msgid "current->data now = \"%s\"\n"
#~ msgstr "current->data nyt = \"%s\"\n"
#~ msgid "After, data = \"%s\"\n"
#~ msgstr "Jälkeenpäin data = \"%s\"\n"
#~ msgid "Main: set up windows\n"
#~ msgstr "Pääohjelma: ikkunoiden asettelu\n"
#~ msgid "Main: bottom win\n"
#~ msgstr "Pääohjelma: alaikkuna\n"
#~ msgid "Main: open file\n"
#~ msgstr "Pääohjelma: avaa tiedosto\n"
#~ msgid "AHA! %c (%d)\n"
#~ msgstr "Ahaa! %c (%d)\n"
#~ msgid "I got Alt-O-%c! (%d)\n"
#~ msgstr "Vastaanotettu Alt-O-%c! (%d)\n"
#~ msgid "I got Alt-[-1-%c! (%d)\n"
#~ msgstr "Vastaanotettu Alt-[-1-%c! (%d)\n"
#~ msgid "I got Alt-[-2-%c! (%d)\n"
#~ msgstr "Vastaanotettu Alt-[-2-%c! (%d)\n"
#~ msgid "I got Alt-[-%c! (%d)\n"
#~ msgstr "Vastaanotettu Alt-[-%c! (%d)\n"
#~ msgid "I got Alt-%c! (%d)\n"
#~ msgstr "Vastaanotettu Alt-%c! (%d)\n"
#~ msgid "I got %c (%d)!\n"
#~ msgstr "Vastaanotettu %c (%d)!\n"
#~ msgid "Adding new syntax after 1st\n"
#~ msgstr "Lisään syntaksin ensimmäisen jälkeen\n"
#~ msgid "Starting a new syntax type\n"
#~ msgstr "Aloitan uuden syntaksityypin\n"
#~ msgid "Starting a new colorstring for fg %d bg %d\n"
#~ msgstr "Aloitan uuden värimerkkijonon fg: %d bg: %d\n"
#~ msgid "Adding new entry for fg %d bg %d\n"
#~ msgstr "Lisään uuden määrityksen fg: %d bg: %d\n"
#~ msgid "%s: Read a comment\n"
#~ msgstr "%s: Luki kommentin\n"
#~ msgid "%s: Parsing option %s\n"
#~ msgstr "%s: Tulkitsee asetusta %s\n"
#~ msgid "set flag %d!\n"
#~ msgstr "asetti lipun %d!\n"
#~ msgid "unset flag %d!\n"
#~ msgstr "poisti lipun %d!\n"
#~ msgid "actual_x for xplus=%d returns %d\n"
#~ msgstr "actual_x parametrilla xplus=%d palauttaa %d\n"
#~ msgid "Aha! '%c' (%d)\n"
#~ msgstr "Ahaa! '%c' (%d)\n"
#~ msgid "input '%c' (%d)\n"
#~ msgstr "syöte '%c' (%d)\n"
#~ msgid "Moved to (%d, %d) in edit buffer\n"
#~ msgstr "Kohtaan (%d,%d) siirrytty muokkausruudussa\n"
#~ msgid "I got \"%s\"\n"
#~ msgstr "Saatiin \"%s\"\n"
#~ msgid "Dumping file buffer to stderr...\n"
#~ msgstr "Syöttää tiedoston stderriin...\n"
#~ msgid "Dumping cutbuffer to stderr...\n"
#~ msgstr "Syöttää leiketilan stderriin...\n"
#~ msgid "Dumping a buffer to stderr...\n"
#~ msgstr "Syöttää tekstin stderriin...\n"
#~ msgid ""
#~ "\n"
#~ "The -p flag now invokes the Pico \"preserve\" flag.\n"

2468
po/fr.po

File diff suppressed because it is too large Load Diff

433
po/gl.po
View File

@@ -6,7 +6,8 @@
msgid ""
msgstr ""
"Project-Id-Version: nano 1.1.99pre3\n"
"POT-Creation-Date: 2003-04-19 23:02-0400\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2003-08-11 21:49-0400\n"
"PO-Revision-Date: 2003-02-15 18:46+0100\n"
"Last-Translator: Jacobo Tarrio <jtarrio@trasno.net>\n"
"Language-Team: Galician <gpul-traduccion@ceu.fi.udc.es>\n"
@@ -15,15 +16,6 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n!=1;\n"
#: cut.c:49
#, c-format
msgid "add_to_cutbuffer() called with inptr->data = %s\n"
msgstr "chamouse a add_to_cutbuffer() con inptr->data = %s\n"
#: cut.c:213
msgid "Blew away cutbuffer =)\n"
msgstr "Borrouse o buffer de cortado =)\n"
#: files.c:317
#, c-format
msgid "Read %d line (Converted from Mac format)"
@@ -86,12 +78,6 @@ msgstr "Ficheiro a inserir nun novo buffer [dende ./]"
msgid "File to insert [from ./] "
msgstr "Ficheiro a inserir [dende ./]"
#: files.c:479 files.c:736 files.c:793 files.c:881 files.c:893 files.c:944
#: files.c:955 files.c:1815
#, c-format
msgid "filename is %s\n"
msgstr "filename é %s\n"
#: files.c:495
msgid "Command to execute"
msgstr "Comando a executar"
@@ -109,16 +95,6 @@ msgstr "Non se pode inserir un ficheiro de f
msgid "Key illegal in non-multibuffer mode"
msgstr "Tecla non válida no modo sen multibuffer"
#: files.c:704 nano.c:565
#, c-format
msgid "%s: free'd a node, YAY!\n"
msgstr "%s: liberouse un nodo, ¡AI!\n"
#: files.c:709 nano.c:570
#, c-format
msgid "%s: free'd last node.\n"
msgstr "%s: liberouse o derradeiro nodo.\n"
#: files.c:873 files.c:936
msgid "No more open files"
msgstr "Non hai máis ficheiros abertos"
@@ -143,11 +119,6 @@ msgstr "Non se puido abrir %s para facer unha copia: %s"
msgid "Couldn't write backup: %s"
msgstr "Non se puido grava-la copia: %s"
#: files.c:1401
#, c-format
msgid "Backing up %s to %s\n"
msgstr "Copiando %s en %s\n"
#: files.c:1413
#, c-format
msgid "Could not set permissions %o on backup %s: %s"
@@ -169,11 +140,6 @@ msgstr "Non se puido estabrece-la data de acceso/modificaci
msgid "Could not open file for writing: %s"
msgstr "Non se puido abri-lo ficheiro para escribir: %s"
#: files.c:1516
#, c-format
msgid "Wrote >%s\n"
msgstr "Escribíuse >%s\n"
#: files.c:1572
#, c-format
msgid "Could not close %s: %s"
@@ -526,215 +492,215 @@ msgstr "Abri-lo seguinte ficheiro cargado"
msgid "Toggle insert into new buffer"
msgstr "Inserir/non inserir no novo buffer"
#: global.c:418 global.c:565 global.c:605 global.c:641 global.c:660
#: global.c:690 global.c:722 global.c:744 global.c:754 global.c:764
#: global.c:784
#: global.c:418 global.c:578 global.c:627 global.c:664 global.c:683
#: global.c:713 global.c:751 global.c:775 global.c:785 global.c:795
#: global.c:816
msgid "Get Help"
msgstr "Axuda"
#: global.c:424
#: global.c:425
msgid "Close"
msgstr "Pechar"
#: global.c:430 global.c:683
#: global.c:432 global.c:706
msgid "Exit"
msgstr "Saír"
#: global.c:434
#: global.c:437
msgid "WriteOut"
msgstr "Gravar"
#: global.c:438
#: global.c:442
msgid "Justify"
msgstr "Xustif."
#: global.c:443
#: global.c:448
msgid "Read File"
msgstr "Ler Fich."
#: global.c:452
#: global.c:458
msgid "Where Is"
msgstr "Buscar"
#: global.c:456 global.c:675 global.c:770
#: global.c:463 global.c:698 global.c:801
msgid "Prev Page"
msgstr "Páx. Seg."
#: global.c:460 global.c:679 global.c:774
#: global.c:468 global.c:702 global.c:805
msgid "Next Page"
msgstr "Páx. Ant."
#: global.c:464
#: global.c:473
msgid "Cut Text"
msgstr "Cortar"
#: global.c:469
#: global.c:479
msgid "UnJustify"
msgstr "Des-Xust."
#: global.c:473
#: global.c:484
msgid "UnCut Txt"
msgstr "Pegar"
#: global.c:477
#: global.c:489
msgid "Cur Pos"
msgstr "Pos. Act."
#: global.c:481
#: global.c:494
msgid "To Spell"
msgstr "Ortograf."
#: global.c:485 nano.c:420 winio.c:604
#: global.c:498 nano.c:420 winio.c:655
msgid "Up"
msgstr "Arriba"
#: global.c:489
#: global.c:502
msgid "Down"
msgstr "Abaixo"
#: global.c:493
#: global.c:506
msgid "Forward"
msgstr "Adiante"
#: global.c:497
#: global.c:510
msgid "Back"
msgstr "Atrás"
#: global.c:501
#: global.c:514
msgid "Home"
msgstr "Inicio"
#: global.c:505
#: global.c:518
msgid "End"
msgstr "Fin"
#: global.c:509
#: global.c:522
msgid "Refresh"
msgstr "Actualizar"
#: global.c:513
#: global.c:526
msgid "Mark Text"
msgstr "Marcar"
#: global.c:517
#: global.c:530
msgid "Delete"
msgstr "Borrar"
#: global.c:521
#: global.c:534
msgid "Backspace"
msgstr "Retroceso"
#: global.c:525
#: global.c:538
msgid "Tab"
msgstr "Tabulador"
#: global.c:528 global.c:578
#: global.c:541 global.c:595
msgid "Replace"
msgstr "Substit."
#: global.c:532
#: global.c:545
msgid "Enter"
msgstr "Enter"
#: global.c:536 global.c:581 global.c:620
#: global.c:549 global.c:599 global.c:643
msgid "Go To Line"
msgstr "Ir Á Liña"
#: global.c:541
#: global.c:554
msgid "Next Word"
msgstr "Seguinte Palabra"
#: global.c:542
#: global.c:555
msgid "Move forward one word"
msgstr "Avanzar unha palabra"
#: global.c:545
#: global.c:558
msgid "Prev Word"
msgstr "Palabra Anterior"
#: global.c:546
#: global.c:559
msgid "Move backward one word"
msgstr "Recuar unha palabra"
#: global.c:550
#: global.c:563
msgid "Find Other Bracket"
msgstr "Busca-la Parella"
#: global.c:555
#: global.c:568
msgid "Previous File"
msgstr "Ficheiro Anterior"
#: global.c:558
#: global.c:571
msgid "Next File"
msgstr "Seguinte Ficheiro"
#: global.c:568 global.c:608 global.c:644 global.c:663 global.c:717
#: global.c:725 global.c:747 global.c:757 global.c:767 global.c:787
#: winio.c:1272
#: global.c:582 global.c:630 global.c:667 global.c:686 global.c:746
#: global.c:754 global.c:778 global.c:788 global.c:798 global.c:819
#: winio.c:1323
msgid "Cancel"
msgstr "Cancelar"
#: global.c:571 global.c:611 global.c:647 global.c:666
#: global.c:586 global.c:633 global.c:670 global.c:689
msgid "First Line"
msgstr "Pri. Liña"
#: global.c:575 global.c:614 global.c:650 global.c:669
#: global.c:591 global.c:636 global.c:673 global.c:692
msgid "Last Line"
msgstr "Der. Liña"
#: global.c:585 global.c:624
#: global.c:604 global.c:647
msgid "Case Sens"
msgstr "Maiú./Min."
#: global.c:588 global.c:627
#: global.c:608 global.c:650
msgid "Direction"
msgstr "Dirección"
#: global.c:592 global.c:631
#: global.c:613 global.c:654
msgid "Regexp"
msgstr "ExpReg"
#: global.c:597 global.c:635 global.c:654
#: global.c:619 global.c:658 global.c:677
msgid "History"
msgstr "Historia"
#: global.c:617
#: global.c:640
msgid "No Replace"
msgstr "Non Subst."
#: global.c:694 global.c:729
#: global.c:718 global.c:758
msgid "To Files"
msgstr "A Ficheiros"
#: global.c:699
#: global.c:724
msgid "DOS Format"
msgstr "Formato DOS"
#: global.c:702
#: global.c:728
msgid "Mac Format"
msgstr "Formato Mac"
#: global.c:706
#: global.c:733
msgid "Append"
msgstr "Engadir"
#: global.c:709
#: global.c:737
msgid "Prepend"
msgstr "Engadir ao Princ."
#: global.c:713
#: global.c:742
msgid "Backup File"
msgstr "Facer CopiaSeg."
#: global.c:733
#: global.c:763
msgid "Execute Command"
msgstr "Executar Comando"
#: global.c:736 winio.c:545
#: global.c:767 winio.c:596
msgid "New Buffer"
msgstr "Novo Buffer"
#: global.c:778
#: global.c:810
msgid "Go To Dir"
msgstr "Ir Ao Directorio"
@@ -1237,16 +1203,6 @@ msgstr "Non se puido estabrecer unha canalizaci
msgid "Could not fork"
msgstr "Non se puido iniciar outro proceso"
#: nano.c:1032
#, c-format
msgid "current->data now = \"%s\"\n"
msgstr "current->data agora = \"%s\"\n"
#: nano.c:1092
#, c-format
msgid "After, data = \"%s\"\n"
msgstr "Despois, data = \"%s\"\n"
#: nano.c:1365
msgid "Mark Set"
msgstr "Marca Posta"
@@ -1369,48 +1325,6 @@ msgstr "desactivado"
msgid "Tab size is too small for nano...\n"
msgstr "O tamaño de tabulación é pequeno de máis para nano...\n"
#: nano.c:3384
msgid "Main: set up windows\n"
msgstr "Main: configura-las fiestras\n"
#: nano.c:3398
msgid "Main: bottom win\n"
msgstr "Main: fiestra inferior\n"
#: nano.c:3404
msgid "Main: open file\n"
msgstr "Main: abrir ficheiro\n"
#: nano.c:3461
#, c-format
msgid "AHA! %c (%d)\n"
msgstr "¡Aghá! %c (%d)\n"
#: nano.c:3481
#, c-format
msgid "I got Alt-O-%c! (%d)\n"
msgstr "¡Recibiuse Alt-O-%c! (%d)\n"
#: nano.c:3508
#, c-format
msgid "I got Alt-[-1-%c! (%d)\n"
msgstr "¡Recibiuse Alt-[-1-%c! (%d)\n"
#: nano.c:3538
#, c-format
msgid "I got Alt-[-2-%c! (%d)\n"
msgstr "¡Recibiuse Alt-[-2-%c! (%d)\n"
#: nano.c:3607
#, c-format
msgid "I got Alt-[-%c! (%d)\n"
msgstr "¡Recibiuse Alt-[-%c! (%d)\n"
#: nano.c:3653
#, c-format
msgid "I got Alt-%c! (%d)\n"
msgstr "¡Recibiuse Alt-%c! (%d)\n"
#: nano.c:3711
msgid "XOFF ignored, mumble mumble."
msgstr "Ignórase XOFF, mmmm..."
@@ -1419,11 +1333,6 @@ msgstr "Ign
msgid "XON ignored, mumble mumble."
msgstr "Ignórase XON, mmmm..."
#: nano.c:3752
#, c-format
msgid "I got %c (%d)!\n"
msgstr "¡Recibiuse %c (%d)!\n"
#: rcfile.c:103
#, c-format
msgid "Error in %s on line %d: "
@@ -1469,14 +1378,6 @@ msgstr ""
msgid "Missing syntax name"
msgstr "Falla o nome da sintaxe"
#: rcfile.c:298
msgid "Adding new syntax after 1st\n"
msgstr "Engadindo a nova sintaxe trala primeira\n"
#: rcfile.c:306
msgid "Starting a new syntax type\n"
msgstr "Iniciando un novo tipo de sintaxe\n"
#: rcfile.c:352
msgid "Missing color name"
msgstr "Falla o nome da cor"
@@ -1485,35 +1386,15 @@ msgstr "Falla o nome da cor"
msgid "Cannot add a color directive without a syntax line"
msgstr "Non se pode engadir unha directiva de cor sen unha liña de sintaxe"
#: rcfile.c:420
#, c-format
msgid "Starting a new colorstring for fg %d bg %d\n"
msgstr "Iniciando unha nova cadea de cor para %d, fondo %d\n"
#: rcfile.c:428
#, c-format
msgid "Adding new entry for fg %d bg %d\n"
msgstr "Engadindo unha nova entrada para %d, fondo %d\n"
#: rcfile.c:437
msgid "\"start=\" requires a corresponding \"end=\""
msgstr "\"start=\" precisa dun \"end=\" correspondente"
#: rcfile.c:486
#, c-format
msgid "%s: Read a comment\n"
msgstr "%s: Leuse un comentario\n"
#: rcfile.c:509
#, c-format
msgid "command %s not understood"
msgstr "o comando %s non se comprendeu"
#: rcfile.c:521
#, c-format
msgid "%s: Parsing option %s\n"
msgstr "%s: Analizando a opción %s\n"
#: rcfile.c:541
#, c-format
msgid "option %s requires an argument"
@@ -1529,16 +1410,6 @@ msgstr "o tama
msgid "requested tab size %d invalid"
msgstr "o tamaño de tabulación solicitado %d non é válido"
#: rcfile.c:598
#, c-format
msgid "set flag %d!\n"
msgstr "¡estabrece-lo indicador %d!\n"
#: rcfile.c:604
#, c-format
msgid "unset flag %d!\n"
msgstr "¡elimina-lo indicador %d!\n"
#: rcfile.c:614
msgid "Errors found in .nanorc file"
msgstr "Atopáronse erros no ficheiro .nanorc"
@@ -1637,136 +1508,204 @@ msgstr "Non
msgid "No matching bracket"
msgstr "Non se atopou a parella do delimitador"
#: utils.c:225 utils.c:235
#: utils.c:257 utils.c:267
msgid "nano is out of memory!"
msgstr "¡A nano esgotóuselle a memoria!"
#: winio.c:90
#, c-format
msgid "actual_x for xplus=%d returns %d\n"
msgstr "actual_x para xplus=%d devolve %d\n"
#: winio.c:245 winio.c:473
#, c-format
msgid "Aha! '%c' (%d)\n"
msgstr "¡Aghá! '%c' (%d)\n"
#: winio.c:496
#, c-format
msgid "input '%c' (%d)\n"
msgstr "entrada '%c' (%d)\n"
#: winio.c:549
#: winio.c:600
msgid " File: ..."
msgstr " Ficheiro: ..."
#: winio.c:551
#: winio.c:602
msgid " DIR: ..."
msgstr " DIR: ..."
#: winio.c:556
#: winio.c:607
msgid "File: "
msgstr "Ficheiro: "
#: winio.c:559
#: winio.c:610
msgid " DIR: "
msgstr " DIR: "
#: winio.c:564
#: winio.c:615
msgid " Modified "
msgstr " Modificado "
#: winio.c:566
#: winio.c:617
msgid " View "
msgstr " Ver "
#: winio.c:752
#: winio.c:803
msgid "Refusing 0 length regex match"
msgstr "Rexeitando a coincidencia cunha expresión regular de lonxitude 0"
#: winio.c:1064
#, c-format
msgid "Moved to (%d, %d) in edit buffer\n"
msgstr "Moveuse a (%d, %d) no buffer de edición\n"
#: winio.c:1215
#, c-format
msgid "I got \"%s\"\n"
msgstr "Recibiuse \"%s\"\n"
#: winio.c:1246
#: winio.c:1297
msgid "Yy"
msgstr "Ss"
#: winio.c:1247
#: winio.c:1298
msgid "Nn"
msgstr "Nn"
#: winio.c:1248
#: winio.c:1299
msgid "Aa"
msgstr "Tt"
#: winio.c:1259
#: winio.c:1310
msgid "Yes"
msgstr "Si"
#: winio.c:1264
#: winio.c:1315
msgid "All"
msgstr "Todo"
#: winio.c:1269
#: winio.c:1320
msgid "No"
msgstr "Non"
#: winio.c:1448
#: winio.c:1499
#, c-format
msgid "line %ld/%ld (%d%%), col %lu/%lu (%d%%), char %lu/%ld (%d%%)"
msgstr "liña %ld/%ld (%d%%), col %lu/%lu (%d%%), car %lu/%ld (%d%%)"
#: winio.c:1704
msgid "Dumping file buffer to stderr...\n"
msgstr "Envorcando o buffer de ficheiro a stderr...\n"
#: winio.c:1706
msgid "Dumping cutbuffer to stderr...\n"
msgstr "Envorcando o buffer de cortado a stderr...\n"
#: winio.c:1708
msgid "Dumping a buffer to stderr...\n"
msgstr "Envorcando un buffer a stderr...\n"
#: winio.c:1789
#: winio.c:1838
msgid "The nano text editor"
msgstr "O editor de texto nano"
#: winio.c:1790
#: winio.c:1839
msgid "version "
msgstr "versión "
#: winio.c:1791
#: winio.c:1840
msgid "Brought to you by:"
msgstr "Por cortesía de:"
#: winio.c:1792
#: winio.c:1841
msgid "Special thanks to:"
msgstr "Gracias en especial a:"
#: winio.c:1793
#: winio.c:1842
msgid "The Free Software Foundation"
msgstr "A Free Software Foundation"
#: winio.c:1794
#: winio.c:1843
msgid "For ncurses:"
msgstr "Por ncurses:"
#: winio.c:1795
#: winio.c:1844
msgid "and anyone else we forgot..."
msgstr "e a todos os que esquencemos..."
#: winio.c:1796
#: winio.c:1845
msgid "Thank you for using nano!\n"
msgstr "¡Gracias por usar nano!\n"
#~ msgid "add_to_cutbuffer() called with inptr->data = %s\n"
#~ msgstr "chamouse a add_to_cutbuffer() con inptr->data = %s\n"
#~ msgid "Blew away cutbuffer =)\n"
#~ msgstr "Borrouse o buffer de cortado =)\n"
#~ msgid "filename is %s\n"
#~ msgstr "filename é %s\n"
#~ msgid "%s: free'd a node, YAY!\n"
#~ msgstr "%s: liberouse un nodo, ¡AI!\n"
#~ msgid "%s: free'd last node.\n"
#~ msgstr "%s: liberouse o derradeiro nodo.\n"
#~ msgid "Backing up %s to %s\n"
#~ msgstr "Copiando %s en %s\n"
#~ msgid "Wrote >%s\n"
#~ msgstr "Escribíuse >%s\n"
#~ msgid "current->data now = \"%s\"\n"
#~ msgstr "current->data agora = \"%s\"\n"
#~ msgid "After, data = \"%s\"\n"
#~ msgstr "Despois, data = \"%s\"\n"
#~ msgid "Main: set up windows\n"
#~ msgstr "Main: configura-las fiestras\n"
#~ msgid "Main: bottom win\n"
#~ msgstr "Main: fiestra inferior\n"
#~ msgid "Main: open file\n"
#~ msgstr "Main: abrir ficheiro\n"
#~ msgid "AHA! %c (%d)\n"
#~ msgstr "¡Aghá! %c (%d)\n"
#~ msgid "I got Alt-O-%c! (%d)\n"
#~ msgstr "¡Recibiuse Alt-O-%c! (%d)\n"
#~ msgid "I got Alt-[-1-%c! (%d)\n"
#~ msgstr "¡Recibiuse Alt-[-1-%c! (%d)\n"
#~ msgid "I got Alt-[-2-%c! (%d)\n"
#~ msgstr "¡Recibiuse Alt-[-2-%c! (%d)\n"
#~ msgid "I got Alt-[-%c! (%d)\n"
#~ msgstr "¡Recibiuse Alt-[-%c! (%d)\n"
#~ msgid "I got Alt-%c! (%d)\n"
#~ msgstr "¡Recibiuse Alt-%c! (%d)\n"
#~ msgid "I got %c (%d)!\n"
#~ msgstr "¡Recibiuse %c (%d)!\n"
#~ msgid "Adding new syntax after 1st\n"
#~ msgstr "Engadindo a nova sintaxe trala primeira\n"
#~ msgid "Starting a new syntax type\n"
#~ msgstr "Iniciando un novo tipo de sintaxe\n"
#~ msgid "Starting a new colorstring for fg %d bg %d\n"
#~ msgstr "Iniciando unha nova cadea de cor para %d, fondo %d\n"
#~ msgid "Adding new entry for fg %d bg %d\n"
#~ msgstr "Engadindo unha nova entrada para %d, fondo %d\n"
#~ msgid "%s: Read a comment\n"
#~ msgstr "%s: Leuse un comentario\n"
#~ msgid "%s: Parsing option %s\n"
#~ msgstr "%s: Analizando a opción %s\n"
#~ msgid "set flag %d!\n"
#~ msgstr "¡estabrece-lo indicador %d!\n"
#~ msgid "unset flag %d!\n"
#~ msgstr "¡elimina-lo indicador %d!\n"
#~ msgid "actual_x for xplus=%d returns %d\n"
#~ msgstr "actual_x para xplus=%d devolve %d\n"
#~ msgid "Aha! '%c' (%d)\n"
#~ msgstr "¡Aghá! '%c' (%d)\n"
#~ msgid "input '%c' (%d)\n"
#~ msgstr "entrada '%c' (%d)\n"
#~ msgid "Moved to (%d, %d) in edit buffer\n"
#~ msgstr "Moveuse a (%d, %d) no buffer de edición\n"
#~ msgid "I got \"%s\"\n"
#~ msgstr "Recibiuse \"%s\"\n"
#~ msgid "Dumping file buffer to stderr...\n"
#~ msgstr "Envorcando o buffer de ficheiro a stderr...\n"
#~ msgid "Dumping cutbuffer to stderr...\n"
#~ msgstr "Envorcando o buffer de cortado a stderr...\n"
#~ msgid "Dumping a buffer to stderr...\n"
#~ msgstr "Envorcando un buffer a stderr...\n"
#~ msgid ""
#~ "\n"
#~ "The -p flag now invokes the Pico \"preserve\" flag.\n"

427
po/hu.po
View File

@@ -7,7 +7,8 @@
msgid ""
msgstr ""
"Project-Id-Version: nano 1.1.6\n"
"POT-Creation-Date: 2003-04-19 23:02-0400\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2003-08-11 21:49-0400\n"
"PO-Revision-Date: 2002-02-06 18:42+0200\n"
"Last-Translator: Gergely Nagy <algernon@debian.org>\n"
"Language-Team: Hungarian <magyar@lists.linux.hu>\n"
@@ -15,15 +16,6 @@ msgstr ""
"Content-Type: text/plain; charset=iso-8859-2\n"
"Content-Transfer-Encoding: 8-bit\n"
#: cut.c:49
#, fuzzy, c-format
msgid "add_to_cutbuffer() called with inptr->data = %s\n"
msgstr "add_to_cutbuffer inptr->data = %s -el lett meghívva\n"
#: cut.c:213
msgid "Blew away cutbuffer =)\n"
msgstr "A cutbuffert elfújta a szél =)\n"
#: files.c:317
#, fuzzy, c-format
msgid "Read %d line (Converted from Mac format)"
@@ -87,12 +79,6 @@ msgstr "
msgid "File to insert [from ./] "
msgstr "Állomány beszúrása [./-ból] "
#: files.c:479 files.c:736 files.c:793 files.c:881 files.c:893 files.c:944
#: files.c:955 files.c:1815
#, fuzzy, c-format
msgid "filename is %s\n"
msgstr "az állomány neve %s"
#: files.c:495
msgid "Command to execute"
msgstr ""
@@ -110,16 +96,6 @@ msgstr "Nem lehet
msgid "Key illegal in non-multibuffer mode"
msgstr "A billentyû értelmezhetetlen nem-multibuffer módban"
#: files.c:704 nano.c:565
#, fuzzy, c-format
msgid "%s: free'd a node, YAY!\n"
msgstr "delete_node(): egy szem felszabadítva, HURRÁ!\n"
#: files.c:709 nano.c:570
#, fuzzy, c-format
msgid "%s: free'd last node.\n"
msgstr "delete_node(): utolsó szem felszabadítva.\n"
#: files.c:873 files.c:936
msgid "No more open files"
msgstr "Nincs több nyitott állomány"
@@ -144,11 +120,6 @@ msgstr "Nem lehet %s-t megnyitni
msgid "Couldn't write backup: %s"
msgstr "Nem lehet lezárni %s: %s."
#: files.c:1401
#, c-format
msgid "Backing up %s to %s\n"
msgstr ""
#: files.c:1413
#, fuzzy, c-format
msgid "Could not set permissions %o on backup %s: %s"
@@ -170,11 +141,6 @@ msgstr "Nem lehet a jogosults
msgid "Could not open file for writing: %s"
msgstr "Nem tudom az állományt írásra megnyitni: %s"
#: files.c:1516
#, c-format
msgid "Wrote >%s\n"
msgstr "Kiírva >%s\n"
#: files.c:1572
#, c-format
msgid "Could not close %s: %s"
@@ -543,221 +509,221 @@ msgstr "K
msgid "Toggle insert into new buffer"
msgstr ""
#: global.c:418 global.c:565 global.c:605 global.c:641 global.c:660
#: global.c:690 global.c:722 global.c:744 global.c:754 global.c:764
#: global.c:784
#: global.c:418 global.c:578 global.c:627 global.c:664 global.c:683
#: global.c:713 global.c:751 global.c:775 global.c:785 global.c:795
#: global.c:816
msgid "Get Help"
msgstr "Súgó"
#: global.c:424
#: global.c:425
msgid "Close"
msgstr "Bezárás"
#: global.c:430 global.c:683
#: global.c:432 global.c:706
msgid "Exit"
msgstr "Kilépés"
#: global.c:434
#: global.c:437
msgid "WriteOut"
msgstr "Mentés"
#: global.c:438
#: global.c:442
msgid "Justify"
msgstr "Sorkizár"
#: global.c:443
#: global.c:448
msgid "Read File"
msgstr "Beolvasás"
#: global.c:452
#: global.c:458
msgid "Where Is"
msgstr "Keresés"
#: global.c:456 global.c:675 global.c:770
#: global.c:463 global.c:698 global.c:801
msgid "Prev Page"
msgstr "Elõzõ old."
#: global.c:460 global.c:679 global.c:774
#: global.c:468 global.c:702 global.c:805
msgid "Next Page"
msgstr "Köv. old."
#: global.c:464
#: global.c:473
msgid "Cut Text"
msgstr "Kivágás"
#: global.c:469
#: global.c:479
msgid "UnJustify"
msgstr "Vissza-Sorkizár"
#: global.c:473
#: global.c:484
msgid "UnCut Txt"
msgstr "Beilleszt"
#: global.c:477
#: global.c:489
msgid "Cur Pos"
msgstr "Pozíció"
#: global.c:481
#: global.c:494
msgid "To Spell"
msgstr "Helyes-e?"
#: global.c:485 nano.c:420 winio.c:604
#: global.c:498 nano.c:420 winio.c:655
msgid "Up"
msgstr "Fel"
#: global.c:489
#: global.c:502
msgid "Down"
msgstr "Le"
#: global.c:493
#: global.c:506
msgid "Forward"
msgstr "Elõre"
#: global.c:497
#: global.c:510
msgid "Back"
msgstr "Vissza"
#: global.c:501
#: global.c:514
msgid "Home"
msgstr "Eleje"
#: global.c:505
#: global.c:518
msgid "End"
msgstr "Vége"
#: global.c:509
#: global.c:522
msgid "Refresh"
msgstr "Frissít"
#: global.c:513
#: global.c:526
msgid "Mark Text"
msgstr "Kijelöl"
#: global.c:517
#: global.c:530
msgid "Delete"
msgstr "Töröl"
#: global.c:521
#: global.c:534
msgid "Backspace"
msgstr "Visszalép"
#: global.c:525
#: global.c:538
msgid "Tab"
msgstr "Tabulátor"
#: global.c:528 global.c:578
#: global.c:541 global.c:595
msgid "Replace"
msgstr "Csere"
#: global.c:532
#: global.c:545
msgid "Enter"
msgstr "Enter"
#: global.c:536 global.c:581 global.c:620
#: global.c:549 global.c:599 global.c:643
#, fuzzy
msgid "Go To Line"
msgstr "Sorra ugrás"
#: global.c:541
#: global.c:554
msgid "Next Word"
msgstr ""
#: global.c:542
#: global.c:555
#, fuzzy
msgid "Move forward one word"
msgstr "Ugrás a következõ karakterre"
#: global.c:545
#: global.c:558
msgid "Prev Word"
msgstr ""
#: global.c:546
#: global.c:559
#, fuzzy
msgid "Move backward one word"
msgstr "Ugrás az elõzõ karakterre"
#: global.c:550
#: global.c:563
msgid "Find Other Bracket"
msgstr "Másik zárójel megkeresése"
#: global.c:555
#: global.c:568
msgid "Previous File"
msgstr ""
#: global.c:558
#: global.c:571
#, fuzzy
msgid "Next File"
msgstr "Új Állomány"
#: global.c:568 global.c:608 global.c:644 global.c:663 global.c:717
#: global.c:725 global.c:747 global.c:757 global.c:767 global.c:787
#: winio.c:1272
#: global.c:582 global.c:630 global.c:667 global.c:686 global.c:746
#: global.c:754 global.c:778 global.c:788 global.c:798 global.c:819
#: winio.c:1323
msgid "Cancel"
msgstr "Mégsem"
#: global.c:571 global.c:611 global.c:647 global.c:666
#: global.c:586 global.c:633 global.c:670 global.c:689
msgid "First Line"
msgstr "Elsõ sor"
#: global.c:575 global.c:614 global.c:650 global.c:669
#: global.c:591 global.c:636 global.c:673 global.c:692
msgid "Last Line"
msgstr "Utolsó sor"
#: global.c:585 global.c:624
#: global.c:604 global.c:647
msgid "Case Sens"
msgstr "Kis/Nagy"
#: global.c:588 global.c:627
#: global.c:608 global.c:650
msgid "Direction"
msgstr "Irány"
#: global.c:592 global.c:631
#: global.c:613 global.c:654
msgid "Regexp"
msgstr "Regkif"
#: global.c:597 global.c:635 global.c:654
#: global.c:619 global.c:658 global.c:677
msgid "History"
msgstr ""
#: global.c:617
#: global.c:640
msgid "No Replace"
msgstr "Nem cserél"
#: global.c:694 global.c:729
#: global.c:718 global.c:758
msgid "To Files"
msgstr "Tallózás"
#: global.c:699
#: global.c:724
msgid "DOS Format"
msgstr ""
#: global.c:702
#: global.c:728
msgid "Mac Format"
msgstr ""
#: global.c:706
#: global.c:733
msgid "Append"
msgstr "Hozzáfûz"
#: global.c:709
#: global.c:737
#, fuzzy
msgid "Prepend"
msgstr "Hozzáfûz"
#: global.c:713
#: global.c:742
#, fuzzy
msgid "Backup File"
msgstr "Visszalép"
#: global.c:733
#: global.c:763
msgid "Execute Command"
msgstr ""
#: global.c:736 winio.c:545
#: global.c:767 winio.c:596
msgid "New Buffer"
msgstr "Új buffer"
#: global.c:778
#: global.c:810
#, fuzzy
msgid "Go To Dir"
msgstr "Könyvtárváltás"
@@ -1290,16 +1256,6 @@ msgstr "Nem lehet lez
msgid "Could not fork"
msgstr "Nem lehet lezárni %s: %s."
#: nano.c:1032
#, c-format
msgid "current->data now = \"%s\"\n"
msgstr "current->data most = \"%s\"\n"
#: nano.c:1092
#, c-format
msgid "After, data = \"%s\"\n"
msgstr "Azután, data = \"%s\"\n"
#: nano.c:1365
msgid "Mark Set"
msgstr "Kijelölés kezdete"
@@ -1428,48 +1384,6 @@ msgstr "kikapcsolva"
msgid "Tab size is too small for nano...\n"
msgstr "Az ablak mérete túl kicsi a Nanonak..."
#: nano.c:3384
msgid "Main: set up windows\n"
msgstr "Fõprogram: az ablakok beállítása\n"
#: nano.c:3398
msgid "Main: bottom win\n"
msgstr "Fõprogram: alsó ablak\n"
#: nano.c:3404
msgid "Main: open file\n"
msgstr "Fõprogram: állomány megnyitása\n"
#: nano.c:3461
#, fuzzy, c-format
msgid "AHA! %c (%d)\n"
msgstr "Aha! '%c' (%d)\n"
#: nano.c:3481
#, c-format
msgid "I got Alt-O-%c! (%d)\n"
msgstr "Alt-O-%c billentyûket észleltem! (%d)\n"
#: nano.c:3508
#, c-format
msgid "I got Alt-[-1-%c! (%d)\n"
msgstr "Alt-[-1-%c billentyûket észleltem! (%d)\n"
#: nano.c:3538
#, c-format
msgid "I got Alt-[-2-%c! (%d)\n"
msgstr "Alt-[-2-%c billentyûket észleltem! (%d)\n"
#: nano.c:3607
#, c-format
msgid "I got Alt-[-%c! (%d)\n"
msgstr "Alt-[-%c billentyûket észleltem! (%d)\n"
#: nano.c:3653
#, c-format
msgid "I got Alt-%c! (%d)\n"
msgstr "Alt-%c billentyûket észleltem! (%d)\n"
#: nano.c:3711
msgid "XOFF ignored, mumble mumble."
msgstr ""
@@ -1478,11 +1392,6 @@ msgstr ""
msgid "XON ignored, mumble mumble."
msgstr ""
#: nano.c:3752
#, fuzzy, c-format
msgid "I got %c (%d)!\n"
msgstr "Alt-%c billentyûket észleltem! (%d)\n"
#: rcfile.c:103
#, c-format
msgid "Error in %s on line %d: "
@@ -1528,14 +1437,6 @@ msgstr "a regul
msgid "Missing syntax name"
msgstr "Hiányzik a szín neve"
#: rcfile.c:298
msgid "Adding new syntax after 1st\n"
msgstr ""
#: rcfile.c:306
msgid "Starting a new syntax type\n"
msgstr ""
#: rcfile.c:352
msgid "Missing color name"
msgstr "Hiányzik a szín neve"
@@ -1544,16 +1445,6 @@ msgstr "Hi
msgid "Cannot add a color directive without a syntax line"
msgstr ""
#: rcfile.c:420
#, c-format
msgid "Starting a new colorstring for fg %d bg %d\n"
msgstr ""
#: rcfile.c:428
#, c-format
msgid "Adding new entry for fg %d bg %d\n"
msgstr ""
#: rcfile.c:437
#, fuzzy
msgid "\"start=\" requires a corresponding \"end=\""
@@ -1561,21 +1452,11 @@ msgstr ""
"\n"
"\t\"start=\" -hoz kell megfelelõ \"end=\""
#: rcfile.c:486
#, fuzzy, c-format
msgid "%s: Read a comment\n"
msgstr "parse_rcfile: Komment olvasása\n"
#: rcfile.c:509
#, c-format
msgid "command %s not understood"
msgstr "A %s parancs nem értelmezhetõ"
#: rcfile.c:521
#, fuzzy, c-format
msgid "%s: Parsing option %s\n"
msgstr "parse_rcfile: A %s opció értelmezése\n"
#: rcfile.c:541
#, c-format
msgid "option %s requires an argument"
@@ -1591,16 +1472,6 @@ msgstr "a k
msgid "requested tab size %d invalid"
msgstr "a kért %d tabulátorhossz túl rövid"
#: rcfile.c:598
#, c-format
msgid "set flag %d!\n"
msgstr "%d állapotjelzõ engedélyezve!\n"
#: rcfile.c:604
#, c-format
msgid "unset flag %d!\n"
msgstr "%d állapotjelzõ kikapcsolva\n"
#: rcfile.c:614
msgid "Errors found in .nanorc file"
msgstr "Hibák találhatóak a .nanorc állományban"
@@ -1700,138 +1571,200 @@ msgstr "Nem z
msgid "No matching bracket"
msgstr "Nincs illeszkedõ zárójel"
#: utils.c:225 utils.c:235
#: utils.c:257 utils.c:267
#, fuzzy
msgid "nano is out of memory!"
msgstr "nano: malloc: elfogyott a memória!"
#: winio.c:90
#, fuzzy, c-format
msgid "actual_x for xplus=%d returns %d\n"
msgstr "xplus=%d érték actual_x_from_start-hoz\n"
#: winio.c:245 winio.c:473
#, c-format
msgid "Aha! '%c' (%d)\n"
msgstr "Aha! '%c' (%d)\n"
#: winio.c:496
#, c-format
msgid "input '%c' (%d)\n"
msgstr "bevitel '%c' (%d)\n"
#: winio.c:549
#: winio.c:600
msgid " File: ..."
msgstr " Állomány: ..."
#: winio.c:551
#: winio.c:602
msgid " DIR: ..."
msgstr " Könyvtár: ..."
#: winio.c:556
#: winio.c:607
msgid "File: "
msgstr "Állomány: "
#: winio.c:559
#: winio.c:610
msgid " DIR: "
msgstr " Könyvtár: "
#: winio.c:564
#: winio.c:615
#, fuzzy
msgid " Modified "
msgstr "Módosítva"
#: winio.c:566
#: winio.c:617
msgid " View "
msgstr ""
#: winio.c:752
#: winio.c:803
msgid "Refusing 0 length regex match"
msgstr ""
#: winio.c:1064
#, c-format
msgid "Moved to (%d, %d) in edit buffer\n"
msgstr "Átmozgatva (%d, %d) pozicióba a szerkesztõ-bufferben\n"
#: winio.c:1215
#, c-format
msgid "I got \"%s\"\n"
msgstr "\"%s\" észlelve.\n"
#: winio.c:1246
#: winio.c:1297
msgid "Yy"
msgstr "Ii"
#: winio.c:1247
#: winio.c:1298
msgid "Nn"
msgstr "Nn"
#: winio.c:1248
#: winio.c:1299
msgid "Aa"
msgstr "Mm"
#: winio.c:1259
#: winio.c:1310
msgid "Yes"
msgstr "Igen"
#: winio.c:1264
#: winio.c:1315
msgid "All"
msgstr "Mindet"
#: winio.c:1269
#: winio.c:1320
msgid "No"
msgstr "Nem"
#: winio.c:1448
#: winio.c:1499
#, fuzzy, c-format
msgid "line %ld/%ld (%d%%), col %lu/%lu (%d%%), char %lu/%ld (%d%%)"
msgstr "%d(/%d). sor (%.0f%%) és %ld(/%ld). karakter (%.0f%%)"
#: winio.c:1704
msgid "Dumping file buffer to stderr...\n"
msgstr "Az állománybuffer kiírása a standard hibakimenetre...\n"
#: winio.c:1706
msgid "Dumping cutbuffer to stderr...\n"
msgstr "A cutbuffer kiírása a standard hibakimenetre...\n"
#: winio.c:1708
msgid "Dumping a buffer to stderr...\n"
msgstr "A buffer kiírása a standard hibakimenetre...\n"
#: winio.c:1789
#: winio.c:1838
msgid "The nano text editor"
msgstr "A nano szövegszerkesztõ"
#: winio.c:1790
#: winio.c:1839
msgid "version "
msgstr "verzió "
#: winio.c:1791
#: winio.c:1840
msgid "Brought to you by:"
msgstr "Fejlesztõk:"
#: winio.c:1792
#: winio.c:1841
msgid "Special thanks to:"
msgstr "Külön köszönet:"
#: winio.c:1793
#: winio.c:1842
msgid "The Free Software Foundation"
msgstr "A Free Software Foundation"
#: winio.c:1794
#: winio.c:1843
msgid "For ncurses:"
msgstr ""
#: winio.c:1795
#: winio.c:1844
msgid "and anyone else we forgot..."
msgstr "és mindenkinek, akit kifelejtettünk volna..."
#: winio.c:1796
#: winio.c:1845
msgid "Thank you for using nano!\n"
msgstr "Köszönjük, hogy a nano-t választottad!\n"
#, fuzzy
#~ msgid "add_to_cutbuffer() called with inptr->data = %s\n"
#~ msgstr "add_to_cutbuffer inptr->data = %s -el lett meghívva\n"
#~ msgid "Blew away cutbuffer =)\n"
#~ msgstr "A cutbuffert elfújta a szél =)\n"
#, fuzzy
#~ msgid "filename is %s\n"
#~ msgstr "az állomány neve %s"
#, fuzzy
#~ msgid "%s: free'd a node, YAY!\n"
#~ msgstr "delete_node(): egy szem felszabadítva, HURRÁ!\n"
#, fuzzy
#~ msgid "%s: free'd last node.\n"
#~ msgstr "delete_node(): utolsó szem felszabadítva.\n"
#~ msgid "Wrote >%s\n"
#~ msgstr "Kiírva >%s\n"
#~ msgid "current->data now = \"%s\"\n"
#~ msgstr "current->data most = \"%s\"\n"
#~ msgid "After, data = \"%s\"\n"
#~ msgstr "Azután, data = \"%s\"\n"
#~ msgid "Main: set up windows\n"
#~ msgstr "Fõprogram: az ablakok beállítása\n"
#~ msgid "Main: bottom win\n"
#~ msgstr "Fõprogram: alsó ablak\n"
#~ msgid "Main: open file\n"
#~ msgstr "Fõprogram: állomány megnyitása\n"
#, fuzzy
#~ msgid "AHA! %c (%d)\n"
#~ msgstr "Aha! '%c' (%d)\n"
#~ msgid "I got Alt-O-%c! (%d)\n"
#~ msgstr "Alt-O-%c billentyûket észleltem! (%d)\n"
#~ msgid "I got Alt-[-1-%c! (%d)\n"
#~ msgstr "Alt-[-1-%c billentyûket észleltem! (%d)\n"
#~ msgid "I got Alt-[-2-%c! (%d)\n"
#~ msgstr "Alt-[-2-%c billentyûket észleltem! (%d)\n"
#~ msgid "I got Alt-[-%c! (%d)\n"
#~ msgstr "Alt-[-%c billentyûket észleltem! (%d)\n"
#~ msgid "I got Alt-%c! (%d)\n"
#~ msgstr "Alt-%c billentyûket észleltem! (%d)\n"
#, fuzzy
#~ msgid "I got %c (%d)!\n"
#~ msgstr "Alt-%c billentyûket észleltem! (%d)\n"
#, fuzzy
#~ msgid "%s: Read a comment\n"
#~ msgstr "parse_rcfile: Komment olvasása\n"
#, fuzzy
#~ msgid "%s: Parsing option %s\n"
#~ msgstr "parse_rcfile: A %s opció értelmezése\n"
#~ msgid "set flag %d!\n"
#~ msgstr "%d állapotjelzõ engedélyezve!\n"
#~ msgid "unset flag %d!\n"
#~ msgstr "%d állapotjelzõ kikapcsolva\n"
#, fuzzy
#~ msgid "actual_x for xplus=%d returns %d\n"
#~ msgstr "xplus=%d érték actual_x_from_start-hoz\n"
#~ msgid "Aha! '%c' (%d)\n"
#~ msgstr "Aha! '%c' (%d)\n"
#~ msgid "input '%c' (%d)\n"
#~ msgstr "bevitel '%c' (%d)\n"
#~ msgid "Moved to (%d, %d) in edit buffer\n"
#~ msgstr "Átmozgatva (%d, %d) pozicióba a szerkesztõ-bufferben\n"
#~ msgid "I got \"%s\"\n"
#~ msgstr "\"%s\" észlelve.\n"
#~ msgid "Dumping file buffer to stderr...\n"
#~ msgstr "Az állománybuffer kiírása a standard hibakimenetre...\n"
#~ msgid "Dumping cutbuffer to stderr...\n"
#~ msgstr "A cutbuffer kiírása a standard hibakimenetre...\n"
#~ msgid "Dumping a buffer to stderr...\n"
#~ msgstr "A buffer kiírása a standard hibakimenetre...\n"
#~ msgid "Can't visit parent in restricted mode"
#~ msgstr "Nem lehet feljebb menni korlátozott módban"

523
po/id.po
View File

@@ -1,12 +1,13 @@
# nano 1.2.0 (Indonesian)
# nano 1.2.1 (Indonesian)
# Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
# Tedi Heriyanto <tedi_h@gmx.net>, 2001, 2002, 2003
#
msgid ""
msgstr ""
"Project-Id-Version: nano 1.2.0\n"
"POT-Creation-Date: 2003-04-19 23:02-0400\n"
"PO-Revision-Date: 2003-03-03 10:38GMT+0700\n"
"Project-Id-Version: nano 1.2.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2003-08-11 21:49-0400\n"
"PO-Revision-Date: 2003-04-23 09:41+0000\n"
"Last-Translator: Tedi Heriyanto <tedi_h@gmx.net>\n"
"Language-Team: Indonesian <translation-team-id@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
@@ -15,15 +16,6 @@ msgstr ""
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: KBabel 0.9.6\n"
#: cut.c:49
#, c-format
msgid "add_to_cutbuffer() called with inptr->data = %s\n"
msgstr "add_to_cutbuffer() dipanggil dgn inptr->data = %s\n"
#: cut.c:213
msgid "Blew away cutbuffer =)\n"
msgstr "Hapus cutbuffer =)\n"
#: files.c:317
#, c-format
msgid "Read %d line (Converted from Mac format)"
@@ -86,12 +78,6 @@ msgstr "File untuk disisipkan ke buffer baru [dari ./] "
msgid "File to insert [from ./] "
msgstr "File untuk disisipkan [dari ./] "
#: files.c:479 files.c:736 files.c:793 files.c:881 files.c:893 files.c:944
#: files.c:955 files.c:1815
#, c-format
msgid "filename is %s\n"
msgstr "Namafile adalah %s\n"
#: files.c:495
msgid "Command to execute"
msgstr "Perintah untuk dieksekusi "
@@ -109,16 +95,6 @@ msgstr "Tidak dapat menyisipkan file dari luar %s"
msgid "Key illegal in non-multibuffer mode"
msgstr "Kunci ilegal dalam mode non-multibuffer"
#: files.c:704 nano.c:565
#, c-format
msgid "%s: free'd a node, YAY!\n"
msgstr "%s: bebaskan sebuah node, YAY!\n"
#: files.c:709 nano.c:570
#, c-format
msgid "%s: free'd last node.\n"
msgstr "%s: bebaskan node terakhir.\n"
#: files.c:873 files.c:936
msgid "No more open files"
msgstr "Tidak ada file yang terbuka lagi"
@@ -143,11 +119,6 @@ msgstr "Tidak dapat membaca %s untuk backup: %s"
msgid "Couldn't write backup: %s"
msgstr "Tidak dapat menulis backup: %s"
#: files.c:1401
#, c-format
msgid "Backing up %s to %s\n"
msgstr "Backup %s ke %s\n"
#: files.c:1413
#, c-format
msgid "Could not set permissions %o on backup %s: %s"
@@ -169,11 +140,6 @@ msgstr "Tidak dapat menset waktu akses/modifikasi pada backup %s: %s"
msgid "Could not open file for writing: %s"
msgstr "Tidak dapat membuka file untuk menulis: %s"
#: files.c:1516
#, c-format
msgid "Wrote >%s\n"
msgstr "Tulis >%s\n"
#: files.c:1572
#, c-format
msgid "Could not close %s: %s"
@@ -526,215 +492,215 @@ msgstr "Buka file yang akan dimuat"
msgid "Toggle insert into new buffer"
msgstr "Pilih insert ke buffer baru"
#: global.c:418 global.c:565 global.c:605 global.c:641 global.c:660
#: global.c:690 global.c:722 global.c:744 global.c:754 global.c:764
#: global.c:784
#: global.c:418 global.c:578 global.c:627 global.c:664 global.c:683
#: global.c:713 global.c:751 global.c:775 global.c:785 global.c:795
#: global.c:816
msgid "Get Help"
msgstr "Bantuan"
#: global.c:424
#: global.c:425
msgid "Close"
msgstr "Tutup"
#: global.c:430 global.c:683
#: global.c:432 global.c:706
msgid "Exit"
msgstr "Keluar"
#: global.c:434
#: global.c:437
msgid "WriteOut"
msgstr "Tulis"
#: global.c:438
#: global.c:442
msgid "Justify"
msgstr "Justifikasi"
#: global.c:443
#: global.c:448
msgid "Read File"
msgstr "Baca File"
#: global.c:452
#: global.c:458
msgid "Where Is"
msgstr "Di mana"
#: global.c:456 global.c:675 global.c:770
#: global.c:463 global.c:698 global.c:801
msgid "Prev Page"
msgstr "Hlm sebelumnya"
#: global.c:460 global.c:679 global.c:774
#: global.c:468 global.c:702 global.c:805
msgid "Next Page"
msgstr "Hlm berikutnya"
#: global.c:464
#: global.c:473
msgid "Cut Text"
msgstr "Ptng Teks"
#: global.c:469
#: global.c:479
msgid "UnJustify"
msgstr "UnJustifikasi"
#: global.c:473
#: global.c:484
msgid "UnCut Txt"
msgstr "UnCut Teks"
#: global.c:477
#: global.c:489
msgid "Cur Pos"
msgstr "Pos Kursor"
#: global.c:481
#: global.c:494
msgid "To Spell"
msgstr "Mengeja"
#: global.c:485 nano.c:420 winio.c:604
#: global.c:498 nano.c:420 winio.c:655
msgid "Up"
msgstr "Naik"
#: global.c:489
#: global.c:502
msgid "Down"
msgstr "Turun"
#: global.c:493
#: global.c:506
msgid "Forward"
msgstr "Depan"
#: global.c:497
#: global.c:510
msgid "Back"
msgstr "Belakang"
#: global.c:501
#: global.c:514
msgid "Home"
msgstr "Awal"
#: global.c:505
#: global.c:518
msgid "End"
msgstr "Akhir"
#: global.c:509
#: global.c:522
msgid "Refresh"
msgstr "Refresh"
#: global.c:513
#: global.c:526
msgid "Mark Text"
msgstr "Tandai Teks"
#: global.c:517
#: global.c:530
msgid "Delete"
msgstr "Hapus"
#: global.c:521
#: global.c:534
msgid "Backspace"
msgstr "Backspace"
#: global.c:525
#: global.c:538
msgid "Tab"
msgstr "Tab"
#: global.c:528 global.c:578
#: global.c:541 global.c:595
msgid "Replace"
msgstr "Ganti"
#: global.c:532
#: global.c:545
msgid "Enter"
msgstr "Enter"
#: global.c:536 global.c:581 global.c:620
#: global.c:549 global.c:599 global.c:643
msgid "Go To Line"
msgstr "Ke baris"
#: global.c:541
#: global.c:554
msgid "Next Word"
msgstr "Kata Berikut"
#: global.c:542
#: global.c:555
msgid "Move forward one word"
msgstr "Ke depan satu kata"
#: global.c:545
#: global.c:558
msgid "Prev Word"
msgstr "Kata Sebelum"
#: global.c:546
#: global.c:559
msgid "Move backward one word"
msgstr "Ke belakang satu kata"
#: global.c:550
#: global.c:563
msgid "Find Other Bracket"
msgstr "Cari Kurung Lain"
#: global.c:555
#: global.c:568
msgid "Previous File"
msgstr "File Sebelumnya"
#: global.c:558
#: global.c:571
msgid "Next File"
msgstr "File Sesudahnya"
#: global.c:568 global.c:608 global.c:644 global.c:663 global.c:717
#: global.c:725 global.c:747 global.c:757 global.c:767 global.c:787
#: winio.c:1272
#: global.c:582 global.c:630 global.c:667 global.c:686 global.c:746
#: global.c:754 global.c:778 global.c:788 global.c:798 global.c:819
#: winio.c:1323
msgid "Cancel"
msgstr "Batal"
#: global.c:571 global.c:611 global.c:647 global.c:666
#: global.c:586 global.c:633 global.c:670 global.c:689
msgid "First Line"
msgstr "Baris pertama"
#: global.c:575 global.c:614 global.c:650 global.c:669
#: global.c:591 global.c:636 global.c:673 global.c:692
msgid "Last Line"
msgstr "Baris terakhir"
#: global.c:585 global.c:624
#: global.c:604 global.c:647
msgid "Case Sens"
msgstr "Case Sens"
#: global.c:588 global.c:627
#: global.c:608 global.c:650
msgid "Direction"
msgstr "Arah"
#: global.c:592 global.c:631
#: global.c:613 global.c:654
msgid "Regexp"
msgstr "Regexp"
#: global.c:597 global.c:635 global.c:654
#: global.c:619 global.c:658 global.c:677
msgid "History"
msgstr "Sejarah"
#: global.c:617
#: global.c:640
msgid "No Replace"
msgstr "Tiada Replace"
#: global.c:694 global.c:729
#: global.c:718 global.c:758
msgid "To Files"
msgstr "Ke File"
#: global.c:699
#: global.c:724
msgid "DOS Format"
msgstr "Format DOS"
#: global.c:702
#: global.c:728
msgid "Mac Format"
msgstr "Format Mac"
#: global.c:706
#: global.c:733
msgid "Append"
msgstr "Tambah"
#: global.c:709
#: global.c:737
msgid "Prepend"
msgstr "Tambah"
#: global.c:713
#: global.c:742
msgid "Backup File"
msgstr "Backup File"
#: global.c:733
#: global.c:763
msgid "Execute Command"
msgstr "Eksekusi Perintah"
#: global.c:736 winio.c:545
#: global.c:767 winio.c:596
msgid "New Buffer"
msgstr "Buffer baru"
#: global.c:778
#: global.c:810
msgid "Go To Dir"
msgstr "Ke Direktori"
@@ -990,7 +956,7 @@ msgstr ""
"telah dimodifikasi. Selanjutnya adalah jendela editor utama yang "
"menunjukkan file yang sedang diedit. Baris status adalah baris ketiga dari "
"bawah dan menunjukkan pesan-pesan penting. Dua baris terbawah menunjukkan "
"shortcut yang paling umum digunakan dalam editor..\n"
"shortcut yang paling umum digunakan dalam editor.\n"
"\n"
" Notasi shortcut adalah sebagai berikut : Urutan kunci Control ditunjukkan "
"oleh simbol caret (^) dan dimasukkan dengan kunci Control (Ctrl). Urutan "
@@ -1058,7 +1024,7 @@ msgstr "Aktifkan multiple file buffer"
#: nano.c:639
msgid "Log & read search/replace string history"
msgstr "Log dan baca sejarah string search/replace"
msgstr "Log dan baca sejarah pencarian/penggantian string"
#: nano.c:640
msgid "Don't look at nanorc files"
@@ -1154,7 +1120,7 @@ msgstr "Set direktori operasi"
#: nano.c:673
msgid "Preserve XON (^Q) and XOFF (^S) keys"
msgstr "Memelihara tombol XON (^Q) dan XOFF (^S)"
msgstr "Preserve kunci XON (^Q) dan XOFF (^S)"
#: nano.c:675
msgid "-r [#cols]"
@@ -1233,16 +1199,6 @@ msgstr "Tidak dapat mem-pipe"
msgid "Could not fork"
msgstr "Tidak dapat mem-fork"
#: nano.c:1032
#, c-format
msgid "current->data now = \"%s\"\n"
msgstr "current->data sekarang =\"%s\"\n"
#: nano.c:1092
#, c-format
msgid "After, data = \"%s\"\n"
msgstr "Setelah, data= \"%s\"\n"
#: nano.c:1365
msgid "Mark Set"
msgstr "Set Tanda"
@@ -1257,27 +1213,27 @@ msgstr "Edit pengganti"
#: nano.c:1686
msgid "Could not create pipe"
msgstr "Tidak dapat mem-pipe"
msgstr "Tidak dapat membuat pipe"
#: nano.c:1688
msgid "Creating misspelled word list, please wait..."
msgstr "Membuat daftar kata yang misspell, silakan tunggu..."
msgstr "Membuat daftar kata yang misspelled, silakan tunggu..."
#: nano.c:1784
msgid "Could not get size of pipe buffer"
msgstr "Tidak dapat mengambil ukuran buffer pipe"
msgstr "Tidak dapat menentukan ukuran buffer pipe"
#: nano.c:1836
msgid "Error invoking \"spell\""
msgstr "Kesalahan memanggil \"spell\""
msgstr "Gagal memanggil \"spell\""
#: nano.c:1839
msgid "Error invoking \"sort -f\""
msgstr "Kesalahan memanggil \"sort -f\""
msgstr "Gagal memanggil \"sort -f\""
#: nano.c:1842
msgid "Error invoking \"uniq\""
msgstr "Kesalahan memanggil \"uniq\""
msgstr "Gagal memanggil \"uniq\""
#: nano.c:1918
#, c-format
@@ -1365,48 +1321,6 @@ msgstr "tiadakan"
msgid "Tab size is too small for nano...\n"
msgstr "Ukuran tab terlalu kecil bagi nano...\n"
#: nano.c:3384
msgid "Main: set up windows\n"
msgstr "Main: menset jendela\n"
#: nano.c:3398
msgid "Main: bottom win\n"
msgstr "Main: jendela bawah\n"
#: nano.c:3404
msgid "Main: open file\n"
msgstr "Main: membuka file\n"
#: nano.c:3461
#, c-format
msgid "AHA! %c (%d)\n"
msgstr "AHA! %c (%d)\n"
#: nano.c:3481
#, c-format
msgid "I got Alt-O-%c! (%d)\n"
msgstr "Saya mendapat Alt-O-%c! (%d)\n"
#: nano.c:3508
#, c-format
msgid "I got Alt-[-1-%c! (%d)\n"
msgstr "Saya mendapat Alt-[-1-%c! (%d)\n"
#: nano.c:3538
#, c-format
msgid "I got Alt-[-2-%c! (%d)\n"
msgstr "Saya mendapat Alt-[-2-%c! (%d)\n"
#: nano.c:3607
#, c-format
msgid "I got Alt-[-%c! (%d)\n"
msgstr "Saya mendapat Alt-%c! (%d)\n"
#: nano.c:3653
#, c-format
msgid "I got Alt-%c! (%d)\n"
msgstr "Saya mendapat Alt-%c! (%d)\n"
#: nano.c:3711
msgid "XOFF ignored, mumble mumble."
msgstr "XOFF diabaikan, mumble mumble."
@@ -1415,11 +1329,6 @@ msgstr "XOFF diabaikan, mumble mumble."
msgid "XON ignored, mumble mumble."
msgstr "XON diabaikan, mumble mumble."
#: nano.c:3752
#, c-format
msgid "I got %c (%d)!\n"
msgstr "Saya mendapat %c (%d)\n"
#: rcfile.c:103
#, c-format
msgid "Error in %s on line %d: "
@@ -1464,14 +1373,6 @@ msgstr "String regexp harus dimulai dan diakhiri dengan sebuah karakter \"\n"
msgid "Missing syntax name"
msgstr "Nama sintaks tidak ada"
#: rcfile.c:298
msgid "Adding new syntax after 1st\n"
msgstr "Menambahkan sintaks baru setelah yang pertama\n"
#: rcfile.c:306
msgid "Starting a new syntax type\n"
msgstr "Memulai tipe sintaks baru\n"
#: rcfile.c:352
msgid "Missing color name"
msgstr "Nama warna tidak ada"
@@ -1480,35 +1381,15 @@ msgstr "Nama warna tidak ada"
msgid "Cannot add a color directive without a syntax line"
msgstr "Tidak dapat menambah direktif warna tanpa baris sintaks"
#: rcfile.c:420
#, c-format
msgid "Starting a new colorstring for fg %d bg %d\n"
msgstr "Memulai colorstring baru untuk fg %d bg %d\n"
#: rcfile.c:428
#, c-format
msgid "Adding new entry for fg %d bg %d\n"
msgstr "Menambahkan entri baru untuk fg %d bg%d\n"
#: rcfile.c:437
msgid "\"start=\" requires a corresponding \"end=\""
msgstr "\"start=\" membutuhkan \"end=\" yang sesuai"
#: rcfile.c:486
#, c-format
msgid "%s: Read a comment\n"
msgstr "%s: Baca sebuah komentar\n"
#: rcfile.c:509
#, c-format
msgid "command %s not understood"
msgstr "Perintah %s tidak dipahami"
#: rcfile.c:521
#, c-format
msgid "%s: Parsing option %s\n"
msgstr "%s: Opsi parsing %s\n"
#: rcfile.c:541
#, c-format
msgid "option %s requires an argument"
@@ -1524,16 +1405,6 @@ msgstr "ukuran fill yang diminta %d tidak valid"
msgid "requested tab size %d invalid"
msgstr "ukuran tab yang diminta %d tidak valid"
#: rcfile.c:598
#, c-format
msgid "set flag %d!\n"
msgstr "set flag %d!\n"
#: rcfile.c:604
#, c-format
msgid "unset flag %d!\n"
msgstr "unset flag %d!\n"
#: rcfile.c:614
msgid "Errors found in .nanorc file"
msgstr "Kesalahan ditemukan dalam file .nanorc"
@@ -1555,7 +1426,7 @@ msgstr "\"%s...\" tidak ditemukan"
#: search.c:105
#, c-format
msgid "Invalid regex \"%s\""
msgstr "Regex \"%s\" tidak valid"
msgstr "Regex tidak valid \"%s\""
#: search.c:133
msgid "Search"
@@ -1609,7 +1480,7 @@ msgstr "Ganti dengan"
#, c-format
msgid "Replaced %d occurrence"
msgid_plural "Replaced %d occurrences"
msgstr[0] "Mengganti %d"
msgstr[0] "%d tempat terganti"
#: search.c:777
msgid "Enter line number"
@@ -1631,138 +1502,203 @@ msgstr "Bukan tanda kurung"
msgid "No matching bracket"
msgstr "Tidak ada tanda kurung yang cocok"
#: utils.c:225 utils.c:235
#: utils.c:257 utils.c:267
msgid "nano is out of memory!"
msgstr "nano kehabisan memori!"
#: winio.c:90
#, c-format
msgid "actual_x for xplus=%d returns %d\n"
msgstr "actual_x for xplus=%d returns %d\n"
#: winio.c:245 winio.c:473
#, c-format
msgid "Aha! '%c' (%d)\n"
msgstr "Aha! '%c' (%d)\n"
#: winio.c:496
#, c-format
msgid "input '%c' (%d)\n"
msgstr "input '%c' (%d)\n"
#: winio.c:549
#: winio.c:600
msgid " File: ..."
msgstr " File: ..."
#: winio.c:551
#: winio.c:602
msgid " DIR: ..."
msgstr " DIR: ..."
#: winio.c:556
#: winio.c:607
msgid "File: "
msgstr "File: "
#: winio.c:559
#: winio.c:610
msgid " DIR: "
msgstr " DIR: "
#: winio.c:564
#: winio.c:615
msgid " Modified "
msgstr " Dimodifikasi "
#: winio.c:566
#: winio.c:617
msgid " View "
msgstr " View "
#: winio.c:752
#: winio.c:803
msgid "Refusing 0 length regex match"
msgstr "Menolak kecocokan regex panjang 0"
#: winio.c:1064
#, c-format
msgid "Moved to (%d, %d) in edit buffer\n"
msgstr "Pindah ke (%d, %d) dalam buffer edit\n"
#: winio.c:1215
#, c-format
msgid "I got \"%s\"\n"
msgstr "Saya dapat \"%s\"\n"
#: winio.c:1246
#: winio.c:1297
msgid "Yy"
msgstr "Yy"
#: winio.c:1247
#: winio.c:1298
msgid "Nn"
msgstr "Tt"
#: winio.c:1248
#: winio.c:1299
msgid "Aa"
msgstr "Aa"
#: winio.c:1259
#: winio.c:1310
msgid "Yes"
msgstr "Ya"
#: winio.c:1264
#: winio.c:1315
msgid "All"
msgstr "Semua"
#: winio.c:1269
#: winio.c:1320
msgid "No"
msgstr "Tidak"
#: winio.c:1448
#: winio.c:1499
#, c-format
msgid "line %ld/%ld (%d%%), col %lu/%lu (%d%%), char %lu/%ld (%d%%)"
msgstr "line %ld/%ld (%d%%), col %lu/%lu (%d%%), char %lu/%ld (%d%%)"
msgstr "baris %ld/%ld (%d%%), kol %lu/%lu (%d%%), char %lu/%ld (%d%%)"
#: winio.c:1704
msgid "Dumping file buffer to stderr...\n"
msgstr "Kirim buffer file ke stderr...\n"
#: winio.c:1706
msgid "Dumping cutbuffer to stderr...\n"
msgstr "Kirim cutbuffer ke stderr...\n"
#: winio.c:1708
msgid "Dumping a buffer to stderr...\n"
msgstr "Kirim buffer ke stderr...\n"
#: winio.c:1789
#: winio.c:1838
msgid "The nano text editor"
msgstr "Nano teks editor"
#: winio.c:1790
#: winio.c:1839
msgid "version "
msgstr "versi "
#: winio.c:1791
#: winio.c:1840
msgid "Brought to you by:"
msgstr "Dibuat untuk anda oleh:"
#: winio.c:1792
#: winio.c:1841
msgid "Special thanks to:"
msgstr "Ucapan terima kasih khusus kepada:"
#: winio.c:1793
#: winio.c:1842
msgid "The Free Software Foundation"
msgstr "The Free Software Foundation"
#: winio.c:1794
#: winio.c:1843
msgid "For ncurses:"
msgstr "Untuk ncurses:"
#: winio.c:1795
#: winio.c:1844
msgid "and anyone else we forgot..."
msgstr "dan orang lain yang kami lupa...."
#: winio.c:1796
#: winio.c:1845
msgid "Thank you for using nano!\n"
msgstr "Terima kasih telah menggunakan nano!\n"
#~ msgid "read_line: not on first line and prev is NULL"
#~ msgstr "read_line: tidak di baris pertama dan sebelumnya adalah NULL"
#~ msgid "add_to_cutbuffer() called with inptr->data = %s\n"
#~ msgstr "add_to_cutbuffer() dipanggil dgn inptr->data = %s\n"
#~ msgid "Blew away cutbuffer =)\n"
#~ msgstr "Hapus cutbuffer =)\n"
#~ msgid "filename is %s\n"
#~ msgstr "Namafile adalah %s\n"
#~ msgid "%s: free'd a node, YAY!\n"
#~ msgstr "%s: bebaskan sebuah node, YAY!\n"
#~ msgid "%s: free'd last node.\n"
#~ msgstr "%s: bebaskan node terakhir.\n"
#~ msgid "Backing up %s to %s\n"
#~ msgstr "Backup %s ke %s\n"
#~ msgid "Wrote >%s\n"
#~ msgstr "Tulis >%s\n"
#~ msgid "current->data now = \"%s\"\n"
#~ msgstr "current->data sekarang =\"%s\"\n"
#~ msgid "After, data = \"%s\"\n"
#~ msgstr "Setelah, data= \"%s\"\n"
#~ msgid "Main: set up windows\n"
#~ msgstr "Main: menset jendela\n"
#~ msgid "Main: bottom win\n"
#~ msgstr "Main: jendela bawah\n"
#~ msgid "Main: open file\n"
#~ msgstr "Main: membuka file\n"
#~ msgid "AHA! %c (%d)\n"
#~ msgstr "AHA! %c (%d)\n"
#~ msgid "I got Alt-O-%c! (%d)\n"
#~ msgstr "Saya mendapat Alt-O-%c! (%d)\n"
#~ msgid "I got Alt-[-1-%c! (%d)\n"
#~ msgstr "Saya mendapat Alt-[-1-%c! (%d)\n"
#~ msgid "I got Alt-[-2-%c! (%d)\n"
#~ msgstr "Saya mendapat Alt-[-2-%c! (%d)\n"
#~ msgid "I got Alt-[-%c! (%d)\n"
#~ msgstr "Saya mendapat Alt-%c! (%d)\n"
#~ msgid "I got Alt-%c! (%d)\n"
#~ msgstr "Saya mendapat Alt-%c! (%d)\n"
#~ msgid "I got %c (%d)!\n"
#~ msgstr "Saya mendapat %c (%d)\n"
#~ msgid "Adding new syntax after 1st\n"
#~ msgstr "Menambahkan sintaks baru setelah yang pertama\n"
#~ msgid "Starting a new syntax type\n"
#~ msgstr "Memulai tipe sintaks baru\n"
#~ msgid "Starting a new colorstring for fg %d bg %d\n"
#~ msgstr "Memulai colorstring baru untuk fg %d bg %d\n"
#~ msgid "Adding new entry for fg %d bg %d\n"
#~ msgstr "Menambahkan entri baru untuk fg %d bg%d\n"
#~ msgid "%s: Read a comment\n"
#~ msgstr "%s: Membaca sebuah komentar\n"
#~ msgid "%s: Parsing option %s\n"
#~ msgstr "%s: Opsi parsing %s\n"
#~ msgid "set flag %d!\n"
#~ msgstr "set flag %d!\n"
#~ msgid "unset flag %d!\n"
#~ msgstr "unset flag %d!\n"
#~ msgid "actual_x for xplus=%d returns %d\n"
#~ msgstr "actual_x for xplus=%d returns %d\n"
#~ msgid "Aha! '%c' (%d)\n"
#~ msgstr "Aha! '%c' (%d)\n"
#~ msgid "input '%c' (%d)\n"
#~ msgstr "input '%c' (%d)\n"
#~ msgid "Moved to (%d, %d) in edit buffer\n"
#~ msgstr "Pindah ke (%d, %d) dalam buffer edit\n"
#~ msgid "I got \"%s\"\n"
#~ msgstr "Saya dapat \"%s\"\n"
#~ msgid "Dumping file buffer to stderr...\n"
#~ msgstr "Kirim buffer file ke stderr...\n"
#~ msgid "Dumping cutbuffer to stderr...\n"
#~ msgstr "Kirim cutbuffer ke stderr...\n"
#~ msgid "Dumping a buffer to stderr...\n"
#~ msgstr "Kirim buffer ke stderr...\n"
#~ msgid "delete_opennode(): free'd a node, YAY!\n"
#~ msgstr "delete_node(): bebaskan sebuah node, YAY!\n"
@@ -1773,6 +1709,53 @@ msgstr "Terima kasih telah menggunakan nano!\n"
#~ msgid "Can't visit parent in restricted mode"
#~ msgstr "Tidak dapat mengunjungi parent dalam mode terbatas"
#~ msgid "-p"
#~ msgstr "-p"
#~ msgid "--preserve"
#~ msgstr "--preserve"
#~ msgid ""
#~ "\n"
#~ "The -p flag now invokes the Pico \"preserve\" flag. The Pico\n"
#~ msgstr ""
#~ "\n"
#~ "Flag -p sekarang memanggil flag \"preserve\" Pico. Flag\n"
#~ msgid "compatibility flag has been removed as nano is now fully Pico\n"
#~ msgstr ""
#~ "kompatibilitas Pico telah dihilangkan karena nano sekarang sangat "
#~ "kompatibel\n"
#~ msgid ""
#~ "compatible. Please see the nano FAQ for more info on this change...\n"
#~ "\n"
#~ msgstr ""
#~ "terhadap Pico. Silakan lihat FAQ nano untuk informasi lebih lanjut "
#~ "tentang perubahan ini...\n"
#~ "\n"
#~ msgid "Press return to continue\n"
#~ msgstr "Tekan return untuk lanjut\n"
#~ msgid "Generic error"
#~ msgstr "Kesalahan generik"
#~ msgid "string val=%s\n"
#~ msgstr "string val=%s\n"
#~ msgid "For end part, beginning = \"%s\"\n"
#~ msgstr "Untuk bagian akhir, awal = \"%s\"\n"
#~ msgid "current->data = \"%s\"\n"
#~ msgstr "current->data = \"%s\"\n"
#~ msgid "do_cursorpos: linepct = %f, bytepct = %f\n"
#~ msgstr "do_cursorpos: linepct = %f, bytepct = %f\n"
#~ msgid "read_line: not on first line and prev is NULL"
#~ msgstr "read_line: tidak di baris pertama dan sebelumnya adalah NULL"
#~ msgid "Pico mode"
#~ msgstr "Mode Pico"
@@ -1785,12 +1768,6 @@ msgstr "Terima kasih telah menggunakan nano!\n"
#~ msgid ".?!"
#~ msgstr ".?!"
#~ msgid "string val=%s\n"
#~ msgstr "string val=%s\n"
#~ msgid "For end part, beginning = \"%s\"\n"
#~ msgstr "Untuk bagian akhir, awal = \"%s\"\n"
#~ msgid "Replaced 1 occurrence"
#~ msgstr "Terganti 1 tempat"
@@ -1799,9 +1776,3 @@ msgstr "Terima kasih telah menggunakan nano!\n"
#~ msgid "nano: realloc: out of memory!"
#~ msgstr "nano: realloc: memori habis!"
#~ msgid "current->data = \"%s\"\n"
#~ msgstr "current->data = \"%s\"\n"
#~ msgid "do_cursorpos: linepct = %f, bytepct = %f\n"
#~ msgstr "do_cursorpos: linepct = %f, bytepct = %f\n"

2189
po/it.po

File diff suppressed because it is too large Load Diff

2035
po/ms.po

File diff suppressed because it is too large Load Diff

2480
po/nb.po

File diff suppressed because it is too large Load Diff

434
po/nl.po
View File

@@ -5,7 +5,8 @@
msgid ""
msgstr ""
"Project-Id-Version: nano 1.2.0\n"
"POT-Creation-Date: 2003-04-19 23:02-0400\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2003-08-11 21:49-0400\n"
"PO-Revision-Date: 2003-02-22 16:31:14+0100\n"
"Last-Translator: Guus Sliepen <guus@sliepen.warande.net>\n"
"Language-Team: Dutch <vertaling@nl.linux.org>\n"
@@ -14,15 +15,6 @@ msgstr ""
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: cut.c:49
#, c-format
msgid "add_to_cutbuffer() called with inptr->data = %s\n"
msgstr "add_to_cutbuffer() aangeroepen met inptr->data = %s\n"
#: cut.c:213
msgid "Blew away cutbuffer =)\n"
msgstr "Knipbuffer weggeblazen =)\n"
#: files.c:317
#, c-format
msgid "Read %d line (Converted from Mac format)"
@@ -85,12 +77,6 @@ msgstr "Bestand om in nieuwe buffer in te voegen [van ./] "
msgid "File to insert [from ./] "
msgstr "Bestand om in te voegen [vanaf ./] "
#: files.c:479 files.c:736 files.c:793 files.c:881 files.c:893 files.c:944
#: files.c:955 files.c:1815
#, c-format
msgid "filename is %s\n"
msgstr "bestandsnaam is %s\n"
#: files.c:495
msgid "Command to execute"
msgstr "Opdracht om uit te voeren"
@@ -108,16 +94,6 @@ msgstr "Kan bestand van buiten %s niet invoegen"
msgid "Key illegal in non-multibuffer mode"
msgstr "Toets illegaal in niet-multibuffer modus"
#: files.c:704 nano.c:565
#, c-format
msgid "%s: free'd a node, YAY!\n"
msgstr "%s: node vrijgegeven, JOEPIE!\n"
#: files.c:709 nano.c:570
#, c-format
msgid "%s: free'd last node.\n"
msgstr "%s: laatste node vrijgegeven.\n"
#: files.c:873 files.c:936
msgid "No more open files"
msgstr "Geen open bestanden over"
@@ -142,11 +118,6 @@ msgstr "Kon %s niet lezen om veiligheidskopie te maken: %s"
msgid "Couldn't write backup: %s"
msgstr "Kon geen veiligheidskopie maken: %s"
#: files.c:1401
#, c-format
msgid "Backing up %s to %s\n"
msgstr "Aanmaken veiligheidskopie %s van %s\n"
#: files.c:1413
#, c-format
msgid "Could not set permissions %o on backup %s: %s"
@@ -169,11 +140,6 @@ msgstr ""
msgid "Could not open file for writing: %s"
msgstr "Kon bestand niet openen om naar te schrijven: %s"
#: files.c:1516
#, c-format
msgid "Wrote >%s\n"
msgstr ">%s geschreven\n"
#: files.c:1572
#, c-format
msgid "Could not close %s: %s"
@@ -526,215 +492,215 @@ msgstr "Open volgend ingeladen bestand"
msgid "Toggle insert into new buffer"
msgstr "Omschakelen invoegen in nieuwe buffer"
#: global.c:418 global.c:565 global.c:605 global.c:641 global.c:660
#: global.c:690 global.c:722 global.c:744 global.c:754 global.c:764
#: global.c:784
#: global.c:418 global.c:578 global.c:627 global.c:664 global.c:683
#: global.c:713 global.c:751 global.c:775 global.c:785 global.c:795
#: global.c:816
msgid "Get Help"
msgstr "Toon hulp"
#: global.c:424
#: global.c:425
msgid "Close"
msgstr "Sluit"
#: global.c:430 global.c:683
#: global.c:432 global.c:706
msgid "Exit"
msgstr "Afsluiten"
#: global.c:434
#: global.c:437
msgid "WriteOut"
msgstr "Schrijven"
#: global.c:438
#: global.c:442
msgid "Justify"
msgstr "Uitlijnen"
#: global.c:443
#: global.c:448
msgid "Read File"
msgstr "Lees bestand"
#: global.c:452
#: global.c:458
msgid "Where Is"
msgstr "Zoek"
#: global.c:456 global.c:675 global.c:770
#: global.c:463 global.c:698 global.c:801
msgid "Prev Page"
msgstr "Vorige Pagina"
#: global.c:460 global.c:679 global.c:774
#: global.c:468 global.c:702 global.c:805
msgid "Next Page"
msgstr "Volgende Pagina"
#: global.c:464
#: global.c:473
msgid "Cut Text"
msgstr "Snij"
#: global.c:469
#: global.c:479
msgid "UnJustify"
msgstr "OnUitlijnen"
#: global.c:473
#: global.c:484
msgid "UnCut Txt"
msgstr "Plak"
#: global.c:477
#: global.c:489
msgid "Cur Pos"
msgstr "Positie"
#: global.c:481
#: global.c:494
msgid "To Spell"
msgstr "Spelling"
#: global.c:485 nano.c:420 winio.c:604
#: global.c:498 nano.c:420 winio.c:655
msgid "Up"
msgstr "Op"
#: global.c:489
#: global.c:502
msgid "Down"
msgstr "Neer"
#: global.c:493
#: global.c:506
msgid "Forward"
msgstr "Voorwaarts"
#: global.c:497
#: global.c:510
msgid "Back"
msgstr "Terug"
#: global.c:501
#: global.c:514
msgid "Home"
msgstr "Begin"
#: global.c:505
#: global.c:518
msgid "End"
msgstr "Eind"
#: global.c:509
#: global.c:522
msgid "Refresh"
msgstr "Verfris"
#: global.c:513
#: global.c:526
msgid "Mark Text"
msgstr "Markeer"
#: global.c:517
#: global.c:530
msgid "Delete"
msgstr "Verwijder"
#: global.c:521
#: global.c:534
msgid "Backspace"
msgstr "Backspace"
#: global.c:525
#: global.c:538
msgid "Tab"
msgstr "Tab"
#: global.c:528 global.c:578
#: global.c:541 global.c:595
msgid "Replace"
msgstr "Vervang"
#: global.c:532
#: global.c:545
msgid "Enter"
msgstr "Enter"
#: global.c:536 global.c:581 global.c:620
#: global.c:549 global.c:599 global.c:643
msgid "Go To Line"
msgstr "Ga naar regel"
#: global.c:541
#: global.c:554
msgid "Next Word"
msgstr "Volgend woord"
#: global.c:542
#: global.c:555
msgid "Move forward one word"
msgstr "Ga <20><>n woord verder"
#: global.c:545
#: global.c:558
msgid "Prev Word"
msgstr "Vorig woord"
#: global.c:546
#: global.c:559
msgid "Move backward one word"
msgstr "Ga <20><>n woord terug"
#: global.c:550
#: global.c:563
msgid "Find Other Bracket"
msgstr "Vind andere rechte haak"
#: global.c:555
#: global.c:568
msgid "Previous File"
msgstr "Vorig bestand"
#: global.c:558
#: global.c:571
msgid "Next File"
msgstr "Volgend bestand"
#: global.c:568 global.c:608 global.c:644 global.c:663 global.c:717
#: global.c:725 global.c:747 global.c:757 global.c:767 global.c:787
#: winio.c:1272
#: global.c:582 global.c:630 global.c:667 global.c:686 global.c:746
#: global.c:754 global.c:778 global.c:788 global.c:798 global.c:819
#: winio.c:1323
msgid "Cancel"
msgstr "Afbreken"
#: global.c:571 global.c:611 global.c:647 global.c:666
#: global.c:586 global.c:633 global.c:670 global.c:689
msgid "First Line"
msgstr "Eerste regel"
#: global.c:575 global.c:614 global.c:650 global.c:669
#: global.c:591 global.c:636 global.c:673 global.c:692
msgid "Last Line"
msgstr "Laatste regel"
#: global.c:585 global.c:624
#: global.c:604 global.c:647
msgid "Case Sens"
msgstr "Kast-gevoelig"
#: global.c:588 global.c:627
#: global.c:608 global.c:650
msgid "Direction"
msgstr "Richting"
#: global.c:592 global.c:631
#: global.c:613 global.c:654
msgid "Regexp"
msgstr "Regexp"
#: global.c:597 global.c:635 global.c:654
#: global.c:619 global.c:658 global.c:677
msgid "History"
msgstr "Geschiedenis"
#: global.c:617
#: global.c:640
msgid "No Replace"
msgstr "Geen vervanging"
#: global.c:694 global.c:729
#: global.c:718 global.c:758
msgid "To Files"
msgstr "Naar bestanden"
#: global.c:699
#: global.c:724
msgid "DOS Format"
msgstr "DOS formaat"
#: global.c:702
#: global.c:728
msgid "Mac Format"
msgstr "Mac formaat"
#: global.c:706
#: global.c:733
msgid "Append"
msgstr "Voeg achteraan toe"
#: global.c:709
#: global.c:737
msgid "Prepend"
msgstr "Voeg vooraan toe"
#: global.c:713
#: global.c:742
msgid "Backup File"
msgstr "Maak veiligheidskopie"
#: global.c:733
#: global.c:763
msgid "Execute Command"
msgstr "Voer opdracht uit"
#: global.c:736 winio.c:545
#: global.c:767 winio.c:596
msgid "New Buffer"
msgstr "Nieuwe buffer"
#: global.c:778
#: global.c:810
msgid "Go To Dir"
msgstr "Ga naar map"
@@ -1240,16 +1206,6 @@ msgstr "Kon niet doorsluizen"
msgid "Could not fork"
msgstr "Kon geen nieuw proces opstarten"
#: nano.c:1032
#, c-format
msgid "current->data now = \"%s\"\n"
msgstr "current->data nu = \"%s\"\n"
#: nano.c:1092
#, c-format
msgid "After, data = \"%s\"\n"
msgstr "Na afloop, data = \"%s\"\n"
#: nano.c:1365
msgid "Mark Set"
msgstr "Markering gezet"
@@ -1374,48 +1330,6 @@ msgstr "uitgezet"
msgid "Tab size is too small for nano...\n"
msgstr "Tabgrootte te klein voor nano...\n"
#: nano.c:3384
msgid "Main: set up windows\n"
msgstr "Main: vensters instellen\n"
#: nano.c:3398
msgid "Main: bottom win\n"
msgstr "Main: onderste venster\n"
#: nano.c:3404
msgid "Main: open file\n"
msgstr "Main: bestand openen\n"
#: nano.c:3461
#, c-format
msgid "AHA! %c (%d)\n"
msgstr "AHA! %c (%d)\n"
#: nano.c:3481
#, c-format
msgid "I got Alt-O-%c! (%d)\n"
msgstr "Ik kreeg Alt-O-%c! (%d)\n"
#: nano.c:3508
#, c-format
msgid "I got Alt-[-1-%c! (%d)\n"
msgstr "Ik kreeg Alt-[-1-%c! (%d)\n"
#: nano.c:3538
#, c-format
msgid "I got Alt-[-2-%c! (%d)\n"
msgstr "Ik kreeg Alt-[-2-%c! (%d)\n"
#: nano.c:3607
#, c-format
msgid "I got Alt-[-%c! (%d)\n"
msgstr "Ik kreeg Alt-[-%c! (%d)\n"
#: nano.c:3653
#, c-format
msgid "I got Alt-%c! (%d)\n"
msgstr "Ik kreeg Alt-%c! (%d)\n"
#: nano.c:3711
msgid "XOFF ignored, mumble mumble."
msgstr "XOFF genegeerd, mopper mopper."
@@ -1424,11 +1338,6 @@ msgstr "XOFF genegeerd, mopper mopper."
msgid "XON ignored, mumble mumble."
msgstr "XON genegeerd, mopper mopper."
#: nano.c:3752
#, c-format
msgid "I got %c (%d)!\n"
msgstr "Ik kreeg %c! (%d)\n"
#: rcfile.c:103
#, c-format
msgid "Error in %s on line %d: "
@@ -1473,14 +1382,6 @@ msgstr "regex strings moeten beginnen en eindigen met een \" karakter\n"
msgid "Missing syntax name"
msgstr "Missende syntaxnaam"
#: rcfile.c:298
msgid "Adding new syntax after 1st\n"
msgstr "Toevoegen nieuwe syntax na eerste\n"
#: rcfile.c:306
msgid "Starting a new syntax type\n"
msgstr "Starten van een nieuw syntaxtype\n"
#: rcfile.c:352
msgid "Missing color name"
msgstr "Missende kleurnaam"
@@ -1489,35 +1390,15 @@ msgstr "Missende kleurnaam"
msgid "Cannot add a color directive without a syntax line"
msgstr "Kan geen kleurentekst toevoegen zonder syntaxregel"
#: rcfile.c:420
#, c-format
msgid "Starting a new colorstring for fg %d bg %d\n"
msgstr "Starten van een nieuwe kleurentekst voor voorgrond %d achtergrond %d\n"
#: rcfile.c:428
#, c-format
msgid "Adding new entry for fg %d bg %d\n"
msgstr "Toevoegen nieuwe invoer voor voorgrond %d achtergrond %d\n"
#: rcfile.c:437
msgid "\"start=\" requires a corresponding \"end=\""
msgstr "\"start=\" benodigt een corresponderende \"end=\""
#: rcfile.c:486
#, c-format
msgid "%s: Read a comment\n"
msgstr "%s: Lees een regel commentaar\n"
#: rcfile.c:509
#, c-format
msgid "command %s not understood"
msgstr "commando %s niet begrepen"
#: rcfile.c:521
#, c-format
msgid "%s: Parsing option %s\n"
msgstr "%s: Ontleden optie %s\n"
#: rcfile.c:541
#, c-format
msgid "option %s requires an argument"
@@ -1533,16 +1414,6 @@ msgstr "gevraagde vulgrootte %d ongeldig"
msgid "requested tab size %d invalid"
msgstr "gevraagde tabgrootte %d ongeldig"
#: rcfile.c:598
#, c-format
msgid "set flag %d!\n"
msgstr "zet vlag %d aan!\n"
#: rcfile.c:604
#, c-format
msgid "unset flag %d!\n"
msgstr "zet vlag %d uit!\n"
#: rcfile.c:614
msgid "Errors found in .nanorc file"
msgstr "Fouten gevonden in .nanorc bestand"
@@ -1641,132 +1512,201 @@ msgstr "Geen rechte haak"
msgid "No matching bracket"
msgstr "Geen overeenkomende rechte haak"
#: utils.c:225 utils.c:235
#: utils.c:257 utils.c:267
msgid "nano is out of memory!"
msgstr "nano heeft geen geheugen meer!"
#: winio.c:90
#, c-format
msgid "actual_x for xplus=%d returns %d\n"
msgstr "actual_x voor xplus=%d gaf %d\n"
#: winio.c:245 winio.c:473
#, c-format
msgid "Aha! '%c' (%d)\n"
msgstr "Aha! '%c' (%d)\n"
#: winio.c:496
#, c-format
msgid "input '%c' (%d)\n"
msgstr "invoer '%c' (%d)\n"
#: winio.c:549
#: winio.c:600
msgid " File: ..."
msgstr " Bestand: ..."
#: winio.c:551
#: winio.c:602
msgid " DIR: ..."
msgstr " Map: ..."
#: winio.c:556
#: winio.c:607
msgid "File: "
msgstr "Bestand: "
#: winio.c:559
#: winio.c:610
msgid " DIR: "
msgstr " Map: "
#: winio.c:564
#: winio.c:615
msgid " Modified "
msgstr " Veranderd "
#: winio.c:566
#: winio.c:617
msgid " View "
msgstr " Toon "
#: winio.c:752
#: winio.c:803
msgid "Refusing 0 length regex match"
msgstr "Weigering regex overeenkomst van lengte 0"
#: winio.c:1064
#, c-format
msgid "Moved to (%d, %d) in edit buffer\n"
msgstr "Ging naar (%d, %d) in bewerkingsbuffer\n"
#: winio.c:1215
#, c-format
msgid "I got \"%s\"\n"
msgstr "Ik kreeg \"%s\"\n"
#: winio.c:1246
#: winio.c:1297
msgid "Yy"
msgstr "Jj"
#: winio.c:1247
#: winio.c:1298
msgid "Nn"
msgstr "Nn"
#: winio.c:1248
#: winio.c:1299
msgid "Aa"
msgstr "Aa"
#: winio.c:1259
#: winio.c:1310
msgid "Yes"
msgstr "Ja"
#: winio.c:1264
#: winio.c:1315
msgid "All"
msgstr "Alle"
#: winio.c:1269
#: winio.c:1320
msgid "No"
msgstr "Nee"
#: winio.c:1448
#: winio.c:1499
#, c-format
msgid "line %ld/%ld (%d%%), col %lu/%lu (%d%%), char %lu/%ld (%d%%)"
msgstr "regel %ld/%ld (%d%%), kolom %lu/%lu (%d%%), karakter %lu/%ld (%d%%)"
#: winio.c:1704
msgid "Dumping file buffer to stderr...\n"
msgstr "Dumpen bestandsbuffer naar stderr...\n"
#: winio.c:1706
msgid "Dumping cutbuffer to stderr...\n"
msgstr "Dumpen snijbuffer naar stderr...\n"
#: winio.c:1708
msgid "Dumping a buffer to stderr...\n"
msgstr "Dumpen buffer naar stderr...\n"
#: winio.c:1789
#: winio.c:1838
msgid "The nano text editor"
msgstr "De nano tekst editor"
#: winio.c:1790
#: winio.c:1839
msgid "version "
msgstr "versie "
#: winio.c:1791
#: winio.c:1840
msgid "Brought to you by:"
msgstr "U gebracht door:"
#: winio.c:1792
#: winio.c:1841
msgid "Special thanks to:"
msgstr "Speciale dank aan:"
#: winio.c:1793
#: winio.c:1842
msgid "The Free Software Foundation"
msgstr "De Free Software Foundation"
#: winio.c:1794
#: winio.c:1843
msgid "For ncurses:"
msgstr "Voor ncurses:"
#: winio.c:1795
#: winio.c:1844
msgid "and anyone else we forgot..."
msgstr "en iedereen die we vergeten zijn..."
#: winio.c:1796
#: winio.c:1845
msgid "Thank you for using nano!\n"
msgstr "Dank u voor het gebruiken van nano!\n"
#~ msgid "add_to_cutbuffer() called with inptr->data = %s\n"
#~ msgstr "add_to_cutbuffer() aangeroepen met inptr->data = %s\n"
#~ msgid "Blew away cutbuffer =)\n"
#~ msgstr "Knipbuffer weggeblazen =)\n"
#~ msgid "filename is %s\n"
#~ msgstr "bestandsnaam is %s\n"
#~ msgid "%s: free'd a node, YAY!\n"
#~ msgstr "%s: node vrijgegeven, JOEPIE!\n"
#~ msgid "%s: free'd last node.\n"
#~ msgstr "%s: laatste node vrijgegeven.\n"
#~ msgid "Backing up %s to %s\n"
#~ msgstr "Aanmaken veiligheidskopie %s van %s\n"
#~ msgid "Wrote >%s\n"
#~ msgstr ">%s geschreven\n"
#~ msgid "current->data now = \"%s\"\n"
#~ msgstr "current->data nu = \"%s\"\n"
#~ msgid "After, data = \"%s\"\n"
#~ msgstr "Na afloop, data = \"%s\"\n"
#~ msgid "Main: set up windows\n"
#~ msgstr "Main: vensters instellen\n"
#~ msgid "Main: bottom win\n"
#~ msgstr "Main: onderste venster\n"
#~ msgid "Main: open file\n"
#~ msgstr "Main: bestand openen\n"
#~ msgid "AHA! %c (%d)\n"
#~ msgstr "AHA! %c (%d)\n"
#~ msgid "I got Alt-O-%c! (%d)\n"
#~ msgstr "Ik kreeg Alt-O-%c! (%d)\n"
#~ msgid "I got Alt-[-1-%c! (%d)\n"
#~ msgstr "Ik kreeg Alt-[-1-%c! (%d)\n"
#~ msgid "I got Alt-[-2-%c! (%d)\n"
#~ msgstr "Ik kreeg Alt-[-2-%c! (%d)\n"
#~ msgid "I got Alt-[-%c! (%d)\n"
#~ msgstr "Ik kreeg Alt-[-%c! (%d)\n"
#~ msgid "I got Alt-%c! (%d)\n"
#~ msgstr "Ik kreeg Alt-%c! (%d)\n"
#~ msgid "I got %c (%d)!\n"
#~ msgstr "Ik kreeg %c! (%d)\n"
#~ msgid "Adding new syntax after 1st\n"
#~ msgstr "Toevoegen nieuwe syntax na eerste\n"
#~ msgid "Starting a new syntax type\n"
#~ msgstr "Starten van een nieuw syntaxtype\n"
#~ msgid "Starting a new colorstring for fg %d bg %d\n"
#~ msgstr ""
#~ "Starten van een nieuwe kleurentekst voor voorgrond %d achtergrond %d\n"
#~ msgid "Adding new entry for fg %d bg %d\n"
#~ msgstr "Toevoegen nieuwe invoer voor voorgrond %d achtergrond %d\n"
#~ msgid "%s: Read a comment\n"
#~ msgstr "%s: Lees een regel commentaar\n"
#~ msgid "%s: Parsing option %s\n"
#~ msgstr "%s: Ontleden optie %s\n"
#~ msgid "set flag %d!\n"
#~ msgstr "zet vlag %d aan!\n"
#~ msgid "unset flag %d!\n"
#~ msgstr "zet vlag %d uit!\n"
#~ msgid "actual_x for xplus=%d returns %d\n"
#~ msgstr "actual_x voor xplus=%d gaf %d\n"
#~ msgid "Aha! '%c' (%d)\n"
#~ msgstr "Aha! '%c' (%d)\n"
#~ msgid "input '%c' (%d)\n"
#~ msgstr "invoer '%c' (%d)\n"
#~ msgid "Moved to (%d, %d) in edit buffer\n"
#~ msgstr "Ging naar (%d, %d) in bewerkingsbuffer\n"
#~ msgid "I got \"%s\"\n"
#~ msgstr "Ik kreeg \"%s\"\n"
#~ msgid "Dumping file buffer to stderr...\n"
#~ msgstr "Dumpen bestandsbuffer naar stderr...\n"
#~ msgid "Dumping cutbuffer to stderr...\n"
#~ msgstr "Dumpen snijbuffer naar stderr...\n"
#~ msgid "Dumping a buffer to stderr...\n"
#~ msgstr "Dumpen buffer naar stderr...\n"

427
po/nn.po
View File

@@ -7,7 +7,8 @@
msgid ""
msgstr ""
"Project-Id-Version: nano 1.1.6\n"
"POT-Creation-Date: 2003-04-19 23:02-0400\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2003-08-11 21:49-0400\n"
"PO-Revision-Date: 2002-01-26 02:49+0100\n"
"Last-Translator: Kjetil Torgrim Homme <kjetilho@linpro.no>\n"
"Language-Team: Norwegian nynorsk <i18n-nn@lister.ping.uio.no>\n"
@@ -15,15 +16,6 @@ msgstr ""
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
#: cut.c:49
#, fuzzy, c-format
msgid "add_to_cutbuffer() called with inptr->data = %s\n"
msgstr "add_to_cutbuffer vart kalla med inptr->data = %s\n"
#: cut.c:213
msgid "Blew away cutbuffer =)\n"
msgstr "Tømte utklippsbufferet\n"
#: files.c:317
#, fuzzy, c-format
msgid "Read %d line (Converted from Mac format)"
@@ -88,12 +80,6 @@ msgstr "Fil som skal setjast inn [fr
msgid "File to insert [from ./] "
msgstr "Fil som skal setjast inn [frå ./] "
#: files.c:479 files.c:736 files.c:793 files.c:881 files.c:893 files.c:944
#: files.c:955 files.c:1815
#, fuzzy, c-format
msgid "filename is %s\n"
msgstr "filnamnet er %s"
#: files.c:495
msgid "Command to execute"
msgstr ""
@@ -111,16 +97,6 @@ msgstr "Kan ikkje setja inn fil fr
msgid "Key illegal in non-multibuffer mode"
msgstr "Tasten er ugyldig utan fleire buffer"
#: files.c:704 nano.c:565
#, fuzzy, c-format
msgid "%s: free'd a node, YAY!\n"
msgstr "delete_node(): frigjorde ein node, HURRA!\n"
#: files.c:709 nano.c:570
#, fuzzy, c-format
msgid "%s: free'd last node.\n"
msgstr "delete_node(): frigjorde siste node.\n"
#: files.c:873 files.c:936
msgid "No more open files"
msgstr "Ingen fleire opne filer"
@@ -145,11 +121,6 @@ msgstr "Kunne ikkje opna %s for skriving: %s"
msgid "Couldn't write backup: %s"
msgstr "Kunne ikkje lukka %s: %s"
#: files.c:1401
#, c-format
msgid "Backing up %s to %s\n"
msgstr ""
#: files.c:1413
#, fuzzy, c-format
msgid "Could not set permissions %o on backup %s: %s"
@@ -171,11 +142,6 @@ msgstr "Kunne ikkje setja tilgangsniv
msgid "Could not open file for writing: %s"
msgstr "Kunne ikkje opna fila for skriving: %s"
#: files.c:1516
#, c-format
msgid "Wrote >%s\n"
msgstr "Skreiv >%s\n"
#: files.c:1572
#, c-format
msgid "Could not close %s: %s"
@@ -544,221 +510,221 @@ msgstr "Opna neste leste fil"
msgid "Toggle insert into new buffer"
msgstr ""
#: global.c:418 global.c:565 global.c:605 global.c:641 global.c:660
#: global.c:690 global.c:722 global.c:744 global.c:754 global.c:764
#: global.c:784
#: global.c:418 global.c:578 global.c:627 global.c:664 global.c:683
#: global.c:713 global.c:751 global.c:775 global.c:785 global.c:795
#: global.c:816
msgid "Get Help"
msgstr "Hjelp"
#: global.c:424
#: global.c:425
msgid "Close"
msgstr "Lukk"
#: global.c:430 global.c:683
#: global.c:432 global.c:706
msgid "Exit"
msgstr "Avslutt"
#: global.c:434
#: global.c:437
msgid "WriteOut"
msgstr "Lagra"
#: global.c:438
#: global.c:442
msgid "Justify"
msgstr "Brekk om"
#: global.c:443
#: global.c:448
msgid "Read File"
msgstr "Les fil"
#: global.c:452
#: global.c:458
msgid "Where Is"
msgstr "Finn"
#: global.c:456 global.c:675 global.c:770
#: global.c:463 global.c:698 global.c:801
msgid "Prev Page"
msgstr "Førre side"
#: global.c:460 global.c:679 global.c:774
#: global.c:468 global.c:702 global.c:805
msgid "Next Page"
msgstr "Neste side"
#: global.c:464
#: global.c:473
msgid "Cut Text"
msgstr "Klipp"
#: global.c:469
#: global.c:479
msgid "UnJustify"
msgstr "U-ombrekk"
#: global.c:473
#: global.c:484
msgid "UnCut Txt"
msgstr "U-klipp"
#: global.c:477
#: global.c:489
msgid "Cur Pos"
msgstr "Posisjon"
#: global.c:481
#: global.c:494
msgid "To Spell"
msgstr "Staving"
#: global.c:485 nano.c:420 winio.c:604
#: global.c:498 nano.c:420 winio.c:655
msgid "Up"
msgstr "Opp"
#: global.c:489
#: global.c:502
msgid "Down"
msgstr "Ned"
#: global.c:493
#: global.c:506
msgid "Forward"
msgstr "Framover"
#: global.c:497
#: global.c:510
msgid "Back"
msgstr "Bakover"
#: global.c:501
#: global.c:514
msgid "Home"
msgstr "Home"
#: global.c:505
#: global.c:518
msgid "End"
msgstr "End"
#: global.c:509
#: global.c:522
msgid "Refresh"
msgstr "Frisk opp"
#: global.c:513
#: global.c:526
msgid "Mark Text"
msgstr "Merk tekst"
#: global.c:517
#: global.c:530
msgid "Delete"
msgstr "Delete"
#: global.c:521
#: global.c:534
msgid "Backspace"
msgstr "Backspace"
#: global.c:525
#: global.c:538
msgid "Tab"
msgstr "Tab"
#: global.c:528 global.c:578
#: global.c:541 global.c:595
msgid "Replace"
msgstr "Erstatt"
#: global.c:532
#: global.c:545
msgid "Enter"
msgstr "Enter"
#: global.c:536 global.c:581 global.c:620
#: global.c:549 global.c:599 global.c:643
#, fuzzy
msgid "Go To Line"
msgstr "Gå til linje"
#: global.c:541
#: global.c:554
msgid "Next Word"
msgstr ""
#: global.c:542
#: global.c:555
#, fuzzy
msgid "Move forward one word"
msgstr "Gå ein bokstav fram"
#: global.c:545
#: global.c:558
msgid "Prev Word"
msgstr ""
#: global.c:546
#: global.c:559
#, fuzzy
msgid "Move backward one word"
msgstr "Gå ein bokstav attende"
#: global.c:550
#: global.c:563
msgid "Find Other Bracket"
msgstr "Finn den andre klamma"
#: global.c:555
#: global.c:568
msgid "Previous File"
msgstr ""
#: global.c:558
#: global.c:571
#, fuzzy
msgid "Next File"
msgstr "Ny fil"
#: global.c:568 global.c:608 global.c:644 global.c:663 global.c:717
#: global.c:725 global.c:747 global.c:757 global.c:767 global.c:787
#: winio.c:1272
#: global.c:582 global.c:630 global.c:667 global.c:686 global.c:746
#: global.c:754 global.c:778 global.c:788 global.c:798 global.c:819
#: winio.c:1323
msgid "Cancel"
msgstr "Avbryt"
#: global.c:571 global.c:611 global.c:647 global.c:666
#: global.c:586 global.c:633 global.c:670 global.c:689
msgid "First Line"
msgstr "Første linje"
#: global.c:575 global.c:614 global.c:650 global.c:669
#: global.c:591 global.c:636 global.c:673 global.c:692
msgid "Last Line"
msgstr "Siste linje"
#: global.c:585 global.c:624
#: global.c:604 global.c:647
msgid "Case Sens"
msgstr "Store/små"
#: global.c:588 global.c:627
#: global.c:608 global.c:650
msgid "Direction"
msgstr "Retning"
#: global.c:592 global.c:631
#: global.c:613 global.c:654
msgid "Regexp"
msgstr "Reguttrykk"
#: global.c:597 global.c:635 global.c:654
#: global.c:619 global.c:658 global.c:677
msgid "History"
msgstr ""
#: global.c:617
#: global.c:640
msgid "No Replace"
msgstr "Inga erstatting"
#: global.c:694 global.c:729
#: global.c:718 global.c:758
msgid "To Files"
msgstr "Til filer"
#: global.c:699
#: global.c:724
msgid "DOS Format"
msgstr ""
#: global.c:702
#: global.c:728
msgid "Mac Format"
msgstr ""
#: global.c:706
#: global.c:733
msgid "Append"
msgstr "Legg til"
#: global.c:709
#: global.c:737
#, fuzzy
msgid "Prepend"
msgstr "Legg til"
#: global.c:713
#: global.c:742
#, fuzzy
msgid "Backup File"
msgstr "Backspace"
#: global.c:733
#: global.c:763
msgid "Execute Command"
msgstr ""
#: global.c:736 winio.c:545
#: global.c:767 winio.c:596
msgid "New Buffer"
msgstr "Ny buffer"
#: global.c:778
#: global.c:810
#, fuzzy
msgid "Go To Dir"
msgstr "Gå til katalog"
@@ -1280,16 +1246,6 @@ msgstr "Kunne ikkje lukka %s: %s"
msgid "Could not fork"
msgstr "Kunne ikkje lukka %s: %s"
#: nano.c:1032
#, c-format
msgid "current->data now = \"%s\"\n"
msgstr "current->data no = \"%s\"\n"
#: nano.c:1092
#, c-format
msgid "After, data = \"%s\"\n"
msgstr "Etter, data = \"%s\"\n"
#: nano.c:1365
msgid "Mark Set"
msgstr "Merke sett"
@@ -1414,48 +1370,6 @@ msgstr "av"
msgid "Tab size is too small for nano...\n"
msgstr "Vindauget er for lite for Nano..."
#: nano.c:3384
msgid "Main: set up windows\n"
msgstr "Hovud: Vindauge sett opp\n"
#: nano.c:3398
msgid "Main: bottom win\n"
msgstr "Hovud: botnvindauge\n"
#: nano.c:3404
msgid "Main: open file\n"
msgstr "Hovud: opna fil\n"
#: nano.c:3461
#, fuzzy, c-format
msgid "AHA! %c (%d)\n"
msgstr "Aha! '%c' (%d)\n"
#: nano.c:3481
#, c-format
msgid "I got Alt-O-%c! (%d)\n"
msgstr "Eg fekk Alt-O-%c! (%d)\n"
#: nano.c:3508
#, c-format
msgid "I got Alt-[-1-%c! (%d)\n"
msgstr "Eg fekk Alt-[-1-%c! (%d)\n"
#: nano.c:3538
#, c-format
msgid "I got Alt-[-2-%c! (%d)\n"
msgstr "Eg fekk Alt-[-2-%c! (%d)\n"
#: nano.c:3607
#, c-format
msgid "I got Alt-[-%c! (%d)\n"
msgstr "Eg fekk Alt-[-%c! (%d)\n"
#: nano.c:3653
#, c-format
msgid "I got Alt-%c! (%d)\n"
msgstr "Eg fekk Alt-%c (%d)\n"
#: nano.c:3711
msgid "XOFF ignored, mumble mumble."
msgstr ""
@@ -1464,11 +1378,6 @@ msgstr ""
msgid "XON ignored, mumble mumble."
msgstr ""
#: nano.c:3752
#, fuzzy, c-format
msgid "I got %c (%d)!\n"
msgstr "Eg fekk Alt-%c (%d)\n"
#: rcfile.c:103
#, c-format
msgid "Error in %s on line %d: "
@@ -1514,14 +1423,6 @@ msgstr "reguttrykk m
msgid "Missing syntax name"
msgstr "Fargenamnet manglar"
#: rcfile.c:298
msgid "Adding new syntax after 1st\n"
msgstr ""
#: rcfile.c:306
msgid "Starting a new syntax type\n"
msgstr ""
#: rcfile.c:352
msgid "Missing color name"
msgstr "Fargenamnet manglar"
@@ -1530,16 +1431,6 @@ msgstr "Fargenamnet manglar"
msgid "Cannot add a color directive without a syntax line"
msgstr ""
#: rcfile.c:420
#, c-format
msgid "Starting a new colorstring for fg %d bg %d\n"
msgstr ""
#: rcfile.c:428
#, c-format
msgid "Adding new entry for fg %d bg %d\n"
msgstr ""
#: rcfile.c:437
#, fuzzy
msgid "\"start=\" requires a corresponding \"end=\""
@@ -1547,21 +1438,11 @@ msgstr ""
"\n"
"\tfor kvar «start=» må der vera ein «end=»"
#: rcfile.c:486
#, fuzzy, c-format
msgid "%s: Read a comment\n"
msgstr "parse_rcfile: Las ein kommentar\n"
#: rcfile.c:509
#, c-format
msgid "command %s not understood"
msgstr "kommandoen %s er ikkje forståeleg"
#: rcfile.c:521
#, fuzzy, c-format
msgid "%s: Parsing option %s\n"
msgstr "parse_rcfile: Les inn opsjon %s\n"
#: rcfile.c:541
#, c-format
msgid "option %s requires an argument"
@@ -1577,16 +1458,6 @@ msgstr "fyllbreidda du foreslo (%d) er for smal"
msgid "requested tab size %d invalid"
msgstr "tab-breidda du foreslo (%d) er for smal"
#: rcfile.c:598
#, c-format
msgid "set flag %d!\n"
msgstr "sett flagget %d!\n"
#: rcfile.c:604
#, c-format
msgid "unset flag %d!\n"
msgstr "skru av flagget %d!\n"
#: rcfile.c:614
msgid "Errors found in .nanorc file"
msgstr "Feil funne i .nanorc fila"
@@ -1686,139 +1557,201 @@ msgstr "Ikkje ei klamme"
msgid "No matching bracket"
msgstr "Inga motsvarande klamme"
#: utils.c:225 utils.c:235
#: utils.c:257 utils.c:267
#, fuzzy
msgid "nano is out of memory!"
msgstr "nano: malloc: tom for minne!"
#: winio.c:90
#, fuzzy, c-format
msgid "actual_x for xplus=%d returns %d\n"
msgstr "actual_x_from_start for xplus=%d returnerte %d\n"
#: winio.c:245 winio.c:473
#, c-format
msgid "Aha! '%c' (%d)\n"
msgstr "Aha! '%c' (%d)\n"
#: winio.c:496
#, c-format
msgid "input '%c' (%d)\n"
msgstr "input '%c' (%d)\n"
#: winio.c:549
#: winio.c:600
msgid " File: ..."
msgstr " Fil: ..."
#: winio.c:551
#: winio.c:602
msgid " DIR: ..."
msgstr " KAT: ..."
#: winio.c:556
#: winio.c:607
msgid "File: "
msgstr "Fil: "
#: winio.c:559
#: winio.c:610
msgid " DIR: "
msgstr " KAT: "
#: winio.c:564
#: winio.c:615
#, fuzzy
msgid " Modified "
msgstr "Endra"
#: winio.c:566
#: winio.c:617
msgid " View "
msgstr ""
#: winio.c:752
#: winio.c:803
msgid "Refusing 0 length regex match"
msgstr ""
#: winio.c:1064
#, c-format
msgid "Moved to (%d, %d) in edit buffer\n"
msgstr "Flytta til (%d, %d) i redigeringsbuffer\n"
#: winio.c:1215
#, c-format
msgid "I got \"%s\"\n"
msgstr "Eg fekk \"%s\"\n"
#: winio.c:1246
#: winio.c:1297
msgid "Yy"
msgstr "JjYy"
#: winio.c:1247
#: winio.c:1298
msgid "Nn"
msgstr "Nn"
#: winio.c:1248
#: winio.c:1299
msgid "Aa"
msgstr "Aa"
#: winio.c:1259
#: winio.c:1310
msgid "Yes"
msgstr "Ja"
#: winio.c:1264
#: winio.c:1315
msgid "All"
msgstr "Alle"
#: winio.c:1269
#: winio.c:1320
msgid "No"
msgstr "Nei"
#: winio.c:1448
#: winio.c:1499
#, fuzzy, c-format
msgid "line %ld/%ld (%d%%), col %lu/%lu (%d%%), char %lu/%ld (%d%%)"
msgstr "linje %d av %d (%.0f%%), teikn %ld av %ld (%.0f%%)"
#: winio.c:1704
msgid "Dumping file buffer to stderr...\n"
msgstr "Dumpar fil-bufferet til stderr...\n"
#: winio.c:1706
msgid "Dumping cutbuffer to stderr...\n"
msgstr "Dumpar utklippsbufferet til stderr...\n"
#: winio.c:1708
msgid "Dumping a buffer to stderr...\n"
msgstr "Dumpar eit buffer til stderr...\n"
#: winio.c:1789
#: winio.c:1838
msgid "The nano text editor"
msgstr "Teksteditoren nano"
#: winio.c:1790
#: winio.c:1839
msgid "version "
msgstr "versjon "
#: winio.c:1791
#: winio.c:1840
msgid "Brought to you by:"
msgstr "Gjeve til deg av:"
#: winio.c:1792
#: winio.c:1841
msgid "Special thanks to:"
msgstr "Spesiell takk til:"
# Oversette dette ?
#: winio.c:1793
#: winio.c:1842
msgid "The Free Software Foundation"
msgstr "Free Sofware Foundation"
#: winio.c:1794
#: winio.c:1843
msgid "For ncurses:"
msgstr ""
#: winio.c:1795
#: winio.c:1844
msgid "and anyone else we forgot..."
msgstr "og alle dei andre vi gløymde..."
#: winio.c:1796
#: winio.c:1845
msgid "Thank you for using nano!\n"
msgstr "Takk for at du brukar nano!\n"
#, fuzzy
#~ msgid "add_to_cutbuffer() called with inptr->data = %s\n"
#~ msgstr "add_to_cutbuffer vart kalla med inptr->data = %s\n"
#~ msgid "Blew away cutbuffer =)\n"
#~ msgstr "Tømte utklippsbufferet\n"
#, fuzzy
#~ msgid "filename is %s\n"
#~ msgstr "filnamnet er %s"
#, fuzzy
#~ msgid "%s: free'd a node, YAY!\n"
#~ msgstr "delete_node(): frigjorde ein node, HURRA!\n"
#, fuzzy
#~ msgid "%s: free'd last node.\n"
#~ msgstr "delete_node(): frigjorde siste node.\n"
#~ msgid "Wrote >%s\n"
#~ msgstr "Skreiv >%s\n"
#~ msgid "current->data now = \"%s\"\n"
#~ msgstr "current->data no = \"%s\"\n"
#~ msgid "After, data = \"%s\"\n"
#~ msgstr "Etter, data = \"%s\"\n"
#~ msgid "Main: set up windows\n"
#~ msgstr "Hovud: Vindauge sett opp\n"
#~ msgid "Main: bottom win\n"
#~ msgstr "Hovud: botnvindauge\n"
#~ msgid "Main: open file\n"
#~ msgstr "Hovud: opna fil\n"
#, fuzzy
#~ msgid "AHA! %c (%d)\n"
#~ msgstr "Aha! '%c' (%d)\n"
#~ msgid "I got Alt-O-%c! (%d)\n"
#~ msgstr "Eg fekk Alt-O-%c! (%d)\n"
#~ msgid "I got Alt-[-1-%c! (%d)\n"
#~ msgstr "Eg fekk Alt-[-1-%c! (%d)\n"
#~ msgid "I got Alt-[-2-%c! (%d)\n"
#~ msgstr "Eg fekk Alt-[-2-%c! (%d)\n"
#~ msgid "I got Alt-[-%c! (%d)\n"
#~ msgstr "Eg fekk Alt-[-%c! (%d)\n"
#~ msgid "I got Alt-%c! (%d)\n"
#~ msgstr "Eg fekk Alt-%c (%d)\n"
#, fuzzy
#~ msgid "I got %c (%d)!\n"
#~ msgstr "Eg fekk Alt-%c (%d)\n"
#, fuzzy
#~ msgid "%s: Read a comment\n"
#~ msgstr "parse_rcfile: Las ein kommentar\n"
#, fuzzy
#~ msgid "%s: Parsing option %s\n"
#~ msgstr "parse_rcfile: Les inn opsjon %s\n"
#~ msgid "set flag %d!\n"
#~ msgstr "sett flagget %d!\n"
#~ msgid "unset flag %d!\n"
#~ msgstr "skru av flagget %d!\n"
#, fuzzy
#~ msgid "actual_x for xplus=%d returns %d\n"
#~ msgstr "actual_x_from_start for xplus=%d returnerte %d\n"
#~ msgid "Aha! '%c' (%d)\n"
#~ msgstr "Aha! '%c' (%d)\n"
#~ msgid "input '%c' (%d)\n"
#~ msgstr "input '%c' (%d)\n"
#~ msgid "Moved to (%d, %d) in edit buffer\n"
#~ msgstr "Flytta til (%d, %d) i redigeringsbuffer\n"
#~ msgid "I got \"%s\"\n"
#~ msgstr "Eg fekk \"%s\"\n"
#~ msgid "Dumping file buffer to stderr...\n"
#~ msgstr "Dumpar fil-bufferet til stderr...\n"
#~ msgid "Dumping cutbuffer to stderr...\n"
#~ msgstr "Dumpar utklippsbufferet til stderr...\n"
#~ msgid "Dumping a buffer to stderr...\n"
#~ msgstr "Dumpar eit buffer til stderr...\n"
#~ msgid "Can't visit parent in restricted mode"
#~ msgstr "Kan ikkje gå til foreldrekatalogen i avgrensa modus"

433
po/pl.po
View File

@@ -7,7 +7,8 @@
msgid ""
msgstr ""
"Project-Id-Version: nano 1.1.99pre2\n"
"POT-Creation-Date: 2003-04-19 23:02-0400\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2003-08-11 21:49-0400\n"
"PO-Revision-Date: 2003-02-05 10:10+0200\n"
"Last-Translator: Wojciech Kotwica <wkotwica@post.pl>\n"
"Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
@@ -17,15 +18,6 @@ msgstr ""
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2);\n"
#: cut.c:49
#, c-format
msgid "add_to_cutbuffer() called with inptr->data = %s\n"
msgstr "add_to_cutbuffer() wywo³ane z inptr->data = %s\n"
#: cut.c:213
msgid "Blew away cutbuffer =)\n"
msgstr "Wywia³o bufor wycinania =)\n"
#: files.c:317
#, c-format
msgid "Read %d line (Converted from Mac format)"
@@ -91,12 +83,6 @@ msgstr "Plik do wstawienia do nowego bufora [z ./] "
msgid "File to insert [from ./] "
msgstr "Plik do wstawienia [z ./] "
#: files.c:479 files.c:736 files.c:793 files.c:881 files.c:893 files.c:944
#: files.c:955 files.c:1815
#, c-format
msgid "filename is %s\n"
msgstr "nazwa pliku to %s\n"
#: files.c:495
msgid "Command to execute"
msgstr "Polecenie do wykonania "
@@ -114,16 +100,6 @@ msgstr "Nie mo
msgid "Key illegal in non-multibuffer mode"
msgstr "Klawisz niedozwolony w trybie innym ni¿ wielu buforów"
#: files.c:704 nano.c:565
#, c-format
msgid "%s: free'd a node, YAY!\n"
msgstr "%s: zwolniono wêze³, OJ!\n"
#: files.c:709 nano.c:570
#, c-format
msgid "%s: free'd last node.\n"
msgstr "%s: zwolniono ostatni wêze³.\n"
#: files.c:873 files.c:936
msgid "No more open files"
msgstr "Nie ma wiêcej otwartych plików"
@@ -148,11 +124,6 @@ msgstr "Nie mo
msgid "Couldn't write backup: %s"
msgstr "Nie mo¿na zapisaæ kopii zapasowej: %s"
#: files.c:1401
#, c-format
msgid "Backing up %s to %s\n"
msgstr "Tworzenie kopii zapasowej %s jako %s\n"
#: files.c:1413
#, c-format
msgid "Could not set permissions %o on backup %s: %s"
@@ -174,11 +145,6 @@ msgstr "Nie mo
msgid "Could not open file for writing: %s"
msgstr "NIe mo¿na otworzyæ pliku do zapisu: %s"
#: files.c:1516
#, c-format
msgid "Wrote >%s\n"
msgstr "Zapisano >%s\n"
#: files.c:1572
#, c-format
msgid "Could not close %s: %s"
@@ -532,215 +498,215 @@ msgstr "Otw
msgid "Toggle insert into new buffer"
msgstr "Prze³±cz wstawianie do nowego bufora"
#: global.c:418 global.c:565 global.c:605 global.c:641 global.c:660
#: global.c:690 global.c:722 global.c:744 global.c:754 global.c:764
#: global.c:784
#: global.c:418 global.c:578 global.c:627 global.c:664 global.c:683
#: global.c:713 global.c:751 global.c:775 global.c:785 global.c:795
#: global.c:816
msgid "Get Help"
msgstr "Pomoc"
#: global.c:424
#: global.c:425
msgid "Close"
msgstr "Zamknij"
#: global.c:430 global.c:683
#: global.c:432 global.c:706
msgid "Exit"
msgstr "Wyjd¼"
#: global.c:434
#: global.c:437
msgid "WriteOut"
msgstr "Zapisz"
#: global.c:438
#: global.c:442
msgid "Justify"
msgstr "Wyjustuj"
#: global.c:443
#: global.c:448
msgid "Read File"
msgstr "Wczytaj plik"
#: global.c:452
#: global.c:458
msgid "Where Is"
msgstr "Wyszukaj"
#: global.c:456 global.c:675 global.c:770
#: global.c:463 global.c:698 global.c:801
msgid "Prev Page"
msgstr "Poprz.str."
#: global.c:460 global.c:679 global.c:774
#: global.c:468 global.c:702 global.c:805
msgid "Next Page"
msgstr "Nast.str."
#: global.c:464
#: global.c:473
msgid "Cut Text"
msgstr "Wytnij"
#: global.c:469
#: global.c:479
msgid "UnJustify"
msgstr "Cofnij just."
#: global.c:473
#: global.c:484
msgid "UnCut Txt"
msgstr "Wklej"
#: global.c:477
#: global.c:489
msgid "Cur Pos"
msgstr "Bie¿.poz."
#: global.c:481
#: global.c:494
msgid "To Spell"
msgstr "Pisownia"
#: global.c:485 nano.c:420 winio.c:604
#: global.c:498 nano.c:420 winio.c:655
msgid "Up"
msgstr "Góra"
#: global.c:489
#: global.c:502
msgid "Down"
msgstr "Dó³"
#: global.c:493
#: global.c:506
msgid "Forward"
msgstr "W przód"
#: global.c:497
#: global.c:510
msgid "Back"
msgstr "Wstecz"
#: global.c:501
#: global.c:514
msgid "Home"
msgstr "Pocz±tek"
#: global.c:505
#: global.c:518
msgid "End"
msgstr "Koniec"
#: global.c:509
#: global.c:522
msgid "Refresh"
msgstr "Od¶wie¿"
#: global.c:513
#: global.c:526
msgid "Mark Text"
msgstr "Zaznacz"
#: global.c:517
#: global.c:530
msgid "Delete"
msgstr "Usuñ"
#: global.c:521
#: global.c:534
msgid "Backspace"
msgstr "Backspace"
#: global.c:525
#: global.c:538
msgid "Tab"
msgstr "Tab"
#: global.c:528 global.c:578
#: global.c:541 global.c:595
msgid "Replace"
msgstr "Zast±p"
#: global.c:532
#: global.c:545
msgid "Enter"
msgstr "Enter"
#: global.c:536 global.c:581 global.c:620
#: global.c:549 global.c:599 global.c:643
msgid "Go To Line"
msgstr "Przejd¼ do linii"
#: global.c:541
#: global.c:554
msgid "Next Word"
msgstr "Nast.s³owo"
#: global.c:542
#: global.c:555
msgid "Move forward one word"
msgstr "Przejd¼ o s³owo do przodu"
#: global.c:545
#: global.c:558
msgid "Prev Word"
msgstr "Poprz.s³owo"
#: global.c:546
#: global.c:559
msgid "Move backward one word"
msgstr "Przejd¼ o s³owo wstecz"
#: global.c:550
#: global.c:563
msgid "Find Other Bracket"
msgstr "Znajd¼ nawias do pary"
#: global.c:555
#: global.c:568
msgid "Previous File"
msgstr "Poprzedni plik"
#: global.c:558
#: global.c:571
msgid "Next File"
msgstr "Nastêpny plik"
#: global.c:568 global.c:608 global.c:644 global.c:663 global.c:717
#: global.c:725 global.c:747 global.c:757 global.c:767 global.c:787
#: winio.c:1272
#: global.c:582 global.c:630 global.c:667 global.c:686 global.c:746
#: global.c:754 global.c:778 global.c:788 global.c:798 global.c:819
#: winio.c:1323
msgid "Cancel"
msgstr "Anuluj"
#: global.c:571 global.c:611 global.c:647 global.c:666
#: global.c:586 global.c:633 global.c:670 global.c:689
msgid "First Line"
msgstr "Pierw.lin."
#: global.c:575 global.c:614 global.c:650 global.c:669
#: global.c:591 global.c:636 global.c:673 global.c:692
msgid "Last Line"
msgstr "Ost.lin."
#: global.c:585 global.c:624
#: global.c:604 global.c:647
msgid "Case Sens"
msgstr "Wielk.liter"
#: global.c:588 global.c:627
#: global.c:608 global.c:650
msgid "Direction"
msgstr "Kierunek"
#: global.c:592 global.c:631
#: global.c:613 global.c:654
msgid "Regexp"
msgstr "Wyr.reg."
#: global.c:597 global.c:635 global.c:654
#: global.c:619 global.c:658 global.c:677
msgid "History"
msgstr "Historia"
#: global.c:617
#: global.c:640
msgid "No Replace"
msgstr "Nie zast."
#: global.c:694 global.c:729
#: global.c:718 global.c:758
msgid "To Files"
msgstr "Pliki"
#: global.c:699
#: global.c:724
msgid "DOS Format"
msgstr "Format DOS"
#: global.c:702
#: global.c:728
msgid "Mac Format"
msgstr "Format Mac"
#: global.c:706
#: global.c:733
msgid "Append"
msgstr "Dopisz"
#: global.c:709
#: global.c:737
msgid "Prepend"
msgstr "Wpisz"
#: global.c:713
#: global.c:742
msgid "Backup File"
msgstr "Kopia zapas."
#: global.c:733
#: global.c:763
msgid "Execute Command"
msgstr "Wywo³aj polecenie"
#: global.c:736 winio.c:545
#: global.c:767 winio.c:596
msgid "New Buffer"
msgstr "Nowy bufor"
#: global.c:778
#: global.c:810
msgid "Go To Dir"
msgstr "Przejd¼ do katalogu"
@@ -1242,16 +1208,6 @@ msgstr "Nie mo
msgid "Could not fork"
msgstr "Nie mo¿na rozwidliæ procesu"
#: nano.c:1032
#, c-format
msgid "current->data now = \"%s\"\n"
msgstr "current->data teraz = \"%s\"\n"
#: nano.c:1092
#, c-format
msgid "After, data = \"%s\"\n"
msgstr "Po, data = \"%s\"\n"
#: nano.c:1365
msgid "Mark Set"
msgstr "Znacznik ustawiony"
@@ -1374,48 +1330,6 @@ msgstr "wy
msgid "Tab size is too small for nano...\n"
msgstr "Rozmiar okna za ma³y dla nano...\n"
#: nano.c:3384
msgid "Main: set up windows\n"
msgstr "Main: ustaw okna\n"
#: nano.c:3398
msgid "Main: bottom win\n"
msgstr "Main: dolne okno\n"
#: nano.c:3404
msgid "Main: open file\n"
msgstr "Main: otwórz plik\n"
#: nano.c:3461
#, c-format
msgid "AHA! %c (%d)\n"
msgstr "Aha! %c (%d)\n"
#: nano.c:3481
#, c-format
msgid "I got Alt-O-%c! (%d)\n"
msgstr "Dosta³em Alt-O-%c! (%d)\n"
#: nano.c:3508
#, c-format
msgid "I got Alt-[-1-%c! (%d)\n"
msgstr "Dosta³em Alt-[-1-%c! (%d)\n"
#: nano.c:3538
#, c-format
msgid "I got Alt-[-2-%c! (%d)\n"
msgstr "Dosta³em Alt-[-2-%c! (%d)\n"
#: nano.c:3607
#, c-format
msgid "I got Alt-[-%c! (%d)\n"
msgstr "Dosta³em Alt-[-%c! (%d)\n"
#: nano.c:3653
#, c-format
msgid "I got Alt-%c! (%d)\n"
msgstr "Dosta³em Alt-%c! (%d)\n"
#: nano.c:3711
msgid "XOFF ignored, mumble mumble."
msgstr "Zignorowano XOFF, hmm, hmm."
@@ -1424,11 +1338,6 @@ msgstr "Zignorowano XOFF, hmm, hmm."
msgid "XON ignored, mumble mumble."
msgstr "Zignorowano XON, hmm, hmm."
#: nano.c:3752
#, c-format
msgid "I got %c (%d)!\n"
msgstr "Dosta³em %c (%d)!\n"
#: rcfile.c:103
#, c-format
msgid "Error in %s on line %d: "
@@ -1473,14 +1382,6 @@ msgstr "wyra
msgid "Missing syntax name"
msgstr "Brak nazwy sk³adni"
#: rcfile.c:298
msgid "Adding new syntax after 1st\n"
msgstr "Dodawanie nowej sk³adni po pierwszej\n"
#: rcfile.c:306
msgid "Starting a new syntax type\n"
msgstr "Uruchamianie nowego typu sk³adni\n"
#: rcfile.c:352
msgid "Missing color name"
msgstr "Brak nazwy koloru"
@@ -1489,35 +1390,15 @@ msgstr "Brak nazwy koloru"
msgid "Cannot add a color directive without a syntax line"
msgstr "Nie mo¿na dodaæ dyrektywy koloru bez linii sk³adni"
#: rcfile.c:420
#, c-format
msgid "Starting a new colorstring for fg %d bg %d\n"
msgstr "Uruchamianie nowego ³añcucha koloru dla zn:%d t³o:%d\n"
#: rcfile.c:428
#, c-format
msgid "Adding new entry for fg %d bg %d\n"
msgstr "Dodawanie nowej pozycji dla zn:%d t³o:%d\n"
#: rcfile.c:437
msgid "\"start=\" requires a corresponding \"end=\""
msgstr "\"start=\" wymaga odpowiadaj±cego mu \"end=\""
#: rcfile.c:486
#, c-format
msgid "%s: Read a comment\n"
msgstr "%s: Odczyt komentarza\n"
#: rcfile.c:509
#, c-format
msgid "command %s not understood"
msgstr "niezrozumia³e polecenie %s"
#: rcfile.c:521
#, c-format
msgid "%s: Parsing option %s\n"
msgstr "%s: Analiza opcji %s\n"
#: rcfile.c:541
#, c-format
msgid "option %s requires an argument"
@@ -1533,16 +1414,6 @@ msgstr "
msgid "requested tab size %d invalid"
msgstr "¿±dana wielko¶æ tabulacji %d niepoprawna"
#: rcfile.c:598
#, c-format
msgid "set flag %d!\n"
msgstr "ustawiono opcjê %d!\n"
#: rcfile.c:604
#, c-format
msgid "unset flag %d!\n"
msgstr "usuniêto ustawienie opcji %d!\n"
#: rcfile.c:614
msgid "Errors found in .nanorc file"
msgstr "W pliku .nanorc znaleziono b³êdy"
@@ -1642,136 +1513,204 @@ msgstr "To nie nawias"
msgid "No matching bracket"
msgstr "Brak nawiasu do pary"
#: utils.c:225 utils.c:235
#: utils.c:257 utils.c:267
msgid "nano is out of memory!"
msgstr "nano brak³o pamiêci!"
#: winio.c:90
#, c-format
msgid "actual_x for xplus=%d returns %d\n"
msgstr "actual_x dla xplus=%d zwraca %d\n"
#: winio.c:245 winio.c:473
#, c-format
msgid "Aha! '%c' (%d)\n"
msgstr "Aha! '%c' (%d)\n"
#: winio.c:496
#, c-format
msgid "input '%c' (%d)\n"
msgstr "wej¶cie '%c' (%d)\n"
#: winio.c:549
#: winio.c:600
msgid " File: ..."
msgstr " Plik: ..."
#: winio.c:551
#: winio.c:602
msgid " DIR: ..."
msgstr " KAT: ..."
#: winio.c:556
#: winio.c:607
msgid "File: "
msgstr "Plik: "
#: winio.c:559
#: winio.c:610
msgid " DIR: "
msgstr " KAT: "
#: winio.c:564
#: winio.c:615
msgid " Modified "
msgstr " Zmieniony "
#: winio.c:566
#: winio.c:617
msgid " View "
msgstr " Przegl. "
#: winio.c:752
#: winio.c:803
msgid "Refusing 0 length regex match"
msgstr "Odmowa dopasowania wyr.reg. zerowej d³ugo¶ci"
#: winio.c:1064
#, c-format
msgid "Moved to (%d, %d) in edit buffer\n"
msgstr "Przesuniêto do (%d, %d) w buforze edycji\n"
#: winio.c:1215
#, c-format
msgid "I got \"%s\"\n"
msgstr "Dosta³em \"%s\"\n"
#: winio.c:1246
#: winio.c:1297
msgid "Yy"
msgstr "Tt"
#: winio.c:1247
#: winio.c:1298
msgid "Nn"
msgstr "Nn"
#: winio.c:1248
#: winio.c:1299
msgid "Aa"
msgstr "Ww"
#: winio.c:1259
#: winio.c:1310
msgid "Yes"
msgstr "Tak"
#: winio.c:1264
#: winio.c:1315
msgid "All"
msgstr "Wszystko"
#: winio.c:1269
#: winio.c:1320
msgid "No"
msgstr "Nie"
#: winio.c:1448
#: winio.c:1499
#, c-format
msgid "line %ld/%ld (%d%%), col %lu/%lu (%d%%), char %lu/%ld (%d%%)"
msgstr "lin.%ld/%ld (%d%%), kol.%lu/%lu (%d%%), zn.%lu/%ld (%d%%)"
#: winio.c:1704
msgid "Dumping file buffer to stderr...\n"
msgstr "Zrzucanie bufora pliku na stderr...\n"
#: winio.c:1706
msgid "Dumping cutbuffer to stderr...\n"
msgstr "Zrzucanie bufora wycinania na stderr...\n"
#: winio.c:1708
msgid "Dumping a buffer to stderr...\n"
msgstr "Zrzucanie bufora na stderr...\n"
#: winio.c:1789
#: winio.c:1838
msgid "The nano text editor"
msgstr "Edytor tekstu nano"
#: winio.c:1790
#: winio.c:1839
msgid "version "
msgstr "wersja "
#: winio.c:1791
#: winio.c:1840
msgid "Brought to you by:"
msgstr "Stworzony przez:"
#: winio.c:1792
#: winio.c:1841
msgid "Special thanks to:"
msgstr "Specjalne podziêkowania otrzymuj±:"
#: winio.c:1793
#: winio.c:1842
msgid "The Free Software Foundation"
msgstr "Free Software Foundation (Fundacja Wolnego Oprogramowania)"
#: winio.c:1794
#: winio.c:1843
msgid "For ncurses:"
msgstr "Za ncurses:"
#: winio.c:1795
#: winio.c:1844
msgid "and anyone else we forgot..."
msgstr "oraz wszyscy pozostali, o których zapomnieli¶my..."
#: winio.c:1796
#: winio.c:1845
msgid "Thank you for using nano!\n"
msgstr "Dziêkujemy za pracê z nano!\n"
#~ msgid "add_to_cutbuffer() called with inptr->data = %s\n"
#~ msgstr "add_to_cutbuffer() wywo³ane z inptr->data = %s\n"
#~ msgid "Blew away cutbuffer =)\n"
#~ msgstr "Wywia³o bufor wycinania =)\n"
#~ msgid "filename is %s\n"
#~ msgstr "nazwa pliku to %s\n"
#~ msgid "%s: free'd a node, YAY!\n"
#~ msgstr "%s: zwolniono wêze³, OJ!\n"
#~ msgid "%s: free'd last node.\n"
#~ msgstr "%s: zwolniono ostatni wêze³.\n"
#~ msgid "Backing up %s to %s\n"
#~ msgstr "Tworzenie kopii zapasowej %s jako %s\n"
#~ msgid "Wrote >%s\n"
#~ msgstr "Zapisano >%s\n"
#~ msgid "current->data now = \"%s\"\n"
#~ msgstr "current->data teraz = \"%s\"\n"
#~ msgid "After, data = \"%s\"\n"
#~ msgstr "Po, data = \"%s\"\n"
#~ msgid "Main: set up windows\n"
#~ msgstr "Main: ustaw okna\n"
#~ msgid "Main: bottom win\n"
#~ msgstr "Main: dolne okno\n"
#~ msgid "Main: open file\n"
#~ msgstr "Main: otwórz plik\n"
#~ msgid "AHA! %c (%d)\n"
#~ msgstr "Aha! %c (%d)\n"
#~ msgid "I got Alt-O-%c! (%d)\n"
#~ msgstr "Dosta³em Alt-O-%c! (%d)\n"
#~ msgid "I got Alt-[-1-%c! (%d)\n"
#~ msgstr "Dosta³em Alt-[-1-%c! (%d)\n"
#~ msgid "I got Alt-[-2-%c! (%d)\n"
#~ msgstr "Dosta³em Alt-[-2-%c! (%d)\n"
#~ msgid "I got Alt-[-%c! (%d)\n"
#~ msgstr "Dosta³em Alt-[-%c! (%d)\n"
#~ msgid "I got Alt-%c! (%d)\n"
#~ msgstr "Dosta³em Alt-%c! (%d)\n"
#~ msgid "I got %c (%d)!\n"
#~ msgstr "Dosta³em %c (%d)!\n"
#~ msgid "Adding new syntax after 1st\n"
#~ msgstr "Dodawanie nowej sk³adni po pierwszej\n"
#~ msgid "Starting a new syntax type\n"
#~ msgstr "Uruchamianie nowego typu sk³adni\n"
#~ msgid "Starting a new colorstring for fg %d bg %d\n"
#~ msgstr "Uruchamianie nowego ³añcucha koloru dla zn:%d t³o:%d\n"
#~ msgid "Adding new entry for fg %d bg %d\n"
#~ msgstr "Dodawanie nowej pozycji dla zn:%d t³o:%d\n"
#~ msgid "%s: Read a comment\n"
#~ msgstr "%s: Odczyt komentarza\n"
#~ msgid "%s: Parsing option %s\n"
#~ msgstr "%s: Analiza opcji %s\n"
#~ msgid "set flag %d!\n"
#~ msgstr "ustawiono opcjê %d!\n"
#~ msgid "unset flag %d!\n"
#~ msgstr "usuniêto ustawienie opcji %d!\n"
#~ msgid "actual_x for xplus=%d returns %d\n"
#~ msgstr "actual_x dla xplus=%d zwraca %d\n"
#~ msgid "Aha! '%c' (%d)\n"
#~ msgstr "Aha! '%c' (%d)\n"
#~ msgid "input '%c' (%d)\n"
#~ msgstr "wej¶cie '%c' (%d)\n"
#~ msgid "Moved to (%d, %d) in edit buffer\n"
#~ msgstr "Przesuniêto do (%d, %d) w buforze edycji\n"
#~ msgid "I got \"%s\"\n"
#~ msgstr "Dosta³em \"%s\"\n"
#~ msgid "Dumping file buffer to stderr...\n"
#~ msgstr "Zrzucanie bufora pliku na stderr...\n"
#~ msgid "Dumping cutbuffer to stderr...\n"
#~ msgstr "Zrzucanie bufora wycinania na stderr...\n"
#~ msgid "Dumping a buffer to stderr...\n"
#~ msgstr "Zrzucanie bufora na stderr...\n"
#~ msgid "Generic error"
#~ msgstr "Standardowy b³±d"

File diff suppressed because it is too large Load Diff

1559
po/ro.po Normal file

File diff suppressed because it is too large Load Diff

433
po/ru.po
View File

@@ -5,7 +5,8 @@
msgid ""
msgstr ""
"Project-Id-Version: nano 1.1.99pre3\n"
"POT-Creation-Date: 2003-04-19 23:02-0400\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2003-08-11 21:49-0400\n"
"PO-Revision-Date: 2003-02-17 15:10+0300\n"
"Last-Translator: Sergey A. Ribalchenko <fisher@obu.ck.ua>\n"
"Language-Team: Russian <ru@li.org>\n"
@@ -15,15 +16,6 @@ msgstr ""
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
#: cut.c:49
#, c-format
msgid "add_to_cutbuffer() called with inptr->data = %s\n"
msgstr "add_to_cutbuffer() ×ÙÚ×ÁÎ Ó inptr->data = %s\n"
#: cut.c:213
msgid "Blew away cutbuffer =)\n"
msgstr "cutbuffer ÓÄÕÌÏ ×ÅÔÒÏÍ =)\n"
#: files.c:317
#, c-format
msgid "Read %d line (Converted from Mac format)"
@@ -89,12 +81,6 @@ msgstr "
msgid "File to insert [from ./] "
msgstr "æÁÊÌ ÄÌÑ ×ÓÔÁ×ËÉ [ÏÔ ./] "
#: files.c:479 files.c:736 files.c:793 files.c:881 files.c:893 files.c:944
#: files.c:955 files.c:1815
#, c-format
msgid "filename is %s\n"
msgstr "ÉÍÑ ÆÁÊÌÁ %s\n"
#: files.c:495
msgid "Command to execute"
msgstr "ëÏÍÁÎÄÁ ÄÌÑ ×ÙÐÏÌÎÅÎÉÑ"
@@ -112,16 +98,6 @@ msgstr "
msgid "Key illegal in non-multibuffer mode"
msgstr "îÅ×ÅÒÎÁÑ ËÌÁ×ÉÛÁ × ÎÅ-ÍÕÌØÔÉÂÕÆÆÅÒÎÏÍ ÒÅÖÉÍÅ"
#: files.c:704 nano.c:565
#, c-format
msgid "%s: free'd a node, YAY!\n"
msgstr "%s: ÊÏÊ, ÕÚÅÌ ÏÓ×ÏÂÏÖÄÅÎ!..\n"
#: files.c:709 nano.c:570
#, c-format
msgid "%s: free'd last node.\n"
msgstr "%s: ÏÓ×ÏÂÏÖÄÅÎ ÐÏÓÌÅÄÎÉÊ ÕÚÅÌ.\n"
#: files.c:873 files.c:936
msgid "No more open files"
msgstr "îÅÔ ÂÏÌØÛÅ ÏÔËÒÙÔÙÈ ÆÁÊÌÏ×"
@@ -146,11 +122,6 @@ msgstr "
msgid "Couldn't write backup: %s"
msgstr "îÅ ÍÏÇÕ ÚÁÐÉÓÁÔØ ÒÅÚÅÒ×ÎÕÀ ËÏÐÉÀ: %s"
#: files.c:1401
#, c-format
msgid "Backing up %s to %s\n"
msgstr "óÏÚÄÁÎÉÅ ÒÅÚÅÒ×ÎÏÊ ËÏÐÉÉ ÆÁÊÌÁ %s × ÆÁÊÌÅ %s\n"
#: files.c:1413
#, c-format
msgid "Could not set permissions %o on backup %s: %s"
@@ -172,11 +143,6 @@ msgstr "
msgid "Could not open file for writing: %s"
msgstr "îÅ ÍÏÇÕ ÏÔËÒÙÔØ ÆÁÊÌ ÎÁ ÚÁÐÉÓØ: %s"
#: files.c:1516
#, c-format
msgid "Wrote >%s\n"
msgstr "úÁÐÉÓÁÎÏ >%s\n"
#: files.c:1572
#, c-format
msgid "Could not close %s: %s"
@@ -530,215 +496,215 @@ msgstr "
msgid "Toggle insert into new buffer"
msgstr "ðÅÒÅËÌÀÞÉÔØ ÒÅÖÉÍ ×ÓÔÁ×ËÉ × ÎÏ×ÏÍ ÂÕÆÆÅÒÅ"
#: global.c:418 global.c:565 global.c:605 global.c:641 global.c:660
#: global.c:690 global.c:722 global.c:744 global.c:754 global.c:764
#: global.c:784
#: global.c:418 global.c:578 global.c:627 global.c:664 global.c:683
#: global.c:713 global.c:751 global.c:775 global.c:785 global.c:795
#: global.c:816
msgid "Get Help"
msgstr "ðÏÍÏÝØ"
#: global.c:424
#: global.c:425
msgid "Close"
msgstr "úÁËÒÙÔØ"
#: global.c:430 global.c:683
#: global.c:432 global.c:706
msgid "Exit"
msgstr "÷ÙÈÏÄ"
#: global.c:434
#: global.c:437
msgid "WriteOut"
msgstr "úÁÐÉÓÁÔØ"
#: global.c:438
#: global.c:442
msgid "Justify"
msgstr "÷ÙÒÏ×ÎÑÔØ"
#: global.c:443
#: global.c:448
msgid "Read File"
msgstr "þÉÔÁÔØæÁÊÌ"
#: global.c:452
#: global.c:458
msgid "Where Is"
msgstr "ðÏÉÓË"
#: global.c:456 global.c:675 global.c:770
#: global.c:463 global.c:698 global.c:801
msgid "Prev Page"
msgstr "ðÒÅÄ CÔÒ"
#: global.c:460 global.c:679 global.c:774
#: global.c:468 global.c:702 global.c:805
msgid "Next Page"
msgstr "óÌÅÄ CÔÒ"
#: global.c:464
#: global.c:473
msgid "Cut Text"
msgstr "÷ÙÒÅÚÁÔØ"
#: global.c:469
#: global.c:479
msgid "UnJustify"
msgstr "ïÔÍ ÷ÙÒÁ×Î"
#: global.c:473
#: global.c:484
msgid "UnCut Txt"
msgstr "ïÔÍ ÷ÙÒÅÚ"
#: global.c:477
#: global.c:489
msgid "Cur Pos"
msgstr "ôÅËðÏÚÉÃÉÑ"
#: global.c:481
#: global.c:494
msgid "To Spell"
msgstr "ïÒÆÏÇÒÁÆÉÑ"
#: global.c:485 nano.c:420 winio.c:604
#: global.c:498 nano.c:420 winio.c:655
msgid "Up"
msgstr "÷×ÅÒÈ"
#: global.c:489
#: global.c:502
msgid "Down"
msgstr "÷ÎÉÚ"
#: global.c:493
#: global.c:506
msgid "Forward"
msgstr "÷ÐÅÒÅÄ"
#: global.c:497
#: global.c:510
msgid "Back"
msgstr "îÁÚÁÄ"
#: global.c:501
#: global.c:514
msgid "Home"
msgstr "îÁÞÁÌÏ"
#: global.c:505
#: global.c:518
msgid "End"
msgstr "ëÏÎÅÃ"
#: global.c:509
#: global.c:522
msgid "Refresh"
msgstr "ðÅÒÅÒÉÓÏ×ÁÔØ"
#: global.c:513
#: global.c:526
msgid "Mark Text"
msgstr "ïÔÍÅÔÉÔØ"
#: global.c:517
#: global.c:530
msgid "Delete"
msgstr "õÄÁÌÉÔØ"
#: global.c:521
#: global.c:534
msgid "Backspace"
msgstr "úÁÂÏÊ (BS)"
#: global.c:525
#: global.c:538
msgid "Tab"
msgstr "ôÁÂÕÌÑÃÉÑ"
#: global.c:528 global.c:578
#: global.c:541 global.c:595
msgid "Replace"
msgstr "úÁÍÅÎÁ"
#: global.c:532
#: global.c:545
msgid "Enter"
msgstr "Enter"
#: global.c:536 global.c:581 global.c:620
#: global.c:549 global.c:599 global.c:643
msgid "Go To Line"
msgstr "ë ÓÔÒÏËÅ"
#: global.c:541
#: global.c:554
msgid "Next Word"
msgstr "óÌÅÄ óÌÏ×Ï"
#: global.c:542
#: global.c:555
msgid "Move forward one word"
msgstr "÷ÐÅÒÅÄ ÎÁ ÏÄÎÏ ÓÌÏ×Ï"
#: global.c:545
#: global.c:558
msgid "Prev Word"
msgstr "ðÒÅÄ óÌÏ×Ï"
#: global.c:546
#: global.c:559
msgid "Move backward one word"
msgstr "îÁÚÁÄ ÎÁ ÏÄÎÏ ÓÌÏ×Ï"
#: global.c:550
#: global.c:563
msgid "Find Other Bracket"
msgstr "îÁÊÔÉ äÒÕÇÕÀ óËÏÂËÕ"
#: global.c:555
#: global.c:568
msgid "Previous File"
msgstr "ðÒÅÄÙÄÕÝÉÊ æÁÊÌ"
#: global.c:558
#: global.c:571
msgid "Next File"
msgstr "óÌÅÄÕÀÝÉÊ æÁÊÌ"
#: global.c:568 global.c:608 global.c:644 global.c:663 global.c:717
#: global.c:725 global.c:747 global.c:757 global.c:767 global.c:787
#: winio.c:1272
#: global.c:582 global.c:630 global.c:667 global.c:686 global.c:746
#: global.c:754 global.c:778 global.c:788 global.c:798 global.c:819
#: winio.c:1323
msgid "Cancel"
msgstr "ïÔÍÅÎÉÔØ"
#: global.c:571 global.c:611 global.c:647 global.c:666
#: global.c:586 global.c:633 global.c:670 global.c:689
msgid "First Line"
msgstr "ðÅÒ×óÔÒÏËÁ"
#: global.c:575 global.c:614 global.c:650 global.c:669
#: global.c:591 global.c:636 global.c:673 global.c:692
msgid "Last Line"
msgstr "ðÏÓÌóÔÒÏËÁ"
#: global.c:585 global.c:624
#: global.c:604 global.c:647
msgid "Case Sens"
msgstr "òÅÇúÁ×ÉÓÉÍ"
#: global.c:588 global.c:627
#: global.c:608 global.c:650
msgid "Direction"
msgstr "îÁÐÒÁ×ÌÅÎÉÅ"
#: global.c:592 global.c:631
#: global.c:613 global.c:654
msgid "Regexp"
msgstr "æÏÒÍ÷ÙÒ"
#: global.c:597 global.c:635 global.c:654
#: global.c:619 global.c:658 global.c:677
msgid "History"
msgstr "éÓÔÏÒÉÑ"
#: global.c:617
#: global.c:640
msgid "No Replace"
msgstr "îÅúÁÍÅÝÁÔØ"
#: global.c:694 global.c:729
#: global.c:718 global.c:758
msgid "To Files"
msgstr "ë æÁÊÌÁÍ"
#: global.c:699
#: global.c:724
msgid "DOS Format"
msgstr "ÆÏÒÍÁÔ DOS"
#: global.c:702
#: global.c:728
msgid "Mac Format"
msgstr "ÆÏÒÍÁÔ Mac"
#: global.c:706
#: global.c:733
msgid "Append"
msgstr "äÏÂÁ×ÉÔØ(ë)"
#: global.c:709
#: global.c:737
msgid "Prepend"
msgstr "äÏÂÁ×ÉÔØ(î)"
#: global.c:713
#: global.c:742
msgid "Backup File"
msgstr "òÅÚÅÒ× ËÏÐÉÑ"
#: global.c:733
#: global.c:763
msgid "Execute Command"
msgstr "÷ÙÐÏÌÎÉÔØ ËÏÍÁÎÄÕ"
#: global.c:736 winio.c:545
#: global.c:767 winio.c:596
msgid "New Buffer"
msgstr "îÏ×ÙÊ âÕÆÅÒ"
#: global.c:778
#: global.c:810
msgid "Go To Dir"
msgstr "ë ÄÉÒÅËÔÏÒÉÉ"
@@ -1239,16 +1205,6 @@ msgstr "
msgid "Could not fork"
msgstr "îÅ ÍÏÇÕ ÓÄÅÌÁÔØ fork()"
#: nano.c:1032
#, c-format
msgid "current->data now = \"%s\"\n"
msgstr "current->data ÓÅÊÞÁÓ = \"%s\"\n"
#: nano.c:1092
#, c-format
msgid "After, data = \"%s\"\n"
msgstr "ðÏÓÌÅ, data = \"%s\"\n"
#: nano.c:1365
msgid "Mark Set"
msgstr "íÅÔËÁ ÕÓÔÁÎÏ×ÌÅÎÁ"
@@ -1369,48 +1325,6 @@ msgstr "
msgid "Tab size is too small for nano...\n"
msgstr "òÁÚÍÅÒ ÔÁÂÕÌÑÃÉÉ ÓÌÉÛËÏÍ ÍÁÌ ÄÌÑ nano...\n"
#: nano.c:3384
msgid "Main: set up windows\n"
msgstr "Main: ÕÓÔÁÎÏ×ÉÔØ ÏËÎÁ\n"
#: nano.c:3398
msgid "Main: bottom win\n"
msgstr "Main: ÎÉÖÎÅÅ ÏËÎÏ\n"
#: nano.c:3404
msgid "Main: open file\n"
msgstr "Main: ÏÔËÒÙÔØ ÆÁÊÌ\n"
#: nano.c:3461
#, c-format
msgid "AHA! %c (%d)\n"
msgstr "áÇÁ! %c (%d)\n"
#: nano.c:3481
#, c-format
msgid "I got Alt-O-%c! (%d)\n"
msgstr "ðÏÊÍÁÌ Alt-O-%c! (%d)\n"
#: nano.c:3508
#, c-format
msgid "I got Alt-[-1-%c! (%d)\n"
msgstr "ðÏÊÍÁÌ Alt-[-1-%c! (%d)\n"
#: nano.c:3538
#, c-format
msgid "I got Alt-[-2-%c! (%d)\n"
msgstr "ðÏÊÍÁÌ Alt-[-2-%c! (%d)\n"
#: nano.c:3607
#, c-format
msgid "I got Alt-[-%c! (%d)\n"
msgstr "ðÏÊÍÁÌ Alt-[-%c! (%d)\n"
#: nano.c:3653
#, c-format
msgid "I got Alt-%c! (%d)\n"
msgstr "ðÏÊÍÁÌ Alt-%c! (%d)\n"
#: nano.c:3711
msgid "XOFF ignored, mumble mumble."
msgstr "XOFF ÐÒÏÉÇÎÏÒÉÒÏ×ÁÎ, ÍÒ-ÂÒ-ÂÒ"
@@ -1419,11 +1333,6 @@ msgstr "XOFF
msgid "XON ignored, mumble mumble."
msgstr "XON ÐÒÏÉÇÎÏÒÉÒÏ×ÁÎ, ÍÒ-ÂÒ-ÂÒ"
#: nano.c:3752
#, c-format
msgid "I got %c (%d)!\n"
msgstr "ðÏÊÍÁÌ %c (%d)!\n"
#: rcfile.c:103
#, c-format
msgid "Error in %s on line %d: "
@@ -1469,14 +1378,6 @@ msgstr ""
msgid "Missing syntax name"
msgstr "ïÔÓÕÔÓÔ×ÕÅÔ ÎÁÚ×ÁÎÉÅ ÓÉÎÔÁËÓÉÓÁ"
#: rcfile.c:298
msgid "Adding new syntax after 1st\n"
msgstr "äÏÂÁ×ÌÅÎÉÅ ÎÏ×ÏÇÏ ÓÉÎÔÁËÓÉÓÁ ÐÏÓÌÅ ÐÅÒ×ÏÇÏ\n"
#: rcfile.c:306
msgid "Starting a new syntax type\n"
msgstr "îÁÞÉÎÁÅÍ ÎÏ×ÙÊ ÔÉÐ ÓÉÎÔÁËÓÉÓÁ\n"
#: rcfile.c:352
msgid "Missing color name"
msgstr "ïÔÓÕÔÓÔ×ÕÅÔ ÎÁÚ×ÁÎÉÅ Ã×ÅÔÁ"
@@ -1485,35 +1386,15 @@ msgstr "
msgid "Cannot add a color directive without a syntax line"
msgstr "îÅ ÍÏÇÕ ÄÏÂÁ×ÉÔØ ÄÉÒÅËÔÉ×Õ Ã×ÅÔÁ ÂÅÚ ÓÒÏËÉ ÓÉÎÔÁËÓÉÓÁ"
#: rcfile.c:420
#, c-format
msgid "Starting a new colorstring for fg %d bg %d\n"
msgstr "îÁÞÉÎÁÅÍ ÎÏ×ÕÀ ÓÔÒÏËÕ Ã×ÅÔÁ ÄÌÑ Ã×ÅÔÁ %d, ÆÏÎÁ %d\n"
#: rcfile.c:428
#, c-format
msgid "Adding new entry for fg %d bg %d\n"
msgstr "äÏÂÁ×ÌÑÅÍ ÎÏ×ÕÀ ÚÁÐÉÓØ ÄÌÑ Ã×ÅÔÁ %d, ÆÏÎÁ %d\n"
#: rcfile.c:437
msgid "\"start=\" requires a corresponding \"end=\""
msgstr "\"start=\" ÔÒÅÂÕÅÔ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÅÇÏ \"end=\""
#: rcfile.c:486
#, c-format
msgid "%s: Read a comment\n"
msgstr "%s: þÉÔÁÅÍ ËÏÍÍÅÎÔÁÒÉÊ\n"
#: rcfile.c:509
#, c-format
msgid "command %s not understood"
msgstr "ËÏÍÁÎÄÁ %s ×ÅÓØÍÁ ÎÅ ×ÒÁÚÕÍÉÔÅÌØÎÁ"
#: rcfile.c:521
#, c-format
msgid "%s: Parsing option %s\n"
msgstr "%s: òÁÚÂÉÒÁÅÍ ÏÐÃÉÀ %s\n"
#: rcfile.c:541
#, c-format
msgid "option %s requires an argument"
@@ -1529,16 +1410,6 @@ msgstr "
msgid "requested tab size %d invalid"
msgstr "ÚÁÐÒÏÛÅÎÎÙÊ ÒÁÚÍÅÒ ÔÁÂÕÌÑÃÉÉ %d ÎÅ ×ÁÌÉÄÅÎ"
#: rcfile.c:598
#, c-format
msgid "set flag %d!\n"
msgstr "ÕÓÔÁÎÏ×ÉÔÅ ÆÌÁÇ %d!\n"
#: rcfile.c:604
#, c-format
msgid "unset flag %d!\n"
msgstr "cÎÉÍÉÔÅ ÆÌÁÇ %d!\n"
#: rcfile.c:614
msgid "Errors found in .nanorc file"
msgstr "÷ ÆÁÊÌÅ .nanorc ÎÁÊÄÅÎÙ ÏÛÉÂËÉ"
@@ -1638,137 +1509,205 @@ msgstr "
msgid "No matching bracket"
msgstr "îÅÔ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÅÊ ÓËÏÂËÉ"
#: utils.c:225 utils.c:235
#: utils.c:257 utils.c:267
msgid "nano is out of memory!"
msgstr "ÎÅ È×ÁÔÁÅÔ ÐÁÍÑÔÉ ÄÌÑ nano!"
#: winio.c:90
#, c-format
msgid "actual_x for xplus=%d returns %d\n"
msgstr "actual_x ÄÌÑ xplus=%d ×ÅÒÎÕÌÏ %d\n"
#: winio.c:245 winio.c:473
#, c-format
msgid "Aha! '%c' (%d)\n"
msgstr "áÇÁ! '%c' (%d)\n"
#: winio.c:496
#, c-format
msgid "input '%c' (%d)\n"
msgstr "××ÏÄ '%c' (%d)\n"
#: winio.c:549
#: winio.c:600
msgid " File: ..."
msgstr " æÁÊÌ: ..."
#: winio.c:551
#: winio.c:602
msgid " DIR: ..."
msgstr " äÉÒ: ..."
#: winio.c:556
#: winio.c:607
msgid "File: "
msgstr "æÁÊÌ: "
#: winio.c:559
#: winio.c:610
msgid " DIR: "
msgstr " äÉÒ: "
#: winio.c:564
#: winio.c:615
msgid " Modified "
msgstr " éÚÍÅÎÅÎ "
#: winio.c:566
#: winio.c:617
msgid " View "
msgstr " óÍÏÔÒ "
#: winio.c:752
#: winio.c:803
msgid "Refusing 0 length regex match"
msgstr "ïÔÂÒÁÓÙ×ÁÅÍ ×ÈÏÖÄÅÎÉÅ ÎÕÌÅ×ÏÊ ÄÌÉÎÙ"
#: winio.c:1064
#, c-format
msgid "Moved to (%d, %d) in edit buffer\n"
msgstr "ðÅÒÅÍÅÝÅÎÏ ÎÁ (%d, %d) × ÂÕÆÅÒÅ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ\n"
#: winio.c:1215
#, c-format
msgid "I got \"%s\"\n"
msgstr "ðÏÊÍÁÌ \"%s\"\n"
#: winio.c:1246
#: winio.c:1297
msgid "Yy"
msgstr "YyäÄ"
#: winio.c:1247
#: winio.c:1298
msgid "Nn"
msgstr "NnîÎ"
#: winio.c:1248
#: winio.c:1299
msgid "Aa"
msgstr "Aa÷×"
#: winio.c:1259
#: winio.c:1310
msgid "Yes"
msgstr "äÁ"
#: winio.c:1264
#: winio.c:1315
msgid "All"
msgstr "÷ÓÅ"
#: winio.c:1269
#: winio.c:1320
msgid "No"
msgstr "îÅÔ"
#: winio.c:1448
#: winio.c:1499
#, c-format
msgid "line %ld/%ld (%d%%), col %lu/%lu (%d%%), char %lu/%ld (%d%%)"
msgstr "ÓÔÒÏËÁ %ld/%ld (%d%%), ÓÔÏÌÂÅà %lu/%lu (%d%%), ÓÉÍ×ÏÌ %lu/%ld (%d%%)"
#: winio.c:1704
msgid "Dumping file buffer to stderr...\n"
msgstr "óÂÒÏÓ ÂÕÆÅÒÁ ÆÁÊÌÁ ÎÁ stderr...\n"
#: winio.c:1706
msgid "Dumping cutbuffer to stderr...\n"
msgstr "óÂÒÏÓ cutbuffer'Á ÎÁ stderr...\n"
#: winio.c:1708
msgid "Dumping a buffer to stderr...\n"
msgstr "óÂÒÏÓ ÂÕÆÆÅÒÁ ÎÁ stderr...\n"
#: winio.c:1789
#: winio.c:1838
msgid "The nano text editor"
msgstr "ôÅËÓÔÏ×ÙÊ ÒÅÄÁËÔÏÒ nano"
#: winio.c:1790
#: winio.c:1839
msgid "version "
msgstr "×ÅÒÓÉÑ "
#: winio.c:1791
#: winio.c:1840
msgid "Brought to you by:"
msgstr "ðÒÅÄÏÓÔÁ×ÌÅÎ ×ÁÍ:"
#: winio.c:1792
#: winio.c:1841
msgid "Special thanks to:"
msgstr "ïÓÏÂÁÑ ÂÌÁÇÏÄÁÒÎÏÓÔØ:"
#: winio.c:1793
#: winio.c:1842
msgid "The Free Software Foundation"
msgstr ""
"The Free Software Foundation (ÆÏÎÄ Ó×ÏÂÏÄÎÏÇÏ ÐÒÏÇÒÁÍÍÎÏÇÏ ÏÂÅÓÐÅÞÅÎÉÑ)"
#: winio.c:1794
#: winio.c:1843
msgid "For ncurses:"
msgstr "äÌÑ ncurses:"
#: winio.c:1795
#: winio.c:1844
msgid "and anyone else we forgot..."
msgstr "É ×ÓÅÍ ÏÓÔÁÌØÎÙÍ, ËÏÇÏ ÍÙ ÚÁÂÙÌÉ ÕÐÏÍÑÎÕÔØ..."
#: winio.c:1796
#: winio.c:1845
msgid "Thank you for using nano!\n"
msgstr "óÐÁÓÉÂÏ ÷ÁÍ ÚÁ ×ÙÂÏÒ nano!\n"
#~ msgid "add_to_cutbuffer() called with inptr->data = %s\n"
#~ msgstr "add_to_cutbuffer() ×ÙÚ×ÁÎ Ó inptr->data = %s\n"
#~ msgid "Blew away cutbuffer =)\n"
#~ msgstr "cutbuffer ÓÄÕÌÏ ×ÅÔÒÏÍ =)\n"
#~ msgid "filename is %s\n"
#~ msgstr "ÉÍÑ ÆÁÊÌÁ %s\n"
#~ msgid "%s: free'd a node, YAY!\n"
#~ msgstr "%s: ÊÏÊ, ÕÚÅÌ ÏÓ×ÏÂÏÖÄÅÎ!..\n"
#~ msgid "%s: free'd last node.\n"
#~ msgstr "%s: ÏÓ×ÏÂÏÖÄÅÎ ÐÏÓÌÅÄÎÉÊ ÕÚÅÌ.\n"
#~ msgid "Backing up %s to %s\n"
#~ msgstr "óÏÚÄÁÎÉÅ ÒÅÚÅÒ×ÎÏÊ ËÏÐÉÉ ÆÁÊÌÁ %s × ÆÁÊÌÅ %s\n"
#~ msgid "Wrote >%s\n"
#~ msgstr "úÁÐÉÓÁÎÏ >%s\n"
#~ msgid "current->data now = \"%s\"\n"
#~ msgstr "current->data ÓÅÊÞÁÓ = \"%s\"\n"
#~ msgid "After, data = \"%s\"\n"
#~ msgstr "ðÏÓÌÅ, data = \"%s\"\n"
#~ msgid "Main: set up windows\n"
#~ msgstr "Main: ÕÓÔÁÎÏ×ÉÔØ ÏËÎÁ\n"
#~ msgid "Main: bottom win\n"
#~ msgstr "Main: ÎÉÖÎÅÅ ÏËÎÏ\n"
#~ msgid "Main: open file\n"
#~ msgstr "Main: ÏÔËÒÙÔØ ÆÁÊÌ\n"
#~ msgid "AHA! %c (%d)\n"
#~ msgstr "áÇÁ! %c (%d)\n"
#~ msgid "I got Alt-O-%c! (%d)\n"
#~ msgstr "ðÏÊÍÁÌ Alt-O-%c! (%d)\n"
#~ msgid "I got Alt-[-1-%c! (%d)\n"
#~ msgstr "ðÏÊÍÁÌ Alt-[-1-%c! (%d)\n"
#~ msgid "I got Alt-[-2-%c! (%d)\n"
#~ msgstr "ðÏÊÍÁÌ Alt-[-2-%c! (%d)\n"
#~ msgid "I got Alt-[-%c! (%d)\n"
#~ msgstr "ðÏÊÍÁÌ Alt-[-%c! (%d)\n"
#~ msgid "I got Alt-%c! (%d)\n"
#~ msgstr "ðÏÊÍÁÌ Alt-%c! (%d)\n"
#~ msgid "I got %c (%d)!\n"
#~ msgstr "ðÏÊÍÁÌ %c (%d)!\n"
#~ msgid "Adding new syntax after 1st\n"
#~ msgstr "äÏÂÁ×ÌÅÎÉÅ ÎÏ×ÏÇÏ ÓÉÎÔÁËÓÉÓÁ ÐÏÓÌÅ ÐÅÒ×ÏÇÏ\n"
#~ msgid "Starting a new syntax type\n"
#~ msgstr "îÁÞÉÎÁÅÍ ÎÏ×ÙÊ ÔÉÐ ÓÉÎÔÁËÓÉÓÁ\n"
#~ msgid "Starting a new colorstring for fg %d bg %d\n"
#~ msgstr "îÁÞÉÎÁÅÍ ÎÏ×ÕÀ ÓÔÒÏËÕ Ã×ÅÔÁ ÄÌÑ Ã×ÅÔÁ %d, ÆÏÎÁ %d\n"
#~ msgid "Adding new entry for fg %d bg %d\n"
#~ msgstr "äÏÂÁ×ÌÑÅÍ ÎÏ×ÕÀ ÚÁÐÉÓØ ÄÌÑ Ã×ÅÔÁ %d, ÆÏÎÁ %d\n"
#~ msgid "%s: Read a comment\n"
#~ msgstr "%s: þÉÔÁÅÍ ËÏÍÍÅÎÔÁÒÉÊ\n"
#~ msgid "%s: Parsing option %s\n"
#~ msgstr "%s: òÁÚÂÉÒÁÅÍ ÏÐÃÉÀ %s\n"
#~ msgid "set flag %d!\n"
#~ msgstr "ÕÓÔÁÎÏ×ÉÔÅ ÆÌÁÇ %d!\n"
#~ msgid "unset flag %d!\n"
#~ msgstr "cÎÉÍÉÔÅ ÆÌÁÇ %d!\n"
#~ msgid "actual_x for xplus=%d returns %d\n"
#~ msgstr "actual_x ÄÌÑ xplus=%d ×ÅÒÎÕÌÏ %d\n"
#~ msgid "Aha! '%c' (%d)\n"
#~ msgstr "áÇÁ! '%c' (%d)\n"
#~ msgid "input '%c' (%d)\n"
#~ msgstr "××ÏÄ '%c' (%d)\n"
#~ msgid "Moved to (%d, %d) in edit buffer\n"
#~ msgstr "ðÅÒÅÍÅÝÅÎÏ ÎÁ (%d, %d) × ÂÕÆÅÒÅ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ\n"
#~ msgid "I got \"%s\"\n"
#~ msgstr "ðÏÊÍÁÌ \"%s\"\n"
#~ msgid "Dumping file buffer to stderr...\n"
#~ msgstr "óÂÒÏÓ ÂÕÆÅÒÁ ÆÁÊÌÁ ÎÁ stderr...\n"
#~ msgid "Dumping cutbuffer to stderr...\n"
#~ msgstr "óÂÒÏÓ cutbuffer'Á ÎÁ stderr...\n"
#~ msgid "Dumping a buffer to stderr...\n"
#~ msgstr "óÂÒÏÓ ÂÕÆÆÅÒÁ ÎÁ stderr...\n"
#~ msgid ""
#~ "\n"
#~ "The -p flag now invokes the Pico \"preserve\" flag.\n"

1771
po/rw.po Normal file

File diff suppressed because it is too large Load Diff

1528
po/sr.po Normal file

File diff suppressed because it is too large Load Diff

2247
po/sv.po

File diff suppressed because it is too large Load Diff

738
po/tr.po

File diff suppressed because it is too large Load Diff

433
po/uk.po
View File

@@ -5,7 +5,8 @@
msgid ""
msgstr ""
"Project-Id-Version: nano 1.1.99pre3\n"
"POT-Creation-Date: 2003-04-19 23:02-0400\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2003-08-11 21:49-0400\n"
"PO-Revision-Date: 2003-02-17 10:51+0300\n"
"Last-Translator: Sergey A. Ribalchenko <fisher@obu.ck.ua>\n"
"Language-Team: Ukrainian <translation-team-uk@lists.sourceforge.net>\n"
@@ -15,15 +16,6 @@ msgstr ""
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
#: cut.c:49
#, c-format
msgid "add_to_cutbuffer() called with inptr->data = %s\n"
msgstr "add_to_cutbuffer() ×ÉËÌÉËÁÎÏ Ú inptr->data = %s\n"
#: cut.c:213
msgid "Blew away cutbuffer =)\n"
msgstr "\"ËÉÛÅÎÀ\" (cutbuffer) ÚÄÕÌÏ ×¦ÔÒÏÍ =)\n"
#: files.c:317
#, c-format
msgid "Read %d line (Converted from Mac format)"
@@ -89,12 +81,6 @@ msgstr "
msgid "File to insert [from ./] "
msgstr "æÁÊÌ ÄÏ ×ÓÔÁ×ËÉ [×¦Ä ./] "
#: files.c:479 files.c:736 files.c:793 files.c:881 files.c:893 files.c:944
#: files.c:955 files.c:1815
#, c-format
msgid "filename is %s\n"
msgstr "¦Í'Ñ ÆÁÊÌÕ: %s\n"
#: files.c:495
msgid "Command to execute"
msgstr "ëÏÍÁÎÄÁ ÄÏ ×ÉËÏÎÁÎÎÑ "
@@ -112,16 +98,6 @@ msgstr "
msgid "Key illegal in non-multibuffer mode"
msgstr "îÅצÒÎÁ ËÎÏÐËÁ × ÎÅ-ÍÕÌØÔÉÂÕÆÅÒÎÏÍÕ ÒÅÖÉͦ"
#: files.c:704 nano.c:565
#, c-format
msgid "%s: free'd a node, YAY!\n"
msgstr "%s: êÏÊ.. ×ÕÚÏÌ Ú×¦ÌØÎÅÎÏ!\n"
#: files.c:709 nano.c:570
#, c-format
msgid "%s: free'd last node.\n"
msgstr "%s: Ú×¦ÌØÎÅÎÏ ÏÓÔÁÎÎØÏÇÏ ×ÕÚÌÁ.\n"
#: files.c:873 files.c:936
msgid "No more open files"
msgstr "â¦ÌØÛ ÎÅÍÁ צÄËÒÉÔÉÈ ÆÁÊ̦×"
@@ -146,11 +122,6 @@ msgstr "
msgid "Couldn't write backup: %s"
msgstr "îÅ ÍÏÖÕ ÚÁÐÉÓÁÔÉ ÒÅÚÅÒ×: %s"
#: files.c:1401
#, c-format
msgid "Backing up %s to %s\n"
msgstr "òÏÂÌÀ ÒÅÚÅÒ×ÎÕ ËÏЦÀ ÆÁÊÌÕ %s, ÒÅÚÅÒ×ÎÉÊ ÆÁÊÌ: %s\n"
#: files.c:1413
#, c-format
msgid "Could not set permissions %o on backup %s: %s"
@@ -173,11 +144,6 @@ msgstr ""
msgid "Could not open file for writing: %s"
msgstr "îÅ ÍÏÖÕ ×¦ÄËÒÉÔÉ ÆÁÊÌ ÄÌÑ ÚÁÐÉÓÕ: %s"
#: files.c:1516
#, c-format
msgid "Wrote >%s\n"
msgstr "úÁÐÉÓÁÎÏ >%s\n"
#: files.c:1572
#, c-format
msgid "Could not close %s: %s"
@@ -531,215 +497,215 @@ msgstr "
msgid "Toggle insert into new buffer"
msgstr "ðÅÒÅÍÉËÎÕÔÉ ÒÅÖÉÍ ×ÓÔÁ×ËÉ × ÎÏ×ÉÊ ÂÕÆÅÒ"
#: global.c:418 global.c:565 global.c:605 global.c:641 global.c:660
#: global.c:690 global.c:722 global.c:744 global.c:754 global.c:764
#: global.c:784
#: global.c:418 global.c:578 global.c:627 global.c:664 global.c:683
#: global.c:713 global.c:751 global.c:775 global.c:785 global.c:795
#: global.c:816
msgid "Get Help"
msgstr "äÏÐÏÍÏÇÁ"
#: global.c:424
#: global.c:425
msgid "Close"
msgstr "úÁËÒÉÔÉ"
#: global.c:430 global.c:683
#: global.c:432 global.c:706
msgid "Exit"
msgstr "÷ÉȦÄ"
#: global.c:434
#: global.c:437
msgid "WriteOut"
msgstr "úÁÐÉÓÁÔÉ"
#: global.c:438
#: global.c:442
msgid "Justify"
msgstr "÷ÉÒ¦×ÎÀ×ÁÎÎÑ"
#: global.c:443
#: global.c:448
msgid "Read File"
msgstr "þÉÔ. æÁÊÌ"
#: global.c:452
#: global.c:458
msgid "Where Is"
msgstr "ðÏÛÕË"
#: global.c:456 global.c:675 global.c:770
#: global.c:463 global.c:698 global.c:801
msgid "Prev Page"
msgstr "ðÏÐ.óÔÏÒ."
#: global.c:460 global.c:679 global.c:774
#: global.c:468 global.c:702 global.c:805
msgid "Next Page"
msgstr "îÁÓÔ.óÔÏÒ."
#: global.c:464
#: global.c:473
msgid "Cut Text"
msgstr "÷ÉÒ¦ÚÁÔÉ"
#: global.c:469
#: global.c:479
msgid "UnJustify"
msgstr "óËÁÓ÷ÉÒ¦×Î"
#: global.c:473
#: global.c:484
msgid "UnCut Txt"
msgstr "óËÁÓ÷ÉÒ¦Ú"
#: global.c:477
#: global.c:489
msgid "Cur Pos"
msgstr "ðÏÚÉæÑ"
#: global.c:481
#: global.c:494
msgid "To Spell"
msgstr "ðÒÁ×ÏÐÉÓ"
#: global.c:485 nano.c:420 winio.c:604
#: global.c:498 nano.c:420 winio.c:655
msgid "Up"
msgstr "÷ÇÏÒÕ"
#: global.c:489
#: global.c:502
msgid "Down"
msgstr "÷ÎÉÚ"
#: global.c:493
#: global.c:506
msgid "Forward"
msgstr "÷ÐÅÒÅÄ"
#: global.c:497
#: global.c:510
msgid "Back"
msgstr "îÁÚÁÄ"
#: global.c:501
#: global.c:514
msgid "Home"
msgstr "ðÏÞÁÔÏË"
#: global.c:505
#: global.c:518
msgid "End"
msgstr "ë¦ÎÅÃØ"
#: global.c:509
#: global.c:522
msgid "Refresh"
msgstr "ðÅÒÅÍÁÌÀ×ÁÔÉ"
#: global.c:513
#: global.c:526
msgid "Mark Text"
msgstr "ðÏͦÔÉÔÉ"
#: global.c:517
#: global.c:530
msgid "Delete"
msgstr "÷ÉÄÁÌÉÔÉ"
#: global.c:521
#: global.c:534
msgid "Backspace"
msgstr "úÁ¦Ê"
#: global.c:525
#: global.c:538
msgid "Tab"
msgstr "ôÁÂÕÌÑæÑ"
#: global.c:528 global.c:578
#: global.c:541 global.c:595
msgid "Replace"
msgstr "úÁͦÎÁ"
#: global.c:532
#: global.c:545
msgid "Enter"
msgstr "÷×ÏÄ"
#: global.c:536 global.c:581 global.c:620
#: global.c:549 global.c:599 global.c:643
msgid "Go To Line"
msgstr "äÏ òÑÄËÁ"
#: global.c:541
#: global.c:554
msgid "Next Word"
msgstr "îÁÓÔóÌÏ×Ï"
#: global.c:542
#: global.c:555
msgid "Move forward one word"
msgstr "÷ÐÅÒÅÄ ÎÁ ÏÄÎÅ ÓÌÏ×Ï"
#: global.c:545
#: global.c:558
msgid "Prev Word"
msgstr "ðÏÐóÌÏ×Ï"
#: global.c:546
#: global.c:559
msgid "Move backward one word"
msgstr "îÁÚÁÄ ÎÁ ÏÄÎÅ ÓÌÏ×Ï"
#: global.c:550
#: global.c:563
msgid "Find Other Bracket"
msgstr "úÎÁÊÔÉ äÒÕÇÕ äÕÖËÕ"
#: global.c:555
#: global.c:568
msgid "Previous File"
msgstr "ðÏÐÅÒÅÄÎ¦Ê æÁÊÌ"
#: global.c:558
#: global.c:571
msgid "Next File"
msgstr "îÁÓÔÕÐÎÉÊ ÆÁÊÌ"
#: global.c:568 global.c:608 global.c:644 global.c:663 global.c:717
#: global.c:725 global.c:747 global.c:757 global.c:767 global.c:787
#: winio.c:1272
#: global.c:582 global.c:630 global.c:667 global.c:686 global.c:746
#: global.c:754 global.c:778 global.c:788 global.c:798 global.c:819
#: winio.c:1323
msgid "Cancel"
msgstr "óËÁÓÕ×ÁÔÉ"
#: global.c:571 global.c:611 global.c:647 global.c:666
#: global.c:586 global.c:633 global.c:670 global.c:689
msgid "First Line"
msgstr "ðÅÒÛÉÊ òÑÄÏË"
#: global.c:575 global.c:614 global.c:650 global.c:669
#: global.c:591 global.c:636 global.c:673 global.c:692
msgid "Last Line"
msgstr "ïÓÔÁÎÎ¦Ê òÑÄÏË"
#: global.c:585 global.c:624
#: global.c:604 global.c:647
msgid "Case Sens"
msgstr "òÅÇúÁÌÅÖ"
#: global.c:588 global.c:627
#: global.c:608 global.c:650
msgid "Direction"
msgstr "îÁÐÒÑÍÏË"
#: global.c:592 global.c:631
#: global.c:613 global.c:654
msgid "Regexp"
msgstr "æÏÒÍ÷ÉÒ"
#: global.c:597 global.c:635 global.c:654
#: global.c:619 global.c:658 global.c:677
msgid "History"
msgstr "¶ÓÔÏÒ¦Ñ"
#: global.c:617
#: global.c:640
msgid "No Replace"
msgstr "îÅ úÁͦÝÁÔÉ"
#: global.c:694 global.c:729
#: global.c:718 global.c:758
msgid "To Files"
msgstr "äÏ æÁÊ̦×"
#: global.c:699
#: global.c:724
msgid "DOS Format"
msgstr "ÆÏÒÍÁÔ DOS"
#: global.c:702
#: global.c:728
msgid "Mac Format"
msgstr "ÆÏÒÍÁÔ Mac"
#: global.c:706
#: global.c:733
msgid "Append"
msgstr "äÏÄÁÔÉ"
#: global.c:709
#: global.c:737
msgid "Prepend"
msgstr "äÏÄÁÔÉ(0)"
#: global.c:713
#: global.c:742
msgid "Backup File"
msgstr "úÒÏÂÉÔÉ ÒÅÚÅÒ×ÎÕ ËÏЦÀ"
#: global.c:733
#: global.c:763
msgid "Execute Command"
msgstr "÷ÉËÏÎÁÔÉ ËÏÍÁÎÄÕ"
#: global.c:736 winio.c:545
#: global.c:767 winio.c:596
msgid "New Buffer"
msgstr "îÏ×ÉÊ âÕÆÅÒ"
#: global.c:778
#: global.c:810
msgid "Go To Dir"
msgstr "äÏ äÉÒÅËÔÏÒ¦§"
@@ -1240,16 +1206,6 @@ msgstr "
msgid "Could not fork"
msgstr "îÅ ÍÏÖÕ ÚÒÏÂÉÔÉ fork()"
#: nano.c:1032
#, c-format
msgid "current->data now = \"%s\"\n"
msgstr "current->data ÚÁÒÁÚ = \"%s\"\n"
#: nano.c:1092
#, c-format
msgid "After, data = \"%s\"\n"
msgstr "ð¦ÓÌÑ, ÄÁΦ = \"%s\"\n"
#: nano.c:1365
msgid "Mark Set"
msgstr "í¦ÔËÕ ×ÓÔÁÎÏ×ÌÅÎÏ"
@@ -1370,48 +1326,6 @@ msgstr "
msgid "Tab size is too small for nano...\n"
msgstr "òÏÚÍ¦Ò ÔÁÂÕÌÑæ§ ÚÁÍÁÌÉÊ ÄÌÑ nano...\n"
#: nano.c:3384
msgid "Main: set up windows\n"
msgstr "Main: ×ÓÔÁÎÏ×ÉÔÉ ×¦ËÎÁ\n"
#: nano.c:3398
msgid "Main: bottom win\n"
msgstr "Main: ÎÉÖΤ צËÎÏ\n"
#: nano.c:3404
msgid "Main: open file\n"
msgstr "Main: צÄËÒÉÔÉ ÆÁÊÌ\n"
#: nano.c:3461
#, c-format
msgid "AHA! %c (%d)\n"
msgstr "áÇÁ! %c (%d)\n"
#: nano.c:3481
#, c-format
msgid "I got Alt-O-%c! (%d)\n"
msgstr "ñ ЦÊÍÁ× Alt-O-%c! (%d)\n"
#: nano.c:3508
#, c-format
msgid "I got Alt-[-1-%c! (%d)\n"
msgstr "ñ ЦÊÍÁ× Alt-[-1-%c! (%d)\n"
#: nano.c:3538
#, c-format
msgid "I got Alt-[-2-%c! (%d)\n"
msgstr "ñ ЦÊÍÁ× Alt-[-2-%c! (%d)\n"
#: nano.c:3607
#, c-format
msgid "I got Alt-[-%c! (%d)\n"
msgstr "ñ ЦÊÍÁ× Alt-[-%c! (%d)\n"
#: nano.c:3653
#, c-format
msgid "I got Alt-%c! (%d)\n"
msgstr "ñ ЦÊÍÁ× Alt-%c! (%d)\n"
#: nano.c:3711
msgid "XOFF ignored, mumble mumble."
msgstr "XOFF ÉÇÎÏÒÏ×ÁÎÏ, ÐÒÉÍ-ЦÍ-ЦÍ"
@@ -1420,11 +1334,6 @@ msgstr "XOFF
msgid "XON ignored, mumble mumble."
msgstr "XON ÉÇÎÏÒÏ×ÁÎÏ, ÍÕÒ-ÍÕÒ-ÍÕÒ"
#: nano.c:3752
#, c-format
msgid "I got %c (%d)!\n"
msgstr "ñ ЦÊÍÁ× %c (%d)!\n"
#: rcfile.c:103
#, c-format
msgid "Error in %s on line %d: "
@@ -1470,14 +1379,6 @@ msgstr ""
msgid "Missing syntax name"
msgstr "÷¦ÄÓÕÔÎÑ ÎÁÚ×Á ÓÉÎÔÁËÓÉÓÕ"
#: rcfile.c:298
msgid "Adding new syntax after 1st\n"
msgstr "äÏÄÁ¤ÍÏ ÎÏ×ÉÊ ÓÉÎÔÁËÓ Ð¦ÓÌÑ ÐÅÒÛÏÇÏ\n"
#: rcfile.c:306
msgid "Starting a new syntax type\n"
msgstr "ðÏÞÉÎÁ¤ÍÏ ÎÏ×ÉÊ ÔÉÐ ÓÉÎÔÁËÓÕ\n"
#: rcfile.c:352
msgid "Missing color name"
msgstr "÷¦ÄÓÕÔÎÑ ÎÁÚ×Á ËÏÌØÏÒÕ"
@@ -1486,35 +1387,15 @@ msgstr "
msgid "Cannot add a color directive without a syntax line"
msgstr "îÅ ÍÏÖÕ ÄÏÄÁÔÉ ËÏÍÁÎÄÕ ËÏÌØÏÒÕ ÂÅÚ ÒÑÄËÁ ÓÉÎÔÁËÓÉÓÕ"
#: rcfile.c:420
#, c-format
msgid "Starting a new colorstring for fg %d bg %d\n"
msgstr "ðÏÞÉÎÁ¤ÍÏ ÎÏ×ÉÊ ÒÑÄÏË ËÏÌØÏÒÕ ÄÌÑ ËÏÌØÏÒÕ %d ÎÁ ÆÏΦ %d\n"
#: rcfile.c:428
#, c-format
msgid "Adding new entry for fg %d bg %d\n"
msgstr "äÏÄÁ¤ÍÏ ÎÏ×ÉÊ ÚÁÐÉÓ ÄÌÑ ËÏÌØÏÒÕ %d ÎÁ ÆÏΦ %d\n"
#: rcfile.c:437
msgid "\"start=\" requires a corresponding \"end=\""
msgstr "\"start=\" ÐÏÔÒÅÂÕ¤ צÄÐÏצÄÎÏÇÏ \"end=\""
#: rcfile.c:486
#, c-format
msgid "%s: Read a comment\n"
msgstr "%s: ÞÉÔÁ¤ÍÏ ËÏÍÅÎÔÁÒ\n"
#: rcfile.c:509
#, c-format
msgid "command %s not understood"
msgstr "ËÏÍÁÎÄÁ %s ÎÅ ÚÒÏÚÕͦÌÁ"
#: rcfile.c:521
#, c-format
msgid "%s: Parsing option %s\n"
msgstr "%s: òÏÚ¦ÂÒÁÎÎÑ ÏÐæ§ %s\n"
#: rcfile.c:541
#, c-format
msgid "option %s requires an argument"
@@ -1530,16 +1411,6 @@ msgstr "
msgid "requested tab size %d invalid"
msgstr "ÚÁÐÒÏÛÅÎÉÊ ÒÏÚÍ¦Ò ÔÁÂÕÌÑæ§ %d ¤ ÎÅËÏÒÅËÔÎÉÍ"
#: rcfile.c:598
#, c-format
msgid "set flag %d!\n"
msgstr "×ÓÔÁÎÏ×ÉÔØ ÆÌÁÇ %d!\n"
#: rcfile.c:604
#, c-format
msgid "unset flag %d!\n"
msgstr "ÓËÉÎØÔÅ ÆÌÁÇ %d!\n"
#: rcfile.c:614
msgid "Errors found in .nanorc file"
msgstr "úÎÁÊÄÅÎÏ ÐÏÍÉÌËÉ Õ ÆÁÊ̦ .nanorc"
@@ -1640,136 +1511,204 @@ msgstr "
msgid "No matching bracket"
msgstr "îÅÍÁ צÄÐÏצÄÎϧ ÄÕÖËÉ"
#: utils.c:225 utils.c:235
#: utils.c:257 utils.c:267
msgid "nano is out of memory!"
msgstr "ÎÅ×ÉÓÔÁÞÁ¤ ×¦ÌØÎϧ ÐÁÍ'ÑÔ¦ ÄÌÑ nano!"
#: winio.c:90
#, c-format
msgid "actual_x for xplus=%d returns %d\n"
msgstr "actual_x ÄÌÑ xplus=%d ÐÏ×ÅÒÔÁ¤ %d\n"
#: winio.c:245 winio.c:473
#, c-format
msgid "Aha! '%c' (%d)\n"
msgstr "áÇÁ! '%c' (%d)\n"
#: winio.c:496
#, c-format
msgid "input '%c' (%d)\n"
msgstr "×È¦Ä '%c' (%d)\n"
#: winio.c:549
#: winio.c:600
msgid " File: ..."
msgstr " æÁÊÌ: ..."
#: winio.c:551
#: winio.c:602
msgid " DIR: ..."
msgstr " äÉÒ: ..."
#: winio.c:556
#: winio.c:607
msgid "File: "
msgstr "æÁÊÌ: "
#: winio.c:559
#: winio.c:610
msgid " DIR: "
msgstr " äÉÒ: "
#: winio.c:564
#: winio.c:615
msgid " Modified "
msgstr " úͦÎÅÎÏ "
#: winio.c:566
#: winio.c:617
msgid " View "
msgstr " ðÅÒÅÇÌÑÄ "
#: winio.c:752
#: winio.c:803
msgid "Refusing 0 length regex match"
msgstr "÷¦ÄËÉÄÁ¤ÍÏ ÓЦ×ÐÁĦÎÎÑ ÆÏÒÍÁÌØÎÏÇÏ ×ÉÒÁÚÕ ÄÏ×ÖÉÎÏÀ 0"
#: winio.c:1064
#, c-format
msgid "Moved to (%d, %d) in edit buffer\n"
msgstr "ðÅÒÅͦÝÅÎÏ ÄÏ (%d,%d) × ÂÕÆÅÒ¦ ÒÅÄÁÇÕ×ÁÎÎÑ\n"
#: winio.c:1215
#, c-format
msgid "I got \"%s\"\n"
msgstr "ñ ЦÊÍÁ× \"%s\"\n"
#: winio.c:1246
#: winio.c:1297
msgid "Yy"
msgstr "YyôÔ"
#: winio.c:1247
#: winio.c:1298
msgid "Nn"
msgstr "NnîÎ"
#: winio.c:1248
#: winio.c:1299
msgid "Aa"
msgstr "Aa÷×"
#: winio.c:1259
#: winio.c:1310
msgid "Yes"
msgstr "ôÁË"
#: winio.c:1264
#: winio.c:1315
msgid "All"
msgstr "÷ÓÅ"
#: winio.c:1269
#: winio.c:1320
msgid "No"
msgstr "î¦"
#: winio.c:1448
#: winio.c:1499
#, c-format
msgid "line %ld/%ld (%d%%), col %lu/%lu (%d%%), char %lu/%ld (%d%%)"
msgstr "ÒÑÄÏË %ld/%ld (%d%%), ÓÔÏ×ÐÞÉË %lu/%lu (%d%%, ̦ÔÅÒÁ %lu/%ld (%d%%)"
#: winio.c:1704
msgid "Dumping file buffer to stderr...\n"
msgstr "óËÉÄÁÎÎÑ ÂÕÆÅÒÕ ÆÁÊÌÕ ÄÏ stderr...\n"
#: winio.c:1706
msgid "Dumping cutbuffer to stderr...\n"
msgstr "óËÉÄÁÎÎÑ ÚͦÓÔÕ \"ËÉÛÅΦ\" ÄÏ stderr...\n"
#: winio.c:1708
msgid "Dumping a buffer to stderr...\n"
msgstr "óËÉÄÁÎÎÑ ÂÕÆÅÒÕ ÄÏ stderr...\n"
#: winio.c:1789
#: winio.c:1838
msgid "The nano text editor"
msgstr "ôÅËÓÔÏ×ÉÊ ÒÅÄÁËÔÏÒ nano"
#: winio.c:1790
#: winio.c:1839
msgid "version "
msgstr "×ÅÒÓ¦Ñ "
#: winio.c:1791
#: winio.c:1840
msgid "Brought to you by:"
msgstr "óÔ×ÏÒÅÎÏ ÄÌÑ ÷ÁÓ:"
#: winio.c:1792
#: winio.c:1841
msgid "Special thanks to:"
msgstr "ïÓÏÂÌÉ×Á ÐÏÄÑËÁ:"
#: winio.c:1793
#: winio.c:1842
msgid "The Free Software Foundation"
msgstr "The Free Software Foundation (æÏÎÄ ÷¦ÌØÎÏÇÏ ðÒÏÇÒÁÍÎÏÇÏ ÚÁÂÅÚÐÅÞÅÎÎÑ)"
#: winio.c:1794
#: winio.c:1843
msgid "For ncurses:"
msgstr "äÌÑ ncurses:"
#: winio.c:1795
#: winio.c:1844
msgid "and anyone else we forgot..."
msgstr "ÔÁ ¦ÎÛÉÍ ËÏÇÏ ÍÉ ÚÁÂÕÌÉ..."
#: winio.c:1796
#: winio.c:1845
msgid "Thank you for using nano!\n"
msgstr "äÑËÕ¤ÍÏ ÷ÁÍ ÚÁ ÔÅ, ÝÏ ÏÂÒÁÌÉ nano!\n"
#~ msgid "add_to_cutbuffer() called with inptr->data = %s\n"
#~ msgstr "add_to_cutbuffer() ×ÉËÌÉËÁÎÏ Ú inptr->data = %s\n"
#~ msgid "Blew away cutbuffer =)\n"
#~ msgstr "\"ËÉÛÅÎÀ\" (cutbuffer) ÚÄÕÌÏ ×¦ÔÒÏÍ =)\n"
#~ msgid "filename is %s\n"
#~ msgstr "¦Í'Ñ ÆÁÊÌÕ: %s\n"
#~ msgid "%s: free'd a node, YAY!\n"
#~ msgstr "%s: êÏÊ.. ×ÕÚÏÌ Ú×¦ÌØÎÅÎÏ!\n"
#~ msgid "%s: free'd last node.\n"
#~ msgstr "%s: Ú×¦ÌØÎÅÎÏ ÏÓÔÁÎÎØÏÇÏ ×ÕÚÌÁ.\n"
#~ msgid "Backing up %s to %s\n"
#~ msgstr "òÏÂÌÀ ÒÅÚÅÒ×ÎÕ ËÏЦÀ ÆÁÊÌÕ %s, ÒÅÚÅÒ×ÎÉÊ ÆÁÊÌ: %s\n"
#~ msgid "Wrote >%s\n"
#~ msgstr "úÁÐÉÓÁÎÏ >%s\n"
#~ msgid "current->data now = \"%s\"\n"
#~ msgstr "current->data ÚÁÒÁÚ = \"%s\"\n"
#~ msgid "After, data = \"%s\"\n"
#~ msgstr "ð¦ÓÌÑ, ÄÁΦ = \"%s\"\n"
#~ msgid "Main: set up windows\n"
#~ msgstr "Main: ×ÓÔÁÎÏ×ÉÔÉ ×¦ËÎÁ\n"
#~ msgid "Main: bottom win\n"
#~ msgstr "Main: ÎÉÖΤ צËÎÏ\n"
#~ msgid "Main: open file\n"
#~ msgstr "Main: צÄËÒÉÔÉ ÆÁÊÌ\n"
#~ msgid "AHA! %c (%d)\n"
#~ msgstr "áÇÁ! %c (%d)\n"
#~ msgid "I got Alt-O-%c! (%d)\n"
#~ msgstr "ñ ЦÊÍÁ× Alt-O-%c! (%d)\n"
#~ msgid "I got Alt-[-1-%c! (%d)\n"
#~ msgstr "ñ ЦÊÍÁ× Alt-[-1-%c! (%d)\n"
#~ msgid "I got Alt-[-2-%c! (%d)\n"
#~ msgstr "ñ ЦÊÍÁ× Alt-[-2-%c! (%d)\n"
#~ msgid "I got Alt-[-%c! (%d)\n"
#~ msgstr "ñ ЦÊÍÁ× Alt-[-%c! (%d)\n"
#~ msgid "I got Alt-%c! (%d)\n"
#~ msgstr "ñ ЦÊÍÁ× Alt-%c! (%d)\n"
#~ msgid "I got %c (%d)!\n"
#~ msgstr "ñ ЦÊÍÁ× %c (%d)!\n"
#~ msgid "Adding new syntax after 1st\n"
#~ msgstr "äÏÄÁ¤ÍÏ ÎÏ×ÉÊ ÓÉÎÔÁËÓ Ð¦ÓÌÑ ÐÅÒÛÏÇÏ\n"
#~ msgid "Starting a new syntax type\n"
#~ msgstr "ðÏÞÉÎÁ¤ÍÏ ÎÏ×ÉÊ ÔÉÐ ÓÉÎÔÁËÓÕ\n"
#~ msgid "Starting a new colorstring for fg %d bg %d\n"
#~ msgstr "ðÏÞÉÎÁ¤ÍÏ ÎÏ×ÉÊ ÒÑÄÏË ËÏÌØÏÒÕ ÄÌÑ ËÏÌØÏÒÕ %d ÎÁ ÆÏΦ %d\n"
#~ msgid "Adding new entry for fg %d bg %d\n"
#~ msgstr "äÏÄÁ¤ÍÏ ÎÏ×ÉÊ ÚÁÐÉÓ ÄÌÑ ËÏÌØÏÒÕ %d ÎÁ ÆÏΦ %d\n"
#~ msgid "%s: Read a comment\n"
#~ msgstr "%s: ÞÉÔÁ¤ÍÏ ËÏÍÅÎÔÁÒ\n"
#~ msgid "%s: Parsing option %s\n"
#~ msgstr "%s: òÏÚ¦ÂÒÁÎÎÑ ÏÐæ§ %s\n"
#~ msgid "set flag %d!\n"
#~ msgstr "×ÓÔÁÎÏ×ÉÔØ ÆÌÁÇ %d!\n"
#~ msgid "unset flag %d!\n"
#~ msgstr "ÓËÉÎØÔÅ ÆÌÁÇ %d!\n"
#~ msgid "actual_x for xplus=%d returns %d\n"
#~ msgstr "actual_x ÄÌÑ xplus=%d ÐÏ×ÅÒÔÁ¤ %d\n"
#~ msgid "Aha! '%c' (%d)\n"
#~ msgstr "áÇÁ! '%c' (%d)\n"
#~ msgid "input '%c' (%d)\n"
#~ msgstr "×È¦Ä '%c' (%d)\n"
#~ msgid "Moved to (%d, %d) in edit buffer\n"
#~ msgstr "ðÅÒÅͦÝÅÎÏ ÄÏ (%d,%d) × ÂÕÆÅÒ¦ ÒÅÄÁÇÕ×ÁÎÎÑ\n"
#~ msgid "I got \"%s\"\n"
#~ msgstr "ñ ЦÊÍÁ× \"%s\"\n"
#~ msgid "Dumping file buffer to stderr...\n"
#~ msgstr "óËÉÄÁÎÎÑ ÂÕÆÅÒÕ ÆÁÊÌÕ ÄÏ stderr...\n"
#~ msgid "Dumping cutbuffer to stderr...\n"
#~ msgstr "óËÉÄÁÎÎÑ ÚͦÓÔÕ \"ËÉÛÅΦ\" ÄÏ stderr...\n"
#~ msgid "Dumping a buffer to stderr...\n"
#~ msgstr "óËÉÄÁÎÎÑ ÂÕÆÅÒÕ ÄÏ stderr...\n"
#~ msgid ""
#~ "\n"
#~ "The -p flag now invokes the Pico \"preserve\" flag.\n"

View File

@@ -5,19 +5,20 @@
#
# Copyright (C) 2000 Free Software Foundation.
#
# This script 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 of the
# License, or (at your option) any later version.
# This script 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 of the License, or (at
# your option) any later version.
#
# This script is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# This script is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this library; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
# USA.
#
# Authors: Kenneth Christiansen <kenneth@gnu.org>
#

1548
po/vi.po Normal file

File diff suppressed because it is too large Load Diff

1548
po/zh_TW.po Normal file

File diff suppressed because it is too large Load Diff

488
proto.h
View File

@@ -1,488 +0,0 @@
/* $Id$ */
/**************************************************************************
* proto.h *
* *
* Copyright (C) 1999-2003 Chris Allegretta *
* 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) *
* any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
* *
**************************************************************************/
/* Externs */
#include <sys/stat.h>
#ifdef HAVE_REGEX_H
#include <regex.h>
#endif
#include "nano.h"
extern int wrap_at;
extern int editwinrows;
extern int current_x, current_y, totlines;
extern int placewewant;
#ifndef NANO_SMALL
extern int mark_beginx;
#endif
extern long totsize;
extern int temp_opt;
extern int wrap_at, flags, tabsize;
extern int search_last_line;
extern int search_offscreen;
extern int currslen;
#ifndef DISABLE_JUSTIFY
extern char *quotestr;
#endif
extern WINDOW *edit, *topwin, *bottomwin;
extern char *filename;
extern struct stat originalfilestat;
extern char *answer;
extern char *hblank;
#ifndef DISABLE_HELP
extern char *help_text;
#endif
extern char *last_search;
extern char *last_replace;
#ifndef DISABLE_OPERATINGDIR
extern char *operating_dir;
extern char *full_operating_dir;
#endif
#ifndef DISABLE_SPELLER
extern char *alt_speller;
#endif
extern int resetstatuspos;
extern struct stat fileinfo;
extern filestruct *current, *fileage, *edittop, *editbot, *filebot;
extern filestruct *cutbuffer;
#ifndef NANO_SMALL
extern filestruct *mark_beginbuf;
#endif
#ifdef ENABLE_MULTIBUFFER
extern openfilestruct *open_files;
#endif
#ifdef ENABLE_COLOR
extern const colortype *colorstrings;
extern syntaxtype *syntaxes;
extern char *syntaxstr;
#endif
extern shortcut *shortcut_list;
extern shortcut *main_list, *whereis_list;
extern shortcut *replace_list, *goto_list;
extern shortcut *writefile_list, *insertfile_list;
extern shortcut *replace_list_2;
#ifndef NANO_SMALL
extern shortcut *extcmd_list;
#endif
#ifndef DISABLE_HELP
extern shortcut *help_list;
#endif
#ifndef DISABLE_SPELLER
extern shortcut *spell_list;
#endif
#ifndef DISABLE_BROWSER
extern shortcut *browser_list, *gotodir_list;
#endif
#if !defined(DISABLE_BROWSER) || !defined(DISABLE_HELP) || (!defined(DISABLE_MOUSE) && defined(NCURSES_MOUSE_VERSION))
extern const shortcut *currshortcut;
#endif
#ifdef HAVE_REGEX_H
extern regex_t search_regexp;
extern regmatch_t regmatches[10];
#ifdef ENABLE_COLOR
extern regex_t syntaxfile_regexp;
extern regmatch_t synfilematches[1];
#endif /* ENABLE_COLOR */
#endif /* HAVE_REGEX_H */
#ifndef NANO_SMALL
extern toggle *toggles;
#endif
#ifndef NANO_SMALL
extern historyheadtype search_history;
extern historyheadtype replace_history;
#endif
extern int curses_ended;
/* Functions we want available */
/* Public functions in color.c */
#ifdef ENABLE_COLOR
void set_colorpairs(void);
void do_colorinit(void);
void update_color(void);
#endif /* ENABLE_COLOR */
/* Public functions in cut.c */
filestruct *get_cutbottom(void);
void add_to_cutbuffer(filestruct *inptr);
void cut_marked_segment(filestruct *top, size_t top_x, filestruct *bot,
size_t bot_x, int destructive);
int do_cut_text(void);
int do_uncut_text(void);
/* Public functions in files.c */
void load_file(int update);
void new_file(void);
filestruct *read_line(char *buf, filestruct *prev, int *line1ins, int len);
int read_file(FILE *f, const char *filename, int quiet);
int open_file(const char *filename, int insert, int quiet);
char *get_next_filename(const char *name);
int do_insertfile(int loading_file);
int do_insertfile_void(void);
#ifdef ENABLE_MULTIBUFFER
openfilestruct *make_new_opennode(openfilestruct *prevnode);
void splice_opennode(openfilestruct *begin, openfilestruct *newnode, openfilestruct *end);
void unlink_opennode(const openfilestruct *fileptr);
void delete_opennode(openfilestruct *fileptr);
void free_openfilestruct(openfilestruct *src);
int add_open_file(int update);
int load_open_file(void);
int open_prevfile(int closing_file);
int open_prevfile_void(void);
int open_nextfile(int closing_file);
int open_nextfile_void(void);
int close_open_file(void);
#endif
#if !defined(DISABLE_SPELLER) || !defined(DISABLE_OPERATINGDIR)
char *get_full_path(const char *origpath);
#endif
#ifndef DISABLE_SPELLER
char *check_writable_directory(const char *path);
char *safe_tempnam(const char *dirname, const char *filename_prefix);
#endif
#ifndef DISABLE_OPERATINGDIR
void init_operating_dir(void);
int check_operating_dir(const char *currpath, int allow_tabcomp);
#endif
int write_file(const char *name, int tmp, int append, int nonamechange);
int do_writeout(const char *path, int exiting, int append);
int do_writeout_void(void);
char *real_dir_from_tilde(const char *buf);
#ifndef DISABLE_TABCOMP
int append_slash_if_dir(char *buf, int *lastwastab, int *place);
char **username_tab_completion(char *buf, int *num_matches);
char **cwd_tab_completion(char *buf, int *num_matches);
char *input_tab(char *buf, int place, int *lastwastab, int *newplace, int *list);
#endif
#ifndef DISABLE_BROWSER
struct stat filestat(const char *path);
int diralphasort(const void *va, const void *vb);
void free_charptrarray(char **array, int len);
const char *tail(const char *foo);
void striponedir(char *foo);
int readable_dir(const char *path);
char **browser_init(const char *path, int *longest, int *numents);
char *do_browser(const char *inpath);
char *do_browse_from(const char *inpath);
#endif
/* Public functions in global.c */
int length_of_list(const shortcut *s);
void sc_init_one(shortcut **shortcutage, int key, const char *desc,
#ifndef DISABLE_HELP
const char *help,
#endif
int alt, int misc1, int misc2, int view, int (*func) (void));
#ifndef NANO_SMALL
void toggle_init_one(int val, const char *desc, int flag);
void toggle_init(void);
#ifdef DEBUG
void free_toggles(void);
#endif
#endif
void free_shortcutage(shortcut **shortcutage);
void shortcut_init(int unjustify);
#ifdef DEBUG
void thanks_for_all_the_fish(void);
#endif
/* Public functions in move.c */
int do_home(void);
int do_end(void);
void page_up(void);
int do_page_up(void);
int do_page_down(void);
int do_up(void);
int do_down(void);
int do_left(void);
int do_right(void);
/* Public functions in nano.c */
RETSIGTYPE finish(int sigage);
void die(const char *msg, ...);
void die_save_file(const char *die_filename);
void die_too_small(void);
void print_view_warning(void);
void global_init(int save_cutbuffer);
void window_init(void);
#if !defined(DISABLE_MOUSE) && defined(NCURSES_MOUSE_VERSION)
void mouse_init(void);
#endif
#ifndef DISABLE_HELP
void help_init(void);
#endif
filestruct *make_new_node(filestruct *prevnode);
filestruct *copy_node(const filestruct *src);
void splice_node(filestruct *begin, filestruct *newnode, filestruct *end);
void unlink_node(const filestruct *fileptr);
void delete_node(filestruct *fileptr);
filestruct *copy_filestruct(const filestruct *src);
void free_filestruct(filestruct *src);
void renumber_all(void);
void renumber(filestruct *fileptr);
void print1opt(const char *shortflag, const char *longflag,
const char *desc);
void usage(void);
void version(void);
void do_early_abort(void);
int no_help(void);
#if defined(DISABLE_JUSTIFY) || defined(DISABLE_SPELLER) || defined(DISABLE_HELP) || defined(NANO_SMALL)
void nano_disabled_msg(void);
#endif
#ifndef NANO_SMALL
RETSIGTYPE cancel_fork(int signal);
int open_pipe(const char *command);
#endif
#ifndef DISABLE_MOUSE
#ifdef NCURSES_MOUSE_VERSION
void do_mouse(void);
#endif
#endif
void do_char(char ch);
int do_backspace(void);
int do_delete(void);
int do_tab(void);
int do_enter(void);
int do_next_word(void);
int do_prev_word(void);
int do_mark(void);
void wrap_reset(void);
#ifndef DISABLE_WRAPPING
int do_wrap(filestruct *inptr);
#endif
#ifndef DISABLE_SPELLER
int do_int_spell_fix(const char *word);
char *do_int_speller(char *tempfile_name);
char *do_alt_speller(char *tempfile_name);
#endif
int do_spell(void);
#if !defined(DISABLE_WRAPPING) && !defined(NANO_SMALL) || !defined(DISABLE_JUSTIFY)
size_t indent_length(const char *line);
#endif
#ifndef DISABLE_JUSTIFY
int justify_format(int changes_allowed, filestruct *line, size_t skip);
#ifdef HAVE_REGEX_H
size_t quote_length(const char *line, const regex_t *qreg);
#else
size_t quote_length(const char *line);
#endif
#ifdef HAVE_REGEX_H
# define IFREG(a, b) a, b
#else
# define IFREG(a, b) a
#endif
int quotes_match(const char *a_line, size_t a_quote,
IFREG(const char *b_line, const regex_t *qreg));
size_t indents_match(const char *a_line, size_t a_indent,
const char *b_line, size_t b_indent);
filestruct *backup_lines(filestruct *first_line, size_t par_len,
size_t quote_len);
int breakable(const char *line, int goal);
int break_line(const char *line, int goal, int force);
#endif /* !DISABLE_JUSTIFY */
int do_justify(void);
int do_exit(void);
void signal_init(void);
RETSIGTYPE handle_hupterm(int signal);
RETSIGTYPE do_suspend(int signal);
RETSIGTYPE do_cont(int signal);
#ifndef NANO_SMALL
void handle_sigwinch(int s);
#endif
void print_numlock_warning(void);
#ifndef NANO_SMALL
void do_toggle(const toggle *which);
#endif
int abcd(int input);
/* Public functions in rcfile.c */
#ifdef ENABLE_NANORC
void rcfile_error(const char *msg, ...);
void rcfile_msg(const char *msg, ...);
char *parse_next_word(char *ptr);
char *parse_argument(char *ptr);
#ifdef ENABLE_COLOR
int colortoint(const char *colorname, int *bright);
char *parse_next_regex(char *ptr);
int nregcomp(regex_t *preg, const char *regex, int flags);
void parse_syntax(char *ptr);
void parse_colors(char *ptr);
#endif /* ENABLE_COLOR */
void parse_rcfile(FILE *rcstream);
void do_rcfile(void);
#endif /* ENABLE_NANORC */
/* Public functions in search.c */
#ifdef HAVE_REGEX_H
int regexp_init(const char *regexp);
void regexp_cleanup(void);
#endif
void not_found_msg(const char *str);
void search_abort(void);
void search_init_globals(void);
int search_init(int replacing);
int is_whole_word(int curr_pos, const char *datastr, const char *searchword);
filestruct *findnextstr(int quiet, int bracket_mode,
const filestruct *begin, int beginx,
const char *needle);
int do_search(void);
void replace_abort(void);
#ifdef HAVE_REGEX_H
int replace_regexp(char *string, int create_flag);
#endif
char *replace_line(void);
int do_replace_loop(const char *prevanswer, const filestruct *begin,
int *beginx, int wholewords, int *i);
int do_replace(void);
int do_gotoline(int line, int save_pos);
int do_gotoline_void(void);
#if defined (ENABLE_MULTIBUFFER) || !defined (DISABLE_SPELLER)
void do_gotopos(int line, int pos_x, int pos_y, int pos_placewewant);
#endif
int do_find_bracket(void);
#ifndef NANO_SMALL
void history_init(void);
historytype *find_node(historytype *h, char *s);
void remove_node(historytype *r);
void insert_node(historytype *h, const char *s);
void update_history(historyheadtype *h, char *s);
char *get_history_older(historyheadtype *h);
char *get_history_newer(historyheadtype *h);
char *get_history_completion(historyheadtype *h, char *s);
void free_history(historyheadtype *h);
#ifdef ENABLE_NANORC
void load_history(void);
void save_history(void);
#endif
#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);
void null_at(char **data, size_t index);
void unsunder(char *str, size_t true_len);
void sunder(char *str);
#ifndef NANO_SMALL
const char *revstrstr(const char *haystack, const char *needle,
const char *rev_start);
const char *revstristr(const char *haystack, const char *needle,
const char *rev_start);
#endif
const char *stristr(const char *haystack, const char *needle);
const char *strstrwrapper(const char *haystack, const char *needle,
const char *rev_start, int line_pos);
void nperror(const char *s);
void *nmalloc(size_t howmuch);
void *nrealloc(void *ptr, size_t howmuch);
char *mallocstrcpy(char *dest, const char *src);
void new_magicline(void);
#ifndef DISABLE_TABCOMP
int check_wildcard_match(const char *text, const char *pattern);
#endif
/* Public functions in winio.c */
int do_first_line(void);
int do_last_line(void);
int xpt(const filestruct *fileptr, int index);
size_t xplustabs(void);
size_t actual_x(const filestruct *fileptr, size_t xplus);
size_t strnlenpt(const char *buf, size_t size);
size_t strlenpt(const char *buf);
void blank_bottombars(void);
void blank_bottomwin(void);
void blank_edit(void);
void blank_statusbar(void);
void blank_statusbar_refresh(void);
void check_statblank(void);
void nanoget_repaint(const char *buf, const char *inputbuf, int x);
int nanogetstr(int allowtabs, const char *buf, const char *def,
#ifndef NANO_SMALL
historyheadtype *history_list,
#endif
const shortcut *s
#ifndef DISABLE_TABCOMP
, int *list
#endif
);
void set_modified(void);
void titlebar(const char *path);
void bottombars(const shortcut *s);
void onekey(const char *keystroke, const char *desc, int len);
#ifndef NDEBUG
int check_linenumbers(const filestruct *fileptr);
#endif
int get_page_start(int column);
void reset_cursor(void);
void add_marked_sameline(int begin, int end, filestruct *fileptr, int y,
int virt_cur_x, int this_page);
void edit_add(const filestruct *fileptr, int yval, int start
#ifndef NANO_SMALL
, int virt_mark_beginx, int virt_cur_x
#endif
);
void update_line(filestruct *fileptr, int index);
void update_cursor(void);
void center_cursor(void);
void edit_refresh(void);
void edit_refresh_clearok(void);
void edit_update(filestruct *fileptr, topmidbotnone location);
int statusq(int tabs, const shortcut *s, const char *def,
#ifndef NANO_SMALL
historyheadtype *history_list,
#endif
const char *msg, ...);
int do_yesno(int all, int leavecursor, const char *msg, ...);
int total_refresh(void);
void display_main_list(void);
void statusbar(const char *msg, ...);
int do_cursorpos(int constant);
int do_cursorpos_void(void);
int line_len(const char *ptr);
int do_help(void);
int keypad_on(WINDOW *win, int newval);
void do_replace_highlight(int highlight_flag, const char *word);
void fix_editbot(void);
#ifdef DEBUG
void dump_buffer(const filestruct *inptr);
void dump_buffer_reverse(void);
#endif
#ifdef NANO_EXTRA
void do_credits(void);
#endif

687
rcfile.c
View File

@@ -1,687 +0,0 @@
/* $Id$ */
/**************************************************************************
* rcfile.c *
* *
* Copyright (C) 1999-2003 Chris Allegretta *
* 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) *
* any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
* *
**************************************************************************/
#include "config.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <pwd.h>
#include <assert.h>
#include "proto.h"
#include "nano.h"
#ifdef ENABLE_NANORC
const static rcoption rcopts[] = {
#ifndef NANO_SMALL
{"autoindent", AUTOINDENT},
{"backup", BACKUP_FILE},
#endif
{"const", CONSTUPDATE},
#ifndef NANO_SMALL
{"cut", CUT_TO_END},
#endif
#ifndef DISABLE_WRAPJUSTIFY
{"fill", 0},
#endif
{"keypad", ALT_KEYPAD},
#if !defined(DISABLE_MOUSE) && defined(NCURSES_MOUSE_VERSION)
{"mouse", USE_MOUSE},
#endif
#ifdef ENABLE_MULTIBUFFER
{"multibuffer", MULTIBUFFER},
#endif
#ifndef NANO_SMALL
{"noconvert", NO_CONVERT},
#endif
{"nofollow", NOFOLLOW_SYMLINKS},
{"nohelp", NO_HELP},
#ifndef DISABLE_WRAPPING
{"nowrap", NO_WRAP},
#endif
#ifndef DISABLE_OPERATINGDIR
{"operatingdir", 0},
#endif
{"preserve", PRESERVE},
#ifndef DISABLE_JUSTIFY
{"quotestr", 0},
#endif
#ifdef HAVE_REGEX_H
{"regexp", USE_REGEXP},
#endif
#ifndef NANO_SMALL
{"smooth", SMOOTHSCROLL},
#endif
#ifndef DISABLE_SPELLER
{"speller", 0},
#endif
{"suspend", SUSPEND},
{"tabsize", 0},
{"tempfile", TEMP_OPT},
{"view", VIEW_MODE},
{"historylog", HISTORYLOG},
{NULL, 0}
};
static int errors = 0;
static int lineno = 0;
static char *nanorc;
/* We have an error in some part of the rcfile; put it on stderr and
make the user hit return to continue starting up nano. */
void rcfile_error(const char *msg, ...)
{
va_list ap;
fprintf(stderr, "\n");
if (lineno > 0)
fprintf(stderr, _("Error in %s on line %d: "), nanorc, lineno);
va_start(ap, msg);
vfprintf(stderr, msg, ap);
va_end(ap);
fprintf(stderr, _("\nPress return to continue starting nano\n"));
while (getchar() != '\n');
}
/* Just print the error (one of many, perhaps) but don't abort, yet. */
void rcfile_msg(const char *msg, ...)
{
va_list ap;
if (!errors) {
errors = 1;
fprintf(stderr, "\n");
}
va_start(ap, msg);
vfprintf(stderr, msg, ap);
va_end(ap);
fprintf(stderr, "\n");
}
/* Parse the next word from the string. Returns NULL if we hit EOL. */
char *parse_next_word(char *ptr)
{
while (*ptr != ' ' && *ptr != '\t' && *ptr != '\n' && *ptr != '\0')
ptr++;
if (*ptr == '\0')
return NULL;
/* Null terminate and advance ptr */
*ptr++ = 0;
while (*ptr == ' ' || *ptr == '\t')
ptr++;
return ptr;
}
/* The keywords operatingdir, fill, tabsize, speller, and quotestr take
* an argument when set. Among these, operatingdir, speller, and
* quotestr have to allow tabs and spaces in the argument. Thus, if the
* next word starts with a ", we say it ends with the last " of the line.
* Otherwise, the word is interpreted as usual. That is so the arguments
* can contain "s too. */
char *parse_argument(char *ptr)
{
const char *ptr_bak = ptr;
char *last_quote = NULL;
assert(ptr != NULL);
if (*ptr != '"')
return parse_next_word(ptr);
do {
ptr++;
if (*ptr == '"')
last_quote = ptr;
} while (*ptr != '\n' && *ptr != '\0');
if (last_quote == NULL) {
if (*ptr == '\0')
ptr = NULL;
else
*ptr++ = '\0';
rcfile_error(_("argument %s has unterminated \""), ptr_bak);
} else {
*last_quote = '\0';
ptr = last_quote + 1;
}
if (ptr != NULL)
while (*ptr == ' ' || *ptr == '\t')
ptr++;
return ptr;
}
#ifdef ENABLE_COLOR
int colortoint(const char *colorname, int *bright)
{
int mcolor = 0;
if (colorname == NULL)
return -1;
if (!strncasecmp(colorname, "bright", 6)) {
*bright = 1;
colorname += 6;
}
if (!strcasecmp(colorname, "green"))
mcolor = COLOR_GREEN;
else if (!strcasecmp(colorname, "red"))
mcolor = COLOR_RED;
else if (!strcasecmp(colorname, "blue"))
mcolor = COLOR_BLUE;
else if (!strcasecmp(colorname, "white"))
mcolor = COLOR_WHITE;
else if (!strcasecmp(colorname, "yellow"))
mcolor = COLOR_YELLOW;
else if (!strcasecmp(colorname, "cyan"))
mcolor = COLOR_CYAN;
else if (!strcasecmp(colorname, "magenta"))
mcolor = COLOR_MAGENTA;
else if (!strcasecmp(colorname, "black"))
mcolor = COLOR_BLACK;
else {
rcfile_error(_("color %s not understood.\n"
"Valid colors are \"green\", \"red\", \"blue\", \n"
"\"white\", \"yellow\", \"cyan\", \"magenta\" and \n"
"\"black\", with the optional prefix \"bright\".\n"),
colorname);
mcolor = -1;
}
return mcolor;
}
char *parse_next_regex(char *ptr)
{
while ((*ptr != '"' || (*(ptr + 1) != ' ' && *(ptr + 1) != '\n'))
&& *ptr != '\n' && *ptr != '\0')
ptr++;
if (*ptr == '\0')
return NULL;
/* Null terminate and advance ptr */
*ptr++ = '\0';
while (*ptr == ' ' || *ptr == '\t')
ptr++;
return ptr;
}
/* Compile the regular expression regex to preg. Returns FALSE on success,
TRUE if the expression is invalid. */
int nregcomp(regex_t *preg, const char *regex, int flags)
{
int rc = regcomp(preg, regex, REG_EXTENDED | flags);
if (rc != 0) {
size_t len = regerror(rc, preg, NULL, 0);
char *str = charalloc(len);
regerror(rc, preg, str, len);
rcfile_error(_("Bad regex \"%s\": %s"), regex, str);
free(str);
}
return rc != 0;
}
void parse_syntax(char *ptr)
{
syntaxtype *tmpsyntax = NULL;
const char *fileregptr = NULL, *nameptr = NULL;
exttype *endext = NULL;
/* The end of the extensions list for this syntax. */
while (*ptr == ' ')
ptr++;
if (*ptr == '\n' || *ptr == '\0')
return;
if (*ptr != '"') {
rcfile_error(_("regex strings must begin and end with a \" character\n"));
return;
}
ptr++;
nameptr = ptr;
ptr = parse_next_regex(ptr);
if (ptr == NULL) {
rcfile_error(_("Missing syntax name"));
return;
}
if (syntaxes == NULL) {
syntaxes = (syntaxtype *)nmalloc(sizeof(syntaxtype));
tmpsyntax = syntaxes;
SET(COLOR_SYNTAX);
} else {
for (tmpsyntax = syntaxes; tmpsyntax->next != NULL;
tmpsyntax = tmpsyntax->next)
;
tmpsyntax->next = (syntaxtype *)nmalloc(sizeof(syntaxtype));
tmpsyntax = tmpsyntax->next;
#ifdef DEBUG
fprintf(stderr, _("Adding new syntax after 1st\n"));
#endif
}
tmpsyntax->desc = mallocstrcpy(NULL, nameptr);
tmpsyntax->color = NULL;
tmpsyntax->extensions = NULL;
tmpsyntax->next = NULL;
#ifdef DEBUG
fprintf(stderr, _("Starting a new syntax type\n"));
fprintf(stderr, "string val=%s\n", nameptr);
#endif
/* Now load in the extensions to their part of the struct */
while (*ptr != '\n' && *ptr != '\0') {
exttype *newext;
/* The new extension structure. */
while (*ptr != '"' && *ptr != '\n' && *ptr != '\0')
ptr++;
if (*ptr == '\n' || *ptr == '\0')
return;
ptr++;
fileregptr = ptr;
ptr = parse_next_regex(ptr);
newext = (exttype *)nmalloc(sizeof(exttype));
if (nregcomp(&newext->val, fileregptr, REG_NOSUB))
free(newext);
else {
if (endext == NULL)
tmpsyntax->extensions = newext;
else
endext->next = newext;
endext = newext;
endext->next = NULL;
}
}
}
/* Parse the color stuff into the colorstrings array */
void parse_colors(char *ptr)
{
int fg, bg, bright = 0;
int expectend = 0; /* Do we expect an end= line? */
char *fgstr;
colortype *tmpcolor = NULL;
syntaxtype *tmpsyntax = NULL;
fgstr = ptr;
ptr = parse_next_word(ptr);
if (ptr == NULL) {
rcfile_error(_("Missing color name"));
return;
}
if (strstr(fgstr, ",")) {
strtok(fgstr, ",");
bg = colortoint(strtok(NULL, ","), &bright);
} else
bg = -1;
fg = colortoint(fgstr, &bright);
/* Don't try and parse screwed up fg colors */
if (fg == -1)
return;
if (syntaxes == NULL) {
rcfile_error(_("Cannot add a color directive without a syntax line"));
return;
}
for (tmpsyntax = syntaxes; tmpsyntax->next != NULL;
tmpsyntax = tmpsyntax->next)
;
/* Now the fun part, start adding regexps to individual strings
in the colorstrings array, woo! */
while (*ptr != '\0') {
colortype *newcolor;
/* The new color structure. */
int cancelled = 0;
/* The start expression was bad. */
while (*ptr == ' ')
ptr++;
if (*ptr == '\n' || *ptr == '\0')
break;
if (!strncasecmp(ptr, "start=", 6)) {
ptr += 6;
expectend = 1;
}
if (*ptr != '"') {
rcfile_error(_("regex strings must begin and end with a \" character\n"));
ptr = parse_next_regex(ptr);
continue;
}
ptr++;
newcolor = (colortype *)nmalloc(sizeof(colortype));
fgstr = ptr;
ptr = parse_next_regex(ptr);
if (nregcomp(&newcolor->start, fgstr, 0)) {
free(newcolor);
cancelled = 1;
} else {
newcolor->fg = fg;
newcolor->bg = bg;
newcolor->bright = bright;
newcolor->next = NULL;
newcolor->end = NULL;
if (tmpsyntax->color == NULL) {
tmpsyntax->color = newcolor;
#ifdef DEBUG
fprintf(stderr, _("Starting a new colorstring for fg %d bg %d\n"),
fg, bg);
#endif
} else {
for (tmpcolor = tmpsyntax->color; tmpcolor->next != NULL;
tmpcolor = tmpcolor->next)
;
#ifdef DEBUG
fprintf(stderr, _("Adding new entry for fg %d bg %d\n"), fg, bg);
#endif
tmpcolor->next = newcolor;
}
}
if (expectend) {
if (ptr == NULL || strncasecmp(ptr, "end=", 4)) {
rcfile_error(_
("\"start=\" requires a corresponding \"end=\""));
return;
}
ptr += 4;
if (*ptr != '"') {
rcfile_error(_
("regex strings must begin and end with a \" character\n"));
continue;
}
ptr++;
fgstr = ptr;
ptr = parse_next_regex(ptr);
/* If the start regex was invalid, skip past the end regex to
* stay in sync. */
if (cancelled)
continue;
newcolor->end = (regex_t *)nmalloc(sizeof(regex_t));
if (nregcomp(newcolor->end, fgstr, 0)) {
free(newcolor->end);
newcolor->end = NULL;
}
}
}
}
#endif /* ENABLE_COLOR */
/* Parse the RC file, once it has been opened successfully */
void parse_rcfile(FILE *rcstream)
{
char *buf, *ptr, *keyword, *option;
int set = 0, i, j;
buf = charalloc(1024);
while (fgets(buf, 1023, rcstream) != 0) {
lineno++;
ptr = buf;
while (*ptr == ' ' || *ptr == '\t')
ptr++;
if (*ptr == '\n' || *ptr == '\0')
continue;
if (*ptr == '#') {
#ifdef DEBUG
fprintf(stderr, _("%s: Read a comment\n"), "parse_rcfile()");
#endif
continue; /* Skip past commented lines */
}
/* Else skip to the next space */
keyword = ptr;
ptr = parse_next_word(ptr);
if (ptr == NULL)
continue;
/* Else try to parse the keyword */
if (!strcasecmp(keyword, "set"))
set = 1;
else if (!strcasecmp(keyword, "unset"))
set = -1;
#ifdef ENABLE_COLOR
else if (!strcasecmp(keyword, "syntax"))
parse_syntax(ptr);
else if (!strcasecmp(keyword, "color"))
parse_colors(ptr);
#endif /* ENABLE_COLOR */
else {
rcfile_msg(_("command %s not understood"), keyword);
continue;
}
option = ptr;
ptr = parse_next_word(ptr);
/* We don't care if ptr == NULL, as it should if using proper syntax */
if (set != 0) {
for (i = 0; rcopts[i].name != NULL; i++) {
if (!strcasecmp(option, rcopts[i].name)) {
#ifdef DEBUG
fprintf(stderr, _("%s: Parsing option %s\n"),
"parse_rcfile()", rcopts[i].name);
#endif
if (set == 1) {
if (!strcasecmp(rcopts[i].name, "tabsize")
#ifndef DISABLE_OPERATINGDIR
|| !strcasecmp(rcopts[i].name, "operatingdir")
#endif
#ifndef DISABLE_WRAPJUSTIFY
|| !strcasecmp(rcopts[i].name, "fill")
#endif
#ifndef DISABLE_JUSTIFY
|| !strcasecmp(rcopts[i].name, "quotestr")
#endif
#ifndef DISABLE_SPELLER
|| !strcasecmp(rcopts[i].name, "speller")
#endif
) {
if (*ptr == '\n' || *ptr == '\0') {
rcfile_error(_
("option %s requires an argument"),
rcopts[i].name);
continue;
}
option = ptr;
if (*option == '"')
option++;
ptr = parse_argument(ptr);
#ifdef DEBUG
fprintf(stderr, "option = %s\n", option);
#endif
#ifndef DISABLE_OPERATINGDIR
if (!strcasecmp(rcopts[i].name, "operatingdir"))
operating_dir = mallocstrcpy(NULL, option);
else
#endif
#ifndef DISABLE_WRAPJUSTIFY
if (!strcasecmp(rcopts[i].name, "fill")) {
char *first_error;
/* Using strtol() instead of atoi() lets
* us accept 0 while checking other
* errors. */
j = (int)strtol(option, &first_error, 10);
if (errno == ERANGE || *option == '\0' || *first_error != '\0')
rcfile_error(_("requested fill size %d invalid"),
j);
else
wrap_at = j;
} else
#endif
#ifndef DISABLE_JUSTIFY
if (!strcasecmp(rcopts[i].name, "quotestr"))
quotestr = mallocstrcpy(NULL, option);
else
#endif
#ifndef DISABLE_SPELLER
if (!strcasecmp(rcopts[i].name, "speller"))
alt_speller = mallocstrcpy(NULL, option);
else
#endif
{
char *first_error;
/* Using strtol instead of atoi lets us
* accept 0 while checking other
* errors. */
j = (int)strtol(option, &first_error, 10);
if (errno == ERANGE || *option == '\0' || *first_error != '\0')
rcfile_error(_("requested tab size %d invalid"),
j);
else
tabsize = j;
}
} else
SET(rcopts[i].flag);
#ifdef DEBUG
fprintf(stderr, _("set flag %d!\n"),
rcopts[i].flag);
#endif
} else {
UNSET(rcopts[i].flag);
#ifdef DEBUG
fprintf(stderr, _("unset flag %d!\n"),
rcopts[i].flag);
#endif
}
}
}
}
}
free(buf);
if (errors)
rcfile_error(_("Errors found in .nanorc file"));
return;
}
/* The main rc file function, tries to open the rc file */
void do_rcfile(void)
{
FILE *rcstream;
const struct passwd *userage;
uid_t euid = geteuid();
char *homenv = getenv("HOME");
#ifdef SYSCONFDIR
assert(sizeof(SYSCONFDIR) == strlen(SYSCONFDIR) + 1);
nanorc = charalloc(sizeof(SYSCONFDIR) + 7);
sprintf(nanorc, "%s/nanorc", SYSCONFDIR);
/* Try to open system nanorc */
if ((rcstream = fopen(nanorc, "r")) != NULL) {
/* Parse it! */
parse_rcfile(rcstream);
fclose(rcstream);
}
#endif
lineno = 0;
/* Rely on $HOME, fall back on getpwuid() */
if (homenv != NULL) {
nanorc = nrealloc(nanorc, strlen(homenv) + 10);
sprintf(nanorc, "%s/.nanorc", homenv);
} else {
userage = getpwuid(euid);
endpwent();
if (userage == NULL) {
rcfile_error(_("I can't find my home directory! Wah!"));
SET(NO_RCFILE);
} else {
nanorc = nrealloc(nanorc, strlen(userage->pw_dir) + 9);
sprintf(nanorc, "%s/.nanorc", userage->pw_dir);
}
}
if (!ISSET(NO_RCFILE)) {
#if defined(DISABLE_ROOTWRAP) && !defined(DISABLE_WRAPPING)
/* If we've already read $SYSCONFDIR/nanorc (if it's there), we're
root, and --disable-wrapping-as-root is used, turn wrapping off */
if (euid == 0)
SET(NO_WRAP);
#endif
if ((rcstream = fopen(nanorc, "r")) == NULL) {
/* Don't complain about the file not existing */
if (errno != ENOENT) {
rcfile_error(_("Unable to open ~/.nanorc file, %s"),
strerror(errno));
SET(NO_RCFILE);
}
} else {
parse_rcfile(rcstream);
fclose(rcstream);
}
}
lineno = 0;
free(nanorc);
#ifdef ENABLE_COLOR
set_colorpairs();
#endif
}
#endif /* ENABLE_NANORC */

1040
search.c

File diff suppressed because it is too large Load Diff

4
src/.cvsignore Normal file
View File

@@ -0,0 +1,4 @@
Makefile
Makefile.in
nano
.deps

24
src/Makefile.am Normal file
View File

@@ -0,0 +1,24 @@
localedir = $(datadir)/locale
INCLUDES = -Iintl -DLOCALEDIR=\"$(localedir)\" -DSYSCONFDIR=\"$(sysconfdir)\"
ACLOCAL_AMFLAGS = -I m4
bin_PROGRAMS = nano
nano_SOURCES = chars.c \
color.c \
cut.c \
files.c \
global.c \
move.c \
nano.c \
nano.h \
proto.h \
rcfile.c \
search.c \
utils.c \
winio.c
nano_LDADD = @GLIB_LIBS@ @LIBINTL@
install-exec-hook:
cd $(DESTDIR)$(bindir) && rm -f rnano && $(LN_S) nano rnano

863
src/chars.c Normal file
View File

@@ -0,0 +1,863 @@
/* $Id$ */
/**************************************************************************
* chars.c *
* *
* Copyright (C) 2005 Chris Allegretta *
* 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) *
* any later version. *
* *
* This program is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301, USA. *
* *
**************************************************************************/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
#include "proto.h"
#ifdef NANO_WIDE
#ifdef HAVE_WCHAR_H
#include <wchar.h>
#endif
#ifdef HAVE_WCTYPE_H
#include <wctype.h>
#endif
#endif
#ifndef HAVE_ISBLANK
/* This function is equivalent to isblank(). */
bool nisblank(int c)
{
return isspace(c) && (c == '\t' || !is_cntrl_char(c));
}
#endif
#if !defined(HAVE_ISWBLANK) && defined(NANO_WIDE)
/* This function is equivalent to iswblank(). */
bool niswblank(wchar_t wc)
{
return iswspace(wc) && (wc == '\t' || !is_cntrl_wchar(wc));
}
#endif
/* Return TRUE if the value of c is in byte range, and FALSE
* otherwise. */
bool is_byte(int c)
{
return ((unsigned int)c == (unsigned char)c);
}
/* This function is equivalent to isalnum() for multibyte characters. */
bool is_alnum_mbchar(const char *c)
{
assert(c != NULL);
#ifdef NANO_WIDE
if (ISSET(USE_UTF8)) {
wchar_t wc;
int c_mb_len = mbtowc(&wc, c, MB_CUR_MAX);
if (c_mb_len <= 0) {
mbtowc(NULL, NULL, 0);
wc = (unsigned char)*c;
}
return iswalnum(wc);
} else
#endif
return isalnum((unsigned char)*c);
}
/* This function is equivalent to isblank() for multibyte characters. */
bool is_blank_mbchar(const char *c)
{
assert(c != NULL);
#ifdef NANO_WIDE
if (ISSET(USE_UTF8)) {
wchar_t wc;
int c_mb_len = mbtowc(&wc, c, MB_CUR_MAX);
if (c_mb_len <= 0) {
mbtowc(NULL, NULL, 0);
wc = (unsigned char)*c;
}
return iswblank(wc);
} else
#endif
return isblank((unsigned char)*c);
}
/* This function is equivalent to iscntrl(), except in that it also
* handles control characters with their high bits set. */
bool is_cntrl_char(int c)
{
return (-128 <= c && c < -96) || (0 <= c && c < 32) ||
(127 <= c && c < 160);
}
#ifdef NANO_WIDE
/* This function is equivalent to iscntrl() for wide characters, except
* in that it also handles wide control characters with their high bits
* set. */
bool is_cntrl_wchar(wchar_t wc)
{
return (0 <= wc && wc < 32) || (127 <= wc && wc < 160);
}
#endif
/* This function is equivalent to iscntrl() for multibyte characters,
* except in that it also handles multibyte control characters with
* their high bits set. */
bool is_cntrl_mbchar(const char *c)
{
assert(c != NULL);
#ifdef NANO_WIDE
if (ISSET(USE_UTF8)) {
wchar_t wc;
int c_mb_len = mbtowc(&wc, c, MB_CUR_MAX);
if (c_mb_len <= 0) {
mbtowc(NULL, NULL, 0);
wc = (unsigned char)*c;
}
return is_cntrl_wchar(wc);
} else
#endif
return is_cntrl_char((unsigned char)*c);
}
/* This function is equivalent to ispunct() for multibyte characters. */
bool is_punct_mbchar(const char *c)
{
assert(c != NULL);
#ifdef NANO_WIDE
if (ISSET(USE_UTF8)) {
wchar_t wc;
int c_mb_len = mbtowc(&wc, c, MB_CUR_MAX);
if (c_mb_len <= 0) {
mbtowc(NULL, NULL, 0);
wc = (unsigned char)*c;
}
return iswpunct(wc);
} else
#endif
return ispunct((unsigned char)*c);
}
/* Return TRUE for a multibyte character found in a word (currently only
* an alphanumeric or punctuation character, and only the latter if
* allow_punct is TRUE) and FALSE otherwise. */
bool is_word_mbchar(const char *c, bool allow_punct)
{
assert(c != NULL);
return is_alnum_mbchar(c) || (allow_punct ? is_punct_mbchar(c) :
FALSE);
}
/* c is a control character. It displays as ^@, ^?, or ^[ch], where ch
* is c + 64. We return that character. */
char control_rep(char c)
{
/* Treat newlines embedded in a line as encoded nulls. */
if (c == '\n')
return '@';
else if (c == NANO_CONTROL_8)
return '?';
else
return c + 64;
}
#ifdef NANO_WIDE
/* c is a wide control character. It displays as ^@, ^?, or ^[ch],
* where ch is c + 64. We return that wide character. */
wchar_t control_wrep(wchar_t wc)
{
/* Treat newlines embedded in a line as encoded nulls. */
if (wc == '\n')
return '@';
else if (wc == NANO_CONTROL_8)
return '?';
else
return wc + 64;
}
#endif
/* c is a multibyte control character. It displays as ^@, ^?, or ^[ch],
* where ch is c + 64. We return that multibyte character. */
char *control_mbrep(const char *c, char *crep, int *crep_len)
{
assert(c != NULL && crep != NULL && crep_len != NULL);
#ifdef NANO_WIDE
if (ISSET(USE_UTF8)) {
wchar_t wc;
if (mbtowc(&wc, c, MB_CUR_MAX) <= 0) {
mbtowc(NULL, NULL, 0);
wc = (unsigned char)*c;
}
*crep_len = wctomb(crep, control_wrep(wc));
if (*crep_len <= 0) {
wctomb(NULL, 0);
*crep_len = 0;
}
} else {
#endif
*crep_len = 1;
*crep = control_rep(*c);
#ifdef NANO_WIDE
}
#endif
return crep;
}
/* This function is equivalent to wcwidth() for multibyte characters. */
int mbwidth(const char *c)
{
assert(c != NULL);
#ifdef NANO_WIDE
if (ISSET(USE_UTF8)) {
wchar_t wc;
int c_mb_len = mbtowc(&wc, c, MB_CUR_MAX), width;
if (c_mb_len <= 0) {
mbtowc(NULL, NULL, 0);
wc = (unsigned char)*c;
}
width = wcwidth(wc);
if (width == -1)
width++;
return width;
} else
#endif
return 1;
}
/* Return the maximum width in bytes of a multibyte character. */
int mb_cur_max(void)
{
return
#ifdef NANO_WIDE
ISSET(USE_UTF8) ? MB_CUR_MAX :
#endif
1;
}
/* Convert the value in chr to a multibyte character with the same
* wide character value as chr, if possible. If the conversion
* succeeds, return the (dynamically allocated) multibyte character and
* its length. Otherwise, return an undefined (dynamically allocated)
* multibyte character and a length of zero. */
char *make_mbchar(int chr, int *chr_mb_len)
{
char *chr_mb;
assert(chr_mb_len != NULL);
#ifdef NANO_WIDE
if (ISSET(USE_UTF8)) {
chr_mb = charalloc(MB_CUR_MAX);
*chr_mb_len = wctomb(chr_mb, chr);
if (*chr_mb_len <= 0) {
wctomb(NULL, 0);
*chr_mb_len = 0;
}
} else {
#endif
*chr_mb_len = 1;
chr_mb = mallocstrncpy(NULL, (char *)&chr, 1);
#ifdef NANO_WIDE
}
#endif
return chr_mb;
}
/* Parse a multibyte character from buf. Return the number of bytes
* used. If chr isn't NULL, store the multibyte character in it. If
* bad_chr isn't NULL, set it to TRUE if we have a bad multibyte
* character. If col isn't NULL, store the new display width in it. If
* *str is '\t', we expect col to have the current display width. */
int parse_mbchar(const char *buf, char *chr, bool *bad_chr, size_t
*col)
{
int buf_mb_len;
assert(buf != NULL);
if (bad_chr != NULL)
*bad_chr = FALSE;
#ifdef NANO_WIDE
if (ISSET(USE_UTF8)) {
/* Get the number of bytes in the multibyte character. */
buf_mb_len = mblen(buf, MB_CUR_MAX);
/* If buf contains a null byte or an invalid multibyte
* character, set bad_chr to TRUE (if it contains the latter)
* and interpret buf's first byte. */
if (buf_mb_len <= 0) {
mblen(NULL, 0);
if (buf_mb_len < 0 && bad_chr != NULL)
*bad_chr = TRUE;
buf_mb_len = 1;
}
/* Save the multibyte character in chr. */
if (chr != NULL) {
int i;
for (i = 0; i < buf_mb_len; i++)
chr[i] = buf[i];
}
/* Save the column width of the wide character in col. */
if (col != NULL) {
/* If we have a tab, get its width in columns using the
* current value of col. */
if (*buf == '\t')
*col += tabsize - *col % tabsize;
/* If we have a control character, get its width using one
* column for the "^" that will be displayed in front of it,
* and the width in columns of its visible equivalent as
* returned by control_mbrep(). */
else if (is_cntrl_mbchar(buf)) {
char *ctrl_buf_mb = charalloc(MB_CUR_MAX);
int ctrl_buf_mb_len;
(*col)++;
ctrl_buf_mb = control_mbrep(buf, ctrl_buf_mb,
&ctrl_buf_mb_len);
*col += mbwidth(ctrl_buf_mb);
free(ctrl_buf_mb);
/* If we have a normal character, get its width in columns
* normally. */
} else
*col += mbwidth(buf);
}
} else {
#endif
/* Get the number of bytes in the byte character. */
buf_mb_len = 1;
/* Save the byte character in chr. */
if (chr != NULL)
*chr = *buf;
if (col != NULL) {
/* If we have a tab, get its width in columns using the
* current value of col. */
if (*buf == '\t')
*col += tabsize - *col % tabsize;
/* If we have a control character, it's two columns wide:
* one column for the "^" that will be displayed in front of
* it, and one column for its visible equivalent as returned
* by control_mbrep(). */
else if (is_cntrl_char((unsigned char)*buf))
*col += 2;
/* If we have a normal character, it's one column wide. */
else
(*col)++;
}
#ifdef NANO_WIDE
}
#endif
return buf_mb_len;
}
/* Return the index in buf of the beginning of the multibyte character
* before the one at pos. */
size_t move_mbleft(const char *buf, size_t pos)
{
size_t pos_prev = pos;
assert(buf != NULL && pos <= strlen(buf));
/* There is no library function to move backward one multibyte
* character. Here is the naive, O(pos) way to do it. */
while (TRUE) {
int buf_mb_len = parse_mbchar(buf + pos - pos_prev, NULL, NULL,
NULL);
if (pos_prev <= (size_t)buf_mb_len)
break;
pos_prev -= buf_mb_len;
}
return pos - pos_prev;
}
/* Return the index in buf of the beginning of the multibyte character
* after the one at pos. */
size_t move_mbright(const char *buf, size_t pos)
{
return pos + parse_mbchar(buf + pos, NULL, NULL, NULL);
}
#ifndef HAVE_STRCASECMP
/* This function is equivalent to strcasecmp(). */
int nstrcasecmp(const char *s1, const char *s2)
{
return strncasecmp(s1, s2, (size_t)-1);
}
#endif
/* This function is equivalent to strcasecmp() for multibyte strings. */
int mbstrcasecmp(const char *s1, const char *s2)
{
return mbstrncasecmp(s1, s2, (size_t)-1);
}
#ifndef HAVE_STRNCASECMP
/* This function is equivalent to strncasecmp(). */
int nstrncasecmp(const char *s1, const char *s2, size_t n)
{
assert(s1 != NULL && s2 != NULL);
for (; n > 0 && *s1 != '\0' && *s2 != '\0'; n--, s1++, s2++) {
if (tolower(*s1) != tolower(*s2))
break;
}
if (n > 0)
return tolower(*s1) - tolower(*s2);
else
return 0;
}
#endif
/* This function is equivalent to strncasecmp() for multibyte
* strings. */
int mbstrncasecmp(const char *s1, const char *s2, size_t n)
{
#ifdef NANO_WIDE
if (ISSET(USE_UTF8)) {
char *s1_mb = charalloc(MB_CUR_MAX);
char *s2_mb = charalloc(MB_CUR_MAX);
wchar_t ws1, ws2;
assert(s1 != NULL && s2 != NULL);
while (n > 0 && *s1 != '\0' && *s2 != '\0') {
bool bad_s1_mb = FALSE, bad_s2_mb = FALSE;
int s1_mb_len, s2_mb_len;
s1_mb_len = parse_mbchar(s1, s1_mb, NULL, NULL);
if (mbtowc(&ws1, s1_mb, s1_mb_len) <= 0) {
mbtowc(NULL, NULL, 0);
ws1 = (unsigned char)*s1_mb;
bad_s1_mb = TRUE;
}
s2_mb_len = parse_mbchar(s2, s2_mb, NULL, NULL);
if (mbtowc(&ws2, s2_mb, s2_mb_len) <= 0) {
mbtowc(NULL, NULL, 0);
ws2 = (unsigned char)*s2_mb;
bad_s2_mb = TRUE;
}
if (n == 0 || bad_s1_mb != bad_s2_mb ||
towlower(ws1) != towlower(ws2))
break;
s1 += s1_mb_len;
s2 += s2_mb_len;
n--;
}
free(s1_mb);
free(s2_mb);
return towlower(ws1) - towlower(ws2);
} else
#endif
return strncasecmp(s1, s2, n);
}
#ifndef HAVE_STRCASESTR
/* This function is equivalent to strcasestr(). It was adapted from
* mutt's mutt_stristr() function. */
const char *nstrcasestr(const char *haystack, const char *needle)
{
assert(haystack != NULL && needle != NULL);
for (; *haystack != '\0'; haystack++) {
const char *r = haystack, *q = needle;
for (; tolower(*r) == tolower(*q) && *q != '\0'; r++, q++)
;
if (*q == '\0')
return haystack;
}
return NULL;
}
#endif
/* This function is equivalent to strcasestr() for multibyte strings. */
const char *mbstrcasestr(const char *haystack, const char *needle)
{
#ifdef NANO_WIDE
if (ISSET(USE_UTF8)) {
char *r_mb = charalloc(MB_CUR_MAX);
char *q_mb = charalloc(MB_CUR_MAX);
wchar_t wr, wq;
bool found_needle = FALSE;
assert(haystack != NULL && needle != NULL);
while (*haystack != '\0') {
const char *r = haystack, *q = needle;
int r_mb_len, q_mb_len;
while (*q != '\0') {
bool bad_r_mb = FALSE, bad_q_mb = FALSE;
r_mb_len = parse_mbchar(r, r_mb, NULL, NULL);
if (mbtowc(&wr, r_mb, r_mb_len) <= 0) {
mbtowc(NULL, NULL, 0);
wr = (unsigned char)*r;
bad_r_mb = TRUE;
}
q_mb_len = parse_mbchar(q, q_mb, NULL, NULL);
if (mbtowc(&wq, q_mb, q_mb_len) <= 0) {
mbtowc(NULL, NULL, 0);
wq = (unsigned char)*q;
bad_q_mb = TRUE;
}
if (bad_r_mb != bad_q_mb ||
towlower(wr) != towlower(wq))
break;
r += r_mb_len;
q += q_mb_len;
}
if (*q == '\0') {
found_needle = TRUE;
break;
}
haystack += move_mbright(haystack, 0);
}
free(r_mb);
free(q_mb);
return found_needle ? haystack : NULL;
} else
#endif
return strcasestr(haystack, needle);
}
#if !defined(NANO_SMALL) || !defined(DISABLE_TABCOMP)
/* This function is equivalent to strstr(), except in that it scans the
* string in reverse, starting at rev_start. */
const char *revstrstr(const char *haystack, const char *needle, const
char *rev_start)
{
assert(haystack != NULL && needle != NULL && rev_start != NULL);
for (; rev_start >= haystack; rev_start--) {
const char *r, *q;
for (r = rev_start, q = needle; *r == *q && *q != '\0'; r++, q++)
;
if (*q == '\0')
return rev_start;
}
return NULL;
}
#endif /* !NANO_SMALL || !DISABLE_TABCOMP */
#ifndef NANO_SMALL
/* This function is equivalent to strcasestr(), except in that it scans
* the string in reverse, starting at rev_start. */
const char *revstrcasestr(const char *haystack, const char *needle,
const char *rev_start)
{
assert(haystack != NULL && needle != NULL && rev_start != NULL);
for (; rev_start >= haystack; rev_start--) {
const char *r = rev_start, *q = needle;
for (; tolower(*r) == tolower(*q) && *q != '\0'; r++, q++)
;
if (*q == '\0')
return rev_start;
}
return NULL;
}
/* This function is equivalent to strcasestr() for multibyte strings,
* except in that it scans the string in reverse, starting at
* rev_start. */
const char *mbrevstrcasestr(const char *haystack, const char *needle,
const char *rev_start)
{
#ifdef NANO_WIDE
if (ISSET(USE_UTF8)) {
char *r_mb = charalloc(MB_CUR_MAX);
char *q_mb = charalloc(MB_CUR_MAX);
wchar_t wr, wq;
bool begin_line = FALSE, found_needle = FALSE;
assert(haystack != NULL && needle != NULL && rev_start != NULL);
while (!begin_line) {
const char *r = rev_start, *q = needle;
int r_mb_len, q_mb_len;
while (*q != '\0') {
bool bad_r_mb = FALSE, bad_q_mb = FALSE;
r_mb_len = parse_mbchar(r, r_mb, NULL, NULL);
if (mbtowc(&wr, r_mb, r_mb_len) <= 0) {
mbtowc(NULL, NULL, 0);
wr = (unsigned char)*r;
bad_r_mb = TRUE;
}
q_mb_len = parse_mbchar(q, q_mb, NULL, NULL);
if (mbtowc(&wq, q_mb, q_mb_len) <= 0) {
mbtowc(NULL, NULL, 0);
wq = (unsigned char)*q;
bad_q_mb = TRUE;
}
if (bad_r_mb != bad_q_mb ||
towlower(wr) != towlower(wq))
break;
r += r_mb_len;
q += q_mb_len;
}
if (*q == '\0') {
found_needle = TRUE;
break;
}
if (rev_start == haystack)
begin_line = TRUE;
else
rev_start = haystack + move_mbleft(haystack, rev_start -
haystack);
}
free(r_mb);
free(q_mb);
return found_needle ? rev_start : NULL;
} else
#endif
return revstrcasestr(haystack, needle, rev_start);
}
#endif /* !NANO_SMALL */
/* This function is equivalent to strlen() for multibyte strings. */
size_t mbstrlen(const char *s)
{
return mbstrnlen(s, (size_t)-1);
}
#ifndef HAVE_STRNLEN
/* This function is equivalent to strnlen(). */
size_t nstrnlen(const char *s, size_t maxlen)
{
size_t n = 0;
assert(s != NULL);
for (; maxlen > 0 && *s != '\0'; maxlen--, n++, s++)
;
return n;
}
#endif
/* This function is equivalent to strnlen() for multibyte strings. */
size_t mbstrnlen(const char *s, size_t maxlen)
{
assert(s != NULL);
#ifdef NANO_WIDE
if (ISSET(USE_UTF8)) {
size_t n = 0;
int s_mb_len;
while (*s != '\0') {
s_mb_len = parse_mbchar(s, NULL, NULL, NULL);
if (maxlen == 0)
break;
maxlen--;
s += s_mb_len;
n++;
}
return n;
} else
#endif
return strnlen(s, maxlen);
}
#ifndef DISABLE_JUSTIFY
#ifdef ENABLE_NANORC
/* Return TRUE if the string s contains one or more blank characters,
* and FALSE otherwise. */
bool has_blank_chars(const char *s)
{
assert(s != NULL);
for (; *s != '\0'; s++) {
if (isblank(*s))
return TRUE;
}
return FALSE;
}
/* Return TRUE if the multibyte string s contains one or more blank
* multibyte characters, and FALSE otherwise. */
bool has_blank_mbchars(const char *s)
{
assert(s != NULL);
#ifdef NANO_WIDE
if (ISSET(USE_UTF8)) {
char *chr_mb = charalloc(MB_CUR_MAX);
bool retval = FALSE;
while (*s != '\0') {
int chr_mb_len;
chr_mb_len = parse_mbchar(s, chr_mb, NULL, NULL);
if (is_blank_mbchar(chr_mb)) {
retval = TRUE;
break;
}
s += chr_mb_len;
}
free(chr_mb);
return retval;
} else
#endif
return has_blank_chars(s);
}
#endif /* ENABLE_NANORC */
/* This function is equivalent to strchr() for multibyte strings. */
char *mbstrchr(const char *s, char *c)
{
assert(s != NULL && c != NULL);
#ifdef NANO_WIDE
if (ISSET(USE_UTF8)) {
char *s_mb = charalloc(MB_CUR_MAX);
const char *q = s;
wchar_t ws, wc;
int c_mb_len = mbtowc(&wc, c, MB_CUR_MAX);
if (c_mb_len <= 0) {
mbtowc(NULL, NULL, 0);
wc = (unsigned char)*c;
}
while (*s != '\0') {
int s_mb_len = parse_mbchar(s, s_mb, NULL, NULL);
if (mbtowc(&ws, s_mb, s_mb_len) <= 0) {
mbtowc(NULL, NULL, 0);
ws = (unsigned char)*s;
}
if (ws == wc)
break;
s += s_mb_len;
q += s_mb_len;
}
free(s_mb);
if (ws != wc)
q = NULL;
return (char *)q;
} else
#endif
return strchr(s, *c);
}
#endif /* !DISABLE_JUSTIFY */
#ifdef ENABLE_NANORC
/* Check if the string s is a valid multibyte string. Return TRUE if it
* is, and FALSE otherwise. */
bool is_valid_mbstring(const char *s)
{
assert(s != NULL);
return
#ifdef NANO_WIDE
ISSET(USE_UTF8) ?
(mbstowcs(NULL, s, 0) != (size_t)-1) :
#endif
TRUE;
}
#endif /* ENABLE_NANORC */

View File

@@ -2,34 +2,34 @@
/**************************************************************************
* color.c *
* *
* Copyright (C) 1999-2003 Chris Allegretta *
* Copyright (C) 1999-2005 Chris Allegretta *
* 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) *
* any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* This program is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301, USA. *
* *
**************************************************************************/
#include "config.h"
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "proto.h"
#include "nano.h"
#ifdef ENABLE_COLOR
@@ -39,21 +39,21 @@ void set_colorpairs(void)
{
const syntaxtype *this_syntax = syntaxes;
for(; this_syntax != NULL; this_syntax = this_syntax->next) {
for (; this_syntax != NULL; this_syntax = this_syntax->next) {
colortype *this_color = this_syntax->color;
int color_pair = 1;
for(; this_color != NULL; this_color = this_color->next) {
for (; this_color != NULL; this_color = this_color->next) {
const colortype *beforenow = this_syntax->color;
for(; beforenow != NULL && beforenow != this_color &&
(beforenow->fg != this_color->fg ||
beforenow->bg != this_color->bg ||
beforenow->bright != this_color->bright);
beforenow = beforenow->next)
for (; beforenow != this_color &&
(beforenow->fg != this_color->fg ||
beforenow->bg != this_color->bg ||
beforenow->bright != this_color->bright);
beforenow = beforenow->next)
;
if (beforenow != NULL && beforenow != this_color)
if (beforenow != this_color)
this_color->pairnum = beforenow->pairnum;
else {
this_color->pairnum = color_pair;
@@ -68,14 +68,14 @@ void do_colorinit(void)
if (has_colors()) {
const colortype *tmpcolor = NULL;
#ifdef HAVE_USE_DEFAULT_COLORS
int defok;
bool defok;
#endif
start_color();
/* Add in colors, if available */
/* Add in colors, if available. */
#ifdef HAVE_USE_DEFAULT_COLORS
defok = use_default_colors() != ERR;
defok = (use_default_colors() != ERR);
#endif
for (tmpcolor = colorstrings; tmpcolor != NULL;
@@ -91,8 +91,8 @@ void do_colorinit(void)
init_pair(tmpcolor->pairnum, tmpcolor->fg, background);
#ifdef DEBUG
fprintf(stderr, _("Running %s with fg = %d and bg = %d\n"),
"init_pair()", tmpcolor->fg, tmpcolor->bg);
fprintf(stderr, "init_pair(): fg = %d, bg = %d\n",
tmpcolor->fg, tmpcolor->bg);
#endif
}
}
@@ -104,12 +104,13 @@ void update_color(void)
const syntaxtype *tmpsyntax;
colorstrings = NULL;
for (tmpsyntax = syntaxes; tmpsyntax != NULL; tmpsyntax = tmpsyntax->next) {
for (tmpsyntax = syntaxes; tmpsyntax != NULL;
tmpsyntax = tmpsyntax->next) {
const exttype *e;
for (e = tmpsyntax->extensions; e != NULL; e = e->next) {
/* Set colorstrings if we matched the extension regex */
if (!regexec(&e->val, filename, 0, NULL, 0))
/* Set colorstrings if we matched the extension regex. */
if (regexec(&e->val, filename, 0, NULL, 0) == 0)
colorstrings = tmpsyntax->color;
if (colorstrings != NULL)
@@ -117,11 +118,11 @@ void update_color(void)
}
}
/* if we haven't found a match, use the override string */
/* If we haven't found a match, use the override string. */
if (colorstrings == NULL && syntaxstr != NULL) {
for (tmpsyntax = syntaxes; tmpsyntax != NULL;
tmpsyntax = tmpsyntax->next) {
if (!strcasecmp(tmpsyntax->desc, syntaxstr))
for (tmpsyntax = syntaxes; tmpsyntax != NULL;
tmpsyntax = tmpsyntax->next) {
if (mbstrcasecmp(tmpsyntax->desc, syntaxstr) == 0)
colorstrings = tmpsyntax->color;
}
}

194
src/cut.c Normal file
View File

@@ -0,0 +1,194 @@
/* $Id$ */
/**************************************************************************
* cut.c *
* *
* Copyright (C) 1999-2005 Chris Allegretta *
* 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) *
* any later version. *
* *
* This program is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301, USA. *
* *
**************************************************************************/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "proto.h"
static bool keep_cutbuffer = FALSE;
/* Should we keep the contents of the cutbuffer? */
static filestruct *cutbottom = NULL;
/* Pointer to end of cutbuffer. */
void cutbuffer_reset(void)
{
keep_cutbuffer = FALSE;
}
/* If we're not on the magicline, move all the text of the current line,
* plus the newline at the end, to the cutbuffer, and set the current
* place we want to where the line used to start. */
void cut_line(void)
{
if (current->next != NULL) {
move_to_filestruct(&cutbuffer, &cutbottom, current, 0,
current->next, 0);
placewewant = xplustabs();
}
}
#ifndef NANO_SMALL
/* Move all currently marked text to the cutbuffer, and set the current
* place we want to where the text used to start. */
void cut_marked(void)
{
filestruct *top, *bot;
size_t top_x, bot_x;
mark_order((const filestruct **)&top, &top_x,
(const filestruct **)&bot, &bot_x, NULL);
move_to_filestruct(&cutbuffer, &cutbottom, top, top_x, bot, bot_x);
placewewant = xplustabs();
}
/* If we're not at the end of the current line, move all the text from
* the current cursor position to the end of the current line,
* not counting the newline at the end, to the cutbuffer. If we are,
* and we're not on the magicline, move the newline at the end to the
* cutbuffer, and set the current place we want to where the newline
* used to be. */
void cut_to_eol(void)
{
size_t data_len = strlen(current->data);
assert(current_x <= data_len);
if (current_x < data_len)
/* If we're not at the end of the line, move all the text from
* the current position up to it, not counting the newline at
* the end, to the cutbuffer. */
move_to_filestruct(&cutbuffer, &cutbottom, current, current_x,
current, data_len);
else if (current->next != NULL) {
/* If we're at the end of the line, and it isn't the magicline,
* move all the text from the current position up to the
* beginning of the next line, i.e, the newline at the end, to
* the cutbuffer. */
move_to_filestruct(&cutbuffer, &cutbottom, current, current_x,
current->next, 0);
placewewant = xplustabs();
}
}
#endif /* !NANO_SMALL */
/* Move text from the current filestruct into the cutbuffer. */
void do_cut_text(void)
{
assert(current != NULL && current->data != NULL);
check_statusblank();
/* If keep_cutbuffer is FALSE and the cutbuffer isn't empty, blow
* away the text in the cutbuffer. */
if (!keep_cutbuffer && cutbuffer != NULL) {
free_filestruct(cutbuffer);
cutbuffer = NULL;
#ifdef DEBUG
fprintf(stderr, "Blew away cutbuffer =)\n");
#endif
}
/* Set keep_cutbuffer to TRUE, so that the text we're going to move
* into the cutbuffer will be added to the text already in the
* cutbuffer instead of replacing it. */
keep_cutbuffer = TRUE;
#ifndef NANO_SMALL
if (ISSET(MARK_ISSET)) {
/* If the mark is on, move the marked text to the cutbuffer and
* turn the mark off. */
cut_marked();
UNSET(MARK_ISSET);
} 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. */
cut_to_eol();
else
#endif
/* Otherwise, move the entire line into the cutbuffer. */
cut_line();
edit_refresh();
set_modified();
#ifdef DEBUG
dump_buffer(cutbuffer);
#endif
}
#ifndef NANO_SMALL
/* Cut from the current cursor position to the end of the file. */
void do_cut_till_end(void)
{
assert(current != NULL && current->data != NULL);
check_statusblank();
move_to_filestruct(&cutbuffer, &cutbottom, current, current_x,
filebot, 0);
edit_refresh();
set_modified();
#ifdef DEBUG
dump_buffer(cutbuffer);
#endif
}
#endif /* !NANO_SMALL */
/* Copy text from the cutbuffer into the current filestruct. */
void do_uncut_text(void)
{
assert(current != NULL && current->data != NULL);
#ifndef DISABLE_WRAPPING
wrap_reset();
#endif
check_statusblank();
/* If the cutbuffer is empty, get out. */
if (cutbuffer == NULL)
return;
/* Add a copy of the text in the cutbuffer to the current filestruct
* at the current cursor position. */
copy_from_filestruct(cutbuffer, cutbottom);
/* Set the current place we want to where the text from the
* cutbuffer ends. */
placewewant = xplustabs();
edit_refresh();
set_modified();
#ifdef DEBUG
dump_buffer_reverse();
#endif
}

3002
src/files.c Normal file

File diff suppressed because it is too large Load Diff

1296
src/global.c Normal file

File diff suppressed because it is too large Load Diff

291
src/move.c Normal file
View File

@@ -0,0 +1,291 @@
/* $Id$ */
/**************************************************************************
* move.c *
* *
* Copyright (C) 1999-2005 Chris Allegretta *
* 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) *
* any later version. *
* *
* This program is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301, USA. *
* *
**************************************************************************/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
#include "proto.h"
void do_first_line(void)
{
size_t pww_save = placewewant;
current = fileage;
placewewant = 0;
current_x = 0;
if (edittop != fileage || need_vertical_update(pww_save))
edit_update(TOP);
}
void do_last_line(void)
{
size_t pww_save = placewewant;
current = filebot;
placewewant = 0;
current_x = 0;
if (edittop->lineno + (editwinrows / 2) != filebot->lineno ||
need_vertical_update(pww_save))
edit_update(CENTER);
}
void do_home(void)
{
size_t pww_save = placewewant;
#ifndef NANO_SMALL
if (ISSET(SMART_HOME)) {
size_t current_x_save = current_x;
current_x = indent_length(current->data);
if (current_x == current_x_save ||
current->data[current_x] == '\0')
current_x = 0;
placewewant = xplustabs();
} else {
#endif
current_x = 0;
placewewant = 0;
#ifndef NANO_SMALL
}
#endif
check_statusblank();
if (need_horizontal_update(pww_save))
update_line(current, current_x);
}
void do_end(void)
{
size_t pww_save = placewewant;
current_x = strlen(current->data);
placewewant = xplustabs();
check_statusblank();
if (need_horizontal_update(pww_save))
update_line(current, current_x);
}
void do_page_up(void)
{
size_t pww_save = placewewant;
const filestruct *current_save = current;
#ifndef DISABLE_WRAPPING
wrap_reset();
#endif
/* If the first line of the file is onscreen, move current up there
* and put the cursor at the beginning of the line. */
if (edittop == fileage) {
current = fileage;
placewewant = 0;
} else {
edit_scroll(UP, editwinrows - 2);
#ifndef NANO_SMALL
/* If we're in smooth scrolling mode and there's at least one
* page of text left, move the current line of the edit window
* up a page. */
if (ISSET(SMOOTH_SCROLL) && current->lineno > editwinrows - 2) {
int i;
for (i = 0; i < editwinrows - 2; i++)
current = current->prev;
}
/* If we're not in smooth scrolling mode or there isn't at least
* one page of text left, put the cursor at the beginning of the
* top line of the edit window, as Pico does. */
else {
#endif
current = edittop;
placewewant = 0;
#ifndef NANO_SMALL
}
#endif
}
/* Get the equivalent x-coordinate of the new line. */
current_x = actual_x(current->data, placewewant);
/* Update all the lines that need to be updated. */
edit_redraw(current_save, pww_save);
check_statusblank();
}
void do_page_down(void)
{
size_t pww_save = placewewant;
const filestruct *current_save = current;
#ifndef DISABLE_WRAPPING
wrap_reset();
#endif
/* If the last line of the file is onscreen, move current down
* there and put the cursor at the beginning of the line. */
if (edittop->lineno + editwinrows > filebot->lineno) {
current = filebot;
placewewant = 0;
} else {
edit_scroll(DOWN, editwinrows - 2);
#ifndef NANO_SMALL
/* If we're in smooth scrolling mode and there's at least one
* page of text left, move the current line of the edit window
* down a page. */
if (ISSET(SMOOTH_SCROLL) && current->lineno + editwinrows - 2 <=
filebot->lineno) {
int i;
for (i = 0; i < editwinrows - 2; i++)
current = current->next;
}
/* If we're not in smooth scrolling mode or there isn't at least
* one page of text left, put the cursor at the beginning of the
* top line of the edit window, as Pico does. */
else {
#endif
current = edittop;
placewewant = 0;
#ifndef NANO_SMALL
}
#endif
}
/* Get the equivalent x-coordinate of the new line. */
current_x = actual_x(current->data, placewewant);
/* Update all the lines that need to be updated. */
edit_redraw(current_save, pww_save);
check_statusblank();
}
void do_up(void)
{
#ifndef DISABLE_WRAPPING
wrap_reset();
#endif
check_statusblank();
if (current->prev == NULL)
return;
assert(current_y == current->lineno - edittop->lineno);
current = current->prev;
current_x = actual_x(current->data, placewewant);
/* If we're on the first row of the edit window, scroll up one line
* if we're in smooth scrolling mode, or up half a page if we're
* not. */
if (current_y == 0)
edit_scroll(UP,
#ifndef NANO_SMALL
ISSET(SMOOTH_SCROLL) ? 1 :
#endif
editwinrows / 2);
/* Update the lines left alone by edit_scroll(): the line we were on
* before and the line we're on now. The former needs to be redrawn
* if we're not on the first page, and the latter needs to be
* drawn. */
if (need_vertical_update(0))
update_line(current->next, 0);
update_line(current, current_x);
}
void do_down(void)
{
#ifndef DISABLE_WRAPPING
wrap_reset();
#endif
check_statusblank();
if (current->next == NULL)
return;
assert(current_y == current->lineno - edittop->lineno);
current = current->next;
current_x = actual_x(current->data, placewewant);
/* If we're on the last row of the edit window, scroll down one line
* if we're in smooth scrolling mode, or down half a page if we're
* not. */
if (current_y == editwinrows - 1)
edit_scroll(DOWN,
#ifndef NANO_SMALL
ISSET(SMOOTH_SCROLL) ? 1 :
#endif
editwinrows / 2);
/* Update the lines left alone by edit_scroll(): the line we were on
* before and the line we're on now. The former needs to be redrawn
* if we're not on the first page, and the latter needs to be
* drawn. */
if (need_vertical_update(0))
update_line(current->prev, 0);
update_line(current, current_x);
}
void do_left(bool allow_update)
{
size_t pww_save = placewewant;
if (current_x > 0)
current_x = move_mbleft(current->data, current_x);
else if (current != fileage) {
do_up();
current_x = strlen(current->data);
}
placewewant = xplustabs();
check_statusblank();
if (allow_update && need_horizontal_update(pww_save))
update_line(current, current_x);
}
void do_left_void(void)
{
do_left(TRUE);
}
void do_right(bool allow_update)
{
size_t pww_save = placewewant;
assert(current_x <= strlen(current->data));
if (current->data[current_x] != '\0')
current_x = move_mbright(current->data, current_x);
else if (current->next != NULL) {
do_down();
current_x = 0;
}
placewewant = xplustabs();
check_statusblank();
if (allow_update && need_horizontal_update(pww_save))
update_line(current, current_x);
}
void do_right_void(void)
{
do_right(TRUE);
}

4698
src/nano.c Normal file

File diff suppressed because it is too large Load Diff

517
src/nano.h Normal file
View File

@@ -0,0 +1,517 @@
/* $Id$ */
/**************************************************************************
* nano.h *
* *
* Copyright (C) 1999-2005 Chris Allegretta *
* 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) *
* any later version. *
* *
* This program is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301, USA. *
* *
**************************************************************************/
#ifndef NANO_H
#define NANO_H 1
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#ifdef __TANDEM
/* Tandem NonStop Kernel. */
#include <floss.h>
#define NANO_ROOT_UID 65535
#else
#define NANO_ROOT_UID 0
#endif
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
/* Macros for flags. */
#define SET(bit) flags |= bit
#define UNSET(bit) flags &= ~bit
#define ISSET(bit) ((flags & bit) != 0)
#define TOGGLE(bit) flags ^= bit
/* Macros for character allocation, etc. */
#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))
#define charset(dest, src, n) memset(dest, src, (n) * sizeof(char))
/* Other macros. */
#ifdef BROKEN_REGEXEC
#undef regexec
#define regexec(preg, string, nmatch, pmatch, eflags) safe_regexec(preg, string, nmatch, pmatch, eflags)
#endif
/* Set a default value for PATH_MAX if there isn't one. */
#ifndef PATH_MAX
#define PATH_MAX 4096
#endif
#ifdef USE_SLANG
/* Slang support enabled. */
#include <slcurses.h>
/* Slang curses emulation brain damage, part 2: Slang doesn't define the
* curses equivalents of the Insert or Delete keys. */
#define KEY_DC SL_KEY_DELETE
#define KEY_IC SL_KEY_IC
#elif defined(HAVE_NCURSES_H)
#include <ncurses.h>
#else /* Uh oh. */
#include <curses.h>
#endif /* CURSES_H */
#ifdef ENABLE_NLS
#ifdef HAVE_LIBINTL_H
#include <libintl.h>
#endif
#define _(string) gettext(string)
#define P_(singular, plural, number) ngettext(singular, plural, number)
#else
#define _(string) (string)
#define P_(singular, plural, number) (number == 1 ? singular : plural)
#endif
#define gettext_noop(string) (string)
#define N_(string) gettext_noop(string)
/* Mark a string that will be sent to gettext() later. */
#include <stddef.h>
#include <sys/types.h>
#include <sys/stat.h>
/* If no snprintf() or vsnprintf(), use the versions from glib 2.x. */
#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF)
#include <glib.h>
#ifndef HAVE_SNPRINTF
#define snprintf g_snprintf
#endif
#ifndef HAVE_VSNPRINTF
#define vsnprintf g_vsnprintf
#endif
#endif
/* If no isblank(), iswblank(), strcasecmp(), strncasecmp(),
* strcasestr(), strnlen(), getdelim(), or getline(), use the versions
* we have. */
#ifndef HAVE_ISBLANK
#define isblank nisblank
#endif
#ifndef HAVE_ISWBLANK
#define iswblank niswblank
#endif
#ifndef HAVE_STRCASECMP
#define strcasecmp nstrcasecmp
#endif
#ifndef HAVE_STRNCASECMP
#define strncasecmp nstrncasecmp
#endif
#ifndef HAVE_STRCASESTR
#define strcasestr nstrcasestr
#endif
#ifndef HAVE_STRNLEN
#define strnlen nstrnlen
#endif
#ifndef HAVE_GETDELIM
#define getdelim ngetdelim
#endif
#ifndef HAVE_GETLINE
#define getline ngetline
#endif
#define VERMSG "GNU nano " VERSION
/* If we aren't using ncurses, turn the mouse support off, as it's
* ncurses-specific. */
#ifndef NCURSES_MOUSE_VERSION
#define DISABLE_MOUSE 1
#endif
#if defined(DISABLE_WRAPPING) && defined(DISABLE_JUSTIFY)
#define DISABLE_WRAPJUSTIFY 1
#endif
/* Enumeration types. */
typedef enum {
NIX_FILE, DOS_FILE, MAC_FILE
} file_format;
typedef enum {
UP, DOWN
} updown;
typedef enum {
TOP, CENTER, NONE
} topmidnone;
/* Structure types. */
typedef struct filestruct {
char *data;
struct filestruct *next; /* Next node. */
struct filestruct *prev; /* Previous node. */
ssize_t lineno; /* The line number. */
} filestruct;
#ifdef ENABLE_MULTIBUFFER
typedef struct openfilestruct {
char *filename;
#ifndef NANO_SMALL
struct stat originalfilestat;
#endif
struct openfilestruct *next;
/* Next node. */
struct openfilestruct *prev;
/* Previous node. */
filestruct *fileage; /* Current file. */
filestruct *filebot; /* Current file's last line. */
filestruct *edittop; /* Current top of edit window. */
filestruct *current; /* Current file's line. */
#ifndef NANO_SMALL
filestruct *mark_beginbuf;
/* Current file's beginning marked
* line. */
size_t mark_beginx; /* Current file's beginning marked
* line's x-coordinate position. */
#endif
size_t current_x; /* Current file's x-coordinate
* position. */
size_t placewewant; /* Current file's place we want. */
size_t totlines; /* Current file's total number of
* lines. */
size_t totsize; /* Current file's total size. */
unsigned long flags; /* Current file's flags: modification
* status (and marking status, if
* available). */
file_format fmt; /* Current file's format. */
} openfilestruct;
#endif
typedef struct partition {
filestruct *fileage;
filestruct *top_prev;
char *top_data;
filestruct *filebot;
filestruct *bot_next;
char *bot_data;
} partition;
typedef struct shortcut {
/* Key values that aren't used should be set to NANO_NO_KEY. */
int ctrlval; /* Special sentinel key or control key we want
* bound. */
int metaval; /* Meta key we want bound. */
int funcval; /* Function key we want bound. */
int miscval; /* Other Meta key we want bound. */
bool viewok; /* Is this function legal in view mode? */
void (*func)(void); /* Function to call when we catch this key. */
const char *desc; /* Description, e.g. "Page Up". */
#ifndef DISABLE_HELP
const char *help; /* Help file entry text. */
#endif
struct shortcut *next;
} shortcut;
#ifndef NANO_SMALL
typedef struct toggle {
int val; /* Sequence to toggle the key. Should only need
* one. */
const char *desc; /* Description for when toggle is, uh, toggled,
* e.g. "Cut to end"; we'll append Enabled or
* Disabled. */
long flag; /* What flag actually gets toggled. */
struct toggle *next;
} toggle;
#endif
#ifdef ENABLE_NANORC
typedef struct rcoption {
const char *name;
long flag;
} rcoption;
#endif
#ifdef ENABLE_COLOR
typedef struct colortype {
int fg; /* Foreground color. */
int bg; /* Background color. */
bool bright; /* Is this color A_BOLD? */
int pairnum; /* Color pair number used for this
* foreground/background. */
regex_t start; /* Start (or all) of the regex
* string. */
regex_t *end; /* End (if any) of the regex string. */
struct colortype *next;
} colortype;
typedef struct exttype {
regex_t val; /* The extensions that match this
* syntax. */
struct exttype *next;
} exttype;
typedef struct syntaxtype {
char *desc; /* Name of this syntax type. */
exttype *extensions; /* List of extensions that this syntax
* applies to. */
colortype *color; /* Color struct for this syntax. */
struct syntaxtype *next;
} syntaxtype;
#endif
/* Bitwise flags so that we can save space (or, more correctly, not
* waste it). */
#define MODIFIED (1<<0)
#define CASE_SENSITIVE (1<<1)
#define MARK_ISSET (1<<2)
#define CONST_UPDATE (1<<3)
#define NO_HELP (1<<4)
#define NOFOLLOW_SYMLINKS (1<<5)
#define SUSPEND (1<<6)
#define NO_WRAP (1<<7)
#define AUTOINDENT (1<<8)
#define VIEW_MODE (1<<9)
#define USE_MOUSE (1<<10)
#define USE_REGEXP (1<<11)
#define TEMP_FILE (1<<12)
#define CUT_TO_END (1<<13)
#define BACKWARDS_SEARCH (1<<14)
#define MULTIBUFFER (1<<15)
#define SMOOTH_SCROLL (1<<16)
#define REBIND_DELETE (1<<17)
#define NO_CONVERT (1<<18)
#define BACKUP_FILE (1<<19)
#define NO_RCFILE (1<<20)
#define NO_COLOR_SYNTAX (1<<21)
#define PRESERVE (1<<22)
#define HISTORYLOG (1<<23)
#define RESTRICTED (1<<24)
#define SMART_HOME (1<<25)
#define WHITESPACE_DISPLAY (1<<26)
#define MORE_SPACE (1<<27)
#define TABS_TO_SPACES (1<<28)
#define QUICK_BLANK (1<<29)
#define USE_UTF8 (1<<30)
/* Control key sequences. Changing these would be very, very bad. */
#define NANO_CONTROL_SPACE 0
#define NANO_CONTROL_A 1
#define NANO_CONTROL_B 2
#define NANO_CONTROL_C 3
#define NANO_CONTROL_D 4
#define NANO_CONTROL_E 5
#define NANO_CONTROL_F 6
#define NANO_CONTROL_G 7
#define NANO_CONTROL_H 8
#define NANO_CONTROL_I 9
#define NANO_CONTROL_J 10
#define NANO_CONTROL_K 11
#define NANO_CONTROL_L 12
#define NANO_CONTROL_M 13
#define NANO_CONTROL_N 14
#define NANO_CONTROL_O 15
#define NANO_CONTROL_P 16
#define NANO_CONTROL_Q 17
#define NANO_CONTROL_R 18
#define NANO_CONTROL_S 19
#define NANO_CONTROL_T 20
#define NANO_CONTROL_U 21
#define NANO_CONTROL_V 22
#define NANO_CONTROL_W 23
#define NANO_CONTROL_X 24
#define NANO_CONTROL_Y 25
#define NANO_CONTROL_Z 26
#define NANO_CONTROL_3 27
#define NANO_CONTROL_4 28
#define NANO_CONTROL_5 29
#define NANO_CONTROL_6 30
#define NANO_CONTROL_7 31
#define NANO_CONTROL_8 127
#define NANO_ALT_9 '9'
#define NANO_ALT_0 '0'
#define NANO_ALT_A 'a'
#define NANO_ALT_B 'b'
#define NANO_ALT_C 'c'
#define NANO_ALT_D 'd'
#define NANO_ALT_E 'e'
#define NANO_ALT_F 'f'
#define NANO_ALT_G 'g'
#define NANO_ALT_H 'h'
#define NANO_ALT_I 'i'
#define NANO_ALT_J 'j'
#define NANO_ALT_K 'k'
#define NANO_ALT_L 'l'
#define NANO_ALT_M 'm'
#define NANO_ALT_N 'n'
#define NANO_ALT_O 'o'
#define NANO_ALT_P 'p'
#define NANO_ALT_Q 'q'
#define NANO_ALT_R 'r'
#define NANO_ALT_S 's'
#define NANO_ALT_T 't'
#define NANO_ALT_U 'u'
#define NANO_ALT_V 'v'
#define NANO_ALT_W 'w'
#define NANO_ALT_X 'x'
#define NANO_ALT_Y 'y'
#define NANO_ALT_Z 'z'
#define NANO_ALT_PERIOD '.'
#define NANO_ALT_COMMA ','
#define NANO_ALT_LPAREN '('
#define NANO_ALT_RPAREN ')'
#define NANO_ALT_LCARAT '<'
#define NANO_ALT_RCARAT '>'
#define NANO_ALT_RBRACKET ']'
#define NANO_ALT_SPACE ' '
/* Some semi-changeable keybindings; don't play with these unless you're
* sure you know what you're doing. Assume ERR is defined as -1. */
/* No key at all. */
#define NANO_NO_KEY -2
/* Normal keys. */
#define NANO_XON_KEY NANO_CONTROL_Q
#define NANO_XOFF_KEY NANO_CONTROL_S
#define NANO_CANCEL_KEY NANO_CONTROL_C
#define NANO_EXIT_KEY NANO_CONTROL_X
#define NANO_EXIT_FKEY KEY_F(2)
#define NANO_INSERTFILE_KEY NANO_CONTROL_R
#define NANO_INSERTFILE_FKEY KEY_F(5)
#define NANO_TOOTHERINSERT_KEY NANO_CONTROL_X
#define NANO_WRITEOUT_KEY NANO_CONTROL_O
#define NANO_WRITEOUT_FKEY KEY_F(3)
#define NANO_GOTOLINE_KEY NANO_CONTROL_7
#define NANO_GOTOLINE_FKEY KEY_F(13)
#define NANO_GOTOLINE_ALTKEY NANO_ALT_G
#define NANO_TOGOTOLINE_KEY NANO_CONTROL_T
#define NANO_HELP_KEY NANO_CONTROL_G
#define NANO_HELP_FKEY KEY_F(1)
#define NANO_WHEREIS_KEY NANO_CONTROL_W
#define NANO_WHEREIS_FKEY KEY_F(6)
#define NANO_WHEREIS_NEXT_KEY NANO_ALT_W
#define NANO_WHEREIS_NEXT_FKEY KEY_F(16)
#define NANO_TOOTHERWHEREIS_KEY NANO_CONTROL_T
#define NANO_REGEXP_KEY NANO_ALT_R
#define NANO_REPLACE_KEY NANO_CONTROL_4
#define NANO_REPLACE_FKEY KEY_F(14)
#define NANO_ALT_REPLACE_KEY NANO_ALT_R
#define NANO_TOOTHERSEARCH_KEY NANO_CONTROL_R
#define NANO_PREVPAGE_KEY NANO_CONTROL_Y
#define NANO_PREVPAGE_FKEY KEY_F(7)
#define NANO_NEXTPAGE_KEY NANO_CONTROL_V
#define NANO_NEXTPAGE_FKEY KEY_F(8)
#define NANO_CUT_KEY NANO_CONTROL_K
#define NANO_CUT_FKEY KEY_F(9)
#define NANO_UNCUT_KEY NANO_CONTROL_U
#define NANO_UNCUT_FKEY KEY_F(10)
#define NANO_CURSORPOS_KEY NANO_CONTROL_C
#define NANO_CURSORPOS_FKEY KEY_F(11)
#define NANO_SPELL_KEY NANO_CONTROL_T
#define NANO_SPELL_FKEY KEY_F(12)
#define NANO_FIRSTLINE_KEY NANO_PREVPAGE_KEY
#define NANO_FIRSTLINE_FKEY NANO_PREVPAGE_FKEY
#define NANO_LASTLINE_KEY NANO_NEXTPAGE_KEY
#define NANO_LASTLINE_FKEY NANO_NEXTPAGE_FKEY
#define NANO_REFRESH_KEY NANO_CONTROL_L
#define NANO_JUSTIFY_KEY NANO_CONTROL_J
#define NANO_JUSTIFY_FKEY KEY_F(4)
#define NANO_UNJUSTIFY_KEY NANO_UNCUT_KEY /* Same key as uncut. */
#define NANO_UNJUSTIFY_FKEY NANO_UNCUT_FKEY /* Same key as uncut. */
#define NANO_PREVLINE_KEY NANO_CONTROL_P
#define NANO_NEXTLINE_KEY NANO_CONTROL_N
#define NANO_FORWARD_KEY NANO_CONTROL_F
#define NANO_BACK_KEY NANO_CONTROL_B
#define NANO_MARK_KEY NANO_CONTROL_6
#define NANO_MARK_ALTKEY NANO_ALT_A
#define NANO_MARK_FKEY KEY_F(15)
#define NANO_HOME_KEY NANO_CONTROL_A
#define NANO_END_KEY NANO_CONTROL_E
#define NANO_DELETE_KEY NANO_CONTROL_D
#define NANO_BACKSPACE_KEY NANO_CONTROL_H
#define NANO_TAB_KEY NANO_CONTROL_I
#define NANO_SUSPEND_KEY NANO_CONTROL_Z
#define NANO_ENTER_KEY NANO_CONTROL_M
#define NANO_TOFILES_KEY NANO_CONTROL_T
#define NANO_APPEND_KEY NANO_ALT_A
#define NANO_PREPEND_KEY NANO_ALT_P
#define NANO_OPENPREV_KEY NANO_ALT_LCARAT
#define NANO_OPENNEXT_KEY NANO_ALT_RCARAT
#define NANO_OPENPREV_ALTKEY NANO_ALT_COMMA
#define NANO_OPENNEXT_ALTKEY NANO_ALT_PERIOD
#define NANO_BRACKET_KEY NANO_ALT_RBRACKET
#define NANO_NEXTWORD_KEY NANO_CONTROL_SPACE
#define NANO_PREVWORD_KEY NANO_ALT_SPACE
#define NANO_WORDCOUNT_KEY NANO_ALT_D
#define NANO_CUTTILLEND_KEY NANO_CONTROL_X
#define NANO_CUTTILLEND_ALTKEY NANO_ALT_T
#define NANO_PARABEGIN_KEY NANO_CONTROL_W
#define NANO_PARABEGIN_ALTKEY1 NANO_ALT_LPAREN
#define NANO_PARABEGIN_ALTKEY2 NANO_ALT_9
#define NANO_PARAEND_KEY NANO_CONTROL_O
#define NANO_PARAEND_ALTKEY1 NANO_ALT_RPAREN
#define NANO_PARAEND_ALTKEY2 NANO_ALT_0
#define NANO_FULLJUSTIFY_KEY NANO_CONTROL_U
#define NANO_FULLJUSTIFY_ALTKEY NANO_ALT_J
#define NANO_VERBATIM_KEY NANO_ALT_V
#ifndef NANO_SMALL
/* Toggles do not exist with NANO_SMALL. */
#define TOGGLE_CONST_KEY NANO_ALT_C
#define TOGGLE_AUTOINDENT_KEY NANO_ALT_I
#define TOGGLE_SUSPEND_KEY NANO_ALT_Z
#define TOGGLE_NOHELP_KEY NANO_ALT_X
#define TOGGLE_MOUSE_KEY NANO_ALT_M
#define TOGGLE_CUTTOEND_KEY NANO_ALT_K
#define TOGGLE_WRAP_KEY NANO_ALT_L
#define TOGGLE_BACKWARDS_KEY NANO_ALT_B
#define TOGGLE_CASE_KEY NANO_ALT_C
#define TOGGLE_MULTIBUFFER_KEY NANO_ALT_F
#define TOGGLE_DOS_KEY NANO_ALT_D
#define TOGGLE_MAC_KEY NANO_ALT_M
#define TOGGLE_SMOOTH_KEY NANO_ALT_S
#define TOGGLE_NOCONVERT_KEY NANO_ALT_N
#define TOGGLE_BACKUP_KEY NANO_ALT_B
#define TOGGLE_SYNTAX_KEY NANO_ALT_Y
#define TOGGLE_SMARTHOME_KEY NANO_ALT_H
#define TOGGLE_WHITESPACE_KEY NANO_ALT_P
#define TOGGLE_MORESPACE_KEY NANO_ALT_O
#define TOGGLE_TABSTOSPACES_KEY NANO_ALT_Q
#endif /* !NANO_SMALL */
#define MAIN_VISIBLE 12
#define VIEW TRUE
#define NOVIEW FALSE
/* Minimum editor window rows required for nano to work correctly. */
#define MIN_EDITOR_ROWS 1
/* Default number of characters from end-of-line where text wrapping
* occurs. */
#define CHARS_FROM_EOL 8
/* Default width of a tab. */
#define WIDTH_OF_TAB 8
/* Maximum number of search/replace history strings saved, not counting
* the blank lines at their ends. */
#define MAX_SEARCH_HISTORY 100
/* Maximum number of bytes we read from a file at one time. */
#define MAX_BUF_SIZE 128
#endif /* !NANO_H */

716
src/proto.h Normal file
View File

@@ -0,0 +1,716 @@
/* $Id$ */
/**************************************************************************
* proto.h *
* *
* Copyright (C) 1999-2005 Chris Allegretta *
* 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) *
* any later version. *
* *
* This program is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301, USA. *
* *
**************************************************************************/
#ifndef PROTO_H
#define PROTO_H 1
/* Externs. */
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#ifdef HAVE_REGEX_H
#include <regex.h>
#endif
#include "nano.h"
#ifndef DISABLE_WRAPJUSTIFY
extern ssize_t wrap_at;
#endif
extern int editwinrows;
extern size_t current_x;
extern ssize_t current_y;
extern size_t totlines;
extern size_t placewewant;
#ifndef NANO_SMALL
extern size_t mark_beginx;
#endif
extern size_t totsize;
extern unsigned long flags;
extern ssize_t tabsize;
extern int currslen;
#if !defined(NANO_SMALL) && defined(ENABLE_NANORC)
extern char *whitespace;
extern int whitespace_len[2];
#endif
#ifndef DISABLE_JUSTIFY
extern char *punct;
extern char *brackets;
extern char *quotestr;
#ifdef HAVE_REGEX_H
extern regex_t quotereg;
extern int quoterc;
extern char *quoteerr;
#else
extern size_t quotelen;
#endif
#endif
#ifndef NANO_SMALL
extern char *backup_dir;
#endif
extern WINDOW *topwin, *edit, *bottomwin;
extern char *filename;
extern struct stat originalfilestat;
extern char *answer;
extern char *hblank;
#ifndef DISABLE_HELP
extern char *help_text;
#endif
extern char *last_search;
extern char *last_replace;
#ifndef DISABLE_OPERATINGDIR
extern char *operating_dir;
extern char *full_operating_dir;
#endif
#ifndef DISABLE_SPELLER
extern char *alt_speller;
#endif
extern struct stat fileinfo;
extern filestruct *current, *fileage, *edittop, *filebot;
extern filestruct *cutbuffer;
#ifndef DISABLE_JUSTIFY
extern filestruct *jusbuffer;
#endif
extern partition *filepart;
#ifndef NANO_SMALL
extern filestruct *mark_beginbuf;
#endif
#ifdef ENABLE_MULTIBUFFER
extern openfilestruct *open_files;
#endif
#ifdef ENABLE_COLOR
extern const colortype *colorstrings;
extern syntaxtype *syntaxes;
extern char *syntaxstr;
#endif
extern shortcut *shortcut_list;
extern shortcut *main_list, *whereis_list;
extern shortcut *replace_list, *gotoline_list;
extern shortcut *writefile_list, *insertfile_list;
extern shortcut *replace_list_2;
#ifndef NANO_SMALL
extern shortcut *extcmd_list;
#endif
#ifndef DISABLE_HELP
extern shortcut *help_list;
#endif
#ifndef DISABLE_SPELLER
extern shortcut *spell_list;
#endif
#ifndef DISABLE_BROWSER
extern shortcut *browser_list, *gotodir_list;
#endif
extern const shortcut *currshortcut;
#ifdef HAVE_REGEX_H
extern regex_t search_regexp;
extern regmatch_t regmatches[10];
#ifdef ENABLE_COLOR
extern regex_t syntaxfile_regexp;
extern regmatch_t synfilematches[1];
#endif /* ENABLE_COLOR */
#endif /* HAVE_REGEX_H */
#ifndef NANO_SMALL
extern toggle *toggles;
#endif
#ifndef NANO_SMALL
extern filestruct *search_history;
extern filestruct *searchage;
extern filestruct *searchbot;
extern filestruct *replace_history;
extern filestruct *replaceage;
extern filestruct *replacebot;
#endif
extern bool curses_ended;
extern char *homedir;
/* The functions we want available. */
/* Public functions in chars.c. */
#ifndef HAVE_ISBLANK
bool nisblank(int c);
#endif
#if !defined(HAVE_ISWBLANK) && defined(NANO_WIDE)
bool niswblank(wchar_t wc);
#endif
bool is_byte(int c);
bool is_alnum_mbchar(const char *c);
bool is_blank_mbchar(const char *c);
bool is_cntrl_char(int c);
#ifdef NANO_WIDE
bool is_cntrl_wchar(wchar_t wc);
#endif
bool is_cntrl_mbchar(const char *c);
bool is_punct_mbchar(const char *c);
bool is_word_mbchar(const char *c, bool allow_punct);
char control_rep(char c);
#ifdef NANO_WIDE
wchar_t control_wrep(wchar_t c);
#endif
char *control_mbrep(const char *c, char *crep, int *crep_len);
int mbwidth(const char *c);
int mb_cur_max(void);
char *make_mbchar(int chr, int *chr_mb_len);
int parse_mbchar(const char *buf, char *chr, bool *bad_chr, size_t
*col);
size_t move_mbleft(const char *buf, size_t pos);
size_t move_mbright(const char *buf, size_t pos);
#ifndef HAVE_STRCASECMP
int nstrcasecmp(const char *s1, const char *s2);
#endif
int mbstrcasecmp(const char *s1, const char *s2);
#ifndef HAVE_STRNCASECMP
int nstrncasecmp(const char *s1, const char *s2, size_t n);
#endif
int mbstrncasecmp(const char *s1, const char *s2, size_t n);
#ifndef HAVE_STRCASESTR
const char *nstrcasestr(const char *haystack, const char *needle);
#endif
const char *mbstrcasestr(const char *haystack, const char *needle);
#if !defined(NANO_SMALL) || !defined(DISABLE_TABCOMP)
const char *revstrstr(const char *haystack, const char *needle, const
char *rev_start);
#endif
#ifndef NANO_SMALL
const char *revstrcasestr(const char *haystack, const char *needle,
const char *rev_start);
const char *mbrevstrcasestr(const char *haystack, const char *needle,
const char *rev_start);
#endif
size_t mbstrlen(const char *s);
#ifndef HAVE_STRNLEN
size_t nstrnlen(const char *s, size_t maxlen);
#endif
size_t mbstrnlen(const char *s, size_t maxlen);
#ifndef DISABLE_JUSTIFY
#ifdef ENABLE_NANORC
bool has_blank_chars(const char *s);
bool has_blank_mbchars(const char *s);
#endif
char *mbstrchr(const char *s, char *c);
#endif
#ifdef ENABLE_NANORC
bool is_valid_mbstring(const char *s);
#endif
/* Public functions in color.c. */
#ifdef ENABLE_COLOR
void set_colorpairs(void);
void do_colorinit(void);
void update_color(void);
#endif /* ENABLE_COLOR */
/* Public functions in cut.c. */
void cutbuffer_reset(void);
void cut_line(void);
#ifndef NANO_SMALL
void cut_marked(void);
void cut_to_eol(void);
#endif
void do_cut_text(void);
#ifndef NANO_SMALL
void do_cut_till_end(void);
#endif
void do_uncut_text(void);
/* Public functions in files.c. */
void new_file(void);
filestruct *read_line(char *buf, filestruct *prevnode, bool
*first_line_ins, size_t buf_len);
void load_file(void);
void read_file(FILE *f, const char *filename);
int open_file(const char *filename, bool newfie, FILE **f);
char *get_next_filename(const char *name, const char *suffix);
#ifndef NANO_SMALL
void execute_command(const char *command);
#endif
void load_buffer(const char *name);
void do_insertfile(
#ifndef NANO_SMALL
bool execute
#else
void
#endif
);
void do_insertfile_void(void);
#ifdef ENABLE_MULTIBUFFER
openfilestruct *make_new_opennode(void);
void splice_opennode(openfilestruct *begin, openfilestruct *newnode,
openfilestruct *end);
void unlink_opennode(openfilestruct *fileptr);
void delete_opennode(openfilestruct *fileptr);
#ifdef DEBUG
void free_openfilestruct(openfilestruct *src);
#endif
void add_open_file(bool update);
void load_open_file(void);
void open_prevnext_file(bool next_file);
void open_prevfile_void(void);
void open_nextfile_void(void);
bool close_open_file(void);
#endif
char *get_full_path(const char *origpath);
char *check_writable_directory(const char *path);
char *safe_tempfile(FILE **f);
#ifndef DISABLE_OPERATINGDIR
void init_operating_dir(void);
bool check_operating_dir(const char *currpath, bool allow_tabcomp);
#endif
#ifndef NANO_SMALL
void init_backup_dir(void);
#endif
int copy_file(FILE *inn, FILE *out);
int write_file(const char *name, FILE *f_open, bool tmp, int append,
bool nonamechange);
#ifndef NANO_SMALL
int write_marked(const char *name, FILE *f_open, bool tmp, int append);
#endif
int do_writeout(bool exiting);
void do_writeout_void(void);
char *real_dir_from_tilde(const char *buf);
#if !defined(DISABLE_TABCOMP) || !defined(DISABLE_BROWSER)
int diralphasort(const void *va, const void *vb);
void free_chararray(char **array, size_t len);
#endif
#ifndef DISABLE_TABCOMP
char **username_tab_completion(const char *buf, size_t *num_matches,
size_t buflen);
char **cwd_tab_completion(const char *buf, size_t *num_matches, size_t
buflen);
char *input_tab(char *buf, size_t *place, bool *lastwastab, bool *list);
#endif
const char *tail(const char *foo);
#ifndef DISABLE_BROWSER
void striponedir(char *path);
char **browser_init(const char *path, int *longest, size_t *numents, DIR
*dir);
char *do_browser(char *path, DIR *dir);
char *do_browse_from(const char *inpath);
#endif
#if !defined(NANO_SMALL) && defined(ENABLE_NANORC)
char *histfilename(void);
void load_history(void);
bool writehist(FILE *hist, filestruct *histhead);
void save_history(void);
#endif
/* Public functions in global.c. */
size_t length_of_list(const shortcut *s);
#ifndef NANO_SMALL
void toggle_init_one(int val, const char *desc, long flag);
void toggle_init(void);
#endif
void sc_init_one(shortcut **shortcutage, int key, const char *desc,
#ifndef DISABLE_HELP
const char *help,
#endif
int metaval, int funcval, int miscval, bool view, void
(*func)(void));
void shortcut_init(bool unjustify);
void free_shortcutage(shortcut **shortcutage);
#ifdef DEBUG
void thanks_for_all_the_fish(void);
#endif
/* Public functions in move.c. */
void do_first_line(void);
void do_last_line(void);
void do_home(void);
void do_end(void);
void do_page_up(void);
void do_page_down(void);
void do_up(void);
void do_down(void);
void do_left(bool allow_update);
void do_left_void(void);
void do_right(bool allow_update);
void do_right_void(void);
/* Public functions in nano.c. */
void print_view_warning(void);
void finish(void);
void die(const char *msg, ...);
void die_save_file(const char *die_filename);
void check_die_too_small(void);
void resize_variables(void);
void global_init(bool save_cutbuffer);
void window_init(void);
#ifndef DISABLE_MOUSE
void mouse_init(void);
#endif
#ifndef DISABLE_HELP
void help_init(void);
#endif
filestruct *make_new_node(filestruct *prevnode);
filestruct *copy_node(const filestruct *src);
void splice_node(filestruct *begin, filestruct *newnode, filestruct
*end);
void unlink_node(const filestruct *fileptr);
void delete_node(filestruct *fileptr);
filestruct *copy_filestruct(const filestruct *src);
void free_filestruct(filestruct *src);
partition *partition_filestruct(filestruct *top, size_t top_x,
filestruct *bot, size_t bot_x);
void unpartition_filestruct(partition **p);
void move_to_filestruct(filestruct **file_top, filestruct **file_bot,
filestruct *top, size_t top_x, filestruct *bot, size_t bot_x);
void copy_from_filestruct(filestruct *file_top, filestruct *file_bot);
void renumber_all(void);
void renumber(filestruct *fileptr);
void print1opt_full(const char *shortflag
#ifdef HAVE_GETOPT_LONG
, const char *longflag
#endif
, const char *desc);
void usage(void);
void version(void);
int no_more_space(void);
int no_help(void);
void nano_disabled_msg(void);
#ifndef NANO_SMALL
void cancel_fork(int signal);
bool open_pipe(const char *command);
#endif
void do_verbatim_input(void);
void do_backspace(void);
void do_delete(void);
void do_tab(void);
void do_enter(void);
#ifndef NANO_SMALL
bool do_next_word(bool allow_punct, bool allow_update);
void do_next_word_void(void);
bool do_prev_word(bool allow_punct, bool allow_update);
void do_prev_word_void(void);
void do_word_count(void);
void do_mark(void);
#endif
#ifndef DISABLE_WRAPPING
void wrap_reset(void);
bool do_wrap(filestruct *line);
#endif
#ifndef DISABLE_SPELLER
bool do_int_spell_fix(const char *word);
const char *do_int_speller(const char *tempfile_name);
const char *do_alt_speller(char *tempfile_name);
void do_spell(void);
#endif
#if !defined(DISABLE_HELP) || !defined(DISABLE_JUSTIFY) || !defined(DISABLE_WRAPPING)
ssize_t break_line(const char *line, ssize_t goal, bool newline);
#endif
#if !defined(NANO_SMALL) || !defined(DISABLE_JUSTIFY)
size_t indent_length(const char *line);
#endif
#ifndef DISABLE_JUSTIFY
void justify_format(filestruct *paragraph, size_t skip);
size_t quote_length(const char *line);
bool quotes_match(const char *a_line, size_t a_quote, const char
*b_line);
bool indents_match(const char *a_line, size_t a_indent, const char
*b_line, size_t b_indent);
bool begpar(const filestruct *const foo);
void do_para_begin(bool allow_update);
void do_para_begin_void(void);
bool inpar(const filestruct *const foo);
void do_para_end(bool allow_update);
void do_para_end_void(void);
filestruct *backup_lines(filestruct *first_line, size_t par_len, size_t
quote_len);
bool find_paragraph(size_t *const quote, size_t *const par);
void do_justify(bool full_justify);
void do_justify_void(void);
void do_full_justify(void);
#endif /* !DISABLE_JUSTIFY */
void do_exit(void);
void signal_init(void);
void handle_hupterm(int signal);
void do_suspend(int signal);
void do_cont(int signal);
#ifndef NANO_SMALL
void handle_sigwinch(int s);
void allow_pending_sigwinch(bool allow);
#endif
#ifndef NANO_SMALL
void do_toggle(const toggle *which);
#endif
void disable_extended_io(void);
void disable_signals(void);
#ifndef NANO_SMALL
void enable_signals(void);
#endif
void disable_flow_control(void);
void enable_flow_control(void);
void terminal_init(void);
int do_input(bool *meta_key, bool *func_key, bool *s_or_t, bool
*ran_func, bool *finished, bool allow_funcs);
#ifndef DISABLE_MOUSE
bool do_mouse(void);
#endif
void do_output(char *output, size_t output_len, bool allow_cntrls);
/* Public functions in rcfile.c. */
#ifdef ENABLE_NANORC
void rcfile_error(const char *msg, ...);
char *parse_next_word(char *ptr);
char *parse_argument(char *ptr);
#ifdef ENABLE_COLOR
int color_to_int(const char *colorname, bool *bright);
char *parse_next_regex(char *ptr);
bool nregcomp(regex_t *preg, const char *regex, int eflags);
void parse_syntax(char *ptr);
void parse_colors(char *ptr, bool icase);
#endif /* ENABLE_COLOR */
void parse_rcfile(FILE *rcstream);
void do_rcfile(void);
#endif /* ENABLE_NANORC */
/* Public functions in search.c. */
#ifdef HAVE_REGEX_H
int regexp_init(const char *regexp);
void regexp_cleanup(void);
#endif
void not_found_msg(const char *str);
void search_abort(void);
void search_init_globals(void);
int search_init(bool replacing, bool use_answer);
bool is_whole_word(size_t pos, const char *buf, const char *word);
bool findnextstr(bool can_display_wrap, bool wholeword, bool
no_sameline, const filestruct *begin, size_t beginx, const char
*needle, size_t *needle_len);
void findnextstr_wrap_reset(void);
void do_search(void);
#ifndef NANO_SMALL
void do_research(void);
#endif
void replace_abort(void);
#ifdef HAVE_REGEX_H
int replace_regexp(char *string, bool create);
#endif
char *replace_line(const char *needle);
ssize_t do_replace_loop(const char *needle, const filestruct
*real_current, size_t *real_current_x, bool wholewords, bool
*canceled);
void do_replace(void);
void do_gotolinecolumn(ssize_t line, ssize_t column, bool use_answer,
bool interactive, bool save_pos);
void do_gotolinecolumn_void(void);
#if defined(ENABLE_MULTIBUFFER) || !defined(DISABLE_SPELLER)
void do_gotopos(ssize_t line, size_t pos_x, ssize_t pos_y, size_t
pos_pww);
#endif
#ifndef NANO_SMALL
#ifdef HAVE_REGEX_H
void do_find_bracket(void);
#endif
#ifdef ENABLE_NANORC
bool history_has_changed(void);
#endif
void history_init(void);
filestruct *find_history(filestruct *h_start, filestruct *h_end, const
char *s, size_t len);
void update_history(filestruct **h, const char *s);
char *get_history_older(filestruct **h);
char *get_history_newer(filestruct **h);
#ifndef DISABLE_TABCOMP
char *get_history_completion(filestruct **h, char *s, size_t len);
#endif
#endif /* !NANO_SMALL */
/* Public functions in utils.c. */
#ifdef HAVE_REGEX_H
#ifdef BROKEN_REGEXEC
int safe_regexec(const regex_t *preg, const char *string, size_t nmatch,
regmatch_t pmatch[], int eflags);
#endif
int regexp_bol_or_eol(const regex_t *preg, const char *string);
#endif
int digits(size_t n);
void get_homedir(void);
bool parse_num(const char *str, ssize_t *val);
bool parse_line_column(const char *str, ssize_t *line, ssize_t *column);
void align(char **str);
void null_at(char **data, size_t index);
void unsunder(char *str, size_t true_len);
void sunder(char *str);
#if !defined(NANO_SMALL) && defined(ENABLE_NANORC)
#ifndef HAVE_GETLINE
ssize_t ngetline(char **lineptr, size_t *n, FILE *stream);
#endif
#ifndef HAVE_GETDELIM
ssize_t ngetdelim(char **lineptr, size_t *n, int delim, FILE *stream);
#endif
#endif /* !NANO_SMALL && ENABLE_NANORC */
const char *strstrwrapper(const char *haystack, const char *needle,
const char *start);
void nperror(const char *s);
void *nmalloc(size_t howmuch);
void *nrealloc(void *ptr, size_t howmuch);
char *mallocstrncpy(char *dest, const char *src, size_t n);
char *mallocstrcpy(char *dest, const char *src);
char *mallocstrassn(char *dest, char *src);
void new_magicline(void);
#ifndef NANO_SMALL
void remove_magicline(void);
void mark_order(const filestruct **top, size_t *top_x, const filestruct
**bot, size_t *bot_x, bool *right_side_up);
#endif
void get_totals(const filestruct *begin, const filestruct *end, size_t
*lines, size_t *size);
/* Public functions in winio.c. */
#ifndef NANO_SMALL
void reset_kbinput(void);
#endif
void get_buffer(WINDOW *win);
size_t get_buffer_len(void);
void unget_input(int *input, size_t input_len);
void unget_kbinput(int kbinput, bool meta_key, bool func_key);
int *get_input(WINDOW *win, size_t input_len);
int get_kbinput(WINDOW *win, bool *meta_key, bool *func_key);
int parse_kbinput(WINDOW *win, bool *meta_key, bool *func_key
#ifndef NANO_SMALL
, bool reset
#endif
);
int get_escape_seq_kbinput(const int *seq, size_t seq_len, bool
*ignore_seq);
int get_escape_seq_abcd(int kbinput);
int get_byte_kbinput(int kbinput
#ifndef NANO_SMALL
, bool reset
#endif
);
int get_word_kbinput(int kbinput
#ifndef NANO_SMALL
, bool reset
#endif
);
int get_control_kbinput(int kbinput);
void unparse_kbinput(char *output, size_t output_len);
int *get_verbatim_kbinput(WINDOW *win, size_t *kbinput_len);
int *parse_verbatim_kbinput(WINDOW *win, size_t *kbinput_len);
#ifndef DISABLE_MOUSE
bool get_mouseinput(int *mouse_x, int *mouse_y, bool allow_shortcuts);
#endif
const shortcut *get_shortcut(const shortcut *s_list, int *kbinput, bool
*meta_key, bool *func_key);
#ifndef NANO_SMALL
const toggle *get_toggle(int kbinput, bool meta_key);
#endif
int do_statusbar_input(bool *meta_key, bool *func_key, bool *s_or_t,
bool *ran_func, bool *finished, bool allow_funcs);
#ifndef DISABLE_MOUSE
bool do_statusbar_mouse(void);
#endif
void do_statusbar_home(void);
void do_statusbar_end(void);
void do_statusbar_right(void);
void do_statusbar_left(void);
void do_statusbar_backspace(void);
void do_statusbar_delete(void);
void do_statusbar_cut_text(void);
#ifndef NANO_SMALL
bool do_statusbar_next_word(bool allow_punct);
bool do_statusbar_prev_word(bool allow_punct);
#endif
void do_statusbar_verbatim_input(bool *got_enter);
void do_statusbar_output(char *output, size_t output_len, bool
*got_enter, bool allow_cntrls);
size_t xplustabs(void);
size_t actual_x(const char *str, size_t xplus);
size_t strnlenpt(const char *buf, size_t size);
size_t strlenpt(const char *buf);
void blank_titlebar(void);
void blank_topbar(void);
void blank_edit(void);
void blank_statusbar(void);
void blank_bottombars(void);
void check_statusblank(void);
char *display_string(const char *buf, size_t start_col, size_t len, bool
dollars);
void nanoget_repaint(const char *buf, const char *inputbuf, size_t x);
int nanogetstr(bool allow_tabs, const char *buf, const char *curranswer,
#ifndef NANO_SMALL
filestruct **history_list,
#endif
const shortcut *s
#ifndef DISABLE_TABCOMP
, bool *list
#endif
);
int statusq(bool allow_tabs, const shortcut *s, const char *curranswer,
#ifndef NANO_SMALL
filestruct **history_list,
#endif
const char *msg, ...);
void statusq_abort(void);
void titlebar(const char *path);
void set_modified(void);
void statusbar(const char *msg, ...);
void bottombars(const shortcut *s);
void onekey(const char *keystroke, const char *desc, size_t len);
size_t get_page_start(size_t column);
void reset_cursor(void);
void edit_add(const filestruct *fileptr, const char *converted, int
yval, size_t start);
void update_line(const filestruct *fileptr, size_t index);
int need_horizontal_update(size_t old_pww);
int need_vertical_update(size_t old_pww);
void edit_scroll(updown direction, int nlines);
void edit_redraw(const filestruct *old_current, size_t old_pww);
void edit_refresh(void);
void edit_update(topmidnone location);
int do_yesno(bool all, const char *msg);
void total_redraw(void);
void total_refresh(void);
void display_main_list(void);
void do_cursorpos(bool constant);
void do_cursorpos_void(void);
#ifndef DISABLE_HELP
size_t help_line_len(const char *ptr);
void do_help(void);
#endif
void do_replace_highlight(bool highlight, const char *word);
#ifndef NDEBUG
int check_linenumbers(const filestruct *fileptr);
#endif
#ifdef DEBUG
void dump_buffer(const filestruct *inptr);
void dump_buffer_reverse(void);
#endif
#ifdef NANO_EXTRA
void do_credits(void);
#endif
#endif /* !PROTO_H */

747
src/rcfile.c Normal file
View File

@@ -0,0 +1,747 @@
/* $Id$ */
/**************************************************************************
* rcfile.c *
* *
* Copyright (C) 1999-2005 Chris Allegretta *
* 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) *
* any later version. *
* *
* This program is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301, USA. *
* *
**************************************************************************/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include <ctype.h>
#include <assert.h>
#include "proto.h"
#ifdef ENABLE_NANORC
const static rcoption rcopts[] = {
#ifndef DISABLE_JUSTIFY
{"brackets", 0},
#endif
{"const", CONST_UPDATE},
#ifndef DISABLE_WRAPJUSTIFY
{"fill", 0},
#endif
#ifndef DISABLE_MOUSE
{"mouse", USE_MOUSE},
#endif
#ifdef ENABLE_MULTIBUFFER
{"multibuffer", MULTIBUFFER},
#endif
{"morespace", MORE_SPACE},
{"nofollow", NOFOLLOW_SYMLINKS},
{"nohelp", NO_HELP},
#ifndef DISABLE_WRAPPING
{"nowrap", NO_WRAP},
#endif
#ifndef DISABLE_OPERATINGDIR
{"operatingdir", 0},
#endif
{"preserve", PRESERVE},
#ifndef DISABLE_JUSTIFY
{"punct", 0},
{"quotestr", 0},
#endif
{"rebinddelete", REBIND_DELETE},
#ifdef HAVE_REGEX_H
{"regexp", USE_REGEXP},
#endif
#ifndef DISABLE_SPELLER
{"speller", 0},
#endif
{"suspend", SUSPEND},
{"tabsize", 0},
{"tempfile", TEMP_FILE},
{"view", VIEW_MODE},
#ifndef NANO_SMALL
{"autoindent", AUTOINDENT},
{"backup", BACKUP_FILE},
{"backupdir", 0},
{"backwards", BACKWARDS_SEARCH},
{"casesensitive", CASE_SENSITIVE},
{"cut", CUT_TO_END},
{"historylog", HISTORYLOG},
{"noconvert", NO_CONVERT},
{"quickblank", QUICK_BLANK},
{"smarthome", SMART_HOME},
{"smooth", SMOOTH_SCROLL},
{"tabstospaces", TABS_TO_SPACES},
{"whitespace", 0},
#endif
{NULL, 0}
};
static bool errors = FALSE;
static size_t lineno = 0;
static char *nanorc = NULL;
#ifdef ENABLE_COLOR
static syntaxtype *endsyntax = NULL;
/* The end of the list of syntaxes. */
static colortype *endcolor = NULL;
/* The end of the color list for the current syntax. */
#endif
/* We have an error in some part of the rcfile. Put it on stderr and
* make the user hit Return to continue starting up nano. */
void rcfile_error(const char *msg, ...)
{
va_list ap;
fprintf(stderr, "\n");
if (lineno > 0) {
errors = TRUE;
fprintf(stderr, _("Error in %s on line %lu: "), nanorc,
(unsigned long)lineno);
}
va_start(ap, msg);
vfprintf(stderr, _(msg), ap);
va_end(ap);
fprintf(stderr, "\n");
}
/* Parse the next word from the string. Return points to '\0' if we hit
* the end of the line. */
char *parse_next_word(char *ptr)
{
while (!isblank(*ptr) && *ptr != '\0')
ptr++;
if (*ptr == '\0')
return ptr;
/* Null-terminate and advance ptr. */
*ptr++ = '\0';
while (isblank(*ptr))
ptr++;
return ptr;
}
/* The keywords operatingdir, backupdir, fill, tabsize, speller, punct,
* brackets, quotestr, and whitespace take an argument when set. Among
* these, operatingdir, backupdir, speller, punct, brackets, quotestr,
* and whitespace have to allow tabs and spaces in the argument. Thus,
* if the next word starts with a ", we say it ends with the last " of
* the line. Otherwise, the word is interpreted as usual. That is so
* the arguments can contain "s too. */
char *parse_argument(char *ptr)
{
const char *ptr_bak = ptr;
char *last_quote = NULL;
assert(ptr != NULL);
if (*ptr != '"')
return parse_next_word(ptr);
do {
ptr++;
if (*ptr == '"')
last_quote = ptr;
} while (*ptr != '\0');
if (last_quote == NULL) {
if (*ptr == '\0')
ptr = NULL;
else
*ptr++ = '\0';
rcfile_error(N_("Argument %s has unterminated \""), ptr_bak);
} else {
*last_quote = '\0';
ptr = last_quote + 1;
}
if (ptr != NULL)
while (isblank(*ptr))
ptr++;
return ptr;
}
#ifdef ENABLE_COLOR
int color_to_int(const char *colorname, bool *bright)
{
int mcolor = -1;
assert(colorname != NULL && bright != NULL);
if (strncasecmp(colorname, "bright", 6) == 0) {
*bright = TRUE;
colorname += 6;
}
if (strcasecmp(colorname, "green") == 0)
mcolor = COLOR_GREEN;
else if (strcasecmp(colorname, "red") == 0)
mcolor = COLOR_RED;
else if (strcasecmp(colorname, "blue") == 0)
mcolor = COLOR_BLUE;
else if (strcasecmp(colorname, "white") == 0)
mcolor = COLOR_WHITE;
else if (strcasecmp(colorname, "yellow") == 0)
mcolor = COLOR_YELLOW;
else if (strcasecmp(colorname, "cyan") == 0)
mcolor = COLOR_CYAN;
else if (strcasecmp(colorname, "magenta") == 0)
mcolor = COLOR_MAGENTA;
else if (strcasecmp(colorname, "black") == 0)
mcolor = COLOR_BLACK;
else
rcfile_error(N_("Color %s not understood.\n"
"Valid colors are \"green\", \"red\", \"blue\",\n"
"\"white\", \"yellow\", \"cyan\", \"magenta\" and\n"
"\"black\", with the optional prefix \"bright\"\n"
"for foreground colors."), colorname);
return mcolor;
}
char *parse_next_regex(char *ptr)
{
assert(ptr != NULL);
/* Continue until the end of the line, or a " followed by a space, a
* blank character, or \0. */
while ((*ptr != '"' || (!isblank(*(ptr + 1)) &&
*(ptr + 1) != '\0')) && *ptr != '\0')
ptr++;
assert(*ptr == '"' || *ptr == '\0');
if (*ptr == '\0') {
rcfile_error(
N_("Regex strings must begin and end with a \" character"));
return NULL;
}
/* Null terminate and advance ptr. */
*ptr++ = '\0';
while (isblank(*ptr))
ptr++;
return ptr;
}
/* Compile the regular expression regex to preg. Return FALSE on
* success, or TRUE if the expression is invalid. */
bool nregcomp(regex_t *preg, const char *regex, int eflags)
{
int rc = regcomp(preg, regex, REG_EXTENDED | eflags);
if (rc != 0) {
size_t len = regerror(rc, preg, NULL, 0);
char *str = charalloc(len);
regerror(rc, preg, str, len);
rcfile_error(N_("Bad regex \"%s\": %s"), regex, str);
free(str);
}
return (rc != 0);
}
void parse_syntax(char *ptr)
{
const char *fileregptr = NULL, *nameptr = NULL;
exttype *endext = NULL;
/* The end of the extensions list for this syntax. */
assert(ptr != NULL);
if (*ptr == '\0') {
rcfile_error(N_("Missing syntax name"));
return;
}
if (*ptr != '"') {
rcfile_error(
N_("Regex strings must begin and end with a \" character"));
return;
}
ptr++;
nameptr = ptr;
ptr = parse_next_regex(ptr);
if (ptr == NULL)
return;
if (syntaxes == NULL) {
syntaxes = (syntaxtype *)nmalloc(sizeof(syntaxtype));
endsyntax = syntaxes;
} else {
endsyntax->next = (syntaxtype *)nmalloc(sizeof(syntaxtype));
endsyntax = endsyntax->next;
#ifdef DEBUG
fprintf(stderr, "Adding new syntax after first one\n");
#endif
}
endsyntax->desc = mallocstrcpy(NULL, nameptr);
endsyntax->color = NULL;
endcolor = NULL;
endsyntax->extensions = NULL;
endsyntax->next = NULL;
#ifdef DEBUG
fprintf(stderr, "Starting a new syntax type: \"%s\"\n", nameptr);
#endif
/* Now load the extensions into their part of the struct. */
while (*ptr != '\0') {
exttype *newext;
/* The new extension structure. */
while (*ptr != '"' && *ptr != '\0')
ptr++;
if (*ptr == '\0')
return;
ptr++;
fileregptr = ptr;
ptr = parse_next_regex(ptr);
if (ptr == NULL)
break;
newext = (exttype *)nmalloc(sizeof(exttype));
if (nregcomp(&newext->val, fileregptr, REG_NOSUB))
free(newext);
else {
if (endext == NULL)
endsyntax->extensions = newext;
else
endext->next = newext;
endext = newext;
endext->next = NULL;
}
}
}
/* Parse the color stuff into the colorstrings array. If icase is TRUE,
* treat the color stuff as case insensitive. */
void parse_colors(char *ptr, bool icase)
{
int fg, bg;
bool bright = FALSE, no_fgcolor = FALSE;
char *fgstr;
assert(ptr != NULL);
if (*ptr == '\0') {
rcfile_error(N_("Missing color name"));
return;
}
fgstr = ptr;
ptr = parse_next_word(ptr);
if (strchr(fgstr, ',') != NULL) {
char *bgcolorname;
strtok(fgstr, ",");
bgcolorname = strtok(NULL, ",");
if (bgcolorname == NULL) {
/* If we have a background color without a foreground color,
* parse it properly. */
bgcolorname = fgstr + 1;
no_fgcolor = TRUE;
}
if (strncasecmp(bgcolorname, "bright", 6) == 0) {
rcfile_error(
N_("Background color %s cannot be bright"),
bgcolorname);
return;
}
bg = color_to_int(bgcolorname, &bright);
} else
bg = -1;
if (!no_fgcolor) {
fg = color_to_int(fgstr, &bright);
/* Don't try to parse screwed-up foreground colors. */
if (fg == -1)
return;
} else
fg = -1;
if (syntaxes == NULL) {
rcfile_error(
N_("Cannot add a color directive without a syntax line"));
return;
}
if (*ptr == '\0') {
rcfile_error(N_("Missing regex string"));
return;
}
/* Now for the fun part. Start adding regexes to individual strings
* in the colorstrings array, woo! */
while (ptr != NULL && *ptr != '\0') {
colortype *newcolor;
/* The new color structure. */
bool cancelled = FALSE;
/* The start expression was bad. */
bool expectend = FALSE;
/* Do we expect an end= line? */
if (strncasecmp(ptr, "start=", 6) == 0) {
ptr += 6;
expectend = TRUE;
}
if (*ptr != '"') {
rcfile_error(
N_("Regex strings must begin and end with a \" character"));
ptr = parse_next_regex(ptr);
continue;
}
ptr++;
newcolor = (colortype *)nmalloc(sizeof(colortype));
fgstr = ptr;
ptr = parse_next_regex(ptr);
if (ptr == NULL)
break;
if (nregcomp(&newcolor->start, fgstr, icase ? REG_ICASE : 0)) {
free(newcolor);
cancelled = TRUE;
} else {
newcolor->fg = fg;
newcolor->bg = bg;
newcolor->bright = bright;
newcolor->next = NULL;
newcolor->end = NULL;
if (endcolor == NULL) {
endsyntax->color = newcolor;
#ifdef DEBUG
fprintf(stderr, "Starting a new colorstring for fg %d, bg %d\n", fg, bg);
#endif
} else {
#ifdef DEBUG
fprintf(stderr, "Adding new entry for fg %d, bg %d\n", fg, bg);
#endif
endcolor->next = newcolor;
}
endcolor = newcolor;
}
if (expectend) {
if (ptr == NULL || strncasecmp(ptr, "end=", 4) != 0) {
rcfile_error(
N_("\"start=\" requires a corresponding \"end=\""));
return;
}
ptr += 4;
if (*ptr != '"') {
rcfile_error(
N_("Regex strings must begin and end with a \" character"));
continue;
}
ptr++;
fgstr = ptr;
ptr = parse_next_regex(ptr);
if (ptr == NULL)
break;
/* If the start regex was invalid, skip past the end regex to
* stay in sync. */
if (cancelled)
continue;
newcolor->end = (regex_t *)nmalloc(sizeof(regex_t));
if (nregcomp(newcolor->end, fgstr, icase ? REG_ICASE : 0)) {
free(newcolor->end);
newcolor->end = NULL;
}
}
}
}
#endif /* ENABLE_COLOR */
/* Parse the rcfile, once it has been opened successfully. */
void parse_rcfile(FILE *rcstream)
{
char *buf = NULL;
ssize_t len;
size_t n;
while ((len = getline(&buf, &n, rcstream)) > 0) {
char *ptr, *keyword, *option;
int set = 0, i;
/* Ignore the \n. */
buf[len - 1] = '\0';
lineno++;
ptr = buf;
while (isblank(*ptr))
ptr++;
/* If we have a blank line or a comment, skip to the next
* line. */
if (*ptr == '\0' || *ptr == '#')
continue;
/* Otherwise, skip to the next space. */
keyword = ptr;
ptr = parse_next_word(ptr);
/* Try to parse the keyword. */
if (strcasecmp(keyword, "set") == 0)
set = 1;
else if (strcasecmp(keyword, "unset") == 0)
set = -1;
#ifdef ENABLE_COLOR
else if (strcasecmp(keyword, "syntax") == 0)
parse_syntax(ptr);
else if (strcasecmp(keyword, "color") == 0)
parse_colors(ptr, FALSE);
else if (strcasecmp(keyword, "icolor") == 0)
parse_colors(ptr, TRUE);
#endif /* ENABLE_COLOR */
else
rcfile_error(N_("Command %s not understood"), keyword);
if (set == 0)
continue;
if (*ptr == '\0') {
rcfile_error(N_("Missing flag"));
continue;
}
option = ptr;
ptr = parse_next_word(ptr);
for (i = 0; rcopts[i].name != NULL; i++) {
if (strcasecmp(option, rcopts[i].name) == 0) {
#ifdef DEBUG
fprintf(stderr, "parse_rcfile(): name = \"%s\"\n", rcopts[i].name);
#endif
if (set == 1) {
if (rcopts[i].flag != 0)
/* This option has a flag, so it doesn't take an
* argument. */
SET(rcopts[i].flag);
else {
/* This option doesn't have a flag, so it takes
* an argument. */
if (*ptr == '\0') {
rcfile_error(
N_("Option %s requires an argument"),
rcopts[i].name);
break;
}
option = ptr;
if (*option == '"')
option++;
ptr = parse_argument(ptr);
option = mallocstrcpy(NULL, option);
#ifdef DEBUG
fprintf(stderr, "option = \"%s\"\n", option);
#endif
/* Make sure option is a valid multibyte
* string. */
if (!is_valid_mbstring(option)) {
rcfile_error(
N_("Option is not a valid multibyte string"));
break;
}
#ifndef DISABLE_OPERATINGDIR
if (strcasecmp(rcopts[i].name, "operatingdir") == 0)
operating_dir = option;
else
#endif
#ifndef DISABLE_WRAPJUSTIFY
if (strcasecmp(rcopts[i].name, "fill") == 0) {
if (!parse_num(option, &wrap_at)) {
rcfile_error(
N_("Requested fill size %s invalid"),
option);
wrap_at = -CHARS_FROM_EOL;
} else
free(option);
} else
#endif
#ifndef NANO_SMALL
if (strcasecmp(rcopts[i].name, "whitespace") == 0) {
whitespace = option;
if (mbstrlen(whitespace) != 2 ||
strlenpt(whitespace) != 2) {
rcfile_error(
N_("Two single-column characters required"));
free(whitespace);
whitespace = NULL;
} else {
whitespace_len[0] =
parse_mbchar(whitespace, NULL,
NULL, NULL);
whitespace_len[1] =
parse_mbchar(whitespace +
whitespace_len[0], NULL,
NULL, NULL);
}
} else
#endif
#ifndef DISABLE_JUSTIFY
if (strcasecmp(rcopts[i].name, "punct") == 0) {
punct = option;
if (has_blank_mbchars(punct)) {
rcfile_error(
N_("Non-blank characters required"));
free(punct);
punct = NULL;
}
} else if (strcasecmp(rcopts[i].name,
"brackets") == 0) {
brackets = option;
if (has_blank_mbchars(brackets)) {
rcfile_error(
N_("Non-blank characters required"));
free(brackets);
brackets = NULL;
}
} else if (strcasecmp(rcopts[i].name,
"quotestr") == 0)
quotestr = option;
else
#endif
#ifndef NANO_SMALL
if (strcasecmp(rcopts[i].name,
"backupdir") == 0)
backup_dir = option;
else
#endif
#ifndef DISABLE_SPELLER
if (strcasecmp(rcopts[i].name, "speller") == 0)
alt_speller = option;
else
#endif
if (strcasecmp(rcopts[i].name,
"tabsize") == 0) {
if (!parse_num(option, &tabsize) ||
tabsize <= 0) {
rcfile_error(
N_("Requested tab size %s invalid"),
option);
tabsize = -1;
} else
free(option);
} else
assert(FALSE);
}
#ifdef DEBUG
fprintf(stderr, "flag = %ld\n", rcopts[i].flag);
#endif
} else if (rcopts[i].flag != 0)
UNSET(rcopts[i].flag);
else
rcfile_error(N_("Cannot unset flag %s"),
rcopts[i].name);
break;
}
}
if (rcopts[i].name == NULL)
rcfile_error(N_("Unknown flag %s"), option);
}
free(buf);
fclose(rcstream);
lineno = 0;
if (errors) {
errors = FALSE;
fprintf(stderr,
_("\nPress Return to continue starting nano\n"));
while (getchar() != '\n')
;
}
return;
}
/* The main rc file function, tries to open the rc file */
void do_rcfile(void)
{
FILE *rcstream;
#ifdef SYSCONFDIR
assert(sizeof(SYSCONFDIR) == strlen(SYSCONFDIR) + 1);
nanorc = mallocstrcpy(nanorc, SYSCONFDIR "/nanorc");
/* Try to open the system-wide nanorc. */
rcstream = fopen(nanorc, "r");
if (rcstream != NULL)
parse_rcfile(rcstream);
#endif
#if defined(DISABLE_ROOTWRAP) && !defined(DISABLE_WRAPPING)
/* We've already read SYSCONFDIR/nanorc, if it's there. If we're
* root and --disable-wrapping-as-root is used, turn wrapping
* off now. */
if (geteuid() == NANO_ROOT_UID)
SET(NO_WRAP);
#endif
get_homedir();
if (homedir == NULL)
rcfile_error(N_("I can't find my home directory! Wah!"));
else {
nanorc = charealloc(nanorc, strlen(homedir) + 9);
sprintf(nanorc, "%s/.nanorc", homedir);
rcstream = fopen(nanorc, "r");
if (rcstream == NULL) {
/* Don't complain about the file's not existing. */
if (errno != ENOENT)
rcfile_error(N_("Error reading %s: %s"), nanorc,
strerror(errno));
} else
parse_rcfile(rcstream);
}
free(nanorc);
nanorc = NULL;
#ifdef ENABLE_COLOR
set_colorpairs();
#endif
}
#endif /* ENABLE_NANORC */

1314
src/search.c Normal file

File diff suppressed because it is too large Load Diff

474
src/utils.c Normal file
View File

@@ -0,0 +1,474 @@
/* $Id$ */
/**************************************************************************
* utils.c *
* *
* Copyright (C) 1999-2005 Chris Allegretta *
* 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) *
* any later version. *
* *
* This program is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301, USA. *
* *
**************************************************************************/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include <pwd.h>
#include <ctype.h>
#include <errno.h>
#include <assert.h>
#include "proto.h"
#ifdef HAVE_REGEX_H
#ifdef BROKEN_REGEXEC
/* Work around a potential segfault in glibc 2.2.3's regexec(). */
int safe_regexec(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;
}
#endif
int regexp_bol_or_eol(const regex_t *preg, const char *string)
{
return (regexec(preg, string, 0, NULL, 0) == 0 &&
regexec(preg, string, 0, NULL, REG_NOTBOL | REG_NOTEOL) ==
REG_NOMATCH);
}
#endif /* HAVE_REGEX_H */
int digits(size_t n)
{
int i = 1;
while (n > 10) {
n /= 10;
i++;
}
return i;
}
/* Return the user's home directory. We use $HOME, and if that fails,
* we fall back on getpwuid(). */
void get_homedir(void)
{
if (homedir == NULL) {
const char *homenv = getenv("HOME");
if (homenv == NULL) {
const struct passwd *userage = getpwuid(geteuid());
if (userage != NULL)
homenv = userage->pw_dir;
}
homedir = mallocstrcpy(NULL, homenv);
}
}
/* Read a ssize_t from str, and store it in *val (if val is not NULL).
* On error, we return FALSE and don't change *val. Otherwise, we
* return TRUE. */
bool parse_num(const char *str, ssize_t *val)
{
char *first_error;
ssize_t j;
assert(str != NULL);
j = (ssize_t)strtol(str, &first_error, 10);
if (errno == ERANGE || *str == '\0' || *first_error != '\0')
return FALSE;
if (val != NULL)
*val = j;
return TRUE;
}
/* Read an int and a ssize_t, separated by a comma, from str, and store
* them in *line and *column (if they're not both NULL). On error, we
* return FALSE. Otherwise, we return TRUE. */
bool parse_line_column(const char *str, ssize_t *line, ssize_t *column)
{
bool retval = TRUE;
const char *comma;
assert(str != NULL);
comma = strchr(str, ',');
if (comma != NULL && column != NULL) {
if (!parse_num(str + (comma - str + 1), column))
retval = FALSE;
}
if (line != NULL) {
if (comma != NULL) {
char *str_line = mallocstrncpy(NULL, str, comma - str + 1);
str_line[comma - str] = '\0';
if (str_line[0] != '\0' && !parse_num(str_line, line))
retval = FALSE;
free(str_line);
} else if (!parse_num(str, line))
retval = FALSE;
}
return retval;
}
/* Fix the memory allocation for a string. */
void align(char **str)
{
assert(str != NULL);
if (*str != NULL)
*str = charealloc(*str, strlen(*str) + 1);
}
/* Null a string at a certain index and align it. */
void null_at(char **data, size_t index)
{
assert(data != NULL);
*data = charealloc(*data, index + 1);
(*data)[index] = '\0';
}
/* For non-null-terminated lines. A line, by definition, shouldn't
* normally have newlines in it, so encode its nulls as newlines. */
void unsunder(char *str, size_t true_len)
{
assert(str != NULL);
for (; true_len > 0; true_len--, str++) {
if (*str == '\0')
*str = '\n';
}
}
/* For non-null-terminated lines. A line, by definition, shouldn't
* normally have newlines in it, so decode its newlines into nulls. */
void sunder(char *str)
{
assert(str != NULL);
for (; *str != '\0'; str++) {
if (*str == '\n')
*str = '\0';
}
}
#if !defined(NANO_SMALL) && defined(ENABLE_NANORC)
#ifndef HAVE_GETLINE
/* This function is equivalent to getline(). It was adapted from
* GNU mailutils' getline() function. */
ssize_t ngetline(char **lineptr, size_t *n, FILE *stream)
{
return getdelim(lineptr, n, '\n', stream);
}
#endif
#ifndef HAVE_GETDELIM
/* This function is equivalent to getdelim(). It was adapted from
* GNU mailutils' getdelim() function. */
ssize_t ngetdelim(char **lineptr, size_t *n, int delim, FILE *stream)
{
size_t indx = 0;
int c;
/* Sanity checks. */
if (lineptr == NULL || n == NULL || stream == NULL)
return -1;
/* Allocate the line the first time. */
if (*lineptr == NULL) {
*lineptr = charalloc(MAX_BUF_SIZE);
*n = MAX_BUF_SIZE;
}
while ((c = getc(stream)) != EOF) {
/* Check if more memory is needed. */
if (indx >= *n) {
*lineptr = charealloc(*lineptr, *n + MAX_BUF_SIZE);
*n += MAX_BUF_SIZE;
}
/* Push the result in the line. */
(*lineptr)[indx++] = (char)c;
/* Bail out. */
if (c == delim)
break;
}
/* Make room for the null character. */
if (indx >= *n) {
*lineptr = charealloc(*lineptr, *n + MAX_BUF_SIZE);
*n += MAX_BUF_SIZE;
}
/* Null terminate the buffer. */
null_at(lineptr, indx++);
*n = indx;
/* The last line may not have the delimiter, we have to return what
* we got and the error will be seen on the next iteration. */
return (c == EOF && (indx - 1) == 0) ? -1 : indx - 1;
}
#endif
#endif /* !NANO_SMALL && ENABLE_NANORC */
/* If we are searching backwards, we will find the last match that
* starts no later than start. Otherwise we find the first match
* starting no earlier than start. If we are doing a regexp search, we
* fill in the global variable regmatches with at most 9 subexpression
* matches. Also, all .rm_so elements are relative to the start of the
* whole match, so regmatches[0].rm_so == 0. */
const char *strstrwrapper(const char *haystack, const char *needle,
const char *start)
{
/* start can be 1 character before the start or after the end of the
* line. In either case, we just say no match was found. */
if ((start > haystack && *(start - 1) == '\0') || start < haystack)
return NULL;
assert(haystack != NULL && needle != NULL && start != NULL);
#ifdef HAVE_REGEX_H
if (ISSET(USE_REGEXP)) {
#ifndef NANO_SMALL
if (ISSET(BACKWARDS_SEARCH)) {
if (regexec(&search_regexp, haystack, 1, regmatches,
0) == 0 && haystack + regmatches[0].rm_so <= start) {
const char *retval = haystack + regmatches[0].rm_so;
/* Search forward until there are no more matches. */
while (regexec(&search_regexp, retval + 1, 1,
regmatches, REG_NOTBOL) == 0 &&
retval + regmatches[0].rm_so + 1 <= start)
retval += regmatches[0].rm_so + 1;
/* Finally, put the subexpression matches in global
* variable regmatches. The REG_NOTBOL flag doesn't
* matter now. */
regexec(&search_regexp, retval, 10, regmatches, 0);
return retval;
}
} else
#endif /* !NANO_SMALL */
if (regexec(&search_regexp, start, 10, regmatches,
(start > haystack) ? REG_NOTBOL : 0) == 0) {
const char *retval = start + regmatches[0].rm_so;
regexec(&search_regexp, retval, 10, regmatches, 0);
return retval;
}
return NULL;
}
#endif /* HAVE_REGEX_H */
#if !defined(NANO_SMALL) || !defined(DISABLE_SPELLER)
if (ISSET(CASE_SENSITIVE)) {
#ifndef NANO_SMALL
if (ISSET(BACKWARDS_SEARCH))
return revstrstr(haystack, needle, start);
else
#endif
return strstr(start, needle);
}
#endif /* !DISABLE_SPELLER || !NANO_SMALL */
#ifndef NANO_SMALL
else if (ISSET(BACKWARDS_SEARCH))
return mbrevstrcasestr(haystack, needle, start);
#endif
return mbstrcasestr(start, needle);
}
/* This is a wrapper for the perror() function. The wrapper takes care
* of curses, calls perror() (which writes to stderr), and then
* refreshes the screen. Note that nperror() causes the window to
* flicker once. */
void nperror(const char *s)
{
/* Leave curses mode and go to the terminal. */
if (endwin() != ERR) {
perror(s); /* Print the error. */
total_refresh(); /* Return to curses and refresh. */
}
}
/* Thanks, BG, many people have been asking for this... */
void *nmalloc(size_t howmuch)
{
void *r = malloc(howmuch);
if (r == NULL && howmuch != 0)
die(_("nano is out of memory!"));
return r;
}
void *nrealloc(void *ptr, size_t howmuch)
{
void *r = realloc(ptr, howmuch);
if (r == NULL && howmuch != 0)
die(_("nano is out of memory!"));
return r;
}
/* Copy the first n characters of one malloc()ed string to another
* pointer. Should be used as: "dest = mallocstrncpy(dest, src,
* n);". */
char *mallocstrncpy(char *dest, const char *src, size_t n)
{
if (src == NULL)
src = "";
if (src != dest)
free(dest);
dest = charalloc(n);
strncpy(dest, src, n);
return dest;
}
/* Copy one malloc()ed string to another pointer. Should be used as:
* "dest = mallocstrcpy(dest, src);". */
char *mallocstrcpy(char *dest, const char *src)
{
return mallocstrncpy(dest, src, (src == NULL) ? 1 :
strlen(src) + 1);
}
/* Free the malloc()ed string at dest and return the malloc()ed string
* at src. Should be used as: "answer = mallocstrassn(answer,
* real_dir_from_tilde(answer));". */
char *mallocstrassn(char *dest, char *src)
{
free(dest);
return src;
}
/* Append a new magicline to filebot. */
void new_magicline(void)
{
filebot->next = (filestruct *)nmalloc(sizeof(filestruct));
filebot->next->data = mallocstrcpy(NULL, "");
filebot->next->prev = filebot;
filebot->next->next = NULL;
filebot->next->lineno = filebot->lineno + 1;
filebot = filebot->next;
totlines++;
totsize++;
}
#ifndef NANO_SMALL
/* Remove the magicline from filebot, if there is one and it isn't the
* only line in the file. */
void remove_magicline(void)
{
if (filebot->data[0] == '\0' && filebot->prev != NULL) {
filebot = filebot->prev;
free_filestruct(filebot->next);
filebot->next = NULL;
totlines--;
totsize--;
}
}
/* Set top_x and bot_x to the top and bottom x-coordinates of the mark,
* respectively, based on the locations of top and bot. If
* right_side_up isn't NULL, set it to TRUE If the mark begins with
* (mark_beginbuf, mark_beginx) and ends with (current, current_x), or
* FALSE otherwise. */
void mark_order(const filestruct **top, size_t *top_x, const filestruct
**bot, size_t *bot_x, bool *right_side_up)
{
assert(top != NULL && top_x != NULL && bot != NULL && bot_x != NULL);
if ((current->lineno == mark_beginbuf->lineno && current_x >
mark_beginx) || current->lineno > mark_beginbuf->lineno) {
*top = mark_beginbuf;
*top_x = mark_beginx;
*bot = current;
*bot_x = current_x;
if (right_side_up != NULL)
*right_side_up = TRUE;
} else {
*bot = mark_beginbuf;
*bot_x = mark_beginx;
*top = current;
*top_x = current_x;
if (right_side_up != NULL)
*right_side_up = FALSE;
}
}
#endif
/* Calculate the number of lines and the number of characters between
* begin and end, and return them in lines and size, respectively. */
void get_totals(const filestruct *begin, const filestruct *end, size_t
*lines, size_t *size)
{
const filestruct *f;
if (lines != NULL)
*lines = 0;
if (size != NULL)
*size = 0;
/* Go through the lines from begin to end->prev, if we can. */
for (f = begin; f != NULL && f != end; f = f->next) {
/* Count this line. */
if (lines != NULL)
(*lines)++;
/* Count the number of characters on this line. */
if (size != NULL) {
*size += mbstrlen(f->data);
/* Count the newline if we have one. */
if (f->next != NULL)
(*size)++;
}
}
/* Go through the line at end, if we can. */
if (f != NULL) {
/* Count this line. */
if (lines != NULL)
(*lines)++;
/* Count the number of characters on this line. */
if (size != NULL) {
*size += mbstrlen(f->data);
/* Count the newline if we have one. */
if (f->next != NULL)
(*size)++;
}
}
}

4197
src/winio.c Normal file

File diff suppressed because it is too large Load Diff

373
utils.c
View File

@@ -1,373 +0,0 @@
/* $Id$ */
/**************************************************************************
* utils.c *
* *
* Copyright (C) 1999-2003 Chris Allegretta *
* 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) *
* any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
* *
**************************************************************************/
#include "config.h"
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
#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) ||
(127 <= c && c < 160);
}
int num_of_digits(int n)
{
int i = 1;
if (n < 0)
n = -n;
while (n > 10) {
n /= 10;
i++;
}
return i;
}
/* Fix the memory allocation for a string. */
void align(char **strp)
{
if (strp != NULL)
*strp = nrealloc(*strp, strlen(*strp) + 1);
}
/* Null a string at a certain index and align it. */
void null_at(char **data, size_t index)
{
assert(data != NULL);
*data = charealloc(*data, index + 1);
(*data)[index] = '\0';
}
/* For non-null-terminated lines. A line, by definition, shouldn't
* normally have newlines in it, so encode its nulls as newlines. */
void unsunder(char *str, size_t true_len)
{
assert(str != NULL);
for(; true_len > 0; true_len--, str++)
if (*str == '\0')
*str = '\n';
}
/* For non-null-terminated lines. A line, by definition, shouldn't
* normally have newlines in it, so decode its newlines into nulls. */
void sunder(char *str)
{
assert(str != NULL);
for(; *str != '\0'; str++)
if (*str == '\n')
*str = '\0';
}
/* None of this is needed if we're using NANO_SMALL! */
#ifndef NANO_SMALL
const char *revstrstr(const char *haystack, const char *needle,
const char *rev_start)
{
for(; rev_start >= haystack ; rev_start--) {
const char *r, *q;
for (r = rev_start, q = needle ; *q == *r && *q != '\0'; r++, q++)
;
if (*q == '\0')
return rev_start;
}
return NULL;
}
const char *revstristr(const char *haystack, const char *needle,
const char *rev_start)
{
for (; rev_start >= haystack; rev_start--) {
const char *r = rev_start, *q = needle;
for (; (tolower(*q) == tolower(*r)) && (*q != '\0') ; r++, q++)
;
if (*q == '\0')
return rev_start;
}
return NULL;
}
#endif /* !NANO_SMALL */
/* This is now mutt's version (called mutt_stristr) because it doesn't
* use memory allocation to do a simple search (yuck). */
const char *stristr(const char *haystack, const char *needle)
{
const char *p, *q;
if (haystack == NULL)
return NULL;
if (needle == NULL)
return haystack;
while (*(p = haystack) != '\0') {
for (q = needle; *p != 0 && *q != 0 && tolower(*p) == tolower(*q); p++, q++)
;
if (*q == 0)
return haystack;
haystack++;
}
return NULL;
}
/* If we are searching backwards, we will find the last match
* that starts no later than rev_start. If we are doing a regexp search,
* then line_pos should be 0 if haystack starts at the beginning of a
* line, and positive otherwise. In the regexp case, we fill in the
* global variable regmatches with at most 9 subexpression matches. Also,
* all .rm_so elements are relative to the start of the whole match, so
* regmatches[0].rm_so == 0. */
const char *strstrwrapper(const char *haystack, const char *needle,
const char *rev_start, int line_pos)
{
#ifdef HAVE_REGEX_H
if (ISSET(USE_REGEXP)) {
#ifndef NANO_SMALL
if (ISSET(REVERSE_SEARCH)) {
/* When doing a backwards search, haystack is a whole line. */
if (!regexec(&search_regexp, haystack, 1, regmatches, 0) &&
haystack + regmatches[0].rm_so <= rev_start) {
const char *retval = haystack + regmatches[0].rm_so;
/* Search forward until there is no more match. */
while (!regexec(&search_regexp, retval + 1, 1, regmatches,
REG_NOTBOL) &&
retval + 1 + regmatches[0].rm_so <= rev_start)
retval += 1 + regmatches[0].rm_so;
/* Finally, put the subexpression matches in global
* variable regmatches. The REG_NOTBOL flag doesn't
* matter now. */
regexec(&search_regexp, retval, 10, regmatches, 0);
return retval;
}
} else
#endif /* !NANO_SMALL */
if (!regexec(&search_regexp, haystack, 10, regmatches,
line_pos > 0 ? REG_NOTBOL : 0)) {
const char *retval = haystack + regmatches[0].rm_so;
regexec(&search_regexp, retval, 10, regmatches, 0);
return retval;
}
return NULL;
}
#endif /* HAVE_REGEX_H */
#ifndef NANO_SMALL
if (ISSET(CASE_SENSITIVE)) {
if (ISSET(REVERSE_SEARCH))
return revstrstr(haystack, needle, rev_start);
else
return strstr(haystack, needle);
} else if (ISSET(REVERSE_SEARCH))
return revstristr(haystack, needle, rev_start);
#endif
return stristr(haystack, needle);
}
/* This is a wrapper for the perror function. The wrapper takes care of
* ncurses, calls perror (which writes to STDERR), then refreshes the
* screen. Note that nperror causes the window to flicker once. */
void nperror(const char *s)
{
/* leave ncurses mode, go to the terminal */
if (endwin() != ERR) {
perror(s); /* print the error */
total_refresh(); /* return to ncurses and repaint */
}
}
/* Thanks BG, many ppl have been asking for this... */
void *nmalloc(size_t howmuch)
{
void *r = malloc(howmuch);
if (r == NULL && howmuch != 0)
die(_("nano is out of memory!"));
return r;
}
void *nrealloc(void *ptr, size_t howmuch)
{
void *r = realloc(ptr, howmuch);
if (r == NULL && howmuch != 0)
die(_("nano is out of memory!"));
return r;
}
/* Copy one malloc()ed string to another pointer. Should be used as:
* dest = mallocstrcpy(dest, src); */
char *mallocstrcpy(char *dest, const char *src)
{
if (src == dest)
return dest;
if (dest != NULL)
free(dest);
if (src == NULL)
return NULL;
dest = charalloc(strlen(src) + 1);
strcpy(dest, src);
return dest;
}
/* Append a new magic-line to filebot. */
void new_magicline(void)
{
filebot->next = nmalloc(sizeof(filestruct));
filebot->next->data = charalloc(1);
filebot->next->data[0] = '\0';
filebot->next->prev = filebot;
filebot->next->next = NULL;
filebot->next->lineno = filebot->lineno + 1;
filebot = filebot->next;
totlines++;
totsize++;
}
#ifndef DISABLE_TABCOMP
/*
* Routine to see if a text string is matched by a wildcard pattern.
* Returns TRUE if the text is matched, or FALSE if it is not matched
* or if the pattern is invalid.
* * matches zero or more characters
* ? matches a single character
* [abc] matches 'a', 'b' or 'c'
* \c quotes character c
* Adapted from code written by Ingo Wilken, and
* then taken from sash, Copyright (c) 1999 by David I. Bell
* Permission is granted to use, distribute, or modify this source,
* provided that this copyright notice remains intact.
* Permission to distribute this code under the GPL has been granted.
*/
int check_wildcard_match(const char *text, const char *pattern)
{
const char *retrypat;
const char *retrytext;
int ch;
int found;
int len;
retrypat = NULL;
retrytext = NULL;
while (*text != '\0' || *pattern != '\0') {
ch = *pattern++;
switch (ch) {
case '*':
retrypat = pattern;
retrytext = text;
break;
case '[':
found = FALSE;
while ((ch = *pattern++) != ']') {
if (ch == '\\')
ch = *pattern++;
if (ch == '\0')
return FALSE;
if (*text == ch)
found = TRUE;
}
len = strlen(text);
if (found == FALSE && len != 0) {
return FALSE;
}
if (found == TRUE) {
if (strlen(pattern) == 0 && len == 1) {
return TRUE;
}
if (len != 0) {
text++;
continue;
}
}
/* fall into next case */
case '?':
if (*text++ == '\0')
return FALSE;
break;
case '\\':
ch = *pattern++;
if (ch == '\0')
return FALSE;
/* fall into next case */
default:
if (*text == ch) {
if (*text != '\0')
text++;
break;
}
if (*text != '\0') {
pattern = retrypat;
text = ++retrytext;
break;
}
return FALSE;
}
if (pattern == NULL)
return FALSE;
}
return TRUE;
}
#endif

1846
winio.c

File diff suppressed because it is too large Load Diff