Browse Source

Shutdown of libedit

master
Thomas Schmitt 8 years ago
parent
commit
8bdb11fa23
  1. 5
      xorriso/lib_mgt.c
  2. 16
      xorriso/text_io.c
  3. 4
      xorriso/text_io.h
  4. 2
      xorriso/xorriso_timestamp.h

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

16
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

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

2
xorriso/xorriso_timestamp.h

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

Loading…
Cancel
Save