From 67f62e5a8acd70d30f7067f1f44ac7b15c67011a Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Mon, 2 Nov 2020 05:30:08 +0000 Subject: [PATCH 01/10] all: remove deprecated sys_errlist[] and replace with ANSI C strerror() --- cde/config/imake/imake.c | 13 ------------- cde/lib/tt/bin/dbck/spec.C | 8 -------- cde/lib/tt/lib/tt_options.h | 12 ------------ cde/programs/dtcm/dtcm/dnd.c | 4 ---- cde/programs/dtcm/libDtCmP/util.c | 5 +---- .../dthelp/parser.ccdf/volumegen/Volumegen.c | 1 - cde/programs/dtimsstart/remote.c | 4 ---- cde/programs/dtimsstart/start.c | 12 +++--------- cde/programs/dtinfo/dtinfo/src/external-api/comm.c | 5 +---- .../dtksh/ksh93/src/lib/libast/string/fmterror.c | 9 +-------- .../dtksh/ksh93/src/lib/libast/string/strerror.c | 8 +------- cde/programs/dtlogin/dm.h | 7 +------ 12 files changed, 8 insertions(+), 80 deletions(-) diff --git a/cde/config/imake/imake.c b/cde/config/imake/imake.c index 574af7c74..83834aa75 100644 --- a/cde/config/imake/imake.c +++ b/cde/config/imake/imake.c @@ -242,19 +242,6 @@ extern int errno; #include #include "imakemdep.h" -/* - * This define of strerror is copied from (and should be identical to) - * Xos.h, which we don't want to include here for bootstrapping reasons. - */ -#if defined(X_NOT_STDC_ENV) || (defined(sun) && !defined(SVR4)) -# ifndef strerror -extern char *sys_errlist[]; -extern int sys_nerr; -# define strerror(n) \ - (((n) >= 0 && (n) < sys_nerr) ? sys_errlist[n] : "unknown error") -# endif -#endif - #define TRUE 1 #define FALSE 0 diff --git a/cde/lib/tt/bin/dbck/spec.C b/cde/lib/tt/bin/dbck/spec.C index 18bba3fbc..eaf2d6b72 100644 --- a/cde/lib/tt/bin/dbck/spec.C +++ b/cde/lib/tt/bin/dbck/spec.C @@ -44,14 +44,6 @@ #include "ttdbck.h" #include "tt_db_server_consts.h" -#if !defined(OPT_STRERROR) -// No strerror(), fake it -char * -strerror(int e) -{ - return ((e sys_nerr) - (void) fprintf(stderr, ":Unknown error %d", saveerr); - else - (void) fprintf(stderr, ":%s", sys_errlist[saveerr]); + (void) fprintf(stderr, ":%s", strerror(saveerr)); } #endif diff --git a/cde/programs/dthelp/parser.ccdf/volumegen/Volumegen.c b/cde/programs/dthelp/parser.ccdf/volumegen/Volumegen.c index d9a429430..08de4809d 100644 --- a/cde/programs/dthelp/parser.ccdf/volumegen/Volumegen.c +++ b/cde/programs/dthelp/parser.ccdf/volumegen/Volumegen.c @@ -56,7 +56,6 @@ typedef int Boolean; /* extern int errno; */ -/* extern char *sys_errlist[]; */ /* extern int sys_nerr; */ static void GenTopicList ( diff --git a/cde/programs/dtimsstart/remote.c b/cde/programs/dtimsstart/remote.c index 687736739..71d329777 100644 --- a/cde/programs/dtimsstart/remote.c +++ b/cde/programs/dtimsstart/remote.c @@ -37,10 +37,6 @@ #include /* for X_ChangeHosts */ #include /* for XA_STRING */ -#if !defined(__linux__) && !defined(CSRG_BASED) -extern char *sys_errlist[]; -#endif - static char *conf_msg_id = STR_CONFDATA; #define CONF_MSG_ID_LEN strlen(conf_msg_id) diff --git a/cde/programs/dtimsstart/start.c b/cde/programs/dtimsstart/start.c index 78fc2a382..1dafa1892 100644 --- a/cde/programs/dtimsstart/start.c +++ b/cde/programs/dtimsstart/start.c @@ -27,14 +27,10 @@ #include #include #include +#include #if (defined(__linux__) || defined(CSRG_BASED)) && !defined(_NFILE) #define _NFILE FOPEN_MAX -#endif - -#if !defined(__linux__) && !defined(CSRG_BASED) -extern char *sys_errlist[]; -extern int sys_nerr; #endif /* local functions */ @@ -599,8 +595,7 @@ static int invoke_ims(UserSelection *sel) pid = fork(); if (pid == (pid_t) -1) { - put_xims_log("fork failed [%s]", - (errno <= sys_nerr) ? sys_errlist[errno] : NULL, 0, 0); + put_xims_log("fork failed [%s]", strerror(errno), 0, 0); #ifdef DEBUG perror("fork"); #endif @@ -617,8 +612,7 @@ static int invoke_ims(UserSelection *sel) #endif execl(SH_PATH, "sh", "-c", renv->cmdbuf, NULL); - put_xims_log("%s: exec failed [%s]", SH_PATH, - (errno <= sys_nerr) ? sys_errlist[errno] : NULL, 0, 0); + put_xims_log("%s: exec failed [%s]", SH_PATH, strerror(errno) , 0, 0); /* perror(SH_PATH); */ sleep(1); _exit(1); diff --git a/cde/programs/dtinfo/dtinfo/src/external-api/comm.c b/cde/programs/dtinfo/dtinfo/src/external-api/comm.c index d61ccb7a9..6aa2fc91c 100644 --- a/cde/programs/dtinfo/dtinfo/src/external-api/comm.c +++ b/cde/programs/dtinfo/dtinfo/src/external-api/comm.c @@ -53,9 +53,6 @@ #include #endif -extern char *sys_errlist[]; - - static OliasEvent *current_event; static int reply_status; #define NO_REPLY 0 @@ -332,7 +329,7 @@ wait_for_reply (Widget toplevel) XtAppWarningMsg (XtWidgetToApplicationContext (toplevel), "communicationsError", "select", "Olias API", "Select failed: %s", - &sys_errlist[errno], &num_params); + strerror(errno), &num_params); continue; } continue; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmterror.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmterror.c index 313b67bc3..8dd87ab82 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/fmterror.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/fmterror.c @@ -92,14 +92,7 @@ #endif #include -extern __MANGLE__ int sys_nerr; -extern __MANGLE__ char* sys_errlist[]; - char* fmterror __PARAM__((int err), (err)) __OTORP__(int err;){ - static char msg[28]; - - if (err > 0 && err <= sys_nerr) return(sys_errlist[err]); - sfsprintf(msg, sizeof(msg), "Error %d", err); - return(msg); + return strerror(err); } diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/string/strerror.c b/cde/programs/dtksh/ksh93/src/lib/libast/string/strerror.c index 7686a54d4..a6aa7ce89 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/string/strerror.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/string/strerror.c @@ -108,18 +108,12 @@ NoN(strerror) #include -extern __MANGLE__ int sys_nerr; -extern __MANGLE__ char* sys_errlist[]; char* strerror __PARAM__((int err), (err)) __OTORP__(int err;) #line 25 { - static char msg[28]; - - if (err > 0 && err <= sys_nerr) return(sys_errlist[err]); - sfsprintf(msg, sizeof(msg), "Error %d", err); - return(msg); + return strerror(err); } #endif diff --git a/cde/programs/dtlogin/dm.h b/cde/programs/dtlogin/dm.h index 3e0f24997..e67edc3cb 100644 --- a/cde/programs/dtlogin/dm.h +++ b/cde/programs/dtlogin/dm.h @@ -68,8 +68,7 @@ # include /* for passwd structure */ # include # include /* for exit(), malloc(), abort() */ -# include /* for string functions, bcopy(), - sys_errlist */ +# include /* for string functions, bcopy() */ # include /* for NGROUPS */ # include /* for fd_set */ # include /* for Internet socket stuff */ @@ -475,10 +474,6 @@ struct verify_info { * ***************************************************************************/ -#if !defined(__linux__) && !defined(CSRG_BASED) -extern char *sys_errlist[]; /* system error msgs */ -extern int sys_nerr; /* system error msgs */ -#endif extern XrmDatabase XresourceDB; From 4fd18c3c1675d30fb5e7c82c1a5143bbad173703 Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Mon, 23 Nov 2020 18:28:01 +0000 Subject: [PATCH 02/10] dtstyle: Remove duplicate definition of NumOfPalettes that was a) wrong b) causing issues on recent compilers --- cde/programs/dtstyle/ColorFile.c | 2 -- cde/programs/dtstyle/ColorMain.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/cde/programs/dtstyle/ColorFile.c b/cde/programs/dtstyle/ColorFile.c index 28bc4287c..2a2e4b05a 100644 --- a/cde/programs/dtstyle/ColorFile.c +++ b/cde/programs/dtstyle/ColorFile.c @@ -125,8 +125,6 @@ static void InitializeBW( /*+++++++++++++++++++++++++++++++++++++++*/ /* Internal Variables */ /*+++++++++++++++++++++++++++++++++++++++*/ -int NumOfPalettes = 0; - static char *PALETTE_DIR = CDE_INSTALLATION_TOP "/palettes/"; static char *PALETTE_DIR_ADM = "/etc/dt/palettes/"; static char *DEFAULT_FILENAME = "palette.dt"; diff --git a/cde/programs/dtstyle/ColorMain.c b/cde/programs/dtstyle/ColorMain.c index 811c6c725..05b4b4c10 100644 --- a/cde/programs/dtstyle/ColorMain.c +++ b/cde/programs/dtstyle/ColorMain.c @@ -246,7 +246,7 @@ Widget paletteList; Widget deleteButton; char *defaultName; Bool WaitSelection; -int NumOfPalettes; +int NumOfPalettes = 0; /*+++++++++++++++++++++++++++++++++++++++*/ /* Internal Variables */ From b21968f26a1fa1573adfc29a338804beb51ba760 Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Mon, 23 Nov 2020 17:01:37 -0700 Subject: [PATCH 03/10] fix broken dev version number: 2.3.1a -> 2.3.2a --- cde/Makefile | 2 +- cde/copyright | 4 ++-- cde/doc/common/help/HELPEnt.sgm | 2 +- cde/lib/DtSvc/DtUtil1/Dt.h | 4 ++-- cde/lib/tt/bin/ttauth/ttauth.man | 2 +- cde/lib/tt/tooltalk.tmpl | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cde/Makefile b/cde/Makefile index da461ba50..541bf0187 100644 --- a/cde/Makefile +++ b/cde/Makefile @@ -1,5 +1,5 @@ # $TOG: Makefile /main/15 1999/10/12 09:33:30 mgreess $ - RELEASE = Release 2.3.1a + RELEASE = Release 2.3.2a PRODUCT = CDE SHELL = /bin/sh RM = rm -f diff --git a/cde/copyright b/cde/copyright index 401e14749..e639713ba 100644 --- a/cde/copyright +++ b/cde/copyright @@ -1,10 +1,10 @@ - Common Desktop Environment Version 2.3.1a (devel) + Common Desktop Environment Version 2.3.2a (devel) (c) Copyright 1993-2012 The Open Group -(c) Copyright 2012-2020 CDE Project contributors, see CONTRIBUTORS for details +(c) Copyright 2012-2021 CDE Project contributors, see CONTRIBUTORS for details Project Website: http://cdesktopenv.sourceforge.net/ diff --git a/cde/doc/common/help/HELPEnt.sgm b/cde/doc/common/help/HELPEnt.sgm index 7fd21043b..b5186d9fb 100644 --- a/cde/doc/common/help/HELPEnt.sgm +++ b/cde/doc/common/help/HELPEnt.sgm @@ -1,5 +1,5 @@ -Common Desktop Environment 2.3.1a, +Common Desktop Environment 2.3.2a, © Copyright 1993-2012 The Open Group © Copyright 2012-2020 CDE Project contributors, see CONTRIBUTORS for details diff --git a/cde/lib/DtSvc/DtUtil1/Dt.h b/cde/lib/DtSvc/DtUtil1/Dt.h index 34d2e914a..7888fe4a9 100644 --- a/cde/lib/DtSvc/DtUtil1/Dt.h +++ b/cde/lib/DtSvc/DtUtil1/Dt.h @@ -52,13 +52,13 @@ extern "C" { #define DtVERSION 2 #define DtREVISION 3 -#define DtUPDATE_LEVEL 1 +#define DtUPDATE_LEVEL 2 #define DtVERSION_NUMBER (DtVERSION * 10000 + \ DtREVISION * 100 + \ DtUPDATE_LEVEL) -#define DtVERSION_STRING "CDE Version 2.3.1a" +#define DtVERSION_STRING "CDE Version 2.3.2a" /* diff --git a/cde/lib/tt/bin/ttauth/ttauth.man b/cde/lib/tt/bin/ttauth/ttauth.man index 1e5d1c715..93d8cfdaf 100644 --- a/cde/lib/tt/bin/ttauth/ttauth.man +++ b/cde/lib/tt/bin/ttauth/ttauth.man @@ -18,7 +18,7 @@ .\" not be used in advertising or otherwise to promote the sale, use or .\" other dealings in this Software without prior written authorization .\" from The Open Group. -.TH TTAUTH 1 "Release 2.3.1a" "CDE" +.TH TTAUTH 1 "Release 2.3.2a" "CDE" .SH NAME ttauth \- ToolTalk authority file utility .SH SYNOPSIS diff --git a/cde/lib/tt/tooltalk.tmpl b/cde/lib/tt/tooltalk.tmpl index 51d586993..a06b920ab 100644 --- a/cde/lib/tt/tooltalk.tmpl +++ b/cde/lib/tt/tooltalk.tmpl @@ -6,7 +6,7 @@ /* TT_VERSION defines the version string which is imbedded in all the */ /* binaries and shipped libraries. */ -TT_VERSION = "CDE Version 2.3.1a" +TT_VERSION = "CDE Version 2.3.2a" TT_VERSION_DEFINE = -DTT_VERSION_STRING=\"$(TT_VERSION)\" From e1196cdfec7a87bda0de1cad7e1a413fbec1f522 Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Mon, 23 Nov 2020 22:27:16 +0000 Subject: [PATCH 04/10] dtcalc: Resolve gcc 10 errors about multiple definitions of global variables --- cde/programs/dtcalc/calctool.h | 6 ++++-- cde/programs/dtcalc/motif.c | 3 +++ cde/programs/dtcalc/motif.h | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cde/programs/dtcalc/calctool.h b/cde/programs/dtcalc/calctool.h index c525ea18a..25833ded5 100644 --- a/cde/programs/dtcalc/calctool.h +++ b/cde/programs/dtcalc/calctool.h @@ -552,7 +552,9 @@ struct calcVars { /* Calctool variables and options. */ #ifdef hpux int keybdID; #endif -} CalcVars ; +}; + +extern struct calcVars CalcVars; typedef struct calcVars *Vars ; @@ -568,7 +570,7 @@ typedef struct char *session; } ApplicationArgs, *ApplicationArgsPtr; -ApplicationArgs application_args; +extern ApplicationArgs application_args; /* MP definitions. */ diff --git a/cde/programs/dtcalc/motif.c b/cde/programs/dtcalc/motif.c index 411d381f5..78b3f7291 100644 --- a/cde/programs/dtcalc/motif.c +++ b/cde/programs/dtcalc/motif.c @@ -112,6 +112,9 @@ extern XmWidgetExtData _XmGetWidgetExtData( #include "ds_popup.h" #include "ds_xlib.h" + +ApplicationArgs application_args; +XVars X; Boolean colorSrv; static XtResource resources[] = diff --git a/cde/programs/dtcalc/motif.h b/cde/programs/dtcalc/motif.h index 8e571c8e7..4ded8c26d 100644 --- a/cde/programs/dtcalc/motif.h +++ b/cde/programs/dtcalc/motif.h @@ -87,7 +87,7 @@ typedef struct Xobject { /* Motif/Xlib graphics object. */ typedef struct Xobject *XVars ; -XVars X ; +extern XVars X ; #ifndef CDE_INSTALLATION_TOP #define CDE_INSTALLATION_TOP "/usr/dt" From 361b8f14561cca9c197ba13156a457850223c8ab Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Mon, 23 Nov 2020 23:40:45 +0000 Subject: [PATCH 05/10] dtappbbuilder: Resolve GCC 10 errors about multiple definitions of global variables --- cde/programs/dtappbuilder/src/ab/ab_bil.c | 2 +- cde/programs/dtappbuilder/src/ab/cgen_utils.c | 2 +- cde/programs/dtappbuilder/src/ab/proj.c | 2 +- cde/programs/dtappbuilder/src/ab/projP_utils.c | 2 +- cde/programs/dtappbuilder/src/ab/proj_utils.c | 2 +- cde/programs/dtappbuilder/src/libABil/bil_loadfile.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cde/programs/dtappbuilder/src/ab/ab_bil.c b/cde/programs/dtappbuilder/src/ab/ab_bil.c index 1df81051d..cc76f20b1 100644 --- a/cde/programs/dtappbuilder/src/ab/ab_bil.c +++ b/cde/programs/dtappbuilder/src/ab/ab_bil.c @@ -88,7 +88,7 @@ static int print_load_stats( ABProfiledInterval configTime ); -char Buf[MAXPATHLEN]; /* Work buffer */ +extern char Buf[MAXPATHLEN]; /* Work buffer */ /* * Loads in a new project, replacing the current project. diff --git a/cde/programs/dtappbuilder/src/ab/cgen_utils.c b/cde/programs/dtappbuilder/src/ab/cgen_utils.c index f7cd2fe56..7c77cbe65 100644 --- a/cde/programs/dtappbuilder/src/ab/cgen_utils.c +++ b/cde/programs/dtappbuilder/src/ab/cgen_utils.c @@ -108,7 +108,7 @@ typedef enum } CG_STATUS; -CGenOptions CodeGenOptions; +extern CGenOptions CodeGenOptions; StringList user_env_vars = NULL; StringList module_list = NULL; static CG_GOAL user_goal = CG_GOAL_UNDEF; diff --git a/cde/programs/dtappbuilder/src/ab/proj.c b/cde/programs/dtappbuilder/src/ab/proj.c index cb319f591..4bf6679f5 100644 --- a/cde/programs/dtappbuilder/src/ab/proj.c +++ b/cde/programs/dtappbuilder/src/ab/proj.c @@ -228,7 +228,7 @@ static XtTranslations proj_transtbl = NULL; static XRectangle *rband_rect = NULL; static Boolean mselect_adjust = False; -char Buf[MAXPATHLEN]; /* Work buffer */ +extern char Buf[MAXPATHLEN]; /* Work buffer */ /************************************************************************* ** diff --git a/cde/programs/dtappbuilder/src/ab/projP_utils.c b/cde/programs/dtappbuilder/src/ab/projP_utils.c index 77dce554b..30a9c868e 100644 --- a/cde/programs/dtappbuilder/src/ab/projP_utils.c +++ b/cde/programs/dtappbuilder/src/ab/projP_utils.c @@ -93,7 +93,7 @@ static void mult_module_selected( ** ** **************************************************************************/ -char Buf[MAXPATHLEN]; /* Work buffer */ +extern char Buf[MAXPATHLEN]; /* Work buffer */ /************************************************************************* ** ** diff --git a/cde/programs/dtappbuilder/src/ab/proj_utils.c b/cde/programs/dtappbuilder/src/ab/proj_utils.c index ad74deedc..d649f98ca 100644 --- a/cde/programs/dtappbuilder/src/ab/proj_utils.c +++ b/cde/programs/dtappbuilder/src/ab/proj_utils.c @@ -79,7 +79,7 @@ const char mod_path[] = "*proj_mod_path"; const char proj_path[] = "*proj_proj_path"; -char Buf[MAXPATHLEN]; /* Work buffer */ +extern char Buf[MAXPATHLEN]; /* Work buffer */ /* Whether we are to export a module as BIL (default) or UIL */ static BOOL ExportAsUIL = FALSE; diff --git a/cde/programs/dtappbuilder/src/libABil/bil_loadfile.c b/cde/programs/dtappbuilder/src/libABil/bil_loadfile.c index 12185d2e0..b8575db94 100644 --- a/cde/programs/dtappbuilder/src/libABil/bil_loadfile.c +++ b/cde/programs/dtappbuilder/src/libABil/bil_loadfile.c @@ -60,7 +60,7 @@ #include "bilP.h" BIL_LOAD_INFO bilP_load; -char Buf[MAXPATHLEN]; +static char Buf[MAXPATHLEN]; /* * Read a BIL file into memory. Returns a project node. From 30f2d925ef34c52818cb576fba4dcc7d6945f4ab Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Tue, 24 Nov 2020 02:15:51 +0000 Subject: [PATCH 06/10] dtcreate: Resolve GCC 10 errors about multiple definitions of global variables --- cde/programs/dtcreate/AddFiletype.c | 2 +- cde/programs/dtcreate/dtcreate.h | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cde/programs/dtcreate/AddFiletype.c b/cde/programs/dtcreate/AddFiletype.c index 50b5025e2..ef0501aa8 100644 --- a/cde/programs/dtcreate/AddFiletype.c +++ b/cde/programs/dtcreate/AddFiletype.c @@ -71,7 +71,7 @@ Widget Licon2; extern int do_which; enum icon_size_range filetype_icon_size = None_Selected; */ -enum icon_size_range filetype_icon_size; +enum icon_size_range filetype_icon_size = None_Selected; /******************************************************************************* diff --git a/cde/programs/dtcreate/dtcreate.h b/cde/programs/dtcreate/dtcreate.h index 45f10251c..b5316f5bb 100644 --- a/cde/programs/dtcreate/dtcreate.h +++ b/cde/programs/dtcreate/dtcreate.h @@ -287,7 +287,7 @@ STORAGECLASS Widget FC_EndByteTextField; */ STORAGECLASS Widget FC_NameOrPathText; STORAGECLASS Widget FC_AndLabel1; -STORAGECLASS Widget FC_PermissionForm; +extern Widget FC_PermissionForm; STORAGECLASS Widget FC_ReadToggle; STORAGECLASS Widget FC_WriteToggle; STORAGECLASS Widget FC_ExecuteToggle; @@ -324,7 +324,7 @@ STORAGECLASS SessionData sessiondata; #ifdef NOEXTERN STORAGECLASS enum icon_size_range action_icon_size = None_Selected; -STORAGECLASS enum icon_size_range filetype_icon_size = None_Selected; +STORAGECLASS extern enum icon_size_range filetype_icon_size; STORAGECLASS int pidIconEditor = 0; STORAGECLASS Boolean bShowPixmaps = TRUE; STORAGECLASS Widget IconSelector = (Widget)NULL; @@ -353,7 +353,6 @@ STORAGECLASS const char *af_tiny_icon_default = "/usr/dt/appconfig/icons/C/Dtda #else /* NOEXTERN */ -STORAGECLASS enum icon_size_range action_icon_size; STORAGECLASS enum icon_size_range filetype_icon_size; STORAGECLASS int pidIconEditor; STORAGECLASS Boolean bShowPixmaps; From ee0464187920927ff566af07864622eeef4dfbbc Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Tue, 24 Nov 2020 02:25:30 +0000 Subject: [PATCH 07/10] dticon: Resolve GCC 10 errors about multiple definitions of global variables --- cde/programs/dticon/graphics.c | 10 +++++----- cde/programs/dticon/process.c | 14 +++++++------- cde/programs/dticon/utils.c | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/cde/programs/dticon/graphics.c b/cde/programs/dticon/graphics.c index a253a4298..f17b01e45 100644 --- a/cde/programs/dticon/graphics.c +++ b/cde/programs/dticon/graphics.c @@ -60,11 +60,11 @@ extern GC scratch_gc; -Widget editMenu_cut_pb; -Widget editMenu_copy_pb; -Widget editMenu_rotate_pb; -Widget editMenu_flip_pb; -Widget editMenu_scale_pb; +extern Widget editMenu_cut_pb; +extern Widget editMenu_copy_pb; +extern Widget editMenu_rotate_pb; +extern Widget editMenu_flip_pb; +extern Widget editMenu_scale_pb; extern void Stop_HotBox(void); diff --git a/cde/programs/dticon/process.c b/cde/programs/dticon/process.c index d8cbb3a33..851c4a2b8 100644 --- a/cde/programs/dticon/process.c +++ b/cde/programs/dticon/process.c @@ -101,13 +101,13 @@ static void Do_DropCheckOp(DtDndTransferCallback); static void Do_DropOp(void); extern Widget optionsMenu_grid; -Widget editMenu_paste_pb; -Widget editMenu_cut_pb; -Widget editMenu_copy_pb; -Widget editMenu_rotate_pb; -Widget editMenu_flip_pb; -Widget editMenu_scale_pb; -Widget editMenu_undo_pb; +extern Widget editMenu_paste_pb; +extern Widget editMenu_cut_pb; +extern Widget editMenu_copy_pb; +extern Widget editMenu_rotate_pb; +extern Widget editMenu_flip_pb; +extern Widget editMenu_scale_pb; +extern Widget editMenu_undo_pb; extern Widget newWidthText, newHeightText; extern GC scratch_gc; diff --git a/cde/programs/dticon/utils.c b/cde/programs/dticon/utils.c index a4324ade3..87d6f07cf 100644 --- a/cde/programs/dticon/utils.c +++ b/cde/programs/dticon/utils.c @@ -138,7 +138,7 @@ extern Window tablet_win; static int jskXerrorDebug(); static int jskXerrorIODebug(); -Widget editMenu_undo_pb; +extern Widget editMenu_undo_pb; void GetSessionInfo( void ); void Set_Gfx_Labels( Boolean ); From 0444e500bccf2e08abff06489f312f402867371d Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Tue, 24 Nov 2020 02:48:10 +0000 Subject: [PATCH 08/10] libDtSearch: Resolve GCC 10 errors about multiple definitions of global variables --- cde/lib/DtSearch/raima/dbtype.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cde/lib/DtSearch/raima/dbtype.h b/cde/lib/DtSearch/raima/dbtype.h index 5c7eea81e..dfd25215f 100644 --- a/cde/lib/DtSearch/raima/dbtype.h +++ b/cde/lib/DtSearch/raima/dbtype.h @@ -405,7 +405,11 @@ typedef struct {struct CNTRY_TBL_S *ptr; LOCK_DESC} CNTRY_TBL_P; struct sk { INT sk_fld; CHAR_P sk_val; -} __SK__; +}; + +/* PJH 20201124 unused struct variable declaration in header causing issues +struct sk __SK__; +*/ typedef struct { struct sk *ptr; LOCK_DESC } SK_P; /* node key search path stack entry: one per level per key field */ From 9ff00704b35416ef556b574a017f24e18d6c9f21 Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Tue, 24 Nov 2020 03:16:50 +0000 Subject: [PATCH 09/10] dtudcfonted: Resolve GCC 10 errors about multiple definitions of global variables --- cde/programs/dtudcfonted/mtfgui.c | 6 +++--- cde/programs/dtudcfonted/ufont.c | 15 +++++++++++++++ cde/programs/dtudcfonted/xoakufont.h | 28 ++++++++++++++-------------- 3 files changed, 32 insertions(+), 17 deletions(-) diff --git a/cde/programs/dtudcfonted/mtfgui.c b/cde/programs/dtudcfonted/mtfgui.c index 14acb0d0a..992ac017a 100644 --- a/cde/programs/dtudcfonted/mtfgui.c +++ b/cde/programs/dtudcfonted/mtfgui.c @@ -66,9 +66,9 @@ extern FalCodeRegion CodeArea[16]; structure of widgets ********************************************************************/ extern Widget toplevel; - Widget editPopW, - wgeScro, - wgeBulB_edit; +extern Widget wgeScro; +extern Widget editPopW; +Widget wgeBulB_edit; static Widget wgeStaT_form[EDLIST_MAX], wgeStaT_disp[EDLIST_MAX], wgeStaT_list[EDLIST_MAX], diff --git a/cde/programs/dtudcfonted/ufont.c b/cde/programs/dtudcfonted/ufont.c index 864610d10..5201684e9 100644 --- a/cde/programs/dtudcfonted/ufont.c +++ b/cde/programs/dtudcfonted/ufont.c @@ -56,6 +56,21 @@ GetMessage(int set, int number, char *string) * Widgets * ***************************************************************/ Widget toplevel; +Widget editPtnW; +Widget cpyPtnW; +Widget mngPtnW; + +EditChar edg; +EditList edlist; +EditPane edpane; +XlibInf xl; +DelInf dn; +DelPtnInf dl[D_MAX] ; +DelPtnInf dl_glyph[EDLIST_MAX]; /* add dl_disp 1995.09.20 */ +int sq_disp[EDLIST_MAX]; /* add sq_disp 1995.09.20 */ +EditPtnInf em; +CopyPtnInf cpm; + static Widget dnPopW; Widget wgeScro, editPopW; diff --git a/cde/programs/dtudcfonted/xoakufont.h b/cde/programs/dtudcfonted/xoakufont.h index 6d1261522..bf7f65669 100644 --- a/cde/programs/dtudcfonted/xoakufont.h +++ b/cde/programs/dtudcfonted/xoakufont.h @@ -255,23 +255,23 @@ typedef struct _FontInf { **********************************************************************/ -Widget toplevel; +extern Widget toplevel; -Widget editPtnW; -Widget cpyPtnW; -Widget mngPtnW; +extern Widget editPtnW; +extern Widget cpyPtnW; +extern Widget mngPtnW; -EditChar edg; -EditList edlist; -EditPane edpane; -XlibInf xl; -DelInf dn; -DelPtnInf dl[D_MAX] ; -DelPtnInf dl_glyph[EDLIST_MAX]; /* add dl_disp 1995.09.20 */ -int sq_disp[EDLIST_MAX]; /* add sq_disp 1995.09.20 */ +extern EditChar edg; +extern EditList edlist; +extern EditPane edpane; +extern XlibInf xl; +extern DelInf dn; +extern DelPtnInf dl[D_MAX] ; +extern DelPtnInf dl_glyph[EDLIST_MAX]; /* add dl_disp 1995.09.20 */ +extern int sq_disp[EDLIST_MAX]; /* add sq_disp 1995.09.20 */ -EditPtnInf em; -CopyPtnInf cpm; +extern EditPtnInf em; +extern CopyPtnInf cpm; /* From dc45d133c9b8b24655b7f0bfdcc08e4d5993aa61 Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Tue, 24 Nov 2020 05:42:59 +0000 Subject: [PATCH 10/10] dthelp: Resolve GCC 10 errors about multiple definitions of global variables --- cde/programs/dthelp/dthelpdemo/Main.c | 7 +++ cde/programs/dthelp/dthelpdemo/Main.h | 6 +-- cde/programs/dthelp/dthelpview/Main.c | 21 ++++++++ cde/programs/dthelp/dthelpview/Main.h | 28 +++++------ .../dthelp/parser/canon1/helptag/Imakefile | 4 +- .../dthelp/parser/canon1/helptag/global.c | 47 ++++++++++++++++++ .../dthelp/parser/canon1/helptag/global.h | 17 +++---- .../dthelp/parser/canon1/parser/Imakefile | 1 + .../dthelp/parser/canon1/parser/parser.c | 2 + .../dthelp/parser/canon1/parser/parser.h | 2 +- .../dthelp/parser/pass1/helptag/Imakefile | 4 +- .../dthelp/parser/pass1/helptag/global.c | 43 +++++++++++++++++ .../dthelp/parser/pass1/helptag/global.h | 12 ++--- .../dthelp/parser/pass1/parser/Imakefile | 1 + .../dthelp/parser/pass2/htag2/Imakefile | 4 +- .../dthelp/parser/pass2/htag2/global.c | 48 +++++++++++++++++++ .../dthelp/parser/pass2/htag2/global.h | 26 +++++----- .../dthelp/parser/pass2/parser/Imakefile | 1 + 18 files changed, 223 insertions(+), 51 deletions(-) create mode 100644 cde/programs/dthelp/parser/canon1/helptag/global.c create mode 100644 cde/programs/dthelp/parser/pass1/helptag/global.c create mode 100644 cde/programs/dthelp/parser/pass2/htag2/global.c 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 \