Commit Graph

505 Commits (6095ff3d39be0b21168e8e2680d2a597e44a60c2)

Author SHA1 Message Date
David Lawrence Ramsey 01e13ea1c1 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2745 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 04:16:12 +00:00
David Lawrence Ramsey 68c10963c4 revert last change, as the multibyte strcoll() functions can't handle
e.g. 2-to-1 character conversions as the original strcoll() can


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2743 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-21 03:26:58 +00:00
David Lawrence Ramsey a62e8e3de9 when reading color syntax names or sorting filenames, use mbstrcasecmp()
instead of strcasecmp() to compare them, in case they're UTF-8


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2734 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-19 21:10:48 +00:00
David Lawrence Ramsey 483f3ac1b5 in read_line(), rename variable len to buf_len, for consistency
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2733 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-19 19:57:13 +00:00
David Lawrence Ramsey c54c4d1eea rename total_update() total_redraw() for consistency
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2725 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-18 15:49:17 +00:00
David Lawrence Ramsey 3435a0ff64 rename the CONSTUPDATE flag to CONST_UPDATE, and clarify its description
in the help text


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2711 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-17 21:08:13 +00:00
David Lawrence Ramsey a01690c410 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2674 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 07:38:25 +00:00
David Lawrence Ramsey 42e271d2d3 in do_browser(), make mouse clicks in the browser window work properly
when the MORE_SPACE flag is set


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2670 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 06:30:05 +00:00
David Lawrence Ramsey d1323e4e35 formatting and comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2668 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 03:56:36 +00:00
David Lawrence Ramsey d26f1ebdf1 in open_prevnext_file(), move up a misplaced assert and rename a
variable


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2665 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-15 03:01:41 +00:00
David Lawrence Ramsey bdfa927d62 more miscellaneous cleanups
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2662 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-14 23:36:13 +00:00
David Lawrence Ramsey 6a0d5b8fec miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2649 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-13 14:00:22 +00:00
David Lawrence Ramsey 4428975e95 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2615 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-08 20:13:38 +00:00
David Lawrence Ramsey c7935e20b7 revert the conversion of each line to a valid multibyte string, as it
doesn't take encodings other than ASCII and Latin-1 into account and
hence isn't accurate enough


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2614 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-08 20:12:57 +00:00
David Lawrence Ramsey 7bf86e1707 when reading a file in, make sure each line is a valid multibyte string
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2612 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-08 19:50:02 +00:00
David Lawrence Ramsey 457847f0fe add else's
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2605 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-06-06 19:35:53 +00:00
David Lawrence Ramsey 7e62d109ba in do_insertfile(), set i to 0 when we get a filename via the file
browser, so that it's read in properly when we exit the file browser


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


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


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


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2571 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-31 04:28:15 +00:00
David Lawrence Ramsey bec2f20da0 formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2570 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-31 03:39:59 +00:00
David Lawrence Ramsey d20c0c34f5 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2569 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-31 03:36:15 +00:00
David Lawrence Ramsey 0998a64fb9 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2568 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-31 03:33:30 +00:00
David Lawrence Ramsey b9b572236a when using a backup directory, make sure all the filenames written are
unique by using get_next_filename() when necessary


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


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2556 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 19:14:42 +00:00
David Lawrence Ramsey e5b23bd2ff formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2555 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 18:57:56 +00:00
David Lawrence Ramsey 7de678798a cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2554 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 18:20:05 +00:00
David Lawrence Ramsey 638cbe5407 yet another comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2553 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 18:11:32 +00:00
David Lawrence Ramsey 31b159c1b3 add various fixes to avoid a hang and several potential assertion
failures when building with DEBUG defined


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2542 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 03:47:24 +00:00
David Lawrence Ramsey 16f88134f7 more miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2541 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-26 03:32:41 +00:00
David Lawrence Ramsey 934f9687bb overhaul the history code to work more consistently, and clean up
various parts of it; note that history tab completion has been removed


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2533 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-23 16:30:06 +00:00
David Lawrence Ramsey 30f164a015 in save_history(), properly save history when in view mode
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2530 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-21 22:41:23 +00:00
David Lawrence Ramsey 50995bd024 rename another variable
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2516 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-16 20:13:09 +00:00
David Lawrence Ramsey 6e925cf330 update the Free Software Foundation's mailing address in various
comments


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2510 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-15 19:57:17 +00:00
David Lawrence Ramsey 066713e87e more indentation fixes and one more cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2509 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-14 23:21:02 +00:00
David Lawrence Ramsey 546f5b3d8a rename a few more variables, and fix some indentation
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2508 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-14 23:14:47 +00:00
David Lawrence Ramsey e781ddf3b1 still more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2507 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-05-14 22:44:16 +00:00
David Lawrence Ramsey 29be8031df comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2486 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-20 14:55:46 +00:00
David Lawrence Ramsey 5b2f17e591 change all hardcoded instances of 128 bytes to MAX_BUF_SIZE, and #define
MAX_BUF_SIZE as 128 in nano.h


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


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2478 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-19 03:15:21 +00:00
David Lawrence Ramsey ad11460eb7 remove more unneeded clearok(TRUE)'s, and avoid an unnecessary update
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2474 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-16 18:27:57 +00:00
David Lawrence Ramsey e527e458f4 various #include fixes: since proto.h includes nano.h, only include the
former in source files; also add an #include guard to proto.h, and make
the config.h #include in nano.h match the config.h #includes everywhere
else


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2468 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-04-14 03:52:28 +00:00
David Lawrence Ramsey d4a071e492 in do_insertfile(), fix handling of blank filenames in multibuffer mode
so that they work properly again


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2443 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-30 23:52:02 +00:00
David Lawrence Ramsey d8367986ce cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2429 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-26 04:49:01 +00:00
David Lawrence Ramsey 6e0ed3c1c6 add various portability and potential segfault fixes involving getcwd()
calls


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2428 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-26 04:42:28 +00:00
David Lawrence Ramsey 928babf8a1 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2407 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-21 06:12:07 +00:00
David Lawrence Ramsey b349c80f0d allow refreshing of the file browser window, as Pico does
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2388 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-17 19:10:29 +00:00
David Lawrence Ramsey 202d3c2f97 add DB's overhaul of the rcfile parsing code and related miscellaneous
bits


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2345 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-03-10 20:55:11 +00:00
David Lawrence Ramsey ad96aff50d rework things so that strrchrn() is no longer needed, and remove it
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2325 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-22 23:22:37 +00:00
David Lawrence Ramsey 32f56814c7 remove unnecessary #include
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2323 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-14 18:25:32 +00:00
David Lawrence Ramsey 7d367710ae add DB's overhaul of the file browser code to increase efficiency and
add multibyte character support, plus a few tweaks of mine


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


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


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


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2308 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-02-07 05:31:51 +00:00
David Lawrence Ramsey 96de1b0650 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2303 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-27 21:00:10 +00:00
David Lawrence Ramsey 23c44504ad miscellaneous bits: change flags to an unsigned long and totsize to a
size_t, store the number of multibyte characters instead of the number
of single-byte characters in totsize, and add a few formatting fixes


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


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


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


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2209 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-31 04:10:28 +00:00
David Lawrence Ramsey 7483571f7f massive overhaul to support buffered input and output, the first steps
toward proper wide character input and output, etc.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2157 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-12-04 17:41:52 +00:00
David Lawrence Ramsey 3ece0b9aeb change references to "open files" to "open file buffers" for
consistency, and add DB's changes to die() so that it works properly
with the overhauled multibuffer routines


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2152 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-29 00:30:07 +00:00
David Lawrence Ramsey 63e73cbd14 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2151 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-28 04:52:57 +00:00
David Lawrence Ramsey e08765dca5 formatting and cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2139 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-26 20:17:49 +00:00
David Lawrence Ramsey ca018c3e23 in get_full_path(), remove unneeded NANO_SMALL #ifdef, so that it's
included whenever its prototype is, and so it can compile when
DISABLE_OPERATINGDIR isn't defined and NANO_SMALL is


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2138 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-26 20:14:19 +00:00
David Lawrence Ramsey 2dbcc801bf formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2137 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-26 18:10:07 +00:00
David Lawrence Ramsey 5b3dd0f423 add DB's overhaul of the multibuffer code for efficiency, plus a few
tweaks and additions of mine


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2134 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-25 04:39:07 +00:00
David Lawrence Ramsey 8a2c0ba4b6 formatting fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2132 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-24 20:36:36 +00:00
David Lawrence Ramsey 74d87073f0 unpartition_filestruct() should take a partition** instead of a
partition*, so that the partition it refers to is properly set to NULL


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2117 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-22 00:16:23 +00:00
Jordi Mallach 55381aa614 Include <config.h> only if HAVE_CONFIG_H.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2107 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-17 23:17:05 +00:00
David Lawrence Ramsey 8091d334a3 add Ulf Harnhammar's input_tab() segfault fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2101 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-16 02:23:10 +00:00
David Lawrence Ramsey 9df069cc5f comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2100 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-16 02:20:48 +00:00
David Lawrence Ramsey 036a3d4646 fix cursor placement problem when inserting into the current buffer at
the bottom of the edit window with smooth scrolling on


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2097 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-15 20:42:31 +00:00
David Lawrence Ramsey 56cf034a12 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2096 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-15 18:44:30 +00:00
David Lawrence Ramsey fdd3becc1e allow blank buffers at the "Execute Command" prompt, and document it in
the help text


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


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2083 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-07 18:22:33 +00:00
David Lawrence Ramsey c15802f8c3 partition the filestruct properly when executing a command
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2082 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-07 18:09:41 +00:00
David Lawrence Ramsey 8c16bacbbf more int -> bool conversions
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2074 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-06 15:10:57 +00:00
David Lawrence Ramsey 90e59c1a18 when doing marked spell-check, properly handle the case where the mark
ends in the middle of a word and that word is spell-checked; also move
the logic to detect an upside-down mark to mark_order() instead of using
the same logic in three different places, and rename a few variables for
consistency


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2066 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-05 16:24:35 +00:00
David Lawrence Ramsey 1c293d2e28 comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2065 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-05 16:22:27 +00:00
David Lawrence Ramsey 31f99361b6 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2064 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-05 16:01:04 +00:00
David Lawrence Ramsey b73c0c0b09 if we're not inserting a file into a new buffer, partition the current
buffer so that it's effectively a new buffer just before inserting the
file, and only restore placewewant afterwards; this is the same behavior
we would get if we opened the file, added all of it to the cutbuffer,
uncut at the current cursor position, and closed the file


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


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


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2050 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-03 22:03:41 +00:00
David Lawrence Ramsey 3d002ed602 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2039 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-31 22:45:24 +00:00
David Lawrence Ramsey c59979f067 add UTF-8 support to unget_kbinput(), and fix a minor memory leak in the
UTF-8 support code in get_kbinput()


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2012 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-22 03:33:54 +00:00
David Lawrence Ramsey 2c4e34cfce another indentation fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2011 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-22 03:30:39 +00:00
David Lawrence Ramsey 4b7e3c3efa minor cleanups
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1992 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-15 16:25:56 +00:00
David Lawrence Ramsey 1929982ec3 in do_insertfile(), when inserting a file in non-multibuffer mode,
preserve placewewant as well as current_x, for compatibility with Pico


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1982 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-09 20:12:04 +00:00
David Lawrence Ramsey 7cfea8bb8c in mark_order(), add check for MARK_ISSET's not being set; also make one
more int -> bool conversion and cosmetic fix


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1974 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-08 15:35:33 +00:00
David Lawrence Ramsey 487149e713 in do_insertfile(), add missing #ifdefs around the wrap_reset() call so
that nano compiles with wrapping disabled again


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


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1967 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-05 02:46:24 +00:00
David Lawrence Ramsey 951d7148d1 add minor cosmetic fixes, and do another int -> bool conversion
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1961 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-10-04 15:23:47 +00:00
David Lawrence Ramsey 3e189a8b9c in open_(prev|next)_file(), translate the "New Buffer" string when
displaying "Switched to" messages on the statusbar; also do a few more
int -> bool conversions


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


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


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


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1952 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-28 22:14:58 +00:00
David Lawrence Ramsey 03225330dc simplify do_insertfile() by reusing variables where possible
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1951 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-28 20:50:50 +00:00
David Lawrence Ramsey 670a56c241 cosmetic fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1948 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-28 16:03:03 +00:00
David Lawrence Ramsey eb16f43cf9 add a func_key flag to the low-level input functions and the currently
existing high-level input functions, to indicate extended keypad values


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1928 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-05 21:40:31 +00:00
David Lawrence Ramsey 146bb6026a in do_insertfile(), readd the NANO_SMALL #ifdef around the start_again:
label to avoid a warning


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1919 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-27 21:02:38 +00:00
David Lawrence Ramsey dfca1c4ea6 add unget_kbinput(), a wrapper for ungetch()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1911 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-25 16:37:06 +00:00
David Lawrence Ramsey a0b5ba2f7f convert ints to bools in the low-level input routines, and consolidate
the high-level input routines for the edit window


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1910 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-25 15:39:10 +00:00
David Lawrence Ramsey a27bd65057 per DB's patch, overhaul the rcfile and history file reading and writing
routines to fix a few fundamental problems and limitations; also add
getline() and getdelim() equivalents adapted from GNU mailutils 0.5 (and
tweaked to better integrate with nano), since the patch uses getline()


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1896 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-12 15:20:14 +00:00
David Lawrence Ramsey 95e39e5f46 add missing error message simplifications from before
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1892 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-12 02:52:14 +00:00
David Lawrence Ramsey 1e7f1ea1e8 indentation fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1891 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-12 02:11:35 +00:00
David Lawrence Ramsey 6420d445c2 add a bunch of DB's miscellaneous fixes, plus a few of mine
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1890 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-11 05:13:08 +00:00
David Lawrence Ramsey 049e4a5db3 per DB's patch, simplify the saving of emergency files in die(),
die_save_file(), and get_next_filename()


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


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1880 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-01 22:35:31 +00:00
David Lawrence Ramsey b8c479a9e9 add DB's fix for a problem where quoted justify wouldn't work if
HAVE_REGEX_H wasn't set, and don't treat the return values of the string
comparison functions as boolean anymore


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1876 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-30 22:52:44 +00:00
David Lawrence Ramsey 9ef3adbc1d add a consistency fix for do_enter() and a few minor cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1874 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-30 17:30:17 +00:00
David Lawrence Ramsey 1536f8613d fix spacing problem in the "Save Under Different Name" prompt
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1864 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-24 16:50:20 +00:00
David Lawrence Ramsey 36dd87b1fb properly handle invalid tab sizes in nanorc files and make a few more
cosmetic cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1859 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-18 17:43:43 +00:00
David Lawrence Ramsey fd3039a8e7 cut down on redundant inclusions of <sys/types.h>, include it in proto.h
per DB's patch, and make a few more minor cosmetic cleanups


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


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1851 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-10 16:53:17 +00:00
David Lawrence Ramsey 0273829353 add one last spacing fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1850 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-08 17:29:27 +00:00
David Lawrence Ramsey f708037715 add another prototype fix and a few spacing fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1849 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-08 17:15:10 +00:00
David Lawrence Ramsey 0af8604ec9 more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1847 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-07 23:26:08 +00:00
David Lawrence Ramsey 25529074d3 put back erroneously removed initialization of original_umask
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1843 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-06 14:02:44 +00:00
David Lawrence Ramsey f7b5d930a9 if we're in restricted mode and the filename isn't blank, disable tab
completion at the "Write File" prompt, since we can't change the
filename in that case; also remove an unneeded trailing space


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


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1836 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-02 14:31:03 +00:00
David Lawrence Ramsey ebd0d7c859 more minor cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1834 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-01 18:59:52 +00:00
David Lawrence Ramsey ae064bf255 don't rely on the return value of curs_set(), as it's broken on e.g.
slang; instead, explicitly turn the cursor off where we need to


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1798 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-01 20:38:00 +00:00
David Lawrence Ramsey e7638ea75f cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1797 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-06-01 19:49:38 +00:00
David Lawrence Ramsey 28260475bb add spaces to the ends of the "Overwrite" and "Different Name" prompts,
for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1789 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-30 03:23:39 +00:00
David Lawrence Ramsey 32e3b88e09 add some comments better explaining what is disabled in restricted mode
and why


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1770 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-28 00:15:28 +00:00
David Lawrence Ramsey c372488179 treat search_last_line as a boolean everywhere, and remove some unneeded
trailing spaces


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1768 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-27 18:39:16 +00:00
David Lawrence Ramsey 32d19ce47c comment fix for consistency: "magic line" -> "magicline"
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1760 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-24 05:05:07 +00:00
David Lawrence Ramsey fa394047ba add DB's changes to titlebar() (with a few tweaks of mine) to make it
handle shorter screen widths better and display the filename using
display_string(), my strnlen() equivalent so the new titlebar() will
work on systems without strnlen(), and a few of DB's other minor changes
to make other display-related functions handle shorter screen widths
better, among other things


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1754 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-23 21:11:14 +00:00
David Lawrence Ramsey d7fd200a6a minor overhaul of terminal-related things
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1745 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-18 01:20:36 +00:00
David Lawrence Ramsey 9830d7500f add isblank() equivalent and use it instead of checking for (tab or
space) all over the code, properly detect whether we have strcasestr()
and only use nstristr() if we don't, and bump up CVS build requirements
to account for setting _GNU_SOURCE when running the test programs for
both


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1730 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-05-13 17:19:54 +00:00
David Lawrence Ramsey d893fa946d add restricted mode, per IO ERROR's patch
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1723 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-04-30 04:49:02 +00:00
David Lawrence Ramsey a3370c4232 miscellaneous fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1707 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-04-05 01:08:14 +00:00
David Lawrence Ramsey 1576d537a6 rename a few variables and make a few cosmetic cleanups
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1699 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-19 21:46:34 +00:00
David Lawrence Ramsey b977515bd7 avoid any more editbot-related segfaults by removing the last of the
references to it, as in DB's patch


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1695 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-15 20:26:30 +00:00
David Lawrence Ramsey c6908f28b7 minor bits
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1691 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-11 02:20:25 +00:00
David Lawrence Ramsey da35251e98 wrap one reference to NANO_EXTCMD_KEY in a NANO_SMALL #ifdef
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1686 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-03-05 20:04:44 +00:00
David Lawrence Ramsey 04e42a6bcc Martin Ehmsen's backup directory patch, with a few minor changes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1674 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-28 16:24:31 +00:00
David Lawrence Ramsey 6a2877d399 add another blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1673 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-28 02:08:15 +00:00
David Lawrence Ramsey 807681ac7e add blank line
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1671 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-27 20:50:01 +00:00
David Lawrence Ramsey 95b7bdbdb0 minor cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1669 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-27 03:21:23 +00:00
David Lawrence Ramsey 3af54d3ff5 remove the redundant filestat() and replace it with stat() in the one
place it's called


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1665 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-25 04:43:27 +00:00
David Lawrence Ramsey cb34a67ea1 make the saving of marked status in open_files->file_flags work properly
again; a tweak to the ISSET() macro in 1.3.0 to make it only return 0 or
1 broke it


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1647 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-02-06 21:20:05 +00:00
David Lawrence Ramsey 35961c4252 add the ability to spell-check only marked text when the mark is on
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1633 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-23 19:34:03 +00:00
David Lawrence Ramsey c2c5a51e52 add support for escape sequences for F1-F14 where conflicts don't occur
(and resurrect abcd() to make that job easier), additional comments, and
a few minor cosmetic cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1632 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-23 19:26:17 +00:00
David Lawrence Ramsey 760a2dc9b2 if color support is enabled, we only need to call edit_refresh() to
properly paint multi-line color regexes when COLOR_SYNTAX is set


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1621 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-14 06:38:00 +00:00
David Lawrence Ramsey f28f50e6b5 update the copyright years on the source files to 2004 (adding a few
minor comment tweaks so that all the source files are covered)


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1613 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-01-09 23:04:55 +00:00
David Lawrence Ramsey 8213850df6 add DB's overhaul of the cutting code and related file-writing code, his
fixes to check_operating_dir(), and a few minor cleanups and fixes of
mine


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1599 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-12-24 03:33:09 +00:00
David Lawrence Ramsey a593f538dd another low-level input overhaul: split out low-level mouse input,
remove references to ncurses key values from the global shortcut list
and restructure it to specify function key values when needed, hook up
verbatim input to the edit window, and do a few miscellaneous cleanups


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1596 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-11-28 19:47:42 +00:00
David Lawrence Ramsey 82a8f91392 minor tabbing fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1591 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-11-20 00:14:16 +00:00
David Lawrence Ramsey bc503c80db don't prompt if we're saving only a selection of a file under a
different name


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1590 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-11-19 23:59:14 +00:00
David Lawrence Ramsey 7127857924 prompt before saving the current file under a different name
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1581 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-10-31 17:58:44 +00:00
David Lawrence Ramsey f5b256bb9f miscellaneous #define cleanups
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1565 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-10-03 20:26:25 +00:00
David Lawrence Ramsey 7bf00de84f set fileformat back to 0 after reading in a file to prevent erroneous
conversion messages from showing up when we read in more files


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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1549 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-09-10 20:08:00 +00:00
Jordi Mallach 298b975264 Major package reorganization:
- Move code to src/.
- Move docs to doc/:
  + texi doc to doc/texinfo/
  + original manual pages to doc/man/
  + translated manual pages to doc/man/xx/


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1543 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-09-07 00:44:12 +00:00