summaryrefslogtreecommitdiff
path: root/plugins/MirOTR/ekhtml/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MirOTR/ekhtml/src')
-rw-r--r--plugins/MirOTR/ekhtml/src/ekhtml.c5
-rw-r--r--plugins/MirOTR/ekhtml/src/ekhtml_mktables.c2
-rw-r--r--plugins/MirOTR/ekhtml/src/ekhtml_starttag.c10
3 files changed, 8 insertions, 9 deletions
diff --git a/plugins/MirOTR/ekhtml/src/ekhtml.c b/plugins/MirOTR/ekhtml/src/ekhtml.c
index 012a543b91..5a6a3f5db2 100644
--- a/plugins/MirOTR/ekhtml/src/ekhtml.c
+++ b/plugins/MirOTR/ekhtml/src/ekhtml.c
@@ -90,8 +90,7 @@ static void ekhtml_buffer_grow(ekhtml_parser_t *parser){
newsize = parser->nalloced + EKHTML_BLOCKSIZE;
if((newbuf = realloc(parser->buf, newsize)) == NULL){
- fprintf(stderr, "BAD! Can't allocate %d bytes in ekhtml_buffer_grow\n",
- newsize);
+ fprintf(stderr, "BAD! Can't allocate %d bytes in ekhtml_buffer_grow\n", (int)newsize);
fflush(stderr); /* Just in case someone changes the buffering scheme */
}
@@ -279,7 +278,7 @@ ekhtml_parser_startendcb_add(ekhtml_parser_t *parser, const char *tag,
}
- newtag = strdup(tag);
+ newtag = _strdup(tag);
for(cp=newtag; *cp; cp++)
*cp = toupper(*cp);
diff --git a/plugins/MirOTR/ekhtml/src/ekhtml_mktables.c b/plugins/MirOTR/ekhtml/src/ekhtml_mktables.c
index 412b313467..e9d2102325 100644
--- a/plugins/MirOTR/ekhtml/src/ekhtml_mktables.c
+++ b/plugins/MirOTR/ekhtml/src/ekhtml_mktables.c
@@ -111,7 +111,7 @@ static void print_charmap(char *name, EKHTML_CHARMAP_TYPE (*cmap_func)(char)){
int ch;
char sbuf[256];
- sprintf(sbuf, "0x%%0%dx ", EKHTML_CHARMAP_LEN * 2);
+ sprintf(sbuf, "0x%%0%dx ", (int)EKHTML_CHARMAP_LEN * 2);
printf("#ifdef EKHTML_USE_TABLES\n");
printf("const %s %s[256] = {\n", EKHTML_CHARMAP_TYPE_S, name);
for(ch=0; ch < 256; ch++){
diff --git a/plugins/MirOTR/ekhtml/src/ekhtml_starttag.c b/plugins/MirOTR/ekhtml/src/ekhtml_starttag.c
index d0770851cf..ff2c6c79d7 100644
--- a/plugins/MirOTR/ekhtml/src/ekhtml_starttag.c
+++ b/plugins/MirOTR/ekhtml/src/ekhtml_starttag.c
@@ -147,9 +147,9 @@ static void handle_starttag(ekhtml_parser_t *parser, char *curp,
/* Formulate real attribute callback data from the 'offset'
pointer values */
for(attr=sstate->attrs;attr;attr=attr->next){
- attr->name.str = curp + (int)attr->name.str;
+ attr->name.str = curp + (size_t)attr->name.str;
if(!attr->isBoolean)
- attr->val.str = curp + (int)attr->val.str;
+ attr->val.str = curp + (size_t)attr->val.str;
}
cback(parser->cbdata, &str, sstate->attrs);
@@ -254,7 +254,7 @@ char *ekhtml_parse_starttag(ekhtml_parser_t *parser, void **state_data,
/* There be dragons here -- watch out -- see comment @ top
of file */
startstate->curattr->name.len =
- workp - (curp + (int)startstate->curattr->name.str);
+ workp - (curp + (size_t)startstate->curattr->name.str);
if(*workp == '='){
startstate->mode = EKHTML_STMODE_BEGVALUE;
workp++; /* Skip the equals sign */
@@ -331,7 +331,7 @@ char *ekhtml_parse_starttag(ekhtml_parser_t *parser, void **state_data,
for(;workp != endp && *workp != '>' && *workp != '<'; workp++){
if(*workp == startstate->quote){
startstate->curattr->val.len =
- workp - (curp + (int)startstate->curattr->val.str);
+ workp - (curp + (size_t)startstate->curattr->val.str);
scroll_attribute(startstate);
startstate->mode = EKHTML_STMODE_BEGNAME;
workp++; /* Skip the quote */
@@ -350,7 +350,7 @@ char *ekhtml_parse_starttag(ekhtml_parser_t *parser, void **state_data,
break;
startstate->curattr->val.len =
- workp - (curp + (int)startstate->curattr->val.str);
+ workp - (curp + (size_t)startstate->curattr->val.str);
scroll_attribute(startstate);
if(*workp == '>' || *workp == '<') {