| 1 | #include "phylip.h" |
|---|
| 2 | |
|---|
| 3 | #define maxnodes 1200 |
|---|
| 4 | #define maxnch 30 |
|---|
| 5 | #define point '.' |
|---|
| 6 | #define minus '-' |
|---|
| 7 | #define stripewidth 3000L |
|---|
| 8 | #define maxstripedepth 3500 |
|---|
| 9 | #define fontsize 3800 |
|---|
| 10 | #define pi 3.141592653 |
|---|
| 11 | #define epsilon 0.00001 |
|---|
| 12 | #define ebcdic EBCDIC |
|---|
| 13 | #define segments 40 |
|---|
| 14 | #define xstart 10 |
|---|
| 15 | #define ystart 35 |
|---|
| 16 | #define LF 10 |
|---|
| 17 | #define CR 13 |
|---|
| 18 | #define escape (ebcdic ? '\'' : '\033') |
|---|
| 19 | #define null '\000' |
|---|
| 20 | |
|---|
| 21 | |
|---|
| 22 | typedef enum { treepen, labelpen} pentype; |
|---|
| 23 | typedef enum { lw,hp,tek,ibmpc,mac,houston, decregis,epson, oki,fig, |
|---|
| 24 | citoh,toshiba,pcx,pcl,pict,ray,xbm,other} plottertype; |
|---|
| 25 | |
|---|
| 26 | typedef enum { vertical, horizontal} growth; |
|---|
| 27 | typedef enum {cladogram,phenogram,curvogram,eurogram,swoopogram} treestyle; |
|---|
| 28 | typedef enum { penup,pendown} pensttstype; |
|---|
| 29 | |
|---|
| 30 | typedef Char plotstring[maxnch]; |
|---|
| 31 | typedef short fonttype[fontsize]; |
|---|
| 32 | typedef Char *striparray; |
|---|
| 33 | typedef striparray striptype[maxstripedepth]; |
|---|
| 34 | |
|---|
| 35 | typedef struct node { |
|---|
| 36 | struct node *next, *back; |
|---|
| 37 | boolean tip; |
|---|
| 38 | plotstring nayme; |
|---|
| 39 | long naymlength, tipsabove, index; |
|---|
| 40 | double xcoord,ycoord,oldlen,length, |
|---|
| 41 | r,theta,oldtheta,width,depth,tipdist,lefttheta,righttheta; |
|---|
| 42 | } node; |
|---|
| 43 | |
|---|
| 44 | struct LOC_plottext { /* Local variables for plottext: */ |
|---|
| 45 | double height, compress; |
|---|
| 46 | short *font; |
|---|
| 47 | short coord; |
|---|
| 48 | double heightfont, xfactor, yfactor, xfont, yfont, xplot, yplot, sinslope, |
|---|
| 49 | cosslope, xx, yy; |
|---|
| 50 | pensttstype penstatus; |
|---|
| 51 | } ; |
|---|
| 52 | |
|---|
| 53 | typedef struct colortype { |
|---|
| 54 | Char *name; |
|---|
| 55 | double red, green, blue; |
|---|
| 56 | } colortype; |
|---|
| 57 | |
|---|
| 58 | double lengthtext(); |
|---|
| 59 | |
|---|