diff options
author | George Hazan <george.hazan@gmail.com> | 2015-07-23 08:28:34 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-07-23 08:28:34 +0000 |
commit | 371c87af33810c934034161947c143ccbf6aa01b (patch) | |
tree | 59e6cca98e1019ab519306bf9cd6ab75624be908 /plugins/MirOTR/ekhtml | |
parent | 0c47fa983161b4db0b7bd4105cebae0ddae707c8 (diff) |
various warning & compilation fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@14648 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirOTR/ekhtml')
-rw-r--r-- | plugins/MirOTR/ekhtml/include/ekhtml_config.h | 3 | ||||
-rw-r--r-- | plugins/MirOTR/ekhtml/src/ekhtml.c | 5 | ||||
-rw-r--r-- | plugins/MirOTR/ekhtml/src/ekhtml_mktables.c | 2 | ||||
-rw-r--r-- | plugins/MirOTR/ekhtml/src/ekhtml_starttag.c | 10 |
4 files changed, 8 insertions, 12 deletions
diff --git a/plugins/MirOTR/ekhtml/include/ekhtml_config.h b/plugins/MirOTR/ekhtml/include/ekhtml_config.h index 775b8cb2f2..21254ea3bc 100644 --- a/plugins/MirOTR/ekhtml/include/ekhtml_config.h +++ b/plugins/MirOTR/ekhtml/include/ekhtml_config.h @@ -96,9 +96,6 @@ /* Miranda NG modifications */ #define GPGRT_ENABLE_ES_MACROS 1 #include <string.h> -#define strdup _strdup -#define stricmp _stricmp -#define snprintf _snprintf #ifdef _WIN64 # define __x86_64__ 1 #else 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 == '<') { |