mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-18 15:26:23 -05:00
Replace "WINDOW" type with "window_t"
Starting to try to avoid name clashes with curses and friends.
This commit is contained in:
parent
d79d222a45
commit
d66d329986
4
bind.c
4
bind.c
@ -17,7 +17,7 @@ int help(int f, int n)
|
||||
{ /* give me some help!!!!
|
||||
bring up a fake buffer and read the help file
|
||||
into it with view mode */
|
||||
register WINDOW *wp; /* scaning pointer to windows */
|
||||
register window_t *wp; /* scaning pointer to windows */
|
||||
register BUFFER *bp; /* buffer pointer to help */
|
||||
char *fname; /* ptr to file returned by flook() */
|
||||
|
||||
@ -272,7 +272,7 @@ int apro(int f, int n)
|
||||
int buildlist(int type, char *mstring)
|
||||
#endif
|
||||
{
|
||||
register WINDOW *wp; /* scanning pointer to windows */
|
||||
register window_t *wp; /* scanning pointer to windows */
|
||||
register KEYTAB *ktp; /* pointer into the command table */
|
||||
register NBIND *nptr; /* pointer into the name binding table */
|
||||
register BUFFER *bp; /* buffer to put binding list into */
|
||||
|
4
buffer.c
4
buffer.c
@ -78,7 +78,7 @@ int nextbuffer(int f, int n)
|
||||
*/
|
||||
int swbuffer(BUFFER *bp)
|
||||
{
|
||||
register WINDOW *wp;
|
||||
register window_t *wp;
|
||||
|
||||
if (--curbp->b_nwnd == 0) { /* Last use. */
|
||||
curbp->b_dotp = curwp->w_dotp;
|
||||
@ -219,7 +219,7 @@ int namebuffer(int f, int n)
|
||||
*/
|
||||
int listbuffers(int f, int n)
|
||||
{
|
||||
register WINDOW *wp;
|
||||
register window_t *wp;
|
||||
register BUFFER *bp;
|
||||
register int s;
|
||||
|
||||
|
20
display.c
20
display.c
@ -220,7 +220,7 @@ int scrflags;
|
||||
*/
|
||||
int update(int force)
|
||||
{
|
||||
register WINDOW *wp;
|
||||
register window_t *wp;
|
||||
|
||||
#if TYPEAH && ! PKCODE
|
||||
if (force == FALSE && typahead())
|
||||
@ -242,7 +242,7 @@ int update(int force)
|
||||
if (wp->w_flag & WFMODE) {
|
||||
if (wp->w_bufp->b_nwnd > 1) {
|
||||
/* make sure all previous windows have this */
|
||||
register WINDOW *owp;
|
||||
register window_t *owp;
|
||||
owp = wheadp;
|
||||
while (owp != NULL) {
|
||||
if (owp->w_bufp == wp->w_bufp)
|
||||
@ -320,7 +320,7 @@ int update(int force)
|
||||
* check to see if the cursor is on in the window
|
||||
* and re-frame it if needed or wanted
|
||||
*/
|
||||
int reframe(WINDOW *wp)
|
||||
int reframe(window_t *wp)
|
||||
{
|
||||
register LINE *lp, *lp0;
|
||||
register int i;
|
||||
@ -408,9 +408,9 @@ int reframe(WINDOW *wp)
|
||||
* updone:
|
||||
* update the current line to the virtual screen
|
||||
*
|
||||
* WINDOW *wp; window to update current line in
|
||||
* window_t *wp; window to update current line in
|
||||
*/
|
||||
void updone(WINDOW *wp)
|
||||
void updone(window_t *wp)
|
||||
{
|
||||
register LINE *lp; /* line to update */
|
||||
register int sline; /* physical screen line to update */
|
||||
@ -441,9 +441,9 @@ void updone(WINDOW *wp)
|
||||
* updall:
|
||||
* update all the lines in a window on the virtual screen
|
||||
*
|
||||
* WINDOW *wp; window to update lines in
|
||||
* window_t *wp; window to update lines in
|
||||
*/
|
||||
void updall(WINDOW *wp)
|
||||
void updall(window_t *wp)
|
||||
{
|
||||
register LINE *lp; /* line to update */
|
||||
register int sline; /* physical screen line to update */
|
||||
@ -522,7 +522,7 @@ void updpos(void)
|
||||
*/
|
||||
void upddex(void)
|
||||
{
|
||||
register WINDOW *wp;
|
||||
register window_t *wp;
|
||||
register LINE *lp;
|
||||
register int i, j;
|
||||
|
||||
@ -1054,7 +1054,7 @@ int updateline(int row, struct VIDEO *vp1, struct VIDEO *vp2)
|
||||
* change the modeline format by hacking at this routine. Called by "update"
|
||||
* any time there is a dirty window.
|
||||
*/
|
||||
void modeline(WINDOW *wp)
|
||||
void modeline(window_t *wp)
|
||||
{
|
||||
register char *cp;
|
||||
register int c;
|
||||
@ -1245,7 +1245,7 @@ void modeline(WINDOW *wp)
|
||||
|
||||
void upmode(void)
|
||||
{ /* update all the mode lines */
|
||||
register WINDOW *wp;
|
||||
register window_t *wp;
|
||||
|
||||
wp = wheadp;
|
||||
while (wp != NULL) {
|
||||
|
16
edef.h
16
edef.h
@ -91,7 +91,7 @@ char *cname[] = { /* names of colors */
|
||||
KILL *kbufp = NULL; /* current kill buffer chunk pointer */
|
||||
KILL *kbufh = NULL; /* kill buffer header pointer */
|
||||
int kused = KBLOCK; /* # of bytes used in kill buffer */
|
||||
WINDOW *swindow = NULL; /* saved window pointer */
|
||||
window_t *swindow = NULL; /* saved window pointer */
|
||||
int cryptflag = FALSE; /* currently encrypting? */
|
||||
short *kbdptr; /* current position in keyboard buf */
|
||||
short *kbdend = &kbdm[0]; /* ptr to end of the keyboard */
|
||||
@ -129,14 +129,14 @@ int curcol; /* Cursor column */
|
||||
int thisflag; /* Flags, this command */
|
||||
int lastflag; /* Flags, last command */
|
||||
int curgoal; /* Goal for C-P, C-N */
|
||||
WINDOW *curwp; /* Current window */
|
||||
window_t *curwp; /* Current window */
|
||||
BUFFER *curbp; /* Current buffer */
|
||||
WINDOW *wheadp; /* Head of list of windows */
|
||||
window_t *wheadp; /* Head of list of windows */
|
||||
BUFFER *bheadp; /* Head of list of buffers */
|
||||
BUFFER *blistp; /* Buffer for C-X C-B */
|
||||
|
||||
BUFFER *bfind(char *bname, int cflag, int bflag); /* Lookup a buffer by name */
|
||||
WINDOW *wpopup(); /* Pop up window creation */
|
||||
window_t *wpopup(); /* Pop up window creation */
|
||||
LINE *lalloc(); /* Allocate a line */
|
||||
char sres[NBUFN]; /* current screen resolution */
|
||||
|
||||
@ -239,7 +239,7 @@ extern char *cname[]; /* names of colors */
|
||||
extern KILL *kbufp; /* current kill buffer chunk pointer */
|
||||
extern KILL *kbufh; /* kill buffer header pointer */
|
||||
extern int kused; /* # of bytes used in KB */
|
||||
extern WINDOW *swindow; /* saved window pointer */
|
||||
extern window_t *swindow; /* saved window pointer */
|
||||
extern int cryptflag; /* currently encrypting? */
|
||||
extern short *kbdptr; /* current position in keyboard buf */
|
||||
extern short *kbdend; /* ptr to end of the keyboard */
|
||||
@ -276,14 +276,14 @@ 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 */
|
||||
extern WINDOW *curwp; /* Current window */
|
||||
extern window_t *curwp; /* Current window */
|
||||
extern BUFFER *curbp; /* Current buffer */
|
||||
extern WINDOW *wheadp; /* Head of list of windows */
|
||||
extern window_t *wheadp; /* Head of list of windows */
|
||||
extern BUFFER *bheadp; /* Head of list of buffers */
|
||||
extern BUFFER *blistp; /* Buffer for C-X C-B */
|
||||
|
||||
extern BUFFER *bfind(); /* Lookup a buffer by name */
|
||||
extern WINDOW *wpopup(); /* Pop up window creation */
|
||||
extern window_t *wpopup(); /* Pop up window creation */
|
||||
extern LINE *lalloc(); /* Allocate a line */
|
||||
extern char sres[NBUFN]; /* current screen resolution */
|
||||
extern char pat[]; /* Search pattern */
|
||||
|
8
efunc.h
8
efunc.h
@ -145,9 +145,9 @@ extern void vtputc(int c);
|
||||
extern void vteeol(void);
|
||||
extern int upscreen(int f, int n);
|
||||
extern int update(int force);
|
||||
extern int reframe(WINDOW *wp);
|
||||
extern void updone(WINDOW *wp);
|
||||
extern void updall(WINDOW *wp);
|
||||
extern int reframe(window_t *wp);
|
||||
extern void updone(window_t *wp);
|
||||
extern void updall(window_t *wp);
|
||||
extern void updpos(void);
|
||||
extern void upddex(void);
|
||||
extern void updgar(void);
|
||||
@ -158,7 +158,7 @@ extern int texttest(int vrow, int prow);
|
||||
extern int endofline(char *s, int n);
|
||||
extern void updext(void);
|
||||
extern int updateline(int row, struct VIDEO *vp1, struct VIDEO *vp2);
|
||||
extern void modeline(WINDOW *wp);
|
||||
extern void modeline(window_t *wp);
|
||||
extern void upmode(void);
|
||||
extern void movecursor(int row, int col);
|
||||
extern void mlerase(void);
|
||||
|
@ -428,8 +428,8 @@
|
||||
* the full blown redisplay is just too expensive to run for every input
|
||||
* character.
|
||||
*/
|
||||
typedef struct WINDOW {
|
||||
struct WINDOW *w_wndp; /* Next window */
|
||||
typedef struct window {
|
||||
struct window *w_wndp; /* Next window */
|
||||
struct BUFFER *w_bufp; /* Buffer displayed in window */
|
||||
struct LINE *w_linep; /* Top line in the window */
|
||||
struct LINE *w_dotp; /* Line containing "." */
|
||||
@ -444,7 +444,7 @@ typedef struct WINDOW {
|
||||
char w_fcolor; /* current forground color */
|
||||
char w_bcolor; /* current background color */
|
||||
#endif
|
||||
} WINDOW;
|
||||
} window_t;
|
||||
|
||||
#define WFFORCE 0x01 /* Window needs forced reframe */
|
||||
#define WFMOVE 0x02 /* Movement from line to line */
|
||||
|
2
exec.c
2
exec.c
@ -431,7 +431,7 @@ int dobuf(BUFFER *bp)
|
||||
int i; /* index */
|
||||
int c; /* temp character */
|
||||
int force; /* force TRUE result? */
|
||||
WINDOW *wp; /* ptr to windows to scan */
|
||||
window_t *wp; /* ptr to windows to scan */
|
||||
WHBLOCK *whlist; /* ptr to !WHILE list */
|
||||
WHBLOCK *scanner; /* ptr during scan */
|
||||
WHBLOCK *whtemp; /* temporary ptr to a WHBLOCK */
|
||||
|
10
file.c
10
file.c
@ -80,7 +80,7 @@ int viewfile(int f, int n)
|
||||
{ /* visit a file in VIEW mode */
|
||||
char fname[NFILEN]; /* file user wishes to find */
|
||||
register int s; /* status return */
|
||||
register WINDOW *wp; /* scan for windows that need updating */
|
||||
register window_t *wp; /* scan for windows that need updating */
|
||||
|
||||
if (restflag) /* don't allow this command if restricted */
|
||||
return (resterr());
|
||||
@ -210,7 +210,7 @@ int readin(char *fname, int lockfl)
|
||||
register LINE *lp1;
|
||||
register LINE *lp2;
|
||||
register int i;
|
||||
register WINDOW *wp;
|
||||
register window_t *wp;
|
||||
register BUFFER *bp;
|
||||
register int s;
|
||||
register int nbytes;
|
||||
@ -393,7 +393,7 @@ void unqname(char *name)
|
||||
*/
|
||||
int filewrite(int f, int n)
|
||||
{
|
||||
register WINDOW *wp;
|
||||
register window_t *wp;
|
||||
register int s;
|
||||
char fname[NFILEN];
|
||||
|
||||
@ -424,7 +424,7 @@ int filewrite(int f, int n)
|
||||
*/
|
||||
int filesave(int f, int n)
|
||||
{
|
||||
register WINDOW *wp;
|
||||
register window_t *wp;
|
||||
register int s;
|
||||
|
||||
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
|
||||
@ -518,7 +518,7 @@ int writeout(char *fn)
|
||||
*/
|
||||
int filename(int f, int n)
|
||||
{
|
||||
register WINDOW *wp;
|
||||
register window_t *wp;
|
||||
register int s;
|
||||
char fname[NFILEN];
|
||||
|
||||
|
12
line.c
12
line.c
@ -53,7 +53,7 @@ LINE *lalloc(int used)
|
||||
int lfree(LINE *lp)
|
||||
{
|
||||
register BUFFER *bp;
|
||||
register WINDOW *wp;
|
||||
register window_t *wp;
|
||||
|
||||
wp = wheadp;
|
||||
while (wp != NULL) {
|
||||
@ -97,7 +97,7 @@ int lfree(LINE *lp)
|
||||
*/
|
||||
int lchange(int flag)
|
||||
{
|
||||
register WINDOW *wp;
|
||||
register window_t *wp;
|
||||
|
||||
if (curbp->b_nwnd != 1) /* Ensure hard. */
|
||||
flag = WFHARD;
|
||||
@ -167,7 +167,7 @@ int linsert(int n, int c)
|
||||
register LINE *lp3;
|
||||
register int doto;
|
||||
register int i;
|
||||
register WINDOW *wp;
|
||||
register window_t *wp;
|
||||
|
||||
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
|
||||
return (rdonly()); /* we are in read only mode */
|
||||
@ -289,7 +289,7 @@ int lnewline(void)
|
||||
register LINE *lp1;
|
||||
register LINE *lp2;
|
||||
register int doto;
|
||||
register WINDOW *wp;
|
||||
register window_t *wp;
|
||||
|
||||
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
|
||||
return (rdonly()); /* we are in read only mode */
|
||||
@ -351,7 +351,7 @@ int ldelete(long n, int kflag)
|
||||
register LINE *dotp;
|
||||
register int doto;
|
||||
register int chunk;
|
||||
register WINDOW *wp;
|
||||
register window_t *wp;
|
||||
|
||||
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
|
||||
return (rdonly()); /* we are in read only mode */
|
||||
@ -474,7 +474,7 @@ int ldelnewline(void)
|
||||
register LINE *lp1;
|
||||
register LINE *lp2;
|
||||
register LINE *lp3;
|
||||
register WINDOW *wp;
|
||||
register window_t *wp;
|
||||
|
||||
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
|
||||
return (rdonly()); /* we are in read only mode */
|
||||
|
8
main.c
8
main.c
@ -427,11 +427,11 @@ int main(int argc, char **argv)
|
||||
void edinit(char *bname)
|
||||
{
|
||||
register BUFFER *bp;
|
||||
register WINDOW *wp;
|
||||
register window_t *wp;
|
||||
|
||||
bp = bfind(bname, TRUE, 0); /* First buffer */
|
||||
blistp = bfind("*List*", TRUE, BFINVS); /* Buffer list buffer */
|
||||
wp = (WINDOW *) malloc(sizeof(WINDOW)); /* First window */
|
||||
wp = (window_t *) malloc(sizeof(window_t)); /* First window */
|
||||
if (bp == NULL || wp == NULL || blistp == NULL)
|
||||
exit(1);
|
||||
curbp = bp; /* Make this current */
|
||||
@ -817,8 +817,8 @@ dspram()
|
||||
int cexit(int status)
|
||||
{
|
||||
register BUFFER *bp; /* buffer list pointer */
|
||||
register WINDOW *wp; /* window list pointer */
|
||||
register WINDOW *tp; /* temporary window pointer */
|
||||
register window_t *wp; /* window list pointer */
|
||||
register window_t *tp; /* temporary window pointer */
|
||||
|
||||
/* first clean up the windows */
|
||||
wp = wheadp;
|
||||
|
2
spawn.c
2
spawn.c
@ -258,7 +258,7 @@ int execprg(int f, int n)
|
||||
int pipecmd(int f, int n)
|
||||
{
|
||||
register int s; /* return status from CLI */
|
||||
register WINDOW *wp; /* pointer to new window */
|
||||
register window_t *wp; /* pointer to new window */
|
||||
register BUFFER *bp; /* pointer to buffer to zot */
|
||||
char line[NLINE]; /* command line send to shell */
|
||||
static char bname[] = "command";
|
||||
|
38
window.c
38
window.c
@ -53,7 +53,7 @@ int refresh(int f, int n)
|
||||
*/
|
||||
int nextwind(int f, int n)
|
||||
{
|
||||
register WINDOW *wp;
|
||||
register window_t *wp;
|
||||
register int nwindows; /* total number of windows */
|
||||
|
||||
if (f) {
|
||||
@ -96,8 +96,8 @@ int nextwind(int f, int n)
|
||||
*/
|
||||
int prevwind(int f, int n)
|
||||
{
|
||||
register WINDOW *wp1;
|
||||
register WINDOW *wp2;
|
||||
register window_t *wp1;
|
||||
register window_t *wp2;
|
||||
|
||||
/* if we have an argument, we mean the nth window from the bottom */
|
||||
if (f)
|
||||
@ -184,7 +184,7 @@ int mvupwind(int f, int n)
|
||||
*/
|
||||
int onlywind(int f, int n)
|
||||
{
|
||||
register WINDOW *wp;
|
||||
register window_t *wp;
|
||||
register LINE *lp;
|
||||
register int i;
|
||||
|
||||
@ -231,8 +231,8 @@ int onlywind(int f, int n)
|
||||
*/
|
||||
int delwind(int f, int n)
|
||||
{
|
||||
register WINDOW *wp; /* window to recieve deleted space */
|
||||
register WINDOW *lwp; /* ptr window before curwp */
|
||||
register window_t *wp; /* window to recieve deleted space */
|
||||
register window_t *lwp; /* ptr window before curwp */
|
||||
register int target; /* target line to search for */
|
||||
|
||||
/* if there is only one window, don't delete it */
|
||||
@ -309,19 +309,19 @@ int delwind(int f, int n)
|
||||
*/
|
||||
int splitwind(int f, int n)
|
||||
{
|
||||
register WINDOW *wp;
|
||||
register window_t *wp;
|
||||
register LINE *lp;
|
||||
register int ntru;
|
||||
register int ntrl;
|
||||
register int ntrd;
|
||||
register WINDOW *wp1;
|
||||
register WINDOW *wp2;
|
||||
register window_t *wp1;
|
||||
register window_t *wp2;
|
||||
|
||||
if (curwp->w_ntrows < 3) {
|
||||
mlwrite("Cannot split a %d line window", curwp->w_ntrows);
|
||||
return (FALSE);
|
||||
}
|
||||
if ((wp = (WINDOW *) malloc(sizeof(WINDOW))) == NULL) {
|
||||
if ((wp = (window_t *) malloc(sizeof(window_t))) == NULL) {
|
||||
mlwrite("(OUT OF MEMORY)");
|
||||
return (FALSE);
|
||||
}
|
||||
@ -391,7 +391,7 @@ int splitwind(int f, int n)
|
||||
*/
|
||||
int enlargewind(int f, int n)
|
||||
{
|
||||
register WINDOW *adjwp;
|
||||
register window_t *adjwp;
|
||||
register LINE *lp;
|
||||
register int i;
|
||||
|
||||
@ -442,7 +442,7 @@ int enlargewind(int f, int n)
|
||||
*/
|
||||
int shrinkwind(int f, int n)
|
||||
{
|
||||
register WINDOW *adjwp;
|
||||
register window_t *adjwp;
|
||||
register LINE *lp;
|
||||
register int i;
|
||||
|
||||
@ -515,9 +515,9 @@ int resize(int f, int n)
|
||||
* Pick the uppermost window that isn't the current window. An LRU algorithm
|
||||
* might be better. Return a pointer, or NULL on error.
|
||||
*/
|
||||
WINDOW *wpopup(void)
|
||||
window_t *wpopup(void)
|
||||
{
|
||||
register WINDOW *wp;
|
||||
register window_t *wp;
|
||||
|
||||
if (wheadp->w_wndp == NULL /* Only 1 window */
|
||||
&& splitwind(FALSE, 0) == FALSE) /* and it won't split */
|
||||
@ -552,7 +552,7 @@ int savewnd(int f, int n)
|
||||
|
||||
int restwnd(int f, int n)
|
||||
{ /* restore the saved screen */
|
||||
register WINDOW *wp;
|
||||
register window_t *wp;
|
||||
|
||||
/* find the window */
|
||||
wp = wheadp;
|
||||
@ -578,9 +578,9 @@ int restwnd(int f, int n)
|
||||
*/
|
||||
int newsize(int f, int n)
|
||||
{
|
||||
WINDOW *wp; /* current window being examined */
|
||||
WINDOW *nextwp; /* next window to scan */
|
||||
WINDOW *lastwp; /* last window scanned */
|
||||
window_t *wp; /* current window being examined */
|
||||
window_t *nextwp; /* next window to scan */
|
||||
window_t *lastwp; /* last window scanned */
|
||||
int lastline; /* screen line of last line of current window */
|
||||
|
||||
/* if the command defaults, assume the largest */
|
||||
@ -666,7 +666,7 @@ int newsize(int f, int n)
|
||||
*/
|
||||
int newwidth(int f, int n)
|
||||
{
|
||||
register WINDOW *wp;
|
||||
register window_t *wp;
|
||||
|
||||
/* if the command defaults, assume the largest */
|
||||
if (f == FALSE)
|
||||
|
Loading…
Reference in New Issue
Block a user