? out ? diff ? full.splint.out ? all.diff ? float.diff ? make.out ? common/a.c Index: ai/advspace.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/ai/advspace.c,v retrieving revision 1.5 diff -u -r1.5 advspace.c --- ai/advspace.c 2000/10/02 19:48:05 1.5 +++ ai/advspace.c 2002/02/07 19:38:51 @@ -29,7 +29,7 @@ { struct government *g = get_gov_pplayer(pplayer); struct packet_spaceship_action packet; - int i,retval=0; + int retval=0; while (ship->modules > (ship->habitation + ship->life_support + ship->solar_panels)) { @@ -105,6 +105,7 @@ req = modules_info[2].required; } else { int i; + for(i=0; ifuel > (i/2)) || (i%2==1 && ship->propulsion > (i/2))) { @@ -116,6 +117,8 @@ } } if (req == -1) { + int i; + for(i=0; ihabitation > (i/3)) || (i%3==1 && ship->life_support > (i/3)) @@ -128,6 +131,8 @@ } } if (req == -1) { + int i; + for(i=0; istructure[i]) { req = i; Index: ai/aiunit.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/ai/aiunit.c,v retrieving revision 1.162 diff -u -r1.162 aiunit.c --- ai/aiunit.c 2002/02/07 17:23:30 1.162 +++ ai/aiunit.c 2002/02/07 19:38:52 @@ -936,14 +936,17 @@ /* The case where the bodyguard has moves left and could meet us en route is not handled properly. There should be a way to do it with dir_ok but I'm tired now. -- Syela */ if (punit->ai.bodyguard < 0) { - adjc_iterate(punit->x, punit->y, i, j) { - unit_list_iterate(map_get_tile(i, j)->units, aunit) { + adjc_iterate(punit->x, punit->y, x2, y2) { + unit_list_iterate(map_get_tile(x2, y2)->units, aunit) { if (aunit->ai.charge == punit->id) { freelog(LOG_DEBUG, "Bodyguard at (%d, %d) is adjacent to (%d, %d)", - i, j, punit->x, punit->y); - if (aunit->moves_left) return(0); - else return handle_unit_move_request(punit, i, j, FALSE, FALSE); + x2, y2, punit->x, punit->y); + if (aunit->moves_left) { + return (0); + } else { + return handle_unit_move_request(punit, x2, y2, FALSE, FALSE); + } } } unit_list_iterate_end; } adjc_iterate_end; @@ -1923,10 +1926,9 @@ unitids = fc_realloc(unitids, max_units * sizeof(int)); } index = 0; - unit_list_iterate(pplayer->units, punit) { - unitids[index++] = punit->id; - } - unit_list_iterate_end; + unit_list_iterate(pplayer->units, punit2) { + unitids[index++] = punit2->id; + } unit_list_iterate_end; for (index = 0; index < count; index++) { punit = player_find_unit_by_id(pplayer, unitids[index]); Index: client/clinet.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/clinet.c,v retrieving revision 1.56 diff -u -r1.56 clinet.c --- client/clinet.c 2002/02/07 10:24:14 1.56 +++ client/clinet.c 2002/02/07 19:38:53 @@ -451,7 +451,7 @@ char urlbuf[512]; char *urlpath; char *server; - int port; + int port_no; char str[512]; char machine_string[128]; #ifdef HAVE_UNAME @@ -477,33 +477,36 @@ server = &urlbuf[strlen("http://")]; { - char *s; - if ((s = strchr(server,':'))) { - port = atoi(&s[1]); - if (!port) { - port = 80; + char *cp = strchr(server, ':'); + if (cp != NULL) { + port_no = atoi(&cp[1]); + if (!port_no) { + port_no = 80; } - s[0] = '\0'; - ++s; - while (isdigit(s[0])) {++s;} + cp[0] = '\0'; + ++cp; + while (isdigit(cp[0])) { + ++cp; + } } else { - port = 80; - if (!(s = strchr(server,'/'))) { - s = &server[strlen(server)]; + port_no = 80; + cp = strchr(server,'/'); + if (cp == NULL) { + cp = &server[strlen(server)]; } - } /* s now points past the host[:port] part */ + } /* cp now points past the host[:port] part */ - if (s[0] == '/') { - s[0] = '\0'; - ++s; - } else if (s[0]) { + if (cp[0] == '/') { + cp[0] = '\0'; + ++cp; + } else if (cp[0]) { mystrlcpy(errbuf, _("Invalid $http_proxy value, cannot find separating '/'"), n_errbuf); /* which is obligatory if more characters follow */ return NULL; } - urlpath = s; + urlpath = cp; } if (!fc_lookup_host(server, &addr)) { @@ -511,7 +514,7 @@ return NULL; } - addr.sin_port = htons(port); + addr.sin_port = htons(port_no); if((s = socket(AF_INET, SOCK_STREAM, 0)) == -1) { mystrlcpy(errbuf, mystrerror(errno), n_errbuf); Index: client/control.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/control.c,v retrieving revision 1.65 diff -u -r1.65 control.c --- client/control.c 2002/02/07 08:45:19 1.65 +++ client/control.c 2002/02/07 19:38:54 @@ -435,18 +435,15 @@ } while (genlist_size(&arrival_queue)) { - int diplomat_id, victim_id; struct city *pcity; struct unit *punit; p_ids = genlist_get(&arrival_queue, 0); genlist_unlink(&arrival_queue, p_ids); - diplomat_id = p_ids[0]; - victim_id = p_ids[1]; + pdiplomat = player_find_unit_by_id(game.player_ptr, p_ids[0]); + pcity = find_city_by_id(p_ids[1]); + punit = find_unit_by_id(p_ids[1]); free(p_ids); - pdiplomat = player_find_unit_by_id(game.player_ptr, diplomat_id); - pcity = find_city_by_id(victim_id); - punit = find_unit_by_id(victim_id); if (!pdiplomat || !unit_flag(pdiplomat, F_DIPLOMAT)) continue; @@ -1058,9 +1055,9 @@ punit->hp=pinfo->hp; unit_list_insert(&map_get_tile(punit->x, punit->y)->units, punit); - square_iterate(punit->x, punit->y, 2, x, y) { + square_iterate(punit->x, punit->y, 2, x2, y2) { int refresh = 0; - unit_list_iterate(map_get_tile(x, y)->units, pu) { + unit_list_iterate(map_get_tile(x2, y2)->units, pu) { if (unit_flag(pu, F_PARTIAL_INVIS)) { refresh = 1; goto out; @@ -1068,7 +1065,7 @@ } unit_list_iterate_end; out: if (refresh) { - refresh_tile_mapcanvas(x, y, 1); + refresh_tile_mapcanvas(x2, y2, 1); } } square_iterate_end; @@ -1126,20 +1123,20 @@ } if(unit_list_size(&ptile->units)==1) { - struct unit *punit=unit_list_get(&ptile->units, 0); - if(game.player_idx==punit->owner) { - if(can_unit_do_activity(punit, ACTIVITY_IDLE)) { - request_unit_selected(punit); + struct unit *punit2 = unit_list_get(&ptile->units, 0); + if(game.player_idx==punit2->owner) { + if(can_unit_do_activity(punit2, ACTIVITY_IDLE)) { + request_unit_selected(punit2); } } } else if(unit_list_size(&ptile->units)>=2) { - unit_list_iterate(ptile->units, punit) - if (punit->owner == game.player_idx) { + unit_list_iterate(ptile->units, punit2) { + if (punit2->owner == game.player_idx) { popup_unit_select_dialog(ptile); return; } - unit_list_iterate_end; + } unit_list_iterate_end; } } Index: client/packhand.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/packhand.c,v retrieving revision 1.212 diff -u -r1.212 packhand.c --- client/packhand.c 2002/02/07 17:23:32 1.212 +++ client/packhand.c 2002/02/07 19:38:56 @@ -907,16 +907,19 @@ } if(punit->homecity!=packet->homecity) { /* change homecity */ - struct city *pcity; - if((pcity=find_city_by_id(punit->homecity))) { - unit_list_unlink(&pcity->units_supported, punit); - refresh_city_dialog(pcity); + struct city *pcity2; + + pcity2 = find_city_by_id(punit->homecity); + if (pcity2 != NULL) { + unit_list_unlink(&pcity2->units_supported, punit); + refresh_city_dialog(pcity2); } punit->homecity=packet->homecity; - if((pcity=find_city_by_id(punit->homecity))) { - unit_list_insert(&pcity->units_supported, punit); - repaint_city=1; + pcity2 = find_city_by_id(punit->homecity); + if (pcity2 != NULL) { + unit_list_insert(&pcity2->units_supported, punit); + repaint_city = 1; } } @@ -925,13 +928,13 @@ repaint_unit=1; } if (punit->type!=packet->type) { - struct city *pcity = map_get_city(punit->x, punit->y); + struct city *pcity2 = map_get_city(punit->x, punit->y); punit->type=packet->type; repaint_unit=1; repaint_city=1; - if (pcity && (pcity->id != punit->homecity)) { - refresh_city_dialog(pcity); + if (pcity2 && (pcity2->id != punit->homecity)) { + refresh_city_dialog(pcity2); } } if (punit->ai.control!=packet->ai) { @@ -940,8 +943,7 @@ } if(punit->x!=packet->x || punit->y!=packet->y) { /* change position */ - struct city *pcity; - pcity=map_get_city(punit->x, punit->y); + struct city *pcity2 = map_get_city(punit->x, punit->y); if(tile_get_known(packet->x, packet->y) == TILE_KNOWN) { do_move_unit(punit, packet); @@ -953,25 +955,25 @@ refresh_tile_mapcanvas(packet->x, packet->y, 1); return; } - if(pcity) { - if(pcity->id==punit->homecity) + if(pcity2) { + if(pcity2->id==punit->homecity) repaint_city=1; else - refresh_city_dialog(pcity); + refresh_city_dialog(pcity2); } - if((pcity=map_get_city(punit->x, punit->y))) { - if(pcity->id == punit->homecity) + if((pcity2=map_get_city(punit->x, punit->y))) { + if(pcity2->id == punit->homecity) repaint_city=1; else - refresh_city_dialog(pcity); + refresh_city_dialog(pcity2); if(unit_flag(punit, F_CARAVAN) && (!game.player_ptr->ai.control || ai_popup_windows) && punit->owner==game.player_idx && (punit->activity!=ACTIVITY_GOTO || same_pos(punit->goto_dest_x, punit->goto_dest_y, - pcity->x, pcity->y)) + pcity2->x, pcity2->y)) && (unit_can_help_build_wonder_here(punit) || unit_can_est_traderoute_here(punit))) { process_caravan_arrival(punit); @@ -1350,7 +1352,7 @@ { struct government *g = get_gov_pplayer(pplayer); struct packet_spaceship_action packet; - int i; + //int i; if (ship->modules > (ship->habitation + ship->life_support + ship->solar_panels)) { @@ -1427,6 +1429,7 @@ req = modules_info[2].required; } else { int i; + for(i=0; ifuel > (i/2)) || (i%2==1 && ship->propulsion > (i/2))) { @@ -1438,6 +1441,8 @@ } } if (req == -1) { + int i; + for(i=0; ihabitation > (i/3)) || (i%3==1 && ship->life_support > (i/3)) @@ -1450,6 +1455,8 @@ } } if (req == -1) { + int i; + for(i=0; istructure[i]) { req = i; Index: client/tilespec.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/tilespec.c,v retrieving revision 1.61 diff -u -r1.61 tilespec.c --- client/tilespec.c 2002/02/07 17:23:32 1.61 +++ client/tilespec.c 2002/02/07 19:38:58 @@ -1132,8 +1132,8 @@ for (dir = 0; dir < 8; dir++) { tspecial_near[dir] = S_NO_SPECIAL; } - adjc_dir_iterate(x, y, x1, y1, dir) { - tspecial_near[dir] = map_get_special(x1, y1); + adjc_dir_iterate(x, y, x1, y1, dir2) { + tspecial_near[dir2] = map_get_special(x1, y1); } adjc_dir_iterate_end; /* @@ -1272,7 +1272,7 @@ /* put coasts */ if (ttype == T_OCEAN) { for (i = 0; i < 4; i++) { - int array_index, dir; + int array_index; switch (i) { case 0: /* up */ @@ -1391,8 +1391,8 @@ for (dir = 0; dir < 8; dir++) { tspecial_near[dir] = S_NO_SPECIAL; } - adjc_dir_iterate(abs_x0, abs_y0, x, y, dir) { - tspecial_near[dir] = map_get_special(x, y); + adjc_dir_iterate(abs_x0, abs_y0, x, y, dir2) { + tspecial_near[dir2] = map_get_special(x, y); } adjc_dir_iterate_end; /* Index: client/agents/cma_core.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/agents/cma_core.c,v retrieving revision 1.5 diff -u -r1.5 cma_core.c --- client/agents/cma_core.c 2002/02/07 17:23:33 1.5 +++ client/agents/cma_core.c 2002/02/07 19:39:00 @@ -597,12 +597,12 @@ } if (!last_request_id && ALWAYS_APPLY_AT_SERVER) { - struct packet_generic_integer packet; + struct packet_generic_integer packet2; - packet.value = pcity->id; + packet2.value = pcity->id; first_request_id = last_request_id = send_packet_generic_integer(&aconnection, PACKET_CITY_REFRESH, - &packet); + &packet2); stats.refresh_forced++; } Index: client/gui-gtk/chatline.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/chatline.c,v retrieving revision 1.15 diff -u -r1.15 chatline.c --- client/gui-gtk/chatline.c 2001/11/30 12:50:36 1.15 +++ client/gui-gtk/chatline.c 2002/02/07 19:39:00 @@ -48,11 +48,10 @@ send_packet_generic_message(&aconnection, PACKET_CHAT_MSG, &apacket); if (genlist_size(&history_list) >= MAX_CHATLINE_HISTORY) { - void *data; + void *old_data = genlist_get(&history_list, -1); - data=genlist_get(&history_list, -1); - genlist_unlink(&history_list, data); - free(data); + genlist_unlink(&history_list, old_data); + free(old_data); } genlist_insert(&history_list, mystrdup(theinput), 0); Index: client/gui-gtk/dialogs.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/dialogs.c,v retrieving revision 1.84 diff -u -r1.84 dialogs.c --- client/gui-gtk/dialogs.c 2002/02/07 17:23:34 1.84 +++ client/gui-gtk/dialogs.c 2002/02/07 19:39:02 @@ -2203,9 +2203,7 @@ **************************************************************************/ static void races_buttons_callback( GtkWidget *w, gpointer data ) { - int selected, selected_sex, selected_style; char *s; - struct packet_alloc_nation packet; if(w==races_quit_command) { @@ -2216,17 +2214,17 @@ return; } - if((selected=races_buttons_get_current())==-1) { + if (races_buttons_get_current() == -1) { append_output_window(_("You must select a nation.")); return; } - if((selected_sex=sex_buttons_get_current())==-1) { + if (sex_buttons_get_current() == -1) { append_output_window(_("You must select your sex.")); return; } - if((selected_style=city_style_get_current())==-1) { + if (city_style_get_current() == -1) { append_output_window(_("You must select your city style.")); return; } @@ -2234,9 +2232,9 @@ s = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(races_name)->entry)); /* perform a minimum of sanity test on the name */ - packet.nation_no=selected; - packet.is_male = selected_sex; - packet.city_style = city_style_idx[selected_style]; + packet.nation_no = races_buttons_get_current(); + packet.is_male = sex_buttons_get_current(); + packet.city_style = city_style_idx[city_style_get_current()]; sz_strlcpy(packet.name, (char*)s); if(!get_sane_name(packet.name)) { Index: common/diptreaty.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/diptreaty.c,v retrieving revision 1.9 diff -u -r1.9 diptreaty.c --- common/diptreaty.c 2001/09/21 20:04:29 1.9 +++ common/diptreaty.c 2002/02/07 19:39:03 @@ -67,7 +67,7 @@ int add_clause(struct Treaty *ptreaty, struct player *pfrom, enum clause_type type, int val) { - struct Clause *pclause; + struct Clause *pclause2; if (type == CLAUSE_ADVANCE && !tech_exists(val)) { freelog(LOG_ERROR, "Illegal tech value %i in clause.", val); @@ -99,13 +99,13 @@ } } clause_list_iterate_end; - pclause=fc_malloc(sizeof(struct Clause)); + pclause2=fc_malloc(sizeof(struct Clause)); - pclause->type=type; - pclause->from=pfrom; - pclause->value=val; + pclause2->type=type; + pclause2->from=pfrom; + pclause2->value=val; - clause_list_insert_back(&ptreaty->clauses, pclause); + clause_list_insert_back(&ptreaty->clauses, pclause2); ptreaty->accept0=0; ptreaty->accept1=0; Index: common/game.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/game.c,v retrieving revision 1.119 diff -u -r1.119 game.c --- common/game.c 2002/02/07 17:23:38 1.119 +++ common/game.c 2002/02/07 19:39:04 @@ -435,7 +435,6 @@ int civ_score(struct player *pplayer) { int i; - struct city *pcity; int landarea, settledarea; static struct claim_map cmap = { NULL, NULL, NULL }; @@ -511,10 +510,13 @@ if (is_military_unit(punit)) pplayer->score.units++; unit_list_iterate_end; - for (i=0;iscore.wonders++; + for (i = 0; i < game.num_impr_types; i++) { + if (is_wonder(i)) { + struct city *pcity = find_city_by_id(game.global_wonders[i]); + if (pcity != NULL && player_owns_city(pplayer, pcity)) { + pplayer->score.wonders++; + } + } } /* How much should a spaceship be worth?? Index: common/registry.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/registry.c,v retrieving revision 1.39 diff -u -r1.39 registry.c --- common/registry.c 2002/02/07 17:23:41 1.39 +++ common/registry.c 2002/02/07 19:39:05 @@ -1050,14 +1050,14 @@ /* Do a reverse search of sections, since we're most likely * to be adding to the lastmost section. */ - section_list_iterate_rev(*my_section_file->sections, psection) { - if(strcmp(psection->name, sec_name)==0) { + section_list_iterate_rev(*my_section_file->sections, psection2) { + if(strcmp(psection2->name, sec_name)==0) { /* This DOES NOT check whether the entry already exists in * the section, to avoid O(N^2) behaviour. */ pentry = sbuf_malloc(sb, sizeof(struct entry)); pentry->name = sbuf_strdup(sb, ent_name); - entry_list_insert_back(&psection->entries, pentry); + entry_list_insert_back(&psection2->entries, pentry); return pentry; } } Index: common/shared.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/shared.c,v retrieving revision 1.70 diff -u -r1.70 shared.c --- common/shared.c 2002/02/07 17:23:41 1.70 +++ common/shared.c 2002/02/07 19:39:06 @@ -640,7 +640,7 @@ static int num_dirs = 0; static char **dirs = NULL; static struct astring realfile = ASTRING_INIT; - int i; + int j; if (path == NULL) { char *tok; @@ -704,7 +704,7 @@ } if (filename == NULL) { - int len = 1; /* in case num_dirs==0 */ + int i, len = 1; /* in case num_dirs==0 */ int seplen = strlen(PATH_SEPARATOR); for(i=0; iis_alive) whole_map_iterate(x, y) { map_change_seen(x, y, plr, +1); @@ -1160,10 +1158,12 @@ ascii_hex2bin(ch, 3)); { - int j; struct dumb_city *pdcity; - i = secfile_lookup_int(file, "player%d.total_ncities", plrno); + int j, i = secfile_lookup_int(file, "player%d.total_ncities", plrno); + for (j = 0; j < i; j++) { + int x, y; + pdcity = fc_malloc(sizeof(struct dumb_city)); pdcity->id = secfile_lookup_int(file, "player%d.dc%d.id", plrno, j); x = secfile_lookup_int(file, "player%d.dc%d.x", plrno, j); @@ -1306,7 +1306,6 @@ if (ship->state != SSHIP_NONE) { char prefix[32]; char st[NUM_SS_STRUCTURALS+1]; - int i; my_snprintf(prefix, sizeof(prefix), "player%d.spaceship", plrno); @@ -2074,7 +2073,7 @@ { int i; int version; - char options[512]; + char options_str[512]; char temp[B_LAST+1]; version = MAJOR_VERSION *10000 + MINOR_VERSION *100 + PATCH_VERSION; @@ -2090,22 +2089,22 @@ secfile_insert_str(file, srvarg.metaserver_info_line, "game.metastring"); secfile_insert_str(file, meta_addr_port(), "game.metaserver"); - sz_strlcpy(options, SAVEFILE_OPTIONS); + sz_strlcpy(options_str, SAVEFILE_OPTIONS); if (myrand_is_init()) { - sz_strlcat(options, " unirandom"); /* backward compat */ + sz_strlcat(options_str, " unirandom"); /* backward compat */ } if (game.is_new_game) { if (map.num_start_positions>0) { - sz_strlcat(options, " startpos"); + sz_strlcat(options_str, " startpos"); } if (map.have_specials) { - sz_strlcat(options, " specials"); + sz_strlcat(options_str, " specials"); } if (map.have_rivers_overlay && !map.have_specials) { - sz_strlcat(options, " riversoverlay"); + sz_strlcat(options_str, " riversoverlay"); } } - secfile_insert_str(file, options, "savefile.options"); + secfile_insert_str(file, options_str, "savefile.options"); secfile_insert_int(file, game.gold, "game.gold"); secfile_insert_int(file, game.tech, "game.tech"); Index: server/srv_main.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/srv_main.c,v retrieving revision 1.59 diff -u -r1.59 srv_main.c --- server/srv_main.c 2002/02/07 17:23:46 1.59 +++ server/srv_main.c 2002/02/07 19:39:14 @@ -244,9 +244,9 @@ pplayer=city_owner(pcity); if (game.civstyle == 1) { for(i=0; ix, pcity->y, 0); - city_list_iterate_end; + city_list_iterate(game.players[i].cities, pcity2) { + show_area(pplayer, pcity2->x, pcity2->y, 0); + } city_list_iterate_end; } } else { map_know_all(pplayer); @@ -1474,7 +1474,6 @@ static void generate_ai_players(void) { Nation_Type_id nation; - char player_name[MAX_LEN_NAME]; struct player *pplayer; int i, old_nplayers; @@ -1542,17 +1541,18 @@ } for(;game.nplayers < game.aifill;) { + char ai_player_name[MAX_LEN_NAME]; nation = mark_nation_as_used(nations_avail[myrand(num_nations_avail)]); - pick_ai_player_name(nation, player_name); + pick_ai_player_name(nation, ai_player_name); old_nplayers = game.nplayers; - accept_new_player(player_name, NULL); + accept_new_player(ai_player_name, NULL); pplayer = get_player(old_nplayers); if (!((game.nplayers == old_nplayers+1) - && strcmp(player_name, pplayer->name)==0)) { + && strcmp(ai_player_name, pplayer->name)==0)) { con_write(C_FAIL, _("Error creating new ai player: %s\n"), - player_name); + ai_player_name); break; /* don't loop forever */ } @@ -1560,8 +1560,8 @@ pplayer->city_style = get_nation_city_style(nation); pplayer->ai.control = 1; pplayer->ai.skill_level = game.skill_level; - if (check_nation_leader_name(nation, player_name)) { - pplayer->is_male = get_nation_leader_sex(nation, player_name); + if (check_nation_leader_name(nation, ai_player_name)) { + pplayer->is_male = get_nation_leader_sex(nation, ai_player_name); } else { pplayer->is_male = myrand(2); } Index: server/stdinhand.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/stdinhand.c,v retrieving revision 1.201 diff -u -r1.201 stdinhand.c --- server/stdinhand.c 2002/02/07 17:23:46 1.201 +++ server/stdinhand.c 2002/02/07 19:39:17 @@ -2947,7 +2947,6 @@ case CMD_START_GAME: if (server_state==PRE_GAME_STATE) { int plrs=0; - int i; /* Sanity check scenario */ if (game.is_new_game) { Index: server/unittools.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/unittools.c,v retrieving revision 1.150 diff -u -r1.150 unittools.c --- server/unittools.c 2002/02/07 17:23:47 1.150 +++ server/unittools.c 2002/02/07 19:39:19 @@ -893,12 +893,12 @@ unit_activity_done = 1; /* watchtower becomes effective */ if (player_knows_techs_with_flag(pplayer, TF_WATCHTOWER)) { - unit_list_iterate(ptile->units, punit) { - if (is_ground_unit(punit)) { - fog_area(pplayer, punit->x, punit->y, - unit_type(punit)->vision_range); - unfog_area(pplayer, punit->x, punit->y, - get_watchtower_vision(punit)); + unit_list_iterate(ptile->units, punit2) { + if (is_ground_unit(punit2)) { + fog_area(pplayer, punit2->x, punit2->y, + unit_type(punit2)->vision_range); + unfog_area(pplayer, punit2->x, punit2->y, + get_watchtower_vision(punit2)); } } unit_list_iterate_end; @@ -1709,19 +1709,19 @@ /* The unit may have changed the available tiles in nearby cities. */ map_city_radius_iterate(x, y, x1, y1) { - struct city *pcity = map_get_city(x1, y1); - if (pcity) { - update_city_tile_status_map(pcity, x, y); + struct city *pcity2 = map_get_city(x1, y1); + if (pcity2) { + update_city_tile_status_map(pcity2, x, y); } } map_city_radius_iterate_end; /* Refresh the unit's homecity. */ { - struct city *pcity = find_city_by_id(homecity_id); - if (pcity) { - assert(city_owner(pcity) == pplayer); - city_refresh(pcity); - send_city_info(pplayer, pcity); + struct city *pcity2 = find_city_by_id(homecity_id); + if (pcity2) { + assert(city_owner(pcity2) == pplayer); + city_refresh(pcity2); + send_city_info(pplayer, pcity2); } } @@ -1760,9 +1760,9 @@ /* This unit may have blocked tiles of adjacent cities. Update them. */ map_city_radius_iterate(punit_x, punit_y, x1, y1) { - struct city *pcity = map_get_city(x1, y1); - if (pcity) { - update_city_tile_status_map(pcity, punit_x, punit_y); + struct city *pcity2 = map_get_city(x1, y1); + if (pcity2) { + update_city_tile_status_map(pcity2, punit_x, punit_y); } } map_city_radius_iterate_end; sync_cities();