home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / k / ksh48.zip / sh / edit.h < prev    next >
C/C++ Source or Header  |  1992-08-25  |  2KB  |  87 lines

  1. /* NAME:
  2.  *      edit.h - globals for edit modes
  3.  *
  4.  * DESCRIPTION:
  5.  *      This header defines various global edit objects.
  6.  *
  7.  * SEE ALSO:
  8.  *
  9.  *
  10.  * RCSid:
  11.  *      $Id: edit.h,v 1.4 1992/08/12 14:15:25 sjg Exp $
  12.  *
  13.  */
  14.  
  15. /* some useful #defines */
  16. #ifdef EXTERN
  17. # define _I_(i) = i
  18. #else
  19. # define _I_(i)
  20. # define EXTERN extern
  21. # define EXTERN_DEFINED
  22. #endif
  23.  
  24. #define    BEL        0x07
  25.  
  26. /*
  27.  * The following are used for my horizontal scrolling stuff
  28.  */
  29. EXTERN    char   *xbuf;        /* beg input buffer */
  30. EXTERN    char   *xend;        /* end input buffer */
  31. EXTERN char    *xcp;        /* current position */
  32. EXTERN char    *xep;        /* current end */
  33. EXTERN char    *xbp;        /* start of visible portion of input buffer */
  34. EXTERN char    *xlp;        /* last char visible on screen */
  35. EXTERN int    x_adj_ok;
  36. /*
  37.  * we use x_adj_done so that functions can tell
  38.  * whether x_adjust() has been called while they are active.
  39.  */
  40. EXTERN int    x_adj_done;
  41.  
  42. EXTERN int    x_cols _I_(80);    /* default to 80 cols */
  43. EXTERN int    x_col;
  44. EXTERN int    x_displen;
  45. EXTERN int    x_arg;        /* general purpose arg */
  46.  
  47. EXTERN int    x_do_init;        /* set up tty modes */
  48. EXTERN int    ed_erase, ed_kill, ed_werase, ed_intr, ed_quit;
  49.  
  50. #ifdef DEBUG
  51. # define _D_(x) x
  52. #else
  53. # define _D_(x)
  54. #endif
  55.  
  56. /****  edit.c  ****/
  57. int             x_read      ARGS((int fd, char *buf, size_t len));
  58. int             x_getc      ARGS((void));
  59. void            x_flush     ARGS((void));
  60. void            x_adjust    ARGS((void));
  61. void            x_putc      ARGS((int c));
  62. int             x_debug_info ARGS((void));
  63. void            x_puts      ARGS((char *s));
  64. void            x_init      ARGS((void));
  65. bool_t          x_mode      ARGS((bool_t onoff));
  66. bool_t          x_mode      ARGS((bool_t onoff));
  67. int             promptlen   ARGS((char *cp));
  68.  
  69. /****  emacs.c  ****/
  70. void            x_redraw    ARGS((int limit));
  71. char*        x_lastcp    ARGS((void));
  72. EXTERN int xlp_valid _I_(0);
  73.  
  74. /* This lot goes at the END */
  75. /* be sure not to interfere with anyone else's idea about EXTERN */
  76. #ifdef EXTERN_DEFINED
  77. # undef EXTERN_DEFINED
  78. # undef EXTERN
  79. #endif
  80. #undef _I_
  81. /*
  82.  * Local Variables:
  83.  * version-control:t
  84.  * comment-column:40
  85.  * End:
  86.  */
  87.