Dunno what I changed...
This commit is contained in:
parent
542743fd97
commit
b358baef32
23
xurses.c
23
xurses.c
@ -108,13 +108,12 @@ static void curses_exit (void) {
|
||||
int curses_realign_x = 0;
|
||||
int curses_realign_y = 0;
|
||||
int curses_tab_width = 8;
|
||||
int curses_character = 0;
|
||||
int curses_signal = SIGNAL_NONE;
|
||||
int curses_screen_width = 0;
|
||||
int curses_screen_height = 0;
|
||||
int curses_active = 1;
|
||||
|
||||
char curses_character = '\0';
|
||||
|
||||
/* External function definitions. */
|
||||
|
||||
void curses_configure (void) {
|
||||
@ -159,16 +158,16 @@ void curses_synchronize (void) {
|
||||
|
||||
in (& signal, 4);
|
||||
|
||||
curses_character = (char) signal;
|
||||
curses_character = signal;
|
||||
|
||||
if ((char) signal == '\033') {
|
||||
if (signal == '\033') {
|
||||
curses_signal |= SIGNAL_ESCAPE;
|
||||
} else if (character_is_digit ((char) signal) != 0) {
|
||||
curses_signal |= SIGNAL_0 + (int) ((char) signal - '0');
|
||||
} else if (character_is_lowercase ((char) signal) != 0) {
|
||||
curses_signal |= SIGNAL_A + (int) ((char) signal - 'a');
|
||||
} else if (character_is_uppercase ((char) signal) != 0) {
|
||||
curses_signal |= SIGNAL_A + (int) ((char) signal - 'A');
|
||||
} else if (character_is_digit (signal) != 0) {
|
||||
curses_signal |= SIGNAL_0 + (int) (signal - '0');
|
||||
} else if (character_is_lowercase (signal) != 0) {
|
||||
curses_signal |= SIGNAL_A + (int) (signal - 'a');
|
||||
} else if (character_is_uppercase (signal) != 0) {
|
||||
curses_signal |= SIGNAL_A + (int) (signal - 'A');
|
||||
curses_signal |= SIGNAL_SHIFT;
|
||||
} else {
|
||||
curses_signal = SIGNAL_NONE;
|
||||
@ -204,8 +203,8 @@ void curses_render_cursor (int x, int y) {
|
||||
x %= 1000;
|
||||
y %= 1000;
|
||||
|
||||
string_copy_limit (curses_cursor + 2, string_realign (number_to_string (x), 3, '0'), 3);
|
||||
string_copy_limit (curses_cursor + 6, string_realign (number_to_string (y), 3, '0'), 3);
|
||||
string_copy_limit (curses_cursor + 2, string_realign (number_to_string (y), 3, '0'), 3);
|
||||
string_copy_limit (curses_cursor + 6, string_realign (number_to_string (x), 3, '0'), 3);
|
||||
|
||||
string_copy_limit (& curses_screen [CURSES_REVERT + CURSES_FORMAT * curses_screen_width * curses_screen_height], curses_cursor, CURSES_CURSOR);
|
||||
}
|
||||
|
3
xurses.h
3
xurses.h
@ -12,13 +12,12 @@ It is distributed in the hope that it will be useful or harmful, it really depen
|
||||
extern int curses_realign_x;
|
||||
extern int curses_realign_y;
|
||||
extern int curses_tab_width;
|
||||
extern int curses_character;
|
||||
extern int curses_signal;
|
||||
extern int curses_screen_width;
|
||||
extern int curses_screen_height;
|
||||
extern int curses_active;
|
||||
|
||||
extern char curses_character;
|
||||
|
||||
extern void curses_configure (void);
|
||||
extern void curses_synchronize (void);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user