[sac-dev] Several readline/libedit related fixes

Kuang He icrazy at gmail.com
Thu Sep 18 12:58:53 PDT 2008


Hi,

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
discussed.)
- some code cleanup

TODO:
- 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
Web: http://www.phys.uconn.edu/~he/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: readline-several-fixes.diff
Type: application/octet-stream
Size: 9448 bytes
Desc: not available
URL: <http://www.iris.washington.edu/pipermail/sac-dev/attachments/20080918/8cb40c38/attachment-0001.obj>


More information about the sac-dev mailing list