links

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

Commit: a2c4ea594e0803ab56c9efa494856429a11bcb34
Parent: 3b14d8f2167776cbcf3cdfaddbaa019da4934fbf
Author: 0x766F6964
Date:   Fri, 17 Jul 2020 15:23:04 -0600

remove img.c

Diffstat:
MMakefile | 1-
Mhtml.c | 6------
Dimg.c | 20--------------------
Mlinks.h | 2--
Msession.c | 1-
5 files changed, 0 insertions(+), 30 deletions(-)

diff --git a/Makefile b/Makefile @@ -22,7 +22,6 @@ SRC = \ html_tbl.c\ http.c\ https.c\ - img.c\ kbd.c\ language.c\ listedit.c\ diff --git a/html.c b/html.c @@ -1108,18 +1108,12 @@ static void html_obj(unsigned char *a, int obj) free(ju); } } - if (type && known_image_type(type)) { - html_img(a); - if (obj == 1) html_top.invisible = INVISIBLE; - goto ret; - } url = get_url_val(a, cast_uchar "src"); if (!url) url = get_url_val(a, cast_uchar "data"); if (url) { put_link_line(cast_uchar "", !obj ? cast_uchar "[EMBED]" : cast_uchar "[OBJ]", url, cast_uchar ""); free(url); } - ret: if (base) { free(format_.href_base); format_.href_base = old_base; diff --git a/img.c b/img.c @@ -1,20 +0,0 @@ -/* img.c - * Generic image decoding and PNG and JPG decoders. - * (c) 2002 Karel 'Clock' Kulhavy - * This is a part of the Links program, released under GPL. - - * Used in graphics mode of Links only - TODO: odstranit zbytecne ditherovani z strip_optimized header_dimensions_known, - protoze pozadi obrazku musi byt stejne jako pozadi stranky, a to se nikdy - neditheruje, protoze je to vzdy jednolita barva. Kdyz uz to nepujde - odstranit tak tam aspon dat fixne zaokrouhlovani. - TODO: dodelat stripy do jpegu a png a tiff. - */ - -#include "links.h" - -int -known_image_type(unsigned char *type) -{ - return 0; -} diff --git a/links.h b/links.h @@ -2187,8 +2187,6 @@ struct f_data_c *current_frame(struct session *); void reset_form(struct f_data_c *f, int form_num); void set_textarea(struct session *, struct f_data_c *, int); -int known_image_type(unsigned char *type); - /* html.c */ enum html_attr { diff --git a/session.c b/session.c @@ -1811,7 +1811,6 @@ static int plain_type(struct object_request *rq, unsigned char **p) if (!casestrcmp(ct, cast_uchar "text/plain") || !casestrcmp(ct, cast_uchar "file/txt")) goto ff; r = 2; - if (F && known_image_type(ct)) goto ff; r = -1; ff: