| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| ReadMe.txt.txt | 2012-09-20 | 1.8 kB | |
| readpassphrase.zip | 2012-09-20 | 11.8 kB | |
| Totals: 2 Items | 13.6 kB | 0 | |
A collection of assorted Unixy input functions for OpenVMS. The core functionality is provided by readpassphrase(), which has the same interface as Todd Miller's OpenBSD code but is completely reimplemented using native services. It supplies one non-standard flag, RPP_TIMEOUT_OFF, which, if set, causes readpassphrase to wait indefinitely for input.
N.B. The line editing capabilities are VMS-style, not Unix-style, so they will be familiar to DCL users, but not to GNU readline users.
There are simple getpass() and readline() implementations wrapped around readpassphrase(), the main difference being that getpass() suppresses echoing whereas readline() enables echoing and suppresses timeouts.
There is also an add_history() stub which does nothing except return because echoed lines are already stored in the command recall buffer by SMG$READ_COMPOSED_LINE. The readline implementation is very incomplete but should be suitable for cases that use relatively few non-default options.
readpassphrase() is required to use either getpass() or readline(), but the latter two functions are optional and independent of each other. To use only readpassphrase, you need only:
readpassphrase.c
readpassphrase.h
To use getpass you need, in addition to the above:
getpass.c
getpass.h
To use readline you need, in addition to the readpassphrase files:
readline.c
[.readline]readline.h
[.readline]history.h
There are no build procedures provided, the assumption being that these routines will be incorporated in other packages. There are simple public domain examples of getpass and readline included if you want to test things out.
The code is released under the MIT license and contributed by Craig A. Berry.