tweaks: rename three variables, to match others elsewhere

master
Benno Schulenberg 2019-10-16 11:46:22 +02:00
parent 3b9a24a7ca
commit 7c5b104859
1 changed files with 13 additions and 14 deletions

View File

@ -2652,19 +2652,18 @@ const char *treat(char *tempfile_name, char *theprogram, bool spelling)
* specified, use it. Otherwise, use the internal spell checker. */ * specified, use it. Otherwise, use the internal spell checker. */
void do_spell(void) void do_spell(void)
{ {
bool status; FILE *stream;
FILE *temp_file; char *temp_name;
char *temp;
unsigned stash[sizeof(flags) / sizeof(flags[0])]; unsigned stash[sizeof(flags) / sizeof(flags[0])];
/* A storage place for the current flag settings. */
const char *result_msg; const char *result_msg;
bool okay;
if (in_restricted_mode()) if (in_restricted_mode())
return; return;
temp = safe_tempfile(&temp_file); temp_name = safe_tempfile(&stream);
if (temp == NULL) { if (temp_name == NULL) {
statusline(ALERT, _("Error writing temp file: %s"), strerror(errno)); statusline(ALERT, _("Error writing temp file: %s"), strerror(errno));
return; return;
} }
@ -2677,26 +2676,26 @@ void do_spell(void)
#ifndef NANO_TINY #ifndef NANO_TINY
if (openfile->mark) if (openfile->mark)
status = write_marked_file(temp, temp_file, TRUE, OVERWRITE); okay = write_marked_file(temp_name, stream, TRUE, OVERWRITE);
else else
#endif #endif
status = write_file(temp, temp_file, TRUE, OVERWRITE, TRUE); okay = write_file(temp_name, stream, TRUE, OVERWRITE, TRUE);
if (!status) { if (!okay) {
statusline(ALERT, _("Error writing temp file: %s"), strerror(errno)); statusline(ALERT, _("Error writing temp file: %s"), strerror(errno));
free(temp); free(temp_name);
return; return;
} }
blank_bottombars(); blank_bottombars();
if (alt_speller) if (alt_speller)
result_msg = treat(temp, alt_speller, TRUE); result_msg = treat(temp_name, alt_speller, TRUE);
else else
result_msg = do_int_speller(temp); result_msg = do_int_speller(temp_name);
unlink(temp); unlink(temp_name);
free(temp); free(temp_name);
/* Restore the settings of the global flags. */ /* Restore the settings of the global flags. */
memcpy(flags, stash, sizeof(flags)); memcpy(flags, stash, sizeof(flags));