home *** CD-ROM | disk | FTP | other *** search
/ Mega A/V / mega_av.zip / mega_av / GRAPHUTL / WINS1651.ZIP / FRACTINT.H < prev    next >
Text File  |  1991-05-19  |  19KB  |  566 lines

  1. /* FRACTINT.H - common structures and values for the FRACTINT routines */
  2.  
  3.  
  4. #ifndef C6
  5. #define _fastcall    /* _fastcall is a Microsoft C6.00 extension */
  6. #endif
  7.  
  8. #ifdef __TURBOC__
  9. #   define _bios_printer(a,b,c)   biosprint((a),(c),(b))
  10. #   define _bios_serialcom(a,b,c) bioscom((a),(c),(b))
  11. #else
  12. #   define MK_FP(seg,off) (void far *)( (((long)(seg))<<16) | \
  13.                     ((unsigned)(off)) )
  14. #endif
  15.  
  16.  
  17. #define MAXPIXELS 2048        /* Maximum pixel count across/down the screen */
  18. #define SCREENASPECT 0.75    /* Assumed overall screen dimensions, y/x     */
  19.  
  20. struct videoinfo {        /* All we need to know about a Video Adapter */
  21.     char    name[26];    /* Adapter name (IBM EGA, etc)        */
  22.     char    comment[26];    /* Comments (UNTESTED, etc)        */
  23.     int    keynum;     /* key number used to invoked this mode */
  24.                 /* 2-10 = F2-10, 11-40 = S,C,A{F1-F10}    */
  25.     int    videomodeax;    /* begin with INT 10H, AX=(this)    */
  26.     int    videomodebx;    /*        ...and BX=(this)    */
  27.     int    videomodecx;    /*        ...and CX=(this)    */
  28.     int    videomodedx;    /*        ...and DX=(this)    */
  29.                 /* NOTE:  IF AX==BX==CX==0, SEE BELOW    */
  30.     int    dotmode;    /* video access method used by asm code */
  31.                 /*    1 == BIOS 10H, AH=12,13 (SLOW)    */
  32.                 /*    2 == access like EGA/VGA    */
  33.                 /*    3 == access like MCGA        */
  34.                 /*    4 == Tseng-like  SuperVGA*256    */
  35.                 /*    5 == P'dise-like SuperVGA*256   */
  36.                 /*    6 == Vega-like     SuperVGA*256    */
  37.                 /*    7 == "Tweaked" IBM-VGA ...*256  */
  38.                 /*    8 == "Tweaked" SuperVGA ...*256 */
  39.                 /*    9 == Targa Format        */
  40.                 /*    10 = Hercules            */
  41.                 /*    11 = "disk video" (no screen)   */
  42.                 /*    12 = 8514/A            */
  43.                 /*    13 = CGA 320x200x4, 640x200x2    */
  44.                 /*    14 = Tandy 1000         */
  45.                 /*    15 = TRIDENT  SuperVGA*256    */
  46.                 /*    16 = Chips&Tech SuperVGA*256    */
  47.     int    xdots;        /* number of dots across the screen    */
  48.     int    ydots;        /* number of dots down the screen    */
  49.     int    colors;     /* number of colors available        */
  50.     };
  51.  
  52.  
  53. #define INFO_ID     "Fractal"
  54. #define FRACTAL_INFO   struct fractal_info
  55.  
  56. struct fractal_info            /*  for saving data in GIF file     */
  57. {
  58.     char info_id[8];        /* Unique identifier for info block */
  59.     int iterations;
  60.     int fractal_type;        /* 0=Mandelbrot 1=Julia 2= ... */
  61.     double    xmin;
  62.     double    xmax;
  63.     double    ymin;
  64.     double    ymax;
  65.     double    creal;
  66.     double    cimag;
  67.     int    videomodeax;
  68.     int    videomodebx;
  69.     int    videomodecx;
  70.     int    videomodedx;
  71.     int    dotmode;
  72.     int    xdots;
  73.     int    ydots;
  74.     int colors;
  75.     int version;        /* used to be 'future[0]' */
  76.     float parm3;
  77.     float parm4;
  78.     float potential[3];
  79.     int rseed;
  80.     int rflag;
  81.     int biomorph;
  82.     int inside;
  83.     int logmap;
  84.     float invert[3];
  85.     int decomp[2];
  86.     int symmetry;
  87.     /* version 2 stuff */
  88.     int init3d[16];
  89.     int previewfactor;
  90.     int xtrans;
  91.     int ytrans;
  92.     int red_crop_left;
  93.     int red_crop_right;
  94.     int blue_crop_left;
  95.     int blue_crop_right;
  96.     int red_bright;
  97.     int blue_bright;
  98.     int xadjust;
  99.     int eyeseparation;
  100.     int glassestype;
  101.     /* version 3 stuff, release 13 */
  102.     int outside;
  103.     /* version 4 stuff, release 14 */
  104.     double x3rd;      /* 3rd corner */
  105.     double y3rd;
  106.     char stdcalcmode;      /* 1/2/g/b */
  107.     char useinitorbit;      /* init Mandelbrot orbit flag */
  108.     int calc_status;      /* resumable, finished, etc */
  109.     long tot_extend_len;  /* total length of extension blocks in .gif file */
  110.     int distest;
  111.     int floatflag;
  112.     int bailout;
  113.     long calctime;
  114.     unsigned char trigndx[4]; /* which trig functions selected */
  115.     int finattract;
  116.     double initorbit[2];  /* init Mandelbrot orbit values */
  117.     int periodicity;      /* periodicity checking */
  118.     /* version 5 stuff, release 15 */
  119.     int pot16bit;      /* save 16 bit continuous potential info */
  120.     float faspectratio;   /* finalaspectratio, y/x */
  121.     int system;       /* 0 for dos, 1 for windows */
  122.     int release;      /* release number, with 2 decimals implied */
  123.     int flag3d;       /* stored only for now, for future use */
  124.     int transparent[2];
  125.     int ambient;
  126.     int haze;
  127.     int randomize;
  128.     /* version 6 stuff, release 15.x */
  129.     int rotate_lo;
  130.     int rotate_hi;
  131.     int distestwidth;
  132.     /* version 7 stuff, release 16 */
  133.     double dparm3;
  134.     double dparm4;
  135.     int future[32];      /* for stuff we haven't thought of yet */
  136. };
  137.  
  138. #define MAXVIDEOMODES 300    /* maximum entries in fractint.cfg      */
  139. #define MAXVIDEOTABLE 40    /* size of the resident video modes table */
  140.  
  141. #if defined(PUTTHEMHERE)    /* this MUST be defined ONLY in FRACTINT.C */
  142.  
  143. struct videoinfo videoentry;
  144.  
  145. #else
  146.  
  147. extern struct videoinfo videoentry;
  148.  
  149. #endif
  150.  
  151. #define NUMIFS      32     /* number of ifs functions in ifs array */
  152. #define IFSPARM    7     /* number of ifs parameters */
  153. #define IFS3DPARM 13     /* number of ifs 3D parameters */
  154.  
  155. #define ITEMNAMELEN 18     /* max length of names in .frm/.l/.ifs/.fc */
  156.  
  157. /* defines for symmetry */
  158. #define  NOSYM        0
  159. #define  XAXIS_NOPARM  -1
  160. #define  XAXIS        1
  161. #define  YAXIS_NOPARM  -2
  162. #define  YAXIS        2
  163. #define  XYAXIS_NOPARM -3
  164. #define  XYAXIS     3
  165. #define  ORIGIN_NOPARM -4
  166. #define  ORIGIN     4
  167. #define  PI_SYM_NOPARM -5
  168. #define  PI_SYM     5
  169. #define  XAXIS_NOIMAG  -6
  170. #define  XAXIS_NOREAL    6
  171. #define  NOPLOT        99
  172. #define  SETUP_SYM    100
  173.  
  174. /* bitmask defines for fractalspecific flags */
  175. #define  NOZOOM     1    /* zoombox not allowed at all       */
  176. #define  NOGUESS    2    /* solid guessing not allowed       */
  177. #define  NOTRACE    4    /* boundary tracing not allowed       */
  178. #define  NOROTATE    8    /* zoombox rotate/stretch not allowed */
  179. #define  NORESUME      16    /* can't interrupt and resume         */
  180. #define  INFCALC       32    /* this type calculates forever       */
  181. #define  TRIG1           64    /* number of trig functions in formula*/
  182. #define  TRIG2          128
  183. #define  TRIG3          192
  184. #define  TRIG4          256
  185. #define  WINFRAC      512    /* supported in WinFrac           */
  186. #define  PARMS3D     1024    /* uses 3d parameters           */
  187.  
  188. #define AUTOINVERT -123456.789
  189.  
  190. #define N_ATTR 8            /* max number of attractors    */
  191.  
  192. struct fractalspecificstuff
  193. {
  194.    char  *name;             /* name of the fractal */
  195.    char  *param[4];            /* name of the parameters */
  196.    float paramvalue[4];         /* default parameter values */
  197.    int     helptext;            /* helpdefs.h HT_xxxx, -1 for none */
  198.    int     helpformula;            /* helpdefs.h HF_xxxx, -1 for none */
  199.    int     flags;             /* constraints, bits defined above */
  200.    float xmin;                /* default XMIN corner */
  201.    float xmax;                /* default XMAX corner */
  202.    float ymin;                /* default YMIN corner */
  203.    float ymax;                /* default YMAX corner */
  204.    int     isinteger;            /* 1 if integerfractal, 0 otherwise */
  205.    int     tojulia;            /* mandel-to-julia switch */
  206.    int     tomandel;            /* julia-to-mandel switch */
  207.    int     tofloat;            /* integer-to-floating switch */
  208.    int     symmetry;            /* applicable symmetry logic
  209.                        0 = no symmetry
  210.                       -1 = y-axis symmetry (If No Params)
  211.                        1 = y-axis symmetry
  212.                       -2 = x-axis symmetry (No Parms)
  213.                        2 = x-axis symmetry
  214.                       -3 = y-axis AND x-axis (No Parms)
  215.                        3 = y-axis AND x-axis symmetry
  216.                       -4 = polar symmetry (No Parms)
  217.                        4 = polar symmetry
  218.                        5 = PI (sin/cos) symmetry
  219.                        6 = NEWTON (power) symmetry
  220.                                 */
  221.    int (*orbitcalc)();        /* function that calculates one orbit */
  222.    int (*per_pixel)();        /* once-per-pixel init */
  223.    int (*per_image)();        /* once-per-image setup */
  224.    int (*calctype)();        /* name of main fractal function */
  225.    int orbit_bailout;        /* usual bailout value for orbit calc */
  226. };
  227.  
  228. extern struct fractalspecificstuff far fractalspecific[];
  229. extern struct fractalspecificstuff far *curfractalspecific;
  230.  
  231.  
  232. #if defined(PUTTHEMHERE)    /* this MUST be defined ONLY in FRACTINT.C */
  233.  
  234. int helpmode;
  235.  
  236. #else
  237.  
  238. extern int helpmode;
  239.  
  240. #endif
  241.  
  242. #define DEFAULTFRACTALTYPE    ".gif"
  243. #define ALTERNATEFRACTALTYPE    ".fra"
  244.  
  245. #include <math.h>
  246.  
  247. #ifndef _LCOMPLEX_DEFINED
  248. struct lcomplex {
  249.    long x, y;
  250. };
  251. #define _LCOMPLEX_DEFINED
  252. #endif
  253.  
  254. #ifndef sqr
  255. #define sqr(x) ((x)*(x))
  256. #endif
  257.  
  258. #ifndef lsqr
  259. #define lsqr(x) (multiply((x),(x),bitshift))
  260. #endif
  261.  
  262. #define CMPLXmod(z)      (sqr((z).x)+sqr((z).y))
  263. #define CMPLXconj(z)    ((z).y =  -((z).y))
  264. #define LCMPLXmod(z)       (lsqr((z).x)+lsqr((z).y))
  265. #define LCMPLXconj(z)    ((z).y =  -((z).y))
  266.  
  267. typedef  struct complex CMPLX;
  268. typedef  struct lcomplex LCMPLX;
  269.  
  270. /* 3D stuff - formerly in 3d.h */
  271. #ifndef dot_product
  272. #define dot_product(v1,v2)  ((v1)[0]*(v2)[0]+(v1)[1]*(v2)[1]+(v1)[2]*(v2)[2])  /* TW 7-09-89 */
  273. #endif
  274.  
  275. #define    CMAX    4   /* maximum column (4 x 4 matrix) */
  276. #define    RMAX    4   /* maximum row     (4 x 4 matrix) */
  277. #define    DIM       3   /* number of dimensions */
  278.  
  279. typedef double MATRIX [RMAX] [CMAX];  /* matrix of doubles */
  280. typedef int   IMATRIX [RMAX] [CMAX];  /* matrix of ints    */
  281. typedef long  LMATRIX [RMAX] [CMAX];  /* matrix of longs   */
  282.  
  283. /* A MATRIX is used to describe a transformation from one coordinate
  284. system to another.  Multiple transformations may be concatenated by
  285. multiplying their transformation matrices. */
  286.  
  287. typedef double VECTOR [DIM];  /* vector of doubles */
  288. typedef int   IVECTOR [DIM];  /* vector of ints    */
  289. typedef long  LVECTOR [DIM];  /* vector of longs   */
  290.  
  291. /* A VECTOR is an array of three coordinates [x,y,z] representing magnitude
  292. and direction. A fourth dimension is assumed to always have the value 1, but
  293. is not in the data structure */
  294.  
  295.  
  296. #define PI 3.14159265358979323846
  297.  
  298. #define SPHERE      init3d[0]        /* sphere? 1 = yes, 0 = no  */
  299. #define ILLUMINE  (FILLTYPE>4)    /* illumination model        */
  300.  
  301. /* regular 3D */
  302. #define XROT      init3d[1]    /* rotate x-axis 60 degrees */
  303. #define YROT      init3d[2]    /* rotate y-axis 90 degrees */
  304. #define ZROT      init3d[3]    /* rotate x-axis  0 degrees */
  305. #define XSCALE      init3d[4]    /* scale x-axis, 90 percent */
  306. #define YSCALE      init3d[5]    /* scale y-axis, 90 percent */
  307.  
  308. /* sphere 3D */
  309. #define PHI1      init3d[1]    /* longitude start, 180     */
  310. #define PHI2      init3d[2]    /* longitude end ,   0        */
  311. #define THETA1      init3d[3]        /* latitude start,-90 degrees */
  312. #define THETA2      init3d[4]        /* latitude stop,  90 degrees */
  313. #define RADIUS      init3d[5]    /* should be user input */
  314.  
  315. /* common parameters */
  316. #define ROUGH      init3d[6]    /* scale z-axis, 30 percent */
  317. #define WATERLINE init3d[7]    /* water level            */
  318. #define FILLTYPE  init3d[8]    /* fill type            */
  319. #define ZVIEWER   init3d[9]    /* perspective view point   */
  320. #define XSHIFT      init3d[10]    /* x shift */
  321. #define YSHIFT      init3d[11]    /* y shift */
  322. #define XLIGHT      init3d[12]    /* x light vector coordinate */
  323. #define YLIGHT      init3d[13]    /* y light vector coordinate */
  324. #define ZLIGHT      init3d[14]    /* z light vector coordinate */
  325. #define LIGHTAVG  init3d[15]    /* number of points to average */
  326.  
  327. #ifndef TRUE
  328. #define TRUE 1
  329. #define FALSE 0
  330. #endif
  331.  
  332.  
  333. struct workliststuff    /* work list entry for std escape time engines */
  334. {
  335.     int xxstart;    /* screen window for this entry */
  336.     int xxstop;
  337.     int yystart;
  338.     int yystop;
  339.     int yybegin;    /* start row within window, for 2pass/ssg resume */
  340.     int sym;    /* if symmetry in window, prevents bad combines */
  341.     int pass;    /* for 2pass and solid guessing */
  342. };
  343. #define MAXCALCWORK 12
  344.  
  345. extern unsigned char trigndx[];
  346. extern void (*ltrig0)(), (*ltrig1)(), (*ltrig2)(), (*ltrig3)();
  347. extern void (*dtrig0)(), (*dtrig1)(), (*dtrig2)(), (*dtrig3)();
  348.  
  349. struct trig_funct_lst
  350. {
  351.     char *name;
  352.     void (*lfunct)();
  353.     void (*dfunct)();
  354.     void (*mfunct)();
  355. } ;
  356. extern struct trig_funct_lst trigfn[];
  357.  
  358. /* function prototypes */
  359.  
  360. extern    void   buzzer(int);
  361. extern    int    calcfract(void);
  362. extern    int    calcmand(void);
  363. extern    int    check_key(void);
  364. extern    int    complex_mult(CMPLX, CMPLX, CMPLX *);
  365. extern    int    complex_div(CMPLX, CMPLX, CMPLX *);
  366. extern    int    complex_power(CMPLX, int, CMPLX *);
  367. extern    int    cross_product(double [], double [], double []);
  368. extern    void   drawbox(int);
  369. extern    unsigned int emmallocate(unsigned int);
  370. extern    void   emmclearpage(unsigned int, unsigned int);
  371. extern    void   emmdeallocate(unsigned int);
  372. extern    unsigned int emmgetfree(void);
  373. extern    void   emmgetpage(unsigned int, unsigned int);
  374. extern    unsigned char far *emmquery(void);
  375. extern far_strlen( char far *);
  376. extern far_strcpy( char far *, char far *);
  377. extern far_strcmp( char far *, char far *);
  378. extern far_stricmp(char far *, char far *);
  379. extern far_strnicmp(char far *, char far *,int);
  380. extern far_strcat( char far *, char far *);
  381. extern far_memset( void far *, char     , int);
  382. extern far_memcpy( void far *, void far *, int);
  383. extern far_memcmp( void far *, void far *, int);
  384. extern far_memicmp(void far *, void far *, int);
  385. extern    void far *farmemalloc(long);
  386. extern    void   farmemfree(void far *);
  387. extern    int    getakey(void);
  388. extern    int    _fastcall getcolor(int, int);
  389. extern    void   _fastcall putcolor(int, int, int);
  390. extern    void   (_fastcall *plot)(int, int, int);
  391. extern    void   _fastcall symPIplot(int,int,int);
  392. extern    void   _fastcall symPIplot2J(int,int,int);
  393. extern    void   _fastcall symPIplot4J(int,int,int);
  394. extern    void   _fastcall symplot2(int,int,int);
  395. extern    void   _fastcall symplot2Y(int,int,int);
  396. extern    void   _fastcall symplot2J(int,int,int);
  397. extern    void   _fastcall symplot4(int,int,int);
  398. extern    void   _fastcall symplot2basin(int,int,int);
  399. extern    void   _fastcall symplot4basin(int,int,int);
  400. extern    void   _fastcall noplot(int,int,int);
  401. extern    void   _fastcall draw_line(int,int,int,int,int);
  402. extern    int    has_8087(void );
  403. extern    void   putstring(int,int,int,unsigned char far *);
  404. extern    int    putstringcenter(int,int,int,int,char far *);
  405. extern    int    stopmsg(int,unsigned char far *);
  406. extern    void   identity(MATRIX);
  407. extern    int    Juliafp(void);
  408. extern    int    longvmultpersp(LVECTOR, LMATRIX, LVECTOR, LVECTOR, LVECTOR, int);
  409. extern    int    longpersp(LVECTOR, LVECTOR,int);
  410. extern    int    Lambda(void);
  411. extern    int    Lambdasine(void);
  412. extern    void   mat_mul(MATRIX, MATRIX, MATRIX);
  413. extern    void   main(int, char *[]);
  414. extern    int    Mandelfp(void);
  415. extern    long   multiply(long, long, int);
  416. extern    long   divide(long, long, int);
  417. extern    int    Newton(void);
  418. extern    int    perspective(double *v);
  419. extern    void   cdecl Print_Screen(void);
  420. extern    void   scale(double, double, double, MATRIX);
  421. extern    void   setvideomode(int, int, int, int);
  422. extern    int    Sierpinski(void);
  423. extern    void   spindac(int, int);
  424. extern    void   trans(double, double, double, MATRIX);
  425. extern    int    vmult(VECTOR,MATRIX,VECTOR);
  426. extern    void   xrot(double, MATRIX);
  427. extern    void   yrot(double, MATRIX);
  428. extern    void   zrot(double, MATRIX);
  429. extern    void   (_fastcall *standardplot)(int,int,int);
  430. extern    void   _fastcall plot3dsuperimpose16b(int,int,int);
  431. extern    void   _fastcall plot3dsuperimpose16(int,int,int);
  432. extern    void   _fastcall plot3dsuperimpose256(int,int,int);
  433. extern    void   _fastcall plotIFS3dsuperimpose256(int,int,int);
  434. extern    void   _fastcall plot3dalternate(int,int,int);
  435.  
  436. /* for overlay return stack */
  437.  
  438. #define ENTER_OVLY(ovlyid)\
  439.    extern int active_ovly;\
  440.    int prev_ovly;\
  441.    prev_ovly = active_ovly;\
  442.    active_ovly = ovlyid
  443. #define EXIT_OVLY active_ovly = prev_ovly
  444.  
  445. #define OVLY_MISCOVL   1
  446. #define OVLY_CMDFILES  2
  447. #define OVLY_HELP      3
  448. #define OVLY_PROMPTS   4
  449. #define OVLY_LOADFILE  5
  450. #define OVLY_ROTATE    6
  451. #define OVLY_PRINTER   7
  452. #define OVLY_LINE3D    8
  453. #define OVLY_ENCODER   9
  454. #define OVLY_CALCFRAC 10
  455. #define OVLY_INTRO    11
  456.  
  457. /* keys */
  458. #define   INSERT     1082
  459. #define   DELETE     1083
  460. #define   PAGE_UP     1073
  461. #define   PAGE_DOWN     1081
  462. #define   CTL_HOME     1119
  463. #define   CTL_END     1117
  464. #define   LEFT_ARROW     1075
  465. #define   RIGHT_ARROW     1077
  466. #define   UP_ARROW     1072
  467. #define   DOWN_ARROW     1080
  468. #define   LEFT_ARROW_2     1115
  469. #define   RIGHT_ARROW_2  1116
  470. #define   UP_ARROW_2     1141
  471. #define   DOWN_ARROW_2     1145
  472. #define   HOME         1071
  473. #define   END         1079
  474. #define   ENTER      13
  475. #define   ENTER_2     1013
  476. #define   TAB         9
  477. #define   ESC         27
  478. #define   SPACE      32
  479. #define   F1         1059
  480. #define   F2         1060
  481. #define   F3         1061
  482. #define   F4         1062
  483. #define   F5         1063
  484. #define   F6         1064
  485. #define   F7         1065
  486. #define   F8         1066
  487. #define   F9         1067
  488. #define   F10         1068
  489.  
  490. /* text colors */
  491. #define BLACK       0
  492. #define BLUE       1
  493. #define GREEN       2
  494. #define CYAN       3
  495. #define RED       4
  496. #define MAGENTA    5
  497. #define BROWN       6 /* dirty yellow on cga */
  498. #define WHITE       7
  499. /* use values below this for foreground only, they don't work background */
  500. #define GRAY       8 /* don't use this much - is black on cga */
  501. #define L_BLUE       9
  502. #define L_GREEN   10
  503. #define L_CYAN      11
  504. #define L_RED      12
  505. #define L_MAGENTA 13
  506. #define YELLOW      14
  507. #define L_WHITE   15
  508. #define INVERSE 0x8000 /* when 640x200x2 text or mode 7, inverse */
  509. #define BRIGHT    0x4000 /* when mode 7, bright */
  510. /* and their use: */
  511. extern unsigned char txtcolor[];
  512. #define C_TITLE       txtcolor[0]+BRIGHT
  513. #define C_TITLE_DEV      txtcolor[1]
  514. #define C_HELP_HDG      txtcolor[2]+BRIGHT
  515. #define C_HELP_BODY      txtcolor[3]
  516. #define C_HELP_INSTR      txtcolor[4]
  517. #define C_HELP_LINK      txtcolor[5]+BRIGHT
  518. #define C_HELP_CURLINK      txtcolor[6]+INVERSE
  519. #define C_PROMPT_BKGRD      txtcolor[7]
  520. #define C_PROMPT_TEXT      txtcolor[8]
  521. #define C_PROMPT_LO      txtcolor[9]
  522. #define C_PROMPT_MED      txtcolor[10]
  523. #define C_PROMPT_HI      txtcolor[11]+BRIGHT
  524. #define C_PROMPT_INPUT      txtcolor[12]+INVERSE
  525. #define C_PROMPT_CHOOSE   txtcolor[13]+INVERSE
  526. #define C_CHOICE_CURRENT  txtcolor[14]+INVERSE
  527. #define C_CHOICE_SP_INSTR txtcolor[15]
  528. #define C_CHOICE_SP_KEYIN txtcolor[16]+BRIGHT
  529. #define C_GENERAL_HI      txtcolor[17]+BRIGHT
  530. #define C_GENERAL_MED      txtcolor[18]
  531. #define C_GENERAL_LO      txtcolor[19]
  532. #define C_GENERAL_INPUT   txtcolor[20]+INVERSE
  533. #define C_DVID_BKGRD      txtcolor[21]
  534. #define C_DVID_HI      txtcolor[22]+BRIGHT
  535. #define C_DVID_LO      txtcolor[23]
  536. #define C_STOP_ERR      txtcolor[24]+BRIGHT
  537. #define C_STOP_INFO      txtcolor[25]+BRIGHT
  538. #define C_TITLE_LOW      txtcolor[26]
  539. #define C_AUTHDIV1      txtcolor[27]+INVERSE
  540. #define C_AUTHDIV2      txtcolor[28]+INVERSE
  541. #define C_PRIMARY      txtcolor[29]
  542. #define C_CONTRIB      txtcolor[30]
  543.  
  544. /* structure passed to fullscreen_prompts */
  545. struct fullscreenvalues
  546. {
  547.    int type;   /* 'd' for decimal, 's' for string, '*' for comment */
  548.            /* 'i' for integer, 'y' for yes=1 no=0              */
  549.            /* 0x100+n for string of length n           */
  550.            /* 'l' for one of a list of strings                 */
  551.    union
  552.    {
  553.       double dval;    /* when type 'd' or 'f'  */
  554.       int    ival;    /* when type is 'i'      */
  555.       char   sval[16];    /* when type is 's'      */
  556.       char  *sbuf;    /* when type is 0x100+n  */
  557.       struct {        /* when type is 'l'      */
  558.      int  val;    /*   selected choice     */
  559.      int  vlen;    /*   char len per choice */
  560.      char **list;    /*   list of values     */
  561.      int  llen;    /*   number of values     */
  562.       } ch;
  563.    } uval;
  564. };
  565.  
  566.