From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: tromey@redhat.com Cc: gdb-patches@sources.redhat.com Subject: Re: Start of `>' and `>>' commands Date: Wed, 10 Oct 2001 14:29:00 -0000 Message-id: <3BC4BDAA.8050807@cygnus.com> References: <87zo75egqa.fsf@creche.redhat.com> X-SW-Source: 2001-10/msg00121.html > +/* If we've pushed output files, close them and pop them. */ > +static void > +pop_output_files () > +{ > + if (saved_stdout != NULL) > + { > + /* Only delete one of the files -- they are all set to the same > + value. */ > + ui_file_delete (gdb_stdout); > + gdb_stdout = saved_stdout; > + gdb_stderr = saved_stderr; > + gdb_stdlog = saved_stdlog; > + gdb_stdtarg = saved_stdtarg; > + saved_stdout = NULL; > + saved_stderr = NULL; > + saved_stdlog = NULL; > + saved_stdtarg = NULL; > + } > +} For what it is worth, this sort of thing is certainly on the right track. Andrew