2000-12-31  Jim Kingdon

	* old-empire.g: Put the note about avgas's purpose into the help
	rather than just in a comment.

2000-12-28  Jim Kingdon  <kingdon@localhost.localdomain>

	* actions.c (distribute_material): Also transfer to any units
	within out-length/in-length range.
	* unit.c (unit_trusts_unit): Add comment.
	* tkcmd.c (do_produce): Add implementation.
	* nlang.c (task_desc): Handle TASK_PRODUCE.

2000-12-30  Hans Ronne <hronne@2.sbbs.se>

	Fix problem with more than one join message being processed 
	for remotes connecting to a mac host.

	* tp.c (receive_data): Truncate packetbuf when the first in
	a stream of join messages has been received.

	* unit.h (unit_can_build_type): Add missing prototype.
	* macunit.c (build_construction_menu): Fix incorrect arg in
	call to unit_can_build_type.

	Further improvements and bug fixes to the mac network code. 
	Use new a_person structure to keep track of remote players.

	* macinit.c (a_person): Typedef new structure.
	(personlist): Declare and initialize to NULL.
	(lastperson): Declare and initialize to NULL.
	(for_all_persons): Define new macro.
	(update_persons): New function and prototype.
	(persons): Remove static string array.
	(draw_chat_dialog): Rewrite player_list code to use persons.
	(do_key_down_chat): Update joinhost and joinport here.
	(hit_chat_dialog): Don't update joinhost and joinport here.
	(hit_chat_dialog): Disable several items if my_rid > 0.
	(hit_chat_dialog): Remove redundant "Hosting game" string.
	(hit_chat_dialog): Set new rid for dside when joining a game.
	(hit_chat_dialog): Remove redundant "Joined game" string.
	(hit_chat_dialog): Move caret to chat field after connection.
	(hit_chat_dialog): Don't call draw_chat_dialog here.
	(make_default_player_spec): Create a default person.
	(make_default_player_spec): Call update_persons.
	(insert_chat_string): Set the graphics port correctly.
	(insert_chat_string): Rewrite to use persons.
	(add_remote_locally): Create a person for each remote.
	(add_remote_locally): Add joinhost to "Hosting" string.
	(add_remote_locally): Call update_persons.
	(launch_game_2): Call update_persons.
	
	* maccolors.c (init_side_colors): Comment out call to
	net_set_side_colorscheme that confuses unix clients.

2000-12-29  Hans Ronne <hronne@2.sbbs.se>

	Fix some remaining problems in the mac network code. Implement
	chat functionality on the mac.

	* macconq.c (exit_macconq). Call send_quit.

	* macinit.c (persons): New static string array.
	(create_chat_dialog): Don't fill in player list here.
	(draw_chat_dialog): Fill in player list here instead.
	(do_key_down_chat): Handle chat EditText field correctly.
	(insert_chat_string): Use information from persons array.
	(insert_chat_string): Scroll the list when done.
	(add_remote_locally): Add name to persons array.
	(launch_game_2): Redraw chatwin after assignments are done.

	* tp.c (receive_chat): Add /remove unix linefeeds as necessary.

2000-12-28  Stan Shebs  <shebs@shebs.cnchost.com>

	Streamline handling of can-build testing, add cases for
	can-develop.
	* side.h (Side candevelop): New field.
	(side_can_develop): New macro.
	* side.c (create_side): Allocate candevelop.
	* run.c (update_canbuild_vector): Fill in candevelop vector too.
	* unit.c (unit_can_build_type): New function.
	* plan.c (plan_offense_support, plan_colonize_support,
	plan_explorer_support): Use it.
	* macunit.c (build_construction_menu): Ditto.
	* tkcmd.c (do_build): Ditto.
	* ccmd.c (do_build): Ditto.

	* tkcmd.c (do_fire, aux_fire_at): Rewrite to use same code for
	keyboard and menu select cases.
	(common_fire_at): New function.
	(do_fire_into, aux_fire_into, common_fire_into): Similarly.

	* macwins.c (adjust_construction_controls): Use could_create
	and could_develop.

	Add more feedback for action failures.
	* history.def (occ-cannot-do, attack-cannot-hit, overrun-cannot-hit,
	fire-cannot-hit, extract-no-source): New event types.
	* actions.c (check_extract_action): Use one.
	* combat.c (check_attack_action, check_overrun_action,
	check_fire_at_action, check_fire_into_action,
	check_capture_action): Ditto.
	* nlang.c (action_result_desc): Describe new event types.

	* actions.c (check_add_terrain_action,
	check_remove_terrain_action): Return A_ANY_TOO_FAR instead of
	A_ANY_ERROR if too far.
	* combat.c (check_capture_action, check_detonate_action): Ditto.

	* game.h (could_develop): New macro.
	* actions.c (check_develop_action): Use it.
	(check_create_common): Use could_create.
	(any_construction_possible): Ditto.
	* ai.c (build_depot_for_self, needs_develop): Use could_create.
	* init.c (cache_possible_types): Ditto.

2000-12-28  Hans Ronne <hronne@2.sbbs.se>

	Further improvements to mac network code. Implement variant and
	assignment setup synchronization through update callbacks. Disable 
	certain items for network clients. Fix several bugs in the mac launch 
	sequence.
	
	* macconq.c (launch_game): Prototype extern.
	(update_variants_dialog): New function and prototype.
	(update_player_setup_dialog): New function and prototype.
	(main): Define update_variant_callback.
	(main): Define update_assignment_callback.
	(check_network): Use close_window instead of passing Enter.
	(check_network): Call launch_game instead.

	* macdefs.h (diVariantsFirstCheckBox): Change to 4.

	* macinit.c (MAXCHECKBOXES): Change to 16.
	(launch_game): Prototype extern.
	(vary_indepside_ai & new_indepside_ai): Remove.
	(vary_indepside_build & new_indepside_build): Remove.
	(vary_indepside_research & new_indepside_research): Remove.
	(vary_indepside_treasury & new_indepside_treasury): Remove.
	(draw_splash_dialog): Unhilite New and Open for network clients.
	(hit_splash_dialog): Disable New and Open for network clients.
	(draw_newgame_dialog): Unhilite OK for network clients.
	(hit_newgame_dialog): Disable OK for network clients.
	(start_new_game): Rewrite to handle network games correctly.
	(create_variants_dialog): Call interpret_variants here instead.
	(create_variants_dialog): Iterate from 6 to MAXCHECKBOXES instead.
	(draw_variants_dialog): Add code to handle checkbox updates.
	(draw_variants_dialog): Unhilite OK for network clients.
	(draw_variants_dialog): Fix typo in draw_default_button call.
	(hit_variants_dialog): Disable OK for network clients.
	(hit_variants_dialog): Move implement_variants call to launch_game.
	(hit_variants_dialog): Remove special handling of first 6 checkboxes.
	(hit_variants_dialog): Rewrite default handling of all checkboxes.
	(interpret_variants): Remove vary_indepside_ai etc.
	(interpret_variants): Initialize numcheckboxes to 6 instead of 0.
	(interpret_variants): Set checkboxes[i] for the 6 standard variants.
	(interpret_variants): Remove case K_INDEPSIDE_HAS_AI etc.
	(implement_variants): Remove code for vary_indepside_ai etc.
	(implement_variants): Remove do_module_variants call.
	(adjust_advantage): Call net_set_player_advantage.
	(open_game_from_name_and_volume): Rewrite for network games.
	(launch_game): Rewrite to handle network games correctly.
	(launch_game_2): Rewrite to handle network games correctly.
	
2000-12-27  Hans Ronne <hronne@2.sbbs.se>

	Implement final part of TCP/IP networking for the mac interface.
	Fix bug in startup of game load stage that prevents mac and tcltk
	from starting in sync.

	* macconq.c (quitter): Declare extern.
	(launch_game_2): Prototype extern.
	(last_stage): Declare and initialize to initial_stage.
	(check_network): New function and prototype.
	(event_loop): Call flush_outgoing_queue before receive_data. Only 
	check for my_rid > 0 in receive_data calls ifdef GUSI. Break up 
	if - else if - else if structure into discrete steps.

	* macinit.c (launch_game_2): Prototype extern.
	(hit_splash_dialog): Call start_game_load_stage.
	(create_chat_dialog): Move chatwin to top left corner.
	(hit_chat_dialog): Fix bug in setting of joinhost and joinport.
	(start_new_game): Always call show_variants_dialog if my_rid > 0.
	(create_variants_dialog): Don't set selected_game to modulelist.
	(launch_game): Don't call make_trial_assignments directly.
	Call start_player_pre_setup_stage and start_player_setup_stage
	instead. Also call check_for_missing_images.
	(launch_game_2): Call start_game_ready_stage. Remove call to 
	set_area_shape (now called by calculate_world_globals). Move 
	check for reasonable circumference to calculate_world_globals.
	Move check_for_missing_images call to launch_game. Call
	start_game_ready_stage.

	* init.c (start_game_load_stage): Call broadcast_start_game_load. 
	* kernel.h (broadcast_start_game_load): New prototype.
	* tp.c (broadcast_start_game_load): New function.
	(receive_packet): Don't call start_game_load_stage under case 'p'
	but call it under the new case 's' instead. 
	* world.c (calculate_world_globals): Move circumference test here.

	* tkmain.c (tk_start_game_load_stage): New TclCmdFn.
	* tkconq.tcl (popup_game_dialog): Call start_game_load_stage.

2000-12-26  Hans Ronne <hronne@2.sbbs.se>

	Fix caret blinking so that it works in dialog edit items.
	* Floating.c (IsDialog): Fix bug in test for kDialogWindowKind.
	* macconq.c (event_loop): Handle dialog carets properly.

	Fix messed up unseen terrain drawing because NONTTYPE 
	was redefined.
	* macconq.h (BACKTTYPE): Define as -2 instead of -1.

	Fix research problems because NOADVANCE was redefined. 
	* macunit.c (draw_advanced_closeup): Test if curadvance > 0.

	Fix problem with default unit doctrines usually being set to zero.
	* macunit.c (draw_advanced_closeup): Don't allow zero runlength.
	(draw_unit_build_dialog): Don't allow zero runlength.

	Fix problem with base building from unit build dialog.
	* macunit.c (build_construction_menu): Test for can_occupy_type.

	Make splashwin, newgamewin & variants_win floating non-modal 
	dialogs and adapt the startup code accordingly. Rewrite and simplify 
	parts of the chat window code. Remove Remote option in player setup 
	dialog.
	
	* macconq.c (main): Call show_splash_dialog instead.
	(splash_dialog): Remove function and prototype.
	(handle_keystroke): Call do_key_down_splash.
	(do_mouse_down): Call do_mouse_down_splash.
	(update_window): Call draw_splash_dialog.
	(handle_keystroke): Call do_key_down_newgame.
	(do_mouse_down): Call do_mouse_down_newgame.
	(update_window): Call draw_newgame_dialog.
	(handle_keystroke): Call do_key_down_variants.
	(do_mouse_down): Call do_mouse_down_variants.
	(update_window): Call draw_variants_dialog.
	(handle_keystroke): Remove call to do_key_down_setup.
	(handle_keystroke): Call do_key_down_player_setup.
	(do_mouse_down): Remove call to do_mouse_down_setup.
	(do_mouse_down): Call do_mouse_down_player_setup.
	(update_window): Call draw_player_setup_dialog.
	(do_ae_open_application): Call show_splash_dialog instead.
	(update_window): Skip arg in draw_chat_dialog call.
	(connect_game_dialog): Don't compile if GUSI is defined.	
	(connection_method_dialog): Don't compile if GUSI is defined.
	(connection_method_dialog): Prototype static instead.	
	(serial_port_dialog): Don't compile if GUSI is defined.	
	(add_remote_locally): Rewrite and move to macinit.c.
	(send_chat): Rewrite and move to macinit.c 

	* macdefs.h (diPlayerSetupRemote): Remove dialog item.

	* macconq.h (eventloopdone): Declare extern int.
	(splashwin): Declare extern DialogPtr.
	(newgamewin): Declare extern DialogPtr.
	(variants_win): Declare extern DialogPtr.
	(more_variants_win): Declare extern DialogPtr.
	(connection_method_dialog): Prototype in macconq.c.	
	(do_splash_box): Remove prototype.
	(new_game_dialog): Remove prototype.
	(show_splash_dialog): Prototype extern.
	(draw_splash_dialog): Prototype extern.
	(do_mouse_down_splash): Prototype extern.
	(do_key_down_splash): Prototype extern.
	(show_newgame_dialog): Prototype extern.
	(draw_newgame_dialog): Prototype extern.
	(do_mouse_down_newgame): Prototype extern.
	(do_key_down_newgame): Prototype extern.
	(show_variants_dialog): Prototype extern.
	(draw_variants_dialog): Prototype extern.
	(do_mouse_down_variants): Prototype extern.
	(do_key_down_variants): Prototype extern.
	(show_player_setup_dialog): Prototype extern.
	(draw_player_setup_dialog): Prototype extern.
	(do_mouse_down_player_setup): Prototype extern.
	(do_key_down_player_setup): Prototype extern.
	(draw_chat_dialog): Eliminate unused arg.

	* macinit.c (splashwin): Initialize to NULL.
	(connection_method_name): Don't declare here.
	(filter_splash_proc): Remove.
	(draw_player_list_proc): Remove.
	(draw_chat_list_proc): Remove.
	(draw_game_list_proc): Remove.
	(draw_game_blurb_proc): Remove.
	(draw_game_picture_proc): Remove.
	(filter_new_game_proc): Remove.
	(filter_splash): Remove function and prototype.
	(variants_dialog): Remove function and prototype.
	(filter_new_game): Remove function and prototype.
	(player_setup_dialog): Remove function and prototype.
	(do_splash_box): Remove function.
	(new_game_dialog): Remove function.
	(player_setup_dialog): Remove function.
	(show_splash_dialog): New function.
	(draw_splash_dialog): New function.
	(do_mouse_down_splash): New function.
	(do_key_down_splash): New function.
	(hit_splash_dialog): New function and prototype.
	(show_chat_dialog): Skip arg in draw_chat_dialog call.
	(create_chat_dialog): Rewrite and simplify.
	(draw_chat_dialog): Rewrite and simplify.
	(draw_chat_list): Merge into draw_chat_dialog.
	(draw_player_list): Merge into draw_chat_dialog.
	(hit_chat_dialog): Remove TEIdle call.
	(hit_chat_dialog): Remove draw_chat_list calls.
	(hit_chat_dialog): Remove done variable.
	(show_newgame_dialog): New function.
	(draw_newgame_dialog): New function.
	(draw_game_list): Merge into draw_newgame_dialog.
	(draw_game_blurb): Merge into draw_newgame_dialog.
	(draw_game_picture): Merge into draw_newgame_dialog.
	(display_selected_game): Merge into draw_newgame_dialog.
	(do_mouse_down_newgame): New function.
	(do_key_down_newgame): New function.
	(hit_newgame_dialog): New function and prototype.
	(show_player_setup_dialog): New function.
	(draw_player_setup_dialog): New function.
	(do_mouse_down_player_setup): New function.
	(do_key_down_player_setup): New function.
	(hit_player_setup_dialog): New function and prototype.
	(show_variants_dialog): New function.
	(draw_variants_dialog): New function.
	(do_mouse_down_variants): New function.
	(do_key_down_variants): New function.
	(hit_variants_dialog): New function and prototype.
	(show_player_setup_dialog): New function and prototype.
	(create_player_setup_dialog): New function and prototype.
	(draw_player_setup_dialog): New function and prototype.
	(do_mouse_down_setup): Change to do_mouse_down_player_setup.
	(do_key_down_setup): Rewrite to do_key_down_player_setup.
	(hit_player_setup_dialog): Remove Remote button support.
	(set_player_setup_button_states): Remove Remote button.
	(add_remote_locally): Move here. 
	(send_chat): Move here. Call insert_chat_string.	
	(start_new_game): Call broadcast_game_module,
	start_variant_setup_stage and interpret_variants. 
	Then call show_variants_dialog if any_variants is 
	true, or else call launch_game directly.
	(open_game_from_name_and_volume): Same changes as 
	for start_new_game.
	(launch_game): Call show_player_setup_dialog instead of 
	player_setup_dialog.Don't call variants_dialog.

	* macmenus.c (do_menu_command): Call show_newgame_dialog
	instead of new_game_dialog. Call show_chat_dialog if GUSI is 
	defined, else call connect_game_dialog.

	* macwins.c (unit_doctrine): Don't define here.

	* XconqProj.rsrc (DITL 129 "New Game Items"): Tweak boxes.
	(DITL 130 "Player Setup Items"): Remove Remote button.
	(DLOG 128 "Splash"): Use WDEF 1057.
	(DLOG 129 "New Game"): Use WDEF 1057.
	(DLOG 131 "Variants"): Use WDEF 1057.
	(DLOG 136 "More Variants"): Use WDEF 1057.
	* Xconq.r: Update from XconqProj.rsrc.

2000-12-24  Stan Shebs  <shebs@shebs.cnchost.com>

	* Floating.c, Floating.h, Xconq.r: use Unix line end convention
	(0xa aka LF) instead of Mac convention (0xd aka CR).
	
2000-12-22  Hans Ronne <hronne@2.sbbs.se>

	Move some common network code now used by all interfaces from the 
	tcltk files to the kernel.
	* cmdline.h (make_default_player_spec): Move prototype to kpublic.h.
	* cmdline.c (default_player_spec): Move declaration to tp.h.
	* tkconq.h (host_the_game): Move prototype to kpublic.h.
	(try_join_game): Move prototype to kpublic.h.
	* kpublic.h (host_the_game): Move prototype here.
	(make_default_player_spec): Move prototype here.
	(try_join_game): Move prototype here.
	* tkmain.c (host_the_game): Move function to tp.c.
	(try_join_game): Move function to tp.c.
	* tp.c (my_rid, master_rid): Initialize to zero.
	(default_player_spec): Initialize to NULL.
	(host_the_game): Move here from tkmain.c.
	(try_join_game): Move here from tkmain.c.
	* tp.h (my_rid, master_rid): Declare extern. 
	(default_player_spec): Declare extern.

	Add a chat window and associated network startup code to the mac 
	interface.
	* mac.c: Only compile network code if GUSI is not defined. 
	* macconq.h (chatwin): Declare extern DialogPtr.
	(show_chat_dialog): Prototype extern.
	(draw_chat_dialog): Prototype extern.
	(do_mouse_down_chat): Prototype extern.
	(do_key_down_chat): Prototype extern.
	* macconq.c (splash_dialog): Call show_chat_dialog instead.
	(handle_keystroke): Call do_key_down_chat.
	(do_mouse_down): Call do_mouse_down_chat.
	(update_window): Call draw_chat_dialog.
	* macdefs.h (dChat): Define new dialog with 12 items.
	* macinit.c (chatwin): Initialize to NULL.
	(player_list): Declare static ListHandle.
	(chat_list): Declare static ListHandle.
	(draw_player_list_proc): Declare static UserItemUPP.
	(draw_chat_list_proc): Declare static UserItemUPP.
	(joinhost): Initialize to "192.168.0.1".
	(joinport): Initialize to "3075".
	(protocol): Initialize to "TCP/IP".
	(status): Initialize to "Not Connected".
	(do_splash_box): Don't hide connect button.
	(filter_splash): Add Connect shortcut.
	(create_chat_dialog): New function and prototype.
	(draw_player_list): New function and prototype.
	(draw_chat_list): New function and prototype.
	(insert_chat_string): New function and prototype.
	(hit_chat_dialog): New function and prototype.
	(show_chat_dialog): New function.
	(draw_chat_dialog): New function.
	(do_mouse_down_chat): New function.
	(do_key_down_chat): New function.
	(make_default_player_spec): New function.
	* macmenus.c (adjust_menus): Always enable connect item.
	(do_menu_command): Call show_chat_dialog instead.
	* XconqProj.rsrc (DITL 128 "Splash Items"): Resize buttons.
	(DITL 139 "Chat Items"): New dialog item list.
	(DLOG 139 "Chat"): New dialog.
	* Xconq.r: Update from XconqProj.rsrc.

2000-12-21  Stan Shebs  <shebs@shebs.cnchost.com>

	Fix problems resulting from the last change.
	* game.h (DONE, NOADVANCE): Assign values different from NONATYPE.
	(NOUNIT): Remove, never used.
	* side.h (has_advance): Use DONE.
	* world.h (NOUSER): Move to here, set to 0.
	* world.c (allocate_area_users): Remove memset of layer.
	* generic.c (init_types): Remove unused debug print.
	(create_unit_type): Make array resizing work.
	(create_material_type, create_terrain_type, create_advance_type):
	New functions.
	* read.c (interp_mtype, interp_ttype, interp_atype): Use them.
	* run.c (apnbt_types): New static global.
	(auto_pick_new_build_task): Use it instead of tmp_u_array.

	* PROJECTS: Remove MAXUTYPES project.

2000-12-18  Stan Shebs  <shebs@shebs.cnchost.com>

	Eliminate the macros MAXUTYPES, MAXTTYPES, MAXMTYPES, and
	MAXATYPES, size all type handling dynamically.
	* config.h (MAXUTYPES, MAXTTYPES, MAXMTYPES, MAXATYPES): Remove.
	* game.h (NONUTYPE, NONTTYPE, NONMTYPE, NONATYPE): Define to be -1.
	(count_terrain_subtypes, numcelltypes, numbordtypes, numconntypes,
	numcoattypes): Declare here instead of in world.h.
	(tmp_u_array, tmp_t_array): Declare.
	* gvar.def (edge-terrain, river-sink-terrain): Don't use type
	bounds.
	* table.def (adjacent-terrain-effect, terrain-exhaustion-type): Ditto.
	* utype.def (obsolete, wrecked-type): Ditto.
	* generic.c (count_terrain_subtypes, numcelltypes, etc): Move here
	from world.c.
	(tmp_u_array, tmp_t_array): New globals.
	(curmaxutypes, curmaxmtypes, curmaxttypes, curmaxatypes): Set to
	defaults convenient for the first allocation.
	(create_unit_type): New function.
	(disallow_more_unit_types, disallow_more_terrain_types): New functions.
	(allocate_table): Use them.
	* help.c (tm_table_row_desc): Remove, never used.
	* init.c (check_game_validity): Call disallow_* to make sure
	some type arrays are computed and cached.
	(calculate_globals): Ditto.
	(make_initial_materials): Use tmp_t_array.
	* mkrivers.c (make_up_river_borders): Ditto.
	* mkterr.c (elev_range, elev_lo, elev_hi, raw_range, raw_lo,
	raw_hi): New static globals.
	(compose_area, compose_earthlike_area): Use them.
	(make_random_terrain, fix_adjacent_terrain,
	flatten_liquid_terrain): Use tmp_t_array.
	* mkunits.c (make_countries): Dynalloc local arrays.
	(country_is_complete, make_independent_units): Use tmp_u_array.
	* nlang.c (ohd_nums, ohd_incomplete): New static globals.
	(others_here_desc, occupants_desc): Use them.
	* plan.c (plan_colonize_support): Use tmp_u_array.
	(gctc_supply): New static global.
	(good_cell_to_colonize): Use it.
	* ps.c (summary_of_seen_units_at): Use tmp_u_array.
	* read.c (default_supply): Remove, no longer to use.
	(init_predefined_symbols): Remove its setup.
	(interp_unit_default): Similarly.
	(interp_unit): Don't use default_supply.
	(interp_utype): Remove test for too many types, call
	create_unit_type.
	(interp_ttype, interp_mtype, interp_atype): Remove tests
	for too many types.
	(too_many_types): Remove, no longer needed.
	(rd_u_arr): New static global.
	(interp_standing_order, read_utype_doctrine): Use it.
	* run.c (rau_incrs): New static global.
	(run_advanced_units): Use it.
	(apr_type): New static global.
	(auto_pick_unit_research, auto_pick_side_research): Use it.
	(auto_pick_new_build_task): Use tmp_u_array.
	* run2.c (ttotals, uttotals): New static globals.
	(run_economy): Use them.
	* score.c (sum_property): Use tmp_u_array.
	* side.c (new_doctrine): Call disallow_more_unit_types.
	* supply.c (mad): New static global.
	(init_supply_system): Set it up.
	* unit.c (create_unit): Allocate numlivebytype and completenesses.
	(oc_numtypes): New static global.
	(can_occupy_unit): Use it.
	(toc_numtypes, type_can_occupy_cell): Similarly.
	(ocw_numtypes, can_occupy_cell_without): Similarly.
	(tocw_numtypes, type_can_occupy_cell_without): Similarly.
	(conn_num_types, can_occupy_conn_1): Similarly.
	(can_carry, type_can_occupy): Use tmp_u_array.
	(num_each_type, shared_each_type): New static globals.
	(eject_excess_occupants): Use them.
	(shortest_unique_name): Dynalloc firstuniq, use it as flag
	instead of shortestdone.
	(shortest_generic_name): Similarly.
	* write.c (write_table): Increase histogram size.

	* ai.c (atc_type): New static global.
	(assign_to_colonize): Use it.
	(pbt_prefs, pbt_fringe_terrain, pbt_enemy_types,
	pbt_num_to_transport): New static globals.
	(preferred_build_type): Use them.
	* ai.h (Strategy): Declare strengths etc as arrays of pointers
	instead of 2D arrays, unitlist and unitlistcount as pointers.
	(Theater): Similarly for numassigned, numneeded, etc.
	(strength_est, etc): New macros (not used yet).
	* iplayer.c (iru_numoffensive, iru_numdefensive): New static globals.
	(iplayer_review_units): Use them.
	* mplayer.c (mplayer_create_strategy): Allocate strength arrays.
	(create_theater): Dynalloc numassigned etc fields.
	(estimate_strengths, mplayer_read_strengths, mplayer_save_state):
	Change to pointer-to-pointer refs.
	(mru_numoffensive, mru_numdefensive): New static globals.
	(mplayer_review_units): Use them.
	* oplayer.c: Similarly.

	* cmd.c (gt_amts, gt_rslts): New static globals.
	(do_one_give, do_one_take): Use them.
	* ui.h (VP draw_materials): Make into a pointer.
	* ui.c (new_vp): Allocate draw_materials field.

	* maccmd.c (do_one_add_terrain): Use tmp_t_array.
	* macwins.c (side_research_dialog): Make participants static global.

	* tkconq.h (UI material_color, etc): Change from array to pointer.
	(UI cell_color, cell_shades): Rename from cellcolor and cellshades.
	(UI best_timages): Similarly.
	(UI unitpics, unitmasks, bestmimages): Remove, not used.
	(Map uvec, ustr, tvec, tstr): Change from array to pointer.
	* tkcmd.c (do_add_terrain, do_remove_terrain): Use tmp_t_array.
	(do_build): Use tmp_u_array.
	* tkinit.c (utype_indexes, mtype_indexes): Change to pointers.
	(init_display): Remove inits of unused fields, alloc space for
	cell_shades and material_color.
	(init_material_images): Remove setup of bestmimages.
	(init_terrain_images): Allocate for best_timages and terrpics.
	(init_shades): Use array-of-array refs to cell_shades.
	* tkmain.c (last_num_units_in_play, last_num_units_incomplete):
	Change from arrays to pointers.
	(init_redraws, update_unit_type_list): Allocate them.
	(create_map): Alloc map uvec, ustr, etc.
	* tkmap.c: Update refs to renamed fields.
	(MapW draw_aux_terrain, draw_materials): Make into pointers.

	* ccmd.c (do_build): Use tmp_u_array.
	* cconq.c (init_display): Use numutypes to size allocs.
	(ask_unit_type, ask_terrain_type): Use array of int instead of short.
	* cdraw.c (draw_type_list_entry): Init lasttypevisible from numutypes.

	* cconq.c (do_dir_2): Fix a variable name.
	* cconq.h: Use #else instead of #elif.

	* version.h: Bump to 7.5pre.
	* NEWS: Update from branch.
	* Xconq.r: Fix line endings.

2000-12-14  Hans Ronne <hronne@2.sbbs.se>

	Fix so that socket.c compiles with the GUSI libraries on the
	mac.
	* mac.c (open_remote_connection, low_send, low_receive,
	close_remote_connection): Comment out.
	* socket.c: Don't include <sys/stat.h>, <pwd.h> and <sys/file.h>
	 on the mac.
	(accept_remote_connection): Declare tmp as unsigned int.
	* util.c (gettimeofday): Declare static instead of extern.

2000-12-11  Stan Shebs  <shebs@shebs.cnchost.com>

	* version.h: Bump to 7.4.0.
	* NEWS: Update.
	* README, xconq.spec, gdlref.texi, hacking.texi, playref.texi,
	xcdesign.texi, xconq.texi, Xconq.r: Update version numbers.

	* coral-sea.g: Tweak title to distinguish from coral-sea-th.g.

	* test/Makefile.in (check-versions): Look at xconq.spec.

	* INSTALL: Remove obsolete warning about tcl/tk versions.

	Adjust the second column of unit info to always be in the middle
	of the pane.
	* tkconq.tcl (create_map_window): Add "col2" tag to all text
	items in the second column.
	(make_normal_bindings): Add a configure binding to unit info.
	(resize_unit_info): New proc.

	* tkconq.tcl (create_map_window): Increase the default window
	width just a little more.

	* ng-german.g: Better name generation, from Michael Burschik
	<burschik@id-pro.de>.
	* xconq.texi: Mention in credits.

	* flattop.g: Use Japanese national flag, scales better.

	* flags16x16.gif, flags8x8.gif: Tweak Swedish, Japanese, and
	American flags some more.

2000-12-10  Hans Ronne <hronne@2.sbbs.se>

	Modernize mac splash dialog. Use new splash image. Hide defunct
	connect button. Fix debug string update bug. Fix problem with no
	unit images being drawn at low resolution if emblem color is not
	defined for the side.
	* macdraw.c (draw_unit_image): Always use sidecolor for small
	boxes if emblem color is undefined.
	* macinit.c (filter_splash): Add support for more key codes.
	(filter_splash): Fix update bug in debug string.
	(do_splash_box): Hide diSplashConnect.
	(do_splash_box): Call draw_default_button.
	* macmenus.c (adjust_menus): Always disable connect item.
	* XconqProj.rsrc (DITL 128 "Splash Items"): Resize pict item.
	(DITL 128 "Splash Items"): Make buttons into real buttons and resize.
	(DITL 133 "About Items"): Resize pict item.
	(DLOG 128 "Splash"): Resize dialog to fit new pict.
	(DLOG 133 "About"): Resize dialog to fit new pict.
	(PICT 2001 "Splash Color"): Replace by new splash image.
	* Xconq.r: Update from XconqProj.rsrc.

2000-12-09  Stan Shebs  <shebs@shebs.cnchost.com>

	Improve the textual description of tasks.
	* task.def (hit-unit): Shorten display name to just "Hit".
	* nlang.c (task_desc): Use the task type's display name
	consistently, fix generation of unit type and side substrings.

	* tkconq.tcl (create_map_window): Make the map larger.

	* flags8x8.gif, flags16x16.gif: Various improvements to
	flag appearance.

	* test/timeline.tcl: New file, wish script that displays
	activity traces.

2000-12-08  Stan Shebs  <shebs@shebs.cnchost.com>

	Add player feedback for out-of-ammo and other action failures.
	(Still missing Mac interface version, more complicated because
	of multi-unit selections.)
	* history.def (zz-undefined): New hevt type, flag value.
	(insufficient-ammo): New hevt type, distinguishes missing
	ammo from other types of missing material.
	* combat.c (check_attack_action, check_overrun_action,
	check_fire_at_action, check_fire_into_action): Return
	A_ANY_NO_AMMO instead of A_ANY_NO_MATERIAL
	* nlang.c (action_result_desc): Add case for A_ANY_NO_AMMO,
	improve the default case.
	(advance_failure_desc): New function, describes reason for
	failure to advance into a cell.
	* conq.h (advance_failure_desc): Declare.
	* ui.c (advance_into_cell): Add failure code argument, rewrite
	cases to use it.
	* ui.h (advance_into_cell): Update decl.

	* maccmd.c (do_one_dir_move): Add argument to advance_into_cell.
	* macmouse.c (move_the_selected_unit): Ditto.
	* tkcmd.c (aux_move_dir): Ditto, plus notify of failure reason.
	* tkmap.c (move_the_selected_unit): Ditto.
	* cconq.c (do_dir_2): Ditto.

	* PROJECTS: Add some ideas, remove a couple completed projects.

2000-12-06  Stan Shebs  <shebs@shebs.cnchost.com>

	Report LOS blockage understandably.
	* history.def (fire-blocked): New hevt type.
	* nlang.c (action_result_desc): Describe it.
	(report_combat_special): Make static.
	* combat.c (check_fire_at_action, check_fire_into_action): Report
	it.
	(check_attack_action): Report A_ANY_NO_MATERIAL if no ammo.
	(report_damage): Don't report actions by dead units.

	* ai.c (enemy_close_by): Pass correct values to victim_here.
	* task.c (do_capture_task): Test for enemy sides specifically,
	also fix typo in unit type test.

	* unit.c (max_builds): Delete, no longer used.

	* cmdline.c (find_variant_from_name): Handle empty variant list,
	make static.
	(set_variants_from_options): Add error messages.

2000-12-05  Hans Ronne <hronne@2.sbbs.se>

	Fix sporadic crashes in terrain drawing code due to a negative
	quasirand value being used to pick subimages.
	* macdraw.c (draw_terrain_transitions): Force quasirand to be
	positive.
	* macrow.c (draw_terrain_row): Force quasirand to be positive.
	* tkmap.c (draw_terrain_iso): Force quasirand to be positive.
	(draw_terrain_row): Force quasirand to be positive. 
	(draw_terrain_transitions): Force quasirand to be positive. 

2000-12-05  Stan Shebs  <shebs@shebs.cnchost.com>

	* move.c (change_control_side_around): If the cell is populated
	by a trusted side, change control to that side.

	* tkconq.tcl (create_map_window): Give a little less space to the
	notices.

	* ww2-adv.g: Fix armor's oil consumption, adjust other oil
	numbers to compensate, add some chars, add vision-range for
	air units, make ground attacks take more time.
	* ww2-eur-42.g: Add some air units, also a Soviet convoy.

	* hill.g: Fix counterattack usage, misc improvements.
	* stdunit.g, lhsunit.g: Remove refs to nonexistent
	counter-strength table.

2000-12-04  Stan Shebs  <shebs@shebs.cnchost.com>

	* task.def: Revert the mistaken task argtypes changes, add some
	comments.
	* unit.h: Add some comments.
	* task.c: Add a couple comments.

	* tkmain.c (draw_unit_info): Ensure the t0 field is cleared
	if there are no tasks.

2000-12-03  Hans Ronne <hronne@2.sbbs.se>

	Pass the type and side of the unit to be captured to
	create_capture_task.  Handle combat model 1 correctly when testing
	for the ability to capture.
	* ai.c (keep_defensive_goal): Pass type and side of the unit to be 
	captured to net_set_capture_task.
	(ai_go_after_captive): Pass tmputype and tmpside set by  
	useful_captureable_here on to net_set_capture_task.
	* combat.c (type_can_capture): Handle both combat model 0 and 1.
	(type_can_capture_directly): Always return false for combat model 1.
	* nlang.c (task_desc): Rewrite TASK_CAPTURE with TASK_HIT_UNIT
	as template (fixes argument bug). 
	* plan.c (useful_captureable_here): Set tmpside to side2.
	(indep_captureable_here): Set tmpside to side2 and tmputype to u2.
	(capture_indep_if_nearby): Pass tmputype and tmpside set by 
	indep_captureable_here on to set_capture_task.
	(capture_useful_if_nearby): Pass tmputype and tmpside set by 
	useful_captureable_here on to set_capture_task.
	(plan_random): Pass NONUTYPE and ALLSIDES to set_capture_task.
	* task.c (create_capture_task): Set args[2] and args[3] correctly
	using new u and s arguments.
	(set_capture_task): Pass new u and s args to create_capture_task.
	(push_capture_task): Pass new u and s args to create_capture_task.
	* task.def: Fix all argument strings so that they agree with
	functions.
	(TASK_CAPTURE): Add missing u and s arguments.
	* tp.c (net_set_capture_task): Add new u and s arguments and pass 
	them on to set_capture_task and create_capture_task.

	Make mac instructions window floating and improve its key handling.
	Put some return and cancel buttons in standard mac positions.
	* macconq.c (handle_keystroke): Call do_key_down_instructions.
	* macconq.h (do_key_down_instructions): New prototype.
	* machelp.c (do_key_down_instructions): New function.
	(create_instructions_window): Call MakeFloat.
	(draw_instructions): Draw a frame around the default button.
	* XconqProj.rsrc (WIND 141 "Instructions"): Use WDEF 1057.
	(DITL 129 "New Game Items"): Move buttons to standard positions.
	(DITL 131 "Variants Items"): Move buttons to standard positions.
	* Xconq.r: Update from XconqProj.rsrc.

	Fix problem with terrain sample size in design window.
	* macconq.h (draw_terrain_sample): Add power as argument.
	* macdraw.c (draw_terrain_sample): Add power as argument.
	* machelp.c (draw_help): Pass power 5 to draw_terrain_sample.
	* macdesign.c (draw_design_window_tool): Pass power 4 to 
	draw_terrain_sample.
	
2000-12-02  Hans Ronne <hronne@2.sbbs.se>

	Fix so that Elves don't stab Gondor in the back and so that the Ring
	can freely enter and leave bearers. Make it possible to capture the
	Ring directly if it belongs to another side.
	* 3rd-age.g (ring): Set attack value to 0.
	(acp-to-attck): Add (u* ring 0).
	(acp-to-capture): Add (persons ring 1).
	(capture-chance): Add (persons ring 100).
	(ferry-on-entry): Add (persons ring 1).
	(ferry-on-departure): Add (persons ring 1).
	* lord-ring.g (trusts): Fix table so that it works.

2000-12-02  Stan Shebs  <shebs@shebs.cnchost.com>

	Shrink unit info pane one line by putting two tasks on a line.
	* tkconq.tcl (create_map_window): Make unitinfo smaller, comment
	out line 6 text fields.
	* tkmain.c (empty_unit_info): Make static.
	(draw_unit_info): Reorg task display to list two on 5th line,
	also move tooling desc up one, use local var for map->number.

	* ai.c (ai_go_after_victim, etc): Display AI type name in
	debug output.
	* iplayer.c (iplayer_react_to_new_side, iplayer_save_state,
	iplayer_theater_at, iplayer_at_desig): Remove again, fixed
	callers.
	* mplayer.c (mplayerinited): Remove, not useful.
	(mplayer_init): Remove ref, also use ai_controlled macro.
	* oplayer.c (oplayerinited): Similarly.
	* ui.c (oneliner): Test ai_at_desig before using.

2000-11-30  Hans Ronne <hronne@2.sbbs.se>

	Fix compile problem on the mac and iplayer crashes on unix.
	* macunit.c (hit_closeup_dialog): Add missing braces.
	* iplayer.c (iplayer_react_to_new_side, iplayer_save_state,
	iplayer_theater_at, iplayer_at_desig): Restore, called when
	dside is under iplayer control.

2000-11-30  Stan Shebs  <shebs@shebs.cnchost.com>

	* tkmap.c (draw_current): Don't draw alarming colors for the
	health bar of multi-part units.
	(draw_unit_blast): Fix blast positioning if isometric.

	* unit.h (ai_controlled): New macro.
	* ai.c, iplayer.c, mplayer.c, plan.c, run.c, macunit.c: Use it
	everywhere.

	* ai.c (offensive_worth, defensive_worth): Break complicated
	expressions into several statements.
	* iplayer.c (iplayerinited): Remove, never used.
	(iplayer_react_to_new_side, iplayer_save_state,
	iplayer_theater_at, iplayer_at_desig): Remove, never used.
	* run.c (move_one_unit_multiple): Rework test of AI units
	needing to run task reactions.
	* task.c (execute_task): Don't skip to task reaction if unit
	is not AI controlled.

2000-11-28  Hans Ronne <hronne@2.sbbs.se>

	Fix (hopefully) sporadic end-of-turn failures when switching from 
	manual to ai control due to non-cleared task outcomes.

	* plan.c (force_replan): Always clear the last task outcome.

2000-11-27  Jim Kingdon  <kingdon@localhost.localdomain>

	* ui.c (take_supplies): If unit has no transport, just forget
	about undating the transport's supply_is_low (fixes coredump).

2000-11-28  Hans Ronne <hronne@2.sbbs.se>

	Use registered instead of wired-in AI types in the mac player setup 
	dialog.

	* macinit.c (hit_player_setup_dialog): Use next_ai_type_name to
	cycle through available AI types. Use next_ai_type_name(NULL) as 
	default AI type for new players instead of "mplayer".
	
	Fix libcurses and curses so that cconq builds under CodeWarrior
	with modern includes.

	* cconq.c (MAC): Only define if undefined.
	(console.h): Don't include ifdef __MWERKS__

	* cconq.h: Change <curses.h> to "curses.h" on the mac.

	* cdraw.c (xbeep): Change THINK_C to MAC.

	* curses.c (initscr): Change THINK_C to MAC.

	* curses.h (MAC): Only define if undefined.
	Change <maccurses.h> to "maccurses.h".
	Change THINK_C to MAC for line drawing macros.

	* v_maccur.c (maccur_init_event): Use NewAEEventHandlerProc.

2000-11-27  Stan Shebs  <shebs@shebs.cnchost.com>

	Remove wired-in list of AI types.
	* config.h (numaitypes): Remove.
	(MAXAITYPES): New macro.
	* conq.h (ai_type_name): Declare here instead of in ai.h
	* ai.h (enum AIType): Remove.
	(AI_ops): Move back to here from conq.h.
	(Strategy type): Remove field.
	* ai.c (mplayer_ops, iplayer_ops, oplayer_ops): Remove.
	(numaitypes): New global.
	(all_ai_ops): Make static array of ops, instead of pointers to ops.
	(init_ai_types): Call registration functions.
	(ai_type_name): Re-enable.
	(next_ai_type_name, ai_type_help, etc): Fix refs to all_ai_ops.
	(next_ai_type_name, init_ai, etc): Fix AI type iteration.
	* iplayer.c (register_iplayer): New function.
	(iplayer_ops): Remove.
	(iplayer_create_strategy): Don't init type.
	* mplayer.c (register_mplayer): New function.
	(mplayer_ops): Remove.
	(mplayer_create_strategy): Don't init type.
	* oplayer.c (register_oplayer): New function.
	(oplayer_ops): Remove.
	(oplayer_create_strategy): Don't init type.

	* macmenus.c (build_ai_type_menu): Use next_ai_type_name to
	iterate over AI types.
	(adjust_menus): Iterate over AI type menu entries instead of
	using numaitypes.

	* ai.c (ai_go_after_victim, etc): Don't assume mplayer in debug
	output.
	(unit_strength): Remove, never used.

	* cmdline.c (parse_command_line): Use default AI type instead
	of ",mplayer".

	* transport.g: Set a limit on how long to run the test.

2000-11-26  Jim Kingdon

	* ai.c: Don't use both an initializer and "extern" (shuts up GCC).

2000-11-25  Hans Ronne <hronne@2.sbbs.se>

	General cleanup of kernel prototypes - part 5 (ai.h). Only keep 
	prototypes that are shared between ai.c and specific AIs in ai.h. Then 
	include ai.h in those files only. Move all other prototypes from ai.h 
	either to conq.h or ai.c (static).

	Reduce AI code duplication by moving functions that are shared by 
	all AIs into ai.c. Improve kernel separation - don't include kernel.h
	in ai.c. Use the same strategy and theater definitions for all AIs and 
	move them to ai.h. Use a common macro ai(s) to access ai data in all
	files. Don't use separate theater-free functions for the iplayer. Use 
	the fact that its ai(s)->theaters is NULL instead. Ditto for iplayer
	transportation-free code.
	
	* ai.c (ai.h): Include it here.
	(kernel.h): Don't include it here.
	(game_class): Initialize to gc_none.
	(bhw_max): Initialize.
	(ai_init_turn): Move prototype here.
	(ai_decide_plan): Move prototype here.
	(ai_plan_research): Move prototype here.
	(ai_react_to_task_result): Move prototype here.
	(ai_finish_movement): Move prototype here.
	(offensive_worth): Move prototype here.
	(defensive_worth): Move prototype here.
	(exploring_worth): Move prototype here.
	(colonizing_worth): Move prototype here.
	(facility_worth): Move prototype here.
	(random_worth): Move prototype here.
	(siege_worth): Move prototype here.
	(basic_hit_worth): Move prototype here.
	(basic_fire_worth): Move prototype here.
	(basic_capture_worth): Move prototype here.
	(basic_transport_worth): Move prototype here.
	(unit_strength): Move prototype here.
	(display_assessment): Move prototype here.
	(is_base_for): Move prototype here.
	(is_carrier_for): Move prototype here.
	(set_u_is_base): Move prototype here.
	(set_u_is_transport): Move prototype here.
	(set_u_is_carrier): Move prototype here.
	(set_u_is_base_builder): Move prototype here.
	(set_u_can_make): Move prototype here.
	(set_u_can_capture): Move prototype here.
	(set_u_bw): Move prototype here.
	(set_u_offensive_worth): Move prototype here.
	(set_u_defensive_worth): Move prototype here.
	(set_u_explorer_worth): Move prototype here.
	(set_u_colonizer_worth): Move prototype here.
	(set_u_facility_worth): Move prototype here.
	(set_u_random_worth): Move prototype here.
	(set_u_siege_worth): Move prototype here.
	(set_u_is_ground_mobile): Move prototype here.
	(set_u_is_naval_mobile): Move prototype here.
	(set_u_is_air_mobile): Move prototype here.
	(set_u_is_advanced): Move prototype here.
	(set_u_is_colonizer): Move prototype here.
	(set_u_is_facility): Move prototype here.
	(set_uu_bhw): Move prototype here.
	(set_uu_bfw): Move prototype here.
	(set_uu_bcw): Move prototype here.
	(set_uu_btw): Move prototype here.
	(cell_unknown): Move prototype here.
	(enemies_present): Move prototype here.
	(carryable): Move prototype here.
	(compare_weights): Move prototype here.
	(need_more_transportation): Move prototype here.
	(ai_react_to_action_result): Remove old function.
	(ai_type_name): Comment out unused function.
	(operating_range_best): Move function to unit.c.
	(operating_range_worst): Move function to unit.c.
	(ai_plan_research): Renamed mplayer_go_after_victim etc.
	(ai_plan_research): Renamed mplayer_plan_research etc.
	(find_game_class): Move here from mplayer.c etc.
	(update_unit_plans): Move here from mplayer.c etc.
	(update_unit_plans_randomly): Move here from mplayer.c etc.
	(ai_react_to_action): New function (with better name). Replaces 
	mplayer_react_to_action_result etc.
	(run_local_ai): Call ai_react_to_action instead.
	(ai_decide_plan): Call check_current_target etc. here instead.
	(check_current_target): Move here from mplayer.c etc.
	(defensive_reaction): Move here from mplayer.c etc.
	(keep_defensive_goal): Move here from mplayer.c etc.
	(maybe_defend_own_transport): Move here from mplayer.c etc.
	(undefended_neighbour): Move here from mplayer.c etc.
	(maybe_defend_other_transport): Move here from mplayer.c etc.
	(offensive_reaction): Move here from mplayer.c etc.
	(offensive_reaction): Call ai_go_after_victim etc. instead.
	(ai_go_after_victim): Renamed mplayer_go_after_victim etc.
	(ai_go_after_captive): Renamed mplayer_go_after_captive etc.
	(ai_fire_at_opportunity): Renamed mplayer_fire_at_opportunity etc.
	(need_this_type_to_collect): Move here from mplayer.c etc.
	(mp_collect_here): Move here from mplayer.c etc.
	(assign_to_collection): Move here from mplayer.c etc.
	(assign_to_colonize): Move here from mplayer.c etc.
	(assign_to_improve): Move here from mplayer.c etc.
	(assign_to_defend_unit): Move here from mplayer.c etc.
	(assign_to_defend_cell): Move here from mplayer.c etc.
	(assign_to_defend_vicinity): Move here from mplayer.c etc.
	(compare_weights): Move here from mplayer.c etc.
	(probably_explorable): Move here from mplayer.c etc.
	(assign_to_exploration): Move here from mplayer.c etc.
	(assign_explorer_to_theater): Move here from mplayer.c etc.
	(assign_to_explorer_construction): Move here from mplayer.c etc.
	(assign_to_offense): Move here from mplayer.c etc.
	(assign_to_offense_support): Move here from mplayer.c etc.
	(assign_to_colonization_support): Move here from mplayer.c etc.
	(preferred_build_type): Move here from mplayer.c.
	(need_more_transportation): Move here from mplayer.c etc.
	(build_base_for_self): Move here from mplayer.c etc.
	(build_base_for_others): Move here from mplayer.c etc.
	(build_depot_for_self): Move here from mplayer.c etc.
	(can_develop_on): Move here from mplayer.c etc.
	(needs_develop): Move here from mplayer.c etc.
	(assign_to_develop_on): Move here from mplayer.c etc.
	(desired_direction_impassable): Move here from mplayer.c etc.
	(could_be_ferried): Move here from mplayer.c etc.
	(blocked_by_enemy): Move here from mplayer.c etc.
	(attack_blockage): Move here from mplayer.c etc.
	(enemy_close_by): Move here from mplayer.c etc.
	(ai_receive_message): Remove old function.
	(ai_receive_message): Renamed mplayer_receive_message etc.
	
	* ai.h (a_ai_op): Move definition to conq.h.
	(MAXGOALS): Move definition here from mplayer.c etc.
	(MAXTHEATERS): Move definition here from mplayer.c etc.
	(a_strategy): Move definition here from mplayer.c etc.
	(RS_DEVELOP_NEEDED): Move definition here from mplayer.c etc.
	(RS_DEVELOP_ASSIGNED): Move definition here from mplayer.c etc.
	(RS_UPGRADE_NEEDED): Move definition here from mplayer.c etc.
	(ai): New macro, replaces mplayer, iplayer and oplayer.
	(a_theater): Move definition here from mplayer.c etc.
	(for_all_theaters): Move definition here from mplayer.c etc.
	(theater_at): Move definition here from mplayer.c etc.
	(theater_at): Return NULL if ai(s)->theaters is NULL.
	(set_theater_at): Move definition here from mplayer.c etc.
	(for_all_cells_in_theater): Move definition here from mplayer.c etc.
	(unit_theater): Move definition here from mplayer.c etc.
	(set_unit_theater): Move definition here from mplayer.c etc.
	(a_game_class): Move definition here from mplayer.c etc.
	(weightelt): Move definition here.
	(game_class): Declare extern.
	(any_auto_repair): Declare extern.
	(bhw_max): Declare extern.
	(init_ai_types): Move prototype to conq.h.
	(find_ai_type): Move prototype to conq.h.
	(next_ai_type_name): Move prototype to conq.h.
	(ai_type_help): Move prototype to conq.h.
	(init_ai): Move prototype to conq.h.
	(ai_init_turn): Make prototype static and move to ai.c.
	(ai_decide_plan): Make prototype static and move to ai.c.
	(ai_plan_research): Make prototype static and move to ai.c.
	(ai_react_to_task_result): Make prototype static and move to ai.c.
	(ai_react_to_new_side): Move prototype to conq.h.
	(ai_adjust_plan): Make prototype static and move to ai.c.
	(ai_finish_movement): Make prototype static and move to ai.c.
	(ai_receive_message): Move prototype to conq.h.
	(ai_save_state): Move prototype to conq.h.
	(ai_region_at): Move prototype to conq.h.
	(ai_at_desig): Move prototype to conq.h.
	(ai_init_shared): Move prototype to conq.h.
	(basic_worth): Make prototype static and move to ai.c.
	(offensive_worth): Make prototype static and move to ai.c.
	(defensive_worth): Make prototype static and move to ai.c.
	(exploring_worth): Make prototype static and move to ai.c.
	(colonizing_worth): Make prototype static and move to ai.c.
	(facility_worth): Make prototype static and move to ai.c.
	(random_worth): Make prototype static and move to ai.c.
	(siege_worth): Make prototype static and move to ai.c.
	(basic_hit_worth): Make prototype static and move to ai.c.
	(basic_fire_worth): Make prototype static and move to ai.c.
	(basic_capture_worth): Make prototype static and move to ai.c.
	(basic_transport_worth): Make prototype static and move to ai.c.
	(unit_strength): Make prototype static and move to ai.c.
	(display_assessment): Make prototype static and move to ai.c.
	(operating_range_best): Move prototype to unit.h.
	(operating_range_worst): Move prototype to unit.h.
	(is_base_for): Make prototype static and move to ai.c.
	(is_carrier_for): Make prototype static and move to ai.c.
	(set_u_is_base): Make prototype static and move to ai.c.
	(set_u_is_transport): Make prototype static and move to ai.c.
	(set_u_is_carrier): Make prototype static and move to ai.c.
	(set_u_is_base_builder): Make prototype static and move to ai.c.
	(set_u_can_make): Make prototype static and move to ai.c.
	(set_u_can_capture): Make prototype static and move to ai.c.
	(set_u_bw): Make prototype static and move to ai.c.
	(set_u_offensive_worth): Make prototype static and move to ai.c.
	(set_u_defensive_worth): Make prototype static and move to ai.c.
	(set_u_explorer_worth): Make prototype static and move to ai.c.
	(set_u_colonizer_worth): Make prototype static and move to ai.c.
	(set_u_facility_worth): Make prototype static and move to ai.c.
	(set_u_random_worth): Make prototype static and move to ai.c.
	(set_u_siege_worth): Make prototype static and move to ai.c.
	(set_u_is_ground_mobile): Make prototype static and move to ai.c.
	(set_u_is_naval_mobile): Make prototype static and move to ai.c.
	(set_u_is_air_mobile): Make prototype static and move to ai.c.
	(set_u_is_advanced): Make prototype static and move to ai.c.
	(set_u_is_colonizer): Make prototype static and move to ai.c.
	(set_u_is_facility): Make prototype static and move to ai.c.
	(set_uu_bhw): Make prototype static and move to ai.c.
	(set_uu_bfw): Make prototype static and move to ai.c.
	(set_uu_bcw): Make prototype static and move to ai.c.
	(set_uu_btw): Make prototype static and move to ai.c.
	(create_goal): Move prototype to conq.h.
	(cell_unknown): Make prototype static and move to ai.c.
	(enemies_present): Make prototype static and move to ai.c.
	(goal_desig): Move prototype to conq.h.
	(carryable): Make prototype static and move to ai.c.
	(ai_init_turn): Make prototype static and move to ai.c.
	(ai_init_turn): Make prototype static and move to ai.c.
	(ai_init_turn): Make prototype static and move to ai.c.
	(ai_init_turn): Make prototype static and move to ai.c.
	(ai_react_to_action_result): Remove obsolete prototype.
	(find_game_class): Declare extern.
	(update_unit_plans): Declare extern.
	(update_unit_plans_randomly): Declare extern.
	(need_this_type_to_collect): Declare extern.
	(assign_to_collection): Declare extern.
	(assign_to_colonize): Declare extern.
	(assign_to_improve): Declare extern.
	(assign_to_defend_unit): Declare extern.
	(assign_to_defend_cell): Declare extern.
	(assign_to_defend_vicinity): Declare extern.
	(assign_to_exploration): Declare extern.
	(assign_explorer_to_theater): Declare extern.
	(assign_to_explorer_construction): Declare extern.
	(assign_to_offense): Declare extern.
	(assign_to_offense_support): Declare extern.
	(assign_to_colonization_support): Declare extern.
	(preferred_build_type): Declare extern.
	(build_base_for_self): Declare extern.
	(build_base_for_others): Declare extern.
	(build_depot_for_self): Declare extern.
	(can_develop_on): Declare extern.
	(needs_develop): Declare extern.
	(assign_to_develop_on): Declare extern.
	(desired_direction_impassable): Declare extern.
	(could_be_ferried): Declare extern.
	(blocked_by_enemy): Declare extern.
	(attack_blockage): Declare extern.

	* conq.h (ai.h): Don't include it here.
	(a_ai_op): Move definition here.
	(a_ai_op): Remove to_plan_research.
	(a_ai_op): Remove to_react_to_action_result.
	(a_ai_op): Remove to_receive_message.
	(all_ai_ops): Declare extern here.
	(init_ai): Move prototype here.
	(init_ai_types): Move prototype here.
	(find_ai_type): Move prototype here.
	(run_local_ai): Move prototype here.
	(next_ai_type_name): Move prototype here.
	(ai_type_help): Move prototype here.	
	(ai_react_to_new_side): Move prototype here.
	(ai_receive_message): Move prototype here.
	(ai_save_state): Move prototype here.
	(ai_region_at): Move prototype here.
	(ai_at_desig): Move prototype here.
	(ai_init_shared): Move prototype here.
	(create_goal): Move prototype here.
	(goal_desig): Move prototype here.
	
	* iplayer.c (ai.h): Include it here.
	(iplayer_ops): Remove iplayer_plan_research.
	(iplayer_ops): Remove iplayer_react_to_action_result.
	(iplayer_ops): Remove iplayer_receive_message.
	(bhw_max): Move declaration to ai.h.
	(a_strategy): Move definition to ai.h.
	(update_unit_plans): Move to ai.c.
	(create_strategy): Rename to iplayer_create_strategy.
	(review_units): Rename to iplayer_review_units.
	(rethink_plan): Rename to iplayer_rethink_plan.
	(iplayer_create_strategy): Set theaters to NULL.
	(iplayer_decide_plan): Don't call check_current_target.
	(iplayer_decide_plan): Don't call defensive_reaction.
	(iplayer_decide_plan): Don't call offensive_reaction.
	(iplayer_react_to_action_result): Rename and move to ai.c.
	(check_current_target): Move to ai.c.
	(defensive_reaction): Move to ai.c.
	(keep_defensive_goal): Move to ai.c.
	(maybe_defend_own_transport): Move to ai.c.
	(undefended_neighbour): Move to ai.c.
	(maybe_defend_other_transport): Move to ai.c.
	(offensive_reaction): Move to ai.c.
	(iplayer_go_after_victim): Rename and move to ai.c.
	(iplayer_go_after_captive): Rename and move to ai.c.
	(iplayer_fire_at_opportunity): Rename and move to ai.c.
	(iplayer_plan_research): Rename and move to ai.c.
	(assign_to_colonize): Move to ai.c.
	(assign_to_improve): Move to ai.c.
	(assign_to_defend_unit): Move to ai.c.
	(assign_to_defend_cell): Move to ai.c.
	(assign_to_defend_vicinity): Move to ai.c.
	(assign_to_offense): Move to ai.c.
	(assign_to_offense_support): Move to ai.c.
	(assign_to_colonization_support): Move to ai.c.
	(preferred_build_type): Use common function in ai.c.
	(build_depot_for_self): Move to ai.c.
	(desired_direction_impassable): Move to ai.c.
	(blocked_by_enemy): Move to ai.c.
	(attack_blockage): Move to ai.c.
	(enemy_close_by): Move to ai.c.
	(iplayer_receive_message): Rename and move to ai.c.

	* macinit.c (hit_player_setup_dialog): Add oplayer support.

	* macmenus.c (all_ai_ops): Remove declaration.

	* mplayer.c (ai.h): Include it here.
	Replace mplayer(s) by ai(s) throughout the file.
	(mplayer_ops): Remove mplayer_plan_research.
	(mplayer_ops): Remove mplayer_react_to_action_result.
	(mplayer_ops): Remove mplayer_receive_message.
	(MAXGOALS): Move definition to ai.h.
	(MAXTHEATERS): Move definition to ai.h.
	(a_strategy): Move definition to ai.h.
	(RS_DEVELOP_NEEDED): Move definition to ai.h.
	(RS_DEVELOP_ASSIGNED): Move definition to ai.h.
	(RS_UPGRADE_NEEDED): Move definition to ai.h.
	(a_theater): Move definition to ai.h.
	(for_all_theaters): Move definition to ai.h.
	(theater_at): Move definition to ai.h.
	(set_theater_at): Move definition to ai.h.
	(for_all_cells_in_theater): Move definition to ai.h.
	(unit_theater): Move definition to ai.h.
	(set_unit_theater): Move definition to ai.h.
	(a_game_class): Move definition to ai.h.
	(weightelt): Move definition to ai.h.
	(game_class): Declare in ai.h and initialize in ai.c.
	(bhw_max): Move declaration to ai.h.
	(find_game_class): Move to ai.c.
	(update_unit_plans): Move to ai.c.
	(update_unit_plans_randomly): Move to ai.c.
	(create_strategy): Rename to mplayer_create_strategy.
	(review_units): Rename to mplayer_review_units.
	(rethink_plan): Rename to mplayer_rethink_plan.
	(mplayer_decide_plan): Don't call check_current_target etc.
	(mplayer_decide_plan): Don't call defensive_reaction.
	(mplayer_decide_plan): Don't call offensive_reaction.
	(mplayer_react_to_action_result): Rename and move to ai.c.
	(check_current_target): Move to ai.c.
	(defensive_reaction): Move to ai.c.
	(keep_defensive_goal): Move to ai.c.
	(maybe_defend_own_transport): Move to ai.c.
	(undefended_neighbour): Move to ai.c.
	(maybe_defend_other_transport): Move to ai.c.
	(offensive_reaction): Move to ai.c.
	(mplayer_go_after_victim): Rename and move to ai.c.
	(mplayer_go_after_captive): Rename and move to ai.c.
	(mplayer_fire_at_opportunity): Rename and move to ai.c.
	(mplayer_plan_research): Rename and move to ai.c.
	(need_this_type_to_collect): Move to ai.c.
	(mp_collect_here): Move to ai.c.
	(assign_to_collection): Move to ai.c.
	(assign_to_colonize): Move to ai.c.
	(assign_to_improve): Move to ai.c.
	(assign_to_defend_unit): Move to ai.c.
	(assign_to_defend_cell): Move to ai.c.
	(assign_to_defend_vicinity): Move to ai.c.
	(compare_weights): Move to ai.c.
	(probably_explorable): Move to ai.c.
	(assign_to_exploration): Move to ai.c.
	(assign_explorer_to_theater): Move to ai.c.
	(assign_to_explorer_construction): Move to ai.c.
	(assign_to_offense): Move to ai.c.
	(assign_to_offense_support): Move to ai.c.
	(assign_to_colonization_support): Move to ai.c.
	(preferred_build_type): Move to ai.c.
	(need_more_transportation): Move to ai.c.
	(build_base_for_self): Move to ai.c.
	(build_base_for_others): Move to ai.c.
	(build_depot_for_self): Move to ai.c.
	(can_develop_on): Move to ai.c.
	(needs_develop): Move to ai.c.
	(assign_to_develop_on): Move to ai.c.
	(desired_direction_impassable): Move to ai.c.
	(could_be_ferried): Move to ai.c.
	(blocked_by_enemy): Move to ai.c.
	(attack_blockage): Move to ai.c.
	(enemy_close_by): Move to ai.c.
	(mplayer_receive_message): Rename and move to ai.c.
	(compare_weights): Move to ai.c.

	* oplayer.c (ai.h): Include it here.
	Replace oplayer(s) by ai(s) throughout the file.
	(oplayer_ops): Remove NULL slot for research.
	(oplayer_ops): Remove oplayer_react_to_action_result.
	(oplayer_ops): Remove oplayer_receive_message.
	(MAXGOALS): Move definition to ai.h.
	(MAXTHEATERS): Move definition to ai.h.
	(a_strategy): Move definition to ai.h.
	(RS_DEVELOP_NEEDED): Move definition to ai.h.
	(RS_DEVELOP_ASSIGNED): Move definition to ai.h.
	(RS_UPGRADE_NEEDED): Move definition to ai.h.
	(a_theater): Move definition to ai.h.
	(for_all_theaters): Move definition to ai.h.
	(theater_at): Move definition to ai.h.
	(set_theater_at): Move definition to ai.h.
	(for_all_cells_in_theater): Move definition to ai.h.
	(unit_theater): Move definition to ai.h.
	(set_unit_theater): Move definition to ai.h.
	(a_game_class): Move definition to ai.h.
	(weightelt): Move definition to ai.h.
	(game_class): Declare in ai.h and initialize in ai.c.
	(bhw_max): Move declaration to ai.h.
	(find_game_class): Move to ai.c.
	(update_unit_plans): Move to ai.c.
	(update_unit_plans_randomly): Move to ai.c.
	(create_strategy): Rename to oplayer_create_strategy.
	(review_units): Rename to oplayer_review_units.
	(rethink_plan): Rename to oplayer_rethink_plan.
	(oplayer_decide_plan): Don't call check_current_target.
	(oplayer_decide_plan): Don't call defensive_reaction.
	(oplayer_decide_plan): Don't call offensive_reaction.
	(oplayer_react_to_action_result): Rename and move to ai.c.
	(check_current_target): Move to ai.c.
	(defensive_reaction): Move to ai.c.
	(keep_defensive_goal): Move to ai.c.
	(maybe_defend_own_transport): Move to ai.c.
	(undefended_neighbour): Move to ai.c.
	(maybe_defend_other_transport): Move to ai.c.
	(offensive_reaction): Move to ai.c.
	(oplayer_go_after_victim): Rename and move to ai.c.
	(oplayer_go_after_captive): Rename and move to ai.c.
	(oplayer_fire_at_opportunity): Rename and move to ai.c.
	(need_this_type_to_collect): Move to ai.c.
	(mp_collect_here): Move to ai.c.
	(assign_to_collection): Move to ai.c.
	(assign_to_colonize): Move to ai.c.
	(assign_to_improve): Move to ai.c.
	(assign_to_defend_unit): Move to ai.c.
	(assign_to_defend_cell): Move to ai.c.
	(assign_to_defend_vicinity): Move to ai.c.
	(compare_weights): Move to ai.c.
	(probably_explorable): Move to ai.c.
	(assign_to_exploration): Move to ai.c.
	(assign_explorer_to_theater): Move to ai.c.
	(assign_to_explorer_construction): Move to ai.c.
	(assign_to_offense): Move to ai.c.
	(assign_to_offense_support): Move to ai.c.
	(assign_to_colonization_support): Move to ai.c.
	(preferred_build_type): Use common function in ai.c.
	(need_more_transportation): Move to ai.c.
	(build_base_for_self): Move to ai.c.
	(build_base_for_others): Move to ai.c.
	(build_depot_for_self): Move to ai.c.
	(can_develop_on): Move to ai.c.
	(needs_develop): Move to ai.c.
	(assign_to_develop_on): Move to ai.c.
	(desired_direction_impassable): Move to ai.c.
	(could_be_ferried): Move to ai.c.
	(blocked_by_enemy): Move to ai.c.
	(attack_blockage): Move to ai.c.
	(enemy_close_by): Move to ai.c.
	(oplayer_receive_message): Rename and move to ai.c.
	(compare_weights): Move to ai.c.

	* unit.h (operating_range_best): Move prototytpe here.
	(operating_range_worst): Move prototytpe here.

	* unit.c (operating_range_best): Move function here.
	(operating_range_worst): Move function here.

	* 3rd-age.g: Add version number.
	* advances.g: Add version number.
	* anc-near-east.g: Add version number.
	* lord-rings.g: Add version number.

2000-11-25  Stan Shebs  <shebs@shebs.cnchost.com>

	* skelconq.c (update_side_display): Fix bad variable ref.

	* plan.c: Cosmetic improvements, add some comments.
	(adj_unit): Remove, useless.
	* run2.c: Protoize definitions.
	(run_accidents): Simplify slightly.
	* tp.c (send_game_checksum): Remove, not needed.
	* world.c: Protoize definitions.

	Overhaul the calendar machinery, make consistent.
	* keyword.def (number): New keyword.
	* nlang.c (CalendarType cal_number): Rename from cal_turn.
	(turn_name): Rename from turnname.
	(absolute_date_string, turns_between, set_initial_date): Update
	usages.
	(init_calendar): Allow only "number" and "usual" as calendar
	types.
	(relative_date_string): Remove, not even close to being used.

	* nlang.c (plan_desc): Use lower case for tasks, is better English.

	* refman.texi: Update documentation of calendars.
	* xconq.texi: Credit Erik Sigra.
	* commands.texi: Update info about "ai" command.

2000-11-23  Jim Kingdon

	* tp.h, conq.h, history.h, lisp.h, plan.c, unit.h, utype.def: Add
	newline to end of file (shuts up GCC warnings on unix).

2000-11-24  Hans Ronne <hronne@2.sbbs.se>

	General cleanup of kernel prototypes - part 4 (kpublic.h and tp.h).
	Improve kernel separation: move all networking functions that are
	not yet in tp.c into that file. Sort tp.h prototypes into kernel.h, 
	kpublic.h and tp.c (static).  
	
	* actions.c (kpublic.h): Don't include it.
	(net_prep_none_action): Move function to tp.c.
	(net_prep_produce_action): Move function to tp.c.
	(net_prep_extract_action): Move function to tp.c.
	(net_prep_develop_action): Move function to tp.c.
	(net_prep_toolup_action): Move function to tp.c.
	(net_prep_create_in_action): Move function to tp.c.
	(net_prep_create_at_action): Move function to tp.c.
	(net_prep_build_action): Move function to tp.c.
	(net_prep_repair_action): Move function to tp.c.
	(net_prep_disband_action): Move function to tp.c.
	(net_prep_transfer_part_action): Move function to tp.c.
	(net_prep_change_type_action): Move function to tp.c.
	(net_prep_change_side_action): Move function to tp.c.
	(net_prep_alter_cell_action): Move function to tp.c.
	(net_prep_add_terrain_action): Move function to tp.c.
	(net_prep_remove_terrain_action): Move function to tp.c.

	* ai.c (carryable): Move function here.
	(accelerable): Move function here.
	(accelerator): Move function here.

	* ai.h (carryable): Move prototype here.
	(accelerable): Move prototype here.
	(accelerator): Move prototype here.

	* combat.c (kpublic.h): Don't include it.
	(net_prep_attack_action): Move function to tp.c.
	(net_prep_overrun_action): Move function to tp.c.
	(net_prep_fire_at_action): Move function to tp.c.
	(net_prep_fire_into_action): Move function to tp.c.
	(net_prep_detonate_action): Move function to tp.c.

	* kernel.h (init_remote_ui): Move prototype here.
	(add_remote_players): Move prototype here.
	(broadcast_start_variant_setup): Move prototype here.
	(broadcast_variants_chosen): Move prototype here.
	(broadcast_start_player_setup): Move prototype here.
	(broadcast_players_assigned): Move prototype here.
	(add_to_packet): Move prototype here.
	(flush_write): Move prototype here.

	* kpublic.h: Sort all prototypes by source file.
	(carryable): Move prototype to ai.h.
	(accelerable): Move prototype to ai.h.
	(accelerator): Move prototype to ai.h.
	(net_maybe_react_to_move): Remove unused prototype.
	(net_change_unit_side): Remove unused prototype.
	(net_set_unit_position): Remove unused prototype.
	(send_join): Move prototype here.
	(receive_data): Move prototype here.
	(download_to_player): Move prototype here.
	(init_file_port): Move prototype here.
	(low_file_send): Move prototype here.
	(send_version): Move prototype here.
	(close_file_port): Move prototype here.
	(low_file_receive): Move prototype here.
	(broadcast_game_module): Move prototype here.
	(net_send_chat): Move prototype here.
	(game_checksum): Move prototype here.
	(send_quit): Move prototype here.
	(flush_outgoing_queue): Move prototype here.
	(update_variant_callback): Move prototype here.
	(update_assignment_callback): Move prototype here.
	(net_update_player): Move prototype here.
	(add_remote_locally): Move prototype here.
	(send_chat): Move prototype here.

	* move.c (kpublic.h): Don't include it.
	(carryable): Move function to ai.c.
	(accelerable): Move function to ai.c.
	(accelerator): Move function to ai.c.
	(net_prep_move_action): Move function to tp.c.
	(net_prep_enter_action): Move function to tp.c.

	* tp.c (send_packet): Make static and move prototype here.
	(send_game_checksum): Make static and move prototype here.
	(broadcast_game_checksum): Make static and move prototype here.
	(send_assignment): Make static and move prototype here.
	(send_randstate): Make static and move prototype here.
	(broadcast_next_action): Make static and move prototype here.
	(receive_packet): Make static and move prototype here.
	(add_remote_program): Make static and move prototype here.
	(download_game_module): Make static and move prototype here.
	(send_remote_id): Make static and move prototype here.
	(net_prep_none_action): Move function here.
	(net_prep_produce_action): Move function here.
	(net_prep_extract_action): Move function here.
	(net_prep_develop_action): Move function here.
	(net_prep_toolup_action): Move function here.
	(net_prep_create_in_action): Move function here.
	(net_prep_create_at_action): Move function here.
	(net_prep_build_action): Move function here.
	(net_prep_repair_action): Move function here.
	(net_prep_disband_action): Move function here.
	(net_prep_transfer_part_action): Move function here.
	(net_prep_change_type_action): Move function here.
	(net_prep_change_side_action): Move function here.
	(net_prep_alter_cell_action): Move function here.
	(net_prep_add_terrain_action): Move function here.
	(net_prep_remove_terrain_action): Move function here.
	(net_prep_attack_action): Move function here.
	(net_prep_overrun_action): Move function here.
	(net_prep_fire_at_action): Move function here.
	(net_prep_fire_into_action): Move function here.
	(net_prep_detonate_action): Move function here.
	(net_prep_move_action): Move function here.
	(net_prep_enter_action): Move function here.
	
	* tp.h (send_packet): Make static and move to tp.c.
	(send_game_checksum): Make static and move to tp.c.
	(broadcast_game_checksum): Make static and move to tp.c.
	(send_assignment): Make static and move to tp.c.
	(send_randstate): Make static and move to tp.c.
	(broadcast_next_action): Make static and move to tp.c.
	(receive_packet): Make static and move to tp.c.
	(add_remote_program): Make static and move to tp.c.
	(download_game_module): Make static and move to tp.c.
	(send_remote_id): Make static and move to tp.c.
	(init_remote_ui): Move to kernel.h.
	(add_remote_players): Move to kernel.h.
	(broadcast_start_variant_setup): Move to kernel.h.
	(broadcast_variants_chosen): Move to kernel.h.
	(broadcast_start_player_setup): Move to kernel.h.
	(broadcast_players_assigned): Move to kernel.h.
	(add_to_packet): Move to kernel.h.
	(flush_write): Move to kernel.h.
	(send_join): Move to kpublic.h.
	(receive_data): Move to kpublic.h.
	(download_to_player): Move to kpublic.h.
	(init_file_port): Move to kpublic.h.
	(low_file_send): Move to kpublic.h.
	(send_version): Move to kpublic.h.
	(close_file_port): Move to kpublic.h.
	(low_file_receive): Move to kpublic.h.
	(broadcast_game_module): Move to kpublic.h.
	(net_send_chat): Move to kpublic.h.
	(game_checksum): Move to kpublic.h.
	(send_quit): Move to kpublic.h.
	(flush_outgoing_queue): Move to kpublic.h.
	(update_variant_callback): Move to kpublic.h.
	(update_assignment_callback): Move to kpublic.h.
	(net_update_player): Move to kpublic.h.
	(add_remote_locally): Move to kpublic.h.
	(send_chat): Move to kpublic.h.

2000-11-23  Hans Ronne <hronne@2.sbbs.se>

	General cleanup of kernel prototypes - part 3. Clean up prototypes
	involving advanced units in kernel and interfaces. Add support for 
	side research in curses and skelconq interfaces. Clean up some extern
	prototypes in the tcltk interface.

	* ccmd.c (get_selected_units): Remove redundant prototype.
	
	* cconq.c (unit_plan_dialog): Remove obsolete function and prototype.
	(global_advance_dialog): Remove obsolete function and prototype.
	(unit_advance_dialog): Remove obsolete function and prototype.
	(unit_build_dialog): Remove obsolete function and prototype.
	(side_research_dialog): Remove function and prototype.
	(unit_research_dialog): Move prototype to conq.h.
	(unit_research_dialog): Call auto_pick_unit_research instead.
	(update_side_display): Call auto_pick_side_research if idle. 
	(auto_pick_new_build_task): Remove prototype.
	(auto_pick_new_research): Remove prototype.
	(auto_pick_new_plan): Remove prototype.
		
	* cdraw.c (others_here_desc): Remove redundant prototype.
	(occupants_desc): Remove redundant prototype.
	
	* conq.h (auto_pick_side_research): Move prototype here.
	(auto_pick_unit_research): Move prototype here.
	(elevation_desc): Restore prototype to stop CW warnings.
	(temperature_desc): Restore prototype to stop CW warnings.
	(feature_name_at): Move prototype here.
	(linear_desc): Move prototype here.
	
	* macunit.c (unit_plan_dialog): Comment out unused function.

	* nlang.c (feature_name_at): Move prototype to conq.h.
	(linear_desc): Move prototype to conq.h.
	
	* run.c (auto_pick_side_research): Move prototype to conq.h.
	(auto_pick_unit_research): Move prototype to conq.h.
	(unit_research_dialog): Move prototype to conq.h.
	(side_research_dialog): Remove unused prototype.
	(unit_plan_dialog): Remove obsolete prototype.
	(run_research): Call unit_research_dialog instead of
	side_research_dialog for multiple idle units.
	(free_used_cells): Move function to unit.c and make static.
	(auto_pick_new_build_task): Declare static instead of extern.
	(auto_pick_new_plan): Declare static instead of extern.
	(auto_pick_new_research): Rename to auto_pick_unit_research.

	* skelconq.c (unit_plan_dialog): Remove obsolete function and prototype.
	(global_advance_dialog): Remove obsolete function and prototype.
	(unit_advance_dialog): Remove obsolete function and prototype.
	(unit_build_dialog): Remove obsolete function and prototype.
	(side_research_dialog): Remove function and prototype.
	(unit_research_dialog): Move prototype to conq.h.
	(unit_research_dialog): Call auto_pick_unit_research instead.
	(update_side_display): Call auto_pick_side_research if idle. 
	(auto_pick_new_build_task): Remove prototype.
	(auto_pick_new_research): Remove prototype.
	(auto_pick_new_plan): Remove prototype.
	
	* tkconq.h (launch_game): Move prototype here.
	(host_the_game): Move prototype here.
	(try_join_game): Move prototype here.
	(init_all_displays): Move prototype here.
	(init_x_signal_handlers): Move prototype here.
	(interpret_variants): Move prototype here.

	* tkmain.c (launch_game): Move prototype to tkconq.h.
	(host_the_game): Move prototype to tkconq.h.
	(try_join_game): Move prototype to tkconq.h.
	(init_all_displays): Move prototype to tkconq.h.
	(launch_game): Don't prototype init_x_signal_handlers here.
	(interpret_variants): Move prototype to tkconq.h.
	(unit_plan_dialog): Remove obsolete function and prototype.
	(unit_build_dialog): Remove obsolete function and prototype.
	(side_research_dialog): Remove function and prototype.
	(unit_research_dialog): Move prototype to conq.h.
	(unit_research_dialog): Call auto_pick_unit_research instead.
	(auto_pick_new_build_task): Remove prototype.
	(auto_pick_new_research): Remove prototype.
	(auto_pick_new_plan): Remove prototype.
	
	* unit.c (free_used_cells): Move function here and make static.	

	* wconq.c (launch_game): Move prototype to tkconq.h.
	(init_all_displays): Move prototype to tkconq.h.
	
	* xconq.c (launch_game): Move prototype to tkconq.h.
	(host_the_game): Move prototype to tkconq.h.
	(try_join_game): Move prototype to tkconq.h.
	(init_all_displays): Move prototype to tkconq.h.
	(init_x_signal_handlers): Move prototype to tkconq.h.
	(interpret_variants): Move prototype to tkconq.h.

2000-11-22  Stan Shebs  <shebs@shebs.cnchost.com>

	Add version filtering to the new game list in the tcl/tk
	interface.
	* tkconq.tcl (list_all_games): New global, true if all games
	should be listed in the new game dialog.
	(fill_new_game_list): New proc.
	(add_new_game_dialog_items): Call it, also add label for
	version number and checkbox for listing all games.
	(select_game): Update version label.
	(new_game): Use game_index array to find the right game.
	* tkmain.c (tk_game_info): Rewrite to return results by
	setting globals instead of building a list.

	Add version numbers to most library games.
	* 1756.g, 1757.g, africa-1850.g, ancient.g, beirut.g, cherbourg.g,
	classic.g, cobra.g, coral-sea.g, crater-lake.g, flattop.g, fred.g,
	gazala.g, gettysburg.g, greek.g, intro.g, magnuszew.g,
	metz-1944.g, midway.g, monster.g, nw-europe.g, old-empire.g,
	omaha.g, panzer.g, pearl.g, pelops.g, rom-civ-war.g, roman.g,
	standard.g, steppes.g, tokyo.g, ww2-38.g, ww2-39.g, ww2-42.g,
	ww2-adv.g, ww2-bn.g, ww2-div-pac.g, ww2-eur-42.g, ww2-pac-41.g:
	Add a first version number.

	* game.dir: Add all modules that at least resemble games.

	* cobra.g: Add some info, make Avranches worth a lot.
	* chess.g: Remove, stupid idea.
	* gazala.g: Use different image for British boxes.
	* gettysburg.g: Use plains image for clear terrain.
	* magnuszew.g: Add info, add scorekeeper, make town worth more.
	* rising-sun.g: Remove, redundant with ww2-pac-41.g.
	* ww2-div-pac.g: Add Communist Chinese side, allow infantry
	armies to it only.
	* ww2-pac-41.g: Add info, add locations etc from rising-sun.g.

	Add Keir Novik's tailhook game and scenario to the library.
	* tailhook.g, coral-sea-th.g: New files.

2000-11-19  Stan Shebs  <shebs@shebs.cnchost.com>

	Don't let eagerness to attack override critical repair
	and resupply tasks.
	* mplayer.c (offensive_reaction): Don't forget about
	repair and resupply tasks even if there are offensive
	opportunities.
	* iplayer.c (offensive_reaction): Ditto.

	Add ability to display isometric road images.
	* images/road48x33i.gif: New file.
	* terrain.imf (road): Define 48x33 (isometric) connection image.
	* tkmap.c (draw_connections_iso): Make image case work.
	(draw_temperature_row): Test draw_temperature_here.

	* oplayer.c: Rename all "mplayer" functions to "oplayer".

	* unit.c: Fix a comment termination.

	* ui.c (module_name_compare): Rewrite to sort by titles (which
	are what the user sees!) instead of module names.
	(second_game_title): New global.
	(special_strcmp): Use it.
	(collect_possible_games): Set it.
	* ui.c, ui.h (in_box): Remove, not very useful.

	* task.c (compare_directions): Add a preference to move over
	uncontrolled cells.

	* nlang.c (elevation_desc, temperature_desc): Uncomment, used
	in curses interface.
	(feature_name_at, linear_desc): Make extern, also used in curses
	interface.

	* module.c (doublecheck_state, coerce_to_side_id, etc): Remove,
	no longer useful.

	* generic.c: Modernize function definitions, remove old
	useless MPW C workaround.
	* tp.c: Similarly.

	* copying.awk: Generate modern syntax for functions.
	* copying.c: Regenerate.

	* curses/Makefile.in (CURSES_LIB): Remove -ltermlib.
	* cconq.c: Convert function defns to modern syntax.
	* cdraw.c (organize_list_contents): Remove redundant unit scan.

2000-11-16  Hans Ronne <hronne@2.sbbs.se>

	General cleanup of kernel prototypes - part 2 (kernel.h). Move all
	prototypes of functions that actually do something to units from
	unit.h to kernel.h. Only keep those that test conditions etc. in
	unit.h. Remove read2.c and move its content to read.c. Include
	ai.h in conq.h.

	* ChangeLog (2000-11-12): Fix typos involving lisp.h and misc.h.

	* kernel/Makefile.in (read2.o): Remove.

	* actions.c (notify_tech): Move prototype here.
	(notify_tp): Move prototype here.
	
	* ai.c (ai.h): Don't include.
	(operating_range_best): Move function here.
	(operating_range_worst): Move function here.

	* ai.h (operating_range_best): Move prototype here.
	(operating_range_worst): Move prototype here.
	(create_goal): Move prototype here.
	(cell_unknown): Move prototype here.
	(enemies_present): Move prototype here.
	(goal_truth): Move prototype here.
	(goal_desig): Move prototype here.

	* cmd.c (ai.h): Don't include.

	* combat.c (damage_terrain): Move prototype here. 
	(damaged_terrain_type): Move prototype here. 
	
	* conq.h (ai.h): Include here instead.
	(victim_here): Move prototype here.
	(target_here): Move prototype here.
	(useful_captureable_here): Move prototype here.
	(make_plausible_random_args): Move prototype here.
	(est_completion_time): Move prototype here.
	(terrain_always_impassable): Move prototype here.
	(create_task): Move prototype here.
	(choose_move_dirs): Move prototype here.
	(plausible_move_dir): Move prototype here.
	(find_unit_to_complete): Move prototype here.
	(real_capture_chance): Move prototype here.
	(attack_can_damage_or_capture): Move prototype here.
	(fire_can_damage_or_capture): Move prototype here.
	
	* init.c (ai.h): Don't include.
	* iplayer.c (ai.h): Don't include.

	* kernel.h: Organize all prototypes by source file.
	(notify_tech): Make static and move to actions.c.
	(notify_tp): Make static and move to actions.c.
	(damage_terrain): Make static and move to combat.c.
	(damaged_terrain_type): Make static and move to combat.c.
	(maybe_react_to_move): Make static and move to move.c.
	(consume_move_supplies): Make static and move to move.c.
	(resupply_if_low): Make static and move to plan.c.
	(rearm_if_low): Make static and move to plan.c.
	(do_for_occupants): Make static and move to plan.c.
	(go_after_victim): Make static and move to plan.c.
	(fire_at_opportunity): Make static and move to plan.c.
	(explore_reachable_cell): Make static and move to plan.c.
	(capture_useful_if_nearby): Make static and move to plan.c.
	(capture_indep_if_nearby): Make static and move to plan.c.
	(random_walk): Make static and move to plan.c.
	(go_after_captive): Make static and move to plan.c.
	(kill_unit_aux): Make static and move to unit.c.
	(set_unit_position): Make static and move to unit.c.
	(init_units): Move prototype here. 
	(create_bare_unit): Move prototype here. 
	(create_unit): Move prototype here. 
	(init_unit_actorstate): Move prototype here. 
	(init_unit_plan): Move prototype here. 
	(init_unit_tooling): Move prototype here. 
	(init_unit_opinions): Move prototype here. 
	(init_unit_extras): Move prototype here. 
	(change_unit_type): Move prototype here. 
	(enter_cell): Move prototype here. 
	(enter_transport): Move prototype here. 
	(leave_cell): Move prototype here. 
	(leave_transport): Move prototype here. 
	(eject_excess_occupants): Move prototype here. 
	(flush_dead_units): Move prototype here. 
	(sort_units): Move prototype here. 
	(add_to_unit_hp): Move prototype here. 
	(move_into_formation): Move prototype here. 
	(free_plan): Move prototype here. 
	(terrain_always_impassable): Move prototype here.
	(past_halfway_point): Move prototype here.
	(execute_standing_order): Move prototype here.
	(set_waiting_for_tasks): Move prototype here.
	(init_tasks): Move prototype here.
	(clone_task): Move prototype here.
	(sort_directions): Move prototype here.
	(free_task): Move prototype here.
	(parse_task): Move prototype here.
	(task_desig): Move prototype here.
	
	* macmenus.c (ai.h): Don't include.

	* macrow.c (ai_region_at): Remove extern prototype.

	* mkterr.c (set_edge_terrain): Remove redundant prototype.

	* move.c (maybe_react_to_move): Move prototype here. 
	(consume_move_supplies): Move prototype here.
	
	* mplayer.c (ai.h): Don't include.
	* oplayer.c (ai.h): Don't include.

	* plan.c (resupply_if_low): Move prototype here. 
	(rearm_if_low): Move prototype here. 
	(do_for_occupants): Move prototype here. 
	(go_after_victim): Move prototype here. 
	(fire_at_opportunity): Move prototype here. 
	(explore_reachable_cell): Move prototype here. 
	(capture_useful_if_nearby): Move prototype here. 
	(capture_indep_if_nearby): Move prototype here. 
	(random_walk): Move prototype here. 
	(go_after_captive): Comment out unused function. 
	(dispose_of_plan): Remove function.
	(worth_capturing): Move prototype here. 
	(supplies_here): Move prototype here. 
	(indep_captureable_here): Move prototype here. 
	(useful_type): Move prototype here. 
	(could_capture_any): Move prototype here. 
	(range_left): Comment out unused function. 
	(find_worths): Comment out unused function. 
	(attack_worth): Comment out unused function. 
	(threat): Comment out unused function. 
	(move_patrol): Comment out unused function.
	(build_time): Comment out unused function.
	(react_to_enemies): Remove function.
	(create_plan): Move prototype here. 
	(might_be_captured): Move prototype here. 
	(occupant_could_capture): Move prototype here. 
	(can_capture_neighbor): Move prototype here. 
	(occupant_can_capture_neighbor): Move prototype here. 
	(find_closest_unit): Move prototype here. 
	(out_of_ammo): Comment out unused function.
	(survival_time): Move function to run2.c.
	(reachable_unknown): Move prototype here. 
	(adj_known_ok_terrain): Move prototype here. 
	(explorable_cell): Comment out unused function.
	(normal_completion_time): Move prototype here. 
	(should_capture_maker): Comment out unused function.
	(adj_unit): Comment out unused function.
	(self_build_base_for_self): Move prototype here. 
	(operating_range_best): Move function to ai.c.
	(operating_range_worst): Move function to ai.c.

	* read.c (interp_utype_list): Move prototype here and make static.
	(interp_utype_value_list): Move here from read2.c and make static.
	(interp_mtype_value_list): Move here from read2.c and make static.
	(interp_atype_value_list): Move here from read2.c and make static.
	(read_layer): Move here from read2.c and make static.
	(read_rle): Move here from read2.c and make static.
	
	* read2.c: Remove file and move content to read.c.

	* run.c (ai.h): Don't include.

	* run2.c (ai.h): Don't include.
	(survival_time): Move function and prototype here.

	* side.c (ai.h): Don't include.
	(react_to_seen_unit): Test unit->plan instead of calling 
	react_to_enemies.

	* task.c (allocate_task_block): Move prototype here.
	(fire_can_damage): Move prototype here.
	(repair_here): Move prototype here.
	(aux_resupply_here): Move prototype here.
	(resupply_here): Move prototype here.
	(can_auto_resupply_self): Move prototype here.

	* tkmain.c (ai.h): Don't include.
	* tkmap.c (ai.h): Don't include.
	* ui.c (ai.h): Don't include.
	
	* unit.c (kill_unit_aux): Move prototype here. 
	(kill_unit_aux): Include body of old dispose_of_plan.
	(set_unit_position): Move prototype here.
	(max_builds): Move prototype here.
	(enter_cell_aux): Move prototype here.
	(eject_occupant): Move prototype here.
	(moves_till_low_supplies): Comment out unused function.
	(insert_unit): Move prototype here.
	(delete_unit): Move prototype here.
	(check_unit): Move prototype here.
	(disband_unit_directly): Move prototype here.
	(add_unit_to_stack): Move prototype here.
	(remove_unit_from_stack): Move prototype here.
	(glimpse_adjacent_terrain): Move prototype here.
	(test_class_membership): Move prototype here.
	
	* unit.h (max_builds): Make static and move to unit.c.
	(enter_cell_aux): Make static and move to unit.c.
	(eject_occupant): Make static and move to unit.c.
	(init_units): Move to kernel.h.
	(create_bare_unit): Move to kernel.h.
	(create_unit): Move to kernel.h.
	(init_unit_actorstate): Move to kernel.h.
	(init_unit_plan): Move to kernel.h.
	(init_unit_tooling): Move to kernel.h.
	(init_unit_opinions): Move to kernel.h.
	(init_unit_extras): Move to kernel.h.
	(change_unit_type): Move to kernel.h.
	(enter_cell): Move to kernel.h.
	(enter_transport): Move to kernel.h.
	(leave_cell): Move to kernel.h.
	(leave_transport): Move to kernel.h.
	(eject_excess_occupants): Move to kernel.h.
	(flush_dead_units): Move to kernel.h.
	(sort_units): Move to kernel.h.
	(dispose_of_plan): Remove unused prototype.
	(insert_unit): Make static and move to unit.c.
	(delete_unit): Make static and move to unit.c.
	(check_unit): Make static and move to unit.c.
	(disband_unit_directly): Make static and move to unit.c.
	(add_unit_to_stack): Make static and move to unit.c.
	(remove_unit_from_stack): Make static and move to unit.c.
	(glimpse_adjacent_terrain): Make static and move to unit.c.
	(add_to_unit_hp): Move to kernel.h.
	(interp_utype_list): Make static and move to read.c.
	(test_class_membership): Make static and move to unit.c.
	(move_into_formation): Move to kernel.h.
	(worth_capturing): Make static and move to plan.c.
	(supplies_here): Make static and move to plan.c.
	(indep_captureable_here): Make static and move to plan.c.
	(useful_type): Make static and move to plan.c.
	(could_capture_any): Make static and move to plan.c.
	(victim_here): Move prototype to conq.h.
	(target_here): Move prototype to conq.h.
	(useful_captureable_here): Move prototype to conq.h.
	(make_plausible_random_args): Move prototype to conq.h.
	(range_left): Make static and move to plan.c.
	(find_worths): Make static and move to plan.c.
	(attack_worth): Make static and move to plan.c.
	(threat): Make static and move to plan.c.
	(move_patrol): Make static and move to plan.c.
	(build_time): Make static and move to plan.c.
	(react_to_enemies): Remove unused prototype.
	(create_plan): Make static and move to plan.c.
	(free_plan): Move to kernel.h.
	(might_be_captured): Make static and move to plan.c.
	(occupant_could_capture): Make static and move to plan.c.
	(can_capture_neighbor): Make static and move to plan.c.
	(occupant_can_capture_neighbor): Make static and move to plan.c.
	(find_closest_unit): Make static and move to plan.c.
	(out_of_ammo): Make static and move to plan.c.
	(survival_time): Make static and move to run2.c.
	(reachable_unknown): Make static and move to plan.c.
	(adj_known_ok_terrain): Make static and move to plan.c.
	(explorable_cell): Make static and move to plan.c.
	(normal_completion_time): Make static and move to plan.c.
	(should_capture_maker): Make static and move to plan.c.
	(est_completion_time): Move prototype to conq.h.
	(adj_unit): Make static and move to plan.c.
	(self_build_base_for_self): Make static and move to plan.c.
	(terrain_always_impassable): Move prototype to conq.h.
	(past_halfway_point): Move prototype to conq.h.
	(execute_standing_order): Move prototype conq.h.
	(set_waiting_for_tasks): Move prototype kernel.h.
	(init_tasks): Move prototype to kernel.h.
	(clone_task): Move prototype to kernel.h.
	(allocate_task_block): Make static and move to task.c.
	(fire_can_damage): Make static and move to task.c.
	(repair_here): Make static and move to task.c.
	(aux_resupply_here): Make static and move to task.c.
	(resupply_here): Make static and move to task.c.
	(can_auto_resupply_self): Make static and move to task.c.
	(create_task): Move prototype to conq.h.
	(choose_move_dirs): Move prototype to conq.h.
	(plausible_move_dir): Move prototype to conq.h.
	(find_unit_to_complete): Move prototype to conq.h.
	(real_capture_chance): Move prototype to conq.h.
	(attack_can_damage_or_capture): Move prototype to conq.h.
	(fire_can_damage_or_capture): Move prototype to conq.h.
	(sort_directions): Move prototype to kernel.h.
	(free_task): Move prototype to kernel.h.
	(parse_task): Move prototype to kernel.h.
	(task_desig): Move prototype to kernel.h.
	(create_goal): Move prototype to ai.h.
	(cell_unknown): Move prototype to ai.h.
	(enemies_present): Move prototype to ai.h.
	(goal_truth): Move prototype to ai.h.
	(goal_desig): Move prototype to ai.h.
	
	* write.c (ai.h): Don't include.
	(kernel.h): Include to access flush_dead_units and sort_units.

2000-11-12  Hans Ronne <hronne@2.sbbs.se>

	General cleanup of kernel prototypes - part 1 (conq.h). Collect all 
	extern prototypes in conq.h. Check all for multifile use and make 
	them static if restricted to a single file. Comment out some unused 
	functions and remove obsolete prototypes. Collect all unit-related
	functions that test conditions etc. in unit.c.

	* conq.h: Organize all prototypes by source file.
	(cursequence): Remove unused global.
	(n_ms_elapsed): Remove redundant prototype.
	(record_ms): Remove redundant prototype.
	(all_human_only_sides_finished): Make static and move to run.c.
	(update_total_hist_lines): Move prototype to history.h.
	(build_hist_contents): Move prototype to history.h.
	(total_gain): Move prototype to history.h.
	(total_loss): Move prototype to history.h.
	(add_to_unit_hp): Move prototype to unit.h.
	(lookup_goal_type): Make static and move to read.c.
	(lookup_action_type): Make static and move to read.c.
	(indepside_needed): Prototype here.
	(production_at): Prototype here.
	(can_occupy_conn): Move prototype to unit.h.
	(adjust_tech_crossover): Make static and move to actions.c.
	(adjust_tooling_crossover): Make static and move to actions.c.
	(distribute_material): Make static and move to actions.c.
	(mobile_enemy_threat): Make static and move to combat.c.
	(found_blocking_elevation): Make static and move to combat.c.
	(enough_ammo): Make static and move to combat.c.
	(init_side_advantage): Make static and move to init.c.
	(make_random_date): Make static and move to init.c.
	(make_weather): Make static and move to init.c.
	(configure_sides): Make static and move to init.c.
	(init_all_views): Make static and move to init.c.
	(make_initial_materials): Make static and move to init.c.
	(init_side_balance): Make static and move to init.c.
	(check_consistency): Make static and move to init.c.
	(saved_game): Remove unused prototype.
	(gen_name): Make static and move to mknames.c.
	(gen_from_rule): Make static and move to mknames.c.
	(name_from_grammar): Make static and move to mknames.c.
	(doublecheck_state): Make static and move to module.c
	(set_u_internal_name): Make static and move to read.c.
	(set_u_type_name): Make static and move to read.c.
	(set_m_type_name): Make static and move to read.c.
	(set_t_type_name): Make static and move to read.c.
	(set_a_type_name): Make static and move to read.c.
	(unit_blockable_by): Make static and move to move.c.
	(total_entry_cost): Make static and move to move.c.
	(number_member): Make static and move to move.c.
	(wind_value): Make static and move to move.c.
	(detonate_on_approach_around): Make static and move to move.c.
	(zoc_range): Make static and move to move.c.
	(damaged_value): Make static and move to move.c.
	(multiply_dice): Remove redundant prototype.
	(add_remote_players): Remove redundant prototype.
	(coerce_to_side_id): Remove unused prototype.
	(coerce_to_side): Remove unused prototype.
	(coerce_to_unit_id): Remove unused prototype.
	(coerce_to_unit): Remove unused prototype.
	(side_and_type_name): Remove unused prototype.
	(historical_event_date_desc): Remove unused prototype.
	(elevation_desc): Remove unused prototype.
	(temperature_desc): Remove unused prototype.
	(summarize_units): Remove unused prototype.
	(relative_date_string): Remove unused prototype.
	(pad_out): Make static and move to nlang.c.
	(linear_desc): Make static and move to nlang.c.
	(feature_name_at): Make static and move to nlang.c.
	(past_unit_handle): Make static and move to nlang.c.
	(short_side_title_with_adjective): Make static and move to nlang.c.
	(lookup_plan_type): Make static and move to read.c.
	(can_occupy_conn): Move prototype here.
	(add_to_unit_hp): Remove redundant prototype.
	(can_develop): Move prototype to unit.h.
	(type_can_develop): Move prototype to unit.h.
	(can_toolup): Move prototype to unit.h.
	(type_can_toolup): Move prototype to unit.h.
	(can_create): Move prototype to unit.h.
	(type_can_create): Move prototype to unit.h.
	(can_complete): Move prototype to unit.h.
	(type_can_complete): Move prototype to unit.h.
	(can_repair): Move prototype to unit.h.
	(type_can_repair): Move prototype to unit.h.
	(can_extract_at): Move prototype to unit.h.
	(can_load_at): Move prototype to unit.h.
	(can_change_type): Move prototype to unit.h.
	(type_can_change_type): Move prototype to unit.h.
	(can_disband): Move prototype to unit.h.
	(type_can_disband): Move prototype to unit.h.
	(side_can_disband): Move prototype to unit.h.
	(can_add_terrain): Move prototype to unit.h.
	(type_can_add_terrain): Move prototype to unit.h.
	(can_remove_terrain): Move prototype to unit.h.
	(type_can_remove_terrain): Move prototype to unit.h.
	(can_build_attackers): Move prototype to unit.h.
	(can_build_defenders): Move prototype to unit.h.
	(can_build_explorers): Move prototype to unit.h.
	(can_build_colonizers): Move prototype to unit.h.
	(can_build_facilities): Move prototype to unit.h.
	(can_build_or_help): Move prototype to unit.h.
	(can_research): Move prototype to unit.h.
	(can_produce): Move prototype to unit.h.
	(syntax_error): Move prototype to lisp.h.
	(do_module_variants): Move prototype to module.h.
	(num_people_at): Move prototype to world.h.
	(update_side_display_all_sides): Move prototype to side.h.
	(test_for_game_start): Make static and move to run.c.
	(test_for_game_end): Make static and move to run.c.
	(all_sides_finished): Make static and move to run.c.
	(check_realtime): Make static and move to run.c.
	(exceeded_rt_for_game): Make static and move to run.c.
	(exceeded_rt_per_turn): Make static and move to run.c.
	(units_still_acting): Make static and move to run.c.
	(unit_priority): Make static and move to run.c.
	(visible_to): Make static and move to run2.c.
	(run_supply_side): Make static and move to supply.c.
	(compute_supply_zones): Remove unused prototype.
	(compute_unit_supply_zone): Remove unused prototype.
	(shortest_escaped_name): Make static and move to write.c.
	
	* actions.c (lookup_action_type): Move function to read.c.
	(adjust_tech_crossover): Move prototype here.
	(adjust_tooling_crossover): Move prototype here.
	(distribute_material): Move prototype here.

	* ai.c (lookup_goal_type): Move to read.c.
	
	* combat.c (mobile_enemy_threat): Move prototype here.
	(found_blocking_elevation): Move prototype here.
	(enough_ammo): Move prototype here.

	* cmdline.c (indepside_needed): Remove prototype.
	
	* imf.c: (get_subimg): Make static instead of extern.
	(largest_image): Make static instead of extern.
	(image_pixel_at): Make static instead of extern.
	(set_image_pixel_at): Make static instead of extern.
	(make_image_from_file_image): Remove redundant prototype.
	(syntax_error): Move prototype to lisp.h.

	* imfapp.c (syntax_error): Move prototype to lisp.h.
	
	* init.c (indepside_needed): Move prototype to conq.h.
	(add_unit_view): Move prototype to kernel.h.
	(init_side_advantage): Move prototype here.
	(make_random_date): Move prototype here.
	(make_weather): Move prototype here.
	(configure_sides): Move prototype here.
	(init_all_views): Move prototype here.
	(make_initial_materials): Move prototype here.
	(init_side_balance): Move prototype here.
	(check_consistency): Move prototype here.
	(saved_game): Comment out unused function.
	
	* kernel.h (target_visible): Move prototype here.
	(add_unit_view): Move prototype here.
	(add_unit_view_raw): Move prototype here.
	(divide_into_regions): Move prototype here.
	
	* kpublic.h (carryable): Move prototype here.
	(accelerable): Move prototype here.
	(accelerator): Move prototype here.
	
	* lisp.h (syntax_error): Move prototype here.
	
	* mac.c (mac_abort): Comment out unused function.
	(serial_port_dialog): Remove redundant prototype.
	(low_appletalk_receive): Make static instead of extern.
	
	* macinit.c (hit_player_setup_dialog): Call net_add_side_and_player.
	
	* macunit.c (plot_resource_cicns): Call production_at.
	
	* mknames.c (gen_name): Move prototype here.
	(gen_from_rule): Move prototype here.
	(name_from_grammar): Move prototype here.
	
	* mkterr.c (divide_into_regions): Move prototype to kernel.h.
	
	* module.c (set_u_internal_name): Move function to read.c.
	(set_u_type_name): Move function to read.c.
	(set_m_type_name): Move function to read.c.
	(set_t_type_name): Move function to read.c.
	(set_a_type_name): Move function to read.c.
	(coerce_to_side_id): Comment out unused function.
	(coerce_to_side): Comment out unused function.
	(coerce_to_unit_id): Comment out unused function.
	(coerce_to_unit): Comment out unused function.
	
	* move.c (carryable): Move prototype to kpublic.h.
	(accelerable): Move prototype to kpublic.h.
	(accelerator): Move prototype to kpublic.h.
	(border_slide_possible): Make static instead of extern.
	(unit_blockable_by): Move prototype here.
	(total_entry_cost): Move prototype here.
	(number_member): Move prototype here.
	(wind_value): Move prototype here.
	(detonate_on_approach_around): Move prototype here.
	(zoc_range): Move prototype here.
	(damaged_value): Move prototype here.
	
	* mplayer.c (carryable): Move prototype to kpublic.h.
	(accelerable): Move prototype to kpublic.h.
	(accelerator): Move prototype to kpublic.h.
	
	* nlang.c (elevation_desc): Comment out unused function.
	(side_and_type_name): Comment out unused function.
	(historical_event_date_desc): Comment out unused function.
	(temperature_desc): Comment out unused function.
	(summarize_units): Comment out unused function.
	(relative_date_string): Comment out unused function.
	(pad_out): Move prototype here.
	(linear_desc): Move prototype here.
	(feature_name_at): Move prototype here.
	(past_unit_handle): Move prototype here.
	(short_side_title_with_adjective): Move prototype here.
	
	* oplayer.c (carryable): Move prototype to kpublic.h.
	(accelerable): Move prototype to kpublic.h.
	(accelerator): Move prototype to kpublic.h.
	(select_by_weight): Remove redundant prototype.
	
	* plan.c (target_visible): Move prototype to kernel.h.
	(repairs_here): Make static instead of extern.
	(repair_if_damaged): Make static instead of extern.
	(lookup_plan_type): Move function to read.c.
	(can_build): Move function to unit.c.
	(can_build_or_help): Move function to unit.c.
	(can_research): Move function to unit.c.
	(can_produce): Move function to unit.c.
	(can_move): Move function to unit.c.
	
	* read.c (lookup_goal_type): Make static and move here.
	(lookup_action_type): Make static and move here.
	(add_unit_view_raw): Move prototype to kernel.h.
	(set_u_internal_name): Move function and prototype here.
	(set_u_type_name): Move function and prototype here.
	(set_m_type_name): Move function and prototype here.
	(set_t_type_name): Move function and prototype here.
	(set_a_type_name): Move function and prototype here.
	(lookup_plan_type): Move function and prototype here.
	(lookup_task_type): Move function here.

	* read2.c (lookup_action_type): Remove prototype.
	
	* run.c (production_at): Move prototype to conq.h.
	(execute_task_aux): Remove unused prototype.
	(test_for_game_start): Move prototype here.
	(test_for_game_end): Move prototype here.
	(all_sides_finished): Move prototype here.
	(check_realtime): Move prototype here.
	(exceeded_rt_for_game): Move prototype here.
	(exceeded_rt_per_turn): Move prototype here.
	(units_still_acting): Move prototype here.
	(unit_priority): Move prototype here.
	
	* run2.c (visible_to): Move prototype here.

	* side.c (add_unit_view): Move prototype to kernel.h. 
	(add_unit_view_raw): Move prototype to kernel.h.
	(remove_unit_view): Make static instead of extern.
	
	* side.h (update_side_display_all_sides): Move prototype here.

	* supply.c (run_supply_side): Move prototype here.
	(compute_supply_zones): Comment out unused function.
	(compute_unit_supply_zone): Comment out unused function.

	* task.c (target_visible): Move prototype to kernel.h.
	(lookup_task_type): Move function to read.c.
	
	* tkcmd.c (place_legends): Move prototype to tkconq.h.
	(place_legends): Move prototype to tkconq.h.
	(get_selected_units): Remove redundant prototype.
	
	* tkconq.h (place_legends): Move prototype here.
	
	* tkmain.c (game_checksum): Move prototype to tp.h.
	(update_variant_callback): Move prototype to tp.h.
	(update_assignment_callback): Move prototype to tp.h.
	(place_legends): Move prototype to tkconq.h.
	(size_desc): Remove redundant prototype.
	
	* tkmap.c (production_at): Move prototype to conq.h.
	
	* tp.c (add_to_packet): Move prototype to tp.h.
	(flush_write): Move prototype to tp.h.
	(game_checksum): Move prototype to tp.h.
	(update_variant_callback): Move prototype to tp.h.
	(update_assignment_callback): Move prototype to tp.h.
	(send_game_checksum_error): Make static instead of extern.
	
	* tp.h (send_id): Remove obsolete prototype.
 	(add_to_packet): Move prototype here.
	(flush_write): Move prototype here.
	(game_checksum): Move prototype here.
	(update_variant_callback): Move prototype here.
	(update_assignment_callback): Move prototype here.
	
	* ui.c (find_unit_or_occ_view): Make static instead of extern.
	(find_unit_view_at): Make static instead of extern.
	
	* unit.h (can_occupy_conn): Move prototype here.
	(add_to_unit_hp): Move prototype here.
	(can_develop): Move prototype here.
	(type_can_develop): Move prototype here.
	(can_toolup): Move prototype here.
	(type_can_toolup): Move prototype here.
	(can_create): Move prototype here.
	(type_can_create): Move prototype here.
	(can_complete): Move prototype here.
	(type_can_complete): Move prototype here.
	(can_repair): Move prototype here.
	(type_can_repair): Move prototype here.
	(can_extract_at): Move prototype here.
	(can_load_at): Move prototype here.
	(can_change_type): Move prototype here.
	(type_can_change_type): Move prototype here.
	(can_disband): Move prototype here.
	(type_can_disband): Move prototype here.
	(side_can_disband): Move prototype here.
	(can_add_terrain): Move prototype here.
	(type_can_add_terrain): Move prototype here.
	(can_remove_terrain): Move prototype here.
	(type_can_remove_terrain): Move prototype here.
	(can_build_attackers): Move prototype here.
	(can_build_defenders): Move prototype here.
	(can_build_explorers): Move prototype here.
	(can_build_colonizers): Move prototype here.
	(can_build_facilities): Move prototype here.
	(can_build_or_help): Move prototype here.
	(can_research): Move prototype here.
	(can_produce): Move prototype here.
	
	* unit.c (can_develop): Move function here.
	(type_can_develop): Move function here.
	(can_toolup): Move function here.
	(type_can_toolup): Move function here.
	(can_create): Move function here.
	(type_can_create): Move function here.
	(can_complete): Move function here.
	(type_can_complete): Move function here.
	(can_repair): Move function here.
	(type_can_repair): Move function here.
	(can_extract_at): Move function here.
	(can_load_at): Move function here.
	(can_change_type): Move function here.
	(type_can_change_type): Move function here.
	(can_disband): Move function here.
	(type_can_disband): Move function here.
	(side_can_disband): Move function here.
	(can_add_terrain): Move function here.
	(type_can_add_terrain): Move function here.
	(can_remove_terrain): Move function here.
	(type_can_remove_terrain): Move function here.
	(can_build_attackers): Move function here.
	(can_build_defenders): Move function here.
	(can_build_explorers): Move function here.
	(can_build_colonizers): Move function here.
	(can_build_facilities): Move function here.
	(can_build): Move function here.
	(can_build_or_help): Move function here.
	(can_research): Move function here.
	(can_produce): Move function here.
	(can_move): Move function here.
		
	* util.c: (debugging_string): Comment out unused function.
	
	* wimfapp.c (syntax_error): Move prototype to lisp.h.

	* world.c (divide_into_regions): Move prototype to kernel.h.
	
	* world.h (num_people_at): Move prototype here.
	
	* write.c (add_to_packet): Move prototype to tp.h.
	(flush_write): Move prototype to tp.h.
	(shortest_escaped_name): Move prototype here.

	* xcutil.c (syntax_error): Move prototype to lisp.h.

	* ximfapp.c (syntax_error): Move prototype to lisp.h.

2000-11-11  Stan Shebs  <shebs@shebs.cnchost.com>

	Make find by name menu item work.
	* ui.c, ui.h (find_units_matching): New function.
	* tkconq.tcl (create_map_menus): Enable find by name.
	(popup_find_dialog, ok_find}: New procs.
	* tkmain.c (tk_center_on_unit): New tcl command.

	Add menu item to control AI resignation.
	* tkconq.tcl (create_map_menus): Add menu item.
	(toggle_ai_may_resign): New proc.

	* ui.c (unit_actually_visible): Remove, no longer used.
	(describe_imf): Note special image flags like isconnection, etc.

2000-11-08  Hans Ronne <hronne@2.sbbs.se>

	Fix special character handling so that the Swedish place name 
	generator works on the mac. 
	* lisp.c (strmgetc): Typecast ch to char on the mac and convert 
	unix special characters to corresponding mac special characters.
	* 3rd-age.g: Use the Swedish place name generator.

2000-11-06  Hans Ronne <hronne@2.sbbs.se>

	Massive cleanup of prototypes in the mac interface. Collect all 
	extern prototypes in macconq.h. Check all for multifile use and
	make them static if restricted to a single file. Comment out some
	unused functions and remove obsolete prototypes.
	
	* actions.c (type_can_sit_on_conn): Remove prototype.

	* cmd.c (get_selected_units): Move prototype to conq.h.
	(notify_relationships): Declare static instead of extern.

	* conq.h (update_total_hist_lines): Move prototype here.
	(build_hist_contents): Move prototype here.
	(pattern_matches_event): Move prototype here.
	(event_desc_from_list): Move prototype here.
	(get_selected_units): Move prototype here.
	(side_owns_occupant): Move prototype to unit.h.

	* history.c (update_total_hist_lines): Move prototype to conq.h.
	(build_hist_contents): Move prototype to conq.h.
	(find_event_type): Move prototype to conq.h.
	(pattern_matches_event): Move prototype to conq.h.
	(event_desc_from_list): Move prototype to conq.h.

	* nlang.c (pattern_matches_event): Move prototype to conq.h.
	(event_desc_from_list): Move prototype to conq.h.

	* maccmd.c (get_a_position): Declare static instead of extern.
	(add_unit_position): Declare static instead of extern.
	(message_dialog): Declare static instead of extern.
	(get_a_unit): Declare static instead of extern.
	(get_selected_units): Move prototype to conq.h.
	(get_a_visible_unit): Move prototype to head of file.
	(set_construction_run_length): Move prototype to macconq.h.
	(do_up): Include old do_up_command as content.
	(do_down): New function with old do_down_command as content.
	(do_one_take): Remove prototype.
	(do_one_give_unit): Move prototype to macconq.h.
	(do_one_dir_move): Declare static instead of extern.
	(do_one_dir_multiple_move): Declare static instead of extern.
	(do_one_collect): Declare static instead of extern.
	(do_one_repair): Declare static instead of extern.
	(create_command_window): Move prototype to head of file.
	(get_command_and_do): Move prototype to head of file.
	(do_one_asleep): Remove unused prototype.
	(unit_rename_dialog): Move here and declare static.

	* maccolors.c (mac_init_cicn): Move prototype to macimf.h.

	* macconq.c (splash_dialog): Declare static instesd of extern.
	(recalc_depths): Declare static instead of extern.
	(get_files): Declare static instead of extern.
	(event_loop): Declare static instead of extern.
	(adjust_cursor): Declare static instead of extern.
	(grow_window): Declare static instead of extern.
	(zoom_window): Declare static instead of extern.
	(do_mouse_down): Declare static instead of extern.
	(activate_window): Declare static instead of extern.
	(maybe_select_next_unit): Declare static instead of extern.
	(is_da_window): Declare static instead of extern.
	(is_app_window): Declare static instead of extern.
	(won_game_dialog): Declare static instead of extern.
	(lost_game_dialog): Declare static instead of extern.
	(game_over_dialog): Declare static instead of extern.
	(position_on_screen): Declare static instead of extern.
	(position_already_used): Declare static instead of extern.
	(set_end_of_game_interaction_modes): Declare static instead of extern.
	(update_unit_in_maps): Declare static instead of extern.
	(play_sound): Declare static instead of extern.

	* macconq.h: Order all prototypes by file. Delete all duplicated
	prototypes. Move extern prototypes here from other files. Move 
	static prototypes back where they belong.

	* macdesign.c (init_design_cursors): Declare static instead of extern.
	(create_design_window): Declare static instead of extern.
	(draw_design_window_tool): Declare static instead of extern.
	(mark_allowed_unit_types): Declare static instead of extern.
	(mark_allowed_sides): Declare static instead of extern.
	(feature_rename_dialog): Declare static instead of extern.
	(paint_on_drag): Declare static instead of extern.
	(border_on_drag): Declare static instead of extern.
	(connect_on_drag): Declare static instead of extern.
	(designer_reshape_dialog): Declare static instead of extern.

	* macdraw.c (calc_best_terrain_images): Declare static instead of extern.
	(draw_elevation_here): Comment out unused function.
	(draw_elevation): Comment out unused function.
	(clear_blast_image): Comment out unused function.

	* macgworld.c (scroll_list_using_key): Remove unused prototype.
	(set_offscreen_buffers): Move to macmenus.c.
	(set_meridians): Move to macmenus.c.

	* machelp.c (create_instructions_window): Declare static instead of extern.
	(describe_menus): Declare static instead of extern.
	(describe_mouse): Declare static instead of extern.
	(describe_help): Declare static instead of extern.
	(create_help_window): Declare static instead of extern.
	(adjust_help_scrollbar): Declare static instead of extern.

	* macimf.c (mac_init_cicn): Move prototype to macimf.h.
	(mac_create_ppat): Declare static instead of extern.
	(mac_add_ppat): Declare static instead of extern.

	* macimf.h: (mac_init_cicn): Move prototype here.

	* macinit.c (mac_init_cicn): Move prototype to macimf.h.
	(send_version): Remove redundant prototype.
	(debugging_string): Remove prototype, no longer used here.
	(init_display): Call show_design_window instead.
	(start_new_game): Declare static instead of extern.
	(update_new_game_list): Declare static instead of extern.
	(variants_dialog): Declare static instead of extern.
	(open_game_from_name_and_volume): Declare static instead of extern.
	(hit_player_setup_dialog): Declare static instead of extern.
	(launch_game): Declare static instead of extern.
	(launch_game_2): Declare static instead of extern.
	(check_for_missing_images): Declare static instead of extern.
	(open_progress_dialog): Declare static instead of extern.
	(close_progress_dialog): Declare static instead of extern.
	(init_display): Declare static instead of extern.
	(init_material_images): Declare static instead of extern.
	(init_terrain_images): Declare static instead of extern.
	(add_default_emblem_image): Remove prototype.

	* maclist.c (init_list_contents): Declare static instead of extern.
	(organize_list_contents): Declare static instead of extern. 
	(sort_list_contents): Declare static instead of extern. 
	(add_unit_to_list): Declare static instead of extern. 
	(set_list_scrollbars): Declare static instead of extern. 
	(draw_list_contents): Declare static instead of extern. 
	(draw_list_headings): Declare static instead of extern. 
	(draw_unit_list_entry): Declare static instead of extern. 
	(adjust_list_decor): Declare static instead of extern. 
	(unit_position_in_list): Declare static instead of extern. 
	(redraw_unit_list_entry): Declare static instead of extern. 
	(clear_selections): Declare static instead of extern.
	
	* macmap.c (at_all_visible): Declare static instead of extern.
	(xform_flat): Declare static instead of extern.
	(xform_fractional): Declare static instead of extern.
	(xform_fractional_flat): Declare static instead of extern.
	(m_focus_on_center): Declare static instead of extern.
	(draw_window_background): Declare static instead of extern.
	(draw_map_content): Declare static instead of extern.
	(draw_area_background): Declare static instead of extern.
	(draw_other_maps): Declare static instead of extern.
	(draw_other_map): Declare static instead of extern.
	(draw_selected_unit): Declare static instead of extern.

	* macmenus.c: Move all toggle functions from macmouse.c here 
	and declare most of them static instead of extern.
	(num_sides_allowed): Remove prototype.
	(do_one_give): Remove prototype.
	(do_one_take): Remove prototype.
	(do_down_command): Remove prototype.
	(do_up_command): Remove prototype.
	(do_closeup_mi): Move prototype to macconq.h.
	(do_one_give_unit): Move prototype to macconq.h.
	(do_one_dir_move): Move prototype to macconq.h.
	(do_one_dir_multiple_move): Move prototype to macconq.h.
	(do_one_set_name): Remove prototype.
	(enable_commands_for_unit): Declare static instead of extern.
	(side_research_dialog): Move prototype to macconq.h.
	(adjust_menus): Remove commented out is_da_window call.
	(set_offscreen_buffers): Move here and declare static.
	(set_meridians): Move here and declare static.
	(build_ai_type_menu): Declare static instead of extern.
	(maybe_init_print): Declare static instead of extern.
	(do_up_command): Move content to do_up.
	(do_down_command): Move content to do_down.
	(seed_side_rename_string): Move function here.
	(get_side_rename_string): Move function here.
	(side_rename_dialog): Move function here and declare static.

	* macmouse.c: Move all toggle functions to macmenus.c.
	(do_closeup_mi): Move prototype to macconq.h.
	(side_owns_occupant): Remove redundant prototype.
	(set_position_modally): Remove prototype.
	(do_mouse_down_map_control_panel): Declare static instead of extern.
	(do_mouse_down_map_content): Declare static instead of extern.
	(select_all_dragged_over): Declare static instead of extern.
	(select_area_and_zoom): Declare static instead of extern.
	(move_on_drag): Declare static instead of extern.
	(select_all_units_in_rect): Declare static instead of extern.
	(move_the_selected_unit): Declare static instead of extern.
	(fire_the_selected_unit): Declare static instead of extern.
	(select_next_unit): Declare static instead of extern.
	(select_next_actor): Declare static instead of extern.
	(select_previous_actor): Declare static instead of extern.
	(select_previous_mover): Declare static instead of extern.
	(select_next_awake_mover): Declare static instead of extern.
	(select_previous_awake_mover): Declare static instead of extern.
	(select_another): Declare static instead of extern.
	(magnify_to_fit): Declare static instead of extern.

	* macprefs.c: Move all prototypes etc. to head of file.
	(missed_any_parameters): Remove static prototype.
	(filter_warning_alert): Remove static prototype.
	(open_preferences): Declare static instead of extern.
	(close_preferences): Declare static instead of extern.
	
	* macrow.c (mac_init_cicn): Move prototype to macimf.h.
	(draw_terrain_transitions): Remove prototype.
	(draw_shorelines): Declare static instead of extern.

	* macunit.c (mac_init_cicn): Move prototype to macimf.h.
	(create_unit_closeup): Declare static instead of extern.
	(hit_unit_build_dialog): Declare static instead of extern.
	(build_construction_menu): Declare static instead of extern.

	* macwins.c (update_total_hist_lines): Move prototype to conq.h.
	(build_hist_contents): Move prototype to conq.h.
	(set_construction_run_length): Move prototype to macconq.h.
	(side_research_dialog): Move prototype to macconq.h.
	(create_game_window): Declare static instead of extern.
	(draw_game_side): Declare static instead of extern.
	(feeling_towards): Declare static instead of extern.
	(create_construction_window): Declare static instead of extern.
	(init_construction_lists): Declare static instead of extern.
	(reinit_construction_lists): Declare static instead of extern.
	(draw_construction_default): Declare static instead of extern.
	(calc_construction_rects): Declare static instead of extern.
	(get_selected_construction_unit): Declare static instead of extern.
	(get_selected_construction_type): Declare static instead of extern.
	(maybe_add_unit_to_construction_list): Declare static instead of extern.
	(update_unit_list_for_type): Declare static instead of extern.
	(update_type_list_for_unit): Declare static instead of extern.
	(adjust_construction_controls): Declare static instead of extern.
	(seed_side_rename_string): Move to macmenus.c.
	(get_side_rename_string): Move to macmenus.c.
	(side_rename_dialog): Move to macmenus.c.
	(unit_rename_dialog): Move to maccmd.c.
	(create_history_window): Declare static instead of extern.
	(draw_historical): Declare static instead of extern.
	(move_history_scrollbar): Declare static instead of extern.
	(create_notice_window): Declare static instead of extern.
	(adjust_notice_scrollbar): Declare static instead of extern.
	(create_scores_window): Declare static instead of extern.
	(append_scores): Declare static instead of extern.
	(adjust_scores_scrollbar): Declare static instead of extern.
	(hit_research_dialog): Declare static instead of extern.

	* unit.c (num_sides_allowed): Move prototype to unit.h.
	(type_can_sit_on_conn): Move prototype to unit.h.
	(side_owns_occupant): Remove redundant prototype.

	* unit.h (num_sides_allowed): Move prototype here.
	(type_can_sit_on_conn): Move prototype here.
	(side_owns_occupant): Move prototype here.
	(num_occupants): Comment out prototype.
	(num_units_at): Comment out prototype.
	(fullness): Remove unused prototype.
	(usable_cell): Remove unused prototype.
	(no_possible_moves): Remove unused prototype.

2000-11-05  Stan Shebs  <shebs@shebs.cnchost.com>

	Add Swedish place name generator from Erik Sigra <sigra@home.se>
	* lib/ng-swedish.g: New file.
	* nat-names.g: Include ng-swedish.
	* ng-european.g (real-swedish-place-names): Rename from
	swedish-place-names.

	Improve the success rate of transports picking up occupants.
	* task.def (pickup): Add a direction choice argument.
	* task.c (do_pickup_task): Add an approach subtask.

	Add an old copy of the mplayer for comparison purposes, call it
	"oplayer".
	* kernel/oplayer.c: New file, 7.3.3 version of mplayer, updated.
	* kernel/Makefile.in (OBJS): Add oplayer.o.
	* config.h (numaitypes): Increment.
	* ai.h (oplayertype): New enum value.
	* ai.c (init_ai_types): Add oplayer.

	Add help info for AI types.
	* ai.h (AI_ops help): New field, brief info about AI.
	* ai.c (ai_type_name, ai_type_help): New functions.
	* iplayer.c (iplayer_ops): Add help field.
	* mplayer.c (mplayer_ops): Ditto.

	* mplayer.c: Use side->id instead of side_number() throughout.
	(rethink_plan): Sit still if we found a transport to accelerate
	with.
	* tp.c (net_push_sentry_task): New function.

	* cmd.c (do_ai_side): Make the command toggle only if no args,
	make resignation control subcommands separate, add a help option.

	Rework recent textual formatting changes.
	* nlang.c, conq.h (capitalize): New function.
	* nlang.c (notify_all, etc): Use it.
	(short_side_title_plural_p, apparent_unit_handle, etc): Remove
	wired-in capitalization.
	(apparent_unit_handle): Test for NULL side2 explicitly.
	(short_unit_handle): Handle all the name/number cases better.
	(medium_long_unit_handle): Remove indepside case, no longer needed.
	(feature_desc): Rename local var to avoid conflict.
	(task_desc): Add description of capture tasks.
	* ui.c: Remove unused decl of apparent_unit_handle.
	* macunit.c (create_unit_closeup): Capitalize menu item.
	* tkmain.c (draw_unit_info): Capitalize unit handle.

	* nlang.c, conq.h (short_past_unit_handle): Remove, never used.

2000-10-30  Stan Shebs  <shebs@shebs.cnchost.com>

	* goal.def (DEF_GOAL): Add a separate display name for each goal.
	* unit.h (GoalDefn): New field display_name.
	* unit.h, ai.c: Update uses of DEF_GOAL.
	* task.def (DEF_TASK): Add a separate display name for each task.
	* unit.h (TaskDefn): New field display_name.
	* kernel.h, kpublic.h, unit.h, task.c: Update uses of DEF_TASK.
	* nlang.c (task_desc): Use display name instead of internal name.
	(goal_desc): Likewise.
	* side.c (standing_order_desc): Likewise.

2000-10-29  Hans Ronne <hronne@2.sbbs.se>

	Implement some new stuff in the combat model 1 games.
	* 3rd-age.g (protection): Add table to handle captures.
	(cellwide-protection-for): Skip combat model 0 table.
	(cellwide-protection-against): Skip combat model 0 table.
	(transport-affects-defense): Add (places u* 150).
	(neigbour-affects-defense): Add (stockade units 150).
	(neigbour-affects-defense): Add (city-walls units 200).
	(occupant-affects-attack): Add (ring persons 1000).
	(hit-chance): Allow naval-ground combat.
	* civ2.g (protection): Add table to handle captures.
	(capture-chance): Only allow ground units to capture city.
	(transport-affects-defense): Add (city units 150).
	(neigbour-affects-defense): Add (city-walls units 200).

	Fix bug that traps cities in plan types with no buildable units.
	Improve mplayer and iplayer replanning code. Use precomputed
	unit worths that handle combat model 0 and 1 correctly. Enable 
	building of colonizers by the iplayer.
	* actions.c (can_build_attackers): New function.
	(can_build_defenders): New function.
	(can_build_explorers): New function.
	(can_build_colonizers): New function.
	(can_build_facilities): New function.
	* conq.h (can_build_attackers): New prototype.
	(can_build_defenders): New prototype.
	(can_build_explorers): New prototype.
	(can_build_colonizers): New prototype.
	(can_build_facilities): New prototype.
	* combat.c (real_attack_value): Fix bug: always divide by 100.
	(real_attack_value): Handle effect of transport.
	(real_defense_value): Fix bug: always divide by 100.
	(real_defense_value): Handle effect of transport.
	(occ_can_defend_transport): Add support for combat model 1.
	* iplayer.c (iplayer_decide_plan): Call check_current_target,
	defensive_reaction and offensive_reaction before replanning.
	(iplayer_decide_plan): Call can_build_attackers etc.
	(iplayer_decide_plan): Test for u_offensive_worth etc.
	(iplayer_decide_plan): Enable building of colonizers.
	(assign_to_colonization_support): New function and prototype.
	(type_can_build_attackers): Delete function & prototype.
	* mplayer.c (mplayer_decide_plan): Call check_current_target,
	defensive_reaction and offensive_reaction before replanning.
	(mplayer_decide_plan): Call can_build_attackers etc.
	(mplayer_decide_plan): Test for u_offensive_worth etc.
	(type_can_build_attackers): Delete function & prototype.
	(type_can_build_colonizers): Delete function & prototype.
	(need_this_type_to_explore): Remove mobile test and rename 
	the function to need_explorers.
	(need_this_type_to_build_explorers): Remove.
	* plan.c (plan_offense): Let units with GOAL_VICINITY_HELD do
	a random walk instead of just sitting there.
	* run.c (auto_pick_new_plan): Call can_build_attackers etc.
	(auto_pick_new_plan): Use PLAN_RANDOM as last resort.
	* table.def (transport-affects-attack): New table.
	(transport-affects-defense): New table.
	
	Fix bug in popup menu display of ai plan types. 
	* plan.def (PLAN_OFFENSIVE): Move to correct position.

	Make default goal, plan and task descriptions less computereese.
	* goal.def: Remove dashes from strings and capitalize first letters.
	* plan.def: Remove dashes from strings and capitalize first letters.
	* task.def: Remove dashes from strings and capitalize first letters.
	* nlang.c (apparent_unit_handle): Capitalize first letters.
	(apparent_unit_handle): Fix indepside bug: change side2 to side3.
	(apparent_unit_handle): Remove "-held", add "formerly".
	(short_unit_handle): Capitalize first letters.
	(medium_long_unit_handle): Capitalize first letters.
	(past_unit_handle): Capitalize first letters.
	(past_unit_handle): Skip definite article for genitive nouns.
	(goal_desc): Capitalize first letters.
	(plan_desc): Add "Plan:" and periods before goal, formation and tasks.
	(task_desc): Only write build runlength if greater than 1.
	(task_desc): Remove "to start on" string.
	(task_desc): Capitalize first letters.
	
2000-10-28  Hans Ronne <hronne@2.sbbs.se>

	Further bug fixes and improvements to the Mac unit list code.
	* maclist.c (insert_unit_into_list): New function and prototype.
	(remove_unit_from_list): New function and prototype.
	(auto_scroll_list_up_arrow): New function and prototype.
	(auto_scroll_list_down_arrow): New function and prototype.
	(auto_scroll_list_right_arrow): New function and prototype.
	(auto_scroll_list_left_arrow): New function and prototype.
	(poscolw, taskcolw): Tweak column widths.
	(organize_list_contents): Save & restore first visible unit.
	(organize_list_contents): Save & restore the selected unit.
	(set_list_scrollbars): Rewrite and simplify, fix bugs.
	(draw_list): Erase empty rect to the left of the bottom scrollbar.
	(draw_list): Call organize_list_contents before draw_list_contents.
	(draw_list): Remove redundant call to set_list_scrollbars.
	(draw_list): Remove redundant cliprect code.
	(draw_list_contents): Fix last visible unit bug.
	(draw_list_headings): Move Task column to the left.
	(draw_list_headings): Remove redundant clipping code.
	(draw_unit_list_entry): Use the entry rect for clipping.
	(draw_unit_list_entry): Remove drawing of dead units.
	(draw_unit_list_entry): Draw red box around selected unit.
	(draw_unit_list_entry): Draw red mark for sleeping units.
	(draw_unit_list_entry): Draw magenta mark for reserve units.
	(draw_unit_list_entry): Draw green mark for units still acting.
	(draw_unit_list_entry): Move Task column to the left.
	(draw_unit_list_entry): Truncate task_desc to 25 characters.
	(grow_list): Set firstvisfield to zero and call force_update.
	(zoom_list): Set firstvisfield to zero and call force_update.
	(zoom_list): Fix standard state width bug.
	(do_key_down_list): Call new auto_scroll_list functions.
	(toggle_list_large_icons): Set fixedfieldwidth correctly.
	(update_unit_in_lists): Rewrite from scratch.
	(redraw_unit_list_entry): Remove call to reorganize_list.
	(redraw_unit_list_entry): Remove redundant cliprect code.

	Fix civ2 hangs when building on an already created obsolete unit.
	* actions.c (check_build_action): Comment out side_can_build.

	Fix some problems in civ2.g by porting stuff from advances.g.
	* civ2.g (sequential): Add new variant.
	(sides-min): Set to 4.
	(acp-independent): Set to true for cities.
	(acp-per-turn): Set to 0 for cities.
	(acp-to-create): Set to 1 for engineers city.
	(acp-to-build): Set to 1 for engineers city.
	(consumption-on-creation): Convert table to list of cps.
	(hp-to-garrison): Set to 20 for engineers city.
	(mp-to-traverse): Don't let ground units take rivers into the sea.
	(colonizers): Set to true for engineers.
	(ai-war-garrison): Set to 2 for cities.
	(point-value): Set to 1 for engineers.
	(ng-weird): Include.
	(short-generic-names): Set default namer.

2000-10-27  Stan Shebs  <shebs@shebs.cnchost.com>

	Fix a save/restore discrepancy caused by units being woken up
	when restoring a game.
	* side.c (suppress_see_wakeup): New global.
	(cover_area_1): Test it before calling react_to_seen_unit.
	* init.c (init_all_views): Set and clear it.

	* write.c (write_entire_game_state): Clear the default base
	module field of a saved game.

	* test-save.sh: Retain a verbatim copy of the first save,
	do diff on files renamed to include module name.

2000-10-25  Stan Shebs  <shebs@shebs.cnchost.com>

	Remove useless program-version property of modules.
	* keyword.def (program-version): Remove.
	* module.h (Module programversion): Remove.
	* read.c (interp_game_module): Remove handling.
	* write.c (write_game_module): Remove save.
	* all.g, warn.g: Remove references.
	* refman.texi: Remove description, also improve info about
	default-base-module and area restrictions.

	* kpublic.h (net_consume_move_supplies): Remove bogus decl.

	* lhs.g: Update syntax for feature naming.
	* magellan.g: Remove gratuitous use of x property.
	* t-midearth.g: Use Unix line endings, fix base-module.
	* u-e50-1998.g: Upgrade Providence and Salt Lake City.

	* hacking.texi: Describe cmd_error().

2000-10-24  Stan Shebs  <shebs@shebs.cnchost.com>

	* module.c (load_game_description): Skip if module already open,
	close module, whether or not game-module form was found.
	(load_game_module): Load default base module if no types
	defined yet.

	Test for explicit "show all" when viewing borders.
	* tkmap.c (m_seen_border): New macro.
	(draw_borders): Use it.

2000-10-23  Hans Ronne <hronne@2.sbbs.se>

	Make big icons fit into the mac lists.
	* maclist.c (smallentryspacing): Increase to 24.
	(largeentryspacing): Increase to 46.
	(draw_unit_list_entry): Increase icon box sizes to 44 or 22.

	Fix big icons on unix so that they are drawn at correct size also
	during isometric drawing or at mags < 32x32.
	* tkmap.c (draw_units): Tweak ubox sizes to fit big icons.

	Fix problems with losing sides not being drawn correctly on the mac.
	* macwins.c (draw_game_side): Don't test for side->ingame.
	(draw_side_status): Call draw_game_side for side that just lost.
	(draw_side_status): Use last_status 3 instead of 0 as out of game flag.

	Fix problem with list scrollbars not being updated when units are added.
	* maclist.c (draw_list): Call set_list_scrollbars.
	
	Fix problem with new units being added at the wrong position in lists.
	* maclist.c (update_unit_in_lists): Call sort_list_contents.

	Use gray on blue for incomplete units and pink background for dead units.
	* maclist.c (draw_list_headings): Draw "Cp" in gray instead of red.
	(draw_unit_list_entry): Draw dead units on a pink background.
	(draw_unit_list_entry): Draw incomplete units on a blue background.
	(draw_unit_list_entry): Draw gray text for incomplete units.
	(draw_unit_list_entry): Don't draw red cps for incomplete units.

	Fix problem with the mplayer being scared out of its mind and resigning 
	at the first turn if it can see every enemy unit.
	* mplayer.c (decide_resignation): Don't resign during the first 10 turns.
	(decide_resignation): Divide ratio by 5 if side->see_all.

	* 3rd-age.g: Use short-generic-names namer for places.

2000-10-22  Hans Ronne <hronne@2.sbbs.se>

	Fix bug that prevents building of units with more than 200 cps.
	* actions.c (build_step_consumption): Don't try to compensate for
	rounding error if total consumption is zero.

	Test if mtypes are stored in any units before including them in
	lists etc.
	* actions.c (storage_possible): New function.
	(any_storage_possible): New function.
	* conq.h (storage_possible): New prototype.
	(any_storage_possible): New prototype.
	* maclist.c (sup_column_needed): New static array.
	(create_list): Fill in sup_column_needed if necessary and use it.
	(draw_list_headings): Test for sup_column_needed.
	(draw_unit_list_entry): Test for sup_column_needed.

	Add support for combat model 1 to ai unit worth calculation code.
	* ai.c (ai_init_shared): Clean up and remove commented out code.
	(offensive_worth): Add support for combat model 1.
	(defensive_worth): Add support for combat model 1.

	Further improvements to the mac unit lists.	
	* maclist.c (notes_column_needed): New static int, set to -1.
	(typecolw, acpcolw, taskcolw): Tweak column widths.
	(create_list): Initilalize notes_column_needed if necessary.
	(create_list): Only add Notes column if notes_column_needed.
	(draw_list_headings): Only draw Notes title if notes_column_needed.
	(draw_list_headings): Add red Cp heading in acp column.
	(draw_unit_list_entry): Truncate type names at 15 instead of 10.
	(draw_unit_list_entry): Draw cps in red for incomplete units.

	Fix crashes due to memory leaks in advanced unit closeup code.
	* macunit.c (draw_advanced_content): Call DisposeCIcon when done.
	(plot_resource_cicns): Call DisposeCIcon when done.

	Fix flitter in advanced closeup material statistics headers.
	* macdefs.h (dCity): Add diCityMaterial etc.
	* macunit.c (draw_advanced_content): Draw header text.

	Add support for loading material images on the mac.
	* macconq.h (mimages): Declare extern image family.
	(init_material_images): New prototype.
	* macinit.c (mimages): Initialize image family.
	(launch_game): Call init_material_images.
	(init_material_images): New function.
	(dispose_material_images): New function and prototype.

	Fix civ2 hangs when a unit creates a wonder that already exists.
	* run.c (run_construction): Clear task agenda if create action fails.

	Remove dummy mtype 0 and fix advanced closeup code accordingly.
	* macunit.c (draw_advanced_content): Remove dummy mtype.
	* 3rd-age.g: Remove dummy mtype citizens.
	* advances.g: Remove dummy mtype citizens.
	* civ2.g: Remove dummy mtype people.
	(material-type taxes): Add resource-icon 4.
	
	Don't allow ring construction in 3rd age game.
	* 3rd-age.g: (acp-to-create): Set to 0 for the Ring.
	(acp-to-build): Set to 0 for the Ring.
	
2000-10-20  Hans Ronne <hronne@2.sbbs.se>

	Improve the mac unit lists and make the selected unit the current 
	unit on the frontmap. Fix various bugs.
	* macconq.c (handle_keystroke): Move list_from_window call.
	* maclist.c (create_list): Tweak left end of hscrollrect.
	(organize_list_contents): Don't add indepedent units twice.
	(draw_list_headings): Tweak postion of dividing line.
	(draw_unit_list_entry): Draw green background for selection.
	(draw_unit_list_entry): Tweak position of dividing line.
	(adjust_list_decor): Tweak left end of hscrollrect.
	(do_mouse_down_list): Test for list->lastvisible.
	(do_mouse_down_list): Select the unit on frontmap and make it 
	the current unit if possible.
	(list_hscroll_fn): Fix long-standing bug. Clean up the code.
	(scroll_to_selected_unit_in_list): Don't bring map to the front.

2000-10-20  Stan Shebs  <shebs@shebs.cnchost.com>

	* plan.c (plan_offense, plan_defense, plan_colonize,
	plan_exploration): Check existence of unit in unit-occupied goal
	before testing occupancy.

	* tkmap.c (draw_map_isometric): Increase the number of rows
	to draw, eliminates black holes around edges.
	* tkconq.tcl: Remove an old debugging hack.

2000-10-18  Jim Kingdon  <http://sourceforge.net/users/kingdon>

	* ui.c (give_supplies_to_one, take_supplies): Recompute
	supply_is_low flag after we move supplies.

	* stdunit.g: Only armor should have to pay an ACP to cross a river.

2000-10-14  Stan Shebs  <shebs@shebs.cnchost.com>

	Eliminate pointless unit extension property, make unit's possible
	sides list into a regular property.
	* unit.h (UnitExtras hook): Replace with field sides.
	(unit_hook): Remove.
	(unit_sides): Define.
	* unit.c (init_unit_extras): Init sides.
	(get_x_property, get_x_property_by_name): Remove.
	* read.c (default_unit_hook): Remove.
	(interp_unit_defaults): Remove K_X case.
	(interp_unit): Similarly, and add K_SIDES case.
	* mkunits.c (add_preexisting_units): Use it.
	* write.c (write_unit_properties): Write sides instead of hook.

	* nat-names.g: Remove useless units properties.
	* u-e1-1998.g, u-e50-1998.g: Change "x" props to "sides".

	* refman.texi: Update manual.

2000-10-13  Hans Ronne <hronne@2.sbbs.se>

	* combat.c (real_attack_value): Switch table args t and u.
	(real_defense_value): Ditto.
	* table.def (terrain_affects_attack): Fix typo.
	(terain_affects_defense): Ditto.
	* tkinit.c (init_material_images): Restore commented out code.

2000-10-13  Stan Shebs  <shebs@shebs.cnchost.com>

	Make variants' defaults show up correctly in tcl/tk interface.
	* read.c (interp_variant_defns): Evaluate default before testing.
	* tkmain.c (interpret_variants): Pass correct value to
	update_variant_setting.

2000-10-12  Stan Shebs  <shebs@shebs.cnchost.com>

	* gvar.def (default-runlength): Remove, is redundant with
	construction run doctrine.
	* unit.h (construction_run_doctrine): New macro.
	* macunit.c (draw_advanced_closeup, hit_closeup_dialog,
	hit_unit_build_dialog): Use it instead of default-runlength.
	* macwins.c (adjust_construction_controls): Ditto.
	* tkcmd.c (impl_build): Use construction_run_doctrine.

	* refman.texi: Finish documenting all GDL constructs (as of just
	before the last checkin anyway, sigh).

2000-10-12  Hans Ronne <hronne@2.sbbs.se>

	Rewrite new model 1 attack code. Use new tables where a larger value
	means a stronger effect on defense etc.
	* combat.c (real_attack_value): Rewrite using new tables.
	(real_defense_value): Rewrite using new tables.
	(maybe_hit_unit): Remove use of uu_occ_affects_attack.
	* tables.def (occ-affects-attack): Remove.
	(occupant-affects-attack): New table.
	(occupant-affects-defense): New table.
	(terrain-affects-attack): New table.
	(terrain-affects-defense): New table.
	(neighbour-affects-attack): New table.
	(neighbour-affects-defense): New table.
	* utype.def (full-cxp-affects-attack): New utype property.
	(full-cxp-affects-defense): New utype property.
	
	Fix so that indepside-can-build can be set to false without hanging
	the game when a side looses.
	* plan.c (can_build): Check if independents can build.
	(can_build_or_help): Check if independents can build.
	* run.c (unit_still_acting): Call can_build for acp_indep units.
	(unit_still_acting_no_plan): Call can_build for acp_indep units.
	* unit.h (has_acp_left): Call can_build for acp_indep units.
	* lord-rings.g (indepside-can-build): Set to false.
	
2000-10-11  Hans Ronne <hronne@2.sbbs.se>

	Add support for combat experience, terrain effects and protection by 
	occupants etc. to combat model 1.
	* combat.c (real_attack_value): New function and prototype.
	(real_defense_value): New function and prototype.
	(model_1_attack): Call real_attack_value and real_defense_value.
	
	Add support for effect of occupant on transport's attack value.
	* combat.c (maybe_hit_unit): Use uu_occ_affects_attack.
	(real_attack_value): Use uu_occ_affects_attack.
	* table.def (uu_occ_affects_attack): New table.
	
	Fix drawing of weird ford terrain cells in advances.g.
	* advterr.g (terrain-type ford): Reformat and move to end of list.

	Fix crashes in civ2.g due to too many image families.
	* imf.c (MAXIMAGEFAMILIES): Increase to 1200.

2000-10-11  Stan Shebs  <shebs@shebs.cnchost.com>

	Modify tcl/tk interface command handling to test for unit
	ownership better and to allow enemy unit selection after
	game is over, also add grid display as overlay.
	* tkcmd.c (unit_still_ok, during_game_only, require_unit,
	require_own_unit_during_game): New functions, use everywhere
	instead of macros DURING_GAME_ONLY, REQUIRE_UNIT.
	(aux_add_terrain_2, etc): Use unit_still_ok, simplify control.
	* tkmain.c: Use side->id instead of side_number() everywhere.
	(tk_run_game_idle): Don't clear enemy unit selection if at end of
	game.
	(set_current_unit): Allow selection of any unit at end of game.
	* tkinit.c (grid_matches_unseen): New global.
	(set_optional_colors): Set grid_color and unseen_color from
	GDL globals.
	* tkmap.c (draw_area_background): Always use unseen color.
	(draw_terrain_grid): New function, draws grid as lines.
	(draw_map_overhead): Call it.
	(draw_unseen_fuzz): Set foreground and fill style explicitly.
	(draw_contours): Ditto, also line width.

	* galaxy2.g, lhsunit.g, stdunit.g, ww2-div-pac.g: Remove
	definition of action-narratives, was never used.
	* ww2-eur-42.g: Add a comment.

2000-10-10  Hans Ronne <hronne@2.sbbs.se>

	Make colonizers work again in 3rd-age base module. Make Sauron
	and Saruman self-units in lord-rings game.
	* 3rd-age.g (title): Change to "Third Age Middle Earth".
	(persons): Include gwaihir and the nazguls.
	(ancient-ram-tower): Remove redundant image definition.
	(minimal-size-goal): Set to zero for ruins (fixes colonizer bug).
	* lord-rings.g: Make Sauron and Saruman self-units.

	* plan.c (plan_colonize): Test for unit->nexthere here instead.
	(good_cell_to_colonize): Remove unused argument u and pass (x, y) 
	instead of unit. Don't test for unit->nexthere.

2000-10-09  Stan Shebs  <shebs@shebs.cnchost.com>

	Clean up obscure GDL discrepancies.
	* gvar.def (action-narratives, feature-colors): Remove, unused
	and unimplemented.
	* table.def (control-range): Set max to 0.
	(fire-attack-terrain-effect, fire-defend-terrain-effect): Default
	to -1.
	(keep-control-range): Remove, unimplemented.
	* utype.def (advanced-auto-construct, advanced-auto-research):
	Remove, no longer implemented or used.
	* combat.c (maybe_hit_unit): Use ut_fire_attack_terrain_effect
	and ut_fire_defend_terrain_effect.
	* run2.c (run_environment_effects): Use uu_temp_protect.

	* world.c: Protoize things.

	* napoleon.g (temperature-protection): Define.
	* ww2-adv.g (keep-control-range): Remove, was never implemented.

	* refman.texi: More miscellaneous updates and reformatting.
	* PROJECTS: Update with leftovers from GDL cleanup.

	* all.g: Update to reflect current GDL.
	* lib-uses.sh: Filter out multi-line strings.
	* src-uses.sh: Handle multiple @code on a @deffn line.

2000-10-07  Hans Ronne <hronne@2.sbbs.se>

	Clean up and simplify task and goal descriptions. Fix the grammar. 
	Add locations where missing. Fix blinking bug in lord-rings game.
	* nlang.c (apparent_unit_handle): Skip "the" if side_adjective is
	the genitive of a noun.
	(linear_desc): Comment out desc for borders. Add space in " + ".
	(task_desc): Simplify and de-computerese case TASK_HIT_UNIT.
	(task_desc): Add unit location (x,y) for case TASK_OCCUPY.
	(task_desc): Use (x,y) instead of destination_desc everywhere.
	(task_desc): Use medium_long_unit_handle instead of unit_handle.
	(goal_desc): Handle GOAL_UNIT_OCCUPIED.
	* 3rd-age.g: Change names of different city types to just "City".
	Change cps of all persons from 0 to 1 to fix blinking bug on mac.
	Explicitly disallow construction of nazguls and undead.
	* init.c (check_game_validity): Don't warn if different unit types
	have the same name.

	Add new Lord of the Rings game module.
	* 3rd-age.g: New base module derived from advances.g.
	* advterr.g: Add border-type ford.
	* lord-rings.g: New game module based on 3rd-age.g.
	* game.dir: Add lord-rings module.
	* t-midearth.g: Add back Massimo's old map, hacked to use advterr.  
	* imf.dir: Add new heroes and monsters and more ancient images.
	* ancient.imf: Add new ancient images.
	* fantasy.imf: Add new heroes and monsters images.
	* ancient.gif: Add more images.
	* heroes.gif: New image file.
	* monsters.gif: New image file.
	
	Fix buzzing when attackers are trying to hit an occupant with no
	defense value.
	* combat.c (model_1_attack): Initialize maxdef to 0 for city occs.

	Fix unix interface crashes in advances and lord-rings games.
	* tkinit.c (init_material_images): Comment out solid color code.

2000-10-06  Stan Shebs  <shebs@shebs.cnchost.com>

	* refman.texi: Describe more recently-added GDL constructs, rewrite
	some bits, fix mistaken description of independent-density
	noted by Emmanuel Fritsch.

	* keyword.def (numadv): Remove, never used.
	* side.h (Side numadvances): Remove field, never used.
	* side.c (create_side): Don't set.
	* read.c (fill_in_side): Don't interpret numadv.
	(interp_unit_plan): Make creation turn optional as documented.
	(interp_task): Be more flexible about syntax.
	* write.c (write_side_properties): Don't write side->numadvances.
	* table.def (hp-on-completion): Remove, never used.

	* mkunits.c (make_independent_units): Add a comment.

2000-10-04  Stan Shebs  <shebs@shebs.cnchost.com>

	Move use_clip_mask to generic code, use to control creation
	of transparent black in images.
	* imf.c, imf.h (use_clip_mask): Move to here from tkimf.c.
	* gif.c (get_gif_from_file): Test it.
	* wconq.c, wimfapp.c, xconq.c (use_clip_mask): Remove decl.

	* imf.c, imf.h (MAXIMAGEPALETTES, palettes, numpalettes,
	sort_all_palettes): Remove, no longer used.
	* imf.h (ImagePalette): Ditto.

	* ng-german.g: Capitalize usages with "Bad".

	* civmisc.gif: Don't use a color in the image for the grid.

	* flags16x16.gif, flags8x8.gif: Update flags, use more colors,
	make larger images more accurate.

2000-10-03  Hans Ronne <hronne@2.sbbs.se>

	Define unit types as unbuildable if their cp is set to zero.
	* init.c (check_game_validity): Permit zero cp.
	* run.c (update_canbuild_vector): Disallow building of units with
	zero cp.
	* unit.c (init_unit_actorstate): Permit zero cp.
	* utype.def (u_cp): Set its lower limit to zero.

	Fix non-numbered unit numbering bug.
	* nlang.c (short_unit_handle): Don't print the number if it is zero.

	Fix two bugs that CodeWarrior complained about.
	* maccmd.c (do_build): Define unit correctly for closeups.
	* macwins.c (hit_research_dialog): Initialize mouse before using it.

2000-10-03  Stan Shebs  <shebs@shebs.cnchost.com>

	* hacking.texi: Fix formatting of requirements table (PR #3),
	also rewrite info on debugging flags.

2000-10-02  Jim Kingdon  <http://sourceforge.net/users/kingdon>

	* unit.c (change_unit_side): Cancel the unit's plans when it
	changes sides.

2000-10-01  Stan Shebs  <shebs@shebs.cnchost.com>

	* keyword.def (any): Remove keyword, redundant with "or" in namers.
	(text): Remove, never used.
	* lisp.c (hash_name): Hash on whole string, handle 8-bit chars
	correctly.
	* mknames.c (gen_name): Add comments.
	(gen_from_rule): Rewrite to handle reject form, issue better
	warnings.
	* read.c (init_predefined_symbols): Don't make K_REJECT eval to
	self.
	(interp_text_generator): Remove, never used.
	(interp_form): Remove call to it.

	* refman.texi: Update documentation of name grammars to reflect
	the actual code.

	* warn.g: Add tests for new grammar warnings.

2000-09-29  Hans Ronne <hronne@2.sbbs.se>

	Fix autoscrolling map update bug when a floating window is closed.
	* macconq.c (close_window): Call update_all_visible_windows instead.
	
	Fix problem with ai-controlled units getting stuck in sleep
	mode. Remove bypassing anti-sleep gvar.
	* advances.g (units-may-go-to-sleep): Remove.
	(disable-standard-acp): Remove.
	* gvar.def (g_units_may_go_to_sleep): Remove.
	* mplayer.c (update_unit_plans_randomly): Remove sleep inducing code.
	* plan.c (plan_offense): Remove sleep inducing code.
	(plan_exploration): Remove sleep inducing code.
	* run.c (move_one_unit_multiple): Remove sleep inducing code.
	
2000-09-26  Stan Shebs  <shebs@shebs.cnchost.com>

	* mknames.c (gen_from_rule): Don't include the "or" when
	choosing an alternative.

	* ng-english.g: Capitalize multi-word names properly. (noticed by
	Gaute Strokkenes)

2000-09-25  Stan Shebs  <shebs@shebs.cnchost.com>

	* panzer.g (see-chance, see-chance-adjacent): Define, make
	minefields hard to see.
	(mp-to-enter-own): Let units enter minefield cell.
	(detonate-on-hit, detonate-on-approach-range): Define to let
	minefields go off if units in same cell.
	(detonation-damage-at): Make unit damage variable.

	* init.c (final_init): Display size of history objects.
	(calculate_globals): Make first call to
	update_canbuild_vector here...
	* side.c (create_side): ... instead of here.

	* side.c, side.h (actual_advantage): New function.
	* mkunits.c (make_countries): Use it, also remove incorrect call
	to side_can_build (breaks no-building games).
	(place_units): Simplify, remove side_can_build test.
	* score.c (record_into_scorefile): Use actual_advantage.

	* combat.c (hit_unit): Simplify the code slightly.
	(damage_unit): Clear was_detonated even if there was no damage.
	* move.c (unit_speed): Return if called on dead unit.

	* tkmap.c (mapw_display): Clear the map outline before drawing.
	(draw_map_widget): Don't draw the outline here, reset fg/bg
	colors in GC.
	(draw_units, draw_unit_and_occs): Reset line width.
	(draw_unit_size): Don't draw on small unit images.
	(draw_map_outline): Add argument to clear outline explicitly.

	* xconq.c (interpret_variants): Declare.

	* stdt48x33i.gif: Fuzz out upper edges of all images.

	* all.g: Remove palette form.

	* refman.texi: Tweak detonation docs, add description of "std"
	keyword.

2000-09-22  Hans Ronne <hronne@2.sbbs.se>

	Improve mac closeups and popup dialogs. Fix updating and hiliting bugs.
	* advances.g (people, economy, supply): Comment out.
	* maccmd.c (do_build): Test if dside controls unit.
	(do_build): Call show_unit_build_dialog instead.
	* macconq.c (update_side_display): Simplify researchwin code.
	(update_unit_acp_display): Call draw_unit_build_dialog.
	* macconq.h (buildwin_unit): New global unit pointer.
	(draw_unit_build_dialog): Remove unit from prototype args.
	* macmenus.c (enable_commands_for_unit): Skip can_develop test.
	* macunit.c (buildwin_unit): Initialize.
	(unit_advance_win, unit_build_win, unit_plan_win): Remove globals.
	(draw_advanced_closeup): Fix run length text field bug. 
	(draw_advanced_closeup): Hilite controls when under manual control. 
	(hit_closeup_dialog): Make change of ai control take effect immediately.
	(hit_closeup_dialog): Disable controls when under ai control.
	(hit_closeup_dialog): Remove hiliting code. Call draw_unit_closeup instead.
	(draw_unit_build_dialog): Remove unit from functions args.
	(draw_unit_build_dialog): Use favored_type.
	(draw_unit_build_dialog): Fix run length text field bug.
	(draw_unit_build_dialog): Handle building in progress correctly.
	(draw_unit_build_dialog): Unhilite controls when under ai control.
	(hit_unit_build_dialog): Disable controls when under ai control.
	(hit_unit_build_dialog): Disable radio buttons for acp-dependent units.
	(build_construction_menu): Improve test for buildable unit types.
	* run.c (clear_task_outcomes): Also test for unit->plan->aicontrol.
	(run_construction): Call update_unit_acp_display.
	* XconqProj.rsrc (CNTL 715 "City Build Popup"): New tweaked control.
	(DLOG 803 "Advanced Closeup"): Use CNTL 715 instead of CNTL 710.
	* Xconq.r: Update from XconqProj.rsrc.

2000-09-17  Hans Ronne <hronne@2.sbbs.se>

	Fix problem with ais not realising a hit-unit target no longer
	exists, has moved away, or has been captured. Also fix bug in
	action-reaction defense code.
	* iplayer.c (iplayer_react_to_action_result): Call
	check_current_target.
	(check_current_target): New function and prototype.
	(keep_defensive_goal): Fix bug by adding several missing ->next.
	* mplayer.c (mplayer_react_to_action_result): Call
	check_current_target.
	(check_current_target): New function and prototype.
	(keep_defensive_goal): Fix bug by adding several missing ->next.

2000-09-17  Hans Ronne <hronne@2.sbbs.se>

	Fix sporadic end-of-turn problem when turning on ai control. Fix minor
	inconsistencies in handling of auto settings.
	* actions.c (set_created_unit_props): Don't set autoplan etc. for ai.
	* ai.c (set_side_ai): Force replan of all units when changing
	side's ai.
	(set_side_ai): Don't set autoplan etc. when turning on side ai.
	* cmd.c (do_one_auto): Force replan when changing unit's ai control.

	* unit.c (set_unit_side): Don't set autoplan etc. for
	ai-controlled units.
	
	Fix unnecessary auto_pick_new_research call in the mac interface.
	* macconq.c (auto_pick_new_research): Remove prototype.
	(update_side_display): Don't call auto_pick_new_research.
	
	Make popup dialogs respond immediately to the menu choice. Add
	ability to set Asleep and Reserve flags from build menu. Remove
	buttons.
	* macunit.c (draw_advanced_closeup): Handle Asleep and Reserve modes.
	(hit_closeup_dialog): Handle Asleep and Reserve modes.
	(show_unit_build_dialog): Tweak window position.
	(draw_unit_build_dialog): Handle Asleep and Reserve modes.
	(draw_unit_build_dialog): Draw help text at bottom of window.
	(hit_unit_build_dialog):  Close window if a task was picked.
	(hit_unit_build_dialog):  Handle Asleep and Reserve modes.
	(build_construction_menu): Add items for Asleep and Reserve modes.
	(build_research_menu): Add item "Stop Research".
	* macwins.c (show_research_dialog): Change title to "Side Research".
	(show_research_dialog): Comment out window positioning code.
	(draw_research_dialog): Handle "Stop Research".
	(hit_research_dialog): Close window if a topic was picked.
	(hit_research_dialog): Handle "Stop Research".
	* run.c (unit_build_dialog): Remove prototype.
	* XconqProj.rsrc (DITL 807 "Unit Build"): Tweak item text and
	positions.
	(DLOG 807 "Unit Build"): Change size so that both buttons are hidden.
	(DLOG 811 "Side Research"): Tweak item text and positions.
	(DLOG 811 "Side Research"): Change size so that both buttons are
	hidden.
	(PICT 4005 "Wizard"): New pict.
	* Xconq.r: Update from XconqProj.rsrc.

2000-09-17  Hans Ronne <hronne@2.sbbs.se>

	Make sure newly completed units are drawn correctly.
	* actions.c (make_unit_complete): Call all_see_cell.
	
	Fix problem with task outcomes being cleared before human side has
	time to react: only clear them for ai-controlled units.
	* run.c (unit_still_acting): Fix plan-related bug.
	(clear_task_outcomes): Only apply to ai-controlled units.
	(run_construction): Test args[2] instead of last_task_outcome.

	Don't call HideTheWindow directly from the mac drawing code.
	* macdesign.c (disable_designing): Call close_window instead.
	* macunit.c (draw_unit_closeup): Call close_window instead.
	
	Clean up prototypes on the mac.
	* macconq.h: Clean up. Sort all prototypes by file.
	(recalc_spacing): Prototype here.
	* macconq.c (recalc_spacing): Remove prototype.
	(invert_map): Remove prototype.
	(show_research_dialog): Remove prototype.
	(draw_research_dialog): Remove prototype.
	(hit_research_dialog): Remove prototype.
	(do_key_down_research): Remove prototype.
	* macprefs.c (recalc_spacing): Remove prototype.
	(invert_map): Remove prototype.

	Implement a non-modal build dialog on the mac that pops up when a unit
	is waiting for a build task.
	* maccconq.c (handle_keystroke): Call do_key_down_build.
	(do_mouse_down): Call do_mouse_down_build.
	(update_window): Call draw_unit_build_dialog.
	(update_window): Tidy up growbox settings.
	(maybe_select_next_unit): Simplify. Handle case where no curunit
	exists.
	(select_new_unit): New function and prototype.
	* macconq.h: (buildwin): Declare extern DialogPtr.
	(show_unit_build_dialog): New prototype.
	(draw_unit_build_dialog): New prototype.
	(hit_unit_build_dialog): New prototype.
	(do_mouse_down_build): New prototype.
	(do_key_down_build): New prototype.
	* macdefs.h (dBuild): Renumber dialog items.
	* macmouse.c (scroll_to_unit): Test if unit is hidden by floating
	window.
	* macunit.c (buildwin): Initialize.
	(unit_build_dialog): Remove modal dialog and prototype.
	(show_unit_build_dialog): New function.
	(draw_unit_build_dialog): New function.
	(hit_unit_build_dialog): New function.
	(do_mouse_down_build): New function.
	(do_key_down_build): New function.
	* XconqProj.rsrc (CNTL 710 "Build Popup"): Tweak position.
	(DITL 807 "Unit Build"): Rearrange items.
	(DLOG 807 "Unit Build"): Change size.
	(PICT 4004 "Worker"): New pict.
	* Xconq.r: Update from XconqProj.rsrc.
	
2000-09-16  Stan Shebs  <shebs@shebs.cnchost.com>

	Put all flags into a file image, add a 16x16 version, add
	"std" offset option to file image position that specifies
	relative position in a grid of same-size images.
	* keyword.def (std): New keyword.
	* imf.c (make_image_from_file_image): Interpret it.
	(write_imf): Write it.
	* images/flags8x8.gif, images/flags16x16.gif: New files.
	* flags.imf: Use them everywhere. (Note that this change
	did not carry over b/w versions.)

	Add controls to format ximfapp's image display into the
	standard layout for a file image, for the purpose of
	being able to take screenshots and convert into file images.
	* imfapp.tcl: Add foreground color and grid format menu items,
	maroon and magenta colors to background color menu.
	(toggle_show_grid, set_fg_color): New procs.
	* tkisamp.c (Imfsample fg_border, show_grid): New fields.
	(config_specs): New attributes -fg, -showgrid.
	(imfsample_configure): Set them up.
	(imfsample_display): Make show_grid override other display
	options, paint fg color before drawing image.  Also set the
	GCs' fg/bg colors to standard values before returning.

	* macinit.c (hit_player_setup_dialog): Call
	net_rename_side_for_player.

	* nlang.c (apparent_unit_handle): Don't add the "(independent)"
	to captured independent units.

	* actions.c (check_build_action): Don't allow further build
	actions on a unit that is complete and at maximum # parts.

	* unit.h (unit_in_vector): New macro, access to unit vector.
	* ai.c (run_ai_plan_adjust): Use it.
	* cmd.c (apply_to_all_selected_units): Ditto.
	* run.c (units_still_acting, side_move_some_units): Ditto.
	* skelconq.c (list_actors): Ditto.
	* ui.c (autonext_unit, autonext_unit_inbox): Ditto.
	* maclist.c (draw_unit_list_entry, etc): Ditto.
	* macwins.c (get_selected_construction_unit, etc): Ditto.
	* cdraw.c (draw_unit_list_entry): Ditto.

	* run.c (need_ai_plan_research): Remove.
	(run_side_research): Don't set it.
	* ai.c (run_local_ai): Test numatypes instead of
	need_ai_plan_research.

	* run.c (side_move_some_units): Add more comments, use local vars
	for side->actionvector.
	(run_construction): Test side_has_ai instead of side_has_local_ai,
	fix occupant test.

2000-09-14  Hans Ronne <hronne@2.sbbs.se>

	Fix hangs in run_construction and remove on-the-fly acps.
	* actions.c (has_enough_acp): Return true for acp-independent units.
	* run.c (run_construction): Remove on-the-fly bogus acps.
	* task.c (execute_task): Don't break for acp-independent units.
	
2000-09-12  Stan Shebs  <shebs@shebs.cnchost.com>

	* cmd.c (do_one_wake_all): Tell net_wake_unit to wake occupants.

2000-09-10  Stan Shebs  <shebs@shebs.cnchost.com>

	Remove named palettes, unused and un-useful.
	* imf.c, imf.h (interp_palette, new_image_palette,
	canonical_palette_name, get_imp, find_imp, write_imp): Remove.
	(write_palette_contents): Remove named palette case.
	(interp_imf_form): Remove call to interp_palette.
	* read.c (interp_form): Ditto.

	* refman.texi: Remove references to named palettes.

2000-09-09  Stan Shebs  <shebs@shebs.cnchost.com>

	Random rewrites and reorgs resolving remote networking bugs.
	* ai.c (init_ai): Fill in side->rai for remote AIs.
	(set_side_ai): Simplify, and add feedback on results.
	(run_local_ais, run_ai_plan_adjust): Move here from run.c,
	test taskexecs instead of need_ai_task_reaction.
	* cmd.c (do_ai_side): Fix player feedback to reflect that
	network roundup may be necessary before state changes.
	* cmdline.c (option_width, option_height, option_circumference):
	New globals.
	(parse_world_option): Set these instead of pushing a variant.
	(set_variants_from_options): Call net_set_variant_value instead
	of pushing variant settings.
	(find_variant_from_name): New function.
	* init.c (start_player_pre_setup_stage): Call do_module_variants.
	(final_init): Report more data structure sizes.
	* kernel.h (set_variant_value): Declare.
	* kpublic.h (net_set_variant_value): Declare.
	* module.h (Variant newvalues): New field, array of new settings
	for variant.
	* module.c (create_game_module): Store a copy of the module name.
	(set_variant_value): Move here from tkmain.c.
	(do_one_variant): Fill from newvalues fields.
	* read.c (interp_variant_defns, add_std_var): Fill in newvalues
	fields.
	* run.c (latest_action_x, latest_action_y): New globals.
	(num_local_ais): Move to ai.c.
	(need_ai_task_reaction): Remove, use taskexecs instead.
	(save_run_state, clear_task_outcomes): New functions.
	(run_game): Call them.
	(move_one_unit_multiple): Replace need_ai_task_reaction test
	with last_task_outcome and AI usage test.
	(run_side_research, run_construction): Test local AI instead
	of AI in general (dubious).
	* side.h (Side rai): New field.
	(side_has_ai): Test both local and remote AI.
	(side_has_local_ai): New macro.
	* task.c (execute_task): Rework recording of task outcome.
	* tp.h (RAI): New struct, placeholder "remote AI".
	* tp.c: Change run warnings into notices.
	(net_set_variant_value): New function.
	(receive_variant_settings): Allow at most three values.
	* write.c (write_side_properties): Only write AI state for
	local AIs (dubious).

	* tkconq.tcl: Rewrite variant handling to do more work in
	kernel.
	(set_variant_value_cmd): New proc, replaces broadcast_variant_value.
	(set_variants): Do less.
	(add_world_size_dialog_items): Comment out lat/lon items.
	(insert_chat_string): Test for existence of window before insert.
	* tkmain.c: Rewrite for variants also.
	(send_value_value, implement_variants): Remove tcl commands.
	(tk_set_variant_value): Rewrite to pass along to kernel.
	(interpret_variants): Rewrite.
	(set_variant_world_size, set_variant_real_time): Remove,
	handled uniformly in kernel.
	(update_variant_setting): Rewrite.

2000-09-08  Hans Ronne <hronne@2.sbbs.se>

	Speed up games that are limited by play_movies on the mac.
	* macconq.c (play_movies): Only play movies that are visible on a map.
 	(play_movies): Remove obsolete port setting and pen tweaking code.
 	(play_movies): Use flash movie also for nukes.
 	* run.c (run_research): Add missing prototype.

2000-09-04  Stan Shebs  <shebs@shebs.cnchost.com>

	Remove unused -pre and -post command-line options, only allow
	one module on the command line.
	* cmdline.c (struct module_spec, struct gdl_spec): Remove.
	(parse_command_line): Remove -pre and -post.
	(add_a_module): Don't add multiple modules.
	(add_a_gdl_spec): Remove.
	(load_all_modules): Simplify.
	* cmdline.6in: Remove doc of options.

	Make side name choice work in networked games, make pregame
	chat work line-at-a-time instead of per-char.
	* init.c, kernel.h (rename_side_for_player): Add argument to
	specify which entry in side library to use.
	* tp.c, kpublic.h (net_rename_side_for_player): Similarly.
	(receive_assignment_setting): Interpret arg to rename packet.

	* tkconq.tcl (set_variants): Fix bug.
	(add_player_dialog_items): Use rename_side_for_player_cmd for
	both menu and random cases.
	(rename_side_for_player_cmd): Add argument.
	(set_name_from_side_lib_cmd): Remove, no longer needed.
	(join_game): Add newline to chat string.
	(popup_chat): Add text entry widget at bottom.
	(add_program): Simplify code that announces player arrival.
	(enable_chat): Only handle <Return> specially.
	(send_chat_bdg): Send whole string from text entry widget.
	(insert_chat_string): Rewrite to always insert whole lines.
	* tkmain.c (tk_set_name_from_side_lib): Remove, no longer needed.
	(tk_rename_side_for_player): Add argument.

2000-09-02  Stan Shebs  <shebs@shebs.cnchost.com>

	General overhaul and cleanup of networking support, including
	fixed command-line -host/-join handling and ability to load
	a module directly instead of sending across the net.
	* cmdline.c (game_chosen): Remove, no longer used.
	(parse_command_line): Name -h <n> players as "?@" instead of "x@",
	remove warning messages.
	(set_players_from_options): Update remote programs with info
	about players.
	* init.c, conq.h (start_game_load_stage,
	start_variant_setup_stage, start_player_pre_setup_stage,
	start_player_setup_stage, start_game_ready_stage): New functions,
	control over game setup stages.
	* side.c: Add a couple comments.
	* socket.c (wait_for): Comment out excessive output.
	* tp.c (add_remote_players): Fill in existing players named "?"
	before creating new players.
	(net_update_player): New function.
	(download_game_module): Add case to download module name only.
	(broadcast_start_variant_setup, broadcast_start_player_setup):
	New functions.
	(send_packet): Change timeout warning to a notice.
	(receive_data): Dump no-op loop counts once/second only.
	(receive_packet): Handle new stage start packets.
	(receive_game_checksum): Notify instead of warn about checksum
	failures.
	(receive_assignment_setting): Handle player spec packet.
	* tp.h: Declare new functions.

	* tkconq.tcl (master_rid): New global, use everywhere instead
	of assuming master's rid is 1.
	(set_variant): Change stage only if master.
	(update_player_entry, update_allplayer_buttons): Don't run if
	no dialog.
	(popup_chat): Handle mid-game first-time popup correctly.
	* tkinit.c: (init_ui): Handle repeated calls.
	* tkmain.c (TclCmdFn): New function typedef, use for all
	tcl commands.
	(tcl_cmd): New function.
	(initial_ui_init): Use to set up all generic tcl commands.
	(tk_start_player_setup_stage): New tcl command.
	(add_remote_locally): Set master_rid.
	(launch_game_2): Merge into launch_game.

	* xconq.c (main): Reorganize to handle command-line and
	interactive setup more uniformly.

	* actions.c, read.c, unit.c: Use more new-style function defns.
	* run.c: Add some comments.
	* run2.c: Remove unused decls.
	* world.c, world.h (compute_elevation_bounds): New function, split
	out from final_init_world.
	* read.c (fill_in_elevations): Call it.
	* write.c (write_area_elevations): Change to write only
	nonnegative values.
	
2000-08-26  Hans Ronne <hronne@2.sbbs.se>

	* advterr.g: Use stdt images for lake and salt-marsh.
	* ChangeLog (000825): Fix typo. Delete note about research problem.
	* macconq.c (update_side_display): Change side to side2.

2000-08-25  Stan Shebs  <shebs@shebs.cnchost.com>

	* imf.c (interp_image): Don't reallocate subimages if called a
	second time with the same number of subimages, simplify subimage
	code overall.

2000-08-25  Hans Ronne <hronne@2.sbbs.se>

	Fix crashes in the mac game window due to unallocated score record.
	Fix minor glitch in the shore drawing code. Fix (finally) problems with
	side research hanging in the presence of an active indepside that cannot
	do research.
	
	* macconq.c (update_side_display): Use inactive_indepside instead.
	* macconq.h (draw_shores): Prototype here instead.
	* macmap.c (draw_shorelines & draw_gridlines): Remove prototypes.
	(update_cell): Change draw_shorelines to draw_shores.
	* macrow.c (draw_shores): Remove prototype.
	* macwins.c (draw_game): Allocate last_status_score1 correctly.
	(draw_game): Use for_all_sides instead of for_all_real_sides.
	(draw_game_side): Test for inactive_indepside.
	* run.c (run_side_research): Test if indepside can do research and has
	treasury before proceeding.
	* score.c (inactive_indepside): Move macro to side.h.
	* side.h (inactive_indepside): Move here from score.c.

2000-08-25  Stan Shebs  <shebs@shebs.cnchost.com>

	* side.c (create_side): Initialize side->canbuild after advances
	set up.
	(see_cell): Fix viewing of stacks with variable see-chance.

2000-08-24  Stan Shebs  <shebs@shebs.cnchost.com>

	* side.c (create_side): Always initialize side->canbuild.

2000-08-24  Hans Ronne <hronne@2.sbbs.se>

	Enable drawing of terrain transitions on the mac. Also draw
	beaches around bodies of water when using terrain images and
	map->shorelines is set.
	
	* macconq.h (a_map): New slot short draw_transitions.
	(generic_transition & beach): New ImageFamily.
	(draw_terrain_transitions & draw_shore_images): New prototypes.
	(draw_gridlines & draw_shorelines): Prototype here instead.
	* macdraw.c (cell_style): Copy macro from macrow.c.
	(mac_compute_transition): New function and prototype.
	(draw_terrain_transitions & draw_shore_images): New functions.
	* macinit.c (generic_transition & beach): Initialize to NULL.
	(init_terrain_images): Load generic transition and beach images.
	* macmap.c (create_map): Initialize map->draw_transitions.
	* macrow.c (draw_shorelines & draw_gridlines): Remove prototypes. 
	(draw_row): Delete unused single loop version.
	(draw_row): Call draw_terrain_transitions.
	(draw_row): Call draw_shores & draw_borders twice.
	(draw_shores): New function and prototype.
	(draw_borders): Restrict to inside area.
	* ui.c (any_borders_in_dir): Remove static prototype.
	* ui.h (any_borders_in_dir): Prototype extern.

2000-08-24  Stan Shebs  <shebs@shebs.cnchost.com>

	Remove vestiges of long-defunct monochrome display support.
	* tkconq.h (UI monochrome): Remove field.
	* tkinit.c (set_optional_colors, request_colors,
	init_terrain_images, init_emblem): Don't test for monochrome.
	* tkmap.c (set_terrain_gc_for_image, draw_blast_image,
	draw_unit_image, draw_side_emblem): Ditto.
	* tkimf.c (tk_make_color_pixmap): Don't quit if screen is mono.
	* ximf.c (x11_make_color_pixmap): Ditto.

	* tkcmd.c, tkmain.c: Declare place_legends.

	* imfapp.tcl: Add image closeups for cell sizes 24x26, 44x48, and
	88x96, set up all using new proc add_closeup.
	(set_bg_color, select_imf): Update new closeups.
	
	* xconq.texi: Remove refs to xtconq, also credit recent
	contributors.
	* design.texi: Remove ref to monochrome displays.
	* playref.texi: Remove refs to interface-specific commands.

2000-08-23  Hans Ronne <hronne@2.sbbs.se>

	Make drawing of border images work on the mac. Fix resizing code
	for scores window. Fix problems with drawing of terrain images at
	an angle and with vertical scaling. Change some default preferences 
	to reflect recent interface developments. 
	
	* maccolors.c (default_sidecolors): Change to false.
	(default_iconmasks): Change to false.
	(default_draw_ai): Change to false.
	(alert_256_colors): Change to false.
	(default_erase_names): Change to true.
	(unified_cicns): Change to false.
	* macconq.h (draw_border_images): Prototype.
	* macdraw.c (pref_color_unit_images): Initialize to true.
	(pref_solid_color_terrain): Initialize to false.
	(draw_border_images): Ported from tcltk code.
	(draw_hex_region): Fix it so that it works if drawing at an angle.
	* macmap.c (set_map_angle): Comment out vertscale setting code.
	(adjust_meridian_interval): Increase start value to 128 pixels.
	* macprefs.c (default_draw_grid): Change to false.
	* macrow.c (draw_row): Call draw_borders also for adjacent cells. 
	(draw_borders): Rewrite. Call draw_border_images if images are 
	available and asked for.
	* macwins.c (create_scores_window): Tweak viewrect size.
	(grow_scores): Change sbarwid to floatsbarwid. Tweak values.
	(zoom_scores): Ditto.

	* side.c (default_emblems): Flip around blue and cyan.

2000-08-22  Stan Shebs  <shebs@shebs.cnchost.com>

	Remove the Xt/Xaw interface, no longer being maintained.
	This interface became standard for X11 Xconq with the release of
	7.0 in 1995, but was a widgetification of the original X interface
	design first written in 1987.  This interface was unique in
	supporting multiple players by having the single program opening
	windows on several displays at once.
	* INSTALL: Remove build instructions.
	* Makefile.in (all-xtconq, install-xtconq): Remove.
	* x11/Makefile.in (X_H, XTOBJS, all-xtconq, xtconq, etc): Remove.
	* x11/Xtconq-co.ad, x11/Xtconq.ad, x11/closeup.notes,
	x11/xcloseup.c, x11/xcmd.c, x11/xdesign.c, x11/xdraw.c,
	x11/xhelp.c, x11/xinit.c, x11/xmap.c, x11/xprint.c,
	x11/xtconq.6in, x11/xtconq.c, x11/xtconq.h, x11/xtconqad.h,
	x11/xtmain.c: Remove.

	* xconq.texi: Remove refs to xtconq, also credit recent
	contributors.

2000-08-22  Hans Ronne <hronne@2.sbbs.se>

	Fix generation of default side emblems from colorschemes so that it 
	works on the mac. Pick the first color in complex colorschemes on
	all platforms. Fix color ppat display in the player setup dialog. Add 
	a set of default emblem colors that are easily distinguished from each
	other and from the map backgrounds.

	* maccolors.c (init_side_colors): Call net_set_side_colorscheme.
	* macdraw.c (draw_unit_image): Use default emblem color if available
	for small unit images drawn as boxes.
	(draw_side_emblem): Comment out resizing code.
	* macdraw.c (draw_side_emblem): Add case to handle ppats.
	* macdraw.c (draw_side_emblem): Clip emblem height to 12 pixels.
	* macdraw.c (draw_side_emblem): Use ltgraycolor instead of tmpcolor.
	* macinit.c (launch_game): Move init_side_colors after side creation.
	(draw_player_setup_list): Tweak fonts and text sizes to fit the dialog.
	(draw_player_setup_list): Make room for MAXSIDES + indepside.
	(set_player_setup_button_states): Change numtotsides to numsides. 
	(hit_player_setup_dialog): Call init_side_colors when adding a side.
	* macmap.c (create_map): Don't set sidecolors for the world map.
	* side.c (default_emblems): New static string array.
	(create_side): Use default_emblems for newside.
	* ui.c (get_emblem_images): Use 1st color in complex colorschemes.
	* XconqProj.rsrc (dctb 130 "Player Setup"): New dialog color table.
	(DITL 130 "Player Setup"): Tweak dialog item sizes and positions.
	(DLOG 130 "Player Setup"): Increase height to accomodate 16 sides.
	* Xconq.r: Update from XconqProj.rsrc.

2000-08-21  Hans Ronne <hronne@2.sbbs.se>

	* Change for_all_sides_plus_indep macro to for_all_sides 
	everywhere since they now mean the same thing.
	
	* help.c (describe_utype): Use for_all_sides.
	* init.c (final_init): Ditto.
	* macinit.c (init_emblem_images): Ditto.
	(dispose_emblem_images): Ditto.
	* macmenus.c (enable_commands_for_unit): Ditto.
	* nlang.c (sidemask_desc): Ditto.
	* ps.c (ps_cook_imf): Ditto.
	(ps_initialize): Ditto.
	* run.c (init_run): Ditto.
	(init_movement): Ditto.
	(compose_actionvectors): Ditto.
	(move_some_units): Ditto.
	(finish_turn): Ditto.
	* run2.c (compute_moves): Ditto.
	(unit_revolt): Ditto.
	* side.h (for_all_sides_plus_indep): Remove macro.
	* skelconq.c (list_actors): Use for_all_sides.
	* tkinit.c (init_emblem_images): Ditto.
	* tp.c (game_checksum): Ditto.
	* unit.c (num_sides_allowed): Ditto.
	(sort_units): Ditto.
	* xinit.c (init_emblem_images): Ditto.
	
	Spruce up the game window on the mac and make it draw indepside
	if it is alive. Make the score window work again. Fix update problem
	with the game window.
	
	* advances.g: Use resource images from civ2.g.
	
	* mac.c (open_scorefile_for_reading): Fix file location bug.
	* macconq.c (update_side_display): Handle indepside correctly.
	(update_turn_display): Call draw_game at endofgame.
	(won_game_dialog): Call force_overall_update.
	(lost_game_dialog & game_over_dialog): Ditto.
	* macwins.c (create_game_window): Make room for indepside if needed.
	(draw_game): Make room for indepside and draw it if it is alive.
	(draw_game): Use graycolor for date and progress if at endofgame.
	(draw_game): Use ltgraycolor for separating line.
	(draw_game_date): Don't call gray_out_rect.
	(draw_game_clocks): Make room for indepside if needed.
	(draw_game_progress): Tweak text position.
	(draw_game_side): Make room for indepside if needed.
	(draw_game_side): Use graycolor instead of gray_out_rect.
	(draw_game_side): Tweak side name and attitude sicn positions.
	(draw_game_side): Use ltgraycolor instead of QDPat gray for lines.
	(draw_side_status): Make room for indepside if needed.
	(draw_side_status): Use graycolor instead of gray_out_rect.
	(draw_side_status): Use a red line with PenSize 2 for the loser.
	(draw_side_status): Use red and green instead of QDPat black and gray.
	(draw_side_status): Use pink instead of QDPat gray for finished turn.
	(draw_side_status): Tweak progressrect and scores text positions.
	(draw_side_status): Use small font for the scores text.
	(draw_side_status): Draw scores in graycolor if out of game.
	(draw_side_status): Don't draw progressrect in gray if no acps.

2000-08-21  Stan Shebs  <shebs@shebs.cnchost.com>

	Make resource usage display work in more cases.
	* ui.c: Add comments.
	(add_default_material_image): Also define a shade of gray.
	* tkmap.c (draw_resource_usage): Reorganize to draw both
	images and solid-color boxes correctly.
	(draw_borders, draw_borders_iso, draw_connections,
	draw_connections_iso, draw_blast_image): Check that color image
	exists before trying to use it.

2000-08-20  Hans Ronne <hronne@2.sbbs.se>

	Move side research from run_turn_start to run_game in order to
	make it possible to complete more than one advance each turn. Fix
	problems with ai research getting stuck in idle mode.

	Simplify checks for construction and research. Collect all
	side-specific build restrictions (u_avail, tech, advances) into
	side->canbuild vector.  Access the latter by the macro
	side_can_build. Similar for research.

	* actions.c (do_create_in_action): Remove doublechecks. 
	(check_create_common): Use side_can_build.
	(check_create_common): Check new_unit_allowed_on_side.
	(do_create_at_action): Remove doublechecks. 
	(check_build_action): Replace tech check with side_can_build.
	(do_transfer_part_action): Remove doublechecks. 
	(check_transfer_part_action): Check side_can_build.
	(check_transfer_part_action): Check new_unit_allowed_on_side.
	(check_change_type_action): Use side_can_build.
	(do_develop_action): Call update_canbuild_vector.
	(adjust_tech_crossover): Call update_canbuild_vector.
	* ai.c (ai_plan_research): New function.
	* ai.h (a_ai_op): Add to_plan_research.
	(ai_plan_research): New prototype.
	* cmd.c (do_research): Use side_can_research.
	* conq.h (has_advance_to_build): Remove prototype.
	(has_advance_to_research): Remove prototype.
	* iplayer.c (iplayer_ops): Add iplayer_plan_research.
	(iplayer_plan_research): New function and prototype. Identical to
	mplayer_plan_research.
	(assign_to_colonize): Use side_can_build.
	(type_can_build_attackers): Use side_can_build.
	(preferred_build_type): Use side_can_build.
	(build_depot_for_self): Use side_can_build.
	* macunit.c (unit_build_dialog): Use side_can_build. 
	(build_construction_menu): Use side_can_build.
	(unit_research_dialog): Use side_can_research.
	(build_research_menu): Use side_can_research.
	* macwins.c (init_construction_lists): Use side_can_research.
	(init_construction_lists): Use side_can_build.
	(adjust_construction_controls): Use side_can_research.
	(adjust_construction_controls): Use side_can_build.
	(side_research_dialog): Use side_can_research.
	(draw_research_dialog): Handle NONATYPE correctly.
	* mkunits.c (make_countries): Use side_can_build.
	(place_unit): Use side_can_build.
	* mplayer.c (mplayer_ops): Add mplayer_plan_research.
	(update_side_strategy): Move research to mplayer_plan_research.
	(mplayer_plan_research): New function and prototype. Shorterned 
	version from update_side_strategy.
	(need_this_type_to_build_explorers): Use side_can_build.
	(assign_to_colonize): Use side_can_build.
	(type_can_build_attackers): Use side_can_build.
	(type_can_build_colonizers): Use side_can_build.
	(preferred_build_type): Use side_can_build.
	(build_base_for_self): Use side_can_build.
	(build_base_for_others): Use side_can_build.
	(build_depot_for_self): Use side_can_build.
	* plan.c (self_build_base_for_self): Use side_can_build.
	(plan_offense_support): Use side_can_build.
	(plan_colonize_support): Use side_can_build.
	(plan_improve): Use side_can_build.
	(plan_explorer_support): Use side_can_build.
	* run.c (need_ai_plan_research): New static int.
	(run_game): Call run_side_research.
	(move_one_unit_multiple): Handle acp-independent construction.
	(unit_still_acting): Rewrite into separate clauses to facilitate 
	debugging (units occasionally get stuck here).
	(unit_still_acting_no_plan): Ditto.
	(run_local_ai): Call ai_plan_research if need_ai_plan_research.
	(run_side_research): Move here from run2.c. Modify for run_game
	use and fix some bugs. Don't spend more rps than needed to complete 
	the advance. Abort research if topic is set to NONATYPE. Set the flag
	for need_ai_plan_research if NOADVANCE or when DONE.
	(has_advance_to_research): Replaced by side_can_research macro.
	(has_advance_to_build): Replaced to side_can_build macro. 
	(update_canresearch_vector): Set completed advances to FALSE instead.
	(update_canbuild_vector): Also test for type_allowed_on_side and for
	required tech levels to build and own.
	(auto_pick_new_build_task): Use side_can_build.
	(auto_pick_new_research): Change MAXUTYPES to MAXATYPES.
	(auto_pick_new_research): Use side_can_research.
	(auto_pick_side_research): Change MAXUTYPES to MAXATYPES.
	(auto_pick_side_research): Use side_can_research.
	(auto_pick_side_research): Return NONATYPE on failure.
	* run2.c (run_side_research): Move function and prototype to run.c.
	(run_turn_start): Remove call to run_side_research.
	* side.h (has_advance): Remove null side check.
	(side_can_build): New macro.
	(side_can_research): New macro.
	* tkcmd.c (do_build): Use side_can_build.
	* tkmain.c (tk_available_advance): Use side_can_research.
	(tk_set_side_research): Use side_can_research.
	* ui.c (favored_type): Use side_can_build.

	* advances.g (rp): Change to 10 for all advances.

	Make mac command, scores and history windows floating. Fix scrolling 
	of history window. Remove dobutton and make command window close on
	execution of command.
	
	* maccmd.c (dobutton): Remove static ControlHandle.
	(unit_do_build_2): Call show_construction_window before
	set_construction_run_length (fixes null pointer crashes).
	(create_command_window): Make commandwin a floating window. 
	(create_command_window): Remove redundant call to SelectTheWindow.
	(create_command_window): Remove dobutton code.
	(do_mouse_down_command): Remove dobutton code.
	(do_key_down_command): Rewrite. Add keyCode as arg. Let Return and
	Enter execute and close the window. Let Escape close the window.
	(draw_command): Draw explanatory text. Select the command_text.
	* macconq.c (handle_keystroke): Handle commandwin as a floating window.
	Add keyCode as arg to do_key_down_command. Always let Escape key close
	topFloat window.
	* macconq.h (do_key_down_command): Add int keyCode to args.
	* macdefs.h (cCommandDoButton): Remove.
	* macwins.c (history_top_line_height): Remove.
	(create_construction_window): Don't put constructionwin
	 at bottom of the screen.
	 (create_history_window): Make historywin a floating window.
	 Use floatsbarwid instead of sbarwid. Make it a color window. Set default
	 size and title. Hilite scrollbar.
	 (set_history_scrollbar): Use floatsbarwid instead of sbarwid.
	 Don't use history_top_line_height. Always set the thumb position to max. 
	 (draw_history): Call EraseRect first of all (fixes drawing bug). Tweak
	 code for drawing first visible date. Draw it in red with bold face.
	 (draw_historical): Rewrite line number code. Start each event with a
	 capital letter and end with a period. Draw dates in red with bold face.
	 (history_scroll_fn): Change so that it works like notice_vscroll_fn.
	 (move_history_scrollbar): Add 1pixel to scrollbar length. 
	 Use floatsbarwid instead of sbarwid.
	 (create_notice_window): Set default window height to 122 pixels.
	 (append_notice): Comment out linefeed before new turn.
	 (create_scores_window): Make scoreswin a floating window. 
	 Use floatsbarwid instead of sbarwid. Tweak vscrollrect.top.
	* XconqProj.rsrc (CNTL 501 "Do Button"): Remove.
	(DLOG 811 "Side Research"): Set height to 122 pixels.
	(WIND 133 "History"): Autoposition it to center of main screen. 
	Change ProcID to 1063 (Resizable Floating).
	(WIND 134 "Construction"): Autoposition it to center of main screen.
	Change window title to "Construction and Research".
	(WIND 137 "Command"): Autoposition it to center of main screen. 
	Change ProcID to 1057 (Fixed Floating). Reduce height to 30.	
	(WIND 138 "Scores"): Autoposition it to center of main screen. 
	Change ProcID to 1063 (Resizable Floating).
	* Xconq.r: Update from XconqProj.rsrc.

2000-08-20  Stan Shebs  <shebs@shebs.cnchost.com>

	* ui.c, ui.h (get_material_type_images): Move to here from tkinit.c.
	(add_default_material_image): New function.
	(embarkation_unit): Move to here from cmd.c.

	* x11/Makefile.in (xconq, ximfapp): Always link -lm last.

	* move.c (do_move_action, do_enter_action): Add notifications
	for vanishing and wrecking.
	(do_enter_action): Allow entry over hostile terrain if destination
	ferries over all.
	* mplayer.c (update_unit_plans): Test plan->aicontrol before touching.
	* ui.c (oneliner): Remove commented-out code, test vp->show_all
	only and not vp->see_all.

	* macmenus.c (do_take_mi): Call do_take.
	* macrow.c (draw_units): Test show_all only.

	* tkmap.c (draw_map_widget): Reset last_ws_valid.
	(draw_map_outline: Rewrite to handle more situations correctly.

	* africa.g: Improve various images, rename "plains" to "savannah",
	add new terrain type "Europe", let towns ferry explorers out to
	ships in harbor, start each side with a ship, let initial units
	start out all next to each other, add a side library with names
	of famous explorers.
	* t-africa.g: Change Europe to have Europe terrain.
	* africa-1850.g: Remove fixed side, add terrain view to
	side-defaults, clean up view slightly.
	* u-e50-1998.g: Fix side for Niamey.

	Change occupant-vision from a boolean to a percentage, fix
	other vision-related behavior.
	* table.def (occupant-vision): Tweak default, change fn name.
	* help.c (describe_utype): Update help info.
	* side.c (cover_area): Update usage.
	(see_cell): Also test for viewers exactly at the given location.
	(test_for_successful_viewer): Iterate over occupants, change
	to multiply see chance with uu_occ_vision.
	* init.c (init_all_views): Simplify slightly, call init_view_cell
	for seen cells even if not world-seen.
	(init_view_cell): Add a unit view instead of doing see_exact.

	* refman.texi: Document the change.

	* PROJECTS: Add items about removing size limits.

2000-08-18  Hans Ronne <hronne@2.sbbs.se>

	Move acp-independent construction from run_turn_start to normal
	execution code in move_one_unit_multiple. Continue cleanup and
	simplification.
	* actions.c (can_have_enough_acp): Use acp_indep instead.
	* kernel.h (resume_build_task): New prototype.
	(set_unit_buildingdone): New prototype.
	(set_unit_researchdone): New prototype.
	* kpublic.h (net_set_unit_buildingdone): New prototype.
	(net_set_unit_researchdone): New prototype.
	* mplayer.c (mplayer_decide_plan): Always assign colonizers to
	colonizing.
	* plan.c (init_unit_plan): Use acp_indep instead.
	(plan_offense): Extend search for new victims to within 3 x
	tactical range.
	(set_unit_buildingdone): New function.
	(set_unit_researchdone): New function.
	* run.c: Move advanced unit prototypes to head of file.
	(compose_actionvectors): Include acp-independent units.
	(move_one_unit_multiple): Handle acp-independent units.
	Call run_construction for acp-independent units.
	(run_local_ai): Use acp_indep instead.
	(run_ai_plan_adjust): Use acp_indep instead.
	(take_all_from_treasury): New function and prototype.
	(give_all_to_treasury): New function and prototype.
	(run_advanced_units): Remove treasury related code. Comment out
	calls to run_construction and run_research.
	(run_population): Call take_all_from_treasury & give_all_to_treasury.
	(run_construction): Rewrite. Call resume_build_task
	instead. Remove check for NULL plan. Pick new plan for passive
	units only if under ai control. Call set_waiting_for_tasks and
	return if human-controlled unit needs a new build task. Call
	take_all_from_treasury & give_all_to_treasury. Set buildingdone
	flag if necessary.
	(run_research): Rewrite and simplify. Call take_all_from_treasury & 
	give_all_to_treasury. Set researchdone flag if necessary.
	(auto_pick_new_build_task): Call set_build_task. Remove commented
	out code.
	(auto_pick_new_plan): Call set_unit_plan_type & clear_task_agenda
	instead.
	* run2.c (reset_all_reserves): Also reset buildingdone & researchdone.
	* task.c (resume_build_task): New function.
	* tp.c (net_resume_build_task): Call resume_build_task.
	(net_set_unit_buildingdone): New function.
	(net_set_unit_researchdone): New function.
	(receive_unit_prop): Handle buildingdone & researchdone.
	* unit.h (a_unit): Add short buildingdone & short researchdone.
	(acp_indep): Define as u_acp_independent(unit->type).
	(has_acp_left): Return true for acp-independent units that have
	stuff to do.
	* unit.c (create_unit): Set buildingdone & researchdone to false.
	(init_unit_actorstate): Use acp_indep instead.

2000-08-15  Hans Ronne <hronne@2.sbbs.se>

	Make advances.g use side research instead of unit-based research. 
	Adapt it to the cleaned up advanced unit code.
	* advances.g (side-can-research): Set to true.
	(advanced-auto-construct): Remove.
	(advanced-auto-research): Remove.
	(disable-standard-acp): Remove.
	(acp-independent): Set to true for places.
	(acp-per-turn): Set to zero for places.	
	(ideas): Set treasury to true.	

	Clean up research and construction code for advanced units. Make
	sure it works on both Mac and Unix for advances.g as well as
	civ2.g.
	* actions.c (can_have_enough_acp): Change u_advanced to
	u_acp_independent.
	* iplayer.c (iplayer_decide_plan): Remove complicated check for
	u_advanced.
	Also remove checks for plan & aicontrol (already checked in
	run_local_ai).
	(iplayer_adjust_plan): Remove complicated check for u_advanced.
	* macmenus.c (adjust_menus): Change u_advanced to u_can_research.
	* macwins.c (side_research_dialog): Change u_advanced to
	u_can_research.
	(adjust_construction_controls): Ditto.
	* mplayer.c (mplayer_decide_plan): Remove complicated check for
	u_advanced.  Also remove checks for plan & aicontrol (already
	checked in run_local_ai).
	(mplayer_adjust_plan): Remove complicated check for u_advanced.
	* nlang.c (research_desc): Change u_advanced to u_can_research.
	* plan.c (execute_plan): Remove complicated check for u_advanced.
	(init_unit_plan): Permit zero acp if u_acp_independent.
	* run.c (run_local_ai): Don't call ai_decide_plan for
	acp-independent units.
	(run_ai_plan_adjust): Don't call ai_adjust_plan for
	acp-independent units.
	(run_advanced_units): Remove commented out code.
	(run_advanced_units): Call run_construction if u_acp_independent.
	(run_advanced_units): Call run_research if u_can_research.
	(run_construction): Call init_unit_plan instead of unit_plan_dialog.
	(auto_pick_new_build_task): Comment out optional unit_plan_dialog call.
	* run2.c (compute_moves): Remove u_disable_standard_acp code.
	(run_side_research): Check that all required materials have a treasury.
	* unit.c (init_unit_actorstate): Permit zero acp if u_acp_independent.
	* utype.def (u_disable_standard_acp): Remove.
	(u_advanced_auto_construct): Remove.
	(u_advanced_auto_research): Remove.
	(u_acp_independent): New utype property.
	(u_can_research): New utype property.

	Fix link error on the mac.
	* macmenus.c (do_take_mi): Comment out broken do_one_take call.

2000-08-15  Stan Shebs  <shebs@shebs.cnchost.com>

	* side.c (init_view): Don't allocate unit view hash table.
	(add_unit_view): Test for existence of view hash table.
	(add_unit_view_raw): Allocate hash table if needed.
	(remove_unit_view): Skip if no hash table present.

	Make still more commands generic.
	* cmd.c (do_reserve, do_one_reserve, do_return, do_one_return,
	do_sleep, do_one_sleep, do_take, do_one_take): New functions,
	adapted from interface-specific versions.
	* ccmd.c, maccmd.c, macconq.h, tkcmd.c: Remove interface-specific
	versions of these.

	* cmd.c (do_give): Test for material types.
	(do_one_give): Call report_give.
	(do_release): Add more validity tests and more feedback.
	* nlang.c, conq.h (make_text): Remove, no longer used.
	(report_give): New function.
	* ui.c, ui.h (give_supplies): Return recipient of supplies,
	add more searching for units to give to.
	(advance_into_cell): Simplify structure slightly.

2000-08-14  Hans Ronne <hronne@2.sbbs.se>

	Make the construction window a floating window. Close it when done.
	Eliminate special code for hiding it behind the map.
	* maccmd.c (modal_construction): Don't declare.
	(window_behind_construction): Don't declare.
	(unit_do_build_2): Don't set window_behind_construction and
	modal_construction.
	(show_construction_window): Move to macwins.c.
	* macconq.c (handle_keystroke): Handle constructionwin as floating.
	* macmenus.c (window_behind_construction): Don't declare.
	(modal_construction): Don't initialize.
	* macwins.c (show_construction_window): Move here.
	(show_construction_window): Don't set window_behind_construction. 
	(create_construction_window): Make constructionwin floating.
	(do_mouse_down_construction): Eliminate all window hiding code.
	Set selected task but don't close window on button clicks.
	(do_key_down_construction): Set default task (construction) and close 
	the window on Enter and Return.	

2000-08-13  Stan Shebs  <shebs@shebs.cnchost.com>

	Make more commands generic.
	* cmd.c (do_auto, do_one_auto, do_clear_plan, do_one_clear_plan,
	do_delay, do_one_delay, do_detach, do_one_detach, do_detonate,
	do_one_detonate, do_disband, do_one_disband, do_disembark,
	do_one_disembark, do_embark, do_one_embark, embarkation_unit,
	do_give, do_one_give, do_idle, do_one_idle): New functons, adapted
	from interface-specific versions.
	* ccmd.c, maccmd.c, tkcmd.c: Remove interface-specific versions of
	these.
	* macmenus.c (do_detonate_mi): Call do_detonate.

	* tkmap.c (draw_dots): New function, split out from draw_units.
	(draw_unit_size): New function, draws size of advanced units on map.
	(draw_units): Call it.
	
2000-08-13  Hans Ronne <hronne@2.sbbs.se>

	Add big Civ2-type images to advances.g.
	* advances.g (bigicons): Set to true. 
	(trident.gif): Delete all references.
	(ancient.gif): Use its images instead.
	(catapult): Change to ballista everywhere.
	(siege-engine): Change to onager everywhere.
	* ancient.gif: New image file.
	* ancient.imf: List images in ancient.gif.
	* imf.dir: List images in ancient.gif.
	* maccolors.c (whitecolor): Initialize.
	* macconq.h (whitecolor): Declare extern RGBColor.
	* macdraw.c (draw_unit_image): Tweak draw_unit_mask args.
	* ui.c (xform_occupant): Only enable big icon code on the Mac.
	(find_unit_or_occ): Only test for g_bigicons on the Mac.
	(find_unit_or_occ_view): Ditto.
	
2000-08-13  Stan Shebs  <shebs@shebs.cnchost.com>

	Fix various bugs in unit viewing, especially for see_all case.
	* iplayer.c (can_see_actual_units): Remove, no longer used.
	(preferred_build_type): Test side->see_all.
	* mplayer.c (can_see_actual_units): Remove, no longer used.
	(review_theaters, estimate_strengths, preferred_build_type): Fix
	!side->see_all cases.
	* plan.c (victim_here): Remove a comment.
	* side.c (become_designer, become_nondesigner): Add notices
	to all sides.
	(unit_view_at, unit_view_next): Handle side->see_all case by
	faking view objects.
	(add_unit_view): Record the date of the unit view.
	* side.h: Add some comments.
	* task.c (do_hit_unit_task): Always use unit views.
	(parse_unit): Remove redundant see_all test.

	Add ability to have generic commands that work on units.
	* cmd.c (apply_to_all_selected_units): New function.
	(do_wake, do_wake_all): Move here from interfaces.
	(do_one_wake, do_one_wake_all): New functions.
	* unit.c (add_unit_to_vector): Free old vector.
	* maccmd.c (get_selected_units): New function.
	(do_wake, do_wake_all): Comment out.
	* tkcmd.c (get_selected_units): New function.
	(do_wake, do_wake_all): Remove.
	* ccmd.c (get_selected_units): New function.
	(do_wake, do_wake_all): Remove.
	(do_fire): Use view objects.

	* cconq.c, cconq.h (draw_cover): New global.
	(init_display): Add space for indep side.
	* cdraw.c (draw_terrain_row): Blank second char of cell to
	show lack of view coverage.
	(show_closeup): Fix test of which unit to display.
	(show_side_list): Handle player-less sides.

2000-08-10  Stan Shebs  <shebs@shebs.cnchost.com>

	* nlang.c (notify_doctrine_1): Mention doctrine lock.

	* unit.h (UnitView size, date): New fields.
	* side.h (view_size): New macro.
	* plan.c (victim_here, target_here): Use view size.
	* side.c (side_sees_unit, side_sees_image): Return true if
	side->show_all.
	(add_unit_view): Fill in view of unit size.

	* config.h (INITMAXUTYPES, etc): Remove, never used.
	* game.h (for_all_possible_unit_types, etc): Ditto.
	* help.c (u_histogram, t_histogram, etc): New globals.
	(u_property_desc, t_property_desc, uu_table_row_desc, etc): Use as
	dynalloced space instead of fixed-size arrays.
	* unit.h (Unit uihook): Remove, never used.
	* ui.h (VP aux_terrain_types): Remove, made into global.
	(VP draw_aux_terrain): Make into a pointer.
	(VP newest_to_show, fade_terrain, lowest_altitude,
	highest_altitude): Remove, never used.
	* ui.c (new_vp): Allocate vp->draw_aux_terrain.
	* world.c (aux_terrain_type_index): New global.
	(count_terrain_subtypes): Alloc and fill in.

	* macmap.c (create_map): Remove set of vp->aux_terrain_types.
	* macmenus.c (do_menu_command): Use aux_terrain_type_index to
	set terrain type submenu.

	* tkmap.c (Map aux_terrain_types): Remove, never used.

2000-08-10  Hans Ronne <hronne@2.sbbs.se>

	Fix Mac drawing so that it works with non-white transparent
	gif colors.
	* macdraw.c (draw_unit_image): Use CopyMask with cicns.
 	(draw_side_emblem): Ditto.
 	
 	Fix iplayer capture-your-home-city-again-and-again buzzing.
 	* plan.c (indep_captureable_here): Return false for indepside.

	Speed up plan_offense execution 50-fold.
 	* plan.c (plan_offense): Limit search for new victims to within
 	twice the unit's tactical range.
 	
2000-08-08  Stan Shebs  <shebs@shebs.cnchost.com>

	* cmdline.c (set_players_from_options): Add indepside player
	only if needed for game.
	* init.c (indepside_needed): Make extern.
	* nlang.c (tooling_desc): New function.
	(notify_doctrine): List contents of all doctrines.
	(notify_doctrine_1): List construction run lengths.
	* plan.c (est_completion_time): Move to here from nlang.c.
	* read.c (read_default_doctrine): Rename from read_general_doctrine,
	don't try to handle property values here.
	(read_utype_doctrine): Similarly.
	(utype_from_name): Handle empty strings.
	* read2.c (interp_utype_list): Move to here from unit.c.
	* side.h (Side numlive): Remove field, never used.
	(for_all_doctrines): New macro.
	* side.c (init_sides): Set next_doctrine_id to 1, so save/restore
	doesn't get confused.
	(create_side): Don't alloc space for numlive.
	(become_designer): Don't enable may_set_show_all if see_all.
	(cover_area): Test side->see_all instead of g_see_all.
	(new_doctrine): Ensure new doctrine has unique id.
	(clone_doctrine): Comment out, never used.
	* unit.c (set_unit_side): Remove adjust of numlive.
	(find_unit_name): Remove, unused and useless.
	(num_occupants, num_units_at, get_x_property_by_name): Comment
	out, never used.
	* write.c: Cosmetic improvements.
	* conq.h, unit.h: Update to reflect movements.

	* tkconq.tcl (create_map_window): Add a line to unitinfo, rename
	last line of second column from "s3" to "aux0".
	* tkmain.c (draw_unit_info): Share aux0 between supply (if needed)
	and tooling.
	(update_unit_acp_display): Call update_unit_display.
	* tkmap.c (draw_unit): Remove redundant show_all test.
	(draw_current): Handle show_all case.

	* cconq.c (update_unit_acp_display): Call update_unit_display.
	* cdraw.c: Cosmetic improvements.

2000-08-03  Stan Shebs  <shebs@shebs.cnchost.com>

	* tkmap.c (draw_terrain_iso): Call cell_drawing_info here
	instead of in draw_map_isometric, add overlay shading, call
	draw_borders_iso.
	(draw_borders_iso): New function.
	(draw_people, draw_country_border_line): Adjust for isometric case.

	* PROJECTS: Add some new ideas.

2000-08-01  Stan Shebs  <shebs@shebs.cnchost.com>

	Use a hash table for unit views.
	* side.h (Side unit_views): Declare as pointer to pointer.
	* side.c (VIEW_HASH_SIZE): New macro.
	(init_view): Allocate hash table.
	(unit_view_at, add_unit_view, remove_unit_view): Use hash table.
	(add_unit_view_raw): New function.
	* read.c (interp_unit_views): Call it.
	* write.c (write_side_view): Iterate over area to find unit views.

	* ui.c (xform_cell_flat): Comment out error test, fix some
	isometric formulas.
	(nearest_cell): Similarly.
	(nearest_unit_view, find_unit_view_at): Fix handling of
	wrapping areas.
	(calc_view_misc): Ditto for isometric viewports.

	* tkmap.c (draw_area_background): Rewrite to handle overhead
	and isometric views uniformly.
	(draw_map_isometric): Rewrite to simplify, make solid color
	terrain drawing work again.
	(draw_map_outline): Draw outline off-area.

	* help.c, util.c, ui.c (error_is_bug): Remove, never used.

2000-07-31  Stan Shebs  <shebs@shebs.cnchost.com>

	First cut at isometric terrain images, and other isometric work.
	* ui.c (ibsx, ibsy): Fill in correct values.
	(nearest_unit_view): Fix debug code.
	* ui.h (ibsx, ibsy): Declare.

	* tkmap.c (MapW last_wsx, etc): Change into array.
	(MapW last_ws_valid): New field.
	(xform_top): New function.
	(draw_map_isometric): Pad with one more row.
	(draw_cliff): New function, was cliff-drawing in draw_terrain_iso.
	(draw_terrain_iso): Call it, plus add terrain image drawing.
	(draw_current, draw_unit_blast): Add isometric case.
	(draw_map_outline): Rewrite to handle overhead and isometric
	cases similarly.
	(update_at_cell, update_at_unit): Adjust for isometric case.

	* stdt48x33i.gif: New file, isometric images for standard terrain.
	* terrain.imf: Use it.

2000-07-30  Hans Ronne <hronne@2.sbbs.se>

	Speed improvements of some cpu hogs detected during
	profiling.
	
	* actions.c (use_up_acp): Call update_unit_acp_display
	instead of update_unit_display.
	* mplayer.c (review_theaters): Call compute_theater_bounds
	only once, when the theaters first are created.
	* run.c (run_advanced_units): Comment out see_exact call.
	* advances.g (vision-range): Set to 2 for cities.

2000-07-30  Hans Ronne <hronne@2.sbbs.se>

	* run.c (has_advance_to_build): Fix crashing bug.
	(has_advance_to_research): Ditto.

2000-07-30  Hans Ronne <hronne@2.sbbs.se>

	Make it a game option to turn off automatic resignation of ais.
	
	* gvar.def (g_ai_may_resign): New gvar.
	* mplayer.c (review_goals): Only consider resignation if allowed.
	* advances.g (ai-may-resign): Set it to false.
	
	Cache available unit types and advances for speed.

	* conq.h (update_canbuild_vector): New prototype.
	(update_canresearch_vector): New prototype.
	* run.c (has_advance_to_research): Rewrite.
	(has_advance_to_build): Move here and rewrite.
	(update_canbuild_vector): New function.
	(update_canresearch_vector): New function.
	(run_research): Call update_canbuild_vector.
	(run_research): Call update_canresearch_vector.
	* run2.c (run_side_research):  Call update_canbuild_vector.
	(run_side_research):  Call update_canresearch_vector.
	* side.c (create_side): Allocate canbuild and canresearch vectors.
	(create_side): Call update_canbuild_vector.
	(create_side): Call update_canresearch_vector.
	* side.h (side->canbuild, side->canresearch): New vectors.
	* unit.c (has_advance_to_build): Move to run.c.

2000-07-29  Hans Ronne <hronne@2.sbbs.se>

	Add clickable transport images to unit closeups. Make behaviour
	of closeup windows more Finder-like.
	
	Clean up and simplify event processing. Remove all special code in 
	event_loop that uses the Dialog Manager for modeless dialogs. Handle 
	all events in handle_event instead. Add code to do stuff previously
	done by Dialog Manager to functions called by handle_event.

	* macconq.c (event_loop): Clean up and simplify. Remove special
	code for modeless dialogs. Remove commented out code.
	(handle_event): Reenable call to handle_keystroke.
	(handle_keystroke): Pass mods and char code to do_key_down_closeup.
	(handle_keystroke): Call to do_key_down_setup.
	(handle_keystroke): Remove Dialog Manager-related code. Declare void.
	(do_mouse_down): Call do_mouse_down_research for researchwin.
	(do_mouse_down): Call do_mouse_down_setup for playersetupwin.
	* macconq.h (do_mouse_down_research): New prototype. 
	(hit_closeup_dialog): Move prototype to macunit.c.
	(do_key_down_closeup): Add mods and char code as new arguments.
	(do_mouse_down_setup): New prototype.
	(handle_player_setup_event): Rename to do_key_down_setup.
	* macdefs.h (dCity): Fix some bugs. Add three new dialog items.
	* macinit.c (do_mouse_down_setup): New function.
	(handle_player_setup_event): Rename to do_key_down_setup.
	(do_key_down_setup): Remove case kHighLevelEvent.
	* macunit.c (create_unit_closeup): Tweak simple closeup position.
	(set_simple_closeup_size): Add space for transport image.
	(draw_simple_closeup): Add clickable transport image.
	(draw_closeup_content): Rename to draw_advanced_content.
	(draw_advanced_content): Add clickable transport image.
	(do_mouse_down_unit_closeup): Handle clicks on transport image.
	(do_key_down_closeup): Receive mods and char code as new arguments.
	(do_key_down_closeup): Pass modifiers to hit_closeup_dialog.
	(do_key_down_closeup): Close old closeup unless ctrl-clicking.
	(do_key_down_closeup): Remove Dialog Manger-related code.
	(do_key_down_closeup): Handle TE field no longer handled by Dialog Manager.
	(hit_closeup_dialog): Handle clicks on transport image.
	(hit_closeup_dialog): Receive modifiers as new argument.
	(hit_closeup_dialog): Track menus no longer handled by Dialog Manager.
	* macwins.c(do_mouse_down_research): New function.
	(hit_research_dialog): Track menu no longer handled by Dialog Manager.
	* XconqProj.rsrc (DITL 803 "Advanced Closeup"): Add three new dialog items.
	* Xconq.r: Update from XconqProj.rsrc.

2000-07-26  Hans Ronne <hronne@2.sbbs.se>

	* macconq.c (adjust_cursor): Test if scrolling is possible before autoscrolling.
	* macdraw.c (draw_unit_image): Fix typo in first draw_unit_mask call.

2000-07-26  Stan Shebs  <shebs@shebs.cnchost.com>

	* ui.c (ibsx, ibsy, ilsx, ilsy): New global arrays.
	(xform_cell_top): New function, produces position of top of
	thick terrain.
	(xform_cell_flat): Fix isometric viewing in a couple dirs.
	(nearest_cell): Add correct formulas for all iso directions.
	(center_on_focus): Add isometric case.
	(set_view_isometric): New function.
	(set_view_direction): Call calc_view_misc.
	(calc_view_misc): Size viewport correctly for iso display.
	* ui.h (set_view_isometric): Declare.

	* tkconq.tcl (isometric_state): Remove, no longer needed.
	(fill_in_button_box): Enable isometric controls.
	(set_isometric, set_iso_dir): New procs.
	(add_show_all_item): Fix argument.
	* tkconq.h (update_contour_intervals): Declare.
	* tkcmd.c (do_map): Remove plan-tweaking commands, rewrite
	isometric subcommand cases to use tcl procs.
	(do_set_view_angle): Ditto.
	* tkmap.c (MapW isometric, isodir, vertscale): New fields.
	(config_specs): Add config args for isometric display.
	(mapw_configure): Set isometric flag and view dir.
	(draw_map_isometric): Rewrite to draw only visible cells.
	(draw_connections_iso): New function.
	(draw_terrain_iso): Call it.
	(draw_map_outline): Add isometric case.

2000-07-24  Hans Ronne <hronne@2.sbbs.se>

	Fix compilation problems on the Mac and segfaults under Unix.
	* side.c (standing_order_desc): Declare args arg as int.
	* world.c (allocate_area_users): Declare area.user as int, use
	sizeof(int).
	* kernel.h (set_edge_terrain): Prototype it.

2000-07-23  Stan Shebs  <shebs@shebs.cnchost.com>

	Increase unit ids to 32 bits in size.
	* unit.h (Unit id): Declare as int instead of short.
	(UnitView id): Ditto.
	(Action actee, args): Ditto.
	(Task args): Ditto.
	* history.h (HistEvent data): Ditto.
	(PastUnit id): Ditto.
	* world.h (Area user): Ditto.
	* tkconq.h (Map curunit_id, argunitid): Ditto.
	* xtconq.h (Map argunitid): Ditto.
	* plan.c (make_plausible_random_args): Declare args arg as int.
	* task.c (do_approach_subtask): Declare statep arg as int.
	* unit.c (create_unit): Add note about id overflow.

	* score.c (inactive_indepside): New macro, tests whether
	indepside is a participant in the game.
	(eval_sk_last_side_wins, eval_sk_last_alliance_wins): Use it,
	also fix to test consistently in all cases.

2000-07-18  Stan Shebs  <shebs@shebs.cnchost.com>

	* ui.h (VP contour_interval_fixed): New field.
	* ui.c (new_vp): Call set_contour_interval instead of setting
	values directly.
	(set_contour_interval): Rewrite to handle computed and explicit
	contour intervals.
	(contour_lines_at): Don't draw 0-length contour lines.
	* world.c (fix_elevations): Mention new elevation range.

	* tkconq.tcl (create_map_menus): Add contour interval menu item.
	(popup_contour_interval_dialog, ok_contour_interval): New procs.
	(popup_meridian_interval_dialog): Add a label, make cancellation
	work.
	* tkcmd.c (do_map): Add contour-interval subcommmand.
	(do_refresh): Update contour intervals.
	* tkmain.c (tk_designer_fix): Update contour intervals and
	redraw maps if elevation range changed.
	* tkmap.c (update_contour_intervals): New function, recomputes
	contour intervals if necessary.
	(handle_designer_mouse_down): Call it.

	* xcmd.c: Remove redundant decl of set_contour_interval.

2000-07-14  Stan Shebs  <shebs@shebs.cnchost.com>

	* kernel/Makefile.in, tcltk/Makefile.in: Add dependencies on
	kernel.h and kpublic.h.

	* world.c, kernel.h (paint_elevation): Add code (set vs modify)
	and random variation args.
	(fix_elevations): New function.
	* tp.c, kpublic.h (net_paint_elevation): Similarly.
	(broadcast_layer_change): Add an argument.
	(receive_world_prop): Handle extra argument in packet.
	* mkterr.c (set_edge_terrrain): New function, generalizes
	add_edge_terrain to control mods of edge terrain.
	(set_edge_elevation): New function, split out from set_edge_values.

	* macdesign.c (apply_designer_tool, paint_on_drag): Fix usages
	of net_paint_elevation.
	
	* tkconq.h (UI curelevationcode, curelevationvary): New fields.
	* tkconq.tcl (popup_design_palette): Add close button.
	(make_elev_paint_frame): Rewrite to support random vary and
	elevation fixing, plus give better feedback.
	(set_elevation, etc): Pass additional random vary arg.
	(dbg_set_design_data): Update elevation painting feedback.
	* tkmain.c (tk_designer_fix): New tcl command.
	(tk_set_design_data): Handle random vary value.
	* tkmap.c (paint_elev_code, paint_elev_vary): New globals.
	(handle_designer_mouse_down): Set them, call net_paint_elevation
	with new args.
	(paint_on_drag): Similarly.

	* move.c (carryable): Simplify.
	* ui.c (advance_into_cell): Fail for non-mobile units.
	* tkmap.c (move_the_selected_unit): Beep if advance_into_cell
	fails.

	* PROJECTS: Reflect above projects.

2000-07-12  Stan Shebs  <shebs@shebs.cnchost.com>

	* side.c (add_unit_view): Add views in id order.
	* ui.c (find_unit_or_occ_view, find_unit_view_at): New functions.
	(xform_unit_view): Don't count views of occupants.
	* ui.c, ui.h (xform_unit_self_view): New function.
	* ui.h (nearest_unit_view): Declare.

	* tkinit.c, tkconq.h (any_resources): New global.
	(init_display): Compute it.
	* tkmain.c: Remove decl of nearest_unit_view.
	* tkmap.c (x_xform_unit_self_view): New function.
	(draw_row): Test any_resources.
	(draw_units): Don't subdivide views at low mags.
	(draw_current): Test any_resources, call x_xform_unit_self_view
	to get correct position of current unit, minor cleanups.

	* PROJECTS: Reflect recent work, add item about needing
	more immediate responses to user input.

	* README, xconq.spec, doc/xconq.texi: Change site refs from
	sourceware.cygnus.com to sources.redhat.com.

2000-07-11  Stan Shebs  <shebs@shebs.cnchost.com>

	* nlang.c (apparent_unit_handle): Fix wording for indeps.
	* task.c (do_move_to_task): Rewrite destination handling to try
	normal move always, and to not attack automatically.

	* tkmain.c (update_mouseover): Fix mode tweaking.

	* flags.imf, imf.dir (flag-china-old): New image, Republican China
	flag.
	(flag-japan-naval): Rename from flag-japan-2.
	(flag-ussr): Fix mask.
	* flattop.g: Use Japanese naval flag.
	* ww2-adv.g, ww2-eur-42.g, ww2-sides.g: Use Republican China
	flag, Soviet flag instead of star.

2000-07-08  Stan Shebs  <shebs@shebs.cnchost.com>

	* tkconq.tcl (set_indepside): Skip over for network games.

	* combat.c: Tweak formatting.
	* plan.c (victim_here): Loop over unit views, comment out
	test of unit size since it looks at unit directly.
	(victim_x, victim_y, victim_rating, etc): Rename from victimx etc.
	(target_here): Loop over unit views.
	(target_x, target_y, target_rating, etc): Rename from targetx etc.
	* iplayer.c (iplayer_go_after_victim, iplayer_fire_at_opportunity,
	enemy_close_by): Declare victim_rating etc in scope of functions.
	* mplayer.c: Ditto.
	* task.c (do_hit_unit_task): Add notes about views.
	* ui.c (find_unit_or_occ_view, find_unit_view_at,
	nearest_unit_view): New functions.
	(oneliner): Call nearest_unit_view, test for unit views instead
	of units_visible.
	(dump_text_view): Similarly.

	* tkmain.c (update_mouseover): Use unit views to decide whether
	cursor is over an attackable unit.
	* tkmap.c (draw_units): Almost always use unit views (exception is
	vp->show_all).

	* africa-1850.g: Remove recorded unit-view layer.
	* gettysburg.g (thickness): Set thickness of towns to be 20 feet
	(two-story buildings).
	(vision-night-effect): Set so that only adjacent units visible at
	night.
	(see_chance, see_chance-adjacent): Set so that adjacent units
	always visible, but more-distant units can hide in the terrain.
	(visibility): Add a 25% chance to see units in woods.
	* russian-rev.g: Use railroad image for railway terrain.

	* all.g: Update to match current GDL better.

2000-07-05  Stan Shebs  <shebs@shebs.cnchost.com>

	* run2.c, conq.h (area_lighting): New global.
	(daynight): Change to int.
	* keyword.def (unit-views): New keyword, replaces unit-view.
	* table.def (see-chance, etc): Remove upper bounds on values.
	* read.c (interp_unit_views): New function.
	(fill_in_side): Call it.
	* run2.c (compute_season): Add day/night note to curdatestr.
	(run_sun): Recognize when area's lighting is uniform, tell
	users about rising and setting of sun, also recompute cover.
	* side.c (suppress_see_cell): New global.
	(cover_area_1): Use it to skip see_cell calls sometimes.
	(reset_coverage): Set it.
	(calc_coverage): Simplify, account for controlled sides.
	(see_cell): Rewrite see-chance handling.
	(test_for_successful_viewer): Rename from test_for_viewer.
	(test_for_possible_viewer): Rename from test_for_mistaken_viewer.
	* write.c (write_side_view): Use new keyword.

	* macconq.h, macwins.c: Remove a couple redundant decls.

	* tkcmd.c (do_survey): Allow after end of game.
	* tkconq.tcl (adjust_windows_menu): New proc.
	(create_map_menus): Call it.
	(adjust_file_menu): Disable Save As after end of game.
	(popup_run_warning_dialog): Call reset_popup_flag.
	* tkmain.c (update_mouseover): Don't tinker with cursor while
	player is designing.

	* PROJECTS: Reflect above work, plus deprecate side_number.
	* design.texi: Fix mistakes in tutorial example.
	* xconq.texi: Fix braino in intro game walkthrough (thanks to Alan
	Schmitt).

2000-07-04  Stan Shebs  <shebs@shebs.cnchost.com>

	* side.c, kernel.h (set_mutual_trust): Remove, not used and not
	useful (set_trust is always sufficient).
	* tp.c, kpublic.h (net_set_mutual_trust): Ditto.
	(receive_side_prop): Remove "mutualtrust" packet.

2000-07-04  Keir Novik  <K.E.Novik@qmw.ac.uk>

	Added xshowimf to x11/.cvsignore, and the results of "make info"
	to doc/.cvsignore.

2000-07-03  Stan Shebs  <shebs@shebs.cnchost.com>

	Change unit viewing to use view objects instead of a layer.
	* unit.h (UnitView): New struct.
	* side.h (Side unitview, unitviewdate): Remove.
	(Side unit_views): New field.
	(for_all_view_stack): New macro.
	(unit_view, set_unit_view, builduview, vside, vtype, vhp, EMPTY,
	appears_empty, vside_indep, unit_view_date, set_unit_view_date):
	Remove, no longer used.
	* config.h (MAXVIEWHISTORY): Remove, no longer used.
	* side.c (init_view): Remove unit view layer init.
	(unit_view_at, unit_view_next, add_unit_view, remove_unit_view,
	mistake_view): New functions.
	(fn_set_unit_view, fn_set_unit_view_date): Remove.
	(side_sees_image, all_see_leave, reset_all_views,
	react_to_seen_unit, see_cell, see_exact, paint_view_1): Rewrite to
	use view objects.
	* ai.c (enemies_present): Ditto.
	* iplayer.c (preferred_build_type): Ditto.
	* mkroads.c (unit_sees_other_unit): Ditto.
	* mplayer.c (review_theaters, estimate_strengths,
	preferred_build_type): Ditto.
	* plan.c (alternate_target_here, victim_here, target_here,
	indep_captureable_here, useful_captureable_here,
	can_capture_neighbor): Ditto.
	* ps.c (sideno_of_seen_unit_at): Ditto.
	* run2.c (unit_revolt, visible_to): Ditto.
	* task.c (target_visible): Ditto.
	* ui.c (oneliner, dump_text_view
	* cdraw.c (draw_units, draw_legend, show_closeup): Ditto.
	* xdraw.c (draw_map_info, etc): Ditto.
	* macdesign.c (apply_designer_tool): Ditto.
	* macrow.c (draw_units): Ditto.
	* tkmain.c (update_mouseover): Ditto.
	* tkmap.c (draw_units, handle_designer_mouse_down): Ditto.
	(x_xform_unit_view): New function.

	* init.c (init_all_views): Fold in init_view_2, comment out
	unit view clearing.
	* plan.c (threat, usable_cell): Comment out, not used apparently.
	* read.c (fill_in_side): Comment out unit view reading.
	* ui.c, ui.h (xform_unit_view_: New function.
	(utype_seen_at): Comment out unit view case.
	* write.c (fn_unit_view, fn_unit_view_date): Remove.
	(write_side_view): Write unit view list instead of layer.

	* cmdline.h (make_default_player_spec): Move decl to here
	from cmdline.c.
	* skelconq.c, wconq.c, xconq.c, xtconq.c, xtmain.c: Remove decls
	that are in cmdline.h.
	* tkmain.c: Ditto, and include cmdline.h.
	* cconq.c (make_default_player_spec): New function.
	
	* tkmain.c (tk_reset_popup_flag): New tcl command.

	* nlang.c (medium_long_unit_handle): Remove unused local.

2000-06-30  Jim Kingdon  <kingdon@redhat.com>

	* Add .cvsignore files to all directories.

2000-06-25  Hans Ronne <hronne@2.sbbs.se>

	Enable direct click action in non-front closeup windows.
	* macconq.c (handle_event): Permit direct clicks in non-top dialogs.
	(adjust_cursor): Make work around for Appearance Manager bug handle 
	also non-front dialogs.
	* macunit.c (create_unit_closeup): Make sure it stays within the
	main screen.
	(draw_unit_closeup): Comment out update_cell_display call.
	(do_mouse_down_unit_closeup): Call hit_closeup_dialog if a ditem
	was hit.

2000-06-24  Hans Ronne <hronne@2.sbbs.se>

	Fix some more drawing problems for big icons on the mac.
	* macdraw.c (draw_unit_name): Add 1 pixel to sy offset.
	(draw_terrain_sample): Use power 5.
	(draw_legend_text): Handle all sh values correctly.
	* machelp.c (create_help_window): Accomodate big icons.
	(draw_help): Accomodate big icons.
	* macmap.c (draw_selected_unit): Handle big icons correctly.
	(update_cell): Don't draw names for occupants.
	(draw_unit_names_only): Simplify code and test for big icons.
	* macrow.c (draw_units): Use occupants_visible instead.
	(draw_unit_and_occs): Simplify draw_unit_name calls.
	(draw_unit_and_occs): Don't draw names for occupants.
	* macunit.c (draw_unit_size): Handle all sh values correctly.
	
	Add clickable selection of occupants within unit closeups.
	* conq.h (medium_long_unit_handle): New prototype.
	* nlang.c (medium_long_unit_handle): New function.
	* macconq.h (preferred_closeup_size): Remove protoype.
	* macmap.c (draw_selected_unit): Tweak unit size drawing.
	* macmouse.c (select_exactly_one_unit): Comment out selection check.
	* macunit.c (m_per_row): Change to 3 to agree with supply_desc.
	(show_unit_closeup): Select unit and make it current if possible.
	(create_unit_closeup): Call set_simple_closeup_size.
	(create_unit_closeup): Get window title from medium_long_unit_handle.
	(preferred_closeup_size): Rewritten to set_simple_closeup_size.
	(set_simple_closeup_size): New function and prototype.
	(draw_simple_closeup): Call set_simple_closeup_size each time.
	(draw_simple_closeup): Skip stuff already in window title.
	(draw_simple_closeup): Tweak it for big icons.
	(do_mouse_down_unit_closeup): Handle clicks in occupants.
	(do_mouse_down_unit_closeup): Call show_unit_closeup.
	* XconqProj.rsrc (DITL 810 "Simple Closeup"): Move buttons.
	(DITL 803 "Advanced Closeup"): Resize diCityIcon for big icons.
	* Xconq.r: Update from XconqProj.rsrc.
	
2000-06-21  Hans Ronne <hronne@2.sbbs.se>

	Prepare the ground for using big icons.
	* gvar.def (g_bigicons): New gvar.
	* imf.c (add_shrunken_image): Don't disable for synthetic images.
	* maccolors.c (dkgraycolor & ltgraycolor): Init new globals.
	* macconq.h (dkgraycolor & ltgraycolor): Declare new globals.
	* macdefs.h (diCityFacPanel): Change to 99.
	(diCityOccPanel): Change to 100.
	* macdraw.c (draw_unit_image): Remove black outline of selection mask.
	(draw_unit_image): Make sure the emblem stays within the cell.
	(draw_unit_mask): Save and restore colors.
	(draw_unit_mask_and_shadow): New function and prototype.
	(draw_unit_shadow): New function and prototype.
	(draw_unit_shadow_layer): New function and prototype.
	(draw_unit_blast): Use InvertRect for blasts only if sw < 8.
	* macmap.c (draw_unit_blast): Make sure the blast stays within the
	cell.
	* macrow.c (draw_units): Tweak grouping box size.
	(draw_units): Don't use grouping boxes with big icons.
	(draw_unit_and_occs): Don't use grouping boxes with big icons.
	(draw_unit_and_occs): Tweak unit name and size drawing.
	* macunit.c (create_unit_closeup): Handle closeups opened from
	within closeups.
	(draw_closeup_content): Simplify garrison loop.
	(hit_closeup_dialog): Support clicking on occupants.
	* ui.c (xform_unit): Tweak unit positions if using big icons.
	(xform_occupant): Skip transformation if using big icons.
	(find_unit_or_occ): Skip occs if using big icons.
	* XconqProj.rsrc (DITL 803 "Advanced Closeup"): Tweak user item boxes.
	* Xconq.r: Update from XconqProj.rsrc.

	Fix some problems with IMFApp.
	* gif.c (get_gif): Don't use unix path names on the mac.
	(get_gif): Don't add library paths to sibling directory path.
	* imfapp.c (open_imf_dir_file): Call open_file instead of fopen.
	(save_imf_file): Call open_file instead of fopen.

2000-06-20  Stan Shebs  <shebs@shebs.cnchost.com>

	* config.h: Remove ANSI_PROTOTYPES and __STDC__ conditionals.
	* misc.h (PARAMS): Remove decl.
	* obstack.h, obstack.c: Remove uses of PARAMS and ANSI_PROTOTYPES.
	* macinit.c, macmenus.c, macmouse.c: Ditto.
	* xcmd.c, xdesign.c, xhelp.c, ximf.c, xinit.c, xprint.c, xtmain.c:
	Ditto.

	* iplayer.c, mkrivers.c, mplayer.c, run.c, util.c, write.c: Remove
	some redundant function decls.
	* macwins.c: Ditto.
	* tkimf.c: Remove unused decl.

2000-06-19  Stan Shebs  <shebs@shebs.cnchost.com>

	* NEWS: Update.

	* INSTALL: Add info about handling tcl/tk libs.
	* x11/Makefile.in: Use TCL_LIB_SPEC and TK_LIB_SPEC instead of
	TCL_BUILD_LIB_SPEC and TK_BUILD_LIB_SPEC.

	* INSTALL-mac, README-mac: Update.

	* macconq.h (GETKEYS_ARG_TYPE): Define.
	* macgworld.c, macmenus.c: Use in GetKeys calls.

	* macdraw.c (draw_side_emblem): Use PlotCIcon with 2-color images.

2000-06-17  Stan Shebs  <shebs@shebs.cnchost.com>

	* version.h: Bump to 7.4pre.

2000-06-17  Hans Ronne <hronne@2.sbbs.se>

	Fix loading of emblem images from saved games.
	* imf.c (get_generic_images): Check that the image location has
	been loaded.
	* ui.c (get_emblem_images): Set default emblem names correctly.

2000-06-16  Hans Ronne <hronne@2.sbbs.se>

	* macconq.c (adjust_cursor): Fix autoscrolling for the worldmap.
	* macmap.c (create_map): Limit size of worldmap to 1/4 of the screen.
	* advterr.g: Add 1x1 tiles for advt colors.

2000-06-16  Stan Shebs  <shebs@shebs.cnchost.com>

	* Xconq.r: Change all returns to newlines.

2000-06-15  Hans Ronne <hronne@2.sbbs.se>

	* macgworld.c (update_resized_map): Fix gworld size bug for big maps.

2000-06-15  Hans Ronne <hronne@2.sbbs.se>

	* macgworld.c (update_gworld): Fix gworld size bug for big maps.
	* Xconq.r: Restore correct version number.

2000-06-15  Hans Ronne <hronne@2.sbbs.se>

	Fix some more glitches in the mac interface.
	* macconq.c (adjust_cursor): Remove debugging beep calls.
	* macdefs.h (diVariantsIndepsAI): Remove.
	(diVariantsIndepsBuild): Remove.
	(diVariantsIndepsResearch): Remove.
	(diVariantsIndepsTreasury): Remove.
	(diVariantsFirstCheckBox): Change to 10.
	* macinit.c (MAXCHECKBOXES): Change to 10.
	(variants_dialog): Remove indepside variants.
	* XconqProj.rsrc (DITL 131 "Variant Items"): Remove indepside text.
	* Xconq.r: Update from XconqProj.rsrc.

2000-06-15  Stan Shebs  <shebs@shebs.cnchost.com>

	* version.h: Bump to 7.3.2.

	* xconq.spec: Update version.
	* Xconq.r, IMFApp.r: Update version resources.
	* NEWS: Update.

	* search.g, t3.g: Fix syntax.
	* test-save.sh: Fix pathnames.
	* test-run.sh, test-test.sh: Fix use of -L.

2000-06-15  Hans Ronne <hronne@2.sbbs.se>

	* advt32x32.gif: New terrain image file.
	* advt24x26.gif: New terrain image file.
	* advt44x48.gif: New terrain image file.
	* advterr.g: Use the new terrain images.
	
	* init.c (set_ai_for_player): Fix NULL player crashes.

2000-06-14  Stan Shebs  <shebs@shebs.cnchost.com>

	* version.h: Bump to 7.3.1.

	* xconq.spec: Update version.
	* Xconq.r, IMFApp.r: Update version resources.
	* NEWS: Update.

	* init.c (set_ai_for_player): Allow any empty string.
	* tkconq.tcl (add_player_dialog_items): Split indepside button
	into one to add/remove, another to configure.
	(set_indepside): New proc.
	(popup_indepside_config): Rename from popup_indepside, limit to
	config of indepside options.
	(cancel_indepside): New proc.
	* tkinit.c (init_display): Remove indepside settings, too late
	to have any effect here.
	* tkmain.c (tk_launch_game): Do it here instead.

2000-06-13  Stan Shebs  <shebs@shebs.cnchost.com>

	* configure.in: Add --enable-alternate-scoresdir.
	* configure: Regenerate
	* Makefile.in (scoresdir): Get from configure.
	* INSTALL: Mention new configure option.

	* score.c (eval_sk_last_side_wins, eval_sk_last_alliance_wins):
	Let indepside win if played by AI.

	* macconq.h: Include kpublic.h here...
	* maccmd.c, maccolors.c, macconq.c, macconq.h, macdesign.c,
	macgworld.c, macmenus.c, macmouse.c, macprefs.c, macunit.c,
	macwins.c: ...instead of here.
	* Xconq.r: Tweak version resources.
	* IMFApp.r: Update from current resource file.

	* README: Rewrite to describe Xconq better.
	* xconq.spec: Update.

2000-06-11  Stan Shebs  <shebs@shebs.cnchost.com>

	* config.guess, config.sub: Update to versions dated
	2000-05-30 and 2000-06-10, respectively.

2000-06-09  Stan Shebs  <shebs@shebs.cnchost.com>

	* version.h: Bump to 7.3.0.

	* README: Update to 7.3, improve some phrasing.
	* xconq.spec: Update versions and paths.
	* Xconq.r, IMFApp.r: Update version resources.

	Fix Unix installation issues, make consistent with FHS 2.1.
	* Makefile.in (datadir): Set to $(prefix)/share/xconq.
	(scoresdir): Set to /var/lib/xconq/scores, pass down to sub-makes.
	* kernel/Makefile.in (ALL_CFLAGS): Define XCONQSCORES.
	* unix.c (score_file_pathname): Use value of XCONQSCORES verbatim.
	* */Makefile.in (datadir): Set to $(prefix)/share/xconq.
	* curses/Imakefile (DEFINES): Don't define XCONQDATA.
	* tcltk/Makefile.in (ALL_CFLAGS): Ditto.
	* images/Makefile.in (imagesdir): Rename from gameimdir, set
	to $(datadir)/images.
	* x11/Makefile.in (install-only): Install ximfapp instead of
	xshowimf.
	(clean): Be more thorough.
	* NEWS: Mention pathname changes.

	* init.c: Cosmetic improvements.
	* score.c (record_into_scorefile): Skip player-less sides.
	* ximfapp.c: Eliminate compile warnings.

	* INSTALL: Clarify tcl/tk steps, fix path refs.
	* cconq.6in, cmdline.6in, xconq.6in, xtconq.6in: Update
	pathnames, describe environment vars.

2000-06-08  Stan Shebs  <shebs@shebs.cnchost.com>

	* NEWS: Update.
	* INSTALL: Add some clarifications.
	* INSTALL-mac: Update.
	* cconq.6in, skelconq.6in, xconq.6in, xtconq.6in: Update
	file names and doc names.
	* gdlref.texi, hacking.texi, playref.texi, xcdesign.texi,
	xconq.texi: Update dates and subtitle.
	* xconq.texi: Mention contributors, add doc for new setup
	dialog options.

	* ai.c, goal.def, module.c, tp.c: Fix dates.

	* PROJECTS: Mention need for a command option for indepsides.

2000-06-05  Stan Shebs  <shebs@shebs.cnchost.com>

	* tkconq.tcl (handle_key_binding): Handle unusual window paths
	that sometimes get passed in.

	* advances.g, anc-near-east.g: Change indepside variants into
	variable settings.

2000-06-04  Stan Shebs  <shebs@shebs.cnchost.com>

	More rewriting of variant handling and player setup.
	* keyword.def (indepside-has-ai, indepside-can-build,
	indepside-can-research, indepside-has-treasury): Comment out,
	will no longer define as variants.
	* ai.c, ai.h (next_ai_type_name): Rename from next_ai_type.
	(find_ai_type): New function.
	* cmdline.c (unixify_variant_name): Remove.
	(game_usage_info): Use variant ids as argument names.
	* kernel.h (set_ai_for_player, etc): Move here from conq.h.
	* init.c (make_up_a_side): Remove set of ingame, redundant.
	(set_ai_for_player): Warn about invalid AI types.
	* iplayer.c, mplayer.c: Remove decls now in ai.h.
	* kpublic.h: Rearrange some decls.
	* module.c (do_one_variant): Remove indepside variants.
	* read.c (force_all_variants): New global.
	(add_std_var): New function.
	(interp_variant_defns): Rewrite to use it for all variant
	setup.
	(add_more_variants): Remove, no longer needed.
	(interp_game_module): Call interp_variant_defns.
	* run.c (init_movement): Simplify code.
	* score.c (eval_sk_last_side_wins, eval_sk_last_alliance_wins):
	Don't require indepside to lose.
	(record_into_scorefile): Use a switch statement for variants.
	(score_variant_desc): Remove indepside variants.

	* macinit.c (interpret_variants, implement_variants): Remove
	indepside variants.
	(hit_player_setup_dialog): Use net_exchange_players.

	* tkconq.tcl (add_variants_dialog_items): Wrap help text by
	words.
	(add_player_dialog_items): Always create indepside entry but
	conditionalize packing, add indepside button, improve test of
	random/sidelib name button enabling.
	(popup_indepside, ok_indepside): New procs.
	* tkinit.c (init_display): Seed indepside globals.
	* tkmain.c (tk_set_indepside_options): New tcl command.
	(tk_set_ai_for_player): Interpret AI name passed directly.
	(interpret_variants): Remove indepside variants.

2000-06-01 Hans Ronne <hronne@2.sbbs.se>

	Fix drawing of selections and grouping boxes on the mac.
	* macmap.c (draw_selected_unit): Remove unused sx1, sy1, sh1 and sw1.
	(draw_selected_unit): Remove unused wholecell and drawmags code.
	(draw_selected_unit): Apply sy correction for occs like in
	draw_unit_and_occs.
	(draw_selected_unit): Tweak sh and sw of box if uw > 16 like in
	draw_unit_and_occs.
	(draw_selection_animation): Ditto.
	* macrow.c (draw_unit_and_occs): Move sy correction for occs
	outside the recursive loop.

	* read.c (add_more_variants): Comment out indepside stuff.

2000-05-31  Stan Shebs  <shebs@shebs.cnchost.com>

	* combat.c (model_1_attack): Use set_unit_origside.
	* kernel.h, unit.c (set_unit_side, set_unit_origside): Make return
	void.
	* kpublic.h: Remove unused decls.

	* blasts.imf: Add color images for nukes.
	* cherbourg.g: Remove bogus transport ids.
	* ww2-bn.g: Double out-length for corps HQs.
	* ww2-div-pac.g: Let carrier air units attack ground types.

	* PROJECTS: Add various ideas.

2000-05-30 Hans Ronne <hronne@2.sbbs.se>

	Fix some more indepside problems.
	* gvar.def (g_no_indepside_ingame): New gvar.
	* init.c (indepside_needed): Check g_no_indepside_ingame.
	* side.c (cover_area): Don't test for !indep(unit).
	* beirut.g (no-indepside-ingame) Set it to true.
	* gazala.g (no-indepside-ingame) Set it to true.
	* panzer.g (no-indepside-ingame) Set it to true.

2000-05-30  Stan Shebs  <shebs@shebs.cnchost.com>

	* score.c (side_loses): Tweak syntax to elim warning.
	* plan.c (set_formation): NULL leader clears formation.
	* tkcmd.c (aux_set_formation): Add user feedback, option
	to clear formation.
	(do_quit): Don't confirm if game over.
	(do_save, do_survey): Don't allow after game is over.

	Add help strings for variants.
	* module.h (Variant help): New field.
	* read.c (interp_variant_defns): Fill it in, supply default
	help strings for standard variants.
	(add_more_variants): Comment out people and supply system
	variants, they don't work.
	* cmdline.c (game_usage_info): Use help strings.

	* tkconq.tcl: Say "config" instead of "configure" consistently.
	(show_variant_help): Use varianthelp global.
	* tkmain.c (interpret_variants, interpret_checkbox): Set up
	tcl global varianthelp.

	* magellan.g, panzer.g, standard.g, ww2-eur-42.g: Add help
	strings to variants.

	* refman.texi: Update reference manual.

	* tkmain.c (play_movies): Slow down nuke movie.

2000-05-29 Hans Ronne <hronne@2.sbbs.se>

	Fix problems with indepside winning or losing games.
	* ai.c (give_up): Allow indepside to resign if played by human.
	* score.c (init_scores): Include indepside in num_sides_originally
	if in game.
	(check_pre_turn_scores): Use for_all_sides instead of
	for_all_real_sides.
	(check_post_turn_scores): Ditto.
	(check_post_action_scores): Ditto.
	(check_post_event_scores): Ditto.
	(eval_sk_last_side_wins): Ditto.
	(eval_sk_last_alliance_wins): Ditto.
	(side_loses): Ditto.
	(all_sides_draw): Ditto.
	(record_into_scorefile): Ditto.
	(side_loses): Allow indepside to resign if played by human.

2000-05-29 Hans Ronne <hronne@2.sbbs.se>

	Add support for indepside in tcl/tk player setup list.
	* tkmain.c (tk_side_ingame): Include indepside if really in game.
	* tkconq.tcl (add_player_dialog_items): Define firstside as either
	0 or 1.
	(add_player_dialog_items): Iterate from $firstside.

	Add popup dialog for indepside configuration in mac player setup
	dialog.
	Add ability for keyboard scrolling in new game dialog.
	* init.c (exchange_players): Make it work also for indepside if
	present.
	* macdefs.h (diPlayerSetupConfigure): Define to 15.
	(dConfigureSide): New dialog and items.
	* macinit.c (configure_indepside_dialog): New function and prototype.
	(filter_new_game):  Add support for Escape key.
	(filter_new_game): Add support for keyboard scrolling of newgamelist.
	(set_player_setup_button_states): Handle diPlayerSetupConfigure.
	(handle_player_setup_event): Remove code that blocks autoKey use.
	(hit_player_setup_dialog): Handle diPlayerSetupConfigure.
	* macmap.c (create_map): Always start with side colors in worldmap.
	* XconqProj.rsrc (DITL 130 "Player Setup Items"): Tweak positions.
	(DITL 130 "Player Setup Items"): Add "Configure Indep Side" button.
	(DITL 138 "Configure Side Items"): New dialog items list.
	(DLOG 138 "Configure Side"): New dialog.
	* Xconq.r: Update from XconqProj.rsrc.

2000-05-28 Hans Ronne <hronne@2.sbbs.se>

	Add support for indepside in mac player setup list.
	* init.c (make_trial_assignments): Call indepside_needed.
	(make_trial_assignments): Check indepside->ingame before adding
	players.
	(indepside_needed): New function, checks if game has independent
	units.
	* macinit.c (firstside): Define to (indepside->ingame ? 0 : 1).
	(selected_a_player): Start with firstside.
	(draw_player_setup_list): Tweak playerh and playerbaseline settings.
	(draw_player_setup_list): Test for numtotsides instead of numsides.
	(draw_player_setup_list): Start with firstside.
	(select_player): Start with firstside.
	(player_setup_dialog): Remove commented out code.
	(set_player_setup_button_states): Test for numtotsides instead of
	numsides.
	(handle_player_setup_event): Start with firstside.
	(handle_player_setup_event): Stop at numsides instead of
	numplayers - 1.
	(hit_player_setup_dialog): Use playerh + firstside instead of
	playerh + 1.

	* advances.g (indepside-can-research): Set it to false.
	(set-sides-max): Remove limit.
	* anc-near-east.g (set-sides-max): Ditto.
	
2000-05-26  Stan Shebs  <shebs@shebs.cnchost.com>

	* run2.c (update_cell_display_all_sides): Update if terrain is
	seen (thus updating people and control view).
	* side.c (cover_area): Don't let inactive sides inform their
	allies of view changes (prevents transitive bizarrities).

2000-05-25 Hans Ronne <hronne@2.sbbs.se>

	Fix some selection and display bugs in the mac interface.
	* macconq.c (adjust_cursor): Move autoselect of curunit to
	maybe_select_next_unit.
	(maybe_select_next_unit): Make sure the current unit always is
	selected if on autoselect.
	(maybe_select_next_unit): Make animation_pattern_state negative
	during blinks.
	* macmap.c (draw_selected_unit): Dont draw animation_patterns when
	using blinking curunit.
	(update_cell): Dont call draw_unit_info when
	animation_pattern_state is negative.
	* macrow.c (draw_unit_and_occs): Tweak size of grouping boxes.

	* advances.g (indepside-has-ai, indepside-can-build, economy,
	supply): Remove redundant settings.
	* anc-near-east.g (indepside-has-ai): Remove redundant variant.
	
2000-05-25  Stan Shebs  <shebs@shebs.cnchost.com>

	* tkconq.tcl (create_map_window, etc): Make most inter-pane
	borders width 1, tweak grips so scrolling doesn't leave junk.

	Suggested by Patrick Welche <prlwl@newn.cam.ac.uk>:
	* x11/Makefile.in (TCL_DL_LIBS): Get value from configure and use.

2000-05-24  Stan Shebs  <shebs@shebs.cnchost.com>

	* history.c (record_event): Allow unit ids to refer to dead units.
	* combat.c (detonate_unit): Fix visibility test, add special
	hack case for nuclear weapons.

	* tkconq.h (UI blastimages): Make larger.
	(UI bombpics, hitpics): Remove, no longer needed.
	* tkinit.c (init_bitmaps): Remove setup of hitpics.
	(init_other_images): Set up nuke images also, do with loop.
	* tkmain.c (play_movies): Add case for nukes, use cell blast
	or unit blast as appropriate.
	* tkmap.c (draw_unit_blast): Renamed from draw_blast.
	(draw_cell_blast): New function.
	(draw_blast_image): Change flashing to white out screen, add
	color image handling.

	* blasts.imf: Add new images nuke1, nuke2, nuke3, comment out
	standard blasts' color images.
	* imf.dir: Update.

	* beirut.g: Make buildings a little taller, allow car bombs
	to do detonation attacks, start factions further apart, let
	militia recover hp.

2000-05-22  Stan Shebs  <shebs@shebs.cnchost.com>

	* tkconq.tcl (create_map_window): Shrink side list and world map
	to max of 40% of vertical space each.
	(fill_in_side_list): Only do second column of treasury items if
	actually needed.
	* tkmap.c (MapW maxheight): New field.
	(config_specs): Add -maxheight option.
	(mapw_configure): Use it.
	
2000-05-21  Hans Ronne <hronne@2.sbbs.se>

	Fix various unit visibility and display problems.
	* gvar.def (g_peek_at_enemy): Remove, use g_see_all instead.
	* side.c (side_sees_unit): Remove g_peek_at_enemy.
	* ui.c (occupants_visible): Change side_controls_unit to
	side_sees_unit.

	* macconq.h (show_unit_closeup): New prototype.
	(create_unit_closeup): Return UnitCloseup in prototype instead of void.
	* macdesign.c (enable_designing): Set dside->see_all to true.
	(disable_designing): Set dside->see_all to frontmap->see_all.
	* macmenus.c (do_closeup_mi): Rewrite so that it works. 
	(do_closeup_mi): Call show_unit_closeup instead.
	(do_closeup_mi): Call scroll_to_selected_unit_in_list.
	* macmouse.c (do_mouse_down_map_control_panel): Also toggle
	dside->see_all.
	(do_mouse_down_map_content): Check for map->see_all when ctrl-clicking.
	(do_mouse_down_map_content): Call show_unit_closeup instead.
	* macunit.c (show_unit_closeup): New function.
	(find_unit_closeup): Don't test if the window is visible.
	(create_unit_closeup): Exit if we may not examine the unit.
	(create_unit_closeup): Return UnitCloseup instead of void.
	(draw_unit_closeup): Blast the closeup if the unit has defected.
	* macwins.c (side_research_dialog): Use see_all instead of
	g_peek_at_enemy.
	* XconqProj.rsrc (dctb 810 "Simple Closeup"): Add new dialog color
	table.
	* Xconq.r: Update from XconqProj.rsrc.
	* advances.g (peek-at-enemy): Remove.
	(indepside-has-ai): set to false. 
	(mostly-water): Comment out.
	
2000-05-20  Hans Ronne <hronne@2.sbbs.se>

	* macconq.c (mouseoverbuf): Increase from 100 to BUFSIZE to fix
	overflow crashes.
	* macunit.c (draw_advanced_closeup): Initialize disabled to TRUE.
	* nat-names.g (paraguayan-place-names): Spell it correctly.
	* ng-african.g (mauritanian-place-names): Add it.

2000-05-14  Hans Ronne <hronne@2.sbbs.se>

	Add option to use blinking current unit and selection masks on the mac.
	* macconq.c (maybe_select_next_unit): Add code for blinking
	current unit.
	* macconq.h (default_blinking_curunit): Declare.
	(default_selectionmasks): Declare.
	(a_map): Add short blinking_curunit & short selectionmasks.
	(draw_unit_image): Add selected arg in prototype.
	(toggle_blinking_curunit): New prototype. 
	(toggle_selectionmasks): New prototype. 
	* macdefs.h (diPrefsBlinkingUnit): New dialog item.
	(diPrefsAnimatedBox): New dialog item.
	(diPrefsSelectionMasks): New dialog item.
	(diPrefsSelectionBoxes): New dialog item.
	(miBlinkingCurunit): New menu item.
	(miSelectionMasks): New menu item.
	* maccolors.c (default_blinking_curunit): Initialize.
	(default_selectionmasks): Initialize.
	* macdesign.c (draw_design_window_tool): Add selected arg in
	draw_unit_image call.
	* macdraw.c (draw_unit_image): Pass in selected argument from above.
	(draw_unit_image): Call draw_unit_mask for selected units.
	(draw_unit_image): Add code for drawing selection masks with
	default boxes.
	(draw_unit_mask): New function and prototype.
	(draw_unit_mask_layer): New function and prototype.
	* machelp.c (draw_help): Add selected arg in draw_unit_image call.
	* maclist.c (draw_unit_list_entry): Add selected arg in
	draw_unit_image call.
	* macmap.c (create_map): Set map->blinking_curunit &
	map->selectionmasks.
	(draw_selected_unit): Add selected arg in draw_unit_image calls.
	(draw_selected_unit): Abort if map->selectionmasks is true.
	* macmenus.c (do_menu_command): Handle miBlinkingCurunit &
	miSelectionMasks.
	(adjust_menus): Handle miBlinkingCurunit & miSelectionMasks.
	* macmouse.c (toggle_blinking_curunit): New function. 
	(toggle_selectionmasks): New function. 
	* macrow.c (draw_units): Add selected arg in draw_unit_image calls.
	* (draw_unit_and_occs): Add selected arg in draw_unit_image calls.
	* macprefs.c (interp_mac_ui_data): Handle default_blinking_curunit
	& default_selectionmasks.
	(ui_update_state): Handle default_blinking_curunit &
	default_selectionmasks.
	(set_preferences): Handle default_blinking_curunit &
	default_selectionmasks.
	(add_preferences_topic_items): Handle default_blinking_curunit &
	default_selectionmasks.
	* macunit.c (draw_simple_closeup): Add selected arg in
	draw_unit_image calls.
	(draw_closeup_content): Add selected arg in draw_unit_image calls.
	* XconqProj.rsrc (DITL 705 "Preferences Image Sets Items"): Add
	four radio buttons.
	(MENU 217 "Colors and Masks Popup"): Add two new menu items.
	* Xconq.r: Update from XconqProj.rsrc.
	
	Various fixes to mac unit drawing. Add ability to draw incomplete
	units in gray.
	* maccolors.c (graycolor): Initialize new RGBColor.
	(blackcolor): Move initialization from init_side_colors to head of
	file.
	* macconq.h (graycolor): Declare.
	(draw_unit_image): Add sidecolors arg in prototype.
	* macconq.c (event_loop): Add automatic profiling of run_local_ai
	and net_run_game.
	* macdraw.c (draw_unit_image): Rewrite and simplify.
	(draw_unit_image): Use sidecolors also for pixmaps. 
	(draw_unit_image): Draw gray pixmaps instead of using gray_out_rect. 
	(draw_unit_image): Pass in sidecolors argument from above.
	(draw_unit_image): Handle emblem argument from above correctly.
	* macdesign.c (draw_design_window_tool): Add sidecolors arg in
	draw_unit_image call.
	(do_mouse_down_design): Fix menu item number bug.
	(mark_allowed_sides): Fix menu item number bug.
	* machelp.c (draw_help): Add sidecolors arg in draw_unit_image call.
	* macinit.c (blackcolor): Remove declaration.
	* macimf.c (mac_create_cicn): Use mask data if no mono data and
	vice versa.
	* maclist.c (draw_unit_list_entry): Add sidecolors arg in
	draw_unit_image call.
	* macmap.c (draw_selected_unit): Add sidecolors arg in
	draw_unit_image calls.
	(draw_selected_unit): Set correct emblem arg in draw_unit_image calls.
	* macrow.c (draw_units): Add sidecolors arg in draw_unit_image calls.
	(draw_units): Set correct emblem arg in draw_unit_image calls.
	* (draw_unit_and_occs): Add sidecolors arg in draw_unit_image calls.
	(draw_unit_and_occs): Set emblem correctly to map->draw_emblems.
	* macunit.c (draw_simple_closeup): Add sidecolors arg in
	draw_unit_image calls.
	(draw_simple_closeup): Set correct emblem arg in draw_unit_image
	calls.
	(draw_closeup_content): Add sidecolors arg in draw_unit_image
	calls.
	(draw_closeup_content): Call draw_unit_image instead of using
	special code.
	(draw_closeup_content): Make sure dead unit names are erased from
	garrison list.
	
2000-05-09  Hans Ronne <hronne@2.sbbs.se>

	* unit.c (shortest_unique_name): Fix crashing bug.

2000-05-07  Hans Ronne <hronne@2.sbbs.se>

	Various bug fixes in the interfaces.
	* macinit.c (player_setup_dialog): Make sure the dialog is drawn.
	* macconq.c (handle_keystroke): Filter cmdKey handling for keypad etc.
	* macmap.c (create_map): Don't center on focus for world map.
	* macmenus.c (build_side_menu): Remove extra "independent" item.
	(enable_commands_for_unit): Remove special indepside code.
	(enable_commands_for_unit): Check u_acp_to_change_side.
	(do_give_unit_mi): Use (mi - 1) in side_n call.
	* tkcmd.c (really_do_give_unit): Fix NULL side crashes.
	
	Release versions of Advances and Ancient Near East games.
	* ane.g. Remove obsolete file.
	* advances.g. New base module. Replaces ane.g.
	* advterr.g. New file. Terrain for advances games.
	* anc-near-east.g. New file. Ancient Near East game.
	* game.dir. Add advances.g & anc-near-east.g.
	* t-near-east.g. New file. Map of Near East.
		
2000-05-01  Stan Shebs  <shebs@shebs.cnchost.com>

	* cmd.c (notify_relationships): New function.
	(do_distrust, do_trust): Use, plus add more feedback.
	* move.c (change_control_side_around): Simplify.
	* run2.c (interpolate_temperature): Add experimental rewrite that
	tries to do interpolation within triangles formed by three nearest
	key points, but leave commented out.
	(run_environment): Simplify temperature calcs, use tmp1 layer to
	record coating terrain changes.
	(all_see_cell_weather): Use a mask for update types.
	* write.c (write_area_temperatures): Allow negative temperatures.

	* ww2-eur-42.g: Add more temperatures, tweak initial-year-part.

	* tkconq.tcl (update_game_side_info): Disappear the progress
	bars for never-active sides.

	* PROJECTS: Add less-critical changes.

2000-04-28  Stan Shebs  <shebs@shebs.cnchost.com>

	* mplayer.c (decide_resignation): Get the max of the chances
	vs all sides, not just the last one.
	* write.c (write_side_properties): Priority default is -1.

	* tkconq.tcl (fill_in_side_list): Fix size of loss line.
	(update_game_side_info): Alter appearance of progress bar if side
	not in game.
	(update_side_progress): Add argument to pass side->finishedturn,
	gray out progress in more cases.
	* tkmain.c (update_side_progress_display): Pass finishedturn,
	do nothing if side not in game.
	* tkmap.c (draw_unit_name): Don't draw unit numbers, too much
	clutter.

	* refman.texi: Clarify workings of side priority.

2000-04-25  Stan Shebs  <shebs@shebs.cnchost.com>

	* version.h: Bump to 7.2.97.

	* tkconq.tcl (add_player_dialog_items): Improve side button names.
	(select_player): Enable/disable sidelib button.

	* task.c (do_build_task): Explain task failure for units that
	can't develop.

	* world.c (create_feature): Call init_features if necessary.
	(destroy_feature): Clear destroyed feature from layer.

	* tkconq.tcl (delete_feature): New proc.
	(update_feature_name_entry): Update delete button.
	* tkmain.c (tk_destroy_feature): New tcl command.
	(tk_create_new_feature): New default name should not be a number.

	* PROJECTS: Mention idea for feature renumbering/sorting.

2000-04-24  Stan Shebs  <shebs@shebs.cnchost.com>

	* ai.c (set_side_ai): Reset num_local_ais, to force recalc.
	* cmd.c (do_ai_side): Add feedback on which AI is running.
	* nlang.c, conq.h (point_value_desc): New function.
	* mplayer.c (search_for_available_transport): Improve test
	of usability, make transport's plan type match occupant's
	plan type (in lieu of being more intelligent about running
	units with passive plans).
	* run2.c (run_appearances, run_disappearances): Notify user
	when units appear and disappear.
	* run.c, side.c: Cosmetic improvements.

	* cmdline.c (parse_command_line): Make -host a general option,
	display info about game module, put variant info after it.
	(general_usage_info): Mention -x, flush refs to options that have
	been removed.
	(player_usage_info): Similarly.
	(set_players_from_options): Fix location of indepside player
	creation, use make_default_player_spec.
	* tkmain.c: Similarly.
	* skelconq.c, wconq.c, xconq.c, xtconq.c (make_default_player_spec):
	Define.
	* xconq.c (main): Make version/usage info appear without welcome
	message.

	* tkconq.tcl (add_player_dialog_items): Add a popup menu for
	selecting side name directly.
	(set_name_from_side_lib_cmd): New proc.
	* tkmain.c (tk_side_lib_size, tk_side_lib_entry,
	tk_side_lib_entry_available, tk_set_name_from_side_lib): New tcl
	commands.
	(draw_unit_info): Describe point value.

	* ww2-div-eur.g: Add more help info, remove coast-defense type,
	add lowland type, rename v2-base to v2-launcher, take places
	out of stacking calcs, add more ZOC restrictions, make v2
	launchers mobile, set point values better, etc.
	* t-nw-eur.g: Add Italy and CONUS staging areas, add lowland.
	* nw-europe.g: Set Allied units to show up later, make some
	towns into ports.

2000-04-20  Stan Shebs  <shebs@shebs.cnchost.com>

	* tkconq.h (enum mapmode): New values no_tmp_mode and attack_mode.
	(Map tmp_mode): New field.
	* tkinit.c (init_cursors): Set up attack_mode cursor.
	* tkmain.c (update_mouseover): Set tmp_mode specially for
	attackable units.
	(could_attack): New function.
	* tkmap.c (set_tool_cursor): Use value of tmp_mode if set.

	* bitmaps/attackcurs.b, bitmaps/attackmask.b: New bitmap files.

	* PROJECTS: Add more notes about things to do.

2000-04-19  Stan Shebs  <shebs@shebs.cnchost.com>

	* help.c (create_game_help_nodes): Change displayed name of game
	design node, make weather note conditional.
	(describe_game_module_aux): Put notes with module ref.
	(describe_utype, describe_ttype, describe_mtype, describe_atype):
	Put notes at top instead of bottom.
	(tb_bool_desc): Simplify.

	* world.c, world.h (numfeatures): New global.
	* world.c (init_features, create_feature, destroy_feature): Update
	it.
	(num_features): Remove.
	* ps.c (dump_ps_view): Use numfeatures global.

	* tkconq.h (UI numfeatures): Remove.
	* tkcmd.c, tkmain.c, tkmap.c: Use numfeatures global.
	* tkconq.tcl (adjust_view_menu): Use view_option_names for
	strings, use numfeatures to enable/disable feature view control.
	(popup_help_dialog): Enable Help and Back buttons, increase
	default size of text area.
	* tkmain.c (describe_map): Add more info.
	(node_stack, etc): New globals.
	(tk_help_goto): Maintain and use stack of visited nodes.

	* xdraw.c, xmap.c: Use numfeatures global.

	* stdunit.g: Don't let cities initiate attacks.

2000-04-18  Stan Shebs  <shebs@shebs.cnchost.com>

	* ui.h (VP draw_meridians, meridian_interval): Rename from
	draw_latlong and latlong_interval.
	(VP lat_label_lon_interval, lon_label_lat_interval): New fields.
	* ui.c (set_meridian_interval, vp_latlong): New functions.
	(plot_meridians): Rewrite to space text labels better for
	scrolling.

	* macconq.h (default_draw_meridians, default_meridian_interval):
	Rename from "latlong" versions.
	* macdefs.h (diPrefsMeridians): Similarly.
	* macgworld.c, macmap.c, macmouse.c, macprefs.c: Similarly,
	including rename of pref symbols to default-draw-meridians and
	default-meridian-interval.

	* tkcmd.c, tkconq.h, tkinit.c, tkmain.c, tkmap.c: Similarly.

	* xcmd.c, xdraw.c, xinit.c, xmap.c, xtconq.h: Similarly.

	* lisp.c, lisp.h (choose_from_weighted_list): Add argument to
	allow "flat" lists of weights and values.
	* mknames.c (gen_from_rule): Use it, add case for string
	leading rule.
	* combat.c, mknames.c, mkunits.c: Update callers.

	* warn.g: Add tests for namer warnings.

	* xconq.texi: Various updates, including capitalization of
	index entries.
	* PROJECTS: Reflect above and other changes.

2000-04-17  Stan Shebs  <shebs@shebs.cnchost.com>

	* keyword.def (vanish): New keyword.
	* utype.def (encounter-result): New property.
	* combat.c (model_1_attack): Use it.
	* lisp.c (choose_from_weighted_list): Add a warning.
	* unit.c (change_unit_type): Make work for changing to
	an advanced unit.

	* civ2.g: Add village encounter results.

2000-04-15  Stan Shebs  <shebs@shebs.cnchost.com>

	* ww2-div-eur.g: Add fortification and city unit types,
	make towns not have occupants, add stack protection.
	* nw-europe.g: Add many towns, some more cities, fortifications.
	* t-nw-eur.g: Fix positioning, add more roads and railroads,
	add countries as features.

	* u-e1-1938.g, u-e1-1998.g: Add bases at Anchorage and Dutch
	Harbor.
	* ww2-38.g, ww2-39.g, ww2-42.g, ww2s-42.g, ww2s-pac-41.g: Include
	t-e1-river.g.
	
2000-04-11  Stan Shebs  <shebs@shebs.cnchost.com>

	* tp.c (download_game_module): Make sure indepside is filled in.
	(net_resign_game, receive_side_prop): Handle NULL sides when
	resigning.
	* write.c (write_areas): Don't write area size if not yet defined.
	(write_sides): Write indepside data using independent-units form.
	(add_num_or_dice_to_form): Don't write 0 addends.
	(add_form_to_form): Increase buffer from 16K to 50K.

	* commands.texi: Add more indexing of commands.

2000-04-10  Stan Shebs  <shebs@shebs.cnchost.com>

	* tkconq.h: Include sys/time.h here instead of in tkmain.c.
	(Map): Make scroll mode and last raw x,y into 2-element arrays,
	add autoscroll_delaying and autoscroll_start_time arrays.
	* tkconq.tcl (create_map_menus): Label meridian interval menu
	items in degrees.
	(autoscroll): Add argument, remove w_autoscroll proc.
	* tkmain.c (autoscroll_delay): New global.
	(autoscroll_width): Reduce to 16 pixels.
	(autoscroll): New function, autoscrolls both main and world maps,
	also don't try to scroll if at edge of map.
	(update_mouseover, update_world_mouseover): Use it.
	* tkmap.c (set_tool_cursor): Add argument.
	(set_w_tool_cursor): Remove.
	* tkcmd.c, tkmain.c: Change all callers.

	* cmd.def: Rename "D" debug toggle to "DD", for consistency.

	* commands.texi: Make consistent with code.
	* refman.texi: Fix small mistakes from last checkin.

2000-04-08 Hans Ronne <hronne@2.sbbs.se>
	
	* trident.gif: Use white background so that it works on the mac.

2000-04-08 Hans Ronne <hronne@2.sbbs.se>
	
	Various bug fixes in the mac interface.
	* Floating.c: Update comments with new stuff from 02-06.
	* macconq.c (handle_keystroke): Move handle_numeric_keypad call.
	* macinit.c (hit_player_setup_dialog): Fix select added player bug
	and put added player under mplayer control by default.
	* macwins.c (do_key_down_construction): Feed erase key and digit keys 
	to the run length text field. Let all other keys fall through.
	
	Add side research support to the mac interface.
	* macconq.c (event_loop): Call hit_research_dialog.
	(handle_keystroke): Call do_key_down_research.
	(update_window): Call draw_research_dialog.
	(update_side_display): Rewrite. Add side research support.
	* macconq.h (researchwin): New Dialogptr.
	(show_research_dialog): New prototype.
	(draw_research_dialog): New prototype.
	(do_key_down_research): New prototype.
	(hit_research_dialog): New prototype.
	(build_research_menu): Move prototype here.
	(build_construction_menu): Move prototype here.
	* macdefs.h (dSideResearch): New dialog and items.
	* macmenus.c (do_menu_command): Add side research in miWindowsResearch.
	(adjust_menus): Add side research in miWindowsResearch.
	(adjust_menus): Add CheckItem for miWindowsResearch.
	* macunit.c (build_research_menu): Move prototype to macconq.h.
	(build_construction_menu): Move prototype to macconq.h.
	* macwins.c (researchwin): Intitialize.
	(show_research_dialog): New function.
	(draw_research_dialog): New function.
	(do_key_down_research): New function.
	(hit_research_dialog): New function.

	* XconqProj.rsrc (DLOG 811 "Side Research"): New dialog.
	(DITL 811 "Side Research"): New dialog item list.
	(MENU 134 "Side"): Add "Auto Research" item.
	* Xconq.r: Update from XconqProj.rsrc.
	
	Add option for running side research on automatic.
	* kernel.h (set_autoresearch): Prototype extern.
	* kpublic.h (net_set_autoresearch): Prototype extern.
	* macconq.c (auto_pick_side_research): Prototype.
	(update_side_display): Call auto_pick_side_research.
	* macdefs.h (miSideAutoResearch): New item. Reorder Side menu.
	* macmenus.c (do_menu_command): Add case miSideAutoResearch.
	(adjust_menus): Handle miSideAutoResearch.
	* run.c (auto_pick_side_research): New function and prototype.
	* side.c (create_side): Set side->autoresearch to FALSE.
	(set_autoresearch): New function.
	* side.h (struct a_side): Add side->autoresearch. 
	* tp.c (net_set_autoresearch): New function.
	(receive_side_prop): Add support for side->autoresearch.
	
2000-04-07  Stan Shebs  <shebs@shebs.cnchost.com>

	* atype.def (char, occurrence): Remove, never used.
	* help.c (describe_game_design): Remove ref to a_char.
	(describe_utype): Add more info about production tables.
	* lisp.c (read_form_aux): Make dice spec warning more useful.

	* ai.c (next_ai_type): Simplify.
	* conq.h (has_advance_to_research): Declare here.
	* cmd.c, run.c, macunit.c, macwins.c, tkmain.c: ...instead of here.
	* combat.c: Cosmetic changes.
	* iplayer.c: Remove more unused code, elim warnings.
	* mplayer.c (mp_collect_here): Declare.
	* plan.c: Comment out unused code.
	* supply.c: Remove unused globals.

	* tkconq.h (UI sidecloseuplist, etc): Remove, never used.
	(Map w_lastrawx, w_lastrawy, wscrollmode): New fields.
	* tkconq.tcl (make_normal_bindings): Add motion binding for
	world map.
	(w_autoscroll): New proc.
	* tkmain.c (tk_world_mouse_over_cmd): New tcl command.
	(update_world_mouseover): New function.
	* tkmap.c (worldw_vp, set_w_tool_cursor): New functions.

	* africa.g, empire.g, modern.g: Fix dice specs.

	* refman.texi: Remove ref to color type property, clarify
	which types have which generic properties.
	* PROJECTS: Reflect recent projects.

2000-04-06  Stan Shebs  <shebs@shebs.cnchost.com>

	* game.h (for_all_border_types, for_all_connection_types): Move
	to here from supply.c.
	* generic.c (first_bord_type, next_bord_type, first_conn_type,
	next_conn_type): New globals.
	* world.c (count_terrain_subtypes): Calculate values for these.
	* supply.c (optimize_terrain): Remove, no longer needed.
	* move.c, nlang.c, ps.c, run.c, task.c, ui.c, unit.c, macrow.c:
	Use the macros everywhere.
	* nlang.c (linear_desc): Comment out info about directions.
	(location_desc): Attach linear desc to terrain name only.
	* ui.c (toggle_user_at): Add error messages for failures.

	* imf.c (add_shrunken_image): Set the mask bit using
	the same choice of pixel as for the color image.

	* tkimf.c (tk_make_color_pixmap, etc): Don't use XImages
	if the image is of odd size.
	* tkmain.c (draw_unit_info): Add supply line info, make
	size display optional.

	* xcutil.c (read_any_file): Allow .g files.

	* civ2.g: Use noun instead of name/plural-noun/adjective
	for sides.
	* earth-1deg.g: Tweak some feature names and boundaries.
	* earth-50km.g: Similarly, plus add and name some more
	Pacific and Indonesian islands.
	* trident.gif: Fill in some holes.

2000-04-02  Stan Shebs  <shebs@shebs.cnchost.com>

	* gvar.def (unit-name-color): Change default to white.
	* history.def (blocking-zoc): New action failure type.
	* keyword.def (transition): New keyword.
	* cmdline.c (set_players_from_options): Don't create a player for
	the indepside if one already exists.
	* combat.c (model_1_attack): Capture advanced unit in stack
	instead of destroying it.
	(check_fire_into_action, check_capture_action): Not allowed in
	combat model 1.
	* imf.c (interp_image, write_image): Use transition keyword.
	* move.c (check_move_action): Return distinct failure code if
	blocked by ZOC.
	(in_blocking_zoc): Fix typos, add traverse-blocking case.
	(unit_traverse_blockable_by, any_friendly_at): New functions.
	* nlang.c (apparent_unit_handle): New function.
	* plan.c, run.c, ui.c: Confirm that user layer exists before
	calling user_at.
	* run.c (run_advanced_units): Allocate user layer here.
	* ui.c (collect_possible_games): Remove Mac-specific code, never
	used.
	(oneliner): Use apparent_unit_handle to describe some units.
	* world.c (allocate_area_terrain): Don't allocate user layer here.
	* run2.c (run_auto_repair): Let occupants do repairs.
	* unit.c (add_to_unit_hp): Move to here from run2.c.
	* read.c, side.c, unit.h, write.c: Cosmetic changes.
	* iplayer.c: Remove unused code.

	* tkinit.c (set_colors): Tweak setup of unit_name_color.
	(init_material_images): Flush unused code.
	* tkmap.c (draw_units): Draw name of uncovered unit under
	some circumstances.
	(draw_unit_name): Use unit_name_color.
	(draw_resource_usage): Use material images if possible.

	* civ2.g: Use real images for materials, set
	size-limit-without-occupant, make ZOCs work right, add auto-repair
	ability for some city improvements, use trident images from
	FreeCiv.
	* images/trident.gif, images/civmisc.gif: New files, images
	borrowed from FreeCiv's "trident" tileset.

	* doc/Makefile.in (syms.texi): Abbreviate some keywords to
	make the formatting work.
	* refman.texi: Describe new plan types, file-based images
	and other new image properties.
	* syntax.texi: Use @smallexample instead of @example.
	* xconq.texi: Fix line length.
	* PROJECTS: Reflect above work.

2000-03-27  Stan Shebs  <shebs@shebs.cnchost.com>

	* world.c (compute_feature_centroid): Restructure to be
	easier to understand.

	* tkconq.h (enum mapmode): New values no_scroll_mode,
	scroll_up_mode, etc.
	(Map): New field scrollmode.
	* tkconq.tcl (make_unit_paint_frame): Include emblems in
	unit image sample.
	(dbg_set_design_data): Update unit paint frame emblem.
	(make_feature_paint_frame): Rewrite to make feature renaming
	an integral part of paint frame instead of a dialog.
	(update_feature_name_entry): New proc.
	(new_feature): Don't tweak popup's label here.
	* tkinit.c: Include new scroll cursor bitmaps.
	(init_cursors): Use them.
	* tkmain.c (tk_feature_desc): New tcl command.
	(tk_feature_info, tk_set_feature_info): Rename from
	..._feature_name, extend to get/set type name also.
	(tk_create_new_feature): Recalc feature-related caches.
	(update_mouseover): Set map->scrollmode also.
	* tkmap.c (draw_row): Wrap x before passing to subrs.
	(draw_feature_boundary): Wrap x before using.
	(set_tool_cursor): Set cursor to a scroll cursor if in
	map is scrolling.

	* bitmaps/scursdown.b, bitmaps/scursdownm.b, bitmaps/scursleft.b,
	bitmaps/scursleftm.b, bitmaps/scursright.b, bitmaps/scursrightm.b,
	bitmaps/scursup.b, bitmaps/scursupm.b: New files, bitmaps
	indicating autoscroll direction.

	* PROJECTS: Add more ideas.

2000-03-25  Stan Shebs  <shebs@shebs.cnchost.com>

	* combat.c: Cosmetic improvements.
	* imf.c (interp_image): Add info to error message, set
	numsubimages correctly for special image types.

	* imfapp.tcl: Add 24x26 and 44x48 magnifications.
	* tkiapp.c (ui_init): Add alternate location to find imfapp.tcl.
	* ximfapp.c (add_library_path): New function.
	(main): Use it to implement -L option.

	* tkconq.tcl (make_terrain_paint_frame): Don't overlap
	foreground and background terrain, use bgcolor in imfsamples.

	* ww2-bn.g: Rename ground-unit-types to just ground-types,
	add terrain effect on defense, make towns protect occupants.
	* u-e1-1938.g, u-e1-1998.g, u-e50-1998.g: Fix position of
	Panama City.

	* doc/PROJECTS: Reflect above work, add more thoughts about
	game work in progress.

2000-03-23  Stan Shebs  <shebs@shebs.cnchost.com>

	* cmdline.c (parse_command_line): Warn about using -host, -join.

	* tkconq.tcl (add_program): Don't mess with chat window if not
	open.
	* tkmain.c (tk_set_remote_for_player): Remove, no longer used.
	(host_the_game): Return a result, remove unused code that
	sets up players.
	(try_join_game): Remove commented-out code.

	* wconq.c: Remove unneeded decls.
	* xconq.c: (main): Rewrite -host, -join startup sequences.
	(accept_all_remotes): New function.

2000-03-21  Stan Shebs  <shebs@shebs.cnchost.com>

	* world.c, world.h (any_elev_variation): New global.
	(calculate_world_globals): Compute it.
	(allocate_area_elevations): Set initial elevations to minimum
	required by terrain type.
	* help.c (describe_ttype): Use any_elev_variation.

	* tkcmd.c (do_design): Go to survey mode when done designing.
	* tkconq.tcl (any_elev_variation, any_temp_variation,
	any_wind_variation, any_clouds): New tcl globals.
	(popup_design_palette): Use them to decide button activation,
	also permanently disable material painting.
	(make_terrain_paint_frame): Increase size of samples.
	* tkinit.c (init_display): Set new tcl globals.
	* tkisamp.c (draw_one_image): Pick out subimage to draw.

	* stdunit.g: Prevent armor from crossing from road end in
	mountains etc to passable terrain.

	* commands.texi: Fix doc of "if" command.
	
	* cmd-diff.sh: Update to match syntax of manual source.

	* PROJECTS: Remove some more lame ideas.

2000-03-17  Stan Shebs  <shebs@shebs.cnchost.com>

	* keyword.def (non-advance): New keyword.
	* read.c (init_predefined_symbols): Set it up as a constant.

	* tkconq.tcl (dbg_set_design_data): Add argument.
	(make_elev_paint_frame): Add raise/lower buttons.
	(set_elevation, raise_elevation, lower_elevation): New procs.
	* tkmain.c (tk_set_design_data): Use extra argument for
	incr/decr amount for elevations.
	* tkmap.c (handle_designer_mouse_down): Recompute contour
	line info when altering elevations.

	* ancient.g: Use side-color-library.
	* all.g: Rename side-colors to side-color-library.

	* refman.texi: Document many more recently-added constructs.
	* PROJECTS: Reflect recent work.

2000-03-16  Stan Shebs  <shebs@shebs.cnchost.com>

	* gvar.def (side-color-library): Rename from side-colors.
	* lisp.c, lisp.h (choose_from_weighted_list): Move to here
	from mknames.c.
	* mkunits.c: Remove decl of fn.
	* mknames.c (total_color_weights): New global.
	(make_up_side_name): Add choice of random color scheme.
	(name_in_use): Test for color scheme in use.
	* ui.c (get_emblem_images): Allow use of color scheme as emblem.
	(contour_lines_at): Handle elevation range changes.

2000-03-13  Stan Shebs  <shebs@shebs.cnchost.com>

	* version.h: Bump to 7.2.96.

	* refman.texi: Document many added symbols.

2000-03-12  Stan Shebs  <shebs@shebs.cnchost.com>

	* unit.h (has_acp_left): Test against 0 instead of acp-min.
	* unit.c (change_unit_type): Make side change to indepside
	instead of NULL.
	* skelconq.c, cconq.c (unit_research_dialog, side_research_dialog):
	Add dummy versions.
	* actions.c, combat.c: Cosmetic changes.
	* iplayer.c: Remove unneeded decls.

	* cobra.g: Make self-contained.
	* ob-nor-alld.g, ob-nor-axis.g: Remove, not really used or useful.

	* PROJECTS: Contrib dir exists, add proposal to remove
	create-units-from-specs.

2000-03-11  Stan Shebs  <shebs@shebs.cnchost.com>

	* mkroads.c (make_roads): Use actual value of K_ROAD_X.
	* move.c (total_move_cost): Add effect of coating types.
	* mplayer.c (update_side_strategy): Add per-side research
	decision.
	(add_goal): Warn about goal overflow.
	(mplayer_decide_plan): Use for advanced units unless auto
	constructing/researching, decide to collect materials if
	there is a goal to have some.
	(mplayer_adjust_plan): Similarly, plus add a goal to get
	materials if units to be constructed need them.
	(assign_to_collection, mp_collect_here,
	assign_to_colonization support): New functions.
	* plan.c (execute_plan): Use for advanced units unless auto
	constructing/researching.
	(plan_colonize): Call plan_colonize_support if unit not
	a mobile type.
	* run.c (run_game): Stop game action if any designers active.
	* run2.c (run_environment): Add special code to detect and
	use mud and snow coating types.
	* task.c (do_build_task): Test requested location before
	doing create-in, try all directions if no location for a
	create_at.

	* tkmap.c (GRAY): Add darkgray option.
	(cell_drawing_info): Add overlay color result, make coatings
	override other overlay types.
	(draw_terrain_row, draw_terrain_transitions): Fix coating
	drawing.

	* ancient.g: Make units vanish in forest (prevents attempts
	to construct there), adjust hit chances on animals vs people,
	change Mitanni side color.
	* civ2.g: Default variants to off, change settlers image,
	let cities see whole area, let units build roads and rails,
	lower cost of movement on them.
	* ww2-adv.g: Add mud/snow effects.
	* ww2-eur-42.g: Add/adjust temperature stations, add in
	ww2-sides.g.
	* images/settler.gif: New image.
	* imf.dir, people.imf: Add it.

	* PROJECTS: Remove some more unmotivated items, reflect
	accomplishment of basic Civ emulation.

2000-03-09  Stan Shebs  <shebs@shebs.cnchost.com>

	* ai.c (goal_truth): Handle GOAL_HAS_MATERIAL_TYPE.
	(colonizing_worth): Also consider a unit to be a colonizer
	if it can build any type that can build more of it.

	* tkcmd.c (aux_add_terrain_2): Require linear types to be
	specified by clicking on adjacent cell.
	* tkinit.c (init_display): Call init_ui_chars.
	* tkmain.c (ask_unit_type): Use unitchars array.
	(ask_terrain_type): Use terrchars array.
	* cconq.c, xmap.c: Similarly.

2000-03-05  Stan Shebs  <shebs@shebs.cnchost.com>

	* task.def (TASK_BUILD): Add args for location at which to build.
	* task.c (do_build_task): Pass location to create-at action.
	* iplayer.c, mplayer.c, kpublic.h, plan.c, task.c, tp.c,
	ccmd.c, macunit.c, macwins.c, tkcmd.c, xcmd.c: Update all calls.

	* task.def (TASK_DO_ACTION): Remove, never used.
	* task.c (do_action_task): Remove.
	* xcloseup.c: Remove ref.

	* cmd.c (do_research): Let "research nothing" stop research.
	* run.c (units_still_acting): Don't end turn if research topic
	still needs to be chosen.
	(run_population): Add a hack for effects of "Granary".
	* run2.c (run_side_research): Skip if researchers resting.

	* tkconq.tcl (popup_splash_screen): Improve button names.
	(fill_in_side_list): Omit default scorekeeper text.
	(popup_research_dialog): Add "Rest" button.
	(rest_research): New proc.
	* tkmain.c (update_side_display): Move research popup to here
	from update_turn_display.
	(tk_set_side_research): Handle resting case.

	* civ2.g: Rename "fishery" to "ocean/fish", limit number
	of wonders, forbid multiple improvements of the same type
	in a city, make research go faster.

	* ww2-div-eur.g: Limit number of battleship attacks.
	* nw-europe.g: Add London.
	* t-nw-eur.g: Add beaches.
	* ww2-adv.g: Remove cliffs and salt-marsh terrain types,
	add beach terrain type, constrain transports to only be
	able to unload across beaches.
	* ww2-eur-42.g: Similarly, for the actual terrain layers.

	* PROJECTS: Reflect beach additions, remove redundant build
	item.

2000-02-29  Stan Shebs  <shebs@shebs.cnchost.com>

	* table.def (mp-to-enter-terrain): Allow negative values.
	* move.c (do_move_action): Tweak argument names for consistency,
	comment out tests of vanishing on terrain being left from.
	* run2.c (interpolate_temperature): Rewrite to fix/simplify.
	(try_sharing_with_cell): Share with all trusted units.
	(run_economy): Don't round capacities of 1 to 0.
	* ai.c (next_ai_type): New function.
	* tkconq.tcl (cycle_ai_cmd): Rewritten, was toggle_ai_cmd.
	* tkmain.c (tk_set_ai_for_player): Rewrite to use -cycle
	argument.
	* tkmap.c (any_coating_at): New function.
	(cell_drawing_info, draw_terrain_row): Use to detect and draw
	coatings.
	(handle_designer_mouse_down, paint_on_drag): Add ability to
	paint coatings.

	* game.dir: Remove unfinished games empire.g and postmodern.g.
	* ww2-adv.g: Add snow terrain, remove port cities, let sub
	and asw fleets see farther, let ground units build bases,
	tinker with combat odds, add temperature model.
	* ww2-eur-42.g: Add key points for temperatures, add more
	German subs, make France be controlled by Germany, add
	instructions.
	* ww2-stdunit.g: Remove, not very useful.
	* ww2s-42.g, ww2s-eur-42.g, ww2s-pac-41.g: Add contents of
	ww2-stdunit.g, make standard game be base module.
	* ww2-div-eur.g: Let ground types land through beach borders.
	* ww2-div-eur.g, ww2-bn.g: Don't use large speeds.

	* PROJECTS: Reflect above work.

2000-02-23  Stan Shebs  <shebs@shebs.cnchost.com>

	* combat.c (check_attack_action, check_fire_at_action,
	capture_unit_2): Fix independent unit tests.

	* tkimf.c (tk_make_color_pixmap): Use endian-portable code
	to fill in ximbuf.
	* tkmain.c (initial_ui_init): Provide more info about why
	tcl files couldn't be loaded.
	* tkmap.c (draw_units): Fix visibility tests so that
	named visible units can get their names displayed.
	(handle_designer_mouse_down): Make the newly-created unit
	the current unit.

	* nat-names.g, ng-african.g, ng-american.g, ng-asian.g,
	ng-european.g, ng-misc.g: Add rest of per-nation random
	place names.
	* stdunit.g: Add more independent towns.

	* images/dwellings32.imf: New file.
	* dwellings.imf: Use it for walltown, rename b/w image to
	walltown-s, also rename b/w parthenon image.
	* ancient.imf, ships.imf: Similarly for hoplite and trireme.

	* PROJECTS: Reflection of above projects, plus general sweep
	of junky ideas.

2000-02-16  Stan Shebs  <shebs@shebs.cnchost.com>

	* task.c (do_produce_task): Adjust correct task argument.

	* refman.texi (material-to-produce): Clarify behavior.

2000-02-06  Hans Ronne  <hronne@pp.sbbs.se>

	Mac interface improvements: Integrate advanced unit (city) dialog
	with normal unit closeup and make it non-modal. Add a new list for
	setting research tasks to the construction window. Improve help
	window and make it floating. Add help buttons to unit
	closeups. Rewrite event_loop and handle_event for better support
	of non-modal dialogs. Add dialog support to floating window
	code. Add support for Return, Escape and Up and Down Arrow keys to
	player setup dialog. Add support for Page Up Page Down and Escape
	keys to list scrolling code.
	
	Kernel improvements: Add network support for curadvance,
	autobuild, autoresearch and autoplan. Other new functions:
	research_desc and researchible_desc.

	* Floating.c (IsDialog): New function.
	(UpdateFloats): Test for IsDialog.
	(MakeDialogFloat): New function.
	(SelectTheWindow): Test for IsDialog.

	* Floating.h: include <Dialogs.h>.
	(IsDialog): Prototype.
	(MakeDialogFloat): Prototype.

	* macconq.c (handle_keystroke): New function and prototype.
	(drag_window): New function and prototype.
	(event_loop): Call get_global_mouse & adjust_cursor first of all.
	Rewrite handling of keystrokes and dialog events.
	Comment out redundant adjust_cursor call.
	(adjust_cursor): Add work around for Appearance Manager bug.
	(handle_event): Use MacFindWindow instead of FindWindow.
	Call drag_window instead of DragTheWindow.
	Add case inCollapseBox. Comment out case keyDown and case autoKey.
	Test for IsDialog on suspend/resume events.
	(grow_window): Add call to update_all_visible_dialogs.
	(zoom_window): Add call to update_all_visible_dialogs.
	(close_window): Call update_all_visible_dialogs instead of
	update_all_map_windows.
	(update_unit_display): Check if closeup is visible before updating.
	Use update_window instead of draw_unit_closeup.
	(update_unit_acp_display): Use update_window instead of
	draw_unit_closeup.
	(force_update): Use update_window instead of EraseRect.
	
	* macconq.h (do_key_down_list): New prototype.
	(hit_player_setup_dialog): Change prototype to return void.
	(hit_closeup_dialog): New prototype.
	(do_key_down_closeup): New prototype.
	(do_key_down_help): New prototype.
	(update_all_dialogs): New prototype.
	(update_all_visible_dialogs): New prototype.
	
	* macdefs.h (HelpButton): Define as 3.
	(mAdvancePopup): Rename to mResearchPopup.
	(diCityBuildTimes): Define as 97.
	(diCityMap): Change from 3 to 98.
	(dCloseup): Define as 810.
	(cDevelopButton): Define as 136.
	
	* macgworld.c (handle_numeric_keypad): Remove list window code.
	Remove gworld snapshot and debugger key code.
	(update_all_dialogs): New function.
	(update_all_visible_dialogs): New function.
	
	* machelp.c (create_help_window): Tweak helptopicrect.
	Use floatsbarwid instead of sbarwid everywhere.
	Tweak viewrect and vscrollrect. Call MakeFloat at end.
	(draw_help): Use floatsbarwid instead of sbarwid.
	Draw a default line around the close button.
	(help_vscroll_fn): Change jump size from 1 to 2.
	(do_key_down_help): New function.
	(grow_help): Use floatsbarwid instead of sbarwid. Tweak viewRect.
	(zoom_help): Use floatsbarwid instead of sbarwid. Tweak viewRect.
	
	* macinit.c (player_setup_dialog): Change selectedplayer from 0 to 1.
	Call MakeDialogFloat at end.
	(handle_player_setup_event): Cancel on cmd-dot.
	Add support for Return, Esc, Up arrow and Down arrow keys.
	(hit_player_setup_dialog): Change "pt" to "mouse" everywhere.
	Save and restore the graphics port.
	Call launch_game_2 directly at the end.
	
	* maclist.c (scroll_list_using_key): Remove function and prototype.
	(do_key_down_list): New function based on scroll_list_using_key.
	Remove support fort list scrolling from the numeric keypad.
	Add support for PageDown PageUp and Escape keys.
	
	* macmenus.c (city_dialog): Remove prototype.
	(global_advance_dialog): Rename prototype to side_research_dialog.
	(do_city_dialog_mi): Remove function and prototype.
	(do_menu_command): Remove City Dialog from Play menu.
	Change global_advance_dialog to side_research_dialog.
	
	* macmouse.c (city_dialog): Remove prototype.
	(do_mouse_down_map_content): Remove city dialog code.
	
	* macunit.c: New name for macadv.c. Now contains all windows
	and dialogs that refer to individual units in one place. The closeup
	code from macwins.c has been moved here and integrated with the
	advanced unit (city) closeup code. global_advance_dialog has been
	renamed to side_research_dialog and moved to macwins.c. 
	(city_dialog): Remove function and prototype.
	(draw_simple_closeup): New prototype.
	(draw_advanced_closeup): New prototype.
	(build_construction_menu): New function and prototype.
	(build_research_menu): New function and prototype.
	(unit_advance_win): New global.
	(unit_build_win): New global.
	(unit_plan_win): New global.
	(lastunitcloseuph): Move here from macwins.c.
	(lastunitcloseupv): Move here from macwins.c.
	(m_per_row): Move here from macwins.c.
	(nummrows): Move here from macwins.c.
	(closeup_spacing): Move here from macwins.c.
	(closeupwinwid):  Move here from macwins.c.
	(find_unit_closeup): Move here from macwins.c.
	(create_unit_closeup): Move here from macwins.c.
	(unit_closeup_from_window): Move here from macwins.c.
	Use dCity and dCloseup for advanced and non-advanced units.
	Use MakeDialogFloat instead of MakeFloat.
	(preferred_closeup_size): Move here from macwins.c.
	(draw_unit_closeup): First part of same function from macwins.c.
	Add test for side_sees_unit. Move update_cell_display call first.
	Call either draw_simple_closeup or draw_advanced_closeup.
	(destroy_unit_closeup): Move here from macwins.c.
	(do_mouse_down_unit_closeup): Move here from macwins.c.
	(do_key_down_closeup): New function.
	(hit_closeup_dialog): New function. Second half of old city_dialog.
	(draw_advanced_closeup): New function. First half of old city_dialog.
	Use last_task->args[3] instead of tasks->args[3] for runlength field.
	Use unit->plan->type + 1 to set the plan menu control value.
	Don't hide diCityBuildEdit. Hilite it instead.
	(draw_city_statistics): Rename to draw_closeup_content.
	Change first argument to DialogPtr. 
	Add tmprect. Enable draw_unit_size call.
	(draw_unit_size): Add support for unit closeups.
	Save and restore current font, style and size.
	(unit_advance_dialog): Rename to unit_research_dialog.
	Change mAdvancePopup to mResearchPopup.
	(global_advance_dialog): Move to macwins.c.
	
	* macwins.c (has_advance_to_research): Prototype extern.
	(get_selected_construction_advance): New function and prototype.
	(update_unit_list_for_advance): New function and prototype.
	(select_advance_in_construction_window): New function and prototype.
	(update_construction_advance_list): New function and prototype.
	(update_advance_list_for_unit): New function and prototype.
	(construction_advance_list): New global ListHandle.
	(*research_units): New global UnitVector.
	(numpossadvances): New global int.
	(*possibleadvances): New global int.
	(researchbutton): New global ControlHandle.
	(advancelistrect): New global rect.
	(lastunitcloseuph): Move to macunit.c.
	(lastunitcloseupv): Move to macunit.c.
	(m_per_row): Move to macunit.c.
	(nummrows): Move to macunit.c.
	(closeup_spacing): Move to macunit.c.
	(closeupwinwid):  Move to macunit.c.
	(create_construction_window): Handle research button and advances list.
	(init_construction_lists): Update construction_advance_list.
	(draw_construction): Update advancelistrect.
	(calc_construction_rects): Make room for construction_advance_list.
	(activate_construction): Activate construction_advance_list.
	(do_mouse_down_construction): Handle research button and advances list.
	(update_construction_unit_list): Test for can_research.
	(maybe_add_unit_to_construction_list): Test for can_research.
	(adjust_construction_controls): Add support researchbutton.
	(adjust_construction_items): Add support for construction_advance_list.
	(side_research_dialog): Move global_advance_dialog here and rename it.
	Change mAdvancePopup to mResearchPopup.
	(find_unit_closeup): Move to macunit.c.
	(create_unit_closeup): Move to macunit.c.
	(preferred_closeup_size): Move to macunit.c.
	(draw_unit_closeup): Move to macunit.c.
	(unit_closeup_from_window): Move to macunit.c.
	(do_mouse_down_unit_closeup): Move to macunit.c.
	(destroy_unit_closeup): Move to macunit.c.
	
	* XconqProj.rsrc (CNTL 129 "Research Button"): Tweak position.
	(CNTL 130 "Close Button"): Tweak position.
	(CNTL 136 "Develop Button"): New control.
	(CNTL 714 "Runlengh Popup"): New control.
	(dctb 803 "City"): Rename to "Advanced Closeup".
	(DITL 803 "City"): Rename to "Advanced Closeup". Add Help button.
	(DITL 804 "City Research"): Rename to "Unit Research".
	(DITL 807 "City Build"): Rename to "Unit Build".
	(DITL 808 "City Plan"): Rename to "Unit Plan".
	(DITL 810 "Simple Closeup"): New dialog item list.
	(DLOG 803 "City"): Rename to "Advanced Closeup".
	(DLOG 804 "City Research"): Rename to "Unit Research".
	(DLOG 807 "City Build"): Rename to "Unit Build".
	(DLOG 808 "City Plan"): Rename to "Unit Plan".
	(DLOG 810 "Simple Closeup"): New dialog.
	(ictb 803 "City"): Rename to "Advanced Closeup".
	(MENU 714 "Runlengh Popup"): New menu.
	
	* Xconq.r: Update from XconqProj.rsrc.

	* conq.h (research_desc): New prototype.
	(researchible_desc): New prototype.
	(can_research): New prototype.
	
	* kernel.h (set_unit_curadvance): New prototype.
	(set_unit_autoplan): New prototype.
	(set_unit_autoresearch): New prototype.
	(set_unit_autobuild): New prototype.
	
	* kpublic.h (net_set_unit_curadvance): New prototype.
	(net_set_unit_autoplan): New prototype.
	(net_set_unit_autoresearch): New prototype.
	(net_set_unit_autobuild): New prototype.
	
	* nlang.c (research_desc): New function.
	(researchible_desc): New function.

	* plan.c (set_unit_curadvance): New function.
	(set_unit_autoplan): New function.
	(set_unit_autoresearch): New function.
	(set_unit_autobuild): New function.
	(can_research): New function.
	
	* run.c (unit_advance_dialog): Rename to unit_research_dialog.
	(global_advance_dialog): Rename to side_research_dialog.

	* tp.c (net_set_unit_curadvance): New function.
	(net_set_unit_autoplan): New function.
	(net_set_unit_autoresearch): New function.
	(net_set_unit_autobuild): New function.
	(receive_unit_prop): Handle curadvance, autoplan, autoresearch & autobuild.
	
	* tkmain.c (unit_advance_dialog): Rename to unit_research_dialog.
	(global_advance_dialog): Rename to side_research_dialog.
	
	* xtconq.c (unit_advance_dialog): Rename to unit_research_dialog.
	(global_advance_dialog): Rename to side_research_dialog.
	
2000-02-06  Hans Ronne  <hronne@pp.sbbs.se>
	
	Fix terrain images related problems on the mac. Allocate cicns
	using xmalloc instead of hanging them at the top of the heap. Remove
	heap gymnastics code. 
	* macconq.h (interp_named_color): Remove prototype.
	(reinit_all_emblem_images): Remove prototype.
	(init_emblem_cicns): Remove prototype.
	(init_unit_cicns): Remove prototype.
	(dispose_emblem_cicns): Remove prototype.
	(dispose_unit_cicns): Remove prototype.
	* macconq.c (update_side_display): Remove argument in init_emblem_images.
	* macimf.c (mac_interp_image_1): Fix 88x96 bug. Remove special case.
	(mac_create_cicn): xmalloc cicnhandle & datahandle instead of using heap.
	(mac_init_cicn_1): Remove heap gymnastics code.
	(interp_ctab): xmalloc ctabhandle instead of using heap.
	* macinit.c: (dispose_unit_images): Prototype.
	(dispose_emblem_images): Prototype.
	(dispose_terrain_images): Prototype.
	(hit_player_setup_dialog): Call init_emblem_images instead.
	(launch_game): Call init_emblem_images instead.
	(launch_game): Remove call to init_emblem_cicns.
	(interp_named_color): Remove function.
	(reinit_all_emblem_images): Remove function.
	(reinit_all_emblem_images): Remove function.
	(reinit_all_terrain_images): Remove function.
	(init_all_emblem_images): Move content to init_emblem_images.
	(init_unit_cicns): Remove function.
	(init_emblem_cicns): Remove function.
	(init_terrain_cicns): Remove function.
	(init_unit_images): First call dispose_unit_images.
	(init_emblem_images): First call dispose_emblem_images.
	(init_terrain_images): First dispose_terrain_images.
	(dispose_unit_images): Old dispose_unit_cicns. Now also frees uimages.
	(dispose_emblem_images): Old dispose_emblem_cicns. Now also frees eimages.
	(dispose_terrain_images): New function.
	* macprefs.c (set_preferences): Call init_unit_images instead.
	* macwins.c (side_rename_dialog): Call init_emblem_images instead.

2000-01-05  Hans Ronne  <hronne@pp.sbbs.se>
	
	Fix problem with city development and upgrades in "time" game.
	* mplayer.c (review_units): Use PLAN_IMPROVING for upgrading cities.
	(assign_to_develop_on): Use PLAN_IMPROVING for developing cities.
	(assign_to_develop_on): Call net_clear_task_agenda before pushing new task.
	* plan.c (plan_improve): Call execute_task and return if we have a task.
	
	Fix bad mtype errors in non-civ2 games.
	* side.c (create_side): Initialize m to NONMTYPE.
