mirror of
https://github.com/freebsd/freebsd-src
synced 2024-11-05 18:22:52 +00:00
Move the code providing the equivalent of ICRNL for console input from
the device driver(s) to cons.c.
This commit is contained in:
parent
bf67b544a2
commit
00e82d39d7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=5160
5 changed files with 13 additions and 10 deletions
|
@ -35,7 +35,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: syscons.c,v 1.80 1994/11/21 17:59:29 ache Exp $
|
||||
* $Id: syscons.c,v 1.81 1994/12/06 19:32:00 sos Exp $
|
||||
*/
|
||||
|
||||
#include "sc.h"
|
||||
|
@ -1229,7 +1229,6 @@ pccngetc(dev_t dev)
|
|||
int s = spltty(); /* block scintr while we poll */
|
||||
int c = scgetc(0);
|
||||
splx(s);
|
||||
if (c == '\r') c = '\n';
|
||||
return(c);
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)cons.c 7.2 (Berkeley) 5/9/91
|
||||
* $Id: cons.c,v 1.16 1994/10/20 00:07:45 phk Exp $
|
||||
* $Id: cons.c,v 1.17 1994/10/31 17:20:14 joerg Exp $
|
||||
*/
|
||||
|
||||
|
||||
|
@ -213,9 +213,12 @@ cnselect(dev, rw, p)
|
|||
int
|
||||
cngetc()
|
||||
{
|
||||
int c;
|
||||
if (cn_tab == NULL)
|
||||
return (0);
|
||||
return ((*cn_tab->cn_getc)(cn_tab->cn_dev));
|
||||
c = (*cn_tab->cn_getc)(cn_tab->cn_dev);
|
||||
if (c == '\r') c = '\n'; /* console input is always ICRNL */
|
||||
return (c);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: syscons.c,v 1.80 1994/11/21 17:59:29 ache Exp $
|
||||
* $Id: syscons.c,v 1.81 1994/12/06 19:32:00 sos Exp $
|
||||
*/
|
||||
|
||||
#include "sc.h"
|
||||
|
@ -1229,7 +1229,6 @@ pccngetc(dev_t dev)
|
|||
int s = spltty(); /* block scintr while we poll */
|
||||
int c = scgetc(0);
|
||||
splx(s);
|
||||
if (c == '\r') c = '\n';
|
||||
return(c);
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: syscons.c,v 1.80 1994/11/21 17:59:29 ache Exp $
|
||||
* $Id: syscons.c,v 1.81 1994/12/06 19:32:00 sos Exp $
|
||||
*/
|
||||
|
||||
#include "sc.h"
|
||||
|
@ -1229,7 +1229,6 @@ pccngetc(dev_t dev)
|
|||
int s = spltty(); /* block scintr while we poll */
|
||||
int c = scgetc(0);
|
||||
splx(s);
|
||||
if (c == '\r') c = '\n';
|
||||
return(c);
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)cons.c 7.2 (Berkeley) 5/9/91
|
||||
* $Id: cons.c,v 1.16 1994/10/20 00:07:45 phk Exp $
|
||||
* $Id: cons.c,v 1.17 1994/10/31 17:20:14 joerg Exp $
|
||||
*/
|
||||
|
||||
|
||||
|
@ -213,9 +213,12 @@ cnselect(dev, rw, p)
|
|||
int
|
||||
cngetc()
|
||||
{
|
||||
int c;
|
||||
if (cn_tab == NULL)
|
||||
return (0);
|
||||
return ((*cn_tab->cn_getc)(cn_tab->cn_dev));
|
||||
c = (*cn_tab->cn_getc)(cn_tab->cn_dev);
|
||||
if (c == '\r') c = '\n'; /* console input is always ICRNL */
|
||||
return (c);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
Loading…
Reference in a new issue