[avida-cvs] avida(Sherri) CVS commits: /current bootstrap /current/source/cpu hardware_4stack.cc hardware_4stack.hh hardware_base.hh hardware_cpu.cc hardware_cpu.hh test_util.cc test_util.hh /current/source/event cPopulation.events population_event_factory.cc /current/source/main Makefile.am avida.cc callback_util.cc callback_util.hh genebank.cc main_sub.pri organism.cc organism.hh pop_interface.cc pop_interface.hh population.cc population.hh /current/source/qt-viewer population_cell_wrapper.hh /current/source/qt-viewer/exp avd_widget_list.hh avd_widget_list_item.hh avd_widget_list_item_container.hh /current/source/support Makefile.am /current/source/support/preset_organisms Makefile.am /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 symbol_util.cc text_screen.hh

goingssh avida-cvs at alife.org
Tue Aug 19 20:34:26 PDT 2003


goingssh		Tue Aug 19 12:34:26 2003 EDT

  Modified files:              (Branch: Sherri)
    /avida/current	bootstrap 
    /avida/current/source/cpu	hardware_4stack.cc hardware_4stack.hh 
                             	hardware_base.hh hardware_cpu.cc 
                             	hardware_cpu.hh test_util.cc test_util.hh 
    /avida/current/source/event	cPopulation.events 
                               	population_event_factory.cc 
    /avida/current/source/main	Makefile.am avida.cc callback_util.cc 
                              	callback_util.hh genebank.cc 
                              	main_sub.pri organism.cc organism.hh 
                              	pop_interface.cc pop_interface.hh 
                              	population.cc population.hh 
    /avida/current/source/qt-viewer	population_cell_wrapper.hh 
    /avida/current/source/qt-viewer/exp	avd_widget_list.hh 
                                       	avd_widget_list_item.hh 
                                       	avd_widget_list_item_container.hh 
    /avida/current/source/support	Makefile.am 
    /avida/current/source/support/preset_organisms	Makefile.am 
    /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	symbol_util.cc text_screen.hh 
  Log:
  updating my branch again
  
-------------- next part --------------
Index: avida/current/bootstrap
diff -u avida/current/bootstrap:1.8.2.2 avida/current/bootstrap:1.8.2.3
--- avida/current/bootstrap:1.8.2.2	Tue Aug 19 10:49:28 2003
+++ avida/current/bootstrap	Tue Aug 19 12:34:08 2003
@@ -12,7 +12,7 @@
 # helps bootstrapping, when checked out from CVS
 # requires GNU autoconf and GNU automake
 #
-# $Id: bootstrap,v 1.8.2.2 2003/08/19 17:49:28 goingssh Exp $
+# $Id: bootstrap,v 1.8.2.3 2003/08/19 19:34:08 goingssh Exp $
 
 # this is not meant to be exported outside the source tree
 
Index: avida/current/source/cpu/hardware_4stack.cc
diff -u avida/current/source/cpu/hardware_4stack.cc:1.2.4.5 avida/current/source/cpu/hardware_4stack.cc:1.2.4.6
--- avida/current/source/cpu/hardware_4stack.cc:1.2.4.5	Tue Aug 19 10:49:29 2003
+++ avida/current/source/cpu/hardware_4stack.cc	Tue Aug 19 12:34:12 2003
@@ -51,6 +51,7 @@
      heads[i] = in_thread.heads[i];
    }
    input_pointer = in_thread.input_pointer;
+   owner = in_thread.owner;
 }
 
 cHardware4Stack_Thread::~cHardware4Stack_Thread() {}
@@ -67,6 +68,7 @@
   input_pointer = in_thread.input_pointer;
   input_buf = in_thread.input_buf;
   output_buf = in_thread.output_buf;
+  owner = in_thread.owner;
 }
 
 void cHardware4Stack_Thread::Reset(cHardwareBase * in_hardware, int _id)
@@ -82,11 +84,9 @@
   output_buf.Clear();
   read_label.Clear();
   next_label.Clear();
+  owner = NULL;
 }
 
-
-
-
 void cHardware4Stack_Thread::SaveState(ostream & fp){
   assert(fp.good());
   fp << "cHardware4Stack_Thread" << endl;
@@ -115,8 +115,6 @@
   next_label.SaveState(fp);
 }
 
-
-
 void cHardware4Stack_Thread::LoadState(istream & fp){
   assert(fp.good());
   cString foo;
@@ -962,9 +960,10 @@
 }
 
 // This is the code run by the INFECTED organism.  Its function is to SPREAD infection.
-bool cHardware4Stack::Inject_Parasite(int mem_space_used, double mut_multiplier)
+bool cHardware4Stack::InjectParasite(double mut_multiplier)
 {
   const int end_pos = GetHead(HEAD_WRITE).GetPosition();
+  const int mem_space_used = GetHead(HEAD_WRITE).GetMemSpace();
 
   // Make sure the creature will still be above the minimum size,
   if (end_pos <= 0) {
@@ -984,20 +983,23 @@
 
   int inject_signal = false;
 
+  if(injected_code.GetSize()>0)
+    inject_signal = organism->InjectParasite(injected_code);
+  
   //************* CALL GOES HERE ******************//
   // spin around randomly (caution: possible organism dizziness)
-  const int num_neighbors = organism->GetNeighborhoodSize();
-  for(unsigned int i=0; i<g_random.GetUInt(num_neighbors); i++)
-    organism->Rotate(1);
+  //const int num_neighbors = organism->GetNeighborhoodSize();
+  //for(unsigned int i=0; i<g_random.GetUInt(num_neighbors); i++)
+  //  organism->Rotate(1);
 
   // If we don't have a host, stop here.
-  cOrganism * host_organism = organism->GetNeighbor();
+  //cOrganism * host_organism = organism->GetNeighbor();
   
  
-  if(host_organism!=NULL)
-    {
-      inject_signal = host_organism->GetHardware().Inject_Host(GetLabel(), injected_code);
-    }
+  //if(host_organism!=NULL)
+  //  {
+  //    
+  //  }
  
   //************** CALL ENDS HERE ******************//
 
@@ -1020,7 +1022,7 @@
 }
 
 //This is the code run by the TARGET of an injection.  This RECIEVES the infection.
-bool cHardware4Stack::Inject_Host(const cCodeLabel & in_label, const cGenome & inject_code)
+bool cHardware4Stack::InjectHost(const cCodeLabel & in_label, const cGenome & inject_code)
 {
   // Make sure the genome will be below max size after injection.
 
@@ -2349,10 +2351,9 @@
 
 bool cHardware4Stack::Inst_Inject()
 {
-  const int mem_space_used = GetHead(HEAD_WRITE).GetMemSpace(); 
   double mut_multiplier = 1;
 
-  return Inject_Parasite(mem_space_used, mut_multiplier);
+  return InjectParasite(mut_multiplier);
 }
 
 
Index: avida/current/source/cpu/hardware_4stack.hh
diff -u avida/current/source/cpu/hardware_4stack.hh:1.2.4.3 avida/current/source/cpu/hardware_4stack.hh:1.2.4.4
--- avida/current/source/cpu/hardware_4stack.hh:1.2.4.3	Tue Aug 19 10:49:29 2003
+++ avida/current/source/cpu/hardware_4stack.hh	Tue Aug 19 12:34:16 2003
@@ -26,6 +26,7 @@
 class cInstLibBase;
 class cOrganism;
 class cMutation;
+class cInjectGenotype;
 
 //new-style constant declarations - law 
 static const int NUM_LOCAL_STACKS = 3;
@@ -59,6 +60,9 @@
   tBuffer<int> output_buf;
   cCodeLabel read_label;
   cCodeLabel next_label;
+  // If this thread was spawned by Inject, this will point to the genotype 
+  // of the parasite running the thread.  Otherwise, it will be NULL.
+  cInjectGenotype * owner;
 public:
   cHardware4Stack_Thread(cHardwareBase * in_hardware=NULL, int _id=-1);
   cHardware4Stack_Thread(const cHardware4Stack_Thread & in_thread, int _id=-1);
@@ -225,6 +229,8 @@
   inline void PrevThread(); // Shift the current thread in use.
   inline void NextThread();
   inline void SetThread(int value);
+  inline cInjectGenotype * GetThreadOwner(); 
+  inline void SetThreadOwner(cInjectGenotype * in_genotype);
 
   // --------  Tests  --------
 
@@ -252,8 +258,8 @@
   c4StackHead FindFullLabel(const cCodeLabel & in_label);
 
   int GetType() const { return HARDWARE_TYPE_CPU_4STACK; }
-  bool Inject_Parasite(int mem_space_used, double mut_multiplier);
-  bool Inject_Host(const cCodeLabel & in_label, const cGenome & injection);
+  bool InjectParasite(double mut_multiplier);
+  bool InjectHost(const cCodeLabel & in_label, const cGenome & injection);
   int InjectThread(const cCodeLabel &, const cGenome &) { return -1; }
   void Mutate(const int mut_point);
   int PointMutate(const double mut_rate);
@@ -426,8 +432,18 @@
 
 inline void cHardware4Stack::SetThread(int value)
 {
-     if (value>=0 && value < GetNumThreads())
-          cur_thread=value;
+  if (value>=0 && value < GetNumThreads())
+    cur_thread=value;
+}
+
+inline cInjectGenotype * cHardware4Stack::GetThreadOwner() 
+{ 
+  return threads[cur_thread].owner; 
+}
+
+inline void cHardware4Stack::SetThreadOwner(cInjectGenotype * in_genotype)
+{ 
+  threads[cur_thread].owner = in_genotype; 
 }
 
 /*inline void cHardware4Stack::StackFlip()
Index: avida/current/source/cpu/hardware_base.hh
diff -u avida/current/source/cpu/hardware_base.hh:1.17.2.1 avida/current/source/cpu/hardware_base.hh:1.17.2.2
--- avida/current/source/cpu/hardware_base.hh:1.17.2.1	Tue Aug 19 10:49:29 2003
+++ avida/current/source/cpu/hardware_base.hh	Tue Aug 19 12:34:17 2003
@@ -52,7 +52,7 @@
 
   // --------  Other Virtual Tools --------
   virtual int GetType() const = 0;
-  virtual bool Inject_Host(const cCodeLabel & in_label,
+  virtual bool InjectHost(const cCodeLabel & in_label,
 		      const cGenome & injection) = 0;
   virtual int InjectThread(const cCodeLabel & in_label,
 			   const cGenome & injection) = 0;
Index: avida/current/source/cpu/hardware_cpu.cc
diff -u avida/current/source/cpu/hardware_cpu.cc:1.45.2.4 avida/current/source/cpu/hardware_cpu.cc:1.45.2.5
--- avida/current/source/cpu/hardware_cpu.cc:1.45.2.4	Tue Aug 19 10:49:29 2003
+++ avida/current/source/cpu/hardware_cpu.cc	Tue Aug 19 12:34:18 2003
@@ -1090,7 +1090,7 @@
 }
 
 
-bool cHardwareCPU::Inject_Host(const cCodeLabel & in_label, const cGenome & injection)
+bool cHardwareCPU::InjectHost(const cCodeLabel & in_label, const cGenome & injection)
 {
   // Make sure the genome will be below max size after injection.
 
@@ -2764,7 +2764,7 @@
   GetLabel().Rotate(1, NUM_NOPS);
 
   const bool inject_signal =
-    host_organism->GetHardware().Inject_Host(GetLabel(), inject_code);
+    host_organism->GetHardware().InjectHost(GetLabel(), inject_code);
   if (inject_signal == 1) {
     Fault(FAULT_LOC_INJECT, FAULT_TYPE_WARNING, "inject: host too large.");
     return false; // Inject failed.
Index: avida/current/source/cpu/hardware_cpu.hh
diff -u avida/current/source/cpu/hardware_cpu.hh:1.28.2.3 avida/current/source/cpu/hardware_cpu.hh:1.28.2.4
--- avida/current/source/cpu/hardware_cpu.hh:1.28.2.3	Tue Aug 19 10:49:29 2003
+++ avida/current/source/cpu/hardware_cpu.hh	Tue Aug 19 12:34:18 2003
@@ -216,7 +216,7 @@
   cCPUHead FindFullLabel(const cCodeLabel & in_label);
 
   int GetType() const { return HARDWARE_TYPE_CPU_ORIGINAL; }
-  bool Inject_Host(const cCodeLabel & in_label, const cGenome & injection);
+  bool InjectHost(const cCodeLabel & in_label, const cGenome & injection);
   int InjectThread(const cCodeLabel & in_label, const cGenome & injection);
   void InjectCode(const cGenome & injection, const int line_num);
   void InjectCodeThread(const cGenome & injection, const int line_num);
Index: avida/current/source/cpu/test_util.cc
diff -u avida/current/source/cpu/test_util.cc:1.7 avida/current/source/cpu/test_util.cc:1.7.2.1
--- avida/current/source/cpu/test_util.cc:1.7	Sat May 17 14:23:25 2003
+++ avida/current/source/cpu/test_util.cc	Tue Aug 19 12:34:18 2003
@@ -12,6 +12,7 @@
 
 #include "../main/genome.hh"
 #include "../main/genotype.hh"
+#include "../main/inject_genotype.hh"
 #include "hardware_method.hh"
 #include "../main/inst_util.hh"
 #include "../main/organism.hh"
@@ -21,10 +22,8 @@
 #include "hardware_base.hh"
 #include "test_cpu.hh"
 
-
 using namespace std;
 
-
 void cTestUtil::PrintGenome(const cGenome & genome, cString filename,
 			    cGenotype * genotype, int update_out)
 {
@@ -121,6 +120,108 @@
   }
   fp << endl; // Skip line
 
+  // Display the genome
+  const cInstSet & inst_set =
+    test_info.GetTestOrganism()->GetHardware().GetInstSet();
+  cInstUtil::SaveGenome(fp, inst_set, genome);
+}
+
+void cTestUtil::PrintGenome(cInjectGenotype * inject_genotype, 
+			    const cGenome & genome, cString filename, int update_out)
+{
+  if (filename == "") filename.Set("p%03d-unnamed", genome.GetSize());
+
+  // Build the test info for printing.
+  cCPUTestInfo test_info;
+  test_info.TestThreads();
+  cTestCPU::TestGenome(test_info, genome);
+
+  // Open the file...
+
+  ofstream fp(filename());
+
+  // @CAO Fix!!!!!!
+  if( fp.good() == false ) {
+    cerr << "Unable to open output file '" <<  filename() << "'" <<
+    endl;
+    return;
+  }
+
+  // Print the useful info at the top...
+
+  fp << "# Filename........: " << filename << endl;
+
+  if (update_out >= 0) fp << "# Update Output...: " << update_out <<
+  endl;
+  else fp << "# Update Output...: N/A" << endl;
+
+  //fp << "# Is Viable.......: " << test_info.IsViable()
+  //<< endl
+  //   << "# Repro Cycle Size: " << test_info.GetMaxCycle()
+  //   << endl
+  //   << "# Depth to Viable.: " << test_info.GetDepthFound()
+  //   << endl;
+
+  if (inject_genotype != NULL) {
+    fp << "# Update Created..: " << inject_genotype->GetUpdateBorn()     <<
+       endl
+       << "# Genotype ID.....: " << inject_genotype->GetID()             <<
+       endl
+       << "# Parent Gen ID...: " << inject_genotype->GetParentID()       <<
+       endl
+       << "# Tree Depth......: " << inject_genotype->GetDepth()          <<
+       endl
+      //<< "# Parent Distance.: " << inject_genotype->GetParentDistance() <<
+      // endl
+      ;
+  }
+  fp << endl;
+
+  //const int num_levels = test_info.GetMaxDepth() + 1;
+  /*for (int j = 0; j < num_levels; j++) {
+    fp << "# Generation: " << j << endl;
+    cOrganism * organism = test_info.GetTestOrganism(j);
+    assert(organism != NULL);
+    cPhenotype & phenotype = organism->GetPhenotype();
+
+    fp << "# Merit...........: "
+       << setw(12) << setfill(' ') << phenotype.GetMerit() << endl;
+    fp << "# Gestation Time..: "
+       << setw(12) << setfill(' ') << phenotype.GetGestationTime() << endl;
+    fp << "# Fitness.........: "
+       << setw(12) << setfill(' ') << phenotype.GetFitness() << endl;
+    fp << "# Errors..........: "
+       << setw(12) << setfill(' ') << phenotype.GetLastNumErrors() << endl;
+    fp << "# Genome Size.....: "
+       << setw(12) << setfill(' ') << organism->GetGenome().GetSize() << endl;
+    fp << "# Copied Size.....: "
+       << setw(12) << setfill(' ') << phenotype.GetCopiedSize() << endl;
+    fp << "# Executed Size...: "
+       << setw(12) << setfill(' ') << phenotype.GetExecutedSize() << endl;
+
+    fp << "# Offspring.......: ";
+    if (phenotype.GetNumDivides() == 0)
+      fp << setw(12) << setfill(' ') << "NONE";
+    else if (phenotype.CopyTrue() == true)
+      fp << setw(12) << setfill(' ') << "SELF";
+    else if (test_info.GetCycleTo() != -1)
+      fp << setw(12) << setfill(' ') << test_info.GetCycleTo();
+    else
+      fp << setw(12) << setfill(' ') << (j+1);
+    fp << endl;
+
+    fp << endl;     // Skip line
+    }
+  
+  // Display the tasks performed...
+  cPhenotype & phenotype = test_info.GetTestOrganism()->GetPhenotype();
+  for (int i = 0; i < phenotype.GetEnvironment().GetTaskLib().GetSize(); i++) {
+    fp << "# "<< phenotype.GetEnvironment().GetTaskLib().GetTask(i).GetName()
+       << "\t" << phenotype.GetLastTaskCount()[i]
+       << endl;
+  }
+  fp << endl; // Skip line
+  */
   // Display the genome
   const cInstSet & inst_set =
     test_info.GetTestOrganism()->GetHardware().GetInstSet();
Index: avida/current/source/cpu/test_util.hh
diff -u avida/current/source/cpu/test_util.hh:1.2 avida/current/source/cpu/test_util.hh:1.2.4.1
--- avida/current/source/cpu/test_util.hh:1.2	Wed Dec  5 22:11:40 2001
+++ avida/current/source/cpu/test_util.hh	Tue Aug 19 12:34:18 2003
@@ -17,11 +17,14 @@
 
 class cGenome;
 class cGenotype;
+class cInjectGenotype;
 
 class cTestUtil {
 public:
   static void PrintGenome(const cGenome & genome, cString filename="",
 			  cGenotype * genotype=NULL, int update_out=-1);
+  static void PrintGenome(cInjectGenotype * genotype, const cGenome & genome, 
+			  cString filename="", int update_out=-1);
 };
 
 #endif
Index: avida/current/source/event/cPopulation.events
diff -u avida/current/source/event/cPopulation.events:1.40.2.1 avida/current/source/event/cPopulation.events:1.40.2.2
--- avida/current/source/event/cPopulation.events:1.40.2.1	Tue Aug 19 10:49:29 2003
+++ avida/current/source/event/cPopulation.events	Tue Aug 19 12:34:18 2003
@@ -77,8 +77,6 @@
   cAvidaDriver_Base::main_driver->SetDone();
 }
 
-
-
 echo
 :descr:
 /**
@@ -428,7 +426,36 @@
 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());
+cTestUtil::PrintGenome(dom->GetGenome(), filename, dom, population->GetUpdate()); 
+
+parasite_debug
+:descr:
+//midget
+:args:
+cString in_filename ""
+:body:
+population->ParasiteDebug();
+
+print_dom_parasite
+:descr:
+/**
+* Write the currently dominant injected 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.
+**/
+:args:
+cString in_filename ""
+:body:
+cInjectGenotype * dom = population->GetInjectGenebank().GetBestInjectGenotype();
+if (dom!=NULL) {
+cString filename(in_filename);
+if (filename == "") filename.Set("genebank/%s", dom->GetName()());
+cTestUtil::PrintGenome(dom, dom->GetGenome(), filename, population->GetUpdate()); }
 
 print_genotype_map
 :descr:
@@ -557,6 +584,25 @@
 }
 ofstream fp(filename());
 population->GetGenebank().DumpDetailedSummary(fp);
+
+detail_parasite_pop
+:descr:
+/**
+* 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.
+**/
+:args:
+cString fname ""
+:body:
+cString filename;
+if( fname == "" ){
+  filename.Set("detail_parasite_pop.%d", population->GetUpdate());
+}
+//ofstream fp(filename());
+population->GetInjectGenebank().DumpDetailedSummary(filename, population->GetUpdate());
 
 dump_historic_pop
 :descr:
Index: avida/current/source/event/population_event_factory.cc
diff -u avida/current/source/event/population_event_factory.cc:1.6 avida/current/source/event/population_event_factory.cc:1.6.2.1
--- avida/current/source/event/population_event_factory.cc:1.6	Sat May 17 02:48:08 2003
+++ avida/current/source/event/population_event_factory.cc	Tue Aug 19 12:34:19 2003
@@ -14,6 +14,8 @@
 #include "../main/genebank.hh"
 #include "../main/genotype.hh"
 #include "../cpu/hardware_method.hh"
+#include "../main/inject_genebank.hh"
+#include "../main/inject_genotype.hh"
 #include "../main/inst_util.hh"
 #include "../main/landscape.hh"
 #include "../main/lineage_control.hh"
Index: avida/current/source/main/Makefile.am
diff -u avida/current/source/main/Makefile.am:1.26.2.2 avida/current/source/main/Makefile.am:1.26.2.3
--- avida/current/source/main/Makefile.am:1.26.2.2	Tue Aug 19 10:49:29 2003
+++ avida/current/source/main/Makefile.am	Tue Aug 19 12:34:19 2003
@@ -33,6 +33,8 @@
     genome.hh		genome.cc		\
     genome_util.hh		genome_util.cc		\
     genotype.hh		genotype.cc		\
+    inject_genebank.hh	inject_genebank.cc   	\
+    inject_genotype.hh	inject_genotype.cc	\
     inst.hh			inst.cc			\
     inst_set.hh		inst_set.cc		\
     inst_lib.hh \
Index: avida/current/source/main/avida.cc
diff -u avida/current/source/main/avida.cc:1.41.2.2 avida/current/source/main/avida.cc:1.41.2.3
--- avida/current/source/main/avida.cc:1.41.2.2	Tue Aug 19 10:49:29 2003
+++ avida/current/source/main/avida.cc	Tue Aug 19 12:34:19 2003
@@ -192,6 +192,8 @@
   default_interface.SetFun_GetResources(&cCallbackUtil::CB_GetResources);
   default_interface.SetFun_UpdateResources(&cCallbackUtil::CB_UpdateResources);
   default_interface.SetFun_KillCell(&cCallbackUtil::CB_KillCell);
+  default_interface.SetFun_SendMessage(&cCallbackUtil::CB_SendMessage);
+  default_interface.SetFun_InjectParasite(&cCallbackUtil::CB_InjectParasite);
 
   population = new cPopulation(default_interface, environment);
   cout << " ...done" << endl;
Index: avida/current/source/main/callback_util.cc
diff -u avida/current/source/main/callback_util.cc:1.19.2.2 avida/current/source/main/callback_util.cc:1.19.2.3
--- avida/current/source/main/callback_util.cc:1.19.2.2	Tue Aug 19 10:49:29 2003
+++ avida/current/source/main/callback_util.cc	Tue Aug 19 12:34:19 2003
@@ -196,3 +196,14 @@
   mess.SetRecipientID(cell.ConnectionList().GetFirst()->GetID());
   return cell.ConnectionList().GetFirst()->GetOrganism()->ReceiveMessage(mess);
 }
+
+bool cCallbackUtil::CB_InjectParasite(cPopulation * pop, int cell_id, cOrganism * parent,
+				      const cGenome & injected_code)
+{
+  assert(pop != NULL);
+  assert(parent != NULL);
+  assert(pop->GetCell(cell_id).GetOrganism() == parent);
+
+  return pop->ActivateInject(*parent, injected_code);
+}
+
Index: avida/current/source/main/callback_util.hh
diff -u avida/current/source/main/callback_util.hh:1.10.2.1 avida/current/source/main/callback_util.hh:1.10.2.2
--- avida/current/source/main/callback_util.hh:1.10.2.1	Tue Aug 19 10:49:29 2003
+++ avida/current/source/main/callback_util.hh	Tue Aug 19 12:34:20 2003
@@ -16,6 +16,7 @@
 class cPopulation;
 class cPopulationInterface;
 class cOrgMessage;
+class cCodeLabel;
 
 class cCallbackUtil {
 public:
@@ -40,6 +41,8 @@
 				 const tArray<double> & res_change);
   static void CB_KillCell(cPopulation * pop, int death_id);
   static bool CB_SendMessage(cPopulation * pop, int cell_id, cOrgMessage & mess);
+  static bool CB_InjectParasite(cPopulation * pop, int cell_id, cOrganism * parent,
+				const cGenome & injected_code);
 };
 
 #endif
Index: avida/current/source/main/genebank.cc
diff -u avida/current/source/main/genebank.cc:1.30 avida/current/source/main/genebank.cc:1.30.2.1
--- avida/current/source/main/genebank.cc:1.30	Sat May 17 02:48:08 2003
+++ avida/current/source/main/genebank.cc	Tue Aug 19 12:34:20 2003
@@ -716,8 +716,8 @@
     if (genotype_dom_time == cConfig::GetGenotypePrintDom()) {
       cString filename;
       filename.Set("genebank/%s", best_genotype->GetName()());
-      cTestUtil::PrintGenome(best_genotype->GetGenome(), filename,
-			     best_genotype, stats.GetUpdate());
+      cTestUtil::PrintGenome(best_genotype->GetGenome(), 
+			     filename, best_genotype, stats.GetUpdate());
     }
   }
 }
Index: avida/current/source/main/main_sub.pri
diff -u avida/current/source/main/main_sub.pri:1.4 avida/current/source/main/main_sub.pri:1.4.2.1
--- avida/current/source/main/main_sub.pri:1.4	Tue May 20 07:22:30 2003
+++ avida/current/source/main/main_sub.pri	Tue Aug 19 12:34:21 2003
@@ -12,6 +12,8 @@
              $$MAIN_HH/genome.hh \
              $$MAIN_HH/genome_util.hh \
              $$MAIN_HH/genotype.hh \
+	     $$MAIN_HH/inject_genotype.hh \
+	     $$MAIN_HH/inject_genebank.hh \
              $$MAIN_HH/inst.hh \
              $$MAIN_HH/inst_lib.hh \
              $$MAIN_HH/inst_set.hh \
@@ -48,6 +50,8 @@
              $$MAIN_CC/inst.cc \
              $$MAIN_CC/inst_set.cc \
              $$MAIN_CC/inst_util.cc \
+	     $$MAIN_CC/inject_genebank.cc \
+	     $$MAIN_CC/inject_genotype.cc \
              $$MAIN_CC/landscape.cc \
              $$MAIN_CC/lineage.cc \
              $$MAIN_CC/lineage_control.cc \
Index: avida/current/source/main/organism.cc
diff -u avida/current/source/main/organism.cc:1.23.2.1 avida/current/source/main/organism.cc:1.23.2.2
--- avida/current/source/main/organism.cc:1.23.2.1	Tue Aug 19 10:49:29 2003
+++ avida/current/source/main/organism.cc	Tue Aug 19 12:34:21 2003
@@ -10,7 +10,6 @@
 
 #include "../tools/functions.hh"
 #include "../tools/tArray.hh"
-//#include "../tools/message.hh"
 
 #include "config.hh"
 #include "inst_set.hh"
@@ -18,6 +17,7 @@
 #include "genome.hh"
 #include "genome_util.hh"
 #include "org_message.hh"
+#include "../main/inject_genotype.hh"
 
 #include "../cpu/cpu_defs.hh"
 #include "../cpu/hardware_base.hh"
@@ -116,6 +116,36 @@
 {
   inbox.Add(mess);
   return true;
+}
+
+bool cOrganism::InjectParasite(const cGenome & injected_code)
+{
+  return pop_interface.InjectParasite(this, injected_code);
+}
+
+bool cOrganism::InjectHost(const cCodeLabel & label, const cGenome & injected_code)
+{
+  return hardware->InjectHost(label, injected_code);
+}
+
+void cOrganism::AddParasite(cInjectGenotype * in_genotype)
+{
+  parasites.push_back(in_genotype);
+}
+
+cInjectGenotype & cOrganism::GetParasite(int x)
+{
+  return *parasites[x];
+}
+
+int cOrganism::GetNumParasites()
+{
+  return parasites.size();
+}
+
+void cOrganism::ClearParasites()
+{
+  parasites.clear();
 }
 
 int cOrganism::OK()
Index: avida/current/source/main/organism.hh
diff -u avida/current/source/main/organism.hh:1.21.2.1 avida/current/source/main/organism.hh:1.21.2.2
--- avida/current/source/main/organism.hh:1.21.2.1	Tue Aug 19 10:49:29 2003
+++ avida/current/source/main/organism.hh	Tue Aug 19 12:34:21 2003
@@ -9,10 +9,12 @@
 #define ORGANISM_HH
 
 #include <fstream>
+#include <deque>
 
 #include "../tools/merit.hh"
 #include "../tools/tBuffer.hh"
 #include "../tools/string.hh"
+#include "../tools/tList.hh"
 
 #include "../defs.hh"
 
@@ -20,6 +22,7 @@
 #include "mutations.hh"
 #include "pop_interface.hh"
 #include "phenotype.hh"
+//#include "../main/inject_genotype.hh"
 
 #include "../cpu/cpu_memory.hh"
 #include "../cpu/cpu_stats.hh"
@@ -30,6 +33,7 @@
 class cLineage;
 class cPopulation;
 class cOrgMessage;
+class cInjectGenotype;
 
 /**
  * The cOrganism class controls the running and manages all the statistics
@@ -42,7 +46,8 @@
   cGenotype * genotype;      // Information about organisms with this genome.
   cPhenotype phenotype;      // Descriptive attributes of organism.
   const cGenome initial_genome;        // Initial genome; can never be changed!
-
+  std::deque<cInjectGenotype *> parasites; // List of all parasites associated with
+                                    // this organism.
   cMutationRates mut_rates;            // Rate of all possible mutations.
   cLocalMutations mut_info;            // Info about possible mutations;
   cPopulationInterface pop_interface;  // Interface back to the population.
@@ -98,6 +103,13 @@
   void SendMessage(cOrgMessage & mess);
   bool ReceiveMessage(cOrgMessage & mess);
 
+  bool InjectParasite(const cGenome & genome);
+  bool InjectHost(const cCodeLabel & in_label, const cGenome & genome);
+  void AddParasite(cInjectGenotype * cur);
+  cInjectGenotype & GetParasite(int x);
+  int GetNumParasites();
+  void ClearParasites();
+		      
   int OK();
 
   double GetTestFitness();
@@ -158,12 +170,8 @@
   const cPopulationInterface & PopInterface() const { return pop_interface; }
   cPopulationInterface & PopInterface() { return pop_interface; }
   
-  // yes, this is a huge hack, but a lot of code uses the 
-  // original GetGenome() call - law 
-  //const tArray<cGenome> & GetGenomeArray() const;
   const cGenome & GetGenome() const { return initial_genome; }
-  //const tArray<cGenome> & GetGenome4Stack() const;
-
+  
   int GetCurGestation() const;
   const cPhenotype & GetPhenotype() const { return phenotype; }
   cPhenotype & GetPhenotype() { return phenotype; }
Index: avida/current/source/main/pop_interface.cc
diff -u avida/current/source/main/pop_interface.cc:1.11.2.1 avida/current/source/main/pop_interface.cc:1.11.2.2
--- avida/current/source/main/pop_interface.cc:1.11.2.1	Tue Aug 19 10:49:29 2003
+++ avida/current/source/main/pop_interface.cc	Tue Aug 19 12:34:21 2003
@@ -33,6 +33,7 @@
   , fun_update_resources(NULL)
   , fun_kill_cell(NULL)
     , fun_send_message(NULL)
+    , fun_inject_parasite(NULL)
 {
 }
 
@@ -59,6 +60,7 @@
   fun_update_resources = in_interface.fun_update_resources;
   fun_kill_cell        = in_interface.fun_kill_cell;
   fun_send_message     = in_interface.fun_send_message;
+  fun_inject_parasite  = in_interface.fun_inject_parasite;
 }
 
 cHardwareBase * cPopulationInterface::NewHardware(cOrganism * owner)
@@ -161,7 +163,6 @@
   (*fun_update_resources)(population, cell_id, res_change);
 }
 
-
 void cPopulationInterface::Die()
 {
   if (fun_kill_cell == NULL) return;
@@ -172,4 +173,11 @@
 {
   if (fun_send_message == NULL) return false;
   return (*fun_send_message)(population, cell_id, mess);
+}
+
+bool cPopulationInterface::InjectParasite(cOrganism * parent, 
+					  const cGenome & injected_code)
+{
+  if (fun_inject_parasite == NULL) return false;
+  return (*fun_inject_parasite)(population, cell_id, parent, injected_code);
 }
Index: avida/current/source/main/pop_interface.hh
diff -u avida/current/source/main/pop_interface.hh:1.9.2.1 avida/current/source/main/pop_interface.hh:1.9.2.2
--- avida/current/source/main/pop_interface.hh:1.9.2.1	Tue Aug 19 10:49:29 2003
+++ avida/current/source/main/pop_interface.hh	Tue Aug 19 12:34:21 2003
@@ -18,6 +18,7 @@
 class cOrganism;
 class cPopulation;
 class cOrgMessage;
+class cCodeLabel;
 
 typedef cHardwareBase * (*tFunNewHardware)(cPopulation *pop, cOrganism *owner);
 typedef void (*tFunRecycle)(cHardwareBase * out_hardware);
@@ -39,6 +40,8 @@
   (cPopulation * pop, int cell_id, const tArray<double> & res_change);
 typedef void (*tFunKillCell)(cPopulation * pop, int death_id);
 typedef bool (*tFunSendMessage)(cPopulation * pop, int cell_id, cOrgMessage & mess);
+typedef bool (*tFunInjectParasite)
+  (cPopulation * pop, int cell_id, cOrganism * parent, const cGenome & injected_code);
 
 class cPopulationInterface {
 private:
@@ -62,6 +65,7 @@
   tFunUpdateResources  fun_update_resources;
   tFunKillCell         fun_kill_cell;
   tFunSendMessage      fun_send_message;
+  tFunInjectParasite   fun_inject_parasite;
 public:
   cPopulationInterface();
   ~cPopulationInterface();
@@ -90,6 +94,7 @@
     { fun_update_resources = fun; }
   void SetFun_KillCell(tFunKillCell fun) { fun_kill_cell = fun; }
   void SetFun_SendMessage(tFunSendMessage fun) { fun_send_message = fun; }
+  void SetFun_InjectParasite(tFunInjectParasite fun) { fun_inject_parasite = fun; }
   void CopyCallbacks(cPopulationInterface & in_interface);
 
   // Activate callbacks...
@@ -110,6 +115,7 @@
   void UpdateResources(const tArray<double> & res_change);
   void Die();
   bool SendMessage(cOrgMessage & mess);
+  bool InjectParasite(cOrganism * parent, const cGenome & injected_code);
 };
 
 #endif
Index: avida/current/source/main/population.cc
diff -u avida/current/source/main/population.cc:1.109.2.1 avida/current/source/main/population.cc:1.109.2.2
--- avida/current/source/main/population.cc:1.109.2.1	Tue Aug 19 10:49:29 2003
+++ avida/current/source/main/population.cc	Tue Aug 19 12:34:21 2003
@@ -20,6 +20,8 @@
 #include "genebank.hh"
 #include "genome_util.hh"
 #include "genotype.hh"
+#include "inject_genebank.hh"
+#include "inject_genotype.hh"
 #include "inst_util.hh"
 #include "lineage.hh"
 #include "lineage_control.hh"
@@ -33,6 +35,7 @@
 #include "../cpu/hardware_base.hh"
 #include "../cpu/hardware_factory.hh"
 #include "../cpu/hardware_util.hh"
+#include "../cpu/hardware_4stack.hh"
 
 
 using namespace std;
@@ -51,6 +54,7 @@
 
   // Setup the genebank.
   genebank = new cGenebank(stats);
+  inject_genebank = new cInjectGenebank(stats);
 
   // are we logging lineages?
   if (cConfig::GetLogLineages()) {
@@ -231,6 +235,7 @@
 
   if ( lineage_control != NULL ) delete lineage_control;
   delete genebank;
+  delete inject_genebank;
   delete schedule;
 }
 
@@ -341,6 +346,100 @@
   return parent_alive;
 }
 
+bool cPopulation::ActivateInject(cOrganism & parent, const cGenome & injected_code)
+{
+  assert(&parent != NULL);
+  
+  if(injected_code.GetSize() ==0)
+    return false;
+
+  cHardware4Stack & parent_cpu = (cHardware4Stack &) parent.GetHardware();
+  cInjectGenotype * parent_genotype = parent_cpu.GetThreadOwner();
+  
+  const int parent_id = parent.PopInterface().GetCellID();
+  assert(parent_id >= 0 && parent_id < cell_array.GetSize());
+  cPopulationCell & parent_cell = cell_array[ parent_id ];
+
+  int num_neighbors = parent.GetNeighborhoodSize();
+  cOrganism * target_organism = 
+    parent_cell.connection_list.GetPos(g_random.GetUInt(num_neighbors))->GetOrganism();
+
+  if(target_organism==NULL)
+    return false;
+
+  cHardware4Stack & child_cpu = (cHardware4Stack &) target_organism->GetHardware();
+  
+  if(child_cpu.GetNumThreads()==cConfig::GetMaxCPUThreads())
+    return false;
+
+  cInjectGenotype * child_genotype = parent_genotype;
+
+  if(target_organism->InjectHost(parent_cpu.GetLabel(), injected_code)) {
+    // If the parent genotype is not correct for the child, adjust it.
+    if (parent_genotype == NULL || !(parent_genotype->GetGenome() == injected_code)) {
+      child_genotype = inject_genebank->AddInjectGenotype(injected_code, parent_genotype);
+    }
+    
+    target_organism->AddParasite(child_genotype);
+    child_genotype->AddParasite();
+    //if(parent_genotype!=NULL)
+    //  parent_genotype->RemoveParasite();
+    inject_genebank->AdjustInjectGenotype(*child_genotype);
+  }
+  else
+    return false;
+
+  return true;
+
+  // And set the genotype now that we know it.
+  //child_array[i]->SetGenotype(child_genotype);
+  //parent_genotype->SetBreedStats(*child_genotype);
+  
+  // We want to make sure that the child's genotype is not deleted from the
+  // genebank before the child is placed.
+  //child_genotype->IncDeferAdjust();
+  
+  // **THIS WILL BE NECESSARY IF/WHEN WE IMPLEMENT PARASITE LINEAGES.**
+  // Do lineage tracking for the new creature, if necessary.  Must occur
+  // before old organism is removed.
+  //LineageSetupOrganism( child_array[i], parent_organism.GetLineage(),
+  //			  parent_organism.GetLineageLabel(), parent_genotype );
+  
+  // **THIS WILL BE NECESSARY ONCE WE IMPLEMENT PARASITE MUTATION RATES.**
+  //child_array[i]->MutationRates().
+  //  Copy(GetCell(target_cells[i]).MutationRates());
+  
+  // Do any statistics on the parent that just gave birth...
+  //parent_genotype->AddGestationTime( parent_phenotype.GetGestationTime() );
+  //parent_genotype->AddFitness(       parent_phenotype.GetFitness()       );
+  //parent_genotype->AddMerit(         parent_phenotype.GetMerit()         );
+  //parent_genotype->AddCopiedSize(    parent_phenotype.GetCopiedSize()    );
+  //parent_genotype->AddExecutedSize(  parent_phenotype.GetExecutedSize()  );
+
+  // Place all of the offspring...
+  /*for (int i = 0; i < child_array.GetSize(); i++) {
+    ActivateOrganism(child_array[i], GetCell(target_cells[i]));
+    cGenotype * child_genotype = child_array[i]->GetGenotype();
+    child_genotype->DecDeferAdjust();
+    genebank->AdjustGenotype(*child_genotype);
+    }*/
+}
+
+bool cPopulation::ActivateInject(const int cell_id, const cGenome & injected_code)
+{
+  cInjectGenotype * child_genotype = inject_genebank->AddInjectGenotype(injected_code);
+
+  if(cell_array[cell_id].GetOrganism()->InjectHost(cCodeLabel(), injected_code))
+    {
+      cell_array[cell_id].GetOrganism()->AddParasite(child_genotype);
+      child_genotype->AddParasite();
+      inject_genebank->AdjustInjectGenotype(*child_genotype);
+    }
+  else
+    return false;
+
+  return true;
+}
 
 void cPopulation::ActivateOrganism(cOrganism * in_organism,
 				   cPopulationCell & target_cell)
@@ -397,7 +496,6 @@
 		      in_organism->GetPhenotype().ParentTrue());
 }
 
-
 void cPopulation::KillOrganism(cPopulationCell & in_cell)
 {
   // do we actually have something to kill?
@@ -420,11 +518,15 @@
   // Do statistics
   num_organisms--;
 
-  if (organism->GetPhenotype().IsParasite() == true) {
-    genotype->AddParasite();
-  }
+  //if (organism->GetPhenotype().IsParasite() == true) {
+  //  genotype->AddParasite();
+  //}
   genotype->RemoveOrganism();
-
+  
+  for(int i=0; i<organism->GetNumParasites(); i++) {
+    organism->GetParasite(i).RemoveParasite();
+  }
+      
   // And clear it!
   in_cell.RemoveOrganism();
   delete organism;
@@ -436,7 +538,6 @@
   genebank->AdjustGenotype(*genotype);
 }
 
-
 /**
  * This function is responsible for adding an organism to a given lineage,
  * and setting the organism's lineage label and the lineage pointer.
@@ -1146,12 +1247,11 @@
   }
   else
     {
-      GetCell(cell_id).GetOrganism()->GetHardware().Inject_Host(cCodeLabel(), genome);
+      ActivateInject(cell_id, genome);
     }
       
 }
 
-
 cPopulationCell & cPopulation::GetCell(int in_num)
 {
   return cell_array[in_num];
@@ -1354,4 +1454,25 @@
     transfer_pool[j] = transfer_pool.back();
     transfer_pool.pop_back();
   }
+}
+
+void cPopulation::ParasiteDebug()
+{
+  ofstream outfile;
+  outfile.open("debug.out", ofstream::app);
+  outfile << stats.GetUpdate() << endl;
+  int total=0;
+  for(int x=0; x<cell_array.GetSize(); x++)
+    {
+      if(cell_array[x].GetOrganism()!=NULL)
+	{
+	  assert(cell_array[x].GetOrganism()->GetNumParasites()>=0 && 
+		 cell_array[x].GetOrganism()->GetNumParasites()<=1);
+	  total+=cell_array[x].GetOrganism()->GetNumParasites();
+	  if(cell_array[x].GetOrganism()->GetNumParasites())
+	    outfile << x << " ";
+	}
+    }
+  outfile << endl << total << endl;
+  outfile.close();
 }
Index: avida/current/source/main/population.hh
diff -u avida/current/source/main/population.hh:1.55.2.1 avida/current/source/main/population.hh:1.55.2.2
--- avida/current/source/main/population.hh:1.55.2.1	Tue Aug 19 10:49:29 2003
+++ avida/current/source/main/population.hh	Tue Aug 19 12:34:21 2003
@@ -26,6 +26,7 @@
 class cGenebank;
 class cGenome;
 class cGenotype;
+class cInjectGenebank;
 class cLineage;
 class cLineageControl;
 class cOrganism;
@@ -33,7 +34,6 @@
 class sReproData;
 class cSchedule;
 
-
 class cPopulation {
 private:
   // Components...
@@ -45,6 +45,7 @@
   // Data Tracking...
   cStats stats;                      // Main statistics object...
   cGenebank * genebank;                // Tracks genotypes
+  cInjectGenebank * inject_genebank;   // Tracks all injected code
   cLineageControl * lineage_control;   // Tracks Linages
   tList<cPopulationCell> reaper_queue; // Death order in some mass-action runs
 
@@ -100,7 +101,10 @@
   // Activate the offspring of an organism in the population
   bool ActivateOffspring(cGenome & child_genome, cOrganism & parent_organism);
 
-  // Inject and organism from the outside world.
+  bool ActivateInject(cOrganism & parent, const cGenome & injected_code);
+  bool ActivateInject(const int cell_id, const cGenome & injected_code);
+
+  // Inject an organism from the outside world.
   void Inject(const cGenome & genome, int cell_id=-1, double merit=-1,
 	      int lineage_label=0, double neutral_metric=0, int mem_space=0 );
 
@@ -149,12 +153,14 @@
 
   cStats & GetStats() { return stats; }
   cGenebank & GetGenebank() { return *genebank; }
+  cInjectGenebank & GetInjectGenebank() { return *inject_genebank; }
   cLineageControl * GetLineageControl() { return lineage_control; }
   cEnvironment & GetEnvironment() { return environment; }
   int GetNumOrganisms() { return num_organisms; }
 
   bool GetSyncEvents() { return sync_events; }
   void SetSyncEvents(bool _in) { sync_events = _in; }
+  void ParasiteDebug();
 };
 
 #endif
Index: avida/current/source/qt-viewer/population_cell_wrapper.hh
diff -u avida/current/source/qt-viewer/population_cell_wrapper.hh:1.4.2.2 avida/current/source/qt-viewer/population_cell_wrapper.hh:1.4.2.3
--- avida/current/source/qt-viewer/population_cell_wrapper.hh:1.4.2.2	Tue Aug 19 10:49:30 2003
+++ avida/current/source/qt-viewer/population_cell_wrapper.hh	Tue Aug 19 12:34:22 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.2.2 2003/08/19 17:49:30 goingssh Exp $
+ * @version $Id: population_cell_wrapper.hh,v 1.4.2.3 2003/08/19 19:34:22 goingssh Exp $
  * @see avd_CellViewListItem
  * @see avd_WidgetListItem
  * @see avd_WidgetList
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.2.2 avida/current/source/qt-viewer/exp/avd_widget_list.hh:1.6.2.3
--- avida/current/source/qt-viewer/exp/avd_widget_list.hh:1.6.2.2	Tue Aug 19 10:49:30 2003
+++ avida/current/source/qt-viewer/exp/avd_widget_list.hh	Tue Aug 19 12:34:22 2003
@@ -37,7 +37,7 @@
  * its subclasses.
  *
  * @short A scrollable collapsible container of other widgets.
- * @version $Id: avd_widget_list.hh,v 1.6.2.2 2003/08/19 17:49:30 goingssh Exp $
+ * @version $Id: avd_widget_list.hh,v 1.6.2.3 2003/08/19 19:34:22 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.2.2 avida/current/source/qt-viewer/exp/avd_widget_list_item.hh:1.5.2.3
--- avida/current/source/qt-viewer/exp/avd_widget_list_item.hh:1.5.2.2	Tue Aug 19 10:49:31 2003
+++ avida/current/source/qt-viewer/exp/avd_widget_list_item.hh	Tue Aug 19 12:34:22 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.2.2 2003/08/19 17:49:31 goingssh Exp $
+ * @version $Id: avd_widget_list_item.hh,v 1.5.2.3 2003/08/19 19:34:22 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.2.2 avida/current/source/qt-viewer/exp/avd_widget_list_item_container.hh:1.5.2.3
--- avida/current/source/qt-viewer/exp/avd_widget_list_item_container.hh:1.5.2.2	Tue Aug 19 10:49:31 2003
+++ avida/current/source/qt-viewer/exp/avd_widget_list_item_container.hh	Tue Aug 19 12:34:22 2003
@@ -20,7 +20,7 @@
  * vertical layout.
  *
  * @short Part of the avd_WidgetListItem.
- * @version $Id: avd_widget_list_item_container.hh,v 1.5.2.2 2003/08/19 17:49:31 goingssh Exp $
+ * @version $Id: avd_widget_list_item_container.hh,v 1.5.2.3 2003/08/19 19:34:22 goingssh Exp $
  * @see avd_WidgetListItem
  * @see avd_WidgetList
  */
Index: avida/current/source/support/Makefile.am
diff -u avida/current/source/support/Makefile.am:1.10.2.1 avida/current/source/support/Makefile.am:1.10.2.2
--- avida/current/source/support/Makefile.am:1.10.2.1	Fri May 23 12:05:38 2003
+++ avida/current/source/support/Makefile.am	Tue Aug 19 12:34:23 2003
@@ -4,7 +4,9 @@
 	events.cfg \
 	genesis \
 	inst_set.default \
-	organism.default 
+	organism.default \
+	inst_set.4stack \
+	genesis.4stack
 
 SUBDIRS = preset_organisms
 
Index: avida/current/source/support/preset_organisms/Makefile.am
diff -u avida/current/source/support/preset_organisms/Makefile.am:1.1.4.1 avida/current/source/support/preset_organisms/Makefile.am:1.1.4.2
--- avida/current/source/support/preset_organisms/Makefile.am:1.1.4.1	Fri May 23 12:05:38 2003
+++ avida/current/source/support/preset_organisms/Makefile.am	Tue Aug 19 12:34:23 2003
@@ -1,6 +1,8 @@
 
 presetsdir = $(datadir)/preset_organisms
 
-presets_DATA = dummy
+presets_DATA = dummy \
+	organism.4stack \
+	organism.parasite
 
 EXTRA_DIST = $(presets_DATA)
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.2.2 avida/current/source/third-party/trio-1.9/example.c:1.3.2.3
--- avida/current/source/third-party/trio-1.9/example.c:1.3.2.2	Tue Aug 19 10:49:31 2003
+++ avida/current/source/third-party/trio-1.9/example.c	Tue Aug 19 12:34:23 2003
@@ -32,7 +32,7 @@
 # define LONGEST LONGLONG
 #endif
 
-static TRIO_CONST char rcsid[] = "@(#)$Id: example.c,v 1.3.2.2 2003/08/19 17:49:31 goingssh Exp $";
+static TRIO_CONST char rcsid[] = "@(#)$Id: example.c,v 1.3.2.3 2003/08/19 19:34:23 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.2.2 avida/current/source/third-party/trio-1.9/regression.c:1.3.2.3
--- avida/current/source/third-party/trio-1.9/regression.c:1.3.2.2	Tue Aug 19 10:49:31 2003
+++ avida/current/source/third-party/trio-1.9/regression.c	Tue Aug 19 12:34:23 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.2.2 2003/08/19 17:49:31 goingssh Exp $";
+static TRIO_CONST char rcsid[] = "@(#)$Id: regression.c,v 1.3.2.3 2003/08/19 19:34:23 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.2.2 avida/current/source/third-party/trio-1.9/strio.h:1.3.2.3
--- avida/current/source/third-party/trio-1.9/strio.h:1.3.2.2	Tue Aug 19 10:49:31 2003
+++ avida/current/source/third-party/trio-1.9/strio.h	Tue Aug 19 12:34:23 2003
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * $Id: strio.h,v 1.3.2.2 2003/08/19 17:49:31 goingssh Exp $
+ * $Id: strio.h,v 1.3.2.3 2003/08/19 19:34:23 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.2.2 avida/current/source/third-party/trio-1.9/trio.c:1.4.2.3
--- avida/current/source/third-party/trio-1.9/trio.c:1.4.2.2	Tue Aug 19 10:49:31 2003
+++ avida/current/source/third-party/trio-1.9/trio.c	Tue Aug 19 12:34:23 2003
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * $Id: trio.c,v 1.4.2.2 2003/08/19 17:49:31 goingssh Exp $
+ * $Id: trio.c,v 1.4.2.3 2003/08/19 19:34:23 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.2.2 2003/08/19 17:49:31 goingssh Exp $";
+static TRIO_CONST char rcsid[] = "@(#)$Id: trio.c,v 1.4.2.3 2003/08/19 19:34:23 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.2.2 avida/current/source/third-party/trio-1.9/trio.h:1.3.2.3
--- avida/current/source/third-party/trio-1.9/trio.h:1.3.2.2	Tue Aug 19 10:49:31 2003
+++ avida/current/source/third-party/trio-1.9/trio.h	Tue Aug 19 12:34:24 2003
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * $Id: trio.h,v 1.3.2.2 2003/08/19 17:49:31 goingssh Exp $
+ * $Id: trio.h,v 1.3.2.3 2003/08/19 19:34:24 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.2.2 avida/current/source/third-party/trio-1.9/triodef.h:1.4.2.3
--- avida/current/source/third-party/trio-1.9/triodef.h:1.4.2.2	Tue Aug 19 10:49:31 2003
+++ avida/current/source/third-party/trio-1.9/triodef.h	Tue Aug 19 12:34:24 2003
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * $Id: triodef.h,v 1.4.2.2 2003/08/19 17:49:31 goingssh Exp $
+ * $Id: triodef.h,v 1.4.2.3 2003/08/19 19:34:24 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.2.2 avida/current/source/third-party/trio-1.9/trionan.c:1.4.2.3
--- avida/current/source/third-party/trio-1.9/trionan.c:1.4.2.2	Tue Aug 19 10:49:31 2003
+++ avida/current/source/third-party/trio-1.9/trionan.c	Tue Aug 19 12:34:24 2003
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * $Id: trionan.c,v 1.4.2.2 2003/08/19 17:49:31 goingssh Exp $
+ * $Id: trionan.c,v 1.4.2.3 2003/08/19 19:34:24 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.2.2 2003/08/19 17:49:31 goingssh Exp $";
+static TRIO_CONST char rcsid[] = "@(#)$Id: trionan.c,v 1.4.2.3 2003/08/19 19:34:24 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.2.2 avida/current/source/third-party/trio-1.9/trionan.h:1.3.2.3
--- avida/current/source/third-party/trio-1.9/trionan.h:1.3.2.2	Tue Aug 19 10:49:31 2003
+++ avida/current/source/third-party/trio-1.9/trionan.h	Tue Aug 19 12:34:24 2003
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * $Id: trionan.h,v 1.3.2.2 2003/08/19 17:49:31 goingssh Exp $
+ * $Id: trionan.h,v 1.3.2.3 2003/08/19 19:34:24 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.2.2 avida/current/source/third-party/trio-1.9/triop.h:1.3.2.3
--- avida/current/source/third-party/trio-1.9/triop.h:1.3.2.2	Tue Aug 19 10:49:31 2003
+++ avida/current/source/third-party/trio-1.9/triop.h	Tue Aug 19 12:34:24 2003
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * $Id: triop.h,v 1.3.2.2 2003/08/19 17:49:31 goingssh Exp $
+ * $Id: triop.h,v 1.3.2.3 2003/08/19 19:34:24 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.2.2 avida/current/source/third-party/trio-1.9/triostr.c:1.4.2.3
--- avida/current/source/third-party/trio-1.9/triostr.c:1.4.2.2	Tue Aug 19 10:49:31 2003
+++ avida/current/source/third-party/trio-1.9/triostr.c	Tue Aug 19 12:34:24 2003
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * $Id: triostr.c,v 1.4.2.2 2003/08/19 17:49:31 goingssh Exp $
+ * $Id: triostr.c,v 1.4.2.3 2003/08/19 19:34:24 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.2.2 2003/08/19 17:49:31 goingssh Exp $";
+static TRIO_CONST char rcsid[] = "@(#)$Id: triostr.c,v 1.4.2.3 2003/08/19 19:34:24 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.2.2 avida/current/source/third-party/trio-1.9/triostr.h:1.3.2.3
--- avida/current/source/third-party/trio-1.9/triostr.h:1.3.2.2	Tue Aug 19 10:49:31 2003
+++ avida/current/source/third-party/trio-1.9/triostr.h	Tue Aug 19 12:34:24 2003
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * $Id: triostr.h,v 1.3.2.2 2003/08/19 17:49:31 goingssh Exp $
+ * $Id: triostr.h,v 1.3.2.3 2003/08/19 19:34:24 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.2.2 avida/current/source/third-party/trio-1.9/doc/doc.h:1.3.2.3
--- avida/current/source/third-party/trio-1.9/doc/doc.h:1.3.2.2	Tue Aug 19 10:49:31 2003
+++ avida/current/source/third-party/trio-1.9/doc/doc.h	Tue Aug 19 12:34:25 2003
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * $Id: doc.h,v 1.3.2.2 2003/08/19 17:49:31 goingssh Exp $
+ * $Id: doc.h,v 1.3.2.3 2003/08/19 19:34:25 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.2.2 avida/current/source/third-party/trio-1.9/doc/doc_dynamic.h:1.3.2.3
--- avida/current/source/third-party/trio-1.9/doc/doc_dynamic.h:1.3.2.2	Tue Aug 19 10:49:31 2003
+++ avida/current/source/third-party/trio-1.9/doc/doc_dynamic.h	Tue Aug 19 12:34:25 2003
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * $Id: doc_dynamic.h,v 1.3.2.2 2003/08/19 17:49:31 goingssh Exp $
+ * $Id: doc_dynamic.h,v 1.3.2.3 2003/08/19 19:34:25 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.2.2 avida/current/source/third-party/trio-1.9/doc/doc_printf.h:1.3.2.3
--- avida/current/source/third-party/trio-1.9/doc/doc_printf.h:1.3.2.2	Tue Aug 19 10:49:31 2003
+++ avida/current/source/third-party/trio-1.9/doc/doc_printf.h	Tue Aug 19 12:34:25 2003
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * $Id: doc_printf.h,v 1.3.2.2 2003/08/19 17:49:31 goingssh Exp $
+ * $Id: doc_printf.h,v 1.3.2.3 2003/08/19 19:34:25 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.2.2 avida/current/source/third-party/trio-1.9/doc/doc_register.h:1.3.2.3
--- avida/current/source/third-party/trio-1.9/doc/doc_register.h:1.3.2.2	Tue Aug 19 10:49:31 2003
+++ avida/current/source/third-party/trio-1.9/doc/doc_register.h	Tue Aug 19 12:34:25 2003
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * $Id: doc_register.h,v 1.3.2.2 2003/08/19 17:49:31 goingssh Exp $
+ * $Id: doc_register.h,v 1.3.2.3 2003/08/19 19:34:25 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.2.2 avida/current/source/third-party/trio-1.9/doc/doc_scanf.h:1.3.2.3
--- avida/current/source/third-party/trio-1.9/doc/doc_scanf.h:1.3.2.2	Tue Aug 19 10:49:31 2003
+++ avida/current/source/third-party/trio-1.9/doc/doc_scanf.h	Tue Aug 19 12:34:25 2003
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * $Id: doc_scanf.h,v 1.3.2.2 2003/08/19 17:49:31 goingssh Exp $
+ * $Id: doc_scanf.h,v 1.3.2.3 2003/08/19 19:34:25 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.2.2 avida/current/source/third-party/trio-1.9/doc/doc_static.h:1.3.2.3
--- avida/current/source/third-party/trio-1.9/doc/doc_static.h:1.3.2.2	Tue Aug 19 10:49:31 2003
+++ avida/current/source/third-party/trio-1.9/doc/doc_static.h	Tue Aug 19 12:34:25 2003
@@ -1,6 +1,6 @@
 /*************************************************************************
  *
- * $Id: doc_static.h,v 1.3.2.2 2003/08/19 17:49:31 goingssh Exp $
+ * $Id: doc_static.h,v 1.3.2.3 2003/08/19 19:34:25 goingssh Exp $
  *
  * Copyright (C) 2001 Bjorn Reese and Daniel Stenberg.
  *
Index: avida/current/source/viewers/symbol_util.cc
diff -u avida/current/source/viewers/symbol_util.cc:1.4.2.1 avida/current/source/viewers/symbol_util.cc:1.4.2.2
--- avida/current/source/viewers/symbol_util.cc:1.4.2.1	Tue Aug 19 10:50:16 2003
+++ avida/current/source/viewers/symbol_util.cc	Tue Aug 19 12:34:25 2003
@@ -50,8 +50,8 @@
   // 'B' = Both         '-' = Neither
 
   if (modifier == true && modified == true)  return 'B';
-  if (modifier == true) return 'I';
-  if (modified == true) return 'H';
+  if (modifier == true) return 'I'-6;
+  if (modified == true) return 'H'-6;
   return '-';
 }
 
Index: avida/current/source/viewers/text_screen.hh
diff -u avida/current/source/viewers/text_screen.hh:1.10.2.1 avida/current/source/viewers/text_screen.hh:1.10.2.2
--- avida/current/source/viewers/text_screen.hh:1.10.2.1	Tue Aug 19 10:50:16 2003
+++ avida/current/source/viewers/text_screen.hh	Tue Aug 19 12:34:25 2003
@@ -209,7 +209,7 @@
     break;
   case '0':
   default:
-    SetBoldColor(COLOR_OFF);
+    SetColor(COLOR_WHITE);
     break;
   }
 }


More information about the Avida-cvs mailing list