cmdtable.c
来自「开放源码的编译器open watcom 1.6.0版的源代码」· C语言 代码 · 共 539 行 · 第 1/2 页
C
539 行
/****************************************************************************
*
* Open Watcom Project
*
* Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved.
*
* ========================================================================
*
* This file contains Original Code and/or Modifications of Original
* Code as defined in and that are subject to the Sybase Open Watcom
* Public License version 1.0 (the 'License'). You may not use this file
* except in compliance with the License. BY USING THIS FILE YOU AGREE TO
* ALL TERMS AND CONDITIONS OF THE LICENSE. A copy of the License is
* provided with the Original Code and Modifications, and is also
* available at www.sybase.com/developer/opensource.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND SYBASE AND ALL CONTRIBUTORS HEREBY DISCLAIM
* ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR
* NON-INFRINGEMENT. Please see the License for the specific language
* governing rights and limitations under the License.
*
* ========================================================================
*
* Description: Command parsing tables.
*
****************************************************************************/
#include "linkstd.h"
#include "command.h"
#include "cmdall.h"
#include "cmdos2.h"
#include "cmdqnx.h"
#include "cmdnov.h"
#include "cmdelf.h"
#include "cmdphar.h"
#include "cmddos.h"
#include "cmdline.h"
extern parse_entry PosDbgMods[] = {
"LInes", &ProcLine, MK_ALL, 0,
"Types", &ProcType, MK_ALL, 0,
"LOcals", &ProcLocal, MK_ALL, 0,
// "STatic", &ProcDBIStatic, MK_ALL, 0,
"All", &ProcAll, MK_ALL, 0,
#ifdef _NOVELL
"ONLyexports",&ProcExportsDBI, MK_NOVELL, 0,
#endif
NULL
};
extern parse_entry DbgMods[] = {
"Watcom", &ProcWatcomDBI, MK_ALL, 0,
"Dwarf", &ProcDwarfDBI, MK_ALL, 0,
"Codeview", &ProcCodeviewDBI, MK_ALL, 0,
#ifdef _NOVELL
"Novell", &ProcNovDBI, MK_NOVELL, 0,
#endif
NULL
};
extern parse_entry SysBeginOptions[] = {
"Begin", &ProcSysBegin, MK_ALL, 0,
NULL
};
extern parse_entry SysDeleteOptions[] = {
"DELete", &ProcSysDelete, MK_ALL, 0,
NULL
};
extern parse_entry SysEndOptions[] = {
"End", &ProcSysEnd, MK_ALL, 0,
NULL
};
extern parse_entry SortOptions[] = {
"ALPhabetical", &ProcAlphabetical, MK_ALL, 0,
"GLobal", &ProcGlobal, MK_ALL, 0,
NULL
};
extern parse_entry Directives[] = {
"File", &ProcFiles, MK_ALL, CF_HAVE_FILES,
"MODFile", &ProcModFiles, MK_ALL, 0,
"Library", &ProcLibrary, MK_ALL, 0,
"Name", &ProcName, MK_ALL, 0,
"OPtion", &ProcOptions, MK_ALL, 0,
"Debug", &ProcDebug, MK_ALL, 0,
"SYStem", &ProcSystem, MK_ALL, 0,
"LIBPath", &ProcLibPath, MK_ALL, 0,
"LIBFile", &ProcLibFile, MK_ALL, CF_HAVE_FILES,
"Path", &ProcPath, MK_ALL, 0,
"FORMat", &ProcFormat, MK_ALL, 0,
"MODTrace", &ProcModTrace, MK_ALL, 0,
"SYMTrace", &ProcSymTrace, MK_ALL, CF_AFTER_INC,
"Alias", &ProcAlias, MK_ALL, CF_AFTER_INC,
"REFerence",&ProcReference, MK_ALL, CF_AFTER_INC,
"DISAble", &ProcDisable, MK_ALL, 0,
"SOrt", &ProcSort, MK_ALL, 0,
"LANGuage", &ProcLanguage, MK_ALL, 0,
"STARTLink",&ProcStartLink, MK_ALL, 0,
"OPTLIB", &ProcOptLib, MK_ALL, 0,
"ORDer", &ProcOrder, MK_ALL, 0,
"OUTput", &ProcOutput, MK_ALL, 0,
#ifdef _OS2
"RESource", &ProcResource, MK_PE, 0,
"COMmit", &ProcCommit, MK_PE, 0,
"ANONymousexport",&ProcAnonExport, MK_OS2, CF_AFTER_INC,
#endif
#if defined( _NOVELL ) || defined( _OS2 )
"IMPort", &ProcImport, (MK_NOVELL | MK_ELF | MK_OS2 | MK_PE), CF_AFTER_INC,
"EXPort", &ProcExport, (MK_NOVELL | MK_ELF | MK_OS2 | MK_PE | MK_WIN_VXD ), CF_AFTER_INC,
#endif
#if defined( _OS2 ) || defined( _QNXLOAD )
"SEGment", &ProcSegment, (MK_QNX | MK_OS2 | MK_PE | MK_WIN_VXD ), 0,
#endif
#ifdef _EXE
"OVerlay", &ProcOverlay, MK_OVERLAYS, 0,
"Begin", &ProcBegin, MK_OVERLAYS, 0,
"FIXedlib", &ProcFixedLib, MK_OVERLAYS, 0,
"NOVector", &ProcNoVector, MK_OVERLAYS, CF_AFTER_INC,
"VEctor", &ProcVector, MK_OVERLAYS, CF_AFTER_INC,
"FORCEVEctor",&ProcForceVector, MK_OVERLAYS, CF_AFTER_INC,
#endif
#if defined( _PHARLAP ) || defined( _OS2 ) || defined( _ELF )
"RUntime", &ProcRuntime, (MK_PHAR_LAP | MK_PE | MK_ELF), 0,
#endif
#ifdef _NOVELL
"MODUle", &ProcModule, MK_NOVELL | MK_ELF, 0,
#endif
#if defined( _OS2 ) || defined( _EXE ) || defined ( _QNXLOAD )
"NEWsegment", &ProcNewSegment, (MK_OS2_16BIT | MK_DOS | MK_QNX), 0,
#endif
#ifdef _INT_DEBUG
"Xdbg", &ProcXDbg, MK_ALL, 0,
"INTDBG", &ProcIntDbg, MK_ALL, 0,
#endif
NULL
};
extern parse_entry MainOptions[] = {
"Map", &ProcMap, MK_ALL, 0,
"STack", &ProcStack, MK_ALL, 0,
"NODefaultlibs",&ProcNoDefLibs, MK_ALL, CF_NO_DEF_LIBS,
"Quiet", &ProcQuiet, MK_ALL, 0,
"Dosseg", &ProcDosSeg, MK_ALL, 0,
"Caseexact", &ProcCase, MK_ALL, 0,
"Verbose", &ProcVerbose, MK_ALL, 0,
"Undefsok", &ProcUndefsOK, MK_ALL, 0,
"NOUndefsok", &ProcNoUndefsOK, MK_ALL, 0,
"NAMELen", &ProcNameLen, MK_ALL, 0,
"SYMFile", &ProcSymFile, MK_ALL, CF_SEPARATE_SYM,
"OSName", &ProcOSName, MK_ALL, 0,
"ELiminate", &ProcEliminate, MK_ALL, 0,
"FARcalls", &ProcFarCalls, MK_ALL, 0,
"MAXErrors", &ProcMaxErrors, MK_ALL, 0,
"NOCASEexact", &ProcNoCaseExact, MK_ALL, 0,
"NOCAChe", &ProcNoCache, MK_ALL, 0,
"NOEXTension", &ProcNoExtension, MK_ALL, 0,
"NOFARcalls", &ProcNoFarCalls, MK_ALL, 0,
"CAChe", &ProcCache, MK_ALL, 0,
"MANGlednames", &ProcMangledNames, MK_ALL, 0,
"OBJAlign", &ProcObjAlign, MK_ALL, 0,
"RESource", &ProcOpResource, MK_ALL, 0,
"STATics", &ProcStatics, MK_ALL, 0,
"START", &ProcStart, MK_ALL, 0,
"ARTificial", &ProcArtificial, MK_ALL, 0,
"SHOwdead", &ProcShowDead, MK_ALL, 0,
"VFRemoval", &ProcVFRemoval, MK_ALL, 0,
"REDefsok", &ProcRedefsOK, MK_ALL, 0,
"NOREDefsok", &ProcNoRedefs, MK_ALL, 0,
"CVPack", &ProcCVPack, MK_ALL, 0,
"INCremental", &ProcIncremental, MK_ALL, 0,
"SMall", &ProcSmall, MK_OVERLAYS, 0,
"DIStribute", &ProcDistribute, MK_OVERLAYS, 0,
"DYNamic", &ProcDynamic, MK_OVERLAYS, 0,
"STANdard", &ProcStandard, MK_OVERLAYS, 0,
"NOIndirect", &ProcNoIndirect, MK_OVERLAYS, 0,
"ARea", &ProcArea, MK_OVERLAYS, 0,
"PADSections", &ProcPadSections, MK_OVERLAYS, 0,
"PACKCode", &ProcPackcode, (MK_OS2_16BIT | MK_DOS | MK_QNX), 0,
"PACKData", &ProcPackdata, (MK_OS2_16BIT | MK_DOS | MK_QNX), 0,
"Alignment", &ProcAlignment, MK_OS2_16BIT | MK_OS2_LX | MK_PE | MK_ELF, 0,
"STUB", &ProcStub, MK_OS2 | MK_PE | MK_WIN_VXD | MK_PHAR_LAP, 0,
"ONEautodata", &ProcSingle, MK_OS2, CF_AUTO_SEG_FLAG,
"MANYautodata", &ProcMultiple, MK_OS2, CF_AUTO_SEG_FLAG,
"NOAutodata", &ProcNone, MK_OS2_16BIT, CF_AUTO_SEG_FLAG,
"OLDlibrary", &ProcOldLibrary, MK_OS2 | MK_PE, 0,
"MODName", &ProcModName, MK_OS2 | MK_PE | MK_WIN_VXD , 0,
"NEWFiles", &ProcNewFiles, MK_ONLY_OS2_16, 0,
"PROTmode", &ProcProtMode, MK_OS2_16BIT, 0,
"DEscription", &ProcDescription, MK_OS2 | MK_PE | MK_WIN_VXD , 0,
"NOSTDCall", &ProcNoStdCall, MK_PE, 0,
"RWReloccheck", &ProcRWRelocCheck, MK_WINDOWS, 0,
"SELFrelative", &ProcSelfRelative, MK_OS2_LX, 0,
"INTernalrelocs",&ProcInternalRelocs,MK_OS2_LX, 0,
"TOGglerelocsflag",&ProcToggleRelocsFlag,MK_OS2_LX, 0,
"Heapsize", &ProcHeapSize, (MK_OS2 | MK_QNX | MK_PE), 0,
// "PACKExp", &ProcPackExp, MK_PHAR_FLAT, 0,
"MINData", &ProcMinData, MK_PHAR_LAP, 0,
"MAXData", &ProcMaxData, MK_PHAR_LAP, 0,
"OFFset", &ProcOffset, MK_PHAR_FLAT|MK_OS2_FLAT|MK_PE|MK_QNX_FLAT|MK_ELF, 0,
"SCReenname", &ProcScreenName, MK_NOVELL, 0,
"CHeck", &ProcCheck, MK_NOVELL, 0,
"MULTILoad", &ProcMultiLoad, MK_NOVELL, 0,
"AUTOUNload", &ProcAutoUnload, MK_NOVELL, 0,
"REentrant", &ProcReentrant, MK_NOVELL, 0,
"SYnchronize", &ProcSynch, MK_NOVELL, 0,
"CUSTom", &ProcCustom, MK_NOVELL, 0,
"EXit", &ProcExit, MK_NOVELL, 0,
"THReadname", &ProcThreadName, MK_NOVELL, 0,
"PSeudopreemption", &ProcPseudoPreemption, MK_NOVELL, 0,
"COPYRight", &ProcCopyright, MK_NOVELL, 0,
"MESsages", &ProcMessages, MK_NOVELL, 0,
"HElp", &ProcHelp, MK_NOVELL, 0,
"XDCdata", &ProcXDCData, MK_NOVELL, 0,
"SHArelib", &ProcSharelib, MK_NOVELL, 0,
"OSDomain", &ProcOSDomain, MK_NOVELL, 0,
"NLMFlags", &ProcNLMFlags, MK_NOVELL, 0,
"VERSion", &ProcVersion, MK_NOVELL|MK_OS2_FLAT|MK_PE|MK_WINDOWS, 0,
"IMPLib", &ProcImplib, MK_NOVELL|MK_OS2|MK_PE, 0,
"IMPFile", &ProcImpFile, MK_NOVELL|MK_OS2|MK_PE, 0,
"NORelocs", &ProcNoRelocs, (MK_QNX | MK_PE | MK_ELF), 0,
"LOnglived", &ProcLongLived, MK_QNX, 0,
"PRIVilege", &ProcQNXPrivilege, MK_QNX, 0,
"LInearrelocs", &ProcLinearRelocs, MK_QNX, 0,
"EXTRASections",&ProcExtraSections, MK_ELF, 0,
"EXPORTAll", &ProcExportAll, MK_ELF, 0,
"LINKVersion", &ProcLinkVersion, MK_PE, 0,
"OSVersion", &ProcOsVersion, MK_PE, 0,
"CHECKSUM", &ProcChecksum, MK_PE, 0,
"HSHIFT", &ProcHshift, (MK_DOS | MK_ALLOW_16), 0,
"FILLchar", &ProcFillchar, MK_ALL, 0,
NULL
};
/* these directives are the only ones that are harmless to run after the files
* have been processed in pass 1 */
extern parse_entry SysDirectives[] = {
"Library", &ProcLibrary, MK_ALL, 0,
"Name", &ProcName, MK_ALL, 0,
"OPtion", &ProcOptions, MK_ALL, 0,
"LIBPath", &ProcLibPath, MK_ALL, 0,
"FORMat", &ProcFormat, MK_ALL, 0,
"DISAble", &ProcDisable, MK_ALL, 0,
"SOrt", &ProcSort, MK_ALL, 0,
"ORDer", &ProcOrder, MK_ALL, 0,
"OUTput", &ProcOutput, MK_ALL, 0,
#if defined( _PHARLAP ) || defined( _OS2 ) || defined( _ELF )
"RUntime", &ProcRuntime, (MK_PHAR_LAP | MK_PE | MK_ELF), 0,
#endif
#if defined( _OS2 ) || defined( _QNXLOAD )
"SEGment", &ProcSegment, (MK_QNX | MK_OS2 | MK_PE | MK_WIN_VXD ), 0,
#endif
NULL
};
extern parse_entry Models[] = {
"Dos", &ProcDos, MK_DOS, 0,
#ifdef _OS2
"OS2", &ProcOS2, MK_ONLY_OS2, 0,
"WINdows", &ProcWindows, MK_WINDOWS|MK_PE|MK_WIN_VXD, 0,
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?