summaryrefslogtreecommitdiffstats
path: root/contrib/ncurses/progs/toe.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ncurses/progs/toe.c')
-rw-r--r--contrib/ncurses/progs/toe.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/contrib/ncurses/progs/toe.c b/contrib/ncurses/progs/toe.c
index afdf379..b7afb67 100644
--- a/contrib/ncurses/progs/toe.c
+++ b/contrib/ncurses/progs/toe.c
@@ -43,7 +43,7 @@
#include <dump_entry.h>
#include <term_entry.h>
-MODULE_ID("$Id: toe.c,v 1.22 2000/03/11 21:47:35 tom Exp $")
+MODULE_ID("$Id: toe.c,v 1.24 2000/09/09 19:52:35 tom Exp $")
#define isDotname(name) (!strcmp(name, ".") || !strcmp(name, ".."))
@@ -87,10 +87,7 @@ main(int argc, char *argv[])
int i, c;
int code;
- if ((_nc_progname = strrchr(argv[0], '/')) == 0)
- _nc_progname = argv[0];
- else
- _nc_progname++;
+ _nc_progname = _nc_basename(argv[0]);
while ((c = getopt(argc, argv, "huv:UV")) != EOF)
switch (c) {
@@ -107,8 +104,7 @@ main(int argc, char *argv[])
invert_dependencies = TRUE;
break;
case 'V':
- (void) fputs(NCURSES_VERSION, stdout);
- putchar('\n');
+ puts(curses_version());
ExitProgram(EXIT_SUCCESS);
default:
(void) fprintf(stderr, "usage: toe [-huUV] [-v n] [file...]\n");
@@ -191,7 +187,7 @@ main(int argc, char *argv[])
if ((eargv[j] = get_directory(personal)) != 0)
j++;
}
- if ((eargv[j] = get_directory(TERMINFO)) != 0)
+ if ((eargv[j] = get_directory(strcpy(personal, TERMINFO))) != 0)
j++;
}
eargv[j] = 0;
OpenPOWER on IntegriCloud