mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-20 16:22:38 -05:00
Move global window pointers to window and global keyboard variables to input.
This commit is contained in:
parent
83a0cc9d67
commit
d6e3df6ff3
6
Makefile
6
Makefile
@ -140,8 +140,8 @@ buffer.o: buffer.c buffer.h crypt.h line.h utf8.h defines.h display.h \
|
|||||||
edef.h estruct.h retcode.h file.h input.h window.h
|
edef.h estruct.h retcode.h file.h input.h window.h
|
||||||
crypt.o: crypt.c crypt.h
|
crypt.o: crypt.c crypt.h
|
||||||
display.o: display.c display.h buffer.h crypt.h line.h utf8.h estruct.h \
|
display.o: display.c display.h buffer.h crypt.h line.h utf8.h estruct.h \
|
||||||
retcode.h edef.h termio.h terminal.h defines.h version.h wrapper.h \
|
retcode.h edef.h input.h termio.h terminal.h defines.h version.h \
|
||||||
window.h
|
wrapper.h window.h
|
||||||
ebind.o: ebind.c ebind.h basic.h bind.h edef.h buffer.h crypt.h line.h \
|
ebind.o: ebind.c ebind.h basic.h bind.h edef.h buffer.h crypt.h line.h \
|
||||||
utf8.h estruct.h retcode.h bindable.h eval.h exec.h file.h isearch.h \
|
utf8.h estruct.h retcode.h bindable.h eval.h exec.h file.h isearch.h \
|
||||||
random.h region.h search.h spawn.h window.h defines.h word.h
|
random.h region.h search.h spawn.h window.h defines.h word.h
|
||||||
@ -202,7 +202,7 @@ vmsvt.o: vmsvt.c estruct.h retcode.h edef.h buffer.h crypt.h line.h \
|
|||||||
utf8.h
|
utf8.h
|
||||||
vt52.o: vt52.c estruct.h retcode.h edef.h buffer.h crypt.h line.h utf8.h
|
vt52.o: vt52.c estruct.h retcode.h edef.h buffer.h crypt.h line.h utf8.h
|
||||||
window.o: window.c window.h defines.h buffer.h crypt.h line.h utf8.h \
|
window.o: window.c window.h defines.h buffer.h crypt.h line.h utf8.h \
|
||||||
basic.h display.h edef.h estruct.h retcode.h execute.h terminal.h \
|
basic.h display.h estruct.h retcode.h edef.h execute.h terminal.h \
|
||||||
wrapper.h
|
wrapper.h
|
||||||
word.o: word.c word.h basic.h buffer.h crypt.h line.h utf8.h estruct.h \
|
word.o: word.c word.h basic.h buffer.h crypt.h line.h utf8.h estruct.h \
|
||||||
retcode.h edef.h log.h random.h region.h window.h defines.h
|
retcode.h edef.h log.h random.h region.h window.h defines.h
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
#include "estruct.h"
|
#include "estruct.h"
|
||||||
#include "edef.h"
|
#include "edef.h"
|
||||||
|
#include "input.h"
|
||||||
#include "line.h"
|
#include "line.h"
|
||||||
#include "termio.h"
|
#include "termio.h"
|
||||||
#include "terminal.h"
|
#include "terminal.h"
|
||||||
|
14
edef.h
14
edef.h
@ -42,19 +42,7 @@ extern int abortc; /* current abort command char */
|
|||||||
extern int tabmask;
|
extern int tabmask;
|
||||||
|
|
||||||
|
|
||||||
#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 */
|
|
||||||
extern int kbdrep; /* number of repetitions */
|
|
||||||
extern int restflag; /* restricted use? */
|
extern int restflag; /* restricted use? */
|
||||||
extern int lastkey; /* last keystoke */
|
|
||||||
extern long envram; /* # of bytes current in use by malloc */
|
extern long envram; /* # of bytes current in use by malloc */
|
||||||
extern int rval; /* return value of a subprocess */
|
extern int rval; /* return value of a subprocess */
|
||||||
extern int overlap; /* line overlap in forw/back page */
|
extern int overlap; /* line overlap in forw/back page */
|
||||||
@ -69,8 +57,6 @@ extern int thisflag; /* Flags, this command */
|
|||||||
extern int lastflag; /* Flags, last command */
|
extern int lastflag; /* Flags, last command */
|
||||||
|
|
||||||
extern int curgoal; /* Goal for C-P, C-N */
|
extern int curgoal; /* Goal for C-P, C-N */
|
||||||
extern struct window *curwp; /* Current window */
|
|
||||||
extern struct window *wheadp; /* Head of list of windows */
|
|
||||||
|
|
||||||
extern char sres[NBUFN]; /* Current screen resolution. */
|
extern char sres[NBUFN]; /* Current screen resolution. */
|
||||||
|
|
||||||
|
@ -25,10 +25,7 @@ int abortc = CONTROL | 'G'; /* current abort command char */
|
|||||||
int tabmask = 0x07; /* tabulator mask */
|
int tabmask = 0x07; /* tabulator mask */
|
||||||
|
|
||||||
|
|
||||||
kbdstate kbdmode = STOP; /* current keyboard macro mode */
|
|
||||||
int kbdrep = 0; /* number of repetitions */
|
|
||||||
int restflag = FALSE; /* restricted use? */
|
int restflag = FALSE; /* restricted use? */
|
||||||
int lastkey = 0; /* last keystoke */
|
|
||||||
long envram = 0l; /* # of bytes current in use by malloc */
|
long envram = 0l; /* # of bytes current in use by malloc */
|
||||||
int rval = 0; /* return value of a subprocess */
|
int rval = 0; /* return value of a subprocess */
|
||||||
int overlap = 0; /* line overlap in forw/back page */
|
int overlap = 0; /* line overlap in forw/back page */
|
||||||
@ -39,7 +36,5 @@ int scrollcount = 1; /* number of lines to scroll */
|
|||||||
int thisflag; /* Flags, this command */
|
int thisflag; /* Flags, this command */
|
||||||
int lastflag; /* Flags, last command */
|
int lastflag; /* Flags, last command */
|
||||||
int curgoal; /* Goal for C-P, C-N */
|
int curgoal; /* Goal for C-P, C-N */
|
||||||
struct window *curwp; /* Current window */
|
|
||||||
struct window *wheadp; /* Head of list of windows */
|
|
||||||
|
|
||||||
char sres[NBUFN]; /* current screen resolution */
|
char sres[NBUFN]; /* current screen resolution */
|
||||||
|
4
input.c
4
input.c
@ -38,6 +38,10 @@ int kbdm[ NKBDM] ; /* Macro */
|
|||||||
int *kbdptr ; /* current position in keyboard buf */
|
int *kbdptr ; /* current position in keyboard buf */
|
||||||
int *kbdend = &kbdm[0] ; /* ptr to end of the keyboard */
|
int *kbdend = &kbdm[0] ; /* ptr to end of the keyboard */
|
||||||
|
|
||||||
|
kbdstate kbdmode = STOP ; /* current keyboard macro mode */
|
||||||
|
int lastkey = 0 ; /* last keystoke */
|
||||||
|
int kbdrep = 0 ; /* number of repetitions */
|
||||||
|
|
||||||
static const int quotec = 0x11 ; /* quote char during mlreply() */
|
static const int quotec = 0x11 ; /* quote char during mlreply() */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
6
input.h
6
input.h
@ -3,6 +3,12 @@
|
|||||||
|
|
||||||
#include "edef.h"
|
#include "edef.h"
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
STOP, PLAY, RECORD
|
||||||
|
} kbdstate ;
|
||||||
|
extern kbdstate kbdmode ; /* current keyboard macro mode */
|
||||||
|
extern int lastkey ; /* last keystoke */
|
||||||
|
extern int kbdrep ; /* number of repetitions */
|
||||||
extern int kbdm[] ; /* Holds kayboard macro data */
|
extern int kbdm[] ; /* Holds kayboard macro data */
|
||||||
extern int *kbdptr ; /* current position in keyboard buf */
|
extern int *kbdptr ; /* current position in keyboard buf */
|
||||||
extern int *kbdend ; /* ptr to end of the keyboard */
|
extern int *kbdend ; /* ptr to end of the keyboard */
|
||||||
|
3
window.c
3
window.c
@ -22,6 +22,9 @@
|
|||||||
#include "wrapper.h"
|
#include "wrapper.h"
|
||||||
|
|
||||||
|
|
||||||
|
struct window *curwp ; /* Current window */
|
||||||
|
struct window *wheadp ; /* Head of list of windows */
|
||||||
|
|
||||||
static struct window *swindow = NULL ; /* saved window pointer */
|
static struct window *swindow = NULL ; /* saved window pointer */
|
||||||
|
|
||||||
|
|
||||||
|
3
window.h
3
window.h
@ -31,6 +31,9 @@ struct window {
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extern struct window *curwp ; /* Current window */
|
||||||
|
extern struct window *wheadp ; /* Head of list of windows */
|
||||||
|
|
||||||
#define WFFORCE 0x01 /* Window needs forced reframe */
|
#define WFFORCE 0x01 /* Window needs forced reframe */
|
||||||
#define WFMOVE 0x02 /* Movement from line to line */
|
#define WFMOVE 0x02 /* Movement from line to line */
|
||||||
#define WFEDIT 0x04 /* Editing within a line */
|
#define WFEDIT 0x04 /* Editing within a line */
|
||||||
|
Loading…
Reference in New Issue
Block a user