mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-18 07:16:23 -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:
parent
8fc7449839
commit
5ffdebdbf3
4
bind.c
4
bind.c
@ -18,7 +18,7 @@ int help(int f, int n)
|
|||||||
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 */
|
||||||
register window_t *wp; /* scaning pointer to windows */
|
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() */
|
char *fname = NULL; /* ptr to file returned by flook() */
|
||||||
|
|
||||||
/* first check if we are already here */
|
/* 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 window_t *wp; /* scanning pointer to windows */
|
||||||
register KEYTAB *ktp; /* pointer into the command table */
|
register KEYTAB *ktp; /* pointer into the command table */
|
||||||
register NBIND *nptr; /* pointer into the name binding 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 */
|
int cpos; /* current position to use in outseq */
|
||||||
char outseq[80]; /* output buffer for keystroke sequence */
|
char outseq[80]; /* output buffer for keystroke sequence */
|
||||||
|
|
||||||
|
40
buffer.c
40
buffer.c
@ -1,11 +1,11 @@
|
|||||||
/* BUFFER.C
|
/* buffer.c
|
||||||
*
|
*
|
||||||
* Buffer management.
|
* Buffer management.
|
||||||
* Some of the functions are internal,
|
* Some of the functions are internal,
|
||||||
* and some are actually attached to user
|
* and some are actually attached to user
|
||||||
* keys. Like everyone else, they set hints
|
* keys. Like everyone else, they set hints
|
||||||
* for the display system
|
* for the display system
|
||||||
*
|
*
|
||||||
* modified by Petri Kutvonen
|
* modified by Petri Kutvonen
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -22,7 +22,7 @@
|
|||||||
*/
|
*/
|
||||||
int usebuffer(int f, int n)
|
int usebuffer(int f, int n)
|
||||||
{
|
{
|
||||||
register BUFFER *bp;
|
register struct buffer *bp;
|
||||||
register int s;
|
register int s;
|
||||||
char bufn[NBUFN];
|
char bufn[NBUFN];
|
||||||
|
|
||||||
@ -40,8 +40,8 @@ int usebuffer(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int nextbuffer(int f, int n)
|
int nextbuffer(int f, int n)
|
||||||
{
|
{
|
||||||
register BUFFER *bp; /* eligable buffer to switch to */
|
register struct buffer *bp; /* eligable buffer to switch to */
|
||||||
register BUFFER *bbp; /* eligable buffer to switch to */
|
register struct buffer *bbp; /* eligable buffer to switch to */
|
||||||
|
|
||||||
/* make sure the arg is legit */
|
/* make sure the arg is legit */
|
||||||
if (f == FALSE)
|
if (f == FALSE)
|
||||||
@ -76,7 +76,7 @@ int nextbuffer(int f, int n)
|
|||||||
/*
|
/*
|
||||||
* make buffer BP current
|
* make buffer BP current
|
||||||
*/
|
*/
|
||||||
int swbuffer(BUFFER *bp)
|
int swbuffer(struct buffer *bp)
|
||||||
{
|
{
|
||||||
register window_t *wp;
|
register window_t *wp;
|
||||||
|
|
||||||
@ -131,7 +131,7 @@ int swbuffer(BUFFER *bp)
|
|||||||
*/
|
*/
|
||||||
int killbuffer(int f, int n)
|
int killbuffer(int f, int n)
|
||||||
{
|
{
|
||||||
register BUFFER *bp;
|
register struct buffer *bp;
|
||||||
register int s;
|
register int s;
|
||||||
char bufn[NBUFN];
|
char bufn[NBUFN];
|
||||||
|
|
||||||
@ -147,10 +147,10 @@ int killbuffer(int f, int n)
|
|||||||
/*
|
/*
|
||||||
* kill the buffer pointed to by bp
|
* kill the buffer pointed to by bp
|
||||||
*/
|
*/
|
||||||
int zotbuf(BUFFER *bp)
|
int zotbuf(struct buffer *bp)
|
||||||
{
|
{
|
||||||
register BUFFER *bp1;
|
register struct buffer *bp1;
|
||||||
register BUFFER *bp2;
|
register struct buffer *bp2;
|
||||||
register int s;
|
register int s;
|
||||||
|
|
||||||
if (bp->b_nwnd != 0) { /* Error if on screen. */
|
if (bp->b_nwnd != 0) { /* Error if on screen. */
|
||||||
@ -182,7 +182,7 @@ int zotbuf(BUFFER *bp)
|
|||||||
*/
|
*/
|
||||||
int namebuffer(int f, int n)
|
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 */
|
char bufn[NBUFN]; /* buffer to hold buffer name */
|
||||||
|
|
||||||
/* prompt for and get the new 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)
|
int listbuffers(int f, int n)
|
||||||
{
|
{
|
||||||
register window_t *wp;
|
register window_t *wp;
|
||||||
register BUFFER *bp;
|
register struct buffer *bp;
|
||||||
register int s;
|
register int s;
|
||||||
|
|
||||||
if ((s = makelist(f)) != TRUE)
|
if ((s = makelist(f)) != TRUE)
|
||||||
@ -270,7 +270,7 @@ int makelist(int iflag)
|
|||||||
register char *cp1;
|
register char *cp1;
|
||||||
register char *cp2;
|
register char *cp2;
|
||||||
register int c;
|
register int c;
|
||||||
register BUFFER *bp;
|
register struct buffer *bp;
|
||||||
register LINE *lp;
|
register LINE *lp;
|
||||||
register int s;
|
register int s;
|
||||||
register int i;
|
register int i;
|
||||||
@ -424,7 +424,7 @@ int addline(char *text)
|
|||||||
*/
|
*/
|
||||||
int anycb(void)
|
int anycb(void)
|
||||||
{
|
{
|
||||||
register BUFFER *bp;
|
register struct buffer *bp;
|
||||||
|
|
||||||
bp = bheadp;
|
bp = bheadp;
|
||||||
while (bp != NULL) {
|
while (bp != NULL) {
|
||||||
@ -438,15 +438,15 @@ int anycb(void)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Find a buffer, by name. Return a pointer
|
* 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
|
* If the buffer is not found
|
||||||
* and the "cflag" is TRUE, create it. The "bflag" is
|
* and the "cflag" is TRUE, create it. The "bflag" is
|
||||||
* the settings for the flags in in buffer.
|
* 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 struct buffer *bp;
|
||||||
register BUFFER *sb; /* buffer to insert after */
|
register struct buffer *sb; /* buffer to insert after */
|
||||||
register LINE *lp;
|
register LINE *lp;
|
||||||
|
|
||||||
bp = bheadp;
|
bp = bheadp;
|
||||||
@ -456,7 +456,7 @@ BUFFER *bfind(char *bname, int cflag, int bflag)
|
|||||||
bp = bp->b_bufp;
|
bp = bp->b_bufp;
|
||||||
}
|
}
|
||||||
if (cflag != FALSE) {
|
if (cflag != FALSE) {
|
||||||
if ((bp = (BUFFER *) malloc(sizeof(BUFFER))) == NULL)
|
if ((bp = (struct buffer *)malloc(sizeof(struct buffer))) == NULL)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
if ((lp = lalloc(0)) == NULL) {
|
if ((lp = lalloc(0)) == NULL) {
|
||||||
free((char *) bp);
|
free((char *) bp);
|
||||||
@ -511,7 +511,7 @@ BUFFER *bfind(char *bname, int cflag, int bflag)
|
|||||||
* that are required. Return TRUE if everything
|
* that are required. Return TRUE if everything
|
||||||
* looks good.
|
* looks good.
|
||||||
*/
|
*/
|
||||||
int bclear(BUFFER *bp)
|
int bclear(struct buffer *bp)
|
||||||
{
|
{
|
||||||
register LINE *lp;
|
register LINE *lp;
|
||||||
register int s;
|
register int s;
|
||||||
|
@ -1089,7 +1089,7 @@ static void modeline(window_t *wp)
|
|||||||
register char *cp;
|
register char *cp;
|
||||||
register int c;
|
register int c;
|
||||||
register int n; /* cursor position count */
|
register int n; /* cursor position count */
|
||||||
register BUFFER *bp;
|
register struct buffer *bp;
|
||||||
register int i; /* loop index */
|
register int i; /* loop index */
|
||||||
register int lchar; /* character to draw line in buffer with */
|
register int lchar; /* character to draw line in buffer with */
|
||||||
register int firstm; /* is this the first mode? */
|
register int firstm; /* is this the first mode? */
|
||||||
|
10
edef.h
10
edef.h
@ -46,7 +46,7 @@ extern int clexec; /* command line execution flag */
|
|||||||
extern int mstore; /* storing text to macro flag */
|
extern int mstore; /* storing text to macro flag */
|
||||||
extern int discmd; /* display command flag */
|
extern int discmd; /* display command flag */
|
||||||
extern int disinp; /* display input characters */
|
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 vtrow; /* Row location of SW cursor */
|
||||||
extern int vtcol; /* Column location of SW cursor */
|
extern int vtcol; /* Column location of SW cursor */
|
||||||
extern int ttrow; /* Row location of HW 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 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 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 window_t *wheadp; /* Head of list of windows */
|
||||||
extern BUFFER *bheadp; /* Head of list of buffers */
|
extern struct buffer *bheadp; /* Head of list of buffers */
|
||||||
extern BUFFER *blistp; /* Buffer for C-X C-B */
|
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 window_t *wpopup(); /* Pop up window creation */
|
||||||
extern LINE *lalloc(int); /* Allocate a line */
|
extern LINE *lalloc(int); /* Allocate a line */
|
||||||
extern char sres[NBUFN]; /* current screen resolution */
|
extern char sres[NBUFN]; /* current screen resolution */
|
||||||
|
8
efunc.h
8
efunc.h
@ -208,16 +208,16 @@ extern char *transbind(char *skey);
|
|||||||
/* buffer.c */
|
/* buffer.c */
|
||||||
extern int usebuffer(int f, int n);
|
extern int usebuffer(int f, int n);
|
||||||
extern int nextbuffer(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 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 namebuffer(int f, int n);
|
||||||
extern int listbuffers(int f, int n);
|
extern int listbuffers(int f, int n);
|
||||||
extern int makelist(int iflag);
|
extern int makelist(int iflag);
|
||||||
extern void ltoa(char *buf, int width, long num);
|
extern void ltoa(char *buf, int width, long num);
|
||||||
extern int addline(char *text);
|
extern int addline(char *text);
|
||||||
extern int anycb(void);
|
extern int anycb(void);
|
||||||
extern int bclear(BUFFER *bp);
|
extern int bclear(struct buffer *bp);
|
||||||
extern int unmark(int f, int n);
|
extern int unmark(int f, int n);
|
||||||
|
|
||||||
/* file.c */
|
/* file.c */
|
||||||
@ -254,7 +254,7 @@ extern int storemac(int f, int n);
|
|||||||
extern int storeproc(int f, int n);
|
extern int storeproc(int f, int n);
|
||||||
extern int execproc(int f, int n);
|
extern int execproc(int f, int n);
|
||||||
extern int execbuf(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 void freewhile(WHBLOCK *wp);
|
||||||
extern int execfile(int f, int n);
|
extern int execfile(int f, int n);
|
||||||
extern int dofile(char *fname);
|
extern int dofile(char *fname);
|
||||||
|
10
estruct.h
10
estruct.h
@ -430,7 +430,7 @@
|
|||||||
*/
|
*/
|
||||||
typedef struct window {
|
typedef 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 */
|
||||||
struct LINE *w_dotp; /* Line containing "." */
|
struct LINE *w_dotp; /* Line containing "." */
|
||||||
short w_doto; /* Byte offset for "." */
|
short w_doto; /* Byte offset for "." */
|
||||||
@ -470,8 +470,8 @@ typedef struct window {
|
|||||||
* Buffers may be "Inactive" which means the files associated with them
|
* 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.
|
* have not been read in yet. These get read in at "use buffer" time.
|
||||||
*/
|
*/
|
||||||
typedef struct BUFFER {
|
struct buffer {
|
||||||
struct BUFFER *b_bufp; /* Link to next BUFFER */
|
struct buffer *b_bufp; /* Link to next struct buffer */
|
||||||
struct LINE *b_dotp; /* Link to "." LINE structure */
|
struct LINE *b_dotp; /* Link to "." LINE structure */
|
||||||
short b_doto; /* Offset of "." in above LINE */
|
short b_doto; /* Offset of "." in above LINE */
|
||||||
struct LINE *b_markp; /* The same as the above two, */
|
struct LINE *b_markp; /* The same as the above two, */
|
||||||
@ -486,7 +486,7 @@ typedef struct BUFFER {
|
|||||||
#if CRYPT
|
#if CRYPT
|
||||||
char b_key[NPAT]; /* current encrypted key */
|
char b_key[NPAT]; /* current encrypted key */
|
||||||
#endif
|
#endif
|
||||||
} BUFFER;
|
};
|
||||||
|
|
||||||
#define BFINVS 0x01 /* Internal invisable buffer */
|
#define BFINVS 0x01 /* Internal invisable buffer */
|
||||||
#define BFCHG 0x02 /* Changed since last write */
|
#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
|
* 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
|
* 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,
|
* 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
|
* 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.
|
* additions will include update hints, and a list of marks into the line.
|
||||||
|
2
eval.c
2
eval.c
@ -763,7 +763,7 @@ int gettyp(char *token)
|
|||||||
char *getval(char *token)
|
char *getval(char *token)
|
||||||
{
|
{
|
||||||
register int status; /* error return */
|
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 blen; /* length of buffer argument */
|
||||||
register int distmp; /* temporary discmd flag */
|
register int distmp; /* temporary discmd flag */
|
||||||
static char buf[NSTRING]; /* string buffer for some returns */
|
static char buf[NSTRING]; /* string buffer for some returns */
|
||||||
|
18
exec.c
18
exec.c
@ -252,7 +252,7 @@ int nextarg(char *prompt, char *buffer, int size, int terminator)
|
|||||||
*/
|
*/
|
||||||
int storemac(int f, int n)
|
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 */
|
char bname[NBUFN]; /* name of buffer to use */
|
||||||
|
|
||||||
/* must have a numeric argument to this function */
|
/* must have a numeric argument to this function */
|
||||||
@ -298,7 +298,7 @@ int storemac(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int storeproc(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 */
|
register int status; /* return status */
|
||||||
char bname[NBUFN]; /* name of buffer to use */
|
char bname[NBUFN]; /* name of buffer to use */
|
||||||
|
|
||||||
@ -338,7 +338,7 @@ int storeproc(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int execproc(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 */
|
register int status; /* status return */
|
||||||
char bufn[NBUFN + 2]; /* name of buffer to execute */
|
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)
|
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 */
|
register int status; /* status return */
|
||||||
char bufn[NSTRING]; /* name of buffer to execute */
|
char bufn[NSTRING]; /* name of buffer to execute */
|
||||||
|
|
||||||
@ -415,9 +415,9 @@ int execbuf(int f, int n)
|
|||||||
*
|
*
|
||||||
* *LBL01
|
* *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 int status; /* status return */
|
||||||
register LINE *lp; /* pointer to line to execute */
|
register LINE *lp; /* pointer to line to execute */
|
||||||
@ -884,8 +884,8 @@ int execfile(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int dofile(char *fname)
|
int dofile(char *fname)
|
||||||
{
|
{
|
||||||
register BUFFER *bp; /* buffer to place file to exeute */
|
register struct buffer *bp; /* buffer to place file to exeute */
|
||||||
register BUFFER *cb; /* temp to hold current buf while we read */
|
register struct buffer *cb; /* temp to hold current buf while we read */
|
||||||
register int status; /* results of various calls */
|
register int status; /* results of various calls */
|
||||||
char bname[NBUFN]; /* name of buffer */
|
char bname[NBUFN]; /* name of buffer */
|
||||||
|
|
||||||
@ -923,7 +923,7 @@ int dofile(char *fname)
|
|||||||
*/
|
*/
|
||||||
int cbuf(int f, int n, int bufnum)
|
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 */
|
register int status; /* status return */
|
||||||
static char bufname[] = "*Macro xx*";
|
static char bufname[] = "*Macro xx*";
|
||||||
|
|
||||||
|
8
file.c
8
file.c
@ -141,7 +141,7 @@ static int resetkey(void)
|
|||||||
*/
|
*/
|
||||||
int getfile(char *fname, int lockfl)
|
int getfile(char *fname, int lockfl)
|
||||||
{
|
{
|
||||||
register BUFFER *bp;
|
register struct buffer *bp;
|
||||||
register LINE *lp;
|
register LINE *lp;
|
||||||
register int i;
|
register int i;
|
||||||
register int s;
|
register int s;
|
||||||
@ -211,7 +211,7 @@ int readin(char *fname, int lockfl)
|
|||||||
register LINE *lp2;
|
register LINE *lp2;
|
||||||
register int i;
|
register int i;
|
||||||
register window_t *wp;
|
register window_t *wp;
|
||||||
register BUFFER *bp;
|
register struct buffer *bp;
|
||||||
register int s;
|
register int s;
|
||||||
register int nbytes;
|
register int nbytes;
|
||||||
register int nline;
|
register int nline;
|
||||||
@ -512,7 +512,7 @@ int writeout(char *fn)
|
|||||||
* to modify the file name associated with
|
* to modify the file name associated with
|
||||||
* the current buffer. It is like the "f" command
|
* the current buffer. It is like the "f" command
|
||||||
* in UNIX "ed". The operation is simple; just zap
|
* 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
|
* as needing an update. You can type a blank line at the
|
||||||
* prompt if you wish.
|
* prompt if you wish.
|
||||||
*/
|
*/
|
||||||
@ -551,7 +551,7 @@ int ifile(char *fname)
|
|||||||
register LINE *lp1;
|
register LINE *lp1;
|
||||||
register LINE *lp2;
|
register LINE *lp2;
|
||||||
register int i;
|
register int i;
|
||||||
register BUFFER *bp;
|
register struct buffer *bp;
|
||||||
register int s;
|
register int s;
|
||||||
register int nbytes;
|
register int nbytes;
|
||||||
register int nline;
|
register int nline;
|
||||||
|
@ -36,7 +36,7 @@ int clexec = FALSE; /* command line execution flag */
|
|||||||
int mstore = FALSE; /* storing text to macro flag */
|
int mstore = FALSE; /* storing text to macro flag */
|
||||||
int discmd = TRUE; /* display command flag */
|
int discmd = TRUE; /* display command flag */
|
||||||
int disinp = TRUE; /* display input characters */
|
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 vtrow = 0; /* Row location of SW cursor */
|
||||||
int vtcol = 0; /* Column location of SW cursor */
|
int vtcol = 0; /* Column location of SW cursor */
|
||||||
int ttrow = HUGE; /* Row location of HW cursor */
|
int ttrow = HUGE; /* Row location of HW cursor */
|
||||||
@ -100,10 +100,10 @@ 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 */
|
window_t *curwp; /* Current window */
|
||||||
BUFFER *curbp; /* Current buffer */
|
struct buffer *curbp; /* Current buffer */
|
||||||
window_t *wheadp; /* Head of list of windows */
|
window_t *wheadp; /* Head of list of windows */
|
||||||
BUFFER *bheadp; /* Head of list of buffers */
|
struct buffer *bheadp; /* Head of list of buffers */
|
||||||
BUFFER *blistp; /* Buffer for C-X C-B */
|
struct buffer *blistp; /* Buffer for C-X C-B */
|
||||||
|
|
||||||
char sres[NBUFN]; /* current screen resolution */
|
char sres[NBUFN]; /* current screen resolution */
|
||||||
char pat[NPAT]; /* Search pattern */
|
char pat[NPAT]; /* Search pattern */
|
||||||
|
2
line.c
2
line.c
@ -52,7 +52,7 @@ LINE *lalloc(int used)
|
|||||||
*/
|
*/
|
||||||
void lfree(LINE *lp)
|
void lfree(LINE *lp)
|
||||||
{
|
{
|
||||||
register BUFFER *bp;
|
register struct buffer *bp;
|
||||||
register window_t *wp;
|
register window_t *wp;
|
||||||
|
|
||||||
wp = wheadp;
|
wp = wheadp;
|
||||||
|
12
main.c
12
main.c
@ -98,11 +98,11 @@ int main(int argc, char **argv)
|
|||||||
register int f; /* default flag */
|
register int f; /* default flag */
|
||||||
register int n; /* numeric repeat count */
|
register int n; /* numeric repeat count */
|
||||||
register int mflag; /* negative flag on repeat */
|
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 firstfile; /* first file flag */
|
||||||
register int carg; /* current arg to scan */
|
register int carg; /* current arg to scan */
|
||||||
register int startflag; /* startup executed flag */
|
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 basec; /* c stripped of meta character */
|
||||||
int viewflag; /* are we starting in view mode? */
|
int viewflag; /* are we starting in view mode? */
|
||||||
int gotoflag; /* do we need to goto a line at start? */
|
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)
|
void edinit(char *bname)
|
||||||
{
|
{
|
||||||
register BUFFER *bp;
|
register struct buffer *bp;
|
||||||
register window_t *wp;
|
register window_t *wp;
|
||||||
|
|
||||||
bp = bfind(bname, TRUE, 0); /* First buffer */
|
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)
|
int quickexit(int f, int n)
|
||||||
{
|
{
|
||||||
register BUFFER *bp; /* scanning pointer to buffers */
|
register struct buffer *bp; /* scanning pointer to buffers */
|
||||||
register BUFFER *oldcb; /* original current buffer */
|
register struct buffer *oldcb; /* original current buffer */
|
||||||
register int status;
|
register int status;
|
||||||
|
|
||||||
oldcb = curbp; /* save in case we fail */
|
oldcb = curbp; /* save in case we fail */
|
||||||
@ -817,7 +817,7 @@ dspram()
|
|||||||
*/
|
*/
|
||||||
int cexit(int status)
|
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 *wp; /* window list pointer */
|
||||||
register window_t *tp; /* temporary window pointer */
|
register window_t *tp; /* temporary window pointer */
|
||||||
|
|
||||||
|
4
spawn.c
4
spawn.c
@ -258,7 +258,7 @@ int pipecmd(int f, int n)
|
|||||||
{
|
{
|
||||||
register int s; /* return status from CLI */
|
register int s; /* return status from CLI */
|
||||||
register window_t *wp; /* pointer to new window */
|
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 */
|
char line[NLINE]; /* command line send to shell */
|
||||||
static char bname[] = "command";
|
static char bname[] = "command";
|
||||||
|
|
||||||
@ -379,7 +379,7 @@ int pipecmd(int f, int n)
|
|||||||
int filter_buffer(int f, int n)
|
int filter_buffer(int f, int n)
|
||||||
{
|
{
|
||||||
register int s; /* return status from CLI */
|
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 line[NLINE]; /* command line send to shell */
|
||||||
char tmpnam[NFILEN]; /* place to store real file name */
|
char tmpnam[NFILEN]; /* place to store real file name */
|
||||||
static char bname1[] = "fltinp";
|
static char bname1[] = "fltinp";
|
||||||
|
Loading…
Reference in New Issue
Block a user