move check_linenumbers() down so that it's near the other debugging
routines git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2592 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
6529ab434a
commit
cc81436f81
|
@ -668,9 +668,6 @@ void set_modified(void);
|
||||||
void statusbar(const char *msg, ...);
|
void statusbar(const char *msg, ...);
|
||||||
void bottombars(const shortcut *s);
|
void bottombars(const shortcut *s);
|
||||||
void onekey(const char *keystroke, const char *desc, size_t len);
|
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);
|
size_t get_page_start(size_t column);
|
||||||
void reset_cursor(void);
|
void reset_cursor(void);
|
||||||
void edit_add(const filestruct *fileptr, const char *converted, int
|
void edit_add(const filestruct *fileptr, const char *converted, int
|
||||||
|
@ -693,6 +690,9 @@ size_t help_line_len(const char *ptr);
|
||||||
void do_help(void);
|
void do_help(void);
|
||||||
#endif
|
#endif
|
||||||
void do_replace_highlight(bool highlight_flag, const char *word);
|
void do_replace_highlight(bool highlight_flag, const char *word);
|
||||||
|
#ifndef NDEBUG
|
||||||
|
int check_linenumbers(const filestruct *fileptr);
|
||||||
|
#endif
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
void dump_buffer(const filestruct *inptr);
|
void dump_buffer(const filestruct *inptr);
|
||||||
void dump_buffer_reverse(void);
|
void dump_buffer_reverse(void);
|
||||||
|
|
28
src/winio.c
28
src/winio.c
|
@ -2969,19 +2969,6 @@ void onekey(const char *keystroke, const char *desc, size_t len)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 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
|
/* nano scrolls horizontally within a line in chunks. This function
|
||||||
* returns the column number of the first character displayed in the
|
* returns the column number of the first character displayed in the
|
||||||
* window when the cursor is at the given column. Note that
|
* window when the cursor is at the given column. Note that
|
||||||
|
@ -3979,6 +3966,21 @@ void do_replace_highlight(bool highlight_flag, const char *word)
|
||||||
wattroff(edit, A_REVERSE);
|
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
|
#ifdef DEBUG
|
||||||
/* Dump the passed-in file structure to stderr. */
|
/* Dump the passed-in file structure to stderr. */
|
||||||
void dump_buffer(const filestruct *inptr)
|
void dump_buffer(const filestruct *inptr)
|
||||||
|
|
Loading…
Reference in New Issue