Polishing multi-line dialog

This commit is contained in:
Thomas Schmitt 2008-10-10 13:41:07 +00:00
parent 794895bec0
commit 5fada4d1ac
2 changed files with 9 additions and 13 deletions

View File

@ -3601,11 +3601,9 @@ get_single:;
if(l >= linesize - base_length - 1) {
strncpy(linept, cpt, linesize - 1);
line[sizeof(line)-1]= 0;
/* >>> Line overflow. Raise alert */;
/* <<< */
goto process_history;
sprintf(xorriso->info_text,"Input line too long !");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
goto new_empty;
} else
strcpy(linept, cpt);
}
@ -3628,9 +3626,10 @@ process_single:;
if(linept != line && strcmp(linept, "@@@") == 0) {
sprintf(xorriso->info_text, "Incomplete input line cleared by %s",
linept);
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE",0);
new_empty:;
line[0]= 0;
linept= line;
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE",0);
sprintf(xorriso->info_text, "-------------------------------------\n");
Xorriso_info(xorriso,0);
sprintf(xorriso->info_text, "Enter new text for empty input line :\n");
@ -3651,11 +3650,9 @@ process_single:;
if(ret == 0 && strlen(line) < linesize - 1 && !append_line) {
/* append a newline character */
if(l >= linesize - 1) {
/* >>> Line overflow. Raise alert */;
/* <<< */
goto process_history;
sprintf(xorriso->info_text,"Input line too long !");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
goto new_empty;
}
line[l]= '\n';
line[l + 1]= 0;
@ -3677,7 +3674,6 @@ process_single:;
#ifdef Xorriso_with_readlinE
process_history:;
if(line[0]!=0 && strcmp(last_input,line)!=0 && !(flag&1))
if(!((flag&4) &&
(strncmp(line,"-history:",9)==0 || strncmp(line,"-history ",9)==0))) {

View File

@ -1 +1 @@
#define Xorriso_timestamP "2008.10.10.131102"
#define Xorriso_timestamP "2008.10.10.134020"