mirror of
https://github.com/rkd77/elinks.git
synced 2024-09-28 03:06:20 -04:00
[signdness] Compilation fixes.
This commit is contained in:
parent
ca8dac65ce
commit
f10b374d62
@ -323,7 +323,6 @@ html_img_do(char *a, char *object_src,
|
|||||||
|
|
||||||
if (!options->image_link.show_any_as_links) {
|
if (!options->image_link.show_any_as_links) {
|
||||||
put_image_label(a, label, html_context);
|
put_image_label(a, label, html_context);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (src) {
|
if (src) {
|
||||||
format.image = join_urls(html_context->base_href, src);
|
format.image = join_urls(html_context->base_href, src);
|
||||||
@ -336,7 +335,7 @@ html_img_do(char *a, char *object_src,
|
|||||||
|
|
||||||
html_stack_dup(html_context, ELEMENT_KILLABLE);
|
html_stack_dup(html_context, ELEMENT_KILLABLE);
|
||||||
new_link = straconcat(format.link, "?0,0", (char *) NULL);
|
new_link = straconcat(format.link, "?0,0", (char *) NULL);
|
||||||
if (new_link)
|
if (new_link) {
|
||||||
mem_free_set(&format.link, new_link);
|
mem_free_set(&format.link, new_link);
|
||||||
//fprintf(stderr, "new_link: format.link=%s\n", format.link);
|
//fprintf(stderr, "new_link: format.link=%s\n", format.link);
|
||||||
}
|
}
|
||||||
|
@ -254,7 +254,7 @@ parse_error:
|
|||||||
|
|
||||||
#undef add_chr
|
#undef add_chr
|
||||||
|
|
||||||
int get_num2(unsigned char *al)
|
int get_num2(char *al)
|
||||||
{
|
{
|
||||||
int result = -1;
|
int result = -1;
|
||||||
|
|
||||||
@ -276,18 +276,18 @@ int get_num2(unsigned char *al)
|
|||||||
* It will return a positive integer value on success,
|
* It will return a positive integer value on success,
|
||||||
* or -1 on error. */
|
* or -1 on error. */
|
||||||
int
|
int
|
||||||
get_num(unsigned char *a, unsigned char *name, int cp)
|
get_num(char *a, char *name, int cp)
|
||||||
{
|
{
|
||||||
unsigned char *al = get_attr_val(a, name, cp);
|
char *al = get_attr_val(a, name, cp);
|
||||||
|
|
||||||
return get_num2(al);
|
return get_num2(al);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
get_width2(struct html_context *html_context, unsigned char *value, int limited)
|
get_width2(struct html_context *html_context, char *value, int limited)
|
||||||
{
|
{
|
||||||
unsigned char *str = value;
|
char *str = value;
|
||||||
unsigned char *end;
|
char *end;
|
||||||
int percentage = 0;
|
int percentage = 0;
|
||||||
int len;
|
int len;
|
||||||
long width;
|
long width;
|
||||||
@ -370,10 +370,10 @@ get_width2(struct html_context *html_context, unsigned char *value, int limited)
|
|||||||
* @limited must be set to be able to parse percentage widths. */
|
* @limited must be set to be able to parse percentage widths. */
|
||||||
/* The function returns width in characters or -1 in case of error. */
|
/* The function returns width in characters or -1 in case of error. */
|
||||||
int
|
int
|
||||||
get_width(unsigned char *a, unsigned char *name, int limited,
|
get_width(char *a, char *name, int limited,
|
||||||
struct html_context *html_context)
|
struct html_context *html_context)
|
||||||
{
|
{
|
||||||
unsigned char *value = get_attr_val(a, name, html_context->doc_cp);
|
char *value = get_attr_val(a, name, html_context->doc_cp);
|
||||||
|
|
||||||
return get_width2(html_context, value, limited);
|
return get_width2(html_context, value, limited);
|
||||||
}
|
}
|
||||||
@ -1619,11 +1619,11 @@ ng:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
parse_html(unsigned char *html, unsigned char *eof,
|
parse_html(char *html, char *eof,
|
||||||
struct part *part, unsigned char *head,
|
struct part *part, char *head,
|
||||||
struct html_context *html_context)
|
struct html_context *html_context)
|
||||||
{
|
{
|
||||||
unsigned char *base_pos = html;
|
char *base_pos = html;
|
||||||
int noupdate = 0;
|
int noupdate = 0;
|
||||||
|
|
||||||
html_context->putsp = HTML_SPACE_SUPPRESS;
|
html_context->putsp = HTML_SPACE_SUPPRESS;
|
||||||
@ -1639,7 +1639,7 @@ parse_html(unsigned char *html, unsigned char *eof,
|
|||||||
|
|
||||||
main_loop:
|
main_loop:
|
||||||
while (html < eof) {
|
while (html < eof) {
|
||||||
unsigned char *name, *attr, *end;
|
char *name, *attr, *end;
|
||||||
int namelen, endingtag;
|
int namelen, endingtag;
|
||||||
int dotcounter = 0;
|
int dotcounter = 0;
|
||||||
|
|
||||||
@ -1652,7 +1652,7 @@ main_loop:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isspace(*html) && !html_is_preformatted()) {
|
if (isspace(*html) && !html_is_preformatted()) {
|
||||||
unsigned char *h = html;
|
char *h = html;
|
||||||
|
|
||||||
while (h < eof && isspace(*h))
|
while (h < eof && isspace(*h))
|
||||||
h++;
|
h++;
|
||||||
@ -1721,7 +1721,7 @@ next_break:
|
|||||||
int length = html - base_pos;
|
int length = html - base_pos;
|
||||||
int newlines;
|
int newlines;
|
||||||
|
|
||||||
html = (unsigned char *) count_newline_entities(html, eof, &newlines);
|
html = (char *) count_newline_entities(html, eof, &newlines);
|
||||||
if (newlines) {
|
if (newlines) {
|
||||||
put_chrs(html_context, base_pos, length);
|
put_chrs(html_context, base_pos, length);
|
||||||
ln_break(html_context, newlines);
|
ln_break(html_context, newlines);
|
||||||
@ -1767,8 +1767,8 @@ element:
|
|||||||
put_chrs(html_context, " ", 1);
|
put_chrs(html_context, " ", 1);
|
||||||
put_chrs(html_context, base_pos, html - base_pos);
|
put_chrs(html_context, base_pos, html - base_pos);
|
||||||
if (!html_is_preformatted() && !endingtag && html_context->putsp == HTML_SPACE_NORMAL) {
|
if (!html_is_preformatted() && !endingtag && html_context->putsp == HTML_SPACE_NORMAL) {
|
||||||
unsigned char *ee = end;
|
char *ee = end;
|
||||||
unsigned char *nm;
|
char *nm;
|
||||||
|
|
||||||
while (!parse_element(ee, eof, &nm, NULL, NULL, &ee))
|
while (!parse_element(ee, eof, &nm, NULL, NULL, &ee))
|
||||||
if (*nm == '/')
|
if (*nm == '/')
|
||||||
@ -1797,9 +1797,9 @@ ng:
|
|||||||
* routine runs as a callback for pre-order traversal. */
|
* routine runs as a callback for pre-order traversal. */
|
||||||
static unsigned char *
|
static unsigned char *
|
||||||
start_element(struct element_info *ei,
|
start_element(struct element_info *ei,
|
||||||
unsigned char *name, int namelen,
|
char *name, int namelen,
|
||||||
unsigned char *html,
|
char *html,
|
||||||
unsigned char *eof, unsigned char *attr,
|
char *eof, char *attr,
|
||||||
struct html_context *html_context)
|
struct html_context *html_context)
|
||||||
{
|
{
|
||||||
#define ELEMENT_RENDER_PROLOGUE \
|
#define ELEMENT_RENDER_PROLOGUE \
|
||||||
@ -1810,7 +1810,7 @@ start_element(struct element_info *ei,
|
|||||||
mem_free(a); \
|
mem_free(a); \
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned char *a;
|
char *a;
|
||||||
struct par_attrib old_format;
|
struct par_attrib old_format;
|
||||||
int restore_format;
|
int restore_format;
|
||||||
#ifdef CONFIG_CSS
|
#ifdef CONFIG_CSS
|
||||||
@ -1854,7 +1854,7 @@ start_element(struct element_info *ei,
|
|||||||
/* If this is a style tag, parse it. */
|
/* If this is a style tag, parse it. */
|
||||||
#ifdef CONFIG_CSS
|
#ifdef CONFIG_CSS
|
||||||
if (ei->open == html_style && html_context->options->css_enable) {
|
if (ei->open == html_style && html_context->options->css_enable) {
|
||||||
unsigned char *media
|
char *media
|
||||||
= get_attr_val(attr, "media", html_context->doc_cp);
|
= get_attr_val(attr, "media", html_context->doc_cp);
|
||||||
int support = supports_html_media_attr(media);
|
int support = supports_html_media_attr(media);
|
||||||
mem_free_if(media);
|
mem_free_if(media);
|
||||||
|
@ -67,8 +67,8 @@ typedef void (element_handler_T)(struct html_context *, char *attr,
|
|||||||
|
|
||||||
int parse_element(char *, char *, char **, int *, char **, char **);
|
int parse_element(char *, char *, char **, int *, char **, char **);
|
||||||
|
|
||||||
int get_num2(unsigned char *al);
|
int get_num2(char *al);
|
||||||
int get_width2(struct html_context *html_context, unsigned char *value, int limited);
|
int get_width2(struct html_context *html_context, char *value, int limited);
|
||||||
int get_num(char *, char *, int);
|
int get_num(char *, char *, int);
|
||||||
int get_width(char *, char *, int, struct html_context *);
|
int get_width(char *, char *, int, struct html_context *);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user