more miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4031 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
родитель
30ca7d5219
Коммит
9e7b2d572c
@ -21,6 +21,10 @@ CVS code -
|
||||
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)
|
||||
|
@ -1701,7 +1701,7 @@ bool write_file(const char *name, FILE *f_open, bool tmp, append_type
|
||||
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;
|
||||
|
@ -613,8 +613,7 @@ void die_save_file(const char *die_filename)
|
||||
|
||||
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);
|
||||
|
14
src/text.c
14
src/text.c
@ -2197,7 +2197,7 @@ const char *do_alt_speller(char *tempfile_name)
|
||||
|
||||
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
|
||||
@ -2205,11 +2205,11 @@ const char *do_alt_speller(char *tempfile_name)
|
||||
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
|
||||
@ -2301,7 +2301,7 @@ const char *do_alt_speller(char *tempfile_name)
|
||||
* 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;
|
||||
@ -2311,14 +2311,14 @@ void do_spell(void)
|
||||
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;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user