tweaks: delete some old debugging code that no longer seems useful
parent
bfe65af6f3
commit
c46696d40c
|
@ -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. */
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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);
|
||||
|
|
18
src/utils.c
18
src/utils.c
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue