X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=childio.c;h=0cb4dc149e08c3c119872ec9ba8b2b8541fd40e0;hb=6d2eb06e7ad56484b364a517cea83c85919f2bd8;hp=6f35b8c1ef6f7e72cbb19d6a1dcd51bf7ace7b55;hpb=b382d988c6f886f3a49483df9e3e36de0b6b0824;p=xboard.git diff --git a/childio.c b/childio.c index 6f35b8c..0cb4dc1 100644 --- a/childio.c +++ b/childio.c @@ -5,7 +5,7 @@ * Massachusetts. * * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006, - * 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. + * 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. * * The following terms apply to Digital Equipment Corporation's copyright * interest in XBoard: @@ -59,6 +59,7 @@ #include "config.h" +#include #include #if HAVE_UNISTD_H # include @@ -71,8 +72,8 @@ #if !USE_PTYS /* This code is for systems where pipes work properly */ -void SetUpChildIO(to_prog, from_prog) - int to_prog[2], from_prog[2]; +void +SetUpChildIO (int to_prog[2], int from_prog[2]) { signal(SIGPIPE, SIG_IGN); pipe(to_prog); @@ -98,8 +99,8 @@ void SetUpChildIO(to_prog, from_prog) int PseudoTTY P((char pty_name[])); -int SetUpChildIO(to_prog, from_prog) - int to_prog[2], from_prog[2]; +int +SetUpChildIO (int to_prog[2], int from_prog[2]) { char pty_name[MSG_SIZ]; @@ -126,8 +127,8 @@ int SetUpChildIO(to_prog, from_prog) #if HAVE_GRANTPT /* This code is for SVR4 */ -int PseudoTTY(pty_name) - char pty_name[]; +int +PseudoTTY (char pty_name[]) { extern char *ptsname(); char *ptss; @@ -146,8 +147,8 @@ int PseudoTTY(pty_name) #if HAVE__GETPTY /* This code is for IRIX */ -int PseudoTTY(pty_name) - char pty_name[]; +int +PseudoTTY (char pty_name[]) { int fd; char *ptyn; @@ -162,8 +163,8 @@ int PseudoTTY(pty_name) #if HAVE_LIBSEQ /* This code is for Sequent DYNIX/ptx. Untested. --tpm */ -int PseudoTTY(pty_name) - char pty_name[]; +int +PseudoTTY (char pty_name[]) { int fd; char *slave, *master; @@ -185,8 +186,8 @@ int PseudoTTY(pty_name) #define LAST_PTY_LETTER 'z' #endif -int PseudoTTY(pty_name) - char pty_name[]; +int +PseudoTTY (char pty_name[]) { struct stat stb; register c, i;