Browse Source

bug fix, segfault caused by an ancient `editline' workaround

pre-master-46
rlar 16 years ago
parent
commit
02e4a4f32b
  1. 5
      ChangeLog
  2. 3
      src/main.c

5
ChangeLog

@ -1,3 +1,8 @@
2010-08-07 Robert Larice
* src/main.c :
bug fix, segfault caused by an ancient `editline' workaround
(bug tracker ID: 2966977, `segfault with editline')
2010-08-07 Robert Larice
* src/tclspice.c ,
* src/include/tclspice.h :

3
src/main.c

@ -450,13 +450,14 @@ prompt(void)
while (*s) {
switch (strip(*s)) {
case '!':
#ifdef HAVE_BSDEDITLINE
#if defined(HAVE_BSDEDITLINE) && 0
{
/* SJB In the present version of editline (v2.9)
it seems that where_history() is broken.
This is a hack that works round this problem.
WARNING: It may fail to work in the future
as it relies on undocumented structure */
/* some years later, it fails indeed, (v2.11 on debian) */
int where = 0;
HIST_ENTRY * he = current_history();
if(he!=NULL) where = *(int*)(he->data);

Loading…
Cancel
Save