mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-08 20:41:59 +03:00
* edit.h: Removed NO_INLINE_GETBYTE conditional. The name was
misleading, as it really meant INLINE_GETBYTE. Furthermore, it has not been working since the split of edit.h into edit-widget.h. * edit.c: Likewise.
This commit is contained in:
parent
324f4c5644
commit
6dc6158ff1
@ -1,3 +1,10 @@
|
||||
2005-01-30 Roland Illig <roland.illig@gmx.de>
|
||||
|
||||
* edit.h: Removed NO_INLINE_GETBYTE conditional. The name was
|
||||
misleading, as it really meant INLINE_GETBYTE. Furthermore,
|
||||
it has not been working since the split of edit.h into edit-widget.h.
|
||||
* edit.c: Likewise.
|
||||
|
||||
2005-01-26 Roland Illig <roland.illig@gmx.de>
|
||||
|
||||
* editdraw.c (edit_status): Fixed drawing bug with ncurses.
|
||||
|
@ -91,8 +91,6 @@ char *option_backup_ext = "~";
|
||||
static void edit_move_to_prev_col (WEdit *edit, long p);
|
||||
static void user_menu (WEdit *edit);
|
||||
|
||||
#ifndef NO_INLINE_GETBYTE
|
||||
|
||||
int edit_get_byte (WEdit * edit, long byte_index)
|
||||
{
|
||||
unsigned long p;
|
||||
@ -107,9 +105,6 @@ int edit_get_byte (WEdit * edit, long byte_index)
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Initialize the buffers for an empty files.
|
||||
*/
|
||||
|
18
edit/edit.h
18
edit/edit.h
@ -133,25 +133,7 @@ void menu_save_mode_cmd (void);
|
||||
int edit_raw_key_query (const char *heading, const char *query, int cancel);
|
||||
int edit_file (const char *_file, int line);
|
||||
int edit_translate_key (WEdit *edit, long x_key, int *cmd, int *ch);
|
||||
|
||||
#ifndef NO_INLINE_GETBYTE
|
||||
int edit_get_byte (WEdit * edit, long byte_index);
|
||||
#else
|
||||
static inline int edit_get_byte (WEdit * edit, long byte_index)
|
||||
{
|
||||
unsigned long p;
|
||||
if (byte_index >= (edit->curs1 + edit->curs2) || byte_index < 0)
|
||||
return '\n';
|
||||
|
||||
if (byte_index >= edit->curs1) {
|
||||
p = edit->curs1 + edit->curs2 - byte_index - 1;
|
||||
return edit->buffers2[p >> S_EDIT_BUF_SIZE][EDIT_BUF_SIZE - (p & M_EDIT_BUF_SIZE) - 1];
|
||||
} else {
|
||||
return edit->buffers1[byte_index >> S_EDIT_BUF_SIZE][byte_index & M_EDIT_BUF_SIZE];
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
int edit_count_lines (WEdit * edit, long current, int upto);
|
||||
long edit_move_forward (WEdit * edit, long current, int lines, long upto);
|
||||
long edit_move_forward3 (WEdit * edit, long current, int cols, long upto);
|
||||
|
Loading…
Reference in New Issue
Block a user