Merge branch 'master' of ssh://git.code.sf.net/p/cdesktopenv/code

This commit is contained in:
Peter Howkins
2018-04-04 16:37:12 +01:00
14 changed files with 58 additions and 116 deletions

View File

@@ -17,6 +17,9 @@ DTINFODIR = dtinfo
DTINFODIR = dtinfo
#endif
XCOMM JET 4/2/2018 - disabling dtudcfonted and dtudcexch. They are
XCOMM very broken in terms of coverity and compiler warnings. Also,
XCOMM who uses them? And for what?
SUBDIRS = dthelp dsdm dtmail dtpad dtfile dtwm dtlogin \
dtsession dthello dtstyle dtexec dtdbcache dticon dtterm \
@@ -24,7 +27,7 @@ SUBDIRS = dthelp dsdm dtmail dtpad dtfile dtwm dtlogin \
dtscreen dtksh dtcm dtsearchpath \
dtappbuilder dtappintegrate dtprintegrate dtconfig \
dtcreate dtprintinfo fontaliases dtdspmsg ttsnoop \
dtudcfonted dtudcexch dtimsstart dtdocbook dtpdm dtsr \
dtimsstart dtdocbook dtpdm dtsr \
dtpdmd $(DTINFODIR) $(EXTRADIRS)
LINTSUBDIRS = dthelp dsdm dtmail dtpad dtfile dtwm dtlogin \
@@ -32,7 +35,7 @@ LINTSUBDIRS = dthelp dsdm dtmail dtpad dtfile dtwm dtlogin \
dtcalc dtaction dtcreate \
dtscreen dtksh dtcm dtsearchpath \
dtappbuilder dtappintegrate dtprintegrate dtprintinfo dtdspmsg \
dtudcfonted dtudcexch dtimsstart dtdocbook dtpdm dtsr \
dtimsstart dtdocbook dtpdm dtsr \
dtpdmd $(DTINFODIR) $(EXTRADIRS)
MakeSubdirs($(SUBDIRS))

View File

@@ -263,8 +263,10 @@ ds_save_resources(XrmDatabase rDB, char *filename)
{
if ((filename = getenv("DTCALCDEF")) == NULL)
{
if ( !(home = getenv("HOME")) )
return 1;
size_t fileLen = strlen(home) + 18;
home = getenv("HOME");
if ( (filename = calloc(1, fileLen)) != NULL )
{
needsFree = true;

View File

@@ -945,7 +945,7 @@ load_dssw_times(DSSW *dssw, Tick start, Tick stop, Boolean set_no_time) {
dssw->stop_val.block = (buf[5] == 'a') ?
TIME_AM : TIME_PM;
} else {
strcpy(dssw->stop_val.val, buf);
snprintf(dssw->stop_val.val, START_STOP_LEN, "%s", buf);
dssw->stop_val.block = TIME_AM;
}
}

View File

@@ -1631,6 +1631,7 @@ _DtPathFromInput(
FILE *pfp;
char command[MAXPATHLEN];
memset(command, 0, sizeof(command));
sprintf(command,"echo %s",path);
if((pfp=popen(command,"r")) != NULL)
@@ -1654,9 +1655,13 @@ _DtPathFromInput(
read_ok = 0;
}
if (read_ok)
if (read_ok)
{
command[MAXPATHLEN-1] = '\0';
int slen = strlen(command);
/* need to remove the trailing newline safely*/
if (slen >= 1)
command[slen-1] = '\0';
XtFree(path);
path = XtNewString(command);
pclose(pfp);

View File

@@ -7,7 +7,7 @@ MKFONTDIR = $(XPROJECTROOT)/bin/mkfontdir
OBJS = FontObj(dtinfo)
LinkSourceFile(dtinfo.bdf,$(CDESRC)/fontaliases/bdf)
CopySourceFile(dtinfo.bdf,$(CDESRC)/fontaliases/bdf)
MakeFonts()

View File

@@ -610,14 +610,14 @@ void read_d2x (struct or_hwordrec * glob_word, long field)
static void write_d2x (struct or_hwordrec * glob_word, long field)
{
if (field == OR_SWORDKEY) {
strcpy (d21new.or_swordkey, glob_word->or_hwordkey);
snprintf(d21new.or_swordkey, 16, "%s", glob_word->or_hwordkey);
d21new.or_swoffset = htonl (glob_word->or_hwoffset);
d21new.or_swfree = htonl (glob_word->or_hwfree);
d21new.or_swaddrs = htonl (glob_word->or_hwaddrs);
RECWRITE (PROGNAME "102", &d21new, 0);
}
else if (field == OR_LWORDKEY) {
strcpy (d22new.or_lwordkey, glob_word->or_hwordkey);
snprintf(d22new.or_lwordkey, 40, "%s", glob_word->or_hwordkey);
d22new.or_lwoffset = htonl (glob_word->or_hwoffset);
d22new.or_lwfree = htonl (glob_word->or_hwfree);
d22new.or_lwaddrs = htonl (glob_word->or_hwaddrs);

View File

@@ -1466,9 +1466,19 @@ int fix ;
bitmap = pcf->bitmaps + getINT32( (unsigned char *)(pcf->offsets + encodingOffset),
pcf->bmp_fmt);
invertBits( bitmap + bmp_adj, pcf->bmp_fmt, ptn_width, cpy_height, bmp_ptn + ptn_adj);
putPtn( (unsigned char *)bmp_ptn, ptn_width, ptn_height );
fprintf(stdout,"ENDCHAR\n");
/* Only do this if non-NULL... */
if (bmp_ptn)
{
invertBits( bitmap + bmp_adj, pcf->bmp_fmt,
ptn_width, cpy_height, bmp_ptn + ptn_adj);
putPtn( (unsigned char *)bmp_ptn, ptn_width, ptn_height );
}
else
{
fprintf(stderr, "%s: bmp_ptn is NULL", __FUNCTION__);
}
fprintf(stdout,"ENDCHAR\n");
if( fix == FALSE ) free(bmp_ptn);
}
if( fix == TRUE ) free(bmp_ptn);

View File

@@ -6,7 +6,7 @@ XCOMM $XConsortium: fonts.tmpl /main/2 1996/09/13 17:55:52 drk $
OBJS = FontObj(dtinfo) $(LOCAL_OBJS)
LinkSourceFile(dtinfo.bdf,$(CDESRC)/fontaliases/bdf)
CopySourceFile(dtinfo.bdf,$(CDESRC)/fontaliases/bdf)
MakeFonts()