diff options
-rw-r--r-- | usr.bin/ul/ul.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/ul/ul.c b/usr.bin/ul/ul.c index 84190841e20..b806688ec04 100644 --- a/usr.bin/ul/ul.c +++ b/usr.bin/ul/ul.c @@ -47,6 +47,8 @@ static char rcsid[] = "$NetBSD: ul.c,v 1.3 1994/12/07 00:28:24 jtc Exp $"; #endif /* not lint */ #include <stdio.h> +#include <stdlib.h> +#include <string.h> #define IESC '\033' #define SO '\016' @@ -93,7 +95,6 @@ main(argc, argv) char *termtype; FILE *f; char termcap[1024]; - char *getenv(), *strcpy(); termtype = getenv("TERM"); if (termtype == NULL || (argv[0][0] == 'c' && !isatty(1))) @@ -142,8 +143,10 @@ main(argc, argv) if (f == NULL) { perror(argv[optind]); exit(1); - } else - filter(f); + } + + filter(f); + fclose(f); } exit(0); } |