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 #ifndef _H_watch
00027 #define _H_watch
00028
00029 #ifndef _H_expressn
00030 #include "expressn.h"
00031 #endif
00032
00033 #define WATCH_DATA 54
00034
00035 struct watchItem
00036 {
00037 char *name;
00038 unsigned *flag;
00039 int code,priority;
00040 unsigned (*accessFunc)(void *,int,unsigned,struct expr *);
00041 unsigned (*printFunc)(void *,char *,int,struct expr *);
00042 struct watchItem *next;
00043 };
00044
00045 struct watchData
00046 {
00047 struct watchItem *ListOfWatchItems;
00048 };
00049
00050 #define WatchData(theEnv) ((struct watchData *) GetEnvironmentData(theEnv,WATCH_DATA))
00051
00052 #ifdef LOCALE
00053 #undef LOCALE
00054 #endif
00055
00056 #ifdef _WATCH_SOURCE_
00057 #define LOCALE
00058 #else
00059 #define LOCALE extern
00060 #endif
00061
00062 #define GetWatchItem(a) EnvGetWatchItem(GetCurrentEnvironment(),a)
00063 #define SetWatchItem(a,b) EnvSetWatchItem(GetCurrentEnvironment(),a,b)
00064
00065 #if ALLOW_ENVIRONMENT_GLOBALS
00066 LOCALE intBool Watch(char *);
00067 LOCALE intBool Unwatch(char *);
00068 #endif
00069
00070 LOCALE intBool EnvWatch(void *,char *);
00071 LOCALE intBool EnvUnwatch(void *,char *);
00072 LOCALE void InitializeWatchData(void *);
00073 LOCALE int EnvSetWatchItem(void *,char *,unsigned,struct expr *);
00074 LOCALE int EnvGetWatchItem(void *,char *);
00075 LOCALE intBool AddWatchItem(void *,char *,int,unsigned *,int,
00076 unsigned (*)(void *,int,unsigned,struct expr *),
00077 unsigned (*)(void *,char *,int,struct expr *));
00078 LOCALE char *GetNthWatchName(void *,int);
00079 LOCALE int GetNthWatchValue(void *,int);
00080 LOCALE void WatchCommand(void *);
00081 LOCALE void UnwatchCommand(void *);
00082 LOCALE void ListWatchItemsCommand(void *);
00083 LOCALE void WatchFunctionDefinitions(void *);
00084 LOCALE int GetWatchItemCommand(void *);
00085
00086 #endif
00087
00088
00089