4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-21 00:07:36 +08:00

* 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.
This commit is contained in:
Christopher Faylor 2011-06-09 21:20:27 +00:00
parent e254790b66
commit b6510ccdcd
7 changed files with 20 additions and 47 deletions

View File

@ -1,3 +1,21 @@
2011-06-09 Christopher Faylor <me.cygwin2011@cgf.cx>
* 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 <me.cygwin2011@cgf.cx> 2011-06-09 Christopher Faylor <me.cygwin2011@cgf.cx>
* environ.cc (envcache): Delete. * environ.cc (envcache): Delete.

View File

@ -38,7 +38,7 @@ enum child_status
#define EXEC_MAGIC_SIZE sizeof(child_info) #define EXEC_MAGIC_SIZE sizeof(child_info)
/* Change this value if you get a message indicating that it is out-of-sync. */ /* 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 /* NOTE: Do not make gratuitous changes to the names or organization of the
below class. The layout is checksummed to determine compatibility between below class. The layout is checksummed to determine compatibility between
@ -101,7 +101,6 @@ class fhandler_base;
class cygheap_exec_info class cygheap_exec_info
{ {
public: public:
char *old_title;
int argc; int argc;
char **argv; char **argv;
int envc; int envc;
@ -121,8 +120,6 @@ public:
{ {
if (moreinfo) if (moreinfo)
{ {
if (moreinfo->old_title)
cfree (moreinfo->old_title);
if (moreinfo->envp) if (moreinfo->envp)
{ {
for (char **e = moreinfo->envp; *e; e++) for (char **e = moreinfo->envp; *e; e++)

View File

@ -48,8 +48,6 @@ extern "C" void __sinit (_reent *);
static int NO_COPY envc; static int NO_COPY envc;
static char NO_COPY **envp; static char NO_COPY **envp;
static char title_buf[TITLESIZE + 1];
bool NO_COPY jit_debug; bool NO_COPY jit_debug;
static void static void
@ -635,11 +633,6 @@ child_info_spawn::handle_spawn ()
child_proc_info->parent = NULL; child_proc_info->parent = NULL;
signal_fixup_after_exec (); signal_fixup_after_exec ();
if (moreinfo->old_title)
{
old_title = strcpy (title_buf, moreinfo->old_title);
cfree (moreinfo->old_title);
}
fixup_lockf_after_exec (); fixup_lockf_after_exec ();
} }
@ -814,9 +807,6 @@ dll_crt0_1 (void *)
#endif #endif
pinfo_init (envp, envc); pinfo_init (envp, envc);
if (!old_title && GetConsoleTitle (title_buf, TITLESIZE))
old_title = title_buf;
/* Allocate cygheap->fdtab */ /* Allocate cygheap->fdtab */
dtable_init (); dtable_init ();
@ -873,18 +863,6 @@ dll_crt0_1 (void *)
*cp = '\0'; *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); (void) xdr_set_vprintf (&cygxdr_vwarnx);
cygwin_finished_initializing = true; cygwin_finished_initializing = true;
/* Call init of loaded dlls. */ /* 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) if (exit_state < ES_TTY_TERMINATE)
{ {
exit_state = ES_TTY_TERMINATE; exit_state = ES_TTY_TERMINATE;

View File

@ -123,8 +123,6 @@ static struct parse_thing
{"glob", {func: glob_init}, isfunc, NULL, {{0}, {s: "normal"}}}, {"glob", {func: glob_init}, isfunc, NULL, {{0}, {s: "normal"}}},
{"proc_retry", {func: set_proc_retry}, isfunc, NULL, {{0}, {5}}}, {"proc_retry", {func: set_proc_retry}, isfunc, NULL, {{0}, {5}}},
{"reset_com", {&reset_com}, justset, NULL, {{false}, {true}}}, {"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}}}, {"tty", {func: tty_is_gone}, isfunc, NULL, {{0}, {0}}},
{"upcaseenv", {&create_upcaseenv}, justset, NULL, {{false}, {true}}}, {"upcaseenv", {&create_upcaseenv}, justset, NULL, {{false}, {true}}},
{"winsymlinks", {&allow_winsymlinks}, justset, NULL, {{false}, {true}}}, {"winsymlinks", {&allow_winsymlinks}, justset, NULL, {{false}, {true}}},

View File

@ -2000,11 +2000,7 @@ fhandler_console::write (const void *vsrc, size_t len)
if (*src < ' ') if (*src < ' ')
{ {
if (*src == '\007' && dev_state.state_ == gettitle) if (*src == '\007' && dev_state.state_ == gettitle)
{ set_console_title (dev_state.my_title_buf);
if (old_title)
strcpy (old_title, dev_state.my_title_buf);
set_console_title (dev_state.my_title_buf);
}
dev_state.state_ = normal; dev_state.state_ = normal;
} }
else if (n < TITLESIZE) else if (n < TITLESIZE)

View File

@ -41,7 +41,6 @@ enum exit_states
ES_HUP_PGRP, ES_HUP_PGRP,
ES_HUP_SID, ES_HUP_SID,
ES_EXEC_EXIT, ES_EXEC_EXIT,
ES_TITLE,
ES_TTY_TERMINATE, ES_TTY_TERMINATE,
ES_FINAL ES_FINAL
}; };
@ -52,8 +51,6 @@ exit_states NO_COPY exit_state;
int NO_COPY dynamically_loaded; int NO_COPY dynamically_loaded;
/* Some CYGWIN environment variable variables. */ /* Some CYGWIN environment variable variables. */
bool display_title;
bool strip_title_path;
bool allow_glob = true; bool allow_glob = true;
bool NO_COPY in_forkee; bool NO_COPY in_forkee;
@ -73,8 +70,6 @@ bool NO_COPY _cygwin_testing;
char NO_COPY almost_null[1]; char NO_COPY almost_null[1];
char *old_title;
/* Define globally used, but readonly variables using the _RDATA attribute. */ /* Define globally used, but readonly variables using the _RDATA attribute. */
#define _RDATA __attribute__ ((section(".rdata"))) #define _RDATA __attribute__ ((section(".rdata")))

View File

@ -358,7 +358,6 @@ spawn_guts (const char *prog_arg, const char *const *argv,
moreinfo = (cygheap_exec_info *) ccalloc_abort (HEAP_1_EXEC, 1, moreinfo = (cygheap_exec_info *) ccalloc_abort (HEAP_1_EXEC, 1,
sizeof (cygheap_exec_info)); sizeof (cygheap_exec_info));
moreinfo->old_title = NULL;
/* CreateProcess takes one long string that is the command line (sigh). /* CreateProcess takes one long string that is the command line (sigh).
We need to quote any argument that has whitespace or embedded "'s. */ We need to quote any argument that has whitespace or embedded "'s. */