[Simh] Shiny new readline hack and new Makefile

Philipp Hachtmann hachti at hachti.de
Fri Sep 19 11:15:27 EDT 2008


Hi everybody,

I have written a new readline hack for SIMH. It consists of two files,
sim_readline.c and sim_readline.h, which are used from scp.c.
scp.c has been adapted so that it includes the readline support.
The two other files can be uncoditionally linked to the rest of the 
program, as everything is jailed in "#ifdef HAVE_READLINE" statements.

The new Makefile has HAVE_READLINE on by default on Linux systems.

You need the libreadline-dev package on your machine to build with 
readline support. Should be installed on most machines with slight 
development support.

Current features:
- Persistent history in ~/.simh_history
             or (if no $HOME set) ./.simh_history

I'm still thinking about custom tab completion. At the moment, the 
command line only completes file names.
It could be considered to use one history file for each simulator,
like .pdp8_history, .vax_history etc.

The archive:
http://hachti.de/simh/readline-hack-08091901.zip

Makefile - New Makefile according to Makefile discussion
sim_readline.c - Readline encapsulating functions
sim_readline.h - Header file
scp.c          - Enhanced scp.c

Everything should work with the original source structure and directory 
names.

- Unzip simhv38.zip and then readline-hack-08091901.zip
- Delete or rename makefile, or call make with "-f Makefile"
- run "make help" or "make -f Makefile help"

Compare build times of the Makefiles after a "touch scp.c"
or a "touch H316/h316_cpu.c".
Try out "make -jx" on your multiprocessor machine with x=number of CPUs 
in your system.


Best wishes,

Philipp :-)

-- 
http://www.hachti.de



More information about the Simh mailing list