From b6510ccdcddaa82e379a3f3305902b5741c1eaa6 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 9 Jun 2011 21:20:27 +0000 Subject: [PATCH] * child_info.h (CURR_CHILD_INFO_MAGIC): Reset. (child_info::old_title): Delete. (child_info::~child_info_spawn): Remove recording of old_title. * dcrt0.cc (title_buf): Delete. (child_info_spawn::handle_spawn): Remove recording of old_title. (dll_crt0_1): Get rid of all title handling. (do_exit): Ditto. * environ.cc (known): Delete strip_title and title. * fhandler_console.cc (fhandler_console::write): Remove recording of old_title. * globals.cc (exit_states): Remove ES_TITLE. (display_title): Delete. (strip_title_path): Delete. (old_title): Delete. * spawn.cc (spawn_guts): Remove old_title accommodation. --- winsup/cygwin/ChangeLog | 18 ++++++++++++++++++ winsup/cygwin/child_info.h | 5 +---- winsup/cygwin/dcrt0.cc | 30 ------------------------------ winsup/cygwin/environ.cc | 2 -- winsup/cygwin/fhandler_console.cc | 6 +----- winsup/cygwin/globals.cc | 5 ----- winsup/cygwin/spawn.cc | 1 - 7 files changed, 20 insertions(+), 47 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index a7893a5b4..a307371bf 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,21 @@ +2011-06-09 Christopher Faylor + + * child_info.h (CURR_CHILD_INFO_MAGIC): Reset. + (child_info::old_title): Delete. + (child_info::~child_info_spawn): Remove recording of old_title. + * dcrt0.cc (title_buf): Delete. + (child_info_spawn::handle_spawn): Remove recording of old_title. + (dll_crt0_1): Get rid of all title handling. + (do_exit): Ditto. + * environ.cc (known): Delete strip_title and title. + * fhandler_console.cc (fhandler_console::write): Remove recording of + old_title. + * globals.cc (exit_states): Remove ES_TITLE. + (display_title): Delete. + (strip_title_path): Delete. + (old_title): Delete. + * spawn.cc (spawn_guts): Remove old_title accommodation. + 2011-06-09 Christopher Faylor * environ.cc (envcache): Delete. diff --git a/winsup/cygwin/child_info.h b/winsup/cygwin/child_info.h index ae236dbd3..582d7e2c2 100644 --- a/winsup/cygwin/child_info.h +++ b/winsup/cygwin/child_info.h @@ -38,7 +38,7 @@ enum child_status #define EXEC_MAGIC_SIZE sizeof(child_info) /* Change this value if you get a message indicating that it is out-of-sync. */ -#define CURR_CHILD_INFO_MAGIC 0xeef5640dU +#define CURR_CHILD_INFO_MAGIC 0x29afd207U /* NOTE: Do not make gratuitous changes to the names or organization of the below class. The layout is checksummed to determine compatibility between @@ -101,7 +101,6 @@ class fhandler_base; class cygheap_exec_info { public: - char *old_title; int argc; char **argv; int envc; @@ -121,8 +120,6 @@ public: { if (moreinfo) { - if (moreinfo->old_title) - cfree (moreinfo->old_title); if (moreinfo->envp) { for (char **e = moreinfo->envp; *e; e++) diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index 16184a97a..6ebc15921 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -48,8 +48,6 @@ extern "C" void __sinit (_reent *); static int NO_COPY envc; static char NO_COPY **envp; -static char title_buf[TITLESIZE + 1]; - bool NO_COPY jit_debug; static void @@ -635,11 +633,6 @@ child_info_spawn::handle_spawn () child_proc_info->parent = NULL; signal_fixup_after_exec (); - if (moreinfo->old_title) - { - old_title = strcpy (title_buf, moreinfo->old_title); - cfree (moreinfo->old_title); - } fixup_lockf_after_exec (); } @@ -814,9 +807,6 @@ dll_crt0_1 (void *) #endif pinfo_init (envp, envc); - if (!old_title && GetConsoleTitle (title_buf, TITLESIZE)) - old_title = title_buf; - /* Allocate cygheap->fdtab */ dtable_init (); @@ -873,18 +863,6 @@ dll_crt0_1 (void *) *cp = '\0'; } - /* Set new console title if appropriate. */ - - if (display_title && !dynamically_loaded) - { - char *cp = __progname; - if (strip_title_path) - for (char *ptr = cp; *ptr && *ptr != ' '; ptr++) - if (isdirsep (*ptr)) - cp = ptr + 1; - set_console_title (cp); - } - (void) xdr_set_vprintf (&cygxdr_vwarnx); cygwin_finished_initializing = true; /* Call init of loaded dlls. */ @@ -1067,14 +1045,6 @@ do_exit (int status) } - if (exit_state < ES_TITLE) - { - exit_state = ES_TITLE; - /* restore console title */ - if (old_title && display_title) - set_console_title (old_title); - } - if (exit_state < ES_TTY_TERMINATE) { exit_state = ES_TTY_TERMINATE; diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc index 0dc00c1af..e0f691561 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -123,8 +123,6 @@ static struct parse_thing {"glob", {func: glob_init}, isfunc, NULL, {{0}, {s: "normal"}}}, {"proc_retry", {func: set_proc_retry}, isfunc, NULL, {{0}, {5}}}, {"reset_com", {&reset_com}, justset, NULL, {{false}, {true}}}, - {"strip_title", {&strip_title_path}, justset, NULL, {{false}, {true}}}, - {"title", {&display_title}, justset, NULL, {{false}, {true}}}, {"tty", {func: tty_is_gone}, isfunc, NULL, {{0}, {0}}}, {"upcaseenv", {&create_upcaseenv}, justset, NULL, {{false}, {true}}}, {"winsymlinks", {&allow_winsymlinks}, justset, NULL, {{false}, {true}}}, diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index 4d37c0d06..5082da316 100644 --- a/winsup/cygwin/fhandler_console.cc +++ b/winsup/cygwin/fhandler_console.cc @@ -2000,11 +2000,7 @@ fhandler_console::write (const void *vsrc, size_t len) if (*src < ' ') { if (*src == '\007' && dev_state.state_ == gettitle) - { - if (old_title) - strcpy (old_title, dev_state.my_title_buf); - set_console_title (dev_state.my_title_buf); - } + set_console_title (dev_state.my_title_buf); dev_state.state_ = normal; } else if (n < TITLESIZE) diff --git a/winsup/cygwin/globals.cc b/winsup/cygwin/globals.cc index 00f9dd758..daec49abe 100644 --- a/winsup/cygwin/globals.cc +++ b/winsup/cygwin/globals.cc @@ -41,7 +41,6 @@ enum exit_states ES_HUP_PGRP, ES_HUP_SID, ES_EXEC_EXIT, - ES_TITLE, ES_TTY_TERMINATE, ES_FINAL }; @@ -52,8 +51,6 @@ exit_states NO_COPY exit_state; int NO_COPY dynamically_loaded; /* Some CYGWIN environment variable variables. */ -bool display_title; -bool strip_title_path; bool allow_glob = true; bool NO_COPY in_forkee; @@ -73,8 +70,6 @@ bool NO_COPY _cygwin_testing; char NO_COPY almost_null[1]; -char *old_title; - /* Define globally used, but readonly variables using the _RDATA attribute. */ #define _RDATA __attribute__ ((section(".rdata"))) diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 9bcaf5b41..ddd3b731b 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -358,7 +358,6 @@ spawn_guts (const char *prog_arg, const char *const *argv, moreinfo = (cygheap_exec_info *) ccalloc_abort (HEAP_1_EXEC, 1, sizeof (cygheap_exec_info)); - moreinfo->old_title = NULL; /* CreateProcess takes one long string that is the command line (sigh). We need to quote any argument that has whitespace or embedded "'s. */