Compare commits

...

116 Commits

Author SHA1 Message Date
David Lawrence Ramsey
518b7fac9d GNU nano 2.0.2
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4005 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-21 02:47:14 +00:00
David Lawrence Ramsey
0c426782c4 still more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4004 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-15 05:03:08 +00:00
David Lawrence Ramsey
2aca11e800 more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4003 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-15 04:53:47 +00:00
David Lawrence Ramsey
4078d60d69 fix breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4002 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-15 04:50:57 +00:00
David Lawrence Ramsey
46104dcc8e still more miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4001 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-15 02:54:08 +00:00
David Lawrence Ramsey
26b3ead8d2 revert erroneous change
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4000 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-15 02:49:44 +00:00
David Lawrence Ramsey
ad64cd97b8 more miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3999 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-14 22:11:44 +00:00
David Lawrence Ramsey
8060d66158 miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3998 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-14 21:57:03 +00:00
David Lawrence Ramsey
4c19415ecf in do_writeout(), fix a segfault when we can't get the full path of
either the filename we want to save under or the original filename


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3997 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-14 20:03:30 +00:00
David Lawrence Ramsey
b513778b56 in update_history(), fix minor memory leak
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3996 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-13 00:27:45 +00:00
David Lawrence Ramsey
6642e88561 fix changelog entry
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3995 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-12 20:13:13 +00:00
David Lawrence Ramsey
f85a1eb48a fix more problems with strings that contain nulls but shouldn't
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3994 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-11 22:11:32 +00:00
David Lawrence Ramsey
5ab28f2716 update README for the 2.0 branch of nano
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3993 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-11 18:39:35 +00:00
David Lawrence Ramsey
f1982f01d1 still more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3992 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-10 17:57:09 +00:00
David Lawrence Ramsey
e3e3128629 really fixed incorrect "Project-Id-Version" entry
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3991 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-08 03:54:31 +00:00
David Lawrence Ramsey
4b6a00cb72 fixed incorrect "Project-Id-Version" entry
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3990 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-07 03:23:13 +00:00
David Lawrence Ramsey
4ef023478c remove unneeded duplicate plural forms again
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3989 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-07 03:22:46 +00:00
Jordi Mallach
cfeebc6055 Hungarian and Malay translation updates from the TP.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3988 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-06 21:44:16 +00:00
David Lawrence Ramsey
bd5398050a add missing blank lines
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3987 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-02 23:39:16 +00:00
David Lawrence Ramsey
ad36bdc773 per Itay Perl's patch with a few additions of mine, fix various minor
memory leaks


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3986 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-02 17:22:21 +00:00
David Lawrence Ramsey
916c7c26bf in parse_kbinput(), add missing break
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3985 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-12-02 17:17:09 +00:00
David Lawrence Ramsey
b6fb6884ca still more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3984 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 07:28:52 +00:00
David Lawrence Ramsey
3d267dc323 still more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3983 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 07:13:28 +00:00
David Lawrence Ramsey
9a2d0aff00 simplify
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3982 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 06:02:33 +00:00
David Lawrence Ramsey
f7eef5d04c fix breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3981 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 05:49:58 +00:00
David Lawrence Ramsey
9d4b8fb434 still more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3980 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 05:49:32 +00:00
David Lawrence Ramsey
8ad3b78626 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3979 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 05:40:09 +00:00
David Lawrence Ramsey
6ad82142c0 still more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3978 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 05:25:48 +00:00
David Lawrence Ramsey
0e48bc18be fix breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3977 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 05:19:24 +00:00
David Lawrence Ramsey
4fd1ca07a7 more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3976 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 05:09:16 +00:00
David Lawrence Ramsey
8db126b09d in write_file(), properly handle filenames that contain nulls
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3975 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 05:03:54 +00:00
David Lawrence Ramsey
d97649859d in do_insertfile(), properly handle files that contain nulls
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3974 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 04:57:22 +00:00
David Lawrence Ramsey
81371020bb revert erroneous changes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3973 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 04:56:16 +00:00
David Lawrence Ramsey
013613ec40 in do_insertfile(), properly handle executable commands that contain
nulls


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3972 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 04:35:11 +00:00
David Lawrence Ramsey
50d78a6f9a don't allow filenames entered at the "Write File" prompt or the "Insert
File" prompt to contain nulls


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3971 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 02:41:59 +00:00
David Lawrence Ramsey
b6c4dbffdb in do_spell(), when setting i to the return value of
write_(marked_)?file(), use the "?" operator instead of an if/else
clause


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3970 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-25 22:38:17 +00:00
David Lawrence Ramsey
8125e08bfa miscellaneous comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3969 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-25 22:27:22 +00:00
David Lawrence Ramsey
90c5a908ee fix changelog entry
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3968 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-25 21:55:25 +00:00
David Lawrence Ramsey
cfc9fd2780 preemptively update the version number
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3967 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-25 18:28:01 +00:00
David Lawrence Ramsey
173bd2f003 typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3966 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-25 18:27:42 +00:00
David Lawrence Ramsey
d21eea02ac more miscellaneous documentation updates
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3965 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-25 18:26:07 +00:00
David Lawrence Ramsey
1c9dd109bf in edit_draw(), fix potential warnings when assigning -1 to paintlen by
using if/else clauses instead of "?" operators


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3964 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-21 17:05:04 +00:00
David Lawrence Ramsey
5a8182e7df in nano.h, rename NANO_.*ALTKEY to NANO_.*METAKEY, for consistency
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3963 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-21 04:20:53 +00:00
David Lawrence Ramsey
292f7ef414 in nano.h, rename NANO_ALT_.* to NANO_META_.*, for consistency
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3962 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-21 04:15:04 +00:00
David Lawrence Ramsey
b7f6bf794d more miscellaneous cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3961 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-21 04:11:18 +00:00
David Lawrence Ramsey
79f946b682 miscellaneous cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3960 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-21 04:06:13 +00:00
David Lawrence Ramsey
3a2dc3e0a7 remove unneeded blank plural forms, as gettext 0.15 generates errors
upon encountering them


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3959 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-21 03:41:28 +00:00
David Lawrence Ramsey
6b8b3ec105 Back to CVS
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3958 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-20 14:40:40 +00:00
David Lawrence Ramsey
16fd49b854 GNU nano 2.0.1
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3956 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-20 14:38:31 +00:00
David Lawrence Ramsey
f3af804378 preemptively update the version number
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3955 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-20 14:37:44 +00:00
David Lawrence Ramsey
21b946e45d in do_replace_highlight(), include the code to display zero-length
matches even when regex.h isn't found, as it can also be used to display
zero-length Unicode characters


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3954 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-10 20:13:38 +00:00
David Lawrence Ramsey
8269ae3cea more cosmetic copyright notice fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3953 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-10 03:40:41 +00:00
David Lawrence Ramsey
606d5a1e22 more cosmetic copyright notice fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3952 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-10 03:01:16 +00:00
David Lawrence Ramsey
458e850b83 more cosmetic copyright notice fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3951 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-10 02:49:07 +00:00
David Lawrence Ramsey
cb801d63a3 cosmetic copyright notice fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3950 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-10 02:47:11 +00:00
David Lawrence Ramsey
6c6d2bc4db in NEWS, add missing entries for nano 1.0.2 and 1.0.3, since 1.1.0
includes their changes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3949 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-08 18:03:53 +00:00
David Lawrence Ramsey
84d22e3f53 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3948 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-08 13:05:50 +00:00
David Lawrence Ramsey
89eb5a96fb simplify still more
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3947 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-08 13:03:37 +00:00
David Lawrence Ramsey
d23dcc5a25 simplify more
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3946 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-08 02:58:42 +00:00
David Lawrence Ramsey
6f751500cc fix changelog entry
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3945 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-08 02:52:46 +00:00
David Lawrence Ramsey
a93023f14b in get_full_path(), fix problem where only paths would be returned when
both paths and filenames should have been


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3944 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-08 02:48:15 +00:00
David Lawrence Ramsey
b31b128a78 simplify
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3943 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-08 01:02:13 +00:00
David Lawrence Ramsey
b24cb0cd19 in do_writeout(), fix problem where a file could sometimes be
overwritten without a warning prompt


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3942 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-07 22:57:13 +00:00
David Lawrence Ramsey
2bf7e975eb yet more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3941 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-07 22:56:25 +00:00
David Lawrence Ramsey
ba48aa9743 still more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3940 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-07 22:36:44 +00:00
David Lawrence Ramsey
6c3a399817 in get_full_path(), remove unneeded assert
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3939 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-07 21:41:05 +00:00
David Lawrence Ramsey
137694d15b more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3938 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-07 21:32:43 +00:00
David Lawrence Ramsey
8965af5874 in do_writeout(), for consistency, when saving a file with no name,
don't allow overwriting an existing file when in restricted mode


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3937 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-07 21:22:14 +00:00
David Lawrence Ramsey
4967eb8fc0 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3936 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-07 21:08:17 +00:00
David Lawrence Ramsey
366c509304 Back to CVS
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3935 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-06 16:04:17 +00:00
David Lawrence Ramsey
f8df4a0fcb GNU nano 2.0.0
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3933 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-06 16:03:12 +00:00
David Lawrence Ramsey
f0c6e78a6e clean up nano.spec.in some more
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3932 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-05 17:13:44 +00:00
David Lawrence Ramsey
e88bc62258 more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3931 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-05 17:00:41 +00:00
David Lawrence Ramsey
ca74e42a84 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3930 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-05 03:51:28 +00:00
David Lawrence Ramsey
6b9e7cf5be update nano.spec.in for newer RPM-based distributions, adapted from the
nano 1.3.12-1.1.spec file in Fedora Rawhide


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3929 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-05 03:44:41 +00:00
David Lawrence Ramsey
1bb4db6409 add POV-Ray syntax from Donnie Berkholz, with a few tweaks of mine
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3928 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-02 06:21:43 +00:00
David Lawrence Ramsey
e693023de8 fix changelog entry
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3927 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-30 17:08:32 +00:00
David Lawrence Ramsey
e54f1c4eaa more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3926 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-29 21:14:53 +00:00
David Lawrence Ramsey
08cf2528e1 update AUTHORS for the 2.0 branch of nano
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3925 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-28 22:55:08 +00:00
Jordi Mallach
40dcea0e2e Update French manpages by Jean-Philippe Guérard.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3924 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-28 22:03:25 +00:00
David Lawrence Ramsey
cb6ad31a8e fix changelog entry
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3923 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-28 21:57:24 +00:00
David Lawrence Ramsey
057f239b43 update faq.html for the 2.0 branch of nano
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3922 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-28 21:55:22 +00:00
David Lawrence Ramsey
890eab8270 update nano.spec.in for the 2.0 branch of nano
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3921 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-28 21:51:21 +00:00
David Lawrence Ramsey
32612ddcde preemptively update the version number
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3920 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-28 19:32:47 +00:00
David Lawrence Ramsey
3660bc6a46 in nano.1, nanorc.5, and rnano.1, add minor wording fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3919 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-28 19:21:12 +00:00
David Lawrence Ramsey
cca9bdd177 fix the version number
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3918 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-27 05:01:48 +00:00
David Lawrence Ramsey
9f0fccd713 in nano.texi, add minor punctuation fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3917 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-27 03:07:49 +00:00
David Lawrence Ramsey
65ab1c87b7 in nano.texi, add minor wording fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3916 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-27 02:57:35 +00:00
David Lawrence Ramsey
0c0cafbc19 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3915 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-26 15:55:39 +00:00
David Lawrence Ramsey
76520a8ec4 Back to CVS
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3914 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-25 15:28:20 +00:00
David Lawrence Ramsey
1295699d03 GNU nano 1.9.99pre3
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3912 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-25 15:27:08 +00:00
David Lawrence Ramsey
ee8edfc64c preemptively update the version number
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3911 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-25 14:40:49 +00:00
Jordi Mallach
273b9e8d5b French and Norwegian bokmaal updates from the TP.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3910 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-24 22:14:50 +00:00
David Lawrence Ramsey
85f9f0f941 simplify
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3909 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-18 20:27:52 +00:00
David Lawrence Ramsey
385e772e54 fix changelog entry
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3908 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-17 15:28:49 +00:00
David Lawrence Ramsey
ab8c7162d3 in do_cut_text(), when uncutting text in the process of copying it,
always set placewewant, as do_uncut_text() does, so that the current
line is always updated properly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3907 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-16 19:44:13 +00:00
Jordi Mallach
152f57bf9c New Galician update from Fran.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3906 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-16 18:43:03 +00:00
Jordi Mallach
8ee8915c49 Updated Galician translation from Fran.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3905 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-16 09:36:06 +00:00
Jordi Mallach
a447a2d810 Updated Basque from the TP.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3904 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-15 22:49:48 +00:00
David Lawrence Ramsey
22066a2cad fix changelog entry
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3903 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-14 16:04:44 +00:00
David Lawrence Ramsey
c603fefbf6 import the latest version of ac_define_dir.m4
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3902 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-14 01:13:13 +00:00
David Lawrence Ramsey
b5652a4d56 fix breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3901 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-13 16:35:57 +00:00
David Lawrence Ramsey
98bca94758 in input_tab(), if the tab-completed path is a directory, make sure
enough space is allocated before tacking a slash onto the end of it


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3900 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-13 16:18:40 +00:00
Jordi Mallach
8c9256a731 Updated Galician translation from Fran Tsao, while his paperwork gets to GNU offices.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3899 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-10 08:14:00 +00:00
David Lawrence Ramsey
89ae4a343c miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3898 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-08 15:21:23 +00:00
David Lawrence Ramsey
61525a1e29 add missing line break
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3897 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-06 17:49:53 +00:00
David Lawrence Ramsey
97e0d665de typo fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3896 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-06 16:00:13 +00:00
David Lawrence Ramsey
e4769dfeab in faq.html, update the question in section 4.13 to match the version of
it in the answer section


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3895 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-06 15:52:41 +00:00
David Lawrence Ramsey
ee35aa3b01 yet one more TODO list entry
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3894 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-04 14:19:13 +00:00
David Lawrence Ramsey
23b9907048 add missing blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3893 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-03 19:15:01 +00:00
David Lawrence Ramsey
85307fe28e in input_tab(), since the field precision operator used in the sprintf()
uses ints and not size_t's, replace it with two strncpy()s, which use
size_t's


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3892 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-03 18:46:00 +00:00
David Lawrence Ramsey
1755e28ad9 in parse_help_input(), add 'E' and 'e' as aliases for Exit, for
consistency with the file browser


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3891 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-02 21:25:41 +00:00
David Lawrence Ramsey
6db9ebbe04 formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3890 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-02 19:45:34 +00:00
Jordi Mallach
77369f425b Updated pt_BR from the TP, using the correct file.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3889 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-02 17:15:27 +00:00
David Lawrence Ramsey
52804ab8e8 in doc/syntax/c.nanorc, simplify "undef", "ifn?def", "elif", and "else"
in the preprocessor regexes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3888 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-02 17:01:58 +00:00
David Lawrence Ramsey
6e379c254e Back to CVS
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3887 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-10-02 04:09:48 +00:00
47 changed files with 5596 additions and 4843 deletions

View File

@@ -4,10 +4,10 @@ nano editor. Please see the ChangeLog for specific changes by author.
-------------------------------------------------------------------------
Chris Allegretta <chrisa@asty.org>
* Original program author, stable series maintainer.
* Original program author, former stable series maintainer.
David Lawrence Ramsey <pooka109@cox.net>
* Development series maintainer. Multiple buffer support,
* Current stable 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.

122
BUGS
View File

@@ -8,18 +8,18 @@
certain col values. (9) [FIXED]
- edit_refresh() and update_line() do not handle selecting text when the
cursor is beyond COLS (10) [FIXED]
- no way to do a replace with the empty string (11) [FIXED, yay!]
- No way to do a replace with the empty string (11) [FIXED, yay!]
- Spelling support is not elegant like Pico's integration of the 'spell'
program. Nano only uses ispell (for now) (12) [FIXED]
program. nano only uses ispell (for now) (12) [FIXED]
- Moving to the end of a line when close to a multiple of COLS and at
least COLS * 2 does not make the screen jump early like it would for
if we were around COLS (bugs in edit_refresh, update_line) (13)
[FIXED, mostly]
- When at the very bottom of the edit window, do_wrap goes berserk and
- When at the very bottom of the edit window, do_wrap() goes berserk and
puts the cursor somewhere bad; subsequent keystrokes crash the program
(14) [FIXED, mostly]
- Doing a replacement of a substring of the replace string (e.g. replacing
"ed" with "fred" causes an infinite loop). (15) [FIXED]
- Doing a replacement of a substring of the replace string (e.g.
replacing "ed" with "fred" causes an infinite loop). (15) [FIXED]
- Cutting a file with marked text and both marker ends on the same line
causes a random segfault (16) [FIXED]
- Cutting more than one line resets the KEEP_CUTBUFFER flag in 0.9.3.
@@ -27,25 +27,28 @@
- The wrapping code does not work right for lines like the following:
* *
Error is in do_wrap, must be rewritten. (18) [FIXED]
- Nano fails to follow symlinks, even though -l isn't being used (20).
- nano fails to follow symlinks, even though -l isn't being used (20).
[Bug in global flag init, FIXED]
- When using --help or --version, the SIGINT character gets lost. (21) [FIXED]
- When using --help or --version, the SIGINT character gets lost. (21)
[FIXED]
- edit_refresh() and update_line() (and related functions) have
trouble when a tab is the character that is the boundary at COLS (23)
[FIXED]
- There is an off-by-one error in keeping track of totsize. It is caused
by the fact that we count the newline at the end when we read in a file
but we do not, in fact, display this newline. This should go away
implicitly when the "Magic Line" returns, but it is noted here for
documentation's sake. (24) [FIXED]
- There is an off-by-one error in keeping track of totsize. It is
caused by the fact that we count the newline at the end when we read
in a file but we do not, in fact, display this newline. This should
go away implicitly when the "Magic Line" returns, but it is noted here
for documentation's sake. (24) [FIXED]
- In replace with completely adjacent strings, every other search string
will be missed (try replace ':' in a string like ':::::::::') (28) [FIXED]
- If nano opens a read-only file with the --tempfile option, and a change
is made to the buffer, and a write is attempted, nano will not give you
a dialog about not being able to write the file, and it will not let the
user exit (29, discovered by Joshua Jensen) [FIXED]
will be missed (try replace ':' in a string like ':::::::::') (28)
[FIXED]
- If nano opens a read-only file with the --tempfile option, and a
change is made to the buffer, and a write is attempted, nano will not
give you a dialog about not being able to write the file, and it will
not let the user exit (29, discovered by Joshua Jensen) [FIXED]
- Using nano -k, marked text is not cut properly. (31) [FIXED]
- Invoking -t or -k has the effect of invoking both options. (32) [FIXED]
- Invoking -t or -k has the effect of invoking both options. (32)
[FIXED]
- totsize becomes incorrect after word-wrapping (25) [FIXED]
- Wrapping a line with autoindent mode sometimes causes a segfault (19)
[FIXED]
@@ -55,51 +58,52 @@
[FIXED]
- In replace, there is no way to accept the default replace string. (27)
[FIXED]
- Using nano -t, user can not exit until a filename is given via ^O. (30)
[FIXED]
- Using nano -t, user can not exit until a filename is given via ^O.
(30) [FIXED]
- totsize problems still abound in do_justify (33) [FIXED]
- Using -k, cut text is not pasted properly. (34) [FIXED].
- Using -k, pasted text is not updated properly if it goes beyond editbot. (35)
[FIXED]
- Using -k, pasted text is not updated properly if it goes beyond
editbot. (35) [FIXED]
- Doing a cut with -k can screw up the filestruct; fault is in cutting
code. (36) [FIXED]
code. (36) [FIXED]
- Hitting enter on the magic line makes new lines, but they are not
written out to disk when saved..... (37). [FIXED]
- Page up and page down do not work the same way as in Pico (# of lines). (38)
[FIXED]
- Page up and page down do not work the same way as in Pico (# of
lines). (38) [FIXED]
- When doing a search and the marker is set, the screen does not always
properly update the inverted text (39). [FIXED]
- Searches for a string that only exists on one line multiple times will
fail after finding the last occurrence (discovered by Ken Tyler) (40).
[FIXED]
- Alt-Z is currently broken to toggle suspend. I guess I still don't know
signals very well =-) (41) [FIXED].
- Unable to cut the entire file using the marker (discovered by Ken Tyler)
(42). [FIXED]
- The keypad does not work when nano runs in the Gnome terminal (43). [FIXED]
- When reading in a file, if the file is a directory, the contents of the
file being edited are blown away (discovered by Chris Pimlot) (44). [FIXED]
- in certain terms, nano will leave a "ghost" of screen upon exit
when called from inside mutt (among other settings) (45). [FIXED]
- Meta-Z is currently broken to toggle suspend. I guess I still don't
know signals very well =-) (41) [FIXED].
- Unable to cut the entire file using the marker (discovered by Ken
Tyler) (42). [FIXED]
- The keypad does not work when nano runs in the Gnome terminal (43).
[FIXED]
- When reading in a file, if the file is a directory, the contents of
the file being edited are blown away (discovered by Chris Pimlot)
(44). [FIXED]
- In certain terms, nano will leave a "ghost" of screen upon exit when
called from inside mutt (among other settings) (45). [FIXED]
- In replace, hitting the Goto line shortcut key does nothing after a
search string is entered (discovered by Rocco Corsi) (46) [FIXED].
- When typing in a string in search or replace and hitting CASE_SENSITIVE
or the other search string, the current string edit is blown away in
favor of the last stored search (47) [FIXED]
- When typing in a string in search or replace and hitting
CASE_SENSITIVE or the other search string, the current string edit is
blown away in favor of the last stored search (47) [FIXED]
- If nano fails to open a file when it starts up, doing almost anything
causes a segfault (discovered by Ben Roberts) (48). [FIXED]
- In certain terminals, nano would not work properly with keypad().
Turned out to be the silly timeout(0) call, which is completely
unneeded, anyway. (49) [FIXED]
- With less than a page of text, doing a page down will move the
current line to the top of the screen, which it shouldn't do. (50)
[FIXED]
- with PDCURSES, running meta-X turns off the keypad. (51) [FIXED]
unneeded, anyway. (49) [FIXED]
- With less than a page of text, doing a page down will move the current
line to the top of the screen, which it shouldn't do. (50) [FIXED]
- With PDCurses, running Meta-X turns off the keypad. (51) [FIXED]
- Resizing the window completely screws up the display if in any other
mode than normal editing (help screen, search and replace, file
browser..) (52) [FIXED]
- Alt speller argument (-s, --speller) does not take a string argument of
more than one word. (53) [FIXED].
browser...) (52) [FIXED]
- Alt speller argument (-s, --speller) does not take a string argument
of more than one word. (53) [FIXED].
- Cut to end cutting (-k) causes segfaults (try cutting "- Backup making
(filename~)?" line in TODO file) (discovered by
higuita@cadernoverde.com) (54) [FIXED].
@@ -109,29 +113,29 @@
the first fail if no string is entered (56) [FIXED].
- Page down on a file of editwinrows fails (again). Reported by Ryan
Krebs (57) [FIXED].
- File browser aborts on Solaris in qsort() call. (Reported by
Matthias Andree) (58) [FIXED].
- Can modify the current file in view mode with ^W^R (discovered by Rocco
Corsi) (58) [FIXED].
- When page up is used after two page down's, the screen doesn't update
- File browser aborts on Solaris in qsort() call. (Reported by Matthias
Andree) (58) [FIXED].
- Can modify the current file in view mode with ^W^R (discovered by
Rocco Corsi) (58) [FIXED].
- When page up is used after two page downs, the screen doesn't update
properly (discovered by David Lawrence Ramsey) (59) [FIXED].
- On BSD systems, marked cutting sna paste often screws up the
last line in the cutbuffer (discovered by Barry Pederson) (60) [FIXED]
- On BSD systems, marked cutting and paste often screws up the last line
in the cutbuffer (discovered by Barry Pederson) (60) [FIXED]
- Blank lines are not kept when cutting with -k (discovered by Rocco)
(61) [FIXED].
- Nano will not suspend properly inside of mutt (62) [FIXED].
- nano will not suspend properly inside of mutt (62) [FIXED].
- When switching from Pico mode to normal mode, the previous search is
not displayed until cancelling the search (63) [FIXED].
- If you change search options but don't change the search string in
normal mode, hitting enter causes the search/replace to abort (64)
normal mode, hitting Enter causes the search/replace to abort (64)
(Jordi Mallach) [FIXED].
- Cutting one line of text causes the screen to recenter the line
(reported and fixed by David Lawrence Ramsey) (65) [FIXED].
- When cutting marked text including the bottom of the file, a new
"magic line" is not created" (reported by David Lawrence
Ramsey, fixed by David Lawrence Ramsey & Chris) (66) [FIXED].
- ^C does not work after a suspend in tcsh (discovered by
Trevor Cordes) (68) [FIXED].
- When cutting marked text including the bottom of the file, a new
"magic line" is not created" (reported by David Lawrence Ramsey, fixed
by David Lawrence Ramsey & Chris) (66) [FIXED].
- ^C does not work after a suspend in tcsh (discovered by Trevor Cordes)
(68) [FIXED].
- Home and End control keys (^A, ^E) do not always work in filename
prompt (bug found by Ian Turner) (69) [1.0 series only] [FIXED].
- Trying to insert a file of 0 bytes will hang nano (70) [FIXED].

137
ChangeLog
View File

@@ -1,3 +1,134 @@
GNU nano 2.0.2 - 2006.12.20
- General:
- Miscellaneous comment fixes. (DLR)
- browser.c:
do_browser()
- Properly handle directories that contain nulls. (DLR)
- files.c:
do_insertfile()
- Properly handle filenames and executable commands that contain
nulls. (DLR)
write_file()
- Properly handle filenames that contain nulls. (DLR)
do_writeout()
- Fix a segfault when we can't get the full path of either the
filename we want to save under or the original filename. (DLR,
found by Mike Frysinger)
- nano.h:
- Rename NANO_ALT_REPLACE_KEY to NANO_REPLACE_ALTKEY, for
consistency. (DLR)
- Rename NANO_ALT_.* and NANO_.*ALTKEY to NANO_META_.* and
NANO_.*METAKEY, for consistency. (DLR)
- search.c:
update_history()
- Fix minor memory leak. (DLR)
- text.c:
do_spell()
- When setting i to the return value of write_(marked_)?file(),
use the "?" operator instead of an if/else clause. (DLR)
do_verbatim_input()
- Fix minor memory leak. (DLR)
- winio.c:
parse_kbinput()
- Add missing break. (DLR)
- Fix minor memory leak. (Itay Perl)
parse_verbatim_kbinput()
- Fix minor memory leak. (DLR)
edit_draw()
- Fix potential warnings when assigning -1 to paintlen by using
if/else clauses instead of "?" operators. (DLR)
- configure.ac:
- Reword several option descriptions, for clarity. (DLR)
- doc/faq.html:
- Add miscellaneous wording and capitalization fixes. (DLR)
- BUGS:
- Add miscellaneous cosmetic fixes. (DLR)
- README:
- Update for the 2.0 branch of nano. (DLR)
GNU nano 2.0.1 - 2006.11.20
- General:
- Miscellaneous comment fixes. (DLR)
- Fix copyright notices to not abbreviate the year list using a
range. Changes to do_credits() and all source files. (DLR)
- files.c:
get_full_path()
- Remove unneeded assert. (DLR)
- Fix problem where only paths would be returned when both paths
and filenames should have been. (DLR)
do_writeout()
- For consistency, when saving a file with no name, don't allow
overwriting an existing file when in restricted mode. (DLR)
- Fix problem where a file could sometimes be overwritten
without a warning prompt. (DLR)
- winio.c:
do_replace_highlight()
- Include the code to display zero-length matches even when
regex.h isn't found, as it can also be used to display
zero-length Unicode characters. (DLR)
- doc/rnano.1, doc/fr/rnano.1:
- Add missing "(C)" to the copyright notice in the comments.
(DLR)
- doc/nano.texi:
- Remove unneeded "." from the copyright notice in the comments.
(DLR)
- NEWS:
- Add missing entries for nano 1.0.2 and 1.0.3, since 1.1.0
includes their changes. (DLR)
GNU nano 2.0.0 - 2006.11.06
- General:
- Miscellaneous comment fixes. (DLR)
- Add syntax for POV-Ray files. New file doc/syntax/pov.nanorc;
changes to doc/nanorc.sample.in and doc/syntax/Makefile.am.
(Donnie Berkholz, minor tweaks by DLR)
- AUTHORS:
- Update for the 2.0 branch of nano. (DLR)
- nano.spec.in:
- Update links for the 2.0 branch of nano. (DLR)
- Update for newer RPM-based distributions. (DLR, adapted from
the nano 1.3.12-1.1.spec file in Fedora Rawhide)
- Delete the changelog section, as it hasn't been kept up to
date, and all its changes are documented here in any case.
(DLR)
- doc/faq.html:
- Update links for the 2.0 branch of nano. (DLR)
- doc/nano.1, doc/nanorc.5, doc/rnano.1:
- Add minor wording fixes. (DLR)
- doc/man/fr/nano.1, doc/man/fr/nanorc.5, doc/man/fr/rnano.1:
- Updated manpage translations by Jean-Philippe Guérard.
- doc/nano.texi:
- Add minor wording and punctuation fixes. (DLR)
GNU nano 1.9.99pre3 - 2006.10.25
- chars.c:
nstrncasecmp()
- When returning, use the "?" operator instead of an if/else
clause. (DLR)
- cut.c:
do_cut_text()
- When uncutting text in the process of copying it, always set
placewewant, as do_uncut_text() does, so that the current line
is always updated properly. (DLR)
- files.c:
input_tab()
- Since the field precision operator used in the sprintf() uses
ints and not size_t's, replace it with two strncpy()s, which
use size_t's, and a null termination. (DLR)
- help.c:
parse_help_input()
- Add 'E' and 'e' as aliases for Exit, for consistency with the
file browser. (DLR)
- m4/ac_define_dir.m4:
- Import the latest version of this file from
http://autoconf-archive.cryp.to/ac_define_dir.m4. (DLR)
- doc/faq.html:
- Update the question in section 4.13 to match the version of it
in the answer section. (DLR)
- doc/syntax/c.nanorc:
- Simplify "undef", "ifn?def", "elif", and "else" in the
preprocessor regexes. (DLR)
GNU nano 1.9.99pre2 - 2006.10.02
- General:
- Miscellaneous comment fixes. (DLR)
@@ -541,7 +672,7 @@ GNU nano 1.3.12 - 2006.06.26
have fewer than 24 columns, for consistency with the toggle
help text. (DLR, suggested by Benno Schulenberg)
parse_help_input()
- Add Space and - as aliases for PageDown and PageUp, for
- Add Space and '-' as aliases for PageDown and PageUp, for
consistency with the file browser. (DLR, suggested by Benno
Schulenberg)
- Remove redundant key checks. (DLR)
@@ -6830,7 +6961,7 @@ General -
to winio.c where it should probably be anyway. New configure
check for _use_keypad in window struct. This will have to do
for now.
- Moved keypad() calls for PDCURSES from main() to window_init()
- Moved keypad() calls for PDCurses from main() to window_init()
so the keypad continues to work after a Meta-X, for example.
Fixed bug #51.
- faq.html:
@@ -7136,7 +7267,7 @@ nano 0.9.20 - 11/18/2000
to answer == def.
- Fixed fallthrough code because there was no break. Make much
more sense now.
- Added check for ASCII 54[124] when using PDCURSES, ignore them
- Added check for ASCII 54[124] when using PDCurses, ignore them
if noticed.
nanoget_repaint()
- New function, removes about 30 lines of duplicate code in

61
NEWS
View File

@@ -1,3 +1,43 @@
2006.12.20 - GNU nano 2.0.2 forges ahead. This release fixes a segfault
when trying to save in a nonexistent directory; fixes
handling of strings containing nulls at the "Write File",
"Insert File", "Execute Command", and "Go to Directory"
prompts; fixes several minor memory leaks; fixes two
more potential compilation warnings; adds a few
translation updates; and adds a few more minor
documentation updates. Enjoy.
2006.11.20 - GNU nano 2.0.1 emerges from its cocoon. This release
contains several bugfixes: saving one file over another
will now always warn about overwriting it, overwriting
a file is no longer possible when saving a new file in
restricted mode, and zero-length Unicode characters are
now highlighted properly when nano is built without
regular expression support. It also adds several minor
documentation updates. Have fun with it.
2006.11.06 - GNU nano 2.0.0 does its little dance. This release adds
documentation updates and a few cosmetic tweaks.
For those who haven't been following nano 1.3
development, there are a ton of new features, including
support for UTF-8, moving to a specified line and column
instead of just a line, improved color syntax
highlighting, inserting previously untypeable characters
using "Verbatim Input" mode, and copying text into the
cutbuffer without cutting it. There are also fixes for
some long-standing bugs, such as the "NumLock glitch"
from nano 1.2.x, and the inability to unjustify text
after resizing. Finally, there are also a ton of
translation updates and new translations, as well as new
color syntaxes. See the UPGRADE file for more
information, and enjoy the new stable release.
2006.10.25 - GNU nano 1.9.99pre3 learns to appreciate life. This
release fixes a bug where the screen sometimes wouldn't
be updated properly after copying text into the
cutbuffer, fixes a potential warning while compiling,
and fixes a few other minor inconsistencies. Have fun.
2006.10.02 - GNU nano 1.9.99pre2 crosses the threshold. This release
fixes a few more bugs: cursor positioning after leaving
the statusbar prompt has been fixed, and verbatim input
@@ -528,6 +568,27 @@
introduce lots of bugs ;-) Have fun with it, but be
careful, unstable means unstable.
07/01/2001 - GNU nano 1.0.3 is the "mutt" release. This release
features oodles of bug fixes with cutting text,
especially with the -k (cut to end) option. There is
also a new suspend handler which should make nano play
better with mutt (the code for which came from mutt
itself; many many thanks to Jordi Mallach and Tom Lear
for working late into the night fixing this). Nano now
also features mutt's case insensitive string compare
function for more speed and less memory usage. Two new
translations are included, Ukrainian and Russian.
05/12/2001 - GNU nano 1.0.2 is the "just the bugfixes ma'am" release.
The most noticeable fixes are for display errors using
page up/down with the marker code, and view mode (-v)
not stopping the replace function. Other fixes include
being able to use the arrow keys while holding down the
ctrl key in certain TERMs, and there are many
documentation updates and spelling tweaks. We also have
a new Galician translation (provided by Jacobo Tarrío).
Have fun with it!
04/06/2001 - GNU nano 1.0.1 is out there. The only new feature is a
configure option for those who want to disable all word
wrapping from nano, --disable-wrapping. Bug fixes this

4
README
View File

@@ -65,9 +65,7 @@ Mailing List and Bug Reports
Current Status
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.
GNU nano has reached its third stable milestone, 2.0.x.
Chris Allegretta (chrisa@asty.org)

1
TODO
View File

@@ -34,6 +34,7 @@ For the next version:
keystroke, e.g. M-` (M-~) to go to the top line, M-& (M-7) to go to
the center line, and M-' (M-") to go to the last line.
- Allow searching for and replacing newlines.
- Allow soft wrapping as well as hard wrapping?
Old requests:

View File

@@ -19,7 +19,7 @@
#
# $Id$
AC_INIT([GNU nano], [1.9.99pre2], [nano-devel@gnu.org], [nano])
AC_INIT([GNU nano], [2.0.2], [nano-devel@gnu.org], [nano])
AC_CONFIG_SRCDIR([src/nano.c])
AC_CANONICAL_TARGET([])
AM_INIT_AUTOMAKE
@@ -56,17 +56,17 @@ dnl Checks for options.
AC_ARG_ENABLE(debug,
[ --enable-debug Enable debugging (disabled by default)],
[if test x$enableval = xyes; then
AC_DEFINE(DEBUG, 1, [Define this to enable nano debug messages and assert warnings.]) debug_support=yes
AC_DEFINE(DEBUG, 1, [Define this to enable debug messages and assert warnings.]) debug_support=yes
fi])
if test x$debug_support != xyes; then
AC_DEFINE(NDEBUG, 1, [Shut up the assert warnings :-)])
AC_DEFINE(NDEBUG, 1, [Shut up assert warnings :-)])
fi
AC_ARG_ENABLE(extra,
[ --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(NANO_EXTRA, 1, [Define this to enable extra stuff.]) extra_support=yes
fi])
AC_ARG_ENABLE(tiny,
@@ -75,42 +75,42 @@ AC_ARG_ENABLE(tiny,
AC_DEFINE(NANO_TINY, 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 file browser.])
AC_DEFINE(DISABLE_HELP, 1, [Define this to disable the help text display.])
AC_DEFINE(DISABLE_JUSTIFY, 1, [Define this to disable the justify routine.])
AC_DEFINE(DISABLE_JUSTIFY, 1, [Define this to disable the justify routines.])
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_OPERATINGDIR, 1, [Define this to disable the setting of the operating directory (chroot of sorts).])
AC_DEFINE(DISABLE_SPELLER, 1, [Define this to disable the spell checker functions.])
AC_DEFINE(DISABLE_TABCOMP, 1, [Define to disable the tab completion code Chris worked so hard on!])
AC_DEFINE(DISABLE_WRAPPING, 1, [Define this to disable any and all text wrapping.])
AC_DEFINE(DISABLE_TABCOMP, 1, [Define to disable the tab completion functions for files and search strings.])
AC_DEFINE(DISABLE_WRAPPING, 1, [Define this to disable all text wrapping.])
fi])
AC_ARG_ENABLE(browser,
[ --disable-browser Disable mini file browser],
[ --disable-browser Disable built-in file browser],
[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],
[ --disable-help Disable help functions],
[if test x$enableval != xyes; then
AC_DEFINE(DISABLE_HELP, 1, [Define this to disable the help text display.])
fi])
AC_ARG_ENABLE(justify,
[ --disable-justify Disable justify/unjustify function],
[ --disable-justify Disable justify/unjustify functions],
[if test x$enableval != xyes; then
AC_DEFINE(DISABLE_JUSTIFY, 1, [Define this to disable the justify routine.])
AC_DEFINE(DISABLE_JUSTIFY, 1, [Define this to disable the justify routines.])
fi])
AC_ARG_ENABLE(mouse,
[ --disable-mouse Disable mouse support (and -m flag)],
[if test x$enableval != xyes; then
AC_DEFINE(DISABLE_MOUSE, 1, [Define this to disable the mouse functions.])
AC_DEFINE(DISABLE_MOUSE, 1, [Define this to disable the mouse support.])
fi])
AC_ARG_ENABLE(operatingdir,
[ --disable-operatingdir Disable setting of operating directory (chroot of sorts)],
[if test x$enableval != xyes; then
AC_DEFINE(DISABLE_OPERATINGDIR, 1, [Define this to disable setting of the operating directory (chroot of sorts).])
AC_DEFINE(DISABLE_OPERATINGDIR, 1, [Define this to disable the setting of the operating directory (chroot of sorts).])
fi])
AC_ARG_ENABLE(speller,
@@ -120,28 +120,28 @@ AC_ARG_ENABLE(speller,
fi])
AC_ARG_ENABLE(tabcomp,
[ --disable-tabcomp Disable tab completion code for a smaller binary],
[ --disable-tabcomp Disable tab completion functions],
[if test x$enableval != xyes; then
AC_DEFINE(DISABLE_TABCOMP, 1, [Define to disable the tab completion code Chris worked so hard on!])
AC_DEFINE(DISABLE_TABCOMP, 1, [Define to disable the tab completion functions for files and search strings.])
fi])
AC_ARG_ENABLE(wrapping,
[ --disable-wrapping Disable all wrapping of text (and -w flag)],
[if test x$enableval != xyes; then
AC_DEFINE(DISABLE_WRAPPING, 1, [Define this to disable any and all text wrapping.])
AC_DEFINE(DISABLE_WRAPPING, 1, [Define this to disable all text wrapping.])
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
AC_DEFINE(DISABLE_ROOTWRAPPING, 1, [Define this to disable wrapping as root by default.])
AC_DEFINE(DISABLE_ROOTWRAPPING, 1, [Define this to disable text wrapping as root by default.])
fi])
AC_ARG_ENABLE(color,
[ --enable-color Enable color and syntax highlighting],
[if test x$enableval = xyes; then
if test x$ac_cv_header_regex_h = xyes; then
AC_DEFINE(ENABLE_NANORC, 1, [Define this to use the .nanorc file.]) nanorc_support=yes
AC_DEFINE(ENABLE_NANORC, 1, [Define this to use .nanorc files.]) nanorc_support=yes
AC_DEFINE(ENABLE_COLOR, 1, [Define this to have syntax highlighting, requires regex.h and ENABLE_NANORC too!]) color_support=yes
else
AC_MSG_ERROR([
@@ -159,18 +159,18 @@ AC_ARG_ENABLE(multibuffer,
fi])
AC_ARG_ENABLE(nanorc,
[ --enable-nanorc Enable use of .nanorc file],
[ --enable-nanorc Enable use of .nanorc files],
[if test x$enableval = xyes; then
AC_DEFINE(ENABLE_NANORC, 1, [Define this to use the .nanorc file.]) nanorc_support=yes
AC_DEFINE(ENABLE_NANORC, 1, [Define this to use .nanorc files.]) nanorc_support=yes
fi])
AC_ARG_ENABLE(all,
[ --enable-all Enable ALL extra nano functionality (kitchen sink option)],
[if test x$enableval = xyes; then
AC_DEFINE(ENABLE_NANORC, 1, [Define this to use the .nanorc file.]) nanorc_support=yes
AC_DEFINE(ENABLE_NANORC, 1, [Define this to use .nanorc files.]) nanorc_support=yes
AC_DEFINE(ENABLE_COLOR, 1, [Define this to have syntax highlighting, requires regex.h and ENABLE_NANORC too!]) color_support=yes
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_DEFINE(NANO_EXTRA, 1, [Define this to enable extra stuff.]) extra_support=yes
fi])
AC_MSG_CHECKING([whether to enable UTF-8 support])

View File

@@ -25,7 +25,7 @@
<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.5">3.5. Nano should automatically run strip on the binary when installing 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. Tell me more about this verbatim input stuff!</a><br>
@@ -36,15 +36,15 @@
<a href="#4.3">4.3. Ack! My numeric keypad's keys don't work properly when NumLock is off! What can I do?</a><br>
<a href="#4.4">4.4. Ack! When I hold down a Meta key combination for a while, the character of the held key gets inserted now and then. What gives?</a><br>
<a href="#4.5">4.5. How do I type the F13-F16 keys shown in the help browser? My keyboard only has F1-F12!</a><br>
<a href="#4.6">4.6. Nano crashes when I type &lt;insert keystroke here&gt;!</a><br>
<a href="#4.7">4.7. Nano crashes when I resize my window. How can I fix that?</a><br>
<a href="#4.6">4.6. nano crashes when I type &lt;insert keystroke here&gt;!</a><br>
<a href="#4.7">4.7. nano crashes when I resize my window. How can I fix that?</a><br>
<a href="#4.8">4.8. [version 1.3.12 and later] I'm using glibc 2.2.3, and nano crashes when I use color support or do regular expression searches. How can I fix that?</a><br>
<a href="#4.9">4.9. [version 1.1.12 and earlier] Why does nano show ^\ in the shortcut list instead of ^J?</a><br>
<a href="#4.10a">4.10a. [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.10b">4.10b. [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.11">4.11. How do I make nano my default editor (in Pine, mutt, etc.)?</a><br>
<a href="#4.12">4.12. I've compiled nano with color support, but I don't see any color when I run it!</a><br>
<a href="#4.13">4.13. 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>
<a href="#4.13">4.13. How do I select text for or paste text from 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><br>
@@ -57,7 +57,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>
@@ -80,13 +80,13 @@
<p><b>The event...</b></p>
<p>It was in late 1999 when Chris Allegretta (our hero) was yet again complaining to himself about the less-than-perfect license Pico was distributed under, the 1000 makefiles that came with it and how just a few small improvements could make it the Best Editor in the World (TM). Having been a convert from Slackware to Debian, he missed having a simple binary package that included Pine and Pico, and had grown tired of downloading them himself.</p>
<p>Finally something snapped inside and Chris coded and hacked like a madman for many hours straight one weekend to make a (barely usable) Pico clone, at the time called TIP (Tip Isn't Pico). The program could not be invoked without a filename, could not save files, had no help text display, spell checker, and so forth. But over time it improved, and with the help of a few great coders it matured to the (hopefully) stable state it is today.</p>
<p>In February 2001, nano was declared an official GNU program by Richard Stallman. Nano also reached its first production release on March 22, 2001.</p></blockquote>
<p>In February 2001, nano was declared an official GNU program by Richard Stallman. nano also reached its first production release on March 22, 2001.</p></blockquote>
<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.9.99pre2. Of course you should always check the nano homepage to see what the latest and greatest version is.</p></blockquote>
<blockquote><p>The current version of nano *should* be 2.0.2. 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.3/nano.1.html">here</a>.</p></blockquote>
<blockquote><p>Jeez, demanding, aren't we? Okay, look <a href="http://www.nano-editor.org/dist/v2.0/nano.1.html">here</a>.</p></blockquote>
<hr width="100%">
<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>
@@ -136,17 +136,16 @@
<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>
<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>
<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> Disable tab completion code for a smaller
binary
<b>--disable-justify</b> Disable justify/unjustify function
<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-tabcomp</b> Disable tab completion functions
<b>--disable-justify</b> Disable justify/unjustify functions
<b>--disable-speller</b> Disable spell checker functions
<b>--disable-help</b> Disable help functions
<b>--disable-browser</b> Disable built-in 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>
@@ -154,13 +153,13 @@
<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 features, currently only easter eggs
<b>--enable-nanorc</b> Enable use of .nanorc file
<b>--enable-nanorc</b> Enable use of .nanorc files
<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>
Disable text wrapping 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.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>
@@ -177,7 +176,7 @@
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/Meta/double bucky key doesn't seem to work! What can I do?</h2>
<blockquote><p>Try setting your $TERM variable to 'vt100'. Nano doesn't yet support every term entry under the sun.</p>
<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 (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.3"></a>4.3. Ack! My numeric keypad's keys don't work properly when NumLock is off! What can I do?</h2>
@@ -186,9 +185,9 @@
<blockquote><p>This is a bug in the terminal, not in nano. When a key is repeating faster than nano can process it, the keyboard buffer becomes full and starts dropping incoming keystrokes. Unfortunately, it doesn't just drop whole keystrokes; it can also drop parts of multibyte key combinations, resulting in nano's receiving a wrong key.</p></blockquote>
<h2><a name="4.5"></a>4.5. 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, and Eterm, Shift-F3 to Shift-F6 will generate F13 to F16.</p></blockquote>
<h2><a name="4.6"></a>4.6. Nano crashes when I type &lt;insert keystroke here&gt;!</h2>
<h2><a name="4.6"></a>4.6. 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.7"></a>4.7. Nano crashes when I resize my window. How can I fix that?</h2>
<h2><a name="4.7"></a>4.7. 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.8"></a>4.8. [version 1.3.12 and later] I'm using glibc 2.2.3, and nano crashes when I use color support or do regular expression searches. How can I fix that?</h2>
<blockquote><p>It's a bug in glibc 2.2.3. You should upgrade to at least glibc 2.2.4.</p></blockquote>
@@ -238,16 +237,16 @@
<h2><a name="6.5"></a>6.5. Why doesn't UW simply change their license?</h2>
<blockquote><p>You're really not asking the right person here. I (Chris) waited a long time to see if UW would change their license because of the amount of high quality software being released and developed under the GPL without being taken advantage of by malicious corporate entities or other baddies, but no such luck so far.</p></blockquote>
<h2><a name="6.6"></a>6.6. What if tomorrow UW changes the license to be truly Free Software?</h2>
<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>
<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>
<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>
<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.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>
<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/v2.0/BUGS">bug</a> in the program or implement a <a href="http://www.nano-editor.org/dist/v2.0/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>
@@ -255,8 +254,10 @@
<h2><a name="7.5"></a>7.5. Can I have CVS write access?</h2>
<blockquote><p>Re-read Section <a href="#7.4">7.4</a> and you should know the answer.</p></blockquote>
<h2><a name="8"></a>8. ChangeLog</h2>
<blockquote>
<p>2006/07/25 - Update section 5.3 again to not state &quot;the latest development version&quot; before 1.3.12, as it's no longer accurate. Also add some minor spacing fixes. (DLR)<br>
<blockquote><p>2006/11/25 - Add miscellaneous wording and capitalization fixes. (DLR)<br>
2006/10/28 - Update various links for the 2.0 branch of nano. (DLR)<br>
2006/10/06 - Update the question in section 4.13 to match the version of it in the answer section. (DLR)<br>
2006/07/25 - Update section 5.3 again to not state &quot;the latest development version&quot; before 1.3.12, as it's no longer accurate. Also add some minor spacing fixes. (DLR)<br>
2006/06/12 - Update section 5.3, due to the display fix for two-column Unicode characters. (DLR)<br>
2006/06/05 - Add a new section 4.8, and move all section 4 entries after it down one number, to explain how to deal with glibc 2.2.3's crashes involving extended regular expressions. (DLR)<br>
2006/06/04 - Add minor punctuation, wording, and typo fixes. (DLR)<br>

View File

@@ -15,7 +15,7 @@
.\" AUCUNE garantie.
.\"
.\" $Id$
.TH NANO 1 "version 1.9.99pre1" "28\ août\ 2006"
.TH NANO 1 "version 2.0.0" "28\ octobre\ 2006"
.\" Please adjust this date whenever revising the manpage.
.\" Merci de modifier ces dates à chaque mise à jour de cette page.
.\"
@@ -39,8 +39,8 @@ Pico, l'
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.
recherche et de remplacement, et la possibilité de sauter directement à
une ligne et à une colonne précise.
.SH OPTIONS
.TP
@@ -276,10 +276,10 @@ manuel a
le système Debian (mais elle peut être utilisée par d'autres).
.SH TRADUCTION
Cette adaptation française a été réalisé par Jean-Philippe\ Guérard
<jean-philippe.guerard@tigreraye.org> le 28\ août\ 2006 à partir
de la version du 12\ juillet\ 2006 de la page de manuel de nano
1.9.99pre1. Cette page a été relue par Gérard Delafond.
Cette adaptation française a été réalisée par Jean-Philippe\ Guérard
<jean-philippe.guerard@tigreraye.org> le 28\ octobre\ 2006 à partir
de la version du 28\ octobre\ 2006 de la page de manuel de nano
2.0.0. Cette page a été relue par Gérard Delafond.
Un maximum de soin a été apporté lors de l'élaboration de cette
traduction\ ; néanmoins, quelques imperfections peuvent subsister. Si

View File

@@ -15,7 +15,7 @@
.\" AUCUNE garantie.
.\"
\" $Id$
.TH NANORC 5 "version 1.9.99pre1" "28\ août\ 2006"
.TH NANORC 5 "version 2.0.0" "28\ octobre\ 2006"
.\" Please adjust this date whenever revising the manpage.
.\" Merci de modifier ces dates à chaque mise à jour de cette page.
@@ -32,7 +32,7 @@ remplacer Pico, l'
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.
sauter directement à une ligne et à une colonne précise.
.PP
Le fichier \fInanorc\fP contient les paramètres par défaut de
\fBnano\fP. Il ne doit pas être au format DOS ou Mac. Lors de son
@@ -325,10 +325,10 @@ manuel a
le système Debian (mais elle peut être utilisée par d'autres).
.SH TRADUCTION
Cette adaptation française a été réalisé par Jean-Philippe\ Guérard
<jean-philippe.guerard@tigreraye.org> le 28\ août\ 2006 à partir de
la version du 30\ juillet\ 2006 de la page de manuel de nanorc (pour la
version 1.9.99pre1 de nano). Cette page a été relue par Gérard
Cette adaptation française a été réalisée par Jean-Philippe\ Guérard
<jean-philippe.guerard@tigreraye.org> le 28\ octobre\ 2006 à partir de
la version du 28\ octobre\ 2006 de la page de manuel de nanorc (pour la
version 2.0.0 de nano). Cette page a été relue par Gérard
Delafond.
Un maximum de soin a été apporté lors de l'élaboration de cette

View File

@@ -1,5 +1,5 @@
.\" Hey, EMACS: -*- nroff -*-
.\" rnano.1 is Copyright 2005, 2006 by Thijs Kinkhorst
.\" rnano.1 is Copyright (C) 2005, 2006 by Thijs Kinkhorst
.\" <thijs@kinkhorst.com>; skeleton based on nano-tiny.1 by Jordi
.\" Mallach <jordi@gnu.org>.
.\"
@@ -16,7 +16,7 @@
.\" AUCUNE garantie.
.\"
.\" $Id$
.TH RNANO 1 "version 1.9.99pre1" "28\ août\ 20O6"
.TH RNANO 1 "version 2.0.0" "28\ octobre\ 20O6"
.\" Please adjust this date whenever revising the manpage.
.\" Merci de modifier ces dates à chaque mise à jour de cette page.
.\"
@@ -41,7 +41,7 @@ remplacer Pico, l'
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.
directement à une ligne et à une colonne précise..
.PP
\fBrnano\fP est une version de \fBnano\fP fonctionnant en mode
restreint, qui ne permet d'éditer que les fichiers indiqués et qui
@@ -105,10 +105,10 @@ Thijs Kinkhorst <thijs@kinkhorst.com>, pour le syst
elle peut être utilisée par d'autres).
.SH TRADUCTION
Cette adaptation française a été réalisé par Jean-Philippe\ Guérard
<jean-philippe.guerard@tigreraye.org> le 28\ août\ 2006 à partir
de la version du 12\ juillet\ 2006 de la page de manuel de rnano
(pour la version 1.9.99pre1 de nano).
Cette adaptation française a été réalisée par Jean-Philippe\ Guérard
<jean-philippe.guerard@tigreraye.org> le 28\ octobre\ 2006 à partir
de la version du 28\ octobre\ 2006 de la page de manuel de rnano
(pour la version 2.0.0 de nano).
Un maximum de soin a été apporté lors de l'élaboration de cette
traduction\ ; néanmoins, quelques imperfections peuvent subsister. Si

View File

@@ -7,7 +7,7 @@
.\" warranty.
.\"
.\" $Id$
.TH NANO 1 "version 1.9.99pre1" "July 12, 2006"
.TH NANO 1 "version 2.0.0" "October 28, 2006"
.\" Please adjust this date whenever revising the manpage.
.\"
@@ -29,7 +29,7 @@ This manual page briefly documents the \fBnano\fP command.
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".
replace" and "go to line and column number".
.SH OPTIONS
.TP

View File

@@ -7,7 +7,7 @@
.\" warranty.
.\"
.\" $Id$
.TH NANORC 5 "version 1.9.99pre1" "July 30, 2006"
.TH NANORC 5 "version 2.0.0" "October 28, 2006"
.\" Please adjust this date whenever revising the manpage.
.\"
.SH NAME
@@ -19,7 +19,7 @@ This manual page briefly documents GNU \fBnano\fP's rcfile.
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".
replace" and "go to line and column number".
.PP
The \fInanorc\fP file contains the default settings for \fBnano\fP. It
should not be in DOS or Mac format. During startup, \fBnano\fP will

View File

@@ -1,5 +1,5 @@
.\" Hey, EMACS: -*- nroff -*-
.\" rnano.1 is Copyright 2005, 2006 by Thijs Kinkhorst
.\" rnano.1 is Copyright (C) 2005, 2006 by Thijs Kinkhorst
.\" <thijs@kinkhorst.com>; skeleton based on nano-tiny.1 by Jordi
.\" Mallach <jordi@gnu.org>.
.\"
@@ -8,7 +8,7 @@
.\" warranty.
.\"
.\" $Id$
.TH RNANO 1 "version 1.9.99pre1" "July 12, 2006"
.TH RNANO 1 "version 2.0.0" "October 28, 2006"
.\" Please adjust this date whenever revising the manpage.
.\"
.SH NAME
@@ -30,7 +30,7 @@ This manual page briefly documents the \fBrnano\fP command.
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".
replace" and "go to line and column number".
.PP
\fBrnano\fP is a restricted version of \fBnano\fP, which only edits
specific files and doesn't allow the user access to the filesystem or a

View File

@@ -255,3 +255,6 @@
## Bourne shell scripts
# include "@PKGDATADIR@/sh.nanorc"
## POV-Ray
# include "@PKGDATADIR@/pov.nanorc"

View File

@@ -8,6 +8,7 @@ pkgdata_DATA = asm.nanorc \
nanorc.nanorc \
patch.nanorc \
perl.nanorc \
pov.nanorc \
python.nanorc \
ruby.nanorc \
sh.nanorc \

View File

@@ -8,7 +8,7 @@ color green "\<(class|namespace|template|public|protected|private|typename|this|
color brightyellow "\<(for|if|while|do|else|case|default|switch)\>"
color brightyellow "\<(try|throw|catch|operator|new|delete)\>"
color magenta "\<(goto|continue|break|return)\>"
color brightcyan "^[[:space:]]*#[[:space:]]*(define|undef|include|ifn?def|endif|elif|else|if|warning|error)"
color brightcyan "^[[:space:]]*#[[:space:]]*(define|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
##
## GCC builtins

15
doc/syntax/pov.nanorc Normal file
View File

@@ -0,0 +1,15 @@
## Here is an example for POV-Ray.
##
syntax "pov" "\.(pov|POV|povray|POVRAY)$"
color brightcyan "^[[:space:]]*#[[:space:]]*(declare)"
color brightyellow "\<(sphere|cylinder|translate|matrix|rotate|scale)\>"
color brightyellow "\<(orthographic|location|up|right|direction|clipped_by)\>"
color brightyellow "\<(fog_type|fog_offset|fog_alt|rgb|distance|transform)\>"
color brightred "^\<(texture)\>"
color brightred "\<(light_source|background)\>"
color brightred "\<(fog|object|camera)\>"
color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
color brightmagenta "\<(union|group|subgroup)\>"
## Comment highlighting
color brightblue "//.*"
color brightblue start="/\*" end="\*/"

View File

@@ -8,8 +8,8 @@
@c Run 'makeinfo' rather than 'texinfo-format-buffer'.
@smallbook
@set EDITION 0.1
@set VERSION 1.9.99pre1
@set UPDATED 30 Jul 2006
@set VERSION 2.0.0
@set UPDATED 27 Oct 2006
@dircategory Editors
@direntry
@@ -23,7 +23,7 @@
@titlepage
@title GNU @code{nano}
@subtitle a small and friendly text editor.
@subtitle version 1.9.99pre1
@subtitle version 2.0.0
@author Chris Allegretta
@page
@@ -34,7 +34,7 @@ editor.
This manual is part of the GNU @code{nano} distribution.@*
@sp4
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 by Chris
Allegretta.
Allegretta
This is free documentation, see the latest version of the GNU General
Public License for copying conditions. There is NO warranty.
@@ -64,8 +64,9 @@ editor.
GNU @code{nano} is a small and friendly text editor. Besides basic text
editing, @code{nano} offers many extra features like an interactive
search and replace, go to line number, auto-indentation, feature
toggles, internationalization support, and filename tab completion.
search and replace, go to line and column number, auto-indentation,
feature toggles, internationalization support, and filename tab
completion.
@menu
* Overview::
@@ -731,7 +732,7 @@ position of the cursor.
@item Interactive Replace and Spell Checker
It is worth noting that @code{nano}'s 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 pause at each search
string found and query whether to replace this instance or not. The
internal spell checker operates similarly. Note that there is no way to
@@ -792,8 +793,8 @@ line option, which enables long line wrapping.
@item --enable-tiny
This option disables all the above. It also disables some of the larger
internals of the editor, like the marking code and the cut to line code.
It also disables the function toggles.
internals of the editor, like the marking code and the cut to end of
line code. It also disables the function toggles.
@item --enable-debug
Enable support for runtime debug output. This can get pretty messy, so

View File

@@ -13,9 +13,9 @@ dnl
dnl @category Misc
dnl @author Stepan Kasal <kasal@ucw.cz>
dnl @author Andreas Schwab <schwab@suse.de>
dnl @author Guido Draheim <guidod@gmx.de>
dnl @author Guido U. Draheim <guidod@gmx.de>
dnl @author Alexandre Oliva
dnl @version 2005-07-29
dnl @version 2006-10-13
dnl @license AllPermissive
AC_DEFUN([AC_DEFINE_DIR], [

View File

@@ -1,45 +1,39 @@
%define name @PACKAGE@
%define ver @VERSION@
%define rel 1
%define version @VERSION@
%define release 1
Summary : Pico editor clone with enhancements
Name : %{name}
Version : %{ver}
Release : %{rel}
Copyright : GPL
Group : Console/Editors
Version : %{version}
Release : %{release}
License : GPL
Group : Applications/Editors
URL : http://www.nano-editor.org/
Source : http://www.nano-editor.org/dist/v1.3/%{name}-%{ver}.tar.gz
BuildRoot : /var/tmp/%{name}-buildroot
Requires : ncurses
Source : http://www.nano-editor.org/dist/v2.0/%{name}-%{version}.tar.gz
BuildRoot : %{_tmppath}/%{name}-%{version}-root
BuildRequires : autoconf, automake, gettext-devel, ncurses-devel
%description
GNU nano is a small and friendly text editor. It aims to emulate the Pico
text editor while also offering a few enhancements.
GNU nano is a small and friendly text editor. It aims to emulate the
Pico text editor while also offering a few enhancements.
%prep
%setup -q
%build
%configure --enable-all
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
make
%install
rm -rf "$RPM_BUILD_ROOT"
make DESTDIR="$RPM_BUILD_ROOT" install
rm -rf %{buildroot}
make DESTDIR="%{buildroot}" install
%files
%defattr(-,root,root)
%doc AUTHORS BUGS COPYING ChangeLog INSTALL NEWS README THANKS TODO doc/faq.html doc/nanorc.sample
%{_bindir}/*
%{_mandir}/*/*
%{_mandir}/man*/*
%{_mandir}/fr/man*/*
%{_infodir}/nano.info*
%{_datadir}/locale/*/LC_MESSAGES/nano.mo
%{_datadir}/nano/*
%{_infodir}/nano.info*
%changelog
* Sat Mar 30 2002 Chris Allegretta <chrisa@asty.org>
- Accepted into main distribution
- Added Packager and URL tage from original spec file.
* Tue Mar 06 2002 Brett Pemberton <generica@email.com>
- Initial spec-file

View File

@@ -1,10 +1,52 @@
2006-12-06 David Lawrence Ramsey <pooka109@cox.net>
* hu.po: Removed unneeded duplicate plural forms again.
* ms.po: Fixed incorrect "Project-Id-Version" entry.
2006-12-06 Jordi Mallach <jordi@gnu.org>
* hu.po: Updated Hungarian translation by Gabor Kelemen.
* ms.po: Updated Malay translation by
Sharuzzaman Ahmat Raslan.
2006-11-20 David Lawrence Ramsey <pooka109@cox.net>
* tr.po: Removed unneeded blank plural forms, as gettext 0.15
generates errors upon encountering them.
2006-10-25 Jordi Mallach <jordi@gnu.org>
* fr.po: Updated French translation by Jean-Philippe Guérard.
* nb.po: Updated Norwegian bokmål translation by
Geir Helland.
2006-10-16 Jordi Mallach <jordi@gnu.org>
* gl.po: Updated Galician translation by
Francisco Javier Tsao Santín.
2006-10-16 Jordi Mallach <jordi@gnu.org>
* eu.po: Updated Basque translation by Mikel Olasagasti.
2006-10-10 Jordi Mallach <jordi@gnu.org>
* gl.po: Updated Galician translation by
Francisco Javier Tsao Santín.
2006-10-02 Jordi Mallach <jordi@gnu.org>
* pt_BR.po: Refetch the current nano 1.9.99pre0 pt_BR file from
the TP, as the latest file offered is apparently for 1.3.11pre1.
2006-10-02 David Lawrence Ramsey <pooka109@cox.net>
* pt_BR: Restore previous version of pt_BR, as it was for
* pt_BR.po: Restore previous version of pt_BR, as it was for
nano 1.9.99pre0, and the current version is for 1.3.11pre1.
2006-09-27 Jordi Mallach <jordi@gnu.org>
* pt_BR: Updated Brazilian Portuguese translation by
* pt_BR.po: Updated Brazilian Portuguese translation by
Joao Victor Duarte Martins.
2006-09-10 David Lawrence Ramsey <pooka109@cox.net>
@@ -17,7 +59,7 @@
2006-09-02 Jordi Mallach <jordi@gnu.org>
* pt_BR: Updated Brazilian Portuguese translation by
* pt_BR.po: Updated Brazilian Portuguese translation by
Joao Victor Duarte Martins.
2006-09-01 Benno Schulenberg <bensberg@justemail.net>
@@ -210,7 +252,7 @@
2005-04-22 Jordi Mallach <jordi@gnu.org>
* ca.po: Updated Norwegian bokmål translation by
* nb.po: Updated Norwegian bokmål translation by
Geir Helland.
2005-04-20 Jordi Mallach <jordi@gnu.org>

1822
po/eu.po

File diff suppressed because it is too large Load Diff

View File

@@ -11,7 +11,7 @@ msgstr ""
"Project-Id-Version: nano 1.9.99pre0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-08-19 07:34-0400\n"
"PO-Revision-Date: 2006-08-28 00:52+0200\n"
"PO-Revision-Date: 2006-10-16 23:32+0200\n"
"Last-Translator: Jean-Philippe Guérard <jean-philippe.guerard@corbeaunoir.org>\n"
"Language-Team: French <traduc@traduc.org>\n"
"MIME-Version: 1.0\n"
@@ -2168,7 +2168,7 @@ msgstr "--syntax=<cha
# File: src/nano.c, line: 791
#: src/nano.c:792
msgid "Syntax definition to use for coloring"
msgstr "Définition de la syntaxe de colorisation"
msgstr "Définit la syntaxe de colorisation"
#
# File: src/nano.c, line: 793

3331
po/gl.po

File diff suppressed because it is too large Load Diff

View File

@@ -665,11 +665,10 @@ msgstr "Kivágás"
msgid "UnJustify"
msgstr "Nem sork."
# fixme: jobb ötetek welcome
#. TRANSLATORS: Try to keep this at most 10 characters.
#: src/global.c:542
msgid "UnCut Text"
msgstr "Kivágatlan"
msgstr "Beillesztés"
#. TRANSLATORS: Try to keep this at most 10 characters.
#: src/global.c:547

1708
po/ms.po

File diff suppressed because it is too large Load Diff

2169
po/nb.po

File diff suppressed because it is too large Load Diff

View File

@@ -1,15 +1,15 @@
# Portugueses Translation for the nano textual domain
# Copyright (C) 2006 Free Software Foundation, Inc.
# This file is distributed under the same license as the nano package.
# Joao Victor Duarte Martins <jvdm@sdf.lonestar.org>, 2006.
# J. Victor D. Martins <jvdm@sdf.lonestar.org>, 2006.
#
msgid ""
msgstr ""
"Project-Id-Version: nano 1.9.99pre0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-08-19 07:34-0400\n"
"PO-Revision-Date: 2006-09-02 12:06-0300\n"
"Last-Translator: Joao Victor Duarte Martins <jvdm@sdf.lonestar.org>\n"
"PO-Revision-Date: 2006-09-27 02:13-0300\n"
"Last-Translator: J. Victor D. Martins <jvdm@sdf.lonestar.org>\n"
"Language-Team: Brazilian Portuguese <ldp-br@bazar.conectiva.com.br>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
@@ -1553,10 +1553,9 @@ msgstr "Falta o nome da cor"
msgid "Background color \"%s\" cannot be bright"
msgstr "Cor do fundo \"%s\" não pode ser clara"
# regex?
#: src/rcfile.c:503
msgid "Missing regex string"
msgstr "Falta string da regex"
msgstr "Falta a expressão regular"
#: src/rcfile.c:575
msgid "\"start=\" requires a corresponding \"end=\""
@@ -1820,26 +1819,26 @@ msgstr "Obrigado por utilizar o nano!"
#~ msgstr "Encontrar outro parenteses"
#~ msgid "Make the current search/replace case (in)sensitive"
#~ msgstr "Tornar a busca/substitução atual sensível a caixa"
#~ msgstr "Tornar a busca/reposição atual sensível a caixa"
#~ msgid "Make the current search/replace go backwards"
#~ msgstr "Tornar a busca/substituição atual de trás pra frente"
#~ msgstr "Tornar a busca/reposição atual ao contrário"
#~ msgid "Prepend to the current file"
#~ msgstr "Pré-Adicionar para a arquivo atual"
#~ msgstr "Pre-adicionar ao arquivo atual"
#~ msgid "Back up original file when saving"
#~ msgstr "Fazer o bacape do arquivo original quando salvá-lo"
#~ msgid "Insert into new buffer"
#~ msgstr "Inserir no novo buffer"
#~ msgstr "Inserir em um novo buffer"
#~ msgid ""
#~ "\n"
#~ "Buffer not written to %s (too many backup files?)\n"
#~ msgstr ""
#~ "\n"
#~ "Buffer não foi escrito no %s (muitos arquivos de bacape?)\n"
#~ "Buffer não foi escrito no %s (talvez muitos arquivos de segurança?)\n"
#~ msgid ""
#~ " nano help text\n"
@@ -1851,23 +1850,9 @@ msgstr "Obrigado por utilizar o nano!"
#~ msgstr ""
#~ " texto de ajuda do nano\n"
#~ "\n"
#~ "O editor nano foi projetado para emular as funcionalidades e as facilidades de uso\n"
#~ "do editor de texto UW Pico. Existem quatro grandes seções no editor editor: A\n"
#~ "linha superior mostra a versão do programa, o arquivo editado atualmente, e se\n"
#~ "o arquivo foi modificado ou não. A próxima é a a seção principal da tela do\n"
#~ "editor, mostrando o arquivo que está sendo editado. A linha de avisos é a\n"
#~ "terceira apartir da última e mostra mensagens importantes. As outras duas mostram\n"
#~ "os atalhos mais comuns utilizados no editor.\n"
#~ "O editor nano foi projetado para emular as funcionalidades e as facilidades de uso do editor de texto UW Pico. Existem quatro grandes seções no editor editor: A linha superior mostra a versão do programa, o arquivo editado atualmente, e se o arquivo foi modificado ou não. A próxima é a a seção principal da tela do editor, mostrando o arquivo que está sendo editado. A linha de avisos é a terceira apartir da última e mostra mensagens importantes. As outras duas mostram os atalhos mais comuns utilizados no editor.\n"
#~ "\n"
#~ " A notação para atalhos é a seguinte: Sequências de tecla-<Control> são grafadas\n"
#~ "com o cirfunflexo (^) e podem ser inseridas tanto utilizando as teclas <Ctrl> ou\n"
#~ "precionando <ESC> duas vezes. Sequências com teclas de escape são grafadas\n"
#~ "com o símbolo Meta (M) e podem tanto ser inseridas utilizando a telca <ESC>, <Alt>\n"
#~ "ou tecla meta, dependendo da configuração do seu teclado. Também precionando <ESC>\n"
#~ "duas vezes ou digitando um número de três dígitos de 000 à 255 você irá inserir\n"
#~ "um caractere correspondende ao respectivo código ASCII. Os seguintes atalhos de\n"
#~ "teclado estão disponíveis na tela principal do editor. Teclas alternativas são\n"
#~ "mostradas entre parenteses:\n"
#~ " A notação para atalhos é a seguinte: Sequências de tecla-<Control> são grafadas com o cirfunflexo (^) e podem ser inseridas tanto utilizando as teclas <Ctrl> ou precionando <ESC> duas vezes. Sequências com teclas de escape são grafadas com o símbolo Meta (M) e podem tanto ser inseridas utilizando a telca <ESC>, <Alt> ou tecla meta, dependendo da configuração do seu teclado. \"\n"
#~ "\n"
#~ msgid "Up"
@@ -1891,7 +1876,7 @@ msgstr "Obrigado por utilizar o nano!"
#~ msgstr "+LINHA"
#~ msgid "Do regular expression searches"
#~ msgstr "Expressão regular procurada"
#~ msgstr "Buscar por expressões regulares"
#~ msgid "Set fill cols to (wrap lines at) #cols"
#~ msgstr "Ajustar preenchimento de cols para (ajustar linhas em) #cols"

View File

@@ -30,21 +30,18 @@ msgstr "cutbuffer silindi =)\n"
msgid "Read %d line (Converted from Mac format)"
msgid_plural "Read %d lines (Converted from Mac format)"
msgstr[0] "%d satır okundu (Mac biçiminden dönüştürüldü)"
msgstr[1] ""
#: files.c:321
#, c-format
msgid "Read %d line (Converted from DOS format)"
msgid_plural "Read %d lines (Converted from DOS format)"
msgstr[0] "%d satır okundu (DOS biçiminden dönüştürüldü)"
msgstr[1] ""
#: files.c:326
#, c-format
msgid "Read %d line"
msgid_plural "Read %d lines"
msgstr[0] "%d satır okundu"
msgstr[1] ""
#: files.c:343 search.c:58
#, c-format
@@ -205,7 +202,6 @@ msgstr "%o izinleri %s dosyasına uygulanamadı: %s"
msgid "Wrote %d line"
msgid_plural "Wrote %d lines"
msgstr[0] "%d satır yazıldı"
msgstr[1] ""
#: files.c:1730
msgid " [Mac Format]"
@@ -1537,7 +1533,6 @@ msgstr "İle değiştir"
msgid "Replaced %d occurrence"
msgid_plural "Replaced %d occurrences"
msgstr[0] "%d değiştirme yapıldı"
msgstr[1] ""
#: search.c:777
msgid "Enter line number"

View File

@@ -2,8 +2,8 @@
/**************************************************************************
* browser.c *
* *
* Copyright (C) 2001-2004 Chris Allegretta *
* Copyright (C) 2005-2006 David Lawrence Ramsey *
* Copyright (C) 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
@@ -203,11 +203,11 @@ char *do_browser(char *path, DIR *dir)
if (selected > filelist_len - 1)
selected = filelist_len - 1;
break;
case NANO_FIRSTFILE_ALTKEY:
case NANO_FIRSTFILE_METAKEY:
if (meta_key)
selected = 0;
break;
case NANO_LASTFILE_ALTKEY:
case NANO_LASTFILE_METAKEY:
if (meta_key)
selected = filelist_len - 1;
break;
@@ -231,7 +231,9 @@ char *do_browser(char *path, DIR *dir)
#endif
bottombars(browser_list);
if (i < 0) {
/* If the directory begins with a newline (i.e. an
* encoded null), treat it as though it's blank. */
if (i < 0 || answer[0] == '\n') {
/* We canceled. Indicate that on the statusbar, and
* blank out ans, since we're done with it. */
statusbar(_("Cancelled"));
@@ -251,6 +253,11 @@ char *do_browser(char *path, DIR *dir)
* with it. */
ans = mallocstrcpy(ans, "");
/* Convert newlines to nulls, just before we go to the
* directory. */
sunder(answer);
align(&answer);
new_path = real_dir_from_tilde(answer);
if (new_path[0] != '/') {
@@ -621,19 +628,20 @@ void browser_refresh(void)
/* The length of the file information in columns. */
int foomaxlen = 7;
/* The maximum length of the file information in
* columns: 7 for "--", "(dir)", or the file size, and
* 12 for "(parent dir)". */
* columns: seven for "--", "(dir)", or the file size,
* and 12 for "(parent dir)". */
bool dots = (COLS >= 15 && filetaillen >= longest -
foomaxlen - 1);
/* Do we put an ellipsis before the filename? Don't set
* this to TRUE if we have fewer than 15 columns (i.e. 1
* column for padding, plus 7 columns for a filename
* other than ".."). */
* this to TRUE if we have fewer than 15 columns (i.e.
* one column for padding, plus seven columns for a
* filename other than ".."). */
char *disp = display_string(filetail, dots ? filetaillen -
longest + foomaxlen + 4 : 0, longest, FALSE);
/* If we put an ellipsis before the filename, reserve 1
* column for padding, plus 7 columns for "--", "(dir)",
* or the file size, plus 3 columns for the ellipsis. */
/* If we put an ellipsis before the filename, reserve
* one column for padding, plus seven columns for "--",
* "(dir)", or the file size, plus three columns for the
* ellipsis. */
/* Start highlighting the currently selected file or
* directory. */

View File

@@ -2,8 +2,8 @@
/**************************************************************************
* chars.c *
* *
* Copyright (C) 2001-2004 Chris Allegretta *
* Copyright (C) 2005-2006 David Lawrence Ramsey *
* Copyright (C) 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
@@ -514,10 +514,7 @@ int nstrncasecmp(const char *s1, const char *s2, size_t n)
break;
}
if (n > 0)
return tolower(*s1) - tolower(*s2);
else
return 0;
return (n > 0) ? tolower(*s1) - tolower(*s2) : 0;
}
#endif
@@ -578,8 +575,9 @@ int mbstrncasecmp(const char *s1, const char *s2, size_t n)
* from mutt 1.2.4i (lib.c). Here is the notice from that file, with
* the Free Software Foundation's address updated:
*
* Copyright (C) 1996-2000 Michael R. Elkins <me@cs.hmc.edu>
* Copyright (C) 1999-2000 Thomas Roessler <roessler@guug.de>
* Copyright (C) 1996, 1997, 1998, 1999, 2000 Michael R. Elkins
* <me@cs.hmc.edu>
* Copyright (C) 1999, 2000 Thomas Roessler <roessler@guug.de>
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General Public
@@ -1026,8 +1024,7 @@ bool is_valid_mbstring(const char *s)
return
#ifdef ENABLE_UTF8
use_utf8 ?
(mbstowcs(NULL, s, 0) != (size_t)-1) :
use_utf8 ? (mbstowcs(NULL, s, 0) != (size_t)-1) :
#endif
TRUE;
}

View File

@@ -2,8 +2,8 @@
/**************************************************************************
* color.c *
* *
* Copyright (C) 2001-2004 Chris Allegretta *
* Copyright (C) 2005-2006 David Lawrence Ramsey *
* Copyright (C) 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *

View File

@@ -2,8 +2,8 @@
/**************************************************************************
* cut.c *
* *
* Copyright (C) 1999-2004 Chris Allegretta *
* Copyright (C) 2005-2006 David Lawrence Ramsey *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
@@ -194,6 +194,10 @@ void do_cut_text(
cb_save->data -= cb_save_len;
} else
copy_from_filestruct(cutbuffer, cutbottom);
/* Set the current place we want to where the text from the
* cutbuffer ends. */
openfile->placewewant = xplustabs();
}
/* Set NO_NEWLINES back to what it was before, since we're done

View File

@@ -2,8 +2,8 @@
/**************************************************************************
* files.c *
* *
* Copyright (C) 1999-2004 Chris Allegretta *
* Copyright (C) 2005-2006 David Lawrence Ramsey *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
@@ -132,8 +132,8 @@ void open_buffer(const char *filename)
if (new_buffer)
make_new_buffer();
/* If we have a file and we're loading into a new buffer, update the
* filename. */
/* If we have a file, and we're loading into a new buffer, update
* the filename. */
if (rc != -1 && new_buffer)
openfile->filename = mallocstrcpy(openfile->filename, filename);
@@ -150,7 +150,7 @@ void open_buffer(const char *filename)
#endif
}
/* If we have a file and we're loading into a new buffer, move back
/* If we have a file, and we're loading into a new buffer, move back
* to the beginning of the first line of the buffer. */
if (rc != -1 && new_buffer) {
openfile->current = openfile->fileage;
@@ -294,8 +294,8 @@ filestruct *read_line(char *buf, filestruct *prevnode, bool
{
filestruct *fileptr = (filestruct *)nmalloc(sizeof(filestruct));
/* Convert nulls to newlines. buf_len is the string's real length
* here. */
/* Convert nulls to newlines. buf_len is the string's real
* length. */
unsunder(buf, buf_len);
assert(openfile->fileage != NULL && strlen(buf) == buf_len);
@@ -728,8 +728,10 @@ void do_insertfile(
"./");
/* If we're in multibuffer mode and the filename or command is
* blank, open a new buffer instead of canceling. */
if (i == -1 || (i == -2
* blank, open a new buffer instead of canceling. If the
* filename or command begins with a newline (i.e. an encoded
* null), treat it as though it's blank. */
if (i == -1 || ((i == -2 || answer[0] == '\n')
#ifdef ENABLE_MULTIBUFFER
&& !ISSET(MULTIBUFFER)
#endif
@@ -800,6 +802,11 @@ void do_insertfile(
}
#endif
/* Convert newlines to nulls, just before we insert the file
* or execute the command. */
sunder(answer);
align(&answer);
#ifndef NANO_TINY
if (execute) {
#ifdef ENABLE_MULTIBUFFER
@@ -954,13 +961,11 @@ char *get_full_path(const char *origpath)
d_there = real_dir_from_tilde(origpath);
assert(d_there != NULL);
/* If stat()ing d_there fails, assume that d_there refers to a new
* file that hasn't been saved to disk yet. Set path_only to TRUE
* if d_there refers to a directory, and FALSE otherwise. */
path_only = stat(d_there, &fileinfo) == 0 &&
S_ISDIR(fileinfo.st_mode);
path_only = (stat(d_there, &fileinfo) != -1 &&
S_ISDIR(fileinfo.st_mode));
/* If path_only is TRUE, make sure d_there ends in a slash. */
if (path_only) {
@@ -988,8 +993,7 @@ char *get_full_path(const char *origpath)
if (!path_only)
d_there_file = mallocstrcpy(NULL, last_slash + 1);
/* And remove the filename portion of the answer from
* d_there. */
/* Remove the filename portion of the answer from d_there. */
null_at(&d_there, last_slash - d_there + 1);
/* Go to the path specified in d_there. */
@@ -1021,28 +1025,29 @@ char *get_full_path(const char *origpath)
/* Finally, go back to the path specified in d_here,
* where we were before. We don't check for a chdir()
* error, since we can do nothing then. */
* error, since we can do nothing if we get one. */
chdir(d_here);
/* Free d_here, since we're done using it. */
free(d_here);
}
/* At this point, if path_only is FALSE and d_there isn't NULL,
* d_there contains the path portion of the answer and
* d_there_file contains the filename portion of the answer. If
* this is the case, tack the latter onto the end of the former.
* d_there will then contain the complete answer. */
if (!path_only && d_there != NULL) {
d_there = charealloc(d_there, strlen(d_there) +
strlen(d_there_file) + 1);
strcat(d_there, d_there_file);
}
/* Free d_there_file, since we're done using it. */
free(d_there_file);
}
/* At this point, if path_only is FALSE and d_there isn't NULL,
* d_there contains the path portion of the answer and d_there_file
* contains the filename portion of the answer. If this is the
* case, tack the latter onto the end of the former. d_there will
* then contain the complete answer. */
if (!path_only && d_there != NULL) {
d_there = charealloc(d_there, strlen(d_there) +
strlen(d_there_file) + 1);
strcat(d_there, d_there_file);
}
/* Free d_there_file, since we're done using it. */
if (d_there_file != NULL)
free(d_there_file);
return d_there;
}
@@ -1145,10 +1150,10 @@ void init_operating_dir(void)
* so that tab completion will work. */
bool check_operating_dir(const char *currpath, bool allow_tabcomp)
{
/* The char *full_operating_dir is global for mem cleanup. It
* should have already been initialized by init_operating_dir().
* Also, a relative operating directory path will only be handled
* properly if this is done. */
/* full_operating_dir is global for memory cleanup. It should have
* already been initialized by init_operating_dir(). Also, a
* relative operating directory path will only be handled properly
* if this is done. */
char *fullpath;
bool retval = FALSE;
@@ -1566,12 +1571,13 @@ int write_file(const char *name, FILE *f_open, bool tmp, append_type
while (fileptr != NULL) {
size_t data_len = strlen(fileptr->data), size;
/* Newlines to nulls, just before we write to disk. */
/* Convert newlines to nulls, just before we write to disk. */
sunder(fileptr->data);
size = fwrite(fileptr->data, sizeof(char), data_len, f);
/* Nulls to newlines; data_len is the string's real length. */
/* Convert nulls to newlines. data_len is the string's real
* length. */
unsunder(fileptr->data, data_len);
if (size < data_len) {
@@ -1684,7 +1690,8 @@ int write_file(const char *name, FILE *f_open, bool tmp, append_type
cleanup_and_exit:
free(realname);
free(tempname);
if (tempname != NULL)
free(tempname);
return retval;
}
@@ -1763,7 +1770,7 @@ int do_writeout(bool exiting)
ans = mallocstrcpy(NULL,
#ifndef NANO_TINY
(openfile->mark_set && !exiting) ? "" :
(!exiting && openfile->mark_set) ? "" :
#endif
openfile->filename);
@@ -1778,7 +1785,7 @@ int do_writeout(bool exiting)
backupstr = ISSET(BACKUP_FILE) ? _(" [Backup]") : "";
if (openfile->mark_set && !exiting)
if (!exiting && openfile->mark_set)
msg = (append == PREPEND) ?
_("Prepend Selection to File") : (append == APPEND) ?
_("Append Selection to File") :
@@ -1809,7 +1816,9 @@ int do_writeout(bool exiting)
#endif
);
if (i < 0) {
/* If the filename or command begins with a newline (i.e. an
* encoded null), treat it as though it's blank. */
if (i < 0 || answer[0] == '\n') {
statusbar(_("Cancelled"));
retval = -1;
break;
@@ -1869,42 +1878,77 @@ int do_writeout(bool exiting)
break;
}
#endif
if (append == OVERWRITE && strcmp(answer,
openfile->filename) != 0) {
if (append == OVERWRITE) {
size_t answer_len = strlen(answer);
bool name_exists, different_name;
char *full_answer, *full_filename;
struct stat st;
if (!stat(answer, &st)) {
i = do_yesno_prompt(FALSE,
_("File exists, OVERWRITE ? "));
if (i == 0 || i == -1)
continue;
/* If we're using restricted mode, we aren't allowed to
* change the name of a file once it has one, because
* that would allow reading from or writing to files not
* specified on the command line. In this case, don't
* bother showing the "Different Name" prompt. */
} else if (!ISSET(RESTRICTED) &&
/* Convert newlines to nulls, just before we get the
* full path. */
sunder(answer);
name_exists = (stat(answer, &st) != -1);
full_answer = get_full_path(answer);
full_filename = get_full_path(openfile->filename);
different_name = (strcmp((full_answer == NULL) ?
answer : full_answer, (full_filename == NULL) ?
openfile->filename : full_filename) != 0);
/* Convert nulls to newlines. answer_len is the
* string's real length. */
unsunder(answer, answer_len);
if (full_filename != NULL)
free(full_filename);
if (full_answer != NULL)
free(full_answer);
if (different_name) {
if (name_exists) {
/* If we're using restricted mode, we aren't
* allowed to save a new file under the name of
* an existing file. */
if (ISSET(RESTRICTED))
continue;
i = do_yesno_prompt(FALSE,
_("File exists, OVERWRITE ? "));
if (i == 0 || i == -1)
continue;
/* If we're using restricted mode, we aren't allowed
* to change the name of a file once it has one,
* because that would allow reading from or writing
* to files not specified on the command line. */
} else if (!ISSET(RESTRICTED) &&
openfile->filename[0] != '\0'
#ifndef NANO_TINY
&& (exiting || !openfile->mark_set)
#endif
) {
i = do_yesno_prompt(FALSE,
_("Save file under DIFFERENT NAME ? "));
if (i == 0 || i == -1)
continue;
i = do_yesno_prompt(FALSE,
_("Save file under DIFFERENT NAME ? "));
if (i == 0 || i == -1)
continue;
}
}
}
/* Convert newlines to nulls, just before we save the
* file. */
sunder(answer);
align(&answer);
#ifndef NANO_TINY
/* Here's where we allow the selected text to be written to
* a separate file. If we're using restricted mode, this is
* disabled since it allows reading from or writing to files
* not specified on the command line. */
* disabled, since it allows reading from or writing to
* files not specified on the command line. */
if (!ISSET(RESTRICTED) && !exiting && openfile->mark_set)
retval = write_marked_file(answer, NULL, FALSE, append);
else
#endif /* !NANO_TINY */
#endif
retval = write_file(answer, NULL, FALSE, append, FALSE);
break;
@@ -2239,16 +2283,17 @@ char *input_tab(char *buf, bool allow_files, size_t *place, bool
free(match2_mb);
mzero = charalloc(lastslash_len + common_len + 1);
sprintf(mzero, "%.*s%.*s", lastslash_len, buf, common_len,
matches[0]);
strncpy(mzero, buf, lastslash_len);
strncpy(mzero + lastslash_len, matches[0], common_len);
common_len += lastslash_len;
mzero[common_len] = '\0';
assert(common_len >= *place);
if (num_matches == 1 && is_dir(mzero)) {
mzero[common_len] = '/';
common_len++;
mzero[common_len++] = '/';
assert(common_len > *place);
}
@@ -2365,8 +2410,9 @@ const char *tail(const char *foo)
}
#if !defined(NANO_TINY) && defined(ENABLE_NANORC)
/* Return $HOME/.nano_history, or NULL if we can't find the homedir.
* The string is dynamically allocated, and should be freed. */
/* Return $HOME/.nano_history, or NULL if we can't find the home
* directory. The string is dynamically allocated, and should be
* freed. */
char *histfilename(void)
{
char *nanohist = NULL;
@@ -2378,6 +2424,7 @@ char *histfilename(void)
strcpy(nanohist, homedir);
strcpy(nanohist + homelen, "/.nano_history");
}
return nanohist;
}
@@ -2402,9 +2449,9 @@ void load_history(void)
;
}
} else {
/* Load a history (first the search history, then the
* replace history) from oldest to newest. Assume the last
* history entry is a blank line. */
/* Load a history list (first the search history, then the
* replace history) from the oldest entry to the newest.
* Assume the last history entry is a blank line. */
filestruct **history = &search_history;
char *line = NULL;
size_t buflen = 0;
@@ -2436,8 +2483,8 @@ bool writehist(FILE *hist, filestruct *h)
{
filestruct *p;
/* Write history from oldest to newest. Assume the last history
* entry is a blank line. */
/* Write a history list from the oldest entry to the newest. Assume
* the last history entry is a blank line. */
for (p = h; p != NULL; p = p->next) {
size_t p_len = strlen(p->data);

View File

@@ -2,8 +2,8 @@
/**************************************************************************
* global.c *
* *
* Copyright (C) 1999-2004 Chris Allegretta *
* Copyright (C) 2005-2006 David Lawrence Ramsey *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
@@ -26,7 +26,7 @@
/* Global variables. */
#ifndef NANO_TINY
sigjmp_buf jump_buf;
/* Used to return to main() or the unjustify routine in
/* Used to return to either main() or the unjustify routine in
* do_justify() after a SIGWINCH. */
bool jump_buf_main = FALSE;
/* Have we set jump_buf so that we return to main() after a
@@ -558,21 +558,21 @@ void shortcut_init(bool unjustify)
nano_disabled_msg);
sc_init_one(&main_list, NANO_GOTOLINE_KEY, go_to_line_msg,
IFSCHELP(nano_gotoline_msg, FALSE, NANO_GOTOLINE_ALTKEY),
IFSCHELP(nano_gotoline_msg, FALSE, NANO_GOTOLINE_METAKEY),
NANO_GOTOLINE_FKEY, NANO_NO_KEY, VIEW,
do_gotolinecolumn_void);
sc_init_one(&main_list, NANO_REPLACE_KEY, replace_msg
#ifndef NANO_TINY
, IFSCHELP(nano_replace_msg, FALSE, NANO_ALT_REPLACE_KEY)
, IFSCHELP(nano_replace_msg, FALSE, NANO_REPLACE_METAKEY)
#else
, IFSCHELP(nano_replace_msg, TRUE, NANO_ALT_REPLACE_KEY)
, IFSCHELP(nano_replace_msg, TRUE, NANO_REPLACE_METAKEY)
#endif
, NANO_REPLACE_FKEY, NANO_NO_KEY, NOVIEW, do_replace);
#ifndef NANO_TINY
sc_init_one(&main_list, NANO_MARK_KEY, N_("Mark Text"),
IFSCHELP(nano_mark_msg, FALSE, NANO_MARK_ALTKEY),
IFSCHELP(nano_mark_msg, FALSE, NANO_MARK_METAKEY),
NANO_MARK_FKEY, NANO_NO_KEY, VIEW, do_mark);
sc_init_one(&main_list, NANO_NO_KEY, whereis_next_msg,
@@ -581,7 +581,7 @@ void shortcut_init(bool unjustify)
sc_init_one(&main_list, NANO_NO_KEY, N_("Copy Text"),
IFSCHELP(nano_copy_msg, FALSE, NANO_COPY_KEY), NANO_NO_KEY,
NANO_COPY_ALTKEY, NOVIEW, do_copy_text);
NANO_COPY_METAKEY, NOVIEW, do_copy_text);
sc_init_one(&main_list, NANO_NO_KEY, N_("Indent Text"),
IFSCHELP(nano_indent_msg, FALSE, NANO_INDENT_KEY), NANO_NO_KEY,
@@ -628,21 +628,21 @@ void shortcut_init(bool unjustify)
#ifndef DISABLE_JUSTIFY
sc_init_one(&main_list, NANO_NO_KEY, beg_of_par_msg,
IFSCHELP(nano_parabegin_msg, FALSE, NANO_PARABEGIN_ALTKEY),
NANO_NO_KEY, NANO_PARABEGIN_ALTKEY2, VIEW, do_para_begin_void);
IFSCHELP(nano_parabegin_msg, FALSE, NANO_PARABEGIN_METAKEY),
NANO_NO_KEY, NANO_PARABEGIN_METAKEY2, VIEW, do_para_begin_void);
sc_init_one(&main_list, NANO_NO_KEY, end_of_par_msg,
IFSCHELP(nano_paraend_msg, FALSE, NANO_PARAEND_ALTKEY),
NANO_NO_KEY, NANO_PARAEND_ALTKEY2, VIEW, do_para_end_void);
IFSCHELP(nano_paraend_msg, FALSE, NANO_PARAEND_METAKEY),
NANO_NO_KEY, NANO_PARAEND_METAKEY2, VIEW, do_para_end_void);
#endif
sc_init_one(&main_list, NANO_NO_KEY, first_line_msg,
IFSCHELP(nano_firstline_msg, FALSE, NANO_FIRSTLINE_ALTKEY),
NANO_NO_KEY, NANO_FIRSTLINE_ALTKEY2, VIEW, do_first_line);
IFSCHELP(nano_firstline_msg, FALSE, NANO_FIRSTLINE_METAKEY),
NANO_NO_KEY, NANO_FIRSTLINE_METAKEY2, VIEW, do_first_line);
sc_init_one(&main_list, NANO_NO_KEY, last_line_msg,
IFSCHELP(nano_lastline_msg, TRUE, NANO_LASTLINE_ALTKEY),
NANO_NO_KEY, NANO_LASTLINE_ALTKEY2, VIEW, do_last_line);
IFSCHELP(nano_lastline_msg, TRUE, NANO_LASTLINE_METAKEY),
NANO_NO_KEY, NANO_LASTLINE_METAKEY2, VIEW, do_last_line);
#ifndef NANO_TINY
sc_init_one(&main_list, NANO_NO_KEY, N_("Find Other Bracket"),
@@ -651,22 +651,22 @@ void shortcut_init(bool unjustify)
sc_init_one(&main_list, NANO_NO_KEY, N_("Scroll Up"),
IFSCHELP(nano_scrollup_msg, FALSE, NANO_SCROLLUP_KEY),
NANO_NO_KEY, NANO_SCROLLUP_ALTKEY, VIEW, do_scroll_up);
NANO_NO_KEY, NANO_SCROLLUP_METAKEY, VIEW, do_scroll_up);
sc_init_one(&main_list, NANO_NO_KEY, N_("Scroll Down"),
IFSCHELP(nano_scrolldown_msg, TRUE, NANO_SCROLLDOWN_KEY),
NANO_NO_KEY, NANO_SCROLLDOWN_ALTKEY, VIEW, do_scroll_down);
NANO_NO_KEY, NANO_SCROLLDOWN_METAKEY, VIEW, do_scroll_down);
#endif
#ifdef ENABLE_MULTIBUFFER
sc_init_one(&main_list, NANO_NO_KEY, N_("Previous File"),
IFSCHELP(nano_prevfile_msg, FALSE, NANO_PREVFILE_KEY),
NANO_NO_KEY, NANO_PREVFILE_ALTKEY, VIEW,
NANO_NO_KEY, NANO_PREVFILE_METAKEY, VIEW,
switch_to_prev_buffer_void);
sc_init_one(&main_list, NANO_NO_KEY, N_("Next File"),
IFSCHELP(nano_nextfile_msg, TRUE, NANO_NEXTFILE_KEY),
NANO_NO_KEY, NANO_NEXTFILE_ALTKEY, VIEW,
NANO_NO_KEY, NANO_NEXTFILE_METAKEY, VIEW,
switch_to_next_buffer_void);
#endif
@@ -696,13 +696,13 @@ void shortcut_init(bool unjustify)
#ifndef NANO_TINY
sc_init_one(&main_list, NANO_NO_KEY, N_("CutTillEnd"),
IFSCHELP(nano_cut_till_end_msg, TRUE, NANO_CUTTILLEND_ALTKEY),
IFSCHELP(nano_cut_till_end_msg, TRUE, NANO_CUTTILLEND_METAKEY),
NANO_NO_KEY, NANO_NO_KEY, NOVIEW, do_cut_till_end);
#endif
#ifndef DISABLE_JUSTIFY
sc_init_one(&main_list, NANO_NO_KEY, fulljstify_msg,
IFSCHELP(nano_fulljustify_msg, FALSE, NANO_FULLJUSTIFY_ALTKEY),
IFSCHELP(nano_fulljustify_msg, FALSE, NANO_FULLJUSTIFY_METAKEY),
NANO_NO_KEY, NANO_NO_KEY, NOVIEW, do_full_justify);
#endif
@@ -737,13 +737,13 @@ void shortcut_init(bool unjustify)
NANO_NO_KEY, VIEW, NULL);
sc_init_one(&whereis_list, NANO_FIRSTLINE_KEY, first_line_msg,
IFSCHELP(nano_firstline_msg, FALSE, NANO_FIRSTLINE_ALTKEY),
NANO_FIRSTLINE_FKEY, NANO_FIRSTLINE_ALTKEY2, VIEW,
IFSCHELP(nano_firstline_msg, FALSE, NANO_FIRSTLINE_METAKEY),
NANO_FIRSTLINE_FKEY, NANO_FIRSTLINE_METAKEY2, VIEW,
do_first_line);
sc_init_one(&whereis_list, NANO_LASTLINE_KEY, last_line_msg,
IFSCHELP(nano_lastline_msg, FALSE, NANO_LASTLINE_ALTKEY),
NANO_LASTLINE_FKEY, NANO_LASTLINE_ALTKEY2, VIEW, do_last_line);
IFSCHELP(nano_lastline_msg, FALSE, NANO_LASTLINE_METAKEY),
NANO_LASTLINE_FKEY, NANO_LASTLINE_METAKEY2, VIEW, do_last_line);
sc_init_one(&whereis_list, NANO_TOOTHERSEARCH_KEY, replace_msg,
IFSCHELP(nano_replace_msg, FALSE, NANO_NO_KEY),
@@ -755,12 +755,12 @@ void shortcut_init(bool unjustify)
#ifndef DISABLE_JUSTIFY
sc_init_one(&whereis_list, NANO_PARABEGIN_KEY, beg_of_par_msg,
IFSCHELP(nano_parabegin_msg, FALSE, NANO_PARABEGIN_ALTKEY),
NANO_NO_KEY, NANO_PARABEGIN_ALTKEY2, VIEW, do_para_begin_void);
IFSCHELP(nano_parabegin_msg, FALSE, NANO_PARABEGIN_METAKEY),
NANO_NO_KEY, NANO_PARABEGIN_METAKEY2, VIEW, do_para_begin_void);
sc_init_one(&whereis_list, NANO_PARAEND_KEY, end_of_par_msg,
IFSCHELP(nano_paraend_msg, FALSE, NANO_PARAEND_ALTKEY),
NANO_NO_KEY, NANO_PARAEND_ALTKEY2, VIEW, do_para_end_void);
IFSCHELP(nano_paraend_msg, FALSE, NANO_PARAEND_METAKEY),
NANO_NO_KEY, NANO_PARAEND_METAKEY2, VIEW, do_para_end_void);
#endif
#ifndef NANO_TINY
@@ -791,7 +791,7 @@ void shortcut_init(bool unjustify)
#ifndef DISABLE_JUSTIFY
sc_init_one(&whereis_list, NANO_FULLJUSTIFY_KEY, fulljstify_msg,
IFSCHELP(nano_fulljustify_msg, FALSE, NANO_FULLJUSTIFY_ALTKEY),
IFSCHELP(nano_fulljustify_msg, FALSE, NANO_FULLJUSTIFY_METAKEY),
NANO_NO_KEY, NANO_NO_KEY, NOVIEW, do_full_justify);
#endif
@@ -812,13 +812,13 @@ void shortcut_init(bool unjustify)
NANO_NO_KEY, VIEW, NULL);
sc_init_one(&replace_list, NANO_FIRSTLINE_KEY, first_line_msg,
IFSCHELP(nano_firstline_msg, FALSE, NANO_FIRSTLINE_ALTKEY),
NANO_FIRSTLINE_FKEY, NANO_FIRSTLINE_ALTKEY2, VIEW,
IFSCHELP(nano_firstline_msg, FALSE, NANO_FIRSTLINE_METAKEY),
NANO_FIRSTLINE_FKEY, NANO_FIRSTLINE_METAKEY2, VIEW,
do_first_line);
sc_init_one(&replace_list, NANO_LASTLINE_KEY, last_line_msg,
IFSCHELP(nano_lastline_msg, FALSE, NANO_LASTLINE_ALTKEY),
NANO_LASTLINE_FKEY, NANO_LASTLINE_ALTKEY2, VIEW, do_last_line);
IFSCHELP(nano_lastline_msg, FALSE, NANO_LASTLINE_METAKEY),
NANO_LASTLINE_FKEY, NANO_LASTLINE_METAKEY2, VIEW, do_last_line);
/* TRANSLATORS: Try to keep this at most 12 characters. */
sc_init_one(&replace_list, NANO_TOOTHERSEARCH_KEY, N_("No Replace"),
@@ -868,13 +868,13 @@ void shortcut_init(bool unjustify)
NANO_NO_KEY, VIEW, NULL);
sc_init_one(&replace_list_2, NANO_FIRSTLINE_KEY, first_line_msg,
IFSCHELP(nano_firstline_msg, FALSE, NANO_FIRSTLINE_ALTKEY),
NANO_FIRSTLINE_FKEY, NANO_FIRSTLINE_ALTKEY2, VIEW,
IFSCHELP(nano_firstline_msg, FALSE, NANO_FIRSTLINE_METAKEY),
NANO_FIRSTLINE_FKEY, NANO_FIRSTLINE_METAKEY2, VIEW,
do_first_line);
sc_init_one(&replace_list_2, NANO_LASTLINE_KEY, last_line_msg,
IFSCHELP(nano_lastline_msg, FALSE, NANO_LASTLINE_ALTKEY),
NANO_LASTLINE_FKEY, NANO_LASTLINE_ALTKEY2, VIEW, do_last_line);
IFSCHELP(nano_lastline_msg, FALSE, NANO_LASTLINE_METAKEY),
NANO_LASTLINE_FKEY, NANO_LASTLINE_METAKEY2, VIEW, do_last_line);
#ifndef NANO_TINY
sc_init_one(&replace_list_2, NANO_PREVLINE_KEY, prev_history_msg,
@@ -903,13 +903,13 @@ void shortcut_init(bool unjustify)
NANO_NO_KEY, VIEW, NULL);
sc_init_one(&gotoline_list, NANO_FIRSTLINE_KEY, first_line_msg,
IFSCHELP(nano_firstline_msg, FALSE, NANO_FIRSTLINE_ALTKEY),
NANO_FIRSTLINE_FKEY, NANO_FIRSTLINE_ALTKEY2, VIEW,
IFSCHELP(nano_firstline_msg, FALSE, NANO_FIRSTLINE_METAKEY),
NANO_FIRSTLINE_FKEY, NANO_FIRSTLINE_METAKEY2, VIEW,
do_first_line);
sc_init_one(&gotoline_list, NANO_LASTLINE_KEY, last_line_msg,
IFSCHELP(nano_lastline_msg, FALSE, NANO_LASTLINE_ALTKEY),
NANO_LASTLINE_FKEY, NANO_LASTLINE_ALTKEY2, VIEW, do_last_line);
IFSCHELP(nano_lastline_msg, FALSE, NANO_LASTLINE_METAKEY),
NANO_LASTLINE_FKEY, NANO_LASTLINE_METAKEY2, VIEW, do_last_line);
sc_init_one(&gotoline_list, NANO_TOOTHERWHEREIS_KEY,
N_("Go To Text"), IFSCHELP(nano_whereis_msg, FALSE,
@@ -1082,12 +1082,12 @@ void shortcut_init(bool unjustify)
NANO_NO_KEY, VIEW, NULL);
sc_init_one(&help_list, NANO_NO_KEY, first_line_msg,
IFSCHELP(nano_firstline_msg, FALSE, NANO_FIRSTLINE_ALTKEY),
NANO_NO_KEY, NANO_FIRSTLINE_ALTKEY2, VIEW, NULL);
IFSCHELP(nano_firstline_msg, FALSE, NANO_FIRSTLINE_METAKEY),
NANO_NO_KEY, NANO_FIRSTLINE_METAKEY2, VIEW, NULL);
sc_init_one(&help_list, NANO_NO_KEY, last_line_msg,
IFSCHELP(nano_lastline_msg, TRUE, NANO_LASTLINE_ALTKEY),
NANO_NO_KEY, NANO_LASTLINE_ALTKEY2, VIEW, NULL);
IFSCHELP(nano_lastline_msg, TRUE, NANO_LASTLINE_METAKEY),
NANO_NO_KEY, NANO_LASTLINE_METAKEY2, VIEW, NULL);
#endif
#ifndef DISABLE_SPELLER
@@ -1136,16 +1136,16 @@ void shortcut_init(bool unjustify)
NANO_NEXTPAGE_FKEY, NANO_NO_KEY, VIEW, NULL);
sc_init_one(&browser_list, NANO_NO_KEY, first_file_msg,
IFSCHELP(nano_firstfile_msg, FALSE, NANO_FIRSTFILE_ALTKEY),
NANO_NO_KEY, NANO_FIRSTFILE_ALTKEY2, VIEW, NULL);
IFSCHELP(nano_firstfile_msg, FALSE, NANO_FIRSTFILE_METAKEY),
NANO_NO_KEY, NANO_FIRSTFILE_METAKEY2, VIEW, NULL);
sc_init_one(&browser_list, NANO_NO_KEY, last_file_msg,
IFSCHELP(nano_lastfile_msg, FALSE, NANO_LASTFILE_ALTKEY),
NANO_NO_KEY, NANO_LASTFILE_ALTKEY2, VIEW, NULL);
IFSCHELP(nano_lastfile_msg, FALSE, NANO_LASTFILE_METAKEY),
NANO_NO_KEY, NANO_LASTFILE_METAKEY2, VIEW, NULL);
/* TRANSLATORS: Try to keep this at most 12 characters. */
sc_init_one(&browser_list, NANO_GOTODIR_KEY, N_("Go To Dir"),
IFSCHELP(nano_gotodir_msg, FALSE, NANO_GOTODIR_ALTKEY),
IFSCHELP(nano_gotodir_msg, FALSE, NANO_GOTODIR_METAKEY),
NANO_GOTODIR_FKEY, NANO_NO_KEY, VIEW, NULL);
free_shortcutage(&whereis_file_list);
@@ -1165,13 +1165,13 @@ void shortcut_init(bool unjustify)
NANO_NO_KEY, VIEW, NULL);
sc_init_one(&whereis_file_list, NANO_FIRSTFILE_KEY, first_file_msg,
IFSCHELP(nano_firstfile_msg, FALSE, NANO_FIRSTFILE_ALTKEY),
NANO_FIRSTFILE_FKEY, NANO_FIRSTFILE_ALTKEY2, VIEW,
IFSCHELP(nano_firstfile_msg, FALSE, NANO_FIRSTFILE_METAKEY),
NANO_FIRSTFILE_FKEY, NANO_FIRSTFILE_METAKEY2, VIEW,
do_first_file);
sc_init_one(&whereis_file_list, NANO_LASTFILE_KEY, last_file_msg,
IFSCHELP(nano_lastfile_msg, FALSE, NANO_LASTFILE_ALTKEY),
NANO_LASTFILE_FKEY, NANO_LASTFILE_ALTKEY2, VIEW, do_last_file);
IFSCHELP(nano_lastfile_msg, FALSE, NANO_LASTFILE_METAKEY),
NANO_LASTFILE_FKEY, NANO_LASTFILE_METAKEY2, VIEW, do_last_file);
#ifndef NANO_SMALL
sc_init_one(&whereis_file_list, NANO_NO_KEY, case_sens_msg,

View File

@@ -2,8 +2,8 @@
/**************************************************************************
* help.c *
* *
* Copyright (C) 2000-2004 Chris Allegretta *
* Copyright (C) 2005-2006 David Lawrence Ramsey *
* Copyright (C) 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
@@ -159,11 +159,11 @@ void do_help(void (*refresh_func)(void))
if (line + (editwinrows - 1) < last_line)
line++;
break;
case NANO_FIRSTLINE_ALTKEY:
case NANO_FIRSTLINE_METAKEY:
if (meta_key)
line = 0;
break;
case NANO_LASTLINE_ALTKEY:
case NANO_LASTLINE_METAKEY:
if (meta_key) {
if (line + (editwinrows - 1) < last_line)
line = last_line - (editwinrows - 1);
@@ -493,7 +493,7 @@ void help_init(void)
}
/* Yucky sentinel values that we can't handle a better
* way. */
if (s->metaval == NANO_ALT_SPACE && entries == 1) {
if (s->metaval == NANO_META_SPACE && entries == 1) {
char *space_ptr = display_string(_("Space"), 0, 13,
FALSE);
@@ -586,6 +586,8 @@ void parse_help_input(int *kbinput, bool *meta_key, bool *func_key)
break;
/* Cancel is equivalent to Exit here. */
case NANO_CANCEL_KEY:
case 'E':
case 'e':
*kbinput = NANO_EXIT_KEY;
break;
}
@@ -607,8 +609,8 @@ size_t help_line_len(const char *ptr)
while (*(ptr + retval) != '\0' && *(ptr + retval) != '\n')
retval += move_mbright(ptr + retval, 0);
/* If the entire line doesn't go more than 1 column beyond where we
* tried to break it, we should display it as-is. Otherwise, we
/* If the entire line doesn't go more than one column beyond where
* we tried to break it, we should display it as-is. Otherwise, we
* should display it only up to the break. */
if (strnlenpt(ptr, retval) > help_cols + 1)
retval = retval_save;

View File

@@ -2,8 +2,8 @@
/**************************************************************************
* move.c *
* *
* Copyright (C) 1999-2004 Chris Allegretta *
* Copyright (C) 2005-2006 David Lawrence Ramsey *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *

View File

@@ -2,8 +2,8 @@
/**************************************************************************
* nano.c *
* *
* Copyright (C) 1999-2004 Chris Allegretta *
* Copyright (C) 2005-2006 David Lawrence Ramsey *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
@@ -1553,8 +1553,8 @@ void do_output(char *output, size_t output_len, bool allow_cntrls)
current_len = strlen(openfile->current->data);
while (i < output_len) {
/* If allow_cntrls is FALSE, filter out nulls and newlines,
* since they're ASCII control characters. */
/* If allow_cntrls is TRUE, convert nulls and newlines
* properly. */
if (allow_cntrls) {
/* Null to newline, if needed. */
if (output[i] == '\0')
@@ -1579,7 +1579,7 @@ void do_output(char *output, size_t output_len, bool allow_cntrls)
continue;
/* If the NO_NEWLINES flag isn't set, when a character is
* added to the magicline, it means we need a new magicline! */
* added to the magicline, it means we need a new magicline. */
if (!ISSET(NO_NEWLINES) && openfile->filebot ==
openfile->current)
new_magicline();
@@ -1922,7 +1922,7 @@ int main(int argc, char **argv)
}
}
/* If the executable filename starts with 'r', we use restricted
/* If the executable filename starts with 'r', enable restricted
* mode. */
if (*(tail(argv[0])) == 'r')
SET(RESTRICTED);

View File

@@ -2,8 +2,8 @@
/**************************************************************************
* nano.h *
* *
* Copyright (C) 1999-2004 Chris Allegretta *
* Copyright (C) 2005-2006 David Lawrence Ramsey *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
@@ -412,54 +412,54 @@ typedef struct rcoption {
#define NANO_CONTROL_8 127
/* Meta key sequences. */
#define NANO_ALT_SPACE ' '
#define NANO_ALT_LPARENTHESIS '('
#define NANO_ALT_RPARENTHESIS ')'
#define NANO_ALT_PLUS '+'
#define NANO_ALT_COMMA ','
#define NANO_ALT_MINUS '-'
#define NANO_ALT_PERIOD '.'
#define NANO_ALT_SLASH '/'
#define NANO_ALT_0 '0'
#define NANO_ALT_6 '6'
#define NANO_ALT_9 '9'
#define NANO_ALT_LCARET '<'
#define NANO_ALT_EQUALS '='
#define NANO_ALT_RCARET '>'
#define NANO_ALT_QUESTION '?'
#define NANO_ALT_BACKSLASH '\\'
#define NANO_ALT_RBRACKET ']'
#define NANO_ALT_CARET '^'
#define NANO_ALT_UNDERSCORE '_'
#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_LCURLYBRACKET '{'
#define NANO_ALT_PIPE '|'
#define NANO_ALT_RCURLYBRACKET '}'
#define NANO_META_SPACE ' '
#define NANO_META_LPARENTHESIS '('
#define NANO_META_RPARENTHESIS ')'
#define NANO_META_PLUS '+'
#define NANO_META_COMMA ','
#define NANO_META_MINUS '-'
#define NANO_META_PERIOD '.'
#define NANO_META_SLASH '/'
#define NANO_META_0 '0'
#define NANO_META_6 '6'
#define NANO_META_9 '9'
#define NANO_META_LCARET '<'
#define NANO_META_EQUALS '='
#define NANO_META_RCARET '>'
#define NANO_META_QUESTION '?'
#define NANO_META_BACKSLASH '\\'
#define NANO_META_RBRACKET ']'
#define NANO_META_CARET '^'
#define NANO_META_UNDERSCORE '_'
#define NANO_META_A 'a'
#define NANO_META_B 'b'
#define NANO_META_C 'c'
#define NANO_META_D 'd'
#define NANO_META_E 'e'
#define NANO_META_F 'f'
#define NANO_META_G 'g'
#define NANO_META_H 'h'
#define NANO_META_I 'i'
#define NANO_META_J 'j'
#define NANO_META_K 'k'
#define NANO_META_L 'l'
#define NANO_META_M 'm'
#define NANO_META_N 'n'
#define NANO_META_O 'o'
#define NANO_META_P 'p'
#define NANO_META_Q 'q'
#define NANO_META_R 'r'
#define NANO_META_S 's'
#define NANO_META_T 't'
#define NANO_META_U 'u'
#define NANO_META_V 'v'
#define NANO_META_W 'w'
#define NANO_META_X 'x'
#define NANO_META_Y 'y'
#define NANO_META_Z 'z'
#define NANO_META_LCURLYBRACKET '{'
#define NANO_META_PIPE '|'
#define NANO_META_RCURLYBRACKET '}'
/* 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. */
@@ -480,22 +480,22 @@ typedef struct rcoption {
#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_GOTOLINE_METAKEY NANO_META_G
#define NANO_GOTODIR_KEY NANO_CONTROL_7
#define NANO_GOTODIR_FKEY KEY_F(13)
#define NANO_GOTODIR_ALTKEY NANO_ALT_G
#define NANO_GOTODIR_METAKEY NANO_META_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_KEY NANO_META_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_REGEXP_KEY NANO_META_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_REPLACE_METAKEY NANO_META_R
#define NANO_TOOTHERSEARCH_KEY NANO_CONTROL_R
#define NANO_PREVPAGE_KEY NANO_CONTROL_Y
#define NANO_PREVPAGE_FKEY KEY_F(7)
@@ -503,8 +503,8 @@ typedef struct rcoption {
#define NANO_NEXTPAGE_FKEY KEY_F(8)
#define NANO_CUT_KEY NANO_CONTROL_K
#define NANO_CUT_FKEY KEY_F(9)
#define NANO_COPY_KEY NANO_ALT_CARET
#define NANO_COPY_ALTKEY NANO_ALT_6
#define NANO_COPY_KEY NANO_META_CARET
#define NANO_COPY_METAKEY NANO_META_6
#define NANO_UNCUT_KEY NANO_CONTROL_U
#define NANO_UNCUT_FKEY KEY_F(10)
#define NANO_CURSORPOS_KEY NANO_CONTROL_C
@@ -513,20 +513,20 @@ typedef struct rcoption {
#define NANO_SPELL_FKEY KEY_F(12)
#define NANO_FIRSTLINE_KEY NANO_PREVPAGE_KEY
#define NANO_FIRSTLINE_FKEY NANO_PREVPAGE_FKEY
#define NANO_FIRSTLINE_ALTKEY NANO_ALT_BACKSLASH
#define NANO_FIRSTLINE_ALTKEY2 NANO_ALT_PIPE
#define NANO_FIRSTLINE_METAKEY NANO_META_BACKSLASH
#define NANO_FIRSTLINE_METAKEY2 NANO_META_PIPE
#define NANO_FIRSTFILE_KEY NANO_FIRSTLINE_KEY
#define NANO_FIRSTFILE_FKEY NANO_FIRSTLINE_FKEY
#define NANO_FIRSTFILE_ALTKEY NANO_FIRSTLINE_ALTKEY
#define NANO_FIRSTFILE_ALTKEY2 NANO_FIRSTLINE_ALTKEY2
#define NANO_FIRSTFILE_METAKEY NANO_FIRSTLINE_METAKEY
#define NANO_FIRSTFILE_METAKEY2 NANO_FIRSTLINE_METAKEY2
#define NANO_LASTLINE_KEY NANO_NEXTPAGE_KEY
#define NANO_LASTLINE_FKEY NANO_NEXTPAGE_FKEY
#define NANO_LASTLINE_ALTKEY NANO_ALT_SLASH
#define NANO_LASTLINE_ALTKEY2 NANO_ALT_QUESTION
#define NANO_LASTLINE_METAKEY NANO_META_SLASH
#define NANO_LASTLINE_METAKEY2 NANO_META_QUESTION
#define NANO_LASTFILE_KEY NANO_LASTLINE_KEY
#define NANO_LASTFILE_FKEY NANO_LASTLINE_FKEY
#define NANO_LASTFILE_ALTKEY NANO_LASTLINE_ALTKEY
#define NANO_LASTFILE_ALTKEY2 NANO_LASTLINE_ALTKEY2
#define NANO_LASTFILE_METAKEY NANO_LASTLINE_METAKEY
#define NANO_LASTFILE_METAKEY2 NANO_LASTLINE_METAKEY2
#define NANO_REFRESH_KEY NANO_CONTROL_L
#define NANO_JUSTIFY_KEY NANO_CONTROL_J
#define NANO_JUSTIFY_FKEY KEY_F(4)
@@ -537,42 +537,42 @@ typedef struct rcoption {
#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_METAKEY NANO_META_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_INDENT_KEY NANO_ALT_RCURLYBRACKET
#define NANO_UNINDENT_KEY NANO_ALT_LCURLYBRACKET
#define NANO_INDENT_KEY NANO_META_RCURLYBRACKET
#define NANO_UNINDENT_KEY NANO_META_LCURLYBRACKET
#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_PREVFILE_KEY NANO_ALT_LCARET
#define NANO_PREVFILE_ALTKEY NANO_ALT_COMMA
#define NANO_NEXTFILE_KEY NANO_ALT_RCARET
#define NANO_NEXTFILE_ALTKEY NANO_ALT_PERIOD
#define NANO_BRACKET_KEY NANO_ALT_RBRACKET
#define NANO_APPEND_KEY NANO_META_A
#define NANO_PREPEND_KEY NANO_META_P
#define NANO_PREVFILE_KEY NANO_META_LCARET
#define NANO_PREVFILE_METAKEY NANO_META_COMMA
#define NANO_NEXTFILE_KEY NANO_META_RCARET
#define NANO_NEXTFILE_METAKEY NANO_META_PERIOD
#define NANO_BRACKET_KEY NANO_META_RBRACKET
#define NANO_NEXTWORD_KEY NANO_CONTROL_SPACE
#define NANO_PREVWORD_KEY NANO_ALT_SPACE
#define NANO_WORDCOUNT_KEY NANO_ALT_D
#define NANO_SCROLLUP_KEY NANO_ALT_MINUS
#define NANO_SCROLLDOWN_KEY NANO_ALT_PLUS
#define NANO_SCROLLUP_ALTKEY NANO_ALT_UNDERSCORE
#define NANO_SCROLLDOWN_ALTKEY NANO_ALT_EQUALS
#define NANO_CUTTILLEND_ALTKEY NANO_ALT_T
#define NANO_PREVWORD_KEY NANO_META_SPACE
#define NANO_WORDCOUNT_KEY NANO_META_D
#define NANO_SCROLLUP_KEY NANO_META_MINUS
#define NANO_SCROLLDOWN_KEY NANO_META_PLUS
#define NANO_SCROLLUP_METAKEY NANO_META_UNDERSCORE
#define NANO_SCROLLDOWN_METAKEY NANO_META_EQUALS
#define NANO_CUTTILLEND_METAKEY NANO_META_T
#define NANO_PARABEGIN_KEY NANO_CONTROL_W
#define NANO_PARABEGIN_ALTKEY NANO_ALT_LPARENTHESIS
#define NANO_PARABEGIN_ALTKEY2 NANO_ALT_9
#define NANO_PARABEGIN_METAKEY NANO_META_LPARENTHESIS
#define NANO_PARABEGIN_METAKEY2 NANO_META_9
#define NANO_PARAEND_KEY NANO_CONTROL_O
#define NANO_PARAEND_ALTKEY NANO_ALT_RPARENTHESIS
#define NANO_PARAEND_ALTKEY2 NANO_ALT_0
#define NANO_PARAEND_METAKEY NANO_META_RPARENTHESIS
#define NANO_PARAEND_METAKEY2 NANO_META_0
#define NANO_FULLJUSTIFY_KEY NANO_CONTROL_U
#define NANO_FULLJUSTIFY_ALTKEY NANO_ALT_J
#define NANO_VERBATIM_KEY NANO_ALT_V
#define NANO_FULLJUSTIFY_METAKEY NANO_META_J
#define NANO_VERBATIM_KEY NANO_META_V
/* Toggles do not exist if NANO_TINY is defined. */
#ifndef NANO_TINY
@@ -581,26 +581,26 @@ typedef struct rcoption {
#define TOGGLE_NO_KEY -2
/* Normal toggles. */
#define TOGGLE_NOHELP_KEY NANO_ALT_X
#define TOGGLE_CONST_KEY NANO_ALT_C
#define TOGGLE_MORESPACE_KEY NANO_ALT_O
#define TOGGLE_SMOOTH_KEY NANO_ALT_S
#define TOGGLE_WHITESPACE_KEY NANO_ALT_P
#define TOGGLE_SYNTAX_KEY NANO_ALT_Y
#define TOGGLE_SMARTHOME_KEY NANO_ALT_H
#define TOGGLE_AUTOINDENT_KEY NANO_ALT_I
#define TOGGLE_CUTTOEND_KEY NANO_ALT_K
#define TOGGLE_WRAP_KEY NANO_ALT_L
#define TOGGLE_TABSTOSPACES_KEY NANO_ALT_Q
#define TOGGLE_BACKUP_KEY NANO_ALT_B
#define TOGGLE_MULTIBUFFER_KEY NANO_ALT_F
#define TOGGLE_MOUSE_KEY NANO_ALT_M
#define TOGGLE_NOCONVERT_KEY NANO_ALT_N
#define TOGGLE_SUSPEND_KEY NANO_ALT_Z
#define TOGGLE_CASE_KEY NANO_ALT_C
#define TOGGLE_BACKWARDS_KEY NANO_ALT_B
#define TOGGLE_DOS_KEY NANO_ALT_D
#define TOGGLE_MAC_KEY NANO_ALT_M
#define TOGGLE_NOHELP_KEY NANO_META_X
#define TOGGLE_CONST_KEY NANO_META_C
#define TOGGLE_MORESPACE_KEY NANO_META_O
#define TOGGLE_SMOOTH_KEY NANO_META_S
#define TOGGLE_WHITESPACE_KEY NANO_META_P
#define TOGGLE_SYNTAX_KEY NANO_META_Y
#define TOGGLE_SMARTHOME_KEY NANO_META_H
#define TOGGLE_AUTOINDENT_KEY NANO_META_I
#define TOGGLE_CUTTOEND_KEY NANO_META_K
#define TOGGLE_WRAP_KEY NANO_META_L
#define TOGGLE_TABSTOSPACES_KEY NANO_META_Q
#define TOGGLE_BACKUP_KEY NANO_META_B
#define TOGGLE_MULTIBUFFER_KEY NANO_META_F
#define TOGGLE_MOUSE_KEY NANO_META_M
#define TOGGLE_NOCONVERT_KEY NANO_META_N
#define TOGGLE_SUSPEND_KEY NANO_META_Z
#define TOGGLE_CASE_KEY NANO_META_C
#define TOGGLE_BACKWARDS_KEY NANO_META_B
#define TOGGLE_DOS_KEY NANO_META_D
#define TOGGLE_MAC_KEY NANO_META_M
#endif /* !NANO_TINY */
#define VIEW TRUE

View File

@@ -2,8 +2,8 @@
/**************************************************************************
* prompt.c *
* *
* Copyright (C) 1999-2004 Chris Allegretta *
* Copyright (C) 2005-2006 David Lawrence Ramsey *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
@@ -328,8 +328,8 @@ void do_statusbar_output(char *output, size_t output_len, bool
*got_enter = FALSE;
while (i < output_len) {
/* If allow_cntrls is FALSE, filter out nulls and newlines,
* since they're ASCII control characters. */
/* If allow_cntrls is TRUE, convert nulls and newlines
* properly. */
if (allow_cntrls) {
/* Null to newline, if needed. */
if (output[i] == '\0')
@@ -999,7 +999,7 @@ int get_prompt_string(bool allow_tabs,
wnoutrefresh(bottomwin);
/* If we're using restricted mode, we aren't allowed to change the
* name of a file once it has one because that would allow writing
* name of a file once it has one, because that would allow writing
* to files not specified on the command line. In this case,
* disable all keys that would change the text if the filename isn't
* blank and we're at the "Write File" prompt. */

View File

@@ -2,8 +2,8 @@
/**************************************************************************
* proto.h *
* *
* Copyright (C) 1999-2004 Chris Allegretta *
* Copyright (C) 2005-2006 David Lawrence Ramsey *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
@@ -26,7 +26,8 @@
#include "nano.h"
/* Public external variables. See global.c for their descriptions. */
/* All public external variables. See global.c for their
* descriptions. */
#ifndef NANO_TINY
extern sigjmp_buf jump_buf;
extern bool jump_buf_main;
@@ -141,7 +142,7 @@ extern int reverse_attr;
extern char *homedir;
/* Public functions in browser.c. */
/* All public functions in browser.c. */
#ifndef DISABLE_BROWSER
char *do_browser(char *path, DIR *dir);
char *do_browse_from(const char *inpath);
@@ -160,7 +161,7 @@ void do_last_file(void);
char *striponedir(const char *path);
#endif
/* Public functions in chars.c. */
/* All public functions in chars.c. */
#ifdef ENABLE_UTF8
void utf8_init(void);
bool using_utf8(void);
@@ -242,14 +243,14 @@ bool is_valid_unicode(wchar_t wc);
bool is_valid_mbstring(const char *s);
#endif
/* Public functions in color.c. */
/* All public functions in color.c. */
#ifdef ENABLE_COLOR
void set_colorpairs(void);
void color_init(void);
void color_update(void);
#endif
/* Public functions in cut.c. */
/* All public functions in cut.c. */
void cutbuffer_reset(void);
void cut_line(void);
#ifndef NANO_TINY
@@ -271,7 +272,7 @@ void do_cut_till_end(void);
#endif
void do_uncut_text(void);
/* Public functions in files.c. */
/* All public functions in files.c. */
void make_new_buffer(void);
void initialize_buffer(void);
void initialize_buffer_text(void);
@@ -339,7 +340,7 @@ bool writehist(FILE *hist, filestruct *histhead);
void save_history(void);
#endif
/* Public functions in global.c. */
/* All public functions in global.c. */
size_t length_of_list(const shortcut *s);
#ifndef NANO_TINY
void toggle_init_one(int val
@@ -361,7 +362,7 @@ void free_shortcutage(shortcut **shortcutage);
void thanks_for_all_the_fish(void);
#endif
/* Public functions in help.c. */
/* All public functions in help.c. */
#ifndef DISABLE_HELP
void do_help(void (*refresh_func)(void));
void do_help_void(void);
@@ -373,7 +374,7 @@ void parse_help_input(int *kbinput, bool *meta_key, bool *func_key);
size_t help_line_len(const char *ptr);
#endif
/* Public functions in move.c. */
/* All public functions in move.c. */
void do_first_line(void);
void do_last_line(void);
void do_page_up(void);
@@ -417,7 +418,7 @@ void do_scroll_down(void);
void do_left(void);
void do_right(void);
/* Public functions in nano.c. */
/* All public functions in nano.c. */
filestruct *make_new_node(filestruct *prevnode);
filestruct *copy_node(const filestruct *src);
void splice_node(filestruct *begin, filestruct *newnode, filestruct
@@ -488,7 +489,7 @@ bool do_mouse(void);
#endif
void do_output(char *output, size_t output_len, bool allow_cntrls);
/* Public functions in prompt.c. */
/* All public functions in prompt.c. */
int do_statusbar_input(bool *meta_key, bool *func_key, bool *s_or_t,
bool *ran_func, bool *finished, bool allow_funcs, void
(*refresh_func)(void));
@@ -545,7 +546,7 @@ int do_prompt(bool allow_tabs,
void do_prompt_abort(void);
int do_yesno_prompt(bool all, const char *msg);
/* Public functions in rcfile.c. */
/* All public functions in rcfile.c. */
#ifdef ENABLE_NANORC
void rcfile_error(const char *msg, ...);
char *parse_next_word(char *ptr);
@@ -566,7 +567,7 @@ void parse_rcfile(FILE *rcstream
void do_rcfile(void);
#endif
/* Public functions in search.c. */
/* All public functions in search.c. */
#ifdef HAVE_REGEX_H
int regexp_init(const char *regexp);
void regexp_cleanup(void);
@@ -622,7 +623,7 @@ char *get_history_completion(filestruct **h, const char *s, size_t len);
#endif
#endif
/* Public functions in text.c. */
/* All public functions in text.c. */
#ifndef NANO_TINY
void do_mark(void);
#endif
@@ -679,7 +680,7 @@ void do_wordlinechar_count(void);
#endif
void do_verbatim_input(void);
/* Public functions in utils.c. */
/* All public functions in utils.c. */
int digits(size_t n);
void get_homedir(void);
bool parse_num(const char *str, ssize_t *val);
@@ -727,7 +728,7 @@ void dump_filestruct(const filestruct *inptr);
void dump_filestruct_reverse(void);
#endif
/* Public functions in winio.c. */
/* All public functions in winio.c. */
void get_key_buffer(WINDOW *win);
size_t get_key_buffer_len(void);
void unget_input(int *input, size_t input_len);

View File

@@ -2,8 +2,8 @@
/**************************************************************************
* rcfile.c *
* *
* Copyright (C) 2001-2004 Chris Allegretta *
* Copyright (C) 2005-2006 David Lawrence Ramsey *
* Copyright (C) 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
@@ -204,7 +204,7 @@ char *parse_next_regex(char *ptr)
return NULL;
}
/* Null terminate and advance ptr. */
/* Null-terminate and advance ptr. */
*ptr++ = '\0';
while (isblank(*ptr))

View File

@@ -2,8 +2,8 @@
/**************************************************************************
* search.c *
* *
* Copyright (C) 1999-2004 Chris Allegretta *
* Copyright (C) 2005-2006 David Lawrence Ramsey *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
@@ -1342,7 +1342,7 @@ void update_history(filestruct **h, const char *s)
}
/* Add the new entry to the end. */
(*hbot)->data = mallocstrcpy(NULL, s);
(*hbot)->data = mallocstrcpy((*hbot)->data, s);
splice_node(*hbot, make_new_node(*hbot), (*hbot)->next);
*hbot = (*hbot)->next;
(*hbot)->data = mallocstrcpy(NULL, "");

View File

@@ -2,8 +2,8 @@
/**************************************************************************
* text.c *
* *
* Copyright (C) 1999-2004 Chris Allegretta *
* Copyright (C) 2005-2006 David Lawrence Ramsey *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
@@ -63,7 +63,7 @@ void do_mark(void)
}
#endif /* !NANO_TINY */
/* Delete one character. */
/* Delete the character under the cursor. */
void do_delete(void)
{
bool do_refresh = FALSE;
@@ -150,7 +150,7 @@ void do_delete(void)
}
/* Backspace over one character. That is, move the cursor left one
* character, and then delete the character there. */
* character, and then delete the character under the cursor. */
void do_backspace(void)
{
if (openfile->current != openfile->fileage ||
@@ -2311,12 +2311,12 @@ void do_spell(void)
return;
}
i =
#ifndef NANO_TINY
if (openfile->mark_set)
i = write_marked_file(temp, temp_file, TRUE, OVERWRITE);
else
(openfile->mark_set) ? write_marked_file(temp, temp_file, TRUE,
OVERWRITE) :
#endif
i = write_file(temp, temp_file, TRUE, OVERWRITE, FALSE);
write_file(temp, temp_file, TRUE, OVERWRITE, FALSE);
if (i == -1) {
statusbar(_("Error writing temp file: %s"), strerror(errno));
@@ -2446,6 +2446,8 @@ void do_verbatim_input(void)
output[i] = (char)kbinput[i];
output[i] = '\0';
free(kbinput);
do_output(output, kbinput_len, TRUE);
free(output);

View File

@@ -2,8 +2,8 @@
/**************************************************************************
* utils.c *
* *
* Copyright (C) 1999-2004 Chris Allegretta *
* Copyright (C) 2005-2006 David Lawrence Ramsey *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
@@ -147,7 +147,7 @@ void unsunder(char *str, size_t true_len)
}
/* For non-null-terminated lines. A line, by definition, shouldn't
* normally have newlines in it, so decode its newlines into nulls. */
* normally have newlines in it, so decode its newlines as nulls. */
void sunder(char *str)
{
assert(str != NULL);
@@ -232,7 +232,7 @@ ssize_t ngetdelim(char **lineptr, size_t *n, int delim, FILE *stream)
*n += MAX_BUF_SIZE;
}
/* Null terminate the buffer. */
/* Null-terminate the buffer. */
null_at(lineptr, indx++);
*n = indx;

View File

@@ -2,8 +2,8 @@
/**************************************************************************
* winio.c *
* *
* Copyright (C) 1999-2004 Chris Allegretta *
* Copyright (C) 2005-2006 David Lawrence Ramsey *
* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta *
* Copyright (C) 2005, 2006 David Lawrence Ramsey *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2, or (at your option) *
@@ -484,6 +484,7 @@ int parse_kbinput(WINDOW *win, bool *meta_key, bool *func_key)
retval = get_control_kbinput(
parse_escape_seq_kbinput(win,
*kbinput));
break;
}
}
@@ -662,6 +663,8 @@ int parse_kbinput(WINDOW *win, bool *meta_key, bool *func_key)
fprintf(stderr, "parse_kbinput(): kbinput = %d, meta_key = %s, func_key = %s, escapes = %d, byte_digits = %d, retval = %d\n", *kbinput, *meta_key ? "TRUE" : "FALSE", *func_key ? "TRUE" : "FALSE", escapes, byte_digits, retval);
#endif
free(kbinput);
/* Return the result. */
return retval;
}
@@ -1441,9 +1444,12 @@ void unparse_kbinput(char *output, size_t output_len)
return;
input = (int *)nmalloc(output_len * sizeof(int));
for (i = 0; i < output_len; i++)
input[i] = (int)output[i];
unget_input(input, output_len);
free(input);
}
@@ -1534,6 +1540,8 @@ int *parse_verbatim_kbinput(WINDOW *win, size_t *kbinput_len)
/* Put back the first keystroke. */
unget_input(kbinput, 1);
free(kbinput);
/* Get the complete sequence, and save the characters in it as the
* result. */
*kbinput_len = get_key_buffer_len();
@@ -1974,7 +1982,7 @@ char *display_string(const char *buf, size_t start_col, size_t len, bool
assert(alloc_len >= index + 1);
/* Null terminate converted. */
/* Null-terminate converted. */
converted[index] = '\0';
/* Make sure converted takes up no more than len columns. */
@@ -2095,8 +2103,9 @@ void titlebar(const char *path)
if (!newfie) {
size_t lenpt = strlenpt(path), start_col;
/* Don't set dots to TRUE if we have fewer than 8 columns (i.e.
* 1 column for padding, plus 7 columns for a filename). */
/* Don't set dots to TRUE if we have fewer than eight columns
* (i.e. one column for padding, plus seven columns for a
* filename). */
dots = (space >= 8 && lenpt >= space);
if (dots) {
@@ -2513,9 +2522,12 @@ void edit_draw(const filestruct *fileptr, const char *converted, int
* expanded location of the end of the match minus
* the expanded location of the beginning of the
* page. */
paintlen = (end_line != fileptr) ? -1 :
actual_x(converted, strnlenpt(fileptr->data,
endmatch.rm_eo) - start);
if (end_line != fileptr)
paintlen = -1;
else
paintlen = actual_x(converted,
strnlenpt(fileptr->data,
endmatch.rm_eo) - start);
mvwaddnstr(edit, line, 0, converted, paintlen);
@@ -2639,8 +2651,11 @@ void edit_draw(const filestruct *fileptr, const char *converted, int
* Otherwise, paintlen is the expanded location of the end
* of the mark minus the expanded location of the beginning
* of the mark. */
paintlen = (bot_x >= endpos) ? -1 : strnlenpt(fileptr->data,
bot_x) - (x_start + start);
if (bot_x >= endpos)
paintlen = -1;
else
paintlen = strnlenpt(fileptr->data, bot_x) - (x_start +
start);
/* If x_start is before the beginning of the page, shift
* paintlen x_start characters to compensate, and put
@@ -3124,12 +3139,10 @@ void do_replace_highlight(bool highlight, const char *word)
if (highlight)
wattron(edit, reverse_attr);
#ifdef HAVE_REGEX_H
/* This is so we can show zero-length regex matches. */
/* This is so we can show zero-length matches. */
if (word_len == 0)
waddch(edit, ' ');
else
#endif
waddnstr(edit, word, actual_x(word, y));
if (word_len > y)
@@ -3199,8 +3212,8 @@ void do_credits(void)
"",
"",
"",
"(c) 1999-2004 Chris Allegretta",
"(c) 2005-2006 David Lawrence Ramsey",
"(c) 1999, 2000, 2001, 2002, 2003, 2004 Chris Allegretta",
"(c) 2005, 2006 David Lawrence Ramsey",
"",
"",
"",