1
0
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:
Renaud 2015-02-13 21:48:05 +08:00
parent bb44fc57ad
commit 703c472f0b
6 changed files with 38 additions and 38 deletions

View File

@ -32,10 +32,10 @@ int quickexit(int f, int n)
&& (bp->b_flag & BFTRUNC) == 0 /* Not truncated P.K. */
&& (bp->b_flag & BFINVS) == 0) { /* Real. */
curbp = bp; /* make that buffer cur */
mlwrite("(Saving %s)", bp->b_fname);
mloutfmt( "(Saving %s)", bp->b_fname) ;
#if PKCODE
#else
mlwrite("\n");
mloutstr( "\n") ;
#endif
if ((status = filesave(f, n)) != TRUE) {
curbp = oldcb; /* restore curbp */
@ -76,7 +76,7 @@ int quit(int f, int n)
else
exit( EXIT_SUCCESS) ;
}
mlwrite("");
mloutstr( "") ;
return s;
}
@ -88,10 +88,10 @@ int quit(int f, int n)
int ctlxlp(int f, int n)
{
if (kbdmode != STOP) {
mlwrite("%%Macro already active");
mloutstr( "%Macro already active") ;
return FALSE;
}
mlwrite("(Start macro)");
mloutstr( "(Start macro)") ;
kbdptr = &kbdm[0];
kbdend = kbdptr;
kbdmode = RECORD;
@ -105,11 +105,11 @@ int ctlxlp(int f, int n)
int ctlxrp(int f, int n)
{
if (kbdmode == STOP) {
mlwrite("%%Macro not active");
mloutstr( "%Macro not active") ;
return FALSE;
}
if (kbdmode == RECORD) {
mlwrite("(End macro)");
mloutstr( "(End macro)") ;
kbdmode = STOP;
}
return TRUE;
@ -123,7 +123,7 @@ int ctlxrp(int f, int n)
int ctlxe(int f, int n)
{
if (kbdmode != STOP) {
mlwrite("%%Macro already active");
mloutstr( "%Macro already active") ;
return FALSE;
}
if (n <= 0)

2
file.c
View File

@ -174,7 +174,7 @@ int set_encryption_key(int f, int n)
strcpy(curbp->b_key, key);
cryptbufferkey( curbp) ;
mloutstr( " ") ; /* clear it off the bottom line */
mloutstr( "") ; /* clear the message line */
return TRUE;
}

13
input.c
View File

@ -54,6 +54,8 @@ int abortc = CONTROL | 'G' ; /* current abort command char */
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
* ABORT. The ABORT status is returned if the user bumps out of the question
@ -740,15 +742,14 @@ 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
*/
void outstring(char *s)
{
if (disinp)
while (*s)
TTputc(*s++);
static void outstring( char *s) {
if( disinp)
while( *s)
TTputc( *s++) ;
}
/*

View File

@ -30,7 +30,6 @@ int tgetc( void) ;
int get1key( void) ;
int getcmd( void) ;
int getstring( const char *prompt, char *buf, int nbuf, int eolchar) ;
void outstring( char *s) ;
void ostring( char *s) ;
#endif

2
main.c
View File

@ -375,7 +375,7 @@ int main(int argc, char **argv)
#endif
/* if there is something on the command line, clear it */
if (mpresf != FALSE) {
mlerase();
mloutstr( "") ;
update(FALSE);
#if CLRMSG
if (c == ' ') /* ITS EMACS does this */

View File

@ -216,7 +216,7 @@ int forwsearch(int f, int n)
if (status == TRUE)
savematch();
else
mlwrite("Not found");
mloutstr( "Not found") ;
}
return status;
}
@ -239,7 +239,7 @@ int forwhunt(int f, int n)
* into MAGIC mode until after we entered the pattern.
*/
if (pat[0] == '\0') {
mlwrite("No pattern set");
mloutstr( "No pattern set") ;
return FALSE;
}
#if MAGIC
@ -269,7 +269,7 @@ int forwhunt(int f, int n)
if (status == TRUE)
savematch();
else
mlwrite("Not found");
mloutstr( "Not found") ;
return status;
}
@ -317,7 +317,7 @@ int backsearch(int f, int n)
if (status == TRUE)
savematch();
else
mlwrite("Not found");
mloutstr( "Not found") ;
}
return status;
}
@ -341,7 +341,7 @@ int backhunt(int f, int n)
* into MAGIC mode until after we entered the pattern.
*/
if (tap[0] == '\0') {
mlwrite("No pattern set");
mloutstr( "No pattern set") ;
return FALSE;
}
#if MAGIC
@ -371,7 +371,7 @@ int backhunt(int f, int n)
if (status == TRUE)
savematch();
else
mlwrite("Not found");
mloutstr( "Not found") ;
return status;
}
@ -909,12 +909,12 @@ static int replaces(int kind, int f, int n)
if (kind) {
/* Get the query.
*/
pprompt:mlwrite(&tpat[0], &pat[0],
&rpat[0]);
qprompt:
pprompt:
mloutfmt( &tpat[ 0], &pat[ 0], &rpat[ 0]) ;
qprompt:
update(TRUE); /* show the proposed place to change */
c = tgetc(); /* and input */
mlwrite(""); /* and clear it */
mloutstr( "") ; /* and clear it */
/* And respond appropriately.
*/
@ -991,8 +991,8 @@ static int replaces(int kind, int f, int n)
TTbeep();
case '?': /* help me */
mlwrite
("(Y)es, (N)o, (!)Do rest, (U)ndo last, (^G)Abort, (.)Abort back, (?)Help: ");
mloutstr(
"(Y)es, (N)o, (!)Do rest, (U)ndo last, (^G)Abort, (.)Abort back, (?)Help: ") ;
goto qprompt;
} /* end of switch */
@ -1020,7 +1020,7 @@ static int replaces(int kind, int f, int n)
/* And report the results.
*/
mlwrite("%d substitutions", numsub);
mloutfmt( "%d substitutions", numsub) ;
return TRUE;
}
@ -1040,7 +1040,7 @@ int delins(int dlength, char *instr, int use_meta)
* and insert its replacement.
*/
if ((status = ldelete((long) dlength, FALSE)) != TRUE)
mlwrite("%%ERROR while deleting");
mloutstr( "%ERROR while deleting") ;
else
#if MAGIC
if ((rmagical && use_meta) &&
@ -1327,7 +1327,7 @@ static int rmcstr(void)
rmcptr->mc_type = LITCHAR;
if ((rmcptr->rstr =
malloc(mj + 1)) == NULL) {
mlwrite("%%Out of memory");
mloutstr( "%Out of memory") ;
status = FALSE;
break;
}
@ -1348,7 +1348,7 @@ static int rmcstr(void)
* current character.
*/
if ((rmcptr->rstr = malloc(mj + 2)) == NULL) {
mlwrite("%%Out of memory");
mloutstr( "%Out of memory") ;
status = FALSE;
break;
}
@ -1377,7 +1377,7 @@ static int rmcstr(void)
if (rmagical && mj > 0) {
rmcptr->mc_type = LITCHAR;
if ((rmcptr->rstr = malloc(mj + 1)) == NULL) {
mlwrite("%%Out of memory.");
mloutstr( "%Out of memory") ;
status = FALSE;
}
strncpy(rmcptr->rstr, patptr - mj, mj);
@ -1464,7 +1464,7 @@ static int mceq(int bc, struct magic *mt)
break;
default:
mlwrite("mceq: what is %d?", mt->mc_type);
mloutfmt( "mceq: what is %d?", mt->mc_type) ;
result = FALSE;
break;
@ -1486,7 +1486,7 @@ static int cclmake(char **ppatptr, struct magic *mcptr)
int pchr, ochr;
if ((bmap = clearbits()) == NULL) {
mlwrite("%%Out of memory");
mloutstr( "%Out of memory") ;
return FALSE;
}
@ -1506,7 +1506,7 @@ static int cclmake(char **ppatptr, struct magic *mcptr)
mcptr->mc_type = CCL;
if ((ochr = *patptr) == MC_ECCL) {
mlwrite("%%No characters in character class");
mloutstr( "%No characters in character class") ;
return FALSE;
} else {
if (ochr == MC_ESC)
@ -1547,7 +1547,7 @@ static int cclmake(char **ppatptr, struct magic *mcptr)
*ppatptr = patptr;
if (ochr == '\0') {
mlwrite("%%Character class not ended");
mloutstr( "%Character class not ended") ;
free(bmap);
return FALSE;
}