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

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

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