dtinfo subdirectory mmdb
authorUlrich Wilkens <mail@uwilkens.de>
Wed, 28 Aug 2013 18:32:11 +0000 (20:32 +0200)
committerJon Trulson <jon@radscan.com>
Fri, 30 Aug 2013 01:45:18 +0000 (19:45 -0600)
12 files changed:
cde/programs/dtinfo/Imakefile
cde/programs/dtinfo/clients/Imakefile
cde/programs/dtinfo/clients/dtinfo_start/dtinfo_start.c
cde/programs/dtinfo/mmdb/HardCopy/Imakefile
cde/programs/dtinfo/mmdb/Imakefile
cde/programs/dtinfo/mmdb/StyleSheet/Imakefile
cde/programs/dtinfo/mmdb/dstr/Imakefile
cde/programs/dtinfo/mmdb/dti_cc/main.C
cde/programs/dtinfo/mmdb/dti_excs/Imakefile
cde/programs/dtinfo/mmdb/hmphf/Imakefile
cde/programs/dtinfo/tools/Imakefile
cde/programs/dtinfo/tools/misc/dfiles.c

index 0607cd746dc1e7c38164aaee025cdab060c8e2cc..61f5beef057c69f9729df0f27c29bc5ba893cb6e 100644 (file)
@@ -25,11 +25,9 @@ INDEPENDENT_SUBDIRS = clients
 SUBDIRS = $(PRE_REQ_SUBDIRS) $(BROWSER_SUBDIRS) $(TOOLKIT_SUBDIRS) $(INDEPENDENT_SUBDIRS)
 
 XCOMM redefine TopLevelProject to build DtInfo with standard CDE config dir
-#undef  TopLevelProject
-#define TopLevelProject                DtInfo
-IMAKE_DEFINES = -DTopLevelProject=TopLevelProject \
-               -DProjectTmplFile='<DtInfo.tmpl>' \
-               -DProjectRulesFile='<DtInfo.rules>'
+IMAKE_DEF_DTINFO =  -DTopLevelProject=TopLevelProject \
+                   -DProjectTmplFile='<DtInfo.tmpl>' \
+                   -DProjectRulesFile='<DtInfo.rules>'
 
 XCOMM Variables to switch on debug mode temporarily
 XCOMM CDEBUGFLAGS = -g -DDEBUG
index 858ed710fc897e89c0427a24620b09022f474f79..76fe3ae9bdc511b47729330e452e6ae837b656c6 100644 (file)
@@ -8,9 +8,9 @@ SUBDIRS = dtinfo_start
 XCOMM redefine TopLevelProject to build DtInfo with standard CDE config dir
 #undef  TopLevelProject
 #define TopLevelProject                DtInfo
-IMAKE_DEFINES = -DTopLevelProject=TopLevelProject \
-               -DProjectTmplFile='<DtInfo.tmpl>' \
-               -DProjectRulesFile='<DtInfo.rules>'
+IMAKE_DEF_DTINFO =  -DTopLevelProject=TopLevelProject \
+                   -DProjectTmplFile='<DtInfo.tmpl>' \
+                   -DProjectRulesFile='<DtInfo.rules>'
 
 MakeSubdirs($(SUBDIRS))
 DependSubdirs($(SUBDIRS))
index 6d96f18af6120f6407bdae5afd48e1d56338e426..dfd7019823c3866c2071ac52a1e3ebbb9a8c8feb 100644 (file)
@@ -45,6 +45,7 @@
 #include <Dt/Action.h>
 #include <Dt/DtGetMessageP.h>
 #include <Dt/MsgLog.h>
+#include <Dt/Dt.h>
 
 #include <Tt/tt_c.h>
 
@@ -162,8 +163,8 @@ main (
        /*  
         * Initialize the desktop
         */
-       if (DtAppInitialize (app_context, display, top_level, argv[0], name) 
-                       == False) {
+       if (DtAppInitialize (app_context, display, top_level,
+                            argv[0], (char *)name) == False) {
                DtMsgLogMessage (argv[0], DtMsgLogError, 
                        (char *) GETMESSAGE (SET_NUM, 8, "DtAppInitialize() failed.  Perhaps the desktop environment\nis not properly installed."));
                exit (1);
@@ -190,6 +191,8 @@ main (
        DtDbLoad();
 
        XtAppMainLoop (app_context);
+
+       return (0);
 }
 
 
@@ -500,7 +503,7 @@ ReceiveMessage (
                 * Put locale into the environment so that DtActionInvoke
                 * will propagate it to the dtinfo process.
                 */
-               (void) sprintf (lang, "LANG=%s", locale);
+               (void) snprintf (lang, sizeof(lang), "LANG=%s", locale);
                (void) putenv (lang);
        }
 
@@ -576,15 +579,16 @@ DieFromToolTalkError(Widget parent, char *errfmt, Tt_status status)
 {
     Arg                 args[10];
     Widget      dialog, dialogShell;
-    char       *errmsg, *statmsg, *title;
+    char       *errmsg, *statmsg;
     XmString    xms_errmsg, xms_ok, xms_title;
-    int                 n;
+    int                 n, errmsglen;
 
     if (! tt_is_err(status)) return;
 
     statmsg = tt_status_message(status);
-    errmsg = XtMalloc(strlen(errfmt) + strlen(statmsg) + 2);
-    sprintf(errmsg, errfmt, statmsg);
+    errmsglen = strlen(errfmt) + strlen(statmsg) + 2;
+    errmsg = XtMalloc(errmsglen);
+    snprintf(errmsg, errmsglen, errfmt, statmsg);
 
     xms_ok = GETXMSTRING(2, 3, "OK");
     xms_errmsg = XmStringCreateLocalized(errmsg);
index 70d03f1f3aa6deb7a58e2e889b4d68f8b609cfb7..689526f91819193a9dba77e892bc3602e0a0b38b 100644 (file)
@@ -45,7 +45,7 @@ CXXEXTRA_DEFINES = -ptr../templates
 CXXEXTRA_DEFINES = -Xo
 #endif
 
-#if defined(HPArchitecture) || defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || !defined(CplusplusCompilerMajorVersion) || (CplusplusCompilerMajorVersion != 4)
+#if defined(HPArchitecture) || defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || defined(OpenBSDArchitecture) || !defined(CplusplusCompilerMajorVersion) || (CplusplusCompilerMajorVersion != 4)
 LinkSourceFile(TemplatesAutoNumber.C,$(DTMMDBSRC)/HardCopy)
 
 EXTRA_SRCS = TemplatesAutoNumber.C
@@ -71,7 +71,7 @@ LinkSourceFile(all_tmpls,$(DTMMDBSRC)/HardCopy)
 SpecialCPlusPlusObjectRule(TemplatesAutoNumber.o,,+Tall_tmpls -DEXPAND_TEMPLATES)
 #elif defined(AlphaArchitecture)       
 SpecialCPlusPlusObjectRule(TemplatesAutoNumber.o,,-ptf -DEXPAND_TEMPLATES)
-#elif defined(LinuxArchitecture) || defined(FreeBSDArchitecture)
+#elif defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || defined(OpenBSDArchitecture)
 SpecialCPlusPlusObjectRule(TemplatesAutoNumber.o,,-DEXPAND_TEMPLATES)
 SpecialCPlusPlusExpandRule(TemplatesAutoNumber..c,TemplatesAutoNumber.C,-DEXPAND_TEMPLATES)
 #else
index d8c61af46a6636be1bef647eef9b0cbc60bedd61..cb51595f4fbda2411e2d181d33578d8fd6a2c249 100644 (file)
@@ -46,9 +46,9 @@ EXTRALIBRARYDEPS = $(DONES)
 XCOMM redefine TopLevelProject to build DtInfo with standard CDE config dir
 #undef  TopLevelProject
 #define TopLevelProject                DtInfo
-IMAKE_DEFINES = -DTopLevelProject=TopLevelProject \
-               -DProjectTmplFile='<DtInfo.tmpl>' \
-               -DProjectRulesFile='<DtInfo.rules>'
+IMAKE_DEF_DTINFO =  -DTopLevelProject=TopLevelProject \
+                   -DProjectTmplFile='<DtInfo.tmpl>' \
+                   -DProjectRulesFile='<DtInfo.rules>'
 
 MakeSubdirs($(SUBDIRS))
 ForceSubdirs($(SUBDIRS))
index c75f907995b2eb1b90055eec159e1917ebca09f5..9093310ebb9a79de44df683ba55f0367986fb652 100644 (file)
@@ -93,7 +93,7 @@ NORMAL_SRCS = \
        VariableTable.C defParser.C             defToken.C \
        style.C         tokenStyle.C
 
-#if defined(HPArchitecture) || defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || !defined(CplusplusCompilerMajorVersion) || (CplusplusCompilerMajorVersion != 4)
+#if defined(HPArchitecture) || defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || defined(OpenBSDArchitecture) || !defined(CplusplusCompilerMajorVersion) || (CplusplusCompilerMajorVersion != 4)
 LinkSourceFile(SSTemplates.C,$(DTMMDBSRC)/StyleSheet)
 
 TEMPLATE_SRCS = SSTemplates.C
@@ -111,7 +111,7 @@ LinkSourceFile(all_tmpls,$(DTMMDBSRC)/StyleSheet)
 SpecialCPlusPlusObjectRule(SSTemplates.o,,+Tall_tmpls -DEXPAND_TEMPLATES)
 #elif defined(AlphaArchitecture)
 SpecialCPlusPlusObjectRule(SSTemplates.o,,-ptf -DEXPAND_TEMPLATES)
-#elif defined(LinuxArchitecture) || defined(FreeBSDArchitecture)
+#elif defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || defined(OpenBSDArchitecture)
 SpecialCPlusPlusObjectRule(SSTemplates.o,,-DEXPAND_TEMPLATES)
 SpecialCPlusPlusExpandRule(SSTemplates..c,SSTemplates.C,-DEXPAND_TEMPLATES)
 #else
index 4e4534520826fe53089a99921848191ba958564a..2335ba99ca0aeafdec20ff0ff7569b8c403a002c 100644 (file)
@@ -23,7 +23,7 @@ XCOMM         .../programs/dtinfo/mmdb/<subdir>/Imakefile
 #define CplusplusSource        YES
 DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
 
-#if defined(LinuxArchitecture) || defined(FreeBSDArchitecture)
+#if defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || defined(OpenBSDArchitecture)
 EXCEPTION_DEFINES  = -DNATIVE_EXCEPTIONS
 #endif
 
index 013de2f19484d5944dc559fe9109759ecd40c344..9928af393c080bb3df40434b0a500d1958a4cd13 100644 (file)
@@ -218,7 +218,7 @@ main()
 
 
     char str[128];
-    sprintf(str, "\t\nthis is \t    another string\t\n");
+    snprintf(str, sizeof(str), "\t\nthis is \t    another string\t\n");
     CC_String cc_str2( (const char *)str);
     
     CC_Tokenizer next2( cc_str2 );
index bb5ce19b4ff0144ef93970b1db435d162db60828..f2348d05240af399f55379f67e93b51e89867f27 100644 (file)
@@ -25,7 +25,7 @@ DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
 
 #if defined(SunArchitecture) && CplusplusCompilerMajorVersion > 3
 EXCEPTION_DEFINES  = -DHAS_TERMINATE
-#elif defined(LinuxArchitecture) || defined(FreeBSDArchitecture)
+#elif defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || defined(OpenBSDArchitecture)
 EXCEPTION_DEFINES  = -DNATIVE_EXCEPTIONS
 #endif
 
index 919ca2496dc1faf797de061156b6627d6997f494..b3bc5fa34393fc5b0395ec30f08b06150ba0c7fc 100644 (file)
@@ -23,7 +23,7 @@ XCOMM         .../programs/dtinfo/mmdb/<subdir>/Imakefile
 #define CplusplusSource        YES
 DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
 
-#if defined(LinuxArchitecture) || defined(FreeBSDArchitecture)
+#if defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || defined(OpenBSDArchitecture)
 EXCEPTION_DEFINES  = -DNATIVE_EXCEPTIONS
 #endif
 
index 65c64ca0a0dfe8cb5cf9ae3b66e4f4826198c702..b7ea3520eb7f2001da6225f83879224cae144cfa 100644 (file)
@@ -9,9 +9,9 @@ SUBDIRS=misc
 XCOMM redefine TopLevelProject to build DtInfo with standard CDE config dir
 #undef  TopLevelProject
 #define TopLevelProject                DtInfo
-IMAKE_DEFINES = -DTopLevelProject=TopLevelProject \
-               -DProjectTmplFile='<DtInfo.tmpl>' \
-               -DProjectRulesFile='<DtInfo.rules>'
+IMAKE_DEF_DTINFO =  -DTopLevelProject=TopLevelProject \
+                   -DProjectTmplFile='<DtInfo.tmpl>' \
+                   -DProjectRulesFile='<DtInfo.rules>'
 
 MakeSubdirs($(SUBDIRS))
 DependSubdirs($(SUBDIRS))
index 7d77f2c14d85a2c9a79c2ca775dbb595962a4ff5..0c6cf071ba4a8079f8a72c4b12812e43b6c4fb0b 100644 (file)
@@ -40,7 +40,7 @@ char **argv;
     {
     case 'h':
       {
-       sprintf(buffer, "%s.h", libname);
+       snprintf(buffer, sizeof(buffer), "%s.h", libname);
 
        hfile = fopen(buffer, "w");
        if (!hfile)
@@ -55,7 +55,7 @@ char **argv;
       break;
     case 'd':
       {
-       sprintf(buffer, "%s.d", libname);
+       snprintf(buffer, sizeof(buffer), "%s.d", libname);
 
        dfile = fopen(buffer, "w");
        if (!dfile)