2002-09-29 Andrew Cagney <ac131313@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Mon, 30 Sep 2002 20:18:52 +0000 (20:18 +0000)
committerAndrew Cagney <cagney@redhat.com>
Mon, 30 Sep 2002 20:18:52 +0000 (20:18 +0000)
* mi-out.c (mi_version): New function.
* mi-out.h (mi_version): Declare.

gdb/mi/ChangeLog
gdb/mi/mi-out.c
gdb/mi/mi-out.h

index 86bec4a..dca5af3 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-29  Andrew Cagney  <ac131313@redhat.com>
+
+       * mi-out.c (mi_version): New function.
+       * mi-out.h (mi_version): Declare.
+
 2002-09-27  Andrew Cagney  <ac131313@redhat.com>
 
        From 2002-07-12 Mo DeJong <supermo@bayarea.net>
index 947720b..f7ed7ec 100644 (file)
@@ -428,6 +428,15 @@ mi_out_put (struct ui_out *uiout,
   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 1ae693f..817f2eb 100644 (file)
@@ -30,4 +30,7 @@ extern void mi_out_put (struct ui_out *uiout, struct ui_file *stream);
 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 */