Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2002:
[Freeciv-Dev] Re: (PR#2534) civclient crash on FreeBSD 5.0
Home

[Freeciv-Dev] Re: (PR#2534) civclient crash on FreeBSD 5.0

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: mwlucas@xxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#2534) civclient crash on FreeBSD 5.0
From: "Jason Short via RT" <rt@xxxxxxxxxxxxxx>
Date: Thu, 12 Dec 2002 17:50:57 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Thu, 2002-12-12 at 17:16, mwlucas@xxxxxxxxxxxxxxxxxxxx via RT wrote:
> BTW, I tried the beta of 1.14.0.  Same behaviour.
> 
> Thanks for all your help!

Try this patch.

Question: what machine (chipset) are you running on?

Raimar: see http://www.eskimo.com/~scs/C-faq/q5.2.html.  It may, but
probably is not, better to cast the values directly into the proper
types (gpointer and some-function-pointer, irrespectively).  But the use
of 0 instead of NULL here is exactly what is warned against.

jason


? client/gui-sdl/.deps
? client/gui-sdl/Freeciv.h
? client/gui-sdl/Makefile
? client/gui-sdl/Makefile.in
Index: client//gui-gtk/dialogs.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/dialogs.c,v
retrieving revision 1.103
diff -u -r1.103 dialogs.c
--- client//gui-gtk/dialogs.c   2002/06/24 15:56:39     1.103
+++ client//gui-gtk/dialogs.c   2002/12/13 01:41:45
@@ -393,14 +393,15 @@
     popup_message_dialog(top_vbox, _("Bribe Enemy Unit"), buf,
                         dummy_close_callback, NULL,
                         _("_Yes"), diplomat_bribe_yes_callback, 0, 
-                        _("_No"), NULL, 0, 0);
+                        _("_No"), NULL, NULL, NULL);
   } else {
     my_snprintf(buf, sizeof(buf),
                _("Bribing the unit costs %d gold.\n"
                  "Treasury contains %d gold."), 
                punit->bribe_cost, game.player_ptr->economic.gold);
     popup_message_dialog(top_vbox, _("Traitors Demand Too Much!"), buf,
-                        dummy_close_callback, NULL, _("Darn"), NULL, 0, 0);
+                        dummy_close_callback, NULL, _("Darn"), NULL,
+                        NULL, NULL);
   }
 }
 
@@ -951,7 +952,7 @@
                pcity->name);
     popup_message_dialog(top_vbox, _("City can't be incited!"), buf,
                         diplomat_incite_close_callback, NULL,
-                        _("Darn"), NULL, 0, 0);
+                        _("Darn"), NULL, NULL, NULL);
   } else if (game.player_ptr->economic.gold >= pcity->incite_revolt_cost) {
     my_snprintf(buf, sizeof(buf),
                _("Incite a revolt for %d gold?\nTreasury contains %d gold."), 
@@ -959,7 +960,7 @@
    popup_message_dialog(top_vbox, _("Incite a Revolt!"), buf,
                        diplomat_incite_close_callback, NULL,
                       _("_Yes"), diplomat_incite_yes_callback, 0,
-                      _("_No"), NULL, 0, 0);
+                      _("_No"), NULL, NULL, NULL);
   } else {
     my_snprintf(buf, sizeof(buf),
                _("Inciting a revolt costs %d gold.\n"
@@ -967,8 +968,7 @@
                pcity->incite_revolt_cost, game.player_ptr->economic.gold);
    popup_message_dialog(top_vbox, _("Traitors Demand Too Much!"), buf,
                        diplomat_incite_close_callback, NULL,
-                      _("Darn"), NULL, 0, 
-                      0);
+                      _("Darn"), NULL, NULL, NULL);
   }
 }
 
@@ -1035,8 +1035,7 @@
                             _("Steal _Technology"), diplomat_steal_callback, 0,
                             _("Incite a _Revolt"), diplomat_incite_callback, 0,
                             _("_Keep moving"), diplomat_keep_moving_callback, 
0,
-                            _("_Cancel"), NULL, 0,
-                            0);
+                            _("_Cancel"), NULL, NULL, NULL);
       
       if(!diplomat_can_do_action(punit, DIPLOMAT_EMBASSY, dest_x, dest_y))
        message_dialog_button_set_sensitive(shl,"button0",FALSE);
@@ -1061,8 +1060,7 @@
                              _("Steal _Technology"), spy_steal_popup, 0,
                              _("Incite a _Revolt"), diplomat_incite_callback, 
0,
                              _("_Keep moving"), diplomat_keep_moving_callback, 
0,
-                             _("_Cancel"), NULL, 0,
-                             0);
+                               _("_Cancel"), NULL, NULL, NULL);
  
       if(!diplomat_can_do_action(punit, DIPLOMAT_EMBASSY, dest_x, dest_y))
        message_dialog_button_set_sensitive(shl,"button0",FALSE);
@@ -1094,8 +1092,7 @@
                                diplomat_close_callback, NULL,
                              _("_Bribe Enemy Unit"), diplomat_bribe_callback, 
0,
                              _("_Sabotage Enemy Unit"), 
spy_sabotage_unit_callback, 0,
-                             _("_Cancel"), NULL, 0,
-                             0);
+                               _("_Cancel"), NULL, NULL, NULL);
         
        if(!diplomat_can_do_action(punit, DIPLOMAT_BRIBE, dest_x, dest_y))
         message_dialog_button_set_sensitive(shl,"button0",FALSE);
@@ -1167,8 +1164,7 @@
                                        caravan_close_callback, NULL,
                           _("Establish 
_Traderoute"),caravan_establish_trade_callback, 0,
                           _("Help build 
_Wonder"),caravan_help_build_wonder_callback, 0,
-                          _("_Keep moving"),NULL, 0,
-                          0);
+                                       _("_Keep moving"),NULL, NULL, NULL);
   
   if (!can_establish_trade_route(phomecity, pdestcity)) {
     message_dialog_button_set_sensitive(caravan_dialog, "button0", FALSE);
@@ -1259,8 +1255,7 @@
                       _("You say you wanna revolution?"),
                       dummy_close_callback, NULL, 
                       _("_Yes"),revolution_callback_yes, 0,
-                      _("_No"),NULL, 0, 
-                      0);
+                      _("_No"), NULL, NULL, NULL);
 }
 
 /****************************************************************

[Prev in Thread] Current Thread [Next in Thread]