Fri Nov 21 02:19:57 1997 Geoffrey Noer <noer@cygnus.com>
[deliverable/binutils-gdb.git] / gdb / complaints.c
index b8ab240724371a04111d725fbcf3d686e8dd1fae..9db8b4a20bd92edc271222dabed8691b19e15d63 100644 (file)
@@ -15,12 +15,16 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
 #include "complaints.h"
 #include "gdbcmd.h"
+#ifdef ANSI_PROTOTYPES
+#include <stdarg.h>
+#else
 #include <varargs.h>
+#endif
 
 /* Structure to manage complaints about symbol file contents.  */
 
@@ -59,15 +63,23 @@ extern int info_verbose;
 
 /* VARARGS */
 void
+#ifdef ANSI_PROTOTYPES
+complain (struct complaint *complaint, ...)
+#else
 complain (va_alist)
      va_dcl
+#endif
 {
   va_list args;
+#ifdef ANSI_PROTOTYPES
+  va_start (args, complaint);
+#else
   struct complaint *complaint;
-  char *val;
 
   va_start (args);
   complaint = va_arg (args, struct complaint *);
+#endif
+
   complaint -> counter++;
   if (complaint -> next == NULL)
     {
@@ -110,6 +122,10 @@ complain (va_alist)
        puts_filtered ("...");
        wrap_here ("");
     }
+  /* If GDB dumps core, we'd like to see the complaints first.  Presumably
+     GDB will not be sending so many complaints that this becomes a
+     performance hog.  */
+  gdb_flush (gdb_stdout);
   va_end (args);
 }
 
@@ -142,6 +158,7 @@ clear_complaints (sym_reading, noisy)
   complaint_series = sym_reading ? 1 + noisy : 0;
 }
 
+void
 _initialize_complaints ()
 {
   add_show_from_set
This page took 0.024191 seconds and 4 git commands to generate.