Ignore:
Timestamp:
Feb 24, 2002, 3:47:28 AM (24 years ago)
Author:
bird
Message:

New kFile* classes; now in sync with os2tools.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/common/kFileSDF.cpp

    r5534 r8003  
    1 /* $Id: kFileSDF.cpp,v 1.1 2001-04-17 04:16:03 bird Exp $
     1/* $Id: kFileSDF.cpp,v 1.2 2002-02-24 02:47:27 bird Exp $
    22 *
    33 * kFileSDF- Structure Defintion File class Implementation.
     
    1818*   Header Files                                                               *
    1919*******************************************************************************/
    20 #include <os2.h>
    21 
    2220#include <string.h>
    23 #include <malloc.h>
    24 
    25 #include "kInterfaces.h"
     21
     22#include "kTypes.h"
     23#include "kError.h"
     24#include "kFileInterfaces.h"
    2625#include "kFile.h"
    2726#include "kFileFormatBase.h"
     
    3433
    3534
     35
    3636/*******************************************************************************
    3737*   Global Variables                                                           *
    3838*******************************************************************************/
    39 #if 1
     39#if 0
    4040static kFileSDF tst((kFile*)NULL);
    4141#endif
     
    6767 *
    6868 */
    69 void kFileSDF::parseSDFFile(void *pvFile) throw(int)
     69void kFileSDF::parseSDFFile(void *pvFile)
    7070{
    7171    /*
     
    7575    if (    pHdr->cStructs >= 0x8000    /* 32k is a reasonable limit. */
    7676        ||  pHdr->cTypes   >= 0x8000)
    77         throw(1);
     77        throw(kError(kError::SDF_TOO_MANY));
    7878
    7979    /*
     
    160160 * @remark  Will throw error codes.
    161161 */
    162 kFileSDF::kFileSDF(kFile *pFile) throw(int) :
    163     papStructs(NULL), pHdr(NULL), paTypes(NULL)
     162kFileSDF::kFileSDF(kFile *pFile) :
     163    kFileFormatBase(pFile), papStructs(NULL), pHdr(NULL), paTypes(NULL)
    164164{
    165165    long    cchFile = pFile->getSize();
    166     void *  pvFile = pFile->readFile();
     166    void *  pvFile = pFile->mapFile();
    167167
    168168    /*
     
    197197    catch (int err)
    198198    {
    199         free(pvFile);
     199        kFile::mapFree(pvFile);
    200200        if (papStructs);
    201201            delete papStructs;
     
    209209    if (papStructs);
    210210        delete papStructs;
    211     free(pHdr);
    212 }
     211    kFile::mapFree(pHdr);
     212}
     213
     214
     215
     216kDbgTypeEntry * kFileSDF::dbgtypeFindFirst(int flFlags)
     217{
     218    return NULL;
     219}
     220
     221kDbgTypeEntry * kFileSDF::dbgtypeFindNext(kDbgTypeEntry *kDbgTypeEntry)
     222{
     223    return NULL;
     224}
     225
     226void            kFileSDF::dbgtypeFindClose(kDbgTypeEntry *kDbgTypeEntry)
     227{
     228    return;
     229}
     230
     231kDbgTypeEntry * kFileSDF::dbgtypeLookup(const char *pszName, int flFlags)
     232{
     233    return NULL;
     234}
     235
     236
     237
     238
     239KBOOL kFileSDF::dump(kFile *pOut)
     240{
     241    return FALSE;
     242}
     243
Note: See TracChangeset for help on using the changeset viewer.