home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / SCREDIT2.ZIP / SCREDIT.H < prev    next >
Encoding:
C/C++ Source or Header  |  1989-02-27  |  7.2 KB  |  231 lines

  1. /*
  2. ******************************************************************
  3. *          ScrEdit.H - Turbo C 1.5, 2.0 interface header         *
  4. *                                                                *
  5. *                <C>opyright 1989 by iHn Systems                 *
  6. *                         P.O. Box 4436                          *
  7. *                    Pocatello, Idaho 83205-4436                 *
  8. *                                                                *
  9. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*
  10. * Building a ScrEdit.Lib. Before using Turbo ScrEdit you will    *
  11. * wall want to build library models for LARGE, and HUGE. The     *
  12. * COMPACT object code module must be linked in as a .OBJ file.   *
  13. *                                                                *
  14. * Repeat the following steps for each memory modelthat you will  *
  15. * be using:                                                      *
  16. *                                                                *
  17. * 1. Select on of the memory models and compile ScrEdit.C to an  *
  18. *    object file "ScrEdit.OBJ".                                  *
  19. *                                                                *
  20. * 2. For LARGE and COMPACT models use TLIB to build the library. *
  21. *       For LARGE:   TLIB /E ScrEdit +-LScrEdit                  *
  22. *       For HUDGE:   TLIB /E ScrEdit +-HScrEdit                  *
  23. *                                                                *
  24. * 3. Create a project file for each of the memory models of your *
  25. *    choice:                                                     *
  26. *       For COMPACT: YourProg ScrEdit  other.lib ...             *
  27. *       For LARGE:   YourProg LScrEdit.Lib other.lib ...         *
  28. *       For HUGE:    Yourprog HScrEdit.Lib other.lib ...         *
  29. *                                                                *
  30. * 4. To link in the object code from the Integrated Programming  *
  31. *    Environment:                                                *
  32. *      - use the PROJECT/PROJECT NAME option of the editor menu  *
  33. *        and specifie the project file that fits the memory model*
  34. *        you have specified in for OPTION/COMPILER.              *
  35. *                                                                *
  36. ******************************************************************/
  37.  
  38. #ifndef SCREDIT_DEFINED
  39.    #define SCREDIT_DEFINED
  40.    typedef union
  41.      {
  42.      struct s1
  43.          {
  44.          char           filler;
  45.          char           s_name         [128] [17];
  46.          unsigned char  s_number       [128];
  47.          int            s_recordnumber [128];
  48.          int            s_fieldsrecno  [128];
  49.          int            s_rangerecno   [128];
  50.          unsigned char  s_first        [128];
  51.          unsigned char  s_count        [128];
  52.          unsigned char  s_compiledind  [128];
  53.          int            s_rangerecnext;
  54.          int            s_rangelinenext;
  55.          int            s_sfiled;
  56.          }A;
  57.      struct s2
  58.          {
  59.          char           filler;
  60.          char           s_video     [3840];
  61.          char           s_workarray [80] [2];
  62.          }B;
  63.      struct s3
  64.          {
  65.          char          filler;
  66.          unsigned char s_fieldname     [128] [17];
  67.          unsigned char s_row           [128];
  68.          unsigned char s_col           [128];
  69.          unsigned char s_len           [128];
  70.          unsigned char s_type          [128];
  71.          unsigned char s_prev          [128];
  72.          unsigned char s_next          [128];
  73.          unsigned char s_datalen       [128];
  74.          unsigned char s_normalbg      [128];
  75.          unsigned char s_normalfg      [128];
  76.          unsigned char s_promptbg      [128];
  77.          unsigned char s_promptfg      [128];
  78.          unsigned char s_displaybg     [128];
  79.          unsigned char s_displayfg     [128];
  80.          unsigned int  s_rangenextrec  [128];
  81.          unsigned char s_rangenextline [128];
  82.          }C;
  83.      struct s4
  84.          {
  85.          char          filler;
  86.          char          s_rangelist [51] [79];
  87.          int           s_rangerec  [51];
  88.          unsigned char s_rangeline [51];
  89.          }D;
  90.      } s_rec_def;
  91.  
  92.    s_rec_def *s_indx, *s_record, *s_field;
  93.  
  94.    int long S_CursorOld;
  95.  
  96.    enum S_Cursors {S_OFF,S_BOLD,S_NORMAL,S_GETCURSOR};
  97.    enum S_Cursors S_Cursor;
  98.    char S_Sound;
  99.    char S_NumLock;
  100.    char S_Fkey;
  101.    char S_Shift;
  102.    char S_Alt;
  103.    char S_Ctrl;
  104.    char S_Esc;
  105.    char S_F1;
  106.    char S_F2;
  107.    char S_F3;
  108.    char S_F4;
  109.    char S_F5;
  110.    char S_F6;
  111.    char S_F7;
  112.    char S_F8;
  113.    char S_F9;
  114.    char S_F10;
  115.    char S_F11;
  116.    char S_F12;
  117.    char S_Enter;
  118.    char S_BkSp;
  119.    char S_Home;
  120.    char S_Up;
  121.    char S_PgUp;
  122.    char S_Left;
  123.    char S_Right;
  124.    char S_End;
  125.    char S_Down;
  126.    char S_PgDn;
  127.    char S_Ins;
  128.    char S_Del;
  129.    char S_Tab;
  130.    char S_ShowStatus;
  131.    char S_ScrollLock;
  132.    char S_Caps;
  133.    char S_LeftShift;
  134.    char S_RightShift;
  135.    char S_InsertMode;
  136.    char S_InsertKey;
  137.    char S_DeleteKey;
  138.    char S_BackSpace;
  139.    int  S_FirstField;
  140.    int  S_Point;
  141.    int  S_Freq;
  142.    int  S_Dur;
  143.    unsigned char S_WorkStr [81];
  144.    unsigned char S_Msg [81];
  145.    unsigned char S_EditStr [81];
  146.    unsigned char S_Blanks [81];
  147.    unsigned char S_Ch;
  148.    unsigned char S_ChangeScreen;
  149.    unsigned char S_FirstTime = 1;
  150.    unsigned char S_Sound_Hold;
  151.    unsigned char S_Mono;
  152.    unsigned char S_UpCase;
  153.    unsigned char S_Validate_Finished;
  154.    unsigned char S_ScreenValid;
  155.    unsigned char S_Wait;
  156.    unsigned char S_LeftArrow;
  157.    unsigned char S_RightArrow;
  158.    unsigned char S_PosLastChar;
  159.    int
  160.      S_RecNo,
  161.      S_ValidateLine,
  162.      S_ValidateField,
  163.      S_Str_Pos,
  164.      S_Attrib,
  165.      S_MessBg,
  166.      S_MessFg,
  167.      S_NormBg,
  168.      S_NormFg,
  169.      S_Num,
  170.      S_F_Key,
  171.      S_Direction,
  172.      S_Decimal,
  173.      S_PointHold,
  174.      S_FieldNum,
  175.      S_Sub,
  176.      S_CurrLine,
  177.      S_NextRec;
  178.  
  179.   unsigned char
  180.      S_NewStr       [81],
  181.      S_Padding      [81],
  182.      S_WorkAttrib   [81],
  183.      S_NormAttrib   [81],
  184.      S_StatusPrev   [41],
  185.      S_StatusLine   [41],
  186.      S_StatusAttrib [41],
  187.      S_Ins_Str      [2],
  188.      S_NextLine,
  189.      S_Reverse,
  190.      S_Skip,
  191.      S_Matched,
  192.      S_Min_Max_Loaded,
  193.      S_EndofLine,
  194.      S_InsideIf,
  195.      S_CurStr[81],
  196.      S_EditStrHold[81],
  197.      S_CompMin[81],
  198.      S_CompMax[81],
  199.      S_CompField[81],
  200.      S_OpCode[81],
  201.      S_OpCode1[81];
  202.  
  203.   double
  204.      S_Round [8] = {.5,.5,.05,.005,.0005,.00005,.000005,.0000005},
  205.      S_Numeric,
  206.      S_CompMin_Numeric,
  207.      S_CompMax_Numeric;
  208. #endif
  209.  
  210. #ifdef __TINY__ or __SMALL__ or __MEDIUM__
  211.    #error "TINY,SMALL, and MEDIUM memory models is are not supported";
  212. #endif
  213.  
  214. void S_ResetKeyFlags (void);
  215. void S_SetCursor(char);
  216. void S_Init(void);
  217. void S_OpenScreenFile (char*);
  218. void S_CloseScreenFile(void);
  219. void S_Beep(int,int);
  220. void S_Write (int,int,int,char*,char*);
  221. void S_DisplayMessage(int,int,char);
  222. void S_LoadScreen(char *);
  223. void S_DisplayScreenField(int,int,int,int,int,
  224.                          int,int,int,int,char);
  225. void S_EditString (int,int,int,int,int,
  226.                   int,int,int,int,int,
  227.                   int,int,char*);
  228. void S_NextKey(void);
  229. void S_ReadField(void);
  230. void S_ReadScreen(void);
  231.