mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-18 07:16:23 -05:00
Mode commands based on newmlarg (replacement of mlreply).
This commit is contained in:
parent
575659b1c1
commit
db30d6d734
7
random.c
7
random.c
@ -944,7 +944,7 @@ static int adjustmode( int kind, int global) {
|
|||||||
unsigned i ; /* loop index */
|
unsigned i ; /* loop index */
|
||||||
int status; /* error return on input */
|
int status; /* error return on input */
|
||||||
char prompt[50]; /* string to prompt user with */
|
char prompt[50]; /* string to prompt user with */
|
||||||
char cbuf[ NSTRING] ; /* buffer to recieve mode name into */
|
char *cbuf ; /* buffer to recieve mode name into */
|
||||||
|
|
||||||
/* build the proper prompt string */
|
/* build the proper prompt string */
|
||||||
if (global)
|
if (global)
|
||||||
@ -959,7 +959,7 @@ static int adjustmode( int kind, int global) {
|
|||||||
|
|
||||||
/* prompt the user and get an answer */
|
/* prompt the user and get an answer */
|
||||||
|
|
||||||
status = mlreply( prompt, cbuf, sizeof cbuf - 1) ;
|
status = newmlarg( &cbuf, prompt, 0) ;
|
||||||
if (status != TRUE)
|
if (status != TRUE)
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
@ -987,6 +987,7 @@ static int adjustmode( int kind, int global) {
|
|||||||
curwp->w_flag |= WFCOLR;
|
curwp->w_flag |= WFCOLR;
|
||||||
#endif
|
#endif
|
||||||
mlerase();
|
mlerase();
|
||||||
|
free( cbuf) ;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1009,11 +1010,13 @@ static int adjustmode( int kind, int global) {
|
|||||||
if (global == 0)
|
if (global == 0)
|
||||||
upmode();
|
upmode();
|
||||||
mlerase(); /* erase the junk */
|
mlerase(); /* erase the junk */
|
||||||
|
free( cbuf) ;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mlwrite("No such mode!");
|
mlwrite("No such mode!");
|
||||||
|
free( cbuf) ;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user