diff options
author | phk <phk@FreeBSD.org> | 1996-09-15 19:35:23 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1996-09-15 19:35:23 +0000 |
commit | 6481546be07ad88b5a0c528b56b94f1a731fe758 (patch) | |
tree | 01f2551029875326d4d071582f1771d3e150bf43 /sys/i386 | |
parent | b4a90e5e8c433a9219f29edcaa158e49d1b4f4c6 (diff) | |
download | FreeBSD-src-6481546be07ad88b5a0c528b56b94f1a731fe758.zip FreeBSD-src-6481546be07ad88b5a0c528b56b94f1a731fe758.tar.gz |
Fix something that has annoyed me since day one of userconfig: when the
<More> prompt receives a 'q', just abandon the list, the user wants out.
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/userconfig.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/sys/i386/i386/userconfig.c b/sys/i386/i386/userconfig.c index 3532156..d1883da 100644 --- a/sys/i386/i386/userconfig.c +++ b/sys/i386/i386/userconfig.c @@ -46,7 +46,7 @@ ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF ** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** - ** $Id: userconfig.c,v 1.44 1996/09/11 19:53:45 phk Exp $ + ** $Id: userconfig.c,v 1.45 1996/09/13 06:48:21 bde Exp $ **/ /** @@ -119,13 +119,14 @@ static struct isa_device *isa_devlist; /* list read by dset to extract changes */ +#define putchar(x) cnputc(x) +#define getchar() cngetc() + #ifdef VISUAL_USERCONFIG static struct isa_device *devtabs[] = { isa_devtab_bio, isa_devtab_tty, isa_devtab_net, isa_devtab_null, NULL }; -#define putchar(x) cnputc(x) -#define getchar() cngetc() #ifndef FALSE @@ -2153,7 +2154,7 @@ visuserconfig(void) * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: userconfig.c,v 1.44 1996/09/11 19:53:45 phk Exp $ + * $Id: userconfig.c,v 1.45 1996/09/13 06:48:21 bde Exp $ */ #include "scbus.h" @@ -2496,7 +2497,10 @@ lsdevtab(struct isa_device *dt) if (lineno >= 23) { printf("<More> "); - (void)cngetc(); + if (getchar() == 'q') { + printf("quit\n"); + return; + } printf("\n"); lineno = 0; } @@ -2566,7 +2570,7 @@ cngets(char *input, int maxin) int c, nchars = 0; while (1) { - c = cngetc(); + c = getchar(); /* Treat ^H or ^? as backspace */ if ((c == '\010' || c == '\177')) { if (nchars) { |