diff --git a/cde/programs/dthelp/dthelpdemo/Main.c b/cde/programs/dthelp/dthelpdemo/Main.c index 8baf84ac5..fc02997fd 100644 --- a/cde/programs/dthelp/dthelpdemo/Main.c +++ b/cde/programs/dthelp/dthelpdemo/Main.c @@ -68,6 +68,13 @@ #include "HelpCacheI.h" #include "HourGlassI.h" +/* Global Variables Used by our helpCache */ + +CacheListStruct *pCacheListHead; +CacheListStruct *pCacheListTale; +int totalCacheNodes; + + /* Internal Static Functions */ static Widget BuildMenus(Widget parent); static void CreateMainWindow(Widget parent); diff --git a/cde/programs/dthelp/dthelpdemo/Main.h b/cde/programs/dthelp/dthelpdemo/Main.h index 6bfd1f71c..37b23457a 100644 --- a/cde/programs/dthelp/dthelpdemo/Main.h +++ b/cde/programs/dthelp/dthelpdemo/Main.h @@ -64,9 +64,9 @@ /* Global Variables Used by our helpCache */ -CacheListStruct *pCacheListHead; -CacheListStruct *pCacheListTale; -int totalCacheNodes; +extern CacheListStruct *pCacheListHead; +extern CacheListStruct *pCacheListTale; +extern int totalCacheNodes; /* Globally referenced widget variables */ extern Widget topLevel; diff --git a/cde/programs/dthelp/dthelpview/Main.c b/cde/programs/dthelp/dthelpview/Main.c index 8180dc9b4..441e221c0 100644 --- a/cde/programs/dthelp/dthelpview/Main.c +++ b/cde/programs/dthelp/dthelpview/Main.c @@ -80,6 +80,27 @@ #include "UtilI.h" #include "ManPageI.h" +/* Global Variables Used to maintain our cache list of help dialogs */ +CacheListStruct *pCacheListHead; +CacheListStruct *pCacheListTale; +int totalCacheNodes; + +/* Global Variables */ +Widget topLevel; +Widget viewWidget; +Widget manWidget; +Widget manBtn; +Widget manText; +Widget manForm; +Widget closeBtn; + +/* General global variables */ +int runMode; +char *helpClass; +Display *appDisplay; +char *startCommand; + + /* Application resource list definition */ static XrmOptionDescRec option_list[] = diff --git a/cde/programs/dthelp/dthelpview/Main.h b/cde/programs/dthelp/dthelpview/Main.h index 4f7475064..4cfb4a8de 100644 --- a/cde/programs/dthelp/dthelpview/Main.h +++ b/cde/programs/dthelp/dthelpview/Main.h @@ -66,25 +66,25 @@ /* Global Variables Used to maintain our cache list of help dialogs */ -CacheListStruct *pCacheListHead; -CacheListStruct *pCacheListTale; -int totalCacheNodes; +extern CacheListStruct *pCacheListHead; +extern CacheListStruct *pCacheListTale; +extern int totalCacheNodes; /* Global Variables */ -Widget topLevel; -Widget viewWidget; -Widget manWidget; -Widget manBtn; -Widget manText; -Widget manForm; -Widget closeBtn; +extern Widget topLevel; +extern Widget viewWidget; +extern Widget manWidget; +extern Widget manBtn; +extern Widget manText; +extern Widget manForm; +extern Widget closeBtn; /* General global variables */ -int runMode; -char *helpClass; -Display *appDisplay; -char *startCommand; +extern int runMode; +extern char *helpClass; +extern Display *appDisplay; +extern char *startCommand; diff --git a/cde/programs/dthelp/parser/canon1/helptag/Imakefile b/cde/programs/dthelp/parser/canon1/helptag/Imakefile index a0ab8653b..5ea05a86a 100644 --- a/cde/programs/dthelp/parser/canon1/helptag/Imakefile +++ b/cde/programs/dthelp/parser/canon1/helptag/Imakefile @@ -44,10 +44,10 @@ APPLHDRS = $(PARSEHDRS) $(ELTHDRS) \ ../parser/pval.h ../parser/globdec.h ../parser/signonx.h \ ../parser/userinc.h -SRCS = custom.c default.c help.c make.c option.c out.c special.c xref.c \ +SRCS = custom.c default.c global.c help.c make.c option.c out.c special.c xref.c \ $(XLATESRCS) -OBJS = custom.o default.o help.o make.o option.o out.o special.o xref.o \ +OBJS = custom.o default.o global.o help.o make.o option.o out.o special.o xref.o \ $(XLATEOBJS) LOCAL_LIBRARIES = $(HELPUTILLIB) diff --git a/cde/programs/dthelp/parser/canon1/helptag/global.c b/cde/programs/dthelp/parser/canon1/helptag/global.c new file mode 100644 index 000000000..604a186bb --- /dev/null +++ b/cde/programs/dthelp/parser/canon1/helptag/global.c @@ -0,0 +1,47 @@ +/* + * CDE - Common Desktop Environment + * + * Copyright (c) 1993-2012, The Open Group. All rights reserved. + * + * These libraries and programs are free software; you can + * redistribute them and/or modify them under the terms of the GNU + * Lesser General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * These libraries and programs are distributed in the hope that + * they will be useful, but WITHOUT ANY WARRANTY; without even the + * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU Lesser General Public License for more + * details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with these libraries and programs; if not, write + * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth + * Floor, Boston, MA 02110-1301 USA + */ + +#include "basic.h" +#include "trie.h" +#include "common.h" + +#include "global.h" + +/* global variables */ +PBLOCK blockinfo INIT(NULL); +LOGICAL inParText INIT(FALSE); +LOGICAL inSdlP INIT(FALSE); + +/* Save these ids and reuse them on the current virpage. + * We need two of each (except for the first) so we can alternate to + * avoid