regexp_init()
- Don't assign rc's value via regcomp() until we've asserted
that regexp_compiled is FALSE. (DLR)
+- text.c:
+ do_alt_speller()
+ - Rename variable altspell_error to alt_spell_error, for
+ consistency. (DLR)
- winio.c:
do_credits()
- Update the last copyright notice to include 2006. (DLR)
bool write_marked_file(const char *name, FILE *f_open, bool tmp,
append_type append)
{
- bool retval = FALSE;
+ bool retval;
bool old_modified = openfile->modified;
/* write_file() unsets the modified flag. */
bool added_magicline = FALSE;
retval = get_next_filename(die_filename, ".save");
if (retval[0] != '\0')
- failed = (write_file(retval, NULL, TRUE, OVERWRITE,
- TRUE) == -1);
+ failed = (!write_file(retval, NULL, TRUE, OVERWRITE, TRUE));
if (!failed)
fprintf(stderr, _("\nBuffer written to %s\n"), retval);
if (!WIFEXITED(alt_spell_status) ||
WEXITSTATUS(alt_spell_status) != 0) {
- char *altspell_error;
+ char *alt_spell_error;
char *invoke_error = _("Error invoking \"%s\"");
#ifndef NANO_TINY
openfile->mark_set = old_mark_set;
#endif
- altspell_error =
+ alt_spell_error =
charalloc(strlen(invoke_error) +
strlen(alt_speller) + 1);
- sprintf(altspell_error, invoke_error, alt_speller);
- return altspell_error;
+ sprintf(alt_spell_error, invoke_error, alt_speller);
+ return alt_spell_error;
}
#ifndef NANO_TINY
* specified, use it. Otherwise, use the internal spell checker. */
void do_spell(void)
{
- int i;
+ bool status;
FILE *temp_file;
char *temp = safe_tempfile(&temp_file);
const char *spell_msg;
return;
}
- i =
+ status =
#ifndef NANO_TINY
(openfile->mark_set) ? write_marked_file(temp, temp_file, TRUE,
OVERWRITE) :
#endif
write_file(temp, temp_file, TRUE, OVERWRITE, FALSE);
- if (i == -1) {
+ if (!status) {
statusbar(_("Error writing temp file: %s"), strerror(errno));
free(temp);
return;