Compare commits
115 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f70f0cf6bd | ||
|
|
44e7f82e0e | ||
|
|
0b047c561d | ||
|
|
ce991bb3ad | ||
|
|
fd1768a902 | ||
|
|
1576d537a6 | ||
|
|
7947544460 | ||
|
|
b977515bd7 | ||
|
|
aca5d04f42 | ||
|
|
6aec4b85e6 | ||
|
|
dc10ecbbd6 | ||
|
|
b6aa42864e | ||
|
|
bf3c93e268 | ||
|
|
c6908f28b7 | ||
|
|
58924035c8 | ||
|
|
2a464cb07d | ||
|
|
35557c555c | ||
|
|
221ebcdf70 | ||
|
|
da35251e98 | ||
|
|
a9cd41c42d | ||
|
|
37be3edebc | ||
|
|
5ae684fc81 | ||
|
|
d7f5ad9786 | ||
|
|
a619ae69bf | ||
|
|
8911e235ba | ||
|
|
ce364e2a57 | ||
|
|
ea43a1dbca | ||
|
|
b34c683f3f | ||
|
|
ba7b1681a2 | ||
|
|
588ca6b79e | ||
|
|
04e42a6bcc | ||
|
|
6a2877d399 | ||
|
|
81e157cd38 | ||
|
|
807681ac7e | ||
|
|
281e0563c6 | ||
|
|
95b7bdbdb0 | ||
|
|
24ae56cd4b | ||
|
|
60b942c64f | ||
|
|
b55e382dfc | ||
|
|
3af54d3ff5 | ||
|
|
37853fd4ce | ||
|
|
475a2a7410 | ||
|
|
a7c9364641 | ||
|
|
f5300af90a | ||
|
|
1044d74fd3 | ||
|
|
656dd9c7eb | ||
|
|
369732ff81 | ||
|
|
795a16b959 | ||
|
|
b7e5cf6538 | ||
|
|
d390dd8ea7 | ||
|
|
815cba87e5 | ||
|
|
cb34a67ea1 | ||
|
|
ee383dbd6c | ||
|
|
1bc9219beb | ||
|
|
00c2054780 | ||
|
|
250267777c | ||
|
|
be66a6b078 | ||
|
|
53809440f3 | ||
|
|
273d2ce2d5 | ||
|
|
c91696e6df | ||
|
|
d03216a1ac | ||
|
|
58f6d836d9 | ||
|
|
2897d2b8b8 | ||
|
|
0ee54d9fb2 | ||
|
|
1eadebe21f | ||
|
|
35961c4252 | ||
|
|
c2c5a51e52 | ||
|
|
66081d4e70 | ||
|
|
fdece4621f | ||
|
|
250613665f | ||
|
|
70bd6e0dcb | ||
|
|
41151ac50d | ||
|
|
3e3fab5a0f | ||
|
|
62187d9ced | ||
|
|
9da0831dbf | ||
|
|
e97c8d5918 | ||
|
|
9591ee5d0a | ||
|
|
760a2dc9b2 | ||
|
|
c53a92d973 | ||
|
|
d5be947021 | ||
|
|
f0b3009400 | ||
|
|
606dfda47a | ||
|
|
fa1497b38f | ||
|
|
6481c3fb2d | ||
|
|
f28f50e6b5 | ||
|
|
f8ddf31bfb | ||
|
|
9e45a47054 | ||
|
|
9b5bd42978 | ||
|
|
47162bc428 | ||
|
|
e190ff30f2 | ||
|
|
afb75f22b2 | ||
|
|
32559294e8 | ||
|
|
c2946fbe09 | ||
|
|
2a4ab6d29d | ||
|
|
76c4b33ef4 | ||
|
|
8213850df6 | ||
|
|
f427694400 | ||
|
|
18394ac621 | ||
|
|
d29146040b | ||
|
|
a593f538dd | ||
|
|
45cfbece4c | ||
|
|
895e65ce1a | ||
|
|
4dca76f2e9 | ||
|
|
82a8f91392 | ||
|
|
bc503c80db | ||
|
|
a5d8e54ab9 | ||
|
|
10dd6c7714 | ||
|
|
4e25410680 | ||
|
|
637f6e50c0 | ||
|
|
7776ef9149 | ||
|
|
8fa1976796 | ||
|
|
7127857924 | ||
|
|
b7cb6a38c8 | ||
|
|
b78649b664 | ||
|
|
95114c1bc4 |
450
ChangeLog
450
ChangeLog
@@ -1,3 +1,447 @@
|
||||
GNU nano 1.3.2 - 2004.03.31
|
||||
- General:
|
||||
- Change instances in the code that refresh the entire edit
|
||||
window when color support is enabled (in order to properly
|
||||
handle multi-line color regexes) to only do so when
|
||||
it's necessary, i.e, when COLOR_SYNTAX is set. (DLR)
|
||||
- Minor cosmetic tweaks to the code involving direction keys.
|
||||
NANO_UP_KEY and NANO_DOWN_KEY are now NANO_PREVLINE_KEY and
|
||||
NANO_NEXTLINE_KEY, and the help messages for them have been
|
||||
changed accordingly. Also remove extraneous references to
|
||||
NANO_DOWN_KEY in the search history shortcut entries. (DLR)
|
||||
- Add NANO_UNJUSTIFY_FKEY (the same as NANO_UNCUT_FKEY) to the
|
||||
shortcut list, and tweak the unjustify routine to use it.
|
||||
Also add NANO_FIRSTLINE_FKEY and NANO_LASTLINE_FKEY, and tweak
|
||||
the statusbar input routines to handle them and NANO_HELP_FKEY
|
||||
properly. (DLR)
|
||||
- Block SIGWINCH after setting up its handler, and only unblock
|
||||
and handle it when we're in a stable state, i.e, when we're
|
||||
waiting for input from the user. New function
|
||||
allow_pending_sigwinch(); changes to signal_init(),
|
||||
get_kbinput(), and get_verbatim_kbinput(). (DLR)
|
||||
- Decouple the paragraph searching code and the justifying code.
|
||||
Removed function do_para_operation(); new function
|
||||
do_para_search(); changes to do_justify(). (DLR)
|
||||
- Add -E/--backupdir option. When used with -B/--backup, backup
|
||||
files will be saved in the specified directory with their
|
||||
canonical pathnames encoded in their names (all '/'s replaced
|
||||
with '!'s). Changes to write_file(). (Martin Ehmsen) DLR:
|
||||
Add function init_backup_dir() to handle relative paths
|
||||
correctly, use get_full_path() to get the canonical pathname,
|
||||
and use tail() to get the filename if get_full_path() fails.
|
||||
- Port to the Tandem NonStop Kernel (nsr-tandem-nsk). (Tom
|
||||
Bates; minor tweaks by DLR)
|
||||
- Change some instances of boolean 0 and 1 to TRUE and FALSE.
|
||||
(David Benbennick)
|
||||
- Fix memory corruption problem occurring when answer is used as
|
||||
the value of def; if the realloc() of answer leads to its
|
||||
pointing to a different memory block, there will be a segfault
|
||||
when the value of def is copied into it via strcpy().
|
||||
(bort@alltel.net, Christian Weisgarber, David Benbennick, and
|
||||
DLR)
|
||||
- Remove the last editbot references, to avoid any potential
|
||||
segfaults related to them. Also remove fix_editbot(), as it's
|
||||
no longer needed. (David Benbennick)
|
||||
- Rename several variables to make their use clearer and to
|
||||
avoid conflicts. (DLR)
|
||||
- Set the input mode before turning the keypad on. (DLR)
|
||||
- cut.c:
|
||||
add_to_cutbuffer()
|
||||
- Add parameter allow_concat to determine whether we're allowed
|
||||
to concatenate strings in the cutbuffer. (DLR)
|
||||
- files.c:
|
||||
do_insertfile()
|
||||
- Wrap one reference to NANO_EXTCMD_KEY in a NANO_SMALL #ifdef.
|
||||
(DLR)
|
||||
- Save the already-typed answer when switching from "Insert
|
||||
File" to "Execute Command" mode via Ctrl-X, just in case we
|
||||
started typing a command before switching. (DLR)
|
||||
add_open_files()
|
||||
- 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. (DLR)
|
||||
write_marked()
|
||||
- New function used to write the current marked selection to a
|
||||
file, split out from do_writeout(). (DLR)
|
||||
do_writeout()
|
||||
- Tweak for efficiency. (David Benbennick) DLR: Modify to have
|
||||
the current answer preserved between toggles again.
|
||||
filestat()
|
||||
- Removed, as it is only called in one place and is
|
||||
redundant. (DLR)
|
||||
do_browser()
|
||||
- Replace the filestat() call with an equivalent stat() call.
|
||||
(DLR)
|
||||
- global.c:
|
||||
shortcut_init()
|
||||
- Only allow verbatim input when we're not in view mode. (DLR)
|
||||
- Set the associated function for unjustify to 0 instead of
|
||||
do_uncut_text(), since it's currently unused. (DLR)
|
||||
- nano.c:
|
||||
usage()
|
||||
- Clarify the description for -T/--tabsize a bit. (DLR)
|
||||
do_verbatim_input()
|
||||
- Remove the now-unneeded code to disable XON, XOFF, and
|
||||
suspend, since we now go into raw mode in
|
||||
get_verbatim_kbinput() and bypass them. (DLR)
|
||||
do_next_word()
|
||||
- Simplify and remove references to editbot so as to avoid a
|
||||
segfault. (David Benbennick)
|
||||
do_prev_word()
|
||||
- Simplify and remove references to edittop. (David Benbennick)
|
||||
do_int_speller(), do_alt_speller(), do_spell()
|
||||
- Modify to write only the current selection from a file to the
|
||||
temporary file used for spell checking when the mark is on,
|
||||
and add a few miscellaneous cosmetic cleanups. (DLR)
|
||||
do_int_spell_fix()
|
||||
- Store the value of current_x in a size_t instead of an int,
|
||||
and add a few minor efficiency tweaks. (David Benbennick)
|
||||
- Remove comment explaining why findnextstr() is called with
|
||||
bracket_mode set to TRUE even though we aren't doing a bracket
|
||||
search, since after the above efficiency tweaks, it's now more
|
||||
accurately called can_display_wrap. (DLR)
|
||||
indent_length()
|
||||
- Remove unneeded #ifdef. (David Benbennick)
|
||||
do_justify()
|
||||
- Remove references to the now-unneeded JUSTIFY_MODE flag. (DLR)
|
||||
signal_init()
|
||||
- Trap SIGQUIT in addition to turning it off via termios in
|
||||
main(). This is consistent with SIGINT, which we trap here
|
||||
and turn off via termios in main(), as well as with the
|
||||
associated comment. (DLR)
|
||||
handle_sigwinch()
|
||||
- Set keypad() to TRUE and switch to cbreak mode just before
|
||||
calling siglongjmp(), in case we resized during verbatim
|
||||
input. (DLR)
|
||||
main()
|
||||
- Move the call to raw() on systems that don't define
|
||||
_POSIX_VDISABLE outside the main input/output loop, as it
|
||||
doesn't need to be called every time through the loop. Call it
|
||||
instead of cbreak() on such systems, as it overrides cbreak()
|
||||
anyway. (DLR)
|
||||
- Add more descriptive comments explaining the termios and
|
||||
curses setup routines, and turn the keypad on before setting
|
||||
the input mode. (DLR)
|
||||
- Remove stray HAVE_GETOPT_LONG #ifdefs. (DLR)
|
||||
- Don't call keypad() before initializing the windows it needs
|
||||
via window_init().
|
||||
- nano.h:
|
||||
- Move the NANO_H include guard up before the first #include.
|
||||
(DLR)
|
||||
- Remove the now-unneeded JUSTIFY_MODE flag. (DLR)
|
||||
- search.c:
|
||||
regexp_cleanup()
|
||||
- Only do anything if REGEXP_COMPILED is set. (David Benbennick)
|
||||
search_abort()
|
||||
- Only test if the mark is set when NANO_SMALL isn't defined.
|
||||
(David Benbennick)
|
||||
search_init()
|
||||
- Add some more comments and comment tweaks, don't indicate that
|
||||
the search has been canceled when we enter a blank string in
|
||||
replace mode, only call regexp_init() when USE_REGEXP is set,
|
||||
and return -1 instead of -3 since a canceled search and a
|
||||
canceled replace should be mostly equivalent. (David
|
||||
Benbennick) DLR: Tweak to use the old behavior if we try to
|
||||
search for invalid regexes.
|
||||
findnextstr()
|
||||
- Refactor to use a loop invariant, and tweak for greater
|
||||
efficiency and simplicity. Also modify so that all searches
|
||||
start one character after (or before, if we're doing a
|
||||
backwards search) the current one, as opposed to all searches
|
||||
except for regex searches for "^" and the like, for
|
||||
consistency with other searches. (David Benbennick)
|
||||
do_search()
|
||||
- Handle search_init()'s no longer returning -3 above. (David
|
||||
Benbennick)
|
||||
- Port the code from do_replace_loop() to skip the current line
|
||||
if we're searching for a regex with "^" and/or "$" in it and
|
||||
end up on the same line to this function. This fixes a
|
||||
problem where doing a forward search for "^" on a file with
|
||||
more than one line would erroneously stop at the magicline and
|
||||
indicate that that was the only occurrence. (DLR)
|
||||
do_research()
|
||||
- Port David Benbennick's efficiency tweaks and the
|
||||
aforementioned code ported from do_replace_loop() to this
|
||||
function. (DLR)
|
||||
replace_regexp()
|
||||
- Completely refactor for increased efficiency. (David
|
||||
Benbennick)
|
||||
replace_line()
|
||||
- Use a char* parameter for the replacement string instead of
|
||||
last_search, and add minor efficiency tweaks. (David
|
||||
Benbennick)
|
||||
do_replace_loop()
|
||||
- Fix segfault when doing a regex replace of a string that
|
||||
matches inside a line (e.g. replace the "b" in "abc" with
|
||||
anything). (David Benbennick)
|
||||
- If the mark is on at the beginning of the functio, turn it off
|
||||
and turn it back on just before returning. Also overhaul to
|
||||
rely on the return value of findnextstr() instead of a loop
|
||||
invariant, to not need to take an int* parameter, and store
|
||||
the beginning x-coordinate in a size_t instead of an int.
|
||||
(David Benbennick)
|
||||
do_replace()
|
||||
- Handle search_init()'s no longer returning -3 above, and add
|
||||
efficiency tweaks. (David Benbennick) DLR: Tweak to follow
|
||||
the old behavior of adding non-blank strings entered at the
|
||||
"Replace: " prompt to the search history. (DLR)
|
||||
do_gotoline()
|
||||
- Simplify the edit_update() call depending on the value of
|
||||
save_pos. (David Benbennick)
|
||||
do_bracket()
|
||||
- Add efficiency tweaks. (David Benbennick) DLR: Remove
|
||||
reliance on the hardcoded bracket string length; instead, only
|
||||
require that the bracket string length be even.
|
||||
- utils.c:
|
||||
regexec_safe()
|
||||
- Wrap in HAVE_REGEX_H #ifdefs. (DLR)
|
||||
regexp_bol_or_eol()
|
||||
- New function used to check if a regex contains "^" and/or "$",
|
||||
assuming that the regex would be found if the REG_NOT(BOL|EOL)
|
||||
flags aren't used in the regexec() call; it replaces the
|
||||
direct regexec()s used before. (DLR)
|
||||
strstrwrapper()
|
||||
- Refactor for increased efficiency, and eliminate the need for
|
||||
the line_pos parameter. (David Benbennick)
|
||||
mallocstrcpy()
|
||||
- Tweak so that when src is "", "" is allocated and returned
|
||||
instead of NULL. (David Benbennick)
|
||||
- winio.c:
|
||||
get_verbatim_kbinput()
|
||||
- Set keypad() to FALSE and switch to raw mode while reading
|
||||
input, and set it back to TRUE and go back into cbreak mode
|
||||
mode afterwards. (Note that if _POSIX_VDISABLE isn't defined,
|
||||
we don't need to change to or from raw mode since we're
|
||||
already in it exclusively.) This ensures that we don't end up
|
||||
reading in extended keypad values that are outside the ASCII
|
||||
range or having to deal with interrupt-generating key values.
|
||||
Also, with keypad() set to TRUE, xterm generates KEY_BACKSPACE
|
||||
when the user hits Ctrl-H, which, when cut down to ASCII
|
||||
range, ends up being Ctrl-G, which can be confusing. (DLR)
|
||||
- For consistency with get_kbinput(), use an int* to store and
|
||||
return the input instead of a char*, and tweak the functions
|
||||
that call it to handle this. (DLR)
|
||||
get_accepted_kbinput()
|
||||
- Don't use "kbinput = wgetch(win)" as a switch value. (DLR)
|
||||
get_escape_seq_kbinput()
|
||||
- Add support for the escape sequences for F1-F14 whenever
|
||||
possible (i.e, whenever a conflict doesn't occur), some
|
||||
additional comments, and a few cosmetic cleanups. (DLR)
|
||||
- Use switch statements instead of strncmp() to read in the long
|
||||
xterm sequences for Ctrl-[arrow key] and Shift-[arrow key].
|
||||
(DLR)
|
||||
get_escape_seq_abcd()
|
||||
- A resurrected version of the old abcd() function, readded in
|
||||
order to simplify get_escape_seq_kbinput(). (DLR)
|
||||
get_mouseinput()
|
||||
- Interpret shortcut key values slightly more stringently when
|
||||
ungetch()ing them. (DLR)
|
||||
strlenpt()
|
||||
- Properly cast the second parameter of the strnlenpt() call to
|
||||
size_t. (DLR)
|
||||
get_page_start()
|
||||
- For consistency, tweak so that scrolling always occurs when we
|
||||
try to move onto the "$" at the end of the line, as opposed to
|
||||
(a) when we move onto the "$" at the end of the line on the
|
||||
first page and (b) when we move onto the character just before
|
||||
the "$" on subsequent pages. (DLR)
|
||||
reset_cursor()
|
||||
- Tweak for efficiency. (David Benbennick)
|
||||
edit_refresh()
|
||||
- Tweak for efficiency. (David Benbennick)
|
||||
statusq()
|
||||
- Rename "tabs" to "allowtabs". (David Benbennick)
|
||||
do_credits()
|
||||
- Use nanosleep() instead of usleep(). The latter is only
|
||||
standard under BSD, whereas the former is POSIX compliant.
|
||||
Accordingly, only include time.h if we use this function, i.e,
|
||||
if NANO_EXTRA is defined. (DLR)
|
||||
- Add explanatory comment. (DLR)
|
||||
- configure.ac:
|
||||
- Change instances of "int main ()" to "int main(void)". (DLR)
|
||||
- faq.html:
|
||||
- Fixed inaccuracy: multibuffer mode was first in nano 1.1.0,
|
||||
not 1.1.12. (DLR)
|
||||
- nano.1, nanorc.5, nano.texi
|
||||
- Clarify the description for -T/--tabsize a bit. (DLR)
|
||||
- Add -E/--backupdir description. (Martin Ehmsen; minor cosmetic
|
||||
fixes by DLR)
|
||||
- nanorc.sample:
|
||||
- Add backupdir description. (Martin Ehmsen; minor cosmetic
|
||||
fixes by DLR)
|
||||
- README:
|
||||
- Reformat to 72 characters per line, fix wording in one spot,
|
||||
and fix spacing and capitalization in several spots. (DLR)
|
||||
- NEWS:
|
||||
- Capitalization fix. (DLR)
|
||||
- TODO:
|
||||
- Clarify the paragraph searching item, and add item for
|
||||
filename searches in the file browser. (DLR)
|
||||
|
||||
GNU nano 1.3.1 - 2004.01.09
|
||||
- General:
|
||||
- Minor overhaul and abstraction of the lowest level of mouse
|
||||
input, mostly adapted from the code in do_mouse() that handles
|
||||
clicking on the shortcut list. New function do_mouseinput();
|
||||
changes to do_mouse(). (DLR) David Benbennick: Add a few
|
||||
efficiency/extensibility tweaks.
|
||||
- Modify the shortcut structure so that instead of having two
|
||||
miscellaneous key values (misc1 and misc2), there is one key
|
||||
value reserved for function keys (func_key) and one
|
||||
miscellaneous key value (misc), and tweak the
|
||||
shortcut-handling code to deal with this. These changes allow
|
||||
NANO_OPEN(PREV|NEXT)_ALTKEY to work properly when added to the
|
||||
shortcut entries for NANO_OPEN(PREV|NEXT)_KEY. Also remove
|
||||
the values in the shortcut list and elsewhere that were made
|
||||
redundant by the low-level input overhaul, use toupper()
|
||||
instead of subtracting 32 from values for greater code
|
||||
readability, and eliminate use of adding 32 to values when
|
||||
testing for toggles, as get_kbinput_accepted() converts toggle
|
||||
values to lowercase before returning them. (DLR)
|
||||
- Remove the workarounds for missing KEY_UP and KEY_DOWN, as
|
||||
they appear to be holdovers of the old way of denoting the
|
||||
search history shortcuts; if they aren't defined, KEY_LEFT and
|
||||
KEY_RIGHT probably shouldn't work either, and all four appear
|
||||
to be standard keys in termcap/terminfo in any case. Add new
|
||||
special sentinel key values NANO_NO_KEY (for no shortcut key)
|
||||
and NANO_HISTORY_KEY (for search history keys, both Up and
|
||||
Down), modify the shortcut list to use them, and modify the
|
||||
shortcut display routines to handle them. Also modify the
|
||||
shortcut list code to not treat non-control character values
|
||||
of val as Meta-sequences, and fix dependencies on that
|
||||
behavior. Also rename several variables: "alt" -> "meta",
|
||||
"altval" -> "metaval". (DLR)
|
||||
- Hook up the verbatim input functions so that verbatim input
|
||||
can be used in the edit window. New function
|
||||
do_verbatim_input(); changes to do_char(). (DLR) Additional
|
||||
minor tweaks to do_char() by David Benbennick.
|
||||
- Clarify the description of the --rebinddelete option. (DLR)
|
||||
- Miscellaneous comment tweaks, and copyright year updates in
|
||||
the comments and in do_credits(). (DLR)
|
||||
- cut.c:
|
||||
- Overhaul to increase efficiency and add various cleanups.
|
||||
Changes to add_to_cutbuffer(), cut_marked_segment(), and
|
||||
do_uncut_text(). (David Benbennick)
|
||||
- files.c:
|
||||
check_operating_dir()
|
||||
- Add an assert to ensure that full_operatingdir isn't NULL,
|
||||
a fix for reporting nonexistent (incomplete) directory names
|
||||
as being outside the operating directory when tab completion
|
||||
is being used, and cosmetic cleanups. (David Benbennick)
|
||||
copy_file()
|
||||
- New function used to create a copy of a file, split out from
|
||||
do_writeout(). (David Benbennick)
|
||||
write_file()
|
||||
- Completely overhauled to properly ignore appending/prepending
|
||||
to symlinks when NOFOLLOW_SYMLINKS is defined, to properly
|
||||
support writing a selection to a file under the changed
|
||||
cutting code, to have more concise error messages, to add
|
||||
various cleanups, and so on. (David Benbennick)
|
||||
do_writeout()
|
||||
- Prompt the user if we're trying to save an existing file (and
|
||||
not just a selection of it) under a different name. (DLR;
|
||||
suggested by Jean-Philippe Guérard)
|
||||
- Overhaul the code used to write a selection of a file to
|
||||
temporarily set fileage and filebot to the top and bottom of
|
||||
the selection and then call write_file(), instead of following
|
||||
the old hackish behavior with cut_marked_segment() (which
|
||||
won't work after the cutting code changes anyway). (David
|
||||
Benbennick) DLR: Tweak to not add an extra blank line to the
|
||||
end of the written selection if the cursor is at the beginning
|
||||
of the last line of the selection.
|
||||
open_prevfile(), open_nextfile()
|
||||
- For consistency with the rest of the multibuffer code, change
|
||||
"No more open files" to "No more open file buffers". (DLR)
|
||||
do_browser()
|
||||
- Allow '?' to open the help browser, and readd the ability of
|
||||
'G'/'g' to open the "Go to Directory" prompt (which was
|
||||
erroneously removed before), for compatibility with Pico.
|
||||
(DLR)
|
||||
- global.c:
|
||||
shortcut_init()
|
||||
- Allow WHEREIS_NEXT_KEY to be used in view mode. (DLR)
|
||||
- nano.c:
|
||||
do_int_spell_fix()
|
||||
- Add comment explaining why findnextstr() is called with
|
||||
bracket_mode set to TRUE even though we aren't doing a bracket
|
||||
search. (DLR)
|
||||
do_para_operation()
|
||||
- Convert to use the new low-level input functions. (DLR)
|
||||
main()
|
||||
- Remove unused variable option_index. (DLR)
|
||||
- Fix omission of NANO_NO_KEY in the shortcut list scanning
|
||||
code. (DLR)
|
||||
- Remove now-unnecessary initialization of kbinput. (DLR)
|
||||
- nano.h:
|
||||
- Comment additions and cosmetic tweaks. (DLR)
|
||||
- search.c:
|
||||
findnextstr(), do_replace_loop()
|
||||
- Fix potential infinite loops and other misbehavior when doing
|
||||
beginning-of-line or end-of-line regex replacements ("^", "$",
|
||||
and "^$"). Add a no_sameline parameter to findnextstr(), and
|
||||
set it in the calls in do_replace_loop() when such regexes are
|
||||
found, so that such regexes are only found once per line.
|
||||
Also change length_change from a long to an int; size_t is
|
||||
unsuitable due to its being unsigned. (DLR; found by Mike
|
||||
Frysinger and DLR) David Benbennick: Add a few minor cleanups
|
||||
to do_replace_loop().
|
||||
- winio.c:
|
||||
get_kbinput(), get_accepted_kbinput()
|
||||
- Don't pass in the value of the REBIND_DELETE flag anymore.
|
||||
Instead, handle it directly inside the functions. (DLR)
|
||||
get_accepted_kbinput()
|
||||
- Translate Ctrl-8 into NANO_DELETE_KEY (or NANO_BACKSPACE_KEY
|
||||
if REBIND_DELETE is set), since it apparently is generated
|
||||
sometimes even when keypad() is TRUE. (DLR)
|
||||
- Translate KEY_SLEFT into NANO_BACK_KEY and KEY_SRIGHT into
|
||||
NANO_FORWARD_KEY, since they are sometimes generated by
|
||||
Shift-Left and Shift-Right. (DLR)
|
||||
get_ascii_kbinput()
|
||||
- Tweak to make it slightly more readable. (DLR)
|
||||
get_verbatim_kbinput()
|
||||
- Modify to take an extra parameter indicating if we should
|
||||
interpret ASCII codes or not. (DLR)
|
||||
get_escape_seq_kbinput()
|
||||
- Expand to deal with more broken terminals that don't generate
|
||||
keypad values. Support the escape sequences for Insert,
|
||||
Delete, Home, End, PageUp, and PageDown, [arrow key],
|
||||
Ctrl-[arrow key], and Shift-[arrow key] when needed in the
|
||||
Linux console, the FreeBSD console, the Hurd console, xterm,
|
||||
rxvt, and Eterm. Also, use get_verbatim_kbinput(), with ASCII
|
||||
interpretation disabled, to read in the sequences. (DLR)
|
||||
get_skip_tilde_kbinput()
|
||||
- Removed, as it is unneeded due to the expansion of
|
||||
get_escape_seq_kbinput(). (DLR)
|
||||
get_mouseinput()
|
||||
- Modify to take an extra parameter indicating if we should
|
||||
ungetch() the key equivalents of shortcuts we click on or not.
|
||||
(DLR)
|
||||
nanogetstr()
|
||||
- Properly interpret the Meta key value in misc if we hit it at
|
||||
the statusbar prompt. (DLR)
|
||||
do_yesno()
|
||||
- Add a few efficiency/extensibility tweaks. (David Benbennick)
|
||||
- Convert to use the new low-level input functions, and remove
|
||||
two last hardcoded widths left after the above tweaks. (DLR)
|
||||
do_replace_highlight()
|
||||
- Display a highlighted space if the word length is zero, so
|
||||
that we can see zero-length regexes we're replacing. (DLR;
|
||||
suggested by Mike Frysinger)
|
||||
- configure.ac:
|
||||
- Check for glib 2.x and then 1.2.x if we need glib. (DLR)
|
||||
- faq.html:
|
||||
- Add question explaining how verbatim input works, as well as a
|
||||
few minor fixes. (DLR)
|
||||
- nano.1, nanorc.5:
|
||||
- Add nano version numbers (minus any "-cvs" suffixes). (DLR)
|
||||
- nano.spec.in:
|
||||
- Update for the 1.3 branch of nano. (DLR)
|
||||
- NEWS:
|
||||
- Reformat so all lines are limited to 72 columns, add a few
|
||||
typo fixes, and make a few minor cosmetic cleanups. (DLR)
|
||||
- THANKS:
|
||||
- Add Danilo Segan, for the Serbian translation.
|
||||
|
||||
GNU nano 1.3.0 - 2003.10.22
|
||||
- General:
|
||||
- Complete overhaul and abstraction of the lowest level of
|
||||
@@ -100,8 +544,8 @@ GNU nano 1.3.0 - 2003.10.22
|
||||
interpreted as Ctrl-[character], and the support for Pico's
|
||||
Esc Esc [three-digit decimal ASCII code] input method. (DLR)
|
||||
do_mark()
|
||||
- Toggle MARK_ISSET() at the beginning of the function instead
|
||||
of setting it in one place and unsetting it in another place.
|
||||
- Toggle MARK_ISSET at the beginning of the function instead of
|
||||
setting it in one place and unsetting it in another place.
|
||||
(David Benbennick)
|
||||
do_suspend()
|
||||
- Use handle_hupterm() to handle SIGHUP and SIGTERM so we can
|
||||
@@ -383,7 +827,7 @@ GNU nano 1.1.99pre3 - 2003.02.13
|
||||
- files.c:
|
||||
cwd_tab_completion()
|
||||
- Memory leak fix (David Benbennick).
|
||||
intput_tab()
|
||||
input_tab()
|
||||
- Fix assumption that matches is null terminated (David
|
||||
Benbennick).
|
||||
load_history()
|
||||
|
||||
45
README
45
README
@@ -7,19 +7,20 @@ Overview
|
||||
wonderfully easy-to-use and friendly Pico text editor.
|
||||
|
||||
First and foremost is its license: the Pine suite does not use the
|
||||
GPL or a GPL-friendly license, and has unclear restrictions on
|
||||
redistribution. Because of this, Pine and Pico are not included with
|
||||
many GNU/Linux distributions. Also, other features (like goto line
|
||||
number or search and replace) were unavailable until recently or
|
||||
require a command line flag. Yuck.
|
||||
GPL or a GPL-friendly license, and has unclear restrictions on
|
||||
redistribution. Because of this, Pine and Pico are not included
|
||||
with many GNU/Linux distributions. Also, other features (like goto
|
||||
line number or search and replace) were unavailable until recently
|
||||
or require a command line flag. Yuck.
|
||||
|
||||
nano aims to solve these problems by emulating the functionality of
|
||||
Pico as closely as possible while addressing the problems above and
|
||||
perhaps providing other extra functionality.
|
||||
|
||||
The nano editor is now an official GNU package. For more information
|
||||
on GNU and the Free Software Foundation please see http://www.gnu.org.
|
||||
|
||||
The nano editor is now an official GNU package. For more
|
||||
information on GNU and the Free Software Foundation please see
|
||||
http://www.gnu.org.
|
||||
|
||||
How to compile and install nano
|
||||
|
||||
Download the nano source code, then:
|
||||
@@ -28,37 +29,41 @@ How to compile and install nano
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
|
||||
It's that simple. Use --prefix with configure to override the
|
||||
|
||||
It's that simple. Use --prefix with configure to override the
|
||||
default installation directory of /usr/local.
|
||||
|
||||
|
||||
Web Page
|
||||
|
||||
http://www.nano-editor.org
|
||||
|
||||
|
||||
Mailing List and Bug Reports
|
||||
|
||||
Savannah hosts all the nano-related mailing-lists.
|
||||
|
||||
+ info-nano@gnu.org is a very low traffic list
|
||||
used to announce new Nano versions or other important information
|
||||
about the project.
|
||||
used to announce new nano versions or other important
|
||||
information about the project.
|
||||
+ help-nano@gnu.org is for those seeking to get help without
|
||||
wanting to hear about the technical details of its
|
||||
development.
|
||||
+ nano-devel@gnu.org is the list used by the people
|
||||
that make Nano and a general development discussion list, with
|
||||
that make nano and a general development discussion list, with
|
||||
moderate traffic.
|
||||
To subscribe, send email to nano-<name>-request@gnu.org
|
||||
with a subject of "subscribe", where <name> is the list you want to
|
||||
|
||||
To subscribe, send email to nano-<name>-request@gnu.org with a
|
||||
subject of "subscribe", where <name> is the list you want to
|
||||
subscribe to.
|
||||
|
||||
For general bug reports, send a description of the problem to
|
||||
nano@nano-editor.org or directly to the development list.
|
||||
|
||||
Current Status
|
||||
|
||||
GNU nano has reaching its second major milestone, 1.2.x. Development
|
||||
of new features will continue in the 1.3.x branch, while 1.2.x
|
||||
versions will be dedicated to bugfixing and polishing.
|
||||
GNU nano has reached its second major milestone, 1.2.x.
|
||||
Development of new features will continue in the 1.3.x branch,
|
||||
while 1.2.x versions will be dedicated to bugfixing and
|
||||
polishing.
|
||||
|
||||
Chris Allegretta (chrisa@asty.org)
|
||||
|
||||
|
||||
1
THANKS
1
THANKS
@@ -28,6 +28,7 @@ Sergey A. Ribalchenko <fisher@obu.ck.ua> Russian, Ukrainian translator
|
||||
Michel Robitaille <robitail@IRO.UMontreal.CA> French translator
|
||||
Christian Rose <menthos@menthos.com> Swedish translator
|
||||
Stig E Sandoe <stig@ii.uib.no> Norwegian bokmål translator
|
||||
Danilo Segan <dsegan@gmx.net> Serbian translator
|
||||
Keld Simonsen <keld@dkuug.dk> Danish translator
|
||||
Guus Sliepen <guus@nl.linux.org> Dutch translator
|
||||
Cezary Sliwa <sliwa@cft.edu.pl> Polish translator
|
||||
|
||||
6
TODO
6
TODO
@@ -3,11 +3,13 @@ TODO file (? means the feature may be implemented, but not definitely)
|
||||
|
||||
For version 1.4:
|
||||
- UTF-8 support.
|
||||
- Support for Pico's paragraph searching ability. [DONE]
|
||||
- Support for paragraph searches. [DONE]
|
||||
- Support for filename searches in the file browser.
|
||||
- Undo/Redo key?
|
||||
- Rebindable keys?
|
||||
- Keystroke to implement "Add next sequence as raw" like vi's ^V.
|
||||
- Spell check selected text only.
|
||||
[DONE for edit window, needs to be done for statusbar prompt]
|
||||
- Spell check selected text only. [DONE]
|
||||
- Make "To line" (^W^T) and "Read from Command" (^R^X) re-enter their
|
||||
parent menu when their keystroke is entered a second time (^W^T^T and
|
||||
(^R^X^X)(requires figuring out when to keep cursor pos and when not
|
||||
|
||||
27
configure.ac
27
configure.ac
@@ -19,7 +19,7 @@
|
||||
#
|
||||
# $Id$
|
||||
|
||||
AC_INIT([GNU nano], [1.3.0], [nano-devel@gnu.org], [nano])
|
||||
AC_INIT([GNU nano], [1.3.2], [nano-devel@gnu.org], [nano])
|
||||
AC_CONFIG_SRCDIR([src/nano.c])
|
||||
AM_INIT_AUTOMAKE
|
||||
AM_CONFIG_HEADER([config.h:config.h.in])
|
||||
@@ -43,7 +43,7 @@ AC_CHECK_HEADER(regex.h,
|
||||
AC_TRY_RUN([
|
||||
#include <sys/types.h>
|
||||
#include <regex.h>
|
||||
int main () { regex_t reg; size_t n = 1; regmatch_t r; regcomp(®, "\\<", 0); regexec(®, "", n, &r, 0); regfree(®); return 0; }],
|
||||
int main(void) { regex_t reg; size_t n = 1; regmatch_t r; regcomp(®, "\\<", 0); regexec(®, "", n, &r, 0); regfree(®); return 0; }],
|
||||
AC_MSG_RESULT(no),
|
||||
AC_MSG_RESULT(yes); AC_DEFINE(BROKEN_REGEXEC, 1, [Define this if your regexec() function segfaults when passed an empty string under certain conditions.])
|
||||
)
|
||||
@@ -201,7 +201,7 @@ AC_ARG_WITH(slang,
|
||||
AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
#include <slcurses.h>
|
||||
int main () { SLtt_initialize (NULL); return 0; }],
|
||||
int main(void) { SLtt_initialize(NULL); return 0; }],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG, 1, [Define to use the slang wrappers for curses instead of native curses.])
|
||||
slang_support=yes
|
||||
@@ -223,7 +223,7 @@ int main () { SLtt_initialize (NULL); return 0; }],
|
||||
AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
#include <slcurses.h>
|
||||
int main () { SLtt_initialize (NULL); return 0; }],
|
||||
int main(void) { SLtt_initialize(NULL); return 0; }],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG, 1, [Define to use the slang wrappers for curses instead of native curses.])
|
||||
slang_support=yes
|
||||
@@ -240,7 +240,7 @@ int main () { SLtt_initialize (NULL); return 0; }],
|
||||
AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
#include <slcurses.h>
|
||||
int main () { SLtt_initialize (NULL); return 0; }],
|
||||
int main(void) { SLtt_initialize(NULL); return 0; }],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(USE_SLANG, 1, [Define to use the slang wrappers for curses instead of native curses.])
|
||||
slang_support=yes
|
||||
@@ -273,14 +273,13 @@ dnl Checks for functions
|
||||
AC_CHECK_FUNCS(snprintf vsnprintf strcasecmp strncasecmp)
|
||||
if test "x$ac_cv_func_snprintf" = "xno" -o "xac_cv_func_vsnprintf" = "xno"
|
||||
then
|
||||
AM_PATH_GLIB(1.2.4,,
|
||||
[AC_MSG_ERROR([
|
||||
AM_PATH_GLIB_2_0(2.0.0,,
|
||||
[AM_PATH_GLIB(1.2.4,,
|
||||
[AC_MSG_ERROR([
|
||||
*** snprintf() and/or vsnprintf() not found. GLIB not found either.
|
||||
*** You need both snprintf() and vsnprintf(). Alternatively you can
|
||||
*** install the GLIB library which can be found at ftp://ftp.gtk.org/.])],
|
||||
glib)
|
||||
glib_cflags=`$GLIB_CONFIG --cflags glib`
|
||||
glib_libs=`$GLIB_CONFIG --libs glib`
|
||||
glib)])
|
||||
fi
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
@@ -338,13 +337,13 @@ LIBS="$LIBS $CURSES_LIB"
|
||||
|
||||
AC_SUBST(CURSES_LIB)
|
||||
|
||||
if test "x$glib_cflags" != "x"
|
||||
if test "x$GLIB_CFLAGS" != "x"
|
||||
then
|
||||
CFLAGS="$CFLAGS $glib_cflags"
|
||||
CFLAGS="$CFLAGS $GLIB_CFLAGS"
|
||||
fi
|
||||
if test "x$glib_libs" != "x"
|
||||
if test "x$GLIB_LIBS" != "x"
|
||||
then
|
||||
LDFLAGS="$LDFLAGS $glib_libs"
|
||||
LDFLAGS="$LDFLAGS $GLIB_LIBS"
|
||||
fi
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
|
||||
21
doc/faq.html
21
doc/faq.html
@@ -29,7 +29,8 @@
|
||||
<a href="#3.5">3.5. Nano should automatically run strip on the binary when installing it!</a><br>
|
||||
<a href="#3.6">3.6. How can I make the executable smaller? This is too bloated!</a><br>
|
||||
<a href="#3.7">3.7. Tell me more about this multibuffer stuff!</a><br>
|
||||
<a href="#3.8">3.8. How do I make a .nanorc file that nano will read when I start it?</a></p></blockquote>
|
||||
<a href="#3.8">3.8. Tell me more about this verbatim input stuff!</a><br>
|
||||
<a href="#3.9">3.9. How do I make a .nanorc file that nano will read when I start it?</a></p></blockquote>
|
||||
<h2><a href="#4">4. Running</a></h2>
|
||||
<blockquote><p><a href="#4.1">4.1. Ack! My backspace/delete/enter/double bucky/meta key doesn't seem to work! What can I do?</a><br>
|
||||
<a href="#4.2">4.2. Nano crashes when I type <insert keystroke here>!</a><br>
|
||||
@@ -78,7 +79,7 @@
|
||||
<h2><a name="1.5"></a>1.5. Why the name change from TIP?</h2>
|
||||
<blockquote><p>On January 10, 2000, TIP was officially renamed to nano because of a namespace conflict with another program called 'tip'. The original 'tip' program "establishes a full duplex terminal connection to a remote host", and was included with many older Unix systems (and newer ones like Solaris). The conflict was not noticed at first because there is no 'tip' utility included with most GNU/Linux distributions (where nano was developed).</p></blockquote>
|
||||
<h2><a name="1.6"></a>1.6. What is the current version of nano?</h2>
|
||||
<blockquote><p>The current version of nano *should* be 1.3.0. Of course you should always check the nano homepage to see what the latest and greatest version is.</p></blockquote>
|
||||
<blockquote><p>The current version of nano *should* be 1.3.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.2/nano.1.html">here</a>.</p></blockquote>
|
||||
<hr width="100%">
|
||||
@@ -157,10 +158,14 @@
|
||||
<b>--enable-multibuffer</b> Enables having multiple file buffers open
|
||||
<b>--enable-all</b> Enables all of the above features</pre></blockquote>
|
||||
<h2><a name="3.7"></a>3.7. Tell me more about this multibuffer stuff!</h2>
|
||||
<blockquote><p>To use multiple file buffers, you must be using nano 1.1.12 or newer, and you must have configured nano with <b>--enable-multibuffer</b> or <b>--enable-extra</b> (use nano -V to check). Then when you want to enable inserting a file into its own buffer instead of into the current file, just hit <b>Meta-F</b>, then insert the file as normal with <b>^R</b>. If you always want files to be loaded into their own buffers, use the <b>--multibuffer</b> or <b>-F</b> flag when you invoke nano. </p>
|
||||
<blockquote><p>To use multiple file buffers, you must be using nano 1.1.0 or newer, and you must have configured nano with <b>--enable-multibuffer</b> or <b>--enable-extra</b> (use nano -V to check). Then when you want to enable inserting a file into its own buffer instead of into the current file, just hit <b>Meta-F</b>, then insert the file as normal with <b>^R</b>. If you always want files to be loaded into their own buffers, use the <b>--multibuffer</b> or <b>-F</b> flag when you invoke nano.</p>
|
||||
<p>You can move between the buffers you have open with the <b>Meta-<</b> and <b>Meta-></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 "Close", instead of the normal "Exit" when only one buffer is open.</p></blockquote>
|
||||
<h2><a name="3.8"></a>3.8. How do I make a .nanorc file that nano will read when I start it?</h2>
|
||||
<blockquote>It's not hard at all! But, your version of nano must have been compiled with <b>--enable-nanorc</b>, and again must be version 1.1.12 or newer (use nano -V to check your version and compiled features). Then simply copy the <b>nanorc.sample</b> that came with the nano source or your nano package (most likely in /usr/doc/nano) to .nanorc in your home directory. If you didn't get one, the syntax is simple. Flags are turned on and off by using the word <b>set</b> and the getopt_long flag for the feature, for example "set pico" or "set nowrap".</blockquote>
|
||||
<h2><a name="3.8"></a>3.8. Tell me more about this verbatim input stuff!</h2>
|
||||
<blockquote><p>To use verbatim input, you must be using nano 1.3.1 or newer. When you want to insert a literal character into the file you're editing, such as a control character that nano usually treats as a command, first press <b>Meta-V</b>. (If you're not at a prompt, you'll get the message "Verbatim input".) Then press the key(s) that generate the character you want.</p>
|
||||
<p>Alternatively, you can press <b>Meta-V</b> and then type a three-digit ASCII code from 000 to 255, and the character with that ASCII code will be inserted instead.</p>
|
||||
<p><b>NOTE:</b> Verbatim input doesn't work at prompts right now. This will be fixed soon.</p></blockquote>
|
||||
<h2><a name="3.9"></a>3.9. How do I make a .nanorc file that nano will read when I start it?</h2>
|
||||
<blockquote><p>It's not hard at all! But, your version of nano must have been compiled with <b>--enable-nanorc</b>, and again must be version 1.1.12 or newer (use nano -V to check your version and compiled features). Then simply copy the <b>nanorc.sample</b> that came with the nano source or your nano package (most likely in /usr/doc/nano) to .nanorc in your home directory. If you didn't get one, the syntax is simple. Flags are turned on and off by using the word <b>set</b> and the getopt_long flag for the feature, for example "set nowrap" or "set suspend".</p></blockquote>
|
||||
<hr width="100%">
|
||||
<h1><a name="4"></a>4. Running</h1>
|
||||
<h2><a name="4.1"></a>4.1. Ack! My backspace/delete/enter/double bucky/meta key doesn't seem to work! What can I do?</h2>
|
||||
@@ -195,7 +200,7 @@
|
||||
<p><b>my_hdr X-Composer: nano x.y.z</b></p>
|
||||
<p>Again, replace x.y.z with the version of nano you use.</p></blockquote>
|
||||
<h2><a name="4.8"></a>4.8. I've compiled nano with color support, but I don't see any color when I run it!</h2>
|
||||
<blockquote><p>If you want nano to actually use color, you have to specify the color configurations you want it to use in your .nanorc. Some example configurations are in the <b>nanorc.sample</b> that comes with the nano source or your nano package. See Section <a href="#3.8">3.8</a>.</p></blockquote>
|
||||
<blockquote><p>If you want nano to actually use color, you have to specify the color configurations you want it to use in your .nanorc. Some example configurations are in the <b>nanorc.sample</b> that comes with the nano source or your nano package. See Section <a href="#3.9">3.9</a>.</p></blockquote>
|
||||
<hr width="100%">
|
||||
<h1><a name="5"></a>5. Internationalization</h1>
|
||||
<h2><a name="5.1"></a>5.1. There's no translation for my language!</h2>
|
||||
@@ -236,8 +241,10 @@
|
||||
<h2><a name="8"></a>8. ChangeLog</h2>
|
||||
<blockquote>
|
||||
<p>
|
||||
2004/01/30 - Fixed inaccuracy: multibuffer mode was first in nano 1.1.0, not 1.1.12. (DLR)<br>
|
||||
2003/12/31 - Added question about the new verbatim input function, and a few minor fixes. Removed reference to "set pico" (DLR).<br>
|
||||
2003/07/02 - Added question about nano's not showing color when it's compiled with color support (DLR; suggested by Jordi).<br>
|
||||
2003/02/23 - Updated RPM links for nano 1.2.x. (DLR).<br>
|
||||
2003/02/23 - Updated RPM links for nano 1.2.x (DLR).<br>
|
||||
2003/01/16 - Split section 4.5 into 4.5a and 4.5b for search string behavior. Added --enable-all docs.<br>
|
||||
2002/12/28 - More misc. fixes (David Benbennick, DLR).<br>
|
||||
2002/10/25 - Misc. fixes and link updates (DLR).<br>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
.\" Public License for copying conditions. There is NO warranty.
|
||||
.\"
|
||||
.\" $Id$
|
||||
.TH NANO 1 "August 24, 2003"
|
||||
.TH NANO 1 "version 1.3.2" "March 31, 2004"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
|
||||
@@ -42,6 +42,10 @@ filename suffixed with a ~.
|
||||
.B \-D (\-\-dos)
|
||||
Write file in DOS format.
|
||||
.TP
|
||||
.B \-E \fIdir\fP (\-\-backupdir=\fIdir\fP)
|
||||
Set the directory where \fBnano\fP puts the backup files if file backups
|
||||
are enabled.
|
||||
.TP
|
||||
.B \-F (\-\-multibuffer)
|
||||
Enable multiple file buffers, if available.
|
||||
.TP
|
||||
@@ -77,8 +81,8 @@ Enable regular expression matching for search strings, as well as
|
||||
Enable smooth scrolling. Text will scroll line-by-line, instead of the
|
||||
usual chunk-by-chunk behavior.
|
||||
.TP
|
||||
.B \-T \fInum\fP (\-\-tabsize=\fInum\fP)
|
||||
Set the size (width) of a tab.
|
||||
.B \-T \fIcols\fP (\-\-tabsize=\fIcols\fP)
|
||||
Set the size (width) of a tab to \fIcols\fP columns.
|
||||
.TP
|
||||
.B \-V (\-\-version)
|
||||
Show the current version number and author.
|
||||
@@ -100,8 +104,8 @@ acts like Delete on your system.
|
||||
Display a summary of command line options.
|
||||
.TP
|
||||
.B \-i (\-\-autoindent)
|
||||
Indent new lines to the previous line's indentation. Useful when editing
|
||||
source code.
|
||||
Indent new lines to the previous line's indentation. Useful when
|
||||
editing source code.
|
||||
.TP
|
||||
.B \-k (\-\-cut)
|
||||
Enable cut from cursor to end of line with ^K.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
.\" Public License for copying conditions. There is NO warranty.
|
||||
.\"
|
||||
.\" $Id$
|
||||
.TH NANORC 5 "August 24, 2003"
|
||||
.TH NANORC 5 "version 1.3.2" "March 31, 2004"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
.SH NAME
|
||||
@@ -47,6 +47,10 @@ Use auto-indentation.
|
||||
Create backup files in
|
||||
.IR filename~ .
|
||||
.TP
|
||||
\fBset backupdir "\fIdirectory\fP"\fP
|
||||
Set the directory where \fBnano\fP puts the backup files if file backups
|
||||
are enabled.
|
||||
.TP
|
||||
\fBset/unset const\fP
|
||||
Constantly display the cursor position in the status bar.
|
||||
.TP
|
||||
@@ -115,8 +119,8 @@ calls \fIspell\fP.
|
||||
Allow nano to be suspended with ^Z.
|
||||
.TP
|
||||
\fBset tabsize \fIn\fP\fP
|
||||
Use a tab size of \fIn\fP instead of the default (8); must be greater
|
||||
than 0.
|
||||
Use a tab size of \fIn\fP columns instead of the default (8); must be
|
||||
greater than 0.
|
||||
.TP
|
||||
\fBset/unset tempfile\fP
|
||||
Save automatically on exit, don't prompt.
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
## Backup files to filename~
|
||||
# set backup
|
||||
|
||||
## The directory to put the backup files in.
|
||||
# set backupdir ""
|
||||
|
||||
## Constantly display the cursor position in the status bar.
|
||||
# set const
|
||||
|
||||
@@ -66,7 +69,7 @@
|
||||
## You can get old nano quoted-justify behavior via:
|
||||
# set quotestr "(> )+"
|
||||
|
||||
## Fix Backspace if it acts like Delete
|
||||
## Fix Backspace/Delete confusion problem
|
||||
# set rebinddelete
|
||||
|
||||
## Do extended regular expression searches by default
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
@c Run `makeinfo' rather than `texinfo-format-buffer'.
|
||||
@smallbook
|
||||
@set EDITION 0.1
|
||||
@set VERSION 1.3.0
|
||||
@set UPDATED 22 Oct 2003
|
||||
@set VERSION 1.3.2
|
||||
@set UPDATED 31 Mar 2004
|
||||
|
||||
@dircategory Editors
|
||||
@direntry
|
||||
@@ -23,7 +23,7 @@
|
||||
@titlepage
|
||||
@title GNU @code{nano}
|
||||
@subtitle a small and friendly text editor.
|
||||
@subtitle version 1.3.0
|
||||
@subtitle version 1.3.2
|
||||
|
||||
@author Chris Allegretta
|
||||
@page
|
||||
@@ -114,6 +114,10 @@ filename suffixed with a ~.
|
||||
@item -D, --dos
|
||||
Write file in DOS format.
|
||||
|
||||
@item -E, --backupdir=[dir]
|
||||
Set the directory where @code{nano} puts the backup files if file
|
||||
backups are enabled.
|
||||
|
||||
@item -F, --multibuffer
|
||||
Enable multiple file buffers, if available.
|
||||
|
||||
@@ -143,8 +147,8 @@ Turn on regular expression search and search/replace.
|
||||
@item -S, --smooth
|
||||
Enable smooth scrolling.
|
||||
|
||||
@item -T [num], --tabsize=[num]
|
||||
Set the displayed tab length to [num] columns.
|
||||
@item -T [num], --tabsize=[#cols]
|
||||
Set the displayed tab length to [#cols] columns.
|
||||
|
||||
@item -V, --version
|
||||
Print the version number and copyright and quit.
|
||||
|
||||
@@ -9,7 +9,7 @@ Release : %{rel}
|
||||
Copyright : GPL
|
||||
Group : Console/Editors
|
||||
URL : http://www.nano-editor.org
|
||||
Source : http://www.nano-editor.org/dist/v1.2/%{name}-%{ver}.tar.gz
|
||||
Source : http://www.nano-editor.org/dist/v1.3/%{name}-%{ver}.tar.gz
|
||||
BuildRoot : /var/tmp/%{name}-buildroot
|
||||
Requires : ncurses
|
||||
|
||||
@@ -30,7 +30,7 @@ make DESTDIR="$RPM_BUILD_ROOT" install
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc AUTHORS BUGS COPYING ChangeLog INSTALL NEWS README THANKS TODO nanorc.sample
|
||||
%doc AUTHORS BUGS COPYING ChangeLog INSTALL NEWS README THANKS TODO doc/faq.html doc/nanorc.sample
|
||||
%{_bindir}/nano
|
||||
%{_mandir}/*/*
|
||||
%{_datadir}/locale/*/LC_MESSAGES/nano.mo
|
||||
|
||||
102
po/ChangeLog
102
po/ChangeLog
@@ -1,3 +1,23 @@
|
||||
2004-02-24 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ms.po: Updated Malay translation by Sharuzzaman Ahmat Raslan.
|
||||
|
||||
2003-11-25 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ro.po: Updated Romanian translation by Laurentiu Buzdugan.
|
||||
|
||||
2003-11-06 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* sr.po: Added Serbian translation by Danilo Segan <dsegan@gmx.net>.
|
||||
* LINGUAS: Added "sr" (Serbian), and alphabetize.
|
||||
* ChangeLog: Recoded as UTF-8.
|
||||
|
||||
2003-10-30 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fi.po: Patch from Martin-Eric Racine <q-funk@pp.fishpool.fi>
|
||||
to accept "Yy" and "Nn" as well as the Finnish letters in Yes/No
|
||||
prompts.
|
||||
|
||||
2003-10-18 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ca.po: Updated Catalan translation.
|
||||
@@ -8,7 +28,7 @@
|
||||
|
||||
2003-09-01 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
|
||||
2003-08-17 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
@@ -20,11 +40,11 @@
|
||||
|
||||
2003-06-11 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* nb.po: Updated Norwegian bokmål translation by Geir Helland.
|
||||
* nb.po: Updated Norwegian bokmål translation by Geir Helland.
|
||||
|
||||
2003-06-10 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
|
||||
2003-06-02 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
@@ -32,7 +52,7 @@
|
||||
|
||||
2003-05-06 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ms.po: Malay translation by Sharuzzaman Ahmat Raslan.
|
||||
* ms.po: Updated Malay translation by Sharuzzaman Ahmat Raslan.
|
||||
|
||||
2003-04-24 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
@@ -46,7 +66,7 @@
|
||||
|
||||
2003-04-04 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
|
||||
2003-03-17 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
@@ -68,7 +88,7 @@
|
||||
2003-02-19 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fi.po: Updated Finnish translation by Kalle Olavi Niemitalo.
|
||||
* es.po: Updated Spanish translation by Ricardo Javier Cárdenes
|
||||
* es.po: Updated Spanish translation by Ricardo Javier Cárdenes
|
||||
Medina.
|
||||
|
||||
2003-02-17 Jordi Mallach <jordi@gnu.org>
|
||||
@@ -79,12 +99,12 @@
|
||||
|
||||
2003-02-16 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* gl.po: Updated Galician translation by Jacobo Tarrío.
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
* gl.po: Updated Galician translation by Jacobo Tarrío.
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
|
||||
2003-02-15 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
* nl.po: Updated Dutch translation by Guus Sliepen.
|
||||
* sv.po: Updated Swedish translation by Christian Rose.
|
||||
* ca.po: Updated Catalan translation.
|
||||
@@ -111,8 +131,8 @@
|
||||
2003-02-08 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* it.po: Updated Italian translation by Marco Colombo.
|
||||
* gl.po: Updated Galician translation by Jacobo Tarrío.
|
||||
* es.po: Updated Spanish translation by Ricardo Javier Cárdenes
|
||||
* gl.po: Updated Galician translation by Jacobo Tarrío.
|
||||
* es.po: Updated Spanish translation by Ricardo Javier Cárdenes
|
||||
Medina.
|
||||
|
||||
2003-02-06 Jordi Mallach <jordi@gnu.org>
|
||||
@@ -123,13 +143,13 @@
|
||||
2003-02-04 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ca.po: Updated Catalan translation.
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
* uk.po: Updated Ukrainian translation by Sergey A. Ribalchenko.
|
||||
* de.po: Updated German translation by Michael Piefel.
|
||||
|
||||
2003-01-27 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* es.po: Updated translation by Ricardo Javier Cárdenes Medina.
|
||||
* es.po: Updated translation by Ricardo Javier Cárdenes Medina.
|
||||
|
||||
2002-01-26 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
@@ -137,7 +157,7 @@
|
||||
|
||||
2002-01-25 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* gl.po: Updated translation by Jacobo Tarrío.
|
||||
* gl.po: Updated translation by Jacobo Tarrío.
|
||||
|
||||
2002-01-22 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
@@ -145,13 +165,13 @@
|
||||
|
||||
2003-01-21 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* ms.po: Updated translation by Sharuzzaman Ahmat Raslan.
|
||||
* uk.po: Updated translation by Sergey A. Ribalchenko.
|
||||
|
||||
2003-01-18 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* sv.po: Updated translation by Christian Rose.
|
||||
* nl.po: Updated translation by Guus Sliepen.
|
||||
* ca.po: Updated translation.
|
||||
@@ -175,7 +195,7 @@
|
||||
|
||||
2002-12-14 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* tr.po: New Turkish translation by Doruk Fisek.
|
||||
|
||||
2002-11-10 Jordi Mallach <jordi@sindominio.net>
|
||||
@@ -195,22 +215,22 @@
|
||||
2002-10-29 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* id.po: Updated translation by Tedi Heriyanto.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
|
||||
2002-10-27 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
|
||||
2002-10-26 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* es.po: Updated translation by Ricardo Javier Cárdenes Medina.
|
||||
* es.po: Updated translation by Ricardo Javier Cárdenes Medina.
|
||||
|
||||
2002-10-26 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* gl.po: Updated translation by Jacobo Tarrío.
|
||||
* gl.po: Updated translation by Jacobo Tarrío.
|
||||
* sv.po: Updated translation by Christian Rose.
|
||||
* de.po: Updated translation by Michael Piefel.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* ca.po: Updated translation.
|
||||
|
||||
2002-10-17 Jordi Mallach <jordi@sindominio.net>
|
||||
@@ -219,11 +239,11 @@
|
||||
|
||||
2002-10-14 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
|
||||
2002-10-13 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* es.po: Updated translation by Ricardo Javier Cárdenes Medina.
|
||||
* es.po: Updated translation by Ricardo Javier Cárdenes Medina.
|
||||
|
||||
2002-10-08 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
@@ -241,7 +261,7 @@
|
||||
2002-10-07 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* sv.po: Updated translation by Christian Rose.
|
||||
* gl.po: Updated translation by Jacobo Tarrío.
|
||||
* gl.po: Updated translation by Jacobo Tarrío.
|
||||
* pl.po: Updated translation by Wojciech Kotwica.
|
||||
|
||||
2002-09-08 Jordi Mallach <jordi@sindominio.net>
|
||||
@@ -250,7 +270,7 @@
|
||||
|
||||
2002-09-08 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* da.po: Updated translation by Keld Simonsen.
|
||||
|
||||
2002-08-19 Jordi Mallach <jordi@sindominio.net>
|
||||
@@ -260,15 +280,15 @@
|
||||
|
||||
2002-07-31 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* gl.po: Updated translation by Jacobo Tarrío.
|
||||
* gl.po: Updated translation by Jacobo Tarrío.
|
||||
|
||||
2002-07-31 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* es.po: Updated translation by Ricardo Javier Cárdenes Medina.
|
||||
* es.po: Updated translation by Ricardo Javier Cárdenes Medina.
|
||||
|
||||
2002-07-31 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
|
||||
2002-07-30 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
@@ -318,13 +338,13 @@
|
||||
|
||||
2002-05-13 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* de.po: Updated translation by Michael Piefel.
|
||||
|
||||
2002-05-13 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* it.po: Updated translation by Marco Colombo.
|
||||
* gl.po: Updated translation by Jacobo Tarrío.
|
||||
* gl.po: Updated translation by Jacobo Tarrío.
|
||||
* ca.po: Updated translation.
|
||||
* es.po: Updated translation.
|
||||
|
||||
@@ -361,7 +381,7 @@
|
||||
|
||||
* gl.po: Updated translation by Jacobo Tarrio.
|
||||
* de.po: Updated translation by Michael Piefel.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* ca.po: Updated.
|
||||
* es.po: Updated.
|
||||
|
||||
@@ -379,7 +399,7 @@
|
||||
|
||||
2002-03-17 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
|
||||
2002-03-15 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
@@ -402,7 +422,7 @@
|
||||
|
||||
2002-03-11 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
|
||||
2002-03-09 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
@@ -450,7 +470,7 @@
|
||||
|
||||
2002-02-06 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* cs.po: Incomplete update by Václav Haisman.
|
||||
* cs.po: Incomplete update by Václav Haisman.
|
||||
|
||||
2002-01-27 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
@@ -458,14 +478,14 @@
|
||||
|
||||
2002-01-26 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* nn.po: Updated translation by Kjetil Torgrim Homme.
|
||||
* de.po: Updated translation by Michael Piefel.
|
||||
|
||||
2002-01-25 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* sv.po: Updated translation by Christian Rose.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
|
||||
2002-01-25 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
@@ -496,21 +516,21 @@
|
||||
|
||||
* no.po: Removed, replaced by nn.po.
|
||||
* nn.po: Updated translation by Kjetil Torgrim Homme.
|
||||
* nb.po: New Norwegian bokmål translation by Stig E Sandoe.
|
||||
* nb.po: New Norwegian bokmål translation by Stig E Sandoe.
|
||||
|
||||
2002-01-12 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
|
||||
2002-01-10 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
|
||||
2002-01-08 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* ru.po, uk.po: Updated translations by Sergey A.
|
||||
Ribalchenko.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
* fr.po: Updated translation by Jean-Philippe Guérard.
|
||||
|
||||
2002-01-07 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
# List of available languages.
|
||||
es de fr it id fi hu ca cs gl uk ru sv nn nl da pl nb ms pt_BR tr eu ro
|
||||
ca cs da de es eu fi fr gl hu id it ms nb nl nn pl pt_BR ro ru sr sv tr uk
|
||||
|
||||
4
po/fi.po
4
po/fi.po
@@ -1592,11 +1592,11 @@ msgstr "En hyv
|
||||
|
||||
#: winio.c:1297
|
||||
msgid "Yy"
|
||||
msgstr "Kk"
|
||||
msgstr "KkYy"
|
||||
|
||||
#: winio.c:1298
|
||||
msgid "Nn"
|
||||
msgstr "Ee"
|
||||
msgstr "EeNn"
|
||||
|
||||
#: winio.c:1299
|
||||
msgid "Aa"
|
||||
|
||||
247
po/ms.po
247
po/ms.po
@@ -1,20 +1,19 @@
|
||||
# Nano Editor Bahasa Melayu.
|
||||
# Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
# Sharuzzaman Ahmat Raslan <sharuzzaman@myrealbox.com>, 2002.
|
||||
# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
# Sharuzzaman Ahmat Raslan <sharuzzaman@myrealbox.com>, 2002, 2003, 2004.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: nano 1.2.1\n"
|
||||
"Project-Id-Version: nano 1.2.2\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2003-08-11 21:49-0400\n"
|
||||
"PO-Revision-Date: 2003-05-06 00:51GMT+8\n"
|
||||
"PO-Revision-Date: 2004-02-24 00:51GMT+8\n"
|
||||
"Last-Translator: Sharuzzaman Ahmat Raslan <sharuzzaman@myrealbox.com>\n"
|
||||
"Language-Team: Malay <translation-team-ms@lists.sourceforge.net>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=ISO-8859-1\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: KBabel 0.9.5\n"
|
||||
|
||||
#: files.c:317
|
||||
#, c-format
|
||||
@@ -734,27 +733,18 @@ msgstr "Kekunci tidak sah dalam mod LIHAT"
|
||||
msgid ""
|
||||
"Search Command Help Text\n"
|
||||
"\n"
|
||||
" Enter the words or characters you would like to search for, then hit "
|
||||
"enter. If there is a match for the text you entered, the screen will be "
|
||||
"updated to the location of the nearest match for the search string.\n"
|
||||
" Enter the words or characters you would like to search for, then hit enter. If there is a match for the text you entered, the screen will be updated to the location of the nearest match for the search string.\n"
|
||||
"\n"
|
||||
" The previous search string will be shown in brackets after the Search: "
|
||||
"prompt. Hitting Enter without entering any text will perform the previous "
|
||||
"search.\n"
|
||||
" The previous search string will be shown in brackets after the Search: prompt. Hitting Enter without entering any text will perform the previous search.\n"
|
||||
"\n"
|
||||
" The following function keys are available in Search mode:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Teks Bantuan Arahan Carian\n"
|
||||
"\n"
|
||||
" Masukkan perkataan atau aksara yang anda hendak cari, kemudian tekan "
|
||||
"enter. Jika terdapat padanan untuk teks yang anda masukkan, skrin akan "
|
||||
"dikemaskinikan kepada lokasi terdekat padanan terhampir rentetan carian "
|
||||
"tersebut.\n"
|
||||
" Masukkan perkataan atau aksara yang anda hendak cari, kemudian tekan enter. Jika terdapat padanan untuk teks yang anda masukkan, skrin akan dikemaskinikan kepada lokasi terdekat padanan terhampir rentetan carian tersebut.\n"
|
||||
"\n"
|
||||
" Rentetan carian terdahulu akan dipaparkan dalam kurungan selepas prom "
|
||||
"Cari:. Menekan Enter tanpa memasukkan apa-apa teks akan melaksanakan carian "
|
||||
"terdahulu.\n"
|
||||
" Rentetan carian terdahulu akan dipaparkan dalam kurungan selepas prom Cari:. Menekan Enter tanpa memasukkan apa-apa teks akan melaksanakan carian terdahulu.\n"
|
||||
"\n"
|
||||
" Kekunci fungsi berikut terdapat didalam mod Cari:\n"
|
||||
"\n"
|
||||
@@ -763,18 +753,14 @@ msgstr ""
|
||||
msgid ""
|
||||
"Go To Line Help Text\n"
|
||||
"\n"
|
||||
" Enter the line number that you wish to go to and hit Enter. If there are "
|
||||
"fewer lines of text than the number you entered, you will be brought to the "
|
||||
"last line of the file.\n"
|
||||
" Enter the line number that you wish to go to and hit Enter. If there are fewer lines of text than the number you entered, you will be brought to the last line of the file.\n"
|
||||
"\n"
|
||||
" The following function keys are available in Go To Line mode:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Teks Bantuan Pergi Ke Baris\n"
|
||||
"\n"
|
||||
" Masukkan nombor baris yang anda hendak pergi dan tekan Enter. Jika "
|
||||
"terdapat kurang baris teks daripada nombor yang anda masukkan, anda akan "
|
||||
"dibawa ke baris akhir fail tersebut.\n"
|
||||
" Masukkan nombor baris yang anda hendak pergi dan tekan Enter. Jika terdapat kurang baris teks daripada nombor yang anda masukkan, anda akan dibawa ke baris akhir fail tersebut.\n"
|
||||
"\n"
|
||||
" Kekunci fungsi berikut terdapat didalam mod Pergi Ke Baris:\n"
|
||||
"\n"
|
||||
@@ -783,33 +769,22 @@ msgstr ""
|
||||
msgid ""
|
||||
"Insert File Help Text\n"
|
||||
"\n"
|
||||
" Type in the name of a file to be inserted into the current file buffer at "
|
||||
"the current cursor location.\n"
|
||||
" Type in the name of a file to be inserted into the current file buffer at the current cursor location.\n"
|
||||
"\n"
|
||||
" If you have compiled nano with multiple file buffer support, and enable "
|
||||
"multiple buffers with the -F or --multibuffer command line flags, the Meta-F "
|
||||
"toggle, or a nanorc file, inserting a file will cause it to be loaded into a "
|
||||
"separate buffer (use Meta-< and > to switch between file buffers).\n"
|
||||
" If you have compiled nano with multiple file buffer support, and enable multiple buffers with the -F or --multibuffer command line flags, the Meta-F toggle, or a nanorc file, inserting a file will cause it to be loaded into a separate buffer (use Meta-< and > to switch between file buffers).\n"
|
||||
"\n"
|
||||
" If you need another blank buffer, do not enter any filename, or type in a "
|
||||
"nonexistent filename at the prompt and press Enter.\n"
|
||||
" If you need another blank buffer, do not enter any filename, or type in a nonexistent filename at the prompt and press Enter.\n"
|
||||
"\n"
|
||||
" The following function keys are available in Insert File mode:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Teks Bantuan Sisipan Fail\n"
|
||||
"\n"
|
||||
" Taip nama fail yang hendak disisipkan ke dalam buffer fail semasa di "
|
||||
"kedudukan kursor semasa.\n"
|
||||
" Taip nama fail yang hendak disisipkan ke dalam buffer fail semasa di kedudukan kursor semasa.\n"
|
||||
"\n"
|
||||
" Jika anda telah menghimpun nano dengan sokongan buffer fail berganda, dan "
|
||||
"menghidupkan buffer berganda dengan penanda baris arahan -F atau --"
|
||||
"multibuffer, Meta-F toggle, atau fail nanorc, menyisipkan fail akan "
|
||||
"menyebabkannya dimuatkan ke dalam buffer berlainan (guna Meta-< dan > untuk "
|
||||
"menukar diantara buffer fail).\n"
|
||||
" Jika anda telah menghimpun nano dengan sokongan buffer fail berganda, dan menghidupkan buffer berganda dengan penanda baris arahan -F atau --multibuffer, Meta-F toggle, atau fail nanorc, menyisipkan fail akan menyebabkannya dimuatkan ke dalam buffer berlainan (guna Meta-< dan > untuk menukar diantara buffer fail).\n"
|
||||
"\n"
|
||||
" Jika anda memerlukan buffer kosong tambahan, jangan masukkan sebarang "
|
||||
"namafail, atau taip namafail yang tidak wujud pada prom dan tekan Enter.\n"
|
||||
" Jika anda memerlukan buffer kosong tambahan, jangan masukkan sebarang namafail, atau taip namafail yang tidak wujud pada prom dan tekan Enter.\n"
|
||||
"\n"
|
||||
" Kekunci fungsi berikut terdapat didalam mod Sisipan Fail:\n"
|
||||
"\n"
|
||||
@@ -818,26 +793,18 @@ msgstr ""
|
||||
msgid ""
|
||||
"Write File Help Text\n"
|
||||
"\n"
|
||||
" Type the name that you wish to save the current file as and hit Enter to "
|
||||
"save the file.\n"
|
||||
" Type the name that you wish to save the current file as and hit Enter to save the file.\n"
|
||||
"\n"
|
||||
" If you have selected text with Ctrl-^, you will be prompted to save only "
|
||||
"the selected portion to a separate file. To reduce the chance of "
|
||||
"overwriting the current file with just a portion of it, the current filename "
|
||||
"is not the default in this mode.\n"
|
||||
" If you have selected text with Ctrl-^, you will be prompted to save only the selected portion to a separate file. To reduce the chance of overwriting the current file with just a portion of it, the current filename is not the default in this mode.\n"
|
||||
"\n"
|
||||
" The following function keys are available in Write File mode:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Teks Bantuan Menulis Fail\n"
|
||||
"\n"
|
||||
" Taip nama fail semasa yang anda hendak simpan dan tekan Enter untuk "
|
||||
"menyimpan fail tersebut.\n"
|
||||
" Taip nama fail semasa yang anda hendak simpan dan tekan Enter untuk menyimpan fail tersebut.\n"
|
||||
"\n"
|
||||
" Jika anda telah memilih teks dengan Ctrl-^, anda akan ditanya untuk "
|
||||
"menyimpan hanya bahagian dipilih ke dalam fail berasingan. Untuk "
|
||||
"mengurangkan risiko menulisganti fail semasa dengan hanya sebahagian "
|
||||
"daripadanya, namafail semasa tidak dijadikan pilihan asal dalam mod ini.\n"
|
||||
" Jika anda telah memilih teks dengan Ctrl-^, anda akan ditanya untuk menyimpan hanya bahagian dipilih ke dalam fail berasingan. Untuk mengurangkan risiko menulisganti fail semasa dengan hanya sebahagian daripadanya, namafail semasa tidak dijadikan pilihan asal dalam mod ini.\n"
|
||||
"\n"
|
||||
" Kekunci fungsi berikut terdapat didalam mod Menulis Fail:\n"
|
||||
"\n"
|
||||
@@ -846,22 +813,14 @@ msgstr ""
|
||||
msgid ""
|
||||
"File Browser Help Text\n"
|
||||
"\n"
|
||||
" The file browser is used to visually browse the directory structure to "
|
||||
"select a file for reading or writing. You may use the arrow keys or Page Up/"
|
||||
"Down to browse through the files, and S or Enter to choose the selected file "
|
||||
"or enter the selected directory. To move up one level, select the directory "
|
||||
"called \"..\" at the top of the file list.\n"
|
||||
" The file browser is used to visually browse the directory structure to select a file for reading or writing. You may use the arrow keys or Page Up/Down to browse through the files, and S or Enter to choose the selected file or enter the selected directory. To move up one level, select the directory called \"..\" at the top of the file list.\n"
|
||||
"\n"
|
||||
" The following function keys are available in the file browser:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Teks Bantuan Pelayar Fail\n"
|
||||
"\n"
|
||||
" Pelayar fail digunakan untuk melihat secara visual struktur direktori untuk "
|
||||
"memilih fail untuk membaca dan menulis. Anda boleh menggunakan kekunci "
|
||||
"panah atau Page Up/Down untuk melihat fail, dan S atau Enter untuk memilih "
|
||||
"fail atau memasuki direktori yang dipilih. Untuk naik ke atas satu tahap, "
|
||||
"pilih direktori bernama \"..\" di bahagian atas senarai fail.\n"
|
||||
" Pelayar fail digunakan untuk melihat secara visual struktur direktori untuk memilih fail untuk membaca dan menulis. Anda boleh menggunakan kekunci panah atau Page Up/Down untuk melihat fail, dan S atau Enter untuk memilih fail atau memasuki direktori yang dipilih. Untuk naik ke atas satu tahap, pilih direktori bernama \"..\" di bahagian atas senarai fail.\n"
|
||||
"\n"
|
||||
" Kekunci fungsi berikut terdapat didalam pelayar fail:\n"
|
||||
"\n"
|
||||
@@ -872,8 +831,7 @@ msgid ""
|
||||
"\n"
|
||||
" Enter the name of the directory you would like to browse to.\n"
|
||||
"\n"
|
||||
" If tab completion has not been disabled, you can use the TAB key to "
|
||||
"(attempt to) automatically complete the directory name.\n"
|
||||
" If tab completion has not been disabled, you can use the TAB key to (attempt to) automatically complete the directory name.\n"
|
||||
"\n"
|
||||
" The following function keys are available in Browser Go To Directory mode:\n"
|
||||
"\n"
|
||||
@@ -882,9 +840,7 @@ msgstr ""
|
||||
"\n"
|
||||
" Masukkan nama direktori yang anda hendak lihat.\n"
|
||||
"\n"
|
||||
" Jika tab pelengkapan tidak dimatikan, anda boleh menggunakan kekunci TAB "
|
||||
"untuk (mencuba untuk) melengkapkan secara automatik nama direktori "
|
||||
"tersebut.\n"
|
||||
" Jika tab pelengkapan tidak dimatikan, anda boleh menggunakan kekunci TAB untuk (mencuba untuk) melengkapkan secara automatik nama direktori tersebut.\n"
|
||||
"\n"
|
||||
" Kekunci fungsi berikut terdapat didalam mod Pelayar Pergi ke Direktori:\n"
|
||||
"\n"
|
||||
@@ -893,20 +849,14 @@ msgstr ""
|
||||
msgid ""
|
||||
"Spell Check Help Text\n"
|
||||
"\n"
|
||||
" The spell checker checks the spelling of all text in the current file. "
|
||||
"When an unknown word is encountered, it is highlighted and a replacement can "
|
||||
"be edited. It will then prompt to replace every instance of the given "
|
||||
"misspelled word in the current file.\n"
|
||||
" The spell checker checks the spelling of all text in the current file. When an unknown word is encountered, it is highlighted and a replacement can be edited. It will then prompt to replace every instance of the given misspelled word in the current file.\n"
|
||||
"\n"
|
||||
" The following other functions are available in Spell Check mode:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Teks Bantuan Penyemak Ejaan\n"
|
||||
"\n"
|
||||
" Penyemak ejaan menyemak ejaan semua teks didalam fail semasa. Apabila "
|
||||
"perkataan yang tidak diketahui dijumpai, ia akan disorot dan penggantinya "
|
||||
"boleh disunting. Ia kemudian akan bertanya untuk menggantikan setiap "
|
||||
"jumpaan perkataan salah eja yang diberikan didalam fail semasa.\n"
|
||||
" Penyemak ejaan menyemak ejaan semua teks didalam fail semasa. Apabila perkataan yang tidak diketahui dijumpai, ia akan disorot dan penggantinya boleh disunting. Ia kemudian akan bertanya untuk menggantikan setiap jumpaan perkataan salah eja yang diberikan didalam fail semasa.\n"
|
||||
"\n"
|
||||
" Fungsi lain berikut terdapat didalam mod Penyemak Ejaan:\n"
|
||||
"\n"
|
||||
@@ -915,17 +865,14 @@ msgstr ""
|
||||
msgid ""
|
||||
"External Command Help Text\n"
|
||||
"\n"
|
||||
" This menu allows you to insert the output of a command run by the shell "
|
||||
"into the current buffer (or a new buffer in multibuffer mode).\n"
|
||||
" This menu allows you to insert the output of a command run by the shell into the current buffer (or a new buffer in multibuffer mode).\n"
|
||||
"\n"
|
||||
" The following keys are available in this mode:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Teks Bantuan Arahan Luaran\n"
|
||||
"\n"
|
||||
" Menu ini membenearkan anda untuk memasukkan keluaran sesuatu arahan yang "
|
||||
"dijalankan oleh shell ke dalam buffer semasa (atau satu buffer baru dalam "
|
||||
"mod multibuffer).\n"
|
||||
" Menu ini membenearkan anda untuk memasukkan keluaran sesuatu arahan yang dijalankan oleh shell ke dalam buffer semasa (atau satu buffer baru dalam mod multibuffer).\n"
|
||||
"\n"
|
||||
" Kekunci berikut terdapat didalam mod ini:\n"
|
||||
"\n"
|
||||
@@ -934,38 +881,16 @@ msgstr ""
|
||||
msgid ""
|
||||
" nano help text\n"
|
||||
"\n"
|
||||
" The nano editor is designed to emulate the functionality and ease-of-use of "
|
||||
"the UW Pico text editor. There are four main sections of the editor: The "
|
||||
"top line shows the program version, the current filename being edited, and "
|
||||
"whether or not the file has been modified. Next is the main editor window "
|
||||
"showing the file being edited. The status line is the third line from the "
|
||||
"bottom and shows important messages. The bottom two lines show the most "
|
||||
"commonly used shortcuts in the editor.\n"
|
||||
" The nano editor is designed to emulate the functionality and ease-of-use of the UW Pico text editor. There are four main sections of the editor: The top line shows the program version, the current filename being edited, and whether or not the file has been modified. Next is the main editor window showing the file being edited. The status line is the third line from the bottom and shows important messages. The bottom two lines show the most commonly used shortcuts in the editor.\n"
|
||||
"\n"
|
||||
" The notation for shortcuts is as follows: Control-key sequences are notated "
|
||||
"with a caret (^) symbol and are entered with the Control (Ctrl) key. Escape-"
|
||||
"key sequences are notated with the Meta (M) symbol and can be entered using "
|
||||
"either the Esc, Alt or Meta key depending on your keyboard setup. The "
|
||||
"following keystrokes are available in the main editor window. Alternative "
|
||||
"keys are shown in parentheses:\n"
|
||||
" The notation for shortcuts is as follows: Control-key sequences are notated with a caret (^) symbol and are entered with the Control (Ctrl) key. Escape-key sequences are notated with the Meta (M) symbol and can be entered using either the Esc, Alt or Meta key depending on your keyboard setup. The following keystrokes are available in the main editor window. Alternative keys are shown in parentheses:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
" teks bantuan nano\n"
|
||||
"\n"
|
||||
" Penyunting nano direka untuk meniru fungsi dan kemudahgunaan penyunting "
|
||||
"teks UW Pico. Terdapat empat bahagian utama penyunting: Baris teratas "
|
||||
"menunjukkan versi program, namafail semasa yang sedang disunting, dan adakah "
|
||||
"fail tersebut telah diubahsuai. Berikutnya adalah tetingkap utama "
|
||||
"penyunting yang menunjukkan fail yang sedang disunting. Baris status adalah "
|
||||
"baris ketiga dari bawah dan menunjukkan mesej-mesej penting. Dua baris "
|
||||
"terbawah menunjukkan pintasan yang sering digunakan dalam penyunting.\n"
|
||||
" Penyunting nano direka untuk meniru fungsi dan kemudahgunaan penyunting teks UW Pico. Terdapat empat bahagian utama penyunting: Baris teratas menunjukkan versi program, namafail semasa yang sedang disunting, dan adakah fail tersebut telah diubahsuai. Berikutnya adalah tetingkap utama penyunting yang menunjukkan fail yang sedang disunting. Baris status adalah baris ketiga dari bawah dan menunjukkan mesej-mesej penting. Dua baris terbawah menunjukkan pintasan yang sering digunakan dalam penyunting.\n"
|
||||
"\n"
|
||||
" Penandaan untuk pintasan adalah seperti berikut: turutan kekunci Control "
|
||||
"ditandakan dengan simbol caret (^) dan dimasukkan dengan kekunci Control "
|
||||
"(Ctrl). Turutan kekunci Escape ditandakan dengan simbol Meta (M) dan boleh "
|
||||
"dimasukkan dengan menggunakan kekunci Esc, Alt atau Meta tergantung pada "
|
||||
"susunatur papan kekunci anda. Kekunci-kekunci berikut terdapat dalam "
|
||||
"tetingkap utama penyunting. Kekunci alternatif ditunjukkan dalam kurungan:\n"
|
||||
" Penandaan untuk pintasan adalah seperti berikut: turutan kekunci Control ditandakan dengan simbol caret (^) dan dimasukkan dengan kekunci Control (Ctrl). Turutan kekunci Escape ditandakan dengan simbol Meta (M) dan boleh dimasukkan dengan menggunakan kekunci Esc, Alt atau Meta tergantung pada susunatur papan kekunci anda. Kekunci-kekunci berikut terdapat dalam tetingkap utama penyunting. Kekunci alternatif ditunjukkan dalam kurungan:\n"
|
||||
"\n"
|
||||
|
||||
#: nano.c:388 nano.c:458
|
||||
@@ -1271,8 +1196,7 @@ msgstr "Sekarang boleh UnJustify!"
|
||||
|
||||
#: nano.c:2696
|
||||
msgid "Save modified buffer (ANSWERING \"No\" WILL DESTROY CHANGES) ? "
|
||||
msgstr ""
|
||||
"Simpan buffer ubahsuai (JAWAB \"Tidak\" AKAN MENGHILANGKAN PERUBAHAN) ? "
|
||||
msgstr "Simpan buffer ubahsuai (JAWAB \"Tidak\" AKAN MENGHILANGKAN PERUBAHAN) ? "
|
||||
|
||||
#: nano.c:2796
|
||||
msgid "Received SIGHUP or SIGTERM\n"
|
||||
@@ -1596,108 +1520,3 @@ msgstr "dan sesiapa yang kami lupa...."
|
||||
#: winio.c:1845
|
||||
msgid "Thank you for using nano!\n"
|
||||
msgstr "Terima kasih kerana menggunakan nano!\n"
|
||||
|
||||
#~ msgid "add_to_cutbuffer() called with inptr->data = %s\n"
|
||||
#~ msgstr "add_to_cutbuffer() dipanggil dengan inptr->data = %s\n"
|
||||
|
||||
#~ msgid "Blew away cutbuffer =)\n"
|
||||
#~ msgstr "Cutbuffer dipadamkan =)\n"
|
||||
|
||||
#~ msgid "filename is %s\n"
|
||||
#~ msgstr "nama fail adalah %s\n"
|
||||
|
||||
#~ msgid "%s: free'd a node, YAY!\n"
|
||||
#~ msgstr "%s: sebuah nod dibebaskan, YAY!\n"
|
||||
|
||||
#~ msgid "%s: free'd last node.\n"
|
||||
#~ msgstr "%s: nod terakhir dibebaskan.\n"
|
||||
|
||||
#~ msgid "Backing up %s to %s\n"
|
||||
#~ msgstr "Menyalin %s ke %s\n"
|
||||
|
||||
#~ msgid "Wrote >%s\n"
|
||||
#~ msgstr "Ditulis >%s\n"
|
||||
|
||||
#~ msgid "current->data now = \"%s\"\n"
|
||||
#~ msgstr "current->data sekarang = \"%s\"\n"
|
||||
|
||||
#~ msgid "After, data = \"%s\"\n"
|
||||
#~ msgstr "Setelah, data= \"%s\"\n"
|
||||
|
||||
#~ msgid "Main: set up windows\n"
|
||||
#~ msgstr "Utama: menetapkan tetingkap\n"
|
||||
|
||||
#~ msgid "Main: bottom win\n"
|
||||
#~ msgstr "Utama: tetingkap bawah\n"
|
||||
|
||||
#~ msgid "Main: open file\n"
|
||||
#~ msgstr "Utama: buka fail\n"
|
||||
|
||||
#~ msgid "AHA! %c (%d)\n"
|
||||
#~ msgstr "AHA! %c (%d)\n"
|
||||
|
||||
#~ msgid "I got Alt-O-%c! (%d)\n"
|
||||
#~ msgstr "Saya mendapat Alt-O-%c! (%d)\n"
|
||||
|
||||
#~ msgid "I got Alt-[-1-%c! (%d)\n"
|
||||
#~ msgstr "Saya mendapat Alt-[-1-%c! (%d)\n"
|
||||
|
||||
#~ msgid "I got Alt-[-2-%c! (%d)\n"
|
||||
#~ msgstr "Saya mendapat Alt-[-2-%c! (%d)\n"
|
||||
|
||||
#~ msgid "I got Alt-[-%c! (%d)\n"
|
||||
#~ msgstr "Saya mendapat Alt-[-%c! (%d)\n"
|
||||
|
||||
#~ msgid "I got Alt-%c! (%d)\n"
|
||||
#~ msgstr "Saya mendapat Alt-%c! (%d)\n"
|
||||
|
||||
#~ msgid "I got %c (%d)!\n"
|
||||
#~ msgstr "Saya mendapat %c (%d)!\n"
|
||||
|
||||
#~ msgid "Adding new syntax after 1st\n"
|
||||
#~ msgstr "Menambah sintaks baru selepas yang pertama\n"
|
||||
|
||||
#~ msgid "Starting a new syntax type\n"
|
||||
#~ msgstr "Memulakan jenis sintaks baru\n"
|
||||
|
||||
#~ msgid "Starting a new colorstring for fg %d bg %d\n"
|
||||
#~ msgstr "Memulakan rentetanwarna baru bagi fg %d bg %d\n"
|
||||
|
||||
#~ msgid "Adding new entry for fg %d bg %d\n"
|
||||
#~ msgstr "Menambah kemasukan baru bagi fg %d bg %d\n"
|
||||
|
||||
#~ msgid "%s: Read a comment\n"
|
||||
#~ msgstr "%s: Baca komen\n"
|
||||
|
||||
#~ msgid "%s: Parsing option %s\n"
|
||||
#~ msgstr "%s: Pilihan huraian %s\n"
|
||||
|
||||
#~ msgid "set flag %d!\n"
|
||||
#~ msgstr "set penanda %d!\n"
|
||||
|
||||
#~ msgid "unset flag %d!\n"
|
||||
#~ msgstr "penanda %d di nyahset!\n"
|
||||
|
||||
#~ msgid "actual_x for xplus=%d returns %d\n"
|
||||
#~ msgstr "actual_x untuk xplus=%d mengembalikan %d\n"
|
||||
|
||||
#~ msgid "Aha! '%c' (%d)\n"
|
||||
#~ msgstr "Aha! '%c' (%d)\n"
|
||||
|
||||
#~ msgid "input '%c' (%d)\n"
|
||||
#~ msgstr "masukan '%c' (%d)\n"
|
||||
|
||||
#~ msgid "Moved to (%d, %d) in edit buffer\n"
|
||||
#~ msgstr "Pindah ke (%d, %d) dalam buffer suntingan\n"
|
||||
|
||||
#~ msgid "I got \"%s\"\n"
|
||||
#~ msgstr "Saya dapat \"%s\"\n"
|
||||
|
||||
#~ msgid "Dumping file buffer to stderr...\n"
|
||||
#~ msgstr "Lambak buffer fail ke stderr...\n"
|
||||
|
||||
#~ msgid "Dumping cutbuffer to stderr...\n"
|
||||
#~ msgstr "Lambak cutbuffer ke stderr...\n"
|
||||
|
||||
#~ msgid "Dumping a buffer to stderr...\n"
|
||||
#~ msgstr "Lambak buffer ke stderr...\n"
|
||||
|
||||
265
po/ro.po
265
po/ro.po
@@ -6,10 +6,9 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: nano 1.2.1\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Project-Id-Version: nano 1.2.2\n"
|
||||
"POT-Creation-Date: 2003-08-11 21:49-0400\n"
|
||||
"PO-Revision-Date: 2003-04-22 23:00-0600\n"
|
||||
"PO-Revision-Date: 2003-11-24 12:00-0500\n"
|
||||
"Last-Translator: Laurentiu Buzdugan <buzdugan@voyager.net>\n"
|
||||
"Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -423,8 +422,7 @@ msgstr "Insereaz
|
||||
|
||||
#: global.c:382
|
||||
msgid "Insert a carriage return at the cursor position"
|
||||
msgstr ""
|
||||
"Insereazã un caracter \"carriage return\" la poziþia curentã a cursorului"
|
||||
msgstr "Insereazã un caracter \"carriage return\" la poziþia curentã a cursorului"
|
||||
|
||||
#: global.c:384
|
||||
msgid "Make the current search or replace case (in)sensitive"
|
||||
@@ -736,26 +734,18 @@ msgstr "Tast
|
||||
msgid ""
|
||||
"Search Command Help Text\n"
|
||||
"\n"
|
||||
" Enter the words or characters you would like to search for, then hit "
|
||||
"enter. If there is a match for the text you entered, the screen will be "
|
||||
"updated to the location of the nearest match for the search string.\n"
|
||||
" Enter the words or characters you would like to search for, then hit enter. If there is a match for the text you entered, the screen will be updated to the location of the nearest match for the search string.\n"
|
||||
"\n"
|
||||
" The previous search string will be shown in brackets after the Search: "
|
||||
"prompt. Hitting Enter without entering any text will perform the previous "
|
||||
"search.\n"
|
||||
" The previous search string will be shown in brackets after the Search: prompt. Hitting Enter without entering any text will perform the previous search.\n"
|
||||
"\n"
|
||||
" The following function keys are available in Search mode:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Text de ajutor pentru comanda \"Cautã\"\n"
|
||||
"\n"
|
||||
"Introduceþi cuvântul sau caracterele pe care aþi dori sã le cãutaþi, apoi "
|
||||
"apãsaþi Enter. Dacã existã vreo potrivire pentru textul cãutat, ecranul va "
|
||||
"fi actualizat la locaþia cea mai apropiatã de locul unde aceastã potrivire a "
|
||||
"avut loc.\n"
|
||||
"Introduceþi cuvântul sau caracterele pe care aþi dori sã le cãutaþi, apoi apãsaþi Enter. Dacã existã vreo potrivire pentru textul cãutat, ecranul va fi actualizat la locaþia cea mai apropiatã de locul unde aceastã potrivire a avut loc.\n"
|
||||
"\n"
|
||||
"ªirul cãutat anterior va fi arãtat în paranteze dupã cuvântul Cautã: . "
|
||||
"Apãsând Enter fãrã a introduce vreun text va executa cãutarea anterioarã.\n"
|
||||
"ªirul cãutat anterior va fi arãtat în paranteze dupã cuvântul Cautã: . Apãsând Enter fãrã a introduce vreun text va executa cãutarea anterioarã.\n"
|
||||
"\n"
|
||||
"Urmãtoarele taste de funcþii sunt disponibile în modul \"Cautã\"\n"
|
||||
"\n"
|
||||
@@ -764,18 +754,14 @@ msgstr ""
|
||||
msgid ""
|
||||
"Go To Line Help Text\n"
|
||||
"\n"
|
||||
" Enter the line number that you wish to go to and hit Enter. If there are "
|
||||
"fewer lines of text than the number you entered, you will be brought to the "
|
||||
"last line of the file.\n"
|
||||
" Enter the line number that you wish to go to and hit Enter. If there are fewer lines of text than the number you entered, you will be brought to the last line of the file.\n"
|
||||
"\n"
|
||||
" The following function keys are available in Go To Line mode:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Textul de ajutor pentru \"Du-te la linia\"\n"
|
||||
"\n"
|
||||
" Introduceþi numãrul liniei unde doriþi sã mergeþi ºi apãsaþi Enter. Dacã "
|
||||
"existã mai puþine linii de text decât numãrul introdus veþi ajunge la ultima "
|
||||
"linie a fiºierului.\n"
|
||||
" Introduceþi numãrul liniei unde doriþi sã mergeþi ºi apãsaþi Enter. Dacã existã mai puþine linii de text decât numãrul introdus veþi ajunge la ultima linie a fiºierului.\n"
|
||||
"\n"
|
||||
" Urmãtoarele taste de funcþii sunt disponibile în modul \"Du-te la linia\" \n"
|
||||
|
||||
@@ -783,61 +769,41 @@ msgstr ""
|
||||
msgid ""
|
||||
"Insert File Help Text\n"
|
||||
"\n"
|
||||
" Type in the name of a file to be inserted into the current file buffer at "
|
||||
"the current cursor location.\n"
|
||||
" Type in the name of a file to be inserted into the current file buffer at the current cursor location.\n"
|
||||
"\n"
|
||||
" If you have compiled nano with multiple file buffer support, and enable "
|
||||
"multiple buffers with the -F or --multibuffer command line flags, the Meta-F "
|
||||
"toggle, or a nanorc file, inserting a file will cause it to be loaded into a "
|
||||
"separate buffer (use Meta-< and > to switch between file buffers).\n"
|
||||
" If you have compiled nano with multiple file buffer support, and enable multiple buffers with the -F or --multibuffer command line flags, the Meta-F toggle, or a nanorc file, inserting a file will cause it to be loaded into a separate buffer (use Meta-< and > to switch between file buffers).\n"
|
||||
"\n"
|
||||
" If you need another blank buffer, do not enter any filename, or type in a "
|
||||
"nonexistent filename at the prompt and press Enter.\n"
|
||||
" If you need another blank buffer, do not enter any filename, or type in a nonexistent filename at the prompt and press Enter.\n"
|
||||
"\n"
|
||||
" The following function keys are available in Insert File mode:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Textul de ajutor pentru \"Insereazã fiºier\"\n"
|
||||
"\n"
|
||||
" Tastaþi numele unui fiºier de introdus în buffer-ul pentru fiºierul curent "
|
||||
"la poziþia curentã a cursorului.\n"
|
||||
" Tastaþi numele unui fiºier de introdus în buffer-ul pentru fiºierul curent la poziþia curentã a cursorului.\n"
|
||||
"\n"
|
||||
" Dacã aþi compilat nano cu suport pentru multiple buffere ºi aþi activat "
|
||||
"acestã opþiune cu indicatorii de linie de comandã -F sau --multibuffer, "
|
||||
"comutatorul Meta-F, sau un fiºier nanorc, inserând un fiºier va face ca "
|
||||
"acesta sã fie încãrcat într-un alt buffer (folosiþi Meta-< ºi > pentru a "
|
||||
"comuta între buffere).\n"
|
||||
" Dacã aþi compilat nano cu suport pentru multiple buffere ºi aþi activat acestã opþiune cu indicatorii de linie de comandã -F sau --multibuffer, comutatorul Meta-F, sau un fiºier nanorc, inserând un fiºier va face ca acesta sã fie încãrcat într-un alt buffer (folosiþi Meta-< ºi > pentru a comuta între buffere).\n"
|
||||
"\n"
|
||||
"Dacã aveþi nevoie de un alt buffer liber, nu introduceþi nici un nume sau "
|
||||
"introduceþi un nume de fiºier ce nu existã ºi apãsaþi Enter.\n"
|
||||
"Dacã aveþi nevoie de un alt buffer liber, nu introduceþi nici un nume sau introduceþi un nume de fiºier ce nu existã ºi apãsaþi Enter.\n"
|
||||
"\n"
|
||||
" Urmãtoarele taste de funcþii sunt disponibile în modul \"Insereazã fiºier"
|
||||
"\" \n"
|
||||
" Urmãtoarele taste de funcþii sunt disponibile în modul \"Insereazã fiºier\" \n"
|
||||
|
||||
#: nano.c:310
|
||||
msgid ""
|
||||
"Write File Help Text\n"
|
||||
"\n"
|
||||
" Type the name that you wish to save the current file as and hit Enter to "
|
||||
"save the file.\n"
|
||||
" Type the name that you wish to save the current file as and hit Enter to save the file.\n"
|
||||
"\n"
|
||||
" If you have selected text with Ctrl-^, you will be prompted to save only "
|
||||
"the selected portion to a separate file. To reduce the chance of "
|
||||
"overwriting the current file with just a portion of it, the current filename "
|
||||
"is not the default in this mode.\n"
|
||||
" If you have selected text with Ctrl-^, you will be prompted to save only the selected portion to a separate file. To reduce the chance of overwriting the current file with just a portion of it, the current filename is not the default in this mode.\n"
|
||||
"\n"
|
||||
" The following function keys are available in Write File mode:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Textul de ajutor pentru \"Scrie fiºier\"\n"
|
||||
"\n"
|
||||
" Tastaþi numele sub care doriþi sã salvaþi fiºierul curent ºi apãsaþi Enter "
|
||||
"pentru a salva fiºierul.\n"
|
||||
" Tastaþi numele sub care doriþi sã salvaþi fiºierul curent ºi apãsaþi Enter pentru a salva fiºierul.\n"
|
||||
"\n"
|
||||
" Dacã aþi selectat text cu Ctrl-^, veþi fi interpolat sã salvaþi numai "
|
||||
"porþiunea selectatã într-un fiºier separat. Pentru a reduce ºansa de a "
|
||||
"suprascrie fiºierul curent cu doar o porþiune a sa, numele de fiºier curent "
|
||||
"nu este implicit în acest mod.\n"
|
||||
" Dacã aþi selectat text cu Ctrl-^, veþi fi interpolat sã salvaþi numai porþiunea selectatã într-un fiºier separat. Pentru a reduce ºansa de a suprascrie fiºierul curent cu doar o porþiune a sa, numele de fiºier curent nu este implicit în acest mod.\n"
|
||||
"\n"
|
||||
" Urmãtoarele taste de funcþii sunt disponibile în modul \"Scrie fiºier\"\n"
|
||||
"\n"
|
||||
@@ -846,23 +812,14 @@ msgstr ""
|
||||
msgid ""
|
||||
"File Browser Help Text\n"
|
||||
"\n"
|
||||
" The file browser is used to visually browse the directory structure to "
|
||||
"select a file for reading or writing. You may use the arrow keys or Page Up/"
|
||||
"Down to browse through the files, and S or Enter to choose the selected file "
|
||||
"or enter the selected directory. To move up one level, select the directory "
|
||||
"called \"..\" at the top of the file list.\n"
|
||||
" The file browser is used to visually browse the directory structure to select a file for reading or writing. You may use the arrow keys or Page Up/Down to browse through the files, and S or Enter to choose the selected file or enter the selected directory. To move up one level, select the directory called \"..\" at the top of the file list.\n"
|
||||
"\n"
|
||||
" The following function keys are available in the file browser:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Textul de ajutor pentru \"Navigator fiºiere\"\n"
|
||||
"\n"
|
||||
" Navigatorul de fiºiere este folosit pentru a naviga vizual structura de "
|
||||
"directoare ºi a selecta un fiºier pentru citire sau scriere. Puteþi folosi "
|
||||
"tastele cu sãgeþi sau Page Up/Down pentru a naviga prin fiºiere, ºi S sau "
|
||||
"Enter pentru a alege fiºierul selectat sau a intra într-un director "
|
||||
"selectat. Pentru a vã muta în sus un nivel, selectaþi directorul numit \".."
|
||||
"\" din capãtul de sus a listei de fiºiere.\n"
|
||||
" Navigatorul de fiºiere este folosit pentru a naviga vizual structura de directoare ºi a selecta un fiºier pentru citire sau scriere. Puteþi folosi tastele cu sãgeþi sau Page Up/Down pentru a naviga prin fiºiere, ºi S sau Enter pentru a alege fiºierul selectat sau a intra într-un director selectat. Pentru a vã muta în sus un nivel, selectaþi directorul numit \"..\" din capãtul de sus a listei de fiºiere.\n"
|
||||
"\n"
|
||||
" Urmãtoarele taste de funcþii sunt disponibile în \"Navigator fiºiere\":\n"
|
||||
"\n"
|
||||
@@ -873,8 +830,7 @@ msgid ""
|
||||
"\n"
|
||||
" Enter the name of the directory you would like to browse to.\n"
|
||||
"\n"
|
||||
" If tab completion has not been disabled, you can use the TAB key to "
|
||||
"(attempt to) automatically complete the directory name.\n"
|
||||
" If tab completion has not been disabled, you can use the TAB key to (attempt to) automatically complete the directory name.\n"
|
||||
"\n"
|
||||
" The following function keys are available in Browser Go To Directory mode:\n"
|
||||
"\n"
|
||||
@@ -883,51 +839,39 @@ msgstr ""
|
||||
"\n"
|
||||
" Introduceþi numele directorului pe care aþi dori sã-l navigaþi.\n"
|
||||
"\n"
|
||||
" Dacã completarea cu tab nu a fost deactivatã, puteþi folosi tasta TAB "
|
||||
"pentru a încerca sã completaþi automat numele directorului.\n"
|
||||
" Dacã completarea cu tab nu a fost deactivatã, puteþi folosi tasta TAB pentru a încerca sã completaþi automat numele directorului.\n"
|
||||
"\n"
|
||||
" Urmãtoarele taste de funcþii sunt disponibile în modul \"Navigator Du-te la "
|
||||
"Directorul\":\n"
|
||||
" Urmãtoarele taste de funcþii sunt disponibile în modul \"Navigator Du-te la Directorul\":\n"
|
||||
"\n"
|
||||
|
||||
#: nano.c:341
|
||||
msgid ""
|
||||
"Spell Check Help Text\n"
|
||||
"\n"
|
||||
" The spell checker checks the spelling of all text in the current file. "
|
||||
"When an unknown word is encountered, it is highlighted and a replacement can "
|
||||
"be edited. It will then prompt to replace every instance of the given "
|
||||
"misspelled word in the current file.\n"
|
||||
" The spell checker checks the spelling of all text in the current file. When an unknown word is encountered, it is highlighted and a replacement can be edited. It will then prompt to replace every instance of the given misspelled word in the current file.\n"
|
||||
"\n"
|
||||
" The following other functions are available in Spell Check mode:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Text de ajutor pentru \"Corector ortografic\"\n"
|
||||
"\n"
|
||||
" Corectorul ortografic verificã ortografierea întregului text din fiºierul "
|
||||
"curent. Când un cuvânt necunoscut este întâlnit, acesta este evidenþiat ºi "
|
||||
"un înlocuitor poate fi introdus/editat. Corectorul vã va întreba dacã "
|
||||
"doriþi sã înlocuiþi toate apariþiile cu aceeaºi greºealã în fiºierul "
|
||||
"curent.\n"
|
||||
" Corectorul ortografic verificã ortografierea întregului text din fiºierul curent. Când un cuvânt necunoscut este întâlnit, acesta este evidenþiat ºi un înlocuitor poate fi introdus/editat. Corectorul vã va întreba dacã doriþi sã înlocuiþi toate apariþiile cu aceeaºi greºealã în fiºierul curent.\n"
|
||||
"\n"
|
||||
" Urmãtoarele alte funcþii sunt disponibile în modul \"Corector ortografic"
|
||||
"\":\n"
|
||||
" Urmãtoarele alte funcþii sunt disponibile în modul \"Corector ortografic\":\n"
|
||||
"\n"
|
||||
|
||||
#: nano.c:352
|
||||
msgid ""
|
||||
"External Command Help Text\n"
|
||||
"\n"
|
||||
" This menu allows you to insert the output of a command run by the shell "
|
||||
"into the current buffer (or a new buffer in multibuffer mode).\n"
|
||||
" This menu allows you to insert the output of a command run by the shell into the current buffer (or a new buffer in multibuffer mode).\n"
|
||||
"\n"
|
||||
" The following keys are available in this mode:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
"Text de ajutor \"Comandã externã\"\n"
|
||||
"\n"
|
||||
" Acest meniu vã permite sã inseraþi ieºirea unei comenzi executate de shell "
|
||||
"în buffer-ul curent (sau într-un nou buffer în modul multibuffer).\n"
|
||||
" Acest meniu vã permite sã inseraþi ieºirea unei comenzi executate de shell în buffer-ul curent (sau într-un nou buffer în modul multibuffer).\n"
|
||||
"\n"
|
||||
" Urmãtoarele taste sunt disponibile în acest mod:\n"
|
||||
"\n"
|
||||
@@ -936,40 +880,16 @@ msgstr ""
|
||||
msgid ""
|
||||
" nano help text\n"
|
||||
"\n"
|
||||
" The nano editor is designed to emulate the functionality and ease-of-use of "
|
||||
"the UW Pico text editor. There are four main sections of the editor: The "
|
||||
"top line shows the program version, the current filename being edited, and "
|
||||
"whether or not the file has been modified. Next is the main editor window "
|
||||
"showing the file being edited. The status line is the third line from the "
|
||||
"bottom and shows important messages. The bottom two lines show the most "
|
||||
"commonly used shortcuts in the editor.\n"
|
||||
" The nano editor is designed to emulate the functionality and ease-of-use of the UW Pico text editor. There are four main sections of the editor: The top line shows the program version, the current filename being edited, and whether or not the file has been modified. Next is the main editor window showing the file being edited. The status line is the third line from the bottom and shows important messages. The bottom two lines show the most commonly used shortcuts in the editor.\n"
|
||||
"\n"
|
||||
" The notation for shortcuts is as follows: Control-key sequences are notated "
|
||||
"with a caret (^) symbol and are entered with the Control (Ctrl) key. Escape-"
|
||||
"key sequences are notated with the Meta (M) symbol and can be entered using "
|
||||
"either the Esc, Alt or Meta key depending on your keyboard setup. The "
|
||||
"following keystrokes are available in the main editor window. Alternative "
|
||||
"keys are shown in parentheses:\n"
|
||||
" The notation for shortcuts is as follows: Control-key sequences are notated with a caret (^) symbol and are entered with the Control (Ctrl) key. Escape-key sequences are notated with the Meta (M) symbol and can be entered using either the Esc, Alt or Meta key depending on your keyboard setup. The following keystrokes are available in the main editor window. Alternative keys are shown in parentheses:\n"
|
||||
"\n"
|
||||
msgstr ""
|
||||
" text ajutor pentru nano\n"
|
||||
"\n"
|
||||
" Editotul nano este proiectat sa emuleze funþionalitatea ºi uºurinþa de "
|
||||
"folosire a editorului de texte UW Pico. Existã patru secþiuni principale "
|
||||
"ale editorului: Linia de sus aratã versiunea programului, numele fiºierului "
|
||||
"curent ce este editat ºi dacã fiºierul a fost sau nu modificat. Urmãtoarea "
|
||||
"secþiune principalã este fereastra de editare ce aratã fiºierul ce este "
|
||||
"editat. Linia de stare este a treia linie de jos ºi aratã mesaje "
|
||||
"importante. Ultimele douã linii aratã cele mai frecvente scurtãturi "
|
||||
"folosite în editor.\n"
|
||||
" Editotul nano este proiectat sa emuleze funþionalitatea ºi uºurinþa de folosire a editorului de texte UW Pico. Existã patru secþiuni principale ale editorului: Linia de sus aratã versiunea programului, numele fiºierului curent ce este editat ºi dacã fiºierul a fost sau nu modificat. Urmãtoarea secþiune principalã este fereastra de editare ce aratã fiºierul ce este editat. Linia de stare este a treia linie de jos ºi aratã mesaje importante. Ultimele douã linii aratã cele mai frecvente scurtãturi folosite în editor.\n"
|
||||
"\n"
|
||||
" Notaþia pentru scurtãturi este dupã cum urmeazã: secvenþe Control-tastã "
|
||||
"sunt notate cu un simbol (^) ºi sunt introduse cu tasta Control (Ctrl). "
|
||||
"Secvenþele Escape-tastã sunt notate cu sombolul Meta (M) ºi pot fi introduse "
|
||||
"folosind oricare din tastele Esc, Alt sau Meta, în funcþie de setarea "
|
||||
"tastaturii d-voastrã. Urmãtoarele combinaþii de taste sunt disponibile în "
|
||||
"fereastra de editare principalã. Tastele alternative sunt arãtate în "
|
||||
"paranteze:\n"
|
||||
" Notaþia pentru scurtãturi este dupã cum urmeazã: secvenþe Control-tastã sunt notate cu un simbol (^) ºi sunt introduse cu tasta Control (Ctrl). Secvenþele Escape-tastã sunt notate cu sombolul Meta (M) ºi pot fi introduse folosind oricare din tastele Esc, Alt sau Meta, în funcþie de setarea tastaturii d-voastrã. Urmãtoarele combinaþii de taste sunt disponibile în fereastra de editare principalã. Tastele alternative sunt arãtate în paranteze:\n"
|
||||
"\n"
|
||||
|
||||
#: nano.c:388 nano.c:458
|
||||
@@ -1154,7 +1074,7 @@ msgstr "Permite corector ortografic alternativ"
|
||||
|
||||
#: nano.c:680
|
||||
msgid "Auto save on exit, don't prompt"
|
||||
msgstr "Saulveazã automat la ieºire, nu întreba"
|
||||
msgstr "Salveazã automat la ieºire, nu întreba"
|
||||
|
||||
#: nano.c:681
|
||||
msgid "View (read only) mode"
|
||||
@@ -1275,8 +1195,7 @@ msgstr "Nu pot De-Alinia!"
|
||||
|
||||
#: nano.c:2696
|
||||
msgid "Save modified buffer (ANSWERING \"No\" WILL DESTROY CHANGES) ? "
|
||||
msgstr ""
|
||||
"Salvez buffer-ul modificat (RÃSPUNSUL \"Nu\" VA DISTRUGE SCHIMBÃRILE) ?"
|
||||
msgstr "Salvez buffer-ul modificat (RÃSPUNSUL \"Nu\" VA DISTRUGE SCHIMBÃRILE) ?"
|
||||
|
||||
#: nano.c:2796
|
||||
msgid "Received SIGHUP or SIGTERM\n"
|
||||
@@ -1312,9 +1231,7 @@ msgstr "Nu pot muta fereastra de jos"
|
||||
|
||||
#: nano.c:2919
|
||||
msgid "NumLock glitch detected. Keypad will malfunction with NumLock off"
|
||||
msgstr ""
|
||||
"Am detectat problema cu NumLock. Keypad-ul va funcþiona greºit cu NumLock "
|
||||
"deactivat"
|
||||
msgstr "Am detectat problema cu NumLock. Keypad-ul va funcþiona greºit cu NumLock deactivat"
|
||||
|
||||
#: nano.c:2968
|
||||
msgid "enabled"
|
||||
@@ -1569,8 +1486,7 @@ msgstr "Nu"
|
||||
#: winio.c:1499
|
||||
#, c-format
|
||||
msgid "line %ld/%ld (%d%%), col %lu/%lu (%d%%), char %lu/%ld (%d%%)"
|
||||
msgstr ""
|
||||
"linia %ld/%ld (%d%%), coloana %lu/%lu (%d%%), caracterul %lu/%ld (%d%%)"
|
||||
msgstr "linia %ld/%ld (%d%%), coloana %lu/%lu (%d%%), caracterul %lu/%ld (%d%%)"
|
||||
|
||||
#: winio.c:1838
|
||||
msgid "The nano text editor"
|
||||
@@ -1603,108 +1519,3 @@ msgstr "
|
||||
#: winio.c:1845
|
||||
msgid "Thank you for using nano!\n"
|
||||
msgstr "Vã mulþumim cã folosiþi nano!\n"
|
||||
|
||||
#~ msgid "add_to_cutbuffer() called with inptr->data = %s\n"
|
||||
#~ msgstr "add_to_cutbuffer() chemat cu inptr->data = %s\n"
|
||||
|
||||
#~ msgid "Blew away cutbuffer =)\n"
|
||||
#~ msgstr "Am renunþat la conþinutul cutbuffer-ului =)\n"
|
||||
|
||||
#~ msgid "filename is %s\n"
|
||||
#~ msgstr "nume_fiºier este %s\n"
|
||||
|
||||
#~ msgid "%s: free'd a node, YAY!\n"
|
||||
#~ msgstr "%s: am eliberat un nod, URA!\n"
|
||||
|
||||
#~ msgid "%s: free'd last node.\n"
|
||||
#~ msgstr "%s: am eliberat ultimul nod.\n"
|
||||
|
||||
#~ msgid "Backing up %s to %s\n"
|
||||
#~ msgstr "Copiez pentru siguranþã (backup) %s în %s\n"
|
||||
|
||||
#~ msgid "Wrote >%s\n"
|
||||
#~ msgstr "Am scris >%s\n"
|
||||
|
||||
#~ msgid "current->data now = \"%s\"\n"
|
||||
#~ msgstr "current->data acum = \"%s\"\n"
|
||||
|
||||
#~ msgid "After, data = \"%s\"\n"
|
||||
#~ msgstr "Dupã, data = \"%s\"\n"
|
||||
|
||||
#~ msgid "Main: set up windows\n"
|
||||
#~ msgstr "Principal: seteazã ferestre\n"
|
||||
|
||||
#~ msgid "Main: bottom win\n"
|
||||
#~ msgstr "Principal: fereastra de jos\n"
|
||||
|
||||
#~ msgid "Main: open file\n"
|
||||
#~ msgstr "Principal: deschide fiºier\n"
|
||||
|
||||
#~ msgid "AHA! %c (%d)\n"
|
||||
#~ msgstr "AHA! %c (%d)\n"
|
||||
|
||||
#~ msgid "I got Alt-O-%c! (%d)\n"
|
||||
#~ msgstr "Am primit Alt-O-%c! (%d)\n"
|
||||
|
||||
#~ msgid "I got Alt-[-1-%c! (%d)\n"
|
||||
#~ msgstr "Am primit Alt-[-1-%c! (%d)\n"
|
||||
|
||||
#~ msgid "I got Alt-[-2-%c! (%d)\n"
|
||||
#~ msgstr "Am primit Alt-[-2-%c! (%d)\n"
|
||||
|
||||
#~ msgid "I got Alt-[-%c! (%d)\n"
|
||||
#~ msgstr "Am primit Alt-[-%c! (%d)\n"
|
||||
|
||||
#~ msgid "I got Alt-%c! (%d)\n"
|
||||
#~ msgstr "Am primit Alt-%c! (%d)\n"
|
||||
|
||||
#~ msgid "I got %c (%d)!\n"
|
||||
#~ msgstr "Am primit %c (%d)!\n"
|
||||
|
||||
#~ msgid "Adding new syntax after 1st\n"
|
||||
#~ msgstr "Adaug o nouã sintaxã dupã primul\n"
|
||||
|
||||
#~ msgid "Starting a new syntax type\n"
|
||||
#~ msgstr "Încep un nou tip de sintaxã\n"
|
||||
|
||||
#~ msgid "Starting a new colorstring for fg %d bg %d\n"
|
||||
#~ msgstr "Încep un nou ºir_culoare pentru fg %d bg %d\n"
|
||||
|
||||
#~ msgid "Adding new entry for fg %d bg %d\n"
|
||||
#~ msgstr "Adaug o nouã intrare pentru fg %d bg %d\n"
|
||||
|
||||
#~ msgid "%s: Read a comment\n"
|
||||
#~ msgstr "%s: Am citit un comentariu\n"
|
||||
|
||||
#~ msgid "%s: Parsing option %s\n"
|
||||
#~ msgstr "%s: Interpretare opþiune %s\n"
|
||||
|
||||
#~ msgid "set flag %d!\n"
|
||||
#~ msgstr "seteazã marcaj (flag) %d!\n"
|
||||
|
||||
#~ msgid "unset flag %d!\n"
|
||||
#~ msgstr "deseteazã marcaj (flag) %d!\n"
|
||||
|
||||
#~ msgid "actual_x for xplus=%d returns %d\n"
|
||||
#~ msgstr "actual_x pentru xplus=%d întoarce %d\n"
|
||||
|
||||
#~ msgid "Aha! '%c' (%d)\n"
|
||||
#~ msgstr "Aha! '%c' (%d)\n"
|
||||
|
||||
#~ msgid "input '%c' (%d)\n"
|
||||
#~ msgstr "intrare '%c' (%d)\n"
|
||||
|
||||
#~ msgid "Moved to (%d, %d) in edit buffer\n"
|
||||
#~ msgstr "Mutat la (%d, %d) în buffer-ul de editare\n"
|
||||
|
||||
#~ msgid "I got \"%s\"\n"
|
||||
#~ msgstr "Am primit \"%s\"\n"
|
||||
|
||||
#~ msgid "Dumping file buffer to stderr...\n"
|
||||
#~ msgstr "Scriu fiºierul buffer la stderr...\n"
|
||||
|
||||
#~ msgid "Dumping cutbuffer to stderr...\n"
|
||||
#~ msgstr "Scriu cutbuffer-ul la stderr...\n"
|
||||
|
||||
#~ msgid "Dumping a buffer to stderr...\n"
|
||||
#~ msgstr "Scriu un buffer la stderr...\n"
|
||||
|
||||
10
src/color.c
10
src/color.c
@@ -2,7 +2,7 @@
|
||||
/**************************************************************************
|
||||
* color.c *
|
||||
* *
|
||||
* Copyright (C) 1999-2003 Chris Allegretta *
|
||||
* Copyright (C) 1999-2004 Chris Allegretta *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2, or (at your option) *
|
||||
@@ -39,14 +39,14 @@ void set_colorpairs(void)
|
||||
{
|
||||
const syntaxtype *this_syntax = syntaxes;
|
||||
|
||||
for(; this_syntax != NULL; this_syntax = this_syntax->next) {
|
||||
for (; this_syntax != NULL; this_syntax = this_syntax->next) {
|
||||
colortype *this_color = this_syntax->color;
|
||||
int color_pair = 1;
|
||||
|
||||
for(; this_color != NULL; this_color = this_color->next) {
|
||||
for (; this_color != NULL; this_color = this_color->next) {
|
||||
const colortype *beforenow = this_syntax->color;
|
||||
|
||||
for(; beforenow != NULL && beforenow != this_color &&
|
||||
for (; beforenow != NULL && beforenow != this_color &&
|
||||
(beforenow->fg != this_color->fg ||
|
||||
beforenow->bg != this_color->bg ||
|
||||
beforenow->bright != this_color->bright);
|
||||
@@ -109,7 +109,7 @@ void update_color(void)
|
||||
|
||||
for (e = tmpsyntax->extensions; e != NULL; e = e->next) {
|
||||
/* Set colorstrings if we matched the extension regex */
|
||||
if (!regexec(&e->val, filename, 0, NULL, 0))
|
||||
if (regexec(&e->val, filename, 0, NULL, 0) == 0)
|
||||
colorstrings = tmpsyntax->color;
|
||||
|
||||
if (colorstrings != NULL)
|
||||
|
||||
331
src/cut.c
331
src/cut.c
@@ -2,7 +2,7 @@
|
||||
/**************************************************************************
|
||||
* cut.c *
|
||||
* *
|
||||
* Copyright (C) 1999-2003 Chris Allegretta *
|
||||
* Copyright (C) 1999-2004 Chris Allegretta *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2, or (at your option) *
|
||||
@@ -28,47 +28,47 @@
|
||||
#include "proto.h"
|
||||
#include "nano.h"
|
||||
|
||||
static int marked_cut; /* Is the cutbuffer from a mark? */
|
||||
static int marked_cut; /* Is the cutbuffer from a mark?
|
||||
* 0 means whole-line cut, 1 means mark,
|
||||
* 2 means cut-from-cursor. */
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
static int concatenate_cut; /* Should we add this cut string to the
|
||||
end of the last one? */
|
||||
* end of the last one? */
|
||||
#endif
|
||||
|
||||
static filestruct *cutbottom = NULL;
|
||||
/* Pointer to end of cutbuffer */
|
||||
/* Pointer to end of cutbuffer. */
|
||||
|
||||
filestruct *get_cutbottom(void)
|
||||
{
|
||||
return cutbottom;
|
||||
}
|
||||
|
||||
void add_to_cutbuffer(filestruct *inptr)
|
||||
void add_to_cutbuffer(filestruct *inptr, int allow_concat)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "add_to_cutbuffer() called with inptr->data = %s\n",
|
||||
inptr->data);
|
||||
fprintf(stderr, "add_to_cutbuffer(): inptr->data = %s\n", inptr->data);
|
||||
#endif
|
||||
|
||||
if (cutbuffer == NULL) {
|
||||
if (cutbuffer == NULL)
|
||||
cutbuffer = inptr;
|
||||
inptr->prev = NULL;
|
||||
#ifndef NANO_SMALL
|
||||
} else if (concatenate_cut && !ISSET(JUSTIFY_MODE)) {
|
||||
else if (allow_concat && concatenate_cut) {
|
||||
/* Just tack the text in inptr onto the text in cutbottom,
|
||||
unless we're backing up lines while justifying text. */
|
||||
* unless allow_concat is false. */
|
||||
cutbottom->data = charealloc(cutbottom->data,
|
||||
strlen(cutbottom->data) + strlen(inptr->data) + 1);
|
||||
strcat(cutbottom->data, inptr->data);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
else {
|
||||
cutbottom->next = inptr;
|
||||
inptr->prev = cutbottom;
|
||||
}
|
||||
|
||||
inptr->next = NULL;
|
||||
cutbottom = inptr;
|
||||
cutbottom->next = NULL;
|
||||
}
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
@@ -78,112 +78,115 @@ void add_to_cutbuffer(filestruct *inptr)
|
||||
* last cut line has length bot_x. That is, if bot_x > 0 then we cut to
|
||||
* bot->data[bot_x - 1].
|
||||
*
|
||||
* destructive is whether to actually modify the file structure, if not
|
||||
* then just copy the buffer into cutbuffer and don't pull it from the
|
||||
* file.
|
||||
* We maintain totsize, totlines, filebot, the magicline, and line
|
||||
* numbers. Also, we set current and current_x so the cursor will be on
|
||||
* the first character after what was cut. We do not do any screen
|
||||
* updates.
|
||||
*
|
||||
* If destructive, then we maintain totsize, totlines, filebot, the
|
||||
* magic line, and line numbers. Also, we set current and current_x so
|
||||
* the cursor will be on the first character after what was cut. We do
|
||||
* not do any screen updates. */
|
||||
void cut_marked_segment(filestruct *top, size_t top_x, filestruct *bot,
|
||||
size_t bot_x, int destructive)
|
||||
* Note cutbuffer might not be NULL if cut to end is used. */
|
||||
void cut_marked_segment(void)
|
||||
{
|
||||
filestruct *tmp, *next;
|
||||
filestruct *top;
|
||||
filestruct *bot;
|
||||
filestruct *tmp;
|
||||
size_t top_x;
|
||||
size_t bot_x;
|
||||
size_t newsize;
|
||||
|
||||
if (top == bot && top_x == bot_x)
|
||||
/* If the mark doesn't cover any text, get out. */
|
||||
if (current == mark_beginbuf && current_x == mark_beginx)
|
||||
return;
|
||||
assert(top != NULL && bot != NULL);
|
||||
assert(current != NULL && mark_beginbuf != NULL);
|
||||
|
||||
/* Make top be no later than bot. */
|
||||
if (top->lineno > bot->lineno) {
|
||||
filestruct *swap = top;
|
||||
int swap2 = top_x;
|
||||
/* Set up the top and bottom lines and coordinates of the marked
|
||||
* text. */
|
||||
mark_order((const filestruct **)&top, &top_x,
|
||||
(const filestruct **)&bot, &bot_x);
|
||||
|
||||
top = bot;
|
||||
bot = swap;
|
||||
|
||||
top_x = bot_x;
|
||||
bot_x = swap2;
|
||||
} else if (top == bot && top_x > bot_x) {
|
||||
/* And bot_x can't be an earlier character than top_x. */
|
||||
int swap = top_x;
|
||||
|
||||
top_x = bot_x;
|
||||
bot_x = swap;
|
||||
}
|
||||
|
||||
/* Make the first cut line manually. */
|
||||
/* Make the first cut line manually. Move the cut part of the top
|
||||
* line into tmp, and set newsize to that partial line's length. */
|
||||
tmp = copy_node(top);
|
||||
newsize = (top == bot ? bot_x - top_x : strlen(top->data + top_x));
|
||||
charmove(tmp->data, top->data + top_x, newsize);
|
||||
charmove(tmp->data, tmp->data + top_x, newsize);
|
||||
null_at(&tmp->data, newsize);
|
||||
add_to_cutbuffer(tmp);
|
||||
|
||||
/* And make the remainder line manually too. */
|
||||
if (destructive) {
|
||||
current_x = top_x;
|
||||
totsize -= newsize;
|
||||
totlines -= bot->lineno - top->lineno;
|
||||
|
||||
newsize = top_x + strlen(bot->data + bot_x) + 1;
|
||||
if (top == bot) {
|
||||
/* In this case, the remainder line is shorter, so we must
|
||||
move text from the end forward first. */
|
||||
charmove(top->data + top_x, bot->data + bot_x,
|
||||
newsize - top_x);
|
||||
top->data = charealloc(top->data, newsize);
|
||||
} else {
|
||||
totsize -= bot_x + 1;
|
||||
|
||||
/* Here, the remainder line might get longer, so we
|
||||
realloc() it first. */
|
||||
top->data = charealloc(top->data, newsize);
|
||||
charmove(top->data + top_x, bot->data + bot_x,
|
||||
newsize - top_x);
|
||||
}
|
||||
/* Add the contents of tmp to the cutbuffer. Note that cutbuffer
|
||||
* might be non-NULL if we have cut to end enabled. */
|
||||
if (cutbuffer == NULL) {
|
||||
cutbuffer = tmp;
|
||||
cutbottom = tmp;
|
||||
} else {
|
||||
cutbottom->next = tmp;
|
||||
tmp->prev = cutbottom;
|
||||
cutbottom = tmp;
|
||||
}
|
||||
|
||||
/* And make the top remainder line manually too. Update current_x
|
||||
* and totlines to account for all the cut text, and update totsize
|
||||
* to account for the length of the cut part of the first line. */
|
||||
current_x = top_x;
|
||||
totsize -= newsize;
|
||||
totlines -= bot->lineno - top->lineno;
|
||||
|
||||
/* Now set newsize to be the length of the top remainder line plus
|
||||
* the bottom remainder line, plus one for the null terminator. */
|
||||
newsize = top_x + strlen(bot->data + bot_x) + 1;
|
||||
|
||||
if (top == bot) {
|
||||
/* In this case, we're only cutting one line or part of one
|
||||
* line, so the remainder line is shorter. This means that we
|
||||
* must move text from the end forward first. */
|
||||
charmove(top->data + top_x, bot->data + bot_x, newsize - top_x);
|
||||
top->data = charealloc(top->data, newsize);
|
||||
|
||||
cutbottom->next = NULL;
|
||||
#ifdef DEBUG
|
||||
dump_buffer(cutbuffer);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
tmp = top->next;
|
||||
while (tmp != bot) {
|
||||
next = tmp->next;
|
||||
if (!destructive)
|
||||
tmp = copy_node(tmp);
|
||||
else
|
||||
totsize -= strlen(tmp->data) + 1;
|
||||
add_to_cutbuffer(tmp);
|
||||
tmp = next;
|
||||
}
|
||||
/* Update totsize to account for the cut part of the last line. */
|
||||
totsize -= bot_x + 1;
|
||||
|
||||
/* Here, the top remainder line might get longer (if the bottom
|
||||
* remainder line is added to the end of it), so we realloc() it
|
||||
* first. */
|
||||
top->data = charealloc(top->data, newsize);
|
||||
charmove(top->data + top_x, bot->data + bot_x, newsize - top_x);
|
||||
|
||||
assert(cutbottom != NULL && cutbottom->next != NULL);
|
||||
/* We're cutting multiple lines, so in particular the next line is
|
||||
* cut too. */
|
||||
cutbottom->next->prev = cutbottom;
|
||||
|
||||
/* Update totsize to account for all the complete lines that have
|
||||
* been cut. After this, totsize is fully up to date. */
|
||||
for (tmp = top->next; tmp != bot; tmp = tmp->next)
|
||||
totsize -= strlen(tmp->data) + 1;
|
||||
|
||||
/* Make the last cut line manually. */
|
||||
tmp = copy_node(bot);
|
||||
null_at(&tmp->data, bot_x);
|
||||
add_to_cutbuffer(tmp);
|
||||
#ifdef DEBUG
|
||||
dump_buffer(cutbuffer);
|
||||
#endif
|
||||
null_at(&bot->data, bot_x);
|
||||
|
||||
if (destructive) {
|
||||
top->next = bot->next;
|
||||
if (top->next != NULL)
|
||||
top->next->prev = top;
|
||||
delete_node(bot);
|
||||
renumber(top);
|
||||
current = top;
|
||||
if (bot == filebot) {
|
||||
filebot = top;
|
||||
assert(bot_x == 0);
|
||||
if (top_x > 0)
|
||||
new_magicline();
|
||||
}
|
||||
/* Move the rest of the cut text (other than the cut part of the top
|
||||
* line) from the buffer to the end of the cutbuffer, and fix the
|
||||
* edit buffer to account for the cut text. */
|
||||
top->next = bot->next;
|
||||
cutbottom = bot;
|
||||
cutbottom->next = NULL;
|
||||
if (top->next != NULL)
|
||||
top->next->prev = top;
|
||||
renumber(top);
|
||||
current = top;
|
||||
|
||||
/* If the bottom line of the cut was the magicline, set filebot
|
||||
* properly, and add a new magicline if the top remainder line
|
||||
* (which is now the new bottom line) is non-blank. */
|
||||
if (bot == filebot) {
|
||||
filebot = top;
|
||||
assert(bot_x == 0);
|
||||
if (top_x > 0)
|
||||
new_magicline();
|
||||
}
|
||||
#ifdef DEBUG
|
||||
dump_buffer(cutbuffer);
|
||||
@@ -194,9 +197,6 @@ void cut_marked_segment(filestruct *top, size_t top_x, filestruct *bot,
|
||||
int do_cut_text(void)
|
||||
{
|
||||
filestruct *fileptr;
|
||||
#ifndef NANO_SMALL
|
||||
int dontupdate = 0;
|
||||
#endif
|
||||
|
||||
assert(current != NULL && current->data != NULL);
|
||||
|
||||
@@ -207,15 +207,15 @@ int do_cut_text(void)
|
||||
cutbuffer = NULL;
|
||||
marked_cut = 0;
|
||||
#ifndef NANO_SMALL
|
||||
concatenate_cut = 0;
|
||||
concatenate_cut = FALSE;
|
||||
#endif
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "Blew away cutbuffer =)\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
/* You can't cut the magic line except with the mark. But
|
||||
trying does clear the cutbuffer if KEEP_CUTBUFFER is not set. */
|
||||
/* You can't cut the magicline except with the mark. But trying
|
||||
* does clear the cutbuffer if KEEP_CUTBUFFER is not set. */
|
||||
if (current == filebot
|
||||
#ifndef NANO_SMALL
|
||||
&& !ISSET(MARK_ISSET)
|
||||
@@ -231,13 +231,14 @@ int do_cut_text(void)
|
||||
|
||||
if (current->data[current_x] == '\0') {
|
||||
/* If the line is empty and we didn't just cut a non-blank
|
||||
line, create a dummy line and add it to the cutbuffer */
|
||||
* line, create a dummy blank line and add it to the
|
||||
* cutbuffer. */
|
||||
if (marked_cut != 1 && current->next != filebot) {
|
||||
filestruct *junk = make_new_node(current);
|
||||
|
||||
junk->data = charalloc(1);
|
||||
junk->data = charalloc(1);
|
||||
junk->data[0] = '\0';
|
||||
add_to_cutbuffer(junk);
|
||||
add_to_cutbuffer(junk, TRUE);
|
||||
#ifdef DEBUG
|
||||
dump_buffer(cutbuffer);
|
||||
#endif
|
||||
@@ -251,33 +252,22 @@ int do_cut_text(void)
|
||||
|
||||
mark_beginx = strlen(current->data);
|
||||
mark_beginbuf = current;
|
||||
dontupdate = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (ISSET(MARK_ISSET)) {
|
||||
/* Don't do_update() and move the screen position if the marked
|
||||
area lies entirely within the screen buffer */
|
||||
dontupdate |= current->lineno >= edittop->lineno &&
|
||||
current->lineno <= editbot->lineno &&
|
||||
mark_beginbuf->lineno >= edittop->lineno &&
|
||||
mark_beginbuf->lineno <= editbot->lineno;
|
||||
cut_marked_segment(current, current_x, mark_beginbuf,
|
||||
mark_beginx, 1);
|
||||
cut_marked_segment();
|
||||
|
||||
placewewant = xplustabs();
|
||||
UNSET(MARK_ISSET);
|
||||
|
||||
/* If we just did a marked cut of part of a line, we should add
|
||||
the first line of any cut done immediately afterward to the
|
||||
end of this cut, as Pico does. */
|
||||
* the first line of any cut done immediately afterward to the
|
||||
* end of this cut, as Pico does. */
|
||||
if (current == mark_beginbuf && current_x < strlen(current->data))
|
||||
concatenate_cut = 1;
|
||||
concatenate_cut = TRUE;
|
||||
marked_cut = 1;
|
||||
if (dontupdate)
|
||||
edit_refresh();
|
||||
else
|
||||
edit_update(current, CENTER);
|
||||
edit_refresh();
|
||||
set_modified();
|
||||
|
||||
return 1;
|
||||
@@ -289,7 +279,7 @@ int do_cut_text(void)
|
||||
fileptr = current;
|
||||
current = current->next;
|
||||
current->prev = fileptr->prev;
|
||||
add_to_cutbuffer(fileptr);
|
||||
add_to_cutbuffer(fileptr, TRUE);
|
||||
#ifdef DEBUG
|
||||
dump_buffer(cutbuffer);
|
||||
#endif
|
||||
@@ -308,31 +298,28 @@ int do_cut_text(void)
|
||||
set_modified();
|
||||
marked_cut = 0;
|
||||
#ifndef NANO_SMALL
|
||||
concatenate_cut = 0;
|
||||
concatenate_cut = FALSE;
|
||||
#endif
|
||||
placewewant = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int do_uncut_text(void)
|
||||
{
|
||||
filestruct *tmp = current, *fileptr = current;
|
||||
filestruct *newbuf = NULL, *newend = NULL;
|
||||
char *tmpstr, *tmpstr2;
|
||||
filestruct *hold = current;
|
||||
int i;
|
||||
filestruct *tmp = current;
|
||||
filestruct *newbuf = NULL;
|
||||
filestruct *newend = NULL;
|
||||
|
||||
#ifndef DISABLE_WRAPPING
|
||||
wrap_reset();
|
||||
#endif
|
||||
check_statblank();
|
||||
if (cutbuffer == NULL || fileptr == NULL)
|
||||
if (cutbuffer == NULL || current == NULL)
|
||||
return 0; /* AIEEEEEEEEEEEE */
|
||||
|
||||
/* If we're uncutting a previously non-marked block, uncut to end if
|
||||
we're not at the beginning of the line. If we are at the
|
||||
beginning of the line, set placewewant to 0. Pico does both of
|
||||
these. */
|
||||
* we're not at the beginning of the line. If we are at the
|
||||
* beginning of the line, set placewewant to 0. Pico does both of
|
||||
* these. */
|
||||
if (marked_cut == 0) {
|
||||
if (current_x != 0)
|
||||
marked_cut = 2;
|
||||
@@ -341,24 +328,22 @@ int do_uncut_text(void)
|
||||
}
|
||||
|
||||
/* If we're going to uncut on the magicline, always make a new
|
||||
magicline in advance. */
|
||||
* magicline in advance, as Pico does. */
|
||||
if (current->next == NULL)
|
||||
new_magicline();
|
||||
|
||||
if (marked_cut == 0 || cutbuffer->next != NULL)
|
||||
{
|
||||
if (marked_cut == 0 || cutbuffer->next != NULL) {
|
||||
newbuf = copy_filestruct(cutbuffer);
|
||||
for (newend = newbuf; newend->next != NULL && newend != NULL;
|
||||
newend = newend->next)
|
||||
totlines++;
|
||||
}
|
||||
|
||||
/* Hook newbuf into fileptr */
|
||||
/* Hook newbuf in at current. */
|
||||
if (marked_cut != 0) {
|
||||
int recenter_me = 0;
|
||||
/* Should we eventually use edit_update(CENTER)? */
|
||||
filestruct *hold = current;
|
||||
|
||||
/* If there's only one line in the cutbuffer */
|
||||
/* If there's only one line in the cutbuffer... */
|
||||
if (cutbuffer->next == NULL) {
|
||||
size_t buf_len = strlen(cutbuffer->data);
|
||||
size_t cur_len = strlen(current->data);
|
||||
@@ -367,22 +352,24 @@ int do_uncut_text(void)
|
||||
charmove(current->data + current_x + buf_len,
|
||||
current->data + current_x, cur_len - current_x + 1);
|
||||
strncpy(current->data + current_x, cutbuffer->data, buf_len);
|
||||
/* Use strncpy() to not copy the terminal '\0'. */
|
||||
/* Use strncpy() to not copy the null terminator. */
|
||||
|
||||
current_x += buf_len;
|
||||
totsize += buf_len;
|
||||
|
||||
placewewant = xplustabs();
|
||||
update_cursor();
|
||||
} else { /* yuck -- no kidding! */
|
||||
} else { /* Yuck -- no kidding! */
|
||||
char *tmpstr, *tmpstr2;
|
||||
|
||||
tmp = current->next;
|
||||
/* New beginning */
|
||||
|
||||
/* New beginning. */
|
||||
tmpstr = charalloc(current_x + strlen(newbuf->data) + 1);
|
||||
strncpy(tmpstr, current->data, current_x);
|
||||
strcpy(&tmpstr[current_x], newbuf->data);
|
||||
totsize += strlen(newbuf->data) + strlen(newend->data) + 1;
|
||||
|
||||
/* New end */
|
||||
/* New end. */
|
||||
tmpstr2 = charalloc(strlen(newend->data) +
|
||||
strlen(¤t->data[current_x]) + 1);
|
||||
strcpy(tmpstr2, newend->data);
|
||||
@@ -401,35 +388,28 @@ int do_uncut_text(void)
|
||||
|
||||
newend->next = tmp;
|
||||
|
||||
/* If tmp isn't null, we're in the middle: update the
|
||||
prev pointer. If it IS null, we're at the end; update
|
||||
the filebot pointer */
|
||||
|
||||
/* If tmp isn't NULL, we're in the middle: update the
|
||||
* prev pointer. If it IS NULL, we're at the end; update
|
||||
* the filebot pointer. */
|
||||
if (tmp != NULL)
|
||||
tmp->prev = newend;
|
||||
else {
|
||||
/* Fix the editbot pointer too */
|
||||
if (editbot == filebot)
|
||||
editbot = newend;
|
||||
filebot = newend;
|
||||
new_magicline();
|
||||
}
|
||||
|
||||
/* Now why don't we update the totsize also */
|
||||
/* Now why don't we update the totsize also? */
|
||||
for (tmp = current->next; tmp != newend; tmp = tmp->next)
|
||||
totsize += strlen(tmp->data) + 1;
|
||||
|
||||
current = newend;
|
||||
if (editbot->lineno < newend->lineno)
|
||||
recenter_me = 1;
|
||||
}
|
||||
|
||||
/* If marked cut == 2, that means that we're doing a cut to end
|
||||
and we don't want anything else on the line, so we have to
|
||||
screw up all the work we just did and separate the line.
|
||||
There must be a better way to do this, but not at 1AM on a
|
||||
work night. */
|
||||
|
||||
* and we don't want anything else on the line, so we have to
|
||||
* screw up all the work we just did and separate the line.
|
||||
* There must be a better way to do this, but not at 1 AM on a
|
||||
* work night. */
|
||||
if (marked_cut == 2) {
|
||||
tmp = make_new_node(current);
|
||||
tmp->data = mallocstrcpy(NULL, current->data + current_x);
|
||||
@@ -439,7 +419,7 @@ int do_uncut_text(void)
|
||||
current_x = 0;
|
||||
placewewant = 0;
|
||||
|
||||
/* Extra line added, update stuff */
|
||||
/* Extra line added; update stuff. */
|
||||
totlines++;
|
||||
totsize++;
|
||||
}
|
||||
@@ -451,41 +431,32 @@ int do_uncut_text(void)
|
||||
dump_buffer(cutbuffer);
|
||||
#endif
|
||||
set_modified();
|
||||
if (recenter_me)
|
||||
edit_update(current, CENTER);
|
||||
else
|
||||
edit_refresh();
|
||||
edit_refresh();
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (fileptr != fileage) {
|
||||
tmp = fileptr->prev;
|
||||
if (current != fileage) {
|
||||
tmp = current->prev;
|
||||
tmp->next = newbuf;
|
||||
newbuf->prev = tmp;
|
||||
} else
|
||||
fileage = newbuf;
|
||||
totlines++; /* Unmarked uncuts don't split lines */
|
||||
totlines++; /* Unmarked uncuts don't split lines. */
|
||||
|
||||
/* This is so uncutting at the top of the buffer will work => */
|
||||
if (current_y == 0)
|
||||
edittop = newbuf;
|
||||
|
||||
/* Connect the end of the buffer to the filestruct */
|
||||
newend->next = fileptr;
|
||||
fileptr->prev = newend;
|
||||
/* Connect the end of the buffer to the filestruct. */
|
||||
newend->next = current;
|
||||
current->prev = newend;
|
||||
|
||||
/* Recalculate size *sigh* */
|
||||
for (tmp = newbuf; tmp != fileptr; tmp = tmp->next)
|
||||
for (tmp = newbuf; tmp != current; tmp = tmp->next)
|
||||
totsize += strlen(tmp->data) + 1;
|
||||
|
||||
i = editbot->lineno;
|
||||
renumber(newbuf);
|
||||
/* Center the screen if we've moved beyond the line numbers of both
|
||||
the old and new editbots */
|
||||
if (i < newend->lineno && editbot->lineno < newend->lineno)
|
||||
edit_update(fileptr, CENTER);
|
||||
else
|
||||
edit_refresh();
|
||||
edit_refresh();
|
||||
|
||||
#ifdef DEBUG
|
||||
dump_buffer_reverse();
|
||||
|
||||
957
src/files.c
957
src/files.c
File diff suppressed because it is too large
Load Diff
473
src/global.c
473
src/global.c
@@ -2,7 +2,7 @@
|
||||
/**************************************************************************
|
||||
* global.c *
|
||||
* *
|
||||
* Copyright (C) 1999-2003 Chris Allegretta *
|
||||
* Copyright (C) 1999-2004 Chris Allegretta *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2, or (at your option) *
|
||||
@@ -59,7 +59,6 @@ filestruct *fileage = NULL; /* Our file buffer */
|
||||
filestruct *edittop = NULL; /* Pointer to the top of the edit
|
||||
buffer with respect to the
|
||||
file struct */
|
||||
filestruct *editbot = NULL; /* Same for the bottom */
|
||||
filestruct *filebot = NULL; /* Last node in the file struct */
|
||||
filestruct *cutbuffer = NULL; /* A place to store cut text */
|
||||
|
||||
@@ -72,6 +71,10 @@ char *quotestr = NULL; /* Quote string. The default value is
|
||||
set in main(). */
|
||||
#endif
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
char *backup_dir = NULL; /* Backup directory. */
|
||||
#endif
|
||||
|
||||
int resetstatuspos; /* Hack for resetting the status bar
|
||||
cursor position */
|
||||
char *answer = NULL; /* Answer str to many questions */
|
||||
@@ -92,7 +95,7 @@ char *help_text; /* The text in the help window */
|
||||
/* More stuff for the marker select */
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
filestruct *mark_beginbuf; /* the begin marker buffer */
|
||||
filestruct *mark_beginbuf; /* The begin marker buffer */
|
||||
int mark_beginx; /* X value in the string to start */
|
||||
#endif
|
||||
|
||||
@@ -158,7 +161,7 @@ int curses_ended = FALSE; /* Indicates to statusbar() to simply
|
||||
* ended curses mode. */
|
||||
|
||||
|
||||
int length_of_list(const shortcut *s)
|
||||
int length_of_list(const shortcut *s)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
@@ -168,11 +171,12 @@ int length_of_list(const shortcut *s)
|
||||
}
|
||||
|
||||
/* Initialize a struct *without* our lovely braces =( */
|
||||
void sc_init_one(shortcut **shortcutage, int key, const char *desc,
|
||||
void sc_init_one(shortcut **shortcutage, int ctrlval, const char *desc,
|
||||
#ifndef DISABLE_HELP
|
||||
const char *help,
|
||||
#endif
|
||||
int alt, int misc1, int misc2, int view, int (*func) (void))
|
||||
int metaval, int funcval, int miscval, int view, int
|
||||
(*func)(void))
|
||||
{
|
||||
shortcut *s;
|
||||
|
||||
@@ -186,14 +190,14 @@ void sc_init_one(shortcut **shortcutage, int key, const char *desc,
|
||||
s = s->next;
|
||||
}
|
||||
|
||||
s->val = key;
|
||||
s->ctrlval = ctrlval;
|
||||
s->desc = desc;
|
||||
#ifndef DISABLE_HELP
|
||||
s->help = help;
|
||||
#endif
|
||||
s->altval = alt;
|
||||
s->misc1 = misc1;
|
||||
s->misc2 = misc2;
|
||||
s->metaval = metaval;
|
||||
s->funcval = funcval;
|
||||
s->miscval = miscval;
|
||||
s->viewok = view;
|
||||
s->func = func;
|
||||
s->next = NULL;
|
||||
@@ -235,7 +239,7 @@ void toggle_init(void)
|
||||
char *toggle_wrap_msg;
|
||||
#endif
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
char *toggle_load_msg;
|
||||
char *toggle_multibuffer_msg;
|
||||
#endif
|
||||
#ifdef ENABLE_COLOR
|
||||
char *toggle_syntax_msg;
|
||||
@@ -266,22 +270,22 @@ void toggle_init(void)
|
||||
toggle_wrap_msg = _("Auto line wrap");
|
||||
#endif
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
toggle_load_msg = _("Multiple file buffers");
|
||||
toggle_multibuffer_msg = _("Multiple file buffers");
|
||||
#endif
|
||||
|
||||
toggle_init_one(TOGGLE_NOHELP_KEY, toggle_nohelp_msg, NO_HELP);
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
toggle_init_one(TOGGLE_MULTIBUFFER_KEY, toggle_multibuffer_msg, MULTIBUFFER);
|
||||
#endif
|
||||
toggle_init_one(TOGGLE_CONST_KEY, toggle_const_msg, CONSTUPDATE);
|
||||
toggle_init_one(TOGGLE_AUTOINDENT_KEY, toggle_autoindent_msg, AUTOINDENT);
|
||||
toggle_init_one(TOGGLE_SUSPEND_KEY, toggle_suspend_msg, SUSPEND);
|
||||
toggle_init_one(TOGGLE_NOHELP_KEY, toggle_nohelp_msg, NO_HELP);
|
||||
#ifndef DISABLE_WRAPPING
|
||||
toggle_init_one(TOGGLE_WRAP_KEY, toggle_wrap_msg, NO_WRAP);
|
||||
#endif
|
||||
toggle_init_one(TOGGLE_CUTTOEND_KEY, toggle_cuttoend_msg, CUT_TO_END);
|
||||
toggle_init_one(TOGGLE_SUSPEND_KEY, toggle_suspend_msg, SUSPEND);
|
||||
#ifndef DISABLE_MOUSE
|
||||
toggle_init_one(TOGGLE_MOUSE_KEY, toggle_mouse_msg, USE_MOUSE);
|
||||
#endif
|
||||
toggle_init_one(TOGGLE_CUTTOEND_KEY, toggle_cuttoend_msg, CUT_TO_END);
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
toggle_init_one(TOGGLE_LOAD_KEY, toggle_load_msg, MULTIBUFFER);
|
||||
#endif
|
||||
toggle_init_one(TOGGLE_NOCONVERT_KEY, toggle_noconvert_msg, NO_CONVERT);
|
||||
toggle_init_one(TOGGLE_DOS_KEY, toggle_dos_msg, DOS_FILE);
|
||||
@@ -321,27 +325,30 @@ void free_shortcutage(shortcut **shortcutage)
|
||||
void shortcut_init(int unjustify)
|
||||
{
|
||||
#ifndef DISABLE_HELP
|
||||
const char *nano_help_msg = "", *nano_writeout_msg = "", *nano_exit_msg =
|
||||
"", *nano_goto_msg = "", *nano_justify_msg =
|
||||
"", *nano_replace_msg = "", *nano_insert_msg =
|
||||
"", *nano_whereis_msg = "", *nano_whereis_next_msg =
|
||||
"", *nano_prevpage_msg = "", *nano_nextpage_msg =
|
||||
"", *nano_cut_msg = "", *nano_uncut_msg =
|
||||
"", *nano_cursorpos_msg = "", *nano_spell_msg =
|
||||
"", *nano_up_msg = "", *nano_down_msg =
|
||||
"", *nano_forward_msg = "", *nano_back_msg = "", *nano_home_msg =
|
||||
const char *nano_help_msg = "", *nano_writeout_msg =
|
||||
"", *nano_exit_msg = "", *nano_goto_msg =
|
||||
"", *nano_justify_msg = "", *nano_replace_msg =
|
||||
"", *nano_insert_msg = "", *nano_whereis_msg =
|
||||
"", *nano_whereis_next_msg = "", *nano_prevpage_msg =
|
||||
"", *nano_nextpage_msg = "", *nano_cut_msg =
|
||||
"", *nano_uncut_msg = "", *nano_cursorpos_msg =
|
||||
"", *nano_spell_msg = "", *nano_prevline_msg =
|
||||
"", *nano_nextline_msg = "", *nano_forward_msg =
|
||||
"", *nano_back_msg = "", *nano_home_msg =
|
||||
"", *nano_end_msg = "", *nano_firstline_msg =
|
||||
"", *nano_lastline_msg = "", *nano_refresh_msg =
|
||||
"", *nano_mark_msg = "", *nano_delete_msg =
|
||||
"", *nano_backspace_msg = "", *nano_tab_msg =
|
||||
"", *nano_enter_msg = "", *nano_cancel_msg =
|
||||
"", *nano_unjustify_msg = "", *nano_append_msg =
|
||||
"", *nano_prepend_msg = "", *nano_tofiles_msg =
|
||||
"", *nano_gotodir_msg = "", *nano_case_msg =
|
||||
"", *nano_reverse_msg = "", *nano_execute_msg =
|
||||
"", *nano_dos_msg = "", *nano_mac_msg =
|
||||
"", *nano_backup_msg = "", *nano_editstr_msg =
|
||||
"", *nano_parabegin_msg = "", *nano_paraend_msg = "";
|
||||
"", *nano_enter_msg = "", *nano_prevword_msg =
|
||||
"", *nano_nextword_msg = "", *nano_verbatim_msg =
|
||||
"", *nano_cancel_msg = "", *nano_unjustify_msg =
|
||||
"", *nano_append_msg = "", *nano_prepend_msg =
|
||||
"", *nano_tofiles_msg = "", *nano_gotodir_msg =
|
||||
"", *nano_case_msg = "", *nano_reverse_msg =
|
||||
"", *nano_execute_msg = "", *nano_dos_msg =
|
||||
"", *nano_mac_msg = "", *nano_backup_msg =
|
||||
"", *nano_editstr_msg = "", *nano_parabegin_msg =
|
||||
"", *nano_paraend_msg = "";
|
||||
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
const char *nano_openprev_msg = "", *nano_opennext_msg =
|
||||
@@ -371,8 +378,8 @@ void shortcut_init(int unjustify)
|
||||
nano_uncut_msg = _("Uncut from the cutbuffer into the current line");
|
||||
nano_cursorpos_msg = _("Show the position of the cursor");
|
||||
nano_spell_msg = _("Invoke the spell checker, if available");
|
||||
nano_up_msg = _("Move up one line");
|
||||
nano_down_msg = _("Move down one line");
|
||||
nano_prevline_msg = _("Move to the previous line");
|
||||
nano_nextline_msg = _("Move to the next line");
|
||||
nano_forward_msg = _("Move forward one character");
|
||||
nano_back_msg = _("Move back one character");
|
||||
nano_home_msg = _("Move to the beginning of the current line");
|
||||
@@ -386,6 +393,10 @@ void shortcut_init(int unjustify)
|
||||
_("Delete the character to the left of the cursor");
|
||||
nano_tab_msg = _("Insert a tab character");
|
||||
nano_enter_msg = _("Insert a carriage return at the cursor position");
|
||||
nano_prevword_msg = _("Move backward one word");
|
||||
nano_nextword_msg = _("Move forward one word");
|
||||
nano_verbatim_msg = _("Insert character(s) verbatim");
|
||||
nano_enter_msg = _("Insert a carriage return at the cursor position");
|
||||
nano_case_msg =
|
||||
_("Make the current search or replace case (in)sensitive");
|
||||
nano_tofiles_msg = _("Go to file browser");
|
||||
@@ -417,44 +428,46 @@ void shortcut_init(int unjustify)
|
||||
/* The following macro is to be used in calling sc_init_one. The point is
|
||||
* that sc_init_one takes 9 arguments, unless DISABLE_HELP is defined,
|
||||
* when the fourth one should not be there. */
|
||||
#ifdef DISABLE_HELP
|
||||
# define IFHELP(help, nextvar) nextvar
|
||||
#else
|
||||
#ifndef DISABLE_HELP
|
||||
# define IFHELP(help, nextvar) help, nextvar
|
||||
#else
|
||||
# define IFHELP(help, nextvar) nextvar
|
||||
#endif
|
||||
|
||||
/* Translators: try to keep this string under 10 characters long */
|
||||
sc_init_one(&main_list, NANO_HELP_KEY, _("Get Help"),
|
||||
IFHELP(nano_help_msg, 0), NANO_HELP_FKEY, 0, VIEW,
|
||||
do_help);
|
||||
IFHELP(nano_help_msg, NANO_NO_KEY), NANO_HELP_FKEY,
|
||||
NANO_NO_KEY, VIEW, do_help);
|
||||
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
if (open_files != NULL && (open_files->prev != NULL || open_files->next != NULL))
|
||||
/* Translators: try to keep this string under 10 characters long */
|
||||
sc_init_one(&main_list, NANO_EXIT_KEY, _("Close"),
|
||||
IFHELP(nano_exit_msg, 0), NANO_EXIT_FKEY, 0, VIEW,
|
||||
do_exit);
|
||||
IFHELP(nano_exit_msg, NANO_NO_KEY), NANO_EXIT_FKEY,
|
||||
NANO_NO_KEY, VIEW, do_exit);
|
||||
else
|
||||
#endif
|
||||
|
||||
/* Translators: try to keep this string under 10 characters long */
|
||||
sc_init_one(&main_list, NANO_EXIT_KEY, _("Exit"),
|
||||
IFHELP(nano_exit_msg, 0), NANO_EXIT_FKEY, 0, VIEW,
|
||||
do_exit);
|
||||
IFHELP(nano_exit_msg, NANO_NO_KEY), NANO_EXIT_FKEY,
|
||||
NANO_NO_KEY, VIEW, do_exit);
|
||||
|
||||
/* Translators: try to keep this string under 10 characters long */
|
||||
sc_init_one(&main_list, NANO_WRITEOUT_KEY, _("WriteOut"),
|
||||
IFHELP(nano_writeout_msg, 0),
|
||||
NANO_WRITEOUT_FKEY, 0, NOVIEW, do_writeout_void);
|
||||
IFHELP(nano_writeout_msg, NANO_NO_KEY), NANO_WRITEOUT_FKEY,
|
||||
NANO_NO_KEY, NOVIEW, do_writeout_void);
|
||||
|
||||
/* Translators: try to keep this string under 10 characters long */
|
||||
sc_init_one(&main_list, NANO_JUSTIFY_KEY, _("Justify"),
|
||||
IFHELP(nano_justify_msg, 0), NANO_JUSTIFY_FKEY, 0,
|
||||
NOVIEW, do_justify);
|
||||
IFHELP(nano_justify_msg, NANO_NO_KEY),
|
||||
NANO_JUSTIFY_FKEY, NANO_NO_KEY, NOVIEW, do_justify);
|
||||
|
||||
/* this is so we can view multiple files */
|
||||
/* Translators: try to keep this string under 10 characters long */
|
||||
sc_init_one(&main_list, NANO_INSERTFILE_KEY, _("Read File"),
|
||||
IFHELP(nano_insert_msg, 0), NANO_INSERTFILE_FKEY, 0,
|
||||
IFHELP(nano_insert_msg, NANO_NO_KEY), NANO_INSERTFILE_FKEY,
|
||||
NANO_NO_KEY,
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
VIEW
|
||||
#else
|
||||
@@ -464,183 +477,201 @@ void shortcut_init(int unjustify)
|
||||
|
||||
/* Translators: try to keep this string under 10 characters long */
|
||||
sc_init_one(&main_list, NANO_WHEREIS_KEY, _("Where Is"),
|
||||
IFHELP(nano_whereis_msg, 0),
|
||||
NANO_WHEREIS_FKEY, 0, VIEW, do_search);
|
||||
IFHELP(nano_whereis_msg, NANO_NO_KEY), NANO_WHEREIS_FKEY,
|
||||
NANO_NO_KEY, VIEW, do_search);
|
||||
|
||||
/* Translators: try to keep this string under 10 characters long */
|
||||
sc_init_one(&main_list, NANO_PREVPAGE_KEY, _("Prev Page"),
|
||||
IFHELP(nano_prevpage_msg, 0),
|
||||
NANO_PREVPAGE_FKEY, KEY_PPAGE, VIEW, do_page_up);
|
||||
IFHELP(nano_prevpage_msg, NANO_NO_KEY), NANO_PREVPAGE_FKEY,
|
||||
NANO_NO_KEY, VIEW, do_page_up);
|
||||
|
||||
/* Translators: try to keep this string under 10 characters long */
|
||||
sc_init_one(&main_list, NANO_NEXTPAGE_KEY, _("Next Page"),
|
||||
IFHELP(nano_nextpage_msg, 0),
|
||||
NANO_NEXTPAGE_FKEY, KEY_NPAGE, VIEW, do_page_down);
|
||||
IFHELP(nano_nextpage_msg, NANO_NO_KEY), NANO_NEXTPAGE_FKEY,
|
||||
NANO_NO_KEY, VIEW, do_page_down);
|
||||
|
||||
/* Translators: try to keep this string under 10 characters long */
|
||||
sc_init_one(&main_list, NANO_CUT_KEY, _("Cut Text"),
|
||||
IFHELP(nano_cut_msg, 0),
|
||||
NANO_CUT_FKEY, 0, NOVIEW, do_cut_text);
|
||||
IFHELP(nano_cut_msg, NANO_NO_KEY), NANO_CUT_FKEY,
|
||||
NANO_NO_KEY, NOVIEW, do_cut_text);
|
||||
|
||||
if (unjustify)
|
||||
/* Translators: try to keep this string under 10 characters long */
|
||||
sc_init_one(&main_list, NANO_UNJUSTIFY_KEY, _("UnJustify"),
|
||||
IFHELP(nano_unjustify_msg, 0),
|
||||
0, 0, NOVIEW, do_uncut_text);
|
||||
IFHELP(nano_unjustify_msg, NANO_NO_KEY), NANO_UNJUSTIFY_FKEY,
|
||||
NANO_NO_KEY, NOVIEW, 0);
|
||||
else
|
||||
/* Translators: try to keep this string under 10 characters long */
|
||||
sc_init_one(&main_list, NANO_UNCUT_KEY, _("UnCut Txt"),
|
||||
IFHELP(nano_uncut_msg, 0),
|
||||
NANO_UNCUT_FKEY, 0, NOVIEW, do_uncut_text);
|
||||
IFHELP(nano_uncut_msg, NANO_NO_KEY), NANO_UNCUT_FKEY,
|
||||
NANO_NO_KEY, NOVIEW, do_uncut_text);
|
||||
|
||||
/* Translators: try to keep this string under 10 characters long */
|
||||
sc_init_one(&main_list, NANO_CURSORPOS_KEY, _("Cur Pos"),
|
||||
IFHELP(nano_cursorpos_msg, 0),
|
||||
NANO_CURSORPOS_FKEY, 0, VIEW, do_cursorpos_void);
|
||||
IFHELP(nano_cursorpos_msg, NANO_NO_KEY), NANO_CURSORPOS_FKEY,
|
||||
NANO_NO_KEY, VIEW, do_cursorpos_void);
|
||||
|
||||
/* Translators: try to keep this string under 10 characters long */
|
||||
sc_init_one(&main_list, NANO_SPELL_KEY, _("To Spell"),
|
||||
IFHELP(nano_spell_msg, 0),
|
||||
NANO_SPELL_FKEY, 0, NOVIEW, do_spell);
|
||||
IFHELP(nano_spell_msg, NANO_NO_KEY), NANO_SPELL_FKEY,
|
||||
NANO_NO_KEY, NOVIEW, do_spell);
|
||||
|
||||
sc_init_one(&main_list, NANO_UP_KEY, _("Up"),
|
||||
IFHELP(nano_up_msg, 0),
|
||||
KEY_UP, 0, VIEW, do_up);
|
||||
sc_init_one(&main_list, NANO_GOTO_KEY, _("Go To Line"),
|
||||
IFHELP(nano_goto_msg, NANO_ALT_GOTO_KEY), NANO_GOTO_FKEY,
|
||||
NANO_NO_KEY, VIEW, do_gotoline_void);
|
||||
|
||||
sc_init_one(&main_list, NANO_DOWN_KEY, _("Down"),
|
||||
IFHELP(nano_down_msg, 0),
|
||||
KEY_DOWN, 0, VIEW, do_down);
|
||||
sc_init_one(&main_list, NANO_REPLACE_KEY, _("Replace"),
|
||||
IFHELP(nano_replace_msg, NANO_ALT_REPLACE_KEY), NANO_REPLACE_FKEY,
|
||||
NANO_NO_KEY, NOVIEW, do_replace);
|
||||
|
||||
sc_init_one(&main_list, NANO_PREVLINE_KEY, _("Prev Line"),
|
||||
IFHELP(nano_prevline_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, do_up);
|
||||
|
||||
sc_init_one(&main_list, NANO_NEXTLINE_KEY, _("Next Line"),
|
||||
IFHELP(nano_nextline_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, do_down);
|
||||
|
||||
sc_init_one(&main_list, NANO_FORWARD_KEY, _("Forward"),
|
||||
IFHELP(nano_forward_msg, 0),
|
||||
KEY_RIGHT, 0, VIEW, do_right);
|
||||
IFHELP(nano_forward_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, do_right);
|
||||
|
||||
sc_init_one(&main_list, NANO_BACK_KEY, _("Back"),
|
||||
IFHELP(nano_back_msg, 0),
|
||||
KEY_LEFT, 0, VIEW, do_left);
|
||||
IFHELP(nano_back_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, do_left);
|
||||
|
||||
sc_init_one(&main_list, NANO_HOME_KEY, _("Home"),
|
||||
IFHELP(nano_home_msg, 0),
|
||||
KEY_HOME, 362, VIEW, do_home);
|
||||
IFHELP(nano_home_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, do_home);
|
||||
|
||||
sc_init_one(&main_list, NANO_END_KEY, _("End"),
|
||||
IFHELP(nano_end_msg, 0),
|
||||
KEY_END, 385, VIEW, do_end);
|
||||
IFHELP(nano_end_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, do_end);
|
||||
|
||||
sc_init_one(&main_list, NANO_REFRESH_KEY, _("Refresh"),
|
||||
IFHELP(nano_refresh_msg, 0),
|
||||
0, 0, VIEW, total_refresh);
|
||||
IFHELP(nano_refresh_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, total_refresh);
|
||||
|
||||
sc_init_one(&main_list, NANO_MARK_KEY, _("Mark Text"),
|
||||
IFHELP(nano_mark_msg, NANO_ALT_MARK_KEY),
|
||||
0, 0, NOVIEW, do_mark);
|
||||
NANO_NO_KEY, NANO_NO_KEY, NOVIEW, do_mark);
|
||||
|
||||
sc_init_one(&main_list, NANO_DELETE_KEY, _("Delete"),
|
||||
IFHELP(nano_delete_msg, 0), KEY_DC,
|
||||
NANO_CONTROL_D, NOVIEW, do_delete);
|
||||
IFHELP(nano_delete_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, NOVIEW, do_delete);
|
||||
|
||||
sc_init_one(&main_list, NANO_BACKSPACE_KEY, _("Backspace"),
|
||||
IFHELP(nano_backspace_msg, 0),
|
||||
KEY_BACKSPACE, 127, NOVIEW, do_backspace);
|
||||
IFHELP(nano_backspace_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, NOVIEW, do_backspace);
|
||||
|
||||
sc_init_one(&main_list, NANO_TAB_KEY, _("Tab"),
|
||||
IFHELP(nano_tab_msg, 0), 0, 0, NOVIEW, do_tab);
|
||||
|
||||
sc_init_one(&main_list, NANO_REPLACE_KEY, _("Replace"),
|
||||
IFHELP(nano_replace_msg, NANO_ALT_REPLACE_KEY),
|
||||
NANO_REPLACE_FKEY, 0, NOVIEW, do_replace);
|
||||
IFHELP(nano_tab_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, NOVIEW, do_tab);
|
||||
|
||||
sc_init_one(&main_list, NANO_ENTER_KEY, _("Enter"),
|
||||
IFHELP(nano_enter_msg, 0),
|
||||
KEY_ENTER, NANO_CONTROL_M, NOVIEW, do_enter);
|
||||
|
||||
sc_init_one(&main_list, NANO_GOTO_KEY, _("Go To Line"),
|
||||
IFHELP(nano_goto_msg, NANO_ALT_GOTO_KEY),
|
||||
NANO_GOTO_FKEY, 0, VIEW, do_gotoline_void);
|
||||
IFHELP(nano_enter_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, NOVIEW, do_enter);
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
sc_init_one(&main_list, NANO_NEXTWORD_KEY, _("Next Word"),
|
||||
IFHELP(_("Move forward one word"), 0),
|
||||
0, 0, VIEW, do_next_word);
|
||||
IFHELP(nano_nextword_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, do_next_word);
|
||||
|
||||
sc_init_one(&main_list, -9, _("Prev Word"),
|
||||
IFHELP(_("Move backward one word"), NANO_PREVWORD_KEY), 0, 0,
|
||||
VIEW, do_prev_word);
|
||||
#endif
|
||||
#if !defined(NANO_SMALL) && defined(HAVE_REGEX_H)
|
||||
sc_init_one(&main_list, -9, _("Find Other Bracket"),
|
||||
IFHELP(nano_bracket_msg, NANO_BRACKET_KEY),
|
||||
0, 0, VIEW, do_find_bracket);
|
||||
sc_init_one(&main_list, NANO_NO_KEY, _("Prev Word"),
|
||||
IFHELP(nano_prevword_msg, NANO_PREVWORD_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, do_prev_word);
|
||||
#endif
|
||||
|
||||
sc_init_one(&main_list, -9, _("Where Is Next"),
|
||||
IFHELP(nano_whereis_next_msg, NANO_WHEREIS_NEXT_KEY), 0, 0,
|
||||
NOVIEW, do_research);
|
||||
sc_init_one(&main_list, NANO_NO_KEY, _("Verbatim Input"),
|
||||
IFHELP(nano_verbatim_msg, NANO_VERBATIM_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, NOVIEW, do_verbatim_input);
|
||||
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
sc_init_one(&main_list, -9, _("Previous File"),
|
||||
IFHELP(nano_openprev_msg, NANO_OPENPREV_KEY),
|
||||
0, 0, VIEW, open_prevfile_void);
|
||||
sc_init_one(&main_list, -9, _("Next File"),
|
||||
IFHELP(nano_opennext_msg, NANO_OPENNEXT_KEY),
|
||||
0, 0, VIEW, open_nextfile_void);
|
||||
sc_init_one(&main_list, NANO_NO_KEY, _("Previous File"),
|
||||
IFHELP(nano_openprev_msg, NANO_OPENPREV_KEY), NANO_NO_KEY,
|
||||
NANO_OPENPREV_ALTKEY, VIEW, open_prevfile_void);
|
||||
|
||||
sc_init_one(&main_list, NANO_NO_KEY, _("Next File"),
|
||||
IFHELP(nano_opennext_msg, NANO_OPENNEXT_KEY), NANO_NO_KEY,
|
||||
NANO_OPENNEXT_ALTKEY, VIEW, open_nextfile_void);
|
||||
#endif
|
||||
|
||||
#if !defined(NANO_SMALL) && defined(HAVE_REGEX_H)
|
||||
sc_init_one(&main_list, NANO_NO_KEY, _("Find Other Bracket"),
|
||||
IFHELP(nano_bracket_msg, NANO_BRACKET_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, do_find_bracket);
|
||||
#endif
|
||||
|
||||
sc_init_one(&main_list, NANO_NO_KEY, _("Where Is Next"),
|
||||
IFHELP(nano_whereis_next_msg, NANO_WHEREIS_NEXT_KEY),
|
||||
NANO_NO_KEY, NANO_NO_KEY, VIEW, do_research);
|
||||
|
||||
free_shortcutage(&whereis_list);
|
||||
|
||||
sc_init_one(&whereis_list, NANO_HELP_KEY, _("Get Help"),
|
||||
IFHELP(nano_help_msg, 0), 0, 0, VIEW, do_help);
|
||||
IFHELP(nano_help_msg, NANO_NO_KEY), NANO_HELP_FKEY,
|
||||
NANO_NO_KEY, VIEW, do_help);
|
||||
|
||||
/* Translators: try to keep this string under 10 characters long */
|
||||
sc_init_one(&whereis_list, NANO_CANCEL_KEY, _("Cancel"),
|
||||
IFHELP(nano_cancel_msg, 0), 0, 0, VIEW, 0);
|
||||
IFHELP(nano_cancel_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, 0);
|
||||
|
||||
/* Translators: try to keep this string under 10 characters long */
|
||||
sc_init_one(&whereis_list, NANO_FIRSTLINE_KEY, _("First Line"),
|
||||
IFHELP(nano_firstline_msg, 0),
|
||||
0, 0, VIEW, do_first_line);
|
||||
IFHELP(nano_firstline_msg, NANO_NO_KEY), NANO_FIRSTLINE_FKEY,
|
||||
NANO_NO_KEY, VIEW, do_first_line);
|
||||
|
||||
/* Translators: try to keep this string under 10 characters long */
|
||||
sc_init_one(&whereis_list, NANO_LASTLINE_KEY, _("Last Line"),
|
||||
IFHELP(nano_lastline_msg, 0), 0, 0, VIEW, do_last_line);
|
||||
IFHELP(nano_lastline_msg, NANO_NO_KEY), NANO_LASTLINE_FKEY,
|
||||
NANO_NO_KEY, VIEW, do_last_line);
|
||||
|
||||
/* Translators: try to keep this string under 10 characters long */
|
||||
sc_init_one(&whereis_list, NANO_OTHERSEARCH_KEY, _("Replace"),
|
||||
IFHELP(nano_replace_msg, 0), 0, 0, VIEW, do_replace);
|
||||
IFHELP(nano_replace_msg, NANO_NO_KEY), NANO_REPLACE_FKEY,
|
||||
NANO_NO_KEY, VIEW, do_replace);
|
||||
|
||||
/* Translators: try to keep this string under 10 characters long */
|
||||
sc_init_one(&whereis_list, NANO_FROMSEARCHTOGOTO_KEY, _("Go To Line"),
|
||||
IFHELP(nano_goto_msg, 0), 0, 0, VIEW, do_gotoline_void);
|
||||
IFHELP(nano_goto_msg, NANO_NO_KEY), NANO_GOTO_FKEY,
|
||||
NANO_NO_KEY, VIEW, do_gotoline_void);
|
||||
|
||||
#ifndef DISABLE_JUSTIFY
|
||||
/* Translators: try to keep this string under 10 characters long */
|
||||
sc_init_one(&whereis_list, NANO_PARABEGIN_KEY, _("Beg of Par"),
|
||||
IFHELP(nano_parabegin_msg, 0), 0, 0, VIEW, do_para_begin);
|
||||
IFHELP(nano_parabegin_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, do_para_begin);
|
||||
|
||||
/* Translators: try to keep this string under 10 characters long */
|
||||
sc_init_one(&whereis_list, NANO_PARAEND_KEY, _("End of Par"),
|
||||
IFHELP(nano_paraend_msg, 0), 0, 0, VIEW, do_para_end);
|
||||
IFHELP(nano_paraend_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, do_para_end);
|
||||
#endif
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
/* Translators: try to keep this string under 10 characters long */
|
||||
sc_init_one(&whereis_list, TOGGLE_CASE_KEY, _("Case Sens"),
|
||||
IFHELP(nano_case_msg, 0), 0, 0, VIEW, 0);
|
||||
sc_init_one(&whereis_list, NANO_NO_KEY, _("Case Sens"),
|
||||
IFHELP(nano_case_msg, TOGGLE_CASE_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, 0);
|
||||
|
||||
/* Translators: try to keep this string under 10 characters long */
|
||||
sc_init_one(&whereis_list, TOGGLE_BACKWARDS_KEY, _("Direction"),
|
||||
IFHELP(nano_reverse_msg, 0), 0, 0, VIEW, 0);
|
||||
sc_init_one(&whereis_list, NANO_NO_KEY, _("Direction"),
|
||||
IFHELP(nano_reverse_msg, TOGGLE_BACKWARDS_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, 0);
|
||||
|
||||
#ifdef HAVE_REGEX_H
|
||||
/* Translators: try to keep this string under 10 characters long */
|
||||
sc_init_one(&whereis_list, TOGGLE_REGEXP_KEY, _("Regexp"),
|
||||
IFHELP(nano_regexp_msg, 0), 0, 0, VIEW, 0);
|
||||
sc_init_one(&whereis_list, NANO_NO_KEY, _("Regexp"),
|
||||
IFHELP(nano_regexp_msg, TOGGLE_REGEXP_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, 0);
|
||||
#endif
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
/* Translators: try to keep this string under 10 characters long */
|
||||
sc_init_one(&whereis_list, KEY_UP, _("History"),
|
||||
IFHELP(nano_editstr_msg, 0), NANO_UP_KEY, 0, VIEW, 0);
|
||||
sc_init_one(&whereis_list, NANO_HISTORY_KEY, _("History"),
|
||||
IFHELP(nano_editstr_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, 0);
|
||||
#endif
|
||||
|
||||
#endif /* !NANO_SMALL */
|
||||
@@ -648,147 +679,181 @@ void shortcut_init(int unjustify)
|
||||
free_shortcutage(&replace_list);
|
||||
|
||||
sc_init_one(&replace_list, NANO_HELP_KEY, _("Get Help"),
|
||||
IFHELP(nano_help_msg, 0), 0, 0, VIEW, do_help);
|
||||
IFHELP(nano_help_msg, NANO_NO_KEY), NANO_HELP_FKEY,
|
||||
NANO_NO_KEY, VIEW, do_help);
|
||||
|
||||
sc_init_one(&replace_list, NANO_CANCEL_KEY, _("Cancel"),
|
||||
IFHELP(nano_cancel_msg, 0), 0, 0, VIEW, 0);
|
||||
IFHELP(nano_cancel_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, 0);
|
||||
|
||||
sc_init_one(&replace_list, NANO_FIRSTLINE_KEY, _("First Line"),
|
||||
IFHELP(nano_firstline_msg, 0), 0, 0, VIEW, do_first_line);
|
||||
IFHELP(nano_firstline_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, do_first_line);
|
||||
|
||||
sc_init_one(&replace_list, NANO_LASTLINE_KEY, _("Last Line"),
|
||||
IFHELP(nano_lastline_msg, 0), 0, 0, VIEW, do_last_line);
|
||||
IFHELP(nano_lastline_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, do_last_line);
|
||||
|
||||
/* Translators: try to keep this string under 12 characters long */
|
||||
sc_init_one(&replace_list, NANO_OTHERSEARCH_KEY, _("No Replace"),
|
||||
IFHELP(nano_whereis_msg, 0), 0, 0, VIEW, do_search);
|
||||
IFHELP(nano_whereis_msg, NANO_NO_KEY), NANO_REPLACE_FKEY,
|
||||
NANO_NO_KEY, VIEW, do_search);
|
||||
|
||||
sc_init_one(&replace_list, NANO_FROMSEARCHTOGOTO_KEY, _("Go To Line"),
|
||||
IFHELP(nano_goto_msg, 0), 0, 0, VIEW, do_gotoline_void);
|
||||
IFHELP(nano_goto_msg, NANO_NO_KEY), NANO_GOTO_FKEY,
|
||||
NANO_NO_KEY, VIEW, do_gotoline_void);
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
sc_init_one(&replace_list, TOGGLE_CASE_KEY, _("Case Sens"),
|
||||
IFHELP(nano_case_msg, 0), 0, 0, VIEW, 0);
|
||||
sc_init_one(&replace_list, NANO_NO_KEY, _("Case Sens"),
|
||||
IFHELP(nano_case_msg, TOGGLE_CASE_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, 0);
|
||||
|
||||
sc_init_one(&replace_list, TOGGLE_BACKWARDS_KEY, _("Direction"),
|
||||
IFHELP(nano_reverse_msg, 0), 0, 0, VIEW, 0);
|
||||
sc_init_one(&replace_list, NANO_NO_KEY, _("Direction"),
|
||||
IFHELP(nano_reverse_msg, TOGGLE_BACKWARDS_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, 0);
|
||||
|
||||
#ifdef HAVE_REGEX_H
|
||||
sc_init_one(&replace_list, TOGGLE_REGEXP_KEY, _("Regexp"),
|
||||
IFHELP(nano_regexp_msg, 0), 0, 0, VIEW, 0);
|
||||
sc_init_one(&replace_list, NANO_NO_KEY, _("Regexp"),
|
||||
IFHELP(nano_regexp_msg, TOGGLE_REGEXP_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, 0);
|
||||
#endif
|
||||
|
||||
sc_init_one(&replace_list, KEY_UP, _("History"),
|
||||
IFHELP(nano_editstr_msg, 0), NANO_UP_KEY, 0, VIEW, 0);
|
||||
sc_init_one(&replace_list, NANO_HISTORY_KEY, _("History"),
|
||||
IFHELP(nano_editstr_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, 0);
|
||||
#endif /* !NANO_SMALL */
|
||||
|
||||
free_shortcutage(&replace_list_2);
|
||||
|
||||
sc_init_one(&replace_list_2, NANO_HELP_KEY, _("Get Help"),
|
||||
IFHELP(nano_help_msg, 0), 0, 0, VIEW, do_help);
|
||||
IFHELP(nano_help_msg, NANO_NO_KEY), NANO_HELP_FKEY,
|
||||
NANO_NO_KEY, VIEW, do_help);
|
||||
|
||||
sc_init_one(&replace_list_2, NANO_CANCEL_KEY, _("Cancel"),
|
||||
IFHELP(nano_cancel_msg, 0), 0, 0, VIEW, 0);
|
||||
IFHELP(nano_cancel_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, 0);
|
||||
|
||||
sc_init_one(&replace_list_2, NANO_FIRSTLINE_KEY, _("First Line"),
|
||||
IFHELP(nano_firstline_msg, 0), 0, 0, VIEW, do_first_line);
|
||||
IFHELP(nano_firstline_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, do_first_line);
|
||||
|
||||
sc_init_one(&replace_list_2, NANO_LASTLINE_KEY, _("Last Line"),
|
||||
IFHELP(nano_lastline_msg, 0), 0, 0, VIEW, do_last_line);
|
||||
IFHELP(nano_lastline_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, do_last_line);
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
sc_init_one(&replace_list_2, KEY_UP, _("History"),
|
||||
IFHELP(nano_editstr_msg, 0), NANO_UP_KEY, 0, VIEW, 0);
|
||||
sc_init_one(&replace_list_2, NANO_HISTORY_KEY, _("History"),
|
||||
IFHELP(nano_editstr_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, 0);
|
||||
#endif
|
||||
|
||||
free_shortcutage(&goto_list);
|
||||
|
||||
sc_init_one(&goto_list, NANO_HELP_KEY, _("Get Help"),
|
||||
IFHELP(nano_help_msg, 0), 0, 0, VIEW, do_help);
|
||||
IFHELP(nano_help_msg, NANO_NO_KEY), NANO_HELP_FKEY,
|
||||
NANO_NO_KEY, VIEW, do_help);
|
||||
|
||||
sc_init_one(&goto_list, NANO_CANCEL_KEY, _("Cancel"),
|
||||
IFHELP(nano_cancel_msg, 0), 0, 0, VIEW, 0);
|
||||
IFHELP(nano_cancel_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, 0);
|
||||
|
||||
sc_init_one(&goto_list, NANO_FIRSTLINE_KEY, _("First Line"),
|
||||
IFHELP(nano_firstline_msg, 0), 0, 0, VIEW, do_first_line);
|
||||
IFHELP(nano_firstline_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, do_first_line);
|
||||
|
||||
sc_init_one(&goto_list, NANO_LASTLINE_KEY, _("Last Line"),
|
||||
IFHELP(nano_lastline_msg, 0), 0, 0, VIEW, do_last_line);
|
||||
IFHELP(nano_lastline_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, do_last_line);
|
||||
|
||||
#ifndef DISABLE_HELP
|
||||
free_shortcutage(&help_list);
|
||||
|
||||
sc_init_one(&help_list, NANO_PREVPAGE_KEY, _("Prev Page"),
|
||||
IFHELP(nano_prevpage_msg, 0), NANO_PREVPAGE_FKEY,
|
||||
KEY_PPAGE, VIEW, do_page_up);
|
||||
IFHELP(nano_prevpage_msg, NANO_NO_KEY), NANO_PREVPAGE_FKEY,
|
||||
NANO_NO_KEY, VIEW, do_page_up);
|
||||
|
||||
sc_init_one(&help_list, NANO_NEXTPAGE_KEY, _("Next Page"),
|
||||
IFHELP(nano_nextpage_msg, 0),
|
||||
NANO_NEXTPAGE_FKEY, KEY_NPAGE, VIEW, do_page_down);
|
||||
IFHELP(nano_nextpage_msg, NANO_NO_KEY), NANO_NEXTPAGE_FKEY,
|
||||
NANO_NO_KEY, VIEW, do_page_down);
|
||||
|
||||
sc_init_one(&help_list, NANO_EXIT_KEY, _("Exit"),
|
||||
IFHELP(nano_exit_msg, 0), NANO_EXIT_FKEY, 0, VIEW,
|
||||
do_exit);
|
||||
IFHELP(nano_exit_msg, NANO_NO_KEY), NANO_EXIT_FKEY,
|
||||
NANO_NO_KEY, VIEW, do_exit);
|
||||
#endif
|
||||
|
||||
free_shortcutage(&writefile_list);
|
||||
|
||||
sc_init_one(&writefile_list, NANO_HELP_KEY, _("Get Help"),
|
||||
IFHELP(nano_help_msg, 0), 0, 0, VIEW, do_help);
|
||||
IFHELP(nano_help_msg, NANO_NO_KEY), NANO_HELP_FKEY,
|
||||
NANO_NO_KEY, VIEW, do_help);
|
||||
|
||||
#ifndef DISABLE_BROWSER
|
||||
/* Translators: try to keep this string under 16 characters long */
|
||||
sc_init_one(&writefile_list, NANO_TOFILES_KEY, _("To Files"),
|
||||
IFHELP(nano_tofiles_msg, 0), 0, 0, NOVIEW, 0);
|
||||
IFHELP(nano_tofiles_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, NOVIEW, 0);
|
||||
#endif
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
/* Translators: try to keep this string under 16 characters long */
|
||||
sc_init_one(&writefile_list, TOGGLE_DOS_KEY, _("DOS Format"),
|
||||
IFHELP(nano_dos_msg, 0), 0, 0, NOVIEW, 0);
|
||||
sc_init_one(&writefile_list, NANO_NO_KEY, _("DOS Format"),
|
||||
IFHELP(nano_dos_msg, TOGGLE_DOS_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, NOVIEW, 0);
|
||||
|
||||
/* Translators: try to keep this string under 16 characters long */
|
||||
sc_init_one(&writefile_list, TOGGLE_MAC_KEY, _("Mac Format"),
|
||||
IFHELP(nano_mac_msg, 0), 0, 0, NOVIEW, 0);
|
||||
sc_init_one(&writefile_list, NANO_NO_KEY, _("Mac Format"),
|
||||
IFHELP(nano_mac_msg, TOGGLE_MAC_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, NOVIEW, 0);
|
||||
#endif
|
||||
|
||||
/* Translators: try to keep this string under 16 characters long */
|
||||
sc_init_one(&writefile_list, NANO_APPEND_KEY, _("Append"),
|
||||
IFHELP(nano_append_msg, 0), 0, 0, NOVIEW, 0);
|
||||
sc_init_one(&writefile_list, NANO_NO_KEY, _("Append"),
|
||||
IFHELP(nano_append_msg, NANO_APPEND_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, NOVIEW, 0);
|
||||
|
||||
/* Translators: try to keep this string under 16 characters long */
|
||||
sc_init_one(&writefile_list, NANO_PREPEND_KEY, _("Prepend"),
|
||||
IFHELP(nano_prepend_msg, 0), 0, 0, NOVIEW, 0);
|
||||
sc_init_one(&writefile_list, NANO_NO_KEY, _("Prepend"),
|
||||
IFHELP(nano_prepend_msg, NANO_PREPEND_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, NOVIEW, 0);
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
/* Translators: try to keep this string under 16 characters long */
|
||||
sc_init_one(&writefile_list, TOGGLE_BACKUP_KEY, _("Backup File"),
|
||||
IFHELP(nano_backup_msg, 0), 0, 0, NOVIEW, 0);
|
||||
sc_init_one(&writefile_list, NANO_NO_KEY, _("Backup File"),
|
||||
IFHELP(nano_backup_msg, TOGGLE_BACKUP_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, NOVIEW, 0);
|
||||
#endif
|
||||
|
||||
sc_init_one(&writefile_list, NANO_CANCEL_KEY, _("Cancel"),
|
||||
IFHELP(nano_cancel_msg, 0), 0, 0, VIEW, 0);
|
||||
IFHELP(nano_cancel_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, 0);
|
||||
|
||||
free_shortcutage(&insertfile_list);
|
||||
|
||||
sc_init_one(&insertfile_list, NANO_HELP_KEY, _("Get Help"),
|
||||
IFHELP(nano_help_msg, 0), 0, 0, VIEW, do_help);
|
||||
IFHELP(nano_help_msg, NANO_NO_KEY), NANO_HELP_FKEY,
|
||||
NANO_NO_KEY, VIEW, do_help);
|
||||
|
||||
sc_init_one(&insertfile_list, NANO_CANCEL_KEY, _("Cancel"),
|
||||
IFHELP(nano_cancel_msg, 0), 0, 0, VIEW, 0);
|
||||
IFHELP(nano_cancel_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, 0);
|
||||
|
||||
#ifndef DISABLE_BROWSER
|
||||
sc_init_one(&insertfile_list, NANO_TOFILES_KEY, _("To Files"),
|
||||
IFHELP(nano_tofiles_msg, 0), 0, 0, NOVIEW, 0);
|
||||
IFHELP(nano_tofiles_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, NOVIEW, 0);
|
||||
#endif
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
/* Translators: try to keep this string under 22 characters long */
|
||||
sc_init_one(&insertfile_list, NANO_EXTCMD_KEY, _("Execute Command"),
|
||||
IFHELP(nano_execute_msg, 0), 0, 0, NOVIEW, 0);
|
||||
IFHELP(nano_execute_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, NOVIEW, 0);
|
||||
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
/* Translators: try to keep this string under 22 characters long */
|
||||
sc_init_one(&insertfile_list, TOGGLE_LOAD_KEY, _("New Buffer"),
|
||||
IFHELP(nano_multibuffer_msg, 0), 0, 0, NOVIEW, 0);
|
||||
sc_init_one(&insertfile_list, NANO_NO_KEY, _("New Buffer"),
|
||||
IFHELP(nano_multibuffer_msg, TOGGLE_MULTIBUFFER_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, NOVIEW, 0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -796,51 +861,59 @@ void shortcut_init(int unjustify)
|
||||
free_shortcutage(&spell_list);
|
||||
|
||||
sc_init_one(&spell_list, NANO_HELP_KEY, _("Get Help"),
|
||||
IFHELP(nano_help_msg, 0), 0, 0, VIEW, do_help);
|
||||
IFHELP(nano_help_msg, NANO_NO_KEY), NANO_HELP_FKEY,
|
||||
NANO_NO_KEY, VIEW, do_help);
|
||||
|
||||
sc_init_one(&spell_list, NANO_CANCEL_KEY, _("Cancel"),
|
||||
IFHELP(nano_cancel_msg, 0), 0, 0, VIEW, 0);
|
||||
IFHELP(nano_cancel_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, 0);
|
||||
#endif
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
free_shortcutage(&extcmd_list);
|
||||
|
||||
sc_init_one(&extcmd_list, NANO_HELP_KEY, _("Get Help"),
|
||||
IFHELP(nano_help_msg, 0), 0, 0, VIEW, do_help);
|
||||
IFHELP(nano_help_msg, NANO_NO_KEY), NANO_HELP_FKEY,
|
||||
NANO_NO_KEY, VIEW, do_help);
|
||||
|
||||
sc_init_one(&extcmd_list, NANO_CANCEL_KEY, _("Cancel"),
|
||||
IFHELP(nano_cancel_msg, 0), 0, 0, VIEW, 0);
|
||||
IFHELP(nano_cancel_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, 0);
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_BROWSER
|
||||
free_shortcutage(&browser_list);
|
||||
|
||||
sc_init_one(&browser_list, NANO_HELP_KEY, _("Get Help"),
|
||||
IFHELP(nano_help_msg, 0), 0, 0, VIEW, do_help);
|
||||
IFHELP(nano_help_msg, NANO_NO_KEY), NANO_HELP_FKEY,
|
||||
NANO_NO_KEY, VIEW, do_help);
|
||||
|
||||
sc_init_one(&browser_list, NANO_CANCEL_KEY, _("Cancel"),
|
||||
IFHELP(nano_cancel_msg, 0), NANO_EXIT_FKEY, 0, VIEW, 0);
|
||||
IFHELP(nano_cancel_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, 0);
|
||||
|
||||
sc_init_one(&browser_list, NANO_PREVPAGE_KEY, _("Prev Page"),
|
||||
IFHELP(nano_prevpage_msg, 0), NANO_PREVPAGE_FKEY,
|
||||
KEY_PPAGE, VIEW, 0);
|
||||
IFHELP(nano_prevpage_msg, NANO_NO_KEY), NANO_PREVPAGE_FKEY,
|
||||
NANO_NO_KEY, VIEW, 0);
|
||||
|
||||
sc_init_one(&browser_list, NANO_NEXTPAGE_KEY, _("Next Page"),
|
||||
IFHELP(nano_nextpage_msg, 0), NANO_NEXTPAGE_FKEY,
|
||||
KEY_NPAGE, VIEW, 0);
|
||||
IFHELP(nano_nextpage_msg, NANO_NO_KEY), NANO_NEXTPAGE_FKEY,
|
||||
NANO_NO_KEY, VIEW, 0);
|
||||
|
||||
/* Translators: try to keep this string under 22 characters long */
|
||||
sc_init_one(&browser_list, NANO_GOTO_KEY, _("Go To Dir"),
|
||||
IFHELP(nano_gotodir_msg, NANO_ALT_GOTO_KEY),
|
||||
NANO_GOTO_FKEY, 0, VIEW, 0);
|
||||
IFHELP(nano_gotodir_msg, NANO_ALT_GOTO_KEY), NANO_GOTO_FKEY,
|
||||
NANO_NO_KEY, VIEW, 0);
|
||||
|
||||
free_shortcutage(&gotodir_list);
|
||||
|
||||
sc_init_one(&gotodir_list, NANO_HELP_KEY, _("Get Help"),
|
||||
IFHELP(nano_help_msg, 0), 0, 0, VIEW, do_help);
|
||||
IFHELP(nano_help_msg, NANO_NO_KEY), NANO_HELP_FKEY,
|
||||
NANO_NO_KEY, VIEW, do_help);
|
||||
|
||||
sc_init_one(&gotodir_list, NANO_CANCEL_KEY, _("Cancel"),
|
||||
IFHELP(nano_cancel_msg, 0), 0, 0, VIEW, 0);
|
||||
IFHELP(nano_cancel_msg, NANO_NO_KEY), NANO_NO_KEY,
|
||||
NANO_NO_KEY, VIEW, 0);
|
||||
#endif
|
||||
|
||||
#if !defined(DISABLE_BROWSER) || !defined(DISABLE_HELP) || !defined(DISABLE_MOUSE)
|
||||
@@ -863,6 +936,10 @@ void thanks_for_all_the_fish(void)
|
||||
if (quotestr != NULL)
|
||||
free(quotestr);
|
||||
#endif
|
||||
#ifndef NANO_SMALL
|
||||
if (backup_dir != NULL)
|
||||
free(backup_dir);
|
||||
#endif
|
||||
#ifndef DISABLE_OPERATINGDIR
|
||||
if (operating_dir != NULL)
|
||||
free(operating_dir);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**************************************************************************
|
||||
* move.c *
|
||||
* *
|
||||
* Copyright (C) 1999-2003 Chris Allegretta *
|
||||
* Copyright (C) 1999-2004 Chris Allegretta *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2, or (at your option) *
|
||||
@@ -148,8 +148,8 @@ int do_up(void)
|
||||
current_x = actual_x(current->data, placewewant);
|
||||
if (current_y > 0) {
|
||||
update_line(current->next, 0);
|
||||
/* It was necessary to change current first, so the mark
|
||||
* display will change! */
|
||||
/* It was necessary to change current first, so that the
|
||||
* mark display will change! */
|
||||
update_line(current, current_x);
|
||||
} else
|
||||
#ifndef NANO_SMALL
|
||||
|
||||
1115
src/nano.c
1115
src/nano.c
File diff suppressed because it is too large
Load Diff
180
src/nano.h
180
src/nano.h
@@ -2,7 +2,7 @@
|
||||
/**************************************************************************
|
||||
* nano.h *
|
||||
* *
|
||||
* Copyright (C) 1999-2003 Chris Allegretta *
|
||||
* Copyright (C) 1999-2004 Chris Allegretta *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2, or (at your option) *
|
||||
@@ -19,13 +19,21 @@
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef NANO_H
|
||||
#define NANO_H 1
|
||||
|
||||
#ifdef __TANDEM
|
||||
/* Tandem NonStop Kernel */
|
||||
#include <floss.h>
|
||||
#define NANO_ROOT_UID 65535
|
||||
#else
|
||||
#define NANO_ROOT_UID 0
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LIMITS_H
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
#ifndef NANO_H
|
||||
#define NANO_H 1
|
||||
|
||||
/* Macros for the flags int... */
|
||||
#define SET(bit) flags |= bit
|
||||
#define UNSET(bit) flags &= ~bit
|
||||
@@ -46,13 +54,14 @@
|
||||
#endif
|
||||
|
||||
#ifdef USE_SLANG
|
||||
/* Slang support enabled */
|
||||
/* Slang support enabled. Work around Slang's not defining KEY_DC or
|
||||
* KEY_IC. */
|
||||
#include <slcurses.h>
|
||||
#define KEY_DC SL_KEY_DELETE
|
||||
#define KEY_IC SL_KEY_IC
|
||||
#elif defined(HAVE_NCURSES_H)
|
||||
#include <ncurses.h>
|
||||
#else /* Uh oh */
|
||||
#else /* Uh oh. */
|
||||
#include <curses.h>
|
||||
#endif /* CURSES_H */
|
||||
|
||||
@@ -71,16 +80,18 @@
|
||||
#include <sys/stat.h>
|
||||
#include "config.h"
|
||||
|
||||
/* If no snprintf()/vsnprintf(), use the versions from glib. */
|
||||
#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF)
|
||||
#include <glib.h>
|
||||
# ifndef HAVE_SNPRINTF
|
||||
# define snprintf g_snprintf
|
||||
# define snprintf g_snprintf
|
||||
# endif
|
||||
# ifndef HAVE_VSNPRINTF
|
||||
# define vsnprintf g_vsnprintf
|
||||
# define vsnprintf g_vsnprintf
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* If no strcasecmp()/strncasecmp(), use the versions we have. */
|
||||
#ifndef HAVE_STRCASECMP
|
||||
#define strcasecmp nstricmp
|
||||
#endif
|
||||
@@ -90,10 +101,11 @@
|
||||
#endif
|
||||
|
||||
/* Assume ERR is defined as -1. To avoid duplicate case values when
|
||||
some key definitions are missing, we have to set these all to
|
||||
different negative values other than -1. */
|
||||
* some key definitions are missing, we have to set all of these, and
|
||||
* all of the special sentinel values below, to different negative
|
||||
* values other than -1. */
|
||||
|
||||
/* HP-UX 10 & 11 do not seem to support KEY_HOME and KEY_END */
|
||||
/* HP-UX 10 & 11 do not seem to support KEY_HOME and KEY_END. */
|
||||
#ifndef KEY_HOME
|
||||
#define KEY_HOME -2
|
||||
#endif
|
||||
@@ -102,25 +114,29 @@
|
||||
#define KEY_END -3
|
||||
#endif
|
||||
|
||||
/* Slang and SunOS 5.7-5.9 do not seem to support KEY_RESIZE */
|
||||
/* Slang and SunOS 5.7-5.9 do not seem to support KEY_RESIZE. */
|
||||
#ifndef KEY_RESIZE
|
||||
#define KEY_RESIZE -4
|
||||
#endif
|
||||
|
||||
/* Slang does not seem to support KEY_SUSPEND */
|
||||
/* Slang does not seem to support KEY_SUSPEND, KEY_SLEFT, or
|
||||
* KEY_SRIGHT. */
|
||||
#ifndef KEY_SUSPEND
|
||||
#define KEY_SUSPEND -5
|
||||
#endif
|
||||
|
||||
/* Snatch these out of the ncurses defs, so we can use them in search
|
||||
history regardless of whether we're using ncurses or not */
|
||||
#if !defined(KEY_UP) || !defined(KEY_DOWN)
|
||||
#define KEY_UP 0403
|
||||
#define KEY_DOWN 0402
|
||||
#endif /* !KEY_UP || !KEY_DOWN */
|
||||
#ifndef KEY_SLEFT
|
||||
#define KEY_SLEFT -6
|
||||
#endif
|
||||
|
||||
#ifndef KEY_SRIGHT
|
||||
#define KEY_SRIGHT -7
|
||||
#endif
|
||||
|
||||
#define VERMSG "GNU nano " VERSION
|
||||
|
||||
/* If we aren't using ncurses, turn the mouse support off, as it's
|
||||
* ncurses-specific. */
|
||||
#ifndef NCURSES_MOUSE_VERSION
|
||||
#define DISABLE_MOUSE 1
|
||||
#endif
|
||||
@@ -129,12 +145,12 @@
|
||||
#define DISABLE_WRAPJUSTIFY 1
|
||||
#endif
|
||||
|
||||
/* Structure types */
|
||||
/* Structure types. */
|
||||
typedef struct filestruct {
|
||||
char *data;
|
||||
struct filestruct *next; /* Next node */
|
||||
struct filestruct *prev; /* Previous node */
|
||||
int lineno; /* The line number */
|
||||
struct filestruct *next; /* Next node. */
|
||||
struct filestruct *prev; /* Previous node. */
|
||||
int lineno; /* The line number. */
|
||||
} filestruct;
|
||||
|
||||
#ifdef ENABLE_MULTIBUFFER
|
||||
@@ -143,49 +159,56 @@ typedef struct openfilestruct {
|
||||
#ifndef NANO_SMALL
|
||||
struct stat originalfilestat;
|
||||
#endif
|
||||
struct openfilestruct *next; /* Next node */
|
||||
struct openfilestruct *prev; /* Previous node */
|
||||
struct filestruct *fileage; /* Current file */
|
||||
struct filestruct *filebot; /* Current file's last line */
|
||||
struct openfilestruct *next; /* Next node. */
|
||||
struct openfilestruct *prev; /* Previous node. */
|
||||
struct filestruct *fileage; /* Current file. */
|
||||
struct filestruct *filebot; /* Current file's last line. */
|
||||
#ifndef NANO_SMALL
|
||||
struct filestruct *file_mark_beginbuf;
|
||||
/* Current file's beginning marked line */
|
||||
int file_mark_beginx; /* Current file's beginning marked line's
|
||||
x-coordinate position */
|
||||
/* Current file's beginning marked
|
||||
* line. */
|
||||
int file_mark_beginx; /* Current file's beginning marked
|
||||
* line's x-coordinate position. */
|
||||
#endif
|
||||
int file_current_x; /* Current file's x-coordinate position */
|
||||
int file_current_y; /* Current file's y-coordinate position */
|
||||
int file_current_x; /* Current file's x-coordinate
|
||||
* position. */
|
||||
int file_current_y; /* Current file's y-coordinate
|
||||
* position. */
|
||||
int file_flags; /* Current file's flags: modification
|
||||
status (and marking status, if
|
||||
available) */
|
||||
int file_placewewant; /* Current file's place we want */
|
||||
int file_totlines; /* Current file's total number of lines */
|
||||
long file_totsize; /* Current file's total size */
|
||||
int file_lineno; /* Current file's line number */
|
||||
* status (and marking status, if
|
||||
* available). */
|
||||
int file_placewewant; /* Current file's place we want. */
|
||||
int file_totlines; /* Current file's total number of
|
||||
* lines. */
|
||||
long file_totsize; /* Current file's total size. */
|
||||
int file_lineno; /* Current file's line number. */
|
||||
} openfilestruct;
|
||||
#endif
|
||||
|
||||
typedef struct shortcut {
|
||||
int val; /* Actual sequence that generates the keystroke */
|
||||
int altval; /* Alt key # for this function, or 0 for none */
|
||||
int misc1; /* Other int functions we want bound */
|
||||
int misc2;
|
||||
int viewok; /* is this function legal in view mode? */
|
||||
int (*func) (void); /* Function to call when we catch this key */
|
||||
const char *desc; /* Description, e.g. "Page Up" */
|
||||
/* Key values that aren't used should be set to NANO_NO_KEY. */
|
||||
int ctrlval; /* Special sentinel key or control key we want
|
||||
* bound. */
|
||||
int metaval; /* Meta key we want bound. */
|
||||
int funcval; /* Function key we want bound. */
|
||||
int miscval; /* Other Meta key we want bound. */
|
||||
int viewok; /* Is this function legal in view mode? */
|
||||
int (*func) (void); /* Function to call when we catch this key. */
|
||||
const char *desc; /* Description, e.g. "Page Up". */
|
||||
#ifndef DISABLE_HELP
|
||||
const char *help; /* Help file entry text */
|
||||
const char *help; /* Help file entry text. */
|
||||
#endif
|
||||
struct shortcut *next;
|
||||
struct shortcut *next;
|
||||
} shortcut;
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
typedef struct toggle {
|
||||
int val; /* Sequence to toggle the key. Should only need 1 */
|
||||
int val; /* Sequence to toggle the key. Should only need
|
||||
* one. */
|
||||
const char *desc; /* Description for when toggle is, uh, toggled,
|
||||
e.g. "Pico Messages"; we'll append Enabled or
|
||||
Disabled */
|
||||
int flag; /* What flag actually gets toggled */
|
||||
* e.g. "Cut to end"; we'll append Enabled or
|
||||
* Disabled. */
|
||||
int flag; /* What flag actually gets toggled. */
|
||||
struct toggle *next;
|
||||
} toggle;
|
||||
#endif /* !NANO_SMALL */
|
||||
@@ -230,8 +253,10 @@ typedef struct historytype {
|
||||
char *data;
|
||||
} historytype;
|
||||
typedef struct historyheadtype {
|
||||
struct historytype *next; /* keep *next and *prev members together */
|
||||
struct historytype *prev; /* and in same order as in historytype */
|
||||
struct historytype *next; /* Keep *next and *prev members
|
||||
* together. */
|
||||
struct historytype *prev; /* And in same order as in
|
||||
* historytype. */
|
||||
struct historytype *tail;
|
||||
struct historytype *current;
|
||||
int count;
|
||||
@@ -239,8 +264,8 @@ typedef struct historyheadtype {
|
||||
} historyheadtype;
|
||||
#endif /* !NANO_SMALL */
|
||||
|
||||
/* Bitwise flags so we can save space (or more correctly, not waste it) */
|
||||
|
||||
/* Bitwise flags so we can save space (or more correctly, not waste
|
||||
* it). */
|
||||
#define MODIFIED (1<<0)
|
||||
#define KEEP_CUTBUFFER (1<<1)
|
||||
#define CASE_SENSITIVE (1<<2)
|
||||
@@ -262,7 +287,7 @@ typedef struct historyheadtype {
|
||||
#define DOS_FILE (1<<18)
|
||||
#define MAC_FILE (1<<19)
|
||||
#define SMOOTHSCROLL (1<<20)
|
||||
#define DISABLE_CURPOS (1<<21) /* Damn, we still need it */
|
||||
#define DISABLE_CURPOS (1<<21) /* Damn, we still need it. */
|
||||
#define REBIND_DELETE (1<<22)
|
||||
#define NO_CONVERT (1<<23)
|
||||
#define BACKUP_FILE (1<<24)
|
||||
@@ -271,10 +296,8 @@ typedef struct historyheadtype {
|
||||
#define PRESERVE (1<<27)
|
||||
#define HISTORY_CHANGED (1<<28)
|
||||
#define HISTORYLOG (1<<29)
|
||||
#define JUSTIFY_MODE (1<<30)
|
||||
|
||||
/* Control key sequences, changing these would be very very bad */
|
||||
|
||||
/* Control key sequences, changing these would be very very bad. */
|
||||
#define NANO_CONTROL_SPACE 0
|
||||
#define NANO_CONTROL_A 1
|
||||
#define NANO_CONTROL_B 2
|
||||
@@ -339,16 +362,23 @@ typedef struct historyheadtype {
|
||||
#define NANO_ALT_COMMA ','
|
||||
#define NANO_ALT_LCARAT '<'
|
||||
#define NANO_ALT_RCARAT '>'
|
||||
#define NANO_ALT_BRACKET ']'
|
||||
#define NANO_ALT_RBRACKET ']'
|
||||
#define NANO_ALT_SPACE ' '
|
||||
|
||||
/* Some semi-changeable keybindings; don't play with unless you're sure
|
||||
you know what you're doing */
|
||||
/* Some semi-changeable keybindings; don't play with these unless you're
|
||||
* sure you know what you're doing. */
|
||||
|
||||
/* No key at all. */
|
||||
#define NANO_NO_KEY -8
|
||||
|
||||
/* Special sentinel key used for search string history. */
|
||||
#define NANO_HISTORY_KEY -9
|
||||
|
||||
/* Normal keys. */
|
||||
#define NANO_INSERTFILE_KEY NANO_CONTROL_R
|
||||
#define NANO_INSERTFILE_FKEY KEY_F(5)
|
||||
#define NANO_EXIT_KEY NANO_CONTROL_X
|
||||
#define NANO_EXIT_FKEY KEY_F(2)
|
||||
#define NANO_EXIT_KEY NANO_CONTROL_X
|
||||
#define NANO_EXIT_FKEY KEY_F(2)
|
||||
#define NANO_WRITEOUT_KEY NANO_CONTROL_O
|
||||
#define NANO_WRITEOUT_FKEY KEY_F(3)
|
||||
#define NANO_GOTO_KEY NANO_CONTROL_7
|
||||
@@ -376,14 +406,17 @@ typedef struct historyheadtype {
|
||||
#define NANO_SPELL_KEY NANO_CONTROL_T
|
||||
#define NANO_SPELL_FKEY KEY_F(12)
|
||||
#define NANO_FIRSTLINE_KEY NANO_PREVPAGE_KEY
|
||||
#define NANO_FIRSTLINE_FKEY NANO_PREVPAGE_FKEY
|
||||
#define NANO_LASTLINE_KEY NANO_NEXTPAGE_KEY
|
||||
#define NANO_LASTLINE_FKEY NANO_NEXTPAGE_FKEY
|
||||
#define NANO_CANCEL_KEY NANO_CONTROL_C
|
||||
#define NANO_REFRESH_KEY NANO_CONTROL_L
|
||||
#define NANO_JUSTIFY_KEY NANO_CONTROL_J
|
||||
#define NANO_JUSTIFY_FKEY KEY_F(4)
|
||||
#define NANO_UNJUSTIFY_KEY NANO_CONTROL_U
|
||||
#define NANO_UP_KEY NANO_CONTROL_P
|
||||
#define NANO_DOWN_KEY NANO_CONTROL_N
|
||||
#define NANO_UNJUSTIFY_KEY NANO_UNCUT_KEY /* Same key as uncut. */
|
||||
#define NANO_UNJUSTIFY_FKEY NANO_UNCUT_FKEY /* Same key as uncut. */
|
||||
#define NANO_PREVLINE_KEY NANO_CONTROL_P
|
||||
#define NANO_NEXTLINE_KEY NANO_CONTROL_N
|
||||
#define NANO_FORWARD_KEY NANO_CONTROL_F
|
||||
#define NANO_BACK_KEY NANO_CONTROL_B
|
||||
#define NANO_MARK_KEY NANO_CONTROL_6
|
||||
@@ -403,12 +436,13 @@ typedef struct historyheadtype {
|
||||
#define NANO_OPENNEXT_KEY NANO_ALT_RCARAT
|
||||
#define NANO_OPENPREV_ALTKEY NANO_ALT_COMMA
|
||||
#define NANO_OPENNEXT_ALTKEY NANO_ALT_PERIOD
|
||||
#define NANO_BRACKET_KEY NANO_ALT_BRACKET
|
||||
#define NANO_BRACKET_KEY NANO_ALT_RBRACKET
|
||||
#define NANO_EXTCMD_KEY NANO_CONTROL_X
|
||||
#define NANO_NEXTWORD_KEY NANO_CONTROL_SPACE
|
||||
#define NANO_PREVWORD_KEY NANO_ALT_SPACE
|
||||
#define NANO_PARABEGIN_KEY NANO_CONTROL_W
|
||||
#define NANO_PARAEND_KEY NANO_CONTROL_O
|
||||
#define NANO_VERBATIM_KEY NANO_ALT_V
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
/* Toggles do not exist with NANO_SMALL. */
|
||||
@@ -422,7 +456,7 @@ typedef struct historyheadtype {
|
||||
#define TOGGLE_WRAP_KEY NANO_ALT_L
|
||||
#define TOGGLE_BACKWARDS_KEY NANO_ALT_B
|
||||
#define TOGGLE_CASE_KEY NANO_ALT_C
|
||||
#define TOGGLE_LOAD_KEY NANO_ALT_F
|
||||
#define TOGGLE_MULTIBUFFER_KEY NANO_ALT_F
|
||||
#define TOGGLE_DOS_KEY NANO_ALT_D
|
||||
#define TOGGLE_MAC_KEY NANO_ALT_O
|
||||
#define TOGGLE_SMOOTH_KEY NANO_ALT_S
|
||||
@@ -440,18 +474,18 @@ typedef enum {
|
||||
TOP, CENTER, NONE
|
||||
} topmidnone;
|
||||
|
||||
/* Minimum editor window rows required for nano to work correctly */
|
||||
/* Minimum editor window rows required for nano to work correctly. */
|
||||
#define MIN_EDITOR_ROWS 3
|
||||
|
||||
/* Minimum editor window cols required for nano to work correctly */
|
||||
/* Minimum editor window cols required for nano to work correctly. */
|
||||
#define MIN_EDITOR_COLS 10
|
||||
|
||||
/* Default number of characters from end-of-line where text wrapping
|
||||
occurs */
|
||||
* occurs. */
|
||||
#define CHARS_FROM_EOL 8
|
||||
|
||||
/* Maximum number of search history strings saved, same value used for
|
||||
replace history */
|
||||
* replace history. */
|
||||
#define MAX_SEARCH_HISTORY 100
|
||||
|
||||
#endif /* !NANO_H */
|
||||
|
||||
83
src/proto.h
83
src/proto.h
@@ -2,7 +2,7 @@
|
||||
/**************************************************************************
|
||||
* proto.h *
|
||||
* *
|
||||
* Copyright (C) 1999-2003 Chris Allegretta *
|
||||
* Copyright (C) 1999-2004 Chris Allegretta *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2, or (at your option) *
|
||||
@@ -19,7 +19,7 @@
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
/* Externs */
|
||||
/* Externs. */
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
@@ -50,6 +50,10 @@ extern int currslen;
|
||||
extern char *quotestr;
|
||||
#endif
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
extern char *backup_dir;
|
||||
#endif
|
||||
|
||||
extern WINDOW *edit, *topwin, *bottomwin;
|
||||
extern char *filename;
|
||||
extern struct stat originalfilestat;
|
||||
@@ -70,7 +74,7 @@ extern char *alt_speller;
|
||||
|
||||
extern int resetstatuspos;
|
||||
extern struct stat fileinfo;
|
||||
extern filestruct *current, *fileage, *edittop, *editbot, *filebot;
|
||||
extern filestruct *current, *fileage, *edittop, *filebot;
|
||||
extern filestruct *cutbuffer;
|
||||
#ifndef NANO_SMALL
|
||||
extern filestruct *mark_beginbuf;
|
||||
@@ -128,7 +132,7 @@ extern historyheadtype replace_history;
|
||||
|
||||
extern int curses_ended;
|
||||
|
||||
/* Functions we want available */
|
||||
/* Functions we want available. */
|
||||
|
||||
/* Public functions in color.c */
|
||||
#ifdef ENABLE_COLOR
|
||||
@@ -139,9 +143,8 @@ void update_color(void);
|
||||
|
||||
/* Public functions in cut.c */
|
||||
filestruct *get_cutbottom(void);
|
||||
void add_to_cutbuffer(filestruct *inptr);
|
||||
void cut_marked_segment(filestruct *top, size_t top_x, filestruct *bot,
|
||||
size_t bot_x, int destructive);
|
||||
void add_to_cutbuffer(filestruct *inptr, int allow_concat);
|
||||
void cut_marked_segment(void);
|
||||
int do_cut_text(void);
|
||||
int do_uncut_text(void);
|
||||
|
||||
@@ -179,8 +182,15 @@ char *safe_tempnam(const char *dirname, const char *filename_prefix);
|
||||
void init_operating_dir(void);
|
||||
int check_operating_dir(const char *currpath, int allow_tabcomp);
|
||||
#endif
|
||||
#ifndef NANO_SMALL
|
||||
void init_backup_dir(void);
|
||||
#endif
|
||||
int write_file(const char *name, int tmp, int append, int nonamechange);
|
||||
int do_writeout(const char *path, int exiting, int append);
|
||||
#ifndef NANO_SMALL
|
||||
int write_marked(const char *name, int tmp, int append, int
|
||||
nonamechange);
|
||||
#endif
|
||||
int do_writeout(int exiting);
|
||||
int do_writeout_void(void);
|
||||
char *real_dir_from_tilde(const char *buf);
|
||||
#ifndef DISABLE_TABCOMP
|
||||
@@ -189,11 +199,12 @@ char **username_tab_completion(char *buf, int *num_matches);
|
||||
char **cwd_tab_completion(char *buf, int *num_matches);
|
||||
char *input_tab(char *buf, int place, int *lastwastab, int *newplace, int *list);
|
||||
#endif
|
||||
#if !defined(DISABLE_BROWSER) || !defined(NANO_SMALL)
|
||||
const char *tail(const char *foo);
|
||||
#endif
|
||||
#ifndef DISABLE_BROWSER
|
||||
struct stat filestat(const char *path);
|
||||
int diralphasort(const void *va, const void *vb);
|
||||
void free_charptrarray(char **array, int len);
|
||||
const char *tail(const char *foo);
|
||||
void striponedir(char *foo);
|
||||
int readable_dir(const char *path);
|
||||
char **browser_init(const char *path, int *longest, int *numents);
|
||||
@@ -207,7 +218,8 @@ void sc_init_one(shortcut **shortcutage, int key, const char *desc,
|
||||
#ifndef DISABLE_HELP
|
||||
const char *help,
|
||||
#endif
|
||||
int alt, int misc1, int misc2, int view, int (*func) (void));
|
||||
int metaval, int funcval, int miscval, int view, int
|
||||
(*func)(void));
|
||||
#ifndef NANO_SMALL
|
||||
void toggle_init_one(int val, const char *desc, int flag);
|
||||
void toggle_init(void);
|
||||
@@ -271,6 +283,7 @@ int open_pipe(const char *command);
|
||||
void do_mouse(void);
|
||||
#endif
|
||||
void do_char(char ch);
|
||||
int do_verbatim_input(void);
|
||||
int do_backspace(void);
|
||||
int do_delete(void);
|
||||
int do_tab(void);
|
||||
@@ -313,13 +326,12 @@ filestruct *backup_lines(filestruct *first_line, size_t par_len,
|
||||
size_t quote_len);
|
||||
int breakable(const char *line, int goal);
|
||||
int break_line(const char *line, int goal, int force);
|
||||
int do_para_operation(int operation);
|
||||
#endif /* !DISABLE_JUSTIFY */
|
||||
int do_justify(void);
|
||||
#ifndef DISABLE_JUSTIFY
|
||||
int do_para_search(int search_type, size_t *quote, size_t *par, size_t
|
||||
*indent, int do_refresh);
|
||||
int do_para_begin(void);
|
||||
int do_para_end(void);
|
||||
#endif
|
||||
#endif /* !DISABLE_JUSTIFY */
|
||||
int do_justify(void);
|
||||
int do_exit(void);
|
||||
void signal_init(void);
|
||||
RETSIGTYPE handle_hupterm(int signal);
|
||||
@@ -327,6 +339,7 @@ RETSIGTYPE do_suspend(int signal);
|
||||
RETSIGTYPE do_cont(int signal);
|
||||
#ifndef NANO_SMALL
|
||||
void handle_sigwinch(int s);
|
||||
void allow_pending_sigwinch(int allow);
|
||||
#endif
|
||||
void print_numlock_warning(void);
|
||||
#ifndef NANO_SMALL
|
||||
@@ -359,19 +372,19 @@ void not_found_msg(const char *str);
|
||||
void search_abort(void);
|
||||
void search_init_globals(void);
|
||||
int search_init(int replacing);
|
||||
int is_whole_word(int curr_pos, const char *datastr, const char *searchword);
|
||||
filestruct *findnextstr(int quiet, int bracket_mode,
|
||||
const filestruct *begin, int beginx,
|
||||
const char *needle);
|
||||
int is_whole_word(int curr_pos, const char *datastr, const char
|
||||
*searchword);
|
||||
int findnextstr(int can_display_wrap, int wholeword, const filestruct
|
||||
*begin, size_t beginx, const char *needle, int no_sameline);
|
||||
int do_search(void);
|
||||
int do_research(void);
|
||||
void replace_abort(void);
|
||||
#ifdef HAVE_REGEX_H
|
||||
int replace_regexp(char *string, int create_flag);
|
||||
#endif
|
||||
char *replace_line(void);
|
||||
int do_replace_loop(const char *prevanswer, const filestruct *begin,
|
||||
int *beginx, int wholewords, int *i);
|
||||
char *replace_line(const char *needle);
|
||||
int do_replace_loop(const char *needle, const filestruct *real_current,
|
||||
size_t *real_current_x, int wholewords);
|
||||
int do_replace(void);
|
||||
int do_gotoline(int line, int save_pos);
|
||||
int do_gotoline_void(void);
|
||||
@@ -396,10 +409,13 @@ void save_history(void);
|
||||
#endif
|
||||
|
||||
/* Public functions in utils.c */
|
||||
#ifdef HAVE_REGEX_H
|
||||
#ifdef BROKEN_REGEXEC
|
||||
int regexec_safe(const regex_t *preg, const char *string, size_t nmatch,
|
||||
regmatch_t pmatch[], int eflags);
|
||||
#endif
|
||||
int regexp_bol_or_eol(const regex_t *preg, const char *string);
|
||||
#endif
|
||||
int is_cntrl_char(int c);
|
||||
int num_of_digits(int n);
|
||||
void align(char **strp);
|
||||
@@ -420,7 +436,7 @@ const char *revstristr(const char *haystack, const char *needle,
|
||||
#endif
|
||||
const char *stristr(const char *haystack, const char *needle);
|
||||
const char *strstrwrapper(const char *haystack, const char *needle,
|
||||
const char *rev_start, int line_pos);
|
||||
const char *start);
|
||||
void nperror(const char *s);
|
||||
void *nmalloc(size_t howmuch);
|
||||
void *nrealloc(void *ptr, size_t howmuch);
|
||||
@@ -435,14 +451,16 @@ int check_wildcard_match(const char *text, const char *pattern);
|
||||
#endif
|
||||
|
||||
/* Public functions in winio.c */
|
||||
int get_kbinput(WINDOW *win, int *meta, int rebind_delete);
|
||||
char *get_verbatim_kbinput(WINDOW *win, int *kbinput_len);
|
||||
int get_kbinput(WINDOW *win, int *meta_key);
|
||||
int *get_verbatim_kbinput(WINDOW *win, int *kbinput_len, int
|
||||
allow_ascii);
|
||||
int get_ignored_kbinput(WINDOW *win);
|
||||
int get_accepted_kbinput(WINDOW *win, int kbinput, int *meta,
|
||||
int rebind_delete);
|
||||
int get_accepted_kbinput(WINDOW *win, int kbinput, int *meta_key);
|
||||
int get_ascii_kbinput(WINDOW *win, int kbinput);
|
||||
int get_escape_seq_kbinput(WINDOW *win, int kbinput);
|
||||
int get_skip_tilde_kbinput(WINDOW *win, int errval, int retval);
|
||||
int get_escape_seq_kbinput(WINDOW *win, int *escape_seq, int
|
||||
escape_seq_len);
|
||||
int get_escape_seq_abcd(int kbinput);
|
||||
int get_mouseinput(int *mouse_x, int *mouse_y, int shortcut);
|
||||
int do_first_line(void);
|
||||
int do_last_line(void);
|
||||
int xpt(const filestruct *fileptr, int index);
|
||||
@@ -486,12 +504,12 @@ void center_cursor(void);
|
||||
void edit_refresh(void);
|
||||
void edit_refresh_clearok(void);
|
||||
void edit_update(filestruct *fileptr, topmidnone location);
|
||||
int statusq(int tabs, const shortcut *s, const char *def,
|
||||
int statusq(int allowtabs, const shortcut *s, const char *def,
|
||||
#ifndef NANO_SMALL
|
||||
historyheadtype *history_list,
|
||||
#endif
|
||||
const char *msg, ...);
|
||||
int do_yesno(int all, int leavecursor, const char *msg, ...);
|
||||
int do_yesno(int all, const char *msg);
|
||||
int total_refresh(void);
|
||||
void display_main_list(void);
|
||||
void statusbar(const char *msg, ...);
|
||||
@@ -500,7 +518,6 @@ int do_cursorpos_void(void);
|
||||
int line_len(const char *ptr);
|
||||
int do_help(void);
|
||||
void do_replace_highlight(int highlight_flag, const char *word);
|
||||
void fix_editbot(void);
|
||||
#ifdef DEBUG
|
||||
void dump_buffer(const filestruct *inptr);
|
||||
void dump_buffer_reverse(void);
|
||||
|
||||
29
src/rcfile.c
29
src/rcfile.c
@@ -2,7 +2,7 @@
|
||||
/**************************************************************************
|
||||
* rcfile.c *
|
||||
* *
|
||||
* Copyright (C) 1999-2003 Chris Allegretta *
|
||||
* Copyright (C) 1999-2004 Chris Allegretta *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2, or (at your option) *
|
||||
@@ -41,6 +41,7 @@ const static rcoption rcopts[] = {
|
||||
#ifndef NANO_SMALL
|
||||
{"autoindent", AUTOINDENT},
|
||||
{"backup", BACKUP_FILE},
|
||||
{"backupdir", 0},
|
||||
#endif
|
||||
{"const", CONSTUPDATE},
|
||||
#ifndef NANO_SMALL
|
||||
@@ -145,12 +146,12 @@ char *parse_next_word(char *ptr)
|
||||
return ptr;
|
||||
}
|
||||
|
||||
/* The keywords operatingdir, fill, tabsize, speller, and quotestr take
|
||||
* an argument when set. Among these, operatingdir, speller, and
|
||||
* quotestr have to allow tabs and spaces in the argument. Thus, if the
|
||||
* next word starts with a ", we say it ends with the last " of the line.
|
||||
* Otherwise, the word is interpreted as usual. That is so the arguments
|
||||
* can contain "s too. */
|
||||
/* The keywords operatingdir, backupdir, fill, tabsize, speller, and
|
||||
* quotestr take an argument when set. Among these, operatingdir,
|
||||
* backupdir, speller, and quotestr have to allow tabs and spaces in the
|
||||
* argument. Thus, if the next word starts with a ", we say it ends
|
||||
* with the last " of the line. Otherwise, the word is interpreted as
|
||||
* usual. That is so the arguments can contain "s too. */
|
||||
char *parse_argument(char *ptr)
|
||||
{
|
||||
const char *ptr_bak = ptr;
|
||||
@@ -233,7 +234,7 @@ char *parse_next_regex(char *ptr)
|
||||
if (*ptr == '\0')
|
||||
return NULL;
|
||||
|
||||
/* Null terminate and advance ptr */
|
||||
/* Null terminate and advance ptr. */
|
||||
*ptr++ = '\0';
|
||||
|
||||
while (*ptr == ' ' || *ptr == '\t')
|
||||
@@ -540,6 +541,9 @@ void parse_rcfile(FILE *rcstream)
|
||||
#ifndef DISABLE_JUSTIFY
|
||||
|| !strcasecmp(rcopts[i].name, "quotestr")
|
||||
#endif
|
||||
#ifndef NANO_SMALL
|
||||
|| !strcasecmp(rcopts[i].name, "backupdir")
|
||||
#endif
|
||||
#ifndef DISABLE_SPELLER
|
||||
|| !strcasecmp(rcopts[i].name, "speller")
|
||||
#endif
|
||||
@@ -582,6 +586,11 @@ void parse_rcfile(FILE *rcstream)
|
||||
quotestr = mallocstrcpy(NULL, option);
|
||||
else
|
||||
#endif
|
||||
#ifndef NANO_SMALL
|
||||
if (!strcasecmp(rcopts[i].name, "backupdir"))
|
||||
backup_dir = mallocstrcpy(NULL, option);
|
||||
else
|
||||
#endif
|
||||
#ifndef DISABLE_SPELLER
|
||||
if (!strcasecmp(rcopts[i].name, "speller"))
|
||||
alt_speller = mallocstrcpy(NULL, option);
|
||||
@@ -667,9 +676,9 @@ void do_rcfile(void)
|
||||
if (!ISSET(NO_RCFILE)) {
|
||||
|
||||
#if defined(DISABLE_ROOTWRAP) && !defined(DISABLE_WRAPPING)
|
||||
/* If we've already read $SYSCONFDIR/nanorc (if it's there), we're
|
||||
/* If we've already read SYSCONFDIR/nanorc (if it's there), we're
|
||||
root, and --disable-wrapping-as-root is used, turn wrapping off */
|
||||
if (euid == 0)
|
||||
if (euid == NANO_ROOT_UID)
|
||||
SET(NO_WRAP);
|
||||
#endif
|
||||
if ((rcstream = fopen(nanorc, "r")) == NULL) {
|
||||
|
||||
833
src/search.c
833
src/search.c
File diff suppressed because it is too large
Load Diff
93
src/utils.c
93
src/utils.c
@@ -2,7 +2,7 @@
|
||||
/**************************************************************************
|
||||
* utils.c *
|
||||
* *
|
||||
* Copyright (C) 1999-2003 Chris Allegretta *
|
||||
* Copyright (C) 1999-2004 Chris Allegretta *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2, or (at your option) *
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "proto.h"
|
||||
#include "nano.h"
|
||||
|
||||
#ifdef HAVE_REGEX_H
|
||||
#ifdef BROKEN_REGEXEC
|
||||
#undef regexec
|
||||
int regexec_safe(const regex_t *preg, const char *string, size_t nmatch,
|
||||
@@ -40,7 +41,16 @@ int regexec_safe(const regex_t *preg, const char *string, size_t nmatch,
|
||||
return REG_NOMATCH;
|
||||
}
|
||||
#define regexec(preg, string, nmatch, pmatch, eflags) regexec_safe(preg, string, nmatch, pmatch, eflags)
|
||||
#endif
|
||||
#endif /* BROKEN_REGEXEC */
|
||||
|
||||
/* Assume that string will be found by regexec() if the REG_NOTBOL and
|
||||
* REG_NOTEOL glags are not set. */
|
||||
int regexp_bol_or_eol(const regex_t *preg, const char *string)
|
||||
{
|
||||
return (regexec(preg, string, 0, NULL, REG_NOTBOL | REG_NOTEOL) ==
|
||||
REG_NOMATCH);
|
||||
}
|
||||
#endif /* HAVE_REGEX_H */
|
||||
|
||||
int is_cntrl_char(int c)
|
||||
{
|
||||
@@ -84,9 +94,10 @@ void null_at(char **data, size_t index)
|
||||
void unsunder(char *str, size_t true_len)
|
||||
{
|
||||
assert(str != NULL);
|
||||
for(; true_len > 0; true_len--, str++)
|
||||
for (; true_len > 0; true_len--, str++) {
|
||||
if (*str == '\0')
|
||||
*str = '\n';
|
||||
}
|
||||
}
|
||||
|
||||
/* For non-null-terminated lines. A line, by definition, shouldn't
|
||||
@@ -94,9 +105,10 @@ void unsunder(char *str, size_t true_len)
|
||||
void sunder(char *str)
|
||||
{
|
||||
assert(str != NULL);
|
||||
for(; *str != '\0'; str++)
|
||||
for (; *str != '\0'; str++) {
|
||||
if (*str == '\n')
|
||||
*str = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef HAVE_STRCASECMP
|
||||
@@ -135,7 +147,7 @@ int nstrnicmp(const char *s1, const char *s2, size_t n)
|
||||
const char *revstrstr(const char *haystack, const char *needle,
|
||||
const char *rev_start)
|
||||
{
|
||||
for(; rev_start >= haystack ; rev_start--) {
|
||||
for (; rev_start >= haystack; rev_start--) {
|
||||
const char *r, *q;
|
||||
|
||||
for (r = rev_start, q = needle ; *q == *r && *q != '\0'; r++, q++)
|
||||
@@ -182,29 +194,32 @@ const char *stristr(const char *haystack, const char *needle)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* If we are searching backwards, we will find the last match
|
||||
* that starts no later than rev_start. If we are doing a regexp search,
|
||||
* then line_pos should be 0 if haystack starts at the beginning of a
|
||||
* line, and positive otherwise. In the regexp case, we fill in the
|
||||
* global variable regmatches with at most 9 subexpression matches. Also,
|
||||
* all .rm_so elements are relative to the start of the whole match, so
|
||||
* regmatches[0].rm_so == 0. */
|
||||
/* If we are searching backwards, we will find the last match that
|
||||
* starts no later than start. Otherwise we find the first match
|
||||
* starting no earlier than start. If we are doing a regexp search, we
|
||||
* fill in the global variable regmatches with at most 9 subexpression
|
||||
* matches. Also, all .rm_so elements are relative to the start of the
|
||||
* whole match, so regmatches[0].rm_so == 0. */
|
||||
const char *strstrwrapper(const char *haystack, const char *needle,
|
||||
const char *rev_start, int line_pos)
|
||||
const char *start)
|
||||
{
|
||||
/* start can be 1 character before the start or after the end of the
|
||||
* line. In either case, we just say there is no match found. */
|
||||
if ((start > haystack && *(start - 1) == '\0') || start < haystack)
|
||||
return NULL;
|
||||
assert(haystack != NULL && needle != NULL && start != NULL);
|
||||
#ifdef HAVE_REGEX_H
|
||||
if (ISSET(USE_REGEXP)) {
|
||||
#ifndef NANO_SMALL
|
||||
if (ISSET(REVERSE_SEARCH)) {
|
||||
/* When doing a backwards search, haystack is a whole line. */
|
||||
if (!regexec(&search_regexp, haystack, 1, regmatches, 0) &&
|
||||
haystack + regmatches[0].rm_so <= rev_start) {
|
||||
if (regexec(&search_regexp, haystack, 1, regmatches, 0) == 0
|
||||
&& haystack + regmatches[0].rm_so <= start) {
|
||||
const char *retval = haystack + regmatches[0].rm_so;
|
||||
|
||||
/* Search forward until there is no more match. */
|
||||
while (!regexec(&search_regexp, retval + 1, 1, regmatches,
|
||||
REG_NOTBOL) &&
|
||||
retval + 1 + regmatches[0].rm_so <= rev_start)
|
||||
while (regexec(&search_regexp, retval + 1, 1, regmatches,
|
||||
REG_NOTBOL) == 0 && retval + 1 +
|
||||
regmatches[0].rm_so <= start)
|
||||
retval += 1 + regmatches[0].rm_so;
|
||||
/* Finally, put the subexpression matches in global
|
||||
* variable regmatches. The REG_NOTBOL flag doesn't
|
||||
@@ -214,9 +229,9 @@ const char *strstrwrapper(const char *haystack, const char *needle,
|
||||
}
|
||||
} else
|
||||
#endif /* !NANO_SMALL */
|
||||
if (!regexec(&search_regexp, haystack, 10, regmatches,
|
||||
line_pos > 0 ? REG_NOTBOL : 0)) {
|
||||
const char *retval = haystack + regmatches[0].rm_so;
|
||||
if (regexec(&search_regexp, start, 10, regmatches,
|
||||
start > haystack ? REG_NOTBOL : 0) == 0) {
|
||||
const char *retval = start + regmatches[0].rm_so;
|
||||
|
||||
regexec(&search_regexp, retval, 10, regmatches, 0);
|
||||
return retval;
|
||||
@@ -224,21 +239,26 @@ const char *strstrwrapper(const char *haystack, const char *needle,
|
||||
return NULL;
|
||||
}
|
||||
#endif /* HAVE_REGEX_H */
|
||||
#ifndef NANO_SMALL
|
||||
#if !defined(DISABLE_SPELLER) || !defined(NANO_SMALL)
|
||||
if (ISSET(CASE_SENSITIVE)) {
|
||||
#ifndef NANO_SMALL
|
||||
if (ISSET(REVERSE_SEARCH))
|
||||
return revstrstr(haystack, needle, rev_start);
|
||||
return revstrstr(haystack, needle, start);
|
||||
else
|
||||
return strstr(haystack, needle);
|
||||
} else if (ISSET(REVERSE_SEARCH))
|
||||
return revstristr(haystack, needle, rev_start);
|
||||
#endif
|
||||
return stristr(haystack, needle);
|
||||
return strstr(start, needle);
|
||||
}
|
||||
#endif /* !DISABLE_SPELLER || !NANO_SMALL */
|
||||
#ifndef NANO_SMALL
|
||||
else if (ISSET(REVERSE_SEARCH))
|
||||
return revstristr(haystack, needle, start);
|
||||
#endif
|
||||
return stristr(start, needle);
|
||||
}
|
||||
|
||||
/* This is a wrapper for the perror function. The wrapper takes care of
|
||||
* ncurses, calls perror (which writes to STDERR), then refreshes the
|
||||
* screen. Note that nperror causes the window to flicker once. */
|
||||
/* This is a wrapper for the perror() function. The wrapper takes care
|
||||
* of ncurses, calls perror (which writes to stderr), then refreshes the
|
||||
* screen. Note that nperror() causes the window to flicker once. */
|
||||
void nperror(const char *s)
|
||||
{
|
||||
/* leave ncurses mode, go to the terminal */
|
||||
@@ -273,14 +293,11 @@ void *nrealloc(void *ptr, size_t howmuch)
|
||||
* dest = mallocstrcpy(dest, src); */
|
||||
char *mallocstrcpy(char *dest, const char *src)
|
||||
{
|
||||
if (src == dest)
|
||||
return dest;
|
||||
|
||||
if (dest != NULL)
|
||||
free(dest);
|
||||
|
||||
if (src == NULL)
|
||||
return NULL;
|
||||
src = "";
|
||||
|
||||
if (src != dest)
|
||||
free(dest);
|
||||
|
||||
dest = charalloc(strlen(src) + 1);
|
||||
strcpy(dest, src);
|
||||
|
||||
868
src/winio.c
868
src/winio.c
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user