home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / CPROG / WINFRSRC.ZIP / FRACTINT.H < prev    next >
Text File  |  1990-11-03  |  18KB  |  533 lines

  1.  
  2. /* FRACTINT.H - common structures and values for the FRACTINT routines */
  3.  
  4. #define MAXPIXELS 2049        /* Maximum pixel count across/down the screen */
  5. #define SCREENASPECT 0.75    /* Assumed overall screen dimensions, y/x     */
  6.  
  7. struct videoinfo {        /* All we need to know about a Video Adapter */
  8.     char    name[26];    /* Adapter name (IBM EGA, etc)        */
  9.     char    comment[26];    /* Comments (UNTESTED, etc)        */
  10.     int    videomodeax;    /* begin with INT 10H, AX=(this)    */
  11.     int    videomodebx;    /*        ...and BX=(this)    */
  12.     int    videomodecx;    /*        ...and CX=(this)    */
  13.     int    videomodedx;    /*        ...and DX=(this)    */
  14.                 /* NOTE:  IF AX==BX==CX==0, SEE BELOW    */
  15.     int    dotmode;    /* video access method used by asm code */
  16.                 /*    1 == BIOS 10H, AH=12,13 (SLOW)    */
  17.                 /*    2 == access like EGA/VGA    */
  18.                 /*    3 == access like MCGA        */
  19.                 /*    4 == Tseng-like  SuperVGA*256    */
  20.                 /*    5 == P'dise-like SuperVGA*256   */
  21.                 /*    6 == Vega-like     SuperVGA*256    */
  22.                 /*    7 == "Tweaked" IBM-VGA ...*256  */
  23.                 /*    8 == "Tweaked" SuperVGA ...*256 */
  24.                 /*    9 == Targa Format        */
  25.                 /*    10 = Hercules            */
  26.                 /*    11 = "disk video" (no screen)   */
  27.                 /*    12 = 8514/A            */
  28.                 /*    13 = CGA 320x200x4, 640x200x2    */
  29.                 /*    14 = Tandy 1000         */
  30.                 /*    15 = TRIDENT  SuperVGA*256    */
  31.                 /*    16 = Chips&Tech SuperVGA*256    */
  32.     int    xdots;        /* number of dots across the screen    */
  33.     int    ydots;        /* number of dots down the screen    */
  34.     int    colors;     /* number of colors available        */
  35.     };
  36.  
  37. /* NOTE:  if videomode[abc]x == 0, 'setvideomode' assumes it has an IBM (or
  38.     register compatible) adapter and tweaks the registers directly
  39.     to get one of the following modes (based on the value of videomodedx):
  40.  
  41.         1        704 x 528 x 16
  42.         2        720 x 540 x 16
  43.         3        736 x 552 x 16
  44.         4        752 x 564 x 16
  45.         5        768 x 576 x 16
  46.         6        784 x 588 x 16
  47.         7        800 x 600 x 16
  48.         8        360 x 480 x 16
  49.  
  50. */
  51.  
  52. #define INFO_ID     "Fractal"
  53. #define FRACTAL_INFO   struct fractal_info
  54.  
  55. struct fractal_info            /*  for saving data in GIF file     */
  56. {
  57.     char info_id[8];        /* Unique identifier for info block */
  58.     int iterations;
  59.     int fractal_type;        /* 0=Mandelbrot 1=Julia 2= ... */
  60.     double    xmin;
  61.     double    xmax;
  62.     double    ymin;
  63.     double    ymax;
  64.     double    creal;
  65.     double    cimag;
  66.     int    videomodeax;
  67.     int    videomodebx;
  68.     int    videomodecx;
  69.     int    videomodedx;
  70.     int    dotmode;
  71.     int    xdots;
  72.     int    ydots;
  73.     int colors;
  74.     int version;        /* used to be 'future[0]' */
  75.     float parm3;
  76.     float parm4;
  77.     float potential[3];
  78.     int rseed;
  79.     int rflag;
  80.     int biomorph;
  81.     int inside;
  82.     int logmap;
  83.     float invert[3];
  84.     int decomp[2];
  85.     int symmetry;
  86.     /* version 2 stuff */
  87.     int init3d[16];
  88.     int previewfactor;
  89.     int xtrans;
  90.     int ytrans;
  91.     int red_crop_left;
  92.     int red_crop_right;
  93.     int blue_crop_left;
  94.     int blue_crop_right;
  95.     int red_bright;
  96.     int blue_bright;
  97.     int xadjust;
  98.     int eyeseparation;
  99.     int glassestype;
  100.     /* version 3 stuff, release 13 */
  101.     int outside;
  102.     /* version 4 stuff, release 14 */
  103.     double x3rd;      /* 3rd corner */
  104.     double y3rd;
  105.     char stdcalcmode;      /* 1/2/g/b */
  106.     char useinitorbit;      /* init Mandelbrot orbit flag */
  107.     int calc_status;      /* resumable, finished, etc */
  108.     long tot_extend_len;  /* total length of extension blocks in .fra file */
  109.     int distest;
  110.     int floatflag;
  111.     int bailout;
  112.     long calctime;
  113.     unsigned char trigndx[4]; /* which trig functions selected */
  114.     int finattract;
  115.     double initorbit[2];  /* init Mandelbrot orbit values */
  116.     int periodicity;      /* periodicity checking */
  117.     /* version 5 stuff, release 15 */
  118.     int pot16bit;      /* save 16 bit continuous potential info */
  119.     float faspectratio;   /* finalaspectratio, y/x */
  120.     int system;       /* 0 for dos, 1 for windows */
  121.     int release;      /* release number, with 2 decimals implied */
  122.     int flag3d;       /* stored only for now, for future use */
  123.     int transparent[2];
  124.     int ambient;
  125.     int haze;
  126.     int randomize;
  127.     int future[16];      /* for stuff we haven't thought of yet */
  128. };
  129.  
  130. #define MAXVIDEOMODES 100    /* maximum size of the video table */
  131.  
  132. #if defined(PUTTHEMHERE)    /* this MUST be defined ONLY in FRACTINT.C */
  133.  
  134. struct videoinfo videoentry;
  135.  
  136. int    maxvideomode;        /* size of the above list */
  137.  
  138. char *fkeys[] = {        /* Function Key names for display table */
  139.     /* "F1", Appropriated by the Help function */
  140.     "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9", "F10",
  141.     "SF1","SF2","SF3","SF4","SF5","SF6","SF7","SF8","SF9","SF10",
  142.     "CF1","CF2","CF3","CF4","CF5","CF6","CF7","CF8","CF9","CF10",
  143.     "AF1","AF2","AF3","AF4","AF5","AF6","AF7","AF8","AF9","AF10",
  144.     "Alt-1","Alt-2","Alt-3","Alt-4","Alt-5",
  145.     "Alt-6","Alt-7","Alt-8","Alt-9","Alt-0",
  146.     "Alt-Q","Alt-W","Alt-E","Alt-R","Alt-T",
  147.     "Alt-Y","Alt-U","Alt-I","Alt-O","Alt-P",
  148.     "Alt-A","Alt-S","Alt-D","Alt-F","Alt-G",
  149.     "Alt-H","Alt-J","Alt-K","Alt-L",
  150.     "Alt-Z","Alt-X","Alt-C","Alt-V","Alt-B","Alt-N","Alt-M",
  151.     "Alt--","Alt-=",
  152.     "Ctl-A","Ctl-B",        "Ctl-D","Ctl-E","Ctl-F","Ctl-G",
  153.     "Ctl-K","Ctl-L","Ctl-N","Ctl-O","Ctl-P",        "Ctl-R",
  154.         "Ctl-T","Ctl-U","Ctl-V","Ctl-W","Ctl-X","Ctl-Y","Ctl-Z",
  155.     "F11","F12","SF11","SF12","CF11","CF12","AF11","AF12",
  156.     "Alt-,","Alt-.","Alt-/","Alt-;","Alt-'","Alt-[","Alt-]","Alt-\\",
  157.     "Alt-`","A-Tab","A-Bks","A-Esc",
  158.     "END"};
  159.  
  160. int kbdkeys[] = {        /* Function Keystrokes for above names */
  161.     /* 1059,  Appropriated by the Help function */
  162.     1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068,
  163.     1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093,
  164.     1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103,
  165.     1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113,
  166.     1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129,
  167.     1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025,
  168.     1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038,
  169.     1044, 1045, 1046, 1047, 1048, 1049, 1050,
  170.     1130, 1131,
  171.        1,     2,         4,    5,     6,    7,
  172.       11,    12,   14,   15,   16,        18,
  173.         20,   21,   22,   23,    24,   25,   26,
  174.     1133, 1134, 1135, 1136, 1137, 1138, 1139, 1140,
  175.     1051, 1052, 1053, 1039, 1040, 1026, 1027, 1043,
  176.     1041, 1165, 1014, 1001,
  177.     0};
  178.  
  179. #else
  180.  
  181. extern struct videoinfo videoentry;
  182. extern int maxvideomode;
  183.  
  184. #endif
  185.  
  186. #define NUMIFS      32     /* number of ifs functions in ifs array */
  187. #define IFSPARM    7     /* number of ifs parameters */
  188. #define IFS3DPARM 13     /* number of ifs 3D parameters */
  189.  
  190. /* defines for symmetry */
  191. #define  NOSYM        0
  192. #define  XAXIS_NOPARM  -1
  193. #define  XAXIS        1
  194. #define  YAXIS_NOPARM  -2
  195. #define  YAXIS        2
  196. #define  XYAXIS_NOPARM -3
  197. #define  XYAXIS     3
  198. #define  ORIGIN_NOPARM -4
  199. #define  ORIGIN     4
  200. #define  PI_SYM_NOPARM -5
  201. #define  PI_SYM     5
  202. #define  XAXIS_NOIMAG  -6
  203. #define  XAXIS_NOREAL    6
  204. #define  NOPLOT        99
  205. #define  SETUP_SYM    100
  206.  
  207. /* bitmask defines for fractalspecific flags */
  208. #define  NOZOOM     1    /* zoombox not allowed at all       */
  209. #define  NOGUESS    2    /* solid guessing not allowed       */
  210. #define  NOTRACE    4    /* boundary tracing not allowed       */
  211. #define  NOROTATE    8    /* zoombox rotate/stretch not allowed */
  212. #define  NORESUME      16    /* can't interrupt and resume         */
  213. #define  INFCALC       32    /* this type calculates forever       */
  214. #define  TRIG1           64    /* number of trig functions in formula*/
  215. #define  TRIG2          128
  216. #define  TRIG3          192
  217. #define  TRIG4          256
  218. #define  WINFRAC      512    /* supported in WinFrac           */
  219.  
  220. #define AUTOINVERT -123456.789
  221. extern float   far initifs[NUMIFS][IFSPARM];          /* IFS code values */
  222. extern float   far initifs3d[NUMIFS][IFS3DPARM];      /* IFS 3D code values */
  223.  
  224. #define N_ATTR 8            /* max number of attractors    */
  225.  
  226. struct fractalspecificstuff
  227. {
  228.    char  *name;             /* name of the fractal */
  229.    char  *param[4];            /* name of the parameters */
  230.    float paramvalue[4];     /* default parameter value */
  231.    int     flags;             /* constraints, bits defined above */
  232.    float xmin;                /* default XMIN corner */
  233.    float xmax;                /* default XMAX corner */
  234.    float ymin;                /* default YMIN corner */
  235.    float ymax;                /* default YMAX corner */
  236.    int     isinteger;            /* 1 if integerfractal, 0 otherwise */
  237.    int     tojulia;            /* mandel-to-julia switch */
  238.    int     tomandel;            /* julia-to-mandel switch */
  239.    int     tofloat;            /* integer-to-floating switch */
  240.    int     symmetry;            /* applicable symmetry logic
  241.                        0 = no symmetry
  242.                       -1 = y-axis symmetry (If No Params)
  243.                        1 = y-axis symmetry
  244.                       -2 = x-axis symmetry (No Parms)
  245.                        2 = x-axis symmetry
  246.                       -3 = y-axis AND x-axis (No Parms)
  247.                        3 = y-axis AND x-axis symmetry
  248.                       -4 = polar symmetry (No Parms)
  249.                        4 = polar symmetry
  250.                        5 = PI (sin/cos) symmetry
  251.                        6 = NEWTON (power) symmetry
  252.                                 */
  253.    int (*orbitcalc)();        /* function that calculates one orbit */
  254.    int (*per_pixel)();        /* once-per-pixel init */
  255.    int (*per_image)();        /* once-per-image setup */
  256.    int (*calctype)();        /* name of main fractal function */
  257.    int orbit_bailout;        /* usual bailout value for orbit calc */
  258. };
  259.  
  260. extern struct fractalspecificstuff far fractalspecific[];
  261.  
  262.  
  263. /*    help screens */
  264.  
  265. #define HELPAUTHORS    1
  266. #define HELPMAIN    2
  267. #define HELPCYCLING    3
  268. #define HELPXHAIR    4
  269. #define HELPCMDLINE    5
  270. #define HELPFRACTALS    6
  271. #define HELPVIDEO    7
  272. #define HELPMOREINFO    8
  273. #define HELPMOUSE    9
  274. #define HELPLOADFILE    10
  275. #define HELPZOOM    11
  276. #define HELPVIEW    12
  277. #define HELPMENU    98
  278. #define HELPEXIT    99
  279.  
  280. #if defined(PUTTHEMHERE)    /* this MUST be defined ONLY in FRACTINT.C */
  281.  
  282. int helpmode;
  283.  
  284. #else
  285.  
  286. extern int helpmode;
  287.  
  288. #endif
  289.  
  290. #define DEFAULTFRACTALTYPE    ".gif"
  291. #define ALTERNATEFRACTALTYPE    ".fra"
  292.  
  293. #include <math.h>
  294.  
  295. #ifndef _LCOMPLEX_DEFINED
  296. struct lcomplex {
  297.    long x, y;
  298. };
  299. #define _LCOMPLEX_DEFINED
  300. #endif
  301.  
  302. #ifndef sqr
  303. #define sqr(x) ((x)*(x))
  304. #endif
  305.  
  306. #ifndef lsqr
  307. #define lsqr(x) (multiply((x),(x),bitshift))
  308. #endif
  309.  
  310. #define CMPLXmod(z)      (sqr((z).x)+sqr((z).y))
  311. #define CMPLXconj(z)    ((z).y =  -((z).y))
  312. #define LCMPLXmod(z)       (lsqr((z).x)+lsqr((z).y))
  313. #define LCMPLXconj(z)    ((z).y =  -((z).y))
  314.  
  315. typedef  struct complex CMPLX;
  316. typedef  struct lcomplex LCMPLX;
  317.  
  318. /* 3D stuff - formerly in 3d.h */
  319. #ifndef dot_product
  320. #define dot_product(v1,v2)  ((v1)[0]*(v2)[0]+(v1)[1]*(v2)[1]+(v1)[2]*(v2)[2])  /* TW 7-09-89 */
  321. #endif
  322.  
  323. #define    CMAX    4   /* maximum column (4 x 4 matrix) */
  324. #define    RMAX    4   /* maximum row     (4 x 4 matrix) */
  325. #define    DIM       3   /* number of dimensions */
  326.  
  327. typedef double MATRIX [RMAX] [CMAX];  /* matrix of doubles */
  328. typedef int   IMATRIX [RMAX] [CMAX];  /* matrix of ints    */
  329. typedef long  LMATRIX [RMAX] [CMAX];  /* matrix of longs   */
  330.  
  331. /* A MATRIX is used to describe a transformation from one coordinate
  332. system to another.  Multiple transformations may be concatenated by
  333. multiplying their transformation matrices. */
  334.  
  335. typedef double VECTOR [DIM];  /* vector of doubles */
  336. typedef int   IVECTOR [DIM];  /* vector of ints    */
  337. typedef long  LVECTOR [DIM];  /* vector of longs   */
  338.  
  339. /* A VECTOR is an array of three coordinates [x,y,z] representing magnitude
  340. and direction. A fourth dimension is assumed to always have the value 1, but
  341. is not in the data structure */
  342.  
  343.  
  344. #define PI 3.14159265358979323846
  345.  
  346. #define SPHERE      init3d[0]        /* sphere? 1 = yes, 0 = no  */
  347. #define ILLUMINE  (FILLTYPE>4)    /* illumination model        */
  348.  
  349. /* regular 3D */
  350. #define XROT      init3d[1]    /* rotate x-axis 60 degrees */
  351. #define YROT      init3d[2]    /* rotate y-axis 90 degrees */
  352. #define ZROT      init3d[3]    /* rotate x-axis  0 degrees */
  353. #define XSCALE      init3d[4]    /* scale x-axis, 90 percent */
  354. #define YSCALE      init3d[5]    /* scale y-axis, 90 percent */
  355.  
  356. /* sphere 3D */
  357. #define PHI1      init3d[1]    /* longitude start, 180     */
  358. #define PHI2      init3d[2]    /* longitude end ,   0        */
  359. #define THETA1      init3d[3]        /* latitude start,-90 degrees */
  360. #define THETA2      init3d[4]        /* latitude stop,  90 degrees */
  361. #define RADIUS      init3d[5]    /* should be user input */
  362.  
  363. /* common parameters */
  364. #define ROUGH      init3d[6]    /* scale z-axis, 30 percent */
  365. #define WATERLINE init3d[7]    /* water level            */
  366. #define FILLTYPE  init3d[8]    /* fill type            */
  367. #define ZVIEWER   init3d[9]    /* perspective view point   */
  368. #define XSHIFT      init3d[10]    /* x shift */
  369. #define YSHIFT      init3d[11]    /* y shift */
  370. #define XLIGHT      init3d[12]    /* x light vector coordinate */
  371. #define YLIGHT      init3d[13]    /* y light vector coordinate */
  372. #define ZLIGHT      init3d[14]    /* z light vector coordinate */
  373. #define LIGHTAVG  init3d[15]    /* number of points to average */
  374.  
  375. #ifndef TRUE
  376. #define TRUE 1
  377. #define FALSE 0
  378. #endif
  379.  
  380.  
  381. struct workliststuff    /* work list entry for std escape time engines */
  382. {
  383.     int xxstart;    /* screen window for this entry */
  384.     int xxstop;
  385.     int yystart;
  386.     int yystop;
  387.     int yybegin;    /* start row within window, for 2pass/ssg resume */
  388.     int sym;    /* if symmetry in window, prevents bad combines */
  389.     int pass;    /* for 2pass and solid guessing */
  390. };
  391. #define MAXCALCWORK 12
  392.  
  393. extern unsigned char trigndx[];
  394. extern void (*ltrig0)(), (*ltrig1)(), (*ltrig2)(), (*ltrig3)();
  395. extern void (*dtrig0)(), (*dtrig1)(), (*dtrig2)(), (*dtrig3)();
  396.  
  397. struct trig_funct_lst
  398. {
  399.     char *name;
  400.     void (*lfunct)();
  401.     void (*dfunct)();
  402. } ;
  403. extern struct trig_funct_lst trigfn[];
  404.  
  405. /* function prototypes */
  406.  
  407. extern    void   buzzer(int);
  408. extern    int    calcfract(void);
  409. extern    int    calcmand(void);
  410. extern    int    check_key(void);
  411. extern    int    complex_mult(CMPLX, CMPLX, CMPLX *);
  412. extern    int    complex_div(CMPLX, CMPLX, CMPLX *);
  413. extern    int    complex_power(CMPLX, int, CMPLX *);
  414. extern    int    cross_product(double [], double [], double []);
  415. extern    void   drawbox(int);
  416. extern    unsigned int emmallocate(unsigned int);
  417. extern    void   emmclearpage(unsigned int, unsigned int);
  418. extern    void   emmdeallocate(unsigned int);
  419. extern    unsigned int emmgetfree(void);
  420. extern    void   emmgetpage(unsigned int, unsigned int);
  421. extern    unsigned char far *emmquery(void);
  422. extern far_strcpy( char far *, char far *);
  423. extern far_strcmp( char far *, char far *);
  424. extern far_stricmp(char far *, char far *);
  425. extern far_strcat( char far *, char far *);
  426. extern far_memset( char far *, char     , int);
  427. extern far_memcpy( char far *, char far *, int);
  428. extern far_memcmp( char far *, char far *, int);
  429. extern far_memicmp(char far *, char far *, int);
  430. extern    unsigned char far *farmemalloc(long);
  431. extern    void   farmemfree(unsigned char far *);
  432. extern    int    getakey(void);
  433. extern    int    getcolor(int, int);
  434. extern    int    has_8087(void );
  435. extern    void   putstring(int,int,int,unsigned char far *);
  436. extern    int    putstringcenter(int,int,int,int,char far *);
  437. extern    int    stopmsg(int,unsigned char far *);
  438. extern    void   identity(MATRIX);
  439. extern    int    Juliafp(void);
  440. extern    int    longvmultpersp(LVECTOR, LMATRIX, LVECTOR, LVECTOR, LVECTOR, int);
  441. extern    int    longpersp(LVECTOR, LVECTOR,int);
  442. extern    int    Lambda(void);
  443. extern    int    Lambdasine(void);
  444. extern    void   mat_mul(MATRIX, MATRIX, MATRIX);
  445. extern    void   main(int, char *[]);
  446. extern    int    Mandelfp(void);
  447. extern    long   multiply(long, long, int);
  448. extern    long   divide(long, long, int);
  449. extern    int    Newton(void);
  450. extern    int    perspective(double *v);
  451. extern    void   cdecl Print_Screen(void);
  452. extern    void   putcolor(int, int, int);
  453. extern    void   scale(double, double, double, MATRIX);
  454. extern    void   setvideomode(int, int, int, int);
  455. extern    int    Sierpinski(void);
  456. extern    void   spindac(int, int);
  457. extern    void   noplot(int, int, int);
  458. extern    void   trans(double, double, double, MATRIX);
  459. extern    int    vmult(VECTOR,MATRIX,VECTOR);
  460. extern    void   xrot(double, MATRIX);
  461. extern    void   yrot(double, MATRIX);
  462. extern    void   zrot(double, MATRIX);
  463.  
  464. /* for overlay return stack */
  465.  
  466. #define ENTER_OVLY(ovlyid)\
  467.    extern int active_ovly;\
  468.    int prev_ovly;\
  469.    prev_ovly = active_ovly;\
  470.    active_ovly = ovlyid
  471. #define EXIT_OVLY active_ovly = prev_ovly
  472.  
  473. #define OVLY_MISCOVL   1
  474. #define OVLY_CMDFILES  2
  475. #define OVLY_HELP      3
  476. #define OVLY_PROMPTS   4
  477. #define OVLY_LOADFILE  5
  478. #define OVLY_ROTATE    6
  479. #define OVLY_PRINTER   7
  480. #define OVLY_LINE3D    8
  481. #define OVLY_ENCODER   9
  482. #define OVLY_CALCFRAC 10
  483.  
  484. /* text colors */
  485. #define BLACK       0
  486. #define BLUE       1
  487. #define GREEN       2
  488. #define CYAN       3
  489. #define RED       4
  490. #define MAGENTA    5
  491. #define BROWN       6 /* dirty yellow on cga */
  492. #define WHITE       7
  493. /* use values below this for foreground only, they don't work background */
  494. #define GRAY       8 /* don't use this much - is black on cga */
  495. #define L_BLUE       9
  496. #define L_GREEN   10
  497. #define L_CYAN      11
  498. #define L_RED      12
  499. #define L_MAGENTA 13
  500. #define YELLOW      14
  501. #define L_WHITE   15
  502. #define INVERSE 0x8000 /* when 640x200x2 mode in use, inverse */
  503. /* and their use: */
  504. extern unsigned char textcolor[];
  505. #define C_TITLE       textcolor[0]
  506. #define C_TITLE_DEV      textcolor[1]
  507. #define C_HELP_HDG      textcolor[2]
  508. #define C_HELP_BODY      textcolor[3]
  509. #define C_HELP_INSTR      textcolor[4]
  510. #define C_PROMPT_BKGRD      textcolor[5]
  511. #define C_PROMPT_LO      textcolor[6]
  512. #define C_PROMPT_MED      textcolor[7]
  513. #define C_PROMPT_HI      textcolor[8]
  514. #define C_PROMPT_INPUT      textcolor[9]
  515. #define C_CHOICE_CURRENT  textcolor[10]
  516. #define C_CHOICE_SP_INSTR textcolor[11]
  517. #define C_CHOICE_SP_KEYIN textcolor[12]
  518. #define C_GENERAL_HI      textcolor[13]
  519. #define C_GENERAL_MED      textcolor[14]
  520. #define C_GENERAL_LO      textcolor[15]
  521. #define C_GENERAL_INPUT   textcolor[16]
  522. #define C_DVID_BKGRD      textcolor[17]
  523. #define C_DVID_HI      textcolor[18]
  524. #define C_DVID_LO      textcolor[19]
  525. #define C_STOP_ERR      textcolor[20]
  526. #define C_STOP_INFO      textcolor[21]
  527. #define C_TITLE_LOW      textcolor[22]
  528. #define C_AUTHDIV1      textcolor[23]
  529. #define C_AUTHDIV2      textcolor[24]
  530. #define C_PRIMARY      textcolor[25]
  531. #define C_CONTRIB      textcolor[26]
  532.  
  533.