1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

dtinfo subdirectory mmdb

This commit is contained in:
Ulrich Wilkens 2013-08-28 20:32:11 +02:00 committed by Jon Trulson
parent eb698f32cf
commit 92424bd169
12 changed files with 33 additions and 31 deletions

View file

@ -25,9 +25,7 @@ INDEPENDENT_SUBDIRS = clients
SUBDIRS = $(PRE_REQ_SUBDIRS) $(BROWSER_SUBDIRS) $(TOOLKIT_SUBDIRS) $(INDEPENDENT_SUBDIRS) SUBDIRS = $(PRE_REQ_SUBDIRS) $(BROWSER_SUBDIRS) $(TOOLKIT_SUBDIRS) $(INDEPENDENT_SUBDIRS)
XCOMM redefine TopLevelProject to build DtInfo with standard CDE config dir XCOMM redefine TopLevelProject to build DtInfo with standard CDE config dir
#undef TopLevelProject IMAKE_DEF_DTINFO = -DTopLevelProject=TopLevelProject \
#define TopLevelProject DtInfo
IMAKE_DEFINES = -DTopLevelProject=TopLevelProject \
-DProjectTmplFile='<DtInfo.tmpl>' \ -DProjectTmplFile='<DtInfo.tmpl>' \
-DProjectRulesFile='<DtInfo.rules>' -DProjectRulesFile='<DtInfo.rules>'

View file

@ -8,7 +8,7 @@ SUBDIRS = dtinfo_start
XCOMM redefine TopLevelProject to build DtInfo with standard CDE config dir XCOMM redefine TopLevelProject to build DtInfo with standard CDE config dir
#undef TopLevelProject #undef TopLevelProject
#define TopLevelProject DtInfo #define TopLevelProject DtInfo
IMAKE_DEFINES = -DTopLevelProject=TopLevelProject \ IMAKE_DEF_DTINFO = -DTopLevelProject=TopLevelProject \
-DProjectTmplFile='<DtInfo.tmpl>' \ -DProjectTmplFile='<DtInfo.tmpl>' \
-DProjectRulesFile='<DtInfo.rules>' -DProjectRulesFile='<DtInfo.rules>'

View file

@ -45,6 +45,7 @@
#include <Dt/Action.h> #include <Dt/Action.h>
#include <Dt/DtGetMessageP.h> #include <Dt/DtGetMessageP.h>
#include <Dt/MsgLog.h> #include <Dt/MsgLog.h>
#include <Dt/Dt.h>
#include <Tt/tt_c.h> #include <Tt/tt_c.h>
@ -162,8 +163,8 @@ main (
/* /*
* Initialize the desktop * Initialize the desktop
*/ */
if (DtAppInitialize (app_context, display, top_level, argv[0], name) if (DtAppInitialize (app_context, display, top_level,
== False) { argv[0], (char *)name) == False) {
DtMsgLogMessage (argv[0], DtMsgLogError, DtMsgLogMessage (argv[0], DtMsgLogError,
(char *) GETMESSAGE (SET_NUM, 8, "DtAppInitialize() failed. Perhaps the desktop environment\nis not properly installed.")); (char *) GETMESSAGE (SET_NUM, 8, "DtAppInitialize() failed. Perhaps the desktop environment\nis not properly installed."));
exit (1); exit (1);
@ -190,6 +191,8 @@ main (
DtDbLoad(); DtDbLoad();
XtAppMainLoop (app_context); XtAppMainLoop (app_context);
return (0);
} }
@ -500,7 +503,7 @@ ReceiveMessage (
* Put locale into the environment so that DtActionInvoke * Put locale into the environment so that DtActionInvoke
* will propagate it to the dtinfo process. * will propagate it to the dtinfo process.
*/ */
(void) sprintf (lang, "LANG=%s", locale); (void) snprintf (lang, sizeof(lang), "LANG=%s", locale);
(void) putenv (lang); (void) putenv (lang);
} }
@ -576,15 +579,16 @@ DieFromToolTalkError(Widget parent, char *errfmt, Tt_status status)
{ {
Arg args[10]; Arg args[10];
Widget dialog, dialogShell; Widget dialog, dialogShell;
char *errmsg, *statmsg, *title; char *errmsg, *statmsg;
XmString xms_errmsg, xms_ok, xms_title; XmString xms_errmsg, xms_ok, xms_title;
int n; int n, errmsglen;
if (! tt_is_err(status)) return; if (! tt_is_err(status)) return;
statmsg = tt_status_message(status); statmsg = tt_status_message(status);
errmsg = XtMalloc(strlen(errfmt) + strlen(statmsg) + 2); errmsglen = strlen(errfmt) + strlen(statmsg) + 2;
sprintf(errmsg, errfmt, statmsg); errmsg = XtMalloc(errmsglen);
snprintf(errmsg, errmsglen, errfmt, statmsg);
xms_ok = GETXMSTRING(2, 3, "OK"); xms_ok = GETXMSTRING(2, 3, "OK");
xms_errmsg = XmStringCreateLocalized(errmsg); xms_errmsg = XmStringCreateLocalized(errmsg);

View file

@ -45,7 +45,7 @@ CXXEXTRA_DEFINES = -ptr../templates
CXXEXTRA_DEFINES = -Xo CXXEXTRA_DEFINES = -Xo
#endif #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) LinkSourceFile(TemplatesAutoNumber.C,$(DTMMDBSRC)/HardCopy)
EXTRA_SRCS = TemplatesAutoNumber.C EXTRA_SRCS = TemplatesAutoNumber.C
@ -71,7 +71,7 @@ LinkSourceFile(all_tmpls,$(DTMMDBSRC)/HardCopy)
SpecialCPlusPlusObjectRule(TemplatesAutoNumber.o,,+Tall_tmpls -DEXPAND_TEMPLATES) SpecialCPlusPlusObjectRule(TemplatesAutoNumber.o,,+Tall_tmpls -DEXPAND_TEMPLATES)
#elif defined(AlphaArchitecture) #elif defined(AlphaArchitecture)
SpecialCPlusPlusObjectRule(TemplatesAutoNumber.o,,-ptf -DEXPAND_TEMPLATES) SpecialCPlusPlusObjectRule(TemplatesAutoNumber.o,,-ptf -DEXPAND_TEMPLATES)
#elif defined(LinuxArchitecture) || defined(FreeBSDArchitecture) #elif defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || defined(OpenBSDArchitecture)
SpecialCPlusPlusObjectRule(TemplatesAutoNumber.o,,-DEXPAND_TEMPLATES) SpecialCPlusPlusObjectRule(TemplatesAutoNumber.o,,-DEXPAND_TEMPLATES)
SpecialCPlusPlusExpandRule(TemplatesAutoNumber..c,TemplatesAutoNumber.C,-DEXPAND_TEMPLATES) SpecialCPlusPlusExpandRule(TemplatesAutoNumber..c,TemplatesAutoNumber.C,-DEXPAND_TEMPLATES)
#else #else

View file

@ -46,7 +46,7 @@ EXTRALIBRARYDEPS = $(DONES)
XCOMM redefine TopLevelProject to build DtInfo with standard CDE config dir XCOMM redefine TopLevelProject to build DtInfo with standard CDE config dir
#undef TopLevelProject #undef TopLevelProject
#define TopLevelProject DtInfo #define TopLevelProject DtInfo
IMAKE_DEFINES = -DTopLevelProject=TopLevelProject \ IMAKE_DEF_DTINFO = -DTopLevelProject=TopLevelProject \
-DProjectTmplFile='<DtInfo.tmpl>' \ -DProjectTmplFile='<DtInfo.tmpl>' \
-DProjectRulesFile='<DtInfo.rules>' -DProjectRulesFile='<DtInfo.rules>'

View file

@ -93,7 +93,7 @@ NORMAL_SRCS = \
VariableTable.C defParser.C defToken.C \ VariableTable.C defParser.C defToken.C \
style.C tokenStyle.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) LinkSourceFile(SSTemplates.C,$(DTMMDBSRC)/StyleSheet)
TEMPLATE_SRCS = SSTemplates.C TEMPLATE_SRCS = SSTemplates.C
@ -111,7 +111,7 @@ LinkSourceFile(all_tmpls,$(DTMMDBSRC)/StyleSheet)
SpecialCPlusPlusObjectRule(SSTemplates.o,,+Tall_tmpls -DEXPAND_TEMPLATES) SpecialCPlusPlusObjectRule(SSTemplates.o,,+Tall_tmpls -DEXPAND_TEMPLATES)
#elif defined(AlphaArchitecture) #elif defined(AlphaArchitecture)
SpecialCPlusPlusObjectRule(SSTemplates.o,,-ptf -DEXPAND_TEMPLATES) SpecialCPlusPlusObjectRule(SSTemplates.o,,-ptf -DEXPAND_TEMPLATES)
#elif defined(LinuxArchitecture) || defined(FreeBSDArchitecture) #elif defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || defined(OpenBSDArchitecture)
SpecialCPlusPlusObjectRule(SSTemplates.o,,-DEXPAND_TEMPLATES) SpecialCPlusPlusObjectRule(SSTemplates.o,,-DEXPAND_TEMPLATES)
SpecialCPlusPlusExpandRule(SSTemplates..c,SSTemplates.C,-DEXPAND_TEMPLATES) SpecialCPlusPlusExpandRule(SSTemplates..c,SSTemplates.C,-DEXPAND_TEMPLATES)
#else #else

View file

@ -23,7 +23,7 @@ XCOMM .../programs/dtinfo/mmdb/<subdir>/Imakefile
#define CplusplusSource YES #define CplusplusSource YES
DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES) DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
#if defined(LinuxArchitecture) || defined(FreeBSDArchitecture) #if defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || defined(OpenBSDArchitecture)
EXCEPTION_DEFINES = -DNATIVE_EXCEPTIONS EXCEPTION_DEFINES = -DNATIVE_EXCEPTIONS
#endif #endif

View file

@ -218,7 +218,7 @@ main()
char str[128]; 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_String cc_str2( (const char *)str);
CC_Tokenizer next2( cc_str2 ); CC_Tokenizer next2( cc_str2 );

View file

@ -25,7 +25,7 @@ DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
#if defined(SunArchitecture) && CplusplusCompilerMajorVersion > 3 #if defined(SunArchitecture) && CplusplusCompilerMajorVersion > 3
EXCEPTION_DEFINES = -DHAS_TERMINATE EXCEPTION_DEFINES = -DHAS_TERMINATE
#elif defined(LinuxArchitecture) || defined(FreeBSDArchitecture) #elif defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || defined(OpenBSDArchitecture)
EXCEPTION_DEFINES = -DNATIVE_EXCEPTIONS EXCEPTION_DEFINES = -DNATIVE_EXCEPTIONS
#endif #endif

View file

@ -23,7 +23,7 @@ XCOMM .../programs/dtinfo/mmdb/<subdir>/Imakefile
#define CplusplusSource YES #define CplusplusSource YES
DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES) DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
#if defined(LinuxArchitecture) || defined(FreeBSDArchitecture) #if defined(LinuxArchitecture) || defined(FreeBSDArchitecture) || defined(OpenBSDArchitecture)
EXCEPTION_DEFINES = -DNATIVE_EXCEPTIONS EXCEPTION_DEFINES = -DNATIVE_EXCEPTIONS
#endif #endif

View file

@ -9,7 +9,7 @@ SUBDIRS=misc
XCOMM redefine TopLevelProject to build DtInfo with standard CDE config dir XCOMM redefine TopLevelProject to build DtInfo with standard CDE config dir
#undef TopLevelProject #undef TopLevelProject
#define TopLevelProject DtInfo #define TopLevelProject DtInfo
IMAKE_DEFINES = -DTopLevelProject=TopLevelProject \ IMAKE_DEF_DTINFO = -DTopLevelProject=TopLevelProject \
-DProjectTmplFile='<DtInfo.tmpl>' \ -DProjectTmplFile='<DtInfo.tmpl>' \
-DProjectRulesFile='<DtInfo.rules>' -DProjectRulesFile='<DtInfo.rules>'

View file

@ -40,7 +40,7 @@ char **argv;
{ {
case 'h': case 'h':
{ {
sprintf(buffer, "%s.h", libname); snprintf(buffer, sizeof(buffer), "%s.h", libname);
hfile = fopen(buffer, "w"); hfile = fopen(buffer, "w");
if (!hfile) if (!hfile)
@ -55,7 +55,7 @@ char **argv;
break; break;
case 'd': case 'd':
{ {
sprintf(buffer, "%s.d", libname); snprintf(buffer, sizeof(buffer), "%s.d", libname);
dfile = fopen(buffer, "w"); dfile = fopen(buffer, "w");
if (!dfile) if (!dfile)