This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch/rfc] mi_version() method



2002-09-29  Andrew Cagney  <ac131313@redhat.com>

	* mi-out.c (mi_version): New function.
	* mi-out.h (mi_version): Declare.

I've checked this in.

Andrew


Index: mi/mi-out.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-out.c,v
retrieving revision 1.23
diff -u -r1.23 mi-out.c
--- mi/mi-out.c 19 Mar 2002 02:51:08 -0000 1.23
+++ mi/mi-out.c 29 Sep 2002 18:15:50 -0000
@@ -428,6 +428,15 @@
ui_file_rewind (data->buffer);
}
+/* Current MI version. */
+
+int
+mi_version (struct ui_out *uiout)
+{
+ struct ui_out_data *data = ui_out_data (uiout);
+ return data->mi_version;
+}
+
/* initalize private members at startup */
struct ui_out *
Index: mi/mi-out.h
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-out.h,v
retrieving revision 1.6
diff -u -r1.6 mi-out.h
--- mi/mi-out.h 18 Jun 2001 17:57:41 -0000 1.6
+++ mi/mi-out.h 29 Sep 2002 18:15:50 -0000
@@ -30,4 +30,7 @@
extern void mi_out_rewind (struct ui_out *uiout);
extern void mi_out_buffered (struct ui_out *uiout, char *string);
+/* Return the version number of the current MI. */
+extern int mi_version (struct ui_out *uiout);
+
#endif /* MI_OUT_H */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]