X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=childio.c;h=1d1f1a7999a54a1bb0be5e064896a0e7286327c7;hb=95244a1c40718e9ad8bda9e2df66677e180354d6;hp=53edee745d43650aaddefb751f46d0e54e8fecba;hpb=e70077aab0199817f37aef9ed0bdba1bbca93b45;p=xboard.git diff --git a/childio.c b/childio.c index 53edee7..1d1f1a7 100644 --- a/childio.c +++ b/childio.c @@ -1,11 +1,12 @@ /* - * childio.c -- set up communication with child processes + * childio.c -- set up communication with child processes * * Copyright 1991 by Digital Equipment Corporation, Maynard, - * Massachusetts. + * Massachusetts. * * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006, - * 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. + * 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Free + * Software Foundation, Inc. * * The following terms apply to Digital Equipment Corporation's copyright * interest in XBoard: @@ -72,8 +73,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); @@ -99,8 +100,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]; @@ -127,13 +128,13 @@ 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; int fd; - + fd = open("/dev/ptmx", O_RDWR); if (fd < 0) return fd; if (grantpt(fd) == -1) return -1; @@ -147,8 +148,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; @@ -163,8 +164,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; @@ -186,8 +187,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;