1 |
– |
/* Copyright (c) 1987 Regents of the University of California */ |
2 |
– |
|
1 |
|
#ifndef lint |
2 |
< |
static char SCCSid[] = "$SunId$ LBL"; |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
|
#endif |
6 |
– |
|
4 |
|
/* |
5 |
|
* tty.c - i/o for terminal drivers. |
9 |
– |
* |
10 |
– |
* 4/24/87 |
6 |
|
*/ |
7 |
|
|
8 |
+ |
#include "copyright.h" |
9 |
+ |
|
10 |
|
#include <stdio.h> |
11 |
|
#include <signal.h> |
12 |
|
#include <fcntl.h> |
78 |
|
|
79 |
|
|
80 |
|
static |
81 |
< |
ttyin(buf) /* read a line in raw mode */ |
82 |
< |
char *buf; |
81 |
> |
ttyin(buf, prompt) /* read a line in raw mode */ |
82 |
> |
char *buf, *prompt; |
83 |
|
{ |
84 |
|
int getch(); |
85 |
|
|
86 |
+ |
if (prompt != NULL) |
87 |
+ |
(*ttydev->comout)(prompt); |
88 |
|
editline(buf, getch, ttydev->comout); |
89 |
|
} |
90 |
|
|