home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 316.lha / EtaleFileReader / tdm.h < prev    next >
C/C++ Source or Header  |  1989-11-30  |  4KB  |  106 lines

  1. /*  tdm.h  --  header file for tdm.c        */
  2. #define TDM_H
  3. #include "exec/types.h"
  4. #include "exec/nodes.h"
  5. #include "exec/memory.h"
  6. #include "libraries/dosextens.h"
  7. #include "intuition/intuitionbase.h"
  8. #include "stdio.h"
  9. #define NULB  ((UBYTE)0)
  10. #define ONEB  ((UBYTE)1)
  11. #define JAMX  JAM1
  12. #define CTRL_C  3
  13. #define ERRSTRLN  127
  14. #define MAXSTRLN  255
  15. #define HSL  7
  16. #define LINETOOBIG  0x7FFFFFFL
  17. struct LinePart
  18.    {
  19.    ULONG lp_Address;
  20.    UBYTE lp_Length;
  21.    BYTE lp_Move;
  22.    UBYTE lp_FontStyle;         /*  c.f. "style" arg of SetSoftStyle  */
  23.    BYTE lp_DrawStyle;          /*  c.f. "mode" arg of SetDrMd        */
  24.    struct LinePart *lp_Next;
  25.    struct LinePart *lp_Prev;
  26.    LONG lp_Trans;
  27.    };
  28. #define LPSZ  ((ULONG)sizeof(struct LinePart))
  29. #define MAX(a,b)  ((a)>(b)?(a):(b))
  30. #define MIN(a,b)  ((a)<(b)?(a):(b))
  31. #define ABS(x)  ((x<0)?(-(x)):(x))
  32. /*****  GLOBALS  *****/
  33. struct GfxBase *GfxBase;
  34. struct IntuitionBase *IntuitionBase;
  35. LONG txtline;         /*  line number of line waiting for screen          */
  36. LONG golinem;         /*  line number passed back to main by txttw        */
  37. LONG golinet;         /*  line number decided by main, passed to txttw    */
  38. UWORD screenline;     /*  current screen line number                      */
  39. SHORT maxrowpix;      /*  last printable y arg. in pixels for RastPort    */
  40. SHORT delta;          /*  size in pixels of partial line move             */
  41. WORD maxline;         /*  number of screen lines for text                 */
  42. ULONG linesize;       /*  number of lines in stream                       */
  43. ULONG enable;         /*  alg. font styling mask from AskSoftStyle        */
  44. ULONG style;          /*  the last request to SetSoftStyle                */  
  45. ULONG savestyle;      /*  the last return from SetSoftStyle               */
  46. LONG drawmode;        /*  current drawmode in the document                */
  47. struct Window *mw;    /*  the Window we open                              */
  48. struct RastPort *rp;  /*  -- and its RastPort                             */
  49. FILE *stream;         /*  either file argument or stdin                   */
  50. FILE *filearg;        /*  the file being read, if it's not stdin          */
  51. UBYTE *instr;         /*  buffer for the last string taken in             */
  52. UBYTE *pvstr;         /*  buffer for the previous string                  */
  53. UBYTE gflag;          /*  user wants to start at line no. found in stdin  */
  54. UBYTE tflag;          /*  user wants screen to scroll without pause       */
  55. UBYTE *errsp[10];     /*  pointers for errstr assembly                    */
  56. UBYTE errstr[ERRSTRLN+1];    /*  buffer for messages to user              */
  57. /*********************/
  58. UBYTE             *bfgets();
  59. UBYTE              getdirs();
  60. struct Window     *makewindow();
  61. SHORT              ltoa();
  62. LONG               numget();
  63. struct LinePart   *parseline();
  64. LONG               tnump();
  65. SHORT              txttw();
  66. SHORT              writeline();
  67. /***********************************/
  68. FILE              *fopen();
  69. UBYTE             *strcat();
  70. UBYTE             *strcpy();
  71. /***********************************/
  72. void              *AllocMem();
  73. ULONG              AskSoftStyle();
  74. void               ClearScreen();
  75. void               Close();
  76. void               CloseLibrary();
  77. void               CloseWindow();
  78. void               Delay();
  79. void               DisplayBeep();
  80. void               Exit();
  81. void               FreeMem();
  82. struct Message    *GetMsg();
  83. struct FileHandle *Input();
  84. SHORT              IsInteractive();
  85. ULONG              LockIBase();
  86. void               ModifyIDCMP();
  87. void               Move();
  88. struct FileHandle *Open();
  89. struct Library    *OpenLibrary();
  90. struct Window     *OpenWindow();
  91. struct FileHandle *Output();
  92. LONG               Read();
  93. void               ReplyMsg();
  94. void               ScrollRaster();
  95. LONG               Seek();
  96. void               SetAPen();
  97. void               SetBPen();
  98. void               SetDrMd();
  99. ULONG              SetSoftStyle();
  100. LONG               Text();
  101. LONG               TextLength();
  102. void               UnlockIBase();
  103. LONG               Wait();
  104. SHORT              WaitForChar();
  105. LONG               Write();
  106.