[avida-cvs] avida CVS commits: /current README bootstrap /current/doc code_environment.html environment.html events.html index.html /current/source modules.pri /current/source/event cPopulation_construct_event_auto.ci cPopulation_descr.ci cPopulation_descr.hi cPopulation_enums_auto.ci cPopulation_event_list cPopulation_name2enum_auto.ci cPopulation_process_auto.ci /current/source/main main.pro primitive.ncb primitive.sln primitive.suo primitive.vcproj tasks.cc /current/source/qt-viewer event_chooser.cpp event_chooser.h event_list_editor.cpp event_list_editor.h godbox.cpp godbox.h plot_select_dia.cpp plot_select_dia.h plot_widget.cc population_cell_wrapper.hh qt-viewer.pro qt_viewer.ncb qt_viewer.sln qt_viewer.suo qt_viewer.vcproj /current/source/qt-viewer/exp avd_widget_list.hh avd_widget_list_item.hh avd_widget_list_item_container.hh /current/source/third-party/pdcurses README.txt curses.h pdcurses.lib /current/source/third-party/trio-1.9 example.c regression.c strio.h trio.c trio.h triodef.h trionan.c trionan.h triop.h triostr.c triostr.h /current/source/third-party/trio-1.9/doc doc.h doc_dynamic.h doc_printf.h doc_register.h doc_scanf.h doc_static.h /current/source/viewers ncurses_viewer.ncb ncurses_viewer.sln ncurses_viewer.suo ncurses_viewer.vcproj viewers.pro

goingssh avida-cvs at alife.org
Wed Jun 4 19:35:25 PDT 2003


goingssh		Wed Jun  4 11:35:25 2003 EDT

  Removed files:               
    /avida/current/source/main	primitive.ncb primitive.sln 
                              	primitive.suo primitive.vcproj 
    /avida/current/source/qt-viewer	qt_viewer.ncb qt_viewer.sln 
                                   	qt_viewer.suo qt_viewer.vcproj 
    /avida/current/source/viewers	ncurses_viewer.ncb ncurses_viewer.sln 
                                 	ncurses_viewer.suo 
                                 	ncurses_viewer.vcproj 

  Modified files:              
    /avida/current	README bootstrap 
    /avida/current/doc	code_environment.html environment.html 
                      	events.html index.html 
    /avida/current/source	modules.pri 
    /avida/current/source/event	cPopulation_construct_event_auto.ci 
                               	cPopulation_descr.ci 
                               	cPopulation_descr.hi 
                               	cPopulation_enums_auto.ci 
                               	cPopulation_event_list 
                               	cPopulation_name2enum_auto.ci 
                               	cPopulation_process_auto.ci 
    /avida/current/source/main	main.pro tasks.cc 
    /avida/current/source/qt-viewer	event_chooser.cpp event_chooser.h 
                                   	event_list_editor.cpp 
                                   	event_list_editor.h godbox.cpp 
                                   	godbox.h plot_select_dia.cpp 
                                   	plot_select_dia.h plot_widget.cc 
                                   	population_cell_wrapper.hh 
                                   	qt-viewer.pro 
    /avida/current/source/qt-viewer/exp	avd_widget_list.hh 
                                       	avd_widget_list_item.hh 
                                       	avd_widget_list_item_container.hh 
    /avida/current/source/third-party/trio-1.9	example.c regression.c 
                                              	strio.h trio.c trio.h 
                                              	triodef.h trionan.c 
                                              	trionan.h triop.h 
                                              	triostr.c triostr.h 
    /avida/current/source/third-party/trio-1.9/doc	doc.h doc_dynamic.h 
                                                  	doc_printf.h 
                                                  	doc_register.h 
                                                  	doc_scanf.h 
                                                  	doc_static.h 
    /avida/current/source/viewers	viewers.pro 
    /avida/current/source/third-party/pdcurses	README.txt curses.h 
                                              	pdcurses.lib 
  Log:
  commiting merge of my branch and HEAD branch back to HEAD branch.  This version works in all 3 modes on Windows, and should work on Unix and OSX as well.
  
-------------- next part --------------
Index: avida/current/README
diff -u avida/current/README:1.3 avida/current/README:1.4
--- avida/current/README:1.3	Fri May 23 04:43:21 2003
+++ avida/current/README	Wed Jun  4 11:34:44 2003
@@ -6,7 +6,7 @@
 viewer. The installation goes into a directory called 'work' that 
 is created in your working directory. See below how to change that.
 
-There is a number of options you can give to configure to change the
+There are a number of options you can give to configure to change the
 default behavior:
   --enable-debug: Compile with debugging symbols instead of optimized.
   --enable-gnu-debug: Compile with special debugging symbols for the
@@ -38,7 +38,7 @@
 instead of 'make install'.
 
 *Important*:
-If you have already build Avida without viewer, and you want to
+If you have already built Avida without viewer, and you want to
 rebuild it with viewer, or vice versa, you have to issue a
   make viewer-clean
 between the two builds. Otherwise, strange things might happen.
Index: avida/current/bootstrap
diff -u avida/current/bootstrap:1.8 avida/current/bootstrap:1.9
--- avida/current/bootstrap:1.8	Tue May 20 07:22:29 2003
+++ avida/current/bootstrap	Wed Jun  4 11:34:44 2003
@@ -12,7 +12,7 @@
 # helps bootstrapping, when checked out from CVS
 # requires GNU autoconf and GNU automake
 #
-# $Id: bootstrap,v 1.8 2003/05/20 14:22:29 kaben Exp $
+# $Id: bootstrap,v 1.9 2003/06/04 18:34:44 goingssh Exp $
 
 # this is not meant to be exported outside the source tree
 
Index: avida/current/doc/code_environment.html
diff -u avida/current/doc/code_environment.html:1.4 avida/current/doc/code_environment.html:1.5
--- avida/current/doc/code_environment.html:1.4	Fri May 30 14:39:48 2003
+++ avida/current/doc/code_environment.html	Wed Jun  4 11:34:45 2003
@@ -301,4 +301,3 @@
 <br><hr>
 Project hosted by:<br>
 <a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=46761&type=2" width="125" height="37" border="0" alt="SourceForge.net"/></a>
-
Index: avida/current/doc/environment.html
diff -u avida/current/doc/environment.html:1.4 avida/current/doc/environment.html:1.5
--- avida/current/doc/environment.html:1.4	Fri May 30 14:39:48 2003
+++ avida/current/doc/environment.html	Wed Jun  4 11:34:45 2003
@@ -438,4 +438,3 @@
 <br><hr>
 Project hosted by:<br>
 <a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=46761&type=2" width="125" height="37" border="0" alt="SourceForge.net"/></a>
-
Index: avida/current/doc/events.html
diff -u avida/current/doc/events.html:1.6 avida/current/doc/events.html:1.7
--- avida/current/doc/events.html:1.6	Fri May 30 14:39:49 2003
+++ avida/current/doc/events.html	Wed Jun  4 11:34:45 2003
@@ -266,4 +266,4 @@
 <br><hr>
 Project hosted by:<br>
 <a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=46761&type=2" width="125" height="37" border="0" alt="SourceForge.net"/></a>
-
+    
Index: avida/current/doc/index.html
diff -u avida/current/doc/index.html:1.4 avida/current/doc/index.html:1.5
--- avida/current/doc/index.html:1.4	Tue Jun  3 18:15:00 2003
+++ avida/current/doc/index.html	Wed Jun  4 11:34:45 2003
@@ -1,4 +1,3 @@
-<html>
 <title>Index of Avida Documentation</title>
 
 <h1 align=center>Index of Avida Documentation</h1>
@@ -47,4 +46,4 @@
 <br><hr>
 Project hosted by:<br>
 <a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=46761&type=2" width="125" height="37" border="0" alt="SourceForge.net"/></a>
-</html>
+    
\ No newline at end of file
Index: avida/current/source/modules.pri
diff -u avida/current/source/modules.pri:1.2 avida/current/source/modules.pri:1.3
--- avida/current/source/modules.pri:1.2	Sat May 17 02:48:07 2003
+++ avida/current/source/modules.pri	Wed Jun  4 11:34:45 2003
@@ -4,12 +4,16 @@
 MAIN_CC   = $$AVIDA_SRC_DIR/main
 TRIO_C    = $$AVIDA_SRC_DIR/third-party/trio-1.9
 TOOLS_CC  = $$AVIDA_SRC_DIR/tools
+SUPPORT_CC= $$AVIDA_SRC_DIR/support
+DOC_CC	  = $$AVIDA_SRC_DIR/../doc
 
 CPU_HH    = $$CPU_CC
 EVENT_HH  = $$EVENT_CC
 MAIN_HH   = $$MAIN_CC
 TRIO_H    = $$TRIO_C
 TOOLS_HH  = $$TOOLS_CC
+SUPPORT_HH= $$SUPPORT_CC
+DOC_HH 	  = $$DOC_CC
 
 DEPENDPATH += ;$$AVIDA_SRC_DIR
 DEPENDPATH += ;$$CPU_HH
@@ -17,6 +21,8 @@
 DEPENDPATH += ;$$MAIN_HH
 DEPENDPATH += ;$$TRIO_H
 DEPENDPATH += ;$$TOOLS_HH
+DEPENDPATH += ;$$SUPPORT_HH
+DEPENDPATH += ;$$DOC_HH
 
 INCLUDEPATH += $$DEPENDPATH
 
@@ -25,3 +31,5 @@
 include($$MAIN_CC/main_sub.pri)
 include($$TRIO_C/trio.pri)
 include($$TOOLS_CC/tools.pri)
+include($$SUPPORT_CC/support.pri)
+include($$DOC_CC/doc.pri)
Index: avida/current/source/event/cPopulation_construct_event_auto.ci
diff -u /dev/null avida/current/source/event/cPopulation_construct_event_auto.ci:1.2
--- /dev/null	Wed Jun  4 11:35:23 2003
+++ avida/current/source/event/cPopulation_construct_event_auto.ci	Wed Jun  4 11:34:46 2003
@@ -0,0 +1,240 @@
+    case cPopulationEventFactory::EVENT_exit :
+      event = new cPopulationEventexit(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_exit_if_generation_greater_than :
+      event = new cPopulationEventexit_if_generation_greater_than(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_exit_if_update_greater_than :
+      event = new cPopulationEventexit_if_update_greater_than(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_exit_if_ave_lineage_label_smaller :
+      event = new cPopulationEventexit_if_ave_lineage_label_smaller(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_exit_if_ave_lineage_label_larger :
+      event = new cPopulationEventexit_if_ave_lineage_label_larger(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_echo :
+      event = new cPopulationEventecho(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_print_data :
+      event = new cPopulationEventprint_data(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_print_average_data :
+      event = new cPopulationEventprint_average_data(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_print_error_data :
+      event = new cPopulationEventprint_error_data(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_print_variance_data :
+      event = new cPopulationEventprint_variance_data(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_print_dominant_data :
+      event = new cPopulationEventprint_dominant_data(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_print_stats_data :
+      event = new cPopulationEventprint_stats_data(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_print_count_data :
+      event = new cPopulationEventprint_count_data(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_print_totals_data :
+      event = new cPopulationEventprint_totals_data(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_print_tasks_data :
+      event = new cPopulationEventprint_tasks_data(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_print_tasks_exe_data :
+      event = new cPopulationEventprint_tasks_exe_data(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_print_resource_data :
+      event = new cPopulationEventprint_resource_data(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_print_time_data :
+      event = new cPopulationEventprint_time_data(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_print_mutation_data :
+      event = new cPopulationEventprint_mutation_data(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_print_mutation_rate_data :
+      event = new cPopulationEventprint_mutation_rate_data(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_print_divide_mut_data :
+      event = new cPopulationEventprint_divide_mut_data(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_print_instruction_data :
+      event = new cPopulationEventprint_instruction_data(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_print_instruction_abundance_histogram :
+      event = new cPopulationEventprint_instruction_abundance_histogram(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_print_depth_histogram :
+      event = new cPopulationEventprint_depth_histogram(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_print_genotype_abundance_histogram :
+      event = new cPopulationEventprint_genotype_abundance_histogram(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_print_species_abundance_histogram :
+      event = new cPopulationEventprint_species_abundance_histogram(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_print_lineage_totals :
+      event = new cPopulationEventprint_lineage_totals(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_print_lineage_counts :
+      event = new cPopulationEventprint_lineage_counts(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_print_dom :
+      event = new cPopulationEventprint_dom(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_print_genotype_map :
+      event = new cPopulationEventprint_genotype_map(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_save_population :
+      event = new cPopulationEventsave_population(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_load_population :
+      event = new cPopulationEventload_population(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_save_clone :
+      event = new cPopulationEventsave_clone(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_load_clone :
+      event = new cPopulationEventload_clone(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_load_dump_file :
+      event = new cPopulationEventload_dump_file(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_dump_pop :
+      event = new cPopulationEventdump_pop(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_detail_pop :
+      event = new cPopulationEventdetail_pop(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_dump_historic_pop :
+      event = new cPopulationEventdump_historic_pop(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_dump_memory :
+      event = new cPopulationEventdump_memory(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_inject :
+      event = new cPopulationEventinject(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_inject_all :
+      event = new cPopulationEventinject_all(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_inject_range :
+      event = new cPopulationEventinject_range(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_inject_sequence :
+      event = new cPopulationEventinject_sequence(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_inject_random :
+      event = new cPopulationEventinject_random(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_zero_muts :
+      event = new cPopulationEventzero_muts(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_mod_copy_mut :
+      event = new cPopulationEventmod_copy_mut(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_mod_div_mut :
+      event = new cPopulationEventmod_div_mut(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_set_copy_mut :
+      event = new cPopulationEventset_copy_mut(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_mod_point_mut :
+      event = new cPopulationEventmod_point_mut(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_set_point_mut :
+      event = new cPopulationEventset_point_mut(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_calc_landscape :
+      event = new cPopulationEventcalc_landscape(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_predict_w_landscape :
+      event = new cPopulationEventpredict_w_landscape(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_predict_nu_landscape :
+      event = new cPopulationEventpredict_nu_landscape(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_sample_landscape :
+      event = new cPopulationEventsample_landscape(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_random_landscape :
+      event = new cPopulationEventrandom_landscape(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_analyze_landscape :
+      event = new cPopulationEventanalyze_landscape(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_pairtest_landscape :
+      event = new cPopulationEventpairtest_landscape(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_test_dom :
+      event = new cPopulationEventtest_dom(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_analyze_population :
+      event = new cPopulationEventanalyze_population(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_print_detailed_fitness_data :
+      event = new cPopulationEventprint_detailed_fitness_data(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_print_genetic_distance_data :
+      event = new cPopulationEventprint_genetic_distance_data(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_genetic_distance_pop_dump :
+      event = new cPopulationEventgenetic_distance_pop_dump(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_task_snapshot :
+      event = new cPopulationEventtask_snapshot(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_print_viable_tasks_data :
+      event = new cPopulationEventprint_viable_tasks_data(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_apocalypse :
+      event = new cPopulationEventapocalypse(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_kill_rectangle :
+      event = new cPopulationEventkill_rectangle(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_rate_kill :
+      event = new cPopulationEventrate_kill(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_serial_transfer :
+      event = new cPopulationEventserial_transfer(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_hillclimb :
+      event = new cPopulationEventhillclimb(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_hillclimb_neut :
+      event = new cPopulationEventhillclimb_neut(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_hillclimb_rand :
+      event = new cPopulationEventhillclimb_rand(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_calc_consensus :
+      event = new cPopulationEventcalc_consensus(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_test_size_change_robustness :
+      event = new cPopulationEventtest_size_change_robustness(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_test_threads :
+      event = new cPopulationEventtest_threads(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_print_threads :
+      event = new cPopulationEventprint_threads(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_dump_fitness_grid :
+      event = new cPopulationEventdump_fitness_grid(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_dump_genotype_grid :
+      event = new cPopulationEventdump_genotype_grid(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_print_tree_depths :
+      event = new cPopulationEventprint_tree_depths(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_inject_resource :
+      event = new cPopulationEventinject_resource(arg_list);
+      break;
+    case cPopulationEventFactory::EVENT_set_resource :
+      event = new cPopulationEventset_resource(arg_list);
+      break;
Index: avida/current/source/event/cPopulation_descr.ci
diff -u /dev/null avida/current/source/event/cPopulation_descr.ci:1.2
--- /dev/null	Wed Jun  4 11:35:23 2003
+++ avida/current/source/event/cPopulation_descr.ci	Wed Jun  4 11:34:46 2003
@@ -0,0 +1,84 @@
+const cEventEntry cEventDescrs::entries[] = {
+  cEventEntry( "exit", "Ends the Avida run immediately.\n" ),
+  cEventEntry( "exit_if_generation_greater_than", "Ends the Avida run when the current generation exceeds the\nmaximum generation given as parameter.\n\nParameters:\nmax generation (int)\n  The generation at which the run should be stopped.\n" ),
+  cEventEntry( "exit_if_update_greater_than", "Ends the Avida run when the current update exceeds the\nmaximum update given as parameter.\n\nParameters:\nmax update (int)\n  The update at which the run should be stopped.\n" ),
+  cEventEntry( "exit_if_ave_lineage_label_smaller", "Halts the avida run if the current average lineage label is smaller\nthan the value given as parameter.\n\nParameters:\nlineage_label_crit_value (int)\n  The critical value to which the average lineage label is compared.\n" ),
+  cEventEntry( "exit_if_ave_lineage_label_larger", "Halts the avida run if the current average lineage label is larger\nthan the value given as parameter.\n\nParameters:\nlineage_label_crit_value (int)\n  The critical value to which the average lineage label is compared.\n" ),
+  cEventEntry( "echo", "Writes out a message. If no message is given, average update and\ngeneration are written out.\n\nParameters:\nmessage (string)\n" ),
+  cEventEntry( "print_data", "Output user-defined data from the cStats object...\n\nParameters:\nfilename (string)\n  The name of the data file.\nformat\n  A comma-seperated list of statistics to output.\n" ),
+  cEventEntry( "print_average_data", "Output various average quantities into datafile.\n\nParameters:\nfilename (string) default: average.dat\n  The name of the data file.\n" ),
+  cEventEntry( "print_error_data", "Prints out various data related to statistical errors.\n\nParameters:\nfilename (string) default: error.dat\n  The name of the data file.\n" ),
+  cEventEntry( "print_variance_data", "Prints out various variances.\n\nParameters:\nfilename (string) default: variance.dat\n  The name of the data file.\n" ),
+  cEventEntry( "print_dominant_data", "Output various quantities related to the dominant organism.\n\nParameters:\nfilename (string) default: dominant.dat\n  The name of the data file.\n" ),
+  cEventEntry( "print_stats_data", "Output various statistical quantities.\n\nParameters:\nfilename (string) default: stats.dat\n  The name of the data file.\n" ),
+  cEventEntry( "print_count_data", "Output various counts, such as number of organisms etc.\n\nParameters:\nfilename (string) default: count.dat\n  The name of the data file.\n" ),
+  cEventEntry( "print_totals_data", "Various total numbers.\n\nParameters:\nfilename (string) default: totals.dat\n  The name of the data file.\n" ),
+  cEventEntry( "print_tasks_data", "Output the number of times the various tasks have been performed in the\nlast update.\n\nParameters:\nfilename (string) default: tasks.dat\n  The name of the data file.\n" ),
+  cEventEntry( "print_tasks_exe_data", "\n" ),
+  cEventEntry( "print_resource_data", "\n" ),
+  cEventEntry( "print_time_data", "Output time related data, such as update, generation, etc.\n\nParameters:\nfilename (string) default: time.dat\n  The name of the data file.\n" ),
+  cEventEntry( "print_mutation_data", "\n" ),
+  cEventEntry( "print_mutation_rate_data", "(regular and log) statistics about individual copy\nrates (aver, stdev, skew, cur).\nonly when mutation rate is set per organism.\n" ),
+  cEventEntry( "print_divide_mut_data", "(regular and log) statistics about individual, per site,\ndivide mutation rates (aver, stdev, skew, cur).\nwith multiple divide instuction set.\n" ),
+  cEventEntry( "print_instruction_data", "of the by-organisms counts of what instructions they _successfully_\nbeteween birth and divide. Prior to their first divide, organisms\nvalues for their parents.\n" ),
+  cEventEntry( "print_instruction_abundance_histogram", "Appends a line containing the bulk count (abundance) of\neach instruction in the population onto a file.\n\nParameters:\nfilename (string) default: \"instruction_histogram.dat\"\n\n" ),
+  cEventEntry( "print_depth_histogram", "\n" ),
+  cEventEntry( "print_genotype_abundance_histogram", "Writes out a genotype abundance histogram.\n\nParameters:\nfilename (string) default: genotype_abundance_histogram.dat\n  The name of the file into which the histogram is written.\n" ),
+  cEventEntry( "print_species_abundance_histogram", "Writes out a species abundance histogram.\n\nParameters:\nfilename (string) default: species_abundance_histogram.dat\n  The name of the file into which the histogram is written.\n" ),
+  cEventEntry( "print_lineage_totals", "\n" ),
+  cEventEntry( "print_lineage_counts", "\n" ),
+  cEventEntry( "print_dom", "Write the currently dominant genotype to disk.\n\nParameters:\nfilename (string)\n  The name under which the genotype should be saved. If no\n  filename is given, the genotype is saved into the directory\n  genebank, under the name that the genebank has associated with\n  this genotype.\n" ),
+  cEventEntry( "print_genotype_map", "write a matrix of genotype ID's to a file (matlab format)\n" ),
+  cEventEntry( "save_population", "Saves the full state of the population.\n\nParameters:\nfilename (string) default: save_pop.*\n  The name of the file into which the population should\n  be saved. If it is not given, then the name 'save_pop.*'\n  is used, with '*' replaced by the current update.\n" ),
+  cEventEntry( "load_population", "Loads the full state of the population.\n\nParameters:\nfilename (string)\n  The name of the file to open.\n" ),
+  cEventEntry( "save_clone", "\n" ),
+  cEventEntry( "load_clone", "\n" ),
+  cEventEntry( "load_dump_file", "Sets up a population based on a dump file such as written out by\ndetail_pop. It is also possible to append a history file to the dump\nfile, in order to preserve the history of a previous run.\n" ),
+  cEventEntry( "dump_pop", "Writes out a line of data for each genotype in the current population. The\nline contains the genome as string, the number of organisms of that genotype,\nand the genotype ID.\n\nParameters:\nfilename (string) default: \"dump.<update>\"\n  The name of the file into which the population dump should be written.\n" ),
+  cEventEntry( "detail_pop", "Like dump_pop, but more detailed data is written out.\n\nParameters:\nfilename (string) default: \"detail_pop.<update>\"\n  The name of the file into which the population dump should be written.\n" ),
+  cEventEntry( "dump_historic_pop", "Similar to detail_pop. However, only genotypes that are not in the\ncurrent population anymore are included. Genotypes that are not in\nthe line of descent of any of the current genotypes to the ultimate\nancestor are excluded.\n\nParameters:\nfilename (string) default: \"historic_dump.<update>\"\n  The name of the file into which the historic dump should be written.\n" ),
+  cEventEntry( "dump_memory", "Dump the current memory state of all CPUs to a file.\n" ),
+  cEventEntry( "inject", "Injects a single organism into the population.\n\nParameters:\nfilename (string)\n  The filename of the genotype to load. If this is left empty, or the keyword\n  \"START_CREATURE\" is given, than the genotype specified in the genesis\n  file under \"START_CREATURE\" is used.\ncell ID (integer) default: 0\n  The grid-point into which the organism should be placed.\nmerit (double) default: -1\n  The initial merit of the organism. If set to -1, this is ignored.\nlineage label (integer) default: 0\n  An integer that marks all descendants of this organism.\nneutral metric (double) default: 0\n  A double value that randomly drifts over time.\n" ),
+  cEventEntry( "inject_all", "Injects identical organisms into all cells of the population.\n\nParameters:\nfilename (string)\n  The filename of the genotype to load. If this is left empty, or the keyword\n  \"START_CREATURE\" is given, than the genotype specified in the genesis\n  file under \"START_CREATURE\" is used.\nmerit (double) default: -1\n  The initial merit of the organism. If set to -1, this is ignored.\nlineage label (integer) default: 0\n  An integer that marks all descendants of this organism.\nneutral metric (double) default: 0\n  A double value that randomly drifts over time.\n" ),
+  cEventEntry( "inject_range", "Injects identical organisms into a range of cells of the population.\n\nParameters:\nfilename (string)\n  The filename of the genotype to load. If this is left empty, or the keyword\n  \"START_CREATURE\" is given, than the genotype specified in the genesis\n  file under \"START_CREATURE\" is used.\nstart_cell (int)\n  First cell to inject into.\nstop_cell (int)\n  First cell *not* to inject into.\nmerit (double) default: -1\n  The initial merit of the organism. If set to -1, this is ignored.\nlineage label (integer) default: 0\n  An integer that marks all descendants of this organism.\nneutral metric (double) default: 0\n  A double value that randomly drifts over time.\n\nExample:\n  inject_range creature.gen 0 10\n\nWill inject 10 organisms into cells 0 through 9.\n" ),
+  cEventEntry( "inject_sequence", "Injects identical organisms into a range of cells of the population.\n\nParameters:\nsequence (string)\n  The genome sequence for this organism.  This is a mandatory argument.\nstart_cell (int)\n  First cell to inject into.\nstop_cell (int)\n  First cell *not* to inject into.\nmerit (double) default: -1\n  The initial merit of the organism. If set to -1, this is ignored.\nlineage label (integer) default: 0\n  An integer that marks all descendants of this organism.\nneutral metric (double) default: 0\n  A double value that randomly drifts over time.\n\nExample:\n  inject_range ckdfhgklsahnfsaggdsgajfg 0 10 100\n\nWill inject 10 organisms into cells 0 through 9 with a merit of 100.\n" ),
+  cEventEntry( "inject_random", "Injects a randomly generated genome into the population.\n\nParameters:\nlength (integer) [required]\n  Number of instructions in the randomly generated genome.\ncell ID (integer) default: -1\n  The grid-point into which the genome should be placed.  Default is random.\nmerit (double) default: -1\n  The initial merit of the organism. If set to -1, this is ignored.\nlineage label (integer) default: 0\n  An integer that marks all descendants of this organism.\nneutral metric (double) default: 0\n  A double value that randomly drifts over time.\n" ),
+  cEventEntry( "zero_muts", "This event will set all mutation rates to zero...\n" ),
+  cEventEntry( "mod_copy_mut", "\n" ),
+  cEventEntry( "mod_div_mut", "\n" ),
+  cEventEntry( "set_copy_mut", "\n" ),
+  cEventEntry( "mod_point_mut", "\n" ),
+  cEventEntry( "set_point_mut", "\n" ),
+  cEventEntry( "calc_landscape", "\n" ),
+  cEventEntry( "predict_w_landscape", "\n" ),
+  cEventEntry( "predict_nu_landscape", "\n" ),
+  cEventEntry( "sample_landscape", "\n" ),
+  cEventEntry( "random_landscape", "\n" ),
+  cEventEntry( "analyze_landscape", "\n" ),
+  cEventEntry( "pairtest_landscape", "If sample_size = 0, pairtest the full landscape.\n" ),
+  cEventEntry( "test_dom", "\n" ),
+  cEventEntry( "analyze_population", "\n" ),
+  cEventEntry( "print_detailed_fitness_data", "\n" ),
+  cEventEntry( "print_genetic_distance_data", "\n" ),
+  cEventEntry( "genetic_distance_pop_dump", "\n" ),
+  cEventEntry( "task_snapshot", "\n" ),
+  cEventEntry( "print_viable_tasks_data", "\n" ),
+  cEventEntry( "apocalypse", "Randomly removes a certain proportion of the population.\n\nParameters:\nremoval probability (double) default: 0.9\n  The probability with which a single organism is removed.\n" ),
+  cEventEntry( "kill_rectangle", "Kills all cell in a rectangle.\n\nParameters:\ncell [X1][Y1][x2][Y2] (integer) default: 0\n  The start and stoping grid-points into which the organism should\nkilled.\n" ),
+  cEventEntry( "rate_kill", "Randomly removes a certain proportion of the population.\nIn principle, this event does the same thing as the apocalypse event.\nHowever, instead of a probability, here one has to specify a rate. The\nrate has the same unit as fitness. So if the average fitness is 20000,\nthan you remove 50% of the population on every update with a removal rate\nof 10000.\n\nParameters:\nremoval rate (double)\n  The rate at which organisms are removed.\n" ),
+  cEventEntry( "serial_transfer", "This event does again the same thing as apocalypse. However, now\nthe number of organisms to be retained can be specified\nexactly. Also, it is possible to specify whether any of these\norganisms may be dead or not.\n\nParameters:\ntransfer size (int) default: 1\n  The number of organisms to retain. If there are fewer living\n  organisms than the specified transfer size, then all living\n  organisms are retained.\nignore deads (int) default: 1\n  When set to 1, only living organisms are retained. Otherwise,\n  every type of organism can be retained.\n" ),
+  cEventEntry( "hillclimb", "Does a hill climb with the dominant genotype.\n" ),
+  cEventEntry( "hillclimb_neut", "\n" ),
+  cEventEntry( "hillclimb_rand", "\n" ),
+  cEventEntry( "calc_consensus", "Calculates the consensus sequence.\n\nParameters:\nlines saved (integer) default: 0\n   ???\n" ),
+  cEventEntry( "test_size_change_robustness", "\n" ),
+  cEventEntry( "test_threads", "\n" ),
+  cEventEntry( "print_threads", "\n" ),
+  cEventEntry( "dump_fitness_grid", "Writes out all fitness values of the organisms currently in the\npopulation.\n\nThe output file is called \"fgrid.*.out\", where '*' is replaced by the\nnumber of the current update.\n" ),
+  cEventEntry( "dump_genotype_grid", "Writes out all genotype id values of the organisms currently in the\npopulation.\n\nThe output file is called \"idgrid.*.out\", where '*' is replaced by the\nnumber of the current update.\n" ),
+  cEventEntry( "print_tree_depths", "Reconstruction of phylogenetic trees.\n" ),
+  cEventEntry( "inject_resource", "Inject (add) a specified amount of a specified resource.\n" ),
+  cEventEntry( "set_resource", "Set the resource amount to a specific level\n" ) };
+
+const int cEventDescrs::num_of_events = 80;
+
Index: avida/current/source/event/cPopulation_descr.hi
diff -u /dev/null avida/current/source/event/cPopulation_descr.hi:1.2
--- /dev/null	Wed Jun  4 11:35:23 2003
+++ avida/current/source/event/cPopulation_descr.hi	Wed Jun  4 11:34:46 2003
@@ -0,0 +1,26 @@
+class cEventEntry{
+private:
+  const char* m_name;
+  const char* m_description;
+public:
+  cEventEntry( const char* name, const char* description )
+    : m_name( name ), m_description( description ) {;}
+  ~cEventEntry() {;}
+  /**
+   * @return The name of the event.
+   **/
+  const char* GetName() const { return m_name; }
+
+  /**
+   * @return The description of the event.
+   **/
+  const char* GetDescription() const { return m_description; }
+};
+
+
+class cEventDescrs{
+public:
+  const static int num_of_events;
+  const static cEventEntry entries[];
+};
+
Index: avida/current/source/event/cPopulation_enums_auto.ci
diff -u /dev/null avida/current/source/event/cPopulation_enums_auto.ci:1.2
--- /dev/null	Wed Jun  4 11:35:23 2003
+++ avida/current/source/event/cPopulation_enums_auto.ci	Wed Jun  4 11:34:46 2003
@@ -0,0 +1,82 @@
+  enum eEvent { EVENT_undefined = 0,
+  EVENT_exit,
+  EVENT_exit_if_generation_greater_than,
+  EVENT_exit_if_update_greater_than,
+  EVENT_exit_if_ave_lineage_label_smaller,
+  EVENT_exit_if_ave_lineage_label_larger,
+  EVENT_echo,
+  EVENT_print_data,
+  EVENT_print_average_data,
+  EVENT_print_error_data,
+  EVENT_print_variance_data,
+  EVENT_print_dominant_data,
+  EVENT_print_stats_data,
+  EVENT_print_count_data,
+  EVENT_print_totals_data,
+  EVENT_print_tasks_data,
+  EVENT_print_tasks_exe_data,
+  EVENT_print_resource_data,
+  EVENT_print_time_data,
+  EVENT_print_mutation_data,
+  EVENT_print_mutation_rate_data,
+  EVENT_print_divide_mut_data,
+  EVENT_print_instruction_data,
+  EVENT_print_instruction_abundance_histogram,
+  EVENT_print_depth_histogram,
+  EVENT_print_genotype_abundance_histogram,
+  EVENT_print_species_abundance_histogram,
+  EVENT_print_lineage_totals,
+  EVENT_print_lineage_counts,
+  EVENT_print_dom,
+  EVENT_print_genotype_map,
+  EVENT_save_population,
+  EVENT_load_population,
+  EVENT_save_clone,
+  EVENT_load_clone,
+  EVENT_load_dump_file,
+  EVENT_dump_pop,
+  EVENT_detail_pop,
+  EVENT_dump_historic_pop,
+  EVENT_dump_memory,
+  EVENT_inject,
+  EVENT_inject_all,
+  EVENT_inject_range,
+  EVENT_inject_sequence,
+  EVENT_inject_random,
+  EVENT_zero_muts,
+  EVENT_mod_copy_mut,
+  EVENT_mod_div_mut,
+  EVENT_set_copy_mut,
+  EVENT_mod_point_mut,
+  EVENT_set_point_mut,
+  EVENT_calc_landscape,
+  EVENT_predict_w_landscape,
+  EVENT_predict_nu_landscape,
+  EVENT_sample_landscape,
+  EVENT_random_landscape,
+  EVENT_analyze_landscape,
+  EVENT_pairtest_landscape,
+  EVENT_test_dom,
+  EVENT_analyze_population,
+  EVENT_print_detailed_fitness_data,
+  EVENT_print_genetic_distance_data,
+  EVENT_genetic_distance_pop_dump,
+  EVENT_task_snapshot,
+  EVENT_print_viable_tasks_data,
+  EVENT_apocalypse,
+  EVENT_kill_rectangle,
+  EVENT_rate_kill,
+  EVENT_serial_transfer,
+  EVENT_hillclimb,
+  EVENT_hillclimb_neut,
+  EVENT_hillclimb_rand,
+  EVENT_calc_consensus,
+  EVENT_test_size_change_robustness,
+  EVENT_test_threads,
+  EVENT_print_threads,
+  EVENT_dump_fitness_grid,
+  EVENT_dump_genotype_grid,
+  EVENT_print_tree_depths,
+  EVENT_inject_resource,
+  EVENT_set_resource,
+EVENT_NO_EVENT };
Index: avida/current/source/event/cPopulation_event_list
diff -u /dev/null avida/current/source/event/cPopulation_event_list:1.2
--- /dev/null	Wed Jun  4 11:35:23 2003
+++ avida/current/source/event/cPopulation_event_list	Wed Jun  4 11:34:46 2003
@@ -0,0 +1,82 @@
+#### cPopulation-Events ####
+
+exit 
+exit_if_generation_greater_than  <int max_generation>
+exit_if_update_greater_than  <int max_update>
+exit_if_ave_lineage_label_smaller  <double lineage_label_crit_value>
+exit_if_ave_lineage_label_larger  <double lineage_label_crit_value>
+echo  <cString mesg>
+print_data  <cString filename> <cString format>
+print_average_data  [cString fname="average.dat"]
+print_error_data  [cString fname="error.dat"]
+print_variance_data  [cString fname="variance.dat"]
+print_dominant_data  [cString fname="dominant.dat"]
+print_stats_data  [cString fname="stats.dat"]
+print_count_data  [cString fname="count.dat"]
+print_totals_data  [cString fname="totals.dat"]
+print_tasks_data  [cString fname="tasks.dat"]
+print_tasks_exe_data  [cString fname="tasks_exe.dat"]
+print_resource_data  [cString fname="resource.dat"]
+print_time_data  [cString fname="time.dat"]
+print_mutation_data  [cString fname="mutation.dat"]
+print_mutation_rate_data  [cString fname="mutation_rates.dat"]
+print_divide_mut_data  [cString fname="divide_mut.dat"]
+print_instruction_data  [cString fname="instruction.dat"]
+print_instruction_abundance_histogram  [cString filename="instruction_histogram.dat"]
+print_depth_histogram  [cString filename="depth_histogram.dat"]
+print_genotype_abundance_histogram  [cString filename="genotype_abundance_histogram.dat"]
+print_species_abundance_histogram  [cString filename="species_abundance_histogram.dat"]
+print_lineage_totals  [cString fname="lineage_totals.dat"] [int verbose=1]
+print_lineage_counts  [cString fname="lineage_counts.dat"] [int verbose=0]
+print_dom  [cString in_filename=""]
+print_genotype_map  [cString fname="genotype_map.m"]
+save_population  [cString fname=""]
+load_population  <cString fname>
+save_clone  [cString fname=""]
+load_clone  <cString fname>
+load_dump_file  <cString fname> [int update=-1]
+dump_pop  [cString fname=""]
+detail_pop  [cString fname=""]
+dump_historic_pop  [cString fname=""]
+dump_memory  [cString fname=""]
+inject  [cString fname="START_CREATURE"] [int cell_id=0] [double merit=-1] [int lineage_label=0] [double neutral_metric=0]
+inject_all  [cString fname="START_CREATURE"] [double merit=-1] [int lineage_label=0] [double neutral_metric=0]
+inject_range  [cString fname="START_CREATURE"] [int start_cell=0] [int end_cell=-1] [double merit=-1] [int lineage_label=0] [double neutral_metric=0]
+inject_sequence  <cString seq> [int start_cell=0] [int end_cell=-1] [double merit=-1] [int lineage_label=0] [double neutral_metric=0]
+inject_random  <int length> [int cell_id=-1] [double merit=-1] [int lineage_label=0] [double neutral_metric=0]
+zero_muts 
+mod_copy_mut  <double cmut_inc> [int cell=-1]
+mod_div_mut  <double dmut_inc> [int cell=-1]
+set_copy_mut  <double cmut> [int start_cell=-1] [int end_cell=-1]
+mod_point_mut  <double pmut_inc> [int cell=-1]
+set_point_mut  <double pmut> [int cell=-1]
+calc_landscape  [int landscape_dist=1]
+predict_w_landscape  [cString datafile="land-predict.dat"]
+predict_nu_landscape  [cString datafile="land-predict.dat"]
+sample_landscape  [int sample_size=0]
+random_landscape  [int landscape_dist=1] [int sample_size=0] [int min_found=0] [int max_sample_size=0] [bool print_if_found=false]
+analyze_landscape  [int sample_size=1000] [int min_found=0] [int max_sample_size=0]
+pairtest_landscape  [int sample_size=0]
+test_dom 
+analyze_population  [double sample_prob=1] [int landscape=0] [int save_genotype=0] [cString filename=""]
+print_detailed_fitness_data  [int save_max_f_genotype=0] [int print_fitness_histo=0] [double hist_fmax=1] [double hist_fstep=0.1] [cString filename="fitness.dat"] [cString filename2="fitness_histos.dat"] [cString filename3="fitness_histos_testCPU.dat"]
+print_genetic_distance_data  [cString creature_name=""] [cString filename="genetic_distance.dat"]
+genetic_distance_pop_dump  [cString creature_name=""] [cString filename=""] [int save_genotype=0]
+task_snapshot  [cString filename=""]
+print_viable_tasks_data  [cString filename="viable_tasks.dat"]
+apocalypse  [double kill_prob=.9]
+kill_rectangle  [int cell_X1=0] [int cell_Y1=0] [int cell_X2=0] [int cell_Y2=0]
+rate_kill  <double kill_rate>
+serial_transfer  [int transfer_size=1] [int ignore_deads=1]
+hillclimb 
+hillclimb_neut 
+hillclimb_rand 
+calc_consensus  [int lines_saved=0]
+test_size_change_robustness  [int num_trials=100] [cString filename="size_change.dat"]
+test_threads 
+print_threads 
+dump_fitness_grid 
+dump_genotype_grid 
+print_tree_depths  [cString filename=""]
+inject_resource  <cString res_name> <double res_count>
+set_resource  <cString res_name> <double res_count>
Index: avida/current/source/event/cPopulation_name2enum_auto.ci
diff -u /dev/null avida/current/source/event/cPopulation_name2enum_auto.ci:1.2
--- /dev/null	Wed Jun  4 11:35:23 2003
+++ avida/current/source/event/cPopulation_name2enum_auto.ci	Wed Jun  4 11:34:46 2003
@@ -0,0 +1,167 @@
+int cPopulationEventFactory::EventNameToEnum(const cString & name) const{
+  if( name == "" ){
+    return cPopulationEventFactory::EVENT_NO_EVENT;
+  }else if (name == "exit") {
+    return cPopulationEventFactory::EVENT_exit;
+  }else if (name == "exit_if_generation_greater_than") {
+    return cPopulationEventFactory::EVENT_exit_if_generation_greater_than;
+  }else if (name == "exit_if_update_greater_than") {
+    return cPopulationEventFactory::EVENT_exit_if_update_greater_than;
+  }else if (name == "exit_if_ave_lineage_label_smaller") {
+    return cPopulationEventFactory::EVENT_exit_if_ave_lineage_label_smaller;
+  }else if (name == "exit_if_ave_lineage_label_larger") {
+    return cPopulationEventFactory::EVENT_exit_if_ave_lineage_label_larger;
+  }else if (name == "echo") {
+    return cPopulationEventFactory::EVENT_echo;
+  }else if (name == "print_data") {
+    return cPopulationEventFactory::EVENT_print_data;
+  }else if (name == "print_average_data") {
+    return cPopulationEventFactory::EVENT_print_average_data;
+  }else if (name == "print_error_data") {
+    return cPopulationEventFactory::EVENT_print_error_data;
+  }else if (name == "print_variance_data") {
+    return cPopulationEventFactory::EVENT_print_variance_data;
+  }else if (name == "print_dominant_data") {
+    return cPopulationEventFactory::EVENT_print_dominant_data;
+  }else if (name == "print_stats_data") {
+    return cPopulationEventFactory::EVENT_print_stats_data;
+  }else if (name == "print_count_data") {
+    return cPopulationEventFactory::EVENT_print_count_data;
+  }else if (name == "print_totals_data") {
+    return cPopulationEventFactory::EVENT_print_totals_data;
+  }else if (name == "print_tasks_data") {
+    return cPopulationEventFactory::EVENT_print_tasks_data;
+  }else if (name == "print_tasks_exe_data") {
+    return cPopulationEventFactory::EVENT_print_tasks_exe_data;
+  }else if (name == "print_resource_data") {
+    return cPopulationEventFactory::EVENT_print_resource_data;
+  }else if (name == "print_time_data") {
+    return cPopulationEventFactory::EVENT_print_time_data;
+  }else if (name == "print_mutation_data") {
+    return cPopulationEventFactory::EVENT_print_mutation_data;
+  }else if (name == "print_mutation_rate_data") {
+    return cPopulationEventFactory::EVENT_print_mutation_rate_data;
+  }else if (name == "print_divide_mut_data") {
+    return cPopulationEventFactory::EVENT_print_divide_mut_data;
+  }else if (name == "print_instruction_data") {
+    return cPopulationEventFactory::EVENT_print_instruction_data;
+  }else if (name == "print_instruction_abundance_histogram") {
+    return cPopulationEventFactory::EVENT_print_instruction_abundance_histogram;
+  }else if (name == "print_depth_histogram") {
+    return cPopulationEventFactory::EVENT_print_depth_histogram;
+  }else if (name == "print_genotype_abundance_histogram") {
+    return cPopulationEventFactory::EVENT_print_genotype_abundance_histogram;
+  }else if (name == "print_species_abundance_histogram") {
+    return cPopulationEventFactory::EVENT_print_species_abundance_histogram;
+  }else if (name == "print_lineage_totals") {
+    return cPopulationEventFactory::EVENT_print_lineage_totals;
+  }else if (name == "print_lineage_counts") {
+    return cPopulationEventFactory::EVENT_print_lineage_counts;
+  }else if (name == "print_dom") {
+    return cPopulationEventFactory::EVENT_print_dom;
+  }else if (name == "print_genotype_map") {
+    return cPopulationEventFactory::EVENT_print_genotype_map;
+  }else if (name == "save_population") {
+    return cPopulationEventFactory::EVENT_save_population;
+  }else if (name == "load_population") {
+    return cPopulationEventFactory::EVENT_load_population;
+  }else if (name == "save_clone") {
+    return cPopulationEventFactory::EVENT_save_clone;
+  }else if (name == "load_clone") {
+    return cPopulationEventFactory::EVENT_load_clone;
+  }else if (name == "load_dump_file") {
+    return cPopulationEventFactory::EVENT_load_dump_file;
+  }else if (name == "dump_pop") {
+    return cPopulationEventFactory::EVENT_dump_pop;
+  }else if (name == "detail_pop") {
+    return cPopulationEventFactory::EVENT_detail_pop;
+  }else if (name == "dump_historic_pop") {
+    return cPopulationEventFactory::EVENT_dump_historic_pop;
+  }else if (name == "dump_memory") {
+    return cPopulationEventFactory::EVENT_dump_memory;
+  }else if (name == "inject") {
+    return cPopulationEventFactory::EVENT_inject;
+  }else if (name == "inject_all") {
+    return cPopulationEventFactory::EVENT_inject_all;
+  }else if (name == "inject_range") {
+    return cPopulationEventFactory::EVENT_inject_range;
+  }else if (name == "inject_sequence") {
+    return cPopulationEventFactory::EVENT_inject_sequence;
+  }else if (name == "inject_random") {
+    return cPopulationEventFactory::EVENT_inject_random;
+  }else if (name == "zero_muts") {
+    return cPopulationEventFactory::EVENT_zero_muts;
+  }else if (name == "mod_copy_mut") {
+    return cPopulationEventFactory::EVENT_mod_copy_mut;
+  }else if (name == "mod_div_mut") {
+    return cPopulationEventFactory::EVENT_mod_div_mut;
+  }else if (name == "set_copy_mut") {
+    return cPopulationEventFactory::EVENT_set_copy_mut;
+  }else if (name == "mod_point_mut") {
+    return cPopulationEventFactory::EVENT_mod_point_mut;
+  }else if (name == "set_point_mut") {
+    return cPopulationEventFactory::EVENT_set_point_mut;
+  }else if (name == "calc_landscape") {
+    return cPopulationEventFactory::EVENT_calc_landscape;
+  }else if (name == "predict_w_landscape") {
+    return cPopulationEventFactory::EVENT_predict_w_landscape;
+  }else if (name == "predict_nu_landscape") {
+    return cPopulationEventFactory::EVENT_predict_nu_landscape;
+  }else if (name == "sample_landscape") {
+    return cPopulationEventFactory::EVENT_sample_landscape;
+  }else if (name == "random_landscape") {
+    return cPopulationEventFactory::EVENT_random_landscape;
+  }else if (name == "analyze_landscape") {
+    return cPopulationEventFactory::EVENT_analyze_landscape;
+  }else if (name == "pairtest_landscape") {
+    return cPopulationEventFactory::EVENT_pairtest_landscape;
+  }else if (name == "test_dom") {
+    return cPopulationEventFactory::EVENT_test_dom;
+  }else if (name == "analyze_population") {
+    return cPopulationEventFactory::EVENT_analyze_population;
+  }else if (name == "print_detailed_fitness_data") {
+    return cPopulationEventFactory::EVENT_print_detailed_fitness_data;
+  }else if (name == "print_genetic_distance_data") {
+    return cPopulationEventFactory::EVENT_print_genetic_distance_data;
+  }else if (name == "genetic_distance_pop_dump") {
+    return cPopulationEventFactory::EVENT_genetic_distance_pop_dump;
+  }else if (name == "task_snapshot") {
+    return cPopulationEventFactory::EVENT_task_snapshot;
+  }else if (name == "print_viable_tasks_data") {
+    return cPopulationEventFactory::EVENT_print_viable_tasks_data;
+  }else if (name == "apocalypse") {
+    return cPopulationEventFactory::EVENT_apocalypse;
+  }else if (name == "kill_rectangle") {
+    return cPopulationEventFactory::EVENT_kill_rectangle;
+  }else if (name == "rate_kill") {
+    return cPopulationEventFactory::EVENT_rate_kill;
+  }else if (name == "serial_transfer") {
+    return cPopulationEventFactory::EVENT_serial_transfer;
+  }else if (name == "hillclimb") {
+    return cPopulationEventFactory::EVENT_hillclimb;
+  }else if (name == "hillclimb_neut") {
+    return cPopulationEventFactory::EVENT_hillclimb_neut;
+  }else if (name == "hillclimb_rand") {
+    return cPopulationEventFactory::EVENT_hillclimb_rand;
+  }else if (name == "calc_consensus") {
+    return cPopulationEventFactory::EVENT_calc_consensus;
+  }else if (name == "test_size_change_robustness") {
+    return cPopulationEventFactory::EVENT_test_size_change_robustness;
+  }else if (name == "test_threads") {
+    return cPopulationEventFactory::EVENT_test_threads;
+  }else if (name == "print_threads") {
+    return cPopulationEventFactory::EVENT_print_threads;
+  }else if (name == "dump_fitness_grid") {
+    return cPopulationEventFactory::EVENT_dump_fitness_grid;
+  }else if (name == "dump_genotype_grid") {
+    return cPopulationEventFactory::EVENT_dump_genotype_grid;
+  }else if (name == "print_tree_depths") {
+    return cPopulationEventFactory::EVENT_print_tree_depths;
+  }else if (name == "inject_resource") {
+    return cPopulationEventFactory::EVENT_inject_resource;
+  }else if (name == "set_resource") {
+    return cPopulationEventFactory::EVENT_set_resource;
+  }else{
+    return cPopulationEventFactory::EVENT_undefined;
+  }
+}
Index: avida/current/source/event/cPopulation_process_auto.ci
diff -u /dev/null avida/current/source/event/cPopulation_process_auto.ci:1.2
--- /dev/null	Wed Jun  4 11:35:23 2003
+++ avida/current/source/event/cPopulation_process_auto.ci	Wed Jun  4 11:34:46 2003
@@ -0,0 +1,2427 @@
+///// exit /////
+
+/**
+* Ends the Avida run immediately.
+**/
+
+
+class cPopulationEventexit : public cPopulationEvent {
+private:
+public:
+  cPopulationEventexit(const cString & in_args):
+   cPopulationEvent("exit", in_args) {
+ (void)in_args; }
+///// exit /////
+  void Process(){
+    cAvidaDriver_Base::main_driver->SetDone();
+  }
+};
+
+///// exit_if_generation_greater_than /////
+
+/**
+* Ends the Avida run when the current generation exceeds the
+* maximum generation given as parameter.
+*
+* Parameters:
+* max generation (int)
+*   The generation at which the run should be stopped.
+**/
+
+
+class cPopulationEventexit_if_generation_greater_than : public cPopulationEvent {
+private:
+  int max_generation;
+public:
+  cPopulationEventexit_if_generation_greater_than(const cString & in_args):
+   cPopulationEvent("exit_if_generation_greater_than", in_args) {
+
+    cString args(in_args);
+    max_generation = args.PopWord().AsInt();
+  }
+///// exit_if_generation_greater_than /////
+  void Process(){
+    if( population->GetGeneration() > max_generation ){
+      cAvidaDriver_Base::main_driver->SetDone();
+    }
+  }
+};
+
+///// exit_if_update_greater_than /////
+
+/**
+* Ends the Avida run when the current update exceeds the
+* maximum update given as parameter.
+*
+* Parameters:
+* max update (int)
+*   The update at which the run should be stopped.
+**/
+
+
+class cPopulationEventexit_if_update_greater_than : public cPopulationEvent {
+private:
+  int max_update;
+public:
+  cPopulationEventexit_if_update_greater_than(const cString & in_args):
+   cPopulationEvent("exit_if_update_greater_than", in_args) {
+
+    cString args(in_args);
+    max_update = args.PopWord().AsInt();
+  }
+///// exit_if_update_greater_than /////
+  void Process(){
+    if( population->GetUpdate() > max_update ){
+      cAvidaDriver_Base::main_driver->SetDone();
+    }
+  }
+};
+
+///// exit_if_ave_lineage_label_smaller /////
+
+/**
+* Halts the avida run if the current average lineage label is smaller
+* than the value given as parameter.
+*
+* Parameters:
+* lineage_label_crit_value (int)
+*   The critical value to which the average lineage label is compared.
+**/
+
+
+class cPopulationEventexit_if_ave_lineage_label_smaller : public cPopulationEvent {
+private:
+  double lineage_label_crit_value;
+public:
+  cPopulationEventexit_if_ave_lineage_label_smaller(const cString & in_args):
+   cPopulationEvent("exit_if_ave_lineage_label_smaller", in_args) {
+
+    cString args(in_args);
+    lineage_label_crit_value = args.PopWord().AsDouble();
+  }
+///// exit_if_ave_lineage_label_smaller /////
+  void Process(){
+    if( population->GetStats().GetAveLineageLabel() < lineage_label_crit_value ){
+      cAvidaDriver_Base::main_driver->SetDone();
+    }
+  }
+};
+
+///// exit_if_ave_lineage_label_larger /////
+
+/**
+* Halts the avida run if the current average lineage label is larger
+* than the value given as parameter.
+*
+* Parameters:
+* lineage_label_crit_value (int)
+*   The critical value to which the average lineage label is compared.
+**/
+
+
+class cPopulationEventexit_if_ave_lineage_label_larger : public cPopulationEvent {
+private:
+  double lineage_label_crit_value;
+public:
+  cPopulationEventexit_if_ave_lineage_label_larger(const cString & in_args):
+   cPopulationEvent("exit_if_ave_lineage_label_larger", in_args) {
+
+    cString args(in_args);
+    lineage_label_crit_value = args.PopWord().AsDouble();
+  }
+///// exit_if_ave_lineage_label_larger /////
+  void Process(){
+    if( population->GetStats().GetAveLineageLabel() > lineage_label_crit_value ){
+      cAvidaDriver_Base::main_driver->SetDone();
+    }
+  }
+};
+
+///// echo /////
+
+/**
+* Writes out a message. If no message is given, average update and
+* generation are written out.
+*
+* Parameters:
+* message (string)
+**/
+
+
+class cPopulationEventecho : public cPopulationEvent {
+private:
+  cString mesg;
+public:
+  cPopulationEventecho(const cString & in_args):
+   cPopulationEvent("echo", in_args) {
+
+    cString args(in_args);
+    mesg = args.PopWord();
+  }
+///// echo /////
+  void Process(){
+    if( mesg == "" ){
+       mesg.Set("Echo : Update = %f\t AveGeneration = %f",
+    	     population->GetUpdate(), population->GetGeneration());
+    }
+    cAvidaDriver_Base::main_driver->NotifyComment(mesg);
+  }
+};
+
+///// print_data /////
+
+/**
+* Output user-defined data from the cStats object...
+*
+* Parameters:
+* filename (string)
+*   The name of the data file.
+* format
+*   A comma-seperated list of statistics to output.
+**/
+
+
+class cPopulationEventprint_data : public cPopulationEvent {
+private:
+  cString filename;
+  cString format;
+public:
+  cPopulationEventprint_data(const cString & in_args):
+   cPopulationEvent("print_data", in_args) {
+
+    cString args(in_args);
+    filename = args.PopWord();
+    format = args.PopWord();
+  }
+///// print_data /////
+  void Process(){
+    population->GetStats().PrintDataFile(filename, format, ',');
+  }
+};
+
+///// print_average_data /////
+
+/**
+* Output various average quantities into datafile.
+*
+* Parameters:
+* filename (string) default: average.dat
+*   The name of the data file.
+**/
+
+
+class cPopulationEventprint_average_data : public cPopulationEvent {
+private:
+  cString fname;
+public:
+  cPopulationEventprint_average_data(const cString & in_args):
+   cPopulationEvent("print_average_data", in_args) {
+
+    cString args(in_args);
+    if (args == "") fname="average.dat"; else fname=args.PopWord();
+  }
+///// print_average_data /////
+  void Process(){
+    population->GetStats().PrintAverageData(fname);
+  }
+};
+
+///// print_error_data /////
+
+/**
+* Prints out various data related to statistical errors.
+*
+* Parameters:
+* filename (string) default: error.dat
+*   The name of the data file.
+**/
+
+
+class cPopulationEventprint_error_data : public cPopulationEvent {
+private:
+  cString fname;
+public:
+  cPopulationEventprint_error_data(const cString & in_args):
+   cPopulationEvent("print_error_data", in_args) {
+
+    cString args(in_args);
+    if (args == "") fname="error.dat"; else fname=args.PopWord();
+  }
+///// print_error_data /////
+  void Process(){
+    population->GetStats().PrintErrorData(fname);
+  }
+};
+
+///// print_variance_data /////
+
+/**
+* Prints out various variances.
+*
+* Parameters:
+* filename (string) default: variance.dat
+*   The name of the data file.
+**/
+
+
+class cPopulationEventprint_variance_data : public cPopulationEvent {
+private:
+  cString fname;
+public:
+  cPopulationEventprint_variance_data(const cString & in_args):
+   cPopulationEvent("print_variance_data", in_args) {
+
+    cString args(in_args);
+    if (args == "") fname="variance.dat"; else fname=args.PopWord();
+  }
+///// print_variance_data /////
+  void Process(){
+    population->GetStats().PrintVarianceData(fname);
+  }
+};
+
+///// print_dominant_data /////
+
+/**
+* Output various quantities related to the dominant organism.
+*
+* Parameters:
+* filename (string) default: dominant.dat
+*   The name of the data file.
+**/
+
+
+class cPopulationEventprint_dominant_data : public cPopulationEvent {
+private:
+  cString fname;
+public:
+  cPopulationEventprint_dominant_data(const cString & in_args):
+   cPopulationEvent("print_dominant_data", in_args) {
+
+    cString args(in_args);
+    if (args == "") fname="dominant.dat"; else fname=args.PopWord();
+  }
+///// print_dominant_data /////
+  void Process(){
+    population->GetStats().PrintDominantData(fname);
+  }
+};
+
+///// print_stats_data /////
+
+/**
+* Output various statistical quantities.
+*
+* Parameters:
+* filename (string) default: stats.dat
+*   The name of the data file.
+**/
+
+
+class cPopulationEventprint_stats_data : public cPopulationEvent {
+private:
+  cString fname;
+public:
+  cPopulationEventprint_stats_data(const cString & in_args):
+   cPopulationEvent("print_stats_data", in_args) {
+
+    cString args(in_args);
+    if (args == "") fname="stats.dat"; else fname=args.PopWord();
+  }
+///// print_stats_data /////
+  void Process(){
+    population->GetStats().PrintStatsData(fname);
+  }
+};
+
+///// print_count_data /////
+
+/**
+* Output various counts, such as number of organisms etc.
+*
+* Parameters:
+* filename (string) default: count.dat
+*   The name of the data file.
+**/
+
+
+class cPopulationEventprint_count_data : public cPopulationEvent {
+private:
+  cString fname;
+public:
+  cPopulationEventprint_count_data(const cString & in_args):
+   cPopulationEvent("print_count_data", in_args) {
+
+    cString args(in_args);
+    if (args == "") fname="count.dat"; else fname=args.PopWord();
+  }
+///// print_count_data /////
+  void Process(){
+    population->GetStats().PrintCountData(fname);
+  }
+};
+
+///// print_totals_data /////
+
+/**
+* Various total numbers.
+*
+* Parameters:
+* filename (string) default: totals.dat
+*   The name of the data file.
+**/
+
+
+class cPopulationEventprint_totals_data : public cPopulationEvent {
+private:
+  cString fname;
+public:
+  cPopulationEventprint_totals_data(const cString & in_args):
+   cPopulationEvent("print_totals_data", in_args) {
+
+    cString args(in_args);
+    if (args == "") fname="totals.dat"; else fname=args.PopWord();
+  }
+///// print_totals_data /////
+  void Process(){
+    population->GetStats().PrintTotalsData(fname);
+  }
+};
+
+///// print_tasks_data /////
+
+/**
+* Output the number of times the various tasks have been performed in the
+* last update.
+*
+* Parameters:
+* filename (string) default: tasks.dat
+*   The name of the data file.
+**/
+
+
+class cPopulationEventprint_tasks_data : public cPopulationEvent {
+private:
+  cString fname;
+public:
+  cPopulationEventprint_tasks_data(const cString & in_args):
+   cPopulationEvent("print_tasks_data", in_args) {
+
+    cString args(in_args);
+    if (args == "") fname="tasks.dat"; else fname=args.PopWord();
+  }
+///// print_tasks_data /////
+  void Process(){
+    population->GetStats().PrintTasksData(fname);
+  }
+};
+
+///// print_tasks_exe_data /////
+
+/**
+**/
+
+
+class cPopulationEventprint_tasks_exe_data : public cPopulationEvent {
+private:
+  cString fname;
+public:
+  cPopulationEventprint_tasks_exe_data(const cString & in_args):
+   cPopulationEvent("print_tasks_exe_data", in_args) {
+
+    cString args(in_args);
+    if (args == "") fname="tasks_exe.dat"; else fname=args.PopWord();
+  }
+///// print_tasks_exe_data /////
+  void Process(){
+    population->GetStats().PrintTasksExeData(fname);
+  }
+};
+
+///// print_resource_data /////
+
+/**
+**/
+
+
+class cPopulationEventprint_resource_data : public cPopulationEvent {
+private:
+  cString fname;
+public:
+  cPopulationEventprint_resource_data(const cString & in_args):
+   cPopulationEvent("print_resource_data", in_args) {
+
+    cString args(in_args);
+    if (args == "") fname="resource.dat"; else fname=args.PopWord();
+  }
+///// print_resource_data /////
+  void Process(){
+    population->GetStats().PrintResourceData(fname);
+  }
+};
+
+///// print_time_data /////
+
+/**
+* Output time related data, such as update, generation, etc.
+*
+* Parameters:
+* filename (string) default: time.dat
+*   The name of the data file.
+**/
+
+
+class cPopulationEventprint_time_data : public cPopulationEvent {
+private:
+  cString fname;
+public:
+  cPopulationEventprint_time_data(const cString & in_args):
+   cPopulationEvent("print_time_data", in_args) {
+
+    cString args(in_args);
+    if (args == "") fname="time.dat"; else fname=args.PopWord();
+  }
+///// print_time_data /////
+  void Process(){
+    population->GetStats().PrintTimeData(fname);
+  }
+};
+
+///// print_mutation_data /////
+
+/**
+**/
+
+
+class cPopulationEventprint_mutation_data : public cPopulationEvent {
+private:
+  cString fname;
+public:
+  cPopulationEventprint_mutation_data(const cString & in_args):
+   cPopulationEvent("print_mutation_data", in_args) {
+
+    cString args(in_args);
+    if (args == "") fname="mutation.dat"; else fname=args.PopWord();
+  }
+///// print_mutation_data /////
+  void Process(){
+    population->GetStats().PrintMutationData(fname);
+  }
+};
+
+///// print_mutation_rate_data /////
+
+/**
+Output (regular and log) statistics about individual copy
+mutation rates (aver, stdev, skew, cur).
+Useful only when mutation rate is set per organism.
+**/
+
+
+class cPopulationEventprint_mutation_rate_data : public cPopulationEvent {
+private:
+  cString fname;
+public:
+  cPopulationEventprint_mutation_rate_data(const cString & in_args):
+   cPopulationEvent("print_mutation_rate_data", in_args) {
+
+    cString args(in_args);
+    if (args == "") fname="mutation_rates.dat"; else fname=args.PopWord();
+  }
+///// print_mutation_rate_data /////
+  void Process(){
+    population->GetStats().PrintMutationRateData(fname);
+  }
+};
+
+///// print_divide_mut_data /////
+
+/**
+Output (regular and log) statistics about individual, per site,
+rates divide mutation rates (aver, stdev, skew, cur).
+Use with multiple divide instuction set.
+**/
+
+
+class cPopulationEventprint_divide_mut_data : public cPopulationEvent {
+private:
+  cString fname;
+public:
+  cPopulationEventprint_divide_mut_data(const cString & in_args):
+   cPopulationEvent("print_divide_mut_data", in_args) {
+
+    cString args(in_args);
+    if (args == "") fname="divide_mut.dat"; else fname=args.PopWord();
+  }
+///// print_divide_mut_data /////
+  void Process(){
+    population->GetStats().PrintDivideMutData(fname);
+  }
+};
+
+///// print_instruction_data /////
+
+/**
+Sum of the by-organisms counts of what instructions they _successfully_
+execute beteween birth and divide. Prior to their first divide, organisms
+report values for their parents.
+**/
+
+
+class cPopulationEventprint_instruction_data : public cPopulationEvent {
+private:
+  cString fname;
+public:
+  cPopulationEventprint_instruction_data(const cString & in_args):
+   cPopulationEvent("print_instruction_data", in_args) {
+
+    cString args(in_args);
+    if (args == "") fname="instruction.dat"; else fname=args.PopWord();
+  }
+///// print_instruction_data /////
+  void Process(){
+    population->GetStats().PrintInstructionData(fname);
+  }
+};
+
+///// print_instruction_abundance_histogram /////
+
+/**
+*
+* Appends a line containing the bulk count (abundance) of
+* each instruction in the population onto a file.
+* 
+* Parameters:
+* filename (string) default: "instruction_histogram.dat"
+*
+**/
+
+
+class cPopulationEventprint_instruction_abundance_histogram : public cPopulationEvent {
+private:
+  cString filename;
+public:
+  cPopulationEventprint_instruction_abundance_histogram(const cString & in_args):
+   cPopulationEvent("print_instruction_abundance_histogram", in_args) {
+
+    cString args(in_args);
+    if (args == "") filename="instruction_histogram.dat"; else filename=args.PopWord();
+  }
+///// print_instruction_abundance_histogram /////
+  void Process(){
+    ofstream & fp = population->GetStats().GetDataFileOFStream(filename);
+    cAnalyzeUtil::PrintInstructionAbundanceHistogram(fp, population);
+  }
+};
+
+///// print_depth_histogram /////
+
+/**
+**/
+
+
+class cPopulationEventprint_depth_histogram : public cPopulationEvent {
+private:
+  cString filename;
+public:
+  cPopulationEventprint_depth_histogram(const cString & in_args):
+   cPopulationEvent("print_depth_histogram", in_args) {
+
+    cString args(in_args);
+    if (args == "") filename="depth_histogram.dat"; else filename=args.PopWord();
+  }
+///// print_depth_histogram /////
+  void Process(){
+    ofstream & fp = population->GetStats().GetDataFileOFStream(filename);
+    cAnalyzeUtil::PrintDepthHistogram(fp, population);
+  }
+};
+
+///// print_genotype_abundance_histogram /////
+
+/**
+* Writes out a genotype abundance histogram.
+*
+* Parameters:
+* filename (string) default: genotype_abundance_histogram.dat
+*   The name of the file into which the histogram is written.
+**/
+
+
+class cPopulationEventprint_genotype_abundance_histogram : public cPopulationEvent {
+private:
+  cString filename;
+public:
+  cPopulationEventprint_genotype_abundance_histogram(const cString & in_args):
+   cPopulationEvent("print_genotype_abundance_histogram", in_args) {
+
+    cString args(in_args);
+    if (args == "") filename="genotype_abundance_histogram.dat"; else filename=args.PopWord();
+  }
+///// print_genotype_abundance_histogram /////
+  void Process(){
+    ofstream & fp = population->GetStats().GetDataFileOFStream(filename);
+    cAnalyzeUtil::PrintGenotypeAbundanceHistogram(fp, population);
+  }
+};
+
+///// print_species_abundance_histogram /////
+
+/**
+* Writes out a species abundance histogram.
+*
+* Parameters:
+* filename (string) default: species_abundance_histogram.dat
+*   The name of the file into which the histogram is written.
+**/
+
+
+class cPopulationEventprint_species_abundance_histogram : public cPopulationEvent {
+private:
+  cString filename;
+public:
+  cPopulationEventprint_species_abundance_histogram(const cString & in_args):
+   cPopulationEvent("print_species_abundance_histogram", in_args) {
+
+    cString args(in_args);
+    if (args == "") filename="species_abundance_histogram.dat"; else filename=args.PopWord();
+  }
+///// print_species_abundance_histogram /////
+  void Process(){
+    ofstream & fp = population->GetStats().GetDataFileOFStream(filename);
+    cAnalyzeUtil::PrintSpeciesAbundanceHistogram(fp, population);
+  }
+};
+
+///// print_lineage_totals /////
+
+/**
+**/
+
+
+class cPopulationEventprint_lineage_totals : public cPopulationEvent {
+private:
+  cString fname;
+  int verbose;
+public:
+  cPopulationEventprint_lineage_totals(const cString & in_args):
+   cPopulationEvent("print_lineage_totals", in_args) {
+
+    cString args(in_args);
+    if (args == "") fname="lineage_totals.dat"; else fname=args.PopWord();
+    if (args == "") verbose=1; else verbose=args.PopWord().AsInt();
+  }
+///// print_lineage_totals /////
+  void Process(){
+    static bool msg_printed = false;
+    if (population->GetLineageControl() == NULL) {
+      if ( msg_printed == false ){
+        ofstream & fp = population->GetStats().GetDataFileOFStream(fname);
+        fp << "No lineage data available!" << endl;
+        msg_printed = true;
+      }
+      return;
+    }
+    population->GetLineageControl()->PrintLineageTotals(fname, verbose);
+  }
+};
+
+///// print_lineage_counts /////
+
+/**
+**/
+
+
+class cPopulationEventprint_lineage_counts : public cPopulationEvent {
+private:
+  cString fname;
+  int verbose;
+public:
+  cPopulationEventprint_lineage_counts(const cString & in_args):
+   cPopulationEvent("print_lineage_counts", in_args) {
+
+    cString args(in_args);
+    if (args == "") fname="lineage_counts.dat"; else fname=args.PopWord();
+    if (args == "") verbose=0; else verbose=args.PopWord().AsInt();
+  }
+///// print_lineage_counts /////
+  void Process(){
+    static bool msg_printed = false;
+    if (population->GetLineageControl() == NULL) {
+      if ( msg_printed == false ){
+        ofstream & fp = population->GetStats().GetDataFileOFStream(fname);
+        fp << "No lineage data available!" << endl;
+        msg_printed = true;
+      }
+      return;
+    }
+    if (verbose) {    // verbose mode is the same in both methods
+      population->GetLineageControl()->PrintLineageTotals(fname, verbose);
+      return;
+    }
+    population->GetLineageControl()->PrintLineageCurCounts(fname);
+  }
+};
+
+///// print_dom /////
+
+/**
+* Write the currently dominant genotype to disk.
+*
+* Parameters:
+* filename (string)
+*   The name under which the genotype should be saved. If no
+*   filename is given, the genotype is saved into the directory
+*   genebank, under the name that the genebank has associated with
+*   this genotype.
+**/
+
+
+class cPopulationEventprint_dom : public cPopulationEvent {
+private:
+  cString in_filename;
+public:
+  cPopulationEventprint_dom(const cString & in_args):
+   cPopulationEvent("print_dom", in_args) {
+
+    cString args(in_args);
+    if (args == "") in_filename=""; else in_filename=args.PopWord();
+  }
+///// print_dom /////
+  void Process(){
+    cGenotype * dom = population->GetGenebank().GetBestGenotype();
+    cString filename(in_filename);
+    if (filename == "") filename.Set("genebank/%s", dom->GetName()());
+    cTestUtil::PrintGenome(dom->GetGenome(), filename, dom, population->GetUpdate());
+  }
+};
+
+///// print_genotype_map /////
+
+/**
+* write a matrix of genotype ID's to a file (matlab format)
+**/
+
+
+class cPopulationEventprint_genotype_map : public cPopulationEvent {
+private:
+  cString fname;
+public:
+  cPopulationEventprint_genotype_map(const cString & in_args):
+   cPopulationEvent("print_genotype_map", in_args) {
+
+    cString args(in_args);
+    if (args == "") fname="genotype_map.m"; else fname=args.PopWord();
+  }
+///// print_genotype_map /////
+  void Process(){
+    population->GetStats().PrintGenotypeMap(fname);
+  }
+};
+
+///// save_population /////
+
+/**
+* Saves the full state of the population.
+*
+* Parameters:
+* filename (string) default: save_pop.*
+*   The name of the file into which the population should
+*   be saved. If it is not given, then the name 'save_pop.*'
+*   is used, with '*' replaced by the current update.
+**/
+
+
+class cPopulationEventsave_population : public cPopulationEvent {
+private:
+  cString fname;
+public:
+  cPopulationEventsave_population(const cString & in_args):
+   cPopulationEvent("save_population", in_args) {
+
+    cString args(in_args);
+    if (args == "") fname=""; else fname=args.PopWord();
+  }
+///// save_population /////
+  void Process(){
+    cString filename;
+    if( fname == "" ){
+      filename.Set("save_pop.%d", population->GetUpdate());
+    }
+    ofstream fp(filename());
+    population->SavePopulation(fp);
+  }
+};
+
+///// load_population /////
+
+/**
+* Loads the full state of the population.
+*
+* Parameters:
+* filename (string)
+*   The name of the file to open.
+**/
+
+
+class cPopulationEventload_population : public cPopulationEvent {
+private:
+  cString fname;
+public:
+  cPopulationEventload_population(const cString & in_args):
+   cPopulationEvent("load_population", in_args) {
+
+    cString args(in_args);
+    fname = args.PopWord();
+  }
+///// load_population /////
+  void Process(){
+    ifstream fp(fname());
+    population->LoadPopulation(fp);
+  }
+};
+
+///// save_clone /////
+
+/**
+**/
+
+
+class cPopulationEventsave_clone : public cPopulationEvent {
+private:
+  cString fname;
+public:
+  cPopulationEventsave_clone(const cString & in_args):
+   cPopulationEvent("save_clone", in_args) {
+
+    cString args(in_args);
+    if (args == "") fname=""; else fname=args.PopWord();
+  }
+///// save_clone /////
+  void Process(){
+    cString filename;
+    if( fname == "" ){
+      filename.Set("clone.%d", population->GetUpdate());
+    }
+    ofstream fp(filename());
+    population->SaveClone(fp);
+  }
+};
+
+///// load_clone /////
+
+/**
+**/
+
+
+class cPopulationEventload_clone : public cPopulationEvent {
+private:
+  cString fname;
+public:
+  cPopulationEventload_clone(const cString & in_args):
+   cPopulationEvent("load_clone", in_args) {
+
+    cString args(in_args);
+    fname = args.PopWord();
+  }
+///// load_clone /////
+  void Process(){
+    ifstream fp(fname());
+    population->LoadClone(fp);
+  }
+};
+
+///// load_dump_file /////
+
+/**
+* Sets up a population based on a dump file such as written out by
+* detail_pop. It is also possible to append a history file to the dump
+* file, in order to preserve the history of a previous run.
+**/
+
+
+class cPopulationEventload_dump_file : public cPopulationEvent {
+private:
+  cString fname;
+  int update;
+public:
+  cPopulationEventload_dump_file(const cString & in_args):
+   cPopulationEvent("load_dump_file", in_args) {
+
+    cString args(in_args);
+    fname = args.PopWord();
+    if (args == "") update=-1; else update=args.PopWord().AsInt();
+  }
+///// load_dump_file /////
+  void Process(){
+    population->LoadDumpFile(fname, update);
+  }
+};
+
+///// dump_pop /////
+
+/**
+* Writes out a line of data for each genotype in the current population. The
+* line contains the genome as string, the number of organisms of that genotype,
+* and the genotype ID.
+*
+* Parameters:
+* filename (string) default: "dump.<update>"
+*   The name of the file into which the population dump should be written.
+**/
+
+
+class cPopulationEventdump_pop : public cPopulationEvent {
+private:
+  cString fname;
+public:
+  cPopulationEventdump_pop(const cString & in_args):
+   cPopulationEvent("dump_pop", in_args) {
+
+    cString args(in_args);
+    if (args == "") fname=""; else fname=args.PopWord();
+  }
+///// dump_pop /////
+  void Process(){
+    cString filename;
+    if( fname == "" ){
+      filename.Set("dump.%d", population->GetUpdate());
+    }
+    ofstream fp(filename());
+    population->GetGenebank().DumpTextSummary(fp);
+  }
+};
+
+///// detail_pop /////
+
+/**
+* Like dump_pop, but more detailed data is written out.
+*
+* Parameters:
+* filename (string) default: "detail_pop.<update>"
+*   The name of the file into which the population dump should be written.
+**/
+
+
+class cPopulationEventdetail_pop : public cPopulationEvent {
+private:
+  cString fname;
+public:
+  cPopulationEventdetail_pop(const cString & in_args):
+   cPopulationEvent("detail_pop", in_args) {
+
+    cString args(in_args);
+    if (args == "") fname=""; else fname=args.PopWord();
+  }
+///// detail_pop /////
+  void Process(){
+    cString filename;
+    if( fname == "" ){
+      filename.Set("detail_pop.%d", population->GetUpdate());
+    }
+    ofstream fp(filename());
+    population->GetGenebank().DumpDetailedSummary(fp);
+  }
+};
+
+///// dump_historic_pop /////
+
+/**
+* Similar to detail_pop. However, only genotypes that are not in the
+* current population anymore are included. Genotypes that are not in
+* the line of descent of any of the current genotypes to the ultimate
+* ancestor are excluded.
+*
+* Parameters:
+* filename (string) default: "historic_dump.<update>"
+*   The name of the file into which the historic dump should be written.
+**/
+
+
+class cPopulationEventdump_historic_pop : public cPopulationEvent {
+private:
+  cString fname;
+public:
+  cPopulationEventdump_historic_pop(const cString & in_args):
+   cPopulationEvent("dump_historic_pop", in_args) {
+
+    cString args(in_args);
+    if (args == "") fname=""; else fname=args.PopWord();
+  }
+///// dump_historic_pop /////
+  void Process(){
+    cString filename;
+    if( fname == "" ){
+      filename.Set("historic_dump.%d", population->GetUpdate());
+    }
+    ofstream fp(filename());
+    population->GetGenebank().DumpHistoricSummary(fp);
+  }
+};
+
+///// dump_memory /////
+
+/**
+* Dump the current memory state of all CPUs to a file.
+**/
+
+
+class cPopulationEventdump_memory : public cPopulationEvent {
+private:
+  cString fname;
+public:
+  cPopulationEventdump_memory(const cString & in_args):
+   cPopulationEvent("dump_memory", in_args) {
+
+    cString args(in_args);
+    if (args == "") fname=""; else fname=args.PopWord();
+  }
+///// dump_memory /////
+  void Process(){
+    cString filename;
+    if (fname == "") {
+      filename.Set("memory_dump.%d", population->GetUpdate());
+    }
+    ofstream fp(filename());
+    population->DumpMemorySummary(fp);
+  }
+};
+
+///// inject /////
+
+/**
+* Injects a single organism into the population.
+*
+* Parameters:
+* filename (string)
+*   The filename of the genotype to load. If this is left empty, or the keyword
+*   "START_CREATURE" is given, than the genotype specified in the genesis
+*   file under "START_CREATURE" is used.
+* cell ID (integer) default: 0
+*   The grid-point into which the organism should be placed.
+* merit (double) default: -1
+*   The initial merit of the organism. If set to -1, this is ignored.
+* lineage label (integer) default: 0
+*   An integer that marks all descendants of this organism.
+* neutral metric (double) default: 0
+*   A double value that randomly drifts over time.
+**/
+
+
+class cPopulationEventinject : public cPopulationEvent {
+private:
+  cString fname;
+  int cell_id;
+  double merit;
+  int lineage_label;
+  double neutral_metric;
+public:
+  cPopulationEventinject(const cString & in_args):
+   cPopulationEvent("inject", in_args) {
+
+    cString args(in_args);
+    if (args == "") fname="START_CREATURE"; else fname=args.PopWord();
+    if (args == "") cell_id=0; else cell_id=args.PopWord().AsInt();
+    if (args == "") merit=-1; else merit=args.PopWord().AsDouble();
+    if (args == "") lineage_label=0; else lineage_label=args.PopWord().AsInt();
+    if (args == "") neutral_metric=0; else neutral_metric=args.PopWord().AsDouble();
+  }
+///// inject /////
+  void Process(){
+    if (fname == "START_CREATURE") fname=cConfig::GetStartCreature();
+    cGenome genome =
+       cInstUtil::LoadGenome(fname, population->GetEnvironment().GetInstSet());
+    population->Inject(genome, cell_id, merit, lineage_label, neutral_metric);
+  }
+};
+
+///// inject_all /////
+
+/**
+* Injects identical organisms into all cells of the population.
+*
+* Parameters:
+* filename (string)
+*   The filename of the genotype to load. If this is left empty, or the keyword
+*   "START_CREATURE" is given, than the genotype specified in the genesis
+*   file under "START_CREATURE" is used.
+* merit (double) default: -1
+*   The initial merit of the organism. If set to -1, this is ignored.
+* lineage label (integer) default: 0
+*   An integer that marks all descendants of this organism.
+* neutral metric (double) default: 0
+*   A double value that randomly drifts over time.
+**/
+
+
+class cPopulationEventinject_all : public cPopulationEvent {
+private:
+  cString fname;
+  double merit;
+  int lineage_label;
+  double neutral_metric;
+public:
+  cPopulationEventinject_all(const cString & in_args):
+   cPopulationEvent("inject_all", in_args) {
+
+    cString args(in_args);
+    if (args == "") fname="START_CREATURE"; else fname=args.PopWord();
+    if (args == "") merit=-1; else merit=args.PopWord().AsDouble();
+    if (args == "") lineage_label=0; else lineage_label=args.PopWord().AsInt();
+    if (args == "") neutral_metric=0; else neutral_metric=args.PopWord().AsDouble();
+  }
+///// inject_all /////
+  void Process(){
+    if (fname == "START_CREATURE") fname=cConfig::GetStartCreature();
+    cGenome genome =
+       cInstUtil::LoadGenome(fname, population->GetEnvironment().GetInstSet());
+    for (int i = 0; i < population->GetSize(); i++) {
+      population->Inject(genome, i, merit, lineage_label, neutral_metric);
+    }
+    population->SetSyncEvents(true);
+  }
+};
+
+///// inject_range /////
+
+/**
+* Injects identical organisms into a range of cells of the population.
+*
+* Parameters:
+* filename (string)
+*   The filename of the genotype to load. If this is left empty, or the keyword
+*   "START_CREATURE" is given, than the genotype specified in the genesis
+*   file under "START_CREATURE" is used.
+* start_cell (int)
+*   First cell to inject into.
+* stop_cell (int)
+*   First cell *not* to inject into.
+* merit (double) default: -1
+*   The initial merit of the organism. If set to -1, this is ignored.
+* lineage label (integer) default: 0
+*   An integer that marks all descendants of this organism.
+* neutral metric (double) default: 0
+*   A double value that randomly drifts over time.
+*
+* Example:
+*   inject_range creature.gen 0 10
+*
+* Will inject 10 organisms into cells 0 through 9.
+**/
+
+
+class cPopulationEventinject_range : public cPopulationEvent {
+private:
+  cString fname;
+  int start_cell;
+  int end_cell;
+  double merit;
+  int lineage_label;
+  double neutral_metric;
+public:
+  cPopulationEventinject_range(const cString & in_args):
+   cPopulationEvent("inject_range", in_args) {
+
+    cString args(in_args);
+    if (args == "") fname="START_CREATURE"; else fname=args.PopWord();
+    if (args == "") start_cell=0; else start_cell=args.PopWord().AsInt();
+    if (args == "") end_cell=-1; else end_cell=args.PopWord().AsInt();
+    if (args == "") merit=-1; else merit=args.PopWord().AsDouble();
+    if (args == "") lineage_label=0; else lineage_label=args.PopWord().AsInt();
+    if (args == "") neutral_metric=0; else neutral_metric=args.PopWord().AsDouble();
+  }
+///// inject_range /////
+  void Process(){
+    if (fname == "START_CREATURE") fname=cConfig::GetStartCreature();
+    if (end_cell == -1) end_cell = start_cell + 1;
+    if (start_cell < 0 ||
+        end_cell > population->GetSize() ||
+        start_cell >= end_cell) {
+      cout << "Warning: inject_range has invalid range!";
+    }
+    else {
+      cGenome genome =
+         cInstUtil::LoadGenome(fname, population->GetEnvironment().GetInstSet());
+      for (int i = start_cell; i < end_cell; i++) {
+        population->Inject(genome, i, merit, lineage_label, neutral_metric);
+      }
+      population->SetSyncEvents(true);
+    }
+  }
+};
+
+///// inject_sequence /////
+
+/**
+* Injects identical organisms into a range of cells of the population.
+*
+* Parameters:
+* sequence (string)
+*   The genome sequence for this organism.  This is a mandatory argument.
+* start_cell (int)
+*   First cell to inject into.
+* stop_cell (int)
+*   First cell *not* to inject into.
+* merit (double) default: -1
+*   The initial merit of the organism. If set to -1, this is ignored.
+* lineage label (integer) default: 0
+*   An integer that marks all descendants of this organism.
+* neutral metric (double) default: 0
+*   A double value that randomly drifts over time.
+*
+* Example:
+*   inject_range ckdfhgklsahnfsaggdsgajfg 0 10 100
+*
+* Will inject 10 organisms into cells 0 through 9 with a merit of 100.
+**/
+
+
+class cPopulationEventinject_sequence : public cPopulationEvent {
+private:
+  cString seq;
+  int start_cell;
+  int end_cell;
+  double merit;
+  int lineage_label;
+  double neutral_metric;
+public:
+  cPopulationEventinject_sequence(const cString & in_args):
+   cPopulationEvent("inject_sequence", in_args) {
+
+    cString args(in_args);
+    seq = args.PopWord();
+    if (args == "") start_cell=0; else start_cell=args.PopWord().AsInt();
+    if (args == "") end_cell=-1; else end_cell=args.PopWord().AsInt();
+    if (args == "") merit=-1; else merit=args.PopWord().AsDouble();
+    if (args == "") lineage_label=0; else lineage_label=args.PopWord().AsInt();
+    if (args == "") neutral_metric=0; else neutral_metric=args.PopWord().AsDouble();
+  }
+///// inject_sequence /////
+  void Process(){
+    if (end_cell == -1) end_cell = start_cell + 1;
+    if (start_cell < 0 ||
+        end_cell > population->GetSize() ||
+        start_cell >= end_cell) {
+      cout << "Warning: inject_sequence has invalid range!";
+    }
+    else {
+      cGenome genome(seq);
+      for (int i = start_cell; i < end_cell; i++) {
+        population->Inject(genome, i, merit, lineage_label, neutral_metric);
+      }
+      population->SetSyncEvents(true);
+    }
+  }
+};
+
+///// inject_random /////
+
+/**
+* Injects a randomly generated genome into the population.
+*
+* Parameters:
+* length (integer) [required]
+*   Number of instructions in the randomly generated genome.
+* cell ID (integer) default: -1
+*   The grid-point into which the genome should be placed.  Default is random.
+* merit (double) default: -1
+*   The initial merit of the organism. If set to -1, this is ignored.
+* lineage label (integer) default: 0
+*   An integer that marks all descendants of this organism.
+* neutral metric (double) default: 0
+*   A double value that randomly drifts over time.
+**/
+
+
+class cPopulationEventinject_random : public cPopulationEvent {
+private:
+  int length;
+  int cell_id;
+  double merit;
+  int lineage_label;
+  double neutral_metric;
+public:
+  cPopulationEventinject_random(const cString & in_args):
+   cPopulationEvent("inject_random", in_args) {
+
+    cString args(in_args);
+    length = args.PopWord().AsInt();
+    if (args == "") cell_id=-1; else cell_id=args.PopWord().AsInt();
+    if (args == "") merit=-1; else merit=args.PopWord().AsDouble();
+    if (args == "") lineage_label=0; else lineage_label=args.PopWord().AsInt();
+    if (args == "") neutral_metric=0; else neutral_metric=args.PopWord().AsDouble();
+  }
+///// inject_random /////
+  void Process(){
+    if (cell_id == -1) cell_id = g_random.GetUInt(population->GetSize());
+    cGenome genome =
+       cInstUtil::RandomGenome(length, population->GetEnvironment().GetInstSet());
+    population->Inject(genome, cell_id, merit, lineage_label, neutral_metric);
+  }
+};
+
+///// zero_muts /////
+
+/**
+ * This event will set all mutation rates to zero...
+ **/
+
+
+class cPopulationEventzero_muts : public cPopulationEvent {
+private:
+public:
+  cPopulationEventzero_muts(const cString & in_args):
+   cPopulationEvent("zero_muts", in_args) {
+ (void)in_args; }
+///// zero_muts /////
+  void Process(){
+    for (int i = 0; i < population->GetSize(); i++) {
+      population->GetCell(i).MutationRates().Clear();
+    }
+  }
+};
+
+///// mod_copy_mut /////
+
+/**
+**/
+
+
+class cPopulationEventmod_copy_mut : public cPopulationEvent {
+private:
+  double cmut_inc;
+  int cell;
+public:
+  cPopulationEventmod_copy_mut(const cString & in_args):
+   cPopulationEvent("mod_copy_mut", in_args) {
+
+    cString args(in_args);
+    cmut_inc = args.PopWord().AsDouble();
+    if (args == "") cell=-1; else cell=args.PopWord().AsInt();
+  }
+///// mod_copy_mut /////
+  void Process(){
+    const double new_cmut = cConfig::GetCopyMutProb() + cmut_inc;
+    if (cell < 0) {   // cell == -1  -->  all
+      for (int i = 0; i < population->GetSize(); i++) {
+        population->GetCell(i).MutationRates().SetCopyMutProb(new_cmut);
+      }
+      cConfig::SetCopyMutProb(new_cmut);
+    } else {
+      population->GetCell(cell).MutationRates().SetCopyMutProb(new_cmut);
+    }
+  }
+};
+
+///// mod_div_mut /////
+
+/**
+**/
+
+
+class cPopulationEventmod_div_mut : public cPopulationEvent {
+private:
+  double dmut_inc;
+  int cell;
+public:
+  cPopulationEventmod_div_mut(const cString & in_args):
+   cPopulationEvent("mod_div_mut", in_args) {
+
+    cString args(in_args);
+    dmut_inc = args.PopWord().AsDouble();
+    if (args == "") cell=-1; else cell=args.PopWord().AsInt();
+  }
+///// mod_div_mut /////
+  void Process(){
+    const double new_div_mut = cConfig::GetDivMutProb() + dmut_inc;
+    if (cell < 0) {   // cell == -1  -->  all
+      for (int i = 0; i < population->GetSize(); i++) {
+        population->GetCell(i).MutationRates().SetDivMutProb(new_div_mut);
+      }
+      cConfig::SetDivMutProb(new_div_mut);
+    } else {
+      population->GetCell(cell).MutationRates().SetDivMutProb(new_div_mut);
+    }
+  }
+};
+
+///// set_copy_mut /////
+
+/**
+**/
+
+
+class cPopulationEventset_copy_mut : public cPopulationEvent {
+private:
+  double cmut;
+  int start_cell;
+  int end_cell;
+public:
+  cPopulationEventset_copy_mut(const cString & in_args):
+   cPopulationEvent("set_copy_mut", in_args) {
+
+    cString args(in_args);
+    cmut = args.PopWord().AsDouble();
+    if (args == "") start_cell=-1; else start_cell=args.PopWord().AsInt();
+    if (args == "") end_cell=-1; else end_cell=args.PopWord().AsInt();
+  }
+///// set_copy_mut /////
+  void Process(){
+    if (start_cell < 0) {   // start_cell == -1  -->  all
+      cConfig::SetCopyMutProb(cmut);
+      start_cell = 0;
+      end_cell = population->GetSize();
+    }
+    else if (end_cell < -1)  { // end_cell == -1 --> Only one cell!
+      end_cell = start_cell + 1;
+    }
+    assert(start_cell >= 0 && start_cell < population->GetSize());
+    assert(end_cell > 0 && end_cell <= population->GetSize());
+    for (int i = start_cell; i < end_cell; i++) {
+      population->GetCell(i).MutationRates().SetCopyMutProb(cmut);
+    }
+  }
+};
+
+///// mod_point_mut /////
+
+/**
+**/
+
+
+class cPopulationEventmod_point_mut : public cPopulationEvent {
+private:
+  double pmut_inc;
+  int cell;
+public:
+  cPopulationEventmod_point_mut(const cString & in_args):
+   cPopulationEvent("mod_point_mut", in_args) {
+
+    cString args(in_args);
+    pmut_inc = args.PopWord().AsDouble();
+    if (args == "") cell=-1; else cell=args.PopWord().AsInt();
+  }
+///// mod_point_mut /////
+  void Process(){
+    const double new_pmut = cConfig::GetPointMutProb() + pmut_inc;
+    if (cell < 0) {   // cell == -1   -->  all
+      for (int i = 0; i < population->GetSize(); i++) {
+        population->GetCell(i).MutationRates().SetPointMutProb(new_pmut);
+      }
+      cConfig::SetPointMutProb(new_pmut);
+    } else {
+      population->GetCell(cell).MutationRates().SetPointMutProb(new_pmut);
+    }
+  }
+};
+
+///// set_point_mut /////
+
+/**
+**/
+
+
+class cPopulationEventset_point_mut : public cPopulationEvent {
+private:
+  double pmut;
+  int cell;
+public:
+  cPopulationEventset_point_mut(const cString & in_args):
+   cPopulationEvent("set_point_mut", in_args) {
+
+    cString args(in_args);
+    pmut = args.PopWord().AsDouble();
+    if (args == "") cell=-1; else cell=args.PopWord().AsInt();
+  }
+///// set_point_mut /////
+  void Process(){
+    if (cell < 0) {   // cell == -1   -->  all
+      for (int i = 0; i < population->GetSize(); i++) {
+        population->GetCell(i).MutationRates().SetPointMutProb(pmut);
+      }
+      cConfig::SetPointMutProb(pmut);
+    } else {
+      population->GetCell(cell).MutationRates().SetPointMutProb(pmut);
+    }
+  }
+};
+
+///// calc_landscape /////
+
+/**
+**/
+
+
+class cPopulationEventcalc_landscape : public cPopulationEvent {
+private:
+  int landscape_dist;
+public:
+  cPopulationEventcalc_landscape(const cString & in_args):
+   cPopulationEvent("calc_landscape", in_args) {
+
+    cString args(in_args);
+    if (args == "") landscape_dist=1; else landscape_dist=args.PopWord().AsInt();
+  }
+///// calc_landscape /////
+  void Process(){
+    cGenome & genome = population->GetGenebank().GetBestGenotype()->GetGenome();
+    cAnalyzeUtil::CalcLandscape(landscape_dist, genome,
+                                population->GetEnvironment().GetInstSet());
+  }
+};
+
+///// predict_w_landscape /////
+
+/**
+**/
+
+
+class cPopulationEventpredict_w_landscape : public cPopulationEvent {
+private:
+  cString datafile;
+public:
+  cPopulationEventpredict_w_landscape(const cString & in_args):
+   cPopulationEvent("predict_w_landscape", in_args) {
+
+    cString args(in_args);
+    if (args == "") datafile="land-predict.dat"; else datafile=args.PopWord();
+  }
+///// predict_w_landscape /////
+  void Process(){
+    cGenome & genome = population->GetGenebank().GetBestGenotype()->GetGenome();
+    cLandscape landscape(genome, population->GetEnvironment().GetInstSet());
+    static ofstream fp(datafile);
+    landscape.PredictWProcess(fp);
+  }
+};
+
+///// predict_nu_landscape /////
+
+/**
+**/
+
+
+class cPopulationEventpredict_nu_landscape : public cPopulationEvent {
+private:
+  cString datafile;
+public:
+  cPopulationEventpredict_nu_landscape(const cString & in_args):
+   cPopulationEvent("predict_nu_landscape", in_args) {
+
+    cString args(in_args);
+    if (args == "") datafile="land-predict.dat"; else datafile=args.PopWord();
+  }
+///// predict_nu_landscape /////
+  void Process(){
+    cGenome & genome = population->GetGenebank().GetBestGenotype()->GetGenome();
+    cLandscape landscape(genome, population->GetEnvironment().GetInstSet());
+    static ofstream fp(datafile);
+    landscape.PredictNuProcess(fp);
+  }
+};
+
+///// sample_landscape /////
+
+/**
+**/
+
+
+class cPopulationEventsample_landscape : public cPopulationEvent {
+private:
+  int sample_size;
+public:
+  cPopulationEventsample_landscape(const cString & in_args):
+   cPopulationEvent("sample_landscape", in_args) {
+
+    cString args(in_args);
+    if (args == "") sample_size=0; else sample_size=args.PopWord().AsInt();
+  }
+///// sample_landscape /////
+  void Process(){
+    cGenome & genome = population->GetGenebank().GetBestGenotype()->GetGenome();
+    cLandscape landscape(genome, population->GetEnvironment().GetInstSet());
+    if (sample_size == 0) sample_size = population->GetEnvironment().GetInstSet().GetSize() - 1;
+    landscape.SampleProcess(sample_size);
+    static ofstream fp("land-sample.dat");
+    landscape.PrintStats(fp, population->GetUpdate());
+  }
+};
+
+///// random_landscape /////
+
+/**
+**/
+
+
+class cPopulationEventrandom_landscape : public cPopulationEvent {
+private:
+  int landscape_dist;
+  int sample_size;
+  int min_found;
+  int max_sample_size;
+  bool print_if_found;
+public:
+  cPopulationEventrandom_landscape(const cString & in_args):
+   cPopulationEvent("random_landscape", in_args) {
+
+    cString args(in_args);
+    if (args == "") landscape_dist=1; else landscape_dist=args.PopWord().AsInt();
+    if (args == "") sample_size=0; else sample_size=args.PopWord().AsInt();
+    if (args == "") min_found=0; else min_found=args.PopWord().AsInt();
+    if (args == "") max_sample_size=0; else max_sample_size=args.PopWord().AsInt();
+    if (args == "") print_if_found=false; else print_if_found=args.PopWord();
+  }
+///// random_landscape /////
+  void Process(){
+    cGenome & genome = population->GetGenebank().GetBestGenotype()->GetGenome();
+    cLandscape landscape(genome, population->GetEnvironment().GetInstSet());
+    landscape.RandomProcess(sample_size, landscape_dist, min_found,
+                            max_sample_size, print_if_found);
+    static ofstream fp("land-random.dat");
+    landscape.PrintStats(fp, population->GetUpdate());
+  }
+};
+
+///// analyze_landscape /////
+
+/**
+**/
+
+
+class cPopulationEventanalyze_landscape : public cPopulationEvent {
+private:
+  int sample_size;
+  int min_found;
+  int max_sample_size;
+public:
+  cPopulationEventanalyze_landscape(const cString & in_args):
+   cPopulationEvent("analyze_landscape", in_args) {
+
+    cString args(in_args);
+    if (args == "") sample_size=1000; else sample_size=args.PopWord().AsInt();
+    if (args == "") min_found=0; else min_found=args.PopWord().AsInt();
+    if (args == "") max_sample_size=0; else max_sample_size=args.PopWord().AsInt();
+  }
+///// analyze_landscape /////
+  void Process(){
+    cGenome & genome = population->GetGenebank().GetBestGenotype()->GetGenome();
+    cAnalyzeUtil::
+    AnalyzeLandscape(genome, population->GetEnvironment().GetInstSet(),
+     		 sample_size, min_found, max_sample_size,
+    		 population->GetUpdate());
+  }
+};
+
+///// pairtest_landscape /////
+
+/**
+* If sample_size = 0, pairtest the full landscape.
+**/
+
+
+class cPopulationEventpairtest_landscape : public cPopulationEvent {
+private:
+  int sample_size;
+public:
+  cPopulationEventpairtest_landscape(const cString & in_args):
+   cPopulationEvent("pairtest_landscape", in_args) {
+
+    cString args(in_args);
+    if (args == "") sample_size=0; else sample_size=args.PopWord().AsInt();
+  }
+///// pairtest_landscape /////
+  void Process(){
+    cGenome & genome = population->GetGenebank().GetBestGenotype()->GetGenome();
+    cAnalyzeUtil::PairTestLandscape(genome, population->GetEnvironment().GetInstSet(), sample_size, population->GetUpdate());
+  }
+};
+
+///// test_dom /////
+
+/**
+**/
+
+
+class cPopulationEventtest_dom : public cPopulationEvent {
+private:
+public:
+  cPopulationEventtest_dom(const cString & in_args):
+   cPopulationEvent("test_dom", in_args) {
+ (void)in_args; }
+///// test_dom /////
+  void Process(){
+    cGenome & genome = population->GetGenebank().GetBestGenotype()->GetGenome();
+    static ofstream fp("dom-test.dat");
+    cAnalyzeUtil::TestGenome(genome, population->GetEnvironment().GetInstSet(), fp, population->GetUpdate());
+  }
+};
+
+///// analyze_population /////
+
+/**
+**/
+
+
+class cPopulationEventanalyze_population : public cPopulationEvent {
+private:
+  double sample_prob;
+  int landscape;
+  int save_genotype;
+  cString filename;
+public:
+  cPopulationEventanalyze_population(const cString & in_args):
+   cPopulationEvent("analyze_population", in_args) {
+
+    cString args(in_args);
+    if (args == "") sample_prob=1; else sample_prob=args.PopWord().AsDouble();
+    if (args == "") landscape=0; else landscape=args.PopWord().AsInt();
+    if (args == "") save_genotype=0; else save_genotype=args.PopWord().AsInt();
+    if (args == "") filename=""; else filename=args.PopWord();
+  }
+///// analyze_population /////
+  void Process(){
+    static bool auto_filename = false;
+    if( filename == "" )
+      auto_filename = true;
+    if ( auto_filename )
+      filename.Set("population_info_%d.dat",population->GetUpdate());
+    ofstream population_info(filename());
+    cAnalyzeUtil::AnalyzePopulation(population, population_info, sample_prob,
+    				landscape, save_genotype);
+  }
+};
+
+///// print_detailed_fitness_data /////
+
+/**
+**/
+
+
+class cPopulationEventprint_detailed_fitness_data : public cPopulationEvent {
+private:
+  int save_max_f_genotype;
+  int print_fitness_histo;
+  double hist_fmax;
+  double hist_fstep;
+  cString filename;
+  cString filename2;
+  cString filename3;
+public:
+  cPopulationEventprint_detailed_fitness_data(const cString & in_args):
+   cPopulationEvent("print_detailed_fitness_data", in_args) {
+
+    cString args(in_args);
+    if (args == "") save_max_f_genotype=0; else save_max_f_genotype=args.PopWord().AsInt();
+    if (args == "") print_fitness_histo=0; else print_fitness_histo=args.PopWord().AsInt();
+    if (args == "") hist_fmax=1; else hist_fmax=args.PopWord().AsDouble();
+    if (args == "") hist_fstep=0.1; else hist_fstep=args.PopWord().AsDouble();
+    if (args == "") filename="fitness.dat"; else filename=args.PopWord();
+    if (args == "") filename2="fitness_histos.dat"; else filename2=args.PopWord();
+    if (args == "") filename3="fitness_histos_testCPU.dat"; else filename3=args.PopWord();
+  }
+///// print_detailed_fitness_data /////
+  void Process(){
+    static ofstream datafile(filename());
+    static ofstream histofile;
+    static ofstream histofile_testCPU;
+    if (print_fitness_histo && !histofile.is_open()){
+      histofile.open(filename2());
+      histofile_testCPU.open(filename3());
+    }
+    cAnalyzeUtil::PrintDetailedFitnessData( population, datafile, histofile, histofile_testCPU, save_max_f_genotype, print_fitness_histo, hist_fmax, hist_fstep );
+  }
+};
+
+///// print_genetic_distance_data /////
+
+/**
+**/
+
+
+class cPopulationEventprint_genetic_distance_data : public cPopulationEvent {
+private:
+  cString creature_name;
+  cString filename;
+public:
+  cPopulationEventprint_genetic_distance_data(const cString & in_args):
+   cPopulationEvent("print_genetic_distance_data", in_args) {
+
+    cString args(in_args);
+    if (args == "") creature_name=""; else creature_name=args.PopWord();
+    if (args == "") filename="genetic_distance.dat"; else filename=args.PopWord();
+  }
+///// print_genetic_distance_data /////
+  void Process(){
+    static ofstream popdump(filename());
+    if( creature_name == "" || creature_name == "START_CREATURE" ){
+      creature_name = cConfig::GetStartCreature(); }
+    cAnalyzeUtil::PrintGeneticDistanceData( population, popdump, creature_name() );
+  }
+};
+
+///// genetic_distance_pop_dump /////
+
+/**
+**/
+
+
+class cPopulationEventgenetic_distance_pop_dump : public cPopulationEvent {
+private:
+  cString creature_name;
+  cString filename;
+  int save_genotype;
+public:
+  cPopulationEventgenetic_distance_pop_dump(const cString & in_args):
+   cPopulationEvent("genetic_distance_pop_dump", in_args) {
+
+    cString args(in_args);
+    if (args == "") creature_name=""; else creature_name=args.PopWord();
+    if (args == "") filename=""; else filename=args.PopWord();
+    if (args == "") save_genotype=0; else save_genotype=args.PopWord().AsInt();
+  }
+///// genetic_distance_pop_dump /////
+  void Process(){
+    static bool auto_filename = false;
+    if( creature_name == "" || creature_name == "START_CREATURE" ){
+      creature_name = cConfig::GetStartCreature(); }
+    if( filename == "" || filename == "AUTO" )
+      auto_filename = true;
+    if ( auto_filename )
+      filename.Set("pop_dump_%d.dat",population->GetUpdate());
+    ofstream popdump(filename());
+    cAnalyzeUtil::GeneticDistancePopDump( population, popdump, creature_name(), save_genotype );
+  }
+};
+
+///// task_snapshot /////
+
+/**
+**/
+
+
+class cPopulationEventtask_snapshot : public cPopulationEvent {
+private:
+  cString filename;
+public:
+  cPopulationEventtask_snapshot(const cString & in_args):
+   cPopulationEvent("task_snapshot", in_args) {
+
+    cString args(in_args);
+    if (args == "") filename=""; else filename=args.PopWord();
+  }
+///// task_snapshot /////
+  void Process(){
+    static bool auto_filename = false;
+    if( filename == "" )
+      auto_filename = true;
+    if ( auto_filename )
+      filename.Set("tasks_%d.dat",population->GetUpdate());
+    ofstream snapshot_file(filename());
+    cAnalyzeUtil::TaskSnapshot( population, snapshot_file );
+  }
+};
+
+///// print_viable_tasks_data /////
+
+/**
+**/
+
+
+class cPopulationEventprint_viable_tasks_data : public cPopulationEvent {
+private:
+  cString filename;
+public:
+  cPopulationEventprint_viable_tasks_data(const cString & in_args):
+   cPopulationEvent("print_viable_tasks_data", in_args) {
+
+    cString args(in_args);
+    if (args == "") filename="viable_tasks.dat"; else filename=args.PopWord();
+  }
+///// print_viable_tasks_data /////
+  void Process(){
+    static ofstream datafile(filename());
+    cAnalyzeUtil::PrintViableTasksData( population, datafile );
+  }
+};
+
+///// apocalypse /////
+
+/**
+* Randomly removes a certain proportion of the population.
+*
+* Parameters:
+* removal probability (double) default: 0.9
+*   The probability with which a single organism is removed.
+**/
+
+
+class cPopulationEventapocalypse : public cPopulationEvent {
+private:
+  double kill_prob;
+public:
+  cPopulationEventapocalypse(const cString & in_args):
+   cPopulationEvent("apocalypse", in_args) {
+
+    cString args(in_args);
+    if (args == "") kill_prob=.9; else kill_prob=args.PopWord().AsDouble();
+  }
+///// apocalypse /////
+  void Process(){
+    for (int i = 0; i < population->GetSize(); i++) {
+      cPopulationCell & cell = population->GetCell(i);
+      if (cell.IsOccupied() == false) continue;
+      if (g_random.P(kill_prob))  population->KillOrganism(cell);
+    }
+  }
+};
+
+///// kill_rectangle /////
+
+/**
+* Kills all cell in a rectangle.
+*
+* Parameters:
+* cell [X1][Y1][x2][Y2] (integer) default: 0
+*   The start and stoping grid-points into which the organism should
+be killed.
+**/
+
+
+class cPopulationEventkill_rectangle : public cPopulationEvent {
+private:
+  int cell_X1;
+  int cell_Y1;
+  int cell_X2;
+  int cell_Y2;
+public:
+  cPopulationEventkill_rectangle(const cString & in_args):
+   cPopulationEvent("kill_rectangle", in_args) {
+
+    cString args(in_args);
+    if (args == "") cell_X1=0; else cell_X1=args.PopWord().AsInt();
+    if (args == "") cell_Y1=0; else cell_Y1=args.PopWord().AsInt();
+    if (args == "") cell_X2=0; else cell_X2=args.PopWord().AsInt();
+    if (args == "") cell_Y2=0; else cell_Y2=args.PopWord().AsInt();
+  }
+///// kill_rectangle /////
+  void Process(){
+    int i, j, loc;
+    /* Be sure the user entered a valid range */
+    if (cell_X1 < 0) {
+      cell_X1 = 0;
+    } else if (cell_X1 > population->GetWorldX() - 1) {
+      cell_X1 = population->GetWorldX() - 1;
+    }
+    if (cell_X2 < 0) {
+      cell_X2 = 0;
+    } else if (cell_X2 > population->GetWorldX() - 1) {
+      cell_X2 = population->GetWorldX() - 1;
+    }
+    if (cell_Y1 < 0) {
+      cell_Y1 = 0;
+    } else if (cell_Y1 > population->GetWorldY() - 1) {
+      cell_Y1 = population->GetWorldY() - 1;
+    }
+    if (cell_Y2 < 0) {
+      cell_Y2 = 0;
+    } else if (cell_Y2 > population->GetWorldY() - 1) {
+      cell_Y2 = population->GetWorldY() - 1;
+    }
+    /* Account for a rectangle that crosses over the Zero X or Y cell */
+    if (cell_X2 < cell_X1) {
+       cell_X2 = cell_X2 + population->GetWorldX();
+    }
+    if (cell_Y2 < cell_Y1) {
+       cell_Y2 = cell_Y2 + population->GetWorldY();
+    }
+    for (i = cell_Y1; i <= cell_Y2; i++) {
+       for (j = cell_X1; j <= cell_X2; j++) {
+         loc = (i % population->GetWorldY()) * population->GetWorldX() +
+               (j % population->GetWorldX());
+         cPopulationCell & cell = population->GetCell(loc);
+         if (cell.IsOccupied() == true) {
+           population->KillOrganism(cell);
+         }
+       }
+    }
+    population->SetSyncEvents(true);
+  }
+};
+
+///// rate_kill /////
+
+/**
+* Randomly removes a certain proportion of the population.
+* In principle, this event does the same thing as the apocalypse event.
+* However, instead of a probability, here one has to specify a rate. The
+* rate has the same unit as fitness. So if the average fitness is 20000,
+* than you remove 50% of the population on every update with a removal rate
+* of 10000.
+*
+* Parameters:
+* removal rate (double)
+*   The rate at which organisms are removed.
+**/
+
+
+class cPopulationEventrate_kill : public cPopulationEvent {
+private:
+  double kill_rate;
+public:
+  cPopulationEventrate_kill(const cString & in_args):
+   cPopulationEvent("rate_kill", in_args) {
+
+    cString args(in_args);
+    kill_rate = args.PopWord().AsDouble();
+  }
+///// rate_kill /////
+  void Process(){
+    const double ave = population->GetStats().SumMerit().Average();
+    const double kill_prob = cConfig::GetAveTimeslice()*(kill_rate / ave);
+    for (int i = 0; i < population->GetSize(); i++) {
+      cPopulationCell & cell = population->GetCell(i);
+      if (cell.IsOccupied() == false) continue;
+      if (g_random.P(kill_prob))  population->KillOrganism(cell);
+    }
+  }
+};
+
+///// serial_transfer /////
+
+/**
+* This event does again the same thing as apocalypse. However, now
+* the number of organisms to be retained can be specified
+* exactly. Also, it is possible to specify whether any of these
+* organisms may be dead or not.
+*
+* Parameters:
+* transfer size (int) default: 1
+*   The number of organisms to retain. If there are fewer living
+*   organisms than the specified transfer size, then all living
+*   organisms are retained.
+* ignore deads (int) default: 1
+*   When set to 1, only living organisms are retained. Otherwise,
+*   every type of organism can be retained.
+**/
+
+
+class cPopulationEventserial_transfer : public cPopulationEvent {
+private:
+  int transfer_size;
+  int ignore_deads;
+public:
+  cPopulationEventserial_transfer(const cString & in_args):
+   cPopulationEvent("serial_transfer", in_args) {
+
+    cString args(in_args);
+    if (args == "") transfer_size=1; else transfer_size=args.PopWord().AsInt();
+    if (args == "") ignore_deads=1; else ignore_deads=args.PopWord().AsInt();
+  }
+///// serial_transfer /////
+  void Process(){
+    population->SerialTransfer( transfer_size, ignore_deads );
+  }
+};
+
+///// hillclimb /////
+
+/**
+* Does a hill climb with the dominant genotype.
+**/
+
+
+class cPopulationEventhillclimb : public cPopulationEvent {
+private:
+public:
+  cPopulationEventhillclimb(const cString & in_args):
+   cPopulationEvent("hillclimb", in_args) {
+ (void)in_args; }
+///// hillclimb /////
+  void Process(){
+    cGenome & genome = population->GetGenebank().GetBestGenotype()->GetGenome();
+    ofstream fp("hillclimb.dat");
+    cLandscape landscape(genome, population->GetEnvironment().GetInstSet());
+    landscape.HillClimb(fp);
+  }
+};
+
+///// hillclimb_neut /////
+
+/**
+**/
+
+
+class cPopulationEventhillclimb_neut : public cPopulationEvent {
+private:
+public:
+  cPopulationEventhillclimb_neut(const cString & in_args):
+   cPopulationEvent("hillclimb_neut", in_args) {
+ (void)in_args; }
+///// hillclimb_neut /////
+  void Process(){
+    cGenome & genome = population->GetGenebank().GetBestGenotype()->GetGenome();
+    ofstream fp("hillclimb.dat");
+    cLandscape landscape(genome, population->GetEnvironment().GetInstSet());
+    landscape.HillClimb_Neut(fp);
+  }
+};
+
+///// hillclimb_rand /////
+
+/**
+**/
+
+
+class cPopulationEventhillclimb_rand : public cPopulationEvent {
+private:
+public:
+  cPopulationEventhillclimb_rand(const cString & in_args):
+   cPopulationEvent("hillclimb_rand", in_args) {
+ (void)in_args; }
+///// hillclimb_rand /////
+  void Process(){
+    cGenome & genome = population->GetGenebank().GetBestGenotype()->GetGenome();
+    ofstream fp("hillclimb.dat");
+    cLandscape landscape(genome, population->GetEnvironment().GetInstSet());
+    landscape.HillClimb_Rand(fp);
+  }
+};
+
+///// calc_consensus /////
+
+/**
+* Calculates the consensus sequence.
+*
+* Parameters:
+* lines saved (integer) default: 0
+*    ???
+**/
+
+
+class cPopulationEventcalc_consensus : public cPopulationEvent {
+private:
+  int lines_saved;
+public:
+  cPopulationEventcalc_consensus(const cString & in_args):
+   cPopulationEvent("calc_consensus", in_args) {
+
+    cString args(in_args);
+    if (args == "") lines_saved=0; else lines_saved=args.PopWord().AsInt();
+  }
+///// calc_consensus /////
+  void Process(){
+    cAnalyzeUtil::CalcConsensus(population, lines_saved);
+  }
+};
+
+///// test_size_change_robustness /////
+
+/**
+**/
+
+
+class cPopulationEventtest_size_change_robustness : public cPopulationEvent {
+private:
+  int num_trials;
+  cString filename;
+public:
+  cPopulationEventtest_size_change_robustness(const cString & in_args):
+   cPopulationEvent("test_size_change_robustness", in_args) {
+
+    cString args(in_args);
+    if (args == "") num_trials=100; else num_trials=args.PopWord().AsInt();
+    if (args == "") filename="size_change.dat"; else filename=args.PopWord();
+  }
+///// test_size_change_robustness /////
+  void Process(){
+    ofstream & fp = population->GetStats().GetDataFileOFStream(filename);
+    cAnalyzeUtil::TestInsSizeChangeRobustness(fp,
+    		population->GetEnvironment().GetInstSet(),
+    		population->GetGenebank().GetBestGenotype()->GetGenome(),
+    		num_trials, population->GetUpdate());
+  }
+};
+
+///// test_threads /////
+
+/**
+**/
+
+
+class cPopulationEventtest_threads : public cPopulationEvent {
+private:
+public:
+  cPopulationEventtest_threads(const cString & in_args):
+   cPopulationEvent("test_threads", in_args) {
+ (void)in_args; }
+///// test_threads /////
+  void Process(){
+    cTestCPU::TestThreads(population->GetGenebank().GetBestGenotype()->GetGenome());
+  }
+};
+
+///// print_threads /////
+
+/**
+**/
+
+
+class cPopulationEventprint_threads : public cPopulationEvent {
+private:
+public:
+  cPopulationEventprint_threads(const cString & in_args):
+   cPopulationEvent("print_threads", in_args) {
+ (void)in_args; }
+///// print_threads /////
+  void Process(){
+    cTestCPU::PrintThreads( population->GetGenebank().GetBestGenotype()->GetGenome() );
+  }
+};
+
+///// dump_fitness_grid /////
+
+/**
+* Writes out all fitness values of the organisms currently in the
+* population.
+*
+* The output file is called "fgrid.*.out", where '*' is replaced by the
+* number of the current update.
+**/
+
+
+class cPopulationEventdump_fitness_grid : public cPopulationEvent {
+private:
+public:
+  cPopulationEventdump_fitness_grid(const cString & in_args):
+   cPopulationEvent("dump_fitness_grid", in_args) {
+ (void)in_args; }
+///// dump_fitness_grid /////
+  void Process(){
+    cString filename;
+    filename.Set("fgrid.%05d.out", population->GetUpdate());
+    ofstream fp(filename());
+    for (int i = 0; i < population->GetWorldX(); i++) {
+      for (int j = 0; j < population->GetWorldY(); j++) {
+        cPopulationCell & cell = population->GetCell(j*population->GetWorldX()+i);
+        double fitness = (cell.IsOccupied()) ?
+    	 cell.GetOrganism()->GetGenotype()->GetFitness() : 0.0;
+        fp << fitness << " ";
+      }
+      fp << endl;
+    }
+  }
+};
+
+///// dump_genotype_grid /////
+
+/**
+* Writes out all genotype id values of the organisms currently in the
+* population.
+*
+* The output file is called "idgrid.*.out", where '*' is replaced by the
+* number of the current update.
+**/
+
+
+class cPopulationEventdump_genotype_grid : public cPopulationEvent {
+private:
+public:
+  cPopulationEventdump_genotype_grid(const cString & in_args):
+   cPopulationEvent("dump_genotype_grid", in_args) {
+ (void)in_args; }
+///// dump_genotype_grid /////
+  void Process(){
+    cString filename;
+    filename.Set("idgrid.%05d.out", population->GetUpdate());
+    ofstream fp(filename());
+    for (int i = 0; i < population->GetWorldX(); i++) {
+      for (int j = 0; j < population->GetWorldY(); j++) {
+        cPopulationCell & cell = population->GetCell(j*population->GetWorldX()+i);
+        int id = (cell.IsOccupied()) ?
+    	 cell.GetOrganism()->GetGenotype()->GetID() : -1;
+        fp << id << " ";
+      }
+      fp << endl;
+    }
+  }
+};
+
+///// print_tree_depths /////
+
+/**
+* Reconstruction of phylogenetic trees.
+**/
+
+
+class cPopulationEventprint_tree_depths : public cPopulationEvent {
+private:
+  cString filename;
+public:
+  cPopulationEventprint_tree_depths(const cString & in_args):
+   cPopulationEvent("print_tree_depths", in_args) {
+
+    cString args(in_args);
+    if (args == "") filename=""; else filename=args.PopWord();
+  }
+///// print_tree_depths /////
+  void Process(){
+    if (filename == "") filename.Set("tree_depth.%d.dat", population->GetUpdate());
+    ofstream fp(filename);
+    cAnalyzeUtil::PrintTreeDepths(population, fp);
+  }
+};
+
+///// inject_resource /////
+
+/**
+* Inject (add) a specified amount of a specified resource.
+**/
+
+
+class cPopulationEventinject_resource : public cPopulationEvent {
+private:
+  cString res_name;
+  double res_count;
+public:
+  cPopulationEventinject_resource(const cString & in_args):
+   cPopulationEvent("inject_resource", in_args) {
+
+    cString args(in_args);
+    res_name = args.PopWord();
+    res_count = args.PopWord().AsDouble();
+  }
+///// inject_resource /////
+  void Process(){
+    cResourceLib & res_lib = population->GetEnvironment().GetResourceLib();
+    int res_id = res_lib.GetResource(res_name)->GetID();
+    population->UpdateResource(res_id, res_count);
+  }
+};
+
+///// set_resource /////
+
+/**
+* Set the resource amount to a specific level
+**/
+
+
+class cPopulationEventset_resource : public cPopulationEvent {
+private:
+  cString res_name;
+  double res_count;
+public:
+  cPopulationEventset_resource(const cString & in_args):
+   cPopulationEvent("set_resource", in_args) {
+
+    cString args(in_args);
+    res_name = args.PopWord();
+    res_count = args.PopWord().AsDouble();
+  }
+///// set_resource /////
+  void Process(){
+    cResourceLib & res_lib = population->GetEnvironment().GetResourceLib();
+    int res_id = res_lib.GetResource(res_name)->GetID();
+    population->SetResource(res_id, res_count);
+  }
+};
+
Index: avida/current/source/main/main.pro
diff -u avida/current/source/main/main.pro:1.2 avida/current/source/main/main.pro:1.3
--- avida/current/source/main/main.pro:1.2	Sat May 17 02:48:09 2003
+++ avida/current/source/main/main.pro	Wed Jun  4 11:34:47 2003
@@ -3,8 +3,11 @@
 
 TEMPLATE    = app
 TARGET      = primitive
+DESTDIR	= ../../work
 CONFIG      *= warn-on release
 CONFIG      *= cpu event main trio tools
+CONFIG	+= console
+OBJECTS_DIR  = objs
 
 include($$AVIDA_SRC_DIR/modules.pri)
 
Index: avida/current/source/main/tasks.cc
diff -u avida/current/source/main/tasks.cc:1.25 avida/current/source/main/tasks.cc:1.26
--- avida/current/source/main/tasks.cc:1.25	Tue May 20 05:07:59 2003
+++ avida/current/source/main/tasks.cc	Wed Jun  4 11:34:48 2003
@@ -294,20 +294,19 @@
     NewTask(name, "Math 3AB (sqrt(X)+sqrt(Y)+sqrt(Z))", &cTaskLib::Task_Math3in_AB);  
   else if (name == "math_3AC")
     NewTask(name, "Math 3AC (X+2Y+3Z)", &cTaskLib::Task_Math3in_AC);  
-  else if (name == "math_3AD")
-    NewTask(name, "Math 3AD (XY^2+Z^3)", &cTaskLib::Task_Math3in_AD);  
-  else if (name == "math_3AE")
-    NewTask(name, "Math 3AE ((X%Y)*Z)", &cTaskLib::Task_Math3in_AE);  
   /*
-  Visual Studio.net gives compiler error:
+  Visual Studio.net 2003 gives compiler error:
     fatal error C1061: compiler limit : blocks nested too deeply
-  Somebody in the lab, can't remember who, fixed this by removing
-  the 'else' in the next line.
+  Sherri fixed this by removing the 'else' in the next line.
   -- K
   */
-  //else if (name == "math_3AF")
-  //  NewTask(name, "Math 3AF ((X+Y)^2+sqrt(Y+Z))", &cTaskLib::Task_Math3in_AF);
-  if (name == "math_3AF")
+  //else if (name == "math_3AD")
+  //  NewTask(name, "Math 3AD (XY^2+Z^3)", &cTaskLib::Task_Math3in_AD); 
+  if (name == "math_3AD")
+    NewTask(name, "Math 3AD (XY^2+Z^3)", &cTaskLib::Task_Math3in_AD);  
+  else if (name == "math_3AE")
+    NewTask(name, "Math 3AE ((X%Y)*Z)", &cTaskLib::Task_Math3in_AE);  
+  else if (name == "math_3AF")
     NewTask(name, "Math 3AF ((X+Y)^2+sqrt(Y+Z))", &cTaskLib::Task_Math3in_AF);
   else if (name == "math_3AG")
     NewTask(name, "Math 3AG ((XY)%(YZ))", &cTaskLib::Task_Math3in_AG);  
@@ -325,6 +324,7 @@
     NewTask(name, "Math 3AM ((X+Y)^2+(Y+Z)^2)", &cTaskLib::Task_Math3in_AM);  
     
  // Make sure we have actuall found a task.
+
   if (task_array.GetSize() == start_size) {
     cerr << "Unknown task entry '" << name << "'." << endl;
     return NULL;
Index: avida/current/source/qt-viewer/event_chooser.cpp
diff -u /dev/null avida/current/source/qt-viewer/event_chooser.cpp:1.2
--- /dev/null	Wed Jun  4 11:35:24 2003
+++ avida/current/source/qt-viewer/event_chooser.cpp	Wed Jun  4 11:34:56 2003
@@ -0,0 +1,178 @@
+/****************************************************************************
+** Form implementation generated from reading ui file 'event_chooser.ui'
+**
+** Created: Wed Jun 4 14:01:36 2003
+**      by: The User Interface Compiler ($Id: event_chooser.cpp,v 1.2 2003/06/04 18:34:56 goingssh Exp $)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#include "event_chooser.h"
+
+#include <qvariant.h>
+#include <qpushbutton.h>
+#include <qlabel.h>
+#include <qcombobox.h>
+#include <qlineedit.h>
+#include <qtextview.h>
+#include <qbuttongroup.h>
+#include <qradiobutton.h>
+#include <qgroupbox.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+
+/*
+ *  Constructs a event_chooser as a child of 'parent', with the
+ *  name 'name' and widget flags set to 'f'.
+ */
+event_chooser::event_chooser( QWidget* parent, const char* name, WFlags fl )
+    : QWidget( parent, name, fl )
+{
+    if ( !name )
+	setName( "event_chooser" );
+    setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)3, 0, 0, sizePolicy().hasHeightForWidth() ) );
+    event_chooserLayout = new QVBoxLayout( this, 11, 6, "event_chooserLayout"); 
+
+    Layout6 = new QHBoxLayout( 0, 0, 6, "Layout6"); 
+
+    TextLabel2 = new QLabel( this, "TextLabel2" );
+    Layout6->addWidget( TextLabel2 );
+
+    m_event_cb = new QComboBox( FALSE, this, "m_event_cb" );
+    m_event_cb->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, 0, 0, m_event_cb->sizePolicy().hasHeightForWidth() ) );
+    Layout6->addWidget( m_event_cb );
+    event_chooserLayout->addLayout( Layout6 );
+
+    TextLabel3 = new QLabel( this, "TextLabel3" );
+    event_chooserLayout->addWidget( TextLabel3 );
+
+    m_parameters_inp = new QLineEdit( this, "m_parameters_inp" );
+    event_chooserLayout->addWidget( m_parameters_inp );
+
+    TextLabel4 = new QLabel( this, "TextLabel4" );
+    event_chooserLayout->addWidget( TextLabel4 );
+
+    m_event_descr_tv = new QTextView( this, "m_event_descr_tv" );
+    event_chooserLayout->addWidget( m_event_descr_tv );
+
+    Layout21 = new QHBoxLayout( 0, 0, 6, "Layout21"); 
+
+    m_trigger_group = new QButtonGroup( this, "m_trigger_group" );
+    m_trigger_group->setColumnLayout(0, Qt::Vertical );
+    m_trigger_group->layout()->setSpacing( 6 );
+    m_trigger_group->layout()->setMargin( 11 );
+    m_trigger_groupLayout = new QVBoxLayout( m_trigger_group->layout() );
+    m_trigger_groupLayout->setAlignment( Qt::AlignTop );
+
+    m_imm_rb = new QRadioButton( m_trigger_group, "m_imm_rb" );
+    m_trigger_groupLayout->addWidget( m_imm_rb );
+
+    m_upd_rb = new QRadioButton( m_trigger_group, "m_upd_rb" );
+    m_trigger_groupLayout->addWidget( m_upd_rb );
+
+    m_gen_rb = new QRadioButton( m_trigger_group, "m_gen_rb" );
+    m_trigger_groupLayout->addWidget( m_gen_rb );
+
+    m_realt_rb = new QRadioButton( m_trigger_group, "m_realt_rb" );
+    m_trigger_groupLayout->addWidget( m_realt_rb );
+
+    m_exec_rb = new QRadioButton( m_trigger_group, "m_exec_rb" );
+    m_trigger_groupLayout->addWidget( m_exec_rb );
+    Layout21->addWidget( m_trigger_group );
+    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Minimum );
+    Layout21->addItem( spacer );
+
+    GroupBox3 = new QGroupBox( this, "GroupBox3" );
+    GroupBox3->setColumnLayout(0, Qt::Vertical );
+    GroupBox3->layout()->setSpacing( 6 );
+    GroupBox3->layout()->setMargin( 11 );
+    GroupBox3Layout = new QGridLayout( GroupBox3->layout() );
+    GroupBox3Layout->setAlignment( Qt::AlignTop );
+
+    TextLabel1_2_2 = new QLabel( GroupBox3, "TextLabel1_2_2" );
+
+    GroupBox3Layout->addWidget( TextLabel1_2_2, 2, 0 );
+
+    m_stop_cb = new QComboBox( FALSE, GroupBox3, "m_stop_cb" );
+    m_stop_cb->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, 0, 0, m_stop_cb->sizePolicy().hasHeightForWidth() ) );
+    m_stop_cb->setEditable( TRUE );
+
+    GroupBox3Layout->addWidget( m_stop_cb, 2, 1 );
+
+    TextLabel1_2 = new QLabel( GroupBox3, "TextLabel1_2" );
+
+    GroupBox3Layout->addWidget( TextLabel1_2, 1, 0 );
+
+    m_step_cb = new QComboBox( FALSE, GroupBox3, "m_step_cb" );
+    m_step_cb->setEditable( TRUE );
+
+    GroupBox3Layout->addWidget( m_step_cb, 1, 1 );
+
+    TextLabel1 = new QLabel( GroupBox3, "TextLabel1" );
+
+    GroupBox3Layout->addWidget( TextLabel1, 0, 0 );
+
+    m_start_cb = new QComboBox( FALSE, GroupBox3, "m_start_cb" );
+    m_start_cb->setEditable( TRUE );
+
+    GroupBox3Layout->addWidget( m_start_cb, 0, 1 );
+    Layout21->addWidget( GroupBox3 );
+    event_chooserLayout->addLayout( Layout21 );
+    languageChange();
+    resize( QSize(293, 417).expandedTo(minimumSizeHint()) );
+    clearWState( WState_Polished );
+}
+
+/*
+ *  Destroys the object and frees any allocated resources
+ */
+event_chooser::~event_chooser()
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+
+/*
+ *  Sets the strings of the subwidgets using the current
+ *  language.
+ */
+void event_chooser::languageChange()
+{
+    setCaption( tr( "Event Chooser" ) );
+    TextLabel2->setText( tr( "Event:" ) );
+    TextLabel3->setText( tr( "Parameters:" ) );
+    TextLabel4->setText( tr( "Description:" ) );
+    m_trigger_group->setTitle( tr( "Trigger Type" ) );
+    m_imm_rb->setText( tr( "Immediate" ) );
+    m_upd_rb->setText( tr( "Update" ) );
+    m_gen_rb->setText( tr( "Generation" ) );
+    m_realt_rb->setText( tr( "Realtime" ) );
+    m_exec_rb->setText( tr( "Instr. Executed" ) );
+    GroupBox3->setTitle( tr( "Interval" ) );
+    TextLabel1_2_2->setText( tr( "Stop:" ) );
+    m_stop_cb->clear();
+    m_stop_cb->insertItem( tr( "100" ) );
+    m_stop_cb->insertItem( tr( "1000" ) );
+    m_stop_cb->insertItem( tr( "5000" ) );
+    m_stop_cb->insertItem( tr( "10000" ) );
+    m_stop_cb->insertItem( tr( "20000" ) );
+    m_stop_cb->insertItem( tr( "50000" ) );
+    m_stop_cb->insertItem( tr( "end" ) );
+    TextLabel1_2->setText( tr( "Step:" ) );
+    m_step_cb->clear();
+    m_step_cb->insertItem( tr( "1" ) );
+    m_step_cb->insertItem( tr( "10" ) );
+    m_step_cb->insertItem( tr( "20" ) );
+    m_step_cb->insertItem( tr( "50" ) );
+    m_step_cb->insertItem( tr( "100" ) );
+    m_step_cb->insertItem( tr( "once" ) );
+    m_step_cb->insertItem( tr( "all" ) );
+    TextLabel1->setText( tr( "Start:" ) );
+    m_start_cb->clear();
+    m_start_cb->insertItem( tr( "1" ) );
+    m_start_cb->insertItem( tr( "10" ) );
+    m_start_cb->insertItem( tr( "100" ) );
+    m_start_cb->insertItem( tr( "1000" ) );
+    m_start_cb->insertItem( tr( "begin" ) );
+}
+
Index: avida/current/source/qt-viewer/event_chooser.h
diff -u /dev/null avida/current/source/qt-viewer/event_chooser.h:1.2
--- /dev/null	Wed Jun  4 11:35:24 2003
+++ avida/current/source/qt-viewer/event_chooser.h	Wed Jun  4 11:34:56 2003
@@ -0,0 +1,67 @@
+/****************************************************************************
+** Form interface generated from reading ui file 'event_chooser.ui'
+**
+** Created: Wed Jun 4 14:01:36 2003
+**      by: The User Interface Compiler ($Id: event_chooser.h,v 1.2 2003/06/04 18:34:56 goingssh Exp $)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#ifndef EVENT_CHOOSER_H
+#define EVENT_CHOOSER_H
+
+#include <qvariant.h>
+#include <qwidget.h>
+
+class QVBoxLayout;
+class QHBoxLayout;
+class QGridLayout;
+class QLabel;
+class QComboBox;
+class QLineEdit;
+class QTextView;
+class QButtonGroup;
+class QRadioButton;
+class QGroupBox;
+
+class event_chooser : public QWidget
+{
+    Q_OBJECT
+
+public:
+    event_chooser( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+    ~event_chooser();
+
+    QLabel* TextLabel2;
+    QComboBox* m_event_cb;
+    QLabel* TextLabel3;
+    QLineEdit* m_parameters_inp;
+    QLabel* TextLabel4;
+    QTextView* m_event_descr_tv;
+    QButtonGroup* m_trigger_group;
+    QRadioButton* m_imm_rb;
+    QRadioButton* m_upd_rb;
+    QRadioButton* m_gen_rb;
+    QRadioButton* m_realt_rb;
+    QRadioButton* m_exec_rb;
+    QGroupBox* GroupBox3;
+    QLabel* TextLabel1_2_2;
+    QComboBox* m_stop_cb;
+    QLabel* TextLabel1_2;
+    QComboBox* m_step_cb;
+    QLabel* TextLabel1;
+    QComboBox* m_start_cb;
+
+protected:
+    QVBoxLayout* event_chooserLayout;
+    QHBoxLayout* Layout6;
+    QHBoxLayout* Layout21;
+    QVBoxLayout* m_trigger_groupLayout;
+    QGridLayout* GroupBox3Layout;
+
+protected slots:
+    virtual void languageChange();
+
+};
+
+#endif // EVENT_CHOOSER_H
Index: avida/current/source/qt-viewer/event_list_editor.cpp
diff -u /dev/null avida/current/source/qt-viewer/event_list_editor.cpp:1.2
--- /dev/null	Wed Jun  4 11:35:24 2003
+++ avida/current/source/qt-viewer/event_list_editor.cpp	Wed Jun  4 11:34:56 2003
@@ -0,0 +1,567 @@
+/****************************************************************************
+** Form implementation generated from reading ui file 'event_list_editor.ui'
+**
+** Created: Wed Jun 4 14:01:35 2003
+**      by: The User Interface Compiler ($Id: event_list_editor.cpp,v 1.2 2003/06/04 18:34:56 goingssh Exp $)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#include "event_list_editor.h"
+
+#include <qvariant.h>
+#include <qpushbutton.h>
+#include <qsplitter.h>
+#include <qgroupbox.h>
+#include <qheader.h>
+#include <qlistview.h>
+#include <qlabel.h>
+#include <qcombobox.h>
+#include <qlineedit.h>
+#include <qtextview.h>
+#include <qbuttongroup.h>
+#include <qradiobutton.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+#include <qaction.h>
+#include <qmenubar.h>
+#include <qpopupmenu.h>
+#include <qtoolbar.h>
+#include <qimage.h>
+#include <qpixmap.h>
+
+static const char* const image0_data[] = { 
+"16 16 45 1",
+". c None",
+"P c #1034ee",
+"D c #1038ee",
+"O c #183cf6",
+"G c #1840ff",
+"v c #295dff",
+"p c #315dff",
+"s c #3165ff",
+"I c #3955d5",
+"C c #3965ff",
+"N c #396dff",
+"F c #416dee",
+"f c #4175ff",
+"E c #4a65cd",
+"K c #4a79ff",
+"Q c #526dcd",
+"L c #5271cd",
+"M c #5285ff",
+"g c #5a71c5",
+"B c #5a89f6",
+"q c #6279c5",
+"J c #628dff",
+"A c #6295ff",
+"z c #6299ff",
+"l c #6a79bd",
+"w c #6a89d5",
+"H c #6a99f6",
+"o c #6a9dff",
+"# c #7385bd",
+"n c #73a5ff",
+"y c #73aaff",
+"b c #7ba1f6",
+"k c #7baeff",
+"j c #8bbeff",
+"m c #94c6ff",
+"u c #94ceff",
+"i c #9ccaff",
+"e c #9cd2ff",
+"a c #b4c6f6",
+"x c #bde6ff",
+"t c #d5e2ff",
+"d c #defaff",
+"c c #e6eaff",
+"h c #e6ffff",
+"r c #ffffff",
+"......#ab#......",
+".....#cdefg.....",
+"....#chijkfl....",
+"...#chmknnopq...",
+"..#rhjnnoooosl..",
+".#thunnoooooovl.",
+".wxiynoooozABCD.",
+".#.#.#fooCE.b##.",
+"......FyzG#.....",
+"......BkAv#.....",
+".....#Hkopg.....",
+".....#kyACI.....",
+".....#jnAfD.....",
+".....wkAJKD.....",
+".....LMNssO#....",
+".....#DDDPQ....."};
+
+static const char* const image1_data[] = { 
+"16 16 48 1",
+". c None",
+"N c #002cff",
+"Q c #082cff",
+"T c #183cf6",
+"S c #2050ff",
+"r c #2950e6",
+"O c #2959ff",
+"k c #3155e6",
+"E c #315df6",
+"w c #394cbd",
+"K c #3965ee",
+"B c #3965ff",
+"J c #4159c5",
+"z c #4175ff",
+"R c #4a61c5",
+"v c #4a7dff",
+"A c #526dcd",
+"I c #527dee",
+"q c #6295ff",
+"C c #6a85bd",
+"s c #6a85c5",
+"m c #6a91e6",
+"P c #6a9dff",
+"L c #6aa1ff",
+"H c #73a5ff",
+"f c #7ba1ee",
+"D c #7baeff",
+"d c #83aaee",
+"y c #83b6ff",
+"M c #83baff",
+"e c #8b99b4",
+"x c #8b9dc5",
+"u c #8bbeff",
+"p c #94caff",
+"# c #9ca1b4",
+"t c #9cceff",
+"o c #9cd2ff",
+"l c #a4b6cd",
+"a c #a4baee",
+"F c #a4cef6",
+"j c #a4d2ff",
+"c c #b4caee",
+"n c #b4eaff",
+"b c #bdcaee",
+"G c #bdd6ff",
+"i c #defaff",
+"h c #e6faff",
+"g c #f6ffff",
+".....#abcde.....",
+".....fghijk#....",
+"....lmnopqr.....",
+".....sptuvwl....",
+".....xypyzA.....",
+".....eypyBC.....",
+".....lfpDE#.....",
+".....ldtDE#.....",
+".l...eFtyvCl..l.",
+".sFGayuyyyHffIJ.",
+".CKLMMyyDyDHBNA.",
+"..COPyyyDDHzQR#.",
+"...COPDDHHvNwl..",
+"....CSqHqzNw#...",
+".....CSvvQwl....",
+"......srTA#....."};
+
+
+/*
+ *  Constructs a EventListEditor as a child of 'parent', with the
+ *  name 'name' and widget flags set to 'f'.
+ *
+ */
+EventListEditor::EventListEditor( QWidget* parent, const char* name, WFlags fl )
+    : QMainWindow( parent, name, fl ),
+      image0( (const char **) image0_data ),
+      image1( (const char **) image1_data )
+{
+    (void)statusBar();
+    if ( !name )
+	setName( "EventListEditor" );
+    setProperty( "sizeGripEnabled", QVariant( TRUE, 0 ) );
+    setCentralWidget( new QWidget( this, "qt_central_widget" ) );
+    EventListEditorLayout = new QHBoxLayout( centralWidget(), 11, 6, "EventListEditorLayout"); 
+
+    Splitter1 = new QSplitter( centralWidget(), "Splitter1" );
+    Splitter1->setMargin( 0 );
+    Splitter1->setOrientation( QSplitter::Horizontal );
+
+    QWidget* privateLayoutWidget = new QWidget( Splitter1, "Layout32" );
+    Layout32 = new QHBoxLayout( privateLayoutWidget, 0, 6, "Layout32"); 
+
+    GroupBox4 = new QGroupBox( privateLayoutWidget, "GroupBox4" );
+    GroupBox4->setAlignment( int( QGroupBox::AlignHCenter ) );
+    GroupBox4->setColumnLayout(0, Qt::Vertical );
+    GroupBox4->layout()->setSpacing( 6 );
+    GroupBox4->layout()->setMargin( 11 );
+    GroupBox4Layout = new QVBoxLayout( GroupBox4->layout() );
+    GroupBox4Layout->setAlignment( Qt::AlignTop );
+
+    m_events_lv = new QListView( GroupBox4, "m_events_lv" );
+    m_events_lv->addColumn( tr( "Trigger" ) );
+    m_events_lv->header()->setClickEnabled( FALSE, m_events_lv->header()->count() - 1 );
+    m_events_lv->addColumn( tr( "Start" ) );
+    m_events_lv->header()->setClickEnabled( FALSE, m_events_lv->header()->count() - 1 );
+    m_events_lv->addColumn( tr( "Step" ) );
+    m_events_lv->header()->setClickEnabled( FALSE, m_events_lv->header()->count() - 1 );
+    m_events_lv->addColumn( tr( "Stop" ) );
+    m_events_lv->header()->setClickEnabled( FALSE, m_events_lv->header()->count() - 1 );
+    m_events_lv->addColumn( tr( "Event" ) );
+    m_events_lv->header()->setClickEnabled( FALSE, m_events_lv->header()->count() - 1 );
+    m_events_lv->addColumn( tr( "Parameters" ) );
+    m_events_lv->header()->setClickEnabled( FALSE, m_events_lv->header()->count() - 1 );
+    GroupBox4Layout->addWidget( m_events_lv );
+
+    Layout26 = new QHBoxLayout( 0, 0, 6, "Layout26"); 
+
+    TextLabel5 = new QLabel( GroupBox4, "TextLabel5" );
+    Layout26->addWidget( TextLabel5 );
+
+    m_file_name_l = new QLabel( GroupBox4, "m_file_name_l" );
+    m_file_name_l->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, 0, 0, m_file_name_l->sizePolicy().hasHeightForWidth() ) );
+    m_file_name_l->setFrameShape( QLabel::Panel );
+    m_file_name_l->setFrameShadow( QLabel::Sunken );
+    Layout26->addWidget( m_file_name_l );
+    GroupBox4Layout->addLayout( Layout26 );
+
+    Layout31 = new QHBoxLayout( 0, 0, 6, "Layout31"); 
+
+    Layout22 = new QVBoxLayout( 0, 0, 6, "Layout22"); 
+
+    Layout20 = new QHBoxLayout( 0, 0, 6, "Layout20"); 
+
+    m_load_from_memory_b = new QPushButton( GroupBox4, "m_load_from_memory_b" );
+    Layout20->addWidget( m_load_from_memory_b );
+
+    m_commit_to_memory_b = new QPushButton( GroupBox4, "m_commit_to_memory_b" );
+    Layout20->addWidget( m_commit_to_memory_b );
+    Layout22->addLayout( Layout20 );
+
+    Layout21 = new QHBoxLayout( 0, 0, 6, "Layout21"); 
+
+    m_open_b = new QPushButton( GroupBox4, "m_open_b" );
+    Layout21->addWidget( m_open_b );
+
+    m_save_b = new QPushButton( GroupBox4, "m_save_b" );
+    Layout21->addWidget( m_save_b );
+
+    m_saveas_b = new QPushButton( GroupBox4, "m_saveas_b" );
+    Layout21->addWidget( m_saveas_b );
+    Layout22->addLayout( Layout21 );
+    Layout31->addLayout( Layout22 );
+    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Minimum );
+    Layout31->addItem( spacer );
+
+    Layout29 = new QVBoxLayout( 0, 0, 6, "Layout29"); 
+
+    m_help_b = new QPushButton( GroupBox4, "m_help_b" );
+    m_help_b->setAutoDefault( TRUE );
+    Layout29->addWidget( m_help_b );
+
+    m_close_b = new QPushButton( GroupBox4, "m_close_b" );
+    m_close_b->setAutoDefault( TRUE );
+    Layout29->addWidget( m_close_b );
+    Layout31->addLayout( Layout29 );
+    GroupBox4Layout->addLayout( Layout31 );
+    Layout32->addWidget( GroupBox4 );
+
+    Layout19 = new QVBoxLayout( 0, 0, 6, "Layout19"); 
+    QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Minimum );
+    Layout19->addItem( spacer_2 );
+
+    m_newevent_b = new QPushButton( privateLayoutWidget, "m_newevent_b" );
+    Layout19->addWidget( m_newevent_b );
+
+    m_deleteevent_b = new QPushButton( privateLayoutWidget, "m_deleteevent_b" );
+    Layout19->addWidget( m_deleteevent_b );
+
+    m_clearlist_b = new QPushButton( privateLayoutWidget, "m_clearlist_b" );
+    Layout19->addWidget( m_clearlist_b );
+    QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Minimum );
+    Layout19->addItem( spacer_3 );
+
+    m_upevent_b = new QPushButton( privateLayoutWidget, "m_upevent_b" );
+    m_upevent_b->setPixmap( image0 );
+    Layout19->addWidget( m_upevent_b );
+
+    m_downevent_b = new QPushButton( privateLayoutWidget, "m_downevent_b" );
+    m_downevent_b->setPixmap( image1 );
+    Layout19->addWidget( m_downevent_b );
+    QSpacerItem* spacer_4 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
+    Layout19->addItem( spacer_4 );
+    Layout32->addLayout( Layout19 );
+
+    GroupBox5 = new QGroupBox( Splitter1, "GroupBox5" );
+    GroupBox5->setAlignment( int( QGroupBox::AlignHCenter ) );
+    GroupBox5->setColumnLayout(0, Qt::Vertical );
+    GroupBox5->layout()->setSpacing( 6 );
+    GroupBox5->layout()->setMargin( 11 );
+    GroupBox5Layout = new QVBoxLayout( GroupBox5->layout() );
+    GroupBox5Layout->setAlignment( Qt::AlignTop );
+
+    Layout13 = new QVBoxLayout( 0, 0, 6, "Layout13"); 
+
+    Layout6 = new QHBoxLayout( 0, 0, 6, "Layout6"); 
+
+    TextLabel2 = new QLabel( GroupBox5, "TextLabel2" );
+    Layout6->addWidget( TextLabel2 );
+
+    m_event_cb = new QComboBox( FALSE, GroupBox5, "m_event_cb" );
+    m_event_cb->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, 0, 0, m_event_cb->sizePolicy().hasHeightForWidth() ) );
+    Layout6->addWidget( m_event_cb );
+    Layout13->addLayout( Layout6 );
+
+    TextLabel3 = new QLabel( GroupBox5, "TextLabel3" );
+    Layout13->addWidget( TextLabel3 );
+
+    m_parameters_inp = new QLineEdit( GroupBox5, "m_parameters_inp" );
+    Layout13->addWidget( m_parameters_inp );
+
+    TextLabel4 = new QLabel( GroupBox5, "TextLabel4" );
+    Layout13->addWidget( TextLabel4 );
+
+    m_event_descr_tv = new QTextView( GroupBox5, "m_event_descr_tv" );
+    Layout13->addWidget( m_event_descr_tv );
+
+    Layout21_2 = new QHBoxLayout( 0, 0, 6, "Layout21_2"); 
+
+    m_trigger_group = new QButtonGroup( GroupBox5, "m_trigger_group" );
+    m_trigger_group->setColumnLayout(0, Qt::Vertical );
+    m_trigger_group->layout()->setSpacing( 6 );
+    m_trigger_group->layout()->setMargin( 11 );
+    m_trigger_groupLayout = new QVBoxLayout( m_trigger_group->layout() );
+    m_trigger_groupLayout->setAlignment( Qt::AlignTop );
+
+    m_imm_rb = new QRadioButton( m_trigger_group, "m_imm_rb" );
+    m_trigger_groupLayout->addWidget( m_imm_rb );
+
+    m_upd_rb = new QRadioButton( m_trigger_group, "m_upd_rb" );
+    m_trigger_groupLayout->addWidget( m_upd_rb );
+
+    m_gen_rb = new QRadioButton( m_trigger_group, "m_gen_rb" );
+    m_trigger_groupLayout->addWidget( m_gen_rb );
+    Layout21_2->addWidget( m_trigger_group );
+    QSpacerItem* spacer_5 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Minimum );
+    Layout21_2->addItem( spacer_5 );
+
+    m_interval_group = new QGroupBox( GroupBox5, "m_interval_group" );
+    m_interval_group->setEnabled( TRUE );
+    m_interval_group->setColumnLayout(0, Qt::Vertical );
+    m_interval_group->layout()->setSpacing( 6 );
+    m_interval_group->layout()->setMargin( 11 );
+    m_interval_groupLayout = new QGridLayout( m_interval_group->layout() );
+    m_interval_groupLayout->setAlignment( Qt::AlignTop );
+
+    TextLabel1_2_2 = new QLabel( m_interval_group, "TextLabel1_2_2" );
+
+    m_interval_groupLayout->addWidget( TextLabel1_2_2, 2, 0 );
+
+    m_stop_cb = new QComboBox( FALSE, m_interval_group, "m_stop_cb" );
+    m_stop_cb->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, 0, 0, m_stop_cb->sizePolicy().hasHeightForWidth() ) );
+    m_stop_cb->setEditable( TRUE );
+
+    m_interval_groupLayout->addWidget( m_stop_cb, 2, 1 );
+
+    TextLabel1_2 = new QLabel( m_interval_group, "TextLabel1_2" );
+
+    m_interval_groupLayout->addWidget( TextLabel1_2, 1, 0 );
+
+    m_step_cb = new QComboBox( FALSE, m_interval_group, "m_step_cb" );
+    m_step_cb->setEditable( TRUE );
+
+    m_interval_groupLayout->addWidget( m_step_cb, 1, 1 );
+
+    TextLabel1 = new QLabel( m_interval_group, "TextLabel1" );
+
+    m_interval_groupLayout->addWidget( TextLabel1, 0, 0 );
+
+    m_start_cb = new QComboBox( FALSE, m_interval_group, "m_start_cb" );
+    m_start_cb->setEditable( TRUE );
+
+    m_interval_groupLayout->addWidget( m_start_cb, 0, 1 );
+    Layout21_2->addWidget( m_interval_group );
+    Layout13->addLayout( Layout21_2 );
+    GroupBox5Layout->addLayout( Layout13 );
+    EventListEditorLayout->addWidget( Splitter1 );
+
+    // toolbars
+
+    languageChange();
+    resize( QSize(974, 382).expandedTo(minimumSizeHint()) );
+    clearWState( WState_Polished );
+
+    // signals and slots connections
+    connect( m_newevent_b, SIGNAL( clicked() ), this, SLOT( newEvent() ) );
+    connect( m_deleteevent_b, SIGNAL( clicked() ), this, SLOT( deleteEvent() ) );
+    connect( m_upevent_b, SIGNAL( clicked() ), this, SLOT( raiseEvent() ) );
+    connect( m_downevent_b, SIGNAL( clicked() ), this, SLOT( lowerEvent() ) );
+    connect( m_parameters_inp, SIGNAL( textChanged(const QString&) ), this, SLOT( updateEventLV() ) );
+    connect( m_trigger_group, SIGNAL( clicked(int) ), this, SLOT( updateEventLV() ) );
+    connect( m_events_lv, SIGNAL( currentChanged(QListViewItem*) ), this, SLOT( updateEventInp() ) );
+    connect( m_open_b, SIGNAL( clicked() ), this, SLOT( openClicked() ) );
+    connect( m_save_b, SIGNAL( clicked() ), this, SLOT( saveClicked() ) );
+    connect( m_event_cb, SIGNAL( highlighted(int) ), this, SLOT( updateEventDescr(int) ) );
+    connect( m_event_cb, SIGNAL( activated(int) ), this, SLOT( updateEventLV() ) );
+    connect( m_start_cb, SIGNAL( activated(int) ), this, SLOT( updateEventLV() ) );
+    connect( m_step_cb, SIGNAL( activated(int) ), this, SLOT( updateEventLV() ) );
+    connect( m_stop_cb, SIGNAL( activated(int) ), this, SLOT( updateEventLV() ) );
+    connect( m_clearlist_b, SIGNAL( clicked() ), this, SLOT( clearClicked() ) );
+    connect( m_close_b, SIGNAL( clicked() ), this, SLOT( close() ) );
+    connect( m_saveas_b, SIGNAL( clicked() ), this, SLOT( saveAsClicked() ) );
+    connect( m_load_from_memory_b, SIGNAL( clicked() ), this, SLOT( loadFromMemoryClicked() ) );
+    connect( m_commit_to_memory_b, SIGNAL( clicked() ), this, SLOT( commitToMemoryClicked() ) );
+
+    // tab order
+    setTabOrder( m_newevent_b, m_deleteevent_b );
+    setTabOrder( m_deleteevent_b, m_upevent_b );
+    setTabOrder( m_upevent_b, m_downevent_b );
+    setTabOrder( m_downevent_b, m_close_b );
+}
+
+/*
+ *  Destroys the object and frees any allocated resources
+ */
+EventListEditor::~EventListEditor()
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+
+/*
+ *  Sets the strings of the subwidgets using the current
+ *  language.
+ */
+void EventListEditor::languageChange()
+{
+    setCaption( tr( "Event List Editor" ) );
+    GroupBox4->setTitle( tr( "Event List" ) );
+    m_events_lv->header()->setLabel( 0, tr( "Trigger" ) );
+    m_events_lv->header()->setLabel( 1, tr( "Start" ) );
+    m_events_lv->header()->setLabel( 2, tr( "Step" ) );
+    m_events_lv->header()->setLabel( 3, tr( "Stop" ) );
+    m_events_lv->header()->setLabel( 4, tr( "Event" ) );
+    m_events_lv->header()->setLabel( 5, tr( "Parameters" ) );
+    TextLabel5->setText( tr( "Event File:" ) );
+    m_file_name_l->setText( QString::null );
+    m_load_from_memory_b->setText( tr( "Reset" ) );
+    m_commit_to_memory_b->setText( tr( "Apply" ) );
+    m_open_b->setText( tr( "Open File" ) );
+    m_save_b->setText( tr( "Save File" ) );
+    m_saveas_b->setText( tr( "Save &as" ) );
+    m_help_b->setText( tr( "Help" ) );
+    QWhatsThis::add( m_help_b, tr( "Close dialog and discard all changes." ) );
+    m_close_b->setText( tr( "&Close" ) );
+    QWhatsThis::add( m_close_b, tr( "Close dialog and discard all changes." ) );
+    m_newevent_b->setText( tr( "&New Event" ) );
+    QToolTip::add( m_newevent_b, tr( "Add an item" ) );
+    QWhatsThis::add( m_newevent_b, tr( "<b>Add a new item.</b><p>New items are appended to the list.</p>" ) );
+    m_deleteevent_b->setText( tr( "&Delete Event" ) );
+    QToolTip::add( m_deleteevent_b, tr( "Delete Item" ) );
+    QWhatsThis::add( m_deleteevent_b, tr( "Delete the selected item" ) );
+    m_clearlist_b->setText( tr( "Cl&ear List" ) );
+    QToolTip::add( m_clearlist_b, tr( "Delete Item" ) );
+    QWhatsThis::add( m_clearlist_b, tr( "Delete the selected item" ) );
+    m_upevent_b->setText( QString::null );
+    QToolTip::add( m_upevent_b, tr( "Move up" ) );
+    QWhatsThis::add( m_upevent_b, tr( "Moves the selected item up." ) );
+    m_downevent_b->setText( QString::null );
+    QToolTip::add( m_downevent_b, tr( "Move down" ) );
+    QWhatsThis::add( m_downevent_b, tr( "Move the selected item down." ) );
+    GroupBox5->setTitle( tr( "Modify Selected Event" ) );
+    TextLabel2->setText( tr( "Event:" ) );
+    TextLabel3->setText( tr( "Parameters:" ) );
+    TextLabel4->setText( tr( "Description:" ) );
+    m_trigger_group->setTitle( tr( "Trigger Type" ) );
+    m_imm_rb->setText( tr( "Immediate" ) );
+    m_upd_rb->setText( tr( "Update" ) );
+    m_gen_rb->setText( tr( "Generation" ) );
+    m_interval_group->setTitle( tr( "Interval" ) );
+    TextLabel1_2_2->setText( tr( "Stop:" ) );
+    m_stop_cb->clear();
+    m_stop_cb->insertItem( tr( "100" ) );
+    m_stop_cb->insertItem( tr( "1000" ) );
+    m_stop_cb->insertItem( tr( "5000" ) );
+    m_stop_cb->insertItem( tr( "10000" ) );
+    m_stop_cb->insertItem( tr( "20000" ) );
+    m_stop_cb->insertItem( tr( "50000" ) );
+    m_stop_cb->insertItem( tr( "end" ) );
+    TextLabel1_2->setText( tr( "Step:" ) );
+    m_step_cb->clear();
+    m_step_cb->insertItem( tr( "1" ) );
+    m_step_cb->insertItem( tr( "10" ) );
+    m_step_cb->insertItem( tr( "20" ) );
+    m_step_cb->insertItem( tr( "50" ) );
+    m_step_cb->insertItem( tr( "100" ) );
+    m_step_cb->insertItem( tr( "once" ) );
+    m_step_cb->insertItem( tr( "all" ) );
+    TextLabel1->setText( tr( "Start:" ) );
+    m_start_cb->clear();
+    m_start_cb->insertItem( tr( "1" ) );
+    m_start_cb->insertItem( tr( "10" ) );
+    m_start_cb->insertItem( tr( "100" ) );
+    m_start_cb->insertItem( tr( "1000" ) );
+    m_start_cb->insertItem( tr( "begin" ) );
+}
+
+void EventListEditor::clearClicked()
+{
+    qWarning( "EventListEditor::clearClicked(): Not implemented yet" );
+}
+
+void EventListEditor::deleteEvent()
+{
+    qWarning( "EventListEditor::deleteEvent(): Not implemented yet" );
+}
+
+void EventListEditor::loadFromMemoryClicked()
+{
+    qWarning( "EventListEditor::loadFromMemoryClicked(): Not implemented yet" );
+}
+
+void EventListEditor::lowerEvent()
+{
+    qWarning( "EventListEditor::lowerEvent(): Not implemented yet" );
+}
+
+void EventListEditor::newEvent()
+{
+    qWarning( "EventListEditor::newEvent(): Not implemented yet" );
+}
+
+void EventListEditor::commitToMemoryClicked()
+{
+    qWarning( "EventListEditor::commitToMemoryClicked(): Not implemented yet" );
+}
+
+void EventListEditor::openClicked()
+{
+    qWarning( "EventListEditor::openClicked(): Not implemented yet" );
+}
+
+void EventListEditor::raiseEvent()
+{
+    qWarning( "EventListEditor::raiseEvent(): Not implemented yet" );
+}
+
+void EventListEditor::saveAsClicked()
+{
+    qWarning( "EventListEditor::saveAsClicked(): Not implemented yet" );
+}
+
+void EventListEditor::saveClicked()
+{
+    qWarning( "EventListEditor::saveClicked(): Not implemented yet" );
+}
+
+void EventListEditor::updateEventDescr(int)
+{
+    qWarning( "EventListEditor::updateEventDescr(int): Not implemented yet" );
+}
+
+void EventListEditor::updateEventInp()
+{
+    qWarning( "EventListEditor::updateEventInp(): Not implemented yet" );
+}
+
+void EventListEditor::updateEventLV()
+{
+    qWarning( "EventListEditor::updateEventLV(): Not implemented yet" );
+}
+
Index: avida/current/source/qt-viewer/event_list_editor.h
diff -u /dev/null avida/current/source/qt-viewer/event_list_editor.h:1.2
--- /dev/null	Wed Jun  4 11:35:24 2003
+++ avida/current/source/qt-viewer/event_list_editor.h	Wed Jun  4 11:34:56 2003
@@ -0,0 +1,122 @@
+/****************************************************************************
+** Form interface generated from reading ui file 'event_list_editor.ui'
+**
+** Created: Wed Jun 4 14:01:35 2003
+**      by: The User Interface Compiler ($Id: event_list_editor.h,v 1.2 2003/06/04 18:34:56 goingssh Exp $)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#ifndef EVENTLISTEDITOR_H
+#define EVENTLISTEDITOR_H
+
+#include <qvariant.h>
+#include <qpixmap.h>
+#include <qmainwindow.h>
+
+class QVBoxLayout;
+class QHBoxLayout;
+class QGridLayout;
+class QAction;
+class QActionGroup;
+class QToolBar;
+class QPopupMenu;
+class QSplitter;
+class QGroupBox;
+class QListView;
+class QListViewItem;
+class QLabel;
+class QPushButton;
+class QComboBox;
+class QLineEdit;
+class QTextView;
+class QButtonGroup;
+class QRadioButton;
+
+class EventListEditor : public QMainWindow
+{
+    Q_OBJECT
+
+public:
+    EventListEditor( QWidget* parent = 0, const char* name = 0, WFlags fl = WType_TopLevel );
+    ~EventListEditor();
+
+    QSplitter* Splitter1;
+    QGroupBox* GroupBox4;
+    QListView* m_events_lv;
+    QLabel* TextLabel5;
+    QLabel* m_file_name_l;
+    QPushButton* m_load_from_memory_b;
+    QPushButton* m_commit_to_memory_b;
+    QPushButton* m_open_b;
+    QPushButton* m_save_b;
+    QPushButton* m_saveas_b;
+    QPushButton* m_help_b;
+    QPushButton* m_close_b;
+    QPushButton* m_newevent_b;
+    QPushButton* m_deleteevent_b;
+    QPushButton* m_clearlist_b;
+    QPushButton* m_upevent_b;
+    QPushButton* m_downevent_b;
+    QGroupBox* GroupBox5;
+    QLabel* TextLabel2;
+    QComboBox* m_event_cb;
+    QLabel* TextLabel3;
+    QLineEdit* m_parameters_inp;
+    QLabel* TextLabel4;
+    QTextView* m_event_descr_tv;
+    QButtonGroup* m_trigger_group;
+    QRadioButton* m_imm_rb;
+    QRadioButton* m_upd_rb;
+    QRadioButton* m_gen_rb;
+    QGroupBox* m_interval_group;
+    QLabel* TextLabel1_2_2;
+    QComboBox* m_stop_cb;
+    QLabel* TextLabel1_2;
+    QComboBox* m_step_cb;
+    QLabel* TextLabel1;
+    QComboBox* m_start_cb;
+
+protected:
+    QHBoxLayout* EventListEditorLayout;
+    QHBoxLayout* Layout32;
+    QVBoxLayout* GroupBox4Layout;
+    QHBoxLayout* Layout26;
+    QHBoxLayout* Layout31;
+    QVBoxLayout* Layout22;
+    QHBoxLayout* Layout20;
+    QHBoxLayout* Layout21;
+    QVBoxLayout* Layout29;
+    QVBoxLayout* Layout19;
+    QVBoxLayout* GroupBox5Layout;
+    QVBoxLayout* Layout13;
+    QHBoxLayout* Layout6;
+    QHBoxLayout* Layout21_2;
+    QVBoxLayout* m_trigger_groupLayout;
+    QGridLayout* m_interval_groupLayout;
+
+protected slots:
+    virtual void languageChange();
+
+    virtual void clearClicked();
+    virtual void deleteEvent();
+    virtual void loadFromMemoryClicked();
+    virtual void lowerEvent();
+    virtual void newEvent();
+    virtual void commitToMemoryClicked();
+    virtual void openClicked();
+    virtual void raiseEvent();
+    virtual void saveAsClicked();
+    virtual void saveClicked();
+    virtual void updateEventDescr(int);
+    virtual void updateEventInp();
+    virtual void updateEventLV();
+
+
+private:
+    QPixmap image0;
+    QPixmap image1;
+
+};
+
+#endif // EVENTLISTEDITOR_H
Index: avida/current/source/qt-viewer/godbox.cpp
diff -u /dev/null avida/current/source/qt-viewer/godbox.cpp:1.2
--- /dev/null	Wed Jun  4 11:35:24 2003
+++ avida/current/source/qt-viewer/godbox.cpp	Wed Jun  4 11:34:56 2003
@@ -0,0 +1,203 @@
+/****************************************************************************
+** Form implementation generated from reading ui file 'godbox.ui'
+**
+** Created: Wed Jun 4 14:01:34 2003
+**      by: The User Interface Compiler ($Id: godbox.cpp,v 1.2 2003/06/04 18:34:56 goingssh Exp $)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#include "godbox.h"
+
+#include <qvariant.h>
+#include <qpushbutton.h>
+#include <qgroupbox.h>
+#include <qslider.h>
+#include <qlineedit.h>
+#include <qlabel.h>
+#include <qcombobox.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+
+/*
+ *  Constructs a GodBox as a child of 'parent', with the
+ *  name 'name' and widget flags set to 'f'.
+ */
+GodBox::GodBox( QWidget* parent, const char* name, WFlags fl )
+    : QWidget( parent, name, fl )
+{
+    if ( !name )
+	setName( "GodBox" );
+    setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
+    setMinimumSize( QSize( 490, 256 ) );
+    setMaximumSize( QSize( 32767, 32767 ) );
+    GodBoxLayout = new QVBoxLayout( this, 11, 6, "GodBoxLayout"); 
+
+    Layout34 = new QHBoxLayout( 0, 0, 6, "Layout34"); 
+
+    GroupBox7 = new QGroupBox( this, "GroupBox7" );
+
+    QWidget* privateLayoutWidget = new QWidget( GroupBox7, "Layout33" );
+    privateLayoutWidget->setGeometry( QRect( 11, 21, 287, 180 ) );
+    Layout33 = new QGridLayout( privateLayoutWidget, 1, 1, 0, 6, "Layout33"); 
+
+    Layout28 = new QHBoxLayout( 0, 0, 6, "Layout28"); 
+    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+    Layout28->addItem( spacer );
+
+    m_ins_mut_slider = new QSlider( privateLayoutWidget, "m_ins_mut_slider" );
+    m_ins_mut_slider->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)7, 0, 0, m_ins_mut_slider->sizePolicy().hasHeightForWidth() ) );
+    m_ins_mut_slider->setOrientation( QSlider::Vertical );
+    Layout28->addWidget( m_ins_mut_slider );
+    QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+    Layout28->addItem( spacer_2 );
+
+    Layout33->addLayout( Layout28, 2, 1 );
+
+    Layout29 = new QHBoxLayout( 0, 0, 6, "Layout29"); 
+    QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+    Layout29->addItem( spacer_3 );
+
+    m_cp_mut_slider = new QSlider( privateLayoutWidget, "m_cp_mut_slider" );
+    m_cp_mut_slider->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)7, 0, 0, m_cp_mut_slider->sizePolicy().hasHeightForWidth() ) );
+    m_cp_mut_slider->setOrientation( QSlider::Vertical );
+    Layout29->addWidget( m_cp_mut_slider );
+    QSpacerItem* spacer_4 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+    Layout29->addItem( spacer_4 );
+
+    Layout33->addLayout( Layout29, 2, 2 );
+
+    m_cp_mut_lineedit = new QLineEdit( privateLayoutWidget, "m_cp_mut_lineedit" );
+
+    Layout33->addWidget( m_cp_mut_lineedit, 1, 2 );
+
+    TextLabel2_3 = new QLabel( privateLayoutWidget, "TextLabel2_3" );
+
+    Layout33->addWidget( TextLabel2_3, 0, 1 );
+
+    TextLabel2_4 = new QLabel( privateLayoutWidget, "TextLabel2_4" );
+
+    Layout33->addWidget( TextLabel2_4, 0, 2 );
+
+    Layout27 = new QHBoxLayout( 0, 0, 6, "Layout27"); 
+    QSpacerItem* spacer_5 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+    Layout27->addItem( spacer_5 );
+
+    m_pt_mut_slider = new QSlider( privateLayoutWidget, "m_pt_mut_slider" );
+    m_pt_mut_slider->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)7, 0, 0, m_pt_mut_slider->sizePolicy().hasHeightForWidth() ) );
+    m_pt_mut_slider->setOrientation( QSlider::Vertical );
+    Layout27->addWidget( m_pt_mut_slider );
+    QSpacerItem* spacer_6 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+    Layout27->addItem( spacer_6 );
+
+    Layout33->addLayout( Layout27, 2, 0 );
+
+    m_ins_mut_lineedit = new QLineEdit( privateLayoutWidget, "m_ins_mut_lineedit" );
+
+    Layout33->addWidget( m_ins_mut_lineedit, 1, 1 );
+
+    m_pt_mut_lineedit = new QLineEdit( privateLayoutWidget, "m_pt_mut_lineedit" );
+
+    Layout33->addWidget( m_pt_mut_lineedit, 1, 0 );
+
+    TextLabel2 = new QLabel( privateLayoutWidget, "TextLabel2" );
+
+    Layout33->addWidget( TextLabel2, 0, 0 );
+    Layout34->addWidget( GroupBox7 );
+
+    GroupBox1_4 = new QGroupBox( this, "GroupBox1_4" );
+
+    QWidget* privateLayoutWidget_2 = new QWidget( GroupBox1_4, "Layout32" );
+    privateLayoutWidget_2->setGeometry( QRect( 11, 21, 93, 180 ) );
+    Layout32 = new QVBoxLayout( privateLayoutWidget_2, 0, 6, "Layout32"); 
+
+    TextLabel2_5 = new QLabel( privateLayoutWidget_2, "TextLabel2_5" );
+    Layout32->addWidget( TextLabel2_5 );
+
+    m_apocalypse_lineedit = new QLineEdit( privateLayoutWidget_2, "m_apocalypse_lineedit" );
+    Layout32->addWidget( m_apocalypse_lineedit );
+
+    Layout30 = new QHBoxLayout( 0, 0, 6, "Layout30"); 
+    QSpacerItem* spacer_7 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+    Layout30->addItem( spacer_7 );
+
+    m_apocalypse_slider = new QSlider( privateLayoutWidget_2, "m_apocalypse_slider" );
+    m_apocalypse_slider->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)7, 0, 0, m_apocalypse_slider->sizePolicy().hasHeightForWidth() ) );
+    m_apocalypse_slider->setOrientation( QSlider::Vertical );
+    Layout30->addWidget( m_apocalypse_slider );
+    QSpacerItem* spacer_8 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+    Layout30->addItem( spacer_8 );
+    Layout32->addLayout( Layout30 );
+
+    m_apocalypse_pushbutton = new QPushButton( privateLayoutWidget_2, "m_apocalypse_pushbutton" );
+    Layout32->addWidget( m_apocalypse_pushbutton );
+    Layout34->addWidget( GroupBox1_4 );
+
+    GroupBox1_5 = new QGroupBox( this, "GroupBox1_5" );
+
+    QWidget* privateLayoutWidget_3 = new QWidget( GroupBox1_5, "Layout31" );
+    privateLayoutWidget_3->setGeometry( QRect( 10, 21, 84, 180 ) );
+    Layout31 = new QVBoxLayout( privateLayoutWidget_3, 0, 6, "Layout31"); 
+
+    TextLabel1_6 = new QLabel( privateLayoutWidget_3, "TextLabel1_6" );
+    Layout31->addWidget( TextLabel1_6 );
+
+    m_inject_creature_combobox = new QComboBox( FALSE, privateLayoutWidget_3, "m_inject_creature_combobox" );
+    Layout31->addWidget( m_inject_creature_combobox );
+    QSpacerItem* spacer_9 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
+    Layout31->addItem( spacer_9 );
+
+    m_inject_one_button = new QPushButton( privateLayoutWidget_3, "m_inject_one_button" );
+    Layout31->addWidget( m_inject_one_button );
+
+    m_inject_all_button = new QPushButton( privateLayoutWidget_3, "m_inject_all_button" );
+    Layout31->addWidget( m_inject_all_button );
+    Layout34->addWidget( GroupBox1_5 );
+    GodBoxLayout->addLayout( Layout34 );
+
+    Layout35 = new QHBoxLayout( 0, 0, 6, "Layout35"); 
+
+    m_help_button = new QPushButton( this, "m_help_button" );
+    Layout35->addWidget( m_help_button );
+    QSpacerItem* spacer_10 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+    Layout35->addItem( spacer_10 );
+
+    m_close_button = new QPushButton( this, "m_close_button" );
+    Layout35->addWidget( m_close_button );
+    GodBoxLayout->addLayout( Layout35 );
+    languageChange();
+    resize( QSize(564, 280).expandedTo(minimumSizeHint()) );
+    clearWState( WState_Polished );
+}
+
+/*
+ *  Destroys the object and frees any allocated resources
+ */
+GodBox::~GodBox()
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+
+/*
+ *  Sets the strings of the subwidgets using the current
+ *  language.
+ */
+void GodBox::languageChange()
+{
+    setCaption( tr( "Play God" ) );
+    GroupBox7->setTitle( tr( "Mutation Rates" ) );
+    TextLabel2_3->setText( tr( "Insert/Delete:" ) );
+    TextLabel2_4->setText( tr( "Copy:" ) );
+    TextLabel2->setText( tr( "Cosmic Rays:" ) );
+    GroupBox1_4->setTitle( tr( "Apocalypse" ) );
+    TextLabel2_5->setText( tr( "Death Rate:" ) );
+    m_apocalypse_pushbutton->setText( tr( "Kill Creatures" ) );
+    GroupBox1_5->setTitle( tr( "Repopulate" ) );
+    TextLabel1_6->setText( tr( "New Creature Type:" ) );
+    m_inject_one_button->setText( tr( "Inject One Creature" ) );
+    m_inject_all_button->setText( tr( "Replace Population" ) );
+    m_help_button->setText( tr( "Help" ) );
+    m_close_button->setText( tr( "Close" ) );
+}
+
Index: avida/current/source/qt-viewer/godbox.h
diff -u /dev/null avida/current/source/qt-viewer/godbox.h:1.2
--- /dev/null	Wed Jun  4 11:35:24 2003
+++ avida/current/source/qt-viewer/godbox.h	Wed Jun  4 11:34:56 2003
@@ -0,0 +1,74 @@
+/****************************************************************************
+** Form interface generated from reading ui file 'godbox.ui'
+**
+** Created: Wed Jun 4 14:01:34 2003
+**      by: The User Interface Compiler ($Id: godbox.h,v 1.2 2003/06/04 18:34:56 goingssh Exp $)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#ifndef GODBOX_H
+#define GODBOX_H
+
+#include <qvariant.h>
+#include <qwidget.h>
+
+class QVBoxLayout;
+class QHBoxLayout;
+class QGridLayout;
+class QGroupBox;
+class QSlider;
+class QLineEdit;
+class QLabel;
+class QPushButton;
+class QComboBox;
+
+class GodBox : public QWidget
+{
+    Q_OBJECT
+
+public:
+    GodBox( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+    ~GodBox();
+
+    QGroupBox* GroupBox7;
+    QSlider* m_ins_mut_slider;
+    QSlider* m_cp_mut_slider;
+    QLineEdit* m_cp_mut_lineedit;
+    QLabel* TextLabel2_3;
+    QLabel* TextLabel2_4;
+    QSlider* m_pt_mut_slider;
+    QLineEdit* m_ins_mut_lineedit;
+    QLineEdit* m_pt_mut_lineedit;
+    QLabel* TextLabel2;
+    QGroupBox* GroupBox1_4;
+    QLabel* TextLabel2_5;
+    QLineEdit* m_apocalypse_lineedit;
+    QSlider* m_apocalypse_slider;
+    QPushButton* m_apocalypse_pushbutton;
+    QGroupBox* GroupBox1_5;
+    QLabel* TextLabel1_6;
+    QComboBox* m_inject_creature_combobox;
+    QPushButton* m_inject_one_button;
+    QPushButton* m_inject_all_button;
+    QPushButton* m_help_button;
+    QPushButton* m_close_button;
+
+protected:
+    QVBoxLayout* GodBoxLayout;
+    QHBoxLayout* Layout34;
+    QGridLayout* Layout33;
+    QHBoxLayout* Layout28;
+    QHBoxLayout* Layout29;
+    QHBoxLayout* Layout27;
+    QVBoxLayout* Layout32;
+    QHBoxLayout* Layout30;
+    QVBoxLayout* Layout31;
+    QHBoxLayout* Layout35;
+
+protected slots:
+    virtual void languageChange();
+
+};
+
+#endif // GODBOX_H
Index: avida/current/source/qt-viewer/plot_select_dia.cpp
diff -u /dev/null avida/current/source/qt-viewer/plot_select_dia.cpp:1.2
--- /dev/null	Wed Jun  4 11:35:24 2003
+++ avida/current/source/qt-viewer/plot_select_dia.cpp	Wed Jun  4 11:34:56 2003
@@ -0,0 +1,83 @@
+/****************************************************************************
+** Form implementation generated from reading ui file 'plot_select_dia.ui'
+**
+** Created: Wed Jun 4 14:01:33 2003
+**      by: The User Interface Compiler ($Id: plot_select_dia.cpp,v 1.2 2003/06/04 18:34:56 goingssh Exp $)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#include "plot_select_dia.h"
+
+#include <qvariant.h>
+#include <qlistbox.h>
+#include <qpushbutton.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+
+/*
+ *  Constructs a PlotSelectDia as a child of 'parent', with the
+ *  name 'name' and widget flags set to 'f'.
+ *
+ *  The dialog will by default be modeless, unless you set 'modal' to
+ *  TRUE to construct a modal dialog.
+ */
+PlotSelectDia::PlotSelectDia( QWidget* parent, const char* name, bool modal, WFlags fl )
+    : QDialog( parent, name, modal, fl )
+{
+    if ( !name )
+	setName( "PlotSelectDia" );
+    setSizeGripEnabled( TRUE );
+    PlotSelectDiaLayout = new QVBoxLayout( this, 0, 6, "PlotSelectDiaLayout"); 
+
+    m_data_lb = new QListBox( this, "m_data_lb" );
+    PlotSelectDiaLayout->addWidget( m_data_lb );
+
+    Layout2 = new QHBoxLayout( 0, 0, 6, "Layout2"); 
+
+    m_button_help = new QPushButton( this, "m_button_help" );
+    m_button_help->setAutoDefault( TRUE );
+    Layout2->addWidget( m_button_help );
+    QSpacerItem* spacer = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
+    Layout2->addItem( spacer );
+
+    m_button_ok = new QPushButton( this, "m_button_ok" );
+    m_button_ok->setAutoDefault( TRUE );
+    m_button_ok->setDefault( TRUE );
+    Layout2->addWidget( m_button_ok );
+
+    m_button_cancel = new QPushButton( this, "m_button_cancel" );
+    m_button_cancel->setAutoDefault( TRUE );
+    Layout2->addWidget( m_button_cancel );
+    PlotSelectDiaLayout->addLayout( Layout2 );
+    languageChange();
+    resize( QSize(312, 394).expandedTo(minimumSizeHint()) );
+    clearWState( WState_Polished );
+
+    // signals and slots connections
+    connect( m_button_ok, SIGNAL( clicked() ), this, SLOT( accept() ) );
+    connect( m_button_cancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
+    connect( m_data_lb, SIGNAL( doubleClicked(QListBoxItem*) ), this, SLOT( accept() ) );
+}
+
+/*
+ *  Destroys the object and frees any allocated resources
+ */
+PlotSelectDia::~PlotSelectDia()
+{
+    // no need to delete child widgets, Qt does it all for us
+}
+
+/*
+ *  Sets the strings of the subwidgets using the current
+ *  language.
+ */
+void PlotSelectDia::languageChange()
+{
+    setCaption( tr( "Plot Selection" ) );
+    m_button_help->setText( tr( "&Help" ) );
+    m_button_ok->setText( tr( "&OK" ) );
+    m_button_cancel->setText( tr( "&Cancel" ) );
+}
+
Index: avida/current/source/qt-viewer/plot_select_dia.h
diff -u /dev/null avida/current/source/qt-viewer/plot_select_dia.h:1.2
--- /dev/null	Wed Jun  4 11:35:24 2003
+++ avida/current/source/qt-viewer/plot_select_dia.h	Wed Jun  4 11:34:56 2003
@@ -0,0 +1,45 @@
+/****************************************************************************
+** Form interface generated from reading ui file 'plot_select_dia.ui'
+**
+** Created: Wed Jun 4 14:01:33 2003
+**      by: The User Interface Compiler ($Id: plot_select_dia.h,v 1.2 2003/06/04 18:34:56 goingssh Exp $)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#ifndef PLOTSELECTDIA_H
+#define PLOTSELECTDIA_H
+
+#include <qvariant.h>
+#include <qdialog.h>
+
+class QVBoxLayout;
+class QHBoxLayout;
+class QGridLayout;
+class QListBox;
+class QListBoxItem;
+class QPushButton;
+
+class PlotSelectDia : public QDialog
+{
+    Q_OBJECT
+
+public:
+    PlotSelectDia( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+    ~PlotSelectDia();
+
+    QListBox* m_data_lb;
+    QPushButton* m_button_help;
+    QPushButton* m_button_ok;
+    QPushButton* m_button_cancel;
+
+protected:
+    QVBoxLayout* PlotSelectDiaLayout;
+    QHBoxLayout* Layout2;
+
+protected slots:
+    virtual void languageChange();
+
+};
+
+#endif // PLOTSELECTDIA_H
Index: avida/current/source/qt-viewer/plot_widget.cc
diff -u avida/current/source/qt-viewer/plot_widget.cc:1.15 avida/current/source/qt-viewer/plot_widget.cc:1.16
--- avida/current/source/qt-viewer/plot_widget.cc:1.15	Sat May 17 02:48:11 2003
+++ avida/current/source/qt-viewer/plot_widget.cc	Wed Jun  4 11:34:56 2003
@@ -3,7 +3,7 @@
 #include "double_slider.hh"
 
 #include <float.h>           // for DBL_MIN, DBL_MAX (PointArray)
-#include <math.h>
+#include <cmath>
 #include <stdio.h>
 #include <iostream>
 
@@ -541,7 +541,7 @@
   double coeff = frexp( value, &exp_2 );
   double exp_10 = exp_2/3.3219280949;
   *exponent = (int) floor( exp_10 );
-  coeff *= pow( 10, exp_10 - *exponent );
+  coeff *= pow( double(10), exp_10 - (double)*exponent );
 
   if ( coeff < 1 ){
     coeff *= 10;
Index: avida/current/source/qt-viewer/population_cell_wrapper.hh
diff -u avida/current/source/qt-viewer/population_cell_wrapper.hh:1.4 avida/current/source/qt-viewer/population_cell_wrapper.hh:1.5
--- avida/current/source/qt-viewer/population_cell_wrapper.hh:1.4	Tue May 20 07:22:30 2003
+++ avida/current/source/qt-viewer/population_cell_wrapper.hh	Wed Jun  4 11:34:56 2003
@@ -60,7 +60,7 @@
  * PopulationCellWrapper instance.
  *
  * @short Encapsulates an Avida population cell and changes to its data.
- * @version $Id: population_cell_wrapper.hh,v 1.4 2003/05/20 14:22:30 kaben Exp $
+ * @version $Id: population_cell_wrapper.hh,v 1.5 2003/06/04 18:34:56 goingssh Exp $
  * @see avd_CellViewListItem
  * @see avd_WidgetListItem
  * @see avd_WidgetList
Index: avida/current/source/qt-viewer/qt-viewer.pro
diff -u avida/current/source/qt-viewer/qt-viewer.pro:1.5 avida/current/source/qt-viewer/qt-viewer.pro:1.6
--- avida/current/source/qt-viewer/qt-viewer.pro:1.5	Tue Jun  3 19:36:54 2003
+++ avida/current/source/qt-viewer/qt-viewer.pro	Wed Jun  4 11:34:56 2003
@@ -3,29 +3,15 @@
 
 TEMPLATE    = app
 TARGET      = qt-viewer
+DESTDIR	= ../../work
 CONFIG      *= qt thread
 CONFIG      *= cpu event main trio tools
-
-isEmpty(AT_DATADIR){
-DESTDIR	= ../../work
-}
-isEmpty(DESTDIR){
-DESTDIR	= $$AT_DATADIR
-}
-
-macx {
-# setting MOC_DIR should not be necessary:
-MOC_DIR = .
-# FIXME:  replace w/QSettings stuff in avd_help_controller.cc
-DEFINES *= PLATFORM_IS_MAC_OS_X
-}
-
-win32 {
 CONFIG	+= console
+
 QMAKE_LFLAGS_CONSOLE += /FORCE:MULTIPLE
+
 OBJECTS_DIR = objs
 MOC_DIR 	= moc
-}
 
 include($$AVIDA_SRC_DIR/modules.pri)
 
Index: avida/current/source/qt-viewer/exp/avd_widget_list.hh
diff -u avida/current/source/qt-viewer/exp/avd_widget_list.hh:1.6 avida/current/source/qt-viewer/exp/avd_widget_list.hh:1.7
--- avida/current/source/qt-viewer/exp/avd_widget_list.hh:1.6	Tue May 20 07:22:30 2003
+++ avida/current/source/qt-viewer/exp/avd_widget_list.hh	Wed Jun  4 11:35:14 2003
@@ -37,7 +37,7 @@
  * its subclasses.
  *
  * @short A scrollable collapsible container of other widgets.
- * @version $Id: avd_widget_list.hh,v 1.6 2003/05/20 14:22:30 kaben Exp $
+ * @version $Id: avd_widget_list.hh,v 1.7 2003/06/04 18:35:14 goingssh Exp $
  * @see avd_WidgetListItem
  */
 class avd_WidgetList : public QWidget {
Index: avida/current/source/qt-viewer/exp/avd_widget_list_item.hh
diff -u avida/current/source/qt-viewer/exp/avd_widget_list_item.hh:1.5 avida/current/source/qt-viewer/exp/avd_widget_list_item.hh:1.6
--- avida/current/source/qt-viewer/exp/avd_widget_list_item.hh:1.5	Tue May 20 07:22:31 2003
+++ avida/current/source/qt-viewer/exp/avd_widget_list_item.hh	Wed Jun  4 11:35:14 2003
@@ -27,7 +27,7 @@
  * forming a collapsible hierarchial view of widgets.
  *
  * @short A labeled collapsible container of other widgets.
- * @version $Id: avd_widget_list_item.hh,v 1.5 2003/05/20 14:22:31 kaben Exp $
+ * @version $Id: avd_widget_list_item.hh,v 1.6 2003/06/04 18:35:14 goingssh Exp $
  * @see avd_WidgetList
  */
 class avd_WidgetListItem : public QWidget{
Index: avida/current/source/qt-viewer/exp/avd_widget_list_item_container.hh
diff -u avida/current/source/qt-viewer/exp/avd_widget_list_item_container.hh:1.5 avida/current/source/qt-viewer/exp/avd_widget_list_item_container.hh:1.6
--- avida/current/source/qt-viewer/exp/avd_widget_list_item_container.hh:1.5	Tue May 20 07:22:31 2003
+++ avida/current/source/qt-viewer/exp/avd_widget_list_item_container.hh	Wed Jun  4 11:35:14 2003
@@ -20,7 +20,7 @@
  * vertical layout.
  *
  * @short Part of the avd_WidgetListItem.
- * @version $Id: avd_widget_list_item_container.hh,v 1.5 2003/05/20 14:22:31 kaben Exp $
+ * @version $Id: avd_widget_list_item_container.hh,v 1.6 2003/06/04 18:35:14 goingssh Exp $
  * @see avd_WidgetListItem
  * @see avd_WidgetList
  */
Index: avida/current/source/third-party/trio-1.9/example.c
diff -u avida/current/source/third-party/trio-1.9/example.c:1.3 avida/current/source/third-party/trio-1.9/example.c:1.4
--- avida/current/source/third-party/trio-1.9/example.c:1.3	Tue May 20 07:22:31 2003
+++ avida/current/source/third-party/trio-1.9/example.c	Wed Jun  4 11:35:15 2003
@@ -32,7 +32,7 @@
 # define LONGEST LONGLONG
 #endif
 
-static TRIO_CONST char rcsid[] = "@(#)$Id: example.c,v 1.3 2003/05/20 14:22:31 kaben Exp $";
+static TRIO_CONST char rcsid[] = "@(#)$Id: example.c,v 1.4 2003/06/04 18:35:15 goingssh Exp $";
 
 /*************************************************************************
  *
Index: avida/current/source/third-party/trio-1.9/regression.c
diff -u avida/current/source/third-party/trio-1.9/regression.c:1.3 avida/current/source/third-party/trio-1.9/regression.c:1.4
--- avida/current/source/third-party/trio-1.9/regression.c:1.3	Tue May 20 07:22:31 2003
+++ avida/current/source/third-party/trio-1.9/regression.c	Wed Jun  4 11:35:15 2003
@@ -33,7 +33,7 @@
 #define DOUBLE_EQUAL(x,y) (((x)>(y)-DBL_EPSILON) && ((x)<(y)+DBL_EPSILON))
 #define FLOAT_EQUAL(x,y) (((x)>(y)-FLT_EPSILON) && ((x)<(y)+FLT_EPSILON))
 
-static TRIO_CONST char rcsid[] = "@(#)$Id: regression.c,v 1.3 2003/05/20 14:22:31 kaben Exp $";
+static TRIO_CONST char rcsid[] = "@(#)$Id: regression.c,v 1.4 2003/06/04 18:35:15 goingssh Exp $";
 
 
 /*************************************************************************
Index: avida/current/source/third-party/trio-1.9/strio.h
diff -u avida/current/source/third-party/trio-1.9/strio.h:1.3 avida/current/source/third-party/trio-1.9/strio.h:1.4
--- avida/current/source/third-party/trio-1.9/strio.h:1.3	Tue May 20 07:22:31 2003
+++ avida/current/source/third-party/trio-1.9/strio.h	Wed Jun  4 11:35:15 2003
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * $Id: strio.h,v 1.3 2003/05/20 14:22:31 kaben Exp $
+ * $Id: strio.h,v 1.4 2003/06/04 18:35:15 goingssh Exp $
  *
  * Copyright (C) 1998 Bjorn Reese and Daniel Stenberg.
  *
Index: avida/current/source/third-party/trio-1.9/trio.c
diff -u avida/current/source/third-party/trio-1.9/trio.c:1.4 avida/current/source/third-party/trio-1.9/trio.c:1.5
--- avida/current/source/third-party/trio-1.9/trio.c:1.4	Tue May 20 07:22:31 2003
+++ avida/current/source/third-party/trio-1.9/trio.c	Wed Jun  4 11:35:15 2003
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * $Id: trio.c,v 1.4 2003/05/20 14:22:31 kaben Exp $
+ * $Id: trio.c,v 1.5 2003/06/04 18:35:15 goingssh Exp $
  *
  * Copyright (C) 1998 Bjorn Reese and Daniel Stenberg.
  *
@@ -720,7 +720,7 @@
  *
  *************************************************************************/
 
-static TRIO_CONST char rcsid[] = "@(#)$Id: trio.c,v 1.4 2003/05/20 14:22:31 kaben Exp $";
+static TRIO_CONST char rcsid[] = "@(#)$Id: trio.c,v 1.5 2003/06/04 18:35:15 goingssh Exp $";
 
 /*
  * Need this to workaround a parser bug in HP C/iX compiler that fails
Index: avida/current/source/third-party/trio-1.9/trio.h
diff -u avida/current/source/third-party/trio-1.9/trio.h:1.3 avida/current/source/third-party/trio-1.9/trio.h:1.4
--- avida/current/source/third-party/trio-1.9/trio.h:1.3	Tue May 20 07:22:31 2003
+++ avida/current/source/third-party/trio-1.9/trio.h	Wed Jun  4 11:35:15 2003
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * $Id: trio.h,v 1.3 2003/05/20 14:22:31 kaben Exp $
+ * $Id: trio.h,v 1.4 2003/06/04 18:35:15 goingssh Exp $
  *
  * Copyright (C) 1998 Bjorn Reese and Daniel Stenberg.
  *
Index: avida/current/source/third-party/trio-1.9/triodef.h
diff -u avida/current/source/third-party/trio-1.9/triodef.h:1.4 avida/current/source/third-party/trio-1.9/triodef.h:1.5
--- avida/current/source/third-party/trio-1.9/triodef.h:1.4	Tue May 20 07:22:31 2003
+++ avida/current/source/third-party/trio-1.9/triodef.h	Wed Jun  4 11:35:15 2003
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * $Id: triodef.h,v 1.4 2003/05/20 14:22:31 kaben Exp $
+ * $Id: triodef.h,v 1.5 2003/06/04 18:35:15 goingssh Exp $
  *
  * Copyright (C) 2001 Bjorn Reese <breese at users.sourceforge.net>
  *
Index: avida/current/source/third-party/trio-1.9/trionan.c
diff -u avida/current/source/third-party/trio-1.9/trionan.c:1.4 avida/current/source/third-party/trio-1.9/trionan.c:1.5
--- avida/current/source/third-party/trio-1.9/trionan.c:1.4	Tue May 20 07:22:31 2003
+++ avida/current/source/third-party/trio-1.9/trionan.c	Wed Jun  4 11:35:15 2003
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * $Id: trionan.c,v 1.4 2003/05/20 14:22:31 kaben Exp $
+ * $Id: trionan.c,v 1.5 2003/06/04 18:35:15 goingssh Exp $
  *
  * Copyright (C) 2001 Bjorn Reese <breese at users.sourceforge.net>
  *
@@ -106,7 +106,7 @@
  * Constants
  */
 
-static TRIO_CONST char rcsid[] = "@(#)$Id: trionan.c,v 1.4 2003/05/20 14:22:31 kaben Exp $";
+static TRIO_CONST char rcsid[] = "@(#)$Id: trionan.c,v 1.5 2003/06/04 18:35:15 goingssh Exp $";
 
 #if defined(USE_IEEE_754)
 
Index: avida/current/source/third-party/trio-1.9/trionan.h
diff -u avida/current/source/third-party/trio-1.9/trionan.h:1.3 avida/current/source/third-party/trio-1.9/trionan.h:1.4
--- avida/current/source/third-party/trio-1.9/trionan.h:1.3	Tue May 20 07:22:31 2003
+++ avida/current/source/third-party/trio-1.9/trionan.h	Wed Jun  4 11:35:15 2003
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * $Id: trionan.h,v 1.3 2003/05/20 14:22:31 kaben Exp $
+ * $Id: trionan.h,v 1.4 2003/06/04 18:35:15 goingssh Exp $
  *
  * Copyright (C) 2001 Bjorn Reese <breese at users.sourceforge.net>
  *
Index: avida/current/source/third-party/trio-1.9/triop.h
diff -u avida/current/source/third-party/trio-1.9/triop.h:1.3 avida/current/source/third-party/trio-1.9/triop.h:1.4
--- avida/current/source/third-party/trio-1.9/triop.h:1.3	Tue May 20 07:22:31 2003
+++ avida/current/source/third-party/trio-1.9/triop.h	Wed Jun  4 11:35:15 2003
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * $Id: triop.h,v 1.3 2003/05/20 14:22:31 kaben Exp $
+ * $Id: triop.h,v 1.4 2003/06/04 18:35:15 goingssh Exp $
  *
  * Copyright (C) 2000 Bjorn Reese and Daniel Stenberg.
  *
Index: avida/current/source/third-party/trio-1.9/triostr.c
diff -u avida/current/source/third-party/trio-1.9/triostr.c:1.4 avida/current/source/third-party/trio-1.9/triostr.c:1.5
--- avida/current/source/third-party/trio-1.9/triostr.c:1.4	Tue May 20 07:22:31 2003
+++ avida/current/source/third-party/trio-1.9/triostr.c	Wed Jun  4 11:35:15 2003
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * $Id: triostr.c,v 1.4 2003/05/20 14:22:31 kaben Exp $
+ * $Id: triostr.c,v 1.5 2003/06/04 18:35:15 goingssh Exp $
  *
  * Copyright (C) 2001 Bjorn Reese and Daniel Stenberg.
  *
@@ -88,7 +88,7 @@
  */
 
 #if !defined(TRIO_MINIMAL)
-static TRIO_CONST char rcsid[] = "@(#)$Id: triostr.c,v 1.4 2003/05/20 14:22:31 kaben Exp $";
+static TRIO_CONST char rcsid[] = "@(#)$Id: triostr.c,v 1.5 2003/06/04 18:35:15 goingssh Exp $";
 #endif
 
 /*************************************************************************
Index: avida/current/source/third-party/trio-1.9/triostr.h
diff -u avida/current/source/third-party/trio-1.9/triostr.h:1.3 avida/current/source/third-party/trio-1.9/triostr.h:1.4
--- avida/current/source/third-party/trio-1.9/triostr.h:1.3	Tue May 20 07:22:31 2003
+++ avida/current/source/third-party/trio-1.9/triostr.h	Wed Jun  4 11:35:15 2003
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * $Id: triostr.h,v 1.3 2003/05/20 14:22:31 kaben Exp $
+ * $Id: triostr.h,v 1.4 2003/06/04 18:35:15 goingssh Exp $
  *
  * Copyright (C) 2001 Bjorn Reese and Daniel Stenberg.
  *
Index: avida/current/source/third-party/trio-1.9/doc/doc.h
diff -u avida/current/source/third-party/trio-1.9/doc/doc.h:1.3 avida/current/source/third-party/trio-1.9/doc/doc.h:1.4
--- avida/current/source/third-party/trio-1.9/doc/doc.h:1.3	Tue May 20 07:22:31 2003
+++ avida/current/source/third-party/trio-1.9/doc/doc.h	Wed Jun  4 11:35:16 2003
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * $Id: doc.h,v 1.3 2003/05/20 14:22:31 kaben Exp $
+ * $Id: doc.h,v 1.4 2003/06/04 18:35:16 goingssh Exp $
  *
  * Copyright (C) 2001 Bjorn Reese and Daniel Stenberg.
  *
Index: avida/current/source/third-party/trio-1.9/doc/doc_dynamic.h
diff -u avida/current/source/third-party/trio-1.9/doc/doc_dynamic.h:1.3 avida/current/source/third-party/trio-1.9/doc/doc_dynamic.h:1.4
--- avida/current/source/third-party/trio-1.9/doc/doc_dynamic.h:1.3	Tue May 20 07:22:31 2003
+++ avida/current/source/third-party/trio-1.9/doc/doc_dynamic.h	Wed Jun  4 11:35:16 2003
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * $Id: doc_dynamic.h,v 1.3 2003/05/20 14:22:31 kaben Exp $
+ * $Id: doc_dynamic.h,v 1.4 2003/06/04 18:35:16 goingssh Exp $
  *
  * Copyright (C) 2001 Bjorn Reese and Daniel Stenberg.
  *
Index: avida/current/source/third-party/trio-1.9/doc/doc_printf.h
diff -u avida/current/source/third-party/trio-1.9/doc/doc_printf.h:1.3 avida/current/source/third-party/trio-1.9/doc/doc_printf.h:1.4
--- avida/current/source/third-party/trio-1.9/doc/doc_printf.h:1.3	Tue May 20 07:22:31 2003
+++ avida/current/source/third-party/trio-1.9/doc/doc_printf.h	Wed Jun  4 11:35:16 2003
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * $Id: doc_printf.h,v 1.3 2003/05/20 14:22:31 kaben Exp $
+ * $Id: doc_printf.h,v 1.4 2003/06/04 18:35:16 goingssh Exp $
  *
  * Copyright (C) 2001 Bjorn Reese and Daniel Stenberg.
  *
Index: avida/current/source/third-party/trio-1.9/doc/doc_register.h
diff -u avida/current/source/third-party/trio-1.9/doc/doc_register.h:1.3 avida/current/source/third-party/trio-1.9/doc/doc_register.h:1.4
--- avida/current/source/third-party/trio-1.9/doc/doc_register.h:1.3	Tue May 20 07:22:31 2003
+++ avida/current/source/third-party/trio-1.9/doc/doc_register.h	Wed Jun  4 11:35:16 2003
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * $Id: doc_register.h,v 1.3 2003/05/20 14:22:31 kaben Exp $
+ * $Id: doc_register.h,v 1.4 2003/06/04 18:35:16 goingssh Exp $
  *
  * Copyright (C) 2001 Bjorn Reese and Daniel Stenberg.
  *
Index: avida/current/source/third-party/trio-1.9/doc/doc_scanf.h
diff -u avida/current/source/third-party/trio-1.9/doc/doc_scanf.h:1.3 avida/current/source/third-party/trio-1.9/doc/doc_scanf.h:1.4
--- avida/current/source/third-party/trio-1.9/doc/doc_scanf.h:1.3	Tue May 20 07:22:31 2003
+++ avida/current/source/third-party/trio-1.9/doc/doc_scanf.h	Wed Jun  4 11:35:16 2003
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * $Id: doc_scanf.h,v 1.3 2003/05/20 14:22:31 kaben Exp $
+ * $Id: doc_scanf.h,v 1.4 2003/06/04 18:35:16 goingssh Exp $
  *
  * Copyright (C) 2001 Bjorn Reese and Daniel Stenberg.
  *
Index: avida/current/source/third-party/trio-1.9/doc/doc_static.h
diff -u avida/current/source/third-party/trio-1.9/doc/doc_static.h:1.3 avida/current/source/third-party/trio-1.9/doc/doc_static.h:1.4
--- avida/current/source/third-party/trio-1.9/doc/doc_static.h:1.3	Tue May 20 07:22:31 2003
+++ avida/current/source/third-party/trio-1.9/doc/doc_static.h	Wed Jun  4 11:35:16 2003
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * $Id: doc_static.h,v 1.3 2003/05/20 14:22:31 kaben Exp $
+ * $Id: doc_static.h,v 1.4 2003/06/04 18:35:16 goingssh Exp $
  *
  * Copyright (C) 2001 Bjorn Reese and Daniel Stenberg.
  *
Index: avida/current/source/viewers/viewers.pro
diff -u avida/current/source/viewers/viewers.pro:1.2 avida/current/source/viewers/viewers.pro:1.3
--- avida/current/source/viewers/viewers.pro:1.2	Sat May 17 02:48:16 2003
+++ avida/current/source/viewers/viewers.pro	Wed Jun  4 11:35:16 2003
@@ -3,11 +3,16 @@
 
 TEMPLATE    = app
 TARGET      = ncurses-viewer
+DESTDIR	= ../../work
 CONFIG      *= warn-on
 CONFIG      *= cpu event main trio tools
-LIBS        += -lncurses
-
+CONFIG	+= console
+OBJECTS_DIR	= objs
+!win32:LIBS += -lncurses
+else:LIBS	+= -l..\third-party\pdcurses\pdcurses
 include($$AVIDA_SRC_DIR/modules.pri)
+
+INCLUDEPATH	+= ..\third-party\pdcurses
 
 HEADERS +=  ansi.hh \
             bar_screen.hh \
Index: avida/current/source/third-party/pdcurses/README.txt
diff -u /dev/null avida/current/source/third-party/pdcurses/README.txt:1.2
--- /dev/null	Wed Jun  4 11:35:25 2003
+++ avida/current/source/third-party/pdcurses/README.txt	Wed Jun  4 11:35:22 2003
@@ -0,0 +1,9 @@
+*This PDCurses library is specific to Win32 and will only be linked 
+if running Avida in NCurses mode on a Windows machine. 
+
+*PDCurses is public domain software.  The full package may be obtained from
+our CVS repository in the module current/source/third-party/PDCurses-2.6
+using the command:
+cvs -z3 -d:pserver:anonymous at cvs.sourceforge.net:/cvsroot/avida co current/source/third-party/PDCurses-2.6
+
+*The PDCurses website can be found at http://pdcurses.sourceforge.net/
\ No newline at end of file
Index: avida/current/source/third-party/pdcurses/curses.h
diff -u /dev/null avida/current/source/third-party/pdcurses/curses.h:1.2
--- /dev/null	Wed Jun  4 11:35:25 2003
+++ avida/current/source/third-party/pdcurses/curses.h	Wed Jun  4 11:35:22 2003
@@ -0,0 +1,2140 @@
+/*
+***************************************************************************
+* This file comprises part of PDCurses. PDCurses is Public Domain software.
+* You may use this code for whatever purposes you desire. This software
+* is provided AS IS with NO WARRANTY whatsoever.
+* Should this software be used in another application, an acknowledgement
+* that PDCurses code is used would be appreciated, but is not mandatory.
+*
+* Any changes which you make to this software which may improve or enhance
+* it, should be forwarded to the current maintainer for the benefit of 
+* other users.
+*
+* The only restriction placed on this code is that no distribution of
+* modified PDCurses code be made under the PDCurses name, by anyone
+* other than the current maintainer.
+* 
+* See the file maintain.er for details of the current maintainer.
+***************************************************************************
+*/
+/* 
+$Id: curses.h,v 1.2 2003/06/04 18:35:22 goingssh Exp $
+*/
+/*
+*----------------------------------------------------------------------
+*				PDCurses
+*----------------------------------------------------------------------
+* MH
+*	991212	2.4
+*		Key modifiers pressed by themselves are now returned as keys
+*			KEY_SHIFT_L KEY_SHIFT_R 
+*			KEY_CONTROL_L KEY_CONTROL_R
+*			KEY_ALT_L KEY_ALT_R
+*			This works on Win32 and X11 ports only
+*		Added support for lcc-win32, supplied by Matthias Burian
+*		Added support for MingW32, and CygnusW32 compilers
+*		Added clipboard support for X11, Win32 and OS/2 ports
+*		Added ability to get to the input file descriptor
+*		New function for X11; Xinitscr() which allows standard X11
+*			switches to be passed to the application
+*		Added X11 shared library support
+*
+* MH
+*	960920	2.3	Added more System V R4 functions
+*
+*			Rewrote X11 port
+*
+*			Added Win32 port - original port by Chris Szurgot
+*				some updates by Mark Hessling
+*				some updates by Gurusamy Sarathy
+*
+*			slk() functions added by Kim Huron
+*
+*			Support for more and newer versions of compilers
+*
+*			Added mouse support for X11 and Win32 ports
+*
+*			Size of chtype now long
+*
+* MH
+*	950126	2.2	Added more System V R4 functions
+*
+*			Added beta Xwindows port
+*
+*			Changed chtype to long
+*
+*			Incorporated panels library
+*
+*			Support for more and newer versions of compilers
+*
+* MH
+*	930531	2.1	Added support for djgpp
+*
+*			Added beta Unix version
+*
+*			Added OS/2 DLL support.
+*
+*			Changed behaviour of overlay(), overwrite() and typeahead()
+*
+*	921120	2.0	Changed #if to #ifdef/#if defined to make it
+*			easier to add new platforms/compilers.
+*
+*			Added System V colour support.
+*
+*			Added OS/2 port.
+*-------
+* Frotz
+*	911221	2.0 pre-beta	Changed back from short to int. (int is the
+*			correct size for the default platform.  Short
+*			might be too short on some platforms.  This
+*			is more portable.  I, also, made this mistake.)
+*
+*			Many functions are now macros.  If you want
+*			the real thing, #undef the macro. (X/Open
+*			requirement.)
+*
+*			Merged many sources into current release.
+*
+*			Added many X/Open routines (not quite all yet).
+*
+*			Added internal documentation to all routines.
+*
+*			Added a HISTORY file to the environment.
+*
+*			Added a CONTRIB file to the environment.
+*-------
+* bl	900114	1.4	Window origin mod in overlay() and overwrite(), on
+*			public (and very reasonable) request. Swapped
+*			#define'd values of OK and ERR; OK now 1, and
+*			ERR is 0/NULL. Conforms better to UNIX
+*			versions.  borderchars[] removed from WINDOW
+*			struct since the border() functions were
+*			redefined. Use of short wherever possible.
+*			Portability improvements, mispelled name of
+*			[w]setscrreg().
+*
+*	881005	1.3	All modules lint-checked with MSC '-W3' and
+*			turbo'C' '-w -w-pro' switches. Support for
+*			border(), wborder() functions.
+*
+*	881002	1.2	Rcsid[] string in all modules, for maintenance.
+*
+*	880306	1.1	'Raw' output routines, revision info in curses.h.
+*
+*	870515	1.0	Initial Release.
+*
+*----------------------------------------------------------------------
+*/
+#if defined(__cplusplus) || defined(__cplusplus__) || defined(__CPLUSPLUS)
+ extern "C" 
+   {
+# define bool _bool
+#endif
+
+#ifndef  __PDCURSES__
+#define	__PDCURSES__ 1
+
+/*man-start*********************************************************************
+
+All defines are "defined" here.  All compiler and environment
+specific definitions are defined into generic class defines.
+These defines are to be given values so that the code can
+rely on #if, rather than a complicated set of #if defined() or
+#ifdefs...
+
+PDCurses definitions list:  (Only define those needed)
+
+	REGISTERWINDOWS True for auto window update registery.
+	FAST_VIDEO      True if display is memory mapped, or
+	                we can utilize the fast video update routines.
+	DOS             True if compiling for DOS.
+	OS2             True if compiling for OS/2.
+	WIN32           True if compiling for Windoze 95 or Windoze NT
+	FLEXOS          True if compiling for Flexos.
+	HC              True if using a Metaware compiler.
+	TC              True if using a Borland compiler.
+	MSC             True if using a Microsoft compiler.
+	HAVE_PROTO      True if the compiler supports ANSI prototypes.
+	CPLUSPLUS       True if the compiler supports C++.
+	PDC_BUILD????   Defines API build version.
+
+PDCurses portable platform definitions list:
+
+	PDCURSES        Enables access to PDCurses-only routines.
+	XOPEN           Always true.
+	SYSVcurses      True if you are compiling for SYSV portability.
+	BSDcurses       True if you are compiling for BSD portability.
+	PDCURSES_WCLR   Makes behaviour of wclrtoeol() and wclrtoeof()
+	                unique to PDCurses. By default Unix behavior is set.
+	                See notes in wclrtoeol() and wclrtoeof().
+**man-end**********************************************************************/
+
+#define PDC_BUILD 2601
+#define	PDCURSES	1	/* PDCurses-only routines	*/
+#define	XOPEN		1	/* X/Open Curses routines	*/
+#define	SYSVcurses	1	/* System V Curses routines	*/
+#define	BSDcurses	1	/* BSD Curses routines		*/
+#define	CHTYPE_LONG	1	/* size of chtype; long		*/
+
+#define	PDC_CDECL		/* default define this as empty */
+
+/*----------------------------------------
+*       BORLAND COMPILERS       Turbo C[++], Borland C[++]
+*
+*       Borland definitions:
+*               TC
+*               DOS
+*               OS2
+*               CPLUSPLUS
+*
+*               __TURBOC__, __MSDOS__, 
+*               __OS2__ and __WIN32__
+*               are predefined by compiler.
+*/
+#ifdef __TURBOC__              /* Borland gives defines this as a value*/
+#  define TC    __TURBOC__     /* Define a value for TC                */
+#  ifndef HAVE_PROTO
+#    define HAVE_PROTO 1       /* Borland supports ANSI C prototypes   */
+#  endif
+#  ifdef __MSDOS__
+#    define DOS 6              /* Major release of DOS supported       */
+#    include <bios.h>
+#    include <dos.h>
+#  endif
+#  ifdef __OS2__
+#    define OS2 3              /* Major release of OS/2 supported      */
+#    define INCL_VIO
+#    define INCL_KBD
+#    include <os2.h>
+#  endif
+#  ifdef __WIN32__
+#    ifdef INCLUDE_WINDOWS_H           /* only include for WIN32 files */
+#      include <windows.h>
+#      ifdef MOUSE_MOVED                 /* get rid of Windows #define */
+#        undef MOUSE_MOVED
+#      endif
+#    endif
+#    ifndef WIN32
+#      define WIN32 1
+#    endif
+#  endif
+#  if __TURBOC__ >= 0x290
+#    ifdef  __BCPLUSPLUS__
+#      define CPLUSPLUS   1    /* Define that we are compiling C++.    */
+#    endif
+#    ifdef  __TCPLUSPLUS__
+#      define CPLUSPLUS   1    /* Define that we are compiling C++.    */
+#    endif
+#    ifdef  __CPLUSPLUS__
+#      define CPLUSPLUS   1    /* Define that we are compiling C++.    */
+#    endif
+#  endif
+#  ifndef HAVE_LIMITS_H
+#    define HAVE_LIMITS_H                           /* have <limits.h> */
+#  endif
+#  ifndef HAVE_MEMORY_H
+#    define HAVE_MEMORY_H                           /* have <memory.h> */
+#  endif
+#  ifndef HAVE_STDARG_H
+#    define HAVE_STDARG_H                           /* have <stdarg.h> */
+#  endif
+#  ifndef HAVE_MEMMOVE
+#    define HAVE_MEMMOVE                             /* have memmove() */
+#  endif
+#  ifndef HAVE_VSSCANF
+#    define HAVE_VSSCANF                             /* have vsscanf() */
+#  endif
+#endif
+
+
+/*----------------------------------------
+*       METAWARE COMPILERS      High C
+*
+*       Metaware definitions:
+*               HC
+*               DOS
+*               FLEXOS
+*/
+#ifdef __HIGHC__
+#  define HC    1
+#  pragma off(prototype_override_warnings)
+#  ifndef HAVE_PROTO
+#    define HAVE_PROTO 1      /* Metaware supports ANSI C prototypes   */
+#  endif
+#  ifdef __MSDOS__
+#    define DOS 6              /* Major release of DOS supported       */
+#    include <bios.h>
+#    include <dos.h>
+#  endif
+#  ifdef __FLEXOS__            /* define this on the command line      */
+#    define FLEXOS 2           /* or latest major release value.       */
+#  endif
+#endif
+
+/*----------------------------------------
+*       MICROSOFT COMPILERS      MSC
+*
+*       Microsoft definitions:
+*               MSC
+*               DOS || OS2
+*/
+#ifdef _MSC_VER                                 /* defined by compiler */
+#  define MSC   1
+#  ifndef HAVE_PROTO
+#    define HAVE_PROTO 1     /* Microsoft supports ANSI C prototypes   */
+#  endif
+#  ifdef __OS2__                /* You will have to define in makefile */
+#    define USE_OS2_H 1             /* Use the os2.h for the compiler  */
+#    define OS2 3                   /* Major release of OS/2 supported */
+#    define INCL_VIO
+#    define INCL_KBD
+#    include <os2.h>
+#    define FARKeyword far
+#    define APIRET USHORT
+#  else                            /* no __OS2__ define, so assume DOS */
+#    ifdef _WIN32	
+#      ifndef WIN32
+#        define WIN32 
+#      endif
+#      ifdef INCLUDE_WINDOWS_H         /* only include for WIN32 files */
+#        include <windows.h>
+#        ifdef MOUSE_MOVED               /* get rid of Windows #define */
+#          undef MOUSE_MOVED
+#        endif
+#      endif
+#      ifndef HAVE_MEMORY_H
+#        define HAVE_MEMORY_H                       /* have <memory.h> */
+#      endif
+#      ifndef HAVE_STDARG_H
+#        define HAVE_STDARG_H                       /* have <stdarg.h> */
+#      endif
+#    else	
+#      define DOS 6                  /* Major release of DOS supported */
+#      include <bios.h>
+#      include <dos.h>
+#      undef  HAVE_VSSCANF        /* vsscanf() function NOT in library */
+#    endif
+#  endif
+#  ifndef HAVE_LIMITS_H
+#    define HAVE_LIMITS_H                           /* have <limits.h> */
+#  endif
+#  ifndef HAVE_MEMMOVE
+#    define HAVE_MEMMOVE                             /* have memmove() */
+#  endif
+#endif
+
+/*----------------------------------------
+*       MICROSOFT QUICK C COMPILERS      QC
+*
+*/
+#ifdef _QC                                      /* defined by compiler */
+#  define MSC   1
+#  ifndef HAVE_PROTO
+#    define HAVE_PROTO 1        /* QuickC supports ANSI C prototypes   */
+#  endif
+#  define DOS 6                      /* Major release of DOS supported */
+#  include <bios.h>
+#  include <dos.h>
+#  undef  HAVE_VSSCANF            /* vsscanf() function NOT in library */
+#  ifndef HAVE_LIMITS_H
+#    define HAVE_LIMITS_H                           /* have <limits.h> */
+#  endif
+#endif
+
+/*----------------------------------------
+*       TOPSPEED compilers     TSC
+*
+*       TOPSPEED definitions:
+*               TSC
+*               DOS || OS2
+*/
+#ifdef __TSC__                   /* You may have to define in makefile */
+#  define TSC   1
+#  ifndef HAVE_PROTO
+#    define HAVE_PROTO 1      /* TopSpeed supports ANSI C prototypes   */
+#  endif
+#  ifdef __OS2__
+#    define OS2 3                   /* Major release of OS/2 supported */
+#    define INCL_VIO
+#    define INCL_KBD
+#    include <os2.h>
+#  endif
+#  ifndef HAVE_LIMITS_H
+#    define HAVE_LIMITS_H                           /* have <limits.h> */
+#  endif
+#endif
+
+/*----------------------------------------
+*       IBM C Set/2 Compiler   CSET2
+*
+*       IBM definitions:
+*               CSET2
+*               OS2
+*/
+#ifdef __IBMC__
+#  define CSET2 1
+#  ifndef HAVE_PROTO
+#    define HAVE_PROTO 1        /* C Set/2 supports ANSI C prototypes  */
+#  endif
+#  ifndef HAVE_STDARG_H
+#    define HAVE_STDARG_H                           /* have <stdarg.h> */
+#  endif
+#  ifndef HAVE_LIMITS_H
+#    define HAVE_LIMITS_H                           /* have <limits.h> */
+#  endif
+#  ifndef HAVE_MEMORY_H
+#    define HAVE_MEMORY_H                           /* have <memory.h> */
+#  endif
+#  ifndef HAVE_MEMMOVE
+#    define HAVE_MEMMOVE                             /* have memmove() */
+#  endif
+#  ifdef __OS2__
+#    define OS2 3                   /* Major release of OS/2 supported */
+#    define INCL_VIO
+#    define INCL_KBD
+#    include <os2.h>
+#  endif
+#endif
+
+/*----------------------------------------
+*       GNU compilers     emx
+*
+*       emx definitions:
+*               EMX
+*               OS2
+*/
+#ifdef __EMX__                   /* You may have to define in makefile */
+#  define EMX   1
+#  ifndef HAVE_PROTO
+#    define HAVE_PROTO 1            /* emx supports ANSI C prototypes  */
+#  endif
+#  define __OS2__                      /* EMX does not define this :-( */
+#  define OS2 3                     /* Major release of OS/2 supported */
+#  define CURSES__32BIT__
+#  ifndef HAVE_STDARG_H
+#    define HAVE_STDARG_H                           /* have <stdarg.h> */
+#  endif
+#  ifndef HAVE_LIMITS_H
+#    define HAVE_LIMITS_H                           /* have <limits.h> */
+#  endif
+#  ifndef HAVE_MEMORY_H
+#    define HAVE_MEMORY_H                           /* have <memory.h> */
+#  endif
+#  ifndef HAVE_UNISTD_H
+#    define HAVE_UNISTD_H                           /* have <unistd.h> */
+#  endif
+#  ifndef HAVE_MEMMOVE
+#    define HAVE_MEMMOVE                             /* have memmove() */
+#  endif
+#  ifndef HAVE_VSSCANF
+#    define HAVE_VSSCANF                             /* have vsscanf() */
+#  endif
+#  if defined(EMXVIDEO)
+#    include <stdlib.h>
+#    include <sys/video.h>
+#  else
+#    define INCL_VIO
+#    define INCL_KBD
+#    include <os2.h>
+#  endif
+#endif
+
+/*----------------------------------------
+*       GNU compilers     djgpp
+*
+*		djgpp definitions:
+*				GO32
+*				DOS
+*/
+#ifdef GO32 				  /* You may have to define in makefile */
+#  ifndef HAVE_PROTO
+#    define HAVE_PROTO 1         /* DJGPP supports ANSI C prototypes   */
+#  endif
+#  define DOS	6
+#  include <dos.h>
+#  ifdef __FLEXOS__ 		   /* define this on the command line	   */
+#    define FLEXOS 2           /* or latest major release value.       */
+#  endif
+#  define CURSES__32BIT__
+#  ifdef _cplusplus
+#    define CPLUSPLUS 1
+#  endif
+#  ifndef HAVE_STDARG_H
+#    define HAVE_STDARG_H                           /* have <stdarg.h> */
+#  endif
+#  ifndef HAVE_LIMITS_H
+#    define HAVE_LIMITS_H                           /* have <limits.h> */
+#  endif
+#  ifndef HAVE_MEMORY_H
+#    define HAVE_MEMORY_H                           /* have <memory.h> */
+#  endif
+#  ifndef HAVE_UNISTD_H
+#    define HAVE_UNISTD_H                           /* have <unistd.h> */
+#  endif
+#  ifndef HAVE_MEMMOVE
+#    define HAVE_MEMMOVE                             /* have memmove() */
+#  endif
+#  ifndef HAVE_USLEEP
+#    define HAVE_USLEEP                               /* have usleep() */
+#  endif
+#endif
+
+
+/*----------------------------------------
+*       GNU compilers     Cygnus Win32
+*
+*		cygnus definitions:
+*				WIN32
+*/
+#ifdef __CYGWIN32__  /* You may have to define in makefile */
+#  ifndef HAVE_PROTO
+#    define HAVE_PROTO 1    /* Cygnuc GCC supports ANSI C prototypes   */
+#  endif
+#  ifdef INCLUDE_WINDOWS_H
+#    include <windows.h>
+#    ifdef MOUSE_MOVED
+#      undef MOUSE_MOVED
+#    endif
+#  endif
+#  ifndef WIN32
+#    define WIN32
+#  endif
+#  ifndef INT_MAX
+#    define INT_MAX 32762
+#  endif
+#  define CURSES__32BIT__
+#  ifndef HAVE_LIMITS_H
+#    define HAVE_LIMITS_H                           /* have <limits.h> */
+#  endif
+#  ifndef HAVE_MEMORY_H
+#    define HAVE_MEMORY_H                           /* have <memory.h> */
+#  endif
+#  ifndef HAVE_STDARG_H
+#    define HAVE_STDARG_H                           /* have <stdarg.h> */
+#  endif
+#  ifndef HAVE_UNISTD_H
+#    define HAVE_UNISTD_H                           /* have <unistd.h> */
+#  endif
+#  ifndef HAVE_MEMMOVE
+#    define HAVE_MEMMOVE                             /* have memmove() */
+#  endif
+#  ifndef HAVE_USLEEP
+#    define HAVE_USLEEP                               /* have usleep() */
+#  endif
+#endif
+
+/*----------------------------------------
+*       GNU compilers     Ming Win32
+*
+*		Ming definitions:
+*				WIN32
+*/
+#ifdef __MINGW32__
+#  ifndef HAVE_PROTO
+#    define HAVE_PROTO 1    /* Ming GCC supports ANSI C prototypes   */
+#  endif
+#  ifdef INCLUDE_WINDOWS_H
+#    include <windows.h>
+#    ifdef MOUSE_MOVED
+#      undef MOUSE_MOVED
+#    endif
+#  endif
+#  ifndef WIN32
+#    define WIN32
+#  endif
+#  define CURSES__32BIT__
+#  ifndef HAVE_LIMITS_H
+#    define HAVE_LIMITS_H                           /* have <limits.h> */
+#  endif
+#  ifndef HAVE_MEMORY_H
+#    define HAVE_MEMORY_H                           /* have <memory.h> */
+#  endif
+#  ifndef HAVE_STDARG_H
+#    define HAVE_STDARG_H                           /* have <stdarg.h> */
+#  endif
+#  ifndef HAVE_UNISTD_H
+#    define HAVE_UNISTD_H                           /* have <unistd.h> */
+#  endif
+#  ifndef HAVE_MEMMOVE
+#    define HAVE_MEMMOVE                             /* have memmove() */
+#  endif
+#endif
+
+/*----------------------------------------
+*       LCC WIN32
+*
+*/
+#ifdef __LCC__  /* should already be defined by the compiler */
+#  ifndef HAVE_PROTO
+#    define HAVE_PROTO 1         /* LCC-Win32 supports ANSI C prototypes   */
+#  endif
+#  ifdef INCLUDE_WINDOWS_H
+#    include <windows.h>
+#    ifdef MOUSE_MOVED
+#      undef MOUSE_MOVED
+#    endif
+#  endif
+#  ifndef WIN32
+#    define WIN32
+#  endif
+#  ifndef INT_MAX
+#    define INT_MAX 32762
+#  endif
+#  ifndef HAVE_LIMITS_H
+#    define HAVE_LIMITS_H                           /* have <limits.h> */
+#  endif
+#  ifndef HAVE_MEMORY_H
+#    define HAVE_MEMORY_H                           /* have <memory.h> */
+#  endif
+#  ifndef HAVE_STDARG_H
+#    define HAVE_STDARG_H                           /* have <stdarg.h> */
+#  endif
+#  ifndef HAVE_MEMMOVE
+#    define HAVE_MEMMOVE                             /* have memmove() */
+#  endif
+#endif
+
+/*----------------------------------------
+*       Watcom C/C++ 10.6 compiler
+*
+*       WATCOM definitions:
+*               WATCOMC
+*               OS2
+*               WIN32
+*/
+#ifdef __WATCOMC__
+#  define WATCOMC  1
+#  ifndef HAVE_PROTO
+#    define HAVE_PROTO 1      /* Watcom C supports ANSI C prototypes   */
+#  endif
+#  define CURSES__32BIT__
+#  if defined( __DOS__ ) || defined( __DOS4G__ )
+#    define DOS 7                    /* Major release of DOS supported */
+#    include <bios.h>
+#    include <dos.h>
+#    include <i86.h>
+#    ifdef __386__
+#      define int86 int386
+#      define int86x int386x
+#    endif
+#  endif
+#  if defined( __OS2__ ) || defined( __OS2V2__ )
+#    define OS2 3                   /* Major release of OS/2 supported */
+#    define CURSES__32BIT__
+#    define INCL_VIO
+#    define INCL_KBD
+#    include <os2.h>
+#  endif
+#  ifdef __NT__                         /* This specifies WIN32 target */
+#    ifdef INCLUDE_WINDOWS_H
+#      include <windows.h>
+#      ifdef MOUSE_MOVED
+#        undef MOUSE_MOVED
+#      endif
+#    endif
+#    ifndef WIN32
+#      define WIN32
+#    endif
+
+/*
+#    ifdef PDC_CDECL
+#      undef PDC_CDECL
+#      define PDC_CDECL cdecl
+#    endif
+*/
+
+#  endif
+#  ifndef HAVE_LIMITS_H
+#    define HAVE_LIMITS_H                           /* have <limits.h> */
+#  endif
+#  ifndef HAVE_MEMORY_H
+#    define HAVE_MEMORY_H                           /* have <memory.h> */
+#  endif
+#  ifndef HAVE_STDARG_H
+#    define HAVE_STDARG_H                           /* have <stdarg.h> */
+#  endif
+#  ifndef HAVE_MEMMOVE
+#    define HAVE_MEMMOVE                             /* have memmove() */
+#  endif
+#  ifndef HAVE_VSSCANF
+#    define HAVE_VSSCANF                             /* have vsscanf() */
+#  endif
+#endif
+
+#if 0
+/*----------------------------------------
+*       gcc under UNIX
+*
+*       GNU definitions:
+*               UNIX
+*/
+#ifdef UNIX
+#  define HAVE_PROTO 1                  /* GNU C supports ANSI C prototypes  */
+#  ifdef SUNOS
+#    define NO_VSSCANF
+#    define NO_MEMMOVE
+#    undef BSD
+#  endif
+#  ifdef linux
+#    undef BSD
+#  endif
+#endif
+#endif
+
+/*----------------------------------------
+*       MicroWay NDP C/C++ 386 4.2.0 compiler
+*/
+#ifdef MX386
+#  define HAVE_PROTO 1
+#  define NDP	1
+#  include 	<bios.h>
+#  ifdef DOS
+#    define MK_FP(seg,ofs)	( (((int) (seg)) << 4) + ((int) (ofs)) )
+#    ifdef __i860
+       typedef void _int;
+#    else
+       typedef int      _int;
+#    endif
+#  endif
+#    undef  NO_VSSCANF            /* vsscanf() function NOT in library */
+#  ifndef HAVE_LIMITS_H
+#    define HAVE_LIMITS_H                           /* have <limits.h> */
+#  endif
+#endif
+
+/*---------------------------------------------------------------------*/
+#include <stdio.h>		/* Required by X/Open usage below	*/
+/*----------------------------------------------------------------------
+ *
+ *	PDCurses Manifest Constants
+ *
+ */
+#ifndef FALSE			/* booleans		 */
+#  define	FALSE	0
+#endif
+#ifndef	TRUE			/* booleans		 */
+#  define	TRUE	!FALSE
+#endif
+#ifndef	NULL
+#  define NULL	0	/* Null pointer		 */
+#endif
+#ifndef	ERR
+#  define	 ERR	0		/* general error flag	 */
+#endif
+#ifndef	OK
+#  define	 OK	1		/* general OK flag	 */
+#endif
+
+
+/*----------------------------------------------------------------------
+ *
+ *	PDCurses Type Declarations
+ *
+ */
+typedef unsigned char bool;	/* PDCurses Boolean type	*/
+
+#ifdef CHTYPE_LONG
+typedef unsigned long chtype;	/* 16-bit attr + 16-bit char	*/
+#else
+typedef unsigned short chtype;	/* 8-bit attr + 8-bit char	*/
+#endif
+
+/*----------------------------------------------------------------------
+ * This defines a new type for attributes.
+ *
+ */
+typedef chtype attr_t;
+
+/*----------------------------------------------------------------------
+ * Define our mouse interface - same as SYSVR4 (with extensions)
+ */
+
+typedef struct
+{
+	int x;           /* absolute column, 0 based, measured in characters */
+	int y;           /* absolute row, 0 based, measured in characters */
+	short button[3]; /* state of each button */
+	int changes;     /* flags indicating what has changed with the mouse */
+} MOUSE_STATUS;
+
+
+#define BUTTON_RELEASED        0000
+#define BUTTON_PRESSED         0001
+#define BUTTON_CLICKED         0002
+#define BUTTON_DOUBLE_CLICKED  0003
+#define BUTTON_TRIPLE_CLICKED  0004
+#define BUTTON_MOVED           0005  /* PDCurses enhancement */
+#define BUTTON_ACTION_MASK     0007  /* PDCurses enhancement */
+#define BUTTON_SHIFT           0010  /* PDCurses enhancement */
+#define BUTTON_CONTROL         0020  /* PDCurses enhancement */
+#define BUTTON_ALT             0040  /* PDCurses enhancement */
+#define BUTTON_MODIFIER_MASK   0070  /* PDCurses enhancement */
+
+#define MOUSE_X_POS            (Mouse_status.x)
+#define MOUSE_Y_POS            (Mouse_status.y)
+#define A_BUTTON_CHANGED       (Mouse_status.changes & 7)
+#define MOUSE_MOVED            (Mouse_status.changes & 8)
+#define MOUSE_POS_REPORT       (Mouse_status.changes & 16)
+#define BUTTON_CHANGED(x)      (Mouse_status.changes & (1 << ((x) - 1)))
+#define BUTTON_STATUS(x)       (Mouse_status.button[(x)-1])
+
+/* mouse bit-masks */
+#define BUTTON1_RELEASED        000000000001L
+#define BUTTON1_PRESSED         000000000002L
+#define BUTTON1_CLICKED         000000000004L
+#define BUTTON1_DOUBLE_CLICKED  000000000010L
+#define BUTTON1_TRIPLE_CLICKED  000000000020L
+#define BUTTON1_MOVED           000000000020L /* PDCurses enhancement */
+#define BUTTON2_RELEASED        000000000040L
+#define BUTTON2_PRESSED         000000000100L
+#define BUTTON2_CLICKED         000000000200L
+#define BUTTON2_DOUBLE_CLICKED  000000000400L
+#define BUTTON2_TRIPLE_CLICKED  000000001000L
+#define BUTTON2_MOVED           000000001000L /* PDCurses enhancement */
+#define BUTTON3_RELEASED        000000002000L
+#define BUTTON3_PRESSED         000000004000L
+#define BUTTON3_CLICKED         000000010000L
+#define BUTTON3_DOUBLE_CLICKED  000000020000L
+#define BUTTON3_TRIPLE_CLICKED  000000040000L
+#define BUTTON3_MOVED           000000040000L /* PDCurses enhancement */
+#define BUTTON_MODIFIER_SHIFT   000000100000L /* PDCurses enhancement */
+#define BUTTON_MODIFIER_CONTROL 000000200000L /* PDCurses enhancement */
+#define BUTTON_MODIFIER_ALT     000000400000L /* PDCurses enhancement */
+#define ALL_MOUSE_EVENTS        000000777777L
+#define REPORT_MOUSE_POSITION   000001000000L
+
+/*----------------------------------------------------------------------
+ *
+ *	PDCurses Structure Definitions:
+ *
+ */
+typedef struct _win		/* definition of a window.	   */
+{
+	int	_cury;		/* current pseudo-cursor	   */
+	int	_curx;
+	int	_maxy;		/* max window coordinates	   */
+	int	_maxx;
+	int	_pmaxy;		/* max physical size		   */
+	int	_pmaxx;
+	int	_begy;		/* origin on screen		   */
+	int	_begx;
+	int	_lastpy;	/* last y coordinate of upper left pad display area */
+	int	_lastpx;	/* last x coordinate of upper left pad display area */
+	int	_lastsy1;	/* last upper y coordinate of screen window for pad */
+	int	_lastsx1;	/* last upper x coordinate of screen window for pad */
+	int	_lastsy2;	/* last lower y coordinate of screen window for pad */
+	int	_lastsx2;	/* last lower x coordinate of screen window for pad */
+	int	_flags;		/* window properties		   */
+	attr_t	_attrs;		/* standard A_STANDOUT attributes and colors  */
+	chtype	_bkgd;		/* wrs(4/6/93) background, normally blank */
+	int	_tabsize;	/* tab character size		   */
+	bool	_clear;		/* causes clear at next refresh	   */
+	bool	_leaveit;		/* leaves cursor where it is	   */
+	bool	_scroll;	/* allows window scrolling	   */
+	bool	_nodelay;	/* input character wait flag	   */
+	bool	_immed;	/* immediate update flag	   */
+	bool	_sync;	/* synchronise window ancestors	   */
+	bool	_use_keypad;	/* flags keypad key mode active	   */
+	bool	_use_idl;	/* True if Ins/Del line can be used*/
+	bool	_use_idc;	/* True if Ins/Del character can be used*/
+	chtype**_y;		/* pointer to line pointer array   */
+	int*	_firstch;	/* first changed character in line */
+	int*	_lastch;	/* last changed character in line  */
+	int	_tmarg;	/* top of scrolling region	   */
+	int	_bmarg;	/* bottom of scrolling region	   */
+	char*	_title;		/* window title			   */
+	char	_title_ofs;	/* window title offset from left   */
+	attr_t	_title_attr;	/* window title attributes	   */
+	chtype	_blank;		/* window's blank character	   */
+	int	_parx, _pary;	/* coords relative to parent (0,0) */
+struct	_win*	_parent;	/* subwin's pointer to parent win  */
+}	WINDOW;
+
+
+
+/*----------------------------------------------------------------------
+*
+*	Private structures that are necessary for correct
+*	macro construction.
+*
+*/
+
+#ifdef	REGISTERWINDOWS
+typedef struct _ref		/* Refresh Window Structure	 */
+{
+	WINDOW*	win;
+struct	_ref*	next;
+struct	_ref*	tail;
+}	ACTIVE;
+
+typedef struct _wins
+{
+	WINDOW*		w;	/* pointer to a visible window	    */
+	struct _wins*	next;	/* Next visible window pointer	    */
+	struct _wins*	prev;	/* Next visible window pointer	    */
+	struct _wins*	tail;	/* Last visible window pointer	    */
+				/* Only head window (stdscr) has    */
+				/* a valid tail pointer.	    */
+}	WINDS;
+#endif
+
+typedef struct		/* structure for ripped off lines */
+{
+	int line;
+	int (*init)();
+} RIPPEDOFFLINE;
+
+
+typedef struct
+{
+	bool	alive;		/* if initscr() called		    */
+	bool	autocr;		/* if lf -> crlf		    */
+	bool	cbreak;		/* if terminal unbuffered	    */
+	bool	echo;		/* if terminal echo		    */
+	bool	raw_inp;	/* raw input mode (v. cooked input) */
+	bool	raw_out;	/* raw output mode (7 v. 8 bits)    */
+	bool	refrbrk;	/* if premature refresh brk allowed */
+	bool	orgcbr;		/* original MSDOS ^-BREAK setting   */
+	bool	visible_cursor; /* TRUE if cursor is visible	    */
+	bool	audible;	/* FALSE if the bell is visual	    */
+	bool	full_redraw;	/* TRUE for bad performance	    */
+	bool	direct_video;	/* Allow Direct Screen Memory writes*/
+	bool	mono;		/* TRUE if current screen is mono.  */
+	bool	sizeable;	/* TRUE if adapter is resizeable.   */
+	bool	resized;	/* TRUE if TERM has been resized */
+	bool	bogus_adapter;	/* TRUE if adapter has insane values*/
+	bool	shell;		/* TRUE if reset_prog_mode() needs  */
+				/*	to be called.		    */
+	chtype	blank;		/* Background character		    */
+	attr_t	orig_attr;	/* Original screen attributes	    */
+	int	cursrow;	/* position of physical cursor	    */
+	int	curscol;	/* position of physical cursor	    */
+	int	cursor;		/* Current Cursor definition	    */
+	int	visibility;		/* Visibility of cursor	*/
+	int	video_page;	/* Current PC video page	    */
+	int	orig_emulation; /* Original cursor emulation value  */
+	int	orig_cursor;	/* Original cursor size		    */
+	int	font;		/* default font size		    */
+	int	orig_font;	/* Original font size		    */
+	int	lines;		/* New value for LINES		    */
+	int	cols;		/* New value for COLS		    */
+	unsigned long _trap_mbe;		/* trap these mouse button events */
+	unsigned long _map_mbe_to_key;	/* map mouse buttons to slk */
+	int	slklines;		/* Lines in use by slk_init() */
+	WINDOW *	slk_winptr;		/* window for slk */
+	int	linesrippedoff;		/* Lines ripped off via ripoffline() */
+	int	linesrippedoffontop;		/* Lines ripped off on top via ripoffline() */
+	int	delaytenths;		/* 1/10ths second to wait block getch() for */
+	bool	_preserve;		/* TRUE if screen background to be preserved */
+	bool	_restore;		/* TRUE if screen background to be restored */
+	bool	save_key_modifiers;		/* TRUE if each key modifiers saved with each key press */
+	bool	return_key_modifiers;		/* TRUE if modifier keys are returned as "real" keys */
+
+#ifdef OS2
+# ifdef EMXVIDEO			/* nop if using EMX builtins */
+	int tahead; 			/* Type-ahead value */
+	int adapter;			/* Screen type	*/
+# else
+	VIOMODEINFO scrnmode;	/* default screen mode			*/
+	VIOCONFIGINFO adapter;	/* Screen type				*/
+	KBDINFO kbdinfo;	/* keyboard info */
+# endif
+#else
+	int adapter;			/* Screen type	*/
+#endif
+
+#if defined(DOS) || defined(WIN32)
+	int	scrnmode;	/* default screen mode		    */
+	unsigned video_seg;	/* video base segment		    */
+	unsigned video_ofs;	/* video base offset		    */
+#endif
+
+#if defined(OS2) || defined(WIN32)
+	int	num_mouse_buttons;	/* number of mouse buttons */
+#endif
+
+#if defined (XCURSES)
+	int	XcurscrSize; /* size of Xcurscr shared memory block */
+	bool	sb_on;
+	int	sb_viewport_y;
+	int	sb_viewport_x;
+	int	sb_total_y;
+	int	sb_total_x;
+	int	sb_cur_y;
+	int	sb_cur_x;
+#endif
+
+#ifdef	REGISTERWINDOWS
+	WINDS*	visible;	/* List of visible windows	    */
+	bool	refreshall;	/* Refresh all registered windows?  */
+#endif
+
+	short	line_color;	/* Color of line attributes - default white */
+
+}	SCREEN;
+
+
+/* external variables */
+#if !defined(PDC_STATIC_BUILD) && defined(_MSC_VER) && defined(WIN32) && !defined(CURSES_LIBRARY)
+__declspec(dllimport)	int	LINES;		/* terminal height		*/
+__declspec(dllimport)	int	COLS;		/* terminal width		*/
+__declspec(dllimport)	WINDOW*	stdscr;		/* the default screen window	*/
+__declspec(dllimport)	WINDOW*	curscr;		/* the current screen image	*/
+__declspec(dllimport)	SCREEN	*SP;	/* curses variables		*/
+__declspec(dllimport)	int	use_emalloc;	/* set to true to use your own malloc,etc */
+__declspec(dllimport)	MOUSE_STATUS Mouse_status;
+__declspec(dllimport)	int COLORS;
+__declspec(dllimport)	int COLOR_PAIRS;
+#else
+# if !defined(PDC_STATIC_BUILD) && defined(_MSC_VER) && defined(WIN32)
+__declspec(dllexport) extern	int	LINES;		/* terminal height		*/
+__declspec(dllexport) extern	int	COLS;		/* terminal width		*/
+__declspec(dllexport) extern	WINDOW*	stdscr;		/* the default screen window	*/
+__declspec(dllexport) extern	WINDOW*	curscr;		/* the current screen image	*/
+__declspec(dllexport) extern	SCREEN	*SP;	/* curses variables		*/
+__declspec(dllexport) extern	int	use_emalloc;	/* set to true to use your own malloc,etc */
+__declspec(dllexport) extern	MOUSE_STATUS Mouse_status;
+__declspec(dllexport) extern	int COLORS;
+__declspec(dllexport) extern	int COLOR_PAIRS;
+# else
+extern	int	LINES;		/* terminal height		*/
+extern	int	COLS;		/* terminal width		*/
+extern	WINDOW*	stdscr;		/* the default screen window	*/
+extern	WINDOW*	curscr;		/* the current screen image	*/
+extern	SCREEN	*SP;	/* curses variables		*/
+extern	int	use_emalloc;	/* set to true to use your own malloc,etc */
+extern	MOUSE_STATUS Mouse_status;
+extern	int COLORS,COLOR_PAIRS;
+# endif
+#endif
+
+#if	defined (CURSES_LIBRARY)
+extern	int	_default_lines;	/* For presetting maximum lines	*/
+#endif
+
+#ifdef	REGISTERWINDOWS
+extern	ACTIVE*	CurWins;	/* Currently Visible Windows	*/
+#endif
+
+
+
+
+/*man-start*********************************************************************
+
+PDCurses Text Attributes:
+
+To include colour in PDCurses, a number of things had to be sacrificed
+from the strict Unix and System V support.
+The main problem is fitting all character attributes and colour into
+an unsigned char (all 8 bits!). On System V, chtype is a long on
+PDCurses it is a short int.
+
+The following is the structure of a win->_attrs chtype:
+
+-------------------------------------------------------------------------------------------------
+|31|30|29|28|27|26|25|24|23|22|21|20|19|18|17|16|15|14|13|12|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0|
+-------------------------------------------------------------------------------------------------
+     colour number      |     modifiers         |      character eg 'a' (potential for DBCS)
+
+The available attribute modifiers are bold, underline, invisible, protect, reverse 
+and blink.
+
+**man-end**********************************************************************/
+
+/* Video attribute definitions. */
+#ifdef CHTYPE_LONG
+# define A_NORMAL        0x00000000L
+# define A_UNDERLINE     0x00100000L
+# define A_REVERSE       0x00200000L
+# define A_BLINK         0x00400000L
+# define A_BOLD          0x00800000L
+# define A_RIGHTLINE     0x00010000L
+# define A_DIM           0x00020000L
+# define A_ALTCHARSET    0x00040000L
+# define A_INVIS         0x00080000L
+# define A_ATTRIBUTES    0xFFFF0000L
+# define A_CHARTEXT      0x0000FFFFL
+# define A_COLOR         0xFF000000L
+
+# define A_LEFTLINE      A_DIM
+# define A_ITALIC        A_INVIS
+# define A_STANDOUT      ( A_BOLD | A_REVERSE )
+# define A_PROTECT       ( A_UNDERLINE | A_LEFTLINE | A_RIGHTLINE )
+
+#else
+
+# define A_NORMAL      (chtype)0x0000                  /* System V */
+# define A_ALTCHARSET  (chtype)0x0000                  /* X/Open   */
+# define A_BLINK       (chtype)0x0400                  /* X/Open   */
+# define A_BLANK       (chtype)0x0000                  /* X/Open   */
+# define A_BOLD        (chtype)0x0100                  /* X/Open   */
+# define A_DIM         (chtype)0x0000                  /* X/Open   */
+# define A_PROTECT     (chtype)0x0000                  /* X/Open   */
+# define A_REVERSE     (chtype)0x0200                  /* X/Open   */
+# define A_STANDOUT    ((chtype)(A_REVERSE | A_BOLD))  /* X/Open   */
+# define A_UNDERLINE   (chtype)0x0000                  /* X/Open   */
+# define A_COLOR       (chtype)0xF800                  /* System V  */
+# define A_CHARTEXT    (chtype)(0xFF)                  /* X/Open   */
+# define A_ATTRIBUTES  (chtype)(~A_CHARTEXT)           /* X/Open   */
+#endif
+
+#define CHR_MSK		A_CHARTEXT		/* Obsolete	*/
+#define ATR_MSK		A_ATTRIBUTES	/* Obsolete	*/
+#define ATR_NRM		A_NORMAL			/* Obsolete	*/
+
+#ifdef XCURSES
+extern chtype *acs_map;
+
+# define ACS_BSSB	(acs_map['l'])
+# define ACS_SSBB	(acs_map['m'])
+# define ACS_BBSS	(acs_map['k'])
+# define ACS_SBBS	(acs_map['j'])
+# define ACS_SBSS	(acs_map['u'])
+# define ACS_SSSB	(acs_map['t'])
+# define ACS_SSBS	(acs_map['v'])
+# define ACS_BSSS	(acs_map['w'])
+# define ACS_BSBS	(acs_map['q'])
+# define ACS_SBSB	(acs_map['x'])
+# define ACS_SSSS	(acs_map['n'])
+
+# define ACS_ULCORNER	ACS_BSSB
+# define ACS_LLCORNER	ACS_SSBB
+# define ACS_URCORNER	ACS_BBSS
+# define ACS_LRCORNER	ACS_SBBS
+# define ACS_RTEE	    ACS_SBSS
+# define ACS_LTEE	    ACS_SSSB
+# define ACS_BTEE	    ACS_SSBS
+# define ACS_TTEE	    ACS_BSSS
+# define ACS_HLINE	   ACS_BSBS
+# define ACS_VLINE	   ACS_SBSB
+# define ACS_PLUS	    ACS_SSSS
+
+# define ACS_S1	(acs_map['o'])
+# define ACS_S9	(acs_map['s'])
+# define ACS_DIAMOND	(acs_map['\''])
+# define ACS_CKBOARD	(acs_map['a'])
+# define ACS_DEGREE	(acs_map['f'])
+# define ACS_PLMINUS	(acs_map['g'])
+# define ACS_BULLET	(acs_map['~'])
+# define ACS_LARROW	(acs_map[','])
+# define ACS_RARROW	(acs_map['+'])
+# define ACS_DARROW	(acs_map['.'])
+# define ACS_UARROW	(acs_map['-'])
+# define ACS_BOARD	(acs_map['h'])
+# define ACS_LANTERN	(acs_map['i'])
+# define ACS_BLOCK	(acs_map['0'])
+
+# define ACS_S3	(acs_map['p'])
+# define ACS_S7	(acs_map['r'])
+# define ACS_LEQUAL	(acs_map['y'])
+# define ACS_GEQUAL	(acs_map['z'])
+# define ACS_PI	(acs_map['{'])
+# define ACS_NEQUAL	(acs_map['|'])
+# define ACS_STERLING	(acs_map['}'])
+#endif
+
+#if defined(DOS) || defined(OS2) || defined(WIN32)
+/* ALTCHARSET definitions from jshumate at wrdis01.robins.af.mil */
+# define ACS_ULCORNER	(chtype)0xda			/* SysV		*/
+# define ACS_LLCORNER	(chtype)0xc0			/* SysV		*/
+# define ACS_URCORNER	(chtype)0xbf			/* SysV		*/
+# define ACS_LRCORNER	(chtype)0xd9			/* SysV		*/
+# define ACS_RTEE	(chtype)0xb4			/* SysV		*/
+# define ACS_LTEE	(chtype)0xc3			/* SysV		*/
+# define ACS_BTEE	(chtype)0xc1			/* SysV		*/
+# define ACS_TTEE	(chtype)0xc2			/* SysV		*/
+# define ACS_HLINE	(chtype)0xc4			/* SysV		*/
+# define ACS_VLINE	(chtype)0xb3			/* SysV		*/
+# define ACS_PLUS	(chtype)0xc5			/* SysV		*/
+# define ACS_S1	(chtype)0x2d			/* SysV		*/
+# define ACS_S9	(chtype)0x5f			/* SysV		*/
+# define ACS_DIAMOND	(chtype)0xc5			/* SysV		*/
+# define ACS_CKBOARD	(chtype)0xb2			/* SysV		*/
+# define ACS_DEGREE	(chtype)0xf8			/* SysV		*/
+# define ACS_PLMINUS	(chtype)0xf1			/* SysV		*/
+# define ACS_BULLET	(chtype)0xf9			/* SysV		*/
+# define ACS_LARROW	(chtype)0x3c			/* SysV		*/
+# define ACS_RARROW	(chtype)0x3e			/* SysV		*/
+# define ACS_DARROW	(chtype)0x76			/* SysV		*/
+# define ACS_UARROW	(chtype)0x5e			/* SysV		*/
+# define ACS_BOARD	(chtype)0x23			/* SysV		*/
+# define ACS_LANTERN	(chtype)0x23			/* SysV		*/
+# define ACS_BLOCK	(chtype)0x23			/* SysV		*/
+
+/* the following definitions can be used if you have set raw_output()
+   or are using the PDCurses *raw*() functions                        */
+# if 0
+#  define ACS_DIAMOND	(chtype)0x04			/* SysV		*/
+#  define ACS_LARROW	(chtype)0x1b			/* SysV		*/
+#  define ACS_RARROW	(chtype)0x1a			/* SysV		*/
+#  define ACS_DARROW	(chtype)0x19			/* SysV		*/
+#  define ACS_UARROW	(chtype)0x18			/* SysV		*/
+#  define ACS_BOARD	(chtype)0xb0			/* SysV		*/
+#  define ACS_LANTERN	(chtype)0x0f			/* SysV		*/
+#  define ACS_BLOCK	(chtype)0xdb			/* SysV		*/
+# endif
+#endif
+
+/* colour attributes */
+#if defined (XCURSES)
+# define COLOR_BLACK		0
+# define COLOR_RED		1
+# define COLOR_GREEN		2
+# define COLOR_YELLOW		3
+# define COLOR_BLUE		4
+# define COLOR_MAGENTA		5
+# define COLOR_CYAN		6
+# define COLOR_WHITE		7
+#endif
+
+#if defined(DOS) || defined(OS2)
+# define COLOR_BLACK		0
+# define COLOR_BLUE		1
+# define COLOR_GREEN		2
+# define COLOR_CYAN		3
+# define COLOR_RED		4
+# define COLOR_MAGENTA		5
+# define COLOR_YELLOW		6
+# define COLOR_WHITE		7
+#endif
+
+#if defined(WIN32)
+# define MS_MOUSE_MOVED	0x0001
+/*
+ * These defines taken directly from windows.h to reduce
+ * compilation time by only #include'ing <windows.h>
+ * when absolutely necesssary. Cygnus-W32 #defines all of these
+ * so we need to check for that.
+ */
+# ifndef FOREGROUND_BLUE
+#  define FOREGROUND_BLUE	0x0001
+# endif
+# ifndef FOREGROUND_GREEN
+#  define FOREGROUND_GREEN	0x0002
+# endif
+# ifndef FOREGROUND_RED
+#  define FOREGROUND_RED	0x0004
+# endif
+# ifndef FOREGROUND_INTENSITY
+#  define FOREGROUND_INTENSITY	0x0008		/* BOLD */
+# endif
+# ifndef BACKGROUND_BLUE
+#  define BACKGROUND_BLUE	0x0010
+# endif
+# ifndef BACKGROUND_GREEN
+#  define BACKGROUND_GREEN	0x0020
+# endif
+# ifndef BACKGROUND_RED
+#  define BACKGROUND_RED	0x0040
+# endif
+# ifndef BACKGROUND_INTENSITY
+#  define BACKGROUND_INTENSITY	0x0080		/* BLINK */
+# endif
+
+# define COLOR_BLACK		0
+# define COLOR_BLUE		FOREGROUND_BLUE
+# define COLOR_RED		FOREGROUND_RED
+# define COLOR_GREEN		FOREGROUND_GREEN
+# define COLOR_CYAN		FOREGROUND_BLUE | FOREGROUND_GREEN
+# define COLOR_MAGENTA		FOREGROUND_RED | FOREGROUND_BLUE
+# define COLOR_YELLOW		FOREGROUND_RED | FOREGROUND_GREEN
+# define COLOR_WHITE		FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE
+#endif
+
+#ifdef CHTYPE_LONG
+#define COLOR_PAIR(n)  ((chtype)(n) << 24)
+#define PAIR_NUMBER(n) (((n) & A_COLOR) >> 24)
+#else
+#define COLOR_PAIR(n)  (((n) << 11) & A_ATTRIBUTES)
+#define PAIR_NUMBER(n) (((n) & A_COLOR) >> 11)
+#endif
+
+/*----------------------------------------------------------------------
+ *
+ *	Function and Keypad Key Definitions.
+ *	Many are just for compatibility.
+ *
+ */
+#define KEY_MIN         0x101   /* Minimum curses key value      */
+#define KEY_BREAK       0x101   /* Not on PC KBD                 */
+#define KEY_DOWN        0x102   /* Down arrow key                */
+#define KEY_UP          0x103   /* Up arrow key                  */
+#define KEY_LEFT        0x104   /* Left arrow key                */
+#define KEY_RIGHT       0x105   /* Right arrow key               */
+#define KEY_HOME        0x106   /* home key                      */
+#define KEY_BACKSPACE   0x107   /* not on pc                     */
+#define KEY_F0          0x108   /* function keys. space for      */
+#define KEY_F(n)    (KEY_F0+(n))/* 64 keys are reserved.         */
+#define KEY_DL         0x148   /* delete line                   */
+#define KEY_IL         0x149   /* insert line                   */
+#define KEY_DC         0x14a   /* delete character              */
+#define KEY_IC         0x14b   /* insert char or enter ins mode */
+#define KEY_EIC        0x14c   /* exit insert char mode         */
+#define KEY_CLEAR      0x14d   /* clear screen                  */
+#define KEY_EOS        0x14e   /* clear to end of screen        */
+#define KEY_EOL        0x14f   /* clear to end of line          */
+#define KEY_SF         0x150   /* scroll 1 line forward         */
+#define KEY_SR         0x151   /* scroll 1 line back (reverse)  */
+#define KEY_NPAGE      0x152   /* next page                     */
+#define KEY_PPAGE      0x153   /* previous page                 */
+#define KEY_STAB       0x154   /* set tab                       */
+#define KEY_CTAB       0x155   /* clear tab                     */
+#define KEY_CATAB      0x156   /* clear all tabs                */
+#define KEY_ENTER      0x157   /* enter or send (unreliable)    */
+#define KEY_SRESET     0x158   /* soft/reset (partial/unreliable)*/
+#define KEY_RESET      0x159   /* reset/hard reset (unreliable) */
+#define KEY_PRINT      0x15a   /* print/copy                    */
+#define KEY_LL         0x15b   /* home down/bottom (lower left) */
+#define KEY_ABORT      0x15c   /* abort/terminate key (any)     */
+#define KEY_SHELP      0x15d   /* short help                    */
+#define KEY_LHELP      0x15e   /* long help                     */
+#define KEY_BTAB       0x15f   /* Back tab key                  */
+#define KEY_BEG        0x160   /* beg(inning) key               */
+#define KEY_CANCEL     0x161   /* cancel key                    */
+#define KEY_CLOSE      0x162   /* close key                     */
+#define KEY_COMMAND    0x163   /* cmd (command) key             */
+#define KEY_COPY       0x164   /* copy key                      */
+#define KEY_CREATE     0x165   /* create key                    */
+#define KEY_END        0x166   /* end key                       */
+#define KEY_EXIT       0x167   /* exit key                      */
+#define KEY_FIND       0x168   /* find key                      */
+#define KEY_HELP       0x169   /* help key                      */
+#define KEY_MARK       0x16a   /* mark key                      */
+#define KEY_MESSAGE    0x16b   /* message key                   */
+#define KEY_MOVE       0x16c   /* move key                      */
+#define KEY_NEXT       0x16d   /* next object key               */
+#define KEY_OPEN       0x16e   /* open key                      */
+#define KEY_OPTIONS    0x16f   /* options key                   */
+#define KEY_PREVIOUS   0x170   /* previous object key           */
+#define KEY_REDO       0x171   /* redo key                      */
+#define KEY_REFERENCE  0x172   /* ref(erence) key               */
+#define KEY_REFRESH    0x173   /* refresh key                   */
+#define KEY_REPLACE    0x174   /* replace key                   */
+#define KEY_RESTART    0x175   /* restart key                   */
+#define KEY_RESUME     0x176   /* resume key                    */
+#define KEY_SAVE       0x177   /* save key                      */
+#define KEY_SBEG       0x178   /* shifted beginning key         */
+#define KEY_SCANCEL    0x179   /* shifted cancel key            */
+#define KEY_SCOMMAND   0x17a   /* shifted command key           */
+#define KEY_SCOPY      0x17b   /* shifted copy key              */
+#define KEY_SCREATE    0x17c   /* shifted create key            */
+#define KEY_SDC        0x17d   /* shifted delete char key       */
+#define KEY_SDL        0x17e   /* shifted delete line key       */
+#define KEY_SELECT     0x17f   /* select key                    */
+#define KEY_SEND       0x180   /* shifted end key               */
+#define KEY_SEOL       0x181   /* shifted clear line key        */
+#define KEY_SEXIT      0x182   /* shifted exit key              */
+#define KEY_SFIND      0x183   /* shifted find key              */
+#define KEY_SHOME      0x184   /* shifted home key              */
+#define KEY_SIC        0x185   /* shifted input key             */
+#define KEY_SLEFT      0x187   /* shifted left arrow key        */
+#define KEY_SMESSAGE   0x188   /* shifted message key           */
+#define KEY_SMOVE      0x189   /* shifted move key              */
+#define KEY_SNEXT      0x18a   /* shifted next key              */
+#define KEY_SOPTIONS   0x18b   /* shifted options key           */
+#define KEY_SPREVIOUS  0x18c   /* shifted prev key              */
+#define KEY_SPRINT     0x18d   /* shifted print key             */
+#define KEY_SREDO      0x18e   /* shifted redo key              */
+#define KEY_SREPLACE   0x18f   /* shifted replace key           */
+#define KEY_SRIGHT     0x190   /* shifted right arrow           */
+#define KEY_SRSUME     0x191   /* shifted resume key            */
+#define KEY_SSAVE      0x192   /* shifted save key              */
+#define KEY_SSUSPEND   0x193   /* shifted suspend key           */
+#define KEY_SUNDO      0x194   /* shifted undo key              */
+#define KEY_SUSPEND    0x195   /* suspend key                   */
+#define KEY_UNDO       0x196   /* undo key                      */
+
+/* PDCurses specific key definitions */
+
+#define ALT_0           0x197   /* Alt-0                PC only  */
+#define ALT_1           0x198   /* Alt-1                PC only  */
+#define ALT_2           0x199   /* Alt-2                PC only  */
+#define ALT_3           0x19a   /* Alt-3                PC only  */
+#define ALT_4           0x19b   /* Alt-4                PC only  */
+#define ALT_5           0x19c   /* Alt-5                PC only  */
+#define ALT_6           0x19d   /* Alt-6                PC only  */
+#define ALT_7           0x19e   /* Alt-7                PC only  */
+#define ALT_8           0x19f   /* Alt-8                PC only  */
+#define ALT_9           0x1a0   /* Alt-9                PC only  */
+#define ALT_A           0x1a1   /* Alt-A                PC only  */
+#define ALT_B           0x1a2   /* Alt-B                PC only  */
+#define ALT_C           0x1a3   /* Alt-C                PC only  */
+#define ALT_D           0x1a4   /* Alt-D                PC only  */
+#define ALT_E           0x1a5   /* Alt-E                PC only  */
+#define ALT_F           0x1a6   /* Alt-F                PC only  */
+#define ALT_G           0x1a7   /* Alt-G                PC only  */
+#define ALT_H           0x1a8   /* Alt-H                PC only  */
+#define ALT_I           0x1a9   /* Alt-I                PC only  */
+#define ALT_J           0x1aa   /* Alt-J                PC only  */
+#define ALT_K           0x1ab   /* Alt-K                PC only  */
+#define ALT_L           0x1ac   /* Alt-L                PC only  */
+#define ALT_M           0x1ad   /* Alt-M                PC only  */
+#define ALT_N           0x1ae   /* Alt-N                PC only  */
+#define ALT_O           0x1af   /* Alt-O                PC only  */
+#define ALT_P           0x1b0   /* Alt-P                PC only  */
+#define ALT_Q           0x1b1   /* Alt-Q                PC only  */
+#define ALT_R           0x1b2   /* Alt-R                PC only  */
+#define ALT_S           0x1b3   /* Alt-S                PC only  */
+#define ALT_T           0x1b4   /* Alt-T                PC only  */
+#define ALT_U           0x1b5   /* Alt-U                PC only  */
+#define ALT_V           0x1b6   /* Alt-V                PC only  */
+#define ALT_W           0x1b7   /* Alt-W                PC only  */
+#define ALT_X           0x1b8   /* Alt-X                PC only  */
+#define ALT_Y           0x1b9   /* Alt-Y                PC only  */
+#define ALT_Z           0x1ba   /* Alt-Z                PC only  */
+#define CTL_LEFT        0x1bb   /* Control-Left-Arrow   PC only  */
+#define CTL_RIGHT       0x1bc   /* Control-Right-Arrow  PC only  */
+#define CTL_PGUP        0x1bd   /* Control-PgUp         PC only  */
+#define CTL_PGDN        0x1be   /* Control-PgDn         PC only  */
+#define CTL_HOME        0x1bf   /* Control-Home         PC only  */
+#define CTL_END         0x1c0   /* Control-End          PC only  */
+
+#if defined(FLEXOS)
+# define KEY_MOUSE       0x1c1 /* "mouse" key  */
+# define KEY_A1          KEY_HOME/* upper left on Virtual keypad  */
+# define KEY_A2          KEY_UP  /* upper middle on Virt. keypad  */
+# define KEY_A3          KEY_PPAGE/* upper right on Vir. keypad   */
+# define KEY_B1          KEY_LEFT/* middle left on Virt. keypad   */
+# define KEY_B2          0x00    /* center on Virt. keypad        */
+# define KEY_B3          KEY_RIGHT/* middle right on Vir. keypad  */
+# define KEY_C1          KEY_LL  /* lower left on Virt. keypad    */
+# define KEY_C2          KEY_DOWN /* lower middle on Virt. keypad */
+# define KEY_C3          KEY_NPAGE /* lower right on Vir. keypad  */
+# define KEY_MAX         KEY_MOUSE /* Maximum curses key        */
+#endif
+
+
+#if defined(DOS)  || defined (OS2) || defined(XCURSES) || defined(WIN32)
+# define KEY_A1          0x1c1   /* upper left on Virtual keypad  */
+# define KEY_A2          0x1c2   /* upper middle on Virt. keypad  */
+# define KEY_A3          0x1c3   /* upper right on Vir. keypad    */
+# define KEY_B1          0x1c4   /* middle left on Virt. keypad   */
+# define KEY_B2          0x1c5   /* center on Virt. keypad        */
+# define KEY_B3          0x1c6   /* middle right on Vir. keypad   */
+# define KEY_C1          0x1c7   /* lower left on Virt. keypad    */
+# define KEY_C2          0x1c8   /* lower middle on Virt. keypad  */
+# define KEY_C3          0x1c9   /* lower right on Vir. keypad    */
+# define PADSLASH        0x1ca   /* slash on keypad               */
+# define PADENTER        0x1cb   /* enter on keypad               */
+# define CTL_PADENTER    0x1cc   /* ctl-enter on keypad           */
+# define ALT_PADENTER    0x1cd   /* alt-enter on keypad           */
+# define PADSTOP         0x1ce   /* stop on keypad                */
+# define PADSTAR         0x1cf   /* star on keypad                */
+# define PADMINUS        0x1d0   /* minus on keypad               */
+# define PADPLUS         0x1d1   /* plus on keypad                */
+# define CTL_PADSTOP     0x1d2   /* ctl-stop on keypad            */
+# define CTL_PADCENTER   0x1d3   /* ctl-enter on keypad           */
+# define CTL_PADPLUS     0x1d4   /* ctl-plus on keypad            */
+# define CTL_PADMINUS    0x1d5   /* ctl-minus on keypad           */
+# define CTL_PADSLASH    0x1d6   /* ctl-slash on keypad           */
+# define CTL_PADSTAR     0x1d7   /* ctl-star on keypad            */
+# define ALT_PADPLUS     0x1d8   /* alt-plus on keypad            */
+# define ALT_PADMINUS    0x1d9   /* alt-minus on keypad           */
+# define ALT_PADSLASH    0x1da   /* alt-slash on keypad           */
+# define ALT_PADSTAR     0x1db   /* alt-star on keypad            */
+# define ALT_PADSTOP     0x1dc   /* alt-stop on keypad            */
+# define CTL_INS         0x1dd   /* ctl-insert                    */
+# define ALT_DEL         0x1de   /* alt-delete                    */
+# define ALT_INS         0x1df   /* alt-insert                    */
+# define CTL_UP          0x1e0   /* ctl-up arrow                  */
+# define CTL_DOWN        0x1e1   /* ctl-down arrow                */
+# define CTL_TAB         0x1e2   /* ctl-tab                       */
+# define ALT_TAB         0x1e3   /* alt-tab                       */
+# define ALT_MINUS       0x1e4   /* alt-minus                     */
+# define ALT_EQUAL       0x1e5   /* alt-equal                     */
+# define ALT_HOME        0x1e6   /* alt-home                      */
+# define ALT_PGUP        0x1e7   /* alt-pgup                      */
+# define ALT_PGDN        0x1e8   /* alt-pgdn                      */
+# define ALT_END         0x1e9   /* alt-end                       */
+# define ALT_UP          0x1ea   /* alt-up arrow                  */
+# define ALT_DOWN        0x1eb   /* alt-down arrow                */
+# define ALT_RIGHT       0x1ec   /* alt-right arrow               */
+# define ALT_LEFT        0x1ed   /* alt-left arrow                */
+# define ALT_ENTER       0x1ee   /* alt-enter                     */
+# define ALT_ESC         0x1ef   /* alt-escape                    */
+# define ALT_BQUOTE      0x1f0   /* alt-back quote                */
+# define ALT_LBRACKET    0x1f1   /* alt-left bracket              */
+# define ALT_RBRACKET    0x1f2   /* alt-right bracket             */
+# define ALT_SEMICOLON   0x1f3   /* alt-semi-colon                */
+# define ALT_FQUOTE      0x1f4   /* alt-forward quote             */
+# define ALT_COMMA       0x1f5   /* alt-comma                     */
+# define ALT_STOP        0x1f6   /* alt-stop                      */
+# define ALT_FSLASH      0x1f7   /* alt-forward slash             */
+# define ALT_BKSP        0x1f8   /* alt-backspace                 */
+# define CTL_BKSP        0x1f9   /* ctl-backspace                 */
+# define PAD0            0x1fa   /* ctl-keypad 0                  */
+# define CTL_PAD0        0x1fb   /* ctl-keypad 0                  */
+# define CTL_PAD1        0x1fc   /* ctl-keypad 1                  */
+# define CTL_PAD2        0x1fd   /* ctl-keypad 2                  */
+# define CTL_PAD3        0x1fe   /* ctl-keypad 3                  */
+# define CTL_PAD4        0x1ff   /* ctl-keypad 4                  */
+# define CTL_PAD5        0x200   /* ctl-keypad 5                  */
+# define CTL_PAD6        0x201   /* ctl-keypad 6                  */
+# define CTL_PAD7        0x202   /* ctl-keypad 7                  */
+# define CTL_PAD8        0x203   /* ctl-keypad 8                  */
+# define CTL_PAD9        0x204   /* ctl-keypad 9                  */
+# define ALT_PAD0        0x205   /* ctl-keypad 0                  */
+# define ALT_PAD1        0x206   /* ctl-keypad 1                  */
+# define ALT_PAD2        0x207   /* ctl-keypad 2                  */
+# define ALT_PAD3        0x208   /* ctl-keypad 3                  */
+# define ALT_PAD4        0x209   /* ctl-keypad 4                  */
+# define ALT_PAD5        0x20a   /* ctl-keypad 5                  */
+# define ALT_PAD6        0x20b   /* ctl-keypad 6                  */
+# define ALT_PAD7        0x20c   /* ctl-keypad 7                  */
+# define ALT_PAD8        0x20d   /* ctl-keypad 8                  */
+# define ALT_PAD9        0x20e   /* ctl-keypad 9                  */
+# define CTL_DEL         0x20f   /* clt-delete                    */
+# define ALT_BSLASH      0x210   /* alt-back slash                */
+# define CTL_ENTER       0x211   /* ctl-enter                     */
+# define SHF_PADENTER    0x212   /* shift-enter on keypad         */
+# define SHF_PADSLASH    0x213   /* shift-slash on keypad         */
+# define SHF_PADSTAR     0x214   /* shift-star  on keypad         */
+# define SHF_PADPLUS     0x215   /* shift-plus  on keypad         */
+# define SHF_PADMINUS    0x216   /* shift-minus on keypad         */
+# define SHF_UP          0x217   /* shift-up on keypad            */
+# define SHF_DOWN        0x218   /* shift-down on keypad          */
+# define SHF_IC          0x219   /* shift-insert on keypad        */
+# define SHF_DC          0x21a   /* shift-delete on keypad        */
+# define KEY_MOUSE       0x21b   /* "mouse" key                   */
+# define KEY_SHIFT_L     0x21c   /* Left-shift                    */
+# define KEY_SHIFT_R     0x21d   /* Right-shift                   */
+# define KEY_CONTROL_L   0x21e   /* Left-control                  */
+# define KEY_CONTROL_R   0x21f   /* Right-control                 */
+# define KEY_ALT_L       0x220   /* Left-alt                      */
+# define KEY_ALT_R       0x221   /* Right-alt                     */
+# define KEY_RESIZE      0x222   /* Window resize                 */
+# define KEY_SUP         0x223   /* Shifted up arrow              */
+# define KEY_SDOWN       0x224   /* Shifted down arrow            */
+# define KEY_MAX         0x224   /* Maximum curses key            */
+#endif
+
+/*----------------------------------------------------------------------
+*       PDCurses function declarations
+*/
+#ifdef HAVE_PROTO
+int     PDC_CDECL	addchnstr( chtype *, int );
+int     PDC_CDECL	baudrate( void );
+int     PDC_CDECL	beep( void );
+int     PDC_CDECL	border( chtype, chtype, chtype, chtype, chtype, chtype, chtype, chtype );
+int     PDC_CDECL	can_change_color ( void );
+int     PDC_CDECL	clearok( WINDOW*, bool );
+int     PDC_CDECL	color_content( short, short*, short*, short* );
+int     PDC_CDECL	copywin( WINDOW*, WINDOW*, int, int, int, int, int, int, int );
+int     PDC_CDECL	curs_set( int );
+int     PDC_CDECL	def_prog_mode( void );
+int     PDC_CDECL	def_shell_mode( void );
+int     PDC_CDECL	delay_output(  int  );
+int     PDC_CDECL	delwin( WINDOW* );
+WINDOW* PDC_CDECL	derwin( WINDOW*, int, int, int, int );
+int     PDC_CDECL	doupdate( void );
+WINDOW* PDC_CDECL	dupwin( WINDOW* );
+int     PDC_CDECL	endwin( void );
+int     PDC_CDECL	erase( void );
+char    PDC_CDECL	erasechar( void );
+int     PDC_CDECL	flash( void );
+int     PDC_CDECL	flushinp( void );
+int     PDC_CDECL	getsyx( int*, int* );
+int     PDC_CDECL	halfdelay( int );
+bool    PDC_CDECL	has_colors( void );
+int     PDC_CDECL	hline( chtype, int );
+int     PDC_CDECL	immedok( WINDOW*, bool );
+int     PDC_CDECL	inchnstr( chtype *, int );
+int     PDC_CDECL	init_color( short, short, short, short );
+int     PDC_CDECL	init_pair( short, short, short );
+WINDOW* PDC_CDECL	initscr( void );
+#ifdef XCURSES
+WINDOW* PDC_CDECL	Xinitscr( int, char ** );
+#endif
+int     PDC_CDECL	intrflush(  WINDOW*, bool  );
+int     PDC_CDECL	is_linetouched(WINDOW *,int);
+int     PDC_CDECL	is_wintouched(WINDOW *);
+char*   PDC_CDECL	keyname(  int  );
+char    PDC_CDECL	killchar( void );
+char*   PDC_CDECL	longname( void );
+int     PDC_CDECL	meta( WINDOW*, bool );
+int     PDC_CDECL	mvcur( int, int, int, int );
+int     PDC_CDECL	mvderwin( WINDOW*, int, int );
+#ifdef HAVE_STDARG_H
+int     PDC_CDECL	mvprintw( int, int, char*,... );
+int     PDC_CDECL	mvscanw( int, int, char*,... );
+#endif
+int     PDC_CDECL	mvwaddnstr( WINDOW*,int,int,char*,int );
+int     PDC_CDECL	mvwin( WINDOW*, int, int );
+int     PDC_CDECL	mvwinsertln( WINDOW*, int, int );
+#ifdef HAVE_STDARG_H
+int     PDC_CDECL	mvwprintw( WINDOW*, int, int, char*,... );
+int     PDC_CDECL	mvwscanw( WINDOW*, int, int, char*,... );
+#endif
+WINDOW* PDC_CDECL	newpad( int, int );
+SCREEN* PDC_CDECL	newterm( char*, FILE*, FILE* );
+WINDOW* PDC_CDECL	newwin( int, int, int, int );
+int     PDC_CDECL	noraw( void );
+int     PDC_CDECL	notimeout( WINDOW *, bool );
+int     PDC_CDECL	overlay( WINDOW*, WINDOW* );
+int     PDC_CDECL	overwrite( WINDOW*, WINDOW* );
+int     PDC_CDECL	pair_content( int, short*, short* );
+int     PDC_CDECL	pechochar( WINDOW *, chtype );
+int     PDC_CDECL	pnoutrefresh( WINDOW*, int, int, int, int, int, int );
+int     PDC_CDECL	prefresh( WINDOW*, int, int, int, int, int, int );
+#ifdef HAVE_STDARG_H
+int     PDC_CDECL	printw( char*,... );
+int     PDC_CDECL	scanw( char*,... );
+#endif
+int     PDC_CDECL	raw( void );
+int     PDC_CDECL	refresh( void );
+int     PDC_CDECL	reset_prog_mode( void );
+int     PDC_CDECL	reset_shell_mode( void );
+int     PDC_CDECL	resetty( void );
+int     PDC_CDECL	ripoffline(int, int (*)(WINDOW *, int));
+int     PDC_CDECL	savetty( void );
+int     PDC_CDECL	sb_init(void);
+int     PDC_CDECL	sb_set_horz(int, int, int);
+int     PDC_CDECL	sb_set_vert(int, int, int);
+int     PDC_CDECL	sb_get_horz(int *, int *, int *);
+int     PDC_CDECL	sb_get_vert(int *, int *, int *);
+int     PDC_CDECL	sb_refresh(void);
+int     PDC_CDECL	scroll( WINDOW* );
+SCREEN* PDC_CDECL	set_term( SCREEN* );
+int     PDC_CDECL	setsyx( int, int );
+int     PDC_CDECL	start_color( void );
+int     PDC_CDECL	slk_init(int);
+int     PDC_CDECL	slk_set(int, char *, int);
+int     PDC_CDECL	slk_refresh(void);
+int     PDC_CDECL	slk_noutrefresh(void);
+char*   PDC_CDECL	slk_label(int);
+int     PDC_CDECL	slk_clear(void);
+int     PDC_CDECL	slk_restore(void);
+int     PDC_CDECL	slk_touch(void);
+int     PDC_CDECL	slk_attron(attr_t);
+int     PDC_CDECL	slk_attrset(attr_t);
+int     PDC_CDECL	slk_attroff(attr_t);
+WINDOW* PDC_CDECL	subpad( WINDOW*, int, int, int, int );
+WINDOW* PDC_CDECL	subwin( WINDOW*, int, int, int, int );
+int     PDC_CDECL	syncok(WINDOW*, bool);
+attr_t  PDC_CDECL	termattrs( void );
+char*   PDC_CDECL	termname( void );
+int     PDC_CDECL	touchline( WINDOW*, int ,int );
+int     PDC_CDECL	touchwin( WINDOW* );
+#if !defined (CURSES_LIBRARY)
+void    PDC_CDECL	traceoff( void );
+void    PDC_CDECL	traceon( void );
+#endif
+int     PDC_CDECL	typeahead( int );
+char*   PDC_CDECL	unctrl( chtype );
+int     PDC_CDECL	vline( chtype, int );
+int     PDC_CDECL	waddchnstr( WINDOW*, chtype*, int );
+int     PDC_CDECL	waddnstr( WINDOW*, char*, int );
+int     PDC_CDECL	waddstr( WINDOW*, char* );
+int     PDC_CDECL	wattroff( WINDOW*, attr_t );
+int     PDC_CDECL	wattron( WINDOW*, attr_t );
+int     PDC_CDECL	wattrset( WINDOW*, attr_t );
+int     PDC_CDECL	wbkgd(WINDOW*, chtype);
+void    PDC_CDECL	wbkgdset(WINDOW*, chtype);
+int     PDC_CDECL	wborder( WINDOW*, chtype, chtype, chtype, chtype, chtype, chtype, chtype, chtype );
+int     PDC_CDECL	wclear( WINDOW* );
+int     PDC_CDECL	wclrtobot( WINDOW* );
+int     PDC_CDECL	wclrtoeol( WINDOW* );
+void    PDC_CDECL	wcursyncup(WINDOW*);
+int     PDC_CDECL	wdelch( WINDOW* );
+int     PDC_CDECL	wdeleteln( WINDOW* );
+int     PDC_CDECL	werase( WINDOW* );
+int     PDC_CDECL	wgetch( WINDOW* );
+int     PDC_CDECL	wgetnstr( WINDOW*, char*, int );
+int     PDC_CDECL	wgetstr( WINDOW*, char* );
+int     PDC_CDECL	whline( WINDOW*, chtype, int );
+int     PDC_CDECL	winchnstr( WINDOW*, chtype*, int );
+int     PDC_CDECL	winnstr( WINDOW*, char*, int );
+int     PDC_CDECL	winsch( WINDOW*, chtype );
+int     PDC_CDECL	winsdelln( WINDOW*, int );
+int     PDC_CDECL	winsertln( WINDOW* );
+int     PDC_CDECL	winsnstr( WINDOW*, char*, int );
+int     PDC_CDECL	wmove( WINDOW*, int, int );
+int     PDC_CDECL	wnoutrefresh( WINDOW* );
+char    PDC_CDECL	wordchar( void );
+#ifdef HAVE_STDARG_H
+int     PDC_CDECL	wprintw( WINDOW*, char*,... );
+int     PDC_CDECL	wscanw( WINDOW*, char*,... );
+#endif
+int     PDC_CDECL	wredrawln( WINDOW*, int ,int );
+int     PDC_CDECL	wrefresh( WINDOW* );
+int     PDC_CDECL	wscrl( WINDOW*, int );
+int     PDC_CDECL	wsetscrreg( WINDOW*, int, int );
+int     PDC_CDECL	wtimeout( WINDOW *, int );
+int     PDC_CDECL	wtouchln(WINDOW *, int, int, int);
+void    PDC_CDECL	wsyncdown(WINDOW*);
+void    PDC_CDECL	wsyncup(WINDOW*);
+int     PDC_CDECL	wvline( WINDOW*, chtype, int );
+
+#ifdef  PDCURSES
+int     PDC_CDECL	raw_output( bool );
+int     PDC_CDECL	resize_term( int, int );
+WINDOW* PDC_CDECL	resize_window( WINDOW*, int, int );
+#endif
+
+#ifdef OBSOLETE_OR_TBD
+char    PDC_CDECL	breakchar( /* void */ );
+int     PDC_CDECL	cursoff( /* void */ );
+int     PDC_CDECL	curson( /* void */ );
+int     PDC_CDECL	gettmode( /* void */ );
+int     PDC_CDECL	mvaddrawch( /* int, int, chtype */ );
+int     PDC_CDECL	mvaddrawstr( /* int, int, char* */ );
+int     PDC_CDECL	mvwinsrawch( /* WINDOW*, int, int, chtype */ );
+int     PDC_CDECL	mvinsrawch( /* int, int, chtype */ );
+int     PDC_CDECL	saveoldterm( /* void */ );
+int     PDC_CDECL	tabsize( /* int */ );
+int     PDC_CDECL	waddrawstr( /* WINDOW*, char* */ );
+int     PDC_CDECL	wtabsize( /* WINDOW*, int */ );
+int     PDC_CDECL	win_print( /* WINDOW*, int */ );
+#endif
+
+#ifdef  XCURSES
+void    XCursesExit( void );
+int     nocbreak( void );
+int     cbreak( void );
+int     nocrmode( void );
+int     crmode( void );
+int     noecho( void );
+int     echo( void );
+int     nodelay( WINDOW *,bool );
+#endif
+
+int     PDC_CDECL	mouse_set( unsigned long );
+int     PDC_CDECL	mouse_on( unsigned long );
+int     PDC_CDECL	mouse_off( unsigned long );
+int     PDC_CDECL	request_mouse_pos( void );
+int     PDC_CDECL	map_button( unsigned long );
+void    PDC_CDECL	wmouse_position( WINDOW *, int *, int * );
+unsigned long PDC_CDECL	getmouse( void );
+unsigned long PDC_CDECL	getbmap( void );
+
+/*
+*       Keep the compiler happy with our macros below...
+*/
+int     PDC_CDECL	PDC_chadd( WINDOW*, chtype, bool, bool );
+int     PDC_CDECL	PDC_chins( WINDOW*, chtype, bool );
+int     PDC_CDECL	PDC_ungetch( int );
+
+void    PDC_CDECL	PDC_set_title( char * );
+
+int     PDC_CDECL	PDC_getclipboard( char **, long * );
+int     PDC_CDECL	PDC_setclipboard( char *, long );
+int     PDC_CDECL	PDC_freeclipboard( char * );
+int     PDC_CDECL	PDC_clearclipboard( void );
+
+unsigned long PDC_CDECL	PDC_get_input_fd( void );
+int     PDC_CDECL	PDC_curs_set( int );
+unsigned long PDC_CDECL	PDC_get_key_modifiers( void );
+
+int     PDC_CDECL	PDC_wunderline( WINDOW*, int, bool );
+int     PDC_CDECL	PDC_wleftline( WINDOW*, int, bool );
+int     PDC_CDECL	PDC_wrightline( WINDOW*, int, bool );
+int     PDC_CDECL	PDC_set_line_color( short );
+
+#else
+
+int     PDC_CDECL	addchnstr( /* chtype *, int */ );
+int     PDC_CDECL	baudrate( /* void */ );
+int     PDC_CDECL	beep( /* void */ );
+int     PDC_CDECL	border( /* chtype, chtype, chtype, chtype, chtype, chtype, chtype, chtype */ );
+int     PDC_CDECL	can_change_color ( /* void */ );
+int     PDC_CDECL	clearok( /* WINDOW*, bool */ );
+int     PDC_CDECL	color_content( /* int, short*, short*, short* */ );
+int     PDC_CDECL	copywin( /* WINDOW*, WINDOW*, int, int, int, int, int, int, int */ );
+int     PDC_CDECL	curs_set( /* int */ );
+int     PDC_CDECL	def_prog_mode( /* void */ );
+int     PDC_CDECL	def_shell_mode( /* void */ );
+int     PDC_CDECL	delay_output( /*  int  */ );
+int     PDC_CDECL	delwin( /* WINDOW* */ );
+WINDOW* PDC_CDECL	derwin( /* WINDOW*, int, int, int, int */ );
+int     PDC_CDECL	doupdate( /* void */ );
+WINDOW* PDC_CDECL	dupwin( /* WINDOW* */ );
+int     PDC_CDECL	endwin( /* void */ );
+int     PDC_CDECL	erase( /* void */ );
+char    PDC_CDECL	erasechar( /* void */ );
+int     PDC_CDECL	flash( /* void */ );
+int     PDC_CDECL	flushinp( /* void */ );
+int     PDC_CDECL	getsyx( /* int*, int* */ );
+int     PDC_CDECL	halfdelay( /* int */ );
+bool    PDC_CDECL	has_colors( /* void */ );
+int     PDC_CDECL	hline( /* chtype, int */ );
+int     PDC_CDECL	immedok( /* WINDOW*, bool */ );
+int     PDC_CDECL	inchnstr( /* chtype *, int */ );
+int     PDC_CDECL	init_color( /* short, short, short, short */ );
+int     PDC_CDECL	init_pair( /* short, short, short */ );
+WINDOW* PDC_CDECL	initscr( /* void */ );
+#ifdef XCURSES
+WINDOW* PDC_CDECL	Xinitscr( /* int, char ** */ );
+#endif
+int     PDC_CDECL	intrflush( /*  WINDOW*, bool  */ );
+int     PDC_CDECL	is_linetouched( /*WINDOW *,int*/ );
+int     PDC_CDECL	is_wintouched( /*WINDOW **/ );
+char*   PDC_CDECL	keyname( /*  int  */ );
+char    PDC_CDECL	killchar( /* void */ );
+char*   PDC_CDECL	longname( /* void */ );
+int     PDC_CDECL	meta( /* WINDOW*, bool */ );
+int     PDC_CDECL	mvcur( /* int, int, int, int */ );
+int     PDC_CDECL	mvderwin( /* WINDOW*, int, int */ );
+int     PDC_CDECL	mvprintw( /* int, int, char*,... */ );
+int     PDC_CDECL	mvscanw( /* int, int, char*,... */ );
+int     PDC_CDECL	mvwaddnstr(/* WINDOW*,int,int,char*,int */ );
+int     PDC_CDECL	mvwin( /* WINDOW*, int, int */ );
+int     PDC_CDECL	mvwinsertln( /* WINDOW*, int, int */ );
+int     PDC_CDECL	mvwprintw( /* WINDOW*, int, int, char*,... */ );
+int     PDC_CDECL	mvwscanw( /* WINDOW*, int, int, char*,... */ );
+WINDOW* PDC_CDECL	newpad( /* int, int */ );
+SCREEN* PDC_CDECL	newterm( /* char*, FILE*, FILE* */ );
+WINDOW* PDC_CDECL	newwin( /* int, int, int, int */ );
+int     PDC_CDECL	noraw( /* void */ );
+int     PDC_CDECL	notimeout( /* WINDOW *, bool */ );
+int     PDC_CDECL	overlay( /* WINDOW*, WINDOW* */ );
+int     PDC_CDECL	overwrite( /* WINDOW*, WINDOW* */ );
+int     PDC_CDECL	pair_content( /* int, short*, short* */ );
+int     PDC_CDECL	pechochar( /* WINDOW *pad, chtype ch */ );
+int     PDC_CDECL	pnoutrefresh( /* WINDOW*, int, int, int, int, int, int */ );
+int     PDC_CDECL	prefresh( /* WINDOW*, int, int, int, int, int, int */ );
+int     PDC_CDECL	printw( /* char*,... */ );
+int     PDC_CDECL	raw( /* void */ );
+int     PDC_CDECL	refresh( /* void */ );
+int     PDC_CDECL	reset_prog_mode( /* void */ );
+int     PDC_CDECL	reset_shell_mode( /* void */ );
+int     PDC_CDECL	resetty( /* void */ );
+int     PDC_CDECL	ripoffline( /* int, int (*)(WINDOW *, int) */);
+int     PDC_CDECL	savetty( /* void */ );
+int     PDC_CDECL	sb_init( /* void */ );
+int     PDC_CDECL	sb_set_horz( /* int, int, int */ );
+int     PDC_CDECL	sb_set_vert( /* int, int, int */ );
+int     PDC_CDECL	sb_get_horz( /* int *, int *, int * */ );
+int     PDC_CDECL	sb_get_vert( /* int *, int *, int * */ );
+int     PDC_CDECL	sb_refresh( /* void */ );
+int     PDC_CDECL	scanw( /* char*,... */ );
+int     PDC_CDECL	scroll( /* WINDOW* */ );
+int     PDC_CDECL	setsyx( /* int, int */ );
+SCREEN* PDC_CDECL	set_term( /* SCREEN* */ );
+int     PDC_CDECL	slk_init(/* int */);
+int     PDC_CDECL	slk_set(/* int, char *, int */);
+int     PDC_CDECL	slk_refresh(/* void */);
+int     PDC_CDECL	slk_noutrefresh(/* void */);
+char*   PDC_CDECL	slk_label(/* int */);
+int     PDC_CDECL	slk_clear(/* void */);
+int     PDC_CDECL	slk_restore(/* void */);
+int     PDC_CDECL	slk_touch(/* void */);
+int     PDC_CDECL	slk_attron(/* attr_t */);
+int     PDC_CDECL	slk_attrset(/* attr_t */);
+int     PDC_CDECL	slk_attroff(/* attr_t */);
+int     PDC_CDECL	start_color( /* void */ );
+WINDOW* PDC_CDECL	subpad( /* WINDOW*, int, int, int, int */ );
+WINDOW* PDC_CDECL	subwin( /* WINDOW*, int, int, int, int */ );
+int     PDC_CDECL	syncok(/* WINDOW*, bool */);
+attr_t  PDC_CDECL	termattrs( /* void */ );
+char*   PDC_CDECL	termname( /* void */ );
+int     PDC_CDECL	touchline( /* WINDOW*, int ,int */ );
+int     PDC_CDECL	touchwin( /* WINDOW* */ );
+#if !defined (CURSES_LIBRARY)
+void    PDC_CDECL	traceoff(/* void */);
+void    PDC_CDECL	traceon(/* void */);
+#endif
+int     PDC_CDECL	typeahead( /* int */ );
+char*   PDC_CDECL	unctrl( /* chtype */ );
+int     PDC_CDECL	vline( /* chtype, int */ );
+int     PDC_CDECL	waddchnstr( /* WINDOW*, chtype*, int */ );
+int     PDC_CDECL	waddnstr( /* WINDOW*, char*, int */ );
+int     PDC_CDECL	waddstr( /* WINDOW*, char* */ );
+int     PDC_CDECL	wattroff( /* WINDOW*, attr_t */ );
+int     PDC_CDECL	wattron( /* WINDOW*, attr_t */ );
+int     PDC_CDECL	wattrset( /* WINDOW*, attr_t */ );
+int     PDC_CDECL	wbkgd( /*WINDOW*, chtype*/ );
+void    PDC_CDECL	wbkgdset( /*WINDOW*, chtype*/ );
+int     PDC_CDECL	wborder( /* WINDOW*, chtype, chtype, chtype, chtype, chtype, chtype, chtype, chtype */ );
+int     PDC_CDECL	wclear( /* WINDOW* */ );
+int     PDC_CDECL	wclrtobot( /* WINDOW* */ );
+int     PDC_CDECL	wclrtoeol( /* WINDOW* */ );
+void    PDC_CDECL	wcursyncup(/* WINDOW* */);
+int     PDC_CDECL	wdelch( /* WINDOW* */ );
+int     PDC_CDECL	wdeleteln( /* WINDOW* */ );
+int     PDC_CDECL	werase( /* WINDOW* */ );
+int     PDC_CDECL	wgetch( /* WINDOW* */ );
+int     PDC_CDECL	wgetnstr( /* WINDOW*, char*, int */ );
+int     PDC_CDECL	wgetstr( /* WINDOW*, char* */ );
+int     PDC_CDECL	whline( /* WINDOW*, chtype, int */ );
+int     PDC_CDECL	winchnstr( /* WINDOW*, chtype*, int */ );
+int     PDC_CDECL	winnstr( /* WINDOW*, char*, int */ );
+int     PDC_CDECL	winsch( /* WINDOW*, chtype */ );
+int     PDC_CDECL	winsdelln( /* WINDOW*, int */ );
+int     PDC_CDECL	winsertln( /* WINDOW* */ );
+int     PDC_CDECL	winsnstr( /* WINDOW*, char*, int */ );
+int     PDC_CDECL	wmove( /* WINDOW*, int, int */ );
+int     PDC_CDECL	wnoutrefresh( /* WINDOW* */ );
+char    PDC_CDECL	wordchar( /* void */ );
+int     PDC_CDECL	wprintw( /* WINDOW*, char*,... */ );
+int     PDC_CDECL	wredrawln( /* WINDOW*, int ,int */ );
+int     PDC_CDECL	wrefresh( /* WINDOW* */ );
+int     PDC_CDECL	wscanw( /* WINDOW*, char*,... */ );
+int     PDC_CDECL	wscrl( /* WINDOW*, int */ );
+int     PDC_CDECL	wsetscrreg( /* WINDOW*, int, int */ );
+int     PDC_CDECL	wtimeout( /* WINDOW *, int */ );
+int     PDC_CDECL	wtouchln( /*WINDOW *, int, int, int*/ );
+void    PDC_CDECL	wsyncdown(/* WINDOW* */);
+void    PDC_CDECL	wsyncup(/* WINDOW* */);
+int     PDC_CDECL	wvline( /* WINDOW*, chtype, int */ );
+
+#ifdef  PDCURSES
+int     PDC_CDECL	raw_output( /* bool */ );
+int     PDC_CDECL	resize_term( /* int, int */ );
+WINDOW* PDC_CDECL	resize_window( /* WINDOW*, int, int */ );
+#endif
+
+#ifdef OBSOLETE_OR_TBD
+char    PDC_CDECL	breakchar( /* void */ );
+int     PDC_CDECL	cursoff( /* void */ );
+int     PDC_CDECL	curson( /* void */ );
+int     PDC_CDECL	gettmode( /* void */ );
+int     PDC_CDECL	mvaddrawch( /* int, int, chtype */ );
+int     PDC_CDECL	mvaddrawstr( /* int, int, char* */ );
+int     PDC_CDECL	mvwinsrawch( /* WINDOW*, int, int, chtype */ );
+int     PDC_CDECL	mvinsrawch( /* int, int, chtype */ );
+int     PDC_CDECL	saveoldterm( /* void */ );
+int     PDC_CDECL	tabsize( /* int */ );
+int     PDC_CDECL	waddrawstr( /* WINDOW*, char* */ );
+int     PDC_CDECL	wtabsize( /* WINDOW*, int */ );
+int     PDC_CDECL	win_print( /* WINDOW*, int */ );
+#endif
+
+#ifdef  XCURSES
+void    XCursesExit(/* void */);
+int     nocbreak( /* void */ );
+int     cbreak( /* void */ );
+int     nocrmode( /* void */ );
+int     crmode( /* void */ );
+int     noecho( /* void */ );
+int     echo( /* void */ );
+int     nodelay( /* WINDOW *,bool */ );
+#endif
+
+int     PDC_CDECL	mouse_set( /* long */ );
+int     PDC_CDECL	mouse_on( /* long */ );
+int     PDC_CDECL	mouse_off( /* long */ );
+int     PDC_CDECL	request_mouse_pos( /* void */ );
+int     PDC_CDECL	map_button( /* unsigned long */ );
+void    PDC_CDECL	wmouse_position( /* WINDOW *, int *, int * */ );
+unsigned long PDC_CDECL	getmouse( /* void */ );
+unsigned long PDC_CDECL	getbmap( /* void */ );
+
+/*
+*       Keep the compiler happy with our macros below...
+*/
+int     PDC_CDECL	PDC_chadd( /* WINDOW*, chtype, bool, bool */ );
+int     PDC_CDECL	PDC_chins( /* WINDOW*, chtype, bool */ );
+int     PDC_CDECL	PDC_ungetch( /* int */ );
+
+void    PDC_CDECL	PDC_set_title( /* char * */ );
+int     PDC_CDECL	PDC_getclipboard( /* char **, long * */ );
+int     PDC_CDECL	PDC_setclipboard( /* char *, long */ );
+int     PDC_CDECL	PDC_clearclipboard( /* void */ );
+
+unsigned long PDC_CDECL	PDC_get_input_fd( /* void */ );
+int     PDC_CDECL	PDC_curs_set( /* int */ );
+unsigned long PDC_CDECL	PDC_get_key_modifiers( /* void */ );
+
+int     PDC_CDECL	PDC_wunderline( /* WINDOW*, int, bool */ );
+int     PDC_CDECL	PDC_wleftline( /* WINDOW*, int, bool */ );
+int     PDC_CDECL	PDC_wrightline( /* WINDOW*, int, bool */ );
+int     PDC_CDECL	PDC_set_line_color( /* short */ );
+
+#endif
+
+
+#ifndef max
+# define max(a,b) (((a) > (b)) ? (a) : (b))
+#endif
+#ifndef min
+# define min(a,b) (((a) < (b)) ? (a) : (b))
+#endif
+
+/*
+*       Functions defined as macros
+*/
+
+#define addch( c )              waddch( stdscr, c )
+#define addchstr( c )           addchnstr( c, -1 )
+#define addstr(str)             waddstr( stdscr, str )
+#define addnstr(str, n)         waddnstr( stdscr, str, n )
+#define attroff(attr)           wattroff( stdscr, attr )
+#define attron(attr)            wattron( stdscr, attr )
+#define attrset(attr)           wattrset( stdscr, attr )
+#define bkgd(c)                 wbkgd(stdscr,c)
+#define bkgdset(c)              wbkgdset(stdscr,c)
+#define border(ls,rs,ts,bs,tl,tr,bl,br)  wborder(stdscr,ls,rs,ts,bs,tl,tr,bl,br)
+#define box( w, v, h )          wborder( w, v, v, h, h, 0, 0, 0, 0 )
+#define clear()                 wclear( stdscr )
+#define clrtobot()              wclrtobot( stdscr )
+#define clrtoeol()              wclrtoeol( stdscr )
+#define delch()                 wdelch( stdscr )
+#define deleteln()              wdeleteln( stdscr )
+#define derwin(w,nl,nc,by,bx)   subwin((w),(nl),(nc),(by+(w)->_begy),(bx+(w)->_begx))
+#define draino(ms)              delay_output(ms)
+#define echochar(c)             (addch((chtype)c)==ERR?ERR:refresh())
+#define erase()                 werase( stdscr )
+#define fixterm()               reset_prog_mode()
+#define getbegx(w)              (w)->_begx
+#define getbegy(w)              (w)->_begy
+#define getbegyx(w,y,x)         ( y = (w)->_begy, x = (w)->_begx )
+#define getbkgd(w)              ((w)->_bkgd)
+#define getch()                 wgetch(stdscr)
+#define getmaxx(w)              (w)->_maxx
+#define getmaxy(w)              (w)->_maxy
+#define getmaxyx(w,y,x)         ( y = (w)->_maxy, x = (w)->_maxx )
+#define getparx(w)              (w)->_parx
+#define getpary(w)              (w)->_pary
+#define getparyx(w,y,x)         ( y = (w)->_pary, x = (w)->_parx )
+#define getstr(str)             wgetstr( stdscr, str )
+#define getnstr(str,num)        wgetnstr( stdscr, str, num )
+#define getsyx(y,x)             { if( curscr->_leaveit) (y)=(x)=-1; else getyx(curscr,(y),(x)); }
+#define getyx(w,y,x)            ( y = (w)->_cury, x = (w)->_curx )
+#define has_colors()            ((SP->mono) ? FALSE : TRUE)
+#define idcok(w,flag)           OK
+#define idlok(w,flag)           OK
+#define inch()                  (stdscr->_y[stdscr->_cury][stdscr->_curx])
+#define inchstr( c )            inchnstr( c, stdscr->_maxx-stdscr->_curx )
+#define innstr(str,n)           winnstr(stdscr,(str),(n))
+#define insch( c )              winsch( stdscr, c )
+#define insdelln(n)             winsdelln(stdscr,n)
+#define insertln()              winsertln( stdscr )
+#define insnstr(s,n)            winsnstr(stdscr,s,n)
+#define insstr(s)               winsnstr(stdscr,s,(-1))
+#define instr(str)              winnstr(stdscr,(str),stdscr->_maxx)
+#define isendwin()              ((SP->alive) ? FALSE : TRUE)
+#define is_termresized()        (SP->resized)
+#define keypad(w,flag)          (w->_use_keypad  = flag, OK)
+#define leaveok(w,flag)         (w->_leaveit = flag, OK)
+#define move(y,x)               wmove( stdscr, y, x )
+#define mvaddch(y,x,c)          (move( y, x )==ERR?ERR:addch( c ))
+#define mvaddchstr(y,x,c)       (move( y, x )==ERR?ERR:addchnstr( c, -1 ))
+#define mvaddchnstr(y,x,c,n)    (move( y, x )==ERR?ERR:addchnstr( c, n ))
+#define mvaddstr(y,x,str)       (move( y, x )==ERR?ERR:addstr( str ))
+#define mvaddnstr(y,x,str,n)    (move( y, x )==ERR?ERR:addnstr( str, n ))
+#define mvdelch(y,x)            (move( y, x )==ERR?ERR:wdelch( stdscr ))
+#define mvgetch(y,x)            (move( y, x )==ERR?ERR:wgetch(stdscr))
+#define mvgetstr(y,x,str)       (move( y, x )==ERR?ERR:wgetstr( stdscr, str ))
+#define mvinch(y,x)             (move( y, x )==ERR?ERR:(stdscr->_y[y][x]))
+#define mvinchstr(y,x,c)        (move( y, x )==ERR?ERR:inchnstr( c, stdscr->_maxx-stdscr->_curx ))
+#define mvinchnstr(y,x,c,n)     (move( y, x )==ERR?ERR:inchnstr( c, n ))
+#define mvinsch(y,x,c)          (move( y, x )==ERR?ERR:winsch( stdscr, c ))
+#define mvinsnstr(y,x,s,n)      (move( y, x )==ERR?ERR:winsnstr(stdscr,s,n))
+#define mvinsstr(y,x,s)         (move( y, x )==ERR?ERR:winsnstr(stdscr,s,(-1)))
+#define mvinstr(y,x,str)        (move( y, x )==ERR?ERR:winnstr(stdscr,(str),stdscr->_maxx))
+#define mvinnstr(y,x,str,n)     (move( y, x )==ERR?ERR:winnstr(stdscr,(str),(n)))
+#define mvwaddch(w,y,x,c)       (wmove( w, y, x )==ERR?ERR:waddch( w, c ))
+#define mvwaddchstr(w,y,x,c)    (wmove( w, y, x )==ERR?ERR:waddchnstr( w, c, -1 ))
+#define mvwaddchnstr(w,y,x,c,n) (wmove( w, y, x )==ERR?ERR:waddchnstr( w, c, n ))
+#define mvwaddrawch(w,y,x,c)    (wmove( w, y, x )==ERR?ERR:waddrawch( w, c ))
+#define mvwaddrawstr(w,y,x,str) (wmove( w, y, x )==ERR?ERR:waddrawstr( w, str ))
+#define mvwaddstr(w,y,x,str)    (wmove( w, y, x )==ERR?ERR:waddstr( w, str ))
+#define mvwdelch(w,y,x)         (wmove( w, y, x )==ERR?ERR:wdelch( w ))
+#define mvwgetch(w,y,x)         (wmove( w, y, x )==ERR?ERR:wgetch( w ))
+#define mvwgetstr(w,y,x,str)    (wmove( w, y, x )==ERR?ERR:wgetstr( w, str ))
+#define mvwinch(w,y,x)          (wmove( w, y, x )==ERR?ERR:((w)->_y[y][x]))
+#define mvwinchstr(w,y,x,c)     (wmove( w, y, x )==ERR?ERR:winchnstr( w, c, (w)->_maxx-(w)->_curx ))
+#define mvwinchnstr(w,y,x,c,n)  (wmove( w, y, x )==ERR?ERR:winchnstr( w, c, n ))
+#define mvwinsch(w,y,x,c)       (wmove( w, y, x )==ERR?ERR:winsch( w, c ))
+#define mvwinstr(w,y,x,str)     (wmove( w, y, x )==ERR?ERR:winnstr(w,str,(w)->_maxx))
+#define mvwinnstr(w,y,x,str,n)  (wmove( w, y, x )==ERR?ERR:winnstr(w,str,n))
+#define mvwinsnstr(w,y,x,s,n)   (wmove( w, y, x )==ERR?ERR:winsnstr(w,s,n))
+#define mvwinsstr(w,y,x,s)      (wmove( w, y, x )==ERR?ERR:winsnstr(w,s,(-1)))
+#define napms(ms)               delay_output(ms)
+#define nl()                    (SP->autocr = TRUE)
+#define nonl()                  (SP->autocr = FALSE)
+#define redrawwin(w)            wredrawln((w),0,(w)->_maxy)
+#define refresh()               wrefresh( stdscr )
+#define resetterm()             reset_shell_mode()
+#define saveterm()              def_prog_mode()
+#define scrl(n)                 wscrl(stdscr,n)
+#define scroll(w)               wscrl((w),1)
+#define scrollok(w,flag)        ((w)->_scroll  = flag)
+#define setscrreg(top, bot)     wsetscrreg( stdscr, top, bot )
+#define setsyx(y,x)             { if( (y)==-1 && (x)==-1) curscr->_leaveit=TRUE; else { curscr->_leaveit=FALSE;wmove(curscr,(y),(x));} }
+#define standend()              wattrset(stdscr, A_NORMAL)
+#define standout()              wattrset(stdscr, A_STANDOUT)
+#define timeout(n)              wtimeout( stdscr, n )
+#define touchline(w,y,n)        wtouchln((w),(y),(n),TRUE)
+#define touchwin(w)             wtouchln((w),0,(w)->_maxy,TRUE)
+#if defined (CURSES_LIBRARY)
+# define traceoff()             {trace_on = FALSE;}
+# define traceon()              {trace_on = TRUE;}
+#endif
+#define ungetch(ch)             PDC_ungetch(ch)
+#define untouchwin(w)           wtouchln((w),0,((w)->_maxy),FALSE)
+#define waddch(w, c)            PDC_chadd( w, (chtype)c, (bool)!(SP->raw_out), TRUE )
+#define waddchstr(w, c)         (waddchnstr( w, c, -1 ))
+#define werase(w)               (wmove((w),0,0), wclrtobot(w))
+#define wclear(w)               ((w)->_clear = TRUE , werase(w))
+#define wechochar(w,c)          (waddch(w,(chtype)c)==ERR?ERR:wrefresh(w))
+#define winch(w)                ((w)->_y[(w)->_cury][(w)->_curx])
+#define winchstr(w, c)          (winchnstr( w, c, (w)->_maxx-(w)->_curx ) )
+#define winsstr(w,str)          winsnstr((w),(str),(-1))
+#define winstr(w,str)           winnstr((w),str,(w)->_maxx)
+#define wstandend(w)            wattrset(w, A_NORMAL)
+#define wstandout(w)            wattrset(w, A_STANDOUT)
+
+#if !defined(UNIX) && !defined(XCURSES)
+/* set delaytenths = 0 added - William McBrine */
+# define nocbreak()             (SP->cbreak = FALSE, SP->delaytenths = 0) 
+# define cbreak()               (SP->cbreak = TRUE)
+# define nocrmode()             (SP->cbreak = FALSE)
+# define crmode()               (SP->cbreak = TRUE)
+# define noecho()               (SP->echo = FALSE,OK)
+# define echo()                 (SP->echo = TRUE,OK)
+# define nodelay(w,flag)        (w->_nodelay = flag)
+#endif
+
+#if defined(PDCURSES)
+# define addrawch( c )          waddrawch( stdscr, c )
+# define addrawstr(str)         waddrawstr( stdscr, str )
+# define insrawch( c )          winsrawch( stdscr, c )
+# define waddrawch(w, c)        PDC_chadd( w, (chtype)c, FALSE, TRUE )
+# define winsrawch(w, c)        PDC_chins( w, (chtype)c, FALSE )
+# define PDC_save_key_modifiers(flag) (SP->save_key_modifiers = flag)
+# define PDC_return_key_modifiers(flag) (SP->return_key_modifiers = flag)
+
+/*
+ *      FYI: Need to document these functions...
+ */
+# define title(s,a)             wtitle( stdscr, s, (chtype)a )
+# define titleofs(ofs)          wtitleofs( stdscr, ofs )
+# define wtitle(w,s,a)          (w->_title = s, w->_title_attr = (chtype)a)
+# define wtitleofs(w,ofs)       (w->_title_ofs = ofs)
+#endif
+
+/*
+ * return codes from PDC_getclipboard() and PDC_setclipboard() calls.
+ */
+#define PDC_CLIP_SUCCESS        0
+#define PDC_CLIP_ACCESS_ERROR   1
+#define PDC_CLIP_EMPTY          2
+#define PDC_CLIP_MEMORY_ERROR   3
+
+/*
+ * PDCurses key modifier masks
+ */
+#define PDC_KEY_MODIFIER_SHIFT     (1 << 0)
+#define PDC_KEY_MODIFIER_CONTROL   (1 << 1)
+#define PDC_KEY_MODIFIER_ALT       (1 << 2)
+#define PDC_KEY_MODIFIER_NUMLOCK   (1 << 3)
+
+/*
+ *      Load up curspriv.h.     This should be in the same place as
+ *      stdlib.h.  We allow anyone who defines CURSES_LIBRARY to have
+ *      access to our internal routines.  This provides quick
+ *      PC applications at the expense of portability.
+ */
+#if defined(CURSES_LIBRARY)
+# include <curspriv.h>
+#endif
+
+#include <stdlib.h>
+
+#endif  /* __PDCURSES__ */
+
+#if defined(__cplusplus) || defined(__cplusplus__) || defined(__CPLUSPLUS)
+# undef bool
+   }
+#endif
Index: avida/current/source/third-party/pdcurses/pdcurses.lib


More information about the Avida-cvs mailing list