2010-07-11 13:54:48 -04:00
|
|
|
/* edef.h
|
2005-05-31 11:50:56 -04:00
|
|
|
*
|
|
|
|
* Global variable definitions
|
|
|
|
*
|
|
|
|
* written by Dave G. Conroy
|
|
|
|
* modified by Steve Wilhite, George Jones
|
|
|
|
* greatly modified by Daniel Lawrence
|
|
|
|
* modified by Petri Kutvonen
|
|
|
|
*/
|
2010-07-11 13:54:48 -04:00
|
|
|
#ifndef EDEF_H_
|
|
|
|
#define EDEF_H_
|
2005-05-31 11:50:56 -04:00
|
|
|
|
2013-09-20 06:10:30 -04:00
|
|
|
#include "buffer.h"
|
2013-05-18 02:21:28 -04:00
|
|
|
#include "estruct.h"
|
|
|
|
|
2005-09-30 18:33:51 -04:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
2010-07-11 13:54:48 -04:00
|
|
|
/* Some global fuction declarations. */
|
2005-09-30 20:52:20 -04:00
|
|
|
typedef int (*fn_t)(int, int);
|
|
|
|
|
2010-07-11 13:54:48 -04:00
|
|
|
/* Initialized global external declarations. */
|
2005-05-31 11:50:56 -04:00
|
|
|
|
2005-09-30 18:26:09 -04:00
|
|
|
extern int fillcol; /* Fill column */
|
2012-07-10 20:42:19 -04:00
|
|
|
extern int kbdm[]; /* Holds kayboard macro data */
|
2005-09-30 18:26:09 -04:00
|
|
|
extern char pat[]; /* Search pattern */
|
|
|
|
extern char rpat[]; /* Replacement pattern */
|
|
|
|
extern char *execstr; /* pointer to string to execute */
|
|
|
|
extern char golabel[]; /* current line to go to */
|
|
|
|
extern int execlevel; /* execution IF level */
|
|
|
|
extern int eolexist; /* does clear to EOL exist? */
|
|
|
|
extern int revexist; /* does reverse video exist? */
|
|
|
|
extern int flickcode; /* do flicker supression? */
|
2013-06-08 23:21:35 -04:00
|
|
|
extern const char *modename[]; /* text names of modes */
|
|
|
|
extern const char *mode2name[]; /* text names of modes */
|
|
|
|
extern const char modecode[]; /* letters to represent modes */
|
2005-09-30 18:26:09 -04:00
|
|
|
extern int gmode; /* global editor mode */
|
|
|
|
extern int gflags; /* global control flag */
|
|
|
|
extern int gfcolor; /* global forgrnd color (white) */
|
|
|
|
extern int gbcolor; /* global backgrnd color (black) */
|
|
|
|
extern int gasave; /* global ASAVE size */
|
|
|
|
extern int gacount; /* count until next ASAVE */
|
|
|
|
extern int sgarbf; /* State of screen unknown */
|
|
|
|
extern int mpresf; /* Stuff in message line */
|
|
|
|
extern int clexec; /* command line execution flag */
|
|
|
|
extern int mstore; /* storing text to macro flag */
|
|
|
|
extern int discmd; /* display command flag */
|
|
|
|
extern int disinp; /* display input characters */
|
2010-02-15 21:09:42 -05:00
|
|
|
extern struct buffer *bstore; /* buffer to store macro text to */
|
2005-09-30 18:26:09 -04:00
|
|
|
extern int vtrow; /* Row location of SW cursor */
|
|
|
|
extern int vtcol; /* Column location of SW cursor */
|
|
|
|
extern int ttrow; /* Row location of HW cursor */
|
|
|
|
extern int ttcol; /* Column location of HW cursor */
|
|
|
|
extern int lbound; /* leftmost column of current line
|
|
|
|
being displayed */
|
|
|
|
extern int taboff; /* tab offset for display */
|
|
|
|
extern int metac; /* current meta character */
|
|
|
|
extern int ctlxc; /* current control X prefix char */
|
|
|
|
extern int reptc; /* current universal repeat char */
|
|
|
|
extern int abortc; /* current abort command char */
|
|
|
|
|
|
|
|
extern int quotec; /* quote char during mlreply() */
|
|
|
|
extern int tabmask;
|
|
|
|
extern char *cname[]; /* names of colors */
|
2010-08-08 22:03:42 -04:00
|
|
|
extern struct kill *kbufp; /* current kill buffer chunk pointer */
|
|
|
|
extern struct kill *kbufh; /* kill buffer header pointer */
|
2005-09-30 18:26:09 -04:00
|
|
|
extern int kused; /* # of bytes used in KB */
|
2010-08-01 17:37:28 -04:00
|
|
|
extern struct window *swindow; /* saved window pointer */
|
2012-07-10 20:42:19 -04:00
|
|
|
extern int *kbdptr; /* current position in keyboard buf */
|
|
|
|
extern int *kbdend; /* ptr to end of the keyboard */
|
2013-09-20 06:10:30 -04:00
|
|
|
|
|
|
|
#if 0
|
|
|
|
#define STOP 0 /* keyboard macro not in use */
|
|
|
|
#define PLAY 1 /* playing */
|
|
|
|
#define RECORD 2 /* recording */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
STOP, PLAY, RECORD
|
|
|
|
} kbdstate ;
|
|
|
|
extern kbdstate kbdmode ; /* current keyboard macro mode */
|
2005-09-30 18:26:09 -04:00
|
|
|
extern int kbdrep; /* number of repetitions */
|
|
|
|
extern int restflag; /* restricted use? */
|
|
|
|
extern int lastkey; /* last keystoke */
|
|
|
|
extern int seed; /* random number seed */
|
|
|
|
extern long envram; /* # of bytes current in use by malloc */
|
|
|
|
extern int macbug; /* macro debuging flag */
|
|
|
|
extern char errorm[]; /* error literal */
|
|
|
|
extern char truem[]; /* true literal */
|
|
|
|
extern char falsem[]; /* false litereal */
|
|
|
|
extern int cmdstatus; /* last command status */
|
|
|
|
extern char palstr[]; /* palette string */
|
|
|
|
extern int saveflag; /* Flags, saved with the $target var */
|
|
|
|
extern int rval; /* return value of a subprocess */
|
2005-05-31 11:50:56 -04:00
|
|
|
#if PKCODE
|
2005-09-30 18:26:09 -04:00
|
|
|
extern int justflag; /* justify, don't fill */
|
2005-05-31 11:50:56 -04:00
|
|
|
#endif
|
2005-09-30 18:26:09 -04:00
|
|
|
extern int overlap; /* line overlap in forw/back page */
|
|
|
|
extern int scrollcount; /* number of lines to scroll */
|
2005-05-31 11:50:56 -04:00
|
|
|
|
2010-07-11 13:54:48 -04:00
|
|
|
/* Uninitialized global external declarations. */
|
2005-05-31 11:50:56 -04:00
|
|
|
|
2005-09-30 18:26:09 -04:00
|
|
|
extern int currow; /* Cursor row */
|
|
|
|
extern int curcol; /* Cursor column */
|
|
|
|
extern int thisflag; /* Flags, this command */
|
|
|
|
extern int lastflag; /* Flags, last command */
|
|
|
|
extern int curgoal; /* Goal for C-P, C-N */
|
2010-08-01 17:37:28 -04:00
|
|
|
extern struct window *curwp; /* Current window */
|
2010-02-15 21:09:42 -05:00
|
|
|
extern struct buffer *curbp; /* Current buffer */
|
2010-08-01 17:37:28 -04:00
|
|
|
extern struct window *wheadp; /* Head of list of windows */
|
2010-02-15 21:09:42 -05:00
|
|
|
extern struct buffer *bheadp; /* Head of list of buffers */
|
|
|
|
extern struct buffer *blistp; /* Buffer for C-X C-B */
|
2005-09-30 18:26:09 -04:00
|
|
|
|
2010-07-11 13:54:48 -04:00
|
|
|
extern char sres[NBUFN]; /* Current screen resolution. */
|
|
|
|
extern char pat[]; /* Search pattern. */
|
|
|
|
extern char tap[]; /* Reversed pattern array. */
|
|
|
|
extern char rpat[]; /* Replacement pattern. */
|
2005-05-31 11:50:56 -04:00
|
|
|
|
|
|
|
extern unsigned int matchlen;
|
|
|
|
extern unsigned int mlenold;
|
|
|
|
extern char *patmatch;
|
2010-04-17 19:38:09 -04:00
|
|
|
extern struct line *matchline;
|
2005-05-31 11:50:56 -04:00
|
|
|
extern int matchoff;
|
|
|
|
|
|
|
|
#if DEBUGM
|
2010-07-11 13:54:48 -04:00
|
|
|
/* Vars needed for macro debugging output. */
|
|
|
|
extern char outline[]; /* Global string to hold debug line text. */
|
2005-05-31 11:50:56 -04:00
|
|
|
#endif
|
|
|
|
|
2010-07-11 13:54:48 -04:00
|
|
|
/* Terminal table defined only in term.c */
|
|
|
|
extern struct terminal term;
|
|
|
|
|
|
|
|
#endif /* EDEF_H_ */
|