home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / STVI369G.ZIP / OPS.H < prev    next >
C/C++ Source or Header  |  1990-05-01  |  1KB  |  55 lines

  1. /* $Header: /nw/tony/src/stevie/src/RCS/ops.h,v 1.2 89/07/19 08:08:21 tony Exp $
  2.  *
  3.  * Macros and declarations for the operator code in ops.c
  4.  */
  5.  
  6. /*
  7.  * Operators
  8.  */
  9. #define    NOP    0        /* no pending operation */
  10. #define    DELETE    1
  11. #define    YANK    2
  12. #define    CHANGE    3
  13. #define    LSHIFT    4
  14. #define    RSHIFT    5
  15. #define    FILTER    6
  16. #define    TILDE    7
  17.  
  18. extern    int    operator;        /* current pending operator */
  19.  
  20. /*
  21.  * When a cursor motion command is made, it is marked as being a character
  22.  * or line oriented motion. Then, if an operator is in effect, the operation
  23.  * becomes character or line oriented accordingly.
  24.  *
  25.  * Character motions are marked as being inclusive or not. Most char.
  26.  * motions are inclusive, but some (e.g. 'w') are not.
  27.  */
  28.  
  29. /*
  30.  * Cursor motion types
  31.  */
  32. #define    MBAD    (-1)        /* 'bad' motion type marks unusable yank buf */
  33. #define    MCHAR    0
  34. #define    MLINE    1
  35.  
  36. extern    int    mtype;            /* type of the current cursor motion */
  37. extern    bool_t    mincl;            /* true if char motion is inclusive */
  38.  
  39. extern    LPTR    startop;        /* cursor pos. at start of operator */
  40.  
  41. /*
  42.  * Macro to get current character from a LPTR * value.
  43.  */
  44. #define    CHAR( lpp )    lpp->linep->s[lpp->index]
  45.  
  46. /*
  47.  * Functions defined in ops.c
  48.  */
  49. void    doshift(), dodelete(), doput(), dochange(), dofilter();
  50. #ifdef    TILDEOP
  51. void    dotilde();
  52. #endif
  53. bool_t    dojoin(), doyank();
  54. void    startinsert();
  55.