dthelp: Change to ANSI function definitions
[oweals/cde.git] / cde / programs / dtmail / dtmail / DmxPrintOptions.C
index 0b2fd900f90db69c80775ec5c2fd312e98a2e8da..f7a28e5f964d3b31cb067f609937f436f7065ad1 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: DmxPrintOptions.C /main/8 1997/04/30 09:44:12 mgreess $ */
 
 /*
@@ -48,6 +70,7 @@
 
 
 #include <stdio.h>
+#include <stdint.h>
 #include <X11/Intrinsic.h>
 #include <Xm/Xm.h>
 #include <Xm/DialogS.h>
@@ -188,11 +211,18 @@ DmxPrintOptions::DmxPrintOptions (
     char               **strings;
     void               **data;
     XmString           xms;
+    int                        i, j, nhdrftrs;
 
     _iom_array = new DtVirtArray<IndexedOptionMenu *>(10);
     _propui_array = new DtVirtArray<PropUiItem *>(10);
     _propui_array_iterator = 0;
     _parent = parent;
+    _prop_source = NULL;
+    _hdrftr_frame = NULL;
+    _margin_frame = NULL;
+    _msgsep_iom = NULL;
+    _prthdr_iom = NULL;
+
 
     //
     //  Create form to hold the printing options
@@ -218,7 +248,7 @@ DmxPrintOptions::DmxPrintOptions (
     nitems = DMX_ARRAY_SIZE(hdrftr_values);;
     strings = (char **) XtMalloc( nitems * sizeof(char*) );
     data = (void **) XtMalloc( nitems * sizeof(void*) );
-    for (int i=0; i<nitems; i++)
+    for (i=0; i<nitems; i++)
     {
         data[i] = (void*) hdrftr_values[i].prop_string;
         strings[i] = GETMSG(
@@ -243,7 +273,7 @@ DmxPrintOptions::DmxPrintOptions (
     //
     menu_buttons = NULL;
     _DtPrintHdrFtrFrameMenuWidgets( _hdrftr_frame, NULL, NULL, &menu_buttons);
-    for (int j=0, nhdrftrs=DMX_ARRAY_SIZE(hdrftr_keys); j<nhdrftrs; j++)
+    for (j=0, nhdrftrs=DMX_ARRAY_SIZE(hdrftr_keys); j<nhdrftrs; j++)
     {
         w = _DtPrintHdrFtrFrameEnumToWidget(
                                _hdrftr_frame,
@@ -294,7 +324,7 @@ DmxPrintOptions::DmxPrintOptions (
                                        _FROM_MAILRC,
                                        margin_keys[j].key,
                                        DmxPrintOptions::isValidMarginSpec,
-                                       (void*) margin_keys[j].which);
+                                       (void*) (intptr_t) margin_keys[j].which);
         _propui_array->append(pui);
     }
 
@@ -649,7 +679,8 @@ DmxPrintOptions::isValidMarginSpec(PropUiItem* pui, void* data)
     char       *marginSpec = NULL;
     XtEnum     parseError;
     Widget     text;
-    _DtPrintMarginEnum which = (_DtPrintMarginEnum) data;
+
+    _DtPrintMarginEnum which = (_DtPrintMarginEnum)(long)data;
 
     text = pui->getWidget();
     if (text)