1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
/*******************************************************/
/* "C" Language Integrated Production System */
/* */
/* CLIPS Version 6.24 06/05/06 */
/* */
/* COMMAND LINE HEADER FILE */
/*******************************************************/
/*************************************************************/
/* Purpose: Provides a set of routines for processing */
/* commands entered at the top level prompt. */
/* */
/* Principal Programmer(s): */
/* Gary D. Riley */
/* */
/* Contributing Programmer(s): */
/* */
/* Revision History: */
/* */
/* 6.24: Renamed BOOLEAN macro type to intBool. */
/* */
/* Refactored several functions and added */
/* additional functions for use by an interface */
/* layered on top of CLIPS. */
/* */
/*************************************************************/
#ifndef _H_commline
#define _H_commline
#define COMMANDLINE_DATA 40
struct commandLineData
{
int EvaluatingTopLevelCommand;
int HaltCommandLoopBatch;
#if ! RUN_TIME
char *CommandString;
unsigned MaximumCharacters;
int ParsingTopLevelCommand;
char *BannerString;
int (*EventFunction)(void *);
int (*AfterPromptFunction)(void *);
#endif
};
#define CommandLineData(theEnv) ((struct commandLineData *) GetEnvironmentData(theEnv,COMMANDLINE_DATA))
#ifdef LOCALE
#undef LOCALE
#endif
#ifdef _COMMLINE_SOURCE_
#define LOCALE
#else
#define LOCALE extern
#endif
LOCALE void InitializeCommandLineData(void *);
LOCALE int ExpandCommandString(void *,int);
LOCALE void FlushCommandString(void *);
LOCALE void SetCommandString(void *,char *);
LOCALE void AppendCommandString(void *,char *);
LOCALE char *GetCommandString(void *);
LOCALE int CompleteCommand(char *);
LOCALE void CommandLoop(void *);
LOCALE void CommandLoopBatch(void *);
LOCALE void CommandLoopBatchDriver(void *);
LOCALE void PrintPrompt(void *);
LOCALE void PrintBanner(void *);
LOCALE void SetAfterPromptFunction(void *,int (*)(void *));
LOCALE intBool RouteCommand(void *,char *,int);
LOCALE int (*SetEventFunction(void *,int (*)(void *)))(void *);
LOCALE intBool TopLevelCommand(void *);
LOCALE void AppendNCommandString(void *,char *,unsigned);
LOCALE void SetNCommandString(void *,char *,unsigned);
LOCALE char *GetCommandCompletionString(void *,char *,unsigned);
LOCALE intBool ExecuteIfCommandComplete(void *);
LOCALE void CommandLoopOnceThenBatch(void *);
LOCALE intBool CommandCompleteAndNotEmpty(void *);
LOCALE void SetHaltCommandLoopBatch(void *,int);
LOCALE int GetHaltCommandLoopBatch(void *);
#endif
|