uemacs: convert typedef struct window_t to struct window.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Thiago Farina 2010-08-01 18:37:28 -03:00 committed by Linus Torvalds
parent af9710adc4
commit 81a3a0be6e
12 changed files with 63 additions and 63 deletions

4
bind.c
View File

@ -18,7 +18,7 @@ int help(int f, int n)
{ /* give me some help!!!! { /* give me some help!!!!
bring up a fake buffer and read the help file bring up a fake buffer and read the help file
into it with view mode */ into it with view mode */
window_t *wp; /* scaning pointer to windows */ struct window *wp; /* scaning pointer to windows */
struct buffer *bp; /* buffer pointer to help */ struct buffer *bp; /* buffer pointer to help */
char *fname = NULL; /* ptr to file returned by flook() */ char *fname = NULL; /* ptr to file returned by flook() */
@ -275,7 +275,7 @@ int apro(int f, int n)
int buildlist(int type, char *mstring) int buildlist(int type, char *mstring)
#endif #endif
{ {
window_t *wp; /* scanning pointer to windows */ struct window *wp; /* scanning pointer to windows */
struct key_tab *ktp; /* pointer into the command table */ struct key_tab *ktp; /* pointer into the command table */
struct name_bind *nptr; /* pointer into the name binding table */ struct name_bind *nptr; /* pointer into the name binding table */
struct buffer *bp; /* buffer to put binding list into */ struct buffer *bp; /* buffer to put binding list into */

View File

@ -78,7 +78,7 @@ int nextbuffer(int f, int n)
*/ */
int swbuffer(struct buffer *bp) int swbuffer(struct buffer *bp)
{ {
window_t *wp; struct window *wp;
if (--curbp->b_nwnd == 0) { /* Last use. */ if (--curbp->b_nwnd == 0) { /* Last use. */
curbp->b_dotp = curwp->w_dotp; curbp->b_dotp = curwp->w_dotp;
@ -219,7 +219,7 @@ int namebuffer(int f, int n)
*/ */
int listbuffers(int f, int n) int listbuffers(int f, int n)
{ {
window_t *wp; struct window *wp;
struct buffer *bp; struct buffer *bp;
int s; int s;

View File

@ -48,16 +48,16 @@ static int displaying = TRUE;
int chg_width, chg_height; int chg_width, chg_height;
#endif #endif
static int reframe(window_t *wp); static int reframe(struct window *wp);
static void updone(window_t *wp); static void updone(struct window *wp);
static void updall(window_t *wp); static void updall(struct window *wp);
static int scrolls(int inserts); static int scrolls(int inserts);
static void scrscroll(int from, int to, int count); static void scrscroll(int from, int to, int count);
static int texttest(int vrow, int prow); static int texttest(int vrow, int prow);
static int endofline(char *s, int n); static int endofline(char *s, int n);
static void updext(void); static void updext(void);
static int updateline(int row, struct video *vp1, struct video *vp2); static int updateline(int row, struct video *vp1, struct video *vp2);
static void modeline(window_t *wp); static void modeline(struct window *wp);
static void mlputi(int i, int r); static void mlputi(int i, int r);
static void mlputli(long l, int r); static void mlputli(long l, int r);
static void mlputf(int s); static void mlputf(int s);
@ -259,7 +259,7 @@ static int scrflags;
*/ */
int update(int force) int update(int force)
{ {
window_t *wp; struct window *wp;
#if TYPEAH && ! PKCODE #if TYPEAH && ! PKCODE
if (force == FALSE && typahead()) if (force == FALSE && typahead())
@ -281,7 +281,7 @@ int update(int force)
if (wp->w_flag & WFMODE) { if (wp->w_flag & WFMODE) {
if (wp->w_bufp->b_nwnd > 1) { if (wp->w_bufp->b_nwnd > 1) {
/* make sure all previous windows have this */ /* make sure all previous windows have this */
window_t *owp; struct window *owp;
owp = wheadp; owp = wheadp;
while (owp != NULL) { while (owp != NULL) {
if (owp->w_bufp == wp->w_bufp) if (owp->w_bufp == wp->w_bufp)
@ -359,7 +359,7 @@ int update(int force)
* check to see if the cursor is on in the window * check to see if the cursor is on in the window
* and re-frame it if needed or wanted * and re-frame it if needed or wanted
*/ */
static int reframe(window_t *wp) static int reframe(struct window *wp)
{ {
struct line *lp, *lp0; struct line *lp, *lp0;
int i = 0; int i = 0;
@ -447,9 +447,9 @@ static int reframe(window_t *wp)
* updone: * updone:
* update the current line to the virtual screen * update the current line to the virtual screen
* *
* window_t *wp; window to update current line in * struct window *wp; window to update current line in
*/ */
static void updone(window_t *wp) static void updone(struct window *wp)
{ {
struct line *lp; /* line to update */ struct line *lp; /* line to update */
int sline; /* physical screen line to update */ int sline; /* physical screen line to update */
@ -480,9 +480,9 @@ static void updone(window_t *wp)
* updall: * updall:
* update all the lines in a window on the virtual screen * update all the lines in a window on the virtual screen
* *
* window_t *wp; window to update lines in * struct window *wp; window to update lines in
*/ */
static void updall(window_t *wp) static void updall(struct window *wp)
{ {
struct line *lp; /* line to update */ struct line *lp; /* line to update */
int sline; /* physical screen line to update */ int sline; /* physical screen line to update */
@ -563,7 +563,7 @@ void updpos(void)
*/ */
void upddex(void) void upddex(void)
{ {
window_t *wp; struct window *wp;
struct line *lp; struct line *lp;
int i, j; int i, j;
@ -1084,7 +1084,7 @@ static int updateline(int row, struct video *vp1, struct video *vp2)
* change the modeline format by hacking at this routine. Called by "update" * change the modeline format by hacking at this routine. Called by "update"
* any time there is a dirty window. * any time there is a dirty window.
*/ */
static void modeline(window_t *wp) static void modeline(struct window *wp)
{ {
char *cp; char *cp;
int c; int c;
@ -1276,7 +1276,7 @@ static void modeline(window_t *wp)
void upmode(void) void upmode(void)
{ /* update all the mode lines */ { /* update all the mode lines */
window_t *wp; struct window *wp;
wp = wheadp; wp = wheadp;
while (wp != NULL) { while (wp != NULL) {

8
edef.h
View File

@ -67,7 +67,7 @@ extern char *cname[]; /* names of colors */
extern KILL *kbufp; /* current kill buffer chunk pointer */ extern KILL *kbufp; /* current kill buffer chunk pointer */
extern KILL *kbufh; /* kill buffer header pointer */ extern KILL *kbufh; /* kill buffer header pointer */
extern int kused; /* # of bytes used in KB */ extern int kused; /* # of bytes used in KB */
extern window_t *swindow; /* saved window pointer */ extern struct window *swindow; /* saved window pointer */
extern int cryptflag; /* currently encrypting? */ extern int cryptflag; /* currently encrypting? */
extern short *kbdptr; /* current position in keyboard buf */ extern short *kbdptr; /* current position in keyboard buf */
extern short *kbdend; /* ptr to end of the keyboard */ extern short *kbdend; /* ptr to end of the keyboard */
@ -105,15 +105,15 @@ extern int curcol; /* Cursor column */
extern int thisflag; /* Flags, this command */ 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 window_t *curwp; /* Current window */ extern struct window *curwp; /* Current window */
extern struct buffer *curbp; /* Current buffer */ extern struct buffer *curbp; /* Current buffer */
extern window_t *wheadp; /* Head of list of windows */ extern struct window *wheadp; /* Head of list of windows */
extern struct buffer *bheadp; /* Head of list of buffers */ extern struct buffer *bheadp; /* Head of list of buffers */
extern struct buffer *blistp; /* Buffer for C-X C-B */ extern struct buffer *blistp; /* Buffer for C-X C-B */
/* Lookup a buffer by name. */ /* Lookup a buffer by name. */
extern struct buffer *bfind(char *bname, int cflag, int bflag); extern struct buffer *bfind(char *bname, int cflag, int bflag);
extern window_t *wpopup(void); /* Pop up window creation. */ extern struct window *wpopup(void); /* Pop up window creation. */
extern struct line *lalloc(int); /* Allocate a line. */ extern struct line *lalloc(int); /* Allocate a line. */
extern char sres[NBUFN]; /* Current screen resolution. */ extern char sres[NBUFN]; /* Current screen resolution. */
extern char pat[]; /* Search pattern. */ extern char pat[]; /* Search pattern. */

View File

@ -427,7 +427,7 @@
* the full blown redisplay is just too expensive to run for every input * the full blown redisplay is just too expensive to run for every input
* character. * character.
*/ */
typedef struct window { struct window {
struct window *w_wndp; /* Next window */ struct window *w_wndp; /* Next window */
struct buffer *w_bufp; /* Buffer displayed in window */ struct buffer *w_bufp; /* Buffer displayed in window */
struct line *w_linep; /* Top line in the window */ struct line *w_linep; /* Top line in the window */
@ -443,7 +443,7 @@ typedef struct window {
char w_fcolor; /* current forground color */ char w_fcolor; /* current forground color */
char w_bcolor; /* current background color */ char w_bcolor; /* current background color */
#endif #endif
} window_t; };
#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 */

2
exec.c
View File

@ -429,7 +429,7 @@ int dobuf(struct buffer *bp)
int i; /* index */ int i; /* index */
int c; /* temp character */ int c; /* temp character */
int force; /* force TRUE result? */ int force; /* force TRUE result? */
window_t *wp; /* ptr to windows to scan */ struct window *wp; /* ptr to windows to scan */
WHBLOCK *whlist; /* ptr to !WHILE list */ WHBLOCK *whlist; /* ptr to !WHILE list */
WHBLOCK *scanner; /* ptr during scan */ WHBLOCK *scanner; /* ptr during scan */
WHBLOCK *whtemp; /* temporary ptr to a WHBLOCK */ WHBLOCK *whtemp; /* temporary ptr to a WHBLOCK */

10
file.c
View File

@ -80,7 +80,7 @@ int viewfile(int f, int n)
{ /* visit a file in VIEW mode */ { /* visit a file in VIEW mode */
char fname[NFILEN]; /* file user wishes to find */ char fname[NFILEN]; /* file user wishes to find */
int s; /* status return */ int s; /* status return */
window_t *wp; /* scan for windows that need updating */ struct window *wp; /* scan for windows that need updating */
if (restflag) /* don't allow this command if restricted */ if (restflag) /* don't allow this command if restricted */
return (resterr()); return (resterr());
@ -210,7 +210,7 @@ int readin(char *fname, int lockfl)
struct line *lp1; struct line *lp1;
struct line *lp2; struct line *lp2;
int i; int i;
window_t *wp; struct window *wp;
struct buffer *bp; struct buffer *bp;
int s; int s;
int nbytes; int nbytes;
@ -393,7 +393,7 @@ void unqname(char *name)
*/ */
int filewrite(int f, int n) int filewrite(int f, int n)
{ {
window_t *wp; struct window *wp;
int s; int s;
char fname[NFILEN]; char fname[NFILEN];
@ -424,7 +424,7 @@ int filewrite(int f, int n)
*/ */
int filesave(int f, int n) int filesave(int f, int n)
{ {
window_t *wp; struct window *wp;
int s; int s;
if (curbp->b_mode & MDVIEW) /* don't allow this command if */ 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) int filename(int f, int n)
{ {
window_t *wp; struct window *wp;
int s; int s;
char fname[NFILEN]; char fname[NFILEN];

View File

@ -61,7 +61,7 @@ char *cname[] = { /* names of colors */
KILL *kbufp = NULL; /* current kill buffer chunk pointer */ KILL *kbufp = NULL; /* current kill buffer chunk pointer */
KILL *kbufh = NULL; /* kill buffer header pointer */ KILL *kbufh = NULL; /* kill buffer header pointer */
int kused = KBLOCK; /* # of bytes used in kill buffer */ int kused = KBLOCK; /* # of bytes used in kill buffer */
window_t *swindow = NULL; /* saved window pointer */ struct window *swindow = NULL; /* saved window pointer */
int cryptflag = FALSE; /* currently encrypting? */ int cryptflag = FALSE; /* currently encrypting? */
short *kbdptr; /* current position in keyboard buf */ short *kbdptr; /* current position in keyboard buf */
short *kbdend = &kbdm[0]; /* ptr to end of the keyboard */ short *kbdend = &kbdm[0]; /* ptr to end of the keyboard */
@ -99,9 +99,9 @@ int curcol; /* Cursor column */
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 */
window_t *curwp; /* Current window */ struct window *curwp; /* Current window */
struct buffer *curbp; /* Current buffer */ struct buffer *curbp; /* Current buffer */
window_t *wheadp; /* Head of list of windows */ struct window *wheadp; /* Head of list of windows */
struct buffer *bheadp; /* Head of list of buffers */ struct buffer *bheadp; /* Head of list of buffers */
struct buffer *blistp; /* Buffer for C-X C-B */ struct buffer *blistp; /* Buffer for C-X C-B */

12
line.c
View File

@ -50,7 +50,7 @@ struct line *lalloc(int used)
void lfree(struct line *lp) void lfree(struct line *lp)
{ {
struct buffer *bp; struct buffer *bp;
window_t *wp; struct window *wp;
wp = wheadp; wp = wheadp;
while (wp != NULL) { while (wp != NULL) {
@ -94,7 +94,7 @@ void lfree(struct line *lp)
*/ */
void lchange(int flag) void lchange(int flag)
{ {
window_t *wp; struct window *wp;
if (curbp->b_nwnd != 1) /* Ensure hard. */ if (curbp->b_nwnd != 1) /* Ensure hard. */
flag = WFHARD; flag = WFHARD;
@ -165,7 +165,7 @@ int linsert(int n, int c)
struct line *lp3; struct line *lp3;
int doto; int doto;
int i; int i;
window_t *wp; struct window *wp;
if (curbp->b_mode & MDVIEW) /* don't allow this command if */ if (curbp->b_mode & MDVIEW) /* don't allow this command if */
return (rdonly()); /* we are in read only mode */ return (rdonly()); /* we are in read only mode */
@ -287,7 +287,7 @@ int lnewline(void)
struct line *lp1; struct line *lp1;
struct line *lp2; struct line *lp2;
int doto; int doto;
window_t *wp; struct window *wp;
if (curbp->b_mode & MDVIEW) /* don't allow this command if */ if (curbp->b_mode & MDVIEW) /* don't allow this command if */
return (rdonly()); /* we are in read only mode */ return (rdonly()); /* we are in read only mode */
@ -349,7 +349,7 @@ int ldelete(long n, int kflag)
struct line *dotp; struct line *dotp;
int doto; int doto;
int chunk; int chunk;
window_t *wp; struct window *wp;
if (curbp->b_mode & MDVIEW) /* don't allow this command if */ if (curbp->b_mode & MDVIEW) /* don't allow this command if */
return (rdonly()); /* we are in read only mode */ return (rdonly()); /* we are in read only mode */
@ -472,7 +472,7 @@ int ldelnewline(void)
struct line *lp1; struct line *lp1;
struct line *lp2; struct line *lp2;
struct line *lp3; struct line *lp3;
window_t *wp; struct window *wp;
if (curbp->b_mode & MDVIEW) /* don't allow this command if */ if (curbp->b_mode & MDVIEW) /* don't allow this command if */
return (rdonly()); /* we are in read only mode */ return (rdonly()); /* we are in read only mode */

8
main.c
View File

@ -428,11 +428,11 @@ int main(int argc, char **argv)
void edinit(char *bname) void edinit(char *bname)
{ {
struct buffer *bp; struct buffer *bp;
window_t *wp; struct window *wp;
bp = bfind(bname, TRUE, 0); /* First buffer */ bp = bfind(bname, TRUE, 0); /* First buffer */
blistp = bfind("*List*", TRUE, BFINVS); /* Buffer list buffer */ blistp = bfind("*List*", TRUE, BFINVS); /* Buffer list buffer */
wp = (window_t *) malloc(sizeof(window_t)); /* First window */ wp = (struct window *)malloc(sizeof(struct window)); /* First window */
if (bp == NULL || wp == NULL || blistp == NULL) if (bp == NULL || wp == NULL || blistp == NULL)
exit(1); exit(1);
curbp = bp; /* Make this current */ curbp = bp; /* Make this current */
@ -818,8 +818,8 @@ dspram()
int cexit(int status) int cexit(int status)
{ {
struct buffer *bp; /* buffer list pointer */ struct buffer *bp; /* buffer list pointer */
window_t *wp; /* window list pointer */ struct window *wp; /* window list pointer */
window_t *tp; /* temporary window pointer */ struct window *tp; /* temporary window pointer */
/* first clean up the windows */ /* first clean up the windows */
wp = wheadp; wp = wheadp;

View File

@ -257,7 +257,7 @@ int execprg(int f, int n)
int pipecmd(int f, int n) int pipecmd(int f, int n)
{ {
int s; /* return status from CLI */ int s; /* return status from CLI */
window_t *wp; /* pointer to new window */ struct window *wp; /* pointer to new window */
struct buffer *bp; /* pointer to buffer to zot */ struct buffer *bp; /* pointer to buffer to zot */
char line[NLINE]; /* command line send to shell */ char line[NLINE]; /* command line send to shell */
static char bname[] = "command"; static char bname[] = "command";

View File

@ -53,7 +53,7 @@ int redraw(int f, int n)
*/ */
int nextwind(int f, int n) int nextwind(int f, int n)
{ {
window_t *wp; struct window *wp;
int nwindows; /* total number of windows */ int nwindows; /* total number of windows */
if (f) { if (f) {
@ -96,8 +96,8 @@ int nextwind(int f, int n)
*/ */
int prevwind(int f, int n) int prevwind(int f, int n)
{ {
window_t *wp1; struct window *wp1;
window_t *wp2; struct window *wp2;
/* if we have an argument, we mean the nth window from the bottom */ /* if we have an argument, we mean the nth window from the bottom */
if (f) if (f)
@ -184,7 +184,7 @@ int mvupwind(int f, int n)
*/ */
int onlywind(int f, int n) int onlywind(int f, int n)
{ {
window_t *wp; struct window *wp;
struct line *lp; struct line *lp;
int i; int i;
@ -231,8 +231,8 @@ int onlywind(int f, int n)
*/ */
int delwind(int f, int n) int delwind(int f, int n)
{ {
window_t *wp; /* window to recieve deleted space */ struct window *wp; /* window to recieve deleted space */
window_t *lwp; /* ptr window before curwp */ struct window *lwp; /* ptr window before curwp */
int target; /* target line to search for */ int target; /* target line to search for */
/* if there is only one window, don't delete it */ /* 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) int splitwind(int f, int n)
{ {
window_t *wp; struct window *wp;
struct line *lp; struct line *lp;
int ntru; int ntru;
int ntrl; int ntrl;
int ntrd; int ntrd;
window_t *wp1; struct window *wp1;
window_t *wp2; struct window *wp2;
if (curwp->w_ntrows < 3) { if (curwp->w_ntrows < 3) {
mlwrite("Cannot split a %d line window", curwp->w_ntrows); mlwrite("Cannot split a %d line window", curwp->w_ntrows);
return (FALSE); return (FALSE);
} }
if ((wp = (window_t *) malloc(sizeof(window_t))) == NULL) { if ((wp = (struct window *)malloc(sizeof(struct window))) == NULL) {
mlwrite("(OUT OF MEMORY)"); mlwrite("(OUT OF MEMORY)");
return (FALSE); return (FALSE);
} }
@ -391,7 +391,7 @@ int splitwind(int f, int n)
*/ */
int enlargewind(int f, int n) int enlargewind(int f, int n)
{ {
window_t *adjwp; struct window *adjwp;
struct line *lp; struct line *lp;
int i; int i;
@ -442,7 +442,7 @@ int enlargewind(int f, int n)
*/ */
int shrinkwind(int f, int n) int shrinkwind(int f, int n)
{ {
window_t *adjwp; struct window *adjwp;
struct line *lp; struct line *lp;
int i; 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 * Pick the uppermost window that isn't the current window. An LRU algorithm
* might be better. Return a pointer, or NULL on error. * might be better. Return a pointer, or NULL on error.
*/ */
window_t *wpopup(void) struct window *wpopup(void)
{ {
window_t *wp; struct window *wp;
if (wheadp->w_wndp == NULL /* Only 1 window */ if (wheadp->w_wndp == NULL /* Only 1 window */
&& splitwind(FALSE, 0) == FALSE) /* and it won't split */ && 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) int restwnd(int f, int n)
{ /* restore the saved screen */ { /* restore the saved screen */
window_t *wp; struct window *wp;
/* find the window */ /* find the window */
wp = wheadp; wp = wheadp;
@ -578,9 +578,9 @@ int restwnd(int f, int n)
*/ */
int newsize(int f, int n) int newsize(int f, int n)
{ {
window_t *wp; /* current window being examined */ struct window *wp; /* current window being examined */
window_t *nextwp; /* next window to scan */ struct window *nextwp; /* next window to scan */
window_t *lastwp; /* last window scanned */ struct window *lastwp; /* last window scanned */
int lastline; /* screen line of last line of current window */ int lastline; /* screen line of last line of current window */
/* if the command defaults, assume the largest */ /* if the command defaults, assume the largest */
@ -666,7 +666,7 @@ int newsize(int f, int n)
*/ */
int newwidth(int f, int n) int newwidth(int f, int n)
{ {
window_t *wp; struct window *wp;
/* if the command defaults, assume the largest */ /* if the command defaults, assume the largest */
if (f == FALSE) if (f == FALSE)