Ignore:
Timestamp:
01/07/07 17:51:10 (7 years ago)
Author:
xi
Message:

Add win32 fixes and project files for VC6.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libyaml/trunk/src/api.c

    r238 r239  
    7575        yaml_char_t **pointer, yaml_char_t **end) 
    7676{ 
    77     void *new_start = yaml_realloc(*start, (*end - *start)*2); 
     77    yaml_char_t *new_start = yaml_realloc(*start, (*end - *start)*2); 
    7878 
    7979    if (!new_start) return 0; 
     
    118118yaml_stack_extend(void **start, void **top, void **end) 
    119119{ 
    120     void *new_start = yaml_realloc(*start, (*end - *start)*2); 
     120    void *new_start = yaml_realloc(*start, ((char *)*end - (char *)*start)*2); 
    121121 
    122122    if (!new_start) return 0; 
    123123 
    124     *top = new_start + (*top - *start); 
    125     *end = new_start + (*end - *start)*2; 
     124    *top = (char *)new_start + ((char *)*top - (char *)*start); 
     125    *end = (char *)new_start + ((char *)*end - (char *)*start)*2; 
    126126    *start = new_start; 
    127127 
     
    139139 
    140140    if (*start == *head && *tail == *end) { 
    141         void *new_start = yaml_realloc(*start, (*end - *start)*2); 
     141        void *new_start = yaml_realloc(*start, 
     142                ((char *)*end - (char *)*start)*2); 
    142143 
    143144        if (!new_start) return 0; 
    144145 
    145         *head = new_start + (*head - *start); 
    146         *tail = new_start + (*tail - *start); 
    147         *end = new_start + (*end - *start)*2; 
     146        *head = (char *)new_start + ((char *)*head - (char *)*start); 
     147        *tail = (char *)new_start + ((char *)*tail - (char *)*start); 
     148        *end = (char *)new_start + ((char *)*end - (char *)*start)*2; 
    148149        *start = new_start; 
    149150    } 
     
    153154    if (*tail == *end) { 
    154155        if (*head != *tail) { 
    155             memmove(*start, *head, *tail - *head); 
     156            memmove(*start, *head, (char *)*tail - (char *)*head); 
    156157        } 
    157         *tail -= *head - *start; 
     158        *tail = (char *)*tail - (char *)*head + (char *)*start; 
    158159        *head = *start; 
    159160    } 
     
    250251    } 
    251252 
    252     if (size > (parser->input.string.end - parser->input.string.current)) { 
     253    if (size > (size_t)(parser->input.string.end 
     254                - parser->input.string.current)) { 
    253255        size = parser->input.string.end - parser->input.string.current; 
    254256    } 
     
    625627        unsigned int width; 
    626628        unsigned int value; 
    627         int k; 
     629        size_t k; 
    628630 
    629631        octet = pointer[0]; 
     
    11171119    struct { 
    11181120        yaml_error_type_t error; 
    1119     } context; 
     1121    } context = { YAML_NO_ERROR }; 
    11201122    yaml_tag_directive_t *tag_directive; 
    11211123 
     
    13821384} 
    13831385 
     1386 
Note: See TracChangeset for help on using the changeset viewer.