1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-12-18 15:26:23 -05:00

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!!!!
bring up a fake buffer and read the help file
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 */
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)
#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 name_bind *nptr; /* pointer into the name binding table */
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)
{
window_t *wp;
struct window *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)
{
window_t *wp;
struct window *wp;
struct buffer *bp;
int s;

View File

@ -48,16 +48,16 @@ static int displaying = TRUE;
int chg_width, chg_height;
#endif
static int reframe(window_t *wp);
static void updone(window_t *wp);
static void updall(window_t *wp);
static int reframe(struct window *wp);
static void updone(struct window *wp);
static void updall(struct window *wp);
static int scrolls(int inserts);
static void scrscroll(int from, int to, int count);
static int texttest(int vrow, int prow);
static int endofline(char *s, int n);
static void updext(void);
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 mlputli(long l, int r);
static void mlputf(int s);
@ -259,7 +259,7 @@ static int scrflags;
*/
int update(int force)
{
window_t *wp;
struct window *wp;
#if TYPEAH && ! PKCODE
if (force == FALSE && typahead())
@ -281,7 +281,7 @@ int update(int force)
if (wp->w_flag & WFMODE) {
if (wp->w_bufp->b_nwnd > 1) {
/* make sure all previous windows have this */
window_t *owp;
struct window *owp;
owp = wheadp;
while (owp != NULL) {
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
* and re-frame it if needed or wanted
*/
static int reframe(window_t *wp)
static int reframe(struct window *wp)
{
struct line *lp, *lp0;
int i = 0;
@ -447,9 +447,9 @@ static int reframe(window_t *wp)
* updone:
* 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 */
int sline; /* physical screen line to update */
@ -480,9 +480,9 @@ static void updone(window_t *wp)
* updall:
* 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 */
int sline; /* physical screen line to update */
@ -563,7 +563,7 @@ void updpos(void)
*/
void upddex(void)
{
window_t *wp;
struct window *wp;
struct line *lp;
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"
* any time there is a dirty window.
*/
static void modeline(window_t *wp)
static void modeline(struct window *wp)
{
char *cp;
int c;
@ -1276,7 +1276,7 @@ static void modeline(window_t *wp)
void upmode(void)
{ /* update all the mode lines */
window_t *wp;
struct window *wp;
wp = wheadp;
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 *kbufh; /* kill buffer header pointer */
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 short *kbdptr; /* current position in keyboard buf */
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 lastflag; /* Flags, last command */
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 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 *blistp; /* Buffer for C-X C-B */
/* Lookup a buffer by name. */
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 char sres[NBUFN]; /* Current screen resolution. */
extern char pat[]; /* Search pattern. */

View File

@ -427,7 +427,7 @@
* the full blown redisplay is just too expensive to run for every input
* character.
*/
typedef struct window {
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 */
@ -443,7 +443,7 @@ typedef struct window {
char w_fcolor; /* current forground color */
char w_bcolor; /* current background color */
#endif
} window_t;
};
#define WFFORCE 0x01 /* Window needs forced reframe */
#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 c; /* temp character */
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 *scanner; /* ptr during scan */
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 */
char fname[NFILEN]; /* file user wishes to find */
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 */
return (resterr());
@ -210,7 +210,7 @@ int readin(char *fname, int lockfl)
struct line *lp1;
struct line *lp2;
int i;
window_t *wp;
struct window *wp;
struct buffer *bp;
int s;
int nbytes;
@ -393,7 +393,7 @@ void unqname(char *name)
*/
int filewrite(int f, int n)
{
window_t *wp;
struct window *wp;
int s;
char fname[NFILEN];
@ -424,7 +424,7 @@ int filewrite(int f, int n)
*/
int filesave(int f, int n)
{
window_t *wp;
struct window *wp;
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)
{
window_t *wp;
struct window *wp;
int s;
char fname[NFILEN];

View File

@ -61,7 +61,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_t *swindow = NULL; /* saved window pointer */
struct window *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 */
@ -99,9 +99,9 @@ int curcol; /* Cursor column */
int thisflag; /* Flags, this command */
int lastflag; /* Flags, last command */
int curgoal; /* Goal for C-P, C-N */
window_t *curwp; /* Current window */
struct window *curwp; /* Current window */
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 *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)
{
struct buffer *bp;
window_t *wp;
struct window *wp;
wp = wheadp;
while (wp != NULL) {
@ -94,7 +94,7 @@ void lfree(struct line *lp)
*/
void lchange(int flag)
{
window_t *wp;
struct window *wp;
if (curbp->b_nwnd != 1) /* Ensure hard. */
flag = WFHARD;
@ -165,7 +165,7 @@ int linsert(int n, int c)
struct line *lp3;
int doto;
int i;
window_t *wp;
struct window *wp;
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
return (rdonly()); /* we are in read only mode */
@ -287,7 +287,7 @@ int lnewline(void)
struct line *lp1;
struct line *lp2;
int doto;
window_t *wp;
struct window *wp;
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
return (rdonly()); /* we are in read only mode */
@ -349,7 +349,7 @@ int ldelete(long n, int kflag)
struct line *dotp;
int doto;
int chunk;
window_t *wp;
struct window *wp;
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
return (rdonly()); /* we are in read only mode */
@ -472,7 +472,7 @@ int ldelnewline(void)
struct line *lp1;
struct line *lp2;
struct line *lp3;
window_t *wp;
struct window *wp;
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
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)
{
struct buffer *bp;
window_t *wp;
struct window *wp;
bp = bfind(bname, TRUE, 0); /* First 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)
exit(1);
curbp = bp; /* Make this current */
@ -818,8 +818,8 @@ dspram()
int cexit(int status)
{
struct buffer *bp; /* buffer list pointer */
window_t *wp; /* window list pointer */
window_t *tp; /* temporary window pointer */
struct window *wp; /* window list pointer */
struct window *tp; /* temporary window pointer */
/* first clean up the windows */
wp = wheadp;

View File

@ -257,7 +257,7 @@ int execprg(int f, int n)
int pipecmd(int f, int n)
{
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 */
char line[NLINE]; /* command line send to shell */
static char bname[] = "command";

View File

@ -53,7 +53,7 @@ int redraw(int f, int n)
*/
int nextwind(int f, int n)
{
window_t *wp;
struct window *wp;
int nwindows; /* total number of windows */
if (f) {
@ -96,8 +96,8 @@ int nextwind(int f, int n)
*/
int prevwind(int f, int n)
{
window_t *wp1;
window_t *wp2;
struct window *wp1;
struct window *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)
{
window_t *wp;
struct window *wp;
struct line *lp;
int i;
@ -231,8 +231,8 @@ int onlywind(int f, int n)
*/
int delwind(int f, int n)
{
window_t *wp; /* window to recieve deleted space */
window_t *lwp; /* ptr window before curwp */
struct window *wp; /* window to recieve deleted space */
struct window *lwp; /* ptr window before curwp */
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)
{
window_t *wp;
struct window *wp;
struct line *lp;
int ntru;
int ntrl;
int ntrd;
window_t *wp1;
window_t *wp2;
struct window *wp1;
struct window *wp2;
if (curwp->w_ntrows < 3) {
mlwrite("Cannot split a %d line window", curwp->w_ntrows);
return (FALSE);
}
if ((wp = (window_t *) malloc(sizeof(window_t))) == NULL) {
if ((wp = (struct window *)malloc(sizeof(struct window))) == NULL) {
mlwrite("(OUT OF MEMORY)");
return (FALSE);
}
@ -391,7 +391,7 @@ int splitwind(int f, int n)
*/
int enlargewind(int f, int n)
{
window_t *adjwp;
struct window *adjwp;
struct line *lp;
int i;
@ -442,7 +442,7 @@ int enlargewind(int f, int n)
*/
int shrinkwind(int f, int n)
{
window_t *adjwp;
struct window *adjwp;
struct line *lp;
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_t *wpopup(void)
struct window *wpopup(void)
{
window_t *wp;
struct window *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 */
window_t *wp;
struct window *wp;
/* find the window */
wp = wheadp;
@ -578,9 +578,9 @@ int restwnd(int f, int n)
*/
int newsize(int f, int n)
{
window_t *wp; /* current window being examined */
window_t *nextwp; /* next window to scan */
window_t *lastwp; /* last window scanned */
struct window *wp; /* current window being examined */
struct window *nextwp; /* next window to scan */
struct window *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)
{
window_t *wp;
struct window *wp;
/* if the command defaults, assume the largest */
if (f == FALSE)