Thread: Several readline/libedit related fixes

Started: 2008-09-18 22:58:53
Last activity: 2008-09-18 22:58:53
Topics: SAC Developers
Kuang He
2008-09-18 22:58:53

I've developed a patch for the readline/libedit related codes. It
includes the following:

- Fix: SAC with readline cannot read commands from STDIN (sac < macro_file)
- Fix: for SAC compiled with either libedit or readline, when reading
commands from STDIN, the command history gets truncated when SAC exits
- When not using interactive mode (sac < macro_file), do not show the
copyright information. (This is my idea, following the practice of
some other popular software packages such as ``bc'', but this can be
- some code cleanup

- We need a way to tell if we are using readline or libedit (rightnow,
macro READLINE only tells us that we are using one of them, but does
not differentiate which one), since on some occasions, the
implementations using the two libraries do differ. For example, we
need to

#include <readline/readline.h>
#include <readline/history.h>

when using readline, but we only need to include the first header file
when using libedit.

- File src/mat/engineCall2.c implicitly assumes that READLINE is
defined, but we still need to wrap up the related code using #ifdef
READLINE ... #endif

By the way, the attached patch is a combination of several smaller
changes in my system, so I can break them up into smaller patches if
that is preferred.

Best regards,

Kuang He
Department of Physics
University of Connecticut
Storrs, CT 06269-3046

Tel: +1.860.486.4919

07:20:51 v.28f29ea9