/******************************************************************************\
**	#include	<_cfx_console.h>	// console and command line user interface
**	
**	Release:		2003/08/16
**	
**	THIS FILE IS AUTOMATICALLY INCLUDED BY: <cfxpico.h>
*****************************************************************************
**	
**	COPYRIGHT (C) 1995-2003 PERSISTOR INSTRUMENTS INC., ALL RIGHTS RESERVED
**	
**	Developed by: John H. Godley for Persistor Instruments Inc.
**	254-J Shore Road, Bourne, MA 02532  USA
**	jhgodley@persistor.com - http://www.persistor.com
**	
*****************************************************************************
**	
**	Copyright and License Information
**	
**	Persistor Instruments Inc. (hereafter, PII) grants you (hereafter,
**	Licensee) a non-exclusive, non-transferable license to use the software
**	source code contained in this single source file with hardware products
**	sold by PII. Licensee may distribute binary derivative works using this
**	software and running on PII hardware products to third parties without
**	fee or other restrictions.
**	
**	PII MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
**	SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
**	IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
**	OR NON-INFRINGEMENT. PII SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY
**	LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE OR
**	ITS DERIVATIVES.
**	
**	By using or copying this Software, Licensee agrees to abide by the
**	copyright law and all other applicable laws of the U.S. including, but
**	not limited to, export control laws, and the terms of this license. PII
**	shall have the right to terminate this license immediately by written
**	notice upon Licensee's breach of, or non-compliance with, any of its
**	terms. Licensee may be held legally responsible for any copyright
**	infringement or damages resulting from Licensee's failure to abide by
**	the terms of this license. 
**	
\******************************************************************************/

#ifndef	___cfx_console_h
#define	___cfx_console_h


//==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+
//	CIO			Console I/O
//==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+

#ifndef CUSTOM_BIOS_CONIO_MACROS	// Maps at BIOS startup to:
// These six depend on the underlying hardware
  #define cgetq()		CIOgetq()		// SCIRxQueuedCount()
  #define cgetc()		CIOgetc()		// SCIRxGetChar()
  #define ciflush()		CIOiflush()		// (SCIRxGetCharWaitIdle(1) != -1)
  #define cputc(c)		CIOputc(c)		// SCITxPutChar(c)
  #define cdrain()		CIOdrain()		// SCITxWaitCompletion()
  #define coflush()		CIOoflush()		// SCITxFlush()
  #define cgetclp(x)	CIOgetclp(x)	// SCIRxGetChar() + low power
 // The remainder are derived from the above functions
  #define cgets(s,n)	CIOgets(s,n)	// uses CIOgetc
  #define cputs(s)		CIOputs(s)		// uses CIOputc with CF-LF
  #define cprintf		CIOprintf		// uses CIOputc with CF-LF
  #define csprintf		CIOsprintf		// uses no I/O
  #define cvprintf		CIOvprintf		// uses CIOputc with CF-LF
  #define chexdump		CIOhexdump		// uses CIOputc/CIOgetq
  // Useful for debugging structures and simple arrays (char, int, long, float)
  #define cstructdump(st) chexdump((void*)&st,(ulong)&st,1,sizeof(st))
  #define carraydump(ar) chexdump((void*)ar,(ulong)&ar,sizeof(*ar),sizeof(ar))
#endif

#ifndef CUSTOM_COMMON_CONIO_MACROS
  #define kbhit()		cgetq()
  #define kbflush()		ciflush()
  #define getch()		cgetc()
  #define putch(c)		cputc(c)
  #define putflush()	cdrain()
  #define getstr(s,n)	cgets(s,n)
  #define putstr(s)		cputs(s)
  #define uprintf		cprintf
  #define hexdump		chexdump
#endif




//==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+
//	UTIL		PicoDOS Utility Functions and Macros
//==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+

// Pass command string from running application to PicoDOS command shell
enum {	execstrNoError = 0, execstrGeneralFailure = 1 };
short	execstr(char *cmdstr, ...)					PICO_CALL(execstr);

// Setup for future flogf operations
enum { EchoToConsole = 0x01, LogPicoCommands = 0x10, DontOpenClose = 0x20 };
void	Initflog(char *fname, uchar flags)			PICO_CALL(Initflog);

// printf to console and log file (after Initflogf())
short	flogf(char *format, ...)					PICO_CALL(flogf);

// scan date string into year, mon, and mday fields of struct tm
short	sscandate(const char *str, struct tm *ptm,
			DateFieldOrder dfo)						PICO_CALL(sscandate);

// scan time string into hour, min, and sec fields of struct tm
short	sscantime(const char *str, struct tm *ptm)	PICO_CALL(sscantime);


//==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+
//	QR			Query/Reply User Interface Functions
//==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+
#define QR_BUF_LEN	32

// Query/Reply for Y/N confirmation
bool	QRconfirm(char *prompt, bool defyes,
			bool crok)								PICO_CALL(QRconfirm);

// Query/Reply for character using: %c
bool	QRchar(char *prompt, char *fmt, bool crok,
			char *reply, char *instr, bool uc)		PICO_CALL(QRchar);

// Query/Reply for string using: %s
bool	QRstring(char *prompt, char *fmt, bool crok,
			char *strbuf, short len)				PICO_CALL(QRstring);

// Query/Reply for short using: %i %hi %d %hd %u %hu %o %ho
bool	QRshort(char *prompt, char *fmt, bool crok,
			short *value, short min, short max)		PICO_CALL(QRshort);

// Query/Reply for ushort using: %i %hi %d %hd %u %hu %o %ho
bool	QRushort(char *prompt, char *fmt, bool crok,
			ushort *value, ushort min, ushort max)	PICO_CALL(QRushort);

// Query/Reply for long using: %li %ld %lu %lo
bool	QRlong(char *prompt, char *fmt, bool crok,
			long *value, long min, long max)		PICO_CALL(QRlong);

// Query/Reply for ulong using: %li %ld %lu %lo
bool	QRulong(char *prompt, char *fmt, bool crok,
			ulong *value, ulong min, ulong max)		PICO_CALL(QRulong);

// Query/Reply for float using: %f %e %E %g %G
bool	QRfloat(char *prompt, char *fmt, bool crok,
			float *value, float min, float max)		PICO_CALL(QRfloat);

// Query/Reply for double using: %lf %le %lE %lg %lG
bool	QRdouble(char *prompt, char *fmt, bool crok,
			double *value, double min, double max)	PICO_CALL(QRdouble);

// Query/Reply for time
bool	QRtime(char *prompt,
			bool crok, struct tm *tp)				PICO_CALL(QRtime);

// Query/Reply for date (DateFieldOrder enum defined above)
bool	QRdate(char *prompt, DateFieldOrder dfo, 
			bool y4d, bool crok, struct tm *tp)		PICO_CALL(QRdate);

// Query/Reply for date and time (DateFieldOrder enum defined above)
bool	QRdatetime(char *prompt, DateFieldOrder dfo,
			bool y4d, bool crok, struct tm *tp)		PICO_CALL(QRdatetime);



//==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+
//	CMD			Table Driven Command Processor Functions
//==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+

typedef char 	*cmdf(struct CmdInfo *);	// standard CMD handler
typedef cmdf	*cmdfptr;					// pointer to same
typedef short	(*getsfptr)(char *, short);	// line input function

//
//	COMMAND TABLE
//
typedef struct CmdTable
	{
	char		*cmdchrs;				// command token to match
	cmdfptr		handler;				// its associated C function
 	char		minParmCount;			// minimum required parameters
	#define		twoCols  minParmCount	// alternate meaning for first entry
	char		privLevel;				// privilege level to invoke
	#define		defPriv  privLevel		// alternate meaning for first entry
	char		crRepOk;				// repeat on just CR
	#define		defCROk  crRepOk		// alternate meaning for first entry
	char		numBase;				// default for scan (0 is no scan)
	#define		defAbbrv  numBase		// alternate meaning for first entry
	char		*help;					// help text for menus
	}	CmdTable, *CmdTablePtr;

//
//	PARSED PARAMETERS
//
//Changed 22oct2012, rah
//Bit fields are int:1 in the original, but OS actually references them as 2-byte quantities
//Without this change, CmdParse() does not work, and no commands are ever executed
//
typedef struct
{
	char		*str;					// pointer to argument text
	long		value;					// value if numeric (isval true)
	short		isval		: 1;		// arg contains value
	short		isrange		: 1;		// args form range of values
}	CmdParam, *CmdParamPtr;

//
//	CURRENT COMMAND INFO
//
#define	CMDLINELEN			160		// max chars to input on line of text
#define	CMDMAXARGS			40		// max args to expect on command line
typedef struct CmdInfo
	{
	CmdTablePtr	ctp;					// working command table
	CmdTablePtr	altctp;					// secondary command table
	char		privLevel;				// working privilege level
	char		justCR;					// last was just carriage return
	char		abbrevOk;				// accept abbreviated commands (default)
	char		justCROk;				// accept CR repeat commands (default)
	char		optDelims;				// default as #defined
	char		lineDelim;				// default as #defined
	char		repChar;				// default as #defined
	char		rangeChar;				// default as #defined
	short		argc;					// number of arguments (incl. command
  #define		ARGS	(cip->argc-1)	// convenient argument accessor
	CmdParam	argv[CMDMAXARGS];		// arguments
	char		line[CMDLINELEN];		// working command line buffer
	char		*options;				// command modifiers (typ. CMD.mmm)
	char		*errmes;				// last error message
	long		repeat;					// number of times to execute
	getsfptr	altgets; 				// zero defaults to stdlib gets()
	char		text[CMDLINELEN];		// verbatim copy of input line
	char		quiet;					// no messages or prompts
	}	CmdInfo, *CmdInfoPtr;

#define	CMD_BREAK			((char *) -1)	// break request
#define	CMD_ARG_DELIMS		", \t"			// argument delimiter characters
#define	CMD_OPT_DELIM		'.'				// options delimiter character
#define	CMD_LINE_DELIM		';'				// multi-command line delimiter character
#define	CMD_REP_CHAR		'#'				// repeat command specifier
#define	CMD_RANGE_CHAR		'|'				// range argument specifier

//
//	DOS COMMAND LINE SWITCHES
//
typedef struct
	{
	const char	*swset;		// standard is "/"
	const char	idch;		// switch ID character ('V' for /V)
	char		pos;		// was specified, at argv position n
	const char	*scfmt;		// nonzero sscanf format to attempt scan
	const bool	skpspc;		// accept space between switch and argument
	bool		hasv;		// value was found and successfully sscanf'd
	union
		{
		long	lv;			// long or unsigned long value
		float	fv;			// float (32 bit) value
		char	*sp;		// >2.30, save string pointer for "%s" scfmt
		};
	} DosSwitch;

void	CmdStdSetup(CmdInfoPtr cip, CmdTablePtr ctp,
			short (*altgets)(char *, short))		PICO_CALL(CmdStdSetup);

char	*CmdStdRun(CmdInfoPtr cip)					PICO_CALL(CmdStdRun);

char	*CmdStdPicoRun(CmdInfoPtr cip)				PICO_CALL(CmdStdPicoRun);

char	*CmdStdInteractive(CmdInfoPtr cip)			PICO_CALL(CmdStdInteractive);

short	CmdStdLPGets(char *linebuf, short linelen)	PICO_CALL(CmdStdLPGets);

char	*CmdStdBreak(CmdInfoPtr cip)				PICO_CALL(CmdStdBreak);

char	*CmdStdHelp(CmdInfoPtr cip)					PICO_CALL(CmdStdHelp);

char	*CmdStdCmdTest(CmdInfoPtr cip)				PICO_CALL(CmdStdCmdTest);

char	*CmdStdErrText(short errID)					PICO_CALL(CmdStdErrText);

int		CmdCheckOptionChar(CmdInfoPtr cip, char c)	PICO_CALL(CmdCheckOptionChar);	

int		CmdExtractArgValues(CmdInfoPtr cip,
			short first, short last, short radix)	PICO_CALL(CmdExtractArgValues);	

int		CmdExpectValue(CmdInfoPtr cip, short index,
			long *value)							PICO_CALL(CmdExpectValue);

int		CmdExpectRange(CmdInfoPtr cip, short index,
			long *start, long *end)					PICO_CALL(CmdExpectRange);

void	CmdSetNextCmd(CmdInfoPtr cip,
			char *nextcmd)							PICO_CALL(CmdSetNextCmd);

char	*CmdParse(CmdInfoPtr cip)					PICO_CALL(CmdParse);

char	*CmdDispatch(CmdInfoPtr cip)				PICO_CALL(CmdDispatch);

char	*CmdStringUpper(char *s)					PICO_CALL(CmdStringUpper);

int		CmdIsNumber(char **s, long *value, 
			short base)								PICO_CALL(CmdIsNumber);	

int		CmdIsDigit(short c, short base, short *val)	PICO_CALL(CmdIsDigit);

short	CmdExtractCIDosSwitches(CmdInfoPtr cip,
			char *fmt, ...)							PICO_CALL(CmdExtractCIDosSwitches);

short	CmdExtractAVDosSwitches(short argc,
			char **argv, char *fmt, ...)			PICO_CALL(CmdExtractAVDosSwitches);

bool	CmdConfirm(char *prompt, char trueReply)	PICO_CALL(CmdConfirm);

ulong	CmdSetDateTime(char *prompt,
			ulong nowsecs)							PICO_CALL(CmdSetDateTime);

char	*CmdErrf(CmdInfoPtr cip, long err, 
			char *str, ...)							PICO_CALL(CmdErrf);

char	*CmdErrParse(char *errfstr, long *errnum)	PICO_CALL(CmdErrParse);

char	*CmdExecf(CmdInfoPtr cip, char *str, ...)	PICO_CALL(CmdExecf);


//==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+
//	CMD Linkage Macro to access PicoDOS commands from user programs
//==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+
/*
// Add the following line to the top of you source file that wants to access
// the PicoDOS commands:

#define	PD_CMD_BUILD_LINKS	// MUST APPEAR BEFORE #include <cfxpico.h>	

*/

#define	PDCLINK(pdc)	static char *PDC##pdc(CmdInfoPtr cip);\
						static char *PDC##pdc(CmdInfoPtr cip) { return pdc(cip); }

#ifdef	PD_CMD_BUILD_LINKS	// Add to your CMD table using the following names
	PDCLINK(CmdStdRun)			// PDCCmdStdRun
	PDCLINK(CmdStdInteractive)	// PDCCmdStdInteractive
	PDCLINK(CmdStdBreak)		// PDCCmdStdBreak
	PDCLINK(CmdStdHelp)			// PDCCmdStdHelp
	PDCLINK(CmdStdCmdTest)		// PDCCmdStdCmdTest
	PDCLINK(CmdStdPicoRun)		// PDCCmdStdPicoRun
#endif

//==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+
//	CMD Monitor Functions
//==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+

char	*MemModCmd(CmdInfoPtr cip)					PICO_CALL(MemModCmd);
char	*MemDispCmd(CmdInfoPtr cip)					PICO_CALL(MemDispCmd);
char	*MemReadCmd(CmdInfoPtr cip)					PICO_CALL(MemReadCmd);
char	*MemWriteCmd(CmdInfoPtr cip)				PICO_CALL(MemWriteCmd);
char	*MemListCmd(CmdInfoPtr cip)					PICO_CALL(MemListCmd);
char	*PortSetCmd(CmdInfoPtr cip)					PICO_CALL(PortSetCmd);
char	*PortClrCmd(CmdInfoPtr cip)					PICO_CALL(PortClrCmd);
char	*PortReadCmd(CmdInfoPtr cip)				PICO_CALL(PortReadCmd);
char	*PortToggleCmd(CmdInfoPtr cip)				PICO_CALL(PortToggleCmd);
char	*PortMirrorCmd(CmdInfoPtr cip)				PICO_CALL(PortMirrorCmd);

#ifdef	PD_CMD_BUILD_LINKS	// Add to your table using the following names
	PDCLINK(MemModCmd)			// PDCMemModCmd
	PDCLINK(MemDispCmd)			// PDCMemDispCmd
	PDCLINK(MemReadCmd)			// PDCMemReadCmd
	PDCLINK(MemWriteCmd)		// PDCMemWriteCmd
	PDCLINK(MemListCmd)			// PDCMemListCmd
	PDCLINK(PortSetCmd)			// PDCPortSetCmd
	PDCLINK(PortClrCmd)			// PDCPortClrCmd
	PDCLINK(PortReadCmd)		// PDCPortReadCmd
	PDCLINK(PortToggleCmd)		// PDCPortToggleCmd
	PDCLINK(PortMirrorCmd)		// PDCPortMirrorCmd
#endif


//==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+
//	CMD PicoDOS Command Shell Functions
//==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+==+
char	*AttribCmd(CmdInfoPtr cip)					PICO_CALL(AttribCmd);
char	*BackROMCmd(CmdInfoPtr cip)					PICO_CALL(BackROMCmd);
char	*BaudCmd(CmdInfoPtr cip)					PICO_CALL(BaudCmd);
char	*BootCmd(CmdInfoPtr cip)					PICO_CALL(BootCmd);
char	*BreakCmd(CmdInfoPtr cip)					PICO_CALL(BreakCmd);
char	*CallCmd(CmdInfoPtr cip)					PICO_CALL(CallCmd);
char	*CaptureCmd(CmdInfoPtr cip)					PICO_CALL(CaptureCmd);
char	*CardChangeCmd(CmdInfoPtr cip)				PICO_CALL(CardChangeCmd);
char	*CHDirCmd(CmdInfoPtr cip)					PICO_CALL(CHDirCmd);
char	*ChkdskCmd(CmdInfoPtr cip)					PICO_CALL(ChkdskCmd);
char	*CLSCmd(CmdInfoPtr cip)						PICO_CALL(CLSCmd);
char	*CRCCmd(CmdInfoPtr cip)						PICO_CALL(CRCCmd);
char	*CopyCmd(CmdInfoPtr cip)					PICO_CALL(CopyCmd);
char	*DateCmd(CmdInfoPtr cip)					PICO_CALL(DateCmd);
char	*DelCmd(CmdInfoPtr cip)						PICO_CALL(DelCmd);
char	*DeviceCmd(CmdInfoPtr cip)					PICO_CALL(DeviceCmd);
char	*DirCmd(CmdInfoPtr cip)						PICO_CALL(DirCmd);
char	*DumpCmd(CmdInfoPtr cip)					PICO_CALL(DumpCmd);
char	*EchoCmd(CmdInfoPtr cip)					PICO_CALL(EchoCmd);
char	*ExitCmd(CmdInfoPtr cip)					PICO_CALL(ExitCmd);
char	*FdiskCmd(CmdInfoPtr cip)					PICO_CALL(FdiskCmd);
char	*ForCmd(CmdInfoPtr cip)						PICO_CALL(ForCmd);
char	*FormatCmd(CmdInfoPtr cip)					PICO_CALL(FormatCmd);
char	*GoCmd(CmdInfoPtr cip)						PICO_CALL(GoCmd);
char	*GotoCmd(CmdInfoPtr cip)					PICO_CALL(GotoCmd);
char	*HelpCmd(CmdInfoPtr cip)					PICO_CALL(HelpCmd);
char	*IfCmd(CmdInfoPtr cip)						PICO_CALL(IfCmd);
char	*InstallCmd(CmdInfoPtr cip)					PICO_CALL(InstallCmd);
char	*LabelCmd(CmdInfoPtr cip)					PICO_CALL(LabelCmd);
char	*LoadMxCmd(CmdInfoPtr cip)					PICO_CALL(LoadMxCmd);
char	*LoadSRecCmd(CmdInfoPtr cip)				PICO_CALL(LoadSRecCmd);
char	*MemCmd(CmdInfoPtr cip)						PICO_CALL(MemCmd);
char	*MKDirCmd(CmdInfoPtr cip)					PICO_CALL(MKDirCmd);
char	*ModeCmd(CmdInfoPtr cip)					PICO_CALL(ModeCmd);
char	*MountCmd(CmdInfoPtr cip)					PICO_CALL(MountCmd);
char	*NothingCmd(CmdInfoPtr cip)					PICO_CALL(NothingCmd);
char	*PathCmd(CmdInfoPtr cip)					PICO_CALL(PathCmd);
char	*PauseCmd(CmdInfoPtr cip)					PICO_CALL(PauseCmd);
char	*PicoZoomCmd(CmdInfoPtr cip)				PICO_CALL(PicoZoomCmd);
char	*PromptCmd(CmdInfoPtr cip)					PICO_CALL(PromptCmd);
char	*RemCmd(CmdInfoPtr cip)						PICO_CALL(RemCmd);
char	*RenCmd(CmdInfoPtr cip)						PICO_CALL(RenCmd);
char	*ResetCmd(CmdInfoPtr cip)					PICO_CALL(ResetCmd);
char	*ResetToPBMCmd(CmdInfoPtr cip)				PICO_CALL(ResetToPBMCmd);
char	*RMDirCmd(CmdInfoPtr cip)					PICO_CALL(RMDirCmd);
char	*SaveCmd(CmdInfoPtr cip)					PICO_CALL(SaveCmd);
char	*SectorDumpCmd(CmdInfoPtr cip)				PICO_CALL(SectorDumpCmd);
char	*SetCmd(CmdInfoPtr cip)						PICO_CALL(SetCmd);
char	*ShiftCmd(CmdInfoPtr cip)					PICO_CALL(ShiftCmd);
char	*TimeCmd(CmdInfoPtr cip)					PICO_CALL(TimeCmd);
char	*TypeCmd(CmdInfoPtr cip)					PICO_CALL(TypeCmd);
char	*VerCmd(CmdInfoPtr cip)						PICO_CALL(VerCmd);
char	*VolCmd(CmdInfoPtr cip)						PICO_CALL(VolCmd);
char	*XRCmd(CmdInfoPtr cip)						PICO_CALL(XRCmd);
char	*XSCmd(CmdInfoPtr cip)						PICO_CALL(XSCmd);
char	*YRCmd(CmdInfoPtr cip)						PICO_CALL(YRCmd);
char	*YSCmd(CmdInfoPtr cip)						PICO_CALL(YSCmd);
char	*OptCmd(CmdInfoPtr cip)						PICO_CALL(OptCmd);

#ifdef	PD_CMD_BUILD_LINKS	// Add to your table using the following names
	PDCLINK(AttribCmd)			// PDCAttribCmd
	PDCLINK(BackROMCmd)			// PDCBackROMCmd
	PDCLINK(BaudCmd)			// PDCBaudCmd
	PDCLINK(BootCmd)			// PDCBootCmd
	PDCLINK(BreakCmd)			// PDCBreakCmd
	PDCLINK(CallCmd)			// PDCCallCmd
	PDCLINK(CaptureCmd)			// PDCCaptureCmd
	PDCLINK(CardChangeCmd)		// PDCCardChangeCmd
	PDCLINK(CHDirCmd)			// PDCCHDirCmd	
	PDCLINK(ChkdskCmd)			// PDCChkdskCmd
	PDCLINK(CLSCmd)				// PDCCLSCmd
	PDCLINK(CRCCmd)				// PDCCRCCmd
	PDCLINK(CopyCmd)			// PDCCopyCmd
	PDCLINK(DateCmd)			// PDCDateCmd
	PDCLINK(DelCmd)				// PDCDelCmd
	PDCLINK(DeviceCmd)			// PDCDeviceCmd
	PDCLINK(DirCmd)				// PDCDirCmd
	PDCLINK(DumpCmd)			// PDCDumpCmd
	PDCLINK(EchoCmd)			// PDCEchoCmd
	PDCLINK(ExitCmd)			// PDCExitCmd
	PDCLINK(FdiskCmd)			// PDCFdiskCmd
	PDCLINK(ForCmd)				// PDCForCmd
	PDCLINK(FormatCmd)			// PDCFormatCmd
	PDCLINK(GoCmd)				// PDCGoCmd
	PDCLINK(GotoCmd)			// PDCGotoCmd
	PDCLINK(HelpCmd)			// PDCHelpCmd
	PDCLINK(IfCmd)				// PDCIfCmd
	PDCLINK(InstallCmd)			// PDCInstallCmd
	PDCLINK(LabelCmd)			// PDCLabelCmd
	PDCLINK(LoadMxCmd)			// PDCLoadMxCmd
	PDCLINK(LoadSRecCmd)		// PDCLoadSRecCmd
	PDCLINK(MemCmd)				// PDCMemCmd
	PDCLINK(MKDirCmd)			// PDCMKDirCmd	
	PDCLINK(ModeCmd)			// PDCModeCmd
	PDCLINK(MountCmd)			// PDCMountCmd	
	PDCLINK(NothingCmd)			// PDCNothingCmd
	PDCLINK(PathCmd)			// PDCPathCmd
	PDCLINK(PauseCmd)			// PDCPauseCmd
	PDCLINK(PicoZoomCmd)		// PDCPicoZoomCmd	
	PDCLINK(PromptCmd)			// PDCPromptCmd	
	PDCLINK(RemCmd)				// PDCRemCmd
	PDCLINK(RenCmd)				// PDCRenCmd
	PDCLINK(ResetCmd)			// PDCResetCmd	
	PDCLINK(ResetToPBMCmd)		// ResetToPBMCmd	
	PDCLINK(RMDirCmd)			// PDCRMDirCmd	
	PDCLINK(SaveCmd)			// PDCSaveCmd	
	PDCLINK(SectorDumpCmd)		// PDCSectorDumpCmd	
	PDCLINK(SetCmd)				// PDCSetCmd
	PDCLINK(ShiftCmd)			// PDCShiftCmd
	PDCLINK(TimeCmd)			// PDCTimeCmd
	PDCLINK(TypeCmd)			// PDCTypeCmd
	PDCLINK(VerCmd)				// PDCVerCmd
	PDCLINK(VolCmd)				// PDCVolCmd
	PDCLINK(XRCmd)				// PDCXRCmd
	PDCLINK(XSCmd)				// PDCXSCmd
	PDCLINK(YRCmd)				// PDCYRCmd
	PDCLINK(YSCmd)				// PDCYSCmd
	PDCLINK(OptCmd)				// PDCOptCmd
#endif






#endif	//	___cfx_console_h
