3 * Copyright (c) 1992-2001 by Mike Gleason.
8 typedef struct ArgvInfo
{
13 } ArgvInfo
, *ArgvInfoPtr
;
15 /* How often to no-op the remote site if the user is idle, in seconds. */
16 #define kIdleInterval 20
18 /* If the user has been idle this many seconds, start their background
21 #define kIdleBatchLaunch 180
23 /* If a command (like a transfer) took longer than this many seconds, beep
24 * at the user to notify them that it completed.
26 #define kBeepAfterCmdTime 15
28 typedef struct Command
*CommandPtr
;
29 typedef void (*CmdProc
)(const int argc
, const char **const argv
, const CommandPtr cmdp
, const ArgvInfoPtr aip
);
31 /* These are used in the command table, to specify that a command
32 * doesn't require an exact number of parameters.
37 /* Structure of the command table. We keep some extra stuff in the
38 * table, so each command doesn't have to check the number of
39 * arguments and print it's own usage messages if it doesn't want to.
41 typedef struct Command
{
44 const char *usage
, *help
;
49 /* Parameter to GetCommandOrMacro(). */
50 #define kAbbreviatedMatchAllowed 0
51 #define kExactMatchRequired 1
53 /* These can be returned by the GetCommand() routine. */
54 #define kAmbiguousCommand ((CommandPtr) -1)
55 #define kNoCommand ((CommandPtr) 0)
57 /* Command flag bits. */
58 #define kCmdHidden 00001
59 #define kCmdMustBeConnected 00002
60 #define kCmdMustBeDisconnected 00004
61 #define kCompleteRemoteFile 00010
62 #define kCompleteRemoteDir 00020
63 #define kCompleteLocalFile 00040
64 #define kCompleteLocalDir 00100
65 #define kCompleteBookmark 00200
66 #define kCompletePrefOpt 00400
69 void InitCommandList(void);
70 CommandPtr
GetCommandByIndex(const int);
71 CommandPtr
GetCommandByName(const char *const, int);
72 void PrintCmdHelp(CommandPtr
);
73 void PrintCmdUsage(CommandPtr
);
74 int MakeArgv(char *, int *, const char **, int, char *, size_t, int *, int);
75 void XferCanceller(int);
78 void CommandShell(void);