mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-18 23:36:23 -05:00
uemacs: remove use of 'register' keyword
Lets welcome uEmacs/PK to the year 2010! As expected, the patch has no effect on the generated code: text data bss dec hex filename 106002 8864 18616 133482 2096a em 106002 8864 18616 133482 2096a em.new Cc: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
8a3292cd0d
commit
74ffb9e254
6
ansi.c
6
ansi.c
@ -190,9 +190,9 @@ ansibeep()
|
|||||||
}
|
}
|
||||||
|
|
||||||
ansiparm(n)
|
ansiparm(n)
|
||||||
register int n;
|
int n;
|
||||||
{
|
{
|
||||||
register int q, r;
|
int q, r;
|
||||||
|
|
||||||
q = n / 10;
|
q = n / 10;
|
||||||
if (q != 0) {
|
if (q != 0) {
|
||||||
@ -208,7 +208,7 @@ register int n;
|
|||||||
ansiopen()
|
ansiopen()
|
||||||
{
|
{
|
||||||
#if V7 | USG | BSD
|
#if V7 | USG | BSD
|
||||||
register char *cp;
|
char *cp;
|
||||||
|
|
||||||
if ((cp = getenv("TERM")) == NULL) {
|
if ((cp = getenv("TERM")) == NULL) {
|
||||||
puts("Shell variable TERM not defined!");
|
puts("Shell variable TERM not defined!");
|
||||||
|
28
basic.c
28
basic.c
@ -33,7 +33,7 @@ int gotobol(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int backchar(int f, int n)
|
int backchar(int f, int n)
|
||||||
{
|
{
|
||||||
register LINE *lp;
|
LINE *lp;
|
||||||
|
|
||||||
if (n < 0)
|
if (n < 0)
|
||||||
return (forwchar(f, -n));
|
return (forwchar(f, -n));
|
||||||
@ -90,7 +90,7 @@ int forwchar(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int gotoline(int f, int n)
|
int gotoline(int f, int n)
|
||||||
{
|
{
|
||||||
register int status; /* status return */
|
int status; /* status return */
|
||||||
char arg[NSTRING]; /* buffer to hold argument */
|
char arg[NSTRING]; /* buffer to hold argument */
|
||||||
|
|
||||||
/* get an argument if one doesnt exist */
|
/* get an argument if one doesnt exist */
|
||||||
@ -146,7 +146,7 @@ int gotoeob(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int forwline(int f, int n)
|
int forwline(int f, int n)
|
||||||
{
|
{
|
||||||
register LINE *dlp;
|
LINE *dlp;
|
||||||
|
|
||||||
if (n < 0)
|
if (n < 0)
|
||||||
return (backline(f, -n));
|
return (backline(f, -n));
|
||||||
@ -183,7 +183,7 @@ int forwline(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int backline(int f, int n)
|
int backline(int f, int n)
|
||||||
{
|
{
|
||||||
register LINE *dlp;
|
LINE *dlp;
|
||||||
|
|
||||||
if (n < 0)
|
if (n < 0)
|
||||||
return (forwline(f, -n));
|
return (forwline(f, -n));
|
||||||
@ -223,7 +223,7 @@ int backline(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int gotobop(int f, int n)
|
int gotobop(int f, int n)
|
||||||
{
|
{
|
||||||
register int suc; /* success of last backchar */
|
int suc; /* success of last backchar */
|
||||||
|
|
||||||
if (n < 0) /* the other way... */
|
if (n < 0) /* the other way... */
|
||||||
return (gotoeop(f, -n));
|
return (gotoeop(f, -n));
|
||||||
@ -270,7 +270,7 @@ int gotobop(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int gotoeop(int f, int n)
|
int gotoeop(int f, int n)
|
||||||
{
|
{
|
||||||
register int suc; /* success of last backchar */
|
int suc; /* success of last backchar */
|
||||||
|
|
||||||
if (n < 0) /* the other way... */
|
if (n < 0) /* the other way... */
|
||||||
return (gotobop(f, -n));
|
return (gotobop(f, -n));
|
||||||
@ -321,10 +321,10 @@ int gotoeop(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int getgoal(LINE *dlp)
|
int getgoal(LINE *dlp)
|
||||||
{
|
{
|
||||||
register int c;
|
int c;
|
||||||
register int col;
|
int col;
|
||||||
register int newcol;
|
int newcol;
|
||||||
register int dbo;
|
int dbo;
|
||||||
|
|
||||||
col = 0;
|
col = 0;
|
||||||
dbo = 0;
|
dbo = 0;
|
||||||
@ -352,7 +352,7 @@ int getgoal(LINE *dlp)
|
|||||||
*/
|
*/
|
||||||
int forwpage(int f, int n)
|
int forwpage(int f, int n)
|
||||||
{
|
{
|
||||||
register LINE *lp;
|
LINE *lp;
|
||||||
|
|
||||||
if (f == FALSE) {
|
if (f == FALSE) {
|
||||||
#if SCROLLCODE
|
#if SCROLLCODE
|
||||||
@ -394,7 +394,7 @@ int forwpage(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int backpage(int f, int n)
|
int backpage(int f, int n)
|
||||||
{
|
{
|
||||||
register LINE *lp;
|
LINE *lp;
|
||||||
|
|
||||||
if (f == FALSE) {
|
if (f == FALSE) {
|
||||||
#if SCROLLCODE
|
#if SCROLLCODE
|
||||||
@ -448,8 +448,8 @@ int setmark(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int swapmark(int f, int n)
|
int swapmark(int f, int n)
|
||||||
{
|
{
|
||||||
register LINE *odotp;
|
LINE *odotp;
|
||||||
register int odoto;
|
int odoto;
|
||||||
|
|
||||||
if (curwp->w_markp == NULL) {
|
if (curwp->w_markp == NULL) {
|
||||||
mlwrite("No mark in this window");
|
mlwrite("No mark in this window");
|
||||||
|
50
bind.c
50
bind.c
@ -17,8 +17,8 @@ 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 */
|
||||||
register window_t *wp; /* scaning pointer to windows */
|
window_t *wp; /* scaning pointer to windows */
|
||||||
register 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() */
|
||||||
|
|
||||||
/* first check if we are already here */
|
/* first check if we are already here */
|
||||||
@ -56,8 +56,8 @@ int help(int f, int n)
|
|||||||
|
|
||||||
int deskey(int f, int n)
|
int deskey(int f, int n)
|
||||||
{ /* describe the command for a certain key */
|
{ /* describe the command for a certain key */
|
||||||
register int c; /* key to describe */
|
int c; /* key to describe */
|
||||||
register char *ptr; /* string pointer to scan output strings */
|
char *ptr; /* string pointer to scan output strings */
|
||||||
char outseq[NSTRING]; /* output buffer for command sequence */
|
char outseq[NSTRING]; /* output buffer for command sequence */
|
||||||
|
|
||||||
/* prompt the user to type us a key to describe */
|
/* prompt the user to type us a key to describe */
|
||||||
@ -88,10 +88,10 @@ int deskey(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int bindtokey(int f, int n)
|
int bindtokey(int f, int n)
|
||||||
{
|
{
|
||||||
register unsigned int c; /* command key to bind */
|
unsigned int c; /* command key to bind */
|
||||||
register fn_t kfunc; /* ptr to the requested function to bind to */
|
fn_t kfunc; /* ptr to the requested function to bind to */
|
||||||
register KEYTAB *ktp; /* pointer into the command table */
|
KEYTAB *ktp; /* pointer into the command table */
|
||||||
register int found; /* matched command flag */
|
int found; /* matched command flag */
|
||||||
char outseq[80]; /* output buffer for keystroke sequence */
|
char outseq[80]; /* output buffer for keystroke sequence */
|
||||||
|
|
||||||
/* prompt the user to type in a key to bind */
|
/* prompt the user to type in a key to bind */
|
||||||
@ -176,7 +176,7 @@ int bindtokey(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int unbindkey(int f, int n)
|
int unbindkey(int f, int n)
|
||||||
{
|
{
|
||||||
register int c; /* command key to unbind */
|
int c; /* command key to unbind */
|
||||||
char outseq[80]; /* output buffer for keystroke sequence */
|
char outseq[80]; /* output buffer for keystroke sequence */
|
||||||
|
|
||||||
/* prompt the user to type in a key to unbind */
|
/* prompt the user to type in a key to unbind */
|
||||||
@ -207,9 +207,9 @@ int unbindkey(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int unbindchar(int c)
|
int unbindchar(int c)
|
||||||
{
|
{
|
||||||
register KEYTAB *ktp; /* pointer into the command table */
|
KEYTAB *ktp; /* pointer into the command table */
|
||||||
register KEYTAB *sktp; /* saved pointer into the command table */
|
KEYTAB *sktp; /* saved pointer into the command table */
|
||||||
register int found; /* matched command flag */
|
int found; /* matched command flag */
|
||||||
|
|
||||||
/* search the table to see if the key exists */
|
/* search the table to see if the key exists */
|
||||||
ktp = &keytab[0];
|
ktp = &keytab[0];
|
||||||
@ -274,10 +274,10 @@ int apro(int f, int n)
|
|||||||
int buildlist(int type, char *mstring)
|
int buildlist(int type, char *mstring)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
register window_t *wp; /* scanning pointer to windows */
|
window_t *wp; /* scanning pointer to windows */
|
||||||
register KEYTAB *ktp; /* pointer into the command table */
|
KEYTAB *ktp; /* pointer into the command table */
|
||||||
register NBIND *nptr; /* pointer into the name binding table */
|
NBIND *nptr; /* pointer into the name binding table */
|
||||||
register struct buffer *bp; /* buffer to put binding list into */
|
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 */
|
||||||
|
|
||||||
@ -423,7 +423,7 @@ int strinc(char *source, char *sub)
|
|||||||
*/
|
*/
|
||||||
unsigned int getckey(int mflag)
|
unsigned int getckey(int mflag)
|
||||||
{
|
{
|
||||||
register unsigned int c; /* character fetched */
|
unsigned int c; /* character fetched */
|
||||||
char tok[NSTRING]; /* command incoming */
|
char tok[NSTRING]; /* command incoming */
|
||||||
|
|
||||||
/* check to see if we are executing a command line */
|
/* check to see if we are executing a command line */
|
||||||
@ -473,10 +473,10 @@ int startup(char *sfname)
|
|||||||
*/
|
*/
|
||||||
char *flook(char *fname, int hflag)
|
char *flook(char *fname, int hflag)
|
||||||
{
|
{
|
||||||
register char *home; /* path to home directory */
|
char *home; /* path to home directory */
|
||||||
register char *path; /* environmental PATH variable */
|
char *path; /* environmental PATH variable */
|
||||||
register char *sp; /* pointer into path spec */
|
char *sp; /* pointer into path spec */
|
||||||
register int i; /* index */
|
int i; /* index */
|
||||||
static char fspec[NSTRING]; /* full path spec to search */
|
static char fspec[NSTRING]; /* full path spec to search */
|
||||||
|
|
||||||
#if ENVFUNC
|
#if ENVFUNC
|
||||||
@ -595,7 +595,7 @@ void cmdstr(int c, char *seq)
|
|||||||
*/
|
*/
|
||||||
int (*getbind(int c))(int, int)
|
int (*getbind(int c))(int, int)
|
||||||
{
|
{
|
||||||
register KEYTAB *ktp;
|
KEYTAB *ktp;
|
||||||
|
|
||||||
ktp = &keytab[0]; /* Look in key table. */
|
ktp = &keytab[0]; /* Look in key table. */
|
||||||
while (ktp->k_fp != NULL) {
|
while (ktp->k_fp != NULL) {
|
||||||
@ -615,7 +615,7 @@ int (*getbind(int c))(int, int)
|
|||||||
*/
|
*/
|
||||||
char *getfname(fn_t func)
|
char *getfname(fn_t func)
|
||||||
{
|
{
|
||||||
register NBIND *nptr; /* pointer into the name binding table */
|
NBIND *nptr; /* pointer into the name binding table */
|
||||||
|
|
||||||
/* skim through the table, looking for a match */
|
/* skim through the table, looking for a match */
|
||||||
nptr = &names[0];
|
nptr = &names[0];
|
||||||
@ -635,7 +635,7 @@ char *getfname(fn_t func)
|
|||||||
*/
|
*/
|
||||||
int (*fncmatch(char *fname)) (int, int)
|
int (*fncmatch(char *fname)) (int, int)
|
||||||
{
|
{
|
||||||
register NBIND *ffp; /* pointer to entry in name binding table */
|
NBIND *ffp; /* pointer to entry in name binding table */
|
||||||
|
|
||||||
/* scan through the table, returning any match */
|
/* scan through the table, returning any match */
|
||||||
ffp = &names[0];
|
ffp = &names[0];
|
||||||
@ -655,7 +655,7 @@ int (*fncmatch(char *fname)) (int, int)
|
|||||||
*/
|
*/
|
||||||
unsigned int stock(char *keyname)
|
unsigned int stock(char *keyname)
|
||||||
{
|
{
|
||||||
register unsigned int c; /* key sequence to return */
|
unsigned int c; /* key sequence to return */
|
||||||
|
|
||||||
/* parse it up */
|
/* parse it up */
|
||||||
c = 0;
|
c = 0;
|
||||||
|
60
buffer.c
60
buffer.c
@ -22,8 +22,8 @@
|
|||||||
*/
|
*/
|
||||||
int usebuffer(int f, int n)
|
int usebuffer(int f, int n)
|
||||||
{
|
{
|
||||||
register struct buffer *bp;
|
struct buffer *bp;
|
||||||
register int s;
|
int s;
|
||||||
char bufn[NBUFN];
|
char bufn[NBUFN];
|
||||||
|
|
||||||
if ((s = mlreply("Use buffer: ", bufn, NBUFN)) != TRUE)
|
if ((s = mlreply("Use buffer: ", bufn, NBUFN)) != TRUE)
|
||||||
@ -40,8 +40,8 @@ int usebuffer(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int nextbuffer(int f, int n)
|
int nextbuffer(int f, int n)
|
||||||
{
|
{
|
||||||
register struct buffer *bp; /* eligable buffer to switch to */
|
struct buffer *bp; /* eligable buffer to switch to */
|
||||||
register struct buffer *bbp; /* eligable buffer to switch to */
|
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)
|
||||||
@ -78,7 +78,7 @@ int nextbuffer(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int swbuffer(struct buffer *bp)
|
int swbuffer(struct buffer *bp)
|
||||||
{
|
{
|
||||||
register window_t *wp;
|
window_t *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;
|
||||||
@ -131,8 +131,8 @@ int swbuffer(struct buffer *bp)
|
|||||||
*/
|
*/
|
||||||
int killbuffer(int f, int n)
|
int killbuffer(int f, int n)
|
||||||
{
|
{
|
||||||
register struct buffer *bp;
|
struct buffer *bp;
|
||||||
register int s;
|
int s;
|
||||||
char bufn[NBUFN];
|
char bufn[NBUFN];
|
||||||
|
|
||||||
if ((s = mlreply("Kill buffer: ", bufn, NBUFN)) != TRUE)
|
if ((s = mlreply("Kill buffer: ", bufn, NBUFN)) != TRUE)
|
||||||
@ -149,9 +149,9 @@ int killbuffer(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int zotbuf(struct buffer *bp)
|
int zotbuf(struct buffer *bp)
|
||||||
{
|
{
|
||||||
register struct buffer *bp1;
|
struct buffer *bp1;
|
||||||
register struct buffer *bp2;
|
struct buffer *bp2;
|
||||||
register int s;
|
int s;
|
||||||
|
|
||||||
if (bp->b_nwnd != 0) { /* Error if on screen. */
|
if (bp->b_nwnd != 0) { /* Error if on screen. */
|
||||||
mlwrite("Buffer is being displayed");
|
mlwrite("Buffer is being displayed");
|
||||||
@ -182,7 +182,7 @@ int zotbuf(struct buffer *bp)
|
|||||||
*/
|
*/
|
||||||
int namebuffer(int f, int n)
|
int namebuffer(int f, int n)
|
||||||
{
|
{
|
||||||
register struct buffer *bp; /* pointer to scan through all buffers */
|
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 */
|
||||||
@ -219,9 +219,9 @@ int namebuffer(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int listbuffers(int f, int n)
|
int listbuffers(int f, int n)
|
||||||
{
|
{
|
||||||
register window_t *wp;
|
window_t *wp;
|
||||||
register struct buffer *bp;
|
struct buffer *bp;
|
||||||
register int s;
|
int s;
|
||||||
|
|
||||||
if ((s = makelist(f)) != TRUE)
|
if ((s = makelist(f)) != TRUE)
|
||||||
return (s);
|
return (s);
|
||||||
@ -267,13 +267,13 @@ int listbuffers(int f, int n)
|
|||||||
#define MAXLINE MAXCOL
|
#define MAXLINE MAXCOL
|
||||||
int makelist(int iflag)
|
int makelist(int iflag)
|
||||||
{
|
{
|
||||||
register char *cp1;
|
char *cp1;
|
||||||
register char *cp2;
|
char *cp2;
|
||||||
register int c;
|
int c;
|
||||||
register struct buffer *bp;
|
struct buffer *bp;
|
||||||
register LINE *lp;
|
LINE *lp;
|
||||||
register int s;
|
int s;
|
||||||
register int i;
|
int i;
|
||||||
long nbytes; /* # of bytes in current buffer */
|
long nbytes; /* # of bytes in current buffer */
|
||||||
char b[7 + 1];
|
char b[7 + 1];
|
||||||
char line[MAXLINE];
|
char line[MAXLINE];
|
||||||
@ -394,9 +394,9 @@ void ltoa(char *buf, int width, long num)
|
|||||||
*/
|
*/
|
||||||
int addline(char *text)
|
int addline(char *text)
|
||||||
{
|
{
|
||||||
register LINE *lp;
|
LINE *lp;
|
||||||
register int i;
|
int i;
|
||||||
register int ntext;
|
int ntext;
|
||||||
|
|
||||||
ntext = strlen(text);
|
ntext = strlen(text);
|
||||||
if ((lp = lalloc(ntext)) == NULL)
|
if ((lp = lalloc(ntext)) == NULL)
|
||||||
@ -424,7 +424,7 @@ int addline(char *text)
|
|||||||
*/
|
*/
|
||||||
int anycb(void)
|
int anycb(void)
|
||||||
{
|
{
|
||||||
register struct buffer *bp;
|
struct buffer *bp;
|
||||||
|
|
||||||
bp = bheadp;
|
bp = bheadp;
|
||||||
while (bp != NULL) {
|
while (bp != NULL) {
|
||||||
@ -445,9 +445,9 @@ int anycb(void)
|
|||||||
*/
|
*/
|
||||||
struct buffer *bfind(char *bname, int cflag, int bflag)
|
struct buffer *bfind(char *bname, int cflag, int bflag)
|
||||||
{
|
{
|
||||||
register struct buffer *bp;
|
struct buffer *bp;
|
||||||
register struct buffer *sb; /* buffer to insert after */
|
struct buffer *sb; /* buffer to insert after */
|
||||||
register LINE *lp;
|
LINE *lp;
|
||||||
|
|
||||||
bp = bheadp;
|
bp = bheadp;
|
||||||
while (bp != NULL) {
|
while (bp != NULL) {
|
||||||
@ -513,8 +513,8 @@ struct buffer *bfind(char *bname, int cflag, int bflag)
|
|||||||
*/
|
*/
|
||||||
int bclear(struct buffer *bp)
|
int bclear(struct buffer *bp)
|
||||||
{
|
{
|
||||||
register LINE *lp;
|
LINE *lp;
|
||||||
register int s;
|
int s;
|
||||||
|
|
||||||
if ((bp->b_flag & BFINVS) == 0 /* Not scratch buffer. */
|
if ((bp->b_flag & BFINVS) == 0 /* Not scratch buffer. */
|
||||||
&& (bp->b_flag & BFCHG) != 0 /* Something changed */
|
&& (bp->b_flag & BFCHG) != 0 /* Something changed */
|
||||||
|
4
crypt.c
4
crypt.c
@ -22,7 +22,7 @@ static int mod95(int);
|
|||||||
*/
|
*/
|
||||||
int set_encryption_key(int f, int n)
|
int set_encryption_key(int f, int n)
|
||||||
{
|
{
|
||||||
register int status; /* return status */
|
int status; /* return status */
|
||||||
int odisinp; /* original vlaue of disinp */
|
int odisinp; /* original vlaue of disinp */
|
||||||
char key[NPAT]; /* new encryption string */
|
char key[NPAT]; /* new encryption string */
|
||||||
|
|
||||||
@ -145,7 +145,7 @@ int set_encryption_key(int f, int n)
|
|||||||
|
|
||||||
void myencrypt(char *bptr, unsigned len)
|
void myencrypt(char *bptr, unsigned len)
|
||||||
{
|
{
|
||||||
register int cc; /* current character being considered */
|
int cc; /* current character being considered */
|
||||||
|
|
||||||
static long key = 0; /* 29 bit encipherment key */
|
static long key = 0; /* 29 bit encipherment key */
|
||||||
static int salt = 0; /* salt to spice up key with */
|
static int salt = 0; /* salt to spice up key with */
|
||||||
|
106
display.c
106
display.c
@ -76,8 +76,8 @@ static void putline(int row, int col, char *buf);
|
|||||||
*/
|
*/
|
||||||
void vtinit(void)
|
void vtinit(void)
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
register VIDEO *vp;
|
VIDEO *vp;
|
||||||
|
|
||||||
TTopen(); /* open the screen */
|
TTopen(); /* open the screen */
|
||||||
TTkopen(); /* open the keyboard */
|
TTkopen(); /* open the keyboard */
|
||||||
@ -176,7 +176,7 @@ void vtmove(int row, int col)
|
|||||||
*/
|
*/
|
||||||
static void vtputc(unsigned char c)
|
static void vtputc(unsigned char c)
|
||||||
{
|
{
|
||||||
register VIDEO *vp; /* ptr to line being updated */
|
VIDEO *vp; /* ptr to line being updated */
|
||||||
|
|
||||||
vp = vscreen[vtrow];
|
vp = vscreen[vtrow];
|
||||||
|
|
||||||
@ -224,8 +224,8 @@ static void vtputc(unsigned char c)
|
|||||||
*/
|
*/
|
||||||
static void vteeol(void)
|
static void vteeol(void)
|
||||||
{
|
{
|
||||||
/* register VIDEO *vp; */
|
/* VIDEO *vp; */
|
||||||
register char *vcp = vscreen[vtrow]->v_text;
|
char *vcp = vscreen[vtrow]->v_text;
|
||||||
|
|
||||||
/* vp = vscreen[vtrow]; */
|
/* vp = vscreen[vtrow]; */
|
||||||
while (vtcol < term.t_ncol)
|
while (vtcol < term.t_ncol)
|
||||||
@ -259,7 +259,7 @@ static int scrflags;
|
|||||||
*/
|
*/
|
||||||
int update(int force)
|
int update(int force)
|
||||||
{
|
{
|
||||||
register window_t *wp;
|
window_t *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 */
|
||||||
register window_t *owp;
|
window_t *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)
|
||||||
@ -361,8 +361,8 @@ int update(int force)
|
|||||||
*/
|
*/
|
||||||
static int reframe(window_t *wp)
|
static int reframe(window_t *wp)
|
||||||
{
|
{
|
||||||
register LINE *lp, *lp0;
|
LINE *lp, *lp0;
|
||||||
register int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
/* if not a requested reframe, check for a needed one */
|
/* if not a requested reframe, check for a needed one */
|
||||||
if ((wp->w_flag & WFFORCE) == 0) {
|
if ((wp->w_flag & WFFORCE) == 0) {
|
||||||
@ -451,9 +451,9 @@ static int reframe(window_t *wp)
|
|||||||
*/
|
*/
|
||||||
static void updone(window_t *wp)
|
static void updone(window_t *wp)
|
||||||
{
|
{
|
||||||
register LINE *lp; /* line to update */
|
LINE *lp; /* line to update */
|
||||||
register int sline; /* physical screen line to update */
|
int sline; /* physical screen line to update */
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
/* search down the line we want */
|
/* search down the line we want */
|
||||||
lp = wp->w_linep;
|
lp = wp->w_linep;
|
||||||
@ -484,9 +484,9 @@ static void updone(window_t *wp)
|
|||||||
*/
|
*/
|
||||||
static void updall(window_t *wp)
|
static void updall(window_t *wp)
|
||||||
{
|
{
|
||||||
register LINE *lp; /* line to update */
|
LINE *lp; /* line to update */
|
||||||
register int sline; /* physical screen line to update */
|
int sline; /* physical screen line to update */
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
/* search down the lines, updating them */
|
/* search down the lines, updating them */
|
||||||
lp = wp->w_linep;
|
lp = wp->w_linep;
|
||||||
@ -522,9 +522,9 @@ static void updall(window_t *wp)
|
|||||||
*/
|
*/
|
||||||
void updpos(void)
|
void updpos(void)
|
||||||
{
|
{
|
||||||
register LINE *lp;
|
LINE *lp;
|
||||||
register int c;
|
int c;
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
/* find the current row */
|
/* find the current row */
|
||||||
lp = curwp->w_linep;
|
lp = curwp->w_linep;
|
||||||
@ -563,9 +563,9 @@ void updpos(void)
|
|||||||
*/
|
*/
|
||||||
void upddex(void)
|
void upddex(void)
|
||||||
{
|
{
|
||||||
register window_t *wp;
|
window_t *wp;
|
||||||
register LINE *lp;
|
LINE *lp;
|
||||||
register int i, j;
|
int i, j;
|
||||||
|
|
||||||
wp = wheadp;
|
wp = wheadp;
|
||||||
|
|
||||||
@ -602,8 +602,8 @@ void upddex(void)
|
|||||||
*/
|
*/
|
||||||
void updgar(void)
|
void updgar(void)
|
||||||
{
|
{
|
||||||
register char *txt;
|
char *txt;
|
||||||
register int i, j;
|
int i, j;
|
||||||
|
|
||||||
for (i = 0; i < term.t_nrow; ++i) {
|
for (i = 0; i < term.t_nrow; ++i) {
|
||||||
vscreen[i]->v_flag |= VFCHG;
|
vscreen[i]->v_flag |= VFCHG;
|
||||||
@ -638,8 +638,8 @@ void updgar(void)
|
|||||||
*/
|
*/
|
||||||
int updupd(int force)
|
int updupd(int force)
|
||||||
{
|
{
|
||||||
register VIDEO *vp1;
|
VIDEO *vp1;
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
#if SCROLLCODE
|
#if SCROLLCODE
|
||||||
if (scrflags & WFKILLS)
|
if (scrflags & WFKILLS)
|
||||||
@ -852,9 +852,9 @@ static int endofline(char *s, int n)
|
|||||||
*/
|
*/
|
||||||
static void updext(void)
|
static void updext(void)
|
||||||
{
|
{
|
||||||
register int rcursor; /* real cursor location */
|
int rcursor; /* real cursor location */
|
||||||
register LINE *lp; /* pointer to current line */
|
LINE *lp; /* pointer to current line */
|
||||||
register int j; /* index into line */
|
int j; /* index into line */
|
||||||
|
|
||||||
/* calculate what column the real cursor will end up in */
|
/* calculate what column the real cursor will end up in */
|
||||||
rcursor = ((curcol - term.t_ncol) % term.t_scrsiz) + term.t_margin;
|
rcursor = ((curcol - term.t_ncol) % term.t_scrsiz) + term.t_margin;
|
||||||
@ -887,9 +887,9 @@ 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)
|
||||||
{
|
{
|
||||||
#if SCROLLCODE
|
#if SCROLLCODE
|
||||||
register char *cp1;
|
char *cp1;
|
||||||
register char *cp2;
|
char *cp2;
|
||||||
register int nch;
|
int nch;
|
||||||
|
|
||||||
cp1 = &vp1->v_text[0];
|
cp1 = &vp1->v_text[0];
|
||||||
cp2 = &vp2->v_text[0];
|
cp2 = &vp2->v_text[0];
|
||||||
@ -929,9 +929,9 @@ static int updateline(int row, struct VIDEO *vp1, struct VIDEO *vp2)
|
|||||||
#if RAINBOW
|
#if RAINBOW
|
||||||
/* UPDATELINE specific code for the DEC rainbow 100 micro */
|
/* UPDATELINE specific code for the DEC rainbow 100 micro */
|
||||||
|
|
||||||
register char *cp1;
|
char *cp1;
|
||||||
register char *cp2;
|
char *cp2;
|
||||||
register int nch;
|
int nch;
|
||||||
|
|
||||||
/* since we don't know how to make the rainbow do this, turn it off */
|
/* since we don't know how to make the rainbow do this, turn it off */
|
||||||
flags &= (~VFREV & ~VFREQ);
|
flags &= (~VFREV & ~VFREQ);
|
||||||
@ -951,12 +951,12 @@ static int updateline(int row, struct VIDEO *vp1, struct VIDEO *vp2)
|
|||||||
#else
|
#else
|
||||||
/* UPDATELINE code for all other versions */
|
/* UPDATELINE code for all other versions */
|
||||||
|
|
||||||
register char *cp1;
|
char *cp1;
|
||||||
register char *cp2;
|
char *cp2;
|
||||||
register char *cp3;
|
char *cp3;
|
||||||
register char *cp4;
|
char *cp4;
|
||||||
register char *cp5;
|
char *cp5;
|
||||||
register int nbflag; /* non-blanks to the right flag? */
|
int nbflag; /* non-blanks to the right flag? */
|
||||||
int rev; /* reverse video flag */
|
int rev; /* reverse video flag */
|
||||||
int req; /* reverse video request flag */
|
int req; /* reverse video request flag */
|
||||||
|
|
||||||
@ -1086,13 +1086,13 @@ static int updateline(int row, struct VIDEO *vp1, struct VIDEO *vp2)
|
|||||||
*/
|
*/
|
||||||
static void modeline(window_t *wp)
|
static void modeline(window_t *wp)
|
||||||
{
|
{
|
||||||
register char *cp;
|
char *cp;
|
||||||
register int c;
|
int c;
|
||||||
register int n; /* cursor position count */
|
int n; /* cursor position count */
|
||||||
register struct buffer *bp;
|
struct buffer *bp;
|
||||||
register int i; /* loop index */
|
int i; /* loop index */
|
||||||
register int lchar; /* character to draw line in buffer with */
|
int lchar; /* character to draw line in buffer with */
|
||||||
register int firstm; /* is this the first mode? */
|
int firstm; /* is this the first mode? */
|
||||||
char tline[NLINE]; /* buffer for part of mode line */
|
char tline[NLINE]; /* buffer for part of mode line */
|
||||||
|
|
||||||
n = wp->w_toprow + wp->w_ntrows; /* Location. */
|
n = wp->w_toprow + wp->w_ntrows; /* Location. */
|
||||||
@ -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 */
|
||||||
register window_t *wp;
|
window_t *wp;
|
||||||
|
|
||||||
wp = wheadp;
|
wp = wheadp;
|
||||||
while (wp != NULL) {
|
while (wp != NULL) {
|
||||||
@ -1339,7 +1339,7 @@ void mlerase(void)
|
|||||||
*/
|
*/
|
||||||
void mlwrite(const char *fmt, ...)
|
void mlwrite(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
register int c; /* current char in format string */
|
int c; /* current char in format string */
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
/* if we are not currently echoing on the command line, abort this */
|
/* if we are not currently echoing on the command line, abort this */
|
||||||
@ -1416,7 +1416,7 @@ void mlwrite(const char *fmt, ...)
|
|||||||
*/
|
*/
|
||||||
void mlforce(char *s)
|
void mlforce(char *s)
|
||||||
{
|
{
|
||||||
register int oldcmd; /* original command display flag */
|
int oldcmd; /* original command display flag */
|
||||||
|
|
||||||
oldcmd = discmd; /* save the discmd value */
|
oldcmd = discmd; /* save the discmd value */
|
||||||
discmd = TRUE; /* and turn display on */
|
discmd = TRUE; /* and turn display on */
|
||||||
@ -1431,7 +1431,7 @@ void mlforce(char *s)
|
|||||||
*/
|
*/
|
||||||
void mlputs(char *s)
|
void mlputs(char *s)
|
||||||
{
|
{
|
||||||
register int c;
|
int c;
|
||||||
|
|
||||||
while ((c = *s++) != 0) {
|
while ((c = *s++) != 0) {
|
||||||
TTputc(c);
|
TTputc(c);
|
||||||
@ -1445,7 +1445,7 @@ void mlputs(char *s)
|
|||||||
*/
|
*/
|
||||||
static void mlputi(int i, int r)
|
static void mlputi(int i, int r)
|
||||||
{
|
{
|
||||||
register int q;
|
int q;
|
||||||
static char hexdigits[] = "0123456789ABCDEF";
|
static char hexdigits[] = "0123456789ABCDEF";
|
||||||
|
|
||||||
if (i < 0) {
|
if (i < 0) {
|
||||||
@ -1467,7 +1467,7 @@ static void mlputi(int i, int r)
|
|||||||
*/
|
*/
|
||||||
static void mlputli(long l, int r)
|
static void mlputli(long l, int r)
|
||||||
{
|
{
|
||||||
register long q;
|
long q;
|
||||||
|
|
||||||
if (l < 0) {
|
if (l < 0) {
|
||||||
l = -l;
|
l = -l;
|
||||||
|
56
eval.c
56
eval.c
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
void varinit(void)
|
void varinit(void)
|
||||||
{ /* initialize the user variable list */
|
{ /* initialize the user variable list */
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < MAXVARS; i++)
|
for (i = 0; i < MAXVARS; i++)
|
||||||
uv[i].u_name[0] = 0;
|
uv[i].u_name[0] = 0;
|
||||||
@ -27,9 +27,9 @@ void varinit(void)
|
|||||||
*/
|
*/
|
||||||
char *gtfun(char *fname)
|
char *gtfun(char *fname)
|
||||||
{
|
{
|
||||||
register int fnum; /* index to function to eval */
|
int fnum; /* index to function to eval */
|
||||||
register int status; /* return status */
|
int status; /* return status */
|
||||||
register char *tsp; /* temporary string pointer */
|
char *tsp; /* temporary string pointer */
|
||||||
char arg1[NSTRING]; /* value of first argument */
|
char arg1[NSTRING]; /* value of first argument */
|
||||||
char arg2[NSTRING]; /* value of second argument */
|
char arg2[NSTRING]; /* value of second argument */
|
||||||
char arg3[NSTRING]; /* value of third argument */
|
char arg3[NSTRING]; /* value of third argument */
|
||||||
@ -170,7 +170,7 @@ char *gtfun(char *fname)
|
|||||||
char *gtusr(char *vname)
|
char *gtusr(char *vname)
|
||||||
{
|
{
|
||||||
|
|
||||||
register int vnum; /* ordinal number of user var */
|
int vnum; /* ordinal number of user var */
|
||||||
|
|
||||||
/* scan the list looking for the user var name */
|
/* scan the list looking for the user var name */
|
||||||
for (vnum = 0; vnum < MAXVARS; vnum++) {
|
for (vnum = 0; vnum < MAXVARS; vnum++) {
|
||||||
@ -192,7 +192,7 @@ char *gtusr(char *vname)
|
|||||||
*/
|
*/
|
||||||
char *gtenv(char *vname)
|
char *gtenv(char *vname)
|
||||||
{
|
{
|
||||||
register int vnum; /* ordinal number of var refrenced */
|
int vnum; /* ordinal number of var refrenced */
|
||||||
char *getkill();
|
char *getkill();
|
||||||
|
|
||||||
/* scan the list, looking for the referenced name */
|
/* scan the list, looking for the referenced name */
|
||||||
@ -320,7 +320,7 @@ char *gtenv(char *vname)
|
|||||||
*/
|
*/
|
||||||
char *getkill(void)
|
char *getkill(void)
|
||||||
{
|
{
|
||||||
register int size; /* max number of chars to return */
|
int size; /* max number of chars to return */
|
||||||
static char value[NSTRING]; /* temp buffer for value */
|
static char value[NSTRING]; /* temp buffer for value */
|
||||||
|
|
||||||
if (kbufh == NULL)
|
if (kbufh == NULL)
|
||||||
@ -347,10 +347,10 @@ char *getkill(void)
|
|||||||
*/
|
*/
|
||||||
int setvar(int f, int n)
|
int setvar(int f, int n)
|
||||||
{
|
{
|
||||||
register int status; /* status return */
|
int status; /* status return */
|
||||||
#if DEBUGM
|
#if DEBUGM
|
||||||
register char *sp; /* temp string pointer */
|
char *sp; /* temp string pointer */
|
||||||
register char *ep; /* ptr to end of outline */
|
char *ep; /* ptr to end of outline */
|
||||||
#endif
|
#endif
|
||||||
VDESC vd; /* variable num/type */
|
VDESC vd; /* variable num/type */
|
||||||
char var[NVSIZE + 1]; /* name of variable to fetch */
|
char var[NVSIZE + 1]; /* name of variable to fetch */
|
||||||
@ -448,8 +448,8 @@ int setvar(int f, int n)
|
|||||||
*/
|
*/
|
||||||
void findvar(char *var, VDESC *vd, int size)
|
void findvar(char *var, VDESC *vd, int size)
|
||||||
{
|
{
|
||||||
register int vnum; /* subscript in variable arrays */
|
int vnum; /* subscript in variable arrays */
|
||||||
register int vtype; /* type to return */
|
int vtype; /* type to return */
|
||||||
|
|
||||||
vnum = -1;
|
vnum = -1;
|
||||||
fvar:
|
fvar:
|
||||||
@ -506,11 +506,11 @@ fvar:
|
|||||||
*/
|
*/
|
||||||
int svar(VDESC *var, char *value)
|
int svar(VDESC *var, char *value)
|
||||||
{
|
{
|
||||||
register int vnum; /* ordinal number of var refrenced */
|
int vnum; /* ordinal number of var refrenced */
|
||||||
register int vtype; /* type of variable to set */
|
int vtype; /* type of variable to set */
|
||||||
register int status; /* status return */
|
int status; /* status return */
|
||||||
register int c; /* translated character */
|
int c; /* translated character */
|
||||||
register char *sp; /* scratch string pointer */
|
char *sp; /* scratch string pointer */
|
||||||
|
|
||||||
/* simplify the vd structure (we are gonna look at it a lot) */
|
/* simplify the vd structure (we are gonna look at it a lot) */
|
||||||
vnum = var->v_num;
|
vnum = var->v_num;
|
||||||
@ -682,9 +682,9 @@ int svar(VDESC *var, char *value)
|
|||||||
*/
|
*/
|
||||||
char *itoa(int i)
|
char *itoa(int i)
|
||||||
{
|
{
|
||||||
register int digit; /* current digit being used */
|
int digit; /* current digit being used */
|
||||||
register char *sp; /* pointer into result */
|
char *sp; /* pointer into result */
|
||||||
register int sign; /* sign of resulting number */
|
int sign; /* sign of resulting number */
|
||||||
static char result[INTWIDTH + 1]; /* resulting string */
|
static char result[INTWIDTH + 1]; /* resulting string */
|
||||||
|
|
||||||
/* record the sign... */
|
/* record the sign... */
|
||||||
@ -718,7 +718,7 @@ char *itoa(int i)
|
|||||||
*/
|
*/
|
||||||
int gettyp(char *token)
|
int gettyp(char *token)
|
||||||
{
|
{
|
||||||
register char c; /* first char in token */
|
char c; /* first char in token */
|
||||||
|
|
||||||
/* grab the first char (this is all we need) */
|
/* grab the first char (this is all we need) */
|
||||||
c = *token;
|
c = *token;
|
||||||
@ -762,10 +762,10 @@ int gettyp(char *token)
|
|||||||
*/
|
*/
|
||||||
char *getval(char *token)
|
char *getval(char *token)
|
||||||
{
|
{
|
||||||
register int status; /* error return */
|
int status; /* error return */
|
||||||
register struct buffer *bp; /* temp buffer pointer */
|
struct buffer *bp; /* temp buffer pointer */
|
||||||
register int blen; /* length of buffer argument */
|
int blen; /* length of buffer argument */
|
||||||
register int distmp; /* temporary discmd flag */
|
int distmp; /* temporary discmd flag */
|
||||||
static char buf[NSTRING]; /* string buffer for some returns */
|
static char buf[NSTRING]; /* string buffer for some returns */
|
||||||
|
|
||||||
switch (gettyp(token)) {
|
switch (gettyp(token)) {
|
||||||
@ -969,9 +969,9 @@ int sindex(char *source, char *pattern)
|
|||||||
*/
|
*/
|
||||||
char *xlat(char *source, char *lookup, char *trans)
|
char *xlat(char *source, char *lookup, char *trans)
|
||||||
{
|
{
|
||||||
register char *sp; /* pointer into source table */
|
char *sp; /* pointer into source table */
|
||||||
register char *lp; /* pointer into lookup table */
|
char *lp; /* pointer into lookup table */
|
||||||
register char *rp; /* pointer into result */
|
char *rp; /* pointer into result */
|
||||||
static char result[NSTRING]; /* temporary result */
|
static char result[NSTRING]; /* temporary result */
|
||||||
|
|
||||||
/* scan source string */
|
/* scan source string */
|
||||||
|
48
exec.c
48
exec.c
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
int namedcmd(int f, int n)
|
int namedcmd(int f, int n)
|
||||||
{
|
{
|
||||||
register fn_t kfunc; /* ptr to the requexted function to bind to */
|
fn_t kfunc; /* ptr to the requexted function to bind to */
|
||||||
|
|
||||||
/* prompt the user to type a named command */
|
/* prompt the user to type a named command */
|
||||||
mlwrite(": ");
|
mlwrite(": ");
|
||||||
@ -45,7 +45,7 @@ int namedcmd(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int execcmd(int f, int n)
|
int execcmd(int f, int n)
|
||||||
{
|
{
|
||||||
register int status; /* status return */
|
int status; /* status return */
|
||||||
char cmdstr[NSTRING]; /* string holding command to execute */
|
char cmdstr[NSTRING]; /* string holding command to execute */
|
||||||
|
|
||||||
/* get the line wanted */
|
/* get the line wanted */
|
||||||
@ -71,8 +71,8 @@ int execcmd(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int docmd(char *cline)
|
int docmd(char *cline)
|
||||||
{
|
{
|
||||||
register int f; /* default argument flag */
|
int f; /* default argument flag */
|
||||||
register int n; /* numeric repeat value */
|
int n; /* numeric repeat value */
|
||||||
fn_t fnc; /* function to execute */
|
fn_t fnc; /* function to execute */
|
||||||
int status; /* return status of function */
|
int status; /* return status of function */
|
||||||
int oldcle; /* old contents of clexec flag */
|
int oldcle; /* old contents of clexec flag */
|
||||||
@ -137,8 +137,8 @@ int docmd(char *cline)
|
|||||||
*/
|
*/
|
||||||
char *token(char *src, char *tok, int size)
|
char *token(char *src, char *tok, int size)
|
||||||
{
|
{
|
||||||
register int quotef; /* is the current string quoted? */
|
int quotef; /* is the current string quoted? */
|
||||||
register char c; /* temporary character */
|
char c; /* temporary character */
|
||||||
|
|
||||||
/* first scan past any whitespace in the source string */
|
/* first scan past any whitespace in the source string */
|
||||||
while (*src == ' ' || *src == '\t')
|
while (*src == ' ' || *src == '\t')
|
||||||
@ -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 */
|
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,8 +298,8 @@ 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 */
|
struct buffer *bp; /* pointer to macro buffer */
|
||||||
register int status; /* return status */
|
int status; /* return status */
|
||||||
char bname[NBUFN]; /* name of buffer to use */
|
char bname[NBUFN]; /* name of buffer to use */
|
||||||
|
|
||||||
/* a numeric argument means its a numbered macro */
|
/* a numeric argument means its a numbered macro */
|
||||||
@ -338,8 +338,8 @@ int storeproc(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int execproc(int f, int n)
|
int execproc(int f, int n)
|
||||||
{
|
{
|
||||||
register struct buffer *bp; /* ptr to buffer to execute */
|
struct buffer *bp; /* ptr to buffer to execute */
|
||||||
register int status; /* status return */
|
int status; /* status return */
|
||||||
char bufn[NBUFN + 2]; /* name of buffer to execute */
|
char bufn[NBUFN + 2]; /* name of buffer to execute */
|
||||||
|
|
||||||
/* find out what buffer the user wants to execute */
|
/* find out what buffer the user wants to execute */
|
||||||
@ -373,8 +373,8 @@ int execproc(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int execbuf(int f, int n)
|
int execbuf(int f, int n)
|
||||||
{
|
{
|
||||||
register struct buffer *bp; /* ptr to buffer to execute */
|
struct buffer *bp; /* ptr to buffer to execute */
|
||||||
register int status; /* status return */
|
int status; /* status return */
|
||||||
char bufn[NSTRING]; /* name of buffer to execute */
|
char bufn[NSTRING]; /* name of buffer to execute */
|
||||||
|
|
||||||
/* find out what buffer the user wants to execute */
|
/* find out what buffer the user wants to execute */
|
||||||
@ -419,10 +419,10 @@ int execbuf(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int dobuf(struct buffer *bp)
|
int dobuf(struct buffer *bp)
|
||||||
{
|
{
|
||||||
register int status; /* status return */
|
int status; /* status return */
|
||||||
register LINE *lp; /* pointer to line to execute */
|
LINE *lp; /* pointer to line to execute */
|
||||||
register LINE *hlp; /* pointer to line header */
|
LINE *hlp; /* pointer to line header */
|
||||||
register LINE *glp; /* line to goto */
|
LINE *glp; /* line to goto */
|
||||||
LINE *mp; /* Macro line storage temp */
|
LINE *mp; /* Macro line storage temp */
|
||||||
int dirnum; /* directive index */
|
int dirnum; /* directive index */
|
||||||
int linlen; /* length of line to execute */
|
int linlen; /* length of line to execute */
|
||||||
@ -439,7 +439,7 @@ int dobuf(struct buffer *bp)
|
|||||||
|
|
||||||
#if DEBUGM
|
#if DEBUGM
|
||||||
char *sp; /* temp for building debug string */
|
char *sp; /* temp for building debug string */
|
||||||
register char *ep; /* ptr to end of outline */
|
char *ep; /* ptr to end of outline */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* clear IF level flags/while ptr */
|
/* clear IF level flags/while ptr */
|
||||||
@ -850,7 +850,7 @@ void freewhile(WHBLOCK *wp)
|
|||||||
*/
|
*/
|
||||||
int execfile(int f, int n)
|
int execfile(int f, int n)
|
||||||
{
|
{
|
||||||
register int status; /* return status of name query */
|
int status; /* return status of name query */
|
||||||
char fname[NSTRING]; /* name of file to execute */
|
char fname[NSTRING]; /* name of file to execute */
|
||||||
char *fspec; /* full file spec */
|
char *fspec; /* full file spec */
|
||||||
|
|
||||||
@ -884,9 +884,9 @@ int execfile(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int dofile(char *fname)
|
int dofile(char *fname)
|
||||||
{
|
{
|
||||||
register struct buffer *bp; /* buffer to place file to exeute */
|
struct buffer *bp; /* buffer to place file to exeute */
|
||||||
register struct buffer *cb; /* temp to hold current buf while we read */
|
struct buffer *cb; /* temp to hold current buf while we read */
|
||||||
register int status; /* results of various calls */
|
int status; /* results of various calls */
|
||||||
char bname[NBUFN]; /* name of buffer */
|
char bname[NBUFN]; /* name of buffer */
|
||||||
|
|
||||||
makename(bname, fname); /* derive the name of the buffer */
|
makename(bname, fname); /* derive the name of the buffer */
|
||||||
@ -923,8 +923,8 @@ int dofile(char *fname)
|
|||||||
*/
|
*/
|
||||||
int cbuf(int f, int n, int bufnum)
|
int cbuf(int f, int n, int bufnum)
|
||||||
{
|
{
|
||||||
register struct buffer *bp; /* ptr to buffer to execute */
|
struct buffer *bp; /* ptr to buffer to execute */
|
||||||
register int status; /* status return */
|
int status; /* status return */
|
||||||
static char bufname[] = "*Macro xx*";
|
static char bufname[] = "*Macro xx*";
|
||||||
|
|
||||||
/* make the buffer name */
|
/* make the buffer name */
|
||||||
|
76
file.c
76
file.c
@ -22,7 +22,7 @@
|
|||||||
*/
|
*/
|
||||||
int fileread(int f, int n)
|
int fileread(int f, int n)
|
||||||
{
|
{
|
||||||
register int s;
|
int s;
|
||||||
char fname[NFILEN];
|
char fname[NFILEN];
|
||||||
|
|
||||||
if (restflag) /* don't allow this command if restricted */
|
if (restflag) /* don't allow this command if restricted */
|
||||||
@ -41,7 +41,7 @@ int fileread(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int insfile(int f, int n)
|
int insfile(int f, int n)
|
||||||
{
|
{
|
||||||
register int s;
|
int s;
|
||||||
char fname[NFILEN];
|
char fname[NFILEN];
|
||||||
|
|
||||||
if (restflag) /* don't allow this command if restricted */
|
if (restflag) /* don't allow this command if restricted */
|
||||||
@ -67,7 +67,7 @@ int insfile(int f, int n)
|
|||||||
int filefind(int f, int n)
|
int filefind(int f, int n)
|
||||||
{
|
{
|
||||||
char fname[NFILEN]; /* file user wishes to find */
|
char fname[NFILEN]; /* file user wishes to find */
|
||||||
register int s; /* status return */
|
int s; /* status return */
|
||||||
|
|
||||||
if (restflag) /* don't allow this command if restricted */
|
if (restflag) /* don't allow this command if restricted */
|
||||||
return (resterr());
|
return (resterr());
|
||||||
@ -79,8 +79,8 @@ int filefind(int f, int n)
|
|||||||
int viewfile(int f, int n)
|
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 */
|
||||||
register int s; /* status return */
|
int s; /* status return */
|
||||||
register window_t *wp; /* scan for windows that need updating */
|
window_t *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());
|
||||||
@ -103,7 +103,7 @@ int viewfile(int f, int n)
|
|||||||
#if CRYPT
|
#if CRYPT
|
||||||
static int resetkey(void)
|
static int resetkey(void)
|
||||||
{ /* reset the encryption key if needed */
|
{ /* reset the encryption key if needed */
|
||||||
register int s; /* return status */
|
int s; /* return status */
|
||||||
|
|
||||||
/* turn off the encryption flag */
|
/* turn off the encryption flag */
|
||||||
cryptflag = FALSE;
|
cryptflag = FALSE;
|
||||||
@ -141,10 +141,10 @@ static int resetkey(void)
|
|||||||
*/
|
*/
|
||||||
int getfile(char *fname, int lockfl)
|
int getfile(char *fname, int lockfl)
|
||||||
{
|
{
|
||||||
register struct buffer *bp;
|
struct buffer *bp;
|
||||||
register LINE *lp;
|
LINE *lp;
|
||||||
register int i;
|
int i;
|
||||||
register int s;
|
int s;
|
||||||
char bname[NBUFN]; /* buffer name to put file */
|
char bname[NBUFN]; /* buffer name to put file */
|
||||||
|
|
||||||
#if MSDOS
|
#if MSDOS
|
||||||
@ -207,14 +207,14 @@ int getfile(char *fname, int lockfl)
|
|||||||
*/
|
*/
|
||||||
int readin(char *fname, int lockfl)
|
int readin(char *fname, int lockfl)
|
||||||
{
|
{
|
||||||
register LINE *lp1;
|
LINE *lp1;
|
||||||
register LINE *lp2;
|
LINE *lp2;
|
||||||
register int i;
|
int i;
|
||||||
register window_t *wp;
|
window_t *wp;
|
||||||
register struct buffer *bp;
|
struct buffer *bp;
|
||||||
register int s;
|
int s;
|
||||||
register int nbytes;
|
int nbytes;
|
||||||
register int nline;
|
int nline;
|
||||||
int lflag; /* any lines longer than allowed? */
|
int lflag; /* any lines longer than allowed? */
|
||||||
char mesg[NSTRING];
|
char mesg[NSTRING];
|
||||||
|
|
||||||
@ -327,8 +327,8 @@ int readin(char *fname, int lockfl)
|
|||||||
*/
|
*/
|
||||||
void makename(char *bname, char *fname)
|
void makename(char *bname, char *fname)
|
||||||
{
|
{
|
||||||
register char *cp1;
|
char *cp1;
|
||||||
register char *cp2;
|
char *cp2;
|
||||||
|
|
||||||
cp1 = &fname[0];
|
cp1 = &fname[0];
|
||||||
while (*cp1 != 0)
|
while (*cp1 != 0)
|
||||||
@ -365,7 +365,7 @@ void makename(char *bname, char *fname)
|
|||||||
*/
|
*/
|
||||||
void unqname(char *name)
|
void unqname(char *name)
|
||||||
{
|
{
|
||||||
register char *sp;
|
char *sp;
|
||||||
|
|
||||||
/* check to see if it is in the buffer list */
|
/* check to see if it is in the buffer list */
|
||||||
while (bfind(name, 0, FALSE) != NULL) {
|
while (bfind(name, 0, FALSE) != NULL) {
|
||||||
@ -393,8 +393,8 @@ void unqname(char *name)
|
|||||||
*/
|
*/
|
||||||
int filewrite(int f, int n)
|
int filewrite(int f, int n)
|
||||||
{
|
{
|
||||||
register window_t *wp;
|
window_t *wp;
|
||||||
register int s;
|
int s;
|
||||||
char fname[NFILEN];
|
char fname[NFILEN];
|
||||||
|
|
||||||
if (restflag) /* don't allow this command if restricted */
|
if (restflag) /* don't allow this command if restricted */
|
||||||
@ -424,8 +424,8 @@ int filewrite(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int filesave(int f, int n)
|
int filesave(int f, int n)
|
||||||
{
|
{
|
||||||
register window_t *wp;
|
window_t *wp;
|
||||||
register 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 */
|
||||||
return (rdonly()); /* we are in read only mode */
|
return (rdonly()); /* we are in read only mode */
|
||||||
@ -466,9 +466,9 @@ int filesave(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int writeout(char *fn)
|
int writeout(char *fn)
|
||||||
{
|
{
|
||||||
register int s;
|
int s;
|
||||||
register LINE *lp;
|
LINE *lp;
|
||||||
register int nline;
|
int nline;
|
||||||
|
|
||||||
#if CRYPT
|
#if CRYPT
|
||||||
s = resetkey();
|
s = resetkey();
|
||||||
@ -518,8 +518,8 @@ int writeout(char *fn)
|
|||||||
*/
|
*/
|
||||||
int filename(int f, int n)
|
int filename(int f, int n)
|
||||||
{
|
{
|
||||||
register window_t *wp;
|
window_t *wp;
|
||||||
register int s;
|
int s;
|
||||||
char fname[NFILEN];
|
char fname[NFILEN];
|
||||||
|
|
||||||
if (restflag) /* don't allow this command if restricted */
|
if (restflag) /* don't allow this command if restricted */
|
||||||
@ -547,14 +547,14 @@ int filename(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int ifile(char *fname)
|
int ifile(char *fname)
|
||||||
{
|
{
|
||||||
register LINE *lp0;
|
LINE *lp0;
|
||||||
register LINE *lp1;
|
LINE *lp1;
|
||||||
register LINE *lp2;
|
LINE *lp2;
|
||||||
register int i;
|
int i;
|
||||||
register struct buffer *bp;
|
struct buffer *bp;
|
||||||
register int s;
|
int s;
|
||||||
register int nbytes;
|
int nbytes;
|
||||||
register int nline;
|
int nline;
|
||||||
int lflag; /* any lines longer than allowed? */
|
int lflag; /* any lines longer than allowed? */
|
||||||
char mesg[NSTRING];
|
char mesg[NSTRING];
|
||||||
|
|
||||||
|
10
fileio.c
10
fileio.c
@ -32,7 +32,7 @@ int ffropen(char *fn)
|
|||||||
int ffwopen(char *fn)
|
int ffwopen(char *fn)
|
||||||
{
|
{
|
||||||
#if VMS
|
#if VMS
|
||||||
register int fd;
|
int fd;
|
||||||
|
|
||||||
if ((fd = creat(fn, 0666, "rfm=var", "rat=cr")) < 0
|
if ((fd = creat(fn, 0666, "rfm=var", "rat=cr")) < 0
|
||||||
|| (ffp = fdopen(fd, "w")) == NULL) {
|
|| (ffp = fdopen(fd, "w")) == NULL) {
|
||||||
@ -80,7 +80,7 @@ int ffclose(void)
|
|||||||
*/
|
*/
|
||||||
int ffputline(char *buf, int nbuf)
|
int ffputline(char *buf, int nbuf)
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
#if CRYPT
|
#if CRYPT
|
||||||
char c; /* character to translate */
|
char c; /* character to translate */
|
||||||
|
|
||||||
@ -116,9 +116,9 @@ int ffputline(char *buf, int nbuf)
|
|||||||
*/
|
*/
|
||||||
int ffgetline(void)
|
int ffgetline(void)
|
||||||
{
|
{
|
||||||
register int c; /* current character read */
|
int c; /* current character read */
|
||||||
register int i; /* current index into fline */
|
int i; /* current index into fline */
|
||||||
register char *tmpline; /* temp storage for expanding line */
|
char *tmpline; /* temp storage for expanding line */
|
||||||
|
|
||||||
/* if we are at the end...return it */
|
/* if we are at the end...return it */
|
||||||
if (eofflag)
|
if (eofflag)
|
||||||
|
18
input.c
18
input.c
@ -105,12 +105,12 @@ int ctoec(int c)
|
|||||||
*/
|
*/
|
||||||
fn_t getname(void)
|
fn_t getname(void)
|
||||||
{
|
{
|
||||||
register int cpos; /* current column on screen output */
|
int cpos; /* current column on screen output */
|
||||||
register int c;
|
int c;
|
||||||
register char *sp; /* pointer to string for output */
|
char *sp; /* pointer to string for output */
|
||||||
register NBIND *ffp; /* first ptr to entry in name binding table */
|
NBIND *ffp; /* first ptr to entry in name binding table */
|
||||||
register NBIND *cffp; /* current ptr to entry in name binding table */
|
NBIND *cffp; /* current ptr to entry in name binding table */
|
||||||
register NBIND *lffp; /* last ptr to entry in name binding table */
|
NBIND *lffp; /* last ptr to entry in name binding table */
|
||||||
char buf[NSTRING]; /* buffer to hold tentative command name */
|
char buf[NSTRING]; /* buffer to hold tentative command name */
|
||||||
|
|
||||||
/* starting at the beginning of the string buffer */
|
/* starting at the beginning of the string buffer */
|
||||||
@ -438,9 +438,9 @@ handle_CSI:
|
|||||||
*/
|
*/
|
||||||
int getstring(char *prompt, char *buf, int nbuf, int eolchar)
|
int getstring(char *prompt, char *buf, int nbuf, int eolchar)
|
||||||
{
|
{
|
||||||
register int cpos; /* current character position in string */
|
int cpos; /* current character position in string */
|
||||||
register int c;
|
int c;
|
||||||
register int quotef; /* are we quoting the next char? */
|
int quotef; /* are we quoting the next char? */
|
||||||
#if COMPLC
|
#if COMPLC
|
||||||
int ffile, ocpos, nskip = 0, didtry = 0;
|
int ffile, ocpos, nskip = 0, didtry = 0;
|
||||||
#if MSDOS
|
#if MSDOS
|
||||||
|
20
isearch.c
20
isearch.c
@ -140,9 +140,9 @@ int isearch(int f, int n)
|
|||||||
{
|
{
|
||||||
int status; /* Search status */
|
int status; /* Search status */
|
||||||
int col; /* prompt column */
|
int col; /* prompt column */
|
||||||
register int cpos; /* character number in search string */
|
int cpos; /* character number in search string */
|
||||||
register int c; /* current input character */
|
int c; /* current input character */
|
||||||
register int expc; /* function expanded input char */
|
int expc; /* function expanded input char */
|
||||||
char pat_save[NPAT]; /* Saved copy of the old pattern str */
|
char pat_save[NPAT]; /* Saved copy of the old pattern str */
|
||||||
LINE *curline; /* Current line on entry */
|
LINE *curline; /* Current line on entry */
|
||||||
int curoff; /* Current offset on entry */
|
int curoff; /* Current offset on entry */
|
||||||
@ -278,9 +278,9 @@ int isearch(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int checknext(char chr, char *patrn, int dir) /* Check next character in search string */
|
int checknext(char chr, char *patrn, int dir) /* Check next character in search string */
|
||||||
{
|
{
|
||||||
register LINE *curline; /* current line during scan */
|
LINE *curline; /* current line during scan */
|
||||||
register int curoff; /* position within current line */
|
int curoff; /* position within current line */
|
||||||
register int buffchar; /* character at current position */
|
int buffchar; /* character at current position */
|
||||||
int status; /* how well things go */
|
int status; /* how well things go */
|
||||||
|
|
||||||
|
|
||||||
@ -351,10 +351,10 @@ int scanmore(char *patrn, int dir) /* search forward or back for a pattern
|
|||||||
*/
|
*/
|
||||||
int match_pat(char *patrn) /* See if the pattern string matches string at "." */
|
int match_pat(char *patrn) /* See if the pattern string matches string at "." */
|
||||||
{
|
{
|
||||||
register int i; /* Generic loop index/offset */
|
int i; /* Generic loop index/offset */
|
||||||
register int buffchar; /* character at current position */
|
int buffchar; /* character at current position */
|
||||||
register LINE *curline; /* current line during scan */
|
LINE *curline; /* current line during scan */
|
||||||
register int curoff; /* position within current line */
|
int curoff; /* position within current line */
|
||||||
|
|
||||||
/* setup the local scan pointer to current "." */
|
/* setup the local scan pointer to current "." */
|
||||||
|
|
||||||
|
82
line.c
82
line.c
@ -26,8 +26,8 @@
|
|||||||
*/
|
*/
|
||||||
LINE *lalloc(int used)
|
LINE *lalloc(int used)
|
||||||
{
|
{
|
||||||
register LINE *lp;
|
LINE *lp;
|
||||||
register int size;
|
int size;
|
||||||
|
|
||||||
size = (used + NBLOCK - 1) & ~(NBLOCK - 1);
|
size = (used + NBLOCK - 1) & ~(NBLOCK - 1);
|
||||||
if (size == 0) /* Assume that an empty */
|
if (size == 0) /* Assume that an empty */
|
||||||
@ -49,8 +49,8 @@ LINE *lalloc(int used)
|
|||||||
*/
|
*/
|
||||||
void lfree(LINE *lp)
|
void lfree(LINE *lp)
|
||||||
{
|
{
|
||||||
register struct buffer *bp;
|
struct buffer *bp;
|
||||||
register window_t *wp;
|
window_t *wp;
|
||||||
|
|
||||||
wp = wheadp;
|
wp = wheadp;
|
||||||
while (wp != NULL) {
|
while (wp != NULL) {
|
||||||
@ -94,7 +94,7 @@ void lfree(LINE *lp)
|
|||||||
*/
|
*/
|
||||||
void lchange(int flag)
|
void lchange(int flag)
|
||||||
{
|
{
|
||||||
register window_t *wp;
|
window_t *wp;
|
||||||
|
|
||||||
if (curbp->b_nwnd != 1) /* Ensure hard. */
|
if (curbp->b_nwnd != 1) /* Ensure hard. */
|
||||||
flag = WFHARD;
|
flag = WFHARD;
|
||||||
@ -128,7 +128,7 @@ int insspace(int f, int n)
|
|||||||
|
|
||||||
int linstr(char *instr)
|
int linstr(char *instr)
|
||||||
{
|
{
|
||||||
register int status = TRUE;
|
int status = TRUE;
|
||||||
char tmpc;
|
char tmpc;
|
||||||
|
|
||||||
if (instr != NULL)
|
if (instr != NULL)
|
||||||
@ -158,14 +158,14 @@ int linstr(char *instr)
|
|||||||
|
|
||||||
int linsert(int n, int c)
|
int linsert(int n, int c)
|
||||||
{
|
{
|
||||||
register char *cp1;
|
char *cp1;
|
||||||
register char *cp2;
|
char *cp2;
|
||||||
register LINE *lp1;
|
LINE *lp1;
|
||||||
register LINE *lp2;
|
LINE *lp2;
|
||||||
register LINE *lp3;
|
LINE *lp3;
|
||||||
register int doto;
|
int doto;
|
||||||
register int i;
|
int i;
|
||||||
register window_t *wp;
|
window_t *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 */
|
||||||
@ -253,7 +253,7 @@ int lowrite(int c)
|
|||||||
*/
|
*/
|
||||||
int lover(char *ostr)
|
int lover(char *ostr)
|
||||||
{
|
{
|
||||||
register int status = TRUE;
|
int status = TRUE;
|
||||||
char tmpc;
|
char tmpc;
|
||||||
|
|
||||||
if (ostr != NULL)
|
if (ostr != NULL)
|
||||||
@ -282,12 +282,12 @@ int lover(char *ostr)
|
|||||||
*/
|
*/
|
||||||
int lnewline(void)
|
int lnewline(void)
|
||||||
{
|
{
|
||||||
register char *cp1;
|
char *cp1;
|
||||||
register char *cp2;
|
char *cp2;
|
||||||
register LINE *lp1;
|
LINE *lp1;
|
||||||
register LINE *lp2;
|
LINE *lp2;
|
||||||
register int doto;
|
int doto;
|
||||||
register window_t *wp;
|
window_t *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 */
|
||||||
@ -344,12 +344,12 @@ int lnewline(void)
|
|||||||
*/
|
*/
|
||||||
int ldelete(long n, int kflag)
|
int ldelete(long n, int kflag)
|
||||||
{
|
{
|
||||||
register char *cp1;
|
char *cp1;
|
||||||
register char *cp2;
|
char *cp2;
|
||||||
register LINE *dotp;
|
LINE *dotp;
|
||||||
register int doto;
|
int doto;
|
||||||
register int chunk;
|
int chunk;
|
||||||
register window_t *wp;
|
window_t *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 */
|
||||||
@ -412,10 +412,10 @@ int ldelete(long n, int kflag)
|
|||||||
*/
|
*/
|
||||||
char *getctext(void)
|
char *getctext(void)
|
||||||
{
|
{
|
||||||
register LINE *lp; /* line to copy */
|
LINE *lp; /* line to copy */
|
||||||
register int size; /* length of line to return */
|
int size; /* length of line to return */
|
||||||
register char *sp; /* string pointer into line */
|
char *sp; /* string pointer into line */
|
||||||
register char *dp; /* string pointer into returned line */
|
char *dp; /* string pointer into returned line */
|
||||||
static char rline[NSTRING]; /* line to return */
|
static char rline[NSTRING]; /* line to return */
|
||||||
|
|
||||||
/* find the contents of the current line and its length */
|
/* find the contents of the current line and its length */
|
||||||
@ -441,7 +441,7 @@ char *getctext(void)
|
|||||||
*/
|
*/
|
||||||
int putctext(char *iline)
|
int putctext(char *iline)
|
||||||
{
|
{
|
||||||
register int status;
|
int status;
|
||||||
|
|
||||||
/* delete the current line */
|
/* delete the current line */
|
||||||
curwp->w_doto = 0; /* starting at the beginning of the line */
|
curwp->w_doto = 0; /* starting at the beginning of the line */
|
||||||
@ -467,12 +467,12 @@ int putctext(char *iline)
|
|||||||
*/
|
*/
|
||||||
int ldelnewline(void)
|
int ldelnewline(void)
|
||||||
{
|
{
|
||||||
register char *cp1;
|
char *cp1;
|
||||||
register char *cp2;
|
char *cp2;
|
||||||
register LINE *lp1;
|
LINE *lp1;
|
||||||
register LINE *lp2;
|
LINE *lp2;
|
||||||
register LINE *lp3;
|
LINE *lp3;
|
||||||
register window_t *wp;
|
window_t *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 */
|
||||||
@ -604,9 +604,9 @@ int kinsert(int c)
|
|||||||
*/
|
*/
|
||||||
int yank(int f, int n)
|
int yank(int f, int n)
|
||||||
{
|
{
|
||||||
register int c;
|
int c;
|
||||||
register int i;
|
int i;
|
||||||
register char *sp; /* pointer into string to insert */
|
char *sp; /* pointer into string to insert */
|
||||||
KILL *kp; /* pointer into kill buffer */
|
KILL *kp; /* pointer into kill buffer */
|
||||||
|
|
||||||
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
|
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
|
||||||
|
16
lock.c
16
lock.c
@ -25,8 +25,8 @@ static int numlocks; /* # of current locks active */
|
|||||||
*/
|
*/
|
||||||
int lockchk(char *fname)
|
int lockchk(char *fname)
|
||||||
{
|
{
|
||||||
register int i; /* loop indexes */
|
int i; /* loop indexes */
|
||||||
register int status; /* return status */
|
int status; /* return status */
|
||||||
|
|
||||||
/* check to see if that file is already locked here */
|
/* check to see if that file is already locked here */
|
||||||
if (numlocks > 0)
|
if (numlocks > 0)
|
||||||
@ -67,9 +67,9 @@ int lockchk(char *fname)
|
|||||||
*/
|
*/
|
||||||
int lockrel(void)
|
int lockrel(void)
|
||||||
{
|
{
|
||||||
register int i; /* loop index */
|
int i; /* loop index */
|
||||||
register int status; /* status of locks */
|
int status; /* status of locks */
|
||||||
register int s; /* status of one unlock */
|
int s; /* status of one unlock */
|
||||||
|
|
||||||
status = TRUE;
|
status = TRUE;
|
||||||
if (numlocks > 0)
|
if (numlocks > 0)
|
||||||
@ -93,8 +93,8 @@ int lockrel(void)
|
|||||||
*/
|
*/
|
||||||
int lock(char *fname)
|
int lock(char *fname)
|
||||||
{
|
{
|
||||||
register char *locker; /* lock error message */
|
char *locker; /* lock error message */
|
||||||
register int status; /* return status */
|
int status; /* return status */
|
||||||
char msg[NSTRING]; /* message string */
|
char msg[NSTRING]; /* message string */
|
||||||
|
|
||||||
/* attempt to lock the file */
|
/* attempt to lock the file */
|
||||||
@ -128,7 +128,7 @@ int lock(char *fname)
|
|||||||
*/
|
*/
|
||||||
int unlock(char *fname)
|
int unlock(char *fname)
|
||||||
{
|
{
|
||||||
register char *locker; /* undolock return string */
|
char *locker; /* undolock return string */
|
||||||
|
|
||||||
/* unclock and return */
|
/* unclock and return */
|
||||||
locker = undolock(fname);
|
locker = undolock(fname);
|
||||||
|
36
main.c
36
main.c
@ -94,14 +94,14 @@ int emacs(int argc, char **argv)
|
|||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
register int c = -1; /* command character */
|
int c = -1; /* command character */
|
||||||
register int f; /* default flag */
|
int f; /* default flag */
|
||||||
register int n; /* numeric repeat count */
|
int n; /* numeric repeat count */
|
||||||
register int mflag; /* negative flag on repeat */
|
int mflag; /* negative flag on repeat */
|
||||||
register struct buffer *bp; /* temp buffer pointer */
|
struct buffer *bp; /* temp buffer pointer */
|
||||||
register int firstfile; /* first file flag */
|
int firstfile; /* first file flag */
|
||||||
register int carg; /* current arg to scan */
|
int carg; /* current arg to scan */
|
||||||
register int startflag; /* startup executed flag */
|
int startflag; /* startup executed flag */
|
||||||
struct 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? */
|
||||||
@ -427,8 +427,8 @@ int main(int argc, char **argv)
|
|||||||
*/
|
*/
|
||||||
void edinit(char *bname)
|
void edinit(char *bname)
|
||||||
{
|
{
|
||||||
register struct buffer *bp;
|
struct buffer *bp;
|
||||||
register window_t *wp;
|
window_t *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 */
|
||||||
@ -465,7 +465,7 @@ void edinit(char *bname)
|
|||||||
*/
|
*/
|
||||||
int execute(int c, int f, int n)
|
int execute(int c, int f, int n)
|
||||||
{
|
{
|
||||||
register int status;
|
int status;
|
||||||
fn_t execfunc;
|
fn_t execfunc;
|
||||||
|
|
||||||
/* if the keystroke is a bound function...do it */
|
/* if the keystroke is a bound function...do it */
|
||||||
@ -555,9 +555,9 @@ int execute(int c, int f, int n)
|
|||||||
*/
|
*/
|
||||||
int quickexit(int f, int n)
|
int quickexit(int f, int n)
|
||||||
{
|
{
|
||||||
register struct buffer *bp; /* scanning pointer to buffers */
|
struct buffer *bp; /* scanning pointer to buffers */
|
||||||
register struct buffer *oldcb; /* original current buffer */
|
struct buffer *oldcb; /* original current buffer */
|
||||||
register int status;
|
int status;
|
||||||
|
|
||||||
oldcb = curbp; /* save in case we fail */
|
oldcb = curbp; /* save in case we fail */
|
||||||
|
|
||||||
@ -595,7 +595,7 @@ static void emergencyexit(int signr)
|
|||||||
*/
|
*/
|
||||||
int quit(int f, int n)
|
int quit(int f, int n)
|
||||||
{
|
{
|
||||||
register int s;
|
int s;
|
||||||
|
|
||||||
if (f != FALSE /* Argument forces it. */
|
if (f != FALSE /* Argument forces it. */
|
||||||
|| anycb() == FALSE /* All buffers clean. */
|
|| anycb() == FALSE /* All buffers clean. */
|
||||||
@ -817,9 +817,9 @@ dspram()
|
|||||||
*/
|
*/
|
||||||
int cexit(int status)
|
int cexit(int status)
|
||||||
{
|
{
|
||||||
register struct buffer *bp; /* buffer list pointer */
|
struct buffer *bp; /* buffer list pointer */
|
||||||
register window_t *wp; /* window list pointer */
|
window_t *wp; /* window list pointer */
|
||||||
register window_t *tp; /* temporary window pointer */
|
window_t *tp; /* temporary window pointer */
|
||||||
|
|
||||||
/* first clean up the windows */
|
/* first clean up the windows */
|
||||||
wp = wheadp;
|
wp = wheadp;
|
||||||
|
152
random.c
152
random.c
@ -32,12 +32,12 @@ int setfillcol(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int showcpos(int f, int n)
|
int showcpos(int f, int n)
|
||||||
{
|
{
|
||||||
register LINE *lp; /* current line */
|
LINE *lp; /* current line */
|
||||||
register long numchars; /* # of chars in file */
|
long numchars; /* # of chars in file */
|
||||||
register int numlines; /* # of lines in file */
|
int numlines; /* # of lines in file */
|
||||||
register long predchars; /* # chars preceding point */
|
long predchars; /* # chars preceding point */
|
||||||
register int predlines; /* # lines preceding point */
|
int predlines; /* # lines preceding point */
|
||||||
register int curchar; /* character under cursor */
|
int curchar; /* character under cursor */
|
||||||
int ratio;
|
int ratio;
|
||||||
int col;
|
int col;
|
||||||
int savepos; /* temp save for current offset */
|
int savepos; /* temp save for current offset */
|
||||||
@ -97,8 +97,8 @@ int showcpos(int f, int n)
|
|||||||
|
|
||||||
int getcline(void)
|
int getcline(void)
|
||||||
{ /* get the current line number */
|
{ /* get the current line number */
|
||||||
register LINE *lp; /* current line */
|
LINE *lp; /* current line */
|
||||||
register int numlines; /* # of lines before point */
|
int numlines; /* # of lines before point */
|
||||||
|
|
||||||
/* starting at the beginning of the buffer */
|
/* starting at the beginning of the buffer */
|
||||||
lp = lforw(curbp->b_linep);
|
lp = lforw(curbp->b_linep);
|
||||||
@ -122,7 +122,7 @@ int getcline(void)
|
|||||||
*/
|
*/
|
||||||
int getccol(int bflg)
|
int getccol(int bflg)
|
||||||
{
|
{
|
||||||
register int c, i, col;
|
int c, i, col;
|
||||||
col = 0;
|
col = 0;
|
||||||
for (i = 0; i < curwp->w_doto; ++i) {
|
for (i = 0; i < curwp->w_doto; ++i) {
|
||||||
c = lgetc(curwp->w_dotp, i);
|
c = lgetc(curwp->w_dotp, i);
|
||||||
@ -144,10 +144,10 @@ int getccol(int bflg)
|
|||||||
*/
|
*/
|
||||||
int setccol(int pos)
|
int setccol(int pos)
|
||||||
{
|
{
|
||||||
register int c; /* character being scanned */
|
int c; /* character being scanned */
|
||||||
register int i; /* index into current line */
|
int i; /* index into current line */
|
||||||
register int col; /* current cursor column */
|
int col; /* current cursor column */
|
||||||
register int llen; /* length of line in bytes */
|
int llen; /* length of line in bytes */
|
||||||
|
|
||||||
col = 0;
|
col = 0;
|
||||||
llen = llength(curwp->w_dotp);
|
llen = llength(curwp->w_dotp);
|
||||||
@ -183,10 +183,10 @@ int setccol(int pos)
|
|||||||
*/
|
*/
|
||||||
int twiddle(int f, int n)
|
int twiddle(int f, int n)
|
||||||
{
|
{
|
||||||
register LINE *dotp;
|
LINE *dotp;
|
||||||
register int doto;
|
int doto;
|
||||||
register int cl;
|
int cl;
|
||||||
register int cr;
|
int cr;
|
||||||
|
|
||||||
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 */
|
||||||
@ -212,8 +212,8 @@ int twiddle(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int quote(int f, int n)
|
int quote(int f, int n)
|
||||||
{
|
{
|
||||||
register int s;
|
int s;
|
||||||
register int c;
|
int c;
|
||||||
|
|
||||||
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 */
|
||||||
@ -259,7 +259,7 @@ int insert_tab(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int detab(int f, int n)
|
int detab(int f, int n)
|
||||||
{
|
{
|
||||||
register int inc; /* increment to next line [sgn(n)] */
|
int inc; /* increment to next line [sgn(n)] */
|
||||||
|
|
||||||
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 */
|
||||||
@ -301,10 +301,10 @@ int detab(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int entab(int f, int n)
|
int entab(int f, int n)
|
||||||
{
|
{
|
||||||
register int inc; /* increment to next line [sgn(n)] */
|
int inc; /* increment to next line [sgn(n)] */
|
||||||
register int fspace; /* pointer to first space if in a run */
|
int fspace; /* pointer to first space if in a run */
|
||||||
register int ccol; /* current cursor column */
|
int ccol; /* current cursor column */
|
||||||
register char cchar; /* current character */
|
char cchar; /* current character */
|
||||||
|
|
||||||
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 */
|
||||||
@ -375,10 +375,10 @@ int entab(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int trim(int f, int n)
|
int trim(int f, int n)
|
||||||
{
|
{
|
||||||
register LINE *lp; /* current line pointer */
|
LINE *lp; /* current line pointer */
|
||||||
register int offset; /* original line offset position */
|
int offset; /* original line offset position */
|
||||||
register int length; /* current length */
|
int length; /* current length */
|
||||||
register int inc; /* increment to next line [sgn(n)] */
|
int inc; /* increment to next line [sgn(n)] */
|
||||||
|
|
||||||
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 */
|
||||||
@ -419,8 +419,8 @@ int trim(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int openline(int f, int n)
|
int openline(int f, int n)
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
register 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 */
|
||||||
return (rdonly()); /* we are in read only mode */
|
return (rdonly()); /* we are in read only mode */
|
||||||
@ -443,7 +443,7 @@ int openline(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int insert_newline(int f, int n)
|
int insert_newline(int f, int n)
|
||||||
{
|
{
|
||||||
register 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 */
|
||||||
return (rdonly()); /* we are in read only mode */
|
return (rdonly()); /* we are in read only mode */
|
||||||
@ -478,10 +478,10 @@ int insert_newline(int f, int n)
|
|||||||
|
|
||||||
int cinsert(void)
|
int cinsert(void)
|
||||||
{ /* insert a newline and indentation for C */
|
{ /* insert a newline and indentation for C */
|
||||||
register char *cptr; /* string pointer into text to copy */
|
char *cptr; /* string pointer into text to copy */
|
||||||
register int tptr; /* index to scan into line */
|
int tptr; /* index to scan into line */
|
||||||
register int bracef; /* was there a brace at the end of line? */
|
int bracef; /* was there a brace at the end of line? */
|
||||||
register int i;
|
int i;
|
||||||
char ichar[NSTRING]; /* buffer to hold indent of last line */
|
char ichar[NSTRING]; /* buffer to hold indent of last line */
|
||||||
|
|
||||||
/* grab a pointer to text to copy indentation from */
|
/* grab a pointer to text to copy indentation from */
|
||||||
@ -526,12 +526,12 @@ int cinsert(void)
|
|||||||
*/
|
*/
|
||||||
int insbrace(int n, int c)
|
int insbrace(int n, int c)
|
||||||
{
|
{
|
||||||
register int ch; /* last character before input */
|
int ch; /* last character before input */
|
||||||
register int oc; /* caractere oppose a c */
|
int oc; /* caractere oppose a c */
|
||||||
register int i, count;
|
int i, count;
|
||||||
register int target; /* column brace should go after */
|
int target; /* column brace should go after */
|
||||||
register LINE *oldlp;
|
LINE *oldlp;
|
||||||
register int oldoff;
|
int oldoff;
|
||||||
|
|
||||||
/* if we aren't at the beginning of the line... */
|
/* if we aren't at the beginning of the line... */
|
||||||
if (curwp->w_doto != 0)
|
if (curwp->w_doto != 0)
|
||||||
@ -622,9 +622,9 @@ int insbrace(int n, int c)
|
|||||||
*/
|
*/
|
||||||
int insbrace(int n, int c)
|
int insbrace(int n, int c)
|
||||||
{
|
{
|
||||||
register int ch; /* last character before input */
|
int ch; /* last character before input */
|
||||||
register int i;
|
int i;
|
||||||
register int target; /* column brace should go after */
|
int target; /* column brace should go after */
|
||||||
|
|
||||||
/* if we are at the beginning of the line, no go */
|
/* if we are at the beginning of the line, no go */
|
||||||
if (curwp->w_doto == 0)
|
if (curwp->w_doto == 0)
|
||||||
@ -651,8 +651,8 @@ int insbrace(int n, int c)
|
|||||||
|
|
||||||
int inspound(void)
|
int inspound(void)
|
||||||
{ /* insert a # into the text here...we are in CMODE */
|
{ /* insert a # into the text here...we are in CMODE */
|
||||||
register int ch; /* last character before input */
|
int ch; /* last character before input */
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
/* if we are at the beginning of the line, no go */
|
/* if we are at the beginning of the line, no go */
|
||||||
if (curwp->w_doto == 0)
|
if (curwp->w_doto == 0)
|
||||||
@ -683,8 +683,8 @@ int inspound(void)
|
|||||||
*/
|
*/
|
||||||
int deblank(int f, int n)
|
int deblank(int f, int n)
|
||||||
{
|
{
|
||||||
register LINE *lp1;
|
LINE *lp1;
|
||||||
register LINE *lp2;
|
LINE *lp2;
|
||||||
long nld;
|
long nld;
|
||||||
|
|
||||||
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
|
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
|
||||||
@ -713,9 +713,9 @@ int deblank(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int indent(int f, int n)
|
int indent(int f, int n)
|
||||||
{
|
{
|
||||||
register int nicol;
|
int nicol;
|
||||||
register int c;
|
int c;
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
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 */
|
||||||
@ -767,7 +767,7 @@ int forwdel(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int backdel(int f, int n)
|
int backdel(int f, int n)
|
||||||
{
|
{
|
||||||
register 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 */
|
||||||
return (rdonly()); /* we are in read only mode */
|
return (rdonly()); /* we are in read only mode */
|
||||||
@ -793,7 +793,7 @@ int backdel(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int killtext(int f, int n)
|
int killtext(int f, int n)
|
||||||
{
|
{
|
||||||
register LINE *nextp;
|
LINE *nextp;
|
||||||
long chunk;
|
long chunk;
|
||||||
|
|
||||||
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
|
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
|
||||||
@ -888,11 +888,11 @@ int delgmode(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int adjustmode(int kind, int global)
|
int adjustmode(int kind, int global)
|
||||||
{
|
{
|
||||||
register char *scan; /* scanning pointer to convert prompt */
|
char *scan; /* scanning pointer to convert prompt */
|
||||||
register int i; /* loop index */
|
int i; /* loop index */
|
||||||
register int status; /* error return on input */
|
int status; /* error return on input */
|
||||||
#if COLOR
|
#if COLOR
|
||||||
register int uflag; /* was modename uppercase? */
|
int uflag; /* was modename uppercase? */
|
||||||
#endif
|
#endif
|
||||||
char prompt[50]; /* string to prompt user with */
|
char prompt[50]; /* string to prompt user with */
|
||||||
char cbuf[NPAT]; /* buffer to recieve mode name into */
|
char cbuf[NPAT]; /* buffer to recieve mode name into */
|
||||||
@ -1004,9 +1004,9 @@ int clrmes(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int writemsg(int f, int n)
|
int writemsg(int f, int n)
|
||||||
{
|
{
|
||||||
register char *sp; /* pointer into buf to expand %s */
|
char *sp; /* pointer into buf to expand %s */
|
||||||
register char *np; /* ptr into nbuf */
|
char *np; /* ptr into nbuf */
|
||||||
register int status;
|
int status;
|
||||||
char buf[NPAT]; /* buffer to recieve message into */
|
char buf[NPAT]; /* buffer to recieve message into */
|
||||||
char nbuf[NPAT * 2]; /* buffer to expand string into */
|
char nbuf[NPAT * 2]; /* buffer to expand string into */
|
||||||
|
|
||||||
@ -1037,13 +1037,13 @@ int writemsg(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int getfence(int f, int n)
|
int getfence(int f, int n)
|
||||||
{
|
{
|
||||||
register LINE *oldlp; /* original line pointer */
|
LINE *oldlp; /* original line pointer */
|
||||||
register int oldoff; /* and offset */
|
int oldoff; /* and offset */
|
||||||
register int sdir; /* direction of search (1/-1) */
|
int sdir; /* direction of search (1/-1) */
|
||||||
register int count; /* current fence level count */
|
int count; /* current fence level count */
|
||||||
register char ch; /* fence type to match against */
|
char ch; /* fence type to match against */
|
||||||
register char ofence; /* open fence */
|
char ofence; /* open fence */
|
||||||
register char c; /* current character in scan */
|
char c; /* current character in scan */
|
||||||
|
|
||||||
/* save the original cursor position */
|
/* save the original cursor position */
|
||||||
oldlp = curwp->w_dotp;
|
oldlp = curwp->w_dotp;
|
||||||
@ -1137,13 +1137,13 @@ int getfence(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int fmatch(int ch)
|
int fmatch(int ch)
|
||||||
{
|
{
|
||||||
register LINE *oldlp; /* original line pointer */
|
LINE *oldlp; /* original line pointer */
|
||||||
register int oldoff; /* and offset */
|
int oldoff; /* and offset */
|
||||||
register LINE *toplp; /* top line in current window */
|
LINE *toplp; /* top line in current window */
|
||||||
register int count; /* current fence level count */
|
int count; /* current fence level count */
|
||||||
register char opench; /* open fence */
|
char opench; /* open fence */
|
||||||
register char c; /* current character in scan */
|
char c; /* current character in scan */
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
/* first get the display update out there */
|
/* first get the display update out there */
|
||||||
update(FALSE);
|
update(FALSE);
|
||||||
@ -1204,7 +1204,7 @@ int fmatch(int ch)
|
|||||||
*/
|
*/
|
||||||
int istring(int f, int n)
|
int istring(int f, int n)
|
||||||
{
|
{
|
||||||
register int status; /* status return code */
|
int status; /* status return code */
|
||||||
char tstring[NPAT + 1]; /* string to add */
|
char tstring[NPAT + 1]; /* string to add */
|
||||||
|
|
||||||
/* ask for string to insert */
|
/* ask for string to insert */
|
||||||
@ -1232,7 +1232,7 @@ int istring(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int ovstring(int f, int n)
|
int ovstring(int f, int n)
|
||||||
{
|
{
|
||||||
register int status; /* status return code */
|
int status; /* status return code */
|
||||||
char tstring[NPAT + 1]; /* string to add */
|
char tstring[NPAT + 1]; /* string to add */
|
||||||
|
|
||||||
/* ask for string to insert */
|
/* ask for string to insert */
|
||||||
|
28
region.c
28
region.c
@ -22,7 +22,7 @@
|
|||||||
*/
|
*/
|
||||||
int killregion(int f, int n)
|
int killregion(int f, int n)
|
||||||
{
|
{
|
||||||
register int s;
|
int s;
|
||||||
REGION region;
|
REGION region;
|
||||||
|
|
||||||
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
|
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
|
||||||
@ -45,9 +45,9 @@ int killregion(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int copyregion(int f, int n)
|
int copyregion(int f, int n)
|
||||||
{
|
{
|
||||||
register LINE *linep;
|
LINE *linep;
|
||||||
register int loffs;
|
int loffs;
|
||||||
register int s;
|
int s;
|
||||||
REGION region;
|
REGION region;
|
||||||
|
|
||||||
if ((s = getregion(®ion)) != TRUE)
|
if ((s = getregion(®ion)) != TRUE)
|
||||||
@ -83,10 +83,10 @@ int copyregion(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int lowerregion(int f, int n)
|
int lowerregion(int f, int n)
|
||||||
{
|
{
|
||||||
register LINE *linep;
|
LINE *linep;
|
||||||
register int loffs;
|
int loffs;
|
||||||
register int c;
|
int c;
|
||||||
register int s;
|
int s;
|
||||||
REGION region;
|
REGION region;
|
||||||
|
|
||||||
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
|
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
|
||||||
@ -120,10 +120,10 @@ int lowerregion(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int upperregion(int f, int n)
|
int upperregion(int f, int n)
|
||||||
{
|
{
|
||||||
register LINE *linep;
|
LINE *linep;
|
||||||
register int loffs;
|
int loffs;
|
||||||
register int c;
|
int c;
|
||||||
register int s;
|
int s;
|
||||||
REGION region;
|
REGION region;
|
||||||
|
|
||||||
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
|
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
|
||||||
@ -160,8 +160,8 @@ int upperregion(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int getregion(REGION *rp)
|
int getregion(REGION *rp)
|
||||||
{
|
{
|
||||||
register LINE *flp;
|
LINE *flp;
|
||||||
register LINE *blp;
|
LINE *blp;
|
||||||
long fsize;
|
long fsize;
|
||||||
long bsize;
|
long bsize;
|
||||||
|
|
||||||
|
46
search.c
46
search.c
@ -83,7 +83,7 @@ static void setbit(int bc, BITMAP cclmap);
|
|||||||
*/
|
*/
|
||||||
int forwsearch(int f, int n)
|
int forwsearch(int f, int n)
|
||||||
{
|
{
|
||||||
register int status = TRUE;
|
int status = TRUE;
|
||||||
|
|
||||||
/* If n is negative, search backwards.
|
/* If n is negative, search backwards.
|
||||||
* Otherwise proceed by asking for the search string.
|
* Otherwise proceed by asking for the search string.
|
||||||
@ -129,7 +129,7 @@ int forwsearch(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int forwhunt(int f, int n)
|
int forwhunt(int f, int n)
|
||||||
{
|
{
|
||||||
register int status = TRUE;
|
int status = TRUE;
|
||||||
|
|
||||||
if (n < 0) /* search backwards */
|
if (n < 0) /* search backwards */
|
||||||
return (backhunt(f, -n));
|
return (backhunt(f, -n));
|
||||||
@ -183,7 +183,7 @@ int forwhunt(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int backsearch(int f, int n)
|
int backsearch(int f, int n)
|
||||||
{
|
{
|
||||||
register int status = TRUE;
|
int status = TRUE;
|
||||||
|
|
||||||
/* If n is negative, search forwards.
|
/* If n is negative, search forwards.
|
||||||
* Otherwise proceed by asking for the search string.
|
* Otherwise proceed by asking for the search string.
|
||||||
@ -231,7 +231,7 @@ int backsearch(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int backhunt(int f, int n)
|
int backhunt(int f, int n)
|
||||||
{
|
{
|
||||||
register int status = TRUE;
|
int status = TRUE;
|
||||||
|
|
||||||
if (n < 0)
|
if (n < 0)
|
||||||
return (forwhunt(f, -n));
|
return (forwhunt(f, -n));
|
||||||
@ -356,7 +356,7 @@ int mcscanner(MC *mcpatrn, int direct, int beg_or_end)
|
|||||||
*/
|
*/
|
||||||
static int amatch(MC *mcptr, int direct, LINE **pcwline, int *pcwoff)
|
static int amatch(MC *mcptr, int direct, LINE **pcwline, int *pcwoff)
|
||||||
{
|
{
|
||||||
register int c; /* character at current position */
|
int c; /* character at current position */
|
||||||
LINE *curline; /* current line during scan */
|
LINE *curline; /* current line during scan */
|
||||||
int curoff; /* position within current line */
|
int curoff; /* position within current line */
|
||||||
int nchars;
|
int nchars;
|
||||||
@ -496,7 +496,7 @@ static int amatch(MC *mcptr, int direct, LINE **pcwline, int *pcwoff)
|
|||||||
*/
|
*/
|
||||||
int scanner(const char *patrn, int direct, int beg_or_end)
|
int scanner(const char *patrn, int direct, int beg_or_end)
|
||||||
{
|
{
|
||||||
register int c; /* character at current position */
|
int c; /* character at current position */
|
||||||
const char *patptr; /* pointer into pattern */
|
const char *patptr; /* pointer into pattern */
|
||||||
LINE *curline; /* current line during scan */
|
LINE *curline; /* current line during scan */
|
||||||
int curoff; /* position within current line */
|
int curoff; /* position within current line */
|
||||||
@ -639,8 +639,8 @@ static int readpattern(char *prompt, char *apat, int srch)
|
|||||||
*/
|
*/
|
||||||
void savematch(void)
|
void savematch(void)
|
||||||
{
|
{
|
||||||
register char *ptr; /* pointer to last match string */
|
char *ptr; /* pointer to last match string */
|
||||||
register int j;
|
int j;
|
||||||
LINE *curline; /* line of last match */
|
LINE *curline; /* line of last match */
|
||||||
int curoff; /* offset " " */
|
int curoff; /* offset " " */
|
||||||
|
|
||||||
@ -668,7 +668,7 @@ void savematch(void)
|
|||||||
*/
|
*/
|
||||||
void rvstrcpy(char *rvstr, char *str)
|
void rvstrcpy(char *rvstr, char *str)
|
||||||
{
|
{
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
str += (i = strlen(str));
|
str += (i = strlen(str));
|
||||||
|
|
||||||
@ -710,10 +710,10 @@ int qreplace(int f, int n)
|
|||||||
*/
|
*/
|
||||||
static int replaces(int kind, int f, int n)
|
static int replaces(int kind, int f, int n)
|
||||||
{
|
{
|
||||||
register int status; /* success flag on pattern inputs */
|
int status; /* success flag on pattern inputs */
|
||||||
register int rlength; /* length of replacement string */
|
int rlength; /* length of replacement string */
|
||||||
register int numsub; /* number of substitutions */
|
int numsub; /* number of substitutions */
|
||||||
register int nummatch; /* number of found matches */
|
int nummatch; /* number of found matches */
|
||||||
int nlflag; /* last char of search string a <NL>? */
|
int nlflag; /* last char of search string a <NL>? */
|
||||||
int nlrepl; /* was a replace done on the last line? */
|
int nlrepl; /* was a replace done on the last line? */
|
||||||
char c; /* input char for query */
|
char c; /* input char for query */
|
||||||
@ -1015,7 +1015,7 @@ int expandp(char *srcstr, char *deststr, int maxlength)
|
|||||||
*/
|
*/
|
||||||
int boundry(LINE *curline, int curoff, int dir)
|
int boundry(LINE *curline, int curoff, int dir)
|
||||||
{
|
{
|
||||||
register int border;
|
int border;
|
||||||
|
|
||||||
if (dir == FORWARD) {
|
if (dir == FORWARD) {
|
||||||
border = (curoff == llength(curline)) &&
|
border = (curoff == llength(curline)) &&
|
||||||
@ -1037,9 +1037,9 @@ int boundry(LINE *curline, int curoff, int dir)
|
|||||||
*/
|
*/
|
||||||
static int nextch(LINE **pcurline, int *pcuroff, int dir)
|
static int nextch(LINE **pcurline, int *pcuroff, int dir)
|
||||||
{
|
{
|
||||||
register LINE *curline;
|
LINE *curline;
|
||||||
register int curoff;
|
int curoff;
|
||||||
register int c;
|
int c;
|
||||||
|
|
||||||
curline = *pcurline;
|
curline = *pcurline;
|
||||||
curoff = *pcuroff;
|
curoff = *pcuroff;
|
||||||
@ -1288,7 +1288,7 @@ static int rmcstr(void)
|
|||||||
*/
|
*/
|
||||||
void mcclear(void)
|
void mcclear(void)
|
||||||
{
|
{
|
||||||
register MC *mcptr;
|
MC *mcptr;
|
||||||
|
|
||||||
mcptr = &mcpat[0];
|
mcptr = &mcpat[0];
|
||||||
|
|
||||||
@ -1306,7 +1306,7 @@ void mcclear(void)
|
|||||||
*/
|
*/
|
||||||
void rmcclear(void)
|
void rmcclear(void)
|
||||||
{
|
{
|
||||||
register RMC *rmcptr;
|
RMC *rmcptr;
|
||||||
|
|
||||||
rmcptr = &rmcpat[0];
|
rmcptr = &rmcpat[0];
|
||||||
|
|
||||||
@ -1326,7 +1326,7 @@ void rmcclear(void)
|
|||||||
*/
|
*/
|
||||||
static int mceq(int bc, MC *mt)
|
static int mceq(int bc, MC *mt)
|
||||||
{
|
{
|
||||||
register int result;
|
int result;
|
||||||
|
|
||||||
#if PKCODE
|
#if PKCODE
|
||||||
bc = bc & 0xFF;
|
bc = bc & 0xFF;
|
||||||
@ -1377,8 +1377,8 @@ static int cclmake(char **ppatptr, MC *mcptr)
|
|||||||
{
|
{
|
||||||
BITMAP clearbits();
|
BITMAP clearbits();
|
||||||
BITMAP bmap;
|
BITMAP bmap;
|
||||||
register char *patptr;
|
char *patptr;
|
||||||
register int pchr, ochr;
|
int pchr, ochr;
|
||||||
|
|
||||||
if ((bmap = clearbits()) == NULL) {
|
if ((bmap = clearbits()) == NULL) {
|
||||||
mlwrite("%%Out of memory");
|
mlwrite("%%Out of memory");
|
||||||
@ -1469,7 +1469,7 @@ static int biteq(int bc, BITMAP cclmap)
|
|||||||
static BITMAP clearbits(void)
|
static BITMAP clearbits(void)
|
||||||
{
|
{
|
||||||
BITMAP cclstart, cclmap;
|
BITMAP cclstart, cclmap;
|
||||||
register int j;
|
int j;
|
||||||
|
|
||||||
if ((cclmap = cclstart = (BITMAP) malloc(HIBYTE)) != NULL)
|
if ((cclmap = cclstart = (BITMAP) malloc(HIBYTE)) != NULL)
|
||||||
for (j = 0; j < HIBYTE; j++)
|
for (j = 0; j < HIBYTE; j++)
|
||||||
|
16
spawn.c
16
spawn.c
@ -44,7 +44,7 @@ extern void sizesignal();
|
|||||||
int spawncli(int f, int n)
|
int spawncli(int f, int n)
|
||||||
{
|
{
|
||||||
#if V7 | USG | BSD
|
#if V7 | USG | BSD
|
||||||
register char *cp;
|
char *cp;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* don't allow this command if restricted */
|
/* don't allow this command if restricted */
|
||||||
@ -132,7 +132,7 @@ void rtfrmshell(void)
|
|||||||
*/
|
*/
|
||||||
int spawn(int f, int n)
|
int spawn(int f, int n)
|
||||||
{
|
{
|
||||||
register int s;
|
int s;
|
||||||
char line[NLINE];
|
char line[NLINE];
|
||||||
|
|
||||||
/* don't allow this command if restricted */
|
/* don't allow this command if restricted */
|
||||||
@ -198,7 +198,7 @@ int spawn(int f, int n)
|
|||||||
|
|
||||||
int execprg(int f, int n)
|
int execprg(int f, int n)
|
||||||
{
|
{
|
||||||
register int s;
|
int s;
|
||||||
char line[NLINE];
|
char line[NLINE];
|
||||||
|
|
||||||
/* don't allow this command if restricted */
|
/* don't allow this command if restricted */
|
||||||
@ -256,9 +256,9 @@ int execprg(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int pipecmd(int f, int n)
|
int pipecmd(int f, int n)
|
||||||
{
|
{
|
||||||
register int s; /* return status from CLI */
|
int s; /* return status from CLI */
|
||||||
register window_t *wp; /* pointer to new window */
|
window_t *wp; /* pointer to new window */
|
||||||
register 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";
|
||||||
|
|
||||||
@ -378,8 +378,8 @@ 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 */
|
int s; /* return status from CLI */
|
||||||
register 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 */
|
||||||
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";
|
||||||
|
10
vmsvt.c
10
vmsvt.c
@ -119,9 +119,9 @@ int col; /* Column position */
|
|||||||
static int request_code = SMG$K_SET_CURSOR_ABS;
|
static int request_code = SMG$K_SET_CURSOR_ABS;
|
||||||
static int max_buffer_length = sizeof(buffer);
|
static int max_buffer_length = sizeof(buffer);
|
||||||
static int arg_list[3] = { 2 };
|
static int arg_list[3] = { 2 };
|
||||||
register char *cp;
|
char *cp;
|
||||||
|
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
/* Set the arguments into the arg_list array
|
/* Set the arguments into the arg_list array
|
||||||
* SMG assumes the row/column positions are 1 based (boo!)
|
* SMG assumes the row/column positions are 1 based (boo!)
|
||||||
@ -181,9 +181,9 @@ int bot; /* Bottom position */
|
|||||||
static int request_code = SMG$K_SET_SCROLL_REGION;
|
static int request_code = SMG$K_SET_SCROLL_REGION;
|
||||||
static int max_buffer_length = sizeof(buffer);
|
static int max_buffer_length = sizeof(buffer);
|
||||||
static int arg_list[3] = { 2 };
|
static int arg_list[3] = { 2 };
|
||||||
register char *cp;
|
char *cp;
|
||||||
|
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
/* Set the arguments into the arg_list array
|
/* Set the arguments into the arg_list array
|
||||||
* SMG assumes the row/column positions are 1 based (boo!)
|
* SMG assumes the row/column positions are 1 based (boo!)
|
||||||
@ -303,7 +303,7 @@ vmsbeep()
|
|||||||
char *vmsgetstr(request_code)
|
char *vmsgetstr(request_code)
|
||||||
int request_code; /* Request code */
|
int request_code; /* Request code */
|
||||||
{
|
{
|
||||||
register char *result;
|
char *result;
|
||||||
static char seq_storage[1024];
|
static char seq_storage[1024];
|
||||||
static char *buffer = seq_storage;
|
static char *buffer = seq_storage;
|
||||||
static int arg_list[2] = { 1, 1 };
|
static int arg_list[2] = { 1, 1 };
|
||||||
|
2
vt52.c
2
vt52.c
@ -142,7 +142,7 @@ vt52beep()
|
|||||||
vt52open()
|
vt52open()
|
||||||
{
|
{
|
||||||
#if V7 | BSD
|
#if V7 | BSD
|
||||||
register char *cp;
|
char *cp;
|
||||||
char *getenv();
|
char *getenv();
|
||||||
|
|
||||||
if ((cp = getenv("TERM")) == NULL) {
|
if ((cp = getenv("TERM")) == NULL) {
|
||||||
|
60
window.c
60
window.c
@ -53,8 +53,8 @@ int redraw(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int nextwind(int f, int n)
|
int nextwind(int f, int n)
|
||||||
{
|
{
|
||||||
register window_t *wp;
|
window_t *wp;
|
||||||
register 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)
|
||||||
{
|
{
|
||||||
register window_t *wp1;
|
window_t *wp1;
|
||||||
register window_t *wp2;
|
window_t *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)
|
||||||
@ -140,8 +140,8 @@ int mvdnwind(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int mvupwind(int f, int n)
|
int mvupwind(int f, int n)
|
||||||
{
|
{
|
||||||
register LINE *lp;
|
LINE *lp;
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
lp = curwp->w_linep;
|
lp = curwp->w_linep;
|
||||||
|
|
||||||
@ -184,9 +184,9 @@ int mvupwind(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int onlywind(int f, int n)
|
int onlywind(int f, int n)
|
||||||
{
|
{
|
||||||
register window_t *wp;
|
window_t *wp;
|
||||||
register LINE *lp;
|
LINE *lp;
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
while (wheadp != curwp) {
|
while (wheadp != curwp) {
|
||||||
wp = wheadp;
|
wp = wheadp;
|
||||||
@ -231,9 +231,9 @@ int onlywind(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int delwind(int f, int n)
|
int delwind(int f, int n)
|
||||||
{
|
{
|
||||||
register window_t *wp; /* window to recieve deleted space */
|
window_t *wp; /* window to recieve deleted space */
|
||||||
register window_t *lwp; /* ptr window before curwp */
|
window_t *lwp; /* ptr window before curwp */
|
||||||
register 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 */
|
||||||
if (wheadp->w_wndp == NULL) {
|
if (wheadp->w_wndp == NULL) {
|
||||||
@ -309,13 +309,13 @@ int delwind(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int splitwind(int f, int n)
|
int splitwind(int f, int n)
|
||||||
{
|
{
|
||||||
register window_t *wp;
|
window_t *wp;
|
||||||
register LINE *lp;
|
LINE *lp;
|
||||||
register int ntru;
|
int ntru;
|
||||||
register int ntrl;
|
int ntrl;
|
||||||
register int ntrd;
|
int ntrd;
|
||||||
register window_t *wp1;
|
window_t *wp1;
|
||||||
register window_t *wp2;
|
window_t *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);
|
||||||
@ -391,9 +391,9 @@ int splitwind(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int enlargewind(int f, int n)
|
int enlargewind(int f, int n)
|
||||||
{
|
{
|
||||||
register window_t *adjwp;
|
window_t *adjwp;
|
||||||
register LINE *lp;
|
LINE *lp;
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
if (n < 0)
|
if (n < 0)
|
||||||
return (shrinkwind(f, -n));
|
return (shrinkwind(f, -n));
|
||||||
@ -442,9 +442,9 @@ int enlargewind(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int shrinkwind(int f, int n)
|
int shrinkwind(int f, int n)
|
||||||
{
|
{
|
||||||
register window_t *adjwp;
|
window_t *adjwp;
|
||||||
register LINE *lp;
|
LINE *lp;
|
||||||
register int i;
|
int i;
|
||||||
|
|
||||||
if (n < 0)
|
if (n < 0)
|
||||||
return (enlargewind(f, -n));
|
return (enlargewind(f, -n));
|
||||||
@ -517,7 +517,7 @@ int resize(int f, int n)
|
|||||||
*/
|
*/
|
||||||
window_t *wpopup(void)
|
window_t *wpopup(void)
|
||||||
{
|
{
|
||||||
register window_t *wp;
|
window_t *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 */
|
||||||
register window_t *wp;
|
window_t *wp;
|
||||||
|
|
||||||
/* find the window */
|
/* find the window */
|
||||||
wp = wheadp;
|
wp = wheadp;
|
||||||
@ -666,7 +666,7 @@ int newsize(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int newwidth(int f, int n)
|
int newwidth(int f, int n)
|
||||||
{
|
{
|
||||||
register window_t *wp;
|
window_t *wp;
|
||||||
|
|
||||||
/* if the command defaults, assume the largest */
|
/* if the command defaults, assume the largest */
|
||||||
if (f == FALSE)
|
if (f == FALSE)
|
||||||
@ -696,8 +696,8 @@ int newwidth(int f, int n)
|
|||||||
|
|
||||||
int getwpos(void)
|
int getwpos(void)
|
||||||
{ /* get screen offset of current line in current window */
|
{ /* get screen offset of current line in current window */
|
||||||
register int sline; /* screen line from top of window */
|
int sline; /* screen line from top of window */
|
||||||
register LINE *lp; /* scannile line pointer */
|
LINE *lp; /* scannile line pointer */
|
||||||
|
|
||||||
/* search down the line we want */
|
/* search down the line we want */
|
||||||
lp = curwp->w_linep;
|
lp = curwp->w_linep;
|
||||||
|
64
word.c
64
word.c
@ -25,8 +25,8 @@
|
|||||||
*/
|
*/
|
||||||
int wrapword(int f, int n)
|
int wrapword(int f, int n)
|
||||||
{
|
{
|
||||||
register int cnt; /* size of word wrapped to next line */
|
int cnt; /* size of word wrapped to next line */
|
||||||
register int c; /* charector temporary */
|
int c; /* charector temporary */
|
||||||
|
|
||||||
/* backup from the <NL> 1 char */
|
/* backup from the <NL> 1 char */
|
||||||
if (!backchar(0, 1))
|
if (!backchar(0, 1))
|
||||||
@ -116,7 +116,7 @@ int forwword(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int upperword(int f, int n)
|
int upperword(int f, int n)
|
||||||
{
|
{
|
||||||
register int c;
|
int c;
|
||||||
|
|
||||||
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 */
|
||||||
@ -152,7 +152,7 @@ int upperword(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int lowerword(int f, int n)
|
int lowerword(int f, int n)
|
||||||
{
|
{
|
||||||
register int c;
|
int c;
|
||||||
|
|
||||||
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 */
|
||||||
@ -189,7 +189,7 @@ int lowerword(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int capword(int f, int n)
|
int capword(int f, int n)
|
||||||
{
|
{
|
||||||
register int c;
|
int c;
|
||||||
|
|
||||||
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 */
|
||||||
@ -241,9 +241,9 @@ int capword(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int delfword(int f, int n)
|
int delfword(int f, int n)
|
||||||
{
|
{
|
||||||
register LINE *dotp; /* original cursor line */
|
LINE *dotp; /* original cursor line */
|
||||||
register int doto; /* and row */
|
int doto; /* and row */
|
||||||
register int c; /* temp char */
|
int c; /* temp char */
|
||||||
long size; /* # of chars to delete */
|
long size; /* # of chars to delete */
|
||||||
|
|
||||||
/* don't allow this command if we are in read only mode */
|
/* don't allow this command if we are in read only mode */
|
||||||
@ -371,7 +371,7 @@ int delbword(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int inword(void)
|
int inword(void)
|
||||||
{
|
{
|
||||||
register int c;
|
int c;
|
||||||
|
|
||||||
if (curwp->w_doto == llength(curwp->w_dotp))
|
if (curwp->w_doto == llength(curwp->w_dotp))
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
@ -398,15 +398,15 @@ int inword(void)
|
|||||||
*/
|
*/
|
||||||
int fillpara(int f, int n)
|
int fillpara(int f, int n)
|
||||||
{
|
{
|
||||||
register int c; /* current char durring scan */
|
int c; /* current char durring scan */
|
||||||
register int wordlen; /* length of current word */
|
int wordlen; /* length of current word */
|
||||||
register int clength; /* position on line during fill */
|
int clength; /* position on line during fill */
|
||||||
register int i; /* index during word copy */
|
int i; /* index during word copy */
|
||||||
register int newlength; /* tentative new line length */
|
int newlength; /* tentative new line length */
|
||||||
register int eopflag; /* Are we at the End-Of-Paragraph? */
|
int eopflag; /* Are we at the End-Of-Paragraph? */
|
||||||
register int firstflag; /* first word? (needs no space) */
|
int firstflag; /* first word? (needs no space) */
|
||||||
register LINE *eopline; /* pointer to line just past EOP */
|
LINE *eopline; /* pointer to line just past EOP */
|
||||||
register int dotflag; /* was the last char a period? */
|
int dotflag; /* was the last char a period? */
|
||||||
char wbuf[NSTRING]; /* buffer for current word */
|
char wbuf[NSTRING]; /* buffer for current word */
|
||||||
|
|
||||||
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
|
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
|
||||||
@ -495,14 +495,14 @@ int fillpara(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int justpara(int f, int n)
|
int justpara(int f, int n)
|
||||||
{
|
{
|
||||||
register int c; /* current char durring scan */
|
int c; /* current char durring scan */
|
||||||
register int wordlen; /* length of current word */
|
int wordlen; /* length of current word */
|
||||||
register int clength; /* position on line during fill */
|
int clength; /* position on line during fill */
|
||||||
register int i; /* index during word copy */
|
int i; /* index during word copy */
|
||||||
register int newlength; /* tentative new line length */
|
int newlength; /* tentative new line length */
|
||||||
register int eopflag; /* Are we at the End-Of-Paragraph? */
|
int eopflag; /* Are we at the End-Of-Paragraph? */
|
||||||
register int firstflag; /* first word? (needs no space) */
|
int firstflag; /* first word? (needs no space) */
|
||||||
register LINE *eopline; /* pointer to line just past EOP */
|
LINE *eopline; /* pointer to line just past EOP */
|
||||||
char wbuf[NSTRING]; /* buffer for current word */
|
char wbuf[NSTRING]; /* buffer for current word */
|
||||||
int leftmarg; /* left marginal */
|
int leftmarg; /* left marginal */
|
||||||
|
|
||||||
@ -605,7 +605,7 @@ int justpara(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int killpara(int f, int n)
|
int killpara(int f, int n)
|
||||||
{
|
{
|
||||||
register int status; /* returned status of functions */
|
int status; /* returned status of functions */
|
||||||
|
|
||||||
while (n--) { /* for each paragraph to delete */
|
while (n--) { /* for each paragraph to delete */
|
||||||
|
|
||||||
@ -640,12 +640,12 @@ int killpara(int f, int n)
|
|||||||
*/
|
*/
|
||||||
int wordcount(int f, int n)
|
int wordcount(int f, int n)
|
||||||
{
|
{
|
||||||
register LINE *lp; /* current line to scan */
|
LINE *lp; /* current line to scan */
|
||||||
register int offset; /* current char to scan */
|
int offset; /* current char to scan */
|
||||||
long size; /* size of region left to count */
|
long size; /* size of region left to count */
|
||||||
register int ch; /* current character to scan */
|
int ch; /* current character to scan */
|
||||||
register int wordflag; /* are we in a word now? */
|
int wordflag; /* are we in a word now? */
|
||||||
register int lastword; /* were we just in a word? */
|
int lastword; /* were we just in a word? */
|
||||||
long nwords; /* total # of words */
|
long nwords; /* total # of words */
|
||||||
long nchars; /* total number of chars */
|
long nchars; /* total number of chars */
|
||||||
int nlines; /* total number of lines in region */
|
int nlines; /* total number of lines in region */
|
||||||
|
Loading…
Reference in New Issue
Block a user