home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / TIERRA40.ZIP / BEAGLE / PROTOB.H < prev    next >
C/C++ Source or Header  |  1992-09-11  |  7KB  |  188 lines

  1. /* protob.h  14-8-92  prototype file for the Beagle Explorer */
  2. /*** Beagle Explorer:  Copyright (c) 1992  Tom Ray ***/
  3.  
  4. #ifndef PROTOB_H
  5. #define PROTOB_H
  6.  
  7. /* bars.c  30-8-90  bar display for the Beagle Explorer */
  8.  
  9. int bars(void);
  10. int run_info_chk2(TRANSACTION  *tp);
  11. void run_info2(TRANSACTION  *tp);
  12. void species_array_setup(int  *tnum_sp);
  13. void get_total(char  *data);
  14. void bars_update(void);
  15. void barst_setup(void);
  16. int spcmp2(const void  *s1, const void  *s2);
  17. int spcmp3(const void  *s1, const void  *s2);
  18. void do_bupdate(void);
  19. void time_update(void);
  20. void bebar(void);
  21.  
  22. /* bdivers.c  28-11-91  diversity trace display for the Beagle Explorer */
  23.  
  24. int diverse(void);
  25. int dFieldSet(TRANSACTION  *tp);
  26. unsigned dKeySim(unsigned (*fp)(), TRANSACTION *tp);
  27. int RunInfoChk(TRANSACTION  *tp);
  28. void TracestSetup(void);
  29. void divers(void);
  30. void setranges(void);
  31. int setxy(char  s[]);
  32. double putout(int  s);
  33.  
  34. /* beagle.c  30-6-90  Exploratory program for the Tierra Simulator */
  35.  
  36. void main(void);
  37. void helpfn(MENUITEM  *item);
  38. void writehelp(char  *string);
  39.  
  40. /* bread.c  30-8-90  reads tierra.run data */
  41.  
  42. int t_read(char  data[], struct last_out  *lo, int  *first, int  *genotypes);
  43.  
  44. /* fragment.c  4-8-90  makes fragment of tierra.run */
  45.  
  46. int fragment(void);
  47. int temp_info_chk_f(TRANSACTION  *tp);
  48. void fragmen(char  *infile, char  *oufile, char  *directory, int  start,
  49.     int  stop);
  50. void CountTTree(struct tnode  *t, int  *num);
  51. void OutFragTree(struct tnode  *t, FILE  *ouf);
  52.  
  53. /* genework.c  30-6-90  */
  54.  
  55. int  find_next_use_template(Instruction  *pgene, int  start, int  tail_size,
  56.     int  *site, char  track);
  57. int  is_use_template(Instruction  *locus, char  track);
  58. int  get_template_size(Instruction  *locus, int  tail_size, char  track);
  59. char * inst_name(int  inst, char  *name);
  60. char inst_letter(int  inst);
  61. void unlap(char  track);
  62. void lineup(char  track);
  63. void comp_ins_del(void);
  64. int clear_conflicts(int  num);
  65. int idcmp(const void  *i1, const void  *i2);
  66. void judgement(int  num);
  67. struct insdel ins_del(int  i1, int  i2);
  68. struct insdel insert(int  p1, int  p2);
  69. struct insdel delete(int  p1, int  p2);
  70. int probefit(int  position, Instruction  *pprobe, int  psize,
  71.     Instruction  *pgene, int  gsize, char  track);
  72. void probeslide(Instruction  *pprobe, int  psize, Instruction  *pgene,
  73.     int  gsize, char  track);
  74. void instlist(void);
  75. FpInst get_gentype(char  genepath[], char  genefile[], char  genotype[]);
  76.  
  77. /* geniob.c   14-8-92 genebank input/output routines for Beagle */
  78.  
  79. head_t read_head(FILE  *fp);
  80. indx_t *read_indx(FILE  *fp, head_t  *head);
  81. I32s find_gen(indx_t  indx[], I8s  *gen, I32s  n);
  82. Pgl get_gen(FILE  *fp, head_t  *head, indx_t  *indxn, I32s  n);
  83. void WritEcoB(I32u  bits, I8s  *buf);
  84. void SetBit(I32u  *seed, I32u  bit, I32u  value);
  85. void GetAMap(I8s  data[85]);
  86. I16s aid_compare(ArgInstDef  *i, ArgInstDef  *j);
  87.  
  88. /* probe.c  30-6-90  genome probe for the Beagle Explorer */
  89.  
  90. int probe(void);
  91. int prob_info_chk(TRANSACTION  *tp);
  92. void prob(char  track);
  93. void pmatch(char  track);
  94. void plogical(int  size);
  95. int orcmp(const void  *g1, const void  *g2);
  96. int prcmp(const void  *g1, const void  *g2);
  97. int rprcmp(const void  *g1, const void  *g2);
  98.  
  99. /* template.c  29-11-91  template locator for the Beagle Explorer */
  100.  
  101. int template(void);
  102. int temp_info_chk(TRANSACTION  *tp);
  103. void templat(int  track);
  104. void logical(int  c);
  105.  
  106. /* tierun.c  4-8-90  makes run_info file for tierra.run, with genotypes */
  107.  
  108. int Lbl2Int(char  s[]);
  109. void Int2Lbl(int  i, char  s[]);
  110. int gtierunc(void);
  111. int temp_info_chk_g(TRANSACTION  *tp);
  112. void gtierun(void);
  113. struct tnode * AddTree(struct tnode  *p, struct last_out  *lo);
  114. struct snode * Tree2Tree(struct tnode  *t, struct snode  *s, int  index);
  115. struct snode * AddMaxTree(struct tnode  *t, int  index, struct snode  *s);
  116. void OutSearchTree(struct snode  *s, FILE  *ouf, int  *out_num, int  update);
  117. void CountTree(struct snode  *s, int  *num);
  118. void OutUpdate(struct snode  *s, FILE  *ouf, int  update);
  119. void FreeSTree(struct snode  *p);
  120. void FreeTTree(struct tnode  *p);
  121. struct tnode * oldPruneTree(struct tnode  *p, struct tnode  *root);
  122. void PruneTree(struct tnode  *p);
  123. struct tnode * AddPrunedTree(struct tnode  *r, struct tnode *p);
  124. struct tnode * DoUpdate(struct tnode  *p, int  update);
  125. struct tnode * AddFragTree(struct tnode *p, long size, char lbl[], long end);
  126. void ZeroTree(struct tnode  *p);
  127. void StartFragment(char  data[], struct last_out  *lo,
  128.     struct tnode  **uroot, struct tnode  **troot, int  c);
  129.  
  130. /* tools.c  21-3-92  tools for graphis and windows */
  131.  
  132. void grinit(char  path[]);
  133. void initerror(int  val);
  134. void grwisetup(char  path[]);
  135. int gr_chk(TRANSACTION  *tp);
  136. void resolutionn(void);
  137. void resolutions(void);
  138. void g_keyboard(void);
  139. int getkeystroke(void);
  140. void minmax(struct point  *p, struct xyrange  *r);
  141. struct point coords(struct point  *p);
  142. struct point rcoords(struct point  *p);
  143. struct point * fxy(struct point  *p);
  144. struct point rrotr(struct point  *xy);
  145. struct point rotr(struct point  *xy);
  146. void sline(struct point  *p);
  147. void cline(struct point  *p);
  148. void eline(struct point  *p);
  149. void putpoint(struct point  *p, int color);
  150. void charsiz(float xz, float yz);
  151. void labchr(struct point  *p, float xz, float yz, float an, char lc);
  152. void labstr(struct point  *p, float xz, float yz, float an, char lab[]);
  153. void curon(struct point  *p, int siz);
  154. void curof(struct point  *p, int siz);
  155. struct rect ptr(struct polar  *rth);
  156. struct polar rtp(struct rect  *xy);
  157. float redangle(float th);
  158. void ptro(float th, float r);
  159. void rtpo(float x, float y);
  160. float atanc(float y, float x);
  161. void wind_setup(void);
  162. HWND wigen(int rp, int cp, int rs, int cs, char frame[7], char title[80]);
  163. HWND wigenlp(int  row_pos, int  col_pos, int  row_siz_log, int  col_siz_log,
  164.     int  row_siz_phy, int  col_siz_phy, char  frame[7], char  title[80]);
  165. void wipak(int rp, int cp);
  166. void wiin(int x, int y);
  167. HWND wiinv(int x, int y, char  mes[80]);
  168. HWND wint(int x, int y, char  mes[80]);
  169. void wipw(int x, int y);
  170. void wiwait(int rp, int cp);
  171. void wiwaitm(int rp, int cp, char  mes[80]);
  172. void witest(int rp, int cp, int rs, int cs);
  173. void wierror(int rp, int cp, char  mes[80]);
  174. void nrerror(char  error_text[80]);
  175. void scroll(int  page, HWND  wi);
  176.  
  177. /* trace.c  30-8-90  trace display for the Beagle Explorer */
  178.  
  179. int trace(void);
  180. int FieldSet(TRANSACTION  *tp);
  181. unsigned KeySim(unsigned (*fp)(), TRANSACTION *tp);
  182. int run_info_chk(TRANSACTION  *tp);
  183. void run_info(TRANSACTION  *tp);
  184. void tracest_setup(void);
  185. void trac(void);
  186.  
  187. #endif /* PROTOB_H */
  188.