home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_progs / txttools / view.lha / source / View.h < prev   
C/C++ Source or Header  |  1992-05-15  |  3KB  |  124 lines

  1. /*-- AutoRev header do NOT edit!
  2. *
  3. *   Program         :   View.h
  4. *   Copyright       :   Copyright © 1991-92 Jaba Development
  5. *   Author          :   Jan van den Baard
  6. *   Creation Date   :   04-Apr-92
  7. *   Current version :   2.0
  8. *   Translator      :   Dice v2.06.40
  9. *
  10. *   REVISION HISTORY
  11. *
  12. *   Date          Version         Comment
  13. *   ---------     -------         ------------------------------------------
  14. *   04-Apr-92     2.0             Main program header file. (rewrite)
  15. *
  16. *-- REV_END --*/
  17.  
  18. /*
  19.  * Include the system headers
  20.  */
  21. #include <exec/types.h>
  22. #include <exec/memory.h>
  23. #include <exec/devices.h>
  24. #include <dos/dos.h>
  25. #include <dos/dostags.h>
  26. #include <dos/rdargs.h>
  27. #include <libraries/gadtools.h>
  28. #include <libraries/reqtools.h>
  29. #include <libraries/nofrag.h>
  30. #include <libraries/ppbase.h>
  31. #include <libraries/commodities.h>
  32. #include <devices/input.h>
  33. #include <devices/inputevent.h>
  34. #include <devices/console.h>
  35. #include <devices/keymap.h>
  36. #include <devices/printer.h>
  37. #include <intuition/intuition.h>
  38. #include <intuition/intuitionbase.h>
  39. #include <intuition/sghooks.h>
  40. #include <hardware/custom.h>
  41. #include <hardware/dmabits.h>
  42. #include <graphics/displayinfo.h>
  43. #include <graphics/gfxmacros.h>
  44. #include <workbench/workbench.h>
  45. #include <workbench/startup.h>
  46.  
  47. #include <string.h>
  48. #include <stdlib.h>
  49.  
  50. #include <clib/exec_protos.h>
  51. #include <clib/dos_protos.h>
  52. #include <clib/gadtools_protos.h>
  53. #include <clib/reqtools_protos.h>
  54. #include <clib/nofrag_protos.h>
  55. #include <clib/powerpacker_protos.h>
  56. #include <clib/commodities_protos.h>
  57. #include <clib/intuition_protos.h>
  58. #include <clib/alib_protos.h>
  59. #include <clib/input_protos.h>
  60. #include <clib/console_protos.h>
  61. #include <clib/graphics_protos.h>
  62. #include <clib/alib_stdio_protos.h>
  63. #include <clib/utility_protos.h>
  64.  
  65. #define __STKARGS__
  66. #include "ascii.h"
  67.  
  68. #define Prototype   extern
  69. #define Local       static
  70.  
  71. #include "Protos.h"
  72.  
  73. #define ESC         0x1b
  74. #define CSI         0x9b
  75. #define FF          0x0c
  76.  
  77. #define MaxCol()            ( vwWindow->Width / vwFont->tf_XSize )
  78. #define ClrLin()            SetAPen( vwRPort, 2 ); RectFill( vwRPort, 0, 0, vwWindow->Width, vwFont->tf_YSize - 1 );
  79. #define ClrBlk()            setmem( &vwBlocks[0], 10 * sizeof( struct TextBlock ), NULL );
  80. #define CxOn( b )           ActivateCxObj( b, TRUE );
  81. #define CxOff( b )          ActivateCxObj( b, FALSE );
  82. #define Busy()              rtSetWaitPointer( vwWindow );
  83. #define Ready()             ClearPointer( vwWindow );
  84.  
  85. #define CX_VERSION          "2.0"
  86.  
  87. #ifndef __DETACH
  88. #define CX_NAME             "View"
  89. #else
  90. #define CX_NAME             "ViewD"
  91. #endif
  92.  
  93. #define CX_DESCRIPTION      "Ascii text file viewer."
  94. #define CX_COPYRIGHT        "© 1991-92 Jaba Development"
  95. #define CX_TITLE            CX_NAME " " CX_VERSION ", " CX_COPYRIGHT
  96.  
  97. #define CXC_VIEW            1
  98. #define CXC_FLUSH           2
  99. #define CXC_QUIT            3
  100.  
  101. #define FR_SAVE             0
  102. #define FR_LOAD             1
  103.  
  104. #define SR_FORWARD          0
  105. #define SR_BACKWARD         1
  106.  
  107. #define GT_PERC             0
  108. #define GT_LINE             1
  109.  
  110. /*
  111.  * Three different print modes possible.
  112.  */
  113. #define PRT_FILE    0
  114. #define PRT_PAGE    1
  115. #define PRT_BLOCK   2
  116.  
  117. /*
  118.  * The structure used to keep track of text-block markers.
  119.  */
  120. struct TextBlock {
  121.     struct Line     *TopLine;
  122.     struct Line     *BottomLine;
  123. };
  124.