void statusbar(const char *msg, ...);
void bottombars(const shortcut *s);
void onekey(const char *keystroke, const char *desc, size_t len);
-#ifndef NDEBUG
-int check_linenumbers(const filestruct *fileptr);
-#endif
size_t get_page_start(size_t column);
void reset_cursor(void);
void edit_add(const filestruct *fileptr, const char *converted, int
void do_help(void);
#endif
void do_replace_highlight(bool highlight_flag, const char *word);
+#ifndef NDEBUG
+int check_linenumbers(const filestruct *fileptr);
+#endif
#ifdef DEBUG
void dump_buffer(const filestruct *inptr);
void dump_buffer_reverse(void);
}
}
-/* And so start the display update routines. */
-#ifndef NDEBUG
-int check_linenumbers(const filestruct *fileptr)
-{
- int check_line = 0;
- const filestruct *filetmp;
-
- for (filetmp = edittop; filetmp != fileptr; filetmp = filetmp->next)
- check_line++;
- return check_line;
-}
-#endif
-
/* nano scrolls horizontally within a line in chunks. This function
* returns the column number of the first character displayed in the
* window when the cursor is at the given column. Note that
wattroff(edit, A_REVERSE);
}
+#ifndef NDEBUG
+/* Return what the current line number should be, starting at edittop
+ * and ending at fileptr. */
+int check_linenumbers(const filestruct *fileptr)
+{
+ int check_line = 0;
+ const filestruct *filetmp;
+
+ for (filetmp = edittop; filetmp != fileptr; filetmp = filetmp->next)
+ check_line++;
+
+ return check_line;
+}
+#endif
+
#ifdef DEBUG
/* Dump the passed-in file structure to stderr. */
void dump_buffer(const filestruct *inptr)