tweaks: delete some old debugging code that no longer seems useful

master
Benno Schulenberg 2018-07-18 18:10:41 +02:00
parent bfe65af6f3
commit c46696d40c
5 changed files with 0 additions and 33 deletions

View File

@ -187,10 +187,6 @@ void do_cut_text(bool copy_text, bool marked, bool cut_till_eof)
set_modified();
refresh_needed = TRUE;
#ifdef DEBUG
dump_filestruct(cutbuffer);
#endif
}
/* Move text from the current buffer into the cutbuffer. */

View File

@ -636,10 +636,6 @@ void switch_to_adjacent_buffer(bool to_next)
/* Indicate on the status bar where we switched to. */
mention_name_and_linecount();
#ifdef DEBUG
dump_filestruct(openfile->current);
#endif
}
/* Switch to the previous entry in the list of open files. */

View File

@ -1068,10 +1068,6 @@ void do_exit(void)
"(Answering \"No\" will DISCARD changes.) "));
}
#ifdef DEBUG
dump_filestruct(openfile->fileage);
#endif
/* If the user chose not to save, or if the user chose to save and
* the save succeeded, we're ready to exit. */
if (i == 0 || (i == 1 && do_writeout(TRUE, TRUE) > 0))

View File

@ -611,9 +611,6 @@ size_t get_totsize(const filestruct *begin, const filestruct *end);
#ifndef NANO_TINY
filestruct *fsfromline(ssize_t lineno);
#endif
#ifdef DEBUG
void dump_filestruct(const filestruct *inptr);
#endif
/* Most functions in winio.c. */
void record_macro(void);

View File

@ -590,21 +590,3 @@ size_t get_totsize(const filestruct *begin, const filestruct *end)
return totsize;
}
#ifdef DEBUG
/* Dump the given buffer to stderr. */
void dump_filestruct(const filestruct *inptr)
{
if (inptr == openfile->fileage)
fprintf(stderr, "Dumping file buffer to stderr...\n");
else if (inptr == cutbuffer)
fprintf(stderr, "Dumping cutbuffer to stderr...\n");
else
fprintf(stderr, "Dumping a buffer to stderr...\n");
while (inptr != NULL) {
fprintf(stderr, "(%zd) %s\n", inptr->lineno, inptr->data);
inptr = inptr->next;
}
}
#endif /* DEBUG */