Changeset 8360 for trunk/tools/common/kDef2Wat.cpp
- Timestamp:
- May 1, 2002, 5:58:37 AM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/common/kDef2Wat.cpp
r8003 r8360 1 /* $Id: kDef2Wat.cpp,v 1. 3 2002-02-24 02:47:23bird Exp $1 /* $Id: kDef2Wat.cpp,v 1.4 2002-05-01 03:58:36 bird Exp $ 2 2 * 3 3 * Converter for IBM/MS linker definition files (.DEF) to Watcom linker directives and options. … … 20 20 #include "kFileFormatBase.h" 21 21 #include "kFileDef.h" 22 23 #include <stdio.h> 24 #include <string.h> 22 25 23 26 /******************************************************************************* … … 42 45 const char *pszOutput; 43 46 const char *pszAppend; 47 const char *pszOS; 48 int enmOS; 44 49 45 50 /* check arguments */ 46 if (argc != 3 && argc != 4)51 if (argc != 4 && argc != 5) 47 52 { 48 53 syntax(); 49 54 return -1; 50 55 } 51 pszInput = argv[1]; 52 pszOutput = argv[2]; 53 pszAppend = (argc == 4) ? argv[3] : NULL; 56 pszOS = argv[1]; 57 pszInput = argv[2]; 58 pszOutput = argv[3]; 59 pszAppend = (argc == 5) ? argv[4] : NULL; 60 if (!stricmp(pszOS, "os2")) 61 enmOS = kFileDef::os2; 62 else if (!stricmp(pszOS, "dos")) 63 enmOS = kFileDef::dos; 64 else if (!stricmp(pszOS, "win32")) 65 enmOS = kFileDef::win32; 66 else if (!stricmp(pszOS, "win16")) 67 enmOS = kFileDef::win16; 68 else if (!stricmp(pszOS, "nlm")) 69 enmOS = kFileDef::nlm; 70 else if (!stricmp(pszOS, "qnx")) 71 enmOS = kFileDef::qnx; 72 else if (!stricmp(pszOS, "elf")) 73 enmOS = kFileDef::elf; 74 else 75 { 76 printf("Invalid os string '%s'.\n", pszOS); 77 syntax(); 78 return -1; 79 } 54 80 55 81 /* … … 64 90 OutFile.end(); 65 91 66 def.makeWatcomLinkFileAddtion(&OutFile );92 def.makeWatcomLinkFileAddtion(&OutFile, enmOS); 67 93 if (pszAppend) 68 94 { … … 103 129 { 104 130 kFile::StdOut.printf( 105 "kDef2Wat v0.0. 0 (untested)\n"131 "kDef2Wat v0.0.1\n" 106 132 "\n" 107 "syntax: kDef2Wat.exe < def-file> <wlink-file> [extra-file]\n"133 "syntax: kDef2Wat.exe <os> <def-file> <wlink-file> [extra-file]\n" 108 134 "\n" 109 135 "Where:\n" 136 " <os> Target os. os2, dos, win32, win16, nlm, qnx or elf.\n" 110 137 " <def-file> The .DEF file to convert.\n" 111 138 " <wlink-file> The WLINK directive and option file.\n" … … 113 140 " the wlink-file\n" 114 141 "\n" 115 "Copyright (c) 2000 knut st. osmundsen (knut.stange.osmundsen@mynd.no)\n"142 "Copyright (c) 2000-2002 knut st. osmundsen (bird@anduin.net)\n" 116 143 ); 117 144 }
Note:
See TracChangeset
for help on using the changeset viewer.