+/*
+ * CDE - Common Desktop Environment
+ *
+ * Copyright (c) 1993-2012, The Open Group. All rights reserved.
+ *
+ * These libraries and programs are free software; you can
+ * redistribute them and/or modify them under the terms of the GNU
+ * Lesser General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * These libraries and programs are distributed in the hope that
+ * they will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with these librararies and programs; if not, write
+ * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+ * Floor, Boston, MA 02110-1301 USA
+ */
/* $TOG: ca_aux.c /main/10 1999/09/17 15:44:00 mgreess $ */
/******************************************************************************/
/* */
#include <Dt/IconFile.h>
#include "dtcreate.h"
+#include "af_aux.h"
#include "ca_aux.h"
-#include "cmnutils.h"
+#include "cmncbs.h"
#include "cmnrtns.h"
+#include "cmnutils.h"
#include "CreateActionAppShell.h"
#include "Confirmed.h"
+#include "ErrorDialog.h"
+#include "FileCharacteristics.h"
+
+/* from main.c */
+extern void RemoveTmpIconFiles( void );
/******************************************************************************/
/* */
/* External Variables */
/* */
/******************************************************************************/
-extern Dimension wintypeheight, winheight, xprtheight, newheight;
+extern XtArgVal /* Dimension */ wintypeheight, winheight, xprtheight, newheight;
/******************************************************************************/
/* */
void activateCB_ExpertOption (Widget wid, XtPointer client_data,
XtPointer *cbs)
{
- Dimension ca_width;
+ XtArgVal /* Dimension */ ca_width;
if (!XtIsManaged(XprtOptionForm)) {
/**********************************************************************/
printf("DblClick icon callback.\n");
#endif
- activateCB_edit_icon(wid, CA_ACTION_ICONS, cbs);
+ activateCB_edit_icon(wid, (XtPointer)CA_ACTION_ICONS,
+ (XmPushButtonCallbackStruct *)cbs /* unused anyway */);
}
return;
char *ptr;
char tmpbuf[50];
char *pre, *suf, *title;
+ size_t len;
if (!CreateActionAppShellCheckFields()) {
pre = GETMESSAGE(3, 10, "Create Action");
suf = GETMESSAGE(7, 10, "Add Datatype");
- title = XtMalloc(strlen(pre) + strlen(suf) + 2);
- sprintf(title, "%s - %s", pre, suf);
+ len = strlen(pre) + strlen(suf) + 4;
+ title = XtMalloc(len);
+ snprintf(title,len - 1,"%s - %s", pre, suf);
XtVaSetValues (AddFiletype,
RES_CONVERT (XmNdialogTitle, title ),
int selecteditem;
char *msgPtr1, *msgPtr2, *fmtPtr, *errPtr;
char *pre, *suf, *title;
+ size_t len;
pre = GETMESSAGE(3, 10, "Create Action");
suf = GETMESSAGE(7, 11, "Edit Datatype");
- title = XtMalloc(strlen(pre) + strlen(suf) + 2);
- sprintf(title, "%s - %s", pre, suf);
+ len = strlen(pre) + strlen(suf) + 4;
+ title = XtMalloc(len);
+ snprintf(title,len - 1, "%s - %s", pre, suf);
/**************************************************************************/
/* Determine the selected list item. */
msgPtr2 = XtNewString(GETMESSAGE(5, 130,
"Please select the Datatype you would like to Edit."));
fmtPtr = "%s\n%s";
- errPtr = XtMalloc((strlen(msgPtr1) + strlen(msgPtr2) +
- strlen(fmtPtr) + 1) * sizeof(char));
- sprintf(errPtr, fmtPtr, msgPtr1, msgPtr2);
+ len = (strlen(msgPtr1) + strlen(msgPtr2) +
+ strlen(fmtPtr) + 3);
+ errPtr = XtMalloc(len);
+ snprintf(errPtr,len - 1, fmtPtr, msgPtr1, msgPtr2);
XtFree(msgPtr2);
XtFree(msgPtr1);
display_error_message(CreateActionAppShell, errPtr);