dthelp: Change to ANSI function definitions
[oweals/cde.git] / cde / programs / dtmail / dtmail / DmxPrintOutput.C
index 54544a557dcb736350c823a0d8807916306c4646..2f8582bd64d85139579455c976645fef5eeeffcb 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: DmxPrintOutput.C /main/6 1997/07/07 13:57:21 mgreess $ */
 
 /*
@@ -55,7 +77,9 @@
 #include <Xm/DialogS.h>
 #include <Xm/Form.h>
 #include <Xm/Label.h>
+#if 0 && defined(PRINTING_SUPPORTED)
 #include <Xm/Print.h>
+#endif /* PRINTING_SUPPORTED */
 #include <Xm/Text.h>
 #include <Dt/Editor.h>
 
@@ -524,7 +548,7 @@ DmxPrintOutput::setWrapToFit (DtMailBoolean onoff)
 
 int DmxPrintOutput::getCharactersPerLine ()
 {
-    short      columns = 0;
+    XtArgVal   columns = 0;
 
 #ifdef USE_DTEDITOR
     XtVaGetValues(_editor, DtNcolumns, &columns, NULL);
@@ -538,7 +562,7 @@ int DmxPrintOutput::getCharactersPerLine ()
 
 int DmxPrintOutput::getNumLines ()
 {
-    int        total = 0;
+    XtArgVal   total = 0;
 
 #ifdef USE_DTEDITOR
 #else
@@ -548,7 +572,7 @@ int DmxPrintOutput::getNumLines ()
     //
     total -= 1;
 #endif
-    return(total);
+    return((int)total);
 }
 
 
@@ -704,7 +728,7 @@ void DmxPrintOutput::clearContents (void)
 int
 DmxPrintOutput::doGetLinesPerPage ()
 {
-    Dimension  lpp;
+    XtArgVal /* Dimension */   lpp;
 
     XtVaGetValues(_editor, XmNrows, &lpp, NULL);
     return ((int) lpp);
@@ -719,22 +743,27 @@ DmxPrintOutput::setInnerPageDimensions (
                                        Dimension left
                                           )
 {
+    XtArgVal height0, width0;
     Dimension  inner_height, inner_width, inner_x, inner_y,
                outer_height, outer_width,
                editor_height, footer_height, header_height;
 
     XtVaGetValues(_form,
-                 XmNheight, &outer_height,
-                 XmNwidth, &outer_width,
+                 XmNheight, &height0,
+                 XmNwidth, &width0,
                  NULL);
+    outer_height = (Dimension)height0;
+    outer_width = (Dimension)width0;
 
     XtVaGetValues(_header_left,
-                 XmNheight, &header_height,
+                 XmNheight, &height0,
                  NULL);
+    header_height = (Dimension)height0;
 
     XtVaGetValues(_footer_left,
-                 XmNheight, &footer_height,
+                 XmNheight, &height0,
                  NULL);
+    footer_height = (Dimension)height0;
 
     inner_x = left;
     inner_y = top;