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
thinking it is supposed to span them. The bullet id + * indexes will flip back and forth between 0 and 1 to pick an id. +*/ +int bulletId[2], looseBulletId[2], firstBulletId, firstLooseBulletId; +int bulletIdIndex INIT(1); +int looseBulletIdIndex INIT(1); + +/* Should we use these BASENAME_LIMIT on the size of file names? */ +LOGICAL usingshortnames INIT(FALSE); + + diff --git a/cde/programs/dthelp/parser/canon1/helptag/global.h b/cde/programs/dthelp/parser/canon1/helptag/global.h index 4b1335220..3e8ed60e6 100644 --- a/cde/programs/dthelp/parser/canon1/helptag/global.h +++ b/cde/programs/dthelp/parser/canon1/helptag/global.h @@ -227,20 +227,21 @@ struct _block { char *pclass; char *pssi; PBLOCK pprev; -} block, *pblock; -PBLOCK blockinfo INIT(NULL); +}; +/*block, *pblock;*/ +extern PBLOCK blockinfo; -LOGICAL inParText INIT(FALSE); -LOGICAL inSdlP INIT(FALSE); +extern LOGICAL inParText; +extern LOGICAL inSdlP; /* 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 thinking it is supposed to span them. The bullet id * indexes will flip back and forth between 0 and 1 to pick an id. */ -int bulletId[2], looseBulletId[2], firstBulletId, firstLooseBulletId; -int bulletIdIndex INIT(1); -int looseBulletIdIndex INIT(1); +extern int bulletId[2], looseBulletId[2], firstBulletId, firstLooseBulletId; +extern int bulletIdIndex; +extern int looseBulletIdIndex; /* indent for p, image, ex, vex, based on plain list */ #define LISTFIRSTINDENT 2 @@ -289,7 +290,7 @@ EXTERN char *helpext; EXTERN char helptmpbuf[2] INIT("0"); /* Should we use these BASENAME_LIMIT on the size of file names? */ -LOGICAL usingshortnames INIT(FALSE); +extern LOGICAL usingshortnames; /* Limit on how long the basename can be for a .ht file */ #define BASENAME_LIMIT 6 /* limit on how many additional character are allowed before the ext */ diff --git a/cde/programs/dthelp/parser/canon1/parser/Imakefile b/cde/programs/dthelp/parser/canon1/parser/Imakefile index 324c22d4c..bcc02b7d8 100644 --- a/cde/programs/dthelp/parser/canon1/parser/Imakefile +++ b/cde/programs/dthelp/parser/canon1/parser/Imakefile @@ -44,6 +44,7 @@ XLATEOBJECTS = $(HELPTAGSRC)/LocaleXlate.o $(HELPTAGSRC)/XlationSvc.o APPLOBJECTS = \ $(HELPTAGSRC)/custom.o \ $(HELPTAGSRC)/default.o \ + $(HELPTAGSRC)/global.o \ $(HELPTAGSRC)/help.o \ $(HELPTAGSRC)/make.o \ $(HELPTAGSRC)/option.o \ diff --git a/cde/programs/dthelp/parser/canon1/parser/parser.c b/cde/programs/dthelp/parser/canon1/parser/parser.c index 7d7ac070b..130716661 100644 --- a/cde/programs/dthelp/parser/canon1/parser/parser.c +++ b/cde/programs/dthelp/parser/canon1/parser/parser.c @@ -35,6 +35,8 @@ #include "if.h" #include "entext.h" +char *user_defined_entities M_PARINIT("USER-DEFINED-ENTITIES"); + static void scanloop(LOGICAL prolog); /* Main procedure */ diff --git a/cde/programs/dthelp/parser/canon1/parser/parser.h b/cde/programs/dthelp/parser/canon1/parser/parser.h index 663ec17bb..076ca9fd0 100644 --- a/cde/programs/dthelp/parser/canon1/parser/parser.h +++ b/cde/programs/dthelp/parser/canon1/parser/parser.h @@ -301,7 +301,7 @@ M_PAREXTERN int m_prevcon ; M_PAREXTERN int m_token ; M_PAREXTERN int m_scanval ; -char *user_defined_entities M_PARINIT("USER-DEFINED-ENTITIES"); +extern char *user_defined_entities; /* Declarations for tentative list of omitted tags when checking for tag MINimization */ diff --git a/cde/programs/dthelp/parser/pass1/helptag/Imakefile b/cde/programs/dthelp/parser/pass1/helptag/Imakefile index 9a2329d3f..b3fbda65b 100644 --- a/cde/programs/dthelp/parser/pass1/helptag/Imakefile +++ b/cde/programs/dthelp/parser/pass1/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/pass1/helptag/global.c b/cde/programs/dthelp/parser/pass1/helptag/global.c new file mode 100644 index 000000000..09c5c728f --- /dev/null +++ b/cde/programs/dthelp/parser/pass1/helptag/global.c @@ -0,0 +1,43 @@ +/* + * 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" + +/* 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 thinking it is supposed to span them. The bullet id + * indexes will flip back and forth between 0 and 1 to pick an id. +*/ +int bulletId[2], looseBulletId[2], firstBulletId, firstLooseBulletId; +int bulletIdIndex = 1; +int looseBulletIdIndex = 1; + +LOGICAL inParText = FALSE; +LOGICAL inSdlP = FALSE; + +/* Should we use these BASENAME_LIMIT on the size of file names? */ +LOGICAL usingshortnames = FALSE; diff --git a/cde/programs/dthelp/parser/pass1/helptag/global.h b/cde/programs/dthelp/parser/pass1/helptag/global.h index d3b8d2015..d1fb2dba9 100644 --- a/cde/programs/dthelp/parser/pass1/helptag/global.h +++ b/cde/programs/dthelp/parser/pass1/helptag/global.h @@ -170,17 +170,17 @@ EXTERN M_WCHAR *imageghyperlinkp; EXTERN M_WCHAR *imageglinktypep; EXTERN M_WCHAR *imagegdescription; -LOGICAL inParText INIT(FALSE); -LOGICAL inSdlP INIT(FALSE); +extern LOGICAL inParText; +extern LOGICAL inSdlP; /* 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 thinking it is supposed to span them. The bullet id * indexes will flip back and forth between 0 and 1 to pick an id. */ -int bulletId[2], looseBulletId[2], firstBulletId, firstLooseBulletId; -int bulletIdIndex INIT(1); -int looseBulletIdIndex INIT(1); +extern int bulletId[2], looseBulletId[2], firstBulletId, firstLooseBulletId; +extern int bulletIdIndex; +extern int looseBulletIdIndex; /* save the textsize to emit it on the

tag; this allows us to have * a single ssi= for the "ex" and modify the text size individually @@ -213,7 +213,7 @@ EXTERN char *helpbase INIT(NULL); EXTERN char *helpext; /* Should we use these BASENAME_LIMIT on the size of file names? */ -LOGICAL usingshortnames INIT(FALSE); +extern LOGICAL usingshortnames; /* Limit on how long the basename can be for a .ht file */ #define BASENAME_LIMIT 6 /* limit on how many additional character are allowed before the ext */ diff --git a/cde/programs/dthelp/parser/pass1/parser/Imakefile b/cde/programs/dthelp/parser/pass1/parser/Imakefile index db1cc93da..80d59d178 100644 --- a/cde/programs/dthelp/parser/pass1/parser/Imakefile +++ b/cde/programs/dthelp/parser/pass1/parser/Imakefile @@ -44,6 +44,7 @@ XLATEOBJECTS = $(HELPTAGSRC)/LocaleXlate.o $(HELPTAGSRC)/XlationSvc.o APPLOBJECTS = \ $(HELPTAGSRC)/custom.o \ $(HELPTAGSRC)/default.o \ + $(HELPTAGSRC)/global.o \ $(HELPTAGSRC)/help.o \ $(HELPTAGSRC)/make.o \ $(HELPTAGSRC)/option.o \ diff --git a/cde/programs/dthelp/parser/pass2/htag2/Imakefile b/cde/programs/dthelp/parser/pass2/htag2/Imakefile index 040d710a5..d421315d9 100644 --- a/cde/programs/dthelp/parser/pass2/htag2/Imakefile +++ b/cde/programs/dthelp/parser/pass2/htag2/Imakefile @@ -38,9 +38,9 @@ APPLHDRS = $(PARSEHDRS) $(ELTHDRS) \ ../parser/pval.h ../parser/globdec.h ../parser/signonx.h \ ../parser/userinc.h -SRCS = custom.c sdl.c option.c out.c $(XLATESRCS) +SRCS = custom.c global.c sdl.c option.c out.c $(XLATESRCS) -OBJS = custom.o sdl.o option.o out.o $(XLATEOBJS) +OBJS = custom.o global.o sdl.o option.o out.o $(XLATEOBJS) LOCAL_LIBRARIES = $(SDLUTILLIB) diff --git a/cde/programs/dthelp/parser/pass2/htag2/global.c b/cde/programs/dthelp/parser/pass2/htag2/global.c new file mode 100644 index 000000000..ea8b28031 --- /dev/null +++ b/cde/programs/dthelp/parser/pass2/htag2/global.c @@ -0,0 +1,48 @@ +/* + * 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" + + +/* + * Names for all the input, output and intermediate files we'll need. +*/ +char *inFileName; +char *outFileName; +char *errFileName; +char *idxFileName; +char *snbFileName; +char *sortedIdxFileName; +char *tossFileName; +char *vstructFileName; +char *tempFileName; +char *compFileName; +char *compZFileName; + +FILE *inFile; +FILE *outFile; + diff --git a/cde/programs/dthelp/parser/pass2/htag2/global.h b/cde/programs/dthelp/parser/pass2/htag2/global.h index e983ad9b3..b12441cd9 100644 --- a/cde/programs/dthelp/parser/pass2/htag2/global.h +++ b/cde/programs/dthelp/parser/pass2/htag2/global.h @@ -128,20 +128,20 @@ EXTERN char *progName INIT(NULL); /* * Names for all the input, output and intermediate files we'll need. */ -char *inFileName; -char *outFileName; -char *errFileName; -char *idxFileName; -char *snbFileName; -char *sortedIdxFileName; -char *tossFileName; -char *vstructFileName; -char *tempFileName; -char *compFileName; -char *compZFileName; +extern char *inFileName; +extern char *outFileName; +extern char *errFileName; +extern char *idxFileName; +extern char *snbFileName; +extern char *sortedIdxFileName; +extern char *tossFileName; +extern char *vstructFileName; +extern char *tempFileName; +extern char *compFileName; +extern char *compZFileName; -FILE *inFile; -FILE *outFile; +extern FILE *inFile; +extern FILE *outFile; typedef struct _loidsRec *LoidsPtr; typedef struct _loidsRec { diff --git a/cde/programs/dthelp/parser/pass2/parser/Imakefile b/cde/programs/dthelp/parser/pass2/parser/Imakefile index 701fe3652..46cc7c537 100644 --- a/cde/programs/dthelp/parser/pass2/parser/Imakefile +++ b/cde/programs/dthelp/parser/pass2/parser/Imakefile @@ -37,6 +37,7 @@ XLATEOBJECTS = $(HTAG2SRC)/LocaleXlate.o $(HTAG2SRC)/XlationSvc.o APPLOBJECTS = \ $(HTAG2SRC)/custom.o \ + $(HTAG2SRC)/global.o \ $(HTAG2SRC)/sdl.o \ $(HTAG2SRC)/option.o \ $(HTAG2SRC)/out.o \