26 |
arshell_spell_check_buffer() |
arshell_spell_check_buffer() |
27 |
{ |
{ |
28 |
char *command; |
char *command; |
29 |
|
char *spell_checker; |
30 |
|
|
31 |
arshell_save_work_area(); |
arshell_save_work_area(); |
32 |
asprintf(&command, "xterm -e ispell %s", arshell.edit.filename); |
spell_checker=antiright_pipe_read("which ispell | tail -1"); |
33 |
|
if(strlen(spell_checker)>1) |
34 |
|
asprintf(&command, "xterm -e ispell %s", arshell.edit.filename); |
35 |
|
else |
36 |
|
{ |
37 |
|
free(spell_checker); |
38 |
|
spell_checker=antiright_pipe_read("which aspell | tail -1"); |
39 |
|
if(strlen(spell_checker)>1) |
40 |
|
asprintf(&command, "xterm -e aspell -c %s", arshell.edit.filename); |
41 |
|
else |
42 |
|
{ |
43 |
|
free(spell_checker); |
44 |
|
spell_checker=antiright_pipe_read("which spell | tail -1"); |
45 |
|
if(strlen(spell_checker)>1) |
46 |
|
asprintf(&command, "xterm -e aspell -c %s", arshell.edit.filename); |
47 |
|
else |
48 |
|
{ |
49 |
|
free(spell_checker); |
50 |
|
asprintf(&command, "arshell -ADm 'No spell checker was found.'&"); |
51 |
|
} |
52 |
|
} |
53 |
|
} |
54 |
|
free(spell_checker); |
55 |
system(command); |
system(command); |
56 |
|
free(command); |
57 |
arshell_revert_file_cb(); |
arshell_revert_file_cb(); |
58 |
} |
} |
59 |
|
|