--- libaitio/src/pty.c 2012/05/14 12:49:21 1.4 +++ libaitio/src/pty.c 2013/11/25 11:40:04 1.6 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: pty.c,v 1.4 2012/05/14 12:49:21 misho Exp $ +* $Id: pty.c,v 1.6 2013/11/25 11:40:04 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -12,7 +12,7 @@ terms: All of the documentation and software included in the ELWIX and AITNET Releases is copyrighted by ELWIX - Sofia/Bulgaria -Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 by Michael Pounov . All rights reserved. Redistribution and use in source and binary forms, with or without @@ -57,7 +57,7 @@ SUCH DAMAGE. * @winz = winsize for terminal * return: -1 error or 0 ok */ -inline int +int ioAllocPTY(int *ptyfd, int *ttyfd, char * __restrict name, int namesiz, struct termios * __restrict term, struct winsize * __restrict winz) { @@ -83,7 +83,7 @@ ioAllocPTY(int *ptyfd, int *ttyfd, char * __restrict n * @ttyname = tty filename * return: none */ -inline void +void ioFreePTY(int ptyfd, const char *ttyname) { assert(ttyname); @@ -92,7 +92,7 @@ ioFreePTY(int ptyfd, const char *ttyname) if (ptyfd != -1) close(ptyfd); - if (ttyname) { + if (*ttyname) { chown(ttyname, (uid_t) 0, (gid_t) 0); chmod(ttyname, (mode_t) 0666); } @@ -108,7 +108,7 @@ ioFreePTY(int ptyfd, const char *ttyname) * @ypxl = y pixels * return: -1 error or 0 ok */ -inline int +int ioChgWinPTY(int ptyfd, u_short row, u_short col, u_short xpxl, u_short ypxl) { struct winsize w; @@ -245,7 +245,7 @@ ioSetSidTTY(int *ttyfd, const char *ttyname) * @otio = saved old termios for later restore if !=NULL * return: -1 error or 0 ok */ -inline int +int ioSetRAWMode(int fd, struct termios *otio) { struct termios tio; @@ -285,7 +285,7 @@ ioSetRAWMode(int fd, struct termios *otio) * @tio = termios structure for restore * return: -1 error or 0 ok */ -inline int +int ioRestoreMode(int fd, struct termios tio) { if (tcsetattr(fd, TCSADRAIN, &tio) == -1) {