home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1740 / README < prev    next >
Encoding:
Text File  |  1990-12-28  |  4.1 KB  |  99 lines

  1. $Id: README,v 2.5 90/08/26 11:31:46 sw Exp $
  2.  
  3. This is a line discipline that implements input history management.  It
  4. was written originally by Lyle Rains of Atari for RT-11, ported by Dave
  5. Sheppard of Atari to Xenix/386, and ported by Piercarlo Grandi to System
  6. V/386 3.2, as well as _much_ cleaned up and modified.
  7.  
  8. This README file has been written entirely by Piercarlo Grandi, and so
  9. are all the comments herein.
  10.  
  11. First of all, while I think this is a very useful driver, and though I
  12. have struggled a lot to make it more like I would have done it, I have
  13. not substantially changed it, even if there are a series of things that
  14. I would have done very differently.
  15.  
  16. The current advantages of CLED are:
  17.  
  18.     * It is fully kernel resident, and will keep in the history buffer
  19.     all input, by whatever program.  There is no need to add an
  20.     inefficient raw or cbreak mode library to each program or to hack
  21.     with ptys to have history processing.
  22.  
  23.     * It is quite fast, and surely has less overhead than other input
  24.     history mechanisms.
  25.  
  26.     * It can be easily ported to different types of UNIX, and will work
  27.     virtually unchanged on any System V (or V7) derivative.
  28.  
  29.     * It will get out of the way when not needed, e.g.  for raw or
  30.     cbreak input.
  31.  
  32.     * It is free.
  33.  
  34. The disadvantages are:
  35.  
  36.     * The history mechanism is pretty simple; there are no pattern
  37.     searches, for example.  This is probably a feature.
  38.  
  39.     * It occupies wired down kernel space.  This is probably a feature,
  40.     because any other interactive history mechanism would probably cost
  41.     vastly more in both space and time overheads.
  42.  
  43.     * It is not easily extensible, as it is linked with the kernel.
  44.     Again, this is probably a feature.
  45.  
  46.     * There is no command or file name completion.  This can be
  47.     efficiently implemented by any interested program on top of CLED by
  48.     using the VEOL2 character as trigger.
  49.  
  50. There are some things that I would have done differently:
  51.  
  52.     * Design and coding are often quite opaque, and source and object
  53.     sizes too large (4000 lines!).  Cleverer design and coding would
  54.     probably shrink both substantially.
  55.  
  56.     * CLED is piggybacked onto line discipline 0; it should be
  57.     standalone, to allow for getting rid of the standard line discipline
  58.     completely.
  59.  
  60.     * Buffers should have been stolen from the buffer cache, instead of
  61.     statically allocated (sptalloc() is no help because of its
  62.     impossibly large granularity).
  63.  
  64.     * Currently when the user logs out the history is not cleared,
  65.     because technically the tty device is not closed.  This is a
  66.     security hazard, even if not as bad as it looks, because CLED
  67.     disables itself during not echoed or raw input, so that passwords
  68.     are not recorded (passwords passed as arguments to a command are a
  69.     security hazard anyhow).
  70.  
  71.     * Saving, resetting, and restoring the current history buffer should
  72.     therefore become better supported.
  73.  
  74.     * The ioctl(2) codes should allow setting key bindings and terminal
  75.     capabilities independently.  In general the ioctl(2) interface is
  76.     quite clumsy.
  77.  
  78.     * The scled(1) command should be completely rewritten.
  79.  
  80. There are also a few known problems, but they are usually not mistakes
  81. but rather compromises (e.g.  when inserting tabs in the middle of the
  82. line, the check on line length is circumvented).  Surely there are also
  83. lots of real bugs.
  84.  
  85. To install CLED, have a look at the "Makefile" (should be ok on most any
  86. UNIX), and at files "cled.h" and "space.c".  It is suggested that you do
  87. not change the configuration options at the top of "cled.h"; not only I
  88. have not tested other configurations, but enabling the most
  89. sophisticated options of CLED substantially enlarges it.  In particular,
  90. unless you know better, do not enable SPTALLOC.
  91.  
  92. As to the buffer sizes, I think the ones given are OK for most anybody;
  93. note that CLED will not allow you to type a line longer than the current
  94. screen size, so the MAXLINE parameter is really the maximum number of
  95. columns on a terminal, and 132 is therefore sufficient.  As to
  96. MAXPROMPT, I hope you do not use garish long prompts...  In any case
  97. this is the number of characters remembered in the prompt, not its
  98. maximum size.
  99.