Commit: 08d394e08faa70f73b29e68d4e4f00d442a5b776
Parent: f8b421c16940c862465164c9d02d87038b9a9a6c
Author: Randy Palamar
Date: Mon, 5 Dec 2022 07:23:21 -0700
replace some single char strs with add_chr_to_str()
Diffstat:
4 files changed, 31 insertions(+), 31 deletions(-)
diff --git a/default.c b/default.c
@@ -220,7 +220,7 @@ create_config_string(struct option *options)
if (options[i].wr_cfg)
l = options[i].wr_cfg(&options[i], &s, l);
}
- l = add_to_str(&s, l, cast_uchar "\n");
+ l = add_chr_to_str(&s, l, '\n');
return s;
}
@@ -510,7 +510,7 @@ static size_t
add_nm(struct option *o, unsigned char **s, size_t l)
{
if (l)
- l = add_to_str(s, l, cast_uchar "\n");
+ l = add_chr_to_str(s, l, '\n');
l = add_to_str(s, l, cast_uchar o->cfg_name);
return add_chr_to_str(s, l, ' ');
}
@@ -716,7 +716,7 @@ type_wr(struct option *o, unsigned char **s, size_t l)
l = add_quoted_to_str(s, l, as->label);
l = add_chr_to_str(s, l, ' ');
l = add_quoted_to_str(s, l, as->ct);
- l = add_to_str(s, l, cast_uchar " ");
+ l = add_chr_to_str(s, l, ' ');
l = add_quoted_to_str(s, l, as->prog);
l = add_chr_to_str(s, l, ' ');
l = add_num_to_str(
@@ -1504,7 +1504,7 @@ save_url_history(void)
continue;
if (!url_not_saveable(hi->str)) {
hsl = add_to_str(&hs, hsl, hi->str);
- hsl = add_to_str(&hs, hsl, cast_uchar "\n");
+ hsl = add_chr_to_str(&hs, hsl, '\n');
}
}
write_to_config_file(history_file, hs, 0);
diff --git a/menu.c b/menu.c
@@ -60,11 +60,11 @@ menu_version(void *term_)
l = add_and_pad(&s, 0, term, *text_ptr++, maxlen);
l = add_to_str(&s, l, cast_uchar VERSION);
- l = add_to_str(&s, l, cast_uchar "\n");
+ l = add_chr_to_str(&s, l, '\n');
l = add_and_pad(&s, l, term, *text_ptr++, maxlen);
l = add_to_str(&s, l, system_name);
- l = add_to_str(&s, l, cast_uchar "\n");
+ l = add_chr_to_str(&s, l, '\n');
l = add_and_pad(&s, l, term, *text_ptr++, maxlen);
l = add_to_str(&s, l, get_text_translation(TEXT_(T_MEMORY), term));
@@ -75,11 +75,11 @@ menu_version(void *term_)
l = add_chr_to_str(&s, l, ' ');
l = add_num_to_str(&s, l, sizeof(off_t) * 8 /*- ((off_t)-1 < 0)*/);
l = add_to_str(&s, l, cast_uchar "-bit");
- l = add_to_str(&s, l, cast_uchar "\n");
+ l = add_chr_to_str(&s, l, '\n');
l = add_and_pad(&s, l, term, *text_ptr++, maxlen);
l = add_event_string(&s, l, term);
- l = add_to_str(&s, l, cast_uchar "\n");
+ l = add_chr_to_str(&s, l, '\n');
l = add_and_pad(&s, l, term, *text_ptr++, maxlen);
if (!support_ipv6)
@@ -92,11 +92,11 @@ menu_version(void *term_)
get_text_translation(TEXT_(T_LOCAL_NETWORK_ONLY), term));
else
l = add_to_str(&s, l, get_text_translation(TEXT_(T_YES), term));
- l = add_to_str(&s, l, cast_uchar "\n");
+ l = add_chr_to_str(&s, l, '\n');
l = add_and_pad(&s, l, term, *text_ptr++, maxlen);
l = add_compress_methods(&s, l);
- l = add_to_str(&s, l, cast_uchar "\n");
+ l = add_chr_to_str(&s, l, '\n');
l = add_and_pad(&s, l, term, *text_ptr++, maxlen);
#ifdef OPENSSL_VERSION
@@ -105,14 +105,14 @@ menu_version(void *term_)
#else
l = add_to_str(&s, l, (unsigned char *)SSLeay_version(SSLEAY_VERSION));
#endif
- l = add_to_str(&s, l, cast_uchar "\n");
+ l = add_chr_to_str(&s, l, '\n');
l = add_and_pad(&s, l, term, *text_ptr++, maxlen);
l = add_to_str(&s, l, get_text_translation(TEXT_(T_YES), term));
- l = add_to_str(&s, l, cast_uchar "\n");
+ l = add_chr_to_str(&s, l, '\n');
l = add_and_pad(&s, l, term, *text_ptr++, maxlen);
l = add_to_str(&s, l, get_text_translation(TEXT_(T_NO), term));
- l = add_to_str(&s, l, cast_uchar "\n");
+ l = add_chr_to_str(&s, l, '\n');
l = add_and_pad(&s, l, term, *text_ptr++, maxlen);
if (links_home) {
@@ -123,7 +123,7 @@ menu_version(void *term_)
} else
l = add_to_str(&s, l,
get_text_translation(TEXT_(T_NONE), term));
- l = add_to_str(&s, l, cast_uchar "\n");
+ l = add_chr_to_str(&s, l, '\n');
if (*text_ptr)
internal("menu_version: text mismatched");
diff --git a/session.c b/session.c
@@ -668,7 +668,7 @@ download_window_function(struct dialog_data *dlg)
l = add_xnum_to_str(&m, l, stat->prg->size);
l = add_chr_to_str(&m, l, ' ');
}
- l = add_to_str(&m, l, cast_uchar "\n");
+ l = add_chr_to_str(&m, l, '\n');
if (stat->prg->elapsed >= CURRENT_SPD_AFTER * SPD_DISP_TIME)
l = add_to_str(
&m, l,
@@ -693,7 +693,7 @@ download_window_function(struct dialog_data *dlg)
/ (CURRENT_SPD_SEC * SPD_DISP_TIME / 1000));
l = add_to_str(&m, l, cast_uchar "/s");
}
- l = add_to_str(&m, l, cast_uchar "\n");
+ l = add_chr_to_str(&m, l, '\n');
l = add_to_str(
&m, l, get_text_translation(TEXT_(T_ELAPSED_TIME), term));
l = add_chr_to_str(&m, l, ' ');
diff --git a/view.c b/view.c
@@ -1375,7 +1375,7 @@ dump_to_file(struct f_data *fd, int h)
}
}
unknown:
- l = add_to_str(&s, l, cast_uchar "\n");
+ l = add_chr_to_str(&s, l, '\n');
if ((retval = hard_write(h, s, l)) != l) {
free(s);
goto fail;
@@ -1913,13 +1913,13 @@ bnd:
cast_uchar
"\r\nContent-Disposition: form-data; name=\"");
len = add_to_str(data, len, sv->name);
- len = add_to_str(data, len, cast_uchar "\"");
+ len = add_chr_to_str(data, len, '"');
if (sv->type == FC_FILE_UPLOAD) {
len = add_to_str(data, len, cast_uchar "; filename=\"");
len = add_to_str(data, len, strip_file_name(sv->value));
/* It sends bad data if the file name contains ", but
Netscape does the same */
- len = add_to_str(data, len, cast_uchar "\"");
+ len = add_chr_to_str(data, len, '"');
if (*sv->value)
if ((ct = get_content_type(NULL, sv->value))) {
len = add_to_str(data, len,
@@ -2113,7 +2113,7 @@ get_form_url(struct session *ses, struct f_data_c *f, struct form_control *form,
cast_uchar
"multipart/form-data; boundary=");
l = add_bytes_to_str(&go, l, bound, BL);
- l = add_to_str(&go, l, cast_uchar "\n");
+ l = add_chr_to_str(&go, l, '\n');
}
for (i = 0; i < len; i++) {
unsigned char p[3];
@@ -4410,7 +4410,7 @@ print_current_linkx_plus(struct f_data_c *fd, struct terminal *term)
}
spc = stracpy((unsigned char *)"");
if (spc && *spc) {
- ll = add_to_str(&m, ll, cast_uchar "\n");
+ ll = add_chr_to_str(&m, ll, '\n');
ll = add_to_str(
&m, ll,
get_text_translation(TEXT_(T_JAVASCRIPT), term));
@@ -4419,7 +4419,7 @@ print_current_linkx_plus(struct f_data_c *fd, struct terminal *term)
}
free(spc);
if (l->where_img) {
- ll = add_to_str(&m, ll, cast_uchar "\n");
+ ll = add_chr_to_str(&m, ll, '\n');
ll = add_to_str(
&m, ll, get_text_translation(TEXT_(T_IMAGE), term));
ll = add_to_str(&m, ll, cast_uchar ": src='");
@@ -4589,7 +4589,7 @@ loc_msg(struct terminal *term, struct location *lo, struct f_data_c *frame)
unsigned char *start;
size_t len;
if (ce->ip_address) {
- l = add_to_str(&s, l, cast_uchar "\n");
+ l = add_chr_to_str(&s, l, '\n');
if (!strchr(cast_const_char ce->ip_address, ' '))
l = add_to_str(&s, l,
get_text_translation(
@@ -4602,7 +4602,7 @@ loc_msg(struct terminal *term, struct location *lo, struct f_data_c *frame)
l = add_to_str(&s, l, cast_uchar ": ");
l = add_to_str(&s, l, ce->ip_address);
}
- l = add_to_str(&s, l, cast_uchar "\n");
+ l = add_chr_to_str(&s, l, '\n');
l = add_to_str(&s, l,
get_text_translation(TEXT_(T_SIZE), term));
l = add_to_str(&s, l, cast_uchar ": ");
@@ -4635,7 +4635,7 @@ loc_msg(struct terminal *term, struct location *lo, struct f_data_c *frame)
l = add_chr_to_str(&s, l, ')');
}
if (frame->f_data->ass >= 0) {
- l = add_to_str(&s, l, cast_uchar "\n");
+ l = add_chr_to_str(&s, l, '\n');
l = add_to_str(
&s, l,
get_text_translation(TEXT_(T_CODEPAGE), term));
@@ -4661,7 +4661,7 @@ loc_msg(struct terminal *term, struct location *lo, struct f_data_c *frame)
if (ce->head && ce->head[0] != '\n' && ce->head[0] != '\r'
&& (a = parse_http_header(
ce->head, cast_uchar "Content-Type", NULL))) {
- l = add_to_str(&s, l, cast_uchar "\n");
+ l = add_chr_to_str(&s, l, '\n');
l = add_to_str(
&s, l,
get_text_translation(TEXT_(T_CONTENT_TYPE), term));
@@ -4671,7 +4671,7 @@ loc_msg(struct terminal *term, struct location *lo, struct f_data_c *frame)
}
if ((a = parse_http_header(ce->head, cast_uchar "Server",
NULL))) {
- l = add_to_str(&s, l, cast_uchar "\n");
+ l = add_chr_to_str(&s, l, '\n');
l = add_to_str(
&s, l, get_text_translation(TEXT_(T_SERVER), term));
l = add_to_str(&s, l, cast_uchar ": ");
@@ -4680,7 +4680,7 @@ loc_msg(struct terminal *term, struct location *lo, struct f_data_c *frame)
}
if ((a = parse_http_header(ce->head, cast_uchar "Date",
NULL))) {
- l = add_to_str(&s, l, cast_uchar "\n");
+ l = add_chr_to_str(&s, l, '\n');
l = add_to_str(
&s, l, get_text_translation(TEXT_(T_DATE), term));
l = add_to_str(&s, l, cast_uchar ": ");
@@ -4689,7 +4689,7 @@ loc_msg(struct terminal *term, struct location *lo, struct f_data_c *frame)
}
if ((a = parse_http_header(ce->head, cast_uchar "Last-Modified",
NULL))) {
- l = add_to_str(&s, l, cast_uchar "\n");
+ l = add_chr_to_str(&s, l, '\n');
l = add_to_str(
&s, l,
get_text_translation(TEXT_(T_LAST_MODIFIED), term));
@@ -4698,7 +4698,7 @@ loc_msg(struct terminal *term, struct location *lo, struct f_data_c *frame)
free(a);
}
if (ce->ssl_info) {
- l = add_to_str(&s, l, cast_uchar "\n");
+ l = add_chr_to_str(&s, l, '\n');
l = add_to_str(
&s, l,
get_text_translation(TEXT_(T_SSL_CIPHER), term));
@@ -4706,7 +4706,7 @@ loc_msg(struct terminal *term, struct location *lo, struct f_data_c *frame)
l = add_to_str(&s, l, ce->ssl_info);
}
if (ce->ssl_authority) {
- l = add_to_str(&s, l, cast_uchar "\n");
+ l = add_chr_to_str(&s, l, '\n');
if (strstr(cast_const_char ce->ssl_authority,
cast_const_char CERT_RIGHT_ARROW))
l = add_to_str(