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/kDef2Wat.cpp

    r5531 r8003  
    1 /* $Id: kDef2Wat.cpp,v 1.2 2001-04-17 00:26:10 bird Exp $
     1/* $Id: kDef2Wat.cpp,v 1.3 2002-02-24 02:47:23 bird Exp $
    22 *
    33 * Converter for IBM/MS linker definition files (.DEF) to Watcom linker directives and options.
     
    1414*   Header Files                                                               *
    1515*******************************************************************************/
    16 #include <os2.h>
    17 
     16#include "kTypes.h"
     17#include "kError.h"
    1818#include "kFile.h"
     19#include "kFileInterfaces.h"
    1920#include "kFileFormatBase.h"
    20 #include "kInterfaces.h"
    2121#include "kFileDef.h"
    2222
     
    5858    try
    5959    {
    60         kFile    InFile(pszInput);
    61         kFileDef def(&InFile);
     60        kFileDef def(new kFile(pszInput));
    6261        try
    6362        {
     
    7574                    kFile::StdOut.printf("Successfully converted %s to %s\n", pszInput, pszOutput);
    7675                }
    77                 catch (int errorcode)
     76                catch (kError err)
    7877                {
    79                     kFile::StdErr.printf("Append file %s to %s, errorcode=%d\n", pszAppend, pszInput, errorcode);
     78                    kFile::StdErr.printf("Append file %s to %s, errorcode=%d\n", pszAppend, pszInput, err.getErrno());
    8079                    return -3;
    8180                }
    8281            }
    8382        }
    84         catch (int errorcode)
     83        catch (kError err)
    8584        {
    86             kFile::StdErr.printf("Failed to read .DEF file (%s), errorcode=%d\n", pszInput, errorcode);
     85            kFile::StdErr.printf("Failed to read .DEF file (%s), errorcode=%d\n", pszInput, err.getErrno());
    8786            return -3;
    8887        }
    8988    }
    90     catch (int errorcode)
     89    catch (kError err)
    9190    {
    92         kFile::StdErr.printf("Failed to read .DEF file (%s), errorcode=%d\n", pszInput, errorcode);
     91        kFile::StdErr.printf("Failed to read .DEF file (%s), errorcode=%d\n", pszInput, err.getErrno());
    9392        return -2;
    9493    }
Note: See TracChangeset for help on using the changeset viewer.