[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Antiright-devel] antiright/src/arshell textedit.c
From: |
Jeffrey Bedard |
Subject: |
[Antiright-devel] antiright/src/arshell textedit.c |
Date: |
Mon, 01 Nov 2004 17:28:37 -0500 |
CVSROOT: /cvsroot/antiright
Module name: antiright
Branch:
Changes by: Jeffrey Bedard <address@hidden> 04/11/01 22:22:04
Modified files:
src/arshell : textedit.c
Log message:
Added a search for available spell checkers and fixed a memory leak of
COMMAND in arshell_spell_check_buffer().
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/antiright/antiright/src/arshell/textedit.c.diff?tr1=1.16&tr2=1.17&r1=text&r2=text
Patches:
Index: antiright/src/arshell/textedit.c
diff -u antiright/src/arshell/textedit.c:1.16
antiright/src/arshell/textedit.c:1.17
--- antiright/src/arshell/textedit.c:1.16 Sun Sep 5 01:40:56 2004
+++ antiright/src/arshell/textedit.c Mon Nov 1 22:22:04 2004
@@ -26,9 +26,34 @@
arshell_spell_check_buffer()
{
char *command;
+ char *spell_checker;
+
arshell_save_work_area();
- asprintf(&command, "xterm -e ispell %s", arshell.edit.filename);
+ spell_checker=antiright_pipe_read("which ispell | tail -1");
+ if(strlen(spell_checker)>1)
+ asprintf(&command, "xterm -e ispell %s", arshell.edit.filename);
+ else
+ {
+ free(spell_checker);
+ spell_checker=antiright_pipe_read("which aspell | tail -1");
+ if(strlen(spell_checker)>1)
+ asprintf(&command, "xterm -e aspell -c %s", arshell.edit.filename);
+ else
+ {
+ free(spell_checker);
+ spell_checker=antiright_pipe_read("which spell | tail -1");
+ if(strlen(spell_checker)>1)
+ asprintf(&command, "xterm -e aspell -c %s", arshell.edit.filename);
+ else
+ {
+ free(spell_checker);
+ asprintf(&command, "arshell -ADm 'No spell checker was found.'&");
+ }
+ }
+ }
+ free(spell_checker);
system(command);
+ free(command);
arshell_revert_file_cb();
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Antiright-devel] antiright/src/arshell textedit.c,
Jeffrey Bedard <=