At least one argument is required.

This commit is contained in:
Ruslan Ermilov 2006-10-12 21:10:55 +00:00
parent b13b4f6ffd
commit 82a6e39b28
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=163283

View File

@ -81,6 +81,9 @@ main(int argc, char **argv)
argc -= optind;
argv += optind;
if (argc < 1)
usage();
if (!term && !(term = getenv("TERM")))
errx(2, "no terminal type specified and no TERM environmental variable.");
if (tgetent(tbuf, term) != 1)