links

lynx-like text mode web browser
git clone anongit@rnpnr.xyz:links.git
Log | Files | Refs | Feed | README | LICENSE

Commit: 9c0cbc7764199061fe7ba88851d9268bf29deff0
Parent: 0b029a25ec9fbd8df126e8e69c9d546bf353172f
Author: opask
Date:   Tue,  7 Aug 2018 23:45:18 -0600

remove dummy funcs in drivers.c

Diffstat:
Mdrivers.c | 13+------------
Mlinks.h | 6------
Mmain.c | 11+----------
Mterminal.c | 21++-------------------
Mx.c | 2--
5 files changed, 4 insertions(+), 49 deletions(-)

diff --git a/drivers.c b/drivers.c @@ -18,16 +18,6 @@ static struct graphics_driver *graphics_drivers[] = { NULL }; -int dummy_block(struct graphics_device *dev) -{ - return 0; -} - -int dummy_unblock(struct graphics_device *dev) -{ - return 0; -} - /* Driver je jednorazovy argument, kterej se preda grafickymu driveru, nikde se dal * neuklada. Param se skladuje v default_driver param a uklada se do konfiguraku. Pred * ukoncenim grafickeho driveru se nastavi default_driver_param podle @@ -48,8 +38,7 @@ static unsigned char *init_graphics_driver(struct graphics_driver *gd, unsigned free(gd->shell); gd->shell = NULL; drv = NULL; - } - else + } else F = 1; return r; } diff --git a/links.h b/links.h @@ -1148,9 +1148,6 @@ struct graphics_driver { void (*flush)(struct graphics_device *dev); - int (*block)(struct graphics_device *dev); /* restore old videomode and disable drawing on terminal */ - int (*unblock)(struct graphics_device *dev); /* reenable the terminal (return -1 if failed) */ - void (*set_title)(struct graphics_device *dev, unsigned char *title); /* set window title. title is in utf-8 encoding -- you should recode it to device charset */ /* if device doesn't support titles (svgalib, framebuffer), this should be NULL, not empty function ! */ @@ -1227,9 +1224,6 @@ void shutdown_graphics(void); void update_driver_param(void); int g_kbd_codepage(struct graphics_driver *drv); -int dummy_block(struct graphics_device *); -int dummy_unblock(struct graphics_device *); - extern struct graphics_device **virtual_devices; extern int n_virtual_devices; extern struct graphics_device *current_virtual_device; diff --git a/main.c b/main.c @@ -84,11 +84,6 @@ void sig_tstp(void *t_) #endif if (!F) block_itrm(1); -#ifdef G - else { - drv->block(NULL); - } -#endif #if defined(SIGCONT) && defined(SIGTTOU) EINTRLOOP(newpid, fork()); if (!newpid) { @@ -123,7 +118,7 @@ static void poll_fg(void *t_) r = unblock_itrm(1); #ifdef G else - r = drv->unblock(NULL); + r = 0; #endif if (r == -1) fg_poll_timer = install_timer(FG_POLL_TIME, poll_fg, t); @@ -139,10 +134,6 @@ void sig_cont(void *t_) { if (!F) unblock_itrm(1); -#ifdef G - else - drv->unblock(NULL); -#endif } static void handle_basic_signals(struct terminal *term) diff --git a/terminal.c b/terminal.c @@ -1320,10 +1320,6 @@ static void unblock_terminal(void *term_) event - so avoid double redraw */ term->dirty = 0; /*redraw_terminal_cls(term);*/ -#ifdef G - } else { - drv->unblock(term->dev); -#endif } } @@ -1370,24 +1366,11 @@ void exec_on_terminal(struct terminal *term, unsigned char *path, unsigned char add_to_str(&param, &paraml, path); add_chr_to_str(&param, &paraml, 0); add_to_str(&param, &paraml, delet); - if (fg == 1) { + if (fg == 1) if (!F) block_itrm(term->fdin); -#ifdef G - else if (drv->block(term->dev)) { - free(param); - if (*delet) - EINTRLOOP(rs, unlink(cast_const_char delet)); - return; - } -#endif - } if ((blockh = start_thread(exec_thread, param, paraml + 1, *delet != 0)) == -1) { - if (fg == 1) { + if (fg == 1) if (!F) unblock_itrm(term->fdin); -#ifdef G - else drv->unblock(term->dev); -#endif - } free(param); return; } diff --git a/x.c b/x.c @@ -2145,8 +2145,6 @@ struct graphics_driver x_driver = { x_scroll, x_set_clip_area, x_flush, - dummy_block, - dummy_unblock, x_set_window_title, x_exec, x_set_clipboard_text,