View | Details | Raw Unified | Return to bug 121
Collapse All | Expand All

(-)a/examples/csma-broadcast.cc (-1 / +1 lines)
 Lines 63-69   NS_LOG_COMPONENT_DEFINE ("CsmaBroadcastE Link Here 
63
NS_LOG_COMPONENT_DEFINE ("CsmaBroadcastExample");
63
NS_LOG_COMPONENT_DEFINE ("CsmaBroadcastExample");
64
64
65
int 
65
int 
66
main (int argc, char *argv[])
66
main (int argc, const char *argv[])
67
{
67
{
68
  // Users may find it convenient to turn on explicit debugging
68
  // Users may find it convenient to turn on explicit debugging
69
  // for selected modules; the below lines suggest how to do this
69
  // for selected modules; the below lines suggest how to do this
(-)a/examples/csma-multicast.cc (-1 / +1 lines)
 Lines 58-64   NS_LOG_COMPONENT_DEFINE ("CsmaMulticastE Link Here 
58
NS_LOG_COMPONENT_DEFINE ("CsmaMulticastExample");
58
NS_LOG_COMPONENT_DEFINE ("CsmaMulticastExample");
59
59
60
int 
60
int 
61
main (int argc, char *argv[])
61
main (int argc, const char *argv[])
62
{
62
{
63
//
63
//
64
// Users may find it convenient to turn on explicit debugging
64
// Users may find it convenient to turn on explicit debugging
(-)a/examples/csma-one-subnet.cc (-1 / +1 lines)
 Lines 53-59   NS_LOG_COMPONENT_DEFINE ("CsmaOneSubnetE Link Here 
53
NS_LOG_COMPONENT_DEFINE ("CsmaOneSubnetExample");
53
NS_LOG_COMPONENT_DEFINE ("CsmaOneSubnetExample");
54
54
55
int 
55
int 
56
main (int argc, char *argv[])
56
main (int argc, const char *argv[])
57
{
57
{
58
//
58
//
59
// Users may find it convenient to turn on explicit debugging
59
// Users may find it convenient to turn on explicit debugging
(-)a/examples/csma-packet-socket.cc (-1 / +1 lines)
 Lines 69-75   CreateCsmaDevice (Ptr<Node> node, Ptr<Cs Link Here 
69
}
69
}
70
70
71
int
71
int
72
main (int argc, char *argv[])
72
main (int argc, const char *argv[])
73
{
73
{
74
#if 0 
74
#if 0 
75
  LogComponentEnable ("CsmaPacketSocketExample", LOG_LEVEL_INFO);
75
  LogComponentEnable ("CsmaPacketSocketExample", LOG_LEVEL_INFO);
(-)a/examples/mixed-global-routing.cc (-1 / +1 lines)
 Lines 71-77   NS_LOG_COMPONENT_DEFINE ("MixedGlobalRou Link Here 
71
NS_LOG_COMPONENT_DEFINE ("MixedGlobalRoutingExample");
71
NS_LOG_COMPONENT_DEFINE ("MixedGlobalRoutingExample");
72
72
73
int 
73
int 
74
main (int argc, char *argv[])
74
main (int argc, const char *argv[])
75
{
75
{
76
76
77
  // Users may find it convenient to turn on explicit debugging
77
  // Users may find it convenient to turn on explicit debugging
(-)a/examples/simple-alternate-routing.cc (-1 / +1 lines)
 Lines 68-74   NS_LOG_COMPONENT_DEFINE ("SimpleAlternat Link Here 
68
NS_LOG_COMPONENT_DEFINE ("SimpleAlternateRoutingExample");
68
NS_LOG_COMPONENT_DEFINE ("SimpleAlternateRoutingExample");
69
69
70
int 
70
int 
71
main (int argc, char *argv[])
71
main (int argc, const char *argv[])
72
{
72
{
73
  // Users may find it convenient to turn on explicit debugging
73
  // Users may find it convenient to turn on explicit debugging
74
  // for selected modules; the below lines suggest how to do this
74
  // for selected modules; the below lines suggest how to do this
(-)a/examples/simple-error-model.cc (-1 / +1 lines)
 Lines 71-77   NS_LOG_COMPONENT_DEFINE ("SimpleErrorMod Link Here 
71
NS_LOG_COMPONENT_DEFINE ("SimpleErrorModelExample");
71
NS_LOG_COMPONENT_DEFINE ("SimpleErrorModelExample");
72
72
73
int 
73
int 
74
main (int argc, char *argv[])
74
main (int argc, const char *argv[])
75
{
75
{
76
  // Users may find it convenient to turn on explicit debugging
76
  // Users may find it convenient to turn on explicit debugging
77
  // for selected modules; the below lines suggest how to do this
77
  // for selected modules; the below lines suggest how to do this
(-)a/examples/simple-global-routing.cc (-1 / +1 lines)
 Lines 73-79   NS_LOG_COMPONENT_DEFINE ("SimpleGlobalRo Link Here 
73
NS_LOG_COMPONENT_DEFINE ("SimpleGlobalRoutingExample");
73
NS_LOG_COMPONENT_DEFINE ("SimpleGlobalRoutingExample");
74
74
75
int 
75
int 
76
main (int argc, char *argv[])
76
main (int argc, const char *argv[])
77
{
77
{
78
  // Users may find it convenient to turn on explicit debugging
78
  // Users may find it convenient to turn on explicit debugging
79
  // for selected modules; the below lines suggest how to do this
79
  // for selected modules; the below lines suggest how to do this
(-)a/examples/simple-point-to-point-olsr.cc (-1 / +1 lines)
 Lines 68-74   NS_LOG_COMPONENT_DEFINE ("SimplePointToP Link Here 
68
NS_LOG_COMPONENT_DEFINE ("SimplePointToPointExample");
68
NS_LOG_COMPONENT_DEFINE ("SimplePointToPointExample");
69
69
70
int 
70
int 
71
main (int argc, char *argv[])
71
main (int argc, const char *argv[])
72
{
72
{
73
  // Users may find it convenient to turn on explicit debugging
73
  // Users may find it convenient to turn on explicit debugging
74
  // for selected modules; the below lines suggest how to do this
74
  // for selected modules; the below lines suggest how to do this
(-)a/examples/simple-point-to-point.cc (-1 / +1 lines)
 Lines 67-73   NS_LOG_COMPONENT_DEFINE ("SimplePointToP Link Here 
67
NS_LOG_COMPONENT_DEFINE ("SimplePointToPointExample");
67
NS_LOG_COMPONENT_DEFINE ("SimplePointToPointExample");
68
68
69
int 
69
int 
70
main (int argc, char *argv[])
70
main (int argc, const char *argv[])
71
{
71
{
72
  // Users may find it convenient to turn on explicit debugging
72
  // Users may find it convenient to turn on explicit debugging
73
  // for selected modules; the below lines suggest how to do this
73
  // for selected modules; the below lines suggest how to do this
(-)a/examples/udp-echo.cc (-1 / +1 lines)
 Lines 53-59   NS_LOG_COMPONENT_DEFINE ("UdpEchoExample Link Here 
53
NS_LOG_COMPONENT_DEFINE ("UdpEchoExample");
53
NS_LOG_COMPONENT_DEFINE ("UdpEchoExample");
54
54
55
int 
55
int 
56
main (int argc, char *argv[])
56
main (int argc, const char *argv[])
57
{
57
{
58
//
58
//
59
// Users may find it convenient to turn on explicit debugging
59
// Users may find it convenient to turn on explicit debugging
(-)a/samples/main-adhoc-wifi.cc (-1 / +1 lines)
 Lines 139-145   RunOneExperiment (void) Link Here 
139
  Simulator::Destroy ();
139
  Simulator::Destroy ();
140
}
140
}
141
141
142
int main (int argc, char *argv[])
142
int main (int argc, const char *argv[])
143
{
143
{
144
  Simulator::SetLinkedList ();
144
  Simulator::SetLinkedList ();
145
145
(-)a/samples/main-default-value.cc (-1 / +1 lines)
 Lines 48-54   TestClass::TestClass () : Link Here 
48
{
48
{
49
}
49
}
50
using std::cout;
50
using std::cout;
51
int main (int argc, char* argv[])
51
int main (int argc, const char* argv[])
52
{
52
{
53
  //The following allows the default values established so far to be hooked
53
  //The following allows the default values established so far to be hooked
54
  //into the command line argument processing unit.  Essentially, the command
54
  //into the command line argument processing unit.  Essentially, the command
(-)a/samples/main-grid-topology.cc (-1 / +1 lines)
 Lines 8-14    Link Here 
8
8
9
using namespace ns3;
9
using namespace ns3;
10
10
11
int main (int argc, char *argv[])
11
int main (int argc, const char *argv[])
12
{
12
{
13
  CommandLine::Parse (argc, argv);
13
  CommandLine::Parse (argc, argv);
14
14
(-)a/samples/main-random-topology.cc (-1 / +1 lines)
 Lines 22-28   CourseChange (const TraceContext &contex Link Here 
22
            << ", z=" << pos.z << std::endl;
22
            << ", z=" << pos.z << std::endl;
23
}
23
}
24
24
25
int main (int argc, char *argv[])
25
int main (int argc, const char *argv[])
26
{
26
{
27
  DefaultValue::Bind ("RandomDiscPositionX", "100");
27
  DefaultValue::Bind ("RandomDiscPositionX", "100");
28
  DefaultValue::Bind ("RandomDiscPositionY", "50");
28
  DefaultValue::Bind ("RandomDiscPositionY", "50");
(-)a/samples/main-random-walk.cc (-1 / +1 lines)
 Lines 25-31   CourseChange (ns3::TraceContext const&, Link Here 
25
            << ", z=" << vel.z << std::endl;
25
            << ", z=" << vel.z << std::endl;
26
}
26
}
27
27
28
int main (int argc, char *argv[])
28
int main (int argc, const char *argv[])
29
{
29
{
30
  DefaultValue::Bind ("RandomWalk2dMode", "Time");
30
  DefaultValue::Bind ("RandomWalk2dMode", "Time");
31
  DefaultValue::Bind ("RandomWalk2dTime", "2s");
31
  DefaultValue::Bind ("RandomWalk2dTime", "2s");
(-)a/src/core/command-line.cc (-5 / +5 lines)
 Lines 92-98   CommandLine::PrintHelp (void) Link Here 
92
}
92
}
93
93
94
void 
94
void 
95
CommandLine::Parse (int argc, char *argv[])
95
CommandLine::Parse (int argc, const char *argv[])
96
{
96
{
97
  for (argc--, argv++; argc > 0; argc--, argv++)
97
  for (argc--, argv++; argc > 0; argc--, argv++)
98
    {
98
    {
 Lines 188-194   public: Link Here 
188
    std::ostringstream nullout;
188
    std::ostringstream nullout;
189
    std::streambuf *origcerr = std::cerr.rdbuf (nullout.rdbuf ());
189
    std::streambuf *origcerr = std::cerr.rdbuf (nullout.rdbuf ());
190
    {
190
    {
191
      char *argv[] = {"run-tests", "--loops", "bad-value", NULL};
191
      const char *argv[] = {"run-tests", "--loops", "bad-value", NULL};
192
      int argc = sizeof (argv) / sizeof (argv[0]) - 1;
192
      int argc = sizeof (argv) / sizeof (argv[0]) - 1;
193
      
193
      
194
      uint32_t loops = 123;
194
      uint32_t loops = 123;
 Lines 199-205   public: Link Here 
199
    }
199
    }
200
200
201
    {
201
    {
202
      char *argv[] = {"run-tests", "--loops=bad-value", NULL};
202
      const char *argv[] = {"run-tests", "--loops=bad-value", NULL};
203
      int argc = sizeof (argv) / sizeof (argv[0]) - 1;
203
      int argc = sizeof (argv) / sizeof (argv[0]) - 1;
204
      
204
      
205
      uint32_t loops = 123;
205
      uint32_t loops = 123;
 Lines 210-216   public: Link Here 
210
    }
210
    }
211
211
212
    {
212
    {
213
      char *argv[] = {"run-tests", "--loops", "456", NULL};
213
      const char *argv[] = {"run-tests", "--loops", "456", NULL};
214
      int argc = sizeof (argv) / sizeof (argv[0]) - 1;
214
      int argc = sizeof (argv) / sizeof (argv[0]) - 1;
215
      
215
      
216
      uint32_t loops = 123;
216
      uint32_t loops = 123;
 Lines 221-227   public: Link Here 
221
    }
221
    }
222
222
223
    {
223
    {
224
      char *argv[] = {"run-tests", "--loops=456", NULL};
224
      const char *argv[] = {"run-tests", "--loops=456", NULL};
225
      int argc = sizeof (argv) / sizeof (argv[0]) - 1;
225
      int argc = sizeof (argv) / sizeof (argv[0]) - 1;
226
      
226
      
227
      uint32_t loops = 123;
227
      uint32_t loops = 123;
(-)a/src/core/command-line.h (-1 / +1 lines)
 Lines 69-75   public: Link Here 
69
   * \param argv Array of strings passed in as arguments; pass this directly from
69
   * \param argv Array of strings passed in as arguments; pass this directly from
70
   * the second argument of your main(int,char**) function
70
   * the second argument of your main(int,char**) function
71
   */
71
   */
72
  static void Parse (int argc, char *argv[]);
72
  static void Parse (int argc, const char *argv[]);
73
 private:
73
 private:
74
  template <typename T>
74
  template <typename T>
75
  class UserDefaultValue : public DefaultValueBase 
75
  class UserDefaultValue : public DefaultValueBase 
(-)a/utils/mobility-visualizer-model.cc (-1 / +1 lines)
 Lines 66-72   Sample () Link Here 
66
66
67
67
68
68
69
int model_init (int argc, char *argv[], double *x1, double *y1, double *x2, double *y2)
69
int model_init (int argc, const char *argv[], double *x1, double *y1, double *x2, double *y2)
70
{
70
{
71
  DefaultValue::Bind ("RandomWalk2dMode", "Time");
71
  DefaultValue::Bind ("RandomWalk2dMode", "Time");
72
  DefaultValue::Bind ("RandomWalk2dTime", "5s");
72
  DefaultValue::Bind ("RandomWalk2dTime", "5s");
(-)a/utils/mobility-visualizer-view.cc (-4 / +2 lines)
 Lines 14-21    Link Here 
14
#define LOOKAHEAD_SECONDS 10
14
#define LOOKAHEAD_SECONDS 10
15
15
16
GtkWidget *g_canvas;
16
GtkWidget *g_canvas;
17
18
int model_init (int argc, char *argv[]);
19
17
20
struct Node
18
struct Node
21
{
19
{
 Lines 155-164   void zoom_changed (GtkAdjustment *adj) Link Here 
155
  goo_canvas_set_scale (GOO_CANVAS (g_canvas), gtk_adjustment_get_value (adj));
153
  goo_canvas_set_scale (GOO_CANVAS (g_canvas), gtk_adjustment_get_value (adj));
156
}
154
}
157
155
158
int main (int argc, char *argv[])
156
int main (int argc, const char *argv[])
159
{
157
{
160
  g_thread_init (NULL);
158
  g_thread_init (NULL);
161
  gtk_init (&argc, &argv);
159
  gtk_init (&argc, (char***) &argv);
162
  double x1 = 0, y1 = 0, x2 = 0, y2 = 0;
160
  double x1 = 0, y1 = 0, x2 = 0, y2 = 0;
163
161
164
  model_init (argc, argv, &x1, &y1, &x2, &y2);
162
  model_init (argc, argv, &x1, &y1, &x2, &y2);
(-)a/utils/mobility-visualizer.h (-1 / +1 lines)
 Lines 1-7    Link Here 
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
#include <vector>
2
#include <vector>
3
3
4
int model_init (int argc, char *argv[], double *x1, double *y1, double *x2, double *y2);
4
int model_init (int argc, const char *argv[], double *x1, double *y1, double *x2, double *y2);
5
5
6
struct NodeUpdate
6
struct NodeUpdate
7
{
7
{

Return to bug 121