Commit dbc12b20 authored by Chris Allegretta's avatar Chris Allegretta
Browse files

Removed do_oldspell() and put an ifdef around do_spell()

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@60 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent 6d0e9cd5
Showing with 22 additions and 69 deletions
+22 -69
...@@ -9,6 +9,8 @@ CVS code changes since last release - ...@@ -9,6 +9,8 @@ CVS code changes since last release -
- changed 'sprintf' calls to safer 'snprintf' - changed 'sprintf' calls to safer 'snprintf'
- nano.c: - nano.c:
- Removed dual alt_speller variables, oops! (Rocco Corsi) - Removed dual alt_speller variables, oops! (Rocco Corsi)
- Removed unnecessary do_oldspell function (Rocco Corsi). Added
SMALL_NANO #ifdef around actual spell function.
- de.po: - de.po:
- Revised translations by floki@bigfoot.com. - Revised translations by floki@bigfoot.com.
- fi.po: - fi.po:
......
...@@ -1036,58 +1036,8 @@ void exit_spell(char *tmpfilename, char *foo) ...@@ -1036,58 +1036,8 @@ void exit_spell(char *tmpfilename, char *foo)
* This is Chris' very ugly spell function. Someone please make this * This is Chris' very ugly spell function. Someone please make this
* better =-) * better =-)
*/ */
int do_oldspell(void)
{
char *temp, *foo;
int i, size;
if ((temp = tempnam(0, "nano.")) == NULL) {
statusbar(_("Could not create a temporary filename: %s"),
strerror(errno));
return 0;
}
if (write_file(temp, 1) == -1)
return 0;
if (alt_speller) {
size = strlen(temp) + strlen(alt_speller) + 2;
foo = nmalloc(size);
snprintf(foo, size, "%s %s", alt_speller, temp);
} else {
/* For now, we only try ispell because we're not capable of
handling the normal spell program (yet...) */
size = strlen(temp) + 8;
foo = nmalloc(size);
snprintf(foo, size, "ispell %s", temp);
}
endwin();
resetty();
if (alt_speller) {
if ((i = system(foo)) == -1 || i == 32512) {
statusbar(_("Could not invoke spell program \"%s\""),
alt_speller);
exit_spell(temp, foo);
return 0;
}
} else if ((i = system(foo)) == -1 || i == 32512) { /* Why 32512? I dont know! */
statusbar(_("Could not invoke \"ispell\""));
exit_spell(temp, foo);
return 0;
}
initscr();
free_filestruct(fileage);
global_init();
open_file(temp, 0, 1);
edit_update(fileage);
set_modified();
exit_spell(temp, foo);
statusbar(_("Finished checking spelling"));
return 1;
}
#ifndef NANO_SMALL
int do_spell(void) int do_spell(void)
{ {
char *temp, *foo; char *temp, *foo;
...@@ -1139,6 +1089,7 @@ int do_spell(void) ...@@ -1139,6 +1089,7 @@ int do_spell(void)
statusbar(_("Finished checking spelling")); statusbar(_("Finished checking spelling"));
return 1; return 1;
} }
#endif
int do_exit(void) int do_exit(void)
{ {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2000-06-30 16:38-0400\n" "POT-Creation-Date: 2000-07-02 23:06-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,7 +55,7 @@ msgstr "" ...@@ -55,7 +55,7 @@ msgstr ""
msgid "File to insert [from ./] " msgid "File to insert [from ./] "
msgstr "" msgstr ""
#: files.c:270 files.c:294 files.c:458 nano.c:1165 #: files.c:270 files.c:294 files.c:458 nano.c:1120
msgid "Cancelled" msgid "Cancelled"
msgstr "" msgstr ""
...@@ -574,71 +574,71 @@ msgstr "" ...@@ -574,71 +574,71 @@ msgstr ""
msgid "Error deleting tempfile, ack!" msgid "Error deleting tempfile, ack!"
msgstr "" msgstr ""
#: nano.c:1045 nano.c:1095 #: nano.c:1047
#, c-format #, c-format
msgid "Could not create a temporary filename: %s" msgid "Could not create a temporary filename: %s"
msgstr "" msgstr ""
#: nano.c:1067 nano.c:1117 #: nano.c:1071
#, 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:1073 nano.c:1123 #: nano.c:1077
msgid "Could not invoke \"ispell\"" msgid "Could not invoke \"ispell\""
msgstr "" msgstr ""
#: nano.c:1085 nano.c:1135 #: nano.c:1089
msgid "Finished checking spelling" msgid "Finished checking spelling"
msgstr "" msgstr ""
#: nano.c:1152 #: nano.c:1107
msgid "Save modified buffer (ANSWERING \"No\" WILL DESTROY CHANGES) ? " msgid "Save modified buffer (ANSWERING \"No\" WILL DESTROY CHANGES) ? "
msgstr "" msgstr ""
#: nano.c:1275 #: nano.c:1230
msgid "Cannot resize top win" msgid "Cannot resize top win"
msgstr "" msgstr ""
#: nano.c:1277 #: nano.c:1232
msgid "Cannot move top win" msgid "Cannot move top win"
msgstr "" msgstr ""
#: nano.c:1279 #: nano.c:1234
msgid "Cannot resize edit win" msgid "Cannot resize edit win"
msgstr "" msgstr ""
#: nano.c:1281 #: nano.c:1236
msgid "Cannot move edit win" msgid "Cannot move edit win"
msgstr "" msgstr ""
#: nano.c:1283 #: nano.c:1238
msgid "Cannot resize bottom win" msgid "Cannot resize bottom win"
msgstr "" msgstr ""
#: nano.c:1285 #: nano.c:1240
msgid "Cannot move bottom win" msgid "Cannot move bottom win"
msgstr "" msgstr ""
#: nano.c:1749 #: nano.c:1704
msgid "Main: set up windows\n" msgid "Main: set up windows\n"
msgstr "" msgstr ""
#: nano.c:1771 #: nano.c:1726
msgid "Main: bottom win\n" msgid "Main: bottom win\n"
msgstr "" msgstr ""
#: nano.c:1777 #: nano.c:1732
msgid "Main: open file\n" msgid "Main: open file\n"
msgstr "" msgstr ""
#: nano.c:1850 #: nano.c:1805
#, c-format #, c-format
msgid "I got Alt-[-%c! (%d)\n" msgid "I got Alt-[-%c! (%d)\n"
msgstr "" msgstr ""
#: nano.c:1866 #: nano.c:1821
#, c-format #, c-format
msgid "I got Alt-%c! (%d)\n" msgid "I got Alt-%c! (%d)\n"
msgstr "" msgstr ""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment