Complete.Org: Mailing Lists: Archives: freeciv-dev: February 1999:
[Freeciv-Dev] alpha patch
Home

[Freeciv-Dev] alpha patch

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] alpha patch
From: Nicolas Brunel <brunel@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 24 Feb 1999 20:13:41 +0000 (GMT)

Here is  christopher C Chimelis <chris@xxxxxxxxxxxxxxxxxxxxxx> patch.

Some text has been moved to suit actual cvs version.

Regards,
Index: client/citydlg.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/citydlg.c,v
retrieving revision 1.29
diff -u -r1.29 citydlg.c
--- citydlg.c   1999/02/17 21:21:27     1.29
+++ citydlg.c   1999/02/24 19:03:05
@@ -728,7 +728,7 @@
 {
   struct unit *punit;
 
-  if((punit=unit_list_find(&game.player_ptr->units, (int)client_data)))
+  if((punit=unit_list_find(&game.player_ptr->units, (size_t)client_data)))
     activate_unit(punit);
   destroy_message_dialog(w);
 }
@@ -746,7 +746,7 @@
 
   destroy_message_dialog(w);
 
-  if((punit=unit_list_find(&game.player_ptr->units, (int)client_data)))  {
+  if((punit=unit_list_find(&game.player_ptr->units, (size_t)client_data)))  {
     activate_unit(punit);
     if((pcity=map_get_city(punit->x, punit->y)))
       if((pdialog=get_city_dialog(pcity)))
@@ -766,7 +766,7 @@
 
   destroy_message_dialog(w);
 
-  if((punit=unit_list_find(&game.player_ptr->units, (int)client_data)))  {
+  if((punit=unit_list_find(&game.player_ptr->units, (size_t)client_data)))  {
     activate_unit(punit);
     if((pcity=city_list_find_id(&game.player_ptr->cities, punit->homecity)))
       if((pdialog=get_city_dialog(pcity)))
@@ -784,7 +784,7 @@
 {
   struct unit *punit;
 
-  if((punit=unit_list_find(&game.player_ptr->units, (int)client_data)))
+  if((punit=unit_list_find(&game.player_ptr->units, (size_t)client_data)))
     request_unit_disband(punit);
 
   destroy_message_dialog(w);
@@ -799,7 +799,7 @@
 {
   struct unit *punit;
   
-  if((punit=unit_list_find(&game.player_ptr->units, (int)client_data)))
+  if((punit=unit_list_find(&game.player_ptr->units, (size_t)client_data)))
     request_unit_change_homecity(punit);
 
   destroy_message_dialog(w);
@@ -828,7 +828,7 @@
   Widget wd;
   XEvent *e = (XEvent*)call_data;
   
-  if((punit=unit_list_find(&game.player_ptr->units, (int)client_data)) &&
+  if((punit=unit_list_find(&game.player_ptr->units, (size_t)client_data)) &&
      (pcity=map_get_city(punit->x, punit->y)) &&
      (pdialog=get_city_dialog(pcity))) {
     
@@ -1157,7 +1157,7 @@
   struct city_dialog *pdialog;
   XEvent *e = (XEvent*)call_data;
   
-  if((punit=unit_list_find(&game.player_ptr->units, (int)client_data)))
+  if((punit=unit_list_find(&game.player_ptr->units, (size_t)client_data)))
     if((pcity=find_city_by_id(punit->homecity)))
       if((pdialog=get_city_dialog(pcity)))  {
        if(e->type==ButtonRelease && e->xbutton.button==2)  {
@@ -1489,7 +1489,7 @@
 {
   struct unit *punit;
 
-  if((punit=unit_list_find(&game.player_ptr->units, (int)client_data))) {
+  if((punit=unit_list_find(&game.player_ptr->units, (size_t)client_data))) {
     request_unit_upgrade(punit);
   }
   destroy_message_dialog(w);
@@ -1515,7 +1515,7 @@
   int ut1,ut2;
   int value;
 
-  if((punit=unit_list_find(&game.player_ptr->units, (int)client_data))) {
+  if((punit=unit_list_find(&game.player_ptr->units, (size_t)client_data))) {
     ut1 = punit->type;
     /* printf("upgrade_callback for %s\n", unit_types[ut1].name); */
 
Index: client/cityrep.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/cityrep.c,v
retrieving revision 1.3
diff -u -r1.3 cityrep.c
--- cityrep.c   1999/02/21 00:49:50     1.3
+++ cityrep.c   1999/02/24 19:03:06
@@ -495,7 +495,8 @@
 
   if(ret->list_index!=XAW_LIST_NONE && 
      (pcity=cities_in_list[ret->list_index])) {
-    int flag,i;
+    int flag;
+    size_t i;
     char buf[512];
 
     XtSetSensitive(city_change_command, TRUE);
@@ -559,7 +560,7 @@
     int build_nr;
     Boolean unit;
       
-    build_nr = (int) client_data;
+    build_nr = (size_t) client_data;
 
     if (build_nr >= B_LAST) {
       build_nr -= B_LAST;
Index: client/dialogs.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/dialogs.c,v
retrieving revision 1.20
diff -u -r1.20 dialogs.c
--- dialogs.c   1999/02/10 21:04:52     1.20
+++ dialogs.c   1999/02/24 19:03:06
@@ -1664,11 +1664,12 @@
 **************************************************************************/
 void taxrates_callback(Widget w, XtPointer client_data, XtPointer call_data)
 {
-  int i,tax_end,lux_end,sci_end;
+  int tax_end,lux_end,sci_end;
+  size_t i;
   int delta=10;
 
   struct packet_player_request packet;
-  i= (int)client_data;
+  i= (size_t)client_data;
   
   lux_end= game.player_ptr->economic.luxury;
   sci_end= lux_end + game.player_ptr->economic.science;
Index: client/diplodlg.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/diplodlg.c,v
retrieving revision 1.2
diff -u -r1.2 diplodlg.c
--- diplodlg.c  1999/01/17 09:44:27     1.2
+++ diplodlg.c  1999/02/24 19:03:07
@@ -617,10 +617,10 @@
 void diplomacy_dialog_tech_callback(Widget w, XtPointer client_data, 
                                    XtPointer call_data)
 {
-  int choice;
+  size_t choice;
   struct packet_diplomacy_info pa;
   
-  choice=(int)client_data;
+  choice=(size_t)client_data;
 
   pa.plrno0=choice/10000;
   pa.plrno1=(choice/100)%100;
@@ -639,10 +639,10 @@
 void diplomacy_dialog_city_callback(Widget w, XtPointer client_data, 
                                    XtPointer call_data)
 {
-  int choice;
+  size_t choice;
   struct packet_diplomacy_info pa;
   
-  choice=(int)client_data;
+  choice=(size_t)client_data;
 
   pa.plrno0=choice/100000;
   choice -= pa.plrno0 * 100000;
Index: client/helpdlg.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/helpdlg.c,v
retrieving revision 1.21
diff -u -r1.21 helpdlg.c
--- helpdlg.c   1999/02/20 05:13:17     1.21
+++ helpdlg.c   1999/02/24 19:03:07
@@ -1219,7 +1219,7 @@
 void help_tree_node_callback(Widget w, XtPointer client_data, 
                             XtPointer call_data)
 {
-  int tech=(int)client_data;
+  size_t tech=(size_t)client_data;
   
   if(!help_tree_destroy_children(w)) {
     if(advances[tech].req[0]!=A_NONE)
Index: client/mapctrl.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapctrl.c,v
retrieving revision 1.33
diff -u -r1.33 mapctrl.c
--- mapctrl.c   1999/02/24 09:32:51     1.33
+++ mapctrl.c   1999/02/24 19:03:08
@@ -79,9 +79,9 @@
 void name_new_city_callback(Widget w, XtPointer client_data, 
                           XtPointer call_data)
 {
-  int unit_id;
+  size_t unit_id;
   
-  if((unit_id=(int)client_data)) {
+  if((unit_id=(size_t)client_data)) {
     struct packet_unit_request req;
     req.unit_id=unit_id;
     strncpy(req.name, input_dialog_get_input(w), MAX_LENGTH_NAME);
Index: client/mapview.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapview.c,v
retrieving revision 1.26
diff -u -r1.26 mapview.c
--- mapview.c   1999/02/22 02:30:01     1.26
+++ mapview.c   1999/02/24 19:03:09
@@ -1478,7 +1478,7 @@
 void scrollbar_scroll_callback(Widget w, XtPointer client_data,
                             XtPointer position_val)
 {
-  int position=(int)position_val;
+  size_t position=(size_t)position_val;
 
 
   if(get_client_state()!=CLIENT_GAME_RUNNING_STATE)
Index: client/menu.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/menu.c,v
retrieving revision 1.22
diff -u -r1.22 menu.c
--- menu.c      1999/02/24 09:32:54     1.22
+++ menu.c      1999/02/24 19:03:10
@@ -370,7 +370,7 @@
 *****************************************************************/
 void game_menu_callback(Widget w, XtPointer client_data, XtPointer garbage)
 {
-  int pane_num = (int)client_data;
+  size_t pane_num = (size_t)client_data;
 
   switch(pane_num) {
   case MENU_GAME_FIND_CITY:
@@ -426,7 +426,7 @@
 *****************************************************************/
 void orders_menu_callback(Widget w, XtPointer client_data, XtPointer garbage)
 {
-  int pane_num = (int)client_data;
+  size_t pane_num = (size_t)client_data;
 
   switch(pane_num) {
    case MENU_ORDER_AUTO_SETTLER:
@@ -530,7 +530,7 @@
 *****************************************************************/
 void reports_menu_callback(Widget w, XtPointer client_data, XtPointer garbage)
 {
-  int pane_num = (int)client_data;
+  size_t pane_num = (size_t)client_data;
 
   switch(pane_num) {
    case MENU_REPORT_CITY:
@@ -566,7 +566,7 @@
 *****************************************************************/
 void help_menu_callback(Widget w, XtPointer client_data, XtPointer garbage)
 {
-  int pane_num = (int)client_data;
+  size_t pane_num = (size_t)client_data;
 
   switch(pane_num) {
   case MENU_HELP_CONTROLS:
Index: client/ratesdlg.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/ratesdlg.c,v
retrieving revision 1.2
diff -u -r1.2 ratesdlg.c
--- ratesdlg.c  1998/07/27 14:29:00     1.2
+++ ratesdlg.c  1999/02/24 19:03:10
@@ -361,7 +361,7 @@
 void rates_scroll_scroll_callback(Widget w, XtPointer client_data,
                                  XtPointer position_val)
 {
-  int pos=(int)position_val;
+  size_t pos=(size_t)position_val;
   int val;
   
   if(w==rates_tax_scroll) {
Index: client/repodlgs.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/repodlgs.c,v
retrieving revision 1.40
diff -u -r1.40 repodlgs.c
--- repodlgs.c  1999/02/17 21:21:33     1.40
+++ repodlgs.c  1999/02/24 19:03:11
@@ -188,7 +188,8 @@
   Widget  close_command;
   static char *tech_list_names_ptrs[A_LAST+1];
   static char tech_list_names[A_LAST+1][200];
-  int i, j, flag, num_list;
+  int j, flag, num_list;
+  size_t i;
   Dimension width;
   char current_text[512];
   char goal_text[512];
@@ -350,10 +351,10 @@
 {
   char current_text[512];
   struct packet_player_request packet;
-  int to;
+  size_t to;
   Boolean b;
 
-  to=(int)client_data;
+  to=(size_t)client_data;
 
   XtVaGetValues(science_help_toggle, XtNstate, &b, NULL);
   if (b == TRUE)
@@ -379,10 +380,10 @@
 {
   char goal_text[512];
   struct packet_player_request packet;
-  int to;
+  size_t to;
   Boolean b;
 
-  to=(int)client_data;
+  to=(size_t)client_data;
 
   XtVaGetValues(science_help_toggle, XtNstate, &b, NULL);
   if (b == TRUE)
@@ -442,7 +443,8 @@
     char text[512];
     static char *tech_list_names_ptrs[A_LAST+1];
     static char tech_list_names[A_LAST+1][200];
-    int i, j, flag;
+    int j, flag;
+    size_t i;
     char *report_title;
     
     report_title=get_report_title("Science Advisor");
@@ -894,7 +896,7 @@
 void upgrade_callback_yes(Widget w, XtPointer client_data, 
                                  XtPointer call_data)
 {
-  send_packet_unittype_info(&aconnection, (int)client_data, 
PACKET_UNITTYPE_UPGRADE);
+  send_packet_unittype_info(&aconnection, (size_t)client_data, 
PACKET_UNITTYPE_UPGRADE);
   destroy_message_dialog(w);
 }
 

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] alpha patch, Nicolas Brunel <=