mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-18 07:16:23 -05:00
Review message line outputs.
This commit is contained in:
parent
bb44fc57ad
commit
703c472f0b
16
bindable.c
16
bindable.c
@ -32,10 +32,10 @@ int quickexit(int f, int n)
|
|||||||
&& (bp->b_flag & BFTRUNC) == 0 /* Not truncated P.K. */
|
&& (bp->b_flag & BFTRUNC) == 0 /* Not truncated P.K. */
|
||||||
&& (bp->b_flag & BFINVS) == 0) { /* Real. */
|
&& (bp->b_flag & BFINVS) == 0) { /* Real. */
|
||||||
curbp = bp; /* make that buffer cur */
|
curbp = bp; /* make that buffer cur */
|
||||||
mlwrite("(Saving %s)", bp->b_fname);
|
mloutfmt( "(Saving %s)", bp->b_fname) ;
|
||||||
#if PKCODE
|
#if PKCODE
|
||||||
#else
|
#else
|
||||||
mlwrite("\n");
|
mloutstr( "\n") ;
|
||||||
#endif
|
#endif
|
||||||
if ((status = filesave(f, n)) != TRUE) {
|
if ((status = filesave(f, n)) != TRUE) {
|
||||||
curbp = oldcb; /* restore curbp */
|
curbp = oldcb; /* restore curbp */
|
||||||
@ -76,7 +76,7 @@ int quit(int f, int n)
|
|||||||
else
|
else
|
||||||
exit( EXIT_SUCCESS) ;
|
exit( EXIT_SUCCESS) ;
|
||||||
}
|
}
|
||||||
mlwrite("");
|
mloutstr( "") ;
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,10 +88,10 @@ int quit(int f, int n)
|
|||||||
int ctlxlp(int f, int n)
|
int ctlxlp(int f, int n)
|
||||||
{
|
{
|
||||||
if (kbdmode != STOP) {
|
if (kbdmode != STOP) {
|
||||||
mlwrite("%%Macro already active");
|
mloutstr( "%Macro already active") ;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
mlwrite("(Start macro)");
|
mloutstr( "(Start macro)") ;
|
||||||
kbdptr = &kbdm[0];
|
kbdptr = &kbdm[0];
|
||||||
kbdend = kbdptr;
|
kbdend = kbdptr;
|
||||||
kbdmode = RECORD;
|
kbdmode = RECORD;
|
||||||
@ -105,11 +105,11 @@ int ctlxlp(int f, int n)
|
|||||||
int ctlxrp(int f, int n)
|
int ctlxrp(int f, int n)
|
||||||
{
|
{
|
||||||
if (kbdmode == STOP) {
|
if (kbdmode == STOP) {
|
||||||
mlwrite("%%Macro not active");
|
mloutstr( "%Macro not active") ;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (kbdmode == RECORD) {
|
if (kbdmode == RECORD) {
|
||||||
mlwrite("(End macro)");
|
mloutstr( "(End macro)") ;
|
||||||
kbdmode = STOP;
|
kbdmode = STOP;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -123,7 +123,7 @@ int ctlxrp(int f, int n)
|
|||||||
int ctlxe(int f, int n)
|
int ctlxe(int f, int n)
|
||||||
{
|
{
|
||||||
if (kbdmode != STOP) {
|
if (kbdmode != STOP) {
|
||||||
mlwrite("%%Macro already active");
|
mloutstr( "%Macro already active") ;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (n <= 0)
|
if (n <= 0)
|
||||||
|
2
file.c
2
file.c
@ -174,7 +174,7 @@ int set_encryption_key(int f, int n)
|
|||||||
strcpy(curbp->b_key, key);
|
strcpy(curbp->b_key, key);
|
||||||
cryptbufferkey( curbp) ;
|
cryptbufferkey( curbp) ;
|
||||||
|
|
||||||
mloutstr( " ") ; /* clear it off the bottom line */
|
mloutstr( "") ; /* clear the message line */
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
7
input.c
7
input.c
@ -54,6 +54,8 @@ int abortc = CONTROL | 'G' ; /* current abort command char */
|
|||||||
|
|
||||||
static const int quotec = 0x11 ; /* quote char during mlreply() */
|
static const int quotec = 0x11 ; /* quote char during mlreply() */
|
||||||
|
|
||||||
|
static void outstring( char *s) ;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Ask a yes or no question in the message line. Return either TRUE, FALSE, or
|
* Ask a yes or no question in the message line. Return either TRUE, FALSE, or
|
||||||
* ABORT. The ABORT status is returned if the user bumps out of the question
|
* ABORT. The ABORT status is returned if the user bumps out of the question
|
||||||
@ -740,12 +742,11 @@ int getstring( const char *prompt, char *buf, int nbuf, int eolchar)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* output a string of characters
|
* output a string of characters when display input is enabled
|
||||||
*
|
*
|
||||||
* char *s; string to output
|
* char *s; string to output
|
||||||
*/
|
*/
|
||||||
void outstring(char *s)
|
static void outstring( char *s) {
|
||||||
{
|
|
||||||
if( disinp)
|
if( disinp)
|
||||||
while( *s)
|
while( *s)
|
||||||
TTputc( *s++) ;
|
TTputc( *s++) ;
|
||||||
|
1
input.h
1
input.h
@ -30,7 +30,6 @@ int tgetc( void) ;
|
|||||||
int get1key( void) ;
|
int get1key( void) ;
|
||||||
int getcmd( void) ;
|
int getcmd( void) ;
|
||||||
int getstring( const char *prompt, char *buf, int nbuf, int eolchar) ;
|
int getstring( const char *prompt, char *buf, int nbuf, int eolchar) ;
|
||||||
void outstring( char *s) ;
|
|
||||||
void ostring( char *s) ;
|
void ostring( char *s) ;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
2
main.c
2
main.c
@ -375,7 +375,7 @@ int main(int argc, char **argv)
|
|||||||
#endif
|
#endif
|
||||||
/* if there is something on the command line, clear it */
|
/* if there is something on the command line, clear it */
|
||||||
if (mpresf != FALSE) {
|
if (mpresf != FALSE) {
|
||||||
mlerase();
|
mloutstr( "") ;
|
||||||
update(FALSE);
|
update(FALSE);
|
||||||
#if CLRMSG
|
#if CLRMSG
|
||||||
if (c == ' ') /* ITS EMACS does this */
|
if (c == ' ') /* ITS EMACS does this */
|
||||||
|
40
search.c
40
search.c
@ -216,7 +216,7 @@ int forwsearch(int f, int n)
|
|||||||
if (status == TRUE)
|
if (status == TRUE)
|
||||||
savematch();
|
savematch();
|
||||||
else
|
else
|
||||||
mlwrite("Not found");
|
mloutstr( "Not found") ;
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
@ -239,7 +239,7 @@ int forwhunt(int f, int n)
|
|||||||
* into MAGIC mode until after we entered the pattern.
|
* into MAGIC mode until after we entered the pattern.
|
||||||
*/
|
*/
|
||||||
if (pat[0] == '\0') {
|
if (pat[0] == '\0') {
|
||||||
mlwrite("No pattern set");
|
mloutstr( "No pattern set") ;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
#if MAGIC
|
#if MAGIC
|
||||||
@ -269,7 +269,7 @@ int forwhunt(int f, int n)
|
|||||||
if (status == TRUE)
|
if (status == TRUE)
|
||||||
savematch();
|
savematch();
|
||||||
else
|
else
|
||||||
mlwrite("Not found");
|
mloutstr( "Not found") ;
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
@ -317,7 +317,7 @@ int backsearch(int f, int n)
|
|||||||
if (status == TRUE)
|
if (status == TRUE)
|
||||||
savematch();
|
savematch();
|
||||||
else
|
else
|
||||||
mlwrite("Not found");
|
mloutstr( "Not found") ;
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
@ -341,7 +341,7 @@ int backhunt(int f, int n)
|
|||||||
* into MAGIC mode until after we entered the pattern.
|
* into MAGIC mode until after we entered the pattern.
|
||||||
*/
|
*/
|
||||||
if (tap[0] == '\0') {
|
if (tap[0] == '\0') {
|
||||||
mlwrite("No pattern set");
|
mloutstr( "No pattern set") ;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
#if MAGIC
|
#if MAGIC
|
||||||
@ -371,7 +371,7 @@ int backhunt(int f, int n)
|
|||||||
if (status == TRUE)
|
if (status == TRUE)
|
||||||
savematch();
|
savematch();
|
||||||
else
|
else
|
||||||
mlwrite("Not found");
|
mloutstr( "Not found") ;
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
@ -909,12 +909,12 @@ static int replaces(int kind, int f, int n)
|
|||||||
if (kind) {
|
if (kind) {
|
||||||
/* Get the query.
|
/* Get the query.
|
||||||
*/
|
*/
|
||||||
pprompt:mlwrite(&tpat[0], &pat[0],
|
pprompt:
|
||||||
&rpat[0]);
|
mloutfmt( &tpat[ 0], &pat[ 0], &rpat[ 0]) ;
|
||||||
qprompt:
|
qprompt:
|
||||||
update(TRUE); /* show the proposed place to change */
|
update(TRUE); /* show the proposed place to change */
|
||||||
c = tgetc(); /* and input */
|
c = tgetc(); /* and input */
|
||||||
mlwrite(""); /* and clear it */
|
mloutstr( "") ; /* and clear it */
|
||||||
|
|
||||||
/* And respond appropriately.
|
/* And respond appropriately.
|
||||||
*/
|
*/
|
||||||
@ -991,8 +991,8 @@ static int replaces(int kind, int f, int n)
|
|||||||
TTbeep();
|
TTbeep();
|
||||||
|
|
||||||
case '?': /* help me */
|
case '?': /* help me */
|
||||||
mlwrite
|
mloutstr(
|
||||||
("(Y)es, (N)o, (!)Do rest, (U)ndo last, (^G)Abort, (.)Abort back, (?)Help: ");
|
"(Y)es, (N)o, (!)Do rest, (U)ndo last, (^G)Abort, (.)Abort back, (?)Help: ") ;
|
||||||
goto qprompt;
|
goto qprompt;
|
||||||
|
|
||||||
} /* end of switch */
|
} /* end of switch */
|
||||||
@ -1020,7 +1020,7 @@ static int replaces(int kind, int f, int n)
|
|||||||
|
|
||||||
/* And report the results.
|
/* And report the results.
|
||||||
*/
|
*/
|
||||||
mlwrite("%d substitutions", numsub);
|
mloutfmt( "%d substitutions", numsub) ;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1040,7 +1040,7 @@ int delins(int dlength, char *instr, int use_meta)
|
|||||||
* and insert its replacement.
|
* and insert its replacement.
|
||||||
*/
|
*/
|
||||||
if ((status = ldelete((long) dlength, FALSE)) != TRUE)
|
if ((status = ldelete((long) dlength, FALSE)) != TRUE)
|
||||||
mlwrite("%%ERROR while deleting");
|
mloutstr( "%ERROR while deleting") ;
|
||||||
else
|
else
|
||||||
#if MAGIC
|
#if MAGIC
|
||||||
if ((rmagical && use_meta) &&
|
if ((rmagical && use_meta) &&
|
||||||
@ -1327,7 +1327,7 @@ static int rmcstr(void)
|
|||||||
rmcptr->mc_type = LITCHAR;
|
rmcptr->mc_type = LITCHAR;
|
||||||
if ((rmcptr->rstr =
|
if ((rmcptr->rstr =
|
||||||
malloc(mj + 1)) == NULL) {
|
malloc(mj + 1)) == NULL) {
|
||||||
mlwrite("%%Out of memory");
|
mloutstr( "%Out of memory") ;
|
||||||
status = FALSE;
|
status = FALSE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1348,7 +1348,7 @@ static int rmcstr(void)
|
|||||||
* current character.
|
* current character.
|
||||||
*/
|
*/
|
||||||
if ((rmcptr->rstr = malloc(mj + 2)) == NULL) {
|
if ((rmcptr->rstr = malloc(mj + 2)) == NULL) {
|
||||||
mlwrite("%%Out of memory");
|
mloutstr( "%Out of memory") ;
|
||||||
status = FALSE;
|
status = FALSE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1377,7 +1377,7 @@ static int rmcstr(void)
|
|||||||
if (rmagical && mj > 0) {
|
if (rmagical && mj > 0) {
|
||||||
rmcptr->mc_type = LITCHAR;
|
rmcptr->mc_type = LITCHAR;
|
||||||
if ((rmcptr->rstr = malloc(mj + 1)) == NULL) {
|
if ((rmcptr->rstr = malloc(mj + 1)) == NULL) {
|
||||||
mlwrite("%%Out of memory.");
|
mloutstr( "%Out of memory") ;
|
||||||
status = FALSE;
|
status = FALSE;
|
||||||
}
|
}
|
||||||
strncpy(rmcptr->rstr, patptr - mj, mj);
|
strncpy(rmcptr->rstr, patptr - mj, mj);
|
||||||
@ -1464,7 +1464,7 @@ static int mceq(int bc, struct magic *mt)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
mlwrite("mceq: what is %d?", mt->mc_type);
|
mloutfmt( "mceq: what is %d?", mt->mc_type) ;
|
||||||
result = FALSE;
|
result = FALSE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1486,7 +1486,7 @@ static int cclmake(char **ppatptr, struct magic *mcptr)
|
|||||||
int pchr, ochr;
|
int pchr, ochr;
|
||||||
|
|
||||||
if ((bmap = clearbits()) == NULL) {
|
if ((bmap = clearbits()) == NULL) {
|
||||||
mlwrite("%%Out of memory");
|
mloutstr( "%Out of memory") ;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1506,7 +1506,7 @@ static int cclmake(char **ppatptr, struct magic *mcptr)
|
|||||||
mcptr->mc_type = CCL;
|
mcptr->mc_type = CCL;
|
||||||
|
|
||||||
if ((ochr = *patptr) == MC_ECCL) {
|
if ((ochr = *patptr) == MC_ECCL) {
|
||||||
mlwrite("%%No characters in character class");
|
mloutstr( "%No characters in character class") ;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
} else {
|
} else {
|
||||||
if (ochr == MC_ESC)
|
if (ochr == MC_ESC)
|
||||||
@ -1547,7 +1547,7 @@ static int cclmake(char **ppatptr, struct magic *mcptr)
|
|||||||
*ppatptr = patptr;
|
*ppatptr = patptr;
|
||||||
|
|
||||||
if (ochr == '\0') {
|
if (ochr == '\0') {
|
||||||
mlwrite("%%Character class not ended");
|
mloutstr( "%Character class not ended") ;
|
||||||
free(bmap);
|
free(bmap);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user