dthelp: Change to ANSI function definitions
[oweals/cde.git] / cde / programs / dtmail / dtmail / DmxPrintSetup.C
index 5e4f9f06d2821de5d3e41c38ef8a7c949cad408f..9c9f74884aee21f4bcb39ad2a612ac27bf4145d7 100644 (file)
@@ -1,3 +1,25 @@
+/*
+ * 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 libraries and programs; if not, write
+ * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+ * Floor, Boston, MA 02110-1301 USA
+ */
 /* $TOG: DmxPrintSetup.C /main/17 1997/09/03 17:34:59 mgreess $ */
 
 /*
@@ -94,7 +116,7 @@ DmxPrintSetup::DmxPrintSetup (
 
     _filename = (char*) malloc(MAXPATHLEN+1);
     if (NULL != _filename)
-      sprintf(_filename, "%s/dtmail_messages.ps", getenv("HOME"));
+      snprintf(_filename, MAXPATHLEN+1, "%s/dtmail_messages.ps", getenv("HOME"));
 
     _printCB = printCB;
     _cancelCB = cancelCB;
@@ -139,8 +161,8 @@ DmxPrintSetup::display (void)
     if (_dtprint_setup == NULL) return;
 
 #ifdef REUSE_PRINT_SETUP_DIALOGS
-    Position x1, y1, x2, y2;
-    Dimension w1, h1, w2, h2;
+    XtArgVal /* Position */ x1, y1, x2, y2;
+    XtArgVal /* Dimension */ w1, h1, w2, h2;
     XtVaGetValues(
                XtParent(_dtprint_setup),
                XmNx, &x1, XmNy, &y1,
@@ -303,7 +325,7 @@ DmxPrintSetup::createPrintSetupDialog (Widget parent)
                widgets->dtprint_setup,
                XmNhelpCallback,
                HelpCB,
-               DTMAILPRINTSETUPDIALOG);
+               (void *)DTMAILPRINTSETUPDIALOG);
 
     XtAddCallback(
                widgets->dtprint_setup,
@@ -422,7 +444,7 @@ DmxPrintSetup::detachPrintSetupDialog (void)
 void
 DmxPrintSetup::savePrintSetupOptions(DtPrintSetupData *print_data)
 {
-    unsigned char      is_set;
+    XtArgVal /* unsigned char */       is_set;
 
     XtVaGetValues(_widgets->print_separately_tb, XmNset, &is_set, NULL);
     _print_separately = (is_set == XmSET) ? DTM_TRUE : DTM_FALSE;
@@ -457,7 +479,7 @@ DmxPrintSetup::destinationChangedCB(
                                XtPointer)
 {
     PrintSetupWidgets  *widgets = (PrintSetupWidgets*) client_data;
-    Boolean            toggleFlag;
+    XtArgVal /* Boolean */ toggleFlag;
 
     if (NULL == checkbox_tb) return;