00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef _H_commline
00029
00030 #define _H_commline
00031
00032 #define COMMANDLINE_DATA 40
00033
00034 struct commandLineData
00035 {
00036 int EvaluatingTopLevelCommand;
00037 int HaltCommandLoopBatch;
00038 #if ! RUN_TIME
00039 struct expr *CurrentCommand;
00040 char *CommandString;
00041 size_t MaximumCharacters;
00042 int ParsingTopLevelCommand;
00043 char *BannerString;
00044 int (*EventFunction)(void *);
00045 int (*AfterPromptFunction)(void *);
00046 int (*BeforeCommandExecutionFunction)(void *);
00047 #endif
00048 };
00049
00050 #define CommandLineData(theEnv) ((struct commandLineData *) GetEnvironmentData(theEnv,COMMANDLINE_DATA))
00051
00052 #ifdef LOCALE
00053 #undef LOCALE
00054 #endif
00055
00056 #ifdef _COMMLINE_SOURCE_
00057 #define LOCALE
00058 #else
00059 #define LOCALE extern
00060 #endif
00061
00062 LOCALE void InitializeCommandLineData(void *);
00063 LOCALE int ExpandCommandString(void *,int);
00064 LOCALE void FlushCommandString(void *);
00065 LOCALE void SetCommandString(void *,char *);
00066 LOCALE void AppendCommandString(void *,char *);
00067 LOCALE void InsertCommandString(void *,char *,unsigned);
00068 LOCALE char *GetCommandString(void *);
00069 LOCALE int CompleteCommand(char *);
00070 LOCALE void CommandLoop(void *);
00071 LOCALE void CommandLoopBatch(void *);
00072 LOCALE void CommandLoopBatchDriver(void *);
00073 LOCALE void PrintPrompt(void *);
00074 LOCALE void PrintBanner(void *);
00075 LOCALE void SetAfterPromptFunction(void *,int (*)(void *));
00076 LOCALE void SetBeforeCommandExecutionFunction(void *,int (*)(void *));
00077 LOCALE intBool RouteCommand(void *,char *,int);
00078 LOCALE int (*SetEventFunction(void *,int (*)(void *)))(void *);
00079 LOCALE intBool TopLevelCommand(void *);
00080 LOCALE void AppendNCommandString(void *,char *,unsigned);
00081 LOCALE void SetNCommandString(void *,char *,unsigned);
00082 LOCALE char *GetCommandCompletionString(void *,char *,size_t);
00083 LOCALE intBool ExecuteIfCommandComplete(void *);
00084 LOCALE void CommandLoopOnceThenBatch(void *);
00085 LOCALE intBool CommandCompleteAndNotEmpty(void *);
00086 LOCALE void SetHaltCommandLoopBatch(void *,int);
00087 LOCALE int GetHaltCommandLoopBatch(void *);
00088
00089 #endif
00090
00091
00092
00093
00094