From 87c936ab65b4381fed35689b38c98f130883d903 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 17 Apr 2008 09:07:12 +0200 Subject: modularization work cleanup + created an abstract class for global data items and moved glblGetWorkDir to it --- runtime/glbl.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'runtime/glbl.h') diff --git a/runtime/glbl.h b/runtime/glbl.h index 037c9ec4..b2a26deb 100644 --- a/runtime/glbl.h +++ b/runtime/glbl.h @@ -35,7 +35,22 @@ #define glblGetIOBufSize() 4096 /* size of the IO buffer, e.g. for strm class */ extern uchar *glblModPath; /* module load path */ -extern uchar *pszWorkDir; -#define glblGetWorkDir() (pszWorkDir == NULL ? (uchar*) "" : pszWorkDir) + +/* the glbl object + * Note: this must be defined to satisfy the interface. We do not + * actually have instance data.*/ +typedef struct glbl_s { + BEGINobjInstance; /* Data to implement generic object - MUST be the first data element! */ +} glbl_t; + + +/* interfaces */ +BEGINinterface(glbl) /* name must also be changed in ENDinterface macro! */ + uchar* (*GetWorkDir)(void); +ENDinterface(glbl) +#define glblCURR_IF_VERSION 1 /* increment whenever you change the interface structure! */ + +/* the remaining prototypes */ +PROTOTYPEObj(glbl); #endif /* #ifndef GLBL_H_INCLUDED */ -- cgit