Fix warnings on FreeBSD
[oweals/cde.git] / cde / programs / ttsnoop / messageProps_stubs.C.src
index bcc152c4c95cd4bfdbda228b032d91f3cfd5d5ae..e759859cdb7c9384ce41de7d837e479853dd4bfd 100644 (file)
@@ -21,6 +21,7 @@
  *  ** DELETE THE GENERATED COMMENTS!                                 **
  */
 
+#include <stdint.h>
 #include <stdio.h>
 #include <Xm/Xm.h>
 #include "dtb_utils.h"
@@ -40,7 +41,7 @@
  *** Add include files, types, macros, externs, and user functions here.
  ***/
 
-#if defined(linux) || defined(CSRG_BASED)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
 #include <strstream>
 #else
 #include <strstream.h>
@@ -96,7 +97,7 @@ messageProps2Msg(
 {
        Tt_message msg;
        XtVaGetValues( instance->messageProps_shellform,
-                      XmNuserData, &msg, 0 );
+                      XmNuserData, &msg, NULL );
        return msg;
 }
 
@@ -119,7 +120,7 @@ _DtTtMessageSetUpdating(
 )
 {
        tt_message_user_set( msg, (int) (long) _DtTtMessageUpdating,
-                            (void *)updating );
+                            (void *) (intptr_t)updating );
 }
 
 typedef enum {
@@ -140,7 +141,7 @@ _DtTtMessageWidgetUpdate(
        if (tt_is_err( status )) {
                printout = tt_status_message( status );
        }
-       XtVaSetValues( instance->messageText, XmNvalue, printout, 0 );
+       XtVaSetValues( instance->messageText, XmNvalue, printout, NULL );
        if (level == _DtTtMessageRePrint) {
                return;
        }
@@ -204,7 +205,7 @@ _DtTtMessageWidgetUpdate(
        }
 
        int val = tt_message_status( msg );
-       XtVaSetValues( instance->statusBox, DtNposition, val, 0 );
+       XtVaSetValues( instance->statusBox, DtNposition, val, NULL );
        char *status_string = tt_status_string( (Tt_status)val );
        DtTtSetLabel( instance->statusLabel, status_string );
        tt_free( status_string );
@@ -225,7 +226,7 @@ _DtTtMessageWidgetUpdate(
                choice = instance->classChoice_items.OFFER_item;
                break;
        }
-       XtVaSetValues( instance->classChoice, XmNmenuHistory, choice, 0 );
+       XtVaSetValues( instance->classChoice, XmNmenuHistory, choice, NULL );
 
        switch (tt_message_address( msg )) {
            case TT_PROCEDURE:
@@ -245,7 +246,7 @@ _DtTtMessageWidgetUpdate(
                choice = instance->addressChoice_items.ADDRESS_LAST_item;
                break;
        }
-       XtVaSetValues( instance->addressChoice, XmNmenuHistory, choice, 0 );
+       XtVaSetValues( instance->addressChoice, XmNmenuHistory, choice, NULL );
 
        switch (tt_message_scope( msg )) {
            case TT_SCOPE_NONE:
@@ -265,7 +266,7 @@ _DtTtMessageWidgetUpdate(
                choice = instance->scopeChoice_items.FILE_IN_SESSION_item;
                break;
        }
-       XtVaSetValues( instance->scopeChoice, XmNmenuHistory, choice, 0 );
+       XtVaSetValues( instance->scopeChoice, XmNmenuHistory, choice, NULL );
 
        switch (tt_message_disposition( msg )) {
            case TT_DISCARD:
@@ -282,7 +283,7 @@ _DtTtMessageWidgetUpdate(
                choice = instance->dispositionChoice_items.QUEUE_START_item;
                break;
        }
-       XtVaSetValues( instance->dispositionChoice, XmNmenuHistory, choice, 0);
+       XtVaSetValues( instance->dispositionChoice, XmNmenuHistory, choice, NULL);
 
        _DtTtMessageSetUpdating( msg, False );
 }
@@ -599,7 +600,7 @@ DtTtMessageWidgetCreate(
        dtb_message_props_message_props_initialize( instance, parent );
        widget = instance->messageProps;
 
-       XtVaSetValues( instance->messageProps_shellform, XmNuserData, msg, 0 );
+       XtVaSetValues( instance->messageProps_shellform, XmNuserData, msg, NULL );
        status = tt_message_user_set( msg, DtTtMsgWidgetKey, widget );
        if (tt_is_err( status )) {
                XtDestroyWidget( widget );
@@ -624,7 +625,7 @@ DtTtMessageWidgetCreate(
        labelStream << "Tt_message " << (void *)msg;
        XtVaSetValues( instance->messageProps,
                       XmNtitle, labelStream.str(),
-                      0 );
+                      NULL );
        delete labelStream.str();
 
        _DtTtMessageWidgetUpdate( instance, msg, _DtTtMessageFullUpdate );
@@ -1726,9 +1727,9 @@ setStatus(
            return;
     }
     int val;
-    XtVaGetValues( instance->statusBox, DtNposition, &val, 0 );
+    XtVaGetValues( instance->statusBox, DtNposition, &val, NULL );
     XmString statusName = DtTtStatusString( (Tt_status)val );
-    XtVaSetValues( instance->statusLabel, XmNlabelString, statusName, 0 );
+    XtVaSetValues( instance->statusLabel, XmNlabelString, statusName, NULL );
     XmStringFree( statusName );
     Tt_status status = tt_message_status_set( msg, val );
     DtTtSetLabel( instance->messageFooterLabel,