Ignore:
Timestamp:
Aug 21, 2001, 7:29:38 PM (24 years ago)
Author:
umoeller
Message:

Misc updates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/helpers/xmlparse.c

    r97 r98  
    947947    inheritedBindings = 0;
    948948    attsSize = INIT_ATTS_SIZE;
    949     atts = MALLOC(attsSize * sizeof(ATTRIBUTE));
     949    atts = (ATTRIBUTE*)MALLOC(attsSize * sizeof(ATTRIBUTE));
    950950    nSpecifiedAtts = 0;
    951     dataBuf = MALLOC(INIT_DATA_BUF_SIZE * sizeof(XML_Char));
     951    dataBuf = (XML_Char*)MALLOC(INIT_DATA_BUF_SIZE * sizeof(XML_Char));
    952952    groupSize = 0;
    953953    groupConnector = 0;
     
    10651065
    10661066#ifdef XML_DTD
    1067     int oldParamEntityParsing = paramEntityParsing;
     1067    enum XML_ParamEntityParsing oldParamEntityParsing = paramEntityParsing;
    10681068
    10691069#endif
     
    22522252            }
    22532253            while (bufferSize < neededSize);
    2254             newBuf = MALLOC(bufferSize);
     2254            newBuf = (char*)MALLOC(bufferSize);
    22552255            if (newBuf == 0)
    22562256            {
     
    27832783                    else
    27842784                    {
    2785                         tag = MALLOC(sizeof(TAG));
     2785                        tag = (TAG*)MALLOC(sizeof(TAG));
    27862786                        if (!tag)
    27872787                            return ERROR_EXPAT_NO_MEMORY;
    2788                         tag->buf = MALLOC(INIT_TAG_BUF_SIZE);
     2788                        tag->buf = (char*)MALLOC(INIT_TAG_BUF_SIZE);
    27892789                        if (!tag->buf)
    27902790                            return ERROR_EXPAT_NO_MEMORY;
     
    28062806
    28072807                            bufSize = ROUND_UP(bufSize, sizeof(XML_Char));
    2808                             tag->buf = REALLOC(tag->buf, bufSize);
     2808                            tag->buf = (char*)REALLOC(tag->buf, bufSize);
    28092809                            if (!tag->buf)
    28102810                                return ERROR_EXPAT_NO_MEMORY;
     
    28372837                                break;
    28382838                            bufSize = (tag->bufEnd - tag->buf) << 1;
    2839                             tag->buf = REALLOC(tag->buf, bufSize);
     2839                            tag->buf = (char*)REALLOC(tag->buf, bufSize);
    28402840                            if (!tag->buf)
    28412841                                return ERROR_EXPAT_NO_MEMORY;
     
    31403140
    31413141        attsSize = n + nDefaultAtts + INIT_ATTS_SIZE;
    3142         atts = REALLOC((void *)atts, attsSize * sizeof(ATTRIBUTE));
     3142        atts = (ATTRIBUTE*)REALLOC((void *)atts, attsSize * sizeof(ATTRIBUTE));
    31433143        if (!atts)
    31443144            return ERROR_EXPAT_NO_MEMORY;
     
    33653365    {
    33663366        TAG *p;
    3367         XML_Char *uri = MALLOC((n + EXPAND_SPARE) * sizeof(XML_Char));
     3367        XML_Char *uri = (XML_Char*)MALLOC((n + EXPAND_SPARE) * sizeof(XML_Char));
    33683368
    33693369        if (!uri)
     
    33973397        if (len > b->uriAlloc)
    33983398        {
    3399             b->uri = REALLOC(b->uri, sizeof(XML_Char) * (len + EXPAND_SPARE));
     3399            b->uri = (XML_Char*)REALLOC(b->uri, sizeof(XML_Char) * (len + EXPAND_SPARE));
    34003400            if (!b->uri)
    34013401                return 0;
     
    34063406    else
    34073407    {
    3408         b = MALLOC(sizeof(BINDING));
     3408        b = (BINDING*)MALLOC(sizeof(BINDING));
    34093409        if (!b)
    34103410            return 0;
    3411         b->uri = MALLOC(sizeof(XML_Char) * (len + EXPAND_SPARE));
     3411        b->uri = (XML_Char*)MALLOC(sizeof(XML_Char) * (len + EXPAND_SPARE));
    34123412        if (!b->uri)
    34133413        {
     
    38193819            {
    38203820                unknownEncodingData = info.data;
    3821                 unknownEncodingRelease = info.release;
     3821                unknownEncodingRelease = (void(*)(void*))info.release;
    38223822                encoding = enc;
    38233823                return ERROR_EXPAT_NONE;
     
    44534453                    if (groupSize)
    44544454                    {
    4455                         groupConnector = REALLOC(groupConnector, groupSize *= 2);
     4455                        groupConnector = (char*)REALLOC(groupConnector, groupSize *= 2);
    44564456                        if (dtd.scaffIndex)
    4457                             dtd.scaffIndex = REALLOC(dtd.scaffIndex, groupSize * sizeof(int));
     4457                            dtd.scaffIndex = (int*)REALLOC(dtd.scaffIndex, groupSize * sizeof(int));
    44584458                    }
    44594459                    else
    4460                         groupConnector = MALLOC(groupSize = 32);
     4460                        groupConnector = (char*)MALLOC(groupSize = 32);
    44614461                    if (!groupConnector)
    44624462                        return ERROR_EXPAT_NO_MEMORY;
     
    52325232        {
    52335233            type->allocDefaultAtts = 8;
    5234             type->defaultAtts = MALLOC(type->allocDefaultAtts * sizeof(DEFAULT_ATTRIBUTE));
     5234            type->defaultAtts = (DEFAULT_ATTRIBUTE*)MALLOC(type->allocDefaultAtts * sizeof(DEFAULT_ATTRIBUTE));
    52355235        }
    52365236        else
    52375237        {
    52385238            type->allocDefaultAtts *= 2;
    5239             type->defaultAtts = REALLOC(type->defaultAtts,
     5239            type->defaultAtts = (DEFAULT_ATTRIBUTE*)REALLOC(type->defaultAtts,
    52405240                          type->allocDefaultAtts * sizeof(DEFAULT_ATTRIBUTE));
    52415241        }
     
    58145814            return 0;
    58155815        tsize = INIT_SIZE * sizeof(NAMED *);
    5816         table->v = table->mem->malloc_fcn(tsize);
     5816        table->v = (NAMED**)table->mem->malloc_fcn(tsize);
    58175817        if (!table->v)
    58185818            return 0;
     
    58405840            size_t newSize = table->size * 2;
    58415841            size_t tsize = newSize * sizeof(NAMED *);
    5842             NAMED **newV = table->mem->malloc_fcn(tsize);
     5842            NAMED **newV = (NAMED**)table->mem->malloc_fcn(tsize);
    58435843
    58445844            if (!newV)
     
    58665866        }
    58675867    }
    5868     table->v[i] = table->mem->malloc_fcn(createSize);
     5868    table->v[i] = (NAMED*)table->mem->malloc_fcn(createSize);
    58695869    if (!table->v[i])
    58705870        return 0;
     
    61406140        int blockSize = (pool->end - pool->start) * 2;
    61416141
    6142         pool->blocks = pool->mem->realloc_fcn(pool->blocks, offsetof(BLOCK, s) + blockSize * sizeof(XML_Char));
     6142        pool->blocks = (BLOCK*)pool->mem->realloc_fcn(pool->blocks, offsetof(BLOCK, s) + blockSize * sizeof(XML_Char));
    61436143        if (!pool->blocks)
    61446144            return 0;
     
    61576157        else
    61586158            blockSize *= 2;
    6159         tem = pool->mem->malloc_fcn(offsetof(BLOCK, s) + blockSize * sizeof(XML_Char));
     6159        tem = (BLOCK*)pool->mem->malloc_fcn(offsetof(BLOCK, s) + blockSize * sizeof(XML_Char));
    61606160        if (!tem)
    61616161            return 0;
     
    61806180    if (!dtd.scaffIndex)
    61816181    {
    6182         dtd.scaffIndex = MALLOC(groupSize * sizeof(int));
     6182        dtd.scaffIndex = (int*)MALLOC(groupSize * sizeof(int));
    61836183
    61846184        if (!dtd.scaffIndex)
     
    62736273    int allocsize = dtd.scaffCount * sizeof(XMLCONTENT) + dtd.contentStringLen;
    62746274
    6275     ret = MALLOC(allocsize);
     6275    ret = (XMLCONTENT*)MALLOC(allocsize);
    62766276    if (!ret)
    62776277        return 0;
Note: See TracChangeset for help on using the changeset viewer.