From 4886a7c0fece1f78043ad8b09d5ac36268be3ab3 Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Tue, 31 Jul 2007 13:49:11 +0100 Subject: [PATCH 1/2] Add emacs C++ mode selection line, missing from some header files. --- src/mobility/position.h | 1 + src/mobility/random-position.h | 1 + src/mobility/speed.h | 1 + src/mobility/static-speed-helper.h | 1 + 4 files changed, 4 insertions(+) diff --git a/src/mobility/position.h b/src/mobility/position.h index 884ba50b0..d34fadfb2 100644 --- a/src/mobility/position.h +++ b/src/mobility/position.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ #ifndef POSITION_H #define POSITION_H diff --git a/src/mobility/random-position.h b/src/mobility/random-position.h index ee97a2286..8fcc54a6d 100644 --- a/src/mobility/random-position.h +++ b/src/mobility/random-position.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ #ifndef RANDOM_POSITION_H #define RANDOM_POSITION_H diff --git a/src/mobility/speed.h b/src/mobility/speed.h index 5e2ad3c45..317fc4333 100644 --- a/src/mobility/speed.h +++ b/src/mobility/speed.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ #ifndef SPEED_H #define SPEED_H diff --git a/src/mobility/static-speed-helper.h b/src/mobility/static-speed-helper.h index 0ba541b75..8737f2edd 100644 --- a/src/mobility/static-speed-helper.h +++ b/src/mobility/static-speed-helper.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ #ifndef STATIC_SPEED_HELPER_H #define STATIC_SPEED_HELPER_H From 2319629592510edb76af972a8bf0060b154c9414 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Wed, 1 Aug 2007 09:38:09 +0200 Subject: [PATCH 2/2] fix bug 59: debug output now goes to stderr. --- src/core/assert.h | 4 ++-- src/core/debug.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/assert.h b/src/core/assert.h index 928a3b76a..e97fa8aa6 100644 --- a/src/core/assert.h +++ b/src/core/assert.h @@ -65,7 +65,7 @@ void AssertBreakpoint (void); { \ if (!(condition)) \ { \ - std::cout << "assert failed. file=" << __FILE__ << \ + std::cerr << "assert failed. file=" << __FILE__ << \ ", line=" << __LINE__ << ", cond=\""#condition << \ "\"" << std::endl; \ ns3::AssertBreakpoint (); \ @@ -88,7 +88,7 @@ void AssertBreakpoint (void); { \ if (!(condition)) \ { \ - std::cout << message << std::endl; \ + std::cerr << message << std::endl; \ ns3::AssertBreakpoint (); \ } \ } \ diff --git a/src/core/debug.h b/src/core/debug.h index 0171387f2..3fc6fef4b 100644 --- a/src/core/debug.h +++ b/src/core/debug.h @@ -110,7 +110,7 @@ private: { \ if (g_debug.IsEnabled ()) \ { \ - std::cout << msg << std::endl; \ + std::cerr << msg << std::endl; \ } \ } \ while (false) @@ -125,7 +125,7 @@ private: #define NS_DEBUG_UNCOND(msg) \ do \ { \ - std::cout << msg << std::endl; \ + std::cerr << msg << std::endl; \ } \ while (false)