home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / progmisc / frasrc18.zip / FRACTINT.H < prev    next >
C/C++ Source or Header  |  1993-05-08  |  20KB  |  656 lines

  1. /* FRACTINT.H - common structures and values for the FRACTINT routines */
  2.  
  3. #if defined(PUTTHEMHERE)        /* this MUST be defined ONLY in FRACTINT.C */
  4. struct videoinfo videoentry;
  5. int helpmode;
  6. #endif
  7.  
  8. #ifndef FRACTINT_H
  9. #define FRACTINT_H
  10.  
  11. #if !defined(PUTTHEMHERE)  
  12. extern struct videoinfo videoentry;
  13. extern int        helpmode;
  14. #endif
  15.  
  16. #include <math.h>
  17. #include "port.h"
  18.  
  19. typedef BYTE BOOLEAN;
  20.  
  21. #ifndef C6
  22. #define _fastcall    /* _fastcall is a Microsoft C6.00 extension */
  23. #endif
  24.  
  25. #ifndef XFRACT
  26. #ifdef __TURBOC__
  27. #   define _bios_printer(a,b,c)   biosprint((a),(c),(b))
  28. #   define _bios_serialcom(a,b,c) bioscom((a),(c),(b))
  29. #else
  30. #ifndef __WATCOMC__
  31. #ifndef MK_FP
  32. #   define MK_FP(seg,off) (VOIDFARPTR )( (((long)(seg))<<16) | \
  33.                                           ((unsigned)(off)) )
  34. #endif
  35. #endif
  36. #endif
  37. #else
  38. #   define MK_FP(seg,off) (VOIDFARPTR )(seg+off)
  39. #endif
  40.  
  41. #ifndef XFRACT
  42. #define clock_ticks() clock()
  43. #endif
  44.  
  45. #ifdef XFRACT
  46. #define _fstrcpy(to,from) strcpy(to,from)
  47. #endif
  48.  
  49. #define MAXPARAMS 10        /* maximum number of parameters */
  50. #define MAXPIXELS 2048        /* Maximum pixel count across/down the screen */
  51. #define DEFAULTASPECT 0.75    /* Assumed overall screen dimensions, y/x     */
  52.  
  53. struct videoinfo {        /* All we need to know about a Video Adapter */
  54.     char    name[26];    /* Adapter name (IBM EGA, etc)        */
  55.     char    comment[26];    /* Comments (UNTESTED, etc)        */
  56.     int    keynum;     /* key number used to invoked this mode */
  57.                 /* 2-10 = F2-10, 11-40 = S,C,A{F1-F10}    */
  58.     int    videomodeax;    /* begin with INT 10H, AX=(this)    */
  59.     int    videomodebx;    /*        ...and BX=(this)    */
  60.     int    videomodecx;    /*        ...and CX=(this)    */
  61.     int    videomodedx;    /*        ...and DX=(this)    */
  62.                 /* NOTE:  IF AX==BX==CX==0, SEE BELOW    */
  63.     int    dotmode;    /* video access method used by asm code */
  64.                 /*    1 == BIOS 10H, AH=12,13 (SLOW)    */
  65.                 /*    2 == access like EGA/VGA    */
  66.                 /*    3 == access like MCGA        */
  67.                 /*    4 == Tseng-like  SuperVGA*256    */
  68.                 /*    5 == P'dise-like SuperVGA*256   */
  69.                 /*    6 == Vega-like     SuperVGA*256    */
  70.                 /*    7 == "Tweaked" IBM-VGA ...*256  */
  71.                 /*    8 == "Tweaked" SuperVGA ...*256 */
  72.                 /*    9 == Targa Format        */
  73.                 /*    10 = Hercules            */
  74.                 /*    11 = "disk video" (no screen)   */
  75.                 /*    12 = 8514/A            */
  76.                 /*    13 = CGA 320x200x4, 640x200x2    */
  77.                 /*    14 = Tandy 1000         */
  78.                 /*    15 = TRIDENT  SuperVGA*256    */
  79.                 /*    16 = Chips&Tech SuperVGA*256    */
  80.     int    xdots;        /* number of dots across the screen    */
  81.     int    ydots;        /* number of dots down the screen    */
  82.     int    colors;     /* number of colors available        */
  83.     };
  84.  
  85.  
  86. #define INFO_ID     "Fractal"
  87. #define FRACTAL_INFO   struct fractal_info
  88.  
  89. /*
  90.  * Note: because non-MSDOS machines store structures differently, we have
  91.  * to do special processing of the fractal_info structure in loadfile.c.
  92.  * Make sure changes to the structure here get reflected there.
  93.  */
  94. #ifndef XFRACT
  95. #define FRACTAL_INFO_SIZE sizeof(FRACTAL_INFO)
  96. #else
  97. /* This value should be the MSDOS size, not the Unix size. */
  98. #define FRACTAL_INFO_SIZE 502
  99. #endif
  100.  
  101. struct fractal_info        /*  for saving data in GIF file     */
  102. {
  103.     char  info_id[8];        /* Unique identifier for info block */
  104.     short iterations;
  105.     short fractal_type;        /* 0=Mandelbrot 1=Julia 2= ... */
  106.     double xmin;
  107.     double xmax;
  108.     double ymin;
  109.     double ymax;
  110.     double creal;
  111.     double cimag;
  112.     short videomodeax;
  113.     short videomodebx;
  114.     short videomodecx;
  115.     short videomodedx;
  116.     short dotmode;
  117.     short xdots;
  118.     short ydots;
  119.     short colors;
  120.     short version;        /* used to be 'future[0]' */
  121.     float parm3;
  122.     float parm4;
  123.     float potential[3];
  124.     short rseed;
  125.     short rflag;
  126.     short biomorph;
  127.     short inside;
  128.     short logmap;
  129.     float invert[3];
  130.     short decomp[2];
  131.     short symmetry;
  132.             /* version 2 stuff */
  133.     short init3d[16];
  134.     short previewfactor;
  135.     short xtrans;
  136.     short ytrans;
  137.     short red_crop_left;
  138.     short red_crop_right;
  139.     short blue_crop_left;
  140.     short blue_crop_right;
  141.     short red_bright;
  142.     short blue_bright;
  143.     short xadjust;
  144.     short eyeseparation;
  145.     short glassestype;
  146.             /* version 3 stuff, release 13 */
  147.     short outside;
  148.             /* version 4 stuff, release 14 */
  149.     double x3rd;      /* 3rd corner */
  150.     double y3rd;
  151.     char stdcalcmode;      /* 1/2/g/b */
  152.     char useinitorbit;      /* init Mandelbrot orbit flag */
  153.     short calc_status;      /* resumable, finished, etc */
  154.     long tot_extend_len;  /* total length of extension blocks in .gif file */
  155.     short distest;
  156.     short floatflag;
  157.     short bailout;
  158.     long calctime;
  159.     BYTE trigndx[4];      /* which trig functions selected */
  160.     short finattract;
  161.     double initorbit[2];  /* init Mandelbrot orbit values */
  162.     short periodicity;      /* periodicity checking */
  163.             /* version 5 stuff, release 15 */
  164.     short pot16bit;      /* save 16 bit continuous potential info */
  165.     float faspectratio;   /* finalaspectratio, y/x */
  166.     short system;       /* 0 for dos, 1 for windows */
  167.     short release;      /* release number, with 2 decimals implied */
  168.     short flag3d;       /* stored only for now, for future use */
  169.     short transparent[2];
  170.     short ambient;
  171.     short haze;
  172.     short randomize;
  173.             /* version 6 stuff, release 15.x */
  174.     short rotate_lo;
  175.     short rotate_hi;
  176.     short distestwidth;
  177.             /* version 7 stuff, release 16 */
  178.     double dparm3;
  179.     double dparm4;
  180.             /* version 8 stuff, release 17 */
  181.     short fillcolor;
  182.             /* version 9 stuff, release 18 */
  183.     double mxmaxfp;
  184.     double mxminfp;
  185.     double mymaxfp;
  186.     double myminfp;
  187.     short zdots;
  188.     float originfp;
  189.     float depthfp;
  190.     float heightfp;
  191.     float widthfp;
  192.     float distfp;
  193.     float eyesfp;
  194.     short orbittype;
  195.     short juli3Dmode;
  196.     short maxfn;
  197.     short inversejulia;
  198.     double dparm5;
  199.     double dparm6;
  200.     double dparm7;
  201.     double dparm8;
  202.     double dparm9;
  203.     double dparm10;
  204.     short future[50];      /* for stuff we haven't thought of yet */
  205. };
  206.  
  207.  
  208.  
  209. #define MAXVIDEOMODES 300    /* maximum entries in fractint.cfg      */
  210. #ifndef XFRACT
  211. #define MAXVIDEOTABLE 40        /* size of the resident video modes table */
  212. #else
  213. #define MAXVIDEOTABLE 2         /* size of the resident video modes table */
  214. #endif
  215.  
  216. #define AUTOINVERT -123456.789
  217.  
  218. #define N_ATTR 8            /* max number of attractors    */
  219.  
  220. extern    long     l_at_rad;    /* finite attractor radius  */
  221. extern    double     f_at_rad;    /* finite attractor radius  */
  222.  
  223. #define NUMIFS      64     /* number of ifs functions in ifs array */
  224. #define IFSPARM    7     /* number of ifs parameters */
  225. #define IFS3DPARM 13     /* number of ifs 3D parameters */
  226.  
  227. #define ITEMNAMELEN 18     /* max length of names in .frm/.l/.ifs/.fc */
  228.  
  229. struct moreparams
  230. {
  231.    int      type;                        /* index in fractalname of the fractal */
  232.    char     *param[MAXPARAMS-4];    /* name of the parameters */
  233.    double   paramvalue[MAXPARAMS-4];     /* default parameter values */
  234. };
  235.  
  236. struct fractalspecificstuff
  237. {
  238.    char  *name;             /* name of the fractal */
  239.                     /* (leading "*" supresses name display) */ 
  240.    char  *param[4];            /* name of the parameters */
  241.    double paramvalue[4];         /* default parameter values */
  242.    int     helptext;            /* helpdefs.h HT_xxxx, -1 for none */
  243.    int     helpformula;            /* helpdefs.h HF_xxxx, -1 for none */
  244.    int     flags;             /* constraints, bits defined below */
  245.    float xmin;                /* default XMIN corner */
  246.    float xmax;                /* default XMAX corner */
  247.    float ymin;                /* default YMIN corner */
  248.    float ymax;                /* default YMAX corner */
  249.    int     isinteger;            /* 1 if integerfractal, 0 otherwise */
  250.    int     tojulia;            /* mandel-to-julia switch */
  251.    int     tomandel;            /* julia-to-mandel switch */
  252.    int     tofloat;            /* integer-to-floating switch */
  253.    int     symmetry;            /* applicable symmetry logic
  254.                        0 = no symmetry
  255.                       -1 = y-axis symmetry (If No Params)
  256.                        1 = y-axis symmetry
  257.                       -2 = x-axis symmetry (No Parms)
  258.                        2 = x-axis symmetry
  259.                       -3 = y-axis AND x-axis (No Parms)
  260.                        3 = y-axis AND x-axis symmetry
  261.                       -4 = polar symmetry (No Parms)
  262.                        4 = polar symmetry
  263.                        5 = PI (sin/cos) symmetry
  264.                        6 = NEWTON (power) symmetry
  265.                                 */
  266.    int (*orbitcalc)();        /* function that calculates one orbit */
  267.    int (*per_pixel)();        /* once-per-pixel init */
  268.    int (*per_image)();        /* once-per-image setup */
  269.    int (*calctype)();        /* name of main fractal function */
  270.    int orbit_bailout;        /* usual bailout value for orbit calc */
  271. };
  272.  
  273. /* defines for symmetry */
  274. #define  NOSYM        0
  275. #define  XAXIS_NOPARM  -1
  276. #define  XAXIS        1
  277. #define  YAXIS_NOPARM  -2
  278. #define  YAXIS        2
  279. #define  XYAXIS_NOPARM -3
  280. #define  XYAXIS     3
  281. #define  ORIGIN_NOPARM -4
  282. #define  ORIGIN     4
  283. #define  PI_SYM_NOPARM -5
  284. #define  PI_SYM     5
  285. #define  XAXIS_NOIMAG  -6
  286. #define  XAXIS_NOREAL    6
  287. #define  NOPLOT        99
  288. #define  SETUP_SYM    100
  289.  
  290. /* defines for inside/outside */
  291. #define ITER        -1
  292. #define REAL        -2
  293. #define IMAG        -3
  294. #define MULT        -4
  295. #define SUM         -5
  296. #define ZMAG       -59
  297. #define BOF60      -60
  298. #define BOF61      -61
  299. #define EPSCROSS  -100
  300. #define STARTRAIL -101
  301. #define PERIOD    -102
  302.  
  303. /* bitmask defines for fractalspecific flags */
  304. #define  NOZOOM     1    /* zoombox not allowed at all       */
  305. #define  NOGUESS    2    /* solid guessing not allowed       */
  306. #define  NOTRACE    4    /* boundary tracing not allowed       */
  307. #define  NOROTATE    8    /* zoombox rotate/stretch not allowed */
  308. #define  NORESUME      16    /* can't interrupt and resume         */
  309. #define  INFCALC       32    /* this type calculates forever       */
  310. #define  TRIG1           64    /* number of trig functions in formula*/
  311. #define  TRIG2          128
  312. #define  TRIG3          192
  313. #define  TRIG4          256
  314. #define  WINFRAC      512    /* supported in WinFrac           */
  315. #define  PARMS3D     1024    /* uses 3d parameters           */
  316. #define  OKJB        2048    /* works with Julibrot */
  317. #define  MORE        4096    /* more than 4 parms */
  318.  
  319. extern struct fractalspecificstuff far fractalspecific[];
  320. extern struct fractalspecificstuff far *curfractalspecific;
  321.  
  322. #define DEFAULTFRACTALTYPE    ".gif"
  323. #define ALTERNATEFRACTALTYPE    ".fra"
  324.  
  325. #ifndef _CMPLX_DEFINED
  326. #define _CMPLX_DEFINED
  327.  
  328. struct DHyperComplex {
  329.     double x,y;
  330.     double z,t;  
  331. };
  332.  
  333. struct LHyperComplex {
  334.     long x,y;
  335.     long z,t; 
  336. };
  337.  
  338. struct DComplex {
  339.     double x,y;
  340. };
  341.  
  342. struct LComplex {
  343.     long x,y;
  344. };
  345.  
  346. typedef struct  DComplex         _CMPLX;
  347. typedef struct  LComplex         _LCMPLX;
  348. typedef struct  DHyperComplex    _HCMPLX;
  349. typedef struct  LHyperComplex    _LHCMPLX;
  350. #endif
  351.  
  352. #ifndef sqr
  353. #define sqr(x) ((x)*(x))
  354. #endif
  355.  
  356. #ifndef lsqr
  357. #define lsqr(x) (multiply((x),(x),bitshift))
  358. #endif
  359.  
  360. #define CMPLXmod(z)      (sqr((z).x)+sqr((z).y))
  361. #define CMPLXconj(z)    ((z).y =  -((z).y))
  362. #define LCMPLXmod(z)       (lsqr((z).x)+lsqr((z).y))
  363. #define LCMPLXconj(z)    ((z).y =  -((z).y))
  364.  
  365. typedef  _LCMPLX LCMPLX;
  366.  
  367. /* 3D stuff - formerly in 3d.h */
  368. #ifndef dot_product
  369. #define dot_product(v1,v2)  ((v1)[0]*(v2)[0]+(v1)[1]*(v2)[1]+(v1)[2]*(v2)[2])  /* TW 7-09-89 */
  370. #endif
  371.  
  372. #define    CMAX    4   /* maximum column (4 x 4 matrix) */
  373. #define    RMAX    4   /* maximum row     (4 x 4 matrix) */
  374. #define    DIM       3   /* number of dimensions */
  375.  
  376. typedef double MATRIX [RMAX] [CMAX];  /* matrix of doubles */
  377. typedef int   IMATRIX [RMAX] [CMAX];  /* matrix of ints    */
  378. typedef long  LMATRIX [RMAX] [CMAX];  /* matrix of longs   */
  379.  
  380. /* A MATRIX is used to describe a transformation from one coordinate
  381. system to another.  Multiple transformations may be concatenated by
  382. multiplying their transformation matrices. */
  383.  
  384. typedef double VECTOR [DIM];  /* vector of doubles */
  385. typedef int   IVECTOR [DIM];  /* vector of ints    */
  386. typedef long  LVECTOR [DIM];  /* vector of longs   */
  387.  
  388. /* A VECTOR is an array of three coordinates [x,y,z] representing magnitude
  389. and direction. A fourth dimension is assumed to always have the value 1, but
  390. is not in the data structure */
  391.  
  392.  
  393. #define PI 3.14159265358979323846
  394.  
  395. #define SPHERE      init3d[0]        /* sphere? 1 = yes, 0 = no  */
  396. #define ILLUMINE  (FILLTYPE>4)    /* illumination model        */
  397.  
  398. /* regular 3D */
  399. #define XROT      init3d[1]    /* rotate x-axis 60 degrees */
  400. #define YROT      init3d[2]    /* rotate y-axis 90 degrees */
  401. #define ZROT      init3d[3]    /* rotate x-axis  0 degrees */
  402. #define XSCALE      init3d[4]    /* scale x-axis, 90 percent */
  403. #define YSCALE      init3d[5]    /* scale y-axis, 90 percent */
  404.  
  405. /* sphere 3D */
  406. #define PHI1      init3d[1]    /* longitude start, 180     */
  407. #define PHI2      init3d[2]    /* longitude end ,   0        */
  408. #define THETA1      init3d[3]        /* latitude start,-90 degrees */
  409. #define THETA2      init3d[4]        /* latitude stop,  90 degrees */
  410. #define RADIUS      init3d[5]    /* should be user input */
  411.  
  412. /* common parameters */
  413. #define ROUGH      init3d[6]    /* scale z-axis, 30 percent */
  414. #define WATERLINE init3d[7]    /* water level            */
  415. #define FILLTYPE  init3d[8]    /* fill type            */
  416. #define ZVIEWER   init3d[9]    /* perspective view point   */
  417. #define XSHIFT      init3d[10]    /* x shift */
  418. #define YSHIFT      init3d[11]    /* y shift */
  419. #define XLIGHT      init3d[12]    /* x light vector coordinate */
  420. #define YLIGHT      init3d[13]    /* y light vector coordinate */
  421. #define ZLIGHT      init3d[14]    /* z light vector coordinate */
  422. #define LIGHTAVG  init3d[15]    /* number of points to average */
  423.  
  424. #ifndef TRUE
  425. #define TRUE 1
  426. #define FALSE 0
  427. #endif
  428.  
  429. /* Math definitions (normally in float.h) that are missing on some systems. */
  430. #ifndef FLT_MIN
  431. #define FLT_MIN 1.17549435e-38
  432. #endif
  433. #ifndef FLT_MAX
  434. #define FLT_MAX 3.40282347e+38
  435. #endif
  436. #ifndef DBL_EPSILON
  437. #define DBL_EPSILON 2.2204460492503131e-16
  438. #endif
  439.  
  440. #ifndef XFRACT
  441. #define UPARR "\x18"
  442. #define DNARR "\x19"
  443. #define RTARR "\x1A"
  444. #define LTARR "\x1B"
  445. #else
  446. #define UPARR "K"
  447. #define DNARR "J"
  448. #define RTARR "L"
  449. #define LTARR "H"
  450. #endif
  451.  
  452. #define JIIM  0
  453. #define ORBIT 1
  454.  
  455. struct workliststuff    /* work list entry for std escape time engines */
  456. {
  457.     int xxstart;    /* screen window for this entry */
  458.     int xxstop;
  459.     int yystart;
  460.     int yystop;
  461.     int yybegin;    /* start row within window, for 2pass/ssg resume */
  462.     int sym;    /* if symmetry in window, prevents bad combines */
  463.     int pass;    /* for 2pass and solid guessing */
  464. };
  465. #define MAXCALCWORK 12
  466.  
  467. extern BYTE trigndx[];
  468. extern void (*ltrig0)(void), (*ltrig1)(void), (*ltrig2)(void), (*ltrig3)(void);
  469. extern void (*dtrig0)(void), (*dtrig1)(void), (*dtrig2)(void), (*dtrig3)(void);
  470.  
  471. struct trig_funct_lst
  472. {
  473.     char *name;
  474.     void (*lfunct)(void);
  475.     void (*dfunct)(void);
  476.     void (*mfunct)(void);
  477. } ;
  478. extern struct trig_funct_lst trigfn[];
  479.  
  480. /* function prototypes */
  481.  
  482. extern    void   (_fastcall *plot)(int, int, int);
  483.  
  484. /* for overlay return stack */
  485.  
  486. #define ENTER_OVLY(ovlyid)\
  487.    extern int active_ovly;\
  488.    int prev_ovly;\
  489.    prev_ovly = active_ovly;\
  490.    active_ovly = ovlyid
  491. #define EXIT_OVLY active_ovly = prev_ovly
  492.  
  493. #define BIG 100000.0
  494.  
  495. #define OVLY_MISCOVL   1
  496. #define OVLY_CMDFILES  2
  497. #define OVLY_HELP      3
  498. #define OVLY_PROMPTS1  4
  499. #define OVLY_PROMPTS2  5
  500. #define OVLY_LOADFILE  6
  501. #define OVLY_ROTATE    7
  502. #define OVLY_PRINTER   8
  503. #define OVLY_LINE3D    9
  504. #define OVLY_ENCODER  10
  505. #define OVLY_CALCFRAC 11
  506. #define OVLY_INTRO    12
  507. #define OVLY_DECODER  13
  508.  
  509.  
  510. #define CTL(x) ((x)&0x1f)
  511.  
  512. /* nonalpha tests if we have a control character */
  513. #define nonalpha(c) ((c)<32 || (c)>127)
  514.  
  515. /* keys */
  516. #define   INSERT     1082
  517. #define   DELETE     1083
  518. #define   PAGE_UP     1073
  519. #define   PAGE_DOWN     1081
  520. #define   CTL_HOME     1119
  521. #define   CTL_END     1117
  522. #define   LEFT_ARROW     1075
  523. #define   RIGHT_ARROW     1077
  524. #define   UP_ARROW     1072
  525. #define   DOWN_ARROW     1080
  526. #define   LEFT_ARROW_2     1115
  527. #define   RIGHT_ARROW_2  1116
  528. #define   UP_ARROW_2     1141
  529. #define   DOWN_ARROW_2     1145
  530. #define   HOME         1071
  531. #define   END         1079
  532. #define   ENTER      13
  533. #define   ENTER_2     1013
  534. #define   CTL_ENTER      10
  535. #define   CTL_ENTER_2    1010
  536. #define   CTL_PAGE_UP    1132
  537. #define   CTL_PAGE_DOWN  1118
  538. #define   CTL_MINUS      1142
  539. #define   CTL_PLUS       1144
  540. #define   CTL_INSERT     1146
  541. #define   CTL_DEL        1147
  542. #define   F1         1059
  543. #define   F2         1060
  544. #define   F3         1061
  545. #define   F4         1062
  546. #define   F5         1063
  547. #define   F6         1064
  548. #define   F7         1065
  549. #define   F8         1066
  550. #define   F9         1067
  551. #define   F10         1068
  552. #define   TAB            9
  553. #define   ESC            27
  554. #define   SPACE          32
  555. #define   SF1            1084
  556. #define   SF2            1085
  557. #define   SF3            1086
  558. #define   SF4            1087
  559. #define   SF5            1088
  560. #define   SF6            1089
  561. #define   SF7            1090
  562. #define   SF8            1091
  563. #define   SF9            1092
  564. #define   SF10           1093
  565. /* text colors */
  566. #define BLACK       0
  567. #define BLUE       1
  568. #define GREEN       2
  569. #define CYAN       3
  570. #define RED       4
  571. #define MAGENTA    5
  572. #define BROWN       6 /* dirty yellow on cga */
  573. #define WHITE       7
  574. /* use values below this for foreground only, they don't work background */
  575. #define GRAY       8 /* don't use this much - is black on cga */
  576. #define L_BLUE       9
  577. #define L_GREEN   10
  578. #define L_CYAN      11
  579. #define L_RED      12
  580. #define L_MAGENTA 13
  581. #define YELLOW      14
  582. #define L_WHITE   15
  583. #define INVERSE 0x8000 /* when 640x200x2 text or mode 7, inverse */
  584. #define BRIGHT    0x4000 /* when mode 7, bright */
  585. /* and their use: */
  586. extern BYTE txtcolor[];
  587. #define C_TITLE       txtcolor[0]+BRIGHT
  588. #define C_TITLE_DEV      txtcolor[1]
  589. #define C_HELP_HDG      txtcolor[2]+BRIGHT
  590. #define C_HELP_BODY      txtcolor[3]
  591. #define C_HELP_INSTR      txtcolor[4]
  592. #define C_HELP_LINK      txtcolor[5]+BRIGHT
  593. #define C_HELP_CURLINK      txtcolor[6]+INVERSE
  594. #define C_PROMPT_BKGRD      txtcolor[7]
  595. #define C_PROMPT_TEXT      txtcolor[8]
  596. #define C_PROMPT_LO      txtcolor[9]
  597. #define C_PROMPT_MED      txtcolor[10]
  598. #ifndef XFRACT
  599. #define C_PROMPT_HI      txtcolor[11]+BRIGHT
  600. #else
  601. #define C_PROMPT_HI      txtcolor[11]
  602. #endif
  603. #define C_PROMPT_INPUT      txtcolor[12]+INVERSE
  604. #define C_PROMPT_CHOOSE   txtcolor[13]+INVERSE
  605. #define C_CHOICE_CURRENT  txtcolor[14]+INVERSE
  606. #define C_CHOICE_SP_INSTR txtcolor[15]
  607. #define C_CHOICE_SP_KEYIN txtcolor[16]+BRIGHT
  608. #define C_GENERAL_HI      txtcolor[17]+BRIGHT
  609. #define C_GENERAL_MED      txtcolor[18]
  610. #define C_GENERAL_LO      txtcolor[19]
  611. #define C_GENERAL_INPUT   txtcolor[20]+INVERSE
  612. #define C_DVID_BKGRD      txtcolor[21]
  613. #define C_DVID_HI      txtcolor[22]+BRIGHT
  614. #define C_DVID_LO      txtcolor[23]
  615. #define C_STOP_ERR      txtcolor[24]+BRIGHT
  616. #define C_STOP_INFO      txtcolor[25]+BRIGHT
  617. #define C_TITLE_LOW      txtcolor[26]
  618. #define C_AUTHDIV1      txtcolor[27]+INVERSE
  619. #define C_AUTHDIV2      txtcolor[28]+INVERSE
  620. #define C_PRIMARY      txtcolor[29]
  621. #define C_CONTRIB      txtcolor[30]
  622.  
  623. /* structure for xmmmoveextended parameter */
  624. struct XMM_Move
  625.   {
  626.     unsigned long   Length;
  627.     unsigned int    SourceHandle;
  628.     unsigned long   SourceOffset;
  629.     unsigned int    DestHandle;
  630.     unsigned long   DestOffset;
  631.   };
  632.  
  633. /* structure passed to fullscreen_prompts */
  634. struct fullscreenvalues
  635. {
  636.    int type;   /* 'd' for double, 'f' for float, 's' for string,   */
  637.            /* 'D' for integer in double, '*' for comment */
  638.            /* 'i' for integer, 'y' for yes=1 no=0              */
  639.            /* 0x100+n for string of length n           */
  640.            /* 'l' for one of a list of strings                 */
  641.    union
  642.    {
  643.       double dval;    /* when type 'd' or 'f'  */
  644.       int    ival;    /* when type is 'i'      */
  645.       char   sval[16];    /* when type is 's'      */
  646.       char  *sbuf;    /* when type is 0x100+n  */
  647.       struct {        /* when type is 'l'      */
  648.      int  val;    /*   selected choice     */
  649.      int  vlen;    /*   char len per choice */
  650.      char **list;    /*   list of values     */
  651.      int  llen;    /*   number of values     */
  652.       } ch;
  653.    } uval;
  654. };
  655. #endif
  656.