diff -urd -X freeciv.clean/diff_ignore part_app/server/spacerace.c work/server/spacerace.c --- part_app/server/spacerace.c Thu Feb 21 10:15:30 2002 +++ work/server/spacerace.c Sat Feb 23 16:25:24 2002 @@ -83,10 +83,10 @@ ship->population = habitation * 10000; - if (habitation) { + if (habitation > 0) { ship->support_rate = life_support / (double) habitation; } - if (life_support+habitation) { + if (life_support + habitation > 0) { ship->energy_rate = 2.0 * solar_panels / (double)(life_support+habitation); } if (fuel>0 && propulsion>0) { diff -urd -X freeciv.clean/diff_ignore part_app/server/srv_main.c work/server/srv_main.c --- part_app/server/srv_main.c Thu Feb 21 15:25:13 2002 +++ work/server/srv_main.c Sat Feb 23 16:29:23 2002 @@ -380,7 +380,7 @@ { /* See if the value of fog of war has changed */ if (game.fogofwar != game.fogofwar_old) { - if (game.fogofwar == 1) { + if (game.fogofwar) { enable_fog_of_war(); game.fogofwar_old = TRUE; } else { @@ -573,9 +573,9 @@ /************************************************************************** ... **************************************************************************/ -int is_id_allocated(int id) +bool is_id_allocated(int id) { - return (used_ids[id/8])&(1<<(id%8)); + return TEST_BIT(used_ids[id / 8], id % 8); } /************************************************************************** @@ -592,7 +592,7 @@ int get_next_id_number(void) { - while(is_id_allocated(++global_id_counter) || !global_id_counter) ; + while(is_id_allocated(++global_id_counter) || global_id_counter == 0) ; return global_id_counter; } @@ -872,7 +872,7 @@ static bool check_for_full_turn_done(void) { /* fixedlength is only applicable if we have a timeout set */ - if (game.fixedlength && game.timeout) + if (game.fixedlength && game.timeout != 0) return FALSE; players_iterate(pplayer) { @@ -1518,7 +1518,7 @@ pplayer->nation = mark_nation_as_used(nations_avail[myrand(num_nations_avail)]); pplayer->city_style = get_nation_city_style(pplayer->nation); - pplayer->is_male = myrand(2); + pplayer->is_male = (myrand(2) == 1); } announce_ai_player(pplayer); @@ -1564,7 +1564,7 @@ if (check_nation_leader_name(nation, player_name)) { pplayer->is_male = get_nation_leader_sex(nation, player_name); } else { - pplayer->is_male = myrand(2); + pplayer->is_male = (myrand(2) == 1); } announce_ai_player(pplayer); set_ai_level_direct(pplayer, pplayer->ai.skill_level); @@ -1889,7 +1889,7 @@ } } - if(!game.randseed) { + if(game.randseed == 0) { /* We strip the high bit for now because neither game file nor server options can handle unsigned ints yet. - Cedric */ game.randseed = time(NULL) & (MAX_UINT32 >> 1); diff -urd -X freeciv.clean/diff_ignore part_app/server/srv_main.h work/server/srv_main.h --- part_app/server/srv_main.h Thu Feb 14 09:46:05 2002 +++ work/server/srv_main.h Sat Feb 23 16:29:31 2002 @@ -51,7 +51,7 @@ void pick_ai_player_name(Nation_Type_id nation, char *newname); void dealloc_id(int id); -int is_id_allocated(int id); +bool is_id_allocated(int id); void alloc_id(int id); int get_next_id_number(void); diff -urd -X freeciv.clean/diff_ignore part_app/server/stdinhand.c work/server/stdinhand.c --- part_app/server/stdinhand.c Thu Feb 21 10:15:30 2002 +++ work/server/stdinhand.c Sat Feb 23 16:43:34 2002 @@ -106,11 +106,11 @@ /* Validating function for integer settings. If the function is non-NULL, it is called with the new value, and returns whether the change is legal. The char * is an error message in the case of reject. */ - int (*func_change)(int, char **); + bool (*func_change)(int, char **); /* The same, for string settings. The first char* is the new value as an argument, the second is for returning the error message. */ - int (*func_change_s)(char *, char **); + bool (*func_change_s)(char *, char **); enum sset_class sclass; enum sset_to_client to_client; int min_value, max_value, default_value; @@ -958,7 +958,7 @@ { int len = strlen(name); - if (!len) { + if (len == 0) { return PNameEmpty; } else if (len > MAX_LEN_NAME-1) { return PNameTooLong; @@ -1296,7 +1296,7 @@ (This is a trick to allow ambiguity to be handled in a flexible way without importing notify_player() messages inside this routine - rp) **************************************************************************/ -static enum command_id command_named(const char *token, int accept_ambiguity) +static enum command_id command_named(const char *token, bool accept_ambiguity) { enum m_pre_result result; int ind; @@ -1533,7 +1533,7 @@ static void open_metaserver_connection(struct connection *caller) { server_open_udp(); - if (send_server_info_to_metaserver(1,0)) { + if (send_server_info_to_metaserver(TRUE, FALSE)) { notify_player(NULL, _("Open metaserver connection to [%s]."), meta_addr_port()); cmd_reply(CMD_METACONN, caller, C_OK, @@ -1546,7 +1546,7 @@ **************************************************************************/ static void close_metaserver_connection(struct connection *caller) { - if (send_server_info_to_metaserver(1,1)) { + if (send_server_info_to_metaserver(TRUE, TRUE)) { server_close_udp(); notify_player(NULL, _("Close metaserver connection to [%s]."), meta_addr_port()); @@ -1597,7 +1597,7 @@ static void metainfo_command(struct connection *caller, char *arg) { sz_strlcpy(srvarg.metaserver_info_line, arg); - if (send_server_info_to_metaserver(1,0) == 0) { + if (!send_server_info_to_metaserver(TRUE, FALSE)) { cmd_reply(CMD_METAINFO, caller, C_METAERROR, _("Not reporting to the metaserver.")); } else { @@ -1812,7 +1812,7 @@ return; } - pplayer->ai.control = 1; + pplayer->ai.control = TRUE; set_ai_level_directer(pplayer, game.skill_level); cmd_reply(CMD_CREATE, caller, C_OK, _("Created new AI player: %s."), pplayer->name); @@ -1934,13 +1934,13 @@ (game.skill_level >= 6) ? "hard" : "normal"); - if (*srvarg.metaserver_addr && + if (*srvarg.metaserver_addr != '\0' && ((0 != strcmp(srvarg.metaserver_addr, DEFAULT_META_SERVER_ADDR)) || (srvarg.metaserver_port != DEFAULT_META_SERVER_PORT))) { fprintf(script_file, "metaserver %s\n", meta_addr_port()); } - if (*srvarg.metaserver_info_line && + if (*srvarg.metaserver_info_line != '\0' && (0 != strcmp(srvarg.metaserver_info_line, default_meta_server_info_string()))) { fprintf(script_file, "metainfo %s\n", srvarg.metaserver_info_line); @@ -2004,7 +2004,7 @@ if (*s == '\0') goto usage; rules = s; - while (*s && !isspace(*s)) s++; + while (*s != '\0' && !isspace(*s)) s++; if (*s == '\0') goto usage; *s = '\0'; /* terminate rules */ @@ -2137,15 +2137,15 @@ struct connection *ptarget; /* find the start of the level: */ - for(cptr_s=str; *cptr_s && !isalnum(*cptr_s); cptr_s++); + for(cptr_s=str; *cptr_s != '\0' && !isalnum(*cptr_s); cptr_s++); /* copy the level into arg_level[] */ - for(cptr_d=arg_level; *cptr_s && isalnum(*cptr_s); cptr_s++, cptr_d++) { + for(cptr_d=arg_level; *cptr_s != '\0' && isalnum(*cptr_s); cptr_s++, cptr_d++) { *cptr_d=*cptr_s; } *cptr_d='\0'; - if (!arg_level[0]) { + if (arg_level[0] == '\0') { /* no level name supplied; list the levels */ cmd_reply(CMD_CMDLEVEL, caller, C_COMMENT, _("Command access levels in effect:")); @@ -2180,17 +2180,17 @@ } /* find the start of the name: */ - for(; *cptr_s && !isalnum(*cptr_s); cptr_s++); + for(; *cptr_s != '\0' && !isalnum(*cptr_s); cptr_s++); /* copy the name into arg_name[] */ for(cptr_d=arg_name; - *cptr_s && (*cptr_s == '-' || *cptr_s == ' ' || isalnum(*cptr_s)); + *cptr_s != '\0' && (*cptr_s == '-' || *cptr_s == ' ' || isalnum(*cptr_s)); cptr_s++ , cptr_d++) { *cptr_d=*cptr_s; } *cptr_d='\0'; - if (!arg_name[0]) { + if (arg_name[0] == '\0') { /* no playername supplied: set for all connections, and set the default */ conn_list_iterate(game.est_connections, pconn) { if (set_cmdlevel(caller, pconn, level)) { @@ -2392,7 +2392,7 @@ } } } - if (buf[0]) + if (buf[0] != '\0') cmd_reply(help_cmd, caller, C_COMMENT, buf); } cmd_reply(help_cmd, caller, C_COMMENT, horiz_line); @@ -2406,12 +2406,12 @@ char command[MAX_LEN_CONSOLE_LINE], *cptr_s, *cptr_d; int cmd; - for(cptr_s=str; *cptr_s && !isalnum(*cptr_s); cptr_s++); - for(cptr_d=command; *cptr_s && isalnum(*cptr_s); cptr_s++, cptr_d++) + for(cptr_s=str; *cptr_s != '\0' && !isalnum(*cptr_s); cptr_s++); + for(cptr_d=command; *cptr_s != '\0' && isalnum(*cptr_s); cptr_s++, cptr_d++) *cptr_d=*cptr_s; *cptr_d='\0'; - if (*command) { + if (*command != '\0') { cmd=lookup_option(command); if (cmd==-1) { cmd_reply(CMD_EXPLAIN, caller, C_FAIL, _("No explanation for that yet.")); @@ -2556,12 +2556,12 @@ int cmd,i,len1; int clen = 0; - for(cptr_s=str; *cptr_s && !isalnum(*cptr_s); cptr_s++); - for(cptr_d=command; *cptr_s && isalnum(*cptr_s); cptr_s++, cptr_d++) + for(cptr_s=str; *cptr_s != '\0' && !isalnum(*cptr_s); cptr_s++); + for(cptr_d=command; *cptr_s != '\0' && isalnum(*cptr_s); cptr_s++, cptr_d++) *cptr_d=*cptr_s; *cptr_d='\0'; - if (*command) { + if (*command != '\0') { cmd=lookup_option(command); if (cmd>=0 && !may_view_option(caller, cmd)) { cmd_reply(CMD_SHOW, caller, C_FAIL, @@ -2673,18 +2673,18 @@ int val, cmd; struct settings_s *op; - for(cptr_s=str; *cptr_s && !is_ok_opt_name_char(*cptr_s); cptr_s++); + for(cptr_s=str; *cptr_s != '\0' && !is_ok_opt_name_char(*cptr_s); cptr_s++); for(cptr_d=command; - *cptr_s && is_ok_opt_name_char(*cptr_s); + *cptr_s != '\0' && is_ok_opt_name_char(*cptr_s); cptr_s++, cptr_d++) { *cptr_d=*cptr_s; } *cptr_d='\0'; - for(; *cptr_s && is_ok_opt_name_value_sep_char(*cptr_s); cptr_s++); + for(; *cptr_s != '\0' && is_ok_opt_name_value_sep_char(*cptr_s); cptr_s++); - for(cptr_d=arg; *cptr_s && is_ok_opt_value_char(*cptr_s); cptr_s++ , cptr_d++) + for(cptr_d=arg; *cptr_s != '\0' && is_ok_opt_value_char(*cptr_s); cptr_s++ , cptr_d++) *cptr_d=*cptr_s; *cptr_d='\0'; @@ -2714,7 +2714,7 @@ if (SETTING_IS_INT(op)) { val = atoi(arg); - if (!val && arg[0] != '0') { + if (val == 0 && arg[0] != '0') { cmd_reply(CMD_SET, caller, C_SYNTAX, _("Value must be an integer.")); } else if (val >= op->min_value && val <= op->max_value) { @@ -2774,7 +2774,8 @@ **************************************************************************/ static void cut_comment(char *str) { - int i, in_single_quotes = 0, in_double_quotes = 0; + int i; + bool in_single_quotes = FALSE, in_double_quotes = FALSE; freelog(LOG_DEBUG,"cut_comment(str='%s')",str); @@ -2818,7 +2819,7 @@ /* Is it a comment or a blank line? */ /* line is comment if the first non-whitespace character is '#': */ - for(cptr_s=str; *cptr_s && isspace(*cptr_s); cptr_s++); + for(cptr_s=str; *cptr_s != '\0' && isspace(*cptr_s); cptr_s++); if(*cptr_s == 0 || *cptr_s == '#') { return; } @@ -2827,21 +2828,21 @@ given on the server command line - rp */ if (*cptr_s == SERVER_COMMAND_PREFIX) cptr_s++; - for(; *cptr_s && !isalnum(*cptr_s); cptr_s++); + for(; *cptr_s != '\0' && !isalnum(*cptr_s); cptr_s++); /* * cptr_s points now to the beginning of the real command. It has * skipped leading whitespace, the SERVER_COMMAND_PREFIX and any * other non-alphanumeric characters. */ - for(cptr_d=command; *cptr_s && isalnum(*cptr_s) && + for(cptr_d=command; *cptr_s != '\0' && isalnum(*cptr_s) && cptr_d < command+sizeof(command)-1; cptr_s++, cptr_d++) *cptr_d=*cptr_s; *cptr_d='\0'; - cmd = command_named(command,0); + cmd = command_named(command, FALSE); if (cmd == CMD_AMBIGUOUS) { - cmd = command_named(command,1); + cmd = command_named(command, TRUE); cmd_reply(cmd, caller, C_SYNTAX, _("Warning: '%s' interpreted as '%s', but it is ambiguous." " Try '%shelp'."), @@ -2929,7 +2930,7 @@ break; case CMD_SCORE: if(server_state==RUN_GAME_STATE) { - report_scores(0); + report_scores(FALSE); } else { cmd_reply(cmd, caller, C_SYNTAX, _("The game must be running before you can see the score.")); @@ -3007,7 +3008,7 @@ case CMD_END_GAME: if (server_state==RUN_GAME_STATE) { server_state = GAME_OVER_STATE; - force_end_of_sniff = 1; + force_end_of_sniff = TRUE; } else { cmd_reply(cmd,caller, C_FAIL, _("Cannot end the game: no game running.")); @@ -3157,7 +3158,7 @@ } } } - if (buf[0]) + if (buf[0] != '\0') cmd_reply(help_cmd, caller, C_COMMENT, buf); } cmd_reply(help_cmd, caller, C_COMMENT, horiz_line); diff -urd -X freeciv.clean/diff_ignore part_app/server/unithand.c work/server/unithand.c --- part_app/server/unithand.c Fri Feb 22 16:37:39 2002 +++ work/server/unithand.c Sat Feb 23 16:45:35 2002 @@ -85,7 +85,7 @@ /* Normally units on goto does not pick up extra units, even if the units are in a city and are sentried. But if we just started the goto We want to take them with us, so we do this. */ - if (get_transporter_capacity(punit)) + if (get_transporter_capacity(punit) > 0) assign_units_to_transporter(punit, TRUE); do_unit_goto(punit, GOTO_MOVE_ANY, TRUE); @@ -733,8 +733,8 @@ } if (unit_flag(punit, F_ONEATTACK)) punit->moves_left = 0; - pwinner=(punit->hp) ? punit : pdefender; - plooser=(pdefender->hp) ? punit : pdefender; + pwinner = (punit->hp > 0) ? punit : pdefender; + plooser = (pdefender->hp > 0) ? punit : pdefender; combat.attacker_unit_id=punit->id; combat.defender_unit_id=pdefender->id; @@ -882,7 +882,7 @@ && pcity && pcity->owner != punit->owner && !pplayers_allied(city_owner(pcity), unit_owner(punit)) - && punit->homecity) { + && punit->homecity != 0) { struct packet_unit_request req; req.unit_id = punit->id; req.city_id = pcity->id; @@ -979,12 +979,12 @@ /* This is for debugging only, and seems to be obsolete as the error message never appears */ - if (pplayer->ai.control && punit->ai.passenger) { + if (pplayer->ai.control && punit->ai.passenger != 0) { struct unit *passenger; passenger = unit_list_find(&psrctile->units, punit->ai.passenger); if (passenger) { /* removed what seemed like a very bad abort() -- JMC/jjm */ - if (!get_transporter_capacity(punit)) { + if (get_transporter_capacity(punit) == 0) { freelog(LOG_NORMAL, "%s#%d@(%d,%d) thinks %s#%d is a passenger?", unit_name(punit->type), punit->id, punit->x, punit->y, unit_name(passenger->type), passenger->id); @@ -1023,7 +1023,7 @@ if (pplayer->ai.control && punit->ai.bodyguard > 0 && (bodyguard = unit_list_find(&psrctile->units, punit->ai.bodyguard)) && - !bodyguard->moves_left) { + bodyguard->moves_left == 0) { notify_player_ex(pplayer, punit->x, punit->y, E_NOEVENT, _("Game: %s doesn't want to leave its bodyguard."), unit_type(punit)->name); @@ -1245,7 +1245,7 @@ case ACTIVITY_IDLE: if (old_activity == ACTIVITY_PILLAGE) { int prereq = map_get_infrastructure_prerequisite(old_target); - if (prereq) { + if (prereq != 0) { unit_list_iterate (map_get_tile(punit->x, punit->y)->units, punit2) if ((punit2->activity == ACTIVITY_PILLAGE) && (punit2->activity_target == prereq)) { diff -urd -X freeciv.clean/diff_ignore part_app/server/unittools.c work/server/unittools.c --- part_app/server/unittools.c Fri Feb 22 16:37:39 2002 +++ work/server/unittools.c Sat Feb 23 16:54:35 2002 @@ -175,7 +175,7 @@ if (player_owns_active_wonder(unit_owner(punit), B_SUNTZU)) punit->veteran = TRUE; else - punit->veteran = myrand(2); + punit->veteran = (myrand(2) == 1); } /************************************************************************** @@ -196,9 +196,9 @@ freelog(LOG_VERBOSE, "attack:%d, defense:%d, attack firepower:%d, defense firepower:%d", attackpower, defensepower, attack_firepower, defense_firepower); - if (!attackpower) { + if (attackpower == 0) { attacker->hp=0; - } else if (!defensepower) { + } else if (defensepower == 0) { defender->hp=0; } while (attacker->hp>0 && defender->hp>0) { @@ -211,9 +211,9 @@ if (attacker->hp<0) attacker->hp = 0; if (defender->hp<0) defender->hp = 0; - if (attacker->hp) + if (attacker->hp > 0) maybe_make_veteran(attacker); - else if (defender->hp) + else if (defender->hp > 0) maybe_make_veteran(defender); } @@ -290,15 +290,15 @@ unit_list_insert(&candidates, punit); /* Potential candidate :) */ } unit_list_iterate_end; - if (!unit_list_size(&candidates)) + if (unit_list_size(&candidates) == 0) return; /* We have Leonardo, but nothing to upgrade! */ - if (!leonardo_variant) + if (leonardo_variant == 0) candidate_to_upgrade=myrand(unit_list_size(&candidates)); i=0; unit_list_iterate(candidates, punit) { - if (leonardo_variant || i == candidate_to_upgrade) { + if (leonardo_variant != 0 || i == candidate_to_upgrade) { upgrade_type=can_upgrade_unittype(pplayer, punit->type); notify_player(pplayer, _("Game: %s has upgraded %s to %s%s."), @@ -722,7 +722,7 @@ cartesian_adjacent_iterate(x, y, x1, y1) { if (map_has_special(x1, y1, S_RIVER)) { - int ocean_near = FALSE; + bool ocean_near = FALSE; cartesian_adjacent_iterate(x1, y1, x2, y2) { if (map_get_terrain(x2, y2) == T_OCEAN) ocean_near = TRUE; @@ -987,7 +987,7 @@ if (activity==ACTIVITY_GOTO) { if (!punit->ai.control && (!is_military_unit(punit) || - punit->ai.passenger || !pplayer->ai.control)) { + punit->ai.passenger != 0 || !pplayer->ai.control)) { /* autosettlers otherwise waste time; idling them breaks assignment */ /* Stalling infantry on GOTO so I can see where they're GOing TO. -- Syela */ do_unit_goto(punit, GOTO_MOVE_ANY, TRUE); @@ -1037,7 +1037,7 @@ struct tile *ptile2 = map_get_tile(x, y); if (ptile2->terrain != T_OCEAN && !is_non_allied_unit_tile(ptile2, unit_owner(punit2))) { - if (get_transporter_capacity(punit2)) + if (get_transporter_capacity(punit2) > 0) sentry_transported_idle_units(punit2); freelog(LOG_VERBOSE, "Moved %s's %s due to changing land to sea at (%d, %d).", @@ -1059,7 +1059,7 @@ if (ptile2->terrain == T_OCEAN && ground_unit_transporter_capacity(x, y, unit_owner(punit2)) > 0) { - if (get_transporter_capacity(punit2)) + if (get_transporter_capacity(punit2) > 0) sentry_transported_idle_units(punit2); freelog(LOG_VERBOSE, "Embarked %s's %s due to changing land to sea at (%d, %d).", @@ -1097,7 +1097,7 @@ struct tile *ptile2 = map_get_tile(x, y); if (ptile2->terrain == T_OCEAN && !is_non_allied_unit_tile(ptile2, unit_owner(punit2))) { - if (get_transporter_capacity(punit2)) + if (get_transporter_capacity(punit2) > 0) sentry_transported_idle_units(punit2); freelog(LOG_VERBOSE, "Moved %s's %s due to changing sea to land at (%d, %d).", @@ -1118,7 +1118,7 @@ struct tile *ptile2 = map_get_tile(x, y); if (is_allied_city_tile(ptile2, unit_owner(punit2)) && !is_non_allied_unit_tile(ptile2, unit_owner(punit2))) { - if (get_transporter_capacity(punit2)) + if (get_transporter_capacity(punit2) > 0) sentry_transported_idle_units(punit2); freelog(LOG_VERBOSE, "Docked %s's %s due to changing sea to land at (%d, %d).", @@ -1302,7 +1302,7 @@ int x, y; int u_type = get_role_unit(L_PARTISAN, 0); - while (count-- && find_a_good_partisan_spot(pcity, u_type, &x, &y)) { + while ((count--) > 0 && find_a_good_partisan_spot(pcity, u_type, &x, &y)) { struct unit *punit; punit = create_unit(city_owner(pcity), x, y, u_type, FALSE, 0, -1); if (can_unit_do_activity(punit, ACTIVITY_FORTIFYING)) { @@ -1329,7 +1329,7 @@ if (num_role_units(L_PARTISAN)==0) return; if (!tech_exists(game.rtech.u_partisan) - || !game.global_advances[game.rtech.u_partisan] + || game.global_advances[game.rtech.u_partisan] == 0 || pcity->original != pcity->owner) return; @@ -1871,7 +1871,7 @@ unitcount = 1; } - if (!unitcount) { + if (unitcount == 0) { unit_list_iterate(map_get_tile(punit->x, punit->y)->units, vunit) if (pplayers_at_war(unit_owner(pkiller), unit_owner(vunit))) unitcount++; @@ -2132,7 +2132,7 @@ } } - if (map_get_terrain(x, y) != T_OCEAN && myrand(2)) { + if (map_get_terrain(x, y) != T_OCEAN && myrand(2) == 1) { if (game.rgame.nuke_contamination == CONTAMINATION_POLLUTION) { if (!map_has_special(x, y, S_POLLUTION)) { map_set_special(x, y, S_POLLUTION); @@ -2175,7 +2175,7 @@ punit->moves_left=0; send_unit_info(unit_owner(punit), punit); } - return punit->moves_left; + return punit->moves_left > 0; } /************************************************************************** @@ -2786,7 +2786,7 @@ /* struct government *g = get_gov_pplayer(pplayer);*/ bool senthome = FALSE; - if (punit->homecity) + if (punit->homecity != 0) homecity = find_city_by_id(punit->homecity); wakeup_neighbor_sentries(punit); @@ -2904,7 +2904,7 @@ conn_list_do_buffer(&pplayer->connections); - if (punit->ai.ferryboat) { + if (punit->ai.ferryboat != 0) { struct unit *ferryboat; ferryboat = unit_list_find(&psrctile->units, punit->ai.ferryboat); if (ferryboat) { @@ -2936,7 +2936,7 @@ /* Transporting units. We first make a list of the units to be moved and then insert them again. The way this is done makes sure that the units stay in the same order. */ - if (get_transporter_capacity(punit) && transport_units) { + if (get_transporter_capacity(punit) > 0 && transport_units) { struct unit_list cargo_units; /* First make a list of the units to be moved. */