home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / os / vms / 20143 < prev    next >
Encoding:
Internet Message Format  |  1992-12-31  |  1.6 KB

  1. Path: sparky!uunet!paladin.american.edu!gatech!usenet.ins.cwru.edu!agate!ucbvax!lrw.com!leichter
  2. From: leichter@lrw.com (Jerry Leichter)
  3. Newsgroups: comp.os.vms
  4. Subject: RE: More than 1 line of command history buffer
  5. Message-ID: <9212311252.AA06668@uu3.psi.com>
  6. Date: 31 Dec 92 11:52:46 GMT
  7. Sender: daemon@ucbvax.BERKELEY.EDU
  8. Distribution: world
  9. Organization: The Internet
  10. Lines: 30
  11.  
  12.  
  13.     I am reading a command line in my program, using C RTL function gets()
  14.     (I suspect that this just does a plain buffered read from the terminal
  15.     with NL as terminator, but I am not sure which VMS system function
  16.     this may be).
  17.  
  18. Well, ultimately perhaps - but it's a LONG way down the hierarchy to get
  19. there.
  20.  
  21.     I like to have the command line editing provided courtesy of VMS
  22.     system read procedure, and the fact that I can retrieve the previously
  23.     used command line using the up-arrow key; however, I am spoiled by the
  24.     DCL 20-line command history (and the readline library I am using on
  25.     Unix that remembers commands across login sessions).  Is there a
  26.     simple way to increase the command history list size, so that more
  27.     than one last command is remembered?
  28.  
  29.     Of course I could switch to unbuffered/raw read and do the line
  30.     editing and command line history myself, but I would rather not, if I
  31.     don't have to.
  32.  
  33. Use SMG$READ_COMPOSED_LINE.  You can use this function without using SMG to
  34. maintain your whole screen - you'll need to make a couple of auxiliary calls
  35. to create some basic SMG objects, but that's it.
  36.  
  37. (The only other alternative is to "roll your own", starting with the under-
  38. lying QIO calls.  This is MUCH messier than SMG$READ_COMPOSED_LINE.)
  39.  
  40.                             -- Jerry
  41.  
  42.