From 5fada4d1ac0a91a5c6bfdc7e7ba67a8dcaaa2b88 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Fri, 10 Oct 2008 13:41:07 +0000 Subject: [PATCH] Polishing multi-line dialog --- libisoburn/trunk/xorriso/xorriso.c | 20 ++++++++------------ libisoburn/trunk/xorriso/xorriso_timestamp.h | 2 +- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/libisoburn/trunk/xorriso/xorriso.c b/libisoburn/trunk/xorriso/xorriso.c index 2398ad0c..081521d3 100644 --- a/libisoburn/trunk/xorriso/xorriso.c +++ b/libisoburn/trunk/xorriso/xorriso.c @@ -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))) { diff --git a/libisoburn/trunk/xorriso/xorriso_timestamp.h b/libisoburn/trunk/xorriso/xorriso_timestamp.h index 493e0e90..418294a0 100644 --- a/libisoburn/trunk/xorriso/xorriso_timestamp.h +++ b/libisoburn/trunk/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2008.10.10.131102" +#define Xorriso_timestamP "2008.10.10.134020"