diff --git a/xorriso/lib_mgt.c b/xorriso/lib_mgt.c index d6214573..4843c045 100644 --- a/xorriso/lib_mgt.c +++ b/xorriso/lib_mgt.c @@ -255,6 +255,11 @@ int Xorriso_detach_libraries(struct XorrisO *xorriso, int flag) if(xorriso->libs_are_started==0) return(0); isoburn_finish(); + +#ifdef Xorriso_with_editlinE + Xorriso__shutdown_editline(0); +#endif + } return(1); } diff --git a/xorriso/text_io.c b/xorriso/text_io.c index 41866ae5..1c89cfca 100644 --- a/xorriso/text_io.c +++ b/xorriso/text_io.c @@ -73,6 +73,7 @@ static EditLine *editline_handle= NULL; static History *editline_history= NULL; static int editline_is_initialized= 0; + char *Xorriso__editline_prompt(EditLine *el_handle) { return ""; @@ -101,12 +102,23 @@ void Xorriso_init_editline(struct XorrisO *xorriso, int flag) history(editline_history, &ev, H_SETSIZE, 1000); el_set(editline_handle, EL_HIST, history, editline_history); - /* >>> ??? where to apply history_end() and el_end() ? */; - editline_is_initialized= 1; /* Valid now */ return; } + +int Xorriso__shutdown_editline(int flag) +{ + if(editline_history != NULL) + history_end(editline_history); + editline_history= NULL; + if(editline_handle != NULL) + el_end(editline_handle); + editline_handle= NULL; + editline_is_initialized= 0; + return(1); +} + #endif /* Xorriso_with_editlinE */ #ifdef Xorriso_with_line_editoR diff --git a/xorriso/text_io.h b/xorriso/text_io.h index e8c27db9..48e96a6e 100644 --- a/xorriso/text_io.h +++ b/xorriso/text_io.h @@ -105,5 +105,9 @@ int Xorriso_named_pipe_loop(struct XorrisO *xorriso, char *Xorriso_esc_filepath(struct XorrisO *xorriso, char *in_text, char *out_text, int flag); +#ifdef Xorriso_with_editlinE +int Xorriso__shutdown_editline(int flag); +#endif + #endif /* ! Xorriso_pvt_textio_includeD */ diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 9dfbd048..d97ccc80 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2014.06.14.192149" +#define Xorriso_timestamP "2014.06.15.090324"