From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eli Zaretskii To: Andrew Cagney Cc: gdb-patches@sourceware.cygnus.com Subject: Re: [rfc] ui_out_is_mi_like_p(); Was: [patch] Add -i=mi0 as an interpreter Date: Wed, 04 Jul 2001 23:53:00 -0000 Message-id: References: <3B4399D4.1060302@cygnus.com> X-SW-Source: 2001-07/msg00084.html On Wed, 4 Jul 2001, Andrew Cagney wrote: > > Why can't this strncmp be done in one place and then saved in some > > variable? If you do need to use strncmp all over the place, then I > > can't say I care to see the magical constants "mi" and 2 every time > > you do ;-) > > The attached patch replaces: > > > ! if (interpreter_p && strncmp (interpreter_p, "mi", 2) == 0) > > > > with: > > if (ui_out_is_mi_like_p (uiout)) I'm happy now, thanks ;-) > + /* HACK: Some code in core GDB is currently looks at the output This sentence should be fixed.