{
_DtSimpleError (panel.app_name, DtError, NULL,
"Invalid Action -- %s", parse_source);
+ free (head_ptr);
return (False);
}
{
long rename_ws = (long) client_data;
- SwitchData * switch_data;
+ SwitchData * switch_data = NULL;
int i;
}
}
- SwitchRenameLabel (switch_data->buttons[rename_ws], panel.box_data[i]);
+ if(switch_data) {
+ SwitchRenameLabel (switch_data->buttons[rename_ws], panel.box_data[i]);
+ }
}
strcpy(srcname + srclen, entry->d_name);
remove (srcname);
}
+
+ closedir(dir);
}
}
pch = NULL;
}
- if (pchImageName)
- {
- free (pchImageName); /* temporary string */
- }
- if (pchL)
- {
- free (pchL); /* temporary string */
- }
+ free (pchImageName); /* temporary string */
+ free (pchL); /* temporary string */
}
}
}
* the resources or the user has specifically requested
* that "move" not be one of them.
*/
- if (pCD->clientFunctions & MWM_FUNC_MOVE)
+ if (pCD && (pCD->clientFunctions & MWM_FUNC_MOVE))
{
wmGD.preMove = True;
wmGD.preMoveX = buttonEvent->x_root;
if (embedded_client_list[i].wControl == control_data->icon)
{
Position remove_y;
- Dimension adjust_y;
+ Dimension adjust_y = 0;
/* This block will reparent the client window, move it */
/* deleted control height plus 5 pixels of form offset */
- adjust_y = XtHeight (control_data->icon) + 5;
+ if(control_data->icon) {
+ adjust_y = XtHeight (control_data->icon) + 5;
+ }
panel.embedded_client_count--;
Widget helpButton = NULL;
Widget backButton = NULL;
Widget closeButton = NULL;
+#ifdef NO_MESSAGE_CATALOG
XmString label = NULL;
+#endif
if((versionWidget != NULL) &&
(XtIsManaged(versionWidget)))
#endif
XtSetValues(closeButton, setArgs2, n2);
+#ifdef NO_MESSAGE_CATALOG
if(label)XmStringFree(label);
+#endif
printButton = DtHelpQuickDialogGetChild( versionWidget,
DtHELP_QUICK_PRINT_BUTTON );
int wsCnt;
int cCount;
int cachedCount=0;
- char dialogName[10];
+ char dialogName[18];
ClientData *pCD = NULL;
char *tTitle = NULL;
if (pSD->dtHelp.errorDialog == NULL)
{
+#ifdef NO_MESSAGE_CATALOG
XmString tmpXmString = (XmString)NULL;
+#endif
ac = 0;
XtSetArg (al[ac], XmNmessageString, xmsMessage); ac++;
pSD->dtHelp.errorDialog =
XmCreateErrorDialog (wParent, "Error Dialog", al, ac);
+#ifdef NO_MESSAGE_CATALOG
if (tmpXmString)
XmStringFree(tmpXmString);
+#endif
wTemp = XmMessageBoxGetChild (pSD->dtHelp.errorDialog,
XmDIALOG_HELP_BUTTON);
strncat (fileName, &wmGD.bitmapDirectory[1],
MAXWMPATH - strlen (fileName));
} else {
- strcpy (fileName, wmGD.bitmapDirectory);
+ snprintf(fileName, sizeof(fileName), "%s", wmGD.bitmapDirectory);
}
strncat (fileName, "/", MAXWMPATH - strlen (fileName));
strncat (fileName, string, MAXWMPATH - strlen (fileName));
* Compute position if necessary (system menu).
*/
- if (!(flags & POST_AT_XY))
+ if (pCD && !(flags & POST_AT_XY))
/* compute the position */
{
GetSystemMenuPosition (pCD, &x, &y, menuSpec->height, newContext);
return WmHI;
}
+ free(WmHI);
+
/* No valid screen */
return NULL;
}
* Run the file through the C-preprocessor
*/
PreprocessConfigFile ();
- if (pConfigStackTop->cppName)
+ if (pConfigStackTop && pConfigStackTop->cppName)
{
+ if(fileP) {
+ fclose(fileP);
+ }
/* open the result */
fileP = fopen (pConfigStackTop->cppName, "r");
}
else
{
/* put it together */
- strcpy(dsm, defaultSystemMenuName);
- strcat(dsm, "\n{\n");
- strcat(dsm, ResString);
- strcat(dsm, "\n");
- strcat(dsm, MovString);
- strcat(dsm, "\n");
- strcat(dsm, SizString);
- strcat(dsm, "\n");
- strcat(dsm, MinString);
- strcat(dsm, "\n");
- strcat(dsm, MaxString);
- strcat(dsm, "\n");
- strcat(dsm, LowString);
- strcat(dsm, "\n");
- strcat(dsm, " no-label f.separator\n");
+ snprintf(dsm, sizeof(dsm), "%s\n{\n%s)\n%s\n%s\n%s\n%s\n%s\n no-label f.separator\n",
+ defaultSystemMenuName, ResString, MovString,
+ SizString, MinString, MaxString, LowString);
#ifdef WSM
if (DtwmBehavior)
{
- strcat(dsm, OcpString);
- strcat(dsm, "\n");
- strcat(dsm, OcaString);
- strcat(dsm, "\n");
- strcat(dsm, RemString);
- strcat(dsm, "\n");
- strcat(dsm, " no-label f.separator\n");
+ snprintf(dsm, sizeof(dsm), "%s%s\n%s\n%s\n no-label f.separator\n",
+ dsm, OcpString, OcaString, RemString);
}
#endif /* WSM */
- strcat(dsm, CloString);
- strcat(dsm, "\n}");
+ snprintf(dsm, sizeof(dsm), "%s%s\n}", dsm, CloString);
if ((builtinSystemMenu =
(char *)XtMalloc ((unsigned int) (strlen(dsm) + 1))) == NULL)
/*
* Set up static variables for succeeding events
*/
- if ((pev->type == ButtonPress) || (pev->type == ButtonRelease))
+ if (pev && (pev->type == ButtonPress) || (pev->type == ButtonRelease))
{
pointerX = pev->xbutton.x_root;
pointerY = pev->xbutton.y_root;
XtFree(data);
}
- if (buffer)
- {
- XtFree(buffer);
- }
+ XtFree(buffer);
} /* END OF FUNCTION SaveWorkspaceResources */