From 9bfb9eedcddf3ab4e79532e863cf16c5ff381090 Mon Sep 17 00:00:00 2001 From: sheldonh Date: Thu, 26 Jul 2001 11:02:39 +0000 Subject: Use STD{ERR,IN,OUT}_FILENO instead of their numeric values. The definitions are more readable, and it's possible that they're more portable to pathalogical platforms. Submitted by: David Hill --- usr.bin/vgrind/vgrindefs.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'usr.bin/vgrind/vgrindefs.c') diff --git a/usr.bin/vgrind/vgrindefs.c b/usr.bin/vgrind/vgrindefs.c index 23f06bd..2839d1f 100644 --- a/usr.bin/vgrind/vgrindefs.c +++ b/usr.bin/vgrind/vgrindefs.c @@ -32,13 +32,16 @@ */ #ifndef lint -static char sccsid[] = "@(#)vgrindefs.c 8.1 (Berkeley) 6/6/93"; -#endif /* not lint */ +static const char rcsid[] = + "$FreeBSD$"; +#endif #define BUFSIZ 1024 #define MAXHOP 32 /* max number of tc= indirections */ #include +#include + /* * grindcap - routines for dealing with the language definitions data base * (code stolen almost totally from termcap) @@ -103,7 +106,7 @@ tgetent(bp, name, file) break; } if (cp >= bp+BUFSIZ) { - write(2,"Vgrind entry too long\n", 23); + write(STDERR_FILENO, "Vgrind entry too long\n", 23); break; } else *cp++ = c; @@ -138,7 +141,7 @@ tnchktc() p = tbuf + strlen(tbuf) - 2; /* before the last colon */ while (*--p != ':') if (p MAXHOP) { - write(2, "Infinite tc= loop\n", 18); + write(STDERR_FILENO, "Infinite tc= loop\n", 18); return (0); } if (tgetent(tcbuf, tcname, filename) != 1) @@ -160,7 +163,7 @@ tnchktc() ; l = p - holdtbuf + strlen(q); if (l > BUFSIZ) { - write(2, "Vgrind entry too long\n", 23); + write(STDERR_FILENO, "Vgrind entry too long\n", 23); q[BUFSIZ - (p-tbuf)] = 0; } strcpy(p, q+1); -- cgit v1.1