From: Chris Allegretta Date: Mon, 3 Jul 2000 03:10:14 +0000 (+0000) Subject: Removed do_oldspell() and put an ifdef around do_spell() X-Git-Tag: v0.9.12~28 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=dbc12b2070e5a76b0624e9316886088ab541013a;p=nano.git 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 --- diff --git a/ChangeLog b/ChangeLog index 3903b564..898695e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,8 @@ CVS code changes since last release - - changed 'sprintf' calls to safer 'snprintf' - nano.c: - 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: - Revised translations by floki@bigfoot.com. - fi.po: diff --git a/nano.c b/nano.c index a49cc454..f55adff2 100644 --- a/nano.c +++ b/nano.c @@ -1036,58 +1036,8 @@ void exit_spell(char *tmpfilename, char *foo) * This is Chris' very ugly spell function. Someone please make this * 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) { char *temp, *foo; @@ -1139,6 +1089,7 @@ int do_spell(void) statusbar(_("Finished checking spelling")); return 1; } +#endif int do_exit(void) { diff --git a/po/nano.pot b/po/nano.pot index 0c7be4b1..69f2891c 100644 --- a/po/nano.pot +++ b/po/nano.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "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" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -55,7 +55,7 @@ msgstr "" msgid "File to insert [from ./] " 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" msgstr "" @@ -574,71 +574,71 @@ msgstr "" msgid "Error deleting tempfile, ack!" msgstr "" -#: nano.c:1045 nano.c:1095 +#: nano.c:1047 #, c-format msgid "Could not create a temporary filename: %s" msgstr "" -#: nano.c:1067 nano.c:1117 +#: nano.c:1071 #, c-format msgid "Could not invoke spell program \"%s\"" msgstr "" #. Why 32512? I dont know! -#: nano.c:1073 nano.c:1123 +#: nano.c:1077 msgid "Could not invoke \"ispell\"" msgstr "" -#: nano.c:1085 nano.c:1135 +#: nano.c:1089 msgid "Finished checking spelling" msgstr "" -#: nano.c:1152 +#: nano.c:1107 msgid "Save modified buffer (ANSWERING \"No\" WILL DESTROY CHANGES) ? " msgstr "" -#: nano.c:1275 +#: nano.c:1230 msgid "Cannot resize top win" msgstr "" -#: nano.c:1277 +#: nano.c:1232 msgid "Cannot move top win" msgstr "" -#: nano.c:1279 +#: nano.c:1234 msgid "Cannot resize edit win" msgstr "" -#: nano.c:1281 +#: nano.c:1236 msgid "Cannot move edit win" msgstr "" -#: nano.c:1283 +#: nano.c:1238 msgid "Cannot resize bottom win" msgstr "" -#: nano.c:1285 +#: nano.c:1240 msgid "Cannot move bottom win" msgstr "" -#: nano.c:1749 +#: nano.c:1704 msgid "Main: set up windows\n" msgstr "" -#: nano.c:1771 +#: nano.c:1726 msgid "Main: bottom win\n" msgstr "" -#: nano.c:1777 +#: nano.c:1732 msgid "Main: open file\n" msgstr "" -#: nano.c:1850 +#: nano.c:1805 #, c-format msgid "I got Alt-[-%c! (%d)\n" msgstr "" -#: nano.c:1866 +#: nano.c:1821 #, c-format msgid "I got Alt-%c! (%d)\n" msgstr ""