* COMMANDR.H - include file for generic table-driven command processing facility * By M. Asherman, Copyright (c) 1999, SpaceTime Systems * 5/21/99: introduced to minimize hard-wired arbitrary constants. * 6/8/99: avoid inclusion of the "ADDITIVE" option in the macro variable, CMDR_CLIB, * for greater versatility. Also add new CMDR_TMPL for bound template meta-file. * 6/10/99: supply explicit default file extension for the meta-file DBF (CMDR_FILE). * 6/29/99: add macros for special cmdline delimiters used in Commander.DoFunc, * in order to support a convenient, efficient way of handling string assignments. * 7/18/99: adding macros for the cmdrclon() UDF. * 11/28/99: add macro CMDR_CLIBQ, for more convenient use with newobject(). * 11/29/99: add macro CMDR_ALCLO2 for cmdrclon.prg extension. * 10/29-11/3/00: introduce new error codes and msg macros (see task cmma0001). * following the new macro naming conventions using prefix "CMDM_" (see task cmma0004). * Delete obsolete CMDR_E... macros for error codes and messages. * 11/4-5/00: adjust for new naming conventions (see task cmma0004). * 11/11/00: add new macro CMDM_CLASSQUIET (see task cmma0007). * 11/12/00: add new macro CMDM_CLASSQUIETDIAG (see task erma0004) + another Init error code. * 1/7/01: eliminate obsolete CMDM_CLASSQUIETDIAG "CommanderQuietDiag". * 1/8-9/01: add new error case macros for use in method CMDRM_DoFunc. * Also revise all generic Commander error codes to use negative numbers, * and avoid overlap with other generic ErrHandler/Saver error codes. * 1/21/01: drop the hyphen from "meta-file", for consistency. * 1/31/01: introduce new macro CMDM_CLASSQUIETNI for non-interactive flavor (see xfma0072). * 5/15/01: add error code for new GOTO logic (see cmma0010). * Also delete obsolete CMDR_... macros, now that these have been phased out of btcrit. * * Reserve prefix "CMDM_" for Commander macros. #include MDACOMM.H && generic MDA macros (for timestamp field naming) * these macros are used in class Commander #define CMDM_ALIAS "COMMANDF" && default metafile alias #define CMDM_CLASS "Commander" && default class name for Commander #define CMDM_CLASSQUIET "CommanderQuiet" && quiet subclass for nested error handling usage #define CMDM_CLASSQUIETNI "CommanderQuietNonInt" && non-interactive subclass of CommanderQuiet #define CMDM_FILE CMDM_ALIAS + '.DBF' && default metafile DBF name, with extension #define CMDM_TMPL "cmdrtmpl" && bound template metafile DBF name * special cmdline delimiters used in Commander.CMDRM_DoFunc #define CMDM_DLAS1 "*=" && this prefix indicates a special string assignment action #define CMDM_DLAS2 "=*" && this delimiter separates name expr from string value * macros used in wrapper commandr.prg and xformdbf.init (also uses CMDM_CLASS) #define CMDM_CLIBQ "Commandr" && class library for the Commander facility (quoted) #define CMDM_MEMB CMDM_CLASS && default member name for addition into _screen #define CMDM_MVAR CMDM_CLASS && reserved PUBLIC mvar name for default object * macros used only in cmdrclon.prg (also uses CMDM_FILE) #define CMDM_ALCLO "CMDRCLONE" && reserved metafile alias for use in cloning #define CMDM_ALCLO2 "CMDRCLONE2" && reserved metafile alias for target of cloning * macros for error codes and messages - use unique negative values for generic subsystem errors #define CMDM_EC_INIT_INVMETA -201 && error code #define CMDM_EM_INIT_INVMETA "Invalid metafile name argument." #define CMDM_EC_INIT_ALINUSE -202 && error code #define CMDM_EM_INIT_ALINUSE 'Reserved alias ' + CMDM_ALIAS + " for function definitions metafile is in use." #define CMDM_EC_INIT_USETMPL -203 && error code #define CMDM_EM_INIT_USETMPL "Can't open template Commander metafile: " + CMDM_TMPL + ' under alias ' + CMDM_ALIAS #define CMDM_EC_INIT_COPYTMPL -204 && error code #define CMDM_EM_INIT_COPYTMPL "Can't copy template Commander metafile to: " #define CMDM_EC_OPEN_USEMETA -210 && error code #define CMDM_EM_OPEN_USEMETA "Can't open Commander metafile: " #define CMDM_EC_OPEN_GETFIDLEN -211 && error code #define CMDM_EM_OPEN_GETFIDLEN "Can't get length of required field, FUNCTIONID." #define CMDM_EC_DELFUNC_ARGTYPE -220 && error code #define CMDM_EM_DELFUNC_ARGTYPE "Functionid argument to DeleteFunc must be of Character type." #define CMDM_EC_DELFUNC_DELETE -221 && error code #define CMDM_EM_DELFUNC_DELETE "Can't DELETE records for functionid = " #define CMDM_EC_SEEKFUNC_ARGTYPE -230 && error code #define CMDM_EM_SEEKFUNC_ARGTYPE "Functionid argument to SeekFunc must be of Character type." #define CMDM_EC_SEEKFUNC_LOCATE -231 && error code #define CMDM_EM_SEEKFUNC_LOCATE "LOCATE in metafile failed for functionid = " #define CMDM_EC_ADDFUNCSTEP_REPLINS -240 && error code #define CMDM_EM_ADDFUNCSTEP_REPLINS "Can't add metafile record for functionid = " #define CMDM_EC_DOFUNC_NOREC -250 && error code #define CMDM_EM_DOFUNC_NOREC "There is no current metafile record." #define CMDM_EC_DOFUNC_DELREC -251 && error code #define CMDM_EM_DOFUNC_DELREC "The current metafile record is marked as logically deleted." #define CMDM_EC_DOFUNC_FUNCIDTYPE -252 && error code #define CMDM_EM_DOFUNC_FUNCIDTYPE "Functionid must be of Character type, but type is: " #define CMDM_EC_DOFUNC_NOFUNC -253 && error code #define CMDM_EM_DOFUNC_NOFUNC "Specified function id not found: " #define CMDM_EC_DOFUNC_GOTOSEEK -254 && error code #define CMDM_EM_DOFUNC_GOTOSEEK "Can't GOTO specified sequence number: " #define CMDM_EC_DOFUNC_LOOPTOP -255 && error code #define CMDM_EM_DOFUNC_LOOPTOP "Can't get the next metafile command line for functionid: " #define CMDM_EC_DOFUNC_NODLAS2 -256 && error code #define CMDM_EM_DOFUNC_NODLAS2 "Missing '" + CMDM_DLAS2 + "' delimiter in string assignment for functionid: " #define CMDM_EC_DOFUNC_ASSIGN -257 && error code #define CMDM_EM_DOFUNC_ASSIGN "Can't perform string assignment for functionid: " #define CMDM_EC_DOFUNC_MACROCMD -258 && error code #define CMDM_EM_DOFUNC_MACROCMD "Can't perform macro-expanded command for functionid: " #define CMDM_EC_DOFUNC_MACROCMDTARG -259 && error code #define CMDM_EM_DOFUNC_MACROCMDTARG "Failed to perform macro-expanded command for functionid: " #define CMDM_EC_DOFUNC_MACROCMDTARGABORT -260 && error code #define CMDM_EM_DOFUNC_MACROCMDTARGABORT "Aborted from error in macro-expanded command for functionid: " #define CMDM_EC_DOFUNC_LOOPBOT -261 && error code #define CMDM_EM_DOFUNC_LOOPBOT "Can't continue command processing loop for functionid: "