mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-25 06:09:38 +03:00
Replace with null string option, ran source through indent again
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@243 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
a0e957bc0d
commit
bd9e7c3c36
2
BUGS
2
BUGS
@ -2,6 +2,7 @@
|
|||||||
certain col values. (9) [FIXED]
|
certain col values. (9) [FIXED]
|
||||||
- edit_refresh() and update_line() do not handle selecting text when the
|
- edit_refresh() and update_line() do not handle selecting text when the
|
||||||
cursor is beyond COLS (10) [FIXED]
|
cursor is beyond COLS (10) [FIXED]
|
||||||
|
- no way to do a replace with the empty string (11). [FIXED, yay!]
|
||||||
- Moving to the end of a line when close to a multiple of COLS and at
|
- Moving to the end of a line when close to a multiple of COLS and at
|
||||||
least COLS * 2 does not make the screen jump early like it would for
|
least COLS * 2 does not make the screen jump early like it would for
|
||||||
if we were around COLS (bugs in edit_refresh, update_line) (13)
|
if we were around COLS (bugs in edit_refresh, update_line) (13)
|
||||||
@ -70,7 +71,6 @@
|
|||||||
- Marked cutting sometimes leaves a newline in the file unintelligently,
|
- Marked cutting sometimes leaves a newline in the file unintelligently,
|
||||||
such as when all of a line is selected but the mark doesn't proceed to
|
such as when all of a line is selected but the mark doesn't proceed to
|
||||||
the new line. (8) { Is this an issue? compare to pico 3.5 }
|
the new line. (8) { Is this an issue? compare to pico 3.5 }
|
||||||
- no way to do a replace with the empty string (11).
|
|
||||||
- Spelling support is not elegant like pico's integration of the 'spell'
|
- Spelling support is not elegant like pico's integration of the 'spell'
|
||||||
program. Nano only uses ispell (for now) (12).
|
program. Nano only uses ispell (for now) (12).
|
||||||
- In replace, there is no way to accept the default replace string. (27)
|
- In replace, there is no way to accept the default replace string. (27)
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
CVS Code -
|
CVS Code -
|
||||||
|
- Ran source through indent -kr again. Make everything pretty.
|
||||||
|
- Added "replace with null" option. ^N in replace. New alias
|
||||||
|
NANO_NULL_KEY, and code in do_replace to check for it.
|
||||||
- global.c
|
- global.c
|
||||||
toggle_init()
|
toggle_init()
|
||||||
- Added #ifdef around toggle_regex_msg to get rid of compiler
|
- Added #ifdef around toggle_regex_msg to get rid of compiler
|
||||||
|
11
cut.c
11
cut.c
@ -157,15 +157,12 @@ int do_cut_text(void)
|
|||||||
|
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
if (ISSET(CUT_TO_END) && !ISSET(MARK_ISSET)) {
|
if (ISSET(CUT_TO_END) && !ISSET(MARK_ISSET)) {
|
||||||
if (current_x == strlen(current->data))
|
if (current_x == strlen(current->data)) {
|
||||||
{
|
|
||||||
do_delete();
|
do_delete();
|
||||||
SET(KEEP_CUTBUFFER);
|
SET(KEEP_CUTBUFFER);
|
||||||
marked_cut = 2;
|
marked_cut = 2;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
SET(MARK_ISSET);
|
SET(MARK_ISSET);
|
||||||
SET(KEEP_CUTBUFFER);
|
SET(KEEP_CUTBUFFER);
|
||||||
|
|
||||||
@ -248,9 +245,9 @@ int do_cut_text(void)
|
|||||||
current = fileptr->next;
|
current = fileptr->next;
|
||||||
totlines--;
|
totlines--;
|
||||||
totsize--; /* get the newline */
|
totsize--; /* get the newline */
|
||||||
} /* No longer an else here, because we never get here anymore...
|
}
|
||||||
|
/* No longer an else here, because we never get here anymore...
|
||||||
No need to cut the magic line, as it's empty */
|
No need to cut the magic line, as it's empty */
|
||||||
|
|
||||||
add_to_cutbuffer(fileptr);
|
add_to_cutbuffer(fileptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
10
files.c
10
files.c
@ -346,7 +346,8 @@ int write_file(char *name, int tmp)
|
|||||||
dump_buffer(fileage);
|
dump_buffer(fileage);
|
||||||
while (fileptr != NULL && fileptr->next != NULL) {
|
while (fileptr != NULL && fileptr->next != NULL) {
|
||||||
/* Next line is so we discount the "magic line" */
|
/* Next line is so we discount the "magic line" */
|
||||||
if(filebot == fileptr && fileptr->data[0] == '\0') break;
|
if (filebot == fileptr && fileptr->data[0] == '\0')
|
||||||
|
break;
|
||||||
|
|
||||||
size = write(fd, fileptr->data, strlen(fileptr->data));
|
size = write(fd, fileptr->data, strlen(fileptr->data));
|
||||||
if (size == -1) {
|
if (size == -1) {
|
||||||
@ -446,14 +447,11 @@ int do_writeout(int exiting)
|
|||||||
strncpy(answer, filename, 132);
|
strncpy(answer, filename, 132);
|
||||||
|
|
||||||
if ((exiting) && (ISSET(TEMP_OPT))) {
|
if ((exiting) && (ISSET(TEMP_OPT))) {
|
||||||
if (filename[0])
|
if (filename[0]) {
|
||||||
{
|
|
||||||
i = write_file(answer, 0);
|
i = write_file(answer, 0);
|
||||||
display_main_list();
|
display_main_list();
|
||||||
return i;
|
return i;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
UNSET(TEMP_OPT);
|
UNSET(TEMP_OPT);
|
||||||
do_exit();
|
do_exit();
|
||||||
|
|
||||||
|
22
global.c
22
global.c
@ -134,8 +134,8 @@ void toggle_init(void)
|
|||||||
|
|
||||||
toggle_init_one(&toggles[0], TOGGLE_CONST_KEY, toggle_const_msg,
|
toggle_init_one(&toggles[0], TOGGLE_CONST_KEY, toggle_const_msg,
|
||||||
CONSTUPDATE);
|
CONSTUPDATE);
|
||||||
toggle_init_one(&toggles[1], TOGGLE_AUTOINDENT_KEY, toggle_autoindent_msg,
|
toggle_init_one(&toggles[1], TOGGLE_AUTOINDENT_KEY,
|
||||||
AUTOINDENT);
|
toggle_autoindent_msg, AUTOINDENT);
|
||||||
toggle_init_one(&toggles[2], TOGGLE_SUSPEND_KEY, toggle_suspend_msg,
|
toggle_init_one(&toggles[2], TOGGLE_SUSPEND_KEY, toggle_suspend_msg,
|
||||||
SUSPEND);
|
SUSPEND);
|
||||||
toggle_init_one(&toggles[3], TOGGLE_NOHELP_KEY, toggle_nohelp_msg,
|
toggle_init_one(&toggles[3], TOGGLE_NOHELP_KEY, toggle_nohelp_msg,
|
||||||
@ -169,7 +169,7 @@ void shortcut_init(void)
|
|||||||
"", *nano_mark_msg = "", *nano_delete_msg =
|
"", *nano_mark_msg = "", *nano_delete_msg =
|
||||||
"", *nano_backspace_msg = "", *nano_tab_msg =
|
"", *nano_backspace_msg = "", *nano_tab_msg =
|
||||||
"", *nano_enter_msg = "", *nano_case_msg =
|
"", *nano_enter_msg = "", *nano_case_msg =
|
||||||
"", *nano_cancel_msg = "";
|
"", *nano_cancel_msg = "", *nano_null_msg = "";
|
||||||
|
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
nano_help_msg = _("Invoke the help menu");
|
nano_help_msg = _("Invoke the help menu");
|
||||||
@ -204,6 +204,7 @@ void shortcut_init(void)
|
|||||||
nano_case_msg =
|
nano_case_msg =
|
||||||
_("Make the current search or replace case (in)sensitive");
|
_("Make the current search or replace case (in)sensitive");
|
||||||
nano_cancel_msg = _("Cancel the current function");
|
nano_cancel_msg = _("Cancel the current function");
|
||||||
|
nano_null_msg = _("Use the null string, \"\"");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ISSET(PICO_MSGS))
|
if (ISSET(PICO_MSGS))
|
||||||
@ -336,8 +337,9 @@ void shortcut_init(void)
|
|||||||
sc_init_one(&whereis_list[3], NANO_OTHERSEARCH_KEY, _("Replace"),
|
sc_init_one(&whereis_list[3], NANO_OTHERSEARCH_KEY, _("Replace"),
|
||||||
nano_replace_msg, 0, 0, 0, VIEW, do_replace);
|
nano_replace_msg, 0, 0, 0, VIEW, do_replace);
|
||||||
|
|
||||||
sc_init_one(&whereis_list[4], NANO_FROMSEARCHTOGOTO_KEY, _("Goto Line"),
|
sc_init_one(&whereis_list[4], NANO_FROMSEARCHTOGOTO_KEY,
|
||||||
nano_goto_msg, 0, 0, 0, VIEW, do_gotoline_void);
|
_("Goto Line"), nano_goto_msg, 0, 0, 0, VIEW,
|
||||||
|
do_gotoline_void);
|
||||||
|
|
||||||
sc_init_one(&whereis_list[5], NANO_CANCEL_KEY, _("Cancel"),
|
sc_init_one(&whereis_list[5], NANO_CANCEL_KEY, _("Cancel"),
|
||||||
nano_cancel_msg, 0, 0, 0, VIEW, 0);
|
nano_cancel_msg, 0, 0, 0, VIEW, 0);
|
||||||
@ -355,10 +357,14 @@ void shortcut_init(void)
|
|||||||
sc_init_one(&replace_list[3], NANO_OTHERSEARCH_KEY, _("No Replace"),
|
sc_init_one(&replace_list[3], NANO_OTHERSEARCH_KEY, _("No Replace"),
|
||||||
nano_whereis_msg, 0, 0, 0, VIEW, do_search);
|
nano_whereis_msg, 0, 0, 0, VIEW, do_search);
|
||||||
|
|
||||||
sc_init_one(&replace_list[4], NANO_FROMSEARCHTOGOTO_KEY, _("Goto Line"),
|
sc_init_one(&replace_list[4], NANO_FROMSEARCHTOGOTO_KEY,
|
||||||
nano_goto_msg, 0, 0, 0, VIEW, do_gotoline_void);
|
_("Goto Line"), nano_goto_msg, 0, 0, 0, VIEW,
|
||||||
|
do_gotoline_void);
|
||||||
|
|
||||||
sc_init_one(&replace_list[5], NANO_CANCEL_KEY, _("Cancel"),
|
sc_init_one(&replace_list[5], NANO_NULL_KEY, _("Null Str"),
|
||||||
|
nano_null_msg, 0, 0, 0, VIEW, 0);
|
||||||
|
|
||||||
|
sc_init_one(&replace_list[6], NANO_CANCEL_KEY, _("Cancel"),
|
||||||
nano_cancel_msg, 0, 0, 0, VIEW, 0);
|
nano_cancel_msg, 0, 0, 0, VIEW, 0);
|
||||||
|
|
||||||
|
|
||||||
|
61
nano.c
61
nano.c
@ -95,12 +95,12 @@ void die(char *msg, ...)
|
|||||||
|
|
||||||
/* if we can't save we have REAL bad problems,
|
/* if we can't save we have REAL bad problems,
|
||||||
* but we might as well TRY. */
|
* but we might as well TRY. */
|
||||||
if(filename[0] == '\0') {
|
if (filename[0] == '\0') {
|
||||||
write_file("nano.save", 0);
|
write_file("nano.save", 0);
|
||||||
} else {
|
} else {
|
||||||
char buf[BUFSIZ];
|
char buf[BUFSIZ];
|
||||||
strncpy(buf,filename,BUFSIZ);
|
strncpy(buf, filename, BUFSIZ);
|
||||||
strncat(buf,".save",BUFSIZ - strlen(buf));
|
strncat(buf, ".save", BUFSIZ - strlen(buf));
|
||||||
write_file(buf, 0);
|
write_file(buf, 0);
|
||||||
}
|
}
|
||||||
/* Restore the old term settings */
|
/* Restore the old term settings */
|
||||||
@ -399,7 +399,8 @@ void version(void)
|
|||||||
{
|
{
|
||||||
printf(_(" nano version %s by Chris Allegretta (compiled %s, %s)\n"),
|
printf(_(" nano version %s by Chris Allegretta (compiled %s, %s)\n"),
|
||||||
VERSION, __TIME__, __DATE__);
|
VERSION, __TIME__, __DATE__);
|
||||||
printf(_(" Email: nano@nano-editor.org Web: http://www.nano-editor.org\n"));
|
printf(_
|
||||||
|
(" Email: nano@nano-editor.org Web: http://www.nano-editor.org\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
filestruct *make_new_node(filestruct * prevnode)
|
filestruct *make_new_node(filestruct * prevnode)
|
||||||
@ -419,7 +420,7 @@ filestruct *make_new_node(filestruct * prevnode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Splice a node into an existing filestruct */
|
/* Splice a node into an existing filestruct */
|
||||||
void splice_node(filestruct *begin, filestruct *new, filestruct *end)
|
void splice_node(filestruct * begin, filestruct * new, filestruct * end)
|
||||||
{
|
{
|
||||||
new->next = end;
|
new->next = end;
|
||||||
new->prev = begin;
|
new->prev = begin;
|
||||||
@ -469,7 +470,7 @@ void do_char(char ch)
|
|||||||
{
|
{
|
||||||
/* magic-line: when a character is inserted on the current magic line,
|
/* magic-line: when a character is inserted on the current magic line,
|
||||||
* it means we need a new one! */
|
* it means we need a new one! */
|
||||||
if(filebot == current && current->data[0] == '\0') {
|
if (filebot == current && current->data[0] == '\0') {
|
||||||
new_magicline();
|
new_magicline();
|
||||||
fix_editbot();
|
fix_editbot();
|
||||||
}
|
}
|
||||||
@ -763,7 +764,8 @@ void do_wrap(filestruct * inptr, char input_char)
|
|||||||
|
|
||||||
right = current_x - current_word_start;
|
right = current_x - current_word_start;
|
||||||
i = current_word_start - 1;
|
i = current_word_start - 1;
|
||||||
if (isspace((int)input_char) && (current_x == current_word_start)) {
|
if (isspace((int) input_char)
|
||||||
|
&& (current_x == current_word_start)) {
|
||||||
current_x = current_word_start;
|
current_x = current_word_start;
|
||||||
|
|
||||||
null_at(inptr->data, current_word_start);
|
null_at(inptr->data, current_word_start);
|
||||||
@ -877,7 +879,7 @@ void check_wrap(filestruct * inptr, char ch)
|
|||||||
/* Do not wrap if there are no words on or after wrap point. */
|
/* Do not wrap if there are no words on or after wrap point. */
|
||||||
int char_found = 0;
|
int char_found = 0;
|
||||||
|
|
||||||
while (isspace((int)inptr->data[i]) && inptr->data[i])
|
while (isspace((int) inptr->data[i]) && inptr->data[i])
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
if (!inptr->data[i])
|
if (!inptr->data[i])
|
||||||
@ -1010,8 +1012,7 @@ int do_delete(void)
|
|||||||
|
|
||||||
/* Please see the comment in do_basckspace if you don't understand
|
/* Please see the comment in do_basckspace if you don't understand
|
||||||
this test */
|
this test */
|
||||||
if (current == filebot && strcmp(current->data, ""))
|
if (current == filebot && strcmp(current->data, "")) {
|
||||||
{
|
|
||||||
new_magicline();
|
new_magicline();
|
||||||
fix_editbot();
|
fix_editbot();
|
||||||
totsize++;
|
totsize++;
|
||||||
@ -1185,20 +1186,19 @@ void do_mouse(void)
|
|||||||
}
|
}
|
||||||
current_x = mevent.x;
|
current_x = mevent.x;
|
||||||
placewewant = current_x;
|
placewewant = current_x;
|
||||||
while(foo < current_x) {
|
while (foo < current_x) {
|
||||||
if(current->data[foo] == NANO_CONTROL_I) {
|
if (current->data[foo] == NANO_CONTROL_I) {
|
||||||
current_x -= tabsize - (foo % tabsize);
|
current_x -= tabsize - (foo % tabsize);
|
||||||
tab_found = 1;
|
tab_found = 1;
|
||||||
} else if(current->data[foo] & 0x80)
|
} else if (current->data[foo] & 0x80);
|
||||||
;
|
else if (current->data[foo] < 32)
|
||||||
else if(current->data[foo] < 32)
|
|
||||||
current_x--;
|
current_x--;
|
||||||
foo++;
|
foo++;
|
||||||
}
|
}
|
||||||
/* This is where tab_found comes in. I can't figure out why,
|
/* This is where tab_found comes in. I can't figure out why,
|
||||||
* but without it any line with a tab will place the cursor
|
* but without it any line with a tab will place the cursor
|
||||||
* one character behind. Whatever, this fixes it. */
|
* one character behind. Whatever, this fixes it. */
|
||||||
if(tab_found == 1)
|
if (tab_found == 1)
|
||||||
current_x++;
|
current_x++;
|
||||||
|
|
||||||
if (current_x > strlen(current->data))
|
if (current_x > strlen(current->data))
|
||||||
@ -1227,7 +1227,7 @@ RETSIGTYPE do_suspend(int signal)
|
|||||||
sigaction(SIGTSTP, &act, NULL);
|
sigaction(SIGTSTP, &act, NULL);
|
||||||
|
|
||||||
endwin();
|
endwin();
|
||||||
fprintf(stderr,"\n\n\n\n\nUse \"fg\" to return to nano\n");
|
fprintf(stderr, "\n\n\n\n\nUse \"fg\" to return to nano\n");
|
||||||
raise(SIGTSTP);
|
raise(SIGTSTP);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1321,14 +1321,12 @@ void signal_init(void)
|
|||||||
|
|
||||||
if (!ISSET(SUSPEND)) {
|
if (!ISSET(SUSPEND)) {
|
||||||
sigaction(SIGTSTP, &act, NULL);
|
sigaction(SIGTSTP, &act, NULL);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
act.sa_handler = do_suspend;
|
act.sa_handler = do_suspend;
|
||||||
sigaction(SIGTSTP, &act, NULL);
|
sigaction(SIGTSTP, &act, NULL);
|
||||||
|
|
||||||
act.sa_handler = do_cont;
|
act.sa_handler = do_cont;
|
||||||
sigaction (SIGCONT, &act, NULL);
|
sigaction(SIGCONT, &act, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1350,8 +1348,7 @@ void window_init(void)
|
|||||||
|
|
||||||
/* And the other windows */
|
/* And the other windows */
|
||||||
topwin = newwin(2, COLS, 0, 0);
|
topwin = newwin(2, COLS, 0, 0);
|
||||||
bottomwin = newwin(3 - no_help(), COLS, LINES - 3 + no_help(), 0);\
|
bottomwin = newwin(3 - no_help(), COLS, LINES - 3 + no_help(), 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void mouse_init(void)
|
void mouse_init(void)
|
||||||
@ -1365,8 +1362,7 @@ void mouse_init(void)
|
|||||||
mousemask(BUTTON1_RELEASED, NULL);
|
mousemask(BUTTON1_RELEASED, NULL);
|
||||||
mouseinterval(50);
|
mouseinterval(50);
|
||||||
|
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
mousemask(0, NULL);
|
mousemask(0, NULL);
|
||||||
keypad(edit, FALSE);
|
keypad(edit, FALSE);
|
||||||
keypad(bottomwin, FALSE);
|
keypad(bottomwin, FALSE);
|
||||||
@ -1500,7 +1496,7 @@ int do_justify(void)
|
|||||||
slen = strlen(current->data);
|
slen = strlen(current->data);
|
||||||
totsize += slen;
|
totsize += slen;
|
||||||
|
|
||||||
if((strlenpt(current->data) > (fill))
|
if ((strlenpt(current->data) > (fill))
|
||||||
&& !no_spaces(current->data)) {
|
&& !no_spaces(current->data)) {
|
||||||
do {
|
do {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
@ -1516,8 +1512,9 @@ int do_justify(void)
|
|||||||
i = slen;
|
i = slen;
|
||||||
for (; i > 0; i--) {
|
for (; i > 0; i--) {
|
||||||
if (isspace((int) current->data[i]) &&
|
if (isspace((int) current->data[i]) &&
|
||||||
((strlenpt(current->data) - strlen(current->data +i)) <=
|
((strlenpt(current->data) - strlen(current->data + i))
|
||||||
fill)) break;
|
<= fill))
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (!i)
|
if (!i)
|
||||||
break;
|
break;
|
||||||
@ -1632,7 +1629,7 @@ void help_init(void)
|
|||||||
/* And the toggles... */
|
/* And the toggles... */
|
||||||
for (i = 0; i <= TOGGLE_LEN - 1; i++) {
|
for (i = 0; i <= TOGGLE_LEN - 1; i++) {
|
||||||
sofar = snprintf(buf, BUFSIZ,
|
sofar = snprintf(buf, BUFSIZ,
|
||||||
"M-%c ", toggles[i].val - 32 );
|
"M-%c ", toggles[i].val - 32);
|
||||||
|
|
||||||
if (toggles[i].desc != NULL)
|
if (toggles[i].desc != NULL)
|
||||||
snprintf(&buf[sofar], BUFSIZ - sofar, _("%s enable/disable"),
|
snprintf(&buf[sofar], BUFSIZ - sofar, _("%s enable/disable"),
|
||||||
@ -1946,12 +1943,10 @@ int main(int argc, char *argv[])
|
|||||||
if (kbinput >= '1' && kbinput <= '5') {
|
if (kbinput >= '1' && kbinput <= '5') {
|
||||||
kbinput = KEY_F(kbinput - 48);
|
kbinput = KEY_F(kbinput - 48);
|
||||||
wgetch(edit);
|
wgetch(edit);
|
||||||
}
|
} else if (kbinput >= '7' && kbinput <= '9') {
|
||||||
else if (kbinput >= '7' && kbinput <= '9') {
|
|
||||||
kbinput = KEY_F(kbinput - 49);
|
kbinput = KEY_F(kbinput - 49);
|
||||||
wgetch(edit);
|
wgetch(edit);
|
||||||
}
|
} else if (kbinput == 126)
|
||||||
else if (kbinput == 126)
|
|
||||||
kbinput = KEY_HOME;
|
kbinput = KEY_HOME;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
3
nano.h
3
nano.h
@ -225,6 +225,7 @@ know what you're doing */
|
|||||||
#define NANO_SUSPEND_KEY NANO_CONTROL_Z
|
#define NANO_SUSPEND_KEY NANO_CONTROL_Z
|
||||||
#define NANO_ENTER_KEY NANO_CONTROL_M
|
#define NANO_ENTER_KEY NANO_CONTROL_M
|
||||||
#define NANO_FROMSEARCHTOGOTO_KEY NANO_CONTROL_T
|
#define NANO_FROMSEARCHTOGOTO_KEY NANO_CONTROL_T
|
||||||
|
#define NANO_NULL_KEY NANO_CONTROL_N
|
||||||
|
|
||||||
#define TOGGLE_CONST_KEY NANO_ALT_C
|
#define TOGGLE_CONST_KEY NANO_ALT_C
|
||||||
#define TOGGLE_AUTOINDENT_KEY NANO_ALT_I
|
#define TOGGLE_AUTOINDENT_KEY NANO_ALT_I
|
||||||
@ -239,7 +240,7 @@ know what you're doing */
|
|||||||
#define MAIN_LIST_LEN 26
|
#define MAIN_LIST_LEN 26
|
||||||
#define MAIN_VISIBLE 12
|
#define MAIN_VISIBLE 12
|
||||||
#define WHEREIS_LIST_LEN 6
|
#define WHEREIS_LIST_LEN 6
|
||||||
#define REPLACE_LIST_LEN 6
|
#define REPLACE_LIST_LEN 7
|
||||||
#define GOTO_LIST_LEN 3
|
#define GOTO_LIST_LEN 3
|
||||||
#define WRITEFILE_LIST_LEN 1
|
#define WRITEFILE_LIST_LEN 1
|
||||||
#define HELP_LIST_LEN 3
|
#define HELP_LIST_LEN 3
|
||||||
|
283
po/cat-id-tbl.c
283
po/cat-id-tbl.c
@ -67,41 +67,43 @@ const struct _msg_ent _msg_tbl[] = {
|
|||||||
{"Insert a carriage return at the cursor position", 58},
|
{"Insert a carriage return at the cursor position", 58},
|
||||||
{"Make the current search or replace case (in)sensitive", 59},
|
{"Make the current search or replace case (in)sensitive", 59},
|
||||||
{"Cancel the current function", 60},
|
{"Cancel the current function", 60},
|
||||||
{"Get Help", 61},
|
{"Use the null string, \"\"", 61},
|
||||||
{"WriteOut", 62},
|
{"Get Help", 62},
|
||||||
{"Exit", 63},
|
{"WriteOut", 63},
|
||||||
{"Goto Line", 64},
|
{"Exit", 64},
|
||||||
{"Justify", 65},
|
{"Goto Line", 65},
|
||||||
{"Replace", 66},
|
{"Justify", 66},
|
||||||
{"Read File", 67},
|
{"Replace", 67},
|
||||||
{"Where Is", 68},
|
{"Read File", 68},
|
||||||
{"Prev Page", 69},
|
{"Where Is", 69},
|
||||||
{"Next Page", 70},
|
{"Prev Page", 70},
|
||||||
{"Cut Text", 71},
|
{"Next Page", 71},
|
||||||
{"UnCut Txt", 72},
|
{"Cut Text", 72},
|
||||||
{"Cur Pos", 73},
|
{"UnCut Txt", 73},
|
||||||
{"To Spell", 74},
|
{"Cur Pos", 74},
|
||||||
{"Up", 75},
|
{"To Spell", 75},
|
||||||
{"Down", 76},
|
{"Up", 76},
|
||||||
{"Forward", 77},
|
{"Down", 77},
|
||||||
{"Back", 78},
|
{"Forward", 78},
|
||||||
{"Home", 79},
|
{"Back", 79},
|
||||||
{"End", 80},
|
{"Home", 80},
|
||||||
{"Refresh", 81},
|
{"End", 81},
|
||||||
{"Mark Text", 82},
|
{"Refresh", 82},
|
||||||
{"Delete", 83},
|
{"Mark Text", 83},
|
||||||
{"Backspace", 84},
|
{"Delete", 84},
|
||||||
{"Tab", 85},
|
{"Backspace", 85},
|
||||||
{"Enter", 86},
|
{"Tab", 86},
|
||||||
{"First Line", 87},
|
{"Enter", 87},
|
||||||
{"Last Line", 88},
|
{"First Line", 88},
|
||||||
{"Case Sens", 89},
|
{"Last Line", 89},
|
||||||
{"Cancel", 90},
|
{"Case Sens", 90},
|
||||||
{"No Replace", 91},
|
{"Cancel", 91},
|
||||||
|
{"No Replace", 92},
|
||||||
|
{"Null Str", 93},
|
||||||
{"\
|
{"\
|
||||||
\n\
|
\n\
|
||||||
Buffer written to 'nano.save'\n", 92},
|
Buffer written to 'nano.save'\n", 94},
|
||||||
{"Key illegal in VIEW mode", 93},
|
{"Key illegal in VIEW mode", 95},
|
||||||
{"\
|
{"\
|
||||||
nano help text\n\
|
nano help text\n\
|
||||||
\n\
|
\n\
|
||||||
@ -119,117 +121,118 @@ 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 \
|
using either the Esc, Alt or Meta key depending on your keyboard setup. The \
|
||||||
following keystrokes are available in the main editor window. Optional keys \
|
following keystrokes are available in the main editor window. Optional keys \
|
||||||
are shown in parentheses:\n\
|
are shown in parentheses:\n\
|
||||||
\n", 94},
|
\n", 96},
|
||||||
{"free_node(): free'd a node, YAY!\n", 95},
|
{"free_node(): free'd a node, YAY!\n", 97},
|
||||||
{"free_node(): free'd last node.\n", 96},
|
{"free_node(): free'd last node.\n", 98},
|
||||||
{"\
|
{"\
|
||||||
Usage: nano [GNU long option] [option] +LINE <file>\n\
|
Usage: nano [GNU long option] [option] +LINE <file>\n\
|
||||||
\n", 97},
|
\n", 99},
|
||||||
{"Option\t\tLong option\t\tMeaning\n", 98},
|
{"Option\t\tLong option\t\tMeaning\n", 100},
|
||||||
{" -T \t\t--tabsize=[num]\t\tSet width of a tab to num\n", 99},
|
{" -T \t\t--tabsize=[num]\t\tSet width of a tab to num\n", 101},
|
||||||
{" -R\t\t--regexp\t\tUse regular expressions for search\n", 100},
|
{" -R\t\t--regexp\t\tUse regular expressions for search\n", 102},
|
||||||
{" -V \t\t--version\t\tPrint version information and exit\n", 101},
|
{" -V \t\t--version\t\tPrint version information and exit\n", 103},
|
||||||
{" -c \t\t--const\t\t\tConstantly show cursor position\n", 102},
|
{" -c \t\t--const\t\t\tConstantly show cursor position\n", 104},
|
||||||
{" -h \t\t--help\t\t\tShow this message\n", 103},
|
{" -h \t\t--help\t\t\tShow this message\n", 105},
|
||||||
{" -k \t\t--cut\t\t\tLet ^K cut from cursor to end of line\n", 104},
|
{" -k \t\t--cut\t\t\tLet ^K cut from cursor to end of line\n", 106},
|
||||||
{" -i \t\t--autoindent\t\tAutomatically indent new lines\n", 105},
|
{" -i \t\t--autoindent\t\tAutomatically indent new lines\n", 107},
|
||||||
{" -l \t\t--nofollow\t\tDon't follow symbolic links, overwrite\n", 106},
|
{" -l \t\t--nofollow\t\tDon't follow symbolic links, overwrite\n", 108},
|
||||||
{" -m \t\t--mouse\t\t\tEnable mouse\n", 107},
|
{" -m \t\t--mouse\t\t\tEnable mouse\n", 109},
|
||||||
{"\
|
{"\
|
||||||
-r [#cols] \t--fill=[#cols]\t\tSet fill cols to (wrap lines at) #cols\n", 108},
|
-r [#cols] \t--fill=[#cols]\t\tSet fill cols to (wrap lines at) #cols\n", 110},
|
||||||
{" -p\t \t--pico\t\t\tMake bottom 2 lines more Pico-like\n", 109},
|
{" -p\t \t--pico\t\t\tMake bottom 2 lines more Pico-like\n", 111},
|
||||||
{" -s [prog] \t--speller=[prog]\tEnable alternate speller\n", 110},
|
{" -s [prog] \t--speller=[prog]\tEnable alternate speller\n", 112},
|
||||||
{" -t \t\t--tempfile\t\tAuto save on exit, don't prompt\n", 111},
|
{" -t \t\t--tempfile\t\tAuto save on exit, don't prompt\n", 113},
|
||||||
{" -v \t\t--view\t\t\tView (read only) mode\n", 112},
|
{" -v \t\t--view\t\t\tView (read only) mode\n", 114},
|
||||||
{" -w \t\t--nowrap\t\tDon't wrap long lines\n", 113},
|
{" -w \t\t--nowrap\t\tDon't wrap long lines\n", 115},
|
||||||
{" -x \t\t--nohelp\t\tDon't show help window\n", 114},
|
{" -x \t\t--nohelp\t\tDon't show help window\n", 116},
|
||||||
{" -z \t\t--suspend\t\tEnable suspend\n", 115},
|
{" -z \t\t--suspend\t\tEnable suspend\n", 117},
|
||||||
{" +LINE\t\t\t\t\tStart at line number LINE\n", 116},
|
{" +LINE\t\t\t\t\tStart at line number LINE\n", 118},
|
||||||
{"\
|
{"\
|
||||||
Usage: nano [option] +LINE <file>\n\
|
Usage: nano [option] +LINE <file>\n\
|
||||||
\n", 117},
|
\n", 119},
|
||||||
{"Option\t\tMeaning\n", 118},
|
{"Option\t\tMeaning\n", 120},
|
||||||
{" -T [num]\tSet width of a tab to num\n", 119},
|
{" -T [num]\tSet width of a tab to num\n", 121},
|
||||||
{" -R\t\tUse regular expressions for search\n", 120},
|
{" -R\t\tUse regular expressions for search\n", 122},
|
||||||
{" -V \t\tPrint version information and exit\n", 121},
|
{" -V \t\tPrint version information and exit\n", 123},
|
||||||
{" -c \t\tConstantly show cursor position\n", 122},
|
{" -c \t\tConstantly show cursor position\n", 124},
|
||||||
{" -h \t\tShow this message\n", 123},
|
{" -h \t\tShow this message\n", 125},
|
||||||
{" -k \t\tLet ^K cut from cursor to end of line\n", 124},
|
{" -k \t\tLet ^K cut from cursor to end of line\n", 126},
|
||||||
{" -i \t\tAutomatically indent new lines\n", 125},
|
{" -i \t\tAutomatically indent new lines\n", 127},
|
||||||
{" -l \t\tDon't follow symbolic links, overwrite\n", 126},
|
{" -l \t\tDon't follow symbolic links, overwrite\n", 128},
|
||||||
{" -m \t\tEnable mouse\n", 127},
|
{" -m \t\tEnable mouse\n", 129},
|
||||||
{" -r [#cols] \tSet fill cols to (wrap lines at) #cols\n", 128},
|
{" -r [#cols] \tSet fill cols to (wrap lines at) #cols\n", 130},
|
||||||
{" -s [prog] \tEnable alternate speller\n", 129},
|
{" -s [prog] \tEnable alternate speller\n", 131},
|
||||||
{" -p \t\tMake bottom 2 lines more Pico-like\n", 130},
|
{" -p \t\tMake bottom 2 lines more Pico-like\n", 132},
|
||||||
{" -t \t\tAuto save on exit, don't prompt\n", 131},
|
{" -t \t\tAuto save on exit, don't prompt\n", 133},
|
||||||
{" -v \t\tView (read only) mode\n", 132},
|
{" -v \t\tView (read only) mode\n", 134},
|
||||||
{" -w \t\tDon't wrap long lines\n", 133},
|
{" -w \t\tDon't wrap long lines\n", 135},
|
||||||
{" -x \t\tDon't show help window\n", 134},
|
{" -x \t\tDon't show help window\n", 136},
|
||||||
{" -z \t\tEnable suspend\n", 135},
|
{" -z \t\tEnable suspend\n", 137},
|
||||||
{" +LINE\t\tStart at line number LINE\n", 136},
|
{" +LINE\t\tStart at line number LINE\n", 138},
|
||||||
{" nano version %s by Chris Allegretta (compiled %s, %s)\n", 137},
|
{" nano version %s by Chris Allegretta (compiled %s, %s)\n", 139},
|
||||||
{" Email: nano@nano-editor.org\tWeb: http://www.nano-editor.org\n", 138},
|
{" Email: nano@nano-editor.org\tWeb: http://www.nano-editor.org\n", 140},
|
||||||
{"Mark Set", 139},
|
{"Mark Set", 141},
|
||||||
{"Mark UNset", 140},
|
{"Mark UNset", 142},
|
||||||
{"check_wrap called with inptr->data=\"%s\"\n", 141},
|
{"check_wrap called with inptr->data=\"%s\"\n", 143},
|
||||||
{"current->data now = \"%s\"\n", 142},
|
{"current->data now = \"%s\"\n", 144},
|
||||||
{"After, data = \"%s\"\n", 143},
|
{"After, data = \"%s\"\n", 145},
|
||||||
{"Error deleting tempfile, ack!", 144},
|
{"Error deleting tempfile, ack!", 146},
|
||||||
{"Could not create a temporary filename: %s", 145},
|
{"Could not create a temporary filename: %s", 147},
|
||||||
{"Could not invoke spell program \"%s\"", 146},
|
{"Could not invoke spell program \"%s\"", 148},
|
||||||
{"Could not invoke \"ispell\"", 147},
|
{"Could not invoke \"ispell\"", 149},
|
||||||
{"Finished checking spelling", 148},
|
{"Finished checking spelling", 150},
|
||||||
{"Save modified buffer (ANSWERING \"No\" WILL DESTROY CHANGES) ? ", 149},
|
{"Save modified buffer (ANSWERING \"No\" WILL DESTROY CHANGES) ? ", 151},
|
||||||
{"Cannot resize top win", 150},
|
{"Cannot resize top win", 152},
|
||||||
{"Cannot move top win", 151},
|
{"Cannot move top win", 153},
|
||||||
{"Cannot resize edit win", 152},
|
{"Cannot resize edit win", 154},
|
||||||
{"Cannot move edit win", 153},
|
{"Cannot move edit win", 155},
|
||||||
{"Cannot resize bottom win", 154},
|
{"Cannot resize bottom win", 156},
|
||||||
{"Cannot move bottom win", 155},
|
{"Cannot move bottom win", 157},
|
||||||
{"%s enable/disable", 156},
|
{"%s enable/disable", 158},
|
||||||
{"enabled", 157},
|
{"enabled", 159},
|
||||||
{"disabled", 158},
|
{"disabled", 160},
|
||||||
{"Main: set up windows\n", 159},
|
{"Main: set up windows\n", 161},
|
||||||
{"Main: bottom win\n", 160},
|
{"Main: bottom win\n", 162},
|
||||||
{"Main: open file\n", 161},
|
{"Main: open file\n", 163},
|
||||||
{"I got Alt-O-%c! (%d)\n", 162},
|
{"I got Alt-O-%c! (%d)\n", 164},
|
||||||
{"I got Alt-[-1-%c! (%d)\n", 163},
|
{"I got Alt-[-1-%c! (%d)\n", 165},
|
||||||
{"I got Alt-[-2-%c! (%d)\n", 164},
|
{"I got Alt-[-2-%c! (%d)\n", 166},
|
||||||
{"I got Alt-[-%c! (%d)\n", 165},
|
{"I got Alt-[-%c! (%d)\n", 167},
|
||||||
{"I got Alt-%c! (%d)\n", 166},
|
{"I got Alt-%c! (%d)\n", 168},
|
||||||
{"Case Sensitive Regexp Search%s%s", 167},
|
{"Case Sensitive Regexp Search%s%s", 169},
|
||||||
{"Regexp Search%s%s", 168},
|
{"Regexp Search%s%s", 170},
|
||||||
{"Case Sensitive Search%s%s", 169},
|
{"Case Sensitive Search%s%s", 171},
|
||||||
{"Search%s%s", 170},
|
{"Search%s%s", 172},
|
||||||
{" (to replace)", 171},
|
{" (to replace)", 173},
|
||||||
{"Search Cancelled", 172},
|
{"Search Cancelled", 174},
|
||||||
{"Search Wrapped", 173},
|
{"Search Wrapped", 175},
|
||||||
{"Replaced %d occurences", 174},
|
{"Replaced %d occurences", 176},
|
||||||
{"Replaced 1 occurence", 175},
|
{"Replaced 1 occurence", 177},
|
||||||
{"Replace Cancelled", 176},
|
{"Replace Cancelled", 178},
|
||||||
{"Replace with [%s]", 177},
|
{"Nothing Happens", 179},
|
||||||
{"Replace with", 178},
|
{"Replace with [%s]", 180},
|
||||||
{"Replace this instance?", 179},
|
{"Replace with", 181},
|
||||||
{"Enter line number", 180},
|
{"Replace this instance?", 182},
|
||||||
{"Aborted", 181},
|
{"Enter line number", 183},
|
||||||
{"Come on, be reasonable", 182},
|
{"Aborted", 184},
|
||||||
{"Only %d lines available, skipping to last line", 183},
|
{"Come on, be reasonable", 185},
|
||||||
{"actual_x_from_start for xplus=%d returned %d\n", 184},
|
{"Only %d lines available, skipping to last line", 186},
|
||||||
{"input '%c' (%d)\n", 185},
|
{"actual_x_from_start for xplus=%d returned %d\n", 187},
|
||||||
{"New Buffer", 186},
|
{"input '%c' (%d)\n", 188},
|
||||||
{" File: ...", 187},
|
{"New Buffer", 189},
|
||||||
{"Modified", 188},
|
{" File: ...", 190},
|
||||||
{"Moved to (%d, %d) in edit buffer\n", 189},
|
{"Modified", 191},
|
||||||
{"current->data = \"%s\"\n", 190},
|
{"Moved to (%d, %d) in edit buffer\n", 192},
|
||||||
{"I got \"%s\"\n", 191},
|
{"current->data = \"%s\"\n", 193},
|
||||||
{"Yes", 192},
|
{"I got \"%s\"\n", 194},
|
||||||
{"All", 193},
|
{"Yes", 195},
|
||||||
{"No", 194},
|
{"All", 196},
|
||||||
{"do_cursorpos: linepct = %f, bytepct = %f\n", 195},
|
{"No", 197},
|
||||||
{"line %d of %d (%.0f%%), character %d of %d (%.0f%%)", 196},
|
{"do_cursorpos: linepct = %f, bytepct = %f\n", 198},
|
||||||
{"Dumping file buffer to stderr...\n", 197},
|
{"line %d of %d (%.0f%%), character %d of %d (%.0f%%)", 199},
|
||||||
{"Dumping cutbuffer to stderr...\n", 198},
|
{"Dumping file buffer to stderr...\n", 200},
|
||||||
{"Dumping a buffer to stderr...\n", 199},
|
{"Dumping cutbuffer to stderr...\n", 201},
|
||||||
|
{"Dumping a buffer to stderr...\n", 202},
|
||||||
};
|
};
|
||||||
|
|
||||||
int _msg_tbl_length = 199;
|
int _msg_tbl_length = 202;
|
||||||
|
192
po/nano.pot
192
po/nano.pot
@ -6,7 +6,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"POT-Creation-Date: 2000-10-24 01:12-0400\n"
|
"POT-Creation-Date: 2000-10-25 21:35-0400\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@ -55,11 +55,11 @@ msgstr ""
|
|||||||
msgid "File to insert [from ./] "
|
msgid "File to insert [from ./] "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: files.c:274 files.c:298 files.c:488 nano.c:1133
|
#: files.c:274 files.c:298 files.c:486 nano.c:1134
|
||||||
msgid "Cancelled"
|
msgid "Cancelled"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: files.c:320 files.c:340 files.c:353 files.c:370 files.c:376
|
#: files.c:320 files.c:340 files.c:354 files.c:371 files.c:377
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Could not open file for writing: %s"
|
msgid "Could not open file for writing: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -68,42 +68,42 @@ msgstr ""
|
|||||||
msgid "Could not open file: Path length exceeded."
|
msgid "Could not open file: Path length exceeded."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: files.c:358
|
#: files.c:359
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Wrote >%s\n"
|
msgid "Wrote >%s\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: files.c:385
|
#: files.c:386
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Could not close %s: %s"
|
msgid "Could not close %s: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. Try a rename??
|
#. Try a rename??
|
||||||
#: files.c:406 files.c:417 files.c:422
|
#: files.c:407 files.c:418 files.c:423
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Could not open %s for writing: %s"
|
msgid "Could not open %s for writing: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: files.c:428
|
#: files.c:429
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Could not set permissions %o on %s: %s"
|
msgid "Could not set permissions %o on %s: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: files.c:435
|
#: files.c:436
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Wrote %d lines"
|
msgid "Wrote %d lines"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: files.c:467
|
#: files.c:465
|
||||||
msgid "File Name to write"
|
msgid "File Name to write"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: files.c:472
|
#: files.c:470
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "filename is %s"
|
msgid "filename is %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: files.c:477
|
#: files.c:475
|
||||||
msgid "File exists, OVERWRITE ?"
|
msgid "File exists, OVERWRITE ?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -263,131 +263,139 @@ msgstr ""
|
|||||||
msgid "Cancel the current function"
|
msgid "Cancel the current function"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:210 global.c:322 global.c:394
|
#: global.c:207
|
||||||
|
msgid "Use the null string, \"\""
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: global.c:211 global.c:323 global.c:400
|
||||||
msgid "Get Help"
|
msgid "Get Help"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:213 global.c:221
|
#: global.c:214 global.c:222
|
||||||
msgid "WriteOut"
|
msgid "WriteOut"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:217 global.c:383
|
#: global.c:218 global.c:389
|
||||||
msgid "Exit"
|
msgid "Exit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:225 global.c:318 global.c:339 global.c:358
|
#: global.c:226 global.c:319 global.c:341 global.c:361
|
||||||
msgid "Goto Line"
|
msgid "Goto Line"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:230 global.c:309
|
#: global.c:231 global.c:310
|
||||||
msgid "Justify"
|
msgid "Justify"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:234 global.c:305 global.c:336
|
#: global.c:235 global.c:306 global.c:337
|
||||||
msgid "Replace"
|
msgid "Replace"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:238
|
#: global.c:239
|
||||||
msgid "Read File"
|
msgid "Read File"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:242
|
#: global.c:243
|
||||||
msgid "Where Is"
|
msgid "Where Is"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:246 global.c:375
|
#: global.c:247 global.c:381
|
||||||
msgid "Prev Page"
|
msgid "Prev Page"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:250 global.c:379
|
#: global.c:251 global.c:385
|
||||||
msgid "Next Page"
|
msgid "Next Page"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:254
|
#: global.c:255
|
||||||
msgid "Cut Text"
|
msgid "Cut Text"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:257
|
#: global.c:258
|
||||||
msgid "UnCut Txt"
|
msgid "UnCut Txt"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:261
|
#: global.c:262
|
||||||
msgid "Cur Pos"
|
msgid "Cur Pos"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:265
|
#: global.c:266
|
||||||
msgid "To Spell"
|
msgid "To Spell"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:269
|
#: global.c:270
|
||||||
msgid "Up"
|
msgid "Up"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:272
|
#: global.c:273
|
||||||
msgid "Down"
|
msgid "Down"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:275
|
#: global.c:276
|
||||||
msgid "Forward"
|
msgid "Forward"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:278
|
#: global.c:279
|
||||||
msgid "Back"
|
msgid "Back"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:281
|
#: global.c:282
|
||||||
msgid "Home"
|
msgid "Home"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:284
|
#: global.c:285
|
||||||
msgid "End"
|
msgid "End"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:287
|
#: global.c:288
|
||||||
msgid "Refresh"
|
msgid "Refresh"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:290
|
#: global.c:291
|
||||||
msgid "Mark Text"
|
msgid "Mark Text"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:293
|
#: global.c:294
|
||||||
msgid "Delete"
|
msgid "Delete"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:297
|
#: global.c:298
|
||||||
msgid "Backspace"
|
msgid "Backspace"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:301
|
#: global.c:302
|
||||||
msgid "Tab"
|
msgid "Tab"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:313
|
#: global.c:314
|
||||||
msgid "Enter"
|
msgid "Enter"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:326 global.c:346 global.c:365
|
#: global.c:327 global.c:348 global.c:371
|
||||||
msgid "First Line"
|
msgid "First Line"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:329 global.c:349 global.c:368
|
#: global.c:330 global.c:351 global.c:374
|
||||||
msgid "Last Line"
|
msgid "Last Line"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:332 global.c:352
|
#: global.c:333 global.c:354
|
||||||
msgid "Case Sens"
|
msgid "Case Sens"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:342 global.c:361 global.c:371 global.c:387 global.c:391
|
#: global.c:344 global.c:367 global.c:377 global.c:393 global.c:397
|
||||||
#: global.c:397 winio.c:979
|
#: global.c:403 winio.c:971
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: global.c:355
|
#: global.c:357
|
||||||
msgid "No Replace"
|
msgid "No Replace"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: global.c:364
|
||||||
|
msgid "Null Str"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:115
|
#: nano.c:115
|
||||||
msgid ""
|
msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
@ -597,57 +605,57 @@ msgstr ""
|
|||||||
msgid " nano version %s by Chris Allegretta (compiled %s, %s)\n"
|
msgid " nano version %s by Chris Allegretta (compiled %s, %s)\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:402
|
#: nano.c:403
|
||||||
msgid " Email: nano@nano-editor.org\tWeb: http://www.nano-editor.org\n"
|
msgid " Email: nano@nano-editor.org\tWeb: http://www.nano-editor.org\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:437
|
#: nano.c:438
|
||||||
msgid "Mark Set"
|
msgid "Mark Set"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:442
|
#: nano.c:443
|
||||||
msgid "Mark UNset"
|
msgid "Mark UNset"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:868
|
#: nano.c:870
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "check_wrap called with inptr->data=\"%s\"\n"
|
msgid "check_wrap called with inptr->data=\"%s\"\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:919
|
#: nano.c:921
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "current->data now = \"%s\"\n"
|
msgid "current->data now = \"%s\"\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:972
|
#: nano.c:974
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "After, data = \"%s\"\n"
|
msgid "After, data = \"%s\"\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1042
|
#: nano.c:1043
|
||||||
msgid "Error deleting tempfile, ack!"
|
msgid "Error deleting tempfile, ack!"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1060
|
#: nano.c:1061
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Could not create a temporary filename: %s"
|
msgid "Could not create a temporary filename: %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1083
|
#: nano.c:1084
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Could not invoke spell program \"%s\""
|
msgid "Could not invoke spell program \"%s\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. Why 32512? I dont know!
|
#. Why 32512? I dont know!
|
||||||
#: nano.c:1089
|
#: nano.c:1090
|
||||||
msgid "Could not invoke \"ispell\""
|
msgid "Could not invoke \"ispell\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1102
|
#: nano.c:1103
|
||||||
msgid "Finished checking spelling"
|
msgid "Finished checking spelling"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1120
|
#: nano.c:1121
|
||||||
msgid "Save modified buffer (ANSWERING \"No\" WILL DESTROY CHANGES) ? "
|
msgid "Save modified buffer (ANSWERING \"No\" WILL DESTROY CHANGES) ? "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -675,52 +683,52 @@ msgstr ""
|
|||||||
msgid "Cannot move bottom win"
|
msgid "Cannot move bottom win"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1638
|
#: nano.c:1635
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s enable/disable"
|
msgid "%s enable/disable"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1650
|
#: nano.c:1647
|
||||||
msgid "enabled"
|
msgid "enabled"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1651
|
#: nano.c:1648
|
||||||
msgid "disabled"
|
msgid "disabled"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1881
|
#: nano.c:1878
|
||||||
msgid "Main: set up windows\n"
|
msgid "Main: set up windows\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1895
|
#: nano.c:1892
|
||||||
msgid "Main: bottom win\n"
|
msgid "Main: bottom win\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1901
|
#: nano.c:1898
|
||||||
msgid "Main: open file\n"
|
msgid "Main: open file\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1935
|
#: nano.c:1932
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "I got Alt-O-%c! (%d)\n"
|
msgid "I got Alt-O-%c! (%d)\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1959
|
#: nano.c:1954
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "I got Alt-[-1-%c! (%d)\n"
|
msgid "I got Alt-[-1-%c! (%d)\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:1992
|
#: nano.c:1987
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "I got Alt-[-2-%c! (%d)\n"
|
msgid "I got Alt-[-2-%c! (%d)\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:2040
|
#: nano.c:2035
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "I got Alt-[-%c! (%d)\n"
|
msgid "I got Alt-[-%c! (%d)\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: nano.c:2066
|
#: nano.c:2061
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "I got Alt-%c! (%d)\n"
|
msgid "I got Alt-%c! (%d)\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -735,21 +743,21 @@ msgstr ""
|
|||||||
msgid "Regexp Search%s%s"
|
msgid "Regexp Search%s%s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:82
|
#: search.c:81
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Case Sensitive Search%s%s"
|
msgid "Case Sensitive Search%s%s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:84
|
#: search.c:83
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Search%s%s"
|
msgid "Search%s%s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:87
|
#: search.c:86
|
||||||
msgid " (to replace)"
|
msgid " (to replace)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:95
|
#: search.c:94
|
||||||
msgid "Search Cancelled"
|
msgid "Search Cancelled"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -766,38 +774,44 @@ msgstr ""
|
|||||||
msgid "Replaced 1 occurence"
|
msgid "Replaced 1 occurence"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:392 search.c:413 search.c:436
|
#: search.c:390 search.c:419 search.c:444
|
||||||
msgid "Replace Cancelled"
|
msgid "Replace Cancelled"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:409
|
#. They used ^N in the search field, shame on them.
|
||||||
|
#. Any Dungeon fans out there?
|
||||||
|
#: search.c:407
|
||||||
|
msgid "Nothing Happens"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: search.c:415
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Replace with [%s]"
|
msgid "Replace with [%s]"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. last_search is empty
|
#. last_search is empty
|
||||||
#: search.c:434
|
#: search.c:442
|
||||||
msgid "Replace with"
|
msgid "Replace with"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:475
|
#: search.c:485
|
||||||
msgid "Replace this instance?"
|
msgid "Replace this instance?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. Ask for it
|
#. Ask for it
|
||||||
#: search.c:536
|
#: search.c:546
|
||||||
msgid "Enter line number"
|
msgid "Enter line number"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:538
|
#: search.c:548
|
||||||
msgid "Aborted"
|
msgid "Aborted"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:558
|
#: search.c:568
|
||||||
msgid "Come on, be reasonable"
|
msgid "Come on, be reasonable"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:563
|
#: search.c:573
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Only %d lines available, skipping to last line"
|
msgid "Only %d lines available, skipping to last line"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -824,50 +838,50 @@ msgstr ""
|
|||||||
msgid "Modified"
|
msgid "Modified"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:895
|
#: winio.c:887
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Moved to (%d, %d) in edit buffer\n"
|
msgid "Moved to (%d, %d) in edit buffer\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:906
|
#: winio.c:898
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "current->data = \"%s\"\n"
|
msgid "current->data = \"%s\"\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:949
|
#: winio.c:941
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "I got \"%s\"\n"
|
msgid "I got \"%s\"\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:974
|
#: winio.c:966
|
||||||
msgid "Yes"
|
msgid "Yes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:976
|
#: winio.c:968
|
||||||
msgid "All"
|
msgid "All"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:978
|
#: winio.c:970
|
||||||
msgid "No"
|
msgid "No"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:1115
|
#: winio.c:1107
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "do_cursorpos: linepct = %f, bytepct = %f\n"
|
msgid "do_cursorpos: linepct = %f, bytepct = %f\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:1119
|
#: winio.c:1111
|
||||||
msgid "line %d of %d (%.0f%%), character %d of %d (%.0f%%)"
|
msgid "line %d of %d (%.0f%%), character %d of %d (%.0f%%)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:1247
|
#: winio.c:1239
|
||||||
msgid "Dumping file buffer to stderr...\n"
|
msgid "Dumping file buffer to stderr...\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:1249
|
#: winio.c:1241
|
||||||
msgid "Dumping cutbuffer to stderr...\n"
|
msgid "Dumping cutbuffer to stderr...\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: winio.c:1251
|
#: winio.c:1243
|
||||||
msgid "Dumping a buffer to stderr...\n"
|
msgid "Dumping a buffer to stderr...\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
50
search.c
50
search.c
@ -77,8 +77,7 @@ int search_init(int replacing)
|
|||||||
prompt = _("Case Sensitive Regexp Search%s%s");
|
prompt = _("Case Sensitive Regexp Search%s%s");
|
||||||
else if (ISSET(USE_REGEXP))
|
else if (ISSET(USE_REGEXP))
|
||||||
prompt = _("Regexp Search%s%s");
|
prompt = _("Regexp Search%s%s");
|
||||||
else
|
else if (ISSET(CASE_SENSITIVE))
|
||||||
if (ISSET(CASE_SENSITIVE))
|
|
||||||
prompt = _("Case Sensitive Search%s%s");
|
prompt = _("Case Sensitive Search%s%s");
|
||||||
else
|
else
|
||||||
prompt = _("Search%s%s");
|
prompt = _("Search%s%s");
|
||||||
@ -130,7 +129,8 @@ int search_init(int replacing)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
filestruct *findnextstr(int quiet, filestruct * begin, int beginx, char *needle)
|
filestruct *findnextstr(int quiet, filestruct * begin, int beginx,
|
||||||
|
char *needle)
|
||||||
{
|
{
|
||||||
filestruct *fileptr;
|
filestruct *fileptr;
|
||||||
char *searchstr, *found = NULL, *tmp;
|
char *searchstr, *found = NULL, *tmp;
|
||||||
@ -141,17 +141,17 @@ filestruct *findnextstr(int quiet, filestruct * begin, int beginx, char *needle)
|
|||||||
current_x++;
|
current_x++;
|
||||||
|
|
||||||
/* Are we searching the last line? (i.e. the line where search started) */
|
/* Are we searching the last line? (i.e. the line where search started) */
|
||||||
if ( (fileptr == begin) && (current_x < beginx) )
|
if ((fileptr == begin) && (current_x < beginx))
|
||||||
search_last_line = 1;
|
search_last_line = 1;
|
||||||
|
|
||||||
/* Make sure we haven't passed the end of the string */
|
/* Make sure we haven't passed the end of the string */
|
||||||
if ( strlen(fileptr->data) < current_x )
|
if (strlen(fileptr->data) < current_x)
|
||||||
current_x--;
|
current_x--;
|
||||||
|
|
||||||
searchstr = &fileptr->data[current_x];
|
searchstr = &fileptr->data[current_x];
|
||||||
|
|
||||||
/* Look for needle in searchstr */
|
/* Look for needle in searchstr */
|
||||||
while (( found = strstrwrapper(searchstr, needle)) == NULL) {
|
while ((found = strstrwrapper(searchstr, needle)) == NULL) {
|
||||||
|
|
||||||
/* finished processing file, get out */
|
/* finished processing file, get out */
|
||||||
if (search_last_line) {
|
if (search_last_line) {
|
||||||
@ -274,8 +274,7 @@ int replace_regexp(char *string, int create_flag)
|
|||||||
|
|
||||||
char *c;
|
char *c;
|
||||||
int new_size = strlen(current->data) + 1;
|
int new_size = strlen(current->data) + 1;
|
||||||
int search_match_count = regmatches[0].rm_eo -
|
int search_match_count = regmatches[0].rm_eo - regmatches[0].rm_so;
|
||||||
regmatches[0].rm_so;
|
|
||||||
|
|
||||||
new_size -= search_match_count;
|
new_size -= search_match_count;
|
||||||
|
|
||||||
@ -286,11 +285,11 @@ int replace_regexp(char *string, int create_flag)
|
|||||||
while (*c) {
|
while (*c) {
|
||||||
if (*c != '\\') {
|
if (*c != '\\') {
|
||||||
if (create_flag)
|
if (create_flag)
|
||||||
*string++=*c;
|
*string++ = *c;
|
||||||
c++;
|
c++;
|
||||||
new_size++;
|
new_size++;
|
||||||
} else {
|
} else {
|
||||||
int num = (int)*(c+1) - (int)'0';
|
int num = (int) *(c + 1) - (int) '0';
|
||||||
if (num >= 1 && num <= 9) {
|
if (num >= 1 && num <= 9) {
|
||||||
|
|
||||||
int i = regmatches[num].rm_so;
|
int i = regmatches[num].rm_so;
|
||||||
@ -302,19 +301,19 @@ int replace_regexp(char *string, int create_flag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Skip over the replacement expression */
|
/* Skip over the replacement expression */
|
||||||
c+=2;
|
c += 2;
|
||||||
|
|
||||||
/* But add the length of the subexpression to new_size */
|
/* But add the length of the subexpression to new_size */
|
||||||
new_size += regmatches[num].rm_eo - regmatches[num].rm_so;
|
new_size += regmatches[num].rm_eo - regmatches[num].rm_so;
|
||||||
|
|
||||||
/* And if create_flag is set, append the result of the
|
/* And if create_flag is set, append the result of the
|
||||||
* subexpression match to the new line */
|
* subexpression match to the new line */
|
||||||
while (create_flag && i < regmatches[num].rm_eo )
|
while (create_flag && i < regmatches[num].rm_eo)
|
||||||
*string++=*(current->data + i++);
|
*string++ = *(current->data + i++);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (create_flag)
|
if (create_flag)
|
||||||
*string++=*c;
|
*string++ = *c;
|
||||||
c++;
|
c++;
|
||||||
new_size++;
|
new_size++;
|
||||||
}
|
}
|
||||||
@ -337,8 +336,7 @@ char *replace_line()
|
|||||||
/* Calculate size of new line */
|
/* Calculate size of new line */
|
||||||
#ifdef HAVE_REGEX_H
|
#ifdef HAVE_REGEX_H
|
||||||
if (ISSET(USE_REGEXP)) {
|
if (ISSET(USE_REGEXP)) {
|
||||||
search_match_count = regmatches[0].rm_eo -
|
search_match_count = regmatches[0].rm_eo - regmatches[0].rm_so;
|
||||||
regmatches[0].rm_so;
|
|
||||||
new_line_size = replace_regexp(NULL, 0);
|
new_line_size = replace_regexp(NULL, 0);
|
||||||
/* If they specified an invalid subexpression in the replace
|
/* If they specified an invalid subexpression in the replace
|
||||||
* text, return NULL indicating an error */
|
* text, return NULL indicating an error */
|
||||||
@ -365,7 +363,7 @@ char *replace_line()
|
|||||||
strcat(copy, last_replace);
|
strcat(copy, last_replace);
|
||||||
#ifdef HAVE_REGEX_H
|
#ifdef HAVE_REGEX_H
|
||||||
else
|
else
|
||||||
(void)replace_regexp(copy + current_x, 1);
|
(void) replace_regexp(copy + current_x, 1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The tail of the original line */
|
/* The tail of the original line */
|
||||||
@ -402,6 +400,14 @@ int do_replace(void)
|
|||||||
replace_abort();
|
replace_abort();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!strcmp(answer, "")) {
|
||||||
|
/* They used ^N in the search field, shame on them.
|
||||||
|
Any Dungeon fans out there? */
|
||||||
|
statusbar(_("Nothing Happens"));
|
||||||
|
replace_abort();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
strncpy(prevanswer, answer, 132);
|
strncpy(prevanswer, answer, 132);
|
||||||
|
|
||||||
if (strcmp(last_replace, "")) { /* There's a previous replace str */
|
if (strcmp(last_replace, "")) { /* There's a previous replace str */
|
||||||
@ -415,6 +421,8 @@ int do_replace(void)
|
|||||||
return 0;
|
return 0;
|
||||||
} else if (i == 0) /* They actually entered something */
|
} else if (i == 0) /* They actually entered something */
|
||||||
strncpy(last_replace, answer, 132);
|
strncpy(last_replace, answer, 132);
|
||||||
|
else if (i == NANO_NULL_KEY) /* They actually entered something */
|
||||||
|
strcpy(last_replace, "");
|
||||||
else if (i == NANO_CASE_KEY) { /* They asked for case sensitivity */
|
else if (i == NANO_CASE_KEY) { /* They asked for case sensitivity */
|
||||||
if (ISSET(CASE_SENSITIVE))
|
if (ISSET(CASE_SENSITIVE))
|
||||||
UNSET(CASE_SENSITIVE);
|
UNSET(CASE_SENSITIVE);
|
||||||
@ -423,7 +431,7 @@ int do_replace(void)
|
|||||||
|
|
||||||
do_replace();
|
do_replace();
|
||||||
return 0;
|
return 0;
|
||||||
} else if (i != -2 ) { /* First page, last page, for example could get here */
|
} else if (i != -2) { /* First page, last page, for example could get here */
|
||||||
|
|
||||||
do_early_abort();
|
do_early_abort();
|
||||||
replace_abort();
|
replace_abort();
|
||||||
@ -445,8 +453,10 @@ int do_replace(void)
|
|||||||
SET(CASE_SENSITIVE);
|
SET(CASE_SENSITIVE);
|
||||||
|
|
||||||
do_replace();
|
do_replace();
|
||||||
return 1;
|
return -1;
|
||||||
} else { /* First line key, etc. */
|
} else if (i == NANO_NULL_KEY)
|
||||||
|
strcpy(last_replace, "");
|
||||||
|
else { /* First line key, etc. */
|
||||||
|
|
||||||
do_early_abort();
|
do_early_abort();
|
||||||
replace_abort();
|
replace_abort();
|
||||||
|
7
utils.c
7
utils.c
@ -84,9 +84,9 @@ char *strstrwrapper(char *haystack, char *needle)
|
|||||||
{
|
{
|
||||||
#ifdef HAVE_REGEX_H
|
#ifdef HAVE_REGEX_H
|
||||||
if (ISSET(USE_REGEXP)) {
|
if (ISSET(USE_REGEXP)) {
|
||||||
int result=regexec(&search_regexp, haystack, 10, regmatches, 0);
|
int result = regexec(&search_regexp, haystack, 10, regmatches, 0);
|
||||||
if (!result)
|
if (!result)
|
||||||
return haystack+regmatches[0].rm_so;
|
return haystack + regmatches[0].rm_so;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -120,7 +120,8 @@ void *nrealloc(void *ptr, size_t howmuch)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Append a new magic-line to filebot */
|
/* Append a new magic-line to filebot */
|
||||||
void new_magicline(void) {
|
void new_magicline(void)
|
||||||
|
{
|
||||||
filebot->next = nmalloc(sizeof(filestruct));
|
filebot->next = nmalloc(sizeof(filestruct));
|
||||||
filebot->next->data = nmalloc(1);
|
filebot->next->data = nmalloc(1);
|
||||||
filebot->next->data[0] = '\0';
|
filebot->next->data[0] = '\0';
|
||||||
|
30
winio.c
30
winio.c
@ -609,8 +609,7 @@ void edit_add(filestruct * fileptr, int yval, int start, int virt_cur_x,
|
|||||||
&& !((fileptr->lineno > mark_beginbuf->lineno
|
&& !((fileptr->lineno > mark_beginbuf->lineno
|
||||||
&& fileptr->lineno > current->lineno)
|
&& fileptr->lineno > current->lineno)
|
||||||
|| (fileptr->lineno < mark_beginbuf->lineno
|
|| (fileptr->lineno < mark_beginbuf->lineno
|
||||||
&& fileptr->lineno < current->lineno)))
|
&& fileptr->lineno < current->lineno))) {
|
||||||
{
|
|
||||||
/* If we get here we are on a line that is atleast
|
/* If we get here we are on a line that is atleast
|
||||||
* partially selected. The lineno checks above determined
|
* partially selected. The lineno checks above determined
|
||||||
* that */
|
* that */
|
||||||
@ -626,13 +625,11 @@ void edit_add(filestruct * fileptr, int yval, int start, int virt_cur_x,
|
|||||||
if (virt_cur_x < virt_mark_beginx) {
|
if (virt_cur_x < virt_mark_beginx) {
|
||||||
/* To the right of us is marked */
|
/* To the right of us is marked */
|
||||||
add_marked_sameline(virt_cur_x, virt_mark_beginx,
|
add_marked_sameline(virt_cur_x, virt_mark_beginx,
|
||||||
fileptr, yval, virt_cur_x,
|
fileptr, yval, virt_cur_x, this_page);
|
||||||
this_page);
|
|
||||||
} else {
|
} else {
|
||||||
/* To the left of us is marked */
|
/* To the left of us is marked */
|
||||||
add_marked_sameline(virt_mark_beginx, virt_cur_x,
|
add_marked_sameline(virt_mark_beginx, virt_cur_x,
|
||||||
fileptr, yval, virt_cur_x,
|
fileptr, yval, virt_cur_x, this_page);
|
||||||
this_page);
|
|
||||||
}
|
}
|
||||||
} else if (fileptr == mark_beginbuf) {
|
} else if (fileptr == mark_beginbuf) {
|
||||||
/*
|
/*
|
||||||
@ -699,8 +696,7 @@ void edit_add(filestruct * fileptr, int yval, int start, int virt_cur_x,
|
|||||||
this_page_end - virt_cur_x);
|
this_page_end - virt_cur_x);
|
||||||
else
|
else
|
||||||
mvwaddnstr(edit, yval, virt_cur_x,
|
mvwaddnstr(edit, yval, virt_cur_x,
|
||||||
&fileptr->data[virt_cur_x],
|
&fileptr->data[virt_cur_x], COLS - virt_cur_x);
|
||||||
COLS - virt_cur_x);
|
|
||||||
|
|
||||||
if (mark_beginbuf->lineno > current->lineno)
|
if (mark_beginbuf->lineno > current->lineno)
|
||||||
wattroff(edit, A_REVERSE);
|
wattroff(edit, A_REVERSE);
|
||||||
@ -760,8 +756,7 @@ void update_line(filestruct * fileptr, int index)
|
|||||||
virt_cur_x--;
|
virt_cur_x--;
|
||||||
if (i < mark_beginx)
|
if (i < mark_beginx)
|
||||||
virt_mark_beginx--;
|
virt_mark_beginx--;
|
||||||
}
|
} else if (realdata[i] >= 1 && realdata[i] <= 26) {
|
||||||
else if (realdata[i] >= 1 && realdata[i] <= 26) {
|
|
||||||
/* Treat control characters as ^letter */
|
/* Treat control characters as ^letter */
|
||||||
fileptr->data[pos++] = '^';
|
fileptr->data[pos++] = '^';
|
||||||
fileptr->data[pos++] = realdata[i] + 64;
|
fileptr->data[pos++] = realdata[i] + 64;
|
||||||
@ -828,12 +823,10 @@ void edit_refresh(void)
|
|||||||
}
|
}
|
||||||
/* If noloop == 1, then we already did an edit_update without finishing
|
/* If noloop == 1, then we already did an edit_update without finishing
|
||||||
this function. So we don't run edit_update again */
|
this function. So we don't run edit_update again */
|
||||||
if (!currentcheck && !noloop) /* Then current has run off the screen... */
|
if (!currentcheck && !noloop) { /* Then current has run off the screen... */
|
||||||
{
|
|
||||||
edit_update(current, CENTER);
|
edit_update(current, CENTER);
|
||||||
noloop = 1;
|
noloop = 1;
|
||||||
}
|
} else if (noloop)
|
||||||
else if (noloop)
|
|
||||||
noloop = 0;
|
noloop = 0;
|
||||||
|
|
||||||
if (lines <= editwinrows - 1)
|
if (lines <= editwinrows - 1)
|
||||||
@ -870,8 +863,7 @@ void edit_update(filestruct * fileptr, int topmidbot)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
temp = fileptr;
|
temp = fileptr;
|
||||||
if (topmidbot == 2)
|
if (topmidbot == 2);
|
||||||
;
|
|
||||||
else if (topmidbot == 0)
|
else if (topmidbot == 0)
|
||||||
for (i = 0; i <= editwinrows - 1 && temp->prev != NULL; i++)
|
for (i = 0; i <= editwinrows - 1 && temp->prev != NULL; i++)
|
||||||
temp = temp->prev;
|
temp = temp->prev;
|
||||||
@ -1274,10 +1266,10 @@ void dump_buffer_reverse(filestruct * inptr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Fix editbot based on the assumption that edittop is correct */
|
/* Fix editbot based on the assumption that edittop is correct */
|
||||||
void fix_editbot(void) {
|
void fix_editbot(void)
|
||||||
|
{
|
||||||
int i;
|
int i;
|
||||||
editbot = edittop;
|
editbot = edittop;
|
||||||
for(i = 0; (i <= editwinrows - 1) && (editbot->next != NULL)
|
for (i = 0; (i <= editwinrows - 1) && (editbot->next != NULL)
|
||||||
&& (editbot != filebot); i++, editbot = editbot->next);
|
&& (editbot != filebot); i++, editbot = editbot->next);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user