Shutdown of libedit

This commit is contained in:
Thomas Schmitt 2014-06-15 09:04:09 +00:00
parent ca46040007
commit 8bdb11fa23
4 changed files with 24 additions and 3 deletions

View File

@ -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);
}

View File

@ -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

View File

@ -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 */

View File

@ -1 +1 @@
#define Xorriso_timestamP "2014.06.14.192149"
#define Xorriso_timestamP "2014.06.15.090324"