home *** CD-ROM | disk | FTP | other *** search
/ GRIPS 2: Government Rast…rocessing Software & Data / GRIPS_2.cdr / dos / imdisp / source / imdef.h < prev    next >
Text File  |  1990-12-03  |  4KB  |  77 lines

  1. /****  IMDEF.H
  2.  
  3.        Header file for IMDEF.H
  4.        Built by A. Warnock, ST Systems Corp., NASA/GSFC 5/90
  5.        This file contains only the various defined symbols for IMDISP
  6.        and it's associated modules.
  7.  
  8. ****/
  9.  
  10. /* * * *  External Function Prototypes * * * */
  11.  
  12.  
  13. /* * * *  External Global Variables * * * */
  14.  
  15. /* * * *  External Global Symbols * * * */
  16.  
  17. #define ALLOC_DTA            26    /* MS-DOS Int 21h Service */
  18. #define CONTROL_LEFT_ARROW  243    /* Extended ASCII code */
  19. #define CONTROL_RIGHT_ARROW 244    /* Extended ASCII code */
  20. #define CURSORSIZE            9    /* The size of the cursor box square */
  21. #define DOWN_ARROW          208    /* Extended ASCII code */
  22. #define DOWN_LEFT_ARROW     207    /* Extended ASCII code */
  23. #define DOWN_RIGHT_ARROW    209    /* Extended ASCII code */
  24. #define END                 207    /* Extended ASCII code */
  25. #define ESCAPE               27    /* ASCII code */
  26. #define FALSE                 0
  27. #define FREE                  1    /* FREE block indicator        */
  28. #define GET_CUR_DIR        0x47    /* MS-DOS Int 21h Service */
  29. #define HELP                 63
  30. #define HOME                199    /* Extended ASCII code */
  31. #define INC                  32
  32. #define ImBufMax          30720    /* Size of the buffer for each open file */
  33.                                    /* the possible logical block sizes */
  34.                                    /* Buffer must be integral number of times */
  35. #define LEFT_ARROW          203    /* Extended ASCII code */
  36. #define LabelBufferLen     8192    /* Amount of label read in to parse */
  37. #define MAXBLOCK         0xffff    /* Maximum block size          */
  38. #define MAXDISPNL           768    /* The maximum number of lines of all displays */
  39. #define MAXDISPNS          1024    /* The maximum number of samples of all displays */
  40. #define MAXFONTSTROKES     3000    /* The size of the text font array */
  41. #define MAXNUMFILES         512
  42. #define MINALLOC            128    /* Minimum MBSize value */
  43. #define MINUSSTEP            45    /* ASCII code */
  44. #define MaxNumImages          3    /* Maximum number of open images */
  45. #define MaxOpenFiles         10    /* Maximum number of open files at one time */
  46. #define NALLOC               16    /* Number of bytes per paragraph */
  47. #define NCOMMANDS            35    /* Number of IMDISP commands */
  48. #define PAGELEN       dispnl/20
  49. #define PLUSSTEP             43    /* ASCII code */
  50. #define P_DATA            0x3c9    /* VGA Palette Data port  */
  51. #define P_READ            0x3c7    /* VGA Palette Read port  */
  52. #define P_WRITE           0x3c8    /* VGA Palette Write port */
  53. #define RETURN               13    /* ASCII code */
  54. #define RIGHT_ARROW         205    /* Extended ASCII code */
  55. #define SELECT_ITEM          13    /* ASCII code */
  56. #define SEL_DRIVE            14    /* MS-DOS Int 21h Service */
  57. #define SRCH_FIRST           78    /* MS-DOS Int 21h Service */
  58. #define SRCH_NEXT            79    /* MS-DOS Int 21h Service */
  59. #define TRUE                  1
  60. #define UP_ARROW            200    /* Extended ASCII code */
  61. #define UP_LEFT_ARROW       199    /* Extended ASCII code */
  62. #define UP_RIGHT_ARROW      201    /* Extended ASCII code */
  63. #define WHAT_DRIVE           25    /* MS-DOS Int 21h Service */
  64. #define X_DIR                59    /* MS-DOS Int 21h Service */
  65.  
  66. #define DISPMAXNUM            3*dispnl/20
  67. #define MAXALLOC   NALLOC * ( ( MAXBLOCK-HSIZE-SSIZE ) / NALLOC )
  68. #define SSIZE      sizeof ( SUNIT  )   /* Size of SUNIT */
  69.  
  70. /* #define MSC60 */                /* Uncomment this if using MSC v6.0 */
  71.  
  72. /* * * *  External Global Functions * * * */
  73.  
  74. #define Round(x)  ( ((x) > 0.0) ? (int)((x)+0.5) : (int)((x)-0.5) )
  75. #define READ_PALETTE(index,r,g,b){outp(P_READ,index);r=inp(P_DATA);g=inp(P_DATA);b=inp(P_DATA);}
  76. #define SET_PALETTE(index,r,g,b) {outp(P_WRITE,index);outp(P_DATA,r);outp(P_DATA,g);outp(P_DATA,b);}
  77.