diff options
author | Paul Saab <ps@FreeBSD.org> | 2002-01-07 20:37:09 +0000 |
---|---|---|
committer | Paul Saab <ps@FreeBSD.org> | 2002-01-07 20:37:09 +0000 |
commit | 8fd4165cc499e9e16013a1fcff66055739e5075f (patch) | |
tree | 20612717e5ecd1a4dbd5dd8b2498580eaaeb1fee /contrib/less/main.c | |
parent | 5e27b2f5a3cba46da00cfadf08ca162cdd498560 (diff) | |
download | src-8fd4165cc499e9e16013a1fcff66055739e5075f.tar.gz src-8fd4165cc499e9e16013a1fcff66055739e5075f.zip |
Merge vendor changes onto mainline.
Notes
Notes:
svn path=/head/; revision=89022
Diffstat (limited to 'contrib/less/main.c')
-rw-r--r-- | contrib/less/main.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/contrib/less/main.c b/contrib/less/main.c index 9f5e1c3d491a..d1a73a405865 100644 --- a/contrib/less/main.c +++ b/contrib/less/main.c @@ -15,6 +15,9 @@ */ #include "less.h" +#if MSDOS_COMPILER==WIN32C +#include <windows.h> +#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); } |