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]

[RFA] implement putchar_filtered()


This patch adds putchar_filtered() to the collection of stdio-like
_filtered and _unfiltered functions in utils.c.

ChangeLog:

	* defs.h (putchar_filtered): Prototype.
	* utils.c (putchar_filtered): Define.

No regressions on i686-pc-linux-gnu.  Okay to apply?

Nicholas Duffek
<nsd@redhat.com>

[patch follows]

Index: gdb/defs.h
===================================================================
diff -up gdb/defs.h gdb/defs.h
--- gdb/defs.h	Tue Dec 19 11:13:25 2000
+++ gdb/defs.h	Tue Dec 19 11:13:09 2000
@@ -446,6 +446,8 @@ extern int fputc_filtered (int c, struct
 
 extern int fputc_unfiltered (int c, struct ui_file *);
 
+extern int putchar_filtered (int c);
+
 extern int putchar_unfiltered (int c);
 
 extern void puts_filtered (const char *);
Index: gdb/utils.c
===================================================================
diff -up gdb/utils.c gdb/utils.c
--- gdb/utils.c	Tue Dec 19 11:13:48 2000
+++ gdb/utils.c	Tue Dec 19 11:13:09 2000
@@ -1867,6 +1867,12 @@ putchar_unfiltered (int c)
 }
 
 int
+putchar_filtered (int c)
+{
+  return fputc_filtered (c, gdb_stdout);
+}
+
+int
 fputc_unfiltered (int c, struct ui_file *stream)
 {
   char buf = c;

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