summaryrefslogtreecommitdiffstats
path: root/gnu/libexec/uucp/tstuu.c
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/libexec/uucp/tstuu.c')
-rw-r--r--gnu/libexec/uucp/tstuu.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/gnu/libexec/uucp/tstuu.c b/gnu/libexec/uucp/tstuu.c
index 3f62975..a4ba862 100644
--- a/gnu/libexec/uucp/tstuu.c
+++ b/gnu/libexec/uucp/tstuu.c
@@ -1,7 +1,7 @@
/* tstuu.c
Test the uucp package on a UNIX system.
- Copyright (C) 1991, 1992, 1993, 1994 Ian Lance Taylor
+ Copyright (C) 1991, 1992, 1993, 1994, 1995 Ian Lance Taylor
This file is part of the Taylor UUCP package.
@@ -17,16 +17,16 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
The author of the program may be contacted at ian@airs.com or
- c/o Cygnus Support, Building 200, 1 Kendall Square, Cambridge, MA 02139.
+ c/o Cygnus Support, 48 Grove Street, Somerville, MA 02144.
*/
#include "uucp.h"
#if USE_RCS_ID
-const char tstuu_rcsid[] = "$Id: tstuu.c,v 1.2 1994/05/07 18:08:16 ache Exp $";
+const char tstuu_rcsid[] = "$Id: tstuu.c,v 1.86 1995/06/29 19:34:59 ian Rel $";
#endif
#include "sysdep.h"
@@ -187,7 +187,7 @@ struct sbuf
int cend;
char ab[BUFCHARS];
};
-
+
/* Local functions. */
static void umake_file P((const char *zfile, int cextra));
@@ -230,6 +230,12 @@ main (argc, argv)
char abpty2[sizeof "/dev/ptyp0"];
struct sbuf *qbuf1, *qbuf2;
+#if ! HAVE_TAYLOR_CONFIG
+ fprintf (stderr, "%s: only works when compiled with HAVE_TAYLOR_CONFIG\n",
+ argv[0]);
+ exit (1);
+#endif
+
zcmd1 = NULL;
zcmd2 = NULL;
zsys = "test2";
@@ -268,7 +274,7 @@ main (argc, argv)
break;
default:
fprintf (stderr,
- "Taylor UUCP %s, copyright (C) 1991, 1992, 1993, 1994 Ian Lance Taylor\n",
+ "Taylor UUCP %s, copyright (C) 1991, 92, 93, 94, 1995 Ian Lance Taylor\n",
VERSION);
fprintf (stderr,
"Usage: tstuu [-xn] [-t #] [-u] [-1 cmd] [-2 cmd]\n");
@@ -305,7 +311,7 @@ main (argc, argv)
{
int om, os;
FILE *e;
-
+
sprintf (zptyname, "/dev/pty%c%c", *zpty,
"0123456789abcdef"[ipty]);
om = open (zptyname, O_RDWR);
@@ -755,7 +761,7 @@ umake_file (z, c)
FILE *e;
e = xfopen (z, "w");
-
+
for (i = 0; i < 256; i++)
{
int i2;
@@ -1293,7 +1299,7 @@ cpshow (z, ichar)
sprintf (z, "%03o", (unsigned int)(ichar & 0xff));
return strlen (z) + 1;
}
-}
+}
/* Pick one of two file descriptors which is ready for reading, or
return in five seconds. If the argument is ready for reading,
@@ -1345,7 +1351,7 @@ uchoose (po1, po2)
if ((as[0].revents & POLLIN) == 0)
*po1 = -1;
-
+
if ((as[1].revents & POLLIN) == 0)
*po2 = -1;
@@ -1388,7 +1394,7 @@ cread (o, pqbuf)
(*pqbuf)->cstart = 0;
(*pqbuf)->cend = 0;
}
-
+
cgot = read (o, (*pqbuf)->ab + (*pqbuf)->cend,
(sizeof (*pqbuf)->ab) - (*pqbuf)->cend);
if (cgot < 0)
@@ -1515,7 +1521,7 @@ fsend (o, oslave, pqbuf)
uchild (SIGCHLD);
}
}
-
+
if (cwrote == 0)
break;
OpenPOWER on IntegriCloud