commit c46696d40cb0683ae8a9fa4b18bca61a95f7abda
parent bfe65af6f3445ec60adb7cdb225c221e80ee6b9c
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Wed, 18 Jul 2018 18:10:41 +0200
tweaks: delete some old debugging code that no longer seems useful
Diffstat:
5 files changed, 0 insertions(+), 33 deletions(-)
diff --git a/src/cut.c b/src/cut.c
@@ -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. */
diff --git a/src/files.c b/src/files.c
@@ -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. */
diff --git a/src/nano.c b/src/nano.c
@@ -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))
diff --git a/src/proto.h b/src/proto.h
@@ -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);
diff --git a/src/utils.c b/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 */