From af0283385cb9108f00f94790522cf0aba8b1069d Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Tue, 25 Oct 2005 14:18:00 +0000 Subject: Make many functions static. Rename rtems_telnetd_maximum_ptys to rtems_pty_maximum_ptys. --- cpukit/telnetd/pty.c | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) (limited to 'cpukit/telnetd') diff --git a/cpukit/telnetd/pty.c b/cpukit/telnetd/pty.c index 38aa0a1c97..ae608929da 100644 --- a/cpukit/telnetd/pty.c +++ b/cpukit/telnetd/pty.c @@ -57,19 +57,20 @@ typedef struct { } pty_t; -int ptys_initted=FALSE; -pty_t *ptys; -int rtems_telnetd_maximum_ptys; +static int ptys_initted=FALSE; +static pty_t *ptys; -/* This procedure returns the devname for a pty slot free. - * If not slot availiable (field socket>=0) - * then the socket argument is closed +size_t rtems_pty_maximum_ptys; + +/* This procedure returns the devname for a free pty slot. + * If no slot available (field socket>=0) + * then the socket argument is closed */ -char * get_pty(int socket) { +char * rtems_pty_get(int socket) { int ndx; if (!ptys_initted) return NULL; - for (ndx=0;ndxc_cflag; } else { return -1; @@ -215,7 +216,7 @@ static int ptyPollInitialize(int major,int minor,void * arg) { rtems_libio_open_close_args_t * args = arg; struct termios t; - if (minoriop->data1; @@ -228,7 +229,7 @@ ptyPollInitialize(int major,int minor,void * arg) { /*-----------------------------------------------------------*/ static int ptyShutdown(int major,int minor,void * arg) { - if (minor=0) close(ptys[minor].socket); ptys[minor].socket=-1; @@ -244,7 +245,7 @@ ptyShutdown(int major,int minor,void * arg) { static int ptyPollWrite(int minor, const char * buf,int len) { int count; - if (minor