Get it compiling again

This commit is contained in:
Kovid Goyal 2016-11-12 17:35:24 +05:30
parent bead388d81
commit 62fc6cc4a0
2 changed files with 58 additions and 4 deletions

View File

@ -26,6 +26,7 @@ DECLARE_CH_SCREEN_HANDLER(shift_out)
DECLARE_CH_SCREEN_HANDLER(shift_in)
extern bool screen_draw(Screen *screen, uint8_t *buf, unsigned int buflen);
// Parse text {{{
static inline bool
read_text(Screen *screen, uint8_t *buf, unsigned int buflen, unsigned int *pos) {
bool ret;
@ -82,30 +83,39 @@ read_text(Screen *screen, uint8_t *buf, unsigned int buflen, unsigned int *pos)
DRAW_TEXT;
return true;
}
// }}}
// Parse ESC {{{
static inline bool
read_esc(Screen *screen, uint8_t *buf, unsigned int buflen, unsigned int *pos) {
read_esc(Screen *screen, uint8_t UNUSED *buf, unsigned int UNUSED buflen, unsigned int UNUSED *pos) {
screen->parser_state = NORMAL_STATE;
return true;
}
// }}}
// Parse CSI {{{
static inline bool
read_csi(Screen *screen, uint8_t *buf, unsigned int buflen, unsigned int *pos) {
read_csi(Screen *screen, uint8_t UNUSED *buf, unsigned int UNUSED buflen, unsigned int UNUSED *pos) {
screen->parser_state = NORMAL_STATE;
return true;
}
// }}}
// Parse OSC {{{
static inline bool
read_osc(Screen *screen, uint8_t *buf, unsigned int buflen, unsigned int *pos) {
read_osc(Screen *screen, uint8_t UNUSED *buf, unsigned int UNUSED buflen, unsigned int UNUSED *pos) {
screen->parser_state = NORMAL_STATE;
return true;
}
// }}}
// Parse DCS {{{
static inline bool
read_dcs(Screen *screen, uint8_t *buf, unsigned int buflen, unsigned int *pos) {
read_dcs(Screen *screen, uint8_t UNUSED *buf, unsigned int UNUSED buflen, unsigned int UNUSED *pos) {
screen->parser_state = NORMAL_STATE;
return true;
}
// }}}
PyObject*
#ifdef DUMP_COMMANDS

View File

@ -44,6 +44,50 @@ dealloc(Screen* self) {
Py_TYPE(self)->tp_free((PyObject*)self);
}
bool screen_bell(Screen UNUSED *scr, uint8_t ch) {
FILE *f = fopen("/dev/tty", "w");
if (f != NULL) {
fwrite(&ch, 1, 1, f);
fclose(f);
}
return true;
}
bool screen_draw(Screen UNUSED *scr, uint8_t UNUSED ch) {
// TODO: Implement this
return true;
}
bool screen_backspace(Screen UNUSED *scr, uint8_t UNUSED ch) {
// TODO: Implement this
return true;
}
bool screen_tab(Screen UNUSED *scr, uint8_t UNUSED ch) {
// TODO: Implement this
return true;
}
bool screen_linefeed(Screen UNUSED *scr, uint8_t UNUSED ch) {
// TODO: Implement this
return true;
}
bool screen_carriage_return(Screen UNUSED *scr, uint8_t UNUSED ch) {
// TODO: Implement this
return true;
}
bool screen_shift_out(Screen UNUSED *scr, uint8_t UNUSED ch) {
// TODO: Implement this
return true;
}
bool screen_shift_in(Screen UNUSED *scr, uint8_t UNUSED ch) {
// TODO: Implement this
return true;
}
// Boilerplate {{{