diff --git a/cde/Makefile.imake b/cde/Makefile.imake index da461ba50..541bf0187 100644 --- a/cde/Makefile.imake +++ b/cde/Makefile.imake @@ -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/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/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/include/Dt/Dt.h b/cde/include/Dt/Dt.h index 34d2e914a..7888fe4a9 100644 --- a/cde/include/Dt/Dt.h +++ b/cde/include/Dt/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/include/Dt/dbtype.h b/cde/include/Dt/dbtype.h index 5c7eea81e..dfd25215f 100644 --- a/cde/include/Dt/dbtype.h +++ b/cde/include/Dt/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 */ 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/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; 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 1b6d04d94..873223bce 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.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/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 \ 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 ); 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 db7573951..afd145616 100644 --- a/cde/programs/dtimsstart/start.c +++ b/cde/programs/dtimsstart/start.c @@ -28,14 +28,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 */ @@ -600,8 +596,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 @@ -618,8 +613,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 b3a0b2dcb..87aa8a1fb 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; 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 */ 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; /*