1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

dthelp: Resolve GCC 10 errors about multiple definitions of global variables

This commit is contained in:
Peter Howkins 2020-11-24 05:42:59 +00:00
parent 9ff00704b3
commit dc45d133c9
18 changed files with 223 additions and 51 deletions

View file

@ -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);

View file

@ -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;

View file

@ -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[] =

View file

@ -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;

View file

@ -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)

View file

@ -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 <form> 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);

View file

@ -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 <form> 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 */

View file

@ -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 \

View file

@ -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 */

View file

@ -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 */

View file

@ -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)

View file

@ -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 <form> 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;

View file

@ -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 <form> 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 <p> tag; this allows us to have
* a single ssi= for the "ex" <block> 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 */

View file

@ -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 \

View file

@ -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)

View file

@ -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;

View file

@ -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 {

View file

@ -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 \