HPMODESET v2.1
--------------

Copyright (C) Glenn Maughan 1995/1996

INSTALLATION
------------

The distribution includes a dynamically linked ELF binary.
Installation therefore is very simple.  Copy the binary to a
destination of your choice, such as /usr/local/bin:

	# cp hpmodeset /usr/local/bin/hpmodeset

The documentation is now in sgml format.  It is also preformatted in
PostScript and plain text in the doc directory.  You can format the
user guide using the linuxdoc-sgml package available at
sunsite.unc.edu.

Make sure the binary is executable: 

	# chown root.bin /usr/local/bin/hpmodeset
	# chmod 755 /usr/local/bin/hpmodeset

You must then set an environment variable to let hpmodeset know where
to read and store its configuration information (and other bits and
pieces).  Set the variable with:

In bash:

	$ export HPMODESETHOME="$HOME/.Hpmodeset"

or in csh/tcsh:

	$ setenv HPMODESETHOME "$HOME/.Hpmodeset

You may change the path to another existing directory.  The only
consideration is that hpmodeset must be able to write to the directory.

Once the directory is created copy the configuration file of your
choice to it:

	$ mkdir $HOME/.Hpmodeset
	$ cp config/config $HOME/.Hpmodeset
	$ chmod 644 $HOME/.Hpmodeset/config

You can find a number of sample config files in the config directory.
Choose the printer closest to your own.  Most of the files support two
or three printers.  Examine the comments at the top of the file to
determine the printers supported.

You are ready to go.  Hpmodeset will create to additional files in
that directory: the persistent store for the configuration and a
lexical analyser for reading configuration files.  (There may be other
files in the future also).  This form of configuration is not optimal
as each user needs to create the configuration directory and have a
local copy of the config file (This will be fixed in a later version).

COMPILATION
-----------

The full source of hpmodeset is now distributed.  It is dependent on a
number of libraries distributed with the Interactive Software
Engineering (ISE) Eiffel compiler v3.3.7.  However, it should not
matter which vendor's compiler is used to compile it.  Specifically,
the source relies heavily on the EiffelParse, EiffelLex and EiffelBase
(some parts that are not in the Kernel Specification) libraries.

You need to apply the EiffelParse.patch to the current ISE EiffelParse
libraries.  The best way to do this is to create a copy of the parse
libraries into src/extended_parse:

	$ cd src
	$ cp $EIFFEL3/library/parse/* extended_parse
	$ patch < extended_parse/EiffelParse.patch
	$ mv aggregate_one.e* extended_parse

Check for any rejects (*.rej).  If you have any you will have to apply
the patches by hand. You may clean up the directory if you want:

	$ rm extended_parse/*.orig

Then apply the supplied patch with:

	$ patch < eiffelparse.patch

Set up the environment variable to point to the source directory.  In bash:

	$ cd src
	$ export HPMODESET=`pwd`

Compilation is easy.  If you are using ISE Eiffel change to the source
finalise directory and perform a finalize:

	$ cd src/final
	$ es3 -finalize
	$ cd EIFGEN/F_code
	$ finish_freezing

If you are using another compiler you will have to follow the
procedures for that compiler.  You may have to modify the source to
fit the libraries you are using.  With the new Eiffel Kernel Library
Standard this will hopefully not be necessary either!

The executable resides in the file "src/final/EIFGEN/F_code/hpmodeset" after
compilation.  You can strip the executable using 'strip'.

MODIFYING
---------

I use GNU emacs and the Tower Eiffel eiffel-mode (available at
"http://www.cm.cf.ac.uk/Tower/").  Indentation is at 8 spaces per tab.
Set eiffel-mode with the following code in your .emacs file:
	
	; Set Eiffel modes
	(setq auto-mode-alist (cons '("\\.e$" . eiffel-mode) 
		auto-mode-alist))
	(autoload 'eiffel-mode "eiffel3" "Mode for Eiffel programs" t)
	(defun eiffel-minor-modes ()
		"Enables several minor modes for Eiffel"
		(interactive "")
		(setq eif-indent-increment 8))
	(add-hook 'eiffel-mode-hook 'eiffel-minor-modes)

If you modify the code, please use this mode and indentation settings.

TERMS AND CONDITIONS
--------------------

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
      
NOTES
-----

Make sure your lp filter supports PJL source.  ie. it should send
any PJL code directly to the printer without any modification.

Depending on the printer you are using you may not notice any
difference between the `economode' and `printquality' settings.  On
some printers the effect will be identical.

Hpmodeset can modify the default print environment using 'SET DEFAULT'
commands.  It is recommended that you disable this capability for
general users.  Most HP printers have a password that can be set to
restrict default changes to certain users (that know the password).
If you have a multi-user system and the password is not set then users
may modify your printer settings without you knowing!  (See
config/README for more details).

FEEDBACK
--------

Please send all bugs, suggestions and support to:

	Glenn Maughan
	glennm@insect.sd.monash.edu.au 

The home site for Hpmodeset is:

	ftp://hornet.sd.monash.edu.au/pub/hpmodeset

Also if you create a new config file for a different printer, please
send it to me.  I will add it to the config directory for
distribution.
