mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
dtcreate: Resolve coverity issues
This commit is contained in:
parent
e195df4b50
commit
bcccf559ce
9 changed files with 53 additions and 41 deletions
|
@ -319,7 +319,6 @@ What do you want to do?";
|
||||||
"Cancel Save", questionCB_CancelSave,
|
"Cancel Save", questionCB_CancelSave,
|
||||||
(char *)NULL, (XtCallbackProc)NULL);
|
(char *)NULL, (XtCallbackProc)NULL);
|
||||||
XtFree(bufPtr);
|
XtFree(bufPtr);
|
||||||
XtFree(pszActionFile);
|
|
||||||
bHaveError = True;
|
bHaveError = True;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -337,6 +336,8 @@ What do you want to do?";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
XtFree(pszActionFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void activateCB_CA_FiletypesDelete( Widget UxWidget,
|
static void activateCB_CA_FiletypesDelete( Widget UxWidget,
|
||||||
|
@ -540,7 +541,7 @@ static Widget _Uxbuild_CreateActionAppShell(void)
|
||||||
_UxParent = UxTopLevel;
|
_UxParent = UxTopLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(titleBuf, GETMESSAGE(3, 10, "Create Action"));
|
snprintf(titleBuf, sizeof(titleBuf), "%s", GETMESSAGE(3, 10, "Create Action"));
|
||||||
CreateActionAppShell = XtVaCreatePopupShell( "CreateActionAppShell",
|
CreateActionAppShell = XtVaCreatePopupShell( "CreateActionAppShell",
|
||||||
applicationShellWidgetClass,
|
applicationShellWidgetClass,
|
||||||
_UxParent,
|
_UxParent,
|
||||||
|
@ -624,7 +625,7 @@ static Widget _Uxbuild_CreateActionAppShell(void)
|
||||||
/*
|
/*
|
||||||
mnemonic = GETMESSAGE(2, 21, "N");
|
mnemonic = GETMESSAGE(2, 21, "N");
|
||||||
*/
|
*/
|
||||||
strcpy(mnemonic, GETMESSAGE(2, 21, "N"));
|
snprintf(mnemonic, sizeof(mnemonic), "%s", GETMESSAGE(2, 21, "N"));
|
||||||
CA_MB_FileNew = XtVaCreateManagedWidget( "CA_MB_FileNew",
|
CA_MB_FileNew = XtVaCreateManagedWidget( "CA_MB_FileNew",
|
||||||
xmPushButtonWidgetClass,
|
xmPushButtonWidgetClass,
|
||||||
CA_MB_FileOption,
|
CA_MB_FileOption,
|
||||||
|
@ -639,7 +640,7 @@ static Widget _Uxbuild_CreateActionAppShell(void)
|
||||||
/*
|
/*
|
||||||
mnemonic = GETMESSAGE(2, 16, "O");
|
mnemonic = GETMESSAGE(2, 16, "O");
|
||||||
*/
|
*/
|
||||||
strcpy(mnemonic, GETMESSAGE(2, 16, "O"));
|
snprintf(mnemonic, sizeof(mnemonic), "%s", GETMESSAGE(2, 16, "O"));
|
||||||
CA_MB_FileOpen = XtVaCreateManagedWidget( "CA_MB_FileOpen",
|
CA_MB_FileOpen = XtVaCreateManagedWidget( "CA_MB_FileOpen",
|
||||||
xmPushButtonWidgetClass,
|
xmPushButtonWidgetClass,
|
||||||
CA_MB_FileOption,
|
CA_MB_FileOption,
|
||||||
|
@ -654,7 +655,7 @@ static Widget _Uxbuild_CreateActionAppShell(void)
|
||||||
/*
|
/*
|
||||||
mnemonic = GETMESSAGE(2, 26, "S");
|
mnemonic = GETMESSAGE(2, 26, "S");
|
||||||
*/
|
*/
|
||||||
strcpy(mnemonic, GETMESSAGE(2, 26, "S"));
|
snprintf(mnemonic, sizeof(mnemonic), "%s", GETMESSAGE(2, 26, "S"));
|
||||||
CA_MB_FileSave = XtVaCreateManagedWidget( "CA_MB_FileSave",
|
CA_MB_FileSave = XtVaCreateManagedWidget( "CA_MB_FileSave",
|
||||||
xmPushButtonWidgetClass,
|
xmPushButtonWidgetClass,
|
||||||
CA_MB_FileOption,
|
CA_MB_FileOption,
|
||||||
|
@ -675,7 +676,7 @@ static Widget _Uxbuild_CreateActionAppShell(void)
|
||||||
/*
|
/*
|
||||||
mnemonic = GETMESSAGE(2, 31, "x");
|
mnemonic = GETMESSAGE(2, 31, "x");
|
||||||
*/
|
*/
|
||||||
strcpy(mnemonic, GETMESSAGE(2, 31, "x"));
|
snprintf(mnemonic, sizeof(mnemonic), "%s", GETMESSAGE(2, 31, "x"));
|
||||||
CA_MB_FileExit = XtVaCreateManagedWidget( "CA_MB_FileExit",
|
CA_MB_FileExit = XtVaCreateManagedWidget( "CA_MB_FileExit",
|
||||||
xmPushButtonWidgetClass,
|
xmPushButtonWidgetClass,
|
||||||
CA_MB_FileOption,
|
CA_MB_FileOption,
|
||||||
|
@ -690,7 +691,7 @@ static Widget _Uxbuild_CreateActionAppShell(void)
|
||||||
/*
|
/*
|
||||||
mnemonic = GETMESSAGE(2, 11, "F");
|
mnemonic = GETMESSAGE(2, 11, "F");
|
||||||
*/
|
*/
|
||||||
strcpy(mnemonic, GETMESSAGE(2, 11, "F"));
|
snprintf(mnemonic, sizeof(mnemonic), "%s", GETMESSAGE(2, 11, "F"));
|
||||||
CA_MB_FileTop = XtVaCreateManagedWidget( "CA_MB_FileTop",
|
CA_MB_FileTop = XtVaCreateManagedWidget( "CA_MB_FileTop",
|
||||||
xmCascadeButtonWidgetClass,
|
xmCascadeButtonWidgetClass,
|
||||||
CA_MenuBar,
|
CA_MenuBar,
|
||||||
|
@ -717,7 +718,7 @@ static Widget _Uxbuild_CreateActionAppShell(void)
|
||||||
/*
|
/*
|
||||||
* Creation of CA_MB_HelpOverview
|
* Creation of CA_MB_HelpOverview
|
||||||
*/
|
*/
|
||||||
strcpy(mnemonic, GETMESSAGE(2, 61, "v"));
|
snprintf(mnemonic, sizeof(mnemonic), "%s", GETMESSAGE(2, 61, "v"));
|
||||||
CA_MB_HelpOverview = XtVaCreateManagedWidget( "CA_MB_HelpOverview",
|
CA_MB_HelpOverview = XtVaCreateManagedWidget( "CA_MB_HelpOverview",
|
||||||
xmPushButtonWidgetClass,
|
xmPushButtonWidgetClass,
|
||||||
CA_MB_HelpOption,
|
CA_MB_HelpOption,
|
||||||
|
@ -732,7 +733,7 @@ static Widget _Uxbuild_CreateActionAppShell(void)
|
||||||
/*
|
/*
|
||||||
* Creation of CA_MB_HelpTasks
|
* Creation of CA_MB_HelpTasks
|
||||||
*/
|
*/
|
||||||
strcpy(mnemonic, GETMESSAGE(2, 71, "T"));
|
snprintf(mnemonic, sizeof(mnemonic), "%s", GETMESSAGE(2, 71, "T"));
|
||||||
CA_MB_HelpTasks = XtVaCreateManagedWidget( "CA_MB_HelpTasks",
|
CA_MB_HelpTasks = XtVaCreateManagedWidget( "CA_MB_HelpTasks",
|
||||||
xmPushButtonWidgetClass,
|
xmPushButtonWidgetClass,
|
||||||
CA_MB_HelpOption,
|
CA_MB_HelpOption,
|
||||||
|
@ -749,7 +750,7 @@ static Widget _Uxbuild_CreateActionAppShell(void)
|
||||||
/*
|
/*
|
||||||
mnemonic = GETMESSAGE(2, 66, "T");
|
mnemonic = GETMESSAGE(2, 66, "T");
|
||||||
*/
|
*/
|
||||||
strcpy(mnemonic, GETMESSAGE(2, 66, "T"));
|
snprintf(mnemonic, sizeof(mnemonic), "%s", GETMESSAGE(2, 66, "T"));
|
||||||
CA_MB_HelpTOC = XtVaCreateManagedWidget( "CA_MB_HelpTOC",
|
CA_MB_HelpTOC = XtVaCreateManagedWidget( "CA_MB_HelpTOC",
|
||||||
xmPushButtonWidgetClass,
|
xmPushButtonWidgetClass,
|
||||||
CA_MB_HelpOption,
|
CA_MB_HelpOption,
|
||||||
|
@ -761,7 +762,7 @@ static Widget _Uxbuild_CreateActionAppShell(void)
|
||||||
/*
|
/*
|
||||||
* Creation of CA_MB_HelpReference
|
* Creation of CA_MB_HelpReference
|
||||||
*/
|
*/
|
||||||
strcpy(mnemonic, GETMESSAGE(2, 76, "R"));
|
snprintf(mnemonic, sizeof(mnemonic), "%s", GETMESSAGE(2, 76, "R"));
|
||||||
CA_MB_HelpReference = XtVaCreateManagedWidget( "CA_MB_HelpReference",
|
CA_MB_HelpReference = XtVaCreateManagedWidget( "CA_MB_HelpReference",
|
||||||
xmPushButtonWidgetClass,
|
xmPushButtonWidgetClass,
|
||||||
CA_MB_HelpOption,
|
CA_MB_HelpOption,
|
||||||
|
@ -784,7 +785,7 @@ static Widget _Uxbuild_CreateActionAppShell(void)
|
||||||
/*
|
/*
|
||||||
* Creation of CA_MB_HelpUsing
|
* Creation of CA_MB_HelpUsing
|
||||||
*/
|
*/
|
||||||
strcpy(mnemonic, GETMESSAGE(2, 81, "U"));
|
snprintf(mnemonic, sizeof(mnemonic), "%s", GETMESSAGE(2, 81, "U"));
|
||||||
CA_MB_HelpUsing = XtVaCreateManagedWidget( "CA_MB_HelpUsing",
|
CA_MB_HelpUsing = XtVaCreateManagedWidget( "CA_MB_HelpUsing",
|
||||||
xmPushButtonWidgetClass,
|
xmPushButtonWidgetClass,
|
||||||
CA_MB_HelpOption,
|
CA_MB_HelpOption,
|
||||||
|
@ -807,7 +808,7 @@ static Widget _Uxbuild_CreateActionAppShell(void)
|
||||||
/*
|
/*
|
||||||
* Creation of CA_MB_HelpAbout
|
* Creation of CA_MB_HelpAbout
|
||||||
*/
|
*/
|
||||||
strcpy(mnemonic, GETMESSAGE(2, 86, "A"));
|
snprintf(mnemonic, sizeof(mnemonic), "%s", GETMESSAGE(2, 86, "A"));
|
||||||
CA_MB_HelpAbout = XtVaCreateManagedWidget( "CA_MB_HelpAbout",
|
CA_MB_HelpAbout = XtVaCreateManagedWidget( "CA_MB_HelpAbout",
|
||||||
xmPushButtonWidgetClass,
|
xmPushButtonWidgetClass,
|
||||||
CA_MB_HelpOption,
|
CA_MB_HelpOption,
|
||||||
|
@ -822,7 +823,7 @@ static Widget _Uxbuild_CreateActionAppShell(void)
|
||||||
/*
|
/*
|
||||||
* Creation of CA_MB_HelpTop
|
* Creation of CA_MB_HelpTop
|
||||||
*/
|
*/
|
||||||
strcpy(mnemonic, GETMESSAGE(2, 54, "H"));
|
snprintf(mnemonic, sizeof(mnemonic), "%s", GETMESSAGE(2, 54, "H"));
|
||||||
CA_MB_HelpTop = XtVaCreateManagedWidget( "CA_MB_HelpTop",
|
CA_MB_HelpTop = XtVaCreateManagedWidget( "CA_MB_HelpTop",
|
||||||
xmCascadeButtonWidgetClass,
|
xmCascadeButtonWidgetClass,
|
||||||
CA_MenuBar,
|
CA_MenuBar,
|
||||||
|
@ -848,7 +849,7 @@ static Widget _Uxbuild_CreateActionAppShell(void)
|
||||||
NULL );
|
NULL );
|
||||||
|
|
||||||
/* Creation of ColorMonoOption */
|
/* Creation of ColorMonoOption */
|
||||||
strcpy(mnemonic, GETMESSAGE(2, 50, "M"));
|
snprintf(mnemonic, sizeof(mnemonic), "%s", GETMESSAGE(2, 50, "M"));
|
||||||
ColorMonoOption = XtVaCreateManagedWidget( "ColorMonoOption",
|
ColorMonoOption = XtVaCreateManagedWidget( "ColorMonoOption",
|
||||||
xmToggleButtonWidgetClass,
|
xmToggleButtonWidgetClass,
|
||||||
CA_MB_OptionsOption,
|
CA_MB_OptionsOption,
|
||||||
|
@ -864,7 +865,7 @@ static Widget _Uxbuild_CreateActionAppShell(void)
|
||||||
|
|
||||||
|
|
||||||
/* Creation of CA_MB_OptionTop */
|
/* Creation of CA_MB_OptionTop */
|
||||||
strcpy(mnemonic, GETMESSAGE(2, 36, "O"));
|
snprintf(mnemonic, sizeof(mnemonic), "%s", GETMESSAGE(2, 36, "O"));
|
||||||
CA_MB_OptionTop = XtVaCreateManagedWidget( "CA_MB_OptionTop",
|
CA_MB_OptionTop = XtVaCreateManagedWidget( "CA_MB_OptionTop",
|
||||||
xmCascadeButtonWidgetClass,
|
xmCascadeButtonWidgetClass,
|
||||||
CA_MenuBar,
|
CA_MenuBar,
|
||||||
|
|
|
@ -77,7 +77,7 @@ static void okCallback_OpenFile( Widget UxWidget,
|
||||||
_UxCOpenFile *UxSaveCtx, *UxContext;
|
_UxCOpenFile *UxSaveCtx, *UxContext;
|
||||||
XmFileSelectionBoxCallbackStruct *cbs;
|
XmFileSelectionBoxCallbackStruct *cbs;
|
||||||
/*char *text;*/
|
/*char *text;*/
|
||||||
int rc;
|
int rc = 1; /* 1 = OpenDefinitionFile() failure */
|
||||||
ActionData ADTmp;
|
ActionData ADTmp;
|
||||||
|
|
||||||
UxSaveCtx = UxOpenFileContext;
|
UxSaveCtx = UxOpenFileContext;
|
||||||
|
|
|
@ -263,7 +263,6 @@ void getAF_Icons(FiletypeData *pFiletypedata)
|
||||||
/* Tiny Bitmap */
|
/* Tiny Bitmap */
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
if ( (pIconData->bmDirtyBit) &&
|
if ( (pIconData->bmDirtyBit) &&
|
||||||
(pIconData->bmFileName) &&
|
|
||||||
(strlen(pIconData->bmFileName)) ) {
|
(strlen(pIconData->bmFileName)) ) {
|
||||||
pFiletypedata->pszTinyBmIcon = XtMalloc(strlen(pIconData->bmFileName) + 1);
|
pFiletypedata->pszTinyBmIcon = XtMalloc(strlen(pIconData->bmFileName) + 1);
|
||||||
if (pFiletypedata->pszTinyBmIcon) {
|
if (pFiletypedata->pszTinyBmIcon) {
|
||||||
|
|
|
@ -271,8 +271,7 @@ void DisplayHelpDialog(Widget wid, XtPointer client_data, XtPointer cbs)
|
||||||
sprintf(pszTitle, "%s - %s", GETMESSAGE(3, 10, "Create Action"),
|
sprintf(pszTitle, "%s - %s", GETMESSAGE(3, 10, "Create Action"),
|
||||||
GETMESSAGE(2, 53, "Help"));
|
GETMESSAGE(2, 53, "Help"));
|
||||||
*/
|
*/
|
||||||
sprintf(pszTitle, "%s - ", GETMESSAGE(3, 10, "Create Action"));
|
snprintf(pszTitle, sizeof(pszTitle), "%s - %s", GETMESSAGE(3, 10, "Create Action"), GETMESSAGE(2, 53, "Help"));
|
||||||
strcat(pszTitle, GETMESSAGE(2, 53, "Help"));
|
|
||||||
XtSetArg(args[i], XmNtitle, pszTitle); i++;
|
XtSetArg(args[i], XmNtitle, pszTitle); i++;
|
||||||
|
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
|
|
|
@ -292,7 +292,7 @@ void load_icons (Widget wid, XtPointer client_data,
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
void GetWidgetTextString (Widget wid, char **ppszText)
|
void GetWidgetTextString (Widget wid, char **ppszText)
|
||||||
{
|
{
|
||||||
char *pszTmp;
|
char *pszTmp = NULL;
|
||||||
|
|
||||||
if (*ppszText) {
|
if (*ppszText) {
|
||||||
XtFree(*ppszText);
|
XtFree(*ppszText);
|
||||||
|
@ -690,12 +690,12 @@ void SetIconData(Widget wid, char *pszIconFile, enum icon_size_range enumIconSiz
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pszName = CreateIconName((char *)NULL, pszIconFile, enumIconSize, PIXMAP_EXT, FALSE);
|
pszName = CreateIconName((char *)NULL, pszIconFile, enumIconSize, PIXMAP_EXT, FALSE);
|
||||||
strcpy(pmFileName, pszName);
|
snprintf(pmFileName, sizeof(pmFileName), "%s", pszName);
|
||||||
if (pszName) XtFree(pszName);
|
XtFree(pszName);
|
||||||
|
|
||||||
pszName = CreateIconName((char *)NULL, pszIconFile, enumIconSize, BITMAP_EXT, FALSE);
|
pszName = CreateIconName((char *)NULL, pszIconFile, enumIconSize, BITMAP_EXT, FALSE);
|
||||||
strcpy(bmFileName, pszName);
|
snprintf(bmFileName, sizeof(bmFileName), "%s", pszName);
|
||||||
if (pszName) XtFree(pszName);
|
XtFree(pszName);
|
||||||
|
|
||||||
pIconData = GetIconDataFromWid(wid);
|
pIconData = GetIconDataFromWid(wid);
|
||||||
if (pIconData) {
|
if (pIconData) {
|
||||||
|
@ -711,7 +711,6 @@ void SetIconData(Widget wid, char *pszIconFile, enum icon_size_range enumIconSiz
|
||||||
strcpy(pIconData->pmFileName, pmFileName);
|
strcpy(pIconData->pmFileName, pmFileName);
|
||||||
|
|
||||||
if ( (pIconData->bmDirtyBit) &&
|
if ( (pIconData->bmDirtyBit) &&
|
||||||
(pIconData->bmFileName) &&
|
|
||||||
(strlen(pIconData->bmFileName)) ) {
|
(strlen(pIconData->bmFileName)) ) {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("SetIconData: unlink '%s'\n", pIconData->bmFileName); /* debug */
|
printf("SetIconData: unlink '%s'\n", pIconData->bmFileName); /* debug */
|
||||||
|
|
|
@ -614,7 +614,9 @@ ushort WriteDefinitionFile(char *pszFile, ActionData *pAD)
|
||||||
}
|
}
|
||||||
SetCookie(fp);
|
SetCookie(fp);
|
||||||
if (fp) fclose(fp);
|
if (fp) fclose(fp);
|
||||||
chmod(pszFile, 0644);
|
if(pszFile) {
|
||||||
|
chmod(pszFile, 0644);
|
||||||
|
}
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -655,7 +657,7 @@ ushort WriteActionFile(ActionData *pAD)
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
/* Open action file for writing. */
|
/* Open action file for writing. */
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
if (pszFile && (fp = fopen(pszFile, "w")) == NULL) {
|
if (pszFile == NULL || (fp = fopen(pszFile, "w")) == NULL) {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("Can not open file.\n"); /* debug */
|
printf("Can not open file.\n"); /* debug */
|
||||||
#endif
|
#endif
|
||||||
|
@ -694,7 +696,7 @@ ushort WriteActionFile(ActionData *pAD)
|
||||||
fprintf(fp, "echo \"Common Desktop Environment Dt action\"\n");
|
fprintf(fp, "echo \"Common Desktop Environment Dt action\"\n");
|
||||||
fprintf(fp, "\n");
|
fprintf(fp, "\n");
|
||||||
|
|
||||||
if (fp) fclose(fp);
|
fclose(fp);
|
||||||
chmod(pszFile, 0755);
|
chmod(pszFile, 0755);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
@ -746,7 +748,7 @@ int OpenDefinitionFile(char *pszFile, ActionData *pAD)
|
||||||
|
|
||||||
{
|
{
|
||||||
FILE *fp = (FILE *)NULL;
|
FILE *fp = (FILE *)NULL;
|
||||||
int rc;
|
int rc = 1;
|
||||||
char *msgPtr, *fmtPtr, *errPtr;
|
char *msgPtr, *fmtPtr, *errPtr;
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
@ -789,10 +791,11 @@ int OpenDefinitionFile(char *pszFile, ActionData *pAD)
|
||||||
sprintf(errPtr, fmtPtr, msgPtr, pszFile);
|
sprintf(errPtr, fmtPtr, msgPtr, pszFile);
|
||||||
display_error_message(CreateActionAppShell, errPtr);
|
display_error_message(CreateActionAppShell, errPtr);
|
||||||
XtFree(errPtr);
|
XtFree(errPtr);
|
||||||
|
fclose(fp);
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (fp) fclose(fp);
|
fclose(fp);
|
||||||
return(rc);
|
return(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -790,7 +790,7 @@ void update_container_contents (char *filter)
|
||||||
XmeFlushIconFileCache(NULL);
|
XmeFlushIconFileCache(NULL);
|
||||||
|
|
||||||
for (lcv = 0; lcv < count; lcv++) {
|
for (lcv = 0; lcv < count; lcv++) {
|
||||||
sprintf (iconfile, "%s%s", path, filelist[lcv]->d_name);
|
snprintf(iconfile, sizeof(iconfile), "%s%s", path, filelist[lcv]->d_name);
|
||||||
ptr = strstr(filelist[lcv]->d_name, ".m.");
|
ptr = strstr(filelist[lcv]->d_name, ".m.");
|
||||||
if (ptr) {
|
if (ptr) {
|
||||||
*ptr = '\0';
|
*ptr = '\0';
|
||||||
|
@ -813,7 +813,7 @@ void update_container_contents (char *filter)
|
||||||
/* This is the empty directory case */
|
/* This is the empty directory case */
|
||||||
/******************************************************************/
|
/******************************************************************/
|
||||||
} else {
|
} else {
|
||||||
strcpy(iconfile, GETMESSAGE(11, 60, "[Empty]"));
|
snprintf(iconfile, sizeof(iconfile), "%s", GETMESSAGE(11, 60, "[Empty]"));
|
||||||
xmstring = XmStringCreateLocalized(iconfile);
|
xmstring = XmStringCreateLocalized(iconfile);
|
||||||
XtVaSetValues ((Widget) icons_in_container[0],
|
XtVaSetValues ((Widget) icons_in_container[0],
|
||||||
XmNstring, xmstring,
|
XmNstring, xmstring,
|
||||||
|
@ -841,6 +841,7 @@ void update_container_contents (char *filter)
|
||||||
}
|
}
|
||||||
|
|
||||||
XtManageChild (icon_scrolled_container);
|
XtManageChild (icon_scrolled_container);
|
||||||
|
free(path);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1261,6 +1262,7 @@ static void defaultActionCB_dir_scrolled_list( Widget UxWidget,
|
||||||
filter = (char *)XmStringToText (listcb->item);
|
filter = (char *)XmStringToText (listcb->item);
|
||||||
apply_filter (filter);
|
apply_filter (filter);
|
||||||
/* XtManageChild (icon_scrolled_win); */
|
/* XtManageChild (icon_scrolled_win); */
|
||||||
|
free(filter);
|
||||||
}
|
}
|
||||||
UxIcon_selection_dialogContext = UxSaveCtx;
|
UxIcon_selection_dialogContext = UxSaveCtx;
|
||||||
}
|
}
|
||||||
|
|
|
@ -514,7 +514,6 @@ void RemoveTmpIconFiles( void )
|
||||||
unlink(maskFile);
|
unlink(maskFile);
|
||||||
}
|
}
|
||||||
if ( (IconDataList[i]->bmDirtyBit) &&
|
if ( (IconDataList[i]->bmDirtyBit) &&
|
||||||
(IconDataList[i]->bmFileName) &&
|
|
||||||
(strlen(IconDataList[i]->bmFileName)) ) {
|
(strlen(IconDataList[i]->bmFileName)) ) {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("RemoveTmpIconFiles: unlink '%s'\n", IconDataList[i]->bmFileName); /* debug */
|
printf("RemoveTmpIconFiles: unlink '%s'\n", IconDataList[i]->bmFileName); /* debug */
|
||||||
|
@ -863,7 +862,7 @@ Tt_callback_action IconEdit_tt_handler( Tt_message m, Tt_pattern p )
|
||||||
if (tmp) {
|
if (tmp) {
|
||||||
tmp1 = strstr(tmp, "};");
|
tmp1 = strstr(tmp, "};");
|
||||||
}
|
}
|
||||||
sprintf(tmpbuf, "%s_m", tmpIconFile);
|
snprintf(tmpbuf, sizeof(tmpbuf), "%s_m", tmpIconFile);
|
||||||
if (tmp1) {
|
if (tmp1) {
|
||||||
tmp1 += 2; /* Go one char past the ";" */
|
tmp1 += 2; /* Go one char past the ";" */
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
@ -1067,6 +1066,7 @@ void UxDoEditPixmap(Widget wid, char *fname)
|
||||||
display_error_message(XtParent(wid), errPtr);
|
display_error_message(XtParent(wid), errPtr);
|
||||||
XtFree(errPtr);
|
XtFree(errPtr);
|
||||||
XtFree(mname);
|
XtFree(mname);
|
||||||
|
if (fd1 > -1) close(fd1);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
/***************************************/
|
/***************************************/
|
||||||
|
@ -1103,6 +1103,8 @@ void UxDoEditPixmap(Widget wid, char *fname)
|
||||||
XtFree(errPtr);
|
XtFree(errPtr);
|
||||||
if (mname) XtFree(mname);
|
if (mname) XtFree(mname);
|
||||||
XtFree((char *) buffer);
|
XtFree((char *) buffer);
|
||||||
|
if (fd1 > -1) close(fd1);
|
||||||
|
if (fd2 > -1) close(fd2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (lenFile2) {
|
if (lenFile2) {
|
||||||
|
@ -1127,11 +1129,13 @@ void UxDoEditPixmap(Widget wid, char *fname)
|
||||||
XtFree(errPtr);
|
XtFree(errPtr);
|
||||||
XtFree((char *) buffer);
|
XtFree((char *) buffer);
|
||||||
if (mname) XtFree(mname);
|
if (mname) XtFree(mname);
|
||||||
|
if (fd1 > -1) close(fd1);
|
||||||
|
if (fd2 > -1) close(fd2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (fd1 > -1) close(fd1);
|
if (fd1 > -1) close(fd1); fd1 = -1;
|
||||||
if (fd2 > -1) close(fd2);
|
if (fd2 > -1) close(fd2); fd2 = -1;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("final buffer = '%s'\n", buffer); /* debug */
|
printf("final buffer = '%s'\n", buffer); /* debug */
|
||||||
|
@ -1171,6 +1175,9 @@ void UxDoEditPixmap(Widget wid, char *fname)
|
||||||
TurnOnHourGlassAllWindows();
|
TurnOnHourGlassAllWindows();
|
||||||
ttRc = tt_message_send( m );
|
ttRc = tt_message_send( m );
|
||||||
DieFromToolTalkError( UxTopLevel, "tt_message_send", ttRc );
|
DieFromToolTalkError( UxTopLevel, "tt_message_send", ttRc );
|
||||||
|
|
||||||
|
if (fd1 > -1) close(fd1);
|
||||||
|
if (fd2 > -1) close(fd2);
|
||||||
}
|
}
|
||||||
#endif /* __TOOLTALK */
|
#endif /* __TOOLTALK */
|
||||||
|
|
||||||
|
|
|
@ -647,6 +647,7 @@ FiletypeData **ppFiletypeData,**ppnewFiletypeData;
|
||||||
ppFiletypeData[nfiletypes] = 0;
|
ppFiletypeData[nfiletypes] = 0;
|
||||||
/* return number of filetypes */
|
/* return number of filetypes */
|
||||||
*nftypes = nfiletypes+1;
|
*nftypes = nfiletypes+1;
|
||||||
|
free(execstr);
|
||||||
return ppFiletypeData;
|
return ppFiletypeData;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -707,8 +708,7 @@ GetKeywordValuePairs(char *s, int *id, int table)
|
||||||
if (!args[1])
|
if (!args[1])
|
||||||
{
|
{
|
||||||
int szArgs1 = strlen(s) + 1;
|
int szArgs1 = strlen(s) + 1;
|
||||||
if(s)
|
args[1] = (char *)malloc (szArgs1);
|
||||||
args[1] = (char *)malloc (szArgs1);
|
|
||||||
if (!args[1])
|
if (!args[1])
|
||||||
{
|
{
|
||||||
if(args[0])
|
if(args[0])
|
||||||
|
@ -881,7 +881,7 @@ int done=FALSE, argfound=FALSE,promptfound=FALSE;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (s1 && *s1)
|
else if (*s1)
|
||||||
{
|
{
|
||||||
strcat(exec_args[0],s1);
|
strcat(exec_args[0],s1);
|
||||||
if(argbuf) { free(argbuf); argbuf = NULL; }
|
if(argbuf) { free(argbuf); argbuf = NULL; }
|
||||||
|
@ -1018,8 +1018,10 @@ char *s1,*tmp,*s2,buf[10],*cts;
|
||||||
pFtD->fsFlags|=CA_FT_CNTLONG;
|
pFtD->fsFlags|=CA_FT_CNTLONG;
|
||||||
else if ( !strcmp(buf,"short") )
|
else if ( !strcmp(buf,"short") )
|
||||||
pFtD->fsFlags|=CA_FT_CNTSHORT;
|
pFtD->fsFlags|=CA_FT_CNTSHORT;
|
||||||
else
|
else {
|
||||||
|
free(cts);
|
||||||
return (-1);
|
return (-1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
while( *tmp && isspace(*tmp) ) tmp++;
|
while( *tmp && isspace(*tmp) ) tmp++;
|
||||||
s2=tmp;
|
s2=tmp;
|
||||||
|
|
Loading…
Reference in a new issue