1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-12-17 23:06:25 -05:00

uemacs: remove typdef struct BUFFER -> struct buffer.

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-02-15 21:09:42 -05:00 committed by Linus Torvalds
parent 8fc7449839
commit 5ffdebdbf3
13 changed files with 64 additions and 64 deletions

4
bind.c
View File

@ -18,7 +18,7 @@ int help(int f, int n)
bring up a fake buffer and read the help file
into it with view mode */
register window_t *wp; /* scaning pointer to windows */
register BUFFER *bp; /* buffer pointer to help */
register struct buffer *bp; /* buffer pointer to help */
char *fname = NULL; /* ptr to file returned by flook() */
/* first check if we are already here */
@ -277,7 +277,7 @@ int buildlist(int type, char *mstring)
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 */
register struct buffer *bp; /* buffer to put binding list into */
int cpos; /* current position to use in outseq */
char outseq[80]; /* output buffer for keystroke sequence */

View File

@ -1,11 +1,11 @@
/* BUFFER.C
/* buffer.c
*
* Buffer management.
* Some of the functions are internal,
* and some are actually attached to user
* keys. Like everyone else, they set hints
* for the display system
*
*
* modified by Petri Kutvonen
*/
@ -22,7 +22,7 @@
*/
int usebuffer(int f, int n)
{
register BUFFER *bp;
register struct buffer *bp;
register int s;
char bufn[NBUFN];
@ -40,8 +40,8 @@ int usebuffer(int f, int n)
*/
int nextbuffer(int f, int n)
{
register BUFFER *bp; /* eligable buffer to switch to */
register BUFFER *bbp; /* eligable buffer to switch to */
register struct buffer *bp; /* eligable buffer to switch to */
register struct buffer *bbp; /* eligable buffer to switch to */
/* make sure the arg is legit */
if (f == FALSE)
@ -76,7 +76,7 @@ int nextbuffer(int f, int n)
/*
* make buffer BP current
*/
int swbuffer(BUFFER *bp)
int swbuffer(struct buffer *bp)
{
register window_t *wp;
@ -131,7 +131,7 @@ int swbuffer(BUFFER *bp)
*/
int killbuffer(int f, int n)
{
register BUFFER *bp;
register struct buffer *bp;
register int s;
char bufn[NBUFN];
@ -147,10 +147,10 @@ int killbuffer(int f, int n)
/*
* kill the buffer pointed to by bp
*/
int zotbuf(BUFFER *bp)
int zotbuf(struct buffer *bp)
{
register BUFFER *bp1;
register BUFFER *bp2;
register struct buffer *bp1;
register struct buffer *bp2;
register int s;
if (bp->b_nwnd != 0) { /* Error if on screen. */
@ -182,7 +182,7 @@ int zotbuf(BUFFER *bp)
*/
int namebuffer(int f, int n)
{
register BUFFER *bp; /* pointer to scan through all buffers */
register struct buffer *bp; /* pointer to scan through all buffers */
char bufn[NBUFN]; /* buffer to hold buffer name */
/* prompt for and get the new buffer name */
@ -220,7 +220,7 @@ int namebuffer(int f, int n)
int listbuffers(int f, int n)
{
register window_t *wp;
register BUFFER *bp;
register struct buffer *bp;
register int s;
if ((s = makelist(f)) != TRUE)
@ -270,7 +270,7 @@ int makelist(int iflag)
register char *cp1;
register char *cp2;
register int c;
register BUFFER *bp;
register struct buffer *bp;
register LINE *lp;
register int s;
register int i;
@ -424,7 +424,7 @@ int addline(char *text)
*/
int anycb(void)
{
register BUFFER *bp;
register struct buffer *bp;
bp = bheadp;
while (bp != NULL) {
@ -438,15 +438,15 @@ int anycb(void)
/*
* Find a buffer, by name. Return a pointer
* to the BUFFER structure associated with it.
* to the buffer structure associated with it.
* If the buffer is not found
* and the "cflag" is TRUE, create it. The "bflag" is
* the settings for the flags in in buffer.
*/
BUFFER *bfind(char *bname, int cflag, int bflag)
struct buffer *bfind(char *bname, int cflag, int bflag)
{
register BUFFER *bp;
register BUFFER *sb; /* buffer to insert after */
register struct buffer *bp;
register struct buffer *sb; /* buffer to insert after */
register LINE *lp;
bp = bheadp;
@ -456,7 +456,7 @@ BUFFER *bfind(char *bname, int cflag, int bflag)
bp = bp->b_bufp;
}
if (cflag != FALSE) {
if ((bp = (BUFFER *) malloc(sizeof(BUFFER))) == NULL)
if ((bp = (struct buffer *)malloc(sizeof(struct buffer))) == NULL)
return (NULL);
if ((lp = lalloc(0)) == NULL) {
free((char *) bp);
@ -511,7 +511,7 @@ BUFFER *bfind(char *bname, int cflag, int bflag)
* that are required. Return TRUE if everything
* looks good.
*/
int bclear(BUFFER *bp)
int bclear(struct buffer *bp)
{
register LINE *lp;
register int s;

View File

@ -1089,7 +1089,7 @@ static void modeline(window_t *wp)
register char *cp;
register int c;
register int n; /* cursor position count */
register BUFFER *bp;
register struct buffer *bp;
register int i; /* loop index */
register int lchar; /* character to draw line in buffer with */
register int firstm; /* is this the first mode? */

10
edef.h
View File

@ -46,7 +46,7 @@ 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 */
extern struct BUFFER *bstore; /* buffer to store macro text to */
extern struct buffer *bstore; /* buffer to store macro text to */
extern int vtrow; /* Row location of SW cursor */
extern int vtcol; /* Column location of SW cursor */
extern int ttrow; /* Row location of HW cursor */
@ -104,12 +104,12 @@ 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 BUFFER *curbp; /* Current buffer */
extern struct buffer *curbp; /* Current buffer */
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 struct buffer *bheadp; /* Head of list of buffers */
extern struct buffer *blistp; /* Buffer for C-X C-B */
extern BUFFER *bfind(char *bname, int cflag, int bflag); /* Lookup a buffer by name */
extern struct buffer *bfind(char *bname, int cflag, int bflag); /* Lookup a buffer by name */
extern window_t *wpopup(); /* Pop up window creation */
extern LINE *lalloc(int); /* Allocate a line */
extern char sres[NBUFN]; /* current screen resolution */

View File

@ -208,16 +208,16 @@ extern char *transbind(char *skey);
/* buffer.c */
extern int usebuffer(int f, int n);
extern int nextbuffer(int f, int n);
extern int swbuffer(BUFFER *bp);
extern int swbuffer(struct buffer *bp);
extern int killbuffer(int f, int n);
extern int zotbuf(BUFFER *bp);
extern int zotbuf(struct buffer *bp);
extern int namebuffer(int f, int n);
extern int listbuffers(int f, int n);
extern int makelist(int iflag);
extern void ltoa(char *buf, int width, long num);
extern int addline(char *text);
extern int anycb(void);
extern int bclear(BUFFER *bp);
extern int bclear(struct buffer *bp);
extern int unmark(int f, int n);
/* file.c */
@ -254,7 +254,7 @@ extern int storemac(int f, int n);
extern int storeproc(int f, int n);
extern int execproc(int f, int n);
extern int execbuf(int f, int n);
extern int dobuf(BUFFER *bp);
extern int dobuf(struct buffer *bp);
extern void freewhile(WHBLOCK *wp);
extern int execfile(int f, int n);
extern int dofile(char *fname);

View File

@ -430,7 +430,7 @@
*/
typedef struct 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_dotp; /* Line containing "." */
short w_doto; /* Byte offset for "." */
@ -470,8 +470,8 @@ typedef struct window {
* Buffers may be "Inactive" which means the files associated with them
* have not been read in yet. These get read in at "use buffer" time.
*/
typedef struct BUFFER {
struct BUFFER *b_bufp; /* Link to next BUFFER */
struct buffer {
struct buffer *b_bufp; /* Link to next struct buffer */
struct LINE *b_dotp; /* Link to "." LINE structure */
short b_doto; /* Offset of "." in above LINE */
struct LINE *b_markp; /* The same as the above two, */
@ -486,7 +486,7 @@ typedef struct BUFFER {
#if CRYPT
char b_key[NPAT]; /* current encrypted key */
#endif
} BUFFER;
};
#define BFINVS 0x01 /* Internal invisable buffer */
#define BFCHG 0x02 /* Changed since last write */
@ -519,7 +519,7 @@ typedef struct {
/*
* All text is kept in circularly linked lists of "LINE" structures. These
* begin at the header line (which is the blank line beyond the end of the
* buffer). This line is pointed to by the "BUFFER". Each line contains a the
* buffer). This line is pointed to by the "struct buffer". Each line contains a the
* number of bytes in the line (the "used" size), the size of the text array,
* and the text. The end of line is not stored as a byte; it's implied. Future
* additions will include update hints, and a list of marks into the line.

2
eval.c
View File

@ -763,7 +763,7 @@ int gettyp(char *token)
char *getval(char *token)
{
register int status; /* error return */
register BUFFER *bp; /* temp buffer pointer */
register struct buffer *bp; /* temp buffer pointer */
register int blen; /* length of buffer argument */
register int distmp; /* temporary discmd flag */
static char buf[NSTRING]; /* string buffer for some returns */

18
exec.c
View File

@ -252,7 +252,7 @@ int nextarg(char *prompt, char *buffer, int size, int terminator)
*/
int storemac(int f, int n)
{
register struct BUFFER *bp; /* pointer to macro buffer */
register struct buffer *bp; /* pointer to macro buffer */
char bname[NBUFN]; /* name of buffer to use */
/* must have a numeric argument to this function */
@ -298,7 +298,7 @@ int storemac(int f, int n)
*/
int storeproc(int f, int n)
{
register struct BUFFER *bp; /* pointer to macro buffer */
register struct buffer *bp; /* pointer to macro buffer */
register int status; /* return status */
char bname[NBUFN]; /* name of buffer to use */
@ -338,7 +338,7 @@ int storeproc(int f, int n)
*/
int execproc(int f, int n)
{
register BUFFER *bp; /* ptr to buffer to execute */
register struct buffer *bp; /* ptr to buffer to execute */
register int status; /* status return */
char bufn[NBUFN + 2]; /* name of buffer to execute */
@ -373,7 +373,7 @@ int execproc(int f, int n)
*/
int execbuf(int f, int n)
{
register BUFFER *bp; /* ptr to buffer to execute */
register struct buffer *bp; /* ptr to buffer to execute */
register int status; /* status return */
char bufn[NSTRING]; /* name of buffer to execute */
@ -415,9 +415,9 @@ int execbuf(int f, int n)
*
* *LBL01
*
* BUFFER *bp; buffer to execute
* struct buffer *bp; buffer to execute
*/
int dobuf(BUFFER *bp)
int dobuf(struct buffer *bp)
{
register int status; /* status return */
register LINE *lp; /* pointer to line to execute */
@ -884,8 +884,8 @@ int execfile(int f, int n)
*/
int dofile(char *fname)
{
register BUFFER *bp; /* buffer to place file to exeute */
register BUFFER *cb; /* temp to hold current buf while we read */
register struct buffer *bp; /* buffer to place file to exeute */
register struct buffer *cb; /* temp to hold current buf while we read */
register int status; /* results of various calls */
char bname[NBUFN]; /* name of buffer */
@ -923,7 +923,7 @@ int dofile(char *fname)
*/
int cbuf(int f, int n, int bufnum)
{
register BUFFER *bp; /* ptr to buffer to execute */
register struct buffer *bp; /* ptr to buffer to execute */
register int status; /* status return */
static char bufname[] = "*Macro xx*";

8
file.c
View File

@ -141,7 +141,7 @@ static int resetkey(void)
*/
int getfile(char *fname, int lockfl)
{
register BUFFER *bp;
register struct buffer *bp;
register LINE *lp;
register int i;
register int s;
@ -211,7 +211,7 @@ int readin(char *fname, int lockfl)
register LINE *lp2;
register int i;
register window_t *wp;
register BUFFER *bp;
register struct buffer *bp;
register int s;
register int nbytes;
register int nline;
@ -512,7 +512,7 @@ int writeout(char *fn)
* to modify the file name associated with
* the current buffer. It is like the "f" command
* in UNIX "ed". The operation is simple; just zap
* the name in the BUFFER structure, and mark the windows
* the name in the buffer structure, and mark the windows
* as needing an update. You can type a blank line at the
* prompt if you wish.
*/
@ -551,7 +551,7 @@ int ifile(char *fname)
register LINE *lp1;
register LINE *lp2;
register int i;
register BUFFER *bp;
register struct buffer *bp;
register int s;
register int nbytes;
register int nline;

View File

@ -36,7 +36,7 @@ int clexec = FALSE; /* command line execution flag */
int mstore = FALSE; /* storing text to macro flag */
int discmd = TRUE; /* display command flag */
int disinp = TRUE; /* display input characters */
struct BUFFER *bstore = NULL; /* buffer to store macro text to */
struct buffer *bstore = NULL; /* buffer to store macro text to */
int vtrow = 0; /* Row location of SW cursor */
int vtcol = 0; /* Column location of SW cursor */
int ttrow = HUGE; /* Row location of HW cursor */
@ -100,10 +100,10 @@ int thisflag; /* Flags, this command */
int lastflag; /* Flags, last command */
int curgoal; /* Goal for C-P, C-N */
window_t *curwp; /* Current window */
BUFFER *curbp; /* Current buffer */
struct buffer *curbp; /* Current buffer */
window_t *wheadp; /* Head of list of windows */
BUFFER *bheadp; /* Head of list of buffers */
BUFFER *blistp; /* Buffer for C-X C-B */
struct buffer *bheadp; /* Head of list of buffers */
struct buffer *blistp; /* Buffer for C-X C-B */
char sres[NBUFN]; /* current screen resolution */
char pat[NPAT]; /* Search pattern */

2
line.c
View File

@ -52,7 +52,7 @@ LINE *lalloc(int used)
*/
void lfree(LINE *lp)
{
register BUFFER *bp;
register struct buffer *bp;
register window_t *wp;
wp = wheadp;

12
main.c
View File

@ -98,11 +98,11 @@ int main(int argc, char **argv)
register int f; /* default flag */
register int n; /* numeric repeat count */
register int mflag; /* negative flag on repeat */
register BUFFER *bp; /* temp buffer pointer */
register struct buffer *bp; /* temp buffer pointer */
register int firstfile; /* first file flag */
register int carg; /* current arg to scan */
register int startflag; /* startup executed flag */
BUFFER *firstbp = NULL; /* ptr to first buffer in cmd line */
struct buffer *firstbp = NULL; /* ptr to first buffer in cmd line */
int basec; /* c stripped of meta character */
int viewflag; /* are we starting in view mode? */
int gotoflag; /* do we need to goto a line at start? */
@ -427,7 +427,7 @@ int main(int argc, char **argv)
*/
void edinit(char *bname)
{
register BUFFER *bp;
register struct buffer *bp;
register window_t *wp;
bp = bfind(bname, TRUE, 0); /* First buffer */
@ -555,8 +555,8 @@ int execute(int c, int f, int n)
*/
int quickexit(int f, int n)
{
register BUFFER *bp; /* scanning pointer to buffers */
register BUFFER *oldcb; /* original current buffer */
register struct buffer *bp; /* scanning pointer to buffers */
register struct buffer *oldcb; /* original current buffer */
register int status;
oldcb = curbp; /* save in case we fail */
@ -817,7 +817,7 @@ dspram()
*/
int cexit(int status)
{
register BUFFER *bp; /* buffer list pointer */
register struct buffer *bp; /* buffer list pointer */
register window_t *wp; /* window list pointer */
register window_t *tp; /* temporary window pointer */

View File

@ -258,7 +258,7 @@ int pipecmd(int f, int n)
{
register int s; /* return status from CLI */
register window_t *wp; /* pointer to new window */
register BUFFER *bp; /* pointer to buffer to zot */
register struct buffer *bp; /* pointer to buffer to zot */
char line[NLINE]; /* command line send to shell */
static char bname[] = "command";
@ -379,7 +379,7 @@ int pipecmd(int f, int n)
int filter_buffer(int f, int n)
{
register int s; /* return status from CLI */
register BUFFER *bp; /* pointer to buffer to zot */
register struct buffer *bp; /* pointer to buffer to zot */
char line[NLINE]; /* command line send to shell */
char tmpnam[NFILEN]; /* place to store real file name */
static char bname1[] = "fltinp";