Commit: 18b24f8eae7c05c9e54b2d676330fa514db9b2ae
Parent: 59862c0b6b58946d98818a774a4c288fbe328707
Author: 0x766F6964
Date: Fri, 18 Oct 2019 08:27:27 -0600
merge relevant changes from links-2.19
Except for freetype support, it will be evaluated in its own branch.
Diffstat:
M | AUTHORS | | | 10 | +++++----- |
M | ChangeLog | | | 35 | +++++++++++++++++++++++++++++++++-- |
M | bfu.c | | | 31 | +++++++++++++++---------------- |
M | cache.c | | | 1 | + |
M | connect.c | | | 5 | ++++- |
M | html.c | | | 9 | +++++---- |
M | html_gr.c | | | 8 | ++++---- |
M | html_r.c | | | 13 | +++---------- |
M | http.c | | | 6 | ++++-- |
M | https.c | | | 71 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
M | kbd.c | | | 2 | +- |
M | language.h | | | 1394 | ++++++++++++++++++++++++++++++++++++++++--------------------------------------- |
M | language.inc | | | 18 | +++++++++++++++++- |
M | links.1 | | | 2 | +- |
M | links.h | | | 22 | ++++++++++++++++++---- |
M | main.c | | | 6 | +++++- |
M | menu.c | | | 95 | +++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | sched.c | | | 12 | ++++++++++++ |
M | session.c | | | 54 | ++++++++++++++++++++++++++++-------------------------- |
M | setup.h | | | 14 | ++++++++------ |
M | suffix.inc | | | 82 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------- |
M | url.c | | | 4 | ++++ |
M | view.c | | | 63 | +++++++++++++++++++++++++++++++++++++++++---------------------- |
M | view_gr.c | | | 4 | ++-- |
M | x.c | | | 243 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------- |
25 files changed, 1311 insertions(+), 893 deletions(-)
diff --git a/AUTHORS b/AUTHORS
@@ -152,7 +152,7 @@ Nuno Miguel Rodrigues <nmr@europa.net.dhis.org>
Adam Harvey <matlhdam@iinet.net.au>
Fixed sometimes badly posted form
-Alberto García <berto@gpul.org>
+Alberto GarcÃa <berto@gpul.org>
Galician translation
Radovan Stas <radoone@skmi.science.upjs.sk>
@@ -192,10 +192,10 @@ Andrew Rodionoff <arnost@mail.ru>
Stefan de Groot <stefan@nllinux.nl>
Dutch translation
-Carles Sadurní Anguita <isard@ctv.es>
+Carles Sadurnà Anguita <isard@ctv.es>
Catalan translation
-Ionel Mugurel Ciobîcã
+Ionel Mugurel Ciobîcă
Romanian translation
Petr Baudis <pasky@pasky.ji.cz>
@@ -237,7 +237,7 @@ Simen Graaten <simeng@slarkware.com>
Miroslav Rudisin <miero@atrey.karlin.mff.cuni.cz>:
Updated Slovak translation
-Varga Balázs <vinnui@broadband.hu>, <vinnui@ent.hu>
+Varga Balázs <vinnui@broadband.hu>, <vinnui@ent.hu>
Updated Hungarian translation
Denis Lackovic <delacko@fly.srk.fer.hr>
@@ -270,7 +270,7 @@ Andre Valente <a.valente@netcabo.pt>
Sven Neumann <sven@convergence.de>
DirectFB graphics driver
-Mátyás János <jani@mail.xubion.hu>
+Mátyás János <jani@mail.xubion.hu>
Updated Hungarian translation
Anton 'Keeper' Kopyov <keeper@dfipm.vpti.vladimir.ru>
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,34 @@
+=== RELEASE 2.19 ===
+
+Sun Mar 31 15:59:40 CEST 2019 mikulas
+
+ Disable high-DPI scaling on Windows
+
+ Links makes it possible to specify scaling of text and images in the
+ dialog windows, so this should preferably be used instead of
+ system-level scaling
+
+Sat Mar 30 21:56:02 CET 2019 mikulas:
+
+ Fixed a crash on invalid IDN URL, such as http://test,ï.com/
+ (found by lsxvdqe@gmail.com)
+
+Tue Mar 12 23:02:33 CET 2019 mikulas:
+
+ Make it possible to select other fonts, using fontconfig and freetype
+
+Tue Feb 26 19:50:11 CET 2019 mikulas:
+
+ Show certificate authority in the "Document info" box
+
+Sat Feb 2 19:30:08 CET 2019 mikulas:
+
+ Use international error messages
+
+Sun Jan 27 18:57:34 CET 2019 mikulas:
+
+ The -dump switch didn't report an error if write to stdout failed
+
=== RELEASE 2.18 ===
Sat Jan 12 20:39:51 CET 2019 mikulas:
@@ -3021,7 +3052,7 @@ Wed Apr 9 21:12:51 cet 2003 mikulas:
Allow relative redirects in downloads
-Thu Mar 27 17:15:12 MET 2003 Mátyás János <jani@mail.xubion.hu>:
+Thu Mar 27 17:15:12 MET 2003 Mátyás János <jani@mail.xubion.hu>:
Updated Hungarian translation
@@ -3316,7 +3347,7 @@ Mon Jun 3 23:25:04 CEST 2002 mpat7421:
=== RELEASE 2.0pre6 ===
-Thu May 30 22:41:43 MET DST 2002 "Varga Balázs" <vinnui@broadband.hu>:
+Thu May 30 22:41:43 MET DST 2002 "Varga Balázs" <vinnui@broadband.hu>:
Updated Hungarian translation
diff --git a/bfu.c b/bfu.c
@@ -537,7 +537,7 @@ static void menu_func(struct window *win, struct links_event *ev, int fwd)
struct mainmenu *m2 = w1->data;
if (F && !f && ev->x >= m2->xl1 && ev->x < m2->xl2 && ev->y >= m2->yl1 && ev->y < m2->yl2) goto bbb;
#endif
- if (ev->y < gf_val(1, G_BFU_FONT_SIZE)) goto del;
+ if (ev->y < LL) goto del;
break;
}
if (w1->handler != menu_func) break;
@@ -618,14 +618,14 @@ static void menu_func(struct window *win, struct links_event *ev, int fwd)
scroll_menu(menu, -1);
} else if (ev->x == KBD_PAGE_UP || (upcase(ev->x) == 'B'
&& ev->y & KBD_CTRL)) {
- if ((menu->selected -= menu->yw / gf_val(1, G_BFU_FONT_SIZE) - 3) < -1) menu->selected = -1;
- if ((menu->view -= menu->yw / gf_val(1, G_BFU_FONT_SIZE) - 2) < 0) menu->view = 0;
+ if ((menu->selected -= menu->yw / LL - 3) < -1) menu->selected = -1;
+ if ((menu->view -= menu->yw / LL - 2) < 0) menu->view = 0;
scroll_menu(menu, -1);
}
else if (ev->x == KBD_PAGE_DOWN || (upcase(ev->x) == 'F'
&& ev->y & KBD_CTRL)) {
- if ((menu->selected += menu->yw / gf_val(1, G_BFU_FONT_SIZE) - 3) > menu->ni) menu->selected = menu->ni;
- if ((menu->view += menu->yw / gf_val(1, G_BFU_FONT_SIZE) - 2) >= menu->ni - menu->yw + 2) menu->view = menu->ni - menu->yw + 2;
+ if ((menu->selected += menu->yw / LL - 3) > menu->ni) menu->selected = menu->ni;
+ if ((menu->view += menu->yw / LL - 2) >= menu->ni - menu->yw + 2) menu->view = menu->ni - menu->yw + 2;
scroll_menu(menu, 1);
}
else if (ev->x > ' ') {
@@ -664,14 +664,15 @@ static void menu_func(struct window *win, struct links_event *ev, int fwd)
if (menu->items->free_i) {
int i;
for (i = 0; i < menu->ni; i++) {
- if (menu->items[i].free_i & 2)
+ if (menu->items[i].free_i & MENU_FREE_TEXT)
free(menu->items[i].text);
- if (menu->items[i].free_i & 4)
+ if (menu->items[i].free_i & MENU_FREE_RTEXT)
free(menu->items[i].rtext);
- if (menu->items[i].free_i & 8)
+ if (menu->items[i].free_i & MENU_FREE_HOTKEY)
free(menu->items[i].hotkey);
}
- free(menu->items);
+ if (menu->items->free_i & MENU_FREE_ITEMS)
+ free(menu->items);
}
if (menu->free_function)
register_bottom_half(menu->free_function,
@@ -806,7 +807,7 @@ static void mainmenu_func(struct window *win, struct links_event *ev, int fwd)
draw_to_window(win, display_mainmenu, menu);
break;
case EV_MOUSE:
- in_menu = ev->x >= 0 && ev->x < win->term->x && ev->y >= 0 && ev->y < gf_val(1, G_BFU_FONT_SIZE);
+ in_menu = ev->x >= 0 && ev->x < win->term->x && ev->y >= 0 && ev->y < LL;
if ((ev->b & BM_ACT) == B_MOVE) break;
if ((ev->b & BM_BUTT) == B_FOURTH) {
if ((ev->b & BM_ACT) == B_DOWN) goto go_left;
@@ -1339,7 +1340,7 @@ static void do_tab_compl(struct terminal *term, struct list_head *history, struc
items[n].rtext = cast_uchar "";
items[n].data = hi;
items[n].in_m = 0;
- items[n].free_i = 3;
+ items[n].free_i = MENU_FREE_ITEMS | MENU_FREE_TEXT;
if (n == INT_MAX) overalloc();
n++;
} else
@@ -2169,7 +2170,7 @@ void dlg_format_buttons(struct dialog_data *dlg, struct terminal *term, struct d
p += (butt[i].l = txtlen(dlg->win->term, get_text_translation(butt[i].item->text, dlg->win->term)) + gf_val(4, txtlen(dlg->win->term, cast_uchar(G_DIALOG_BUTTON_L G_DIALOG_BUTTON_R)))) + gf_val(2, G_DIALOG_BUTTON_SPACE);
}
}
- *y += gf_val(2, G_BFU_FONT_SIZE * 2);
+ *y += 2 * LL;
i1 = i2;
}
}
@@ -2276,7 +2277,7 @@ void dlg_format_group(struct dialog_data *dlg, struct terminal *term, unsigned c
wx += sl;
if (nx && nx + wx > w) {
nx = 0;
- (*y) += gf_val(2, G_BFU_FONT_SIZE * 2);
+ (*y) += 2 * LL;
}
if (term) {
if (!F) print_text(term, x + nx + 4 * (item->item->type == D_CHECKBOX), *y, strlen((char *)get_text_translation(texts[0], dlg->win->term)), get_text_translation(texts[0], dlg->win->term), COLOR_DIALOG_TEXT);
@@ -2297,11 +2298,9 @@ void dlg_format_group(struct dialog_data *dlg, struct terminal *term, unsigned c
texts++;
item++;
}
- (*y) += gf_val(1, G_BFU_FONT_SIZE);
+ (*y) += LL;
}
-#define LL gf_val(1, G_BFU_FONT_SIZE)
-
void checkbox_list_fn(struct dialog_data *dlg)
{
struct terminal *term = dlg->win->term;
diff --git a/cache.c b/cache.c
@@ -449,6 +449,7 @@ void delete_cache_entry(struct cache_entry *e)
free(e->redirect);
free(e->ip_address);
free(e->ssl_info);
+ free(e->ssl_authority);
free(e);
}
diff --git a/connect.c b/connect.c
@@ -760,7 +760,10 @@ static void write_select(void *c_)
abort_connection(c);
return;
}
- set_connection_timeout(c);
+ if (wb->pos)
+ set_connection_timeout(c);
+ else
+ set_connection_timeout_keepal(c);
if (c->ssl) {
set_handlers(wb->sock, NULL, write_select, c);
diff --git a/html.c b/html.c
@@ -1824,7 +1824,7 @@ static void html_input(unsigned char *a)
else if (!casestrcmp(al, cast_uchar "radio")) fc->type = FC_RADIO;
else if (!casestrcmp(al, cast_uchar "submit")) fc->type = FC_SUBMIT;
else if (!casestrcmp(al, cast_uchar "reset")) fc->type = FC_RESET;
- else if (!casestrcmp(al, cast_uchar "file")) fc->type = FC_FILE;
+ else if (!casestrcmp(al, cast_uchar "file")) fc->type = FC_FILE_UPLOAD;
else if (!casestrcmp(al, cast_uchar "hidden")) fc->type = FC_HIDDEN;
else if (!casestrcmp(al, cast_uchar "image")) fc->type = FC_IMAGE;
else if (!casestrcmp(al, cast_uchar "button")) fc->type = FC_BUTTON;
@@ -1841,9 +1841,9 @@ static void html_input(unsigned char *a)
fc->target = stracpy(form.target);
fc->name = get_attr_val(a, cast_uchar "name");
if (fc->type == FC_TEXT || fc->type == FC_PASSWORD) fc->default_value = get_attr_val(a, cast_uchar "value");
- else if (fc->type != FC_FILE) fc->default_value = get_exact_attr_val(a, cast_uchar "value");
+ else if (fc->type != FC_FILE_UPLOAD) fc->default_value = get_exact_attr_val(a, cast_uchar "value");
if (fc->type == FC_CHECKBOX && !fc->default_value) fc->default_value = stracpy(cast_uchar "on");
- if ((size = get_num(a, cast_uchar "size")) <= 0) size = HTML_DEFAULT_INPUT_SIZE;
+ if ((size = get_num(a, cast_uchar "size")) <= 1) size = HTML_DEFAULT_INPUT_SIZE;
size++;
if (size > HTML_MINIMAL_TEXTAREA_WIDTH) {
set_max_textarea_width(&size);
@@ -1867,7 +1867,7 @@ static void html_input(unsigned char *a)
switch (fc->type) {
case FC_TEXT:
case FC_PASSWORD:
- case FC_FILE:
+ case FC_FILE_UPLOAD:
format_.attr |= AT_BOLD | AT_FIXED;
format_.fontsize = 3;
for (i = 0; i < fc->size; i++) put_chrs(cast_uchar "_", 1);
@@ -2674,6 +2674,7 @@ static void html_meta(unsigned char *a)
unsigned char *host = get_host_name(format_.href_base);
if (host) {
if (strstr(cast_const_char host, "flickr.")
+ || strstr(cast_const_char host, "imgur.")
|| strstr(cast_const_char host, "instagram.")
|| strstr(cast_const_char host, "mastadon.")
|| strstr(cast_const_char host, "pinterest.")
diff --git a/html_gr.c b/html_gr.c
@@ -121,15 +121,15 @@ static unsigned char *make_html_font_name(int attr)
static struct style *get_style_by_ta(struct text_attrib *ta)
{
- int fg_r,fg_g,fg_b; /* sRGB 0-255 values */
+ int fg_r, fg_g, fg_b; /* sRGB 0-255 values */
int fs = get_real_font_size(ta->fontsize);
- struct style*stl;
+ struct style *stl;
unsigned char *fontname;
fg_r=ta->fg.r;
fg_g=ta->fg.g;
fg_b=ta->fg.b;
- separate_fg_bg(&fg_r,&fg_g,&fg_b,ta->bg.r,ta->bg.g,ta->bg.b);
+ separate_fg_bg(&fg_r, &fg_g, &fg_b, ta->bg.r, ta->bg.g, ta->bg.b);
stl = g_get_style((fg_r << 16) + (fg_g << 8) + fg_b, (ta->bg.r << 16) +
(ta->bg.g << 8) + ta->bg.b, fs,
fontname=make_html_font_name(ta->attr),
@@ -945,7 +945,7 @@ static void g_put_chars(void *p_, unsigned char *s, int l)
link->where = stracpy(last_link);
link->target = stracpy(last_target);
} else {
- link->type = last_form->type == FC_TEXT || last_form->type == FC_PASSWORD || last_form->type == FC_FILE ? L_FIELD : last_form->type == FC_TEXTAREA ? L_AREA : last_form->type == FC_CHECKBOX || last_form->type == FC_RADIO ? L_CHECKBOX : last_form->type == FC_SELECT ? L_SELECT : L_BUTTON;
+ link->type = last_form->type == FC_TEXT || last_form->type == FC_PASSWORD || last_form->type == FC_FILE_UPLOAD ? L_FIELD : last_form->type == FC_TEXTAREA ? L_AREA : last_form->type == FC_CHECKBOX || last_form->type == FC_RADIO ? L_CHECKBOX : last_form->type == FC_SELECT ? L_SELECT : L_BUTTON;
link->form = last_form;
link->target = stracpy(last_form->target);
}
diff --git a/html_r.c b/html_r.c
@@ -727,7 +727,7 @@ static void put_chars(void *p_, unsigned char *c, int l)
snzprint(s + 1, 62, p->link_num);
strcat(cast_char s, "]");
} else {
- if (ff && (ff->type == FC_TEXT || ff->type == FC_PASSWORD || ff->type == FC_FILE || ff->type == FC_TEXTAREA)) {
+ if (ff && (ff->type == FC_TEXT || ff->type == FC_PASSWORD || ff->type == FC_FILE_UPLOAD || ff->type == FC_TEXTAREA)) {
strcpy(cast_char s, ">");
} else if (ff && (ff->type == FC_CHECKBOX || ff->type == FC_RADIO || ff->type == FC_SELECT)) {
strcpy(cast_char s, "");
@@ -757,7 +757,7 @@ static void put_chars(void *p_, unsigned char *c, int l)
link->where = stracpy(last_link);
link->target = stracpy(last_target);
} else {
- link->type = last_form->type == FC_TEXT || last_form->type == FC_PASSWORD || last_form->type == FC_FILE ? L_FIELD : last_form->type == FC_TEXTAREA ? L_AREA : last_form->type == FC_CHECKBOX || last_form->type == FC_RADIO ? L_CHECKBOX : last_form->type == FC_SELECT ? L_SELECT : L_BUTTON;
+ link->type = last_form->type == FC_TEXT || last_form->type == FC_PASSWORD || last_form->type == FC_FILE_UPLOAD ? L_FIELD : last_form->type == FC_TEXTAREA ? L_AREA : last_form->type == FC_CHECKBOX || last_form->type == FC_RADIO ? L_CHECKBOX : last_form->type == FC_SELECT ? L_SELECT : L_BUTTON;
link->form = last_form;
link->target = stracpy(last_form->target);
}
@@ -1268,10 +1268,6 @@ void really_format_html(struct cache_entry *ce, unsigned char *start, unsigned c
int compare_opt(struct document_options *o1, struct document_options *o2)
{
-#ifdef G
- double kdo_si_hraje_nezlobi____a_nebo_to_je_PerM=o1->bfu_aspect-o2->bfu_aspect;
-#endif
-
if (o1->xw == o2->xw &&
o1->yw == o2->yw &&
o1->xp == o2->xp &&
@@ -1295,13 +1291,10 @@ int compare_opt(struct document_options *o1, struct document_options *o2)
o1->display_images == o2->display_images &&
o1->image_scale == o2->image_scale &&
o1->porn_enable == o2->porn_enable &&
+ o1->gamma_stamp == o2->gamma_stamp &&
!memcmp(&o1->default_fg, &o2->default_fg, sizeof(struct rgb)) &&
!memcmp(&o1->default_bg, &o2->default_bg, sizeof(struct rgb)) &&
!memcmp(&o1->default_link, &o2->default_link, sizeof(struct rgb)) &&
-#ifdef G
- kdo_si_hraje_nezlobi____a_nebo_to_je_PerM<=0.000001 &&
- kdo_si_hraje_nezlobi____a_nebo_to_je_PerM>=-0.000001 &&
-#endif
((o1->framename && o2->framename && !casestrcmp(o1->framename, o2->framename)) || (!o1->framename && !o2->framename))) return 0;
return 1;
}
diff --git a/http.c b/http.c
@@ -240,7 +240,7 @@ static void http_send_header(struct connection *c)
proxy = is_proxy_url(c->url);
host = remove_proxy_prefix(c->url);
- set_connection_timeout(c);
+ set_connection_timeout_keepal(c);
info = mem_calloc(sizeof(struct http_connection_info));
c->info = info;
info->https_forward = !c->ssl && proxy && host && !casecmp(host, cast_uchar "https://", 8);
@@ -998,6 +998,8 @@ again:
if (c->ssl) {
free(e->ssl_info);
e->ssl_info = get_cipher_string(c->ssl);
+ free(e->ssl_authority);
+ e->ssl_authority = stracpy(c->ssl->ca);
}
free(e->redirect);
e->redirect = NULL;
@@ -1145,7 +1147,7 @@ again:
static void http_get_header(struct connection *c)
{
struct read_buffer *rb;
- set_connection_timeout(c);
+ set_connection_timeout_keepal(c);
if (!(rb = alloc_read_buffer()))
return;
rb->close = 1;
diff --git a/https.c b/https.c
@@ -73,6 +73,7 @@ links_ssl *getSSL(void)
ssl->bytes_read = ssl->bytes_written = 0;
ssl->session_set = 0;
ssl->session_retrieved = 0;
+ ssl->ca = NULL;
return ssl;
}
@@ -83,6 +84,7 @@ void freeSSL(links_ssl *ssl)
SSL_shutdown(ssl->ssl);
SSL_free(ssl->ssl);
+ free(ssl->ca);
free(ssl);
}
@@ -114,11 +116,45 @@ static int verify_ssl_host_name(X509 *server_cert, char *host)
return v == 1 ? 0 : S_INVALID_CERTIFICATE;
}
+static unsigned char *extract_field(unsigned char *str, char *field)
+{
+ size_t len;
+ char *f = strstr(cast_const_char str, field);
+ if (!f)
+ return NULL;
+ f += strlen(field);
+ len = strcspn(f, "/");
+ return memacpy(f, len);
+}
+
+static unsigned char *extract_ca(unsigned char *str)
+{
+ unsigned char *c, *o;
+ c = extract_field(str, "/C=");
+ o = extract_field(str, "/O=");
+ if (!o)
+ o = extract_field(str, "/CN=");
+ if (!o) {
+ free(c);
+ c = NULL;
+ o = stracpy(str);
+ }
+ if (c) {
+ add_to_strn(&o, cast_uchar ", ");
+ add_to_strn(&o, c);
+ free(c);
+ }
+ return o;
+}
+
int verify_ssl_certificate(links_ssl *ssl, unsigned char *host)
{
X509 *server_cert;
int ret;
+ free(ssl->ca);
+ ssl->ca = NULL;
+
if (SSL_get_verify_result(ssl->ssl) != X509_V_OK)
return S_INVALID_CERTIFICATE;
@@ -127,6 +163,41 @@ int verify_ssl_certificate(links_ssl *ssl, unsigned char *host)
return S_INVALID_CERTIFICATE;
ret = verify_ssl_host_name(server_cert, (char *)host);
+ if (!ret) {
+ STACK_OF(X509) *certs = SSL_get_peer_cert_chain(ssl->ssl);
+ if (certs) {
+ int num = sk_X509_num(certs);
+ int i;
+ unsigned char *last_ca = NULL;
+ unsigned char *cas = init_str();
+ int casl = 0;
+ for (i = num - 1; i >= 0; i--) {
+ unsigned char space[3072];
+ unsigned char *n;
+ X509 *cert = sk_X509_value(certs, i);
+ X509_NAME *name;
+ name = X509_get_issuer_name(cert);
+ n = cast_uchar X509_NAME_oneline(name, cast_char space, 3072);
+ if (n) {
+ unsigned char *ca = extract_ca(n);
+ if (!last_ca || strcmp(cast_const_char ca, cast_const_char last_ca)) {
+ if (casl)
+ add_to_str(&cas, &casl, CERT_RIGHT_ARROW);
+ add_to_str(&cas, &casl, ca);
+ free(last_ca);
+ last_ca = ca;
+ } else {
+ free(ca);
+ }
+ }
+ }
+ free(last_ca);
+ if (casl)
+ ssl->ca = cas;
+ else
+ free(cas);
+ }
+ }
X509_free(server_cert);
return ret;
}
diff --git a/kbd.c b/kbd.c
@@ -72,7 +72,7 @@ static void write_ev_queue(void *itrm_)
struct itrm *itrm = (struct itrm *)itrm_;
int l, to_write;
if (!itrm->eqlen) internal("event queue empty");
- to_write = itrm->eqlen > 128 ? 128 : itrm->eqlen;
+ to_write = itrm->eqlen;
retry:
EINTRLOOP(l, (int)write(itrm->sock_out, itrm->ev_queue, to_write));
if (l <= 0) {
diff --git a/language.h b/language.h
@@ -3,692 +3,708 @@
#define T__CHAR_SET 0
#define T__LANGUAGE 1
#define T__ACCEPT_LANGUAGE 2
-#define T__DEFAULT_CHAR_SET 3
-#define T_OK 4
-#define T_CANCEL 5
-#define T_BAD_NUMBER 6
-#define T_NUMBER_EXPECTED 7
-#define T_NUMBER_OUT_OF_RANGE 8
-#define T_BAD_STRING 9
-#define T_EMPTY_STRING_NOT_ALLOWED 10
-#define T_BAD_IP_ADDRESS 11
-#define T_INVALID_IP_ADDRESS_SYNTAX 12
-#define T_UNABLE_TO_USE_LOCAL_IP_ADDRESS 13
-#define T_CONFIG_ERROR 14
-#define T_UNABLE_TO_WRITE_TO_CONFIG_FILE 15
-#define T_HOME_DIRECTORY_INACCESSIBLE 16
-#define T_BOOKMARK_ERROR 17
-#define T_UNABLE_TO_WRITE_TO_BOOKMARK_FILE 18
-#define T_ABOUT 19
-#define T_LINKS__LYNX_LIKE 20
-#define T_VERSION 21
-#define T_VERSION_INFORMATION 22
-#define T_LINKS_VERSION 23
-#define T_OPERATING_SYSTEM_TYPE 24
-#define T_OPERATING_SYSTEM_VERSION 25
-#define T_COMPILER 26
-#define T_WORD_SIZE 27
-#define T_MEMORY 28
-#define T_FILE_SIZE 29
-#define T_DEBUGGING_LEVEL 30
-#define T_EVENT_HANDLER 31
-#define T_SELECT_SYSCALL 32
-#define T_dISABLED 33
-#define T_IPV6 34
-#define T_NOT_ENABLED_IN_SYSTEM 35
-#define T_LOCAL_NETWORK_ONLY 36
-#define T_UTF8_TERMINAL 37
-#define T_COMPRESSION_METHODS 38
-#define T_ENCRYPTION 39
-#define T_NO_CERTIFICATE_VERIFICATION 40
-#define T_GPM_MOUSE_DRIVER 41
-#define T_XTERM_FOR_OS2 42
-#define T_GRAPHICS_MODE 43
-#define T_IMAGE_LIBRARIES 44
-#define T_OPENMP 45
-#define T_NOT_USED_IN_TEXT_MODE 46
-#define T_DISABLED 47
-#define T_THREAD 48
-#define T_THREADS 49
-#define T_THREADS5 50
-#define T_CONFIGURATION_DIRECTORY 51
-#define T_NONE 52
-#define T_KEYS 53
-#define T_KEYS_DESC 54
-#define T_KEYS_BRAILLE_DESC 55
-#define T_COPYING 56
-#define T_COPYING_DESC 57
-#define T_RESOURCES 58
-#define T_MEMORY_CACHE 59
-#define T_DECOMPRESSED_CACHE 60
-#define T_FONT_CACHE 61
-#define T_IMAGE_CACHE 62
-#define T_FORMATTED_DOCUMENT_CACHE 63
-#define T_DNS_CACHE 64
-#define T_TLS_SESSION_CACHE 65
-#define T_HANDLES 66
-#define T_TIMERS 67
-#define T_WAITING 68
-#define T_CONNECTING 69
-#define T_tRANSFERRING 70
-#define T_KEEPALIVE 71
-#define T_BYTES 72
-#define T_LETTERS 73
-#define T_FILES 74
-#define T_LOCKED 75
-#define T_LOADING 76
-#define T_IMAGES 77
-#define T_DOCUMENTS 78
-#define T_SERVERS 79
-#define T_MEMORY_ALLOCATED 80
-#define T_BLOCKS_ALLOCATED 81
-#define T_MEMORY_LARGE_BLOCKS 82
-#define T_BLOCKS_LARGE_BLOCKS 83
-#define T_MEMORY_REQUESTED 84
-#define T_BLOCKS_REQUESTED 85
-#define T_JS_MEMORY_ALLOCATED 86
-#define T_MEMORY_INFO 87
-#define T_NO_HISTORY 88
-#define T_NO_DOWNLOADS 89
-#define T_NO_FRAMES 90
-#define T_VT_100_FRAMES 91
-#define T_LINUX_OR_OS2_FRAMES 92
-#define T_KOI8R_FRAMES 93
-#define T_FREEBSD_FRAMES 94
-#define T_USE_11M 95
-#define T_RESTRICT_FRAMES_IN_CP850_852 96
-#define T_BLOCK_CURSOR 97
-#define T_COLOR 98
-#define T_BRAILLE_TERMINAL 99
-#define T_TERMINAL_OPTIONS 100
-#define T_SCREEN_MARGINS 101
-#define T_LEFT_MARGIN 102
-#define T_RIGHT_MARGIN 103
-#define T_TOP_MARGIN 104
-#define T_BOTTOM_MARGIN 105
-#define T_MARGINS_TOO_LARGE 106
-#define T_THE_ENTERED_VALUES_ARE_TOO_LARGE_FOR_THE_CURRENT_SCREEN 107
-#define T_NETWORK_OPTIONS 108
-#define T_IPV6_OPTIONS 109
-#define T_IPV6_DEFAULT 110
-#define T_IPV6_PREFER_IPV4 111
-#define T_IPV6_PREFER_IPV6 112
-#define T_IPV6_USE_ONLY_IPV4 113
-#define T_IPV6_USE_ONLY_IPV6 114
-#define T_PROXIES 115
-#define T_HTTP_PROXY__HOST_PORT 116
-#define T_FTP_PROXY__HOST_PORT 117
-#define T_HTTPS_PROXY__HOST_PORT 118
-#define T_SOCKS_4A_PROXY__USER_HOST_PORT 119
-#define T_APPEND_TEXT_TO_SOCKS_LOOKUPS 120
-#define T_NOPROXY_LIST 121
-#define T_ONLY_PROXIES 122
-#define T_TOR_MODE_ENABLED 123
-#define T_SSL_OPTIONS 124
-#define T_ACCEPT_INVALID_CERTIFICATES 125
-#define T_WARN_ON_INVALID_CERTIFICATES 126
-#define T_REJECT_INVALID_CERTIFICATES 127
-#define T_USE_BUILT_IN_CERTIFICATES 128
-#define T_CLIENT_CERTIFICATE_KEY_FILE 129
-#define T_CLIENT_CERTIFICATE_FILE 130
-#define T_CLIENT_CERTIFICATE_KEY_PASSWORD 131
-#define T_BAD_FILE 132
-#define T_THE_FILE_DOES_NOT_EXIST 133
-#define T_THE_FILE_HAS_INVALID_FORMAT 134
-#define T_ERROR_INITIALIZING_BUILT_IN_CERTIFICATES 135
-#define T_FAILED 136
-#define T_CONNECTIONS 137
-#define T_MAX_CONNECTIONS 138
-#define T_MAX_CONNECTIONS_TO_ONE_HOST 139
-#define T_RETRIES 140
-#define T_RECEIVE_TIMEOUT_SEC 141
-#define T_TIMEOUT_WHEN_UNRESTARTABLE 142
-#define T_TIMEOUT_WHEN_TRYING_MULTIPLE_ADDRESSES 143
-#define T_BIND_TO_LOCAL_IP_ADDRESS 144
-#define T_BIND_TO_LOCAL_IPV6_ADDRESS 145
-#define T_ASYNC_DNS_LOOKUP 146
-#define T_SET_TIME_OF_DOWNLOADED_FILES 147
-#define T_CACHE_OPTIONS 148
-#define T_MEMORY_CACHE_SIZE__KB 149
-#define T_IMAGE_CACHE_SIZE__KB 150
-#define T_FONT_CACHE_SIZE__KB 151
-#define T_NUMBER_OF_FORMATTED_DOCUMENTS 152
-#define T_AGGRESSIVE_CACHE 153
-#define T_HTML_OPTIONS 154
-#define T_DISPLAY_TABLES 155
-#define T_DISPLAY_FRAMES 156
-#define T_BREAK_LONG_LINES 157
-#define T_DISPLAY_IMAGES 158
-#define T_DISPLAY_IMAGE_FILENAMES 159
-#define T_DISPLAY_LINKS_TO_IMAGES 160
-#define T_LINK_ORDER_BY_COLUMNS 161
-#define T_NUMBERED_LINKS 162
-#define T_AUTO_REFRESH 163
-#define T_TARGET_IN_NEW_WINDOW 164
-#define T_TEXT_MARGIN 165
-#define T_DEFAULT_CODEPAGE 166
-#define T_IGNORE_CHARSET_INFO_SENT_BY_SERVER 167
-#define T_TEXT_COLOR 168
-#define T_LINK_COLOR 169
-#define T_BACKGROUND_COLOR 170
-#define T_IGNORE_DOCUMENT_COLOR 171
-#define T_COLOR_0 172
-#define T_COLOR_1 173
-#define T_COLOR_2 174
-#define T_COLOR_3 175
-#define T_COLOR_4 176
-#define T_COLOR_5 177
-#define T_COLOR_6 178
-#define T_COLOR_7 179
-#define T_COLOR_8 180
-#define T_COLOR_9 181
-#define T_COLOR_10 182
-#define T_COLOR_11 183
-#define T_COLOR_12 184
-#define T_COLOR_13 185
-#define T_COLOR_14 186
-#define T_COLOR_15 187
-#define T_GOTO_URL 188
-#define T_GO_BACK 189
-#define T_GO_FORWARD 190
-#define T_HISTORY 191
-#define T_RELOAD 192
-#define T_NEW_WINDOW 193
-#define T_SAVE_AS 194
-#define T_SAVE_URL_AS 195
-#define T_SAVE_FORMATTED_DOCUMENT 196
-#define T_COPY_URL_LOCATION 197
-#define T_KILL_BACKGROUND_CONNECTIONS 198
-#define T_KILL_ALL_CONNECTIONS 199
-#define T_FLUSH_ALL_CACHES 200
-#define T_RESOURCE_INFO 201
-#define T_OS_SHELL 202
-#define T_EXIT 203
-#define T_SEARCH 204
-#define T_SEARCH_BACK 205
-#define T_FIND_NEXT 206
-#define T_FIND_PREVIOUS 207
-#define T_TOGGLE_HTML_PLAIN 208
-#define T_DOCUMENT_INFO 209
-#define T_FRAME_AT_FULL_SCREEN 210
-#define T_SAVE_CLIPBOARD_TO_A_FILE 211
-#define T_LOAD_CLIPBOARD_FROM_A_FILE 212
-#define T_THE_CLIPBOARD_IS_EMPTY 213
-#define T_SAVE_HTML_OPTIONS 214
-#define T_CHARACTER_SET 215
-#define T_DEFAULT_CHARSET 216
-#define T_CACHE 217
-#define T_MAIL_AND_TELNEL 218
-#define T_MAIL_TELNET_AND_SHELL 219
-#define T_ASSOCIATIONS 220
-#define T_FILE_EXTENSIONS 221
-#define T_SAVE_OPTIONS 222
-#define T_FILE 223
-#define T_VIEW 224
-#define T_LINK 225
-#define T_DOWNLOADS 226
-#define T_WINDOWS 227
-#define T_SETUP 228
-#define T_HELP 229
-#define T_ENTER_URL 230
-#define T_SAVE_URL 231
-#define T_DOWNLOAD 232
-#define T_SAVE_TO_FILE 233
-#define T_SEARCH_FOR_TEXT 234
-#define T_PAGE_P 235
-#define T_PAGE_OF 236
-#define T_PAGE_CL 237
-#define T_FORMATTING_DOCUMENT 238
-#define T_SEARCHING 239
-#define T_WAITING_IN_QUEUE 240
-#define T_LOOKING_UP_HOST 241
-#define T_MAKING_CONNECTION 242
-#define T_MAKING_CONNECTION_TO_ANOTHER_ADDRESS 243
-#define T_SOCKS_NEGOTIATION 244
-#define T_SSL_NEGOTIATION 245
-#define T_REQUEST_SENT 246
-#define T_LOGGING_IN 247
-#define T_GETTING_HEADERS 248
-#define T_SERVER_IS_PROCESSING_REQUEST 249
-#define T_TRANSFERRING 250
-#define T_INTERRUPTED 251
-#define T_SOCKET_EXCEPTION 252
-#define T_INTERNAL_ERROR 253
-#define T_OUT_OF_MEMORY 254
-#define T_HOST_NOT_FOUND 255
-#define T_PROXY_NOT_FOUND 256
-#define T_ERROR_WRITING_TO_SOCKET 257
-#define T_ERROR_READING_FROM_SOCKET 258
-#define T_DATA_MODIFIED 259
-#define T_BAD_URL_SYNTAX 260
-#define T_BAD_PROXY_SYNTAX 261
-#define T_RECEIVE_TIMEOUT 262
-#define T_REQUEST_MUST_BE_RESTARTED 263
-#define T_CANT_GET_SOCKET_STATE 264
-#define T_CYCLIC_REDIRECT 265
-#define T_TOO_LARGE_FILE 266
-#define T_BAD_HTTP_RESPONSE 267
-#define T_HTTP_100 268
-#define T_NO_CONTENT 269
-#define T_HTTPS_FWD_ERROR 270
-#define T_INVALID_CERTIFICATE 271
-#define T_DOWNGRADED_METHOD 272
-#define T_INSECURE_CIPHER 273
-#define T_UNKNOWN_FILE_TYPE 274
-#define T_ERROR_OPENING_FILE 275
-#define T_BAD_FTP_RESPONSE 276
-#define T_FTP_SERVICE_UNAVAILABLE 277
-#define T_BAD_FTP_LOGIN 278
-#define T_FTP_PORT_COMMAND_FAILED 279
-#define T_FILE_NOT_FOUND 280
-#define T_FTP_FILE_ERROR 281
-#define T_SSL_ERROR 282
-#define T_NO_SSL 283
-#define T_BAD_SOCKS_VERSION 284
-#define T_SOCKS_REJECTED_OR_FAILED 285
-#define T_SOCKS_NO_IDENTD 286
-#define T_SOCKS_BAD_USERID 287
-#define T_SOCKS_UNKNOWN_ERROR 288
-#define T_NO_SMB_CLIENT 289
-#define T_BLOCKED_URL 290
-#define T_SMB_NOT_ALLOWED 291
-#define T_FILE_NOT_ALLOWED 292
-#define T_NO_PROXY 293
-#define T_UNKNOWN_ERROR 294
-#define T_RECEIVED 295
-#define T_OF 296
-#define T_AVG 297
-#define T_CUR 298
-#define T_AVERAGE_SPEED 299
-#define T_SPEED 300
-#define T_CURRENT_SPEED 301
-#define T_ELAPSED_TIME 302
-#define T_ESTIMATED_TIME 303
-#define T_BACKGROUND 304
-#define T_ABORT 305
-#define T_ABORT_AND_DELETE_FILE 306
-#define T_YES 307
-#define T_NO 308
-#define T_NEVER 309
-#define T_DIRECTORY 310
-#define T_FILE_ALREADY_EXISTS 311
-#define T_ALREADY_EXISTS_AS_DOWNLOAD 312
-#define T_ALREADY_EXISTS 313
-#define T_DO_YOU_WISH_TO_CONTINUE 314
-#define T_DO_YOU_WISH_TO_OVERWRITE 315
-#define T_CONTINUE 316
-#define T_OVERWRITE 317
-#define T_RENAME 318
-#define T_DOWNLOAD_ERROR 319
-#define T_COULD_NOT_WRITE_TO_FILE 320
-#define T_ERROR_DOWNLOADING 321
-#define T_ERROR_LOADING 322
-#define T_COULD_NOT_CREATE_FILE 323
-#define T_COULD_NOT_CREATE_TEMPORARY_FILE 324
-#define T_ERROR_CALLING_LSEEK_ON_FILE 325
-#define T_TOO_LARGE_FILE_SEQUENCE 326
-#define T_UNKNOWN_TYPE 327
-#define T_CONTENT_TYPE_IS 328
-#define T_DO_YOU_WANT_TO_OPEN_SAVE_OR_DISPLAY_THIS_FILE 329
-#define T_DO_YOU_WANT_TO_OPEN_OR_DISPLAY_THIS_FILE 330
-#define T_DO_YOU_WANT_TO_SAVE_OR_DISLPAY_THIS_FILE 331
-#define T_SAVE 332
-#define T_DISPLAY 333
-#define T_WHAT_TO_DO 334
-#define T_DO_YOU_WANT_TO_OPEN_FILE_WITH 335
-#define T_SAVE_IT_OR_DISPLAY_IT 336
-#define T_OPEN 337
-#define T_OPEN_WITH 338
-#define T_DO_YOU_WANT_TO_FOLLOW_REDIRECT_AND_POST_FORM_DATA_TO_URL 339
-#define T_DO_YOU_WANT_TO_POST_FORM_DATA_TO_URL 340
-#define T_DO_YOU_WANT_TO_REPOST_FORM_DATA_TO_URL 341
-#define T_WARNING 342
-#define T_ERROR 343
-#define T_WELCOME 344
-#define T_WELCOME_TO_LINKS 345
-#define T_BASIC_HELP 346
-#define T_LABEL 347
-#define T_CONTENT_TYPES 348
-#define T_PROGRAM__IS_REPLACED_WITH_FILE_NAME 349
-#define T_BLOCK_TERMINAL_WHILE_PROGRAM_RUNNING 350
-#define T_RUN_ON_TERMINAL 351
-#define T_RUN_IN_XWINDOW 352
-#define T_ASK_BEFORE_OPENING 353
-#define T_ACCEPT_HTTP 354
-#define T_ACCEPT_FTP 355
-#define T_DELETE_ASSOCIATION 356
-#define T_ASSOCIATION 357
-#define T_EXTENSION_S 358
-#define T_CONTENT_TYPE 359
-#define T_DELETE_EXTENSION 360
-#define T_EXTENSION 361
-#define T_eXTENSION 362
-#define T_ERROR_WHILE_POSTING_FORM 363
-#define T_COULD_NOT_GET_FILE 364
-#define T_READING_FILES_IS_NOT_ALLOWED 365
-#define T_NO_PREVIOUS_SEARCH 366
-#define T_SEARCH_STRING_NOT_FOUND 367
-#define T_SAVE_ERROR 368
-#define T_ERROR_WRITING_TO_FILE 369
-#define T_ERROR_READING_THE_FILE 370
-#define T_DISPLAY_USEMAP 371
-#define T_FOLLOW_LINK 372
-#define T_OPEN_IN_NEW_WINDOW 373
-#define T_DOWNLOAD_LINK 374
-#define T_RESET_FORM 375
-#define T_SUBMIT_FORM 376
-#define T_SUBMIT_FORM_AND_OPEN_IN_NEW_WINDOW 377
-#define T_SUBMIT_FORM_AND_DOWNLOAD 378
-#define T_VIEW_IMAGE 379
-#define T_DOWNLOAD_IMAGE 380
-#define T_SCALE_IMAGE_TO_FULL_SCREEN 381
-#define T_NO_LINK_SELECTED 382
-#define T_IMAGE 383
-#define T_USEMAP 384
-#define T_XTERM 385
-#define T_TWTERM 386
-#define T_SCREEN 387
-#define T_WINDOW 388
-#define T_FULL_SCREEN 389
-#define T_BEOS_TERMINAL 390
-#define T_UNABLE_TO_OPEN_NEW_WINDOW 391
-#define T_JAVASCRIPT 392
-#define T_SUBMIT_FORM_TO 393
-#define T_POST_FORM_TO 394
-#define T_RADIO_BUTTON 395
-#define T_CHECKBOX 396
-#define T_SELECT_FIELD 397
-#define T_TEXT_FIELD 398
-#define T_TEXT_AREA 399
-#define T_FILE_UPLOAD 400
-#define T_PASSWORD_FIELD 401
-#define T_BUTTON 402
-#define T_NAME 403
-#define T_VALUE 404
-#define T_HIT_ENTER_TO 405
-#define T_SUBMIT_TO 406
-#define T_POST_TO 407
-#define T_INFO 408
-#define T_HEADER_INFO 409
-#define T_YOU_ARE_NOWHERE 410
-#define T_NO_HEADER 411
-#define T_URL 412
-#define T_IP_ADDRESS 413
-#define T_IP_ADDRESSES 414
-#define T_SIZE 415
-#define T_COMPRESSED_WITH 416
-#define T_INCOMPLETE 417
-#define T_CODEPAGE 418
-#define T_ASSUMED 419
-#define T_IGNORING_SERVER_SETTING 420
-#define T_SERVER 421
-#define T_DATE 422
-#define T_LAST_MODIFIED 423
-#define T_SSL_CIPHER 424
-#define T_LANGUAGE 425
-#define T_DEFAULT_LANG 426
-#define T_GO_TO_LINK 427
-#define T_ENTER_LINK_NUMBER 428
-#define T_RESIZE_TERMINAL 429
-#define T_COLUMNS 430
-#define T_ROWS 431
-#define T_GOTO 432
-#define T_CLOSE 433
-#define T_FOLDER 434
-#define T_fOLDER 435
-#define T_ADD 436
-#define T_DELETE 437
-#define T_EDIT 438
-#define T_MOVE 439
-#define T_NO_ITEMS_SELECTED 440
-#define T_UNSELECT_ALL 441
-#define T_BOOKMARKS 442
-#define T_BOOKMARK 443
-#define T_ADD_BOOKMARK 444
-#define T_ADD_ASSOCIATION 445
-#define T_ADD_EXTENSION 446
-#define T_ADD_FOLDER 447
-#define T_BOOKMARK_TITLE 448
-#define T_EDIT_BOOKMARK 449
-#define T_EDIT_ASSOCIATION 450
-#define T_EDIT_EXTENSION 451
-#define T_DELETE_BOOKMARK 452
-#define T_EDIT_FOLDER 453
-#define T_DELETE_FOLDER 454
-#define T_NOT_EMPTY_SURE_DELETE 455
-#define T_BOOKMARK_MANAGER 456
-#define T_ASSOCIATIONS_MANAGER 457
-#define T_EXTENSIONS_MANAGER 458
-#define T_url 459
-#define T_NNAME 460
-#define T_EXIT_LINKS 461
-#define T_DO_YOU_REALLY_WANT_TO_CLOSE_WINDOW 462
-#define T_DO_YOU_REALLY_WANT_TO_EXIT_LINKS 463
-#define T_DO_YOU_REALLY_WANT_TO_EXIT_LINKS_AND_TERMINATE_ALL_DOWNLOADS 464
-#define T_HTTP_OPTIONS 465
-#define T_FTP_OPTIONS 466
-#define T_SMB_OPTIONS 467
-#define T_HTTP_BUG_WORKAROUNDS 468
-#define T_USE_HTTP_10 469
-#define T_ALLOW_SERVER_BLACKLIST 470
-#define T_DO_NOT_SEND_ACCEPT_CHARSET 471
-#define T_DO_NOT_ADVERTISE_COMPRESSION_SUPPORT 472
-#define T_RETRY_ON_INTERNAL_ERRORS 473
-#define T_HEADER_OPTIONS 474
-#define T_HTTP_HEADER_OPTIONS 475
-#define T_FAKE_FIREFOX 476
-#define T_DO_NOT_TRACK 477
-#define T_REFERER_NONE 478
-#define T_REFERER_SAME_URL 479
-#define T_REFERER_FAKE 480
-#define T_REFERER_REAL_SAME_SERVER 481
-#define T_REFERER_REAL 482
-#define T_FAKE_REFERER 483
-#define T_FAKE_USERAGENT 484
-#define T_EXTRA_HEADER 485
-#define T_PASSWORD_FOR_ANONYMOUS_LOGIN 486
-#define T_USE_PASSIVE_FTP 487
-#define T_USE_EPRT_EPSV 488
-#define T_SET_TYPE_OF_SERVICE 489
-#define T_ALLOW_HYPERLINKS_TO_SMB 490
-#define T_MANUAL 491
-#define T_HOMEPAGE 492
-#define T_CALIBRATION 493
-#define T_MAILTO_PROG 494
-#define T_SHELL_PROG 495
-#define T_TELNET_PROG 496
-#define T_MAGNET_PROG 497
-#define T_TN3270_PROG 498
-#define T_MMS_PROG 499
-#define T_MAIL_AND_TELNET_PROGRAMS 500
-#define T_MAIL_TELNET_AND_SHELL_PROGRAMS 501
-#define T_NO_PROGRAM 502
-#define T_NO_PROGRAM_SPECIFIED_FOR 503
-#define T_MAIL 504
-#define T_TELNET 505
-#define T_MAGNET 506
-#define T_TN3270 507
-#define T_MMS 508
-#define T_BAD_MAILTO_URL 509
-#define T_BAD_TELNET_URL 510
-#define T_BAD_TN3270_URL 511
-#define T_MMS_URL_CONTAINS_INACCEPTABLE_CHARACTERS 512
-#define T_AUTHORIZATION_REQUIRED 513
-#define T_PROXY_AUTHORIZATION_REQUIRED 514
-#define T_USERID 515
-#define T_PASSWORD 516
-#define T_ENTER_USERNAME 517
-#define T_AT 518
-#define T_THE_SERVER_ 519
-#define T_DOESNT_HAVE_A_VALID_CERTIFICATE 520
-#define T_USES_DOWNGRADED_METHOD 521
-#define T_USES_INSECURE_CIPHER 522
-#define T_WAITING_FOR_REDIRECT_CONFIRMATION 523
-#define T_DECOMPRESSION_ERROR 524
-#define T_ERROR_DECOMPRESSING_ 525
-#define T__wITH_ 526
-#define T_COMPRESSED_ERROR 527
-#define T_UNKNOWN_COMPRESSION_METHOD 528
-#define T_SURE_DELETE 529
-#define T_BOOKMARKS_ALREADY_IN_USE 530
-#define T_ASSOCIATIONS_ALREADY_IN_USE 531
-#define T_EXTENSIONS_ALREADY_IN_USE 532
-#define T_VIDEO_OPTIONS 533
-#define T_VIDEO_OPTIONS_TEXT 534
-#define T_RED_DISPLAY_GAMMA 535
-#define T_GREEN_DISPLAY_GAMMA 536
-#define T_BLUE_DISPLAY_GAMMA 537
-#define T_USER_GAMMA 538
-#define T_ASPECT_RATIO 539
-#define T_DITHER_LETTERS 540
-#define T_DITHER_IMAGES 541
-#define T_8_BIT_GAMMA_CORRECTION 542
-#define T_16_BIT_GAMMA_CORRECTION 543
-#define T_AUTO_GAMMA_CORRECTION 544
-#define T_RGB_PALETTE_8x8x4 545
-#define T_RGB_PALETTE_6x6x6 546
-#define T_SWITCH_PALETTE 547
-#define T_OVERWRITE_SCREEN_INSTEAD_OF_SCROLLING_IT 548
-#define T_ALERT 549
-#define T_QUESTION 550
-#define T_KILL_SCRIPT 551
-#define T_KILL_ALL_SCRIPTS 552
-#define T_SCRIPT_KILLED_BY_USER 553
-#define T_SCRIPT_TRYING_TO_CLOSE_WINDOW 554
-#define T_ENTER_STRING 555
-#define T_JAVASCRIPT_OPTIONS 556
-#define T_ENABLE_JAVASCRIPT 557
-#define T_VERBOSE_JS_ERRORS 558
-#define T_VERBOSE_JS_WARNINGS 559
-#define T_MISCELANEOUS_OPTIONS 560
-#define T_JAVASCRIPT_ERROR 561
-#define T_JAVASCRIPT_WARNING 562
-#define T_DISMISS 563
-#define T_MENU_FONT_SIZE 564
-#define T_USER_FONT_SIZE 565
-#define T_TURN_OFF_WARNINGS 566
-#define T_BOOKMARKS_ENCODING 567
-#define T_JS_IS_ATTEMPTING_TO_GO_TO_URL 568
-#define T_JS_IS_ATTEMPTING_TO_OPEN_NEW_WINDOW_WITH_URL 569
-#define T_JS_IS_ATTEMPTING_TO_GO_INTO_HISTORY 570
-#define T_TO_URL 571
-#define T_GOTO_HISTORY 572
-#define T_ALLOW 573
-#define T_REJECT 574
-#define T_ENABLE_ALL_CONVERSIONS 575
-#define T_ENABLE_GLOBAL_NAME_RESOLUTION 576
-#define T_MANUAL_JS_CONTROL 577
-#define T_JS_RECURSION_DEPTH 578
-#define T_MENU_BACKGROUND_COLOR 579
-#define T_MENU_FOREGROUND_COLOR 580
-#define T_SCROLL_BAR_BAR_COLOR 581
-#define T_SCROLL_BAR_AREA_COLOR 582
-#define T_SCROLL_BAR_FRAME_COLOR 583
-#define T_BOOKMARKS_FILE 584
-#define T_SAVE_URL_HISTORY_ON_EXIT 585
-#define T_ENTER_COLORS_AS_RGB_TRIPLETS 586
-#define T_JS_MEMORY_LIMIT_KB 587
-#define T_SCALE_ALL_IMAGES_BY 588
-#define T_PORN_ENABLE 589
-#define T_DISPLAY_OPTIMIZATION_CRT 590
-#define T_DISPLAY_OPTIMIZATION_LCD_RGB 591
-#define T_DISPLAY_OPTIMIZATION_LCD_BGR 592
-#define T_KEYBOARD_CODEPAGE 593
-#define T_COPY_LINK_LOCATION 594
-#define T_BLOCK_URL 595
-#define T_BLOCK_LIST 596
-#define T_BLOCKED_IMAGE 597
-#define T_BLOCK_LIST_IN_USE 598
-#define T_BLOCK_LIST_MANAGER 599
-#define T_BLOCK_ADD 600
-#define T_BLOCK_EDIT 601
-#define T_BLOCK_DELETE 602
-#define T_HK_GOTO_URL 603
-#define T_HK_GO_BACK 604
-#define T_HK_GO_FORWARD 605
-#define T_HK_HISTORY 606
-#define T_HK_RELOAD 607
-#define T_HK_BOOKMARKS 608
-#define T_HK_NEW_WINDOW 609
-#define T_HK_SAVE_AS 610
-#define T_HK_SAVE_URL_AS 611
-#define T_HK_SAVE_FORMATTED_DOCUMENT 612
-#define T_HK_COPY_URL_LOCATION 613
-#define T_HK_KILL_BACKGROUND_CONNECTIONS 614
-#define T_HK_KILL_ALL_CONNECTIONS 615
-#define T_HK_FLUSH_ALL_CACHES 616
-#define T_HK_RESOURCE_INFO 617
-#define T_HK_MEMORY_INFO 618
-#define T_HK_OS_SHELL 619
-#define T_HK_RESIZE_TERMINAL 620
-#define T_HK_EXIT 621
-#define T_HK_SEARCH 622
-#define T_HK_SEARCH_BACK 623
-#define T_HK_FIND_NEXT 624
-#define T_HK_FIND_PREVIOUS 625
-#define T_HK_TOGGLE_HTML_PLAIN 626
-#define T_HK_DOCUMENT_INFO 627
-#define T_HK_HEADER_INFO 628
-#define T_HK_FRAME_AT_FULL_SCREEN 629
-#define T_HK_SAVE_CLIPBOARD_TO_A_FILE 630
-#define T_HK_LOAD_CLIPBOARD_FROM_A_FILE 631
-#define T_HK_HTML_OPTIONS 632
-#define T_HK_COLOR 633
-#define T_HK_SAVE_HTML_OPTIONS 634
-#define T_HK_LANGUAGE 635
-#define T_HK_CHARACTER_SET 636
-#define T_HK_TERMINAL_OPTIONS 637
-#define T_HK_SCREEN_MARGINS 638
-#define T_HK_VIDEO_OPTIONS 639
-#define T_HK_NETWORK_OPTIONS 640
-#define T_HK_CONNECTIONS 641
-#define T_HK_IPV6_OPTIONS 642
-#define T_HK_PROXIES 643
-#define T_HK_SSL_OPTIONS 644
-#define T_HK_HTTP_OPTIONS 645
-#define T_HK_FTP_OPTIONS 646
-#define T_HK_SMB_OPTIONS 647
-#define T_HK_JAVASCRIPT_OPTIONS 648
-#define T_HK_MISCELANEOUS_OPTIONS 649
-#define T_HK_CACHE 650
-#define T_HK_MAIL_AND_TELNEL 651
-#define T_HK_ASSOCIATIONS 652
-#define T_HK_FILE_EXTENSIONS 653
-#define T_HK_BLOCK_LIST 654
-#define T_HK_SAVE_OPTIONS 655
-#define T_HK_ABOUT 656
-#define T_HK_KEYS 657
-#define T_HK_COPYING 658
-#define T_HK_MANUAL 659
-#define T_HK_HOMEPAGE 660
-#define T_HK_CALIBRATION 661
-#define T_HK_FILE 662
-#define T_HK_VIEW 663
-#define T_HK_LINK 664
-#define T_HK_DOWNLOADS 665
-#define T_HK_WINDOWS 666
-#define T_HK_SETUP 667
-#define T_HK_HELP 668
-#define T_HK_DISPLAY_USEMAP 669
-#define T_HK_FOLLOW_LINK 670
-#define T_HK_OPEN_IN_NEW_WINDOW 671
-#define T_HK_DOWNLOAD_LINK 672
-#define T_HK_RESET_FORM 673
-#define T_HK_SUBMIT_FORM 674
-#define T_HK_SUBMIT_FORM_AND_OPEN_IN_NEW_WINDOW 675
-#define T_HK_SUBMIT_FORM_AND_DOWNLOAD 676
-#define T_HK_VIEW_IMAGE 677
-#define T_HK_DOWNLOAD_IMAGE 678
-#define T_HK_SCALE_IMAGE_TO_FULL_SCREEN 679
-#define T_HK_COPY_LINK_LOCATION 680
-#define T_HK_BLOCK_URL 681
-#define T_HK_XTERM 682
-#define T_HK_TWTERM 683
-#define T_HK_SCREEN 684
-#define T_HK_WINDOW 685
-#define T_HK_FULL_SCREEN 686
-#define T_HK_BEOS_TERMINAL 687
-#define T_URL_MANUAL 688
-#define T_URL_HOMEPAGE 689
-#define T_URL_CALIBRATION 690
-#define T__N_TEXTS 691
+#define T__LOCALE_CODE 3
+#define T__DEFAULT_CHAR_SET 4
+#define T_OK 5
+#define T_CANCEL 6
+#define T_BAD_NUMBER 7
+#define T_NUMBER_EXPECTED 8
+#define T_NUMBER_OUT_OF_RANGE 9
+#define T_BAD_STRING 10
+#define T_EMPTY_STRING_NOT_ALLOWED 11
+#define T_BAD_IP_ADDRESS 12
+#define T_INVALID_IP_ADDRESS_SYNTAX 13
+#define T_UNABLE_TO_USE_LOCAL_IP_ADDRESS 14
+#define T_CONFIG_ERROR 15
+#define T_UNABLE_TO_WRITE_TO_CONFIG_FILE 16
+#define T_HOME_DIRECTORY_INACCESSIBLE 17
+#define T_BOOKMARK_ERROR 18
+#define T_UNABLE_TO_WRITE_TO_BOOKMARK_FILE 19
+#define T_ABOUT 20
+#define T_LINKS__LYNX_LIKE 21
+#define T_VERSION 22
+#define T_VERSION_INFORMATION 23
+#define T_LINKS_VERSION 24
+#define T_OPERATING_SYSTEM_TYPE 25
+#define T_OPERATING_SYSTEM_VERSION 26
+#define T_COMPILER 27
+#define T_WORD_SIZE 28
+#define T_MEMORY 29
+#define T_FILE_SIZE 30
+#define T_DEBUGGING_LEVEL 31
+#define T_EVENT_HANDLER 32
+#define T_SELECT_SYSCALL 33
+#define T_dISABLED 34
+#define T_IPV6 35
+#define T_NOT_ENABLED_IN_SYSTEM 36
+#define T_LOCAL_NETWORK_ONLY 37
+#define T_UTF8_TERMINAL 38
+#define T_COMPRESSION_METHODS 39
+#define T_ENCRYPTION 40
+#define T_NO_CERTIFICATE_VERIFICATION 41
+#define T_GPM_MOUSE_DRIVER 42
+#define T_XTERM_FOR_OS2 43
+#define T_GRAPHICS_MODE 44
+#define T_IMAGE_LIBRARIES 45
+#define T_FONT_RENDERING 46
+#define T_INTERNAL 47
+#define T_OPENMP 48
+#define T_NOT_USED_IN_TEXT_MODE 49
+#define T_DISABLED 50
+#define T_THREAD 51
+#define T_THREADS 52
+#define T_THREADS5 53
+#define T_CONFIGURATION_DIRECTORY 54
+#define T_NONE 55
+#define T_KEYS 56
+#define T_KEYS_DESC 57
+#define T_KEYS_BRAILLE_DESC 58
+#define T_COPYING 59
+#define T_COPYING_DESC 60
+#define T_RESOURCES 61
+#define T_MEMORY_CACHE 62
+#define T_DECOMPRESSED_CACHE 63
+#define T_FONT_CACHE 64
+#define T_IMAGE_CACHE 65
+#define T_FORMATTED_DOCUMENT_CACHE 66
+#define T_DNS_CACHE 67
+#define T_TLS_SESSION_CACHE 68
+#define T_HANDLES 69
+#define T_TIMERS 70
+#define T_WAITING 71
+#define T_CONNECTING 72
+#define T_tRANSFERRING 73
+#define T_KEEPALIVE 74
+#define T_BYTES 75
+#define T_LETTERS 76
+#define T_FILES 77
+#define T_LOCKED 78
+#define T_LOADING 79
+#define T_IMAGES 80
+#define T_DOCUMENTS 81
+#define T_SERVERS 82
+#define T_MEMORY_ALLOCATED 83
+#define T_BLOCKS_ALLOCATED 84
+#define T_MEMORY_LARGE_BLOCKS 85
+#define T_BLOCKS_LARGE_BLOCKS 86
+#define T_MEMORY_REQUESTED 87
+#define T_BLOCKS_REQUESTED 88
+#define T_JS_MEMORY_ALLOCATED 89
+#define T_MEMORY_INFO 90
+#define T_NO_HISTORY 91
+#define T_NO_DOWNLOADS 92
+#define T_NO_FRAMES 93
+#define T_VT_100_FRAMES 94
+#define T_LINUX_OR_OS2_FRAMES 95
+#define T_KOI8R_FRAMES 96
+#define T_FREEBSD_FRAMES 97
+#define T_USE_11M 98
+#define T_RESTRICT_FRAMES_IN_CP850_852 99
+#define T_BLOCK_CURSOR 100
+#define T_COLOR 101
+#define T_BRAILLE_TERMINAL 102
+#define T_TERMINAL_OPTIONS 103
+#define T_SCREEN_MARGINS 104
+#define T_LEFT_MARGIN 105
+#define T_RIGHT_MARGIN 106
+#define T_TOP_MARGIN 107
+#define T_BOTTOM_MARGIN 108
+#define T_MARGINS_TOO_LARGE 109
+#define T_THE_ENTERED_VALUES_ARE_TOO_LARGE_FOR_THE_CURRENT_SCREEN 110
+#define T_NETWORK_OPTIONS 111
+#define T_IPV6_OPTIONS 112
+#define T_IPV6_DEFAULT 113
+#define T_IPV6_PREFER_IPV4 114
+#define T_IPV6_PREFER_IPV6 115
+#define T_IPV6_USE_ONLY_IPV4 116
+#define T_IPV6_USE_ONLY_IPV6 117
+#define T_PROXIES 118
+#define T_HTTP_PROXY__HOST_PORT 119
+#define T_FTP_PROXY__HOST_PORT 120
+#define T_HTTPS_PROXY__HOST_PORT 121
+#define T_SOCKS_4A_PROXY__USER_HOST_PORT 122
+#define T_APPEND_TEXT_TO_SOCKS_LOOKUPS 123
+#define T_NOPROXY_LIST 124
+#define T_ONLY_PROXIES 125
+#define T_TOR_MODE_ENABLED 126
+#define T_SSL_OPTIONS 127
+#define T_ACCEPT_INVALID_CERTIFICATES 128
+#define T_WARN_ON_INVALID_CERTIFICATES 129
+#define T_REJECT_INVALID_CERTIFICATES 130
+#define T_USE_BUILT_IN_CERTIFICATES 131
+#define T_CLIENT_CERTIFICATE_KEY_FILE 132
+#define T_CLIENT_CERTIFICATE_FILE 133
+#define T_CLIENT_CERTIFICATE_KEY_PASSWORD 134
+#define T_BAD_FILE 135
+#define T_THE_FILE_DOES_NOT_EXIST 136
+#define T_THE_FILE_HAS_INVALID_FORMAT 137
+#define T_ERROR_INITIALIZING_BUILT_IN_CERTIFICATES 138
+#define T_FAILED 139
+#define T_CONNECTIONS 140
+#define T_MAX_CONNECTIONS 141
+#define T_MAX_CONNECTIONS_TO_ONE_HOST 142
+#define T_RETRIES 143
+#define T_RECEIVE_TIMEOUT_SEC 144
+#define T_TIMEOUT_WHEN_UNRESTARTABLE 145
+#define T_TIMEOUT_WHEN_TRYING_MULTIPLE_ADDRESSES 146
+#define T_TIMEOUT_WHEN_TRYING_KEEPALIVE_CONNECTION 147
+#define T_BIND_TO_LOCAL_IP_ADDRESS 148
+#define T_BIND_TO_LOCAL_IPV6_ADDRESS 149
+#define T_ASYNC_DNS_LOOKUP 150
+#define T_SET_TIME_OF_DOWNLOADED_FILES 151
+#define T_CACHE_OPTIONS 152
+#define T_MEMORY_CACHE_SIZE__KB 153
+#define T_IMAGE_CACHE_SIZE__KB 154
+#define T_FONT_CACHE_SIZE__KB 155
+#define T_NUMBER_OF_FORMATTED_DOCUMENTS 156
+#define T_AGGRESSIVE_CACHE 157
+#define T_HTML_OPTIONS 158
+#define T_DISPLAY_TABLES 159
+#define T_DISPLAY_FRAMES 160
+#define T_BREAK_LONG_LINES 161
+#define T_DISPLAY_IMAGES 162
+#define T_DISPLAY_IMAGE_FILENAMES 163
+#define T_DISPLAY_LINKS_TO_IMAGES 164
+#define T_LINK_ORDER_BY_COLUMNS 165
+#define T_NUMBERED_LINKS 166
+#define T_AUTO_REFRESH 167
+#define T_TARGET_IN_NEW_WINDOW 168
+#define T_TEXT_MARGIN 169
+#define T_DEFAULT_CODEPAGE 170
+#define T_IGNORE_CHARSET_INFO_SENT_BY_SERVER 171
+#define T_TEXT_COLOR 172
+#define T_LINK_COLOR 173
+#define T_BACKGROUND_COLOR 174
+#define T_IGNORE_DOCUMENT_COLOR 175
+#define T_COLOR_0 176
+#define T_COLOR_1 177
+#define T_COLOR_2 178
+#define T_COLOR_3 179
+#define T_COLOR_4 180
+#define T_COLOR_5 181
+#define T_COLOR_6 182
+#define T_COLOR_7 183
+#define T_COLOR_8 184
+#define T_COLOR_9 185
+#define T_COLOR_10 186
+#define T_COLOR_11 187
+#define T_COLOR_12 188
+#define T_COLOR_13 189
+#define T_COLOR_14 190
+#define T_COLOR_15 191
+#define T_GOTO_URL 192
+#define T_GO_BACK 193
+#define T_GO_FORWARD 194
+#define T_HISTORY 195
+#define T_RELOAD 196
+#define T_NEW_WINDOW 197
+#define T_SAVE_AS 198
+#define T_SAVE_URL_AS 199
+#define T_SAVE_FORMATTED_DOCUMENT 200
+#define T_COPY_URL_LOCATION 201
+#define T_KILL_BACKGROUND_CONNECTIONS 202
+#define T_KILL_ALL_CONNECTIONS 203
+#define T_FLUSH_ALL_CACHES 204
+#define T_RESOURCE_INFO 205
+#define T_OS_SHELL 206
+#define T_EXIT 207
+#define T_SEARCH 208
+#define T_SEARCH_BACK 209
+#define T_FIND_NEXT 210
+#define T_FIND_PREVIOUS 211
+#define T_TOGGLE_HTML_PLAIN 212
+#define T_DOCUMENT_INFO 213
+#define T_FRAME_AT_FULL_SCREEN 214
+#define T_SAVE_CLIPBOARD_TO_A_FILE 215
+#define T_LOAD_CLIPBOARD_FROM_A_FILE 216
+#define T_THE_CLIPBOARD_IS_EMPTY 217
+#define T_SAVE_HTML_OPTIONS 218
+#define T_CHARACTER_SET 219
+#define T_DEFAULT_CHARSET 220
+#define T_CACHE 221
+#define T_MAIL_AND_TELNEL 222
+#define T_MAIL_TELNET_AND_SHELL 223
+#define T_ASSOCIATIONS 224
+#define T_FILE_EXTENSIONS 225
+#define T_SAVE_OPTIONS 226
+#define T_FILE 227
+#define T_VIEW 228
+#define T_LINK 229
+#define T_DOWNLOADS 230
+#define T_WINDOWS 231
+#define T_SETUP 232
+#define T_HELP 233
+#define T_ENTER_URL 234
+#define T_SAVE_URL 235
+#define T_DOWNLOAD 236
+#define T_SAVE_TO_FILE 237
+#define T_SEARCH_FOR_TEXT 238
+#define T_PAGE_P 239
+#define T_PAGE_OF 240
+#define T_PAGE_CL 241
+#define T_FORMATTING_DOCUMENT 242
+#define T_SEARCHING 243
+#define T_WAITING_IN_QUEUE 244
+#define T_LOOKING_UP_HOST 245
+#define T_MAKING_CONNECTION 246
+#define T_MAKING_CONNECTION_TO_ANOTHER_ADDRESS 247
+#define T_SOCKS_NEGOTIATION 248
+#define T_SSL_NEGOTIATION 249
+#define T_REQUEST_SENT 250
+#define T_LOGGING_IN 251
+#define T_GETTING_HEADERS 252
+#define T_SERVER_IS_PROCESSING_REQUEST 253
+#define T_TRANSFERRING 254
+#define T_INTERRUPTED 255
+#define T_INTERNAL_ERROR 256
+#define T_OUT_OF_MEMORY 257
+#define T_HOST_NOT_FOUND 258
+#define T_PROXY_NOT_FOUND 259
+#define T_ERROR_WRITING_TO_SOCKET 260
+#define T_ERROR_READING_FROM_SOCKET 261
+#define T_DATA_MODIFIED 262
+#define T_BAD_URL_SYNTAX 263
+#define T_BAD_PROXY_SYNTAX 264
+#define T_RECEIVE_TIMEOUT 265
+#define T_REQUEST_MUST_BE_RESTARTED 266
+#define T_CANT_GET_SOCKET_STATE 267
+#define T_CYCLIC_REDIRECT 268
+#define T_TOO_LARGE_FILE 269
+#define T_BAD_HTTP_RESPONSE 270
+#define T_HTTP_100 271
+#define T_NO_CONTENT 272
+#define T_HTTPS_FWD_ERROR 273
+#define T_INVALID_CERTIFICATE 274
+#define T_DOWNGRADED_METHOD 275
+#define T_INSECURE_CIPHER 276
+#define T_UNKNOWN_FILE_TYPE 277
+#define T_ERROR_OPENING_FILE 278
+#define T_BAD_FTP_RESPONSE 279
+#define T_FTP_SERVICE_UNAVAILABLE 280
+#define T_BAD_FTP_LOGIN 281
+#define T_FTP_PORT_COMMAND_FAILED 282
+#define T_FILE_NOT_FOUND 283
+#define T_FTP_FILE_ERROR 284
+#define T_SSL_ERROR 285
+#define T_NO_SSL 286
+#define T_BAD_SOCKS_VERSION 287
+#define T_SOCKS_REJECTED_OR_FAILED 288
+#define T_SOCKS_NO_IDENTD 289
+#define T_SOCKS_BAD_USERID 290
+#define T_SOCKS_UNKNOWN_ERROR 291
+#define T_NO_SMB_CLIENT 292
+#define T_BLOCKED_URL 293
+#define T_SMB_NOT_ALLOWED 294
+#define T_FILE_NOT_ALLOWED 295
+#define T_NO_PROXY 296
+#define T_UNKNOWN_ERROR 297
+#define T_RECEIVED 298
+#define T_OF 299
+#define T_AVG 300
+#define T_CUR 301
+#define T_AVERAGE_SPEED 302
+#define T_SPEED 303
+#define T_CURRENT_SPEED 304
+#define T_ELAPSED_TIME 305
+#define T_ESTIMATED_TIME 306
+#define T_BACKGROUND 307
+#define T_ABORT 308
+#define T_ABORT_AND_DELETE_FILE 309
+#define T_YES 310
+#define T_NO 311
+#define T_NEVER 312
+#define T_DIRECTORY 313
+#define T_FILE_ALREADY_EXISTS 314
+#define T_ALREADY_EXISTS_AS_DOWNLOAD 315
+#define T_ALREADY_EXISTS 316
+#define T_DO_YOU_WISH_TO_CONTINUE 317
+#define T_DO_YOU_WISH_TO_OVERWRITE 318
+#define T_CONTINUE 319
+#define T_OVERWRITE 320
+#define T_RENAME 321
+#define T_DOWNLOAD_ERROR 322
+#define T_COULD_NOT_WRITE_TO_FILE 323
+#define T_ERROR_DOWNLOADING 324
+#define T_ERROR_LOADING 325
+#define T_COULD_NOT_CREATE_FILE 326
+#define T_COULD_NOT_CREATE_TEMPORARY_FILE 327
+#define T_ERROR_CALLING_LSEEK_ON_FILE 328
+#define T_TOO_LARGE_FILE_SEQUENCE 329
+#define T_UNKNOWN_TYPE 330
+#define T_CONTENT_TYPE_IS 331
+#define T_DO_YOU_WANT_TO_OPEN_SAVE_OR_DISPLAY_THIS_FILE 332
+#define T_DO_YOU_WANT_TO_OPEN_OR_DISPLAY_THIS_FILE 333
+#define T_DO_YOU_WANT_TO_SAVE_OR_DISLPAY_THIS_FILE 334
+#define T_SAVE 335
+#define T_DISPLAY 336
+#define T_WHAT_TO_DO 337
+#define T_DO_YOU_WANT_TO_OPEN_FILE_WITH 338
+#define T_SAVE_IT_OR_DISPLAY_IT 339
+#define T_OPEN 340
+#define T_OPEN_WITH 341
+#define T_DO_YOU_WANT_TO_FOLLOW_REDIRECT_AND_POST_FORM_DATA_TO_URL 342
+#define T_DO_YOU_WANT_TO_POST_FORM_DATA_TO_URL 343
+#define T_DO_YOU_WANT_TO_REPOST_FORM_DATA_TO_URL 344
+#define T_WARNING 345
+#define T_ERROR 346
+#define T_WELCOME 347
+#define T_WELCOME_TO_LINKS 348
+#define T_BASIC_HELP 349
+#define T_LABEL 350
+#define T_CONTENT_TYPES 351
+#define T_PROGRAM__IS_REPLACED_WITH_FILE_NAME 352
+#define T_BLOCK_TERMINAL_WHILE_PROGRAM_RUNNING 353
+#define T_RUN_ON_TERMINAL 354
+#define T_RUN_IN_XWINDOW 355
+#define T_ASK_BEFORE_OPENING 356
+#define T_ACCEPT_HTTP 357
+#define T_ACCEPT_FTP 358
+#define T_DELETE_ASSOCIATION 359
+#define T_ASSOCIATION 360
+#define T_EXTENSION_S 361
+#define T_CONTENT_TYPE 362
+#define T_DELETE_EXTENSION 363
+#define T_EXTENSION 364
+#define T_eXTENSION 365
+#define T_ERROR_WHILE_POSTING_FORM 366
+#define T_COULD_NOT_GET_FILE 367
+#define T_READING_FILES_IS_NOT_ALLOWED 368
+#define T_NO_PREVIOUS_SEARCH 369
+#define T_SEARCH_STRING_NOT_FOUND 370
+#define T_SAVE_ERROR 371
+#define T_ERROR_WRITING_TO_FILE 372
+#define T_ERROR_READING_THE_FILE 373
+#define T_DISPLAY_USEMAP 374
+#define T_FOLLOW_LINK 375
+#define T_OPEN_IN_NEW_WINDOW 376
+#define T_DOWNLOAD_LINK 377
+#define T_RESET_FORM 378
+#define T_SUBMIT_FORM 379
+#define T_SUBMIT_FORM_AND_OPEN_IN_NEW_WINDOW 380
+#define T_SUBMIT_FORM_AND_DOWNLOAD 381
+#define T_VIEW_IMAGE 382
+#define T_DOWNLOAD_IMAGE 383
+#define T_SCALE_IMAGE_TO_FULL_SCREEN 384
+#define T_NO_LINK_SELECTED 385
+#define T_IMAGE 386
+#define T_USEMAP 387
+#define T_XTERM 388
+#define T_TWTERM 389
+#define T_SCREEN 390
+#define T_WINDOW 391
+#define T_FULL_SCREEN 392
+#define T_BEOS_TERMINAL 393
+#define T_UNABLE_TO_OPEN_NEW_WINDOW 394
+#define T_JAVASCRIPT 395
+#define T_SUBMIT_FORM_TO 396
+#define T_POST_FORM_TO 397
+#define T_RADIO_BUTTON 398
+#define T_CHECKBOX 399
+#define T_SELECT_FIELD 400
+#define T_TEXT_FIELD 401
+#define T_TEXT_AREA 402
+#define T_FILE_UPLOAD 403
+#define T_PASSWORD_FIELD 404
+#define T_BUTTON 405
+#define T_NAME 406
+#define T_VALUE 407
+#define T_HIT_ENTER_TO 408
+#define T_SUBMIT_TO 409
+#define T_POST_TO 410
+#define T_INFO 411
+#define T_HEADER_INFO 412
+#define T_YOU_ARE_NOWHERE 413
+#define T_NO_HEADER 414
+#define T_URL 415
+#define T_IP_ADDRESS 416
+#define T_IP_ADDRESSES 417
+#define T_SIZE 418
+#define T_COMPRESSED_WITH 419
+#define T_INCOMPLETE 420
+#define T_CODEPAGE 421
+#define T_ASSUMED 422
+#define T_IGNORING_SERVER_SETTING 423
+#define T_SERVER 424
+#define T_DATE 425
+#define T_LAST_MODIFIED 426
+#define T_SSL_CIPHER 427
+#define T_CERTIFICATE_AUTHORITY 428
+#define T_CERTIFICATE_AUTHORITIES 429
+#define T_LANGUAGE 430
+#define T_DEFAULT_LANG 431
+#define T_GO_TO_LINK 432
+#define T_ENTER_LINK_NUMBER 433
+#define T_RESIZE_TERMINAL 434
+#define T_COLUMNS 435
+#define T_ROWS 436
+#define T_GOTO 437
+#define T_CLOSE 438
+#define T_FOLDER 439
+#define T_fOLDER 440
+#define T_ADD 441
+#define T_DELETE 442
+#define T_EDIT 443
+#define T_MOVE 444
+#define T_NO_ITEMS_SELECTED 445
+#define T_UNSELECT_ALL 446
+#define T_BOOKMARKS 447
+#define T_BOOKMARK 448
+#define T_ADD_BOOKMARK 449
+#define T_ADD_ASSOCIATION 450
+#define T_ADD_EXTENSION 451
+#define T_ADD_FOLDER 452
+#define T_BOOKMARK_TITLE 453
+#define T_EDIT_BOOKMARK 454
+#define T_EDIT_ASSOCIATION 455
+#define T_EDIT_EXTENSION 456
+#define T_DELETE_BOOKMARK 457
+#define T_EDIT_FOLDER 458
+#define T_DELETE_FOLDER 459
+#define T_NOT_EMPTY_SURE_DELETE 460
+#define T_BOOKMARK_MANAGER 461
+#define T_ASSOCIATIONS_MANAGER 462
+#define T_EXTENSIONS_MANAGER 463
+#define T_url 464
+#define T_NNAME 465
+#define T_EXIT_LINKS 466
+#define T_DO_YOU_REALLY_WANT_TO_CLOSE_WINDOW 467
+#define T_DO_YOU_REALLY_WANT_TO_EXIT_LINKS 468
+#define T_DO_YOU_REALLY_WANT_TO_EXIT_LINKS_AND_TERMINATE_ALL_DOWNLOADS 469
+#define T_HTTP_OPTIONS 470
+#define T_FTP_OPTIONS 471
+#define T_SMB_OPTIONS 472
+#define T_HTTP_BUG_WORKAROUNDS 473
+#define T_USE_HTTP_10 474
+#define T_ALLOW_SERVER_BLACKLIST 475
+#define T_DO_NOT_SEND_ACCEPT_CHARSET 476
+#define T_DO_NOT_ADVERTISE_COMPRESSION_SUPPORT 477
+#define T_RETRY_ON_INTERNAL_ERRORS 478
+#define T_HEADER_OPTIONS 479
+#define T_HTTP_HEADER_OPTIONS 480
+#define T_FAKE_FIREFOX 481
+#define T_DO_NOT_TRACK 482
+#define T_REFERER_NONE 483
+#define T_REFERER_SAME_URL 484
+#define T_REFERER_FAKE 485
+#define T_REFERER_REAL_SAME_SERVER 486
+#define T_REFERER_REAL 487
+#define T_FAKE_REFERER 488
+#define T_FAKE_USERAGENT 489
+#define T_EXTRA_HEADER 490
+#define T_PASSWORD_FOR_ANONYMOUS_LOGIN 491
+#define T_USE_PASSIVE_FTP 492
+#define T_USE_EPRT_EPSV 493
+#define T_SET_TYPE_OF_SERVICE 494
+#define T_ALLOW_HYPERLINKS_TO_SMB 495
+#define T_MANUAL 496
+#define T_HOMEPAGE 497
+#define T_CALIBRATION 498
+#define T_MAILTO_PROG 499
+#define T_SHELL_PROG 500
+#define T_TELNET_PROG 501
+#define T_MAGNET_PROG 502
+#define T_TN3270_PROG 503
+#define T_MMS_PROG 504
+#define T_MAIL_AND_TELNET_PROGRAMS 505
+#define T_MAIL_TELNET_AND_SHELL_PROGRAMS 506
+#define T_NO_PROGRAM 507
+#define T_NO_PROGRAM_SPECIFIED_FOR 508
+#define T_MAIL 509
+#define T_TELNET 510
+#define T_MAGNET 511
+#define T_TN3270 512
+#define T_MMS 513
+#define T_BAD_MAILTO_URL 514
+#define T_BAD_TELNET_URL 515
+#define T_BAD_TN3270_URL 516
+#define T_MMS_URL_CONTAINS_INACCEPTABLE_CHARACTERS 517
+#define T_AUTHORIZATION_REQUIRED 518
+#define T_PROXY_AUTHORIZATION_REQUIRED 519
+#define T_USERID 520
+#define T_PASSWORD 521
+#define T_ENTER_USERNAME 522
+#define T_AT 523
+#define T_THE_SERVER_ 524
+#define T_DOESNT_HAVE_A_VALID_CERTIFICATE 525
+#define T_USES_DOWNGRADED_METHOD 526
+#define T_USES_INSECURE_CIPHER 527
+#define T_WAITING_FOR_REDIRECT_CONFIRMATION 528
+#define T_DECOMPRESSION_ERROR 529
+#define T_ERROR_DECOMPRESSING_ 530
+#define T__wITH_ 531
+#define T_COMPRESSED_ERROR 532
+#define T_UNKNOWN_COMPRESSION_METHOD 533
+#define T_SURE_DELETE 534
+#define T_BOOKMARKS_ALREADY_IN_USE 535
+#define T_ASSOCIATIONS_ALREADY_IN_USE 536
+#define T_EXTENSIONS_ALREADY_IN_USE 537
+#define T_VIDEO_OPTIONS 538
+#define T_VIDEO_OPTIONS_TEXT 539
+#define T_RED_DISPLAY_GAMMA 540
+#define T_GREEN_DISPLAY_GAMMA 541
+#define T_BLUE_DISPLAY_GAMMA 542
+#define T_USER_GAMMA 543
+#define T_ASPECT_RATIO 544
+#define T_DITHER_LETTERS 545
+#define T_DITHER_IMAGES 546
+#define T_8_BIT_GAMMA_CORRECTION 547
+#define T_16_BIT_GAMMA_CORRECTION 548
+#define T_AUTO_GAMMA_CORRECTION 549
+#define T_RGB_PALETTE_8x8x4 550
+#define T_RGB_PALETTE_6x6x6 551
+#define T_SWITCH_PALETTE 552
+#define T_OVERWRITE_SCREEN_INSTEAD_OF_SCROLLING_IT 553
+#define T_ALERT 554
+#define T_QUESTION 555
+#define T_KILL_SCRIPT 556
+#define T_KILL_ALL_SCRIPTS 557
+#define T_SCRIPT_KILLED_BY_USER 558
+#define T_SCRIPT_TRYING_TO_CLOSE_WINDOW 559
+#define T_ENTER_STRING 560
+#define T_JAVASCRIPT_OPTIONS 561
+#define T_ENABLE_JAVASCRIPT 562
+#define T_VERBOSE_JS_ERRORS 563
+#define T_VERBOSE_JS_WARNINGS 564
+#define T_MISCELANEOUS_OPTIONS 565
+#define T_FONTS 566
+#define T_REGULAR_FONT 567
+#define T_BOLD_FONT 568
+#define T_MONOSPACED_FONT 569
+#define T_MONOSPACED_BOLD_FONT 570
+#define T_ITALIC_FONT 571
+#define T_ITALIC_BOLD_FONT 572
+#define T_MONOSPACED_ITALIC_FONT 573
+#define T_MONOSPACED_ITALIC_BOLD_FONT 574
+#define T_BUILT_IN_FONT 575
+#define T_JAVASCRIPT_ERROR 576
+#define T_JAVASCRIPT_WARNING 577
+#define T_DISMISS 578
+#define T_MENU_FONT_SIZE 579
+#define T_USER_FONT_SIZE 580
+#define T_TURN_OFF_WARNINGS 581
+#define T_BOOKMARKS_ENCODING 582
+#define T_JS_IS_ATTEMPTING_TO_GO_TO_URL 583
+#define T_JS_IS_ATTEMPTING_TO_OPEN_NEW_WINDOW_WITH_URL 584
+#define T_JS_IS_ATTEMPTING_TO_GO_INTO_HISTORY 585
+#define T_TO_URL 586
+#define T_GOTO_HISTORY 587
+#define T_ALLOW 588
+#define T_REJECT 589
+#define T_ENABLE_ALL_CONVERSIONS 590
+#define T_ENABLE_GLOBAL_NAME_RESOLUTION 591
+#define T_MANUAL_JS_CONTROL 592
+#define T_JS_RECURSION_DEPTH 593
+#define T_MENU_BACKGROUND_COLOR 594
+#define T_MENU_FOREGROUND_COLOR 595
+#define T_SCROLL_BAR_BAR_COLOR 596
+#define T_SCROLL_BAR_AREA_COLOR 597
+#define T_SCROLL_BAR_FRAME_COLOR 598
+#define T_BOOKMARKS_FILE 599
+#define T_SAVE_URL_HISTORY_ON_EXIT 600
+#define T_ENTER_COLORS_AS_RGB_TRIPLETS 601
+#define T_JS_MEMORY_LIMIT_KB 602
+#define T_SCALE_ALL_IMAGES_BY 603
+#define T_PORN_ENABLE 604
+#define T_DISPLAY_OPTIMIZATION_CRT 605
+#define T_DISPLAY_OPTIMIZATION_LCD_RGB 606
+#define T_DISPLAY_OPTIMIZATION_LCD_BGR 607
+#define T_KEYBOARD_CODEPAGE 608
+#define T_COPY_LINK_LOCATION 609
+#define T_BLOCK_URL 610
+#define T_BLOCK_LIST 611
+#define T_BLOCKED_IMAGE 612
+#define T_BLOCK_LIST_IN_USE 613
+#define T_BLOCK_LIST_MANAGER 614
+#define T_BLOCK_ADD 615
+#define T_BLOCK_EDIT 616
+#define T_BLOCK_DELETE 617
+#define T_HK_GOTO_URL 618
+#define T_HK_GO_BACK 619
+#define T_HK_GO_FORWARD 620
+#define T_HK_HISTORY 621
+#define T_HK_RELOAD 622
+#define T_HK_BOOKMARKS 623
+#define T_HK_NEW_WINDOW 624
+#define T_HK_SAVE_AS 625
+#define T_HK_SAVE_URL_AS 626
+#define T_HK_SAVE_FORMATTED_DOCUMENT 627
+#define T_HK_COPY_URL_LOCATION 628
+#define T_HK_KILL_BACKGROUND_CONNECTIONS 629
+#define T_HK_KILL_ALL_CONNECTIONS 630
+#define T_HK_FLUSH_ALL_CACHES 631
+#define T_HK_RESOURCE_INFO 632
+#define T_HK_MEMORY_INFO 633
+#define T_HK_OS_SHELL 634
+#define T_HK_RESIZE_TERMINAL 635
+#define T_HK_EXIT 636
+#define T_HK_SEARCH 637
+#define T_HK_SEARCH_BACK 638
+#define T_HK_FIND_NEXT 639
+#define T_HK_FIND_PREVIOUS 640
+#define T_HK_TOGGLE_HTML_PLAIN 641
+#define T_HK_DOCUMENT_INFO 642
+#define T_HK_HEADER_INFO 643
+#define T_HK_FRAME_AT_FULL_SCREEN 644
+#define T_HK_SAVE_CLIPBOARD_TO_A_FILE 645
+#define T_HK_LOAD_CLIPBOARD_FROM_A_FILE 646
+#define T_HK_HTML_OPTIONS 647
+#define T_HK_COLOR 648
+#define T_HK_SAVE_HTML_OPTIONS 649
+#define T_HK_LANGUAGE 650
+#define T_HK_CHARACTER_SET 651
+#define T_HK_TERMINAL_OPTIONS 652
+#define T_HK_SCREEN_MARGINS 653
+#define T_HK_VIDEO_OPTIONS 654
+#define T_HK_NETWORK_OPTIONS 655
+#define T_HK_CONNECTIONS 656
+#define T_HK_IPV6_OPTIONS 657
+#define T_HK_PROXIES 658
+#define T_HK_SSL_OPTIONS 659
+#define T_HK_HTTP_OPTIONS 660
+#define T_HK_FTP_OPTIONS 661
+#define T_HK_SMB_OPTIONS 662
+#define T_HK_JAVASCRIPT_OPTIONS 663
+#define T_HK_MISCELANEOUS_OPTIONS 664
+#define T_HK_FONTS 665
+#define T_HK_CACHE 666
+#define T_HK_MAIL_AND_TELNEL 667
+#define T_HK_ASSOCIATIONS 668
+#define T_HK_FILE_EXTENSIONS 669
+#define T_HK_BLOCK_LIST 670
+#define T_HK_SAVE_OPTIONS 671
+#define T_HK_ABOUT 672
+#define T_HK_KEYS 673
+#define T_HK_COPYING 674
+#define T_HK_MANUAL 675
+#define T_HK_HOMEPAGE 676
+#define T_HK_CALIBRATION 677
+#define T_HK_FILE 678
+#define T_HK_VIEW 679
+#define T_HK_LINK 680
+#define T_HK_DOWNLOADS 681
+#define T_HK_WINDOWS 682
+#define T_HK_SETUP 683
+#define T_HK_HELP 684
+#define T_HK_DISPLAY_USEMAP 685
+#define T_HK_FOLLOW_LINK 686
+#define T_HK_OPEN_IN_NEW_WINDOW 687
+#define T_HK_DOWNLOAD_LINK 688
+#define T_HK_RESET_FORM 689
+#define T_HK_SUBMIT_FORM 690
+#define T_HK_SUBMIT_FORM_AND_OPEN_IN_NEW_WINDOW 691
+#define T_HK_SUBMIT_FORM_AND_DOWNLOAD 692
+#define T_HK_VIEW_IMAGE 693
+#define T_HK_DOWNLOAD_IMAGE 694
+#define T_HK_SCALE_IMAGE_TO_FULL_SCREEN 695
+#define T_HK_COPY_LINK_LOCATION 696
+#define T_HK_BLOCK_URL 697
+#define T_HK_XTERM 698
+#define T_HK_TWTERM 699
+#define T_HK_SCREEN 700
+#define T_HK_WINDOW 701
+#define T_HK_FULL_SCREEN 702
+#define T_HK_BEOS_TERMINAL 703
+#define T_URL_MANUAL 704
+#define T_URL_HOMEPAGE 705
+#define T_URL_CALIBRATION 706
+#define T__N_TEXTS 707
diff --git a/language.inc b/language.inc
@@ -6,6 +6,7 @@ static const struct {
{ "us-ascii" },
{ "English" },
{ "en" },
+ { "en_US,en_GB,en_AU,en_CA,en_IN,en_IE,en_MT,en_NZ,en_PH,en_SG,en_ZA" },
{ "ISO-8859-1" },
{ "OK" },
{ "Cancel" },
@@ -48,6 +49,8 @@ static const struct {
{ "Xterm for OS/2" },
{ "Graphics mode" },
{ "Image libraries" },
+ { "Font rendering" },
+ { "Internal" },
{ "OpenMP" },
{ "Not used in text mode" },
{ "Disabled" },
@@ -147,6 +150,7 @@ static const struct {
{ "Receive timeout (sec)" },
{ "Timeout when unrestartable" },
{ "Timeout when trying multiple addresses" },
+ { "Timeout when trying keepalive connection" },
{ "Bind to local IP address" },
{ "... IPv6 address" },
{ "Async DNS lookup" },
@@ -255,7 +259,6 @@ static const struct {
{ "Server is processing request" },
{ "Transferring" },
{ "Interrupted" },
- { "Socket exception" },
{ "Internal error" },
{ "Out of memory" },
{ "Host not found" },
@@ -428,6 +431,8 @@ static const struct {
{ "Date" },
{ "Last modified" },
{ "SSL cipher" },
+ { "Certificate authority" },
+ { "Certificate authorities" },
{ "Language" },
{ "Default" },
{ "Go to link" },
@@ -564,6 +569,16 @@ static const struct {
{ "Verbose javascript errors" },
{ "Verbose javascript warnings" },
{ "Miscellaneous options" },
+ { "Fonts" },
+ { "Regular font" },
+ { "Bold font" },
+ { "Monospaced font" },
+ { "Monospaced bold font" },
+ { "Italic font" },
+ { "Italic bold font" },
+ { "Italic monospaced font" },
+ { "Italic monospaced bold font" },
+ { "Built-in font" },
{ "Javascript error" },
{ "Javascript warning" },
{ "Dismiss" },
@@ -653,6 +668,7 @@ static const struct {
{ "S" },
{ "J" },
{ "O" },
+ { "F" },
{ "C" },
{ "M" },
{ "A" },
diff --git a/links.1 b/links.1
@@ -125,7 +125,7 @@ Timeout on non restartable connections.
.TP
\f3-timeout-when-trying-multiple-addresses \f2<sec>\f1
-Timeout for connection when trying multiple addresses.
+Timeout for connection when trying multiple addresses or when resuming a keepalive connection.
(default: 3)
.TP
diff --git a/links.h b/links.h
@@ -484,6 +484,7 @@ struct cache_entry {
size_t decompressed_len;
unsigned char *ip_address;
unsigned char *ssl_info;
+ unsigned char *ssl_authority;
list_entry_last
unsigned char url[1];
};
@@ -523,6 +524,7 @@ typedef struct {
tcount bytes_written;
int session_set;
int session_retrieved;
+ unsigned char *ca;
} links_ssl;
#define PRI_MAIN 0
@@ -563,6 +565,7 @@ struct connection {
void *dnsquery;
pid_t pid;
int tries;
+ int keepalive;
tcount netcfg_stamp;
struct list_head statuss;
void *info;
@@ -626,7 +629,6 @@ extern struct list_head keepalive_connections;
#define S__OK (-2000000000)
#define S_INTERRUPTED (-2000000001)
-#define S_EXCEPT (-2000000002)
#define S_INTERNAL (-2000000003)
#define S_OUT_OF_MEM (-2000000004)
#define S_NO_DNS (-2000000005)
@@ -720,6 +722,7 @@ int abort_background_connections(void);
int is_entry_used(struct cache_entry *);
void clear_connection_timeout(struct connection *);
void set_connection_timeout(struct connection *);
+void set_connection_timeout_keepal(struct connection *);
void add_blacklist_entry(unsigned char *, int);
void del_blacklist_entry(unsigned char *, int);
int get_blacklist_flags(unsigned char *);
@@ -1249,7 +1252,7 @@ struct letter {
int code; /* Unicode code of the character */
short xsize; /* x size of the PNG image */
short ysize; /* y size of the PNG image */
- struct lru_entry* color_list;
+ struct lru_entry *color_list;
};
struct font {
@@ -1728,7 +1731,7 @@ struct form {
#define FC_TEXT 1
#define FC_PASSWORD 2
-#define FC_FILE 3
+#define FC_FILE_UPLOAD 3
#define FC_TEXTAREA 4
#define FC_CHECKBOX 5
#define FC_RADIO 6
@@ -1893,7 +1896,7 @@ struct document_options {
int display_images;
int image_scale;
int porn_enable;
- double bfu_aspect; /* 0.1 to 10.0, 1.0 default. >1 makes circle wider */
+ tcount gamma_stamp;
int real_cp; /* codepage of document. Does not really belong here. Must not be compared. Used only in get_attr_val */
};
@@ -2474,6 +2477,7 @@ struct dialog_data;
int f_is_finished(struct f_data *f);
unsigned long formatted_info(int);
+int shrink_format_cache(int u);
void init_fcache(void);
void html_interpret_recursive(struct f_data_c *);
void fd_loaded(struct object_request *, void *);
@@ -2553,6 +2557,8 @@ void shutdown_bfu(void);
#define DIALOG_LB gf_val(DIALOG_LEFT_BORDER + DIALOG_LEFT_INNER_BORDER + 1, G_DIALOG_LEFT_BORDER + G_DIALOG_VLINE_SPACE + 1 + G_DIALOG_LEFT_INNER_BORDER)
#define DIALOG_TB gf_val(DIALOG_TOP_BORDER + DIALOG_TOP_INNER_BORDER + 1, G_DIALOG_TOP_BORDER + G_DIALOG_HLINE_SPACE + 1 + G_DIALOG_TOP_INNER_BORDER)
+#define LL gf_val(1, G_BFU_FONT_SIZE)
+
extern unsigned char m_bar;
#define M_BAR (&m_bar)
@@ -2567,6 +2573,14 @@ struct menu_item {
int free_i;
};
+#define MENU_FREE_ITEMS 1
+#define MENU_FREE_TEXT 2
+#define MENU_FREE_RTEXT 4
+#define MENU_FREE_HOTKEY 8
+#define MENU_FONT_LIST 32
+#define MENU_FONT_LIST_BOLD 64
+#define MENU_FONT_LIST_MONO 128
+
struct menu {
int selected;
int view;
diff --git a/main.c b/main.c
@@ -288,6 +288,7 @@ static void end_dump(struct object_request *r, void *p)
} else if (ce) {
struct document_options o;
struct f_data_c *fd;
+ int err;
fd = create_f_data_c(NULL, NULL);
memset(&o, 0, sizeof(struct document_options));
o.xp = 0;
@@ -304,7 +305,10 @@ static void end_dump(struct object_request *r, void *p)
o.assume_cp = 0;
}
if (!(fd->f_data = cached_format_html(fd, r, r->url, &o, NULL, 0))) goto term_1;
- dump_to_file(fd->f_data, 1);
+ if ((err = dump_to_file(fd->f_data, 1))) {
+ fprintf(stderr, "Error writing to stdout: %s.\n", get_err_msg(err));
+ retval = RET_ERROR;
+ }
term_1:
reinit_f_data_c(fd);
free(fd);
diff --git a/menu.c b/menu.c
@@ -285,7 +285,7 @@ static int resource_info(struct terminal *term, struct refresh *r2)
add_to_str(&a, &l, get_text_translation(TEXT_(T_RESOURCES), term));
add_to_str(&a, &l, cast_uchar ": ");
add_unsigned_long_num_to_str(&a, &l, select_info(CI_FILES));
- add_to_str(&a, &l, cast_uchar " ");
+ add_chr_to_str(&a, &l, ' ');
add_to_str(&a, &l, get_text_translation(TEXT_(T_HANDLES), term));
add_to_str(&a, &l, cast_uchar ", ");
add_unsigned_long_num_to_str(&a, &l, select_info(CI_TIMERS));
@@ -461,7 +461,7 @@ static void add_history_menu_entry(struct terminal *term, struct menu_item **mi,
{
unsigned char *url;
if (!*mi)
- *mi = new_menu(3);
+ *mi = new_menu(MENU_FREE_ITEMS | MENU_FREE_TEXT);
url = display_url(term, l->url, 1);
add_to_menu(mi, url, cast_uchar "", cast_uchar "", go_backwards,
(void *)(long)l->location_id, 0, *n);
@@ -503,7 +503,7 @@ static void downloads_menu(struct terminal *term, void *ddd, void *ses_)
int n = 0;
foreachback(struct download, d, ld, downloads) {
unsigned char *f, *ff;
- if (!mi) mi = new_menu(7);
+ if (!mi) mi = new_menu(MENU_FREE_ITEMS | MENU_FREE_TEXT | MENU_FREE_RTEXT);
f = !d->prog ? d->orig_file : d->url;
for (ff = f; *ff; ff++)
if ((dir_sep(ff[0])
@@ -643,6 +643,8 @@ static void reinit_video(void)
/* Redraw all terminals */
cls_redraw_all_terminals();
+
+ shrink_format_cache(SH_FREE_ALL);
}
#define video_msg_0 TEXT_(T_VIDEO_OPTIONS_TEXT)
@@ -714,11 +716,11 @@ static void videoopt_fn(struct dialog_data *dlg)
if (w < 1) w = 1;
rw = 0;
dlg_format_text(dlg, NULL, video_msg_0, 0, &y, w, &rw, COLOR_DIALOG_TEXT, AL_LEFT);
- y += gf_val(1, G_BFU_FONT_SIZE);
+ y += LL;
did = dlg->items;
dlg_format_group(dlg, NULL, video_msg_1, did, array_elements(video_msg_1), 0, &y, w, &rw);
did += array_elements(video_msg_1);
- y += gf_val(1, G_BFU_FONT_SIZE);
+ y += LL;
dlg_format_checkboxes(dlg, NULL, did, array_elements(video_msg_2), dlg->x + DIALOG_LB, &y, w, &rw, video_msg_2);
did += array_elements(video_msg_2);
if (video_option_select_palette) {
@@ -733,7 +735,7 @@ static void videoopt_fn(struct dialog_data *dlg)
dlg_format_checkboxes(dlg, NULL, did, array_elements(video_msg_scrolling), dlg->x + DIALOG_LB, &y, w, &rw, video_msg_scrolling);
did += array_elements(video_msg_scrolling);
}
- y += gf_val(1, G_BFU_FONT_SIZE);
+ y += LL;
dlg_format_buttons(dlg, NULL, did, 2, 0, &y, w, &rw, AL_CENTER);
w = rw;
dlg->xw = w + 2 * DIALOG_LB;
@@ -742,11 +744,11 @@ static void videoopt_fn(struct dialog_data *dlg)
draw_dlg(dlg);
y = dlg->y + DIALOG_TB;
dlg_format_text(dlg, term, video_msg_0, dlg->x + DIALOG_LB, &y, w, NULL, COLOR_DIALOG_TEXT, AL_LEFT);
- y += gf_val(2, G_BFU_FONT_SIZE);
+ y += LL;
did = dlg->items;
dlg_format_group(dlg, term, video_msg_1, did, array_elements(video_msg_1), dlg->x + DIALOG_LB, &y, w, NULL);
did += array_elements(video_msg_1);
- y += gf_val(1, G_BFU_FONT_SIZE);
+ y += LL;
dlg_format_checkboxes(dlg, term, did, array_elements(video_msg_2), dlg->x + DIALOG_LB, &y, w, NULL, video_msg_2);
did += array_elements(video_msg_2);
if (video_option_select_palette) {
@@ -1088,10 +1090,10 @@ static void proxy_fn(struct dialog_data *dlg)
rw = 0;
for (i = 0; i < N_N; i++) {
dlg_format_text_and_field(dlg, NULL, proxy_msg[i], &dlg->items[i], 0, &y, w, &rw, COLOR_DIALOG_TEXT, AL_LEFT);
- y += gf_val(1, G_BFU_FONT_SIZE * 1);
+ y += LL;
}
dlg_format_group(dlg, NULL, proxy_msg + N_N, dlg->items + N_N, dlg->n - 2 - N_N, 0, &y, w, &rw);
- y += gf_val(1, G_BFU_FONT_SIZE);
+ y += LL;
dlg_format_buttons(dlg, NULL, dlg->items + dlg->n - 2, 2, 0, &y, w, &rw, AL_CENTER);
w = rw;
dlg->xw = w + 2 * DIALOG_LB;
@@ -1456,28 +1458,28 @@ static void ssl_options_fn(struct dialog_data *dlg)
if (w < 5) w = 5;
rw = 0;
dlg_format_checkboxes(dlg, NULL, dlg->items, dlg->n - 5, 0, &y, w, &rw, dlg->dlg->udata);
- y += gf_val(1, 1 * G_BFU_FONT_SIZE);
+ y += LL;
dlg_format_text_and_field(dlg, NULL, ssl_labels[dlg->n - 5], dlg->items + dlg->n - 5, 0, &y, w, &rw, COLOR_DIALOG_TEXT, AL_LEFT);
- y += gf_val(1, G_BFU_FONT_SIZE * 1);
+ y += LL;
dlg_format_text_and_field(dlg, NULL, ssl_labels[dlg->n - 4], dlg->items + dlg->n - 4, 0, &y, w, &rw, COLOR_DIALOG_TEXT, AL_LEFT);
- y += gf_val(1, G_BFU_FONT_SIZE * 1);
+ y += LL;
dlg_format_text_and_field(dlg, NULL, ssl_labels[dlg->n - 3], dlg->items + dlg->n - 3, 0, &y, w, &rw, COLOR_DIALOG_TEXT, AL_LEFT);
- y += gf_val(1, 1 * G_BFU_FONT_SIZE);
+ y += LL;
dlg_format_buttons(dlg, NULL, dlg->items + dlg->n - 2, 2, 0, &y, w, &rw, AL_CENTER);
w = rw;
dlg->xw = rw + 2 * DIALOG_LB;
dlg->yw = y + 2 * DIALOG_TB;
center_dlg(dlg);
draw_dlg(dlg);
- y = dlg->y + DIALOG_TB + gf_val(1, G_BFU_FONT_SIZE);
+ y = dlg->y + DIALOG_TB + LL;
dlg_format_checkboxes(dlg, term, dlg->items, dlg->n - 5, dlg->x + DIALOG_LB, &y, w, NULL, dlg->dlg->udata);
- y += gf_val(1, G_BFU_FONT_SIZE);
+ y += LL;
dlg_format_text_and_field(dlg, term, ssl_labels[dlg->n - 5], dlg->items + dlg->n - 5, dlg->x + DIALOG_LB, &y, w, NULL, COLOR_DIALOG_TEXT, AL_LEFT);
- y += gf_val(1, G_BFU_FONT_SIZE * 1);
+ y += LL;
dlg_format_text_and_field(dlg, term, ssl_labels[dlg->n - 4], dlg->items + dlg->n - 4, dlg->x + DIALOG_LB, &y, w, NULL, COLOR_DIALOG_TEXT, AL_LEFT);
- y += gf_val(1, G_BFU_FONT_SIZE * 1);
+ y += LL;
dlg_format_text_and_field(dlg, term, ssl_labels[dlg->n - 3], dlg->items + dlg->n - 3, dlg->x + DIALOG_LB, &y, w, NULL, COLOR_DIALOG_TEXT, AL_LEFT);
- y += gf_val(1, G_BFU_FONT_SIZE);
+ y += LL;
dlg_format_buttons(dlg, term, dlg->items + dlg->n - 2, 2, dlg->x + DIALOG_LB, &y, w, &rw, AL_CENTER);
}
@@ -1567,28 +1569,28 @@ static void httpheadopt_fn(struct dialog_data *dlg)
if (w < 5) w = 5;
rw = 0;
dlg_format_checkboxes(dlg, NULL, dlg->items, dlg->n - 5, 0, &y, w, &rw, dlg->dlg->udata);
- y += gf_val(1, 1 * G_BFU_FONT_SIZE);
+ y += LL;
dlg_format_text_and_field(dlg, NULL, http_header_labels[dlg->n - 5], dlg->items + dlg->n - 5, 0, &y, w, &rw, COLOR_DIALOG_TEXT, AL_LEFT);
- y += gf_val(1, G_BFU_FONT_SIZE * 1);
+ y += LL;
dlg_format_text_and_field(dlg, NULL, http_header_labels[dlg->n - 4], dlg->items + dlg->n - 4, 0, &y, w, &rw, COLOR_DIALOG_TEXT, AL_LEFT);
- y += gf_val(1, G_BFU_FONT_SIZE * 1);
+ y += LL;
dlg_format_text_and_field(dlg, NULL, http_header_labels[dlg->n - 3], dlg->items + dlg->n - 3, 0, &y, w, &rw, COLOR_DIALOG_TEXT, AL_LEFT);
- y += gf_val(1, 1 * G_BFU_FONT_SIZE);
+ y += LL;
dlg_format_buttons(dlg, NULL, dlg->items + dlg->n - 2, 2, 0, &y, w, &rw, AL_CENTER);
w = rw;
dlg->xw = rw + 2 * DIALOG_LB;
dlg->yw = y + 2 * DIALOG_TB;
center_dlg(dlg);
draw_dlg(dlg);
- y = dlg->y + DIALOG_TB + gf_val(1, G_BFU_FONT_SIZE);
+ y = dlg->y + DIALOG_TB + LL;
dlg_format_checkboxes(dlg, term, dlg->items, dlg->n - 5, dlg->x + DIALOG_LB, &y, w, NULL, dlg->dlg->udata);
- y += gf_val(1, G_BFU_FONT_SIZE);
+ y += LL;
dlg_format_text_and_field(dlg, term, http_header_labels[dlg->n - 5], dlg->items + dlg->n - 5, dlg->x + DIALOG_LB, &y, w, NULL, COLOR_DIALOG_TEXT, AL_LEFT);
- y += gf_val(1, G_BFU_FONT_SIZE * 1);
+ y += LL;
dlg_format_text_and_field(dlg, term, http_header_labels[dlg->n - 4], dlg->items + dlg->n - 4, dlg->x + DIALOG_LB, &y, w, NULL, COLOR_DIALOG_TEXT, AL_LEFT);
- y += gf_val(1, G_BFU_FONT_SIZE * 1);
+ y += LL;
dlg_format_text_and_field(dlg, term, http_header_labels[dlg->n - 3], dlg->items + dlg->n - 3, dlg->x + DIALOG_LB, &y, w, NULL, COLOR_DIALOG_TEXT, AL_LEFT);
- y += gf_val(1, G_BFU_FONT_SIZE);
+ y += LL;
dlg_format_buttons(dlg, term, dlg->items + dlg->n - 2, 2, dlg->x + DIALOG_LB, &y, w, &rw, AL_CENTER);
}
@@ -2036,7 +2038,7 @@ static void select_color(struct terminal *term, int n, int *ptr)
{
int i;
struct menu_item *mi;
- mi = new_menu(1);
+ mi = new_menu(MENU_FREE_ITEMS);
for (i = 0; i < n; i++) {
add_to_menu(&mi, TEXT_(T_COLOR_0 + i), cast_uchar "", cast_uchar "", set_val, (void *)(unsigned long)i, 0, i);
}
@@ -2235,20 +2237,19 @@ static void miscopt_fn(struct dialog_data *dlg)
if (F)
{
dlg_format_group(dlg, NULL, labels, dlg->items,1,dlg->x + DIALOG_LB, &y, w, &rw);
- y += gf_val(1, G_BFU_FONT_SIZE);
+ y += LL;
dlg_format_text(dlg, NULL, labels[1], dlg->x + DIALOG_LB, &y, w, &rw, COLOR_DIALOG_TEXT, AL_LEFT);
- y += gf_val(1, G_BFU_FONT_SIZE);
+ y += LL;
dlg_format_group(dlg, NULL, labels+2, dlg->items+1,5,dlg->x + DIALOG_LB, &y, w, &rw);
- y += gf_val(1, G_BFU_FONT_SIZE);
+ y += LL;
}
#endif
- if (bmk)
- {
+ if (bmk) {
dlg_format_text_and_field(dlg, NULL, labels[F?7:0], dlg->items + dlg->n - 4 - a - bmk, 0, &y, w, &rw, COLOR_DIALOG_TEXT, AL_LEFT);
- y += gf_val(1, G_BFU_FONT_SIZE);
+ y += LL;
}
if (bmk) {
- y += gf_val(1, G_BFU_FONT_SIZE);
+ y += LL;
dlg_format_buttons(dlg, NULL, dlg->items + dlg->n - 3 - a - bmk, 1, 0, &y, w, &rw, AL_LEFT);
}
if (a) dlg_format_buttons(dlg, NULL, dlg->items + dlg->n - 3 - bmk, 1, 0, &y, w, &rw, AL_LEFT);
@@ -2261,30 +2262,28 @@ static void miscopt_fn(struct dialog_data *dlg)
draw_dlg(dlg);
y = dlg->y + DIALOG_TB;
#ifdef G
- if (F)
- {
- y += gf_val(1, G_BFU_FONT_SIZE);
+ if (F) {
+ y += LL;
dlg_format_group(dlg, term, labels, dlg->items,1,dlg->x + DIALOG_LB, &y, w, NULL);
- y += gf_val(1, G_BFU_FONT_SIZE);
+ y += LL;
dlg_format_text(dlg, term, labels[1], dlg->x + DIALOG_LB, &y, w, NULL, COLOR_DIALOG_TEXT, AL_LEFT);
- y += gf_val(1, G_BFU_FONT_SIZE);
+ y += LL;
dlg_format_group(dlg, term, labels+2, dlg->items+1,5,dlg->x + DIALOG_LB, &y, w, NULL);
- y += gf_val(1, G_BFU_FONT_SIZE);
+ y += LL;
} else
#endif
{
- y += gf_val(1, G_BFU_FONT_SIZE);
+ y += LL;
}
- if (bmk)
- {
+ if (bmk) {
dlg_format_text_and_field(dlg, term, labels[F?7:0], dlg->items + dlg->n - 4 - a - bmk, dlg->x + DIALOG_LB, &y, w, NULL, COLOR_DIALOG_TEXT, AL_LEFT);
- y += gf_val(1, G_BFU_FONT_SIZE);
+ y += LL;
dlg_format_buttons(dlg, term, dlg->items + dlg->n - 3 - a - bmk, 1, dlg->x + DIALOG_LB, &y, w, NULL, AL_CENTER);
}
if (a) dlg_format_buttons(dlg, term, dlg->items + dlg->n - 3 - bmk, 1, dlg->x + DIALOG_LB, &y, w, NULL, AL_CENTER);
if (bmk) {
dlg_format_checkboxes(dlg, term, dlg->items + dlg->n - 3, 1, dlg->x + DIALOG_LB, &y, w, NULL, miscopt_checkbox_labels);
- y += gf_val(1, G_BFU_FONT_SIZE);
+ y += LL;
}
dlg_format_buttons(dlg, term, dlg->items+dlg->n-2, 2, dlg->x + DIALOG_LB, &y, w, NULL, AL_CENTER);
}
@@ -2462,7 +2461,7 @@ static const struct menu_item file_menu211_clipb[] = {
#endif
static const struct menu_item file_menu22[] = {
- { cast_uchar "", cast_uchar "", M_BAR, NULL, NULL, 0, 1} ,
+ { cast_uchar "", cast_uchar "", M_BAR, NULL, NULL, 0, 1},
{ TEXT_(T_KILL_BACKGROUND_CONNECTIONS), cast_uchar "", TEXT_(T_HK_KILL_BACKGROUND_CONNECTIONS), menu_kill_background_connections, NULL, 0, 1 },
{ TEXT_(T_KILL_ALL_CONNECTIONS), cast_uchar "", TEXT_(T_HK_KILL_ALL_CONNECTIONS), menu_kill_all_connections, NULL, 0, 1 },
{ TEXT_(T_FLUSH_ALL_CACHES), cast_uchar "", TEXT_(T_HK_FLUSH_ALL_CACHES), flush_caches, NULL, 0, 1 },
diff --git a/sched.c b/sched.c
@@ -202,6 +202,7 @@ int get_keepalive_socket(struct connection *c, int *protocol_data)
c->sock1 = cc;
if (max_tries == 1)
c->tries = -1;
+ c->keepalive = 1;
return 0;
}
@@ -522,6 +523,7 @@ static void run_connection(struct connection *c)
}
hc->conn++;
active_connections++;
+ c->keepalive = 0;
c->running = 1;
func(c);
}
@@ -1015,6 +1017,16 @@ void set_connection_timeout(struct connection *c)
c->timer = install_timer(get_timeout_value(c), connection_timeout_1, c);
}
+void set_connection_timeout_keepal(struct connection *c)
+{
+ if (c->keepalive && !c->unrestartable) {
+ clear_connection_timeout(c);
+ c->timer = install_timer(timeout_multiple_addresses * 1000, connection_timeout, c);
+ return;
+ }
+ set_connection_timeout(c);
+}
+
void abort_all_connections(void)
{
while (!list_empty(queue)) {
diff --git a/session.c b/session.c
@@ -60,7 +60,6 @@ static const struct s_msg_dsc msg_dsc[] = {
{S__OK, TEXT_(T_OK)},
{S_INTERRUPTED, TEXT_(T_INTERRUPTED)},
- {S_EXCEPT, TEXT_(T_SOCKET_EXCEPTION)},
{S_INTERNAL, TEXT_(T_INTERNAL_ERROR)},
{S_OUT_OF_MEM, TEXT_(T_OUT_OF_MEMORY)},
{S_NO_DNS, TEXT_(T_HOST_NOT_FOUND)},
@@ -111,6 +110,7 @@ static const struct s_msg_dsc msg_dsc[] = {
{S_WAIT_REDIR, TEXT_(T_WAITING_FOR_REDIRECT_CONFIRMATION)},
{0, NULL}
};
+
struct strerror_val {
list_entry_1st
#ifdef REORDER_LIST_ENTRIES
@@ -150,7 +150,9 @@ unsigned char *get_err_msg(int state)
if ((e = cast_uchar strerror(-state)) && *e) goto have_error;
goto unk;
have_error:
- foreach(struct strerror_val, s, ls, strerror_buf) if (!strcmp(cast_const_char s->msg, cast_const_char e)) return s->msg;
+ foreach(struct strerror_val, s, ls, strerror_buf) if (!strcmp(cast_const_char s->msg, cast_const_char e)) {
+ return s->msg;
+ }
sl = strlen(cast_const_char e);
if (sl > INT_MAX - sizeof(struct strerror_val)) overalloc();
s = xmalloc(sizeof(struct strerror_val) + sl);
@@ -211,27 +213,25 @@ static unsigned char *get_stat_msg(struct status *stat, struct terminal *term)
unsigned char *m = init_str();
int l = 0;
add_to_str(&m, &l, get_text_translation(TEXT_(T_RECEIVED), term));
- add_to_str(&m, &l, cast_uchar " ");
+ add_chr_to_str(&m, &l, ' ');
add_xnum_to_str(&m, &l, stat->prg->pos);
if (stat->prg->size >= 0) {
- add_to_str(&m, &l, cast_uchar " ");
- add_to_str(&m, &l, get_text_translation(TEXT_(T_OF),
- term));
- add_to_str(&m, &l, cast_uchar " ");
+ add_chr_to_str(&m, &l, ' ');
+ add_to_str(&m, &l, get_text_translation(TEXT_(T_OF), term));
+ add_chr_to_str(&m, &l, ' ');
add_xnum_to_str(&m, &l, stat->prg->size);
}
add_to_str(&m, &l, cast_uchar ", ");
if (stat->prg->elapsed >= CURRENT_SPD_AFTER * SPD_DISP_TIME) {
- add_to_str(&m, &l, get_text_translation(TEXT_(T_AVG),
- term));
- add_to_str(&m, &l, cast_uchar " ");
+ add_to_str(&m, &l, get_text_translation(TEXT_(T_AVG), term));
+ add_chr_to_str(&m, &l, ' ');
}
add_xnum_to_str(&m, &l, stat->prg->loaded * 10 / (stat->prg->elapsed / 100));
add_to_str(&m, &l, cast_uchar "/s");
if (stat->prg->elapsed >= CURRENT_SPD_AFTER * SPD_DISP_TIME) {
add_to_str(&m, &l, cast_uchar ", ");
add_to_str(&m, &l, get_text_translation(TEXT_(T_CUR), term));
- add_to_str(&m, &l, cast_uchar " ");
+ add_chr_to_str(&m, &l, ' ');
add_xnum_to_str(&m, &l, stat->prg->cur_loaded / (CURRENT_SPD_SEC * SPD_DISP_TIME / 1000));
add_to_str(&m, &l, cast_uchar "/s");
}
@@ -587,37 +587,38 @@ void download_window_function(struct dialog_data *dlg)
m = init_str();
t = 1;
add_to_str(&m, &l, get_text_translation(TEXT_(T_RECEIVED), term));
- add_to_str(&m, &l, cast_uchar " ");
+ add_chr_to_str(&m, &l, ' ');
add_xnum_to_str(&m, &l, stat->prg->pos);
if (stat->prg->size >= 0) {
- add_to_str(&m, &l, cast_uchar " ");
+ add_chr_to_str(&m, &l, ' ');
add_to_str(&m, &l, get_text_translation(TEXT_(T_OF),term));
- add_to_str(&m, &l, cast_uchar " ");
+ add_chr_to_str(&m, &l, ' ');
add_xnum_to_str(&m, &l, stat->prg->size);
- add_to_str(&m, &l, cast_uchar " ");
+ add_chr_to_str(&m, &l, ' ');
}
add_to_str(&m, &l, cast_uchar "\n");
if (stat->prg->elapsed >= CURRENT_SPD_AFTER * SPD_DISP_TIME)
add_to_str(&m, &l, get_text_translation(TEXT_(T_AVERAGE_SPEED), term));
- else add_to_str(&m, &l, get_text_translation(TEXT_(T_SPEED), term));
- add_to_str(&m, &l, cast_uchar " ");
- add_xnum_to_str(&m, &l, (longlong)stat->prg->loaded * 10 / (stat->prg->elapsed / 100));
+ else
+ add_to_str(&m, &l, get_text_translation(TEXT_(T_SPEED), term));
+ add_chr_to_str(&m, &l, ' ');
+ add_xnum_to_str(&m, &l, (long long)stat->prg->loaded * 10 / (stat->prg->elapsed / 100));
add_to_str(&m, &l, cast_uchar "/s");
if (stat->prg->elapsed >= CURRENT_SPD_AFTER * SPD_DISP_TIME) {
add_to_str(&m, &l, cast_uchar ", ");
add_to_str(&m, &l, get_text_translation(TEXT_(T_CURRENT_SPEED), term));
- add_to_str(&m, &l, cast_uchar " ");
+ add_chr_to_str(&m, &l, ' ');
add_xnum_to_str(&m, &l, stat->prg->cur_loaded / (CURRENT_SPD_SEC * SPD_DISP_TIME / 1000));
add_to_str(&m, &l, cast_uchar "/s");
}
add_to_str(&m, &l, cast_uchar "\n");
add_to_str(&m, &l, get_text_translation(TEXT_(T_ELAPSED_TIME), term));
- add_to_str(&m, &l, cast_uchar " ");
+ add_chr_to_str(&m, &l, ' ');
add_time_to_str(&m, &l, stat->prg->elapsed / 1000);
if (stat->prg->size >= 0 && stat->prg->loaded > 0) {
add_to_str(&m, &l, cast_uchar ", ");
add_to_str(&m, &l, get_text_translation(TEXT_(T_ESTIMATED_TIME), term));
- add_to_str(&m, &l, cast_uchar " ");
+ add_chr_to_str(&m, &l, ' ');
/*add_time_to_str(&m, &l, stat->prg->elapsed / 1000 * stat->prg->size / stat->prg->loaded * 1000 - stat->prg->elapsed);*/
/*add_time_to_str(&m, &l, (stat->prg->size - stat->prg->pos) / ((longlong)stat->prg->loaded * 10 / (stat->prg->elapsed / 100)));*/
add_time_to_str(&m, &l, (uttime)((stat->prg->size - stat->prg->pos) / ((double)stat->prg->loaded * 1000 / stat->prg->elapsed)));
@@ -854,10 +855,11 @@ time_t parse_http_date(unsigned char *date) /* this functions is bad !!! */
static void download_file_error(struct download *down, int err)
{
- if (get_download_ses(down)) {
+ struct session *ses = get_download_ses(down);
+ if (ses) {
unsigned char *emsg = stracpy(err ? cast_uchar strerror(err) : cast_uchar "Zero returned");
unsigned char *msg = stracpy(down->file);
- msg_box(get_download_ses(down)->term, getml(msg, emsg, NULL), TEXT_(T_DOWNLOAD_ERROR), AL_CENTER, TEXT_(T_COULD_NOT_WRITE_TO_FILE), cast_uchar " ", msg, cast_uchar ": ", emsg, MSG_BOX_END, NULL, 1, TEXT_(T_CANCEL), msg_box_null, B_ENTER | B_ESC);
+ msg_box(ses->term, getml(msg, emsg, NULL), TEXT_(T_DOWNLOAD_ERROR), AL_CENTER, TEXT_(T_COULD_NOT_WRITE_TO_FILE), cast_uchar " ", msg, cast_uchar ": ", emsg, MSG_BOX_END, NULL, 1, TEXT_(T_CANCEL), msg_box_null, B_ENTER | B_ESC);
}
}
@@ -1415,7 +1417,7 @@ static void detach_f_data(struct f_data **ff)
}
}
-static int shrink_format_cache(int u)
+int shrink_format_cache(int u)
{
static int sc = 0;
int scc;
@@ -1639,9 +1641,9 @@ static void html_interpret(struct f_data_c *fd, int report_status)
o.assume_cp = fd->parent->f_data->cp;
}
#ifdef G
- o.bfu_aspect=bfu_aspect;
+ o.gamma_stamp = gamma_stamp;
#else
- o.bfu_aspect=0;
+ o.gamma_stamp = 0;
#endif
o.plain = fd->vs->plain;
if (o.plain == 1 && !o.break_long_lines) {
diff --git a/setup.h b/setup.h
@@ -95,8 +95,10 @@
#define G_DIALOG_BUTTON_L "[ "
#define G_DIALOG_BUTTON_R " ]"
-#define G_LEFT_ARROW " \342\206\220 "
-#define MENU_SUBMENU (!F ? cast_uchar ">" : cast_uchar "\342\206\222")
+#define G_LEFT_ARROW "\342\206\220"
+#define G_RIGHT_ARROW "\342\206\222"
+#define MENU_SUBMENU (!F ? cast_uchar ">" : cast_uchar G_RIGHT_ARROW)
+#define CERT_RIGHT_ARROW (!F ? cast_uchar " -> " : cast_uchar " " G_RIGHT_ARROW " ")
#define G_SCROLL_BAR_WIDTH 12
#define G_SCROLL_BAR_MIN_SIZE 20
@@ -141,7 +143,7 @@
#define HTML_DEFAULT_TEXTAREA_WIDTH 40
#define HTML_DEFAULT_TEXTAREA_HEIGHT 7
-#define MAX_INPUT_URL_LEN 4096
+#define MAX_INPUT_URL_LEN 65536
#define SPD_DISP_TIME 200
#define CURRENT_SPD_SEC (10000 / SPD_DISP_TIME)
@@ -155,6 +157,6 @@
* (draw_bfu_element function in listedit.c)
* BFU_ELEMENT_WIDTH is a size of one bfu element (doesn't depend on graphical/text mode)
*/
-#define BFU_GRX_WIDTH (G_BFU_FONT_SIZE>>1)
-#define BFU_ELEMENT_WIDTH (gf_val(5,5*BFU_GRX_WIDTH))
-#define BFU_GRX_HEIGHT G_BFU_FONT_SIZE
+#define BFU_GRX_WIDTH (G_BFU_FONT_SIZE >> 1)
+#define BFU_ELEMENT_WIDTH (gf_val(5, 5 * BFU_GRX_WIDTH))
+#define BFU_GRX_HEIGHT G_BFU_FONT_SIZE
diff --git a/suffix.inc b/suffix.inc
@@ -6,6 +6,7 @@ static const char *domain_suffix[] = {
"*.alces.network",
"*.awdev.ca",
"*.bd",
+ "*.bzz.dapps.earth",
"*.ck",
"*.cns.joyent.com",
"*.compute-1.amazonaws.com",
@@ -13,6 +14,7 @@ static const char *domain_suffix[] = {
"*.compute.amazonaws.com.cn",
"*.compute.estate",
"*.cryptonomic.net",
+ "*.dapps.earth",
"*.elb.amazonaws.com",
"*.elb.amazonaws.com.cn",
"*.er",
@@ -35,6 +37,8 @@ static const char *domain_suffix[] = {
"*.nagoya.jp",
"*.nom.br",
"*.np",
+ "*.on-rancher.cloud",
+ "*.on-rio.io",
"*.otap.co",
"*.pg",
"*.platform.sh",
@@ -48,6 +52,7 @@ static const char *domain_suffix[] = {
"*.spectrum.myjino.ru",
"*.statics.cloud",
"*.stolos.io",
+ "*.telebit.xyz",
"*.transurl.be",
"*.transurl.eu",
"*.transurl.nl",
@@ -88,6 +93,7 @@ static const char *domain_suffix[] = {
"9guacu.br",
"a.bg",
"a.prod.fastly.net",
+ "a.run.app",
"a.se",
"a.ssl.fastly.net",
"aa.no",
@@ -134,6 +140,7 @@ static const char *domain_suffix[] = {
"ac.kr",
"ac.leg.br",
"ac.lk",
+ "ac.ls",
"ac.ma",
"ac.me",
"ac.mu",
@@ -172,7 +179,6 @@ static const char *domain_suffix[] = {
"aco",
"act.au",
"act.edu.au",
- "active",
"actor",
"ad",
"ad.jp",
@@ -378,6 +384,7 @@ static const char *domain_suffix[] = {
"ap.leg.br",
"aparecida.br",
"apartments",
+ "api.stdlib.com",
"apigee.io",
"app",
"app.lmpm.com",
@@ -385,6 +392,7 @@ static const char *domain_suffix[] = {
"app.os.stg.fedoraproject.org",
"appchizi.com",
"apple",
+ "applicationcloud.io",
"applinzi.com",
"apps.fbsbx.com",
"apps.lair.io",
@@ -481,7 +489,6 @@ static const char *domain_suffix[] = {
"ass.km",
"assabu.hokkaido.jp",
"assassination.museum",
- "assedic.fr",
"assisi.museum",
"assn.lk",
"asso.bj",
@@ -747,6 +754,7 @@ static const char *domain_suffix[] = {
"biz.et",
"biz.id",
"biz.ki",
+ "biz.ls",
"biz.mv",
"biz.mw",
"biz.ni",
@@ -770,7 +778,6 @@ static const char *domain_suffix[] = {
"black",
"blackbaudcdn.net",
"blackfriday",
- "blanco",
"blockbuster",
"blog",
"blog.bo",
@@ -948,6 +955,7 @@ static const char *domain_suffix[] = {
"bs",
"bs.it",
"bsb.br",
+ "bss.design",
"bt",
"bt.it",
"bu.no",
@@ -974,7 +982,6 @@ static const char *domain_suffix[] = {
"buzen.fukuoka.jp",
"buzz",
"bv",
- "bv.nl",
"bw",
"by",
"bydgoszcz.pl",
@@ -1300,10 +1307,12 @@ static const char *domain_suffix[] = {
"co",
"co.ae",
"co.ag",
+ "co.am",
"co.ao",
"co.at",
"co.bb",
"co.bi",
+ "co.business",
"co.bw",
"co.ca",
"co.ci",
@@ -1313,6 +1322,9 @@ static const char *domain_suffix[] = {
"co.cr",
"co.cz",
"co.dk",
+ "co.education",
+ "co.events",
+ "co.financial",
"co.gg",
"co.gl",
"co.gy",
@@ -1337,18 +1349,21 @@ static const char *domain_suffix[] = {
"co.mw",
"co.mz",
"co.na",
+ "co.network",
"co.ni",
"co.nl",
"co.no",
"co.nz",
"co.om",
"co.pl",
+ "co.place",
"co.pn",
"co.pw",
"co.rs",
"co.rw",
"co.st",
"co.sz",
+ "co.technology",
"co.th",
"co.tj",
"co.tm",
@@ -1387,6 +1402,7 @@ static const char *domain_suffix[] = {
"com.ag",
"com.ai",
"com.al",
+ "com.am",
"com.ar",
"com.au",
"com.aw",
@@ -1518,6 +1534,7 @@ static const char *domain_suffix[] = {
"com.zm",
"comcast",
"commbank",
+ "commune.am",
"communication.museum",
"communications.museum",
"community",
@@ -1725,6 +1742,7 @@ static const char *domain_suffix[] = {
"df.gov.br",
"df.leg.br",
"dgca.aero",
+ "dh.bytemark.co.uk",
"dhl",
"diamonds",
"dielddanuorri.no",
@@ -1824,6 +1842,7 @@ static const char *domain_suffix[] = {
"dvrcam.info",
"dvrdns.org",
"dy.fi",
+ "dyn-berlin.de",
"dyn-ip24.de",
"dyn-o-saur.com",
"dyn-vpn.de",
@@ -1958,6 +1977,7 @@ static const char *domain_suffix[] = {
"edu.lc",
"edu.lk",
"edu.lr",
+ "edu.ls",
"edu.lv",
"edu.ly",
"edu.me",
@@ -2081,7 +2101,6 @@ static const char *domain_suffix[] = {
"environment.museum",
"environmentalconservation.museum",
"epilepsy.museum",
- "epost",
"epson",
"equipment",
"equipment.aero",
@@ -2173,6 +2192,7 @@ static const char *domain_suffix[] = {
"farsund.no",
"fashion",
"fast",
+ "fastly-terrarium.com",
"fastlylb.net",
"fastpanel.direct",
"fastvps-server.com",
@@ -2213,6 +2233,12 @@ static const char *domain_suffix[] = {
"field.museum",
"figueres.museum",
"filatelia.museum",
+ "filegear-au.me",
+ "filegear-de.me",
+ "filegear-gb.me",
+ "filegear-ie.me",
+ "filegear-jp.me",
+ "filegear-sg.me",
"filegear.me",
"film",
"film.hu",
@@ -2563,6 +2589,7 @@ static const char *domain_suffix[] = {
"ginowan.okinawa.jp",
"ginoza.okinawa.jp",
"giske.no",
+ "git-pages.rit.edu",
"git-repos.de",
"github.io",
"githubusercontent.com",
@@ -2598,6 +2625,8 @@ static const char *domain_suffix[] = {
"gmx",
"gn",
"gniezno.pl",
+ "go-vip.co",
+ "go-vip.net",
"go.ci",
"go.cr",
"go.dyndns.org",
@@ -2738,6 +2767,7 @@ static const char *domain_suffix[] = {
"gov.lc",
"gov.lk",
"gov.lr",
+ "gov.ls",
"gov.lt",
"gov.lv",
"gov.ly",
@@ -3279,7 +3309,16 @@ static const char *domain_suffix[] = {
"imperia.it",
"in",
"in-addr.arpa",
+ "in-berlin.de",
+ "in-brb.de",
+ "in-butter.de",
+ "in-dsl.de",
+ "in-dsl.net",
+ "in-dsl.org",
"in-the-band.net",
+ "in-vpn.de",
+ "in-vpn.net",
+ "in-vpn.org",
"in.eu.org",
"in.na",
"in.net",
@@ -3338,6 +3377,7 @@ static const char *domain_suffix[] = {
"info.ke",
"info.ki",
"info.la",
+ "info.ls",
"info.mv",
"info.na",
"info.nf",
@@ -3360,6 +3400,7 @@ static const char *domain_suffix[] = {
"ingatlan.hu",
"ink",
"ino.kochi.jp",
+ "instantcloud.cn",
"institute",
"insurance",
"insurance.aero",
@@ -4012,6 +4053,7 @@ static const char *domain_suffix[] = {
"kraanghke.no",
"kragero.no",
"krakow.pl",
+ "krasnik.pl",
"krasnodar.su",
"krd",
"kred",
@@ -4153,6 +4195,7 @@ static const char *domain_suffix[] = {
"lcube-server.de",
"lds",
"le.it",
+ "leadpages.co",
"leangaviika.no",
"lease",
"leasing.aero",
@@ -4162,6 +4205,7 @@ static const char *domain_suffix[] = {
"lecce.it",
"lecco.it",
"leclerc",
+ "leczna.pl",
"lefrak",
"leg.br",
"legal",
@@ -4321,8 +4365,10 @@ static const char *domain_suffix[] = {
"love",
"lowicz.pl",
"loyalist.museum",
+ "lpages.co",
"lpl",
"lplfinancial",
+ "lpusercontent.com",
"lr",
"ls",
"lt",
@@ -4341,7 +4387,9 @@ static const char *domain_suffix[] = {
"lu",
"lu.eu.org",
"lu.it",
+ "lubartow.pl",
"lubin.pl",
+ "lublin.pl",
"lucania.it",
"lucca.it",
"lucerne.museum",
@@ -4895,6 +4943,7 @@ static const char *domain_suffix[] = {
"mydatto.net",
"myddns.rocks",
"mydissent.net",
+ "mydobiss.com",
"mydrobo.com",
"myds.me",
"myeffect.net",
@@ -5098,6 +5147,7 @@ static const char *domain_suffix[] = {
"net.ag",
"net.ai",
"net.al",
+ "net.am",
"net.ar",
"net.au",
"net.az",
@@ -5157,6 +5207,7 @@ static const char *domain_suffix[] = {
"net.lc",
"net.lk",
"net.lr",
+ "net.ls",
"net.lv",
"net.ly",
"net.ma",
@@ -5615,6 +5666,7 @@ static const char *domain_suffix[] = {
"onl",
"online",
"online.museum",
+ "online.th",
"onna.okinawa.jp",
"ono.fukui.jp",
"ono.fukushima.jp",
@@ -5664,6 +5716,7 @@ static const char *domain_suffix[] = {
"org.ag",
"org.ai",
"org.al",
+ "org.am",
"org.ar",
"org.au",
"org.az",
@@ -6048,6 +6101,7 @@ static const char *domain_suffix[] = {
"poltava.ua",
"pomorskie.pl",
"pomorze.pl",
+ "poniatowa.pl",
"ponpes.id",
"pordenone.it",
"porn",
@@ -6089,7 +6143,6 @@ static const char *domain_suffix[] = {
"press.museum",
"press.se",
"presse.ci",
- "presse.fr",
"presse.km",
"presse.ml",
"pri.ee",
@@ -6217,6 +6270,7 @@ static const char *domain_suffix[] = {
"read",
"read-books.org",
"readmyblog.org",
+ "readthedocs.io",
"realestate",
"realestate.pl",
"realm.cz",
@@ -6361,6 +6415,7 @@ static const char *domain_suffix[] = {
"rugby",
"ruhr",
"run",
+ "run.app",
"ruovat.no",
"russia.museum",
"rv.ua",
@@ -6563,10 +6618,12 @@ static const char *domain_suffix[] = {
"sc.ke",
"sc.kr",
"sc.leg.br",
+ "sc.ls",
"sc.tz",
"sc.ug",
"sc.us",
"sca",
+ "scapp.io",
"scb",
"sch.ae",
"sch.id",
@@ -6809,6 +6866,7 @@ static const char *domain_suffix[] = {
"shop.hu",
"shop.pl",
"shop.ro",
+ "shop.th",
"shopping",
"shouji",
"show",
@@ -6839,6 +6897,8 @@ static const char *domain_suffix[] = {
"siracusa.it",
"sirdal.no",
"site",
+ "site.builder.nu",
+ "siteleaf.net",
"sites.static.land",
"sj",
"sjc.br",
@@ -6953,7 +7013,6 @@ static const char *domain_suffix[] = {
"spdns.de",
"spdns.eu",
"spdns.org",
- "spiegel",
"spjelkavik.no",
"sport",
"sport.hu",
@@ -6997,7 +7056,6 @@ static const char *domain_suffix[] = {
"static-access.net",
"static.land",
"station.museum",
- "statoil",
"stavanger.no",
"stavern.no",
"stc",
@@ -7087,6 +7145,7 @@ static const char *domain_suffix[] = {
"sweden.museum",
"sweetpepper.org",
"swidnica.pl",
+ "swidnik.pl",
"swiebodzin.pl",
"swiftcover",
"swinoujscie.pl",
@@ -7098,6 +7157,7 @@ static const char *domain_suffix[] = {
"sydney.museum",
"sykkylven.no",
"symantec",
+ "syncloud.it",
"syno-ds.de",
"synology-diskstation.de",
"synology-ds.de",
@@ -7239,6 +7299,8 @@ static const char *domain_suffix[] = {
"tel",
"tel.tr",
"tele.amune.org",
+ "telebit.app",
+ "telebit.io",
"telefonica",
"telekommunikation.museum",
"television.museum",
@@ -7822,6 +7884,7 @@ static const char *domain_suffix[] = {
"vladimir.ru",
"vladimir.su",
"vlog.br",
+ "vm.bytemark.co.uk",
"vn",
"vn.ua",
"voagat.no",
@@ -7961,6 +8024,7 @@ static const char *domain_suffix[] = {
"wolterskluwer",
"woodside",
"work",
+ "workers.dev",
"workinggroup.aero",
"workisboring.com",
"works",
@@ -7969,6 +8033,7 @@ static const char *domain_suffix[] = {
"world",
"worse-than.tv",
"wow",
+ "wpcomstaging.com",
"wpdevcloud.com",
"writesthisblog.com",
"wroc.pl",
@@ -8596,7 +8661,6 @@ static const char *domain_suffix[] = {
"zhitomir.ua",
"zhytomyr.ua",
"zip",
- "zippo",
"zj.cn",
"zlg.br",
"zm",
diff --git a/url.c b/url.c
@@ -1216,6 +1216,10 @@ static unsigned char *display_url_or_host(struct terminal *term, unsigned char *
url_enc = idn_encode_url(url_conv2, 0);
else
url_enc = idn_encode_host(url_conv2, (int)strlen((char *)url_conv2), separator, 0);
+ if (!url_enc) {
+ url_enc = stracpy(url_conv2);
+ is_idn = 1;
+ }
free(url_conv2);
if (!strcmp((char *)url_enc, (char *)url)) {
if (is_idn && warn_idn) {
diff --git a/view.c b/view.c
@@ -664,7 +664,7 @@ static void init_ctrl(struct form_control *form, struct form_state *fs)
fs->state = (int)strlen(cast_const_char form->default_value);
fs->vpos = 0;
break;
- case FC_FILE:
+ case FC_FILE_UPLOAD:
fs->string = stracpy(cast_uchar "");
fs->state = 0;
fs->vpos = 0;
@@ -735,7 +735,7 @@ static void draw_form_entry(struct terminal *t, struct f_data_c *f, struct link
case FC_TEXT:
case FC_PASSWORD:
- case FC_FILE:
+ case FC_FILE_UPLOAD:
if ((size_t)fs->vpos > strlen(cast_const_char fs->string)) fs->vpos = (int)strlen(cast_const_char fs->string);
sl = strlen((char *)fs->string);
td = textptr_diff(fs->string + fs->state, fs->string + fs->vpos, f->f_data->opt.cp);
@@ -1093,6 +1093,7 @@ int dump_to_file(struct f_data *fd, int h)
int x, y;
unsigned char *buf;
int bptr = 0;
+ int retval;
buf = xmalloc(D_BUF);
for (y = 0; y < fd->y; y++) for (x = 0; x <= fd->data[y].l; x++) {
unsigned c;
@@ -1109,20 +1110,23 @@ int dump_to_file(struct f_data *fd, int h)
} else
buf[bptr++] = (unsigned char)c;
if (bptr >= D_BUF - 7) {
- if (hard_write(h, buf, bptr) != bptr) goto fail;
+ if ((retval = hard_write(h, buf, bptr)) != bptr) {
+ free(buf);
+ goto fail;
+ }
bptr = 0;
}
}
- if (hard_write(h, buf, bptr) != bptr) {
- fail:
+ if ((retval = hard_write(h, buf, bptr)) != bptr) {
free(buf);
- return -1;
+ goto fail;
}
free(buf);
if (fd->opt.num_links && fd->nlinks) {
static const unsigned char head[] = "\nLinks:\n";
int i;
- if ((int)hard_write(h, head, (int)strlen(cast_const_char head)) != (int)strlen(cast_const_char head)) return -1;
+ if ((retval = hard_write(h, head, (int)strlen(cast_const_char head))) != (int)strlen(cast_const_char head))
+ goto fail;
for (i = 0; i < fd->nlinks; i++) {
struct link *lnk = &fd->links[i];
unsigned char *s = init_str();
@@ -1150,7 +1154,7 @@ int dump_to_file(struct f_data *fd, int h)
else if (fc->type == FC_SELECT) add_to_str(&s, &l, cast_uchar "Select field");
else if (fc->type == FC_TEXT) add_to_str(&s, &l, cast_uchar "Text field");
else if (fc->type == FC_TEXTAREA) add_to_str(&s, &l, cast_uchar "Text area");
- else if (fc->type == FC_FILE) add_to_str(&s, &l, cast_uchar "File upload");
+ else if (fc->type == FC_FILE_UPLOAD) add_to_str(&s, &l, cast_uchar "File upload");
else if (fc->type == FC_PASSWORD) add_to_str(&s, &l, cast_uchar "Password field");
else goto unknown;
if (fc->name && fc->name[0]) {
@@ -1166,14 +1170,20 @@ int dump_to_file(struct f_data *fd, int h)
}
unknown:
add_to_str(&s, &l, cast_uchar "\n");
- if (hard_write(h, s, l) != l) {
+ if ((retval = hard_write(h, s, l)) != l) {
free(s);
- return -1;
+ goto fail;
}
free(s);
}
}
return 0;
+
+ fail:
+ if (retval < 0)
+ return get_error_from_errno(errno);
+ else
+ return S_CANT_WRITE;
}
static int in_viewx(struct f_data_c *f, struct link *l)
@@ -1450,7 +1460,7 @@ static void get_succesful_controls(struct f_data_c *f, struct form_control *fc,
switch (form->type) {
case FC_TEXT:
case FC_PASSWORD:
- case FC_FILE:
+ case FC_FILE_UPLOAD:
sub->value = stracpy(fs->string);
break;
case FC_TEXTAREA:
@@ -1603,7 +1613,7 @@ static void encode_multipart(struct session *ses, struct list_head *l, unsigned
add_to_str(data, len, cast_uchar "\r\nContent-Disposition: form-data; name=\"");
add_to_str(data, len, sv->name);
add_to_str(data, len, cast_uchar "\"");
- if (sv->type == FC_FILE) {
+ if (sv->type == FC_FILE_UPLOAD) {
add_to_str(data, len, cast_uchar "; filename=\"");
add_to_str(data, len, strip_file_name(sv->value));
/* It sends bad data if the file name contains ", but
@@ -1623,7 +1633,7 @@ static void encode_multipart(struct session *ses, struct list_head *l, unsigned
}
}
add_to_str(data, len, cast_uchar "\r\n\r\n");
- if (sv->type != FC_FILE) {
+ if (sv->type != FC_FILE_UPLOAD) {
if (sv->type == FC_TEXT || sv->type == FC_PASSWORD || sv->type == FC_TEXTAREA)
p = convert(cp_from, cp_to, sv->value, NULL);
else p = stracpy(sv->value);
@@ -2606,7 +2616,7 @@ static void goto_link_number(void *ses_, unsigned char *num)
static int find_pos_in_link(struct f_data_c *fd, struct link *l, struct links_event *ev, int *xx, int *yy)
{
int a;
- int minx ,miny;
+ int minx, miny;
int found = 0;
if (!l->n) return 1;
@@ -3252,7 +3262,7 @@ void open_in_new_window(struct terminal *term, void *fn_, void *ses_)
free(oin);
return;
}
- mi = new_menu(1);
+ mi = new_menu(MENU_FREE_ITEMS);
for (oi = oin; oi->text; oi++) add_to_menu(&mi, oi->text, cast_uchar "", oi->hk, fn, (void *)oi->open_window_fn, 0, -1);
free(oin);
do_menu(term, mi, ses);
@@ -3342,14 +3352,14 @@ void save_as(struct terminal *term, void *xxx, void *ses_)
static void save_formatted(struct session *ses, unsigned char *file, int mode)
{
- int h;
- int rs;
+ int h, rs, err;
struct f_data_c *f;
int download_mode = mode == DOWNLOAD_DEFAULT ? CDF_EXCL : 0;
if (!(f = current_frame(ses)) || !f->f_data) return;
if ((h = create_download_file(ses, ses->term->cwd, file, download_mode, 0)) < 0) return;
- if (dump_to_file(f->f_data, h))
- msg_box(ses->term, NULL, TEXT_(T_SAVE_ERROR), AL_CENTER, TEXT_(T_ERROR_WRITING_TO_FILE), MSG_BOX_END, NULL, 1, TEXT_(T_CANCEL), msg_box_null, B_ENTER | B_ESC);
+ if ((err = dump_to_file(f->f_data, h))) {
+ msg_box(ses->term, NULL, TEXT_(T_SAVE_ERROR), AL_CENTER, TEXT_(T_ERROR_WRITING_TO_FILE), cast_uchar ": ", get_err_msg(err), MSG_BOX_END, NULL, 1, TEXT_(T_CANCEL), msg_box_null, B_ENTER | B_ESC);
+ }
EINTRLOOP(rs, close(h));
}
@@ -3369,7 +3379,7 @@ void link_menu(struct terminal *term, void *xxx, void *ses_)
struct menu_item *mi;
free(ses->wtd_target);
ses->wtd_target = NULL;
- mi = new_menu(1);
+ mi = new_menu(MENU_FREE_ITEMS);
link = get_current_link(f);
if (!link) goto no_l;
if (link->type == L_LINK && link->where) {
@@ -3533,7 +3543,7 @@ static unsigned char *print_current_linkx(struct f_data_c *fd, struct terminal *
else if (l->form->type == FC_SELECT) add_to_str(&m, &ll, get_text_translation(TEXT_(T_SELECT_FIELD), term));
else if (l->form->type == FC_TEXT) add_to_str(&m, &ll, get_text_translation(TEXT_(T_TEXT_FIELD), term));
else if (l->form->type == FC_TEXTAREA) add_to_str(&m, &ll, get_text_translation(TEXT_(T_TEXT_AREA), term));
- else if (l->form->type == FC_FILE) add_to_str(&m, &ll, get_text_translation(TEXT_(T_FILE_UPLOAD), term));
+ else if (l->form->type == FC_FILE_UPLOAD) add_to_str(&m, &ll, get_text_translation(TEXT_(T_FILE_UPLOAD), term));
else if (l->form->type == FC_PASSWORD) add_to_str(&m, &ll, get_text_translation(TEXT_(T_PASSWORD_FIELD), term));
else {
free(m);
@@ -3673,7 +3683,7 @@ static unsigned char *print_current_linkx_plus(struct f_data_c *fd, struct termi
else if (l->form->type == FC_SELECT) add_to_str(&m, &ll, get_text_translation(TEXT_(T_SELECT_FIELD), term));
else if (l->form->type == FC_TEXT) add_to_str(&m, &ll, get_text_translation(TEXT_(T_TEXT_FIELD), term));
else if (l->form->type == FC_TEXTAREA) add_to_str(&m, &ll, get_text_translation(TEXT_(T_TEXT_AREA), term));
- else if (l->form->type == FC_FILE) add_to_str(&m, &ll, get_text_translation(TEXT_(T_FILE_UPLOAD), term));
+ else if (l->form->type == FC_FILE_UPLOAD) add_to_str(&m, &ll, get_text_translation(TEXT_(T_FILE_UPLOAD), term));
else if (l->form->type == FC_PASSWORD) add_to_str(&m, &ll, get_text_translation(TEXT_(T_PASSWORD_FIELD), term));
else {
free(m);
@@ -3825,6 +3835,15 @@ void loc_msg(struct terminal *term, struct location *lo, struct f_data_c *frame)
add_to_str(&s, &l, cast_uchar ": ");
add_to_str(&s, &l, ce->ssl_info);
}
+ if (ce->ssl_authority) {
+ add_to_str(&s, &l, cast_uchar "\n");
+ if (strstr(cast_const_char ce->ssl_authority, cast_const_char CERT_RIGHT_ARROW))
+ add_to_str(&s, &l, get_text_translation(TEXT_(T_CERTIFICATE_AUTHORITIES), term));
+ else
+ add_to_str(&s, &l, get_text_translation(TEXT_(T_CERTIFICATE_AUTHORITY), term));
+ add_to_str(&s, &l, cast_uchar ": ");
+ add_to_str(&s, &l, ce->ssl_authority);
+ }
ce->refcount--;
}
if ((a = print_current_linkx_plus(frame, term))) {
diff --git a/view_gr.c b/view_gr.c
@@ -169,7 +169,7 @@ void g_text_draw(struct f_data_c *fd, struct g_object *t_, int x, int y)
return;
case FC_TEXT:
case FC_PASSWORD:
- case FC_FILE:
+ case FC_FILE_UPLOAD:
if ((size_t)fs->vpos > strlen(cast_const_char fs->string)) fs->vpos = (int)strlen(cast_const_char fs->string);
sl = strlen(cast_const_char fs->string);
td = textptr_diff(fs->string + fs->state, fs->string + fs->vpos, fd->f_data->opt.cp);
@@ -1376,7 +1376,7 @@ void draw_title(struct f_data_c *f)
}
w = g_text_width(bfu_style_bw, title);
z = 0;
- g_print_text(dev, 0, 0, !proxies.only_proxies ? bfu_style_bw : bfu_style_wb, cast_uchar G_LEFT_ARROW, &z);
+ g_print_text(dev, 0, 0, !proxies.only_proxies ? bfu_style_bw : bfu_style_wb, cast_uchar " " G_LEFT_ARROW " ", &z);
f->ses->back_size = z;
b = (dev->size.x2 - w) - 16;
if (b < z) b = z;
diff --git a/x.c b/x.c
@@ -109,6 +109,9 @@ struct {
#define X_STATIC_COLORS (x_depth < 8 ? 8 : 216)
#define X_STATIC_CODE (x_depth < 8 ? 801 : 833)
+static unsigned short *color_map_16bit = NULL;
+static unsigned *color_map_24bit = NULL;
+
static Window x_root_window, fake_window;
static int fake_window_initialized = 0;
static GC x_normal_gc = 0, x_copy_gc = 0, x_drawbitmap_gc = 0, x_scroll_gc = 0;
@@ -399,7 +402,7 @@ static int swap_color(int c, XColor *xc, int test_count, double *distance, unsig
static_color_struct[new_px].alloc_count++;
static_color_struct[new_px].failure = 0;
static_color_struct[new_px].extra_allocated = 1;
- static_color_table[c] = new_px;
+ static_color_table[c] = (unsigned char)new_px;
*distance = new_distance;
return 0;
@@ -486,12 +489,12 @@ static unsigned char *x_query_palette(void)
} else {
if (xc.pixel >= 256)
goto allocated_invalid;
- c = xc.pixel;
+ c = (unsigned char)xc.pixel;
static_color_map[c] = xc;
static_color_struct[c].alloc_count++;
}
}
- static_color_table[idx] = c;
+ static_color_table[idx] = (unsigned char)c;
}
if (do_alloc) {
double distances[256];
@@ -578,6 +581,115 @@ static void x_set_palette(void)
X_FLUSH();
}
+static void mask_to_bitfield(unsigned long mask, int bitfield[8])
+{
+ int i;
+ int bit = 0;
+ for (i = sizeof(unsigned long) * 8 - 1; i >= 0; i--) {
+ if (mask & 1UL << i) {
+ bitfield[bit++] = i;
+ if (bit >= 8)
+ return;
+ }
+ }
+ while (bit < 8)
+ bitfield[bit++] = -1;
+}
+
+static unsigned long apply_bitfield(int bitfield[8], int bits, unsigned int value)
+{
+ unsigned long result = 0;
+ int bf_index = 0;
+ while (bits-- && bf_index < 8) {
+ if (value & 1 << bits) {
+ if (bitfield[bf_index] >= 0)
+ result |= 1UL << bitfield[bf_index];
+ }
+ bf_index++;
+ }
+ return result;
+}
+
+static int create_16bit_mapping(unsigned long red_mask, unsigned long green_mask, unsigned long blue_mask)
+{
+ int i;
+ int red_bitfield[8];
+ int green_bitfield[8];
+ int blue_bitfield[8];
+
+ if ((red_mask | green_mask | blue_mask) >= 0x10000)
+ return 0;
+ if (!red_mask || !green_mask || !blue_mask)
+ return 0;
+
+ mask_to_bitfield(red_mask, red_bitfield);
+ mask_to_bitfield(green_mask, green_bitfield);
+ mask_to_bitfield(blue_mask, blue_bitfield);
+
+ color_map_16bit = mem_calloc(256 * 2 * sizeof(unsigned short));
+ for (i = 0; i < 256; i++) {
+ unsigned int g, b;
+ unsigned short ag, ab, result;
+
+ g = i >> 5;
+ b = i & 31;
+
+ ag = (unsigned short)apply_bitfield(green_bitfield, x_depth - 10, g);
+ ab = (unsigned short)apply_bitfield(blue_bitfield, 5, b);
+
+ result = ag | ab;
+
+ color_map_16bit[i + (x_bitmap_bit_order == MSBFirst) * 256] = (unsigned short)result;
+ }
+ for (i = 0; i < (x_depth == 15 ? 128 : 256); i++) {
+ unsigned int r, g;
+ unsigned short ar, ag, result;
+
+ r = i >> (x_depth - 13);
+ g = (i << (x_depth - 13)) & ((1 << (x_depth - 10)) - 1);
+
+ ar = (unsigned short)apply_bitfield(red_bitfield, 5, r);
+ ag = (unsigned short)apply_bitfield(green_bitfield, x_depth - 10, g);
+
+ result = ar | ag;
+
+ color_map_16bit[i + (x_bitmap_bit_order == LSBFirst) * 256] = (unsigned short)result;
+ }
+
+ return 1;
+}
+
+static void create_24bit_component_mapping(unsigned long mask, unsigned int *ptr)
+{
+ int i;
+ int bitfield[8];
+
+ mask_to_bitfield(mask, bitfield);
+
+ for (i = 0; i < 256; i++) {
+ unsigned int result = (unsigned int)apply_bitfield(bitfield, 8, i);
+ if (x_bitmap_bit_order == MSBFirst && x_bitmap_bpp == 4)
+ result = (result >> 24) | ((result & 0xff0000) >> 8) | ((result & 0xff00) << 8) | ((result & 0xff) << 24);
+ ptr[i] = result;
+ }
+}
+
+static int create_24bit_mapping(unsigned long red_mask, unsigned long green_mask, unsigned long blue_mask)
+{
+ if ((red_mask | green_mask | blue_mask) > 0xFFFFFFFFUL)
+ return 0;
+ if (!red_mask || !green_mask || !blue_mask)
+ return 0;
+
+ color_map_24bit = xmalloc(256 * 3 * sizeof(unsigned int));
+
+ create_24bit_component_mapping(blue_mask, color_map_24bit);
+ create_24bit_component_mapping(green_mask, color_map_24bit + 256);
+ create_24bit_component_mapping(red_mask, color_map_24bit + 256 * 2);
+
+ return 1;
+}
+
static inline int trans_key(unsigned char *str, int table)
{
if (!table) {
@@ -822,9 +934,13 @@ static void x_free_hash_table(void)
free(static_color_table);
free(static_color_map);
free(static_color_struct);
+ free(color_map_16bit);
+ free(color_map_24bit);
static_color_table = NULL;
static_color_map = NULL;
static_color_struct = NULL;
+ color_map_16bit = NULL;
+ color_map_24bit = NULL;
if (x_display) {
if (x_icon) {
@@ -1235,10 +1351,13 @@ static unsigned char *x_init_driver(unsigned char *param, unsigned char *display
err = init_str();
l = 0;
- add_to_str(&err, &l, cast_uchar "Can't open display \"");
- add_to_str(&err, &l, display ? display : (unsigned char *)"(null)");
- add_to_str(&err, &l, cast_uchar "\"\n");
- x_free_hash_table();
+ if (display) {
+ add_to_str(&err, &l, cast_uchar "Can't open display \"");
+ add_to_str(&err, &l, display);
+ add_to_str(&err, &l, cast_uchar "\"\n");
+ } else {
+ add_to_str(&err, &l, cast_uchar "Can't open default display\n");
+ }
goto ret_err;
}
@@ -1311,7 +1430,7 @@ invalid_param:
pfm = XListPixmapFormats(x_display, &n);
for (i = 0; i < n; i++)
if (pfm[i].depth == x_depth) {
- x_bitmap_bpp = pfm[i].bits_per_pixel < 8 ? 1 : ((pfm[i].bits_per_pixel) >> 3);
+ x_bitmap_bpp = pfm[i].bits_per_pixel < 8 ? 1 : pfm[i].bits_per_pixel >> 3;
x_bitmap_scanline_pad = pfm[i].scanline_pad >> 3;
XFree(pfm);
goto bytes_per_pixel_found;
@@ -1326,8 +1445,7 @@ invalid_param:
case 8:
if (x_bitmap_bpp != 1)
break;
- if (vinfo.red_mask >= vinfo.green_mask
- && vinfo.green_mask>=vinfo.blue_mask) {
+ if (vinfo.class == StaticColor || vinfo.class == PseudoColor) {
misordered = 0;
goto visual_found;
}
@@ -1337,16 +1455,21 @@ invalid_param:
case 16:
if (x_bitmap_bpp != 2)
break;
- if (x_bitmap_bit_order == MSBFirst
- && vinfo.red_mask > vinfo.green_mask
- && vinfo.green_mask > vinfo.blue_mask) {
- misordered = 256;
+ if (x_depth == 16
+ && vinfo.red_mask == 0xf800
+ && vinfo.green_mask == 0x7e0
+ && vinfo.blue_mask == 0x1f) {
+ misordered = x_bitmap_bit_order == MSBFirst ? 256 : 0;
goto visual_found;
}
- if (x_bitmap_bit_order == MSBFirst)
- break;
- if (vinfo.red_mask > vinfo.green_mask
- && vinfo.green_mask > vinfo.blue_mask) {
+ if (x_depth == 15
+ && vinfo.red_mask == 0x7c00
+ && vinfo.green_mask == 0x3e0
+ && vinfo.blue_mask == 0x1f) {
+ misordered = x_bitmap_bit_order == MSBFirst ? 256 : 0;
+ goto visual_found;
+ }
+ if (create_16bit_mapping(vinfo.red_mask, vinfo.green_mask, vinfo.blue_mask)) {
misordered = 0;
goto visual_found;
}
@@ -1356,19 +1479,13 @@ invalid_param:
if (x_bitmap_bpp != 3
&& x_bitmap_bpp != 4)
break;
- if (vinfo.red_mask < vinfo.green_mask
- && vinfo.green_mask < vinfo.blue_mask) {
- misordered = 256;
- goto visual_found;
- }
- if (x_bitmap_bit_order == MSBFirst
- && vinfo.red_mask > vinfo.green_mask
- && vinfo.green_mask > vinfo.blue_mask) {
- misordered = 512;
+ if (vinfo.red_mask == 0xff0000
+ && vinfo.green_mask == 0xff00
+ && vinfo.blue_mask == 0xff) {
+ misordered = x_bitmap_bpp == 4 && x_bitmap_bit_order == MSBFirst ? 512 : 0;
goto visual_found;
}
- if (vinfo.red_mask > vinfo.green_mask
- &&vinfo.green_mask > vinfo.blue_mask) {
+ if (create_24bit_mapping(vinfo.red_mask, vinfo.green_mask, vinfo.blue_mask)) {
misordered = 0;
goto visual_found;
}
@@ -1409,8 +1526,6 @@ invalid_param:
x_driver.depth |= misordered;
/* check if depth is sane */
- if (x_driver.depth == 707)
- x_driver.depth = 195;
if (x_use_static_color_table)
x_driver.depth = X_STATIC_CODE;
x_get_color_function = get_color_fn(x_driver.depth);
@@ -1747,12 +1862,58 @@ static unsigned short *x_get_real_colors(void)
static void x_translate_colors(unsigned char *data, int x, int y, int skip)
{
int i, j;
- if (!x_use_static_color_table)
+
+ if (color_map_16bit) {
+ for (j = 0; j < y; j++) {
+ for (i = 0; i < x; i++) {
+ unsigned short s = color_map_16bit[data[2*i]] |
+ color_map_16bit[data[2*i + 1] + 256];
+ data[2*i] = (unsigned char)s;
+ data[2*i + 1] = (unsigned char)(s >> 8);
+ }
+ data += skip;
+ }
+ return;
+ }
+
+ if (color_map_24bit && x_bitmap_bpp == 3) {
+ for (j = 0; j < y; j++) {
+ for (i = 0; i < x; i++) {
+ unsigned int s = color_map_24bit[data[3*i]] |
+ color_map_24bit[data[3*i + 1] + 256] |
+ color_map_24bit[data[3*i + 2] + 256 * 2];
+ data[3*i] = (unsigned char)s;
+ data[3*i + 1] = (unsigned char)(s >> 8);
+ data[3*i + 2] = (unsigned char)(s >> 16);
+ }
+ data += skip;
+ }
+ return;
+ }
+
+ if (color_map_24bit && x_bitmap_bpp == 4) {
+ for (j = 0; j < y; j++) {
+ for (i = 0; i < x; i++) {
+ unsigned int s = color_map_24bit[data[4*i]] |
+ color_map_24bit[data[4*i + 1] + 256] |
+ color_map_24bit[data[4*i + 2] + 256 * 2];
+ data[4*i] = (unsigned char)s;
+ data[4*i + 1] = (unsigned char)(s >> 8);
+ data[4*i + 2] = (unsigned char)(s >> 16);
+ data[4*i + 3] = (unsigned char)(s >> 24);
+ }
+ data += skip;
+ }
+ return;
+ }
+
+ if (x_use_static_color_table) {
+ for (j = 0; j < y; j++) {
+ for (i = 0; i < x; i++)
+ data[i] = static_color_table[data[i]];
+ data += skip;
+ }
return;
- for (j = 0; j < y; j++) {
- for (i = 0; i < x; i++)
- data[i] = static_color_table[data[i]];
- data += skip;
}
}
@@ -1907,18 +2068,22 @@ static long x_get_color(int rgb)
block = x_get_color_function(rgb);
b = (unsigned char *)█
+
+ x_translate_colors(b, 1, 1, 0);
+
/*fprintf(stderr, "bitmap bpp %d\n", x_bitmap_bpp);*/
switch (x_bitmap_bpp) {
case 1:
- if (x_use_static_color_table)
- return static_color_table[b[0]];
return b[0];
case 2:
if (x_bitmap_bit_order == LSBFirst)
return (unsigned)b[0] | ((unsigned)b[1] << 8);
return (unsigned)b[1] | ((unsigned)b[0] << 8);
case 3:
- return (unsigned)b[0] | ((unsigned)b[1] << 8) | ((unsigned)b[2] << 16);
+ if (x_bitmap_bit_order == LSBFirst)
+ return (unsigned)b[0] | ((unsigned)b[1] << 8) | ((unsigned)b[2] << 16);
+ else
+ return (unsigned)b[2] | ((unsigned)b[1] << 8) | ((unsigned)b[0] << 16);
default:
if (x_bitmap_bit_order == LSBFirst)
return (unsigned)b[0] | ((unsigned)b[1] << 8) | ((unsigned)b[2] << 16) | ((unsigned)b[3] << 24);