From beaaa84fd0e7d42986a94208748065f685e9d6fe Mon Sep 17 00:00:00 2001 From: ps Date: Mon, 7 Jan 2002 20:37:09 +0000 Subject: Merge vendor changes onto mainline. --- contrib/less/main.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'contrib/less/main.c') diff --git a/contrib/less/main.c b/contrib/less/main.c index 9f5e1c3..d1a73a4 100644 --- a/contrib/less/main.c +++ b/contrib/less/main.c @@ -15,6 +15,9 @@ */ #include "less.h" +#if MSDOS_COMPILER==WIN32C +#include +#endif public char * every_first_cmd = NULL; public int new_file; @@ -44,10 +47,15 @@ public char * editproto; #endif #if TAGS +extern char * tags; extern char * tagoption; extern int jump_sline; #endif +#ifdef WIN32 +static char consoleTitle[256]; +#endif + extern int missing_cap; extern int know_dumb; @@ -96,6 +104,7 @@ main(argc, argv) putenv(env); } } + GetConsoleTitle(consoleTitle, sizeof(consoleTitle)/sizeof(char)); #endif /* WIN32 */ /* @@ -168,7 +177,7 @@ main(argc, argv) ifile = get_ifile(FAKE_HELPFILE, ifile); while (argc-- > 0) { -#if (MSDOS_COMPILER && MSDOS_COMPILER != DJGPPC) || OS2 +#if (MSDOS_COMPILER && MSDOS_COMPILER != DJGPPC) /* * Because the "shell" doesn't expand filename patterns, * treat each argument as a filename pattern rather than @@ -224,7 +233,7 @@ main(argc, argv) * Select the first file to examine. */ #if TAGS - if (tagoption != NULL) + if (tagoption != NULL || strcmp(tags, "-") == 0) { /* * A -t option was given. @@ -380,6 +389,9 @@ quit(status) */ close(2); #endif +#if WIN32 + SetConsoleTitle(consoleTitle); +#endif close_getchr(); exit(status); } -- cgit v1.1