links

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

Commit: af26ed9d847b3a038b9628a7dd0786a166d3b498
Parent: 4fbbe3bd00e756b507b0d14c02b1cdf09d09ef68
Author: opask
Date:   Thu, 19 Jul 2018 17:43:22 -0600

remove unused/empty functions

Diffstat:
Mdefault.c | 6------
Mdip.c | 1-
Mhtml.c | 39++-------------------------------------
Mhtml_gr.c | 27+++++++++++++--------------
Mhtml_r.c | 16+++++-----------
Mhtml_tbl.c | 4----
Mkbd.c | 2--
Mlinks.h | 11-----------
Mselect.c | 3---
Msession.c | 4+---
Mterminal.c | 25-------------------------
Mview.c | 19-------------------
12 files changed, 21 insertions(+), 136 deletions(-)

diff --git a/default.c b/default.c @@ -991,12 +991,6 @@ static unsigned char *set_cmd(struct option *o, unsigned char ***argv, int *argc return NULL; } -static unsigned char *unset_cmd(struct option *o, unsigned char ***argv, int *argc) -{ - *(int *)o->ptr = 0; - return NULL; -} - static unsigned char *setstr_cmd(struct option *o, unsigned char ***argv, int *argc) { if (!*argc) return cast_uchar "Parameter expected"; diff --git a/dip.c b/dip.c @@ -2275,7 +2275,6 @@ void get_links_icon(unsigned char **data, int *width, int *height, int *skip, in b.skip=b.x*(drv->depth&7); while (b.skip % pad) b.skip++; *skip=b.skip; - retry: b.data = *data = xmalloc(b.skip * b.y); tmp1 = xmalloc(6 * b.y * b.x); agx_24_to_48(tmp1,links_icon,b.x*b.y,g,g,g); diff --git a/html.c b/html.c @@ -182,7 +182,6 @@ unsigned char *get_attr_val(unsigned char *e, unsigned char *name) if (b != a) memmove(a, b, strlen(cast_const_char b) + 1); for (b = a + strlen(cast_const_char a) - 1; b >= a && *b == ' '; b--) *b = 0; } - set_mem_comment(a, name, (int)strlen(cast_const_char name)); return a; } goto aa; @@ -546,7 +545,6 @@ void kill_html_stack_item(struct html_element *e) if (e->attr.href_base) mem_free(e->attr.href_base); if (e->attr.target_base) mem_free(e->attr.target_base); if (e->attr.select) mem_free(e->attr.select); - free_js_event_spec(e->attr.js_event); del_from_list(e); mem_free(e); } @@ -584,31 +582,12 @@ void html_stack_dup(void) e->attr.href_base = stracpy(ep->attr.href_base); e->attr.target_base = stracpy(ep->attr.target_base); e->attr.select = stracpy(ep->attr.select); - copy_js_event_spec(&e->attr.js_event, ep->attr.js_event); - /*if (e->name) { - if (e->attr.link) set_mem_comment(e->attr.link, e->name, e->namelen); - if (e->attr.target) set_mem_comment(e->attr.target, e->name, e->namelen); - if (e->attr.image) set_mem_comment(e->attr.image, e->name, e->namelen); - if (e->attr.href_base) set_mem_comment(e->attr.href_base, e->name, e->namelen); - if (e->attr.target_base) set_mem_comment(e->attr.target_base, e->name, e->namelen); - if (e->attr.select) set_mem_comment(e->attr.select, e->name, e->namelen); - }*/ e->name = e->options = NULL; e->namelen = 0; e->dontkill = 0; add_to_list(html_stack, e); } - -static int get_js_events_x(struct js_event_spec **spec, unsigned char *a) -{ - return 0; -} -static int get_js_events(unsigned char *a) -{ - return 0; -} - void *ff; void (*put_chars_f)(void *, unsigned char *, int); void (*line_break_f)(void *); @@ -915,32 +894,27 @@ static void html_span(unsigned char *a) static void html_bold(unsigned char *a) { - get_js_events(a); format_.attr |= AT_BOLD; } static void html_italic(unsigned char *a) { - get_js_events(a); format_.attr |= AT_ITALIC; } static void html_underline(unsigned char *a) { - get_js_events(a); format_.attr |= AT_UNDERLINE; } static void html_fixed(unsigned char *a) { - get_js_events(a); format_.attr |= AT_FIXED; } static void html_invert(unsigned char *a) { struct rgb rgb; - get_js_events(a); memcpy(&rgb, &format_.fg, sizeof(struct rgb)); memcpy(&format_.fg, &format_.bg, sizeof(struct rgb)); memcpy(&format_.bg, &rgb, sizeof(struct rgb)); @@ -951,8 +925,6 @@ static void html_a(unsigned char *a) { unsigned char *al; - int ev = get_js_events(a); - if ((al = get_url_val(a, cast_uchar "href"))) { unsigned char *all = al; while (all[0] == ' ') all++; @@ -969,7 +941,8 @@ static void html_a(unsigned char *a) } /*format_.attr ^= AT_BOLD;*/ set_link_attr(); - } else if (!ev) kill_html_stack_item(&html_top); + } else + kill_html_stack_item(&html_top); if ((al = get_attr_val(a, cast_uchar "name"))) { special_f(ff, SP_TAG, al); mem_free(al); @@ -992,7 +965,6 @@ static void html_a_special(unsigned char *a, unsigned char *next, unsigned char static void html_sub(unsigned char *a) { if (!F) put_chrs(cast_uchar "_", 1); - get_js_events(a); format_.fontsize = 1; format_.baseline = -1; } @@ -1000,7 +972,6 @@ static void html_sub(unsigned char *a) static void html_sup(unsigned char *a) { if (!F) put_chrs(cast_uchar "^", 1); - get_js_events(a); format_.fontsize = 1; if (format_.baseline <= 0) format_.baseline = format_.fontsize; } @@ -1046,7 +1017,6 @@ static void html_img(unsigned char *a) unsigned char *orig_link = NULL; int ismap, usemap = 0; /*put_chrs(cast_uchar " ", 1);*/ - get_js_events(a); if ((!F || !d_opt->display_images) && ((al = get_url_val(a, cast_uchar "usemap")))) { unsigned char *u; usemap = 1; @@ -1739,7 +1709,6 @@ static void html_button(unsigned char *a) } mem_free(al); xxx: - get_js_events(a); fc->form_num = last_form_tag ? (int)(last_form_tag - startf) : 0; fc->ctrl_num = last_form_tag ? (int)(a - last_form_tag) : (int)(a - startf); fc->position = (int)(a - startf); @@ -1865,7 +1834,6 @@ static void html_input(unsigned char *a) put_chrs(cast_uchar " ", 1); html_stack_dup(); format_.form = fc; - get_js_events(a); switch (fc->type) { case FC_TEXT: case FC_PASSWORD: @@ -2279,7 +2247,6 @@ static int do_html_select(unsigned char *attr, unsigned char *html, unsigned cha format_.fontsize = 3; put_chrs(cast_uchar "[", 1); html_stack_dup(); - get_js_events(attr); format_.form = fc; format_.attr |= AT_BOLD | AT_FIXED; format_.fontsize = 3; @@ -2359,7 +2326,6 @@ static void do_html_textarea(unsigned char *attr, unsigned char *html, unsigned if (rows > 1) ln_break(1); else put_chrs(cast_uchar " ", 1); html_stack_dup(); - get_js_events(attr); format_.form = fc; format_.attr = AT_BOLD | AT_FIXED; #ifdef G @@ -3329,7 +3295,6 @@ void scan_http_equiv(unsigned char *s, unsigned char *eof, unsigned char **head, if (namelen == 4 && !casecmp(name, cast_uchar "BODY", 4)) { if (background) *background = get_attr_val(attr, cast_uchar "background"), background = NULL; if (bgcolor) *bgcolor = get_attr_val(attr, cast_uchar "bgcolor"), bgcolor = NULL; - if (j) get_js_events_x(j, attr); /*return;*/ } if (title && !tlen && namelen == 5 && !casecmp(name, cast_uchar "TITLE", 5)) { diff --git a/html_gr.c b/html_gr.c @@ -718,10 +718,13 @@ static void g_put_chars(void *p_, unsigned char *s, int l) g_nobreak = 0; if (p->cx < par_format.leftmargin * G_HTML_MARGIN) p->cx = par_format.leftmargin * G_HTML_MARGIN; if (html_format_changed) { - if (memcmp(&ta_cache, &format_, sizeof(struct text_attrib_beginning)) || xstrcmp(cached_font_face, format_.fontface) || cached_font_face == to_je_ale_prasarna || - xstrcmp(format_.link, last_link) || xstrcmp(format_.target, last_target) || - xstrcmp(format_.image, last_image) || format_.form != last_form - || ((format_.js_event || last_js_event) && compare_js_event_spec(format_.js_event, last_js_event)) ) { + if (memcmp(&ta_cache, &format_, sizeof(struct text_attrib_beginning)) + || xstrcmp(cached_font_face, format_.fontface) + || cached_font_face == to_je_ale_prasarna + || xstrcmp(format_.link, last_link) + || xstrcmp(format_.target, last_target) + || xstrcmp(format_.image, last_image) + || format_.form != last_form) { /*if (!html_format_changed) internal("html_format_changed not set");*/ flush_pending_text_to_line(p); if (xstrcmp(cached_font_face, format_.fontface) || cached_font_face == to_je_ale_prasarna) { @@ -807,11 +810,12 @@ static void g_put_chars(void *p_, unsigned char *s, int l) /* !!! WARNING: THE FOLLOWING CODE IS SHADOWED IN HTML_R.C */ process_link: - if ((last_link /*|| last_target*/ || last_image || last_form) && - !putchars_link_ptr && - !xstrcmp(format_.link, last_link) && !xstrcmp(format_.target, last_target) && - !xstrcmp(format_.image, last_image) && format_.form == last_form - && ((!format_.js_event && !last_js_event) || !compare_js_event_spec(format_.js_event, last_js_event))) { + if ((last_link /*|| last_target*/ || last_image || last_form) + && !putchars_link_ptr + && !xstrcmp(format_.link, last_link) + && !xstrcmp(format_.target, last_target) + && !xstrcmp(format_.image, last_image) + && format_.form == last_form) { if (!p->data) goto back_link; if (!p->data->nlinks) { internal("no link"); @@ -823,7 +827,6 @@ static void g_put_chars(void *p_, unsigned char *s, int l) if (last_link) mem_free(last_link); if (last_target) mem_free(last_target); if (last_image) mem_free(last_image); - free_js_event_spec(last_js_event); last_link = last_target = last_image = NULL; last_form = NULL; last_js_event = NULL; @@ -851,12 +854,10 @@ static void g_put_chars(void *p_, unsigned char *s, int l) last_target = stracpy(format_.target); last_image = stracpy(format_.image); last_form = format_.form; - copy_js_event_spec(&last_js_event, format_.js_event); if (!p->data) goto back_link; if (!(link = new_link(p->data))) goto back_link; link->num = p->link_num - 1; link->pos = DUMMY; - copy_js_event_spec(&link->js_event, format_.js_event); if (!last_form) { link->type = L_LINK; link->where = stracpy(last_link); @@ -910,7 +911,6 @@ struct g_part *g_format_html_part(unsigned char *start, unsigned char *end, int if (last_link) mem_free(last_link); if (last_image) mem_free(last_image); if (last_target) mem_free(last_target); - free_js_event_spec(last_js_event); last_link = last_image = last_target = NULL; last_form = NULL; last_js_event = NULL; @@ -982,7 +982,6 @@ struct g_part *g_format_html_part(unsigned char *start, unsigned char *end, int if (last_link) mem_free(last_link); if (last_image) mem_free(last_image); if (last_target) mem_free(last_target); - free_js_event_spec(last_js_event); last_link = last_image = last_target = NULL; last_form = NULL; last_js_event = NULL; diff --git a/html_r.c b/html_r.c @@ -124,7 +124,6 @@ static void clear_formatted(struct f_data *scr) if (l->where_img) mem_free(l->where_img); if (l->img_alt) mem_free(l->img_alt); if (l->pos) mem_free(l->pos); - free_js_event_spec(l->js_event); } mem_free(scr->links); if (!F) for (y = 0; y < scr->y; y++) mem_free(scr->data[y].d); @@ -698,11 +697,11 @@ static void put_chars(void *p_, unsigned char *c, int l) /* !!! WARNING: THE FOLLOWING CODE IS SHADOWED IN HTML_GR.C */ process_link: - if ((last_link || last_image || last_form) && - !xstrcmp(format_.link, last_link) && !xstrcmp(format_.target, last_target) && - !xstrcmp(format_.image, last_image) && format_.form == last_form - && ((!format_.js_event && !last_js_event) || !compare_js_event_spec(format_.js_event, last_js_event)) - ) { + if ((last_link || last_image || last_form) + && !xstrcmp(format_.link, last_link) + && !xstrcmp(format_.target, last_target) + && !xstrcmp(format_.image, last_image) + && format_.form == last_form) { if (!p->data) goto x; link = &p->data->links[p->data->nlinks - 1]; if (!p->data->nlinks) { @@ -715,7 +714,6 @@ static void put_chars(void *p_, unsigned char *c, int l) if (last_link) mem_free(last_link); if (last_target) mem_free(last_target); if (last_image) mem_free(last_image); - free_js_event_spec(last_js_event); last_link = last_target = last_image = NULL; last_form = NULL; last_js_event = NULL; @@ -753,12 +751,10 @@ static void put_chars(void *p_, unsigned char *c, int l) last_target = stracpy(format_.target); last_image = stracpy(format_.image); last_form = format_.form; - copy_js_event_spec(&last_js_event, format_.js_event); if (!p->data) goto no_l; if (!(link = new_link(p->data))) goto no_l; link->num = p->link_num - 1; link->pos = DUMMY; - copy_js_event_spec(&link->js_event, format_.js_event); if (!last_form) { link->type = L_LINK; link->where = stracpy(last_link); @@ -1028,7 +1024,6 @@ struct part *format_html_part(unsigned char *start, unsigned char *end, int alig if (last_link) mem_free(last_link); if (last_image) mem_free(last_image); if (last_target) mem_free(last_target); - free_js_event_spec(last_js_event); last_link = last_image = last_target = NULL; last_form = NULL; last_js_event = NULL; @@ -1070,7 +1065,6 @@ struct part *format_html_part(unsigned char *start, unsigned char *end, int alig if (last_link) mem_free(last_link); if (last_image) mem_free(last_image); if (last_target) mem_free(last_target); - free_js_event_spec(last_js_event); while (&html_top != e) { kill_html_stack_item(&html_top); if (!&html_top || (void *)&html_top == (void *)&html_stack) { diff --git a/html_tbl.c b/html_tbl.c @@ -718,7 +718,6 @@ static void dst_width(int *p, int n, int w, int *lim) static int get_vline_width(struct table *t, int col) { /* return: -1 none, 0, space, 1 line, 2 double */ int w = 0; - NO_GFX; if (!col) return -1; if (t->rules == R_COLS || t->rules == R_ALL) w = t->cellsp; else if (t->rules == R_GROUPS) w = col < t->c && t->cols[col].group; @@ -729,7 +728,6 @@ static int get_vline_width(struct table *t, int col) static int get_hline_width(struct table *t, int row) { int w = 0; - NO_GFX; if (!row) return -1; if (t->rules == R_ROWS || t->rules == R_ALL) { x: @@ -750,7 +748,6 @@ static int g_get_vline_pad(struct table *t, int col, int *plpos, int *plsize) { int pad, lpos, lsize; int border; - NO_TXT; if (!col || col == t->x) { border = (!col && t->frame & F_LHS) || (col == t->x && t->frame & F_RHS) ? t->border : 0; pad = safe_add(safe_add(border, t->cellsp), t->cellpd); @@ -777,7 +774,6 @@ static int g_get_hline_pad(struct table *t, int row, int *plpos, int *plsize) { int pad, lpos, lsize; int border; - NO_TXT; if (!row || row == t->y) { border = (!row && t->frame & F_ABOVE) || (row == t->y && t->frame & F_BELOW) ? t->border : 0; pad = safe_add(safe_add(border, t->cellsp), t->cellpd); diff --git a/kbd.c b/kbd.c @@ -361,7 +361,6 @@ void handle_trm(int std_in, int std_out, int sock_in, int sock_out, int ctl_in, static void unblock_itrm_x(void *h) { - NO_GFX; close_handle(h); if (!ditrm) return; unblock_itrm(0); @@ -386,7 +385,6 @@ int unblock_itrm(int fd) void block_itrm(int fd) { struct itrm *itrm = ditrm; - NO_GFX; if (!itrm) return; if (itrm->blocked) return; itrm->blocked = fd + 1; diff --git a/links.h b/links.h @@ -187,9 +187,6 @@ static inline void sig_fill_set(sigset_t *set) extern int F; #endif -#define NO_GFX do {} while (0) -#define NO_TXT do {} while (0) - #ifndef G #define gf_val(x, y) (x) #define GF(x) @@ -296,15 +293,12 @@ void *mem_realloc_(void *p, size_t size, int mayfail); static inline void *debug_mem_calloc(unsigned char *f, int l, size_t s, int mayfail) { return mem_calloc_(s, mayfail); } static inline void debug_mem_free(unsigned char *f, int l, void *p) { mem_free(p); } static inline void *debug_mem_realloc(unsigned char *f, int l, void *p, size_t s, int mayfail) { return mem_realloc_(p, s, mayfail); } -static inline void set_mem_comment(void *p, unsigned char *c, int l) {} static inline unsigned char *get_mem_comment(void *p){return (unsigned char *)"";} unsigned char *memacpy(const unsigned char *src, size_t len); unsigned char *stracpy(const unsigned char *src); #define pr(code) if (1) {code;} else -static inline void nopr(void) {} -static inline void xpr(void) {} /* inline */ @@ -3122,11 +3116,6 @@ void reset_form(struct f_data_c *f, int form_num); void set_textarea(struct session *, struct f_data_c *, int); void free_format_text_cache(void); -void copy_js_event_spec(struct js_event_spec **, struct js_event_spec *); -int join_js_event_spec(struct js_event_spec **, struct js_event_spec *); -void free_js_event_spec(struct js_event_spec *); -void create_js_event_spec(struct js_event_spec **); -int compare_js_event_spec(struct js_event_spec *, struct js_event_spec *); unsigned char *print_js_event_spec(struct js_event_spec *); /* font_inc.c */ diff --git a/select.c b/select.c @@ -858,7 +858,6 @@ void select_loop(void (*init)(void)) if (terminate_loop) break; do_event_loop(EVLOOP_ONCE); } - nopr(); } else #endif @@ -953,12 +952,10 @@ void select_loop(void (*init)(void)) } n -= k; } - nopr(); } #ifdef DEBUG_CALLS fprintf(stderr, "exit loop\n"); #endif - nopr(); } void terminate_select(void) diff --git a/session.c b/session.c @@ -1466,7 +1466,6 @@ struct f_data *cached_format_html(struct f_data_c *fd, struct object_request *rq if (ses) { if (fd->f_data && !strcmp(cast_const_char fd->f_data->rq->url, cast_const_char url) && !compare_opt(&fd->f_data->opt, opt) && is_format_cache_entry_uptodate(fd->f_data)) { f = fd->f_data; - xpr(); goto ret_f; } foreach(struct f_data, f, lf, ses->format_cache) { @@ -1482,7 +1481,6 @@ struct f_data *cached_format_html(struct f_data_c *fd, struct object_request *rq f->fd = fd; if (cch) *cch = 1; f_data_attach(fd, f); - xpr(); goto ret_f; } } @@ -2610,7 +2608,7 @@ void map_selected(struct terminal *term, void *ld_, void *ses_) struct session *ses = (struct session *)ses_; int x = 0; if (ld->onclick) { - struct f_data_c *fd = current_frame(ses); + current_frame(ses); x = 1; } if (ld->link) goto_url_f(ses, NULL, ld->link, ld->target, current_frame(ses), -1, x, 0, 0); diff --git a/terminal.c b/terminal.c @@ -96,7 +96,6 @@ static void set_margin(struct terminal *term) static void alloc_term_screen(struct terminal *term) { chr *s, *t; - NO_GFX; if (term->x < 0) term->x = 1; if (term->y < 0) term->y = 1; if (term->x && (unsigned)term->x * (unsigned)term->y / (unsigned)term->x != (unsigned)term->y) overalloc(); @@ -114,7 +113,6 @@ static void alloc_term_screen(struct terminal *term) static void clear_terminal(struct terminal *term) { - NO_GFX; fill_area(term, 0, 0, term->x, term->y, ' ', 0); set_cursor(term, 0, 0, 0, 0); } @@ -126,7 +124,6 @@ void redraw_below_window(struct window *win) struct window *w; struct list_head *lw; struct links_event ev = { EV_REDRAW, 0, 0, 0 }; - NO_GFX; ev.x = term->x; ev.y = term->y; if (term->redrawing >= 2) return; @@ -145,7 +142,6 @@ static void redraw_terminal_ev(struct terminal *term, int e) struct window *win; struct list_head *lwin; struct links_event ev = {0, 0, 0, 0}; - NO_GFX; ev.ev = e; ev.x = term->x; ev.y = term->y; @@ -157,19 +153,16 @@ static void redraw_terminal_ev(struct terminal *term, int e) static void redraw_terminal(struct terminal *term) { - NO_GFX; redraw_terminal_ev(term, EV_REDRAW); } static void redraw_terminal_all(struct terminal *term) { - NO_GFX; redraw_terminal_ev(term, EV_RESIZE); } static void erase_screen(struct terminal *term) { - NO_GFX; if (!term->master || !is_blocked()) { if (term->master) want_draw(); hard_write(term->fdout, cast_uchar "\033[2J\033[1;1H", 10); @@ -179,7 +172,6 @@ static void erase_screen(struct terminal *term) static void redraw_terminal_cls(struct terminal *term) { - NO_GFX; erase_screen(term); set_margin(term); alloc_term_screen(term); @@ -405,7 +397,6 @@ void set_window_pos(struct window *win, int x1, int y1, int x2, int y2) { struct terminal *term = win->term; struct rect r; - NO_TXT; r.x1 = x1, r.y1 = y1, r.x2 = x2, r.y2 = y2; if (is_rect_valid(&win->pos) && (x1 > win->pos.x1 || x2 < win->pos.x2 || y1 > win->pos.y1 || y2 < win->pos.y2) && term->redrawing < 2) { struct window *w; @@ -564,7 +555,6 @@ static struct term_spec *get_term_spec(unsigned char *term) { struct term_spec *t; struct list_head *lt; - NO_GFX; foreach(struct term_spec, t, lt, term_specs) if (!casestrcmp(t->term, term)) return t; return default_term_spec(term); } @@ -595,7 +585,6 @@ struct terminal *init_term(int fdin, int fdout, void (*root_window)(struct windo static tcount terminal_count = 0; struct terminal *term; struct window *win; - NO_GFX; term = mem_calloc(sizeof(struct terminal)); term->count = terminal_count++; term->fdin = fdin; @@ -661,7 +650,6 @@ struct terminal *init_gfx_term(void (*root_window)(struct window *, struct links struct terminal *term; struct graphics_device *dev; struct window *win; - NO_TXT; term = mem_calloc(sizeof(struct terminal)); term->count = terminal_count++; term->fdin = -1; @@ -798,7 +786,6 @@ static void in_term(void *term_) struct links_event *ev; int r; unsigned char *iq; - NO_GFX; if ((unsigned)term->qlen + ALLOC_GR > MAXINT) overalloc(); iq = mem_realloc(term->input_queue, term->qlen + ALLOC_GR); term->input_queue = iq; @@ -1011,7 +998,6 @@ static void redraw_screen(struct terminal *term) int mode = -1; int l = 0; struct term_spec *s; - NO_GFX; if (!term->dirty || (term->master && is_blocked())) return; a = init_str(); s = term->spec; @@ -1152,7 +1138,6 @@ static void check_if_no_terminal(void) void set_char(struct terminal *t, int x, int y, unsigned ch, unsigned char at) { - NO_GFX; t->dirty = 1; if (x >= 0 && x < t->x && y >= 0 && y < t->y) { chr *cc = &t->screen[x + t->x * y]; @@ -1163,7 +1148,6 @@ void set_char(struct terminal *t, int x, int y, unsigned ch, unsigned char at) chr *get_char(struct terminal *t, int x, int y) { - NO_GFX; if (!t->x || !t->y) { static chr empty; empty.ch = ' '; @@ -1179,7 +1163,6 @@ chr *get_char(struct terminal *t, int x, int y) void set_color(struct terminal *t, int x, int y, unsigned char c) { - NO_GFX; t->dirty = 1; if (x >= 0 && x < t->x && y >= 0 && y < t->y) t->screen[x + t->x * y].at = (t->screen[x + t->x * y].at & ATTR_FRAME) | (c & ~ATTR_FRAME); } @@ -1187,7 +1170,6 @@ void set_color(struct terminal *t, int x, int y, unsigned char c) void set_only_char(struct terminal *t, int x, int y, unsigned ch, unsigned char at) { chr *cc; - NO_GFX; t->dirty = 1; cc = get_char(t, x, y); at = (at & ATTR_FRAME) | (cc->at & ~ATTR_FRAME); @@ -1198,7 +1180,6 @@ void set_line(struct terminal *t, int x, int y, int l, chr *line) { int i; chr *cc; - NO_GFX; t->dirty = 1; if (y < 0 || y >= t->y) return; i = x >= 0 ? 0 : -x; @@ -1212,7 +1193,6 @@ void set_line(struct terminal *t, int x, int y, int l, chr *line) void set_line_color(struct terminal *t, int x, int y, int l, unsigned char c) { int i; - NO_GFX; t->dirty = 1; if (y < 0 || y >= t->y) return; for (i = x >= 0 ? 0 : -x; i < (x+l <= t->x ? l : t->x-x); i++) @@ -1223,7 +1203,6 @@ void fill_area(struct terminal *t, int x, int y, int xw, int yw, unsigned ch, un { int i; chr *p, *ps; - NO_GFX; if (x < 0) xw += x, x = 0; if (x + xw > t->x) xw = t->x - x; if (xw <= 0) return; @@ -1250,7 +1229,6 @@ static int p2[] = { 201, 187, 200, 188, 186, 205 }; void draw_frame(struct terminal *t, int x, int y, int xw, int yw, unsigned char c, int w) { int *p = w > 1 ? p2 : p1; - NO_GFX; c |= ATTR_FRAME; set_char(t, x, y, p[0], c); set_char(t, x+xw-1, y, p[1], c); @@ -1264,7 +1242,6 @@ void draw_frame(struct terminal *t, int x, int y, int xw, int yw, unsigned char void print_text(struct terminal *t, int x, int y, int l, unsigned char *text, unsigned char c) { - NO_GFX; for (; l--; x++) { unsigned u = GET_TERM_CHAR(t, &text); if (!u) break; @@ -1274,7 +1251,6 @@ void print_text(struct terminal *t, int x, int y, int l, unsigned char *text, un void set_cursor(struct terminal *term, int x, int y, int altx, int alty) { - NO_GFX; term->dirty = 1; if (term->spec->block_cursor && !term->spec->braille) x = altx, y = alty; if (x >= term->x) x = term->x - 1; @@ -1421,7 +1397,6 @@ void do_terminal_function(struct terminal *term, unsigned char code, unsigned ch { unsigned char *x_data; int x_datal; - NO_GFX; x_data = init_str(); x_datal = 0; add_chr_to_str(&x_data, &x_datal, 0); diff --git a/view.c b/view.c @@ -45,24 +45,6 @@ void destroy_vs(struct view_state *vs) mem_free(vs); } -void free_js_event_spec(struct js_event_spec *j) -{ -} - -int compare_js_event_spec(struct js_event_spec *j1, struct js_event_spec *j2) -{ - return 0; -} - -void copy_js_event_spec(struct js_event_spec **target, struct js_event_spec *source) -{ -} - -int join_js_event_spec(struct js_event_spec **target, struct js_event_spec *source) -{ - return 0; -} - unsigned char *print_js_event_spec(struct js_event_spec *j) { return stracpy(cast_uchar ""); @@ -159,7 +141,6 @@ void sort_links(struct f_data *f) if (link->where_img) mem_free(link->where_img); if (link->img_alt) mem_free(link->img_alt); if (link->pos) mem_free(link->pos); - free_js_event_spec(link->js_event); memmove(link, link + 1, (f->nlinks - i - 1) * sizeof(struct link)); f->nlinks--; i--;