Rename translation units containing main() to main.cpp

Also unify style of argv declaration

Change-Id: I1dcb8689b1cd38e042a0b1f05be7f98bd2d487ed
diff --git a/tools/ping/client/ndn-ping.cpp b/tools/ping/client/main.cpp
similarity index 95%
rename from tools/ping/client/ndn-ping.cpp
rename to tools/ping/client/main.cpp
index 19f5bb6..86db7da 100644
--- a/tools/ping/client/ndn-ping.cpp
+++ b/tools/ping/client/main.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017,  Arizona Board of Regents.
+/*
+ * Copyright (c) 2014-2019,  Arizona Board of Regents.
  *
  * This file is part of ndn-tools (Named Data Networking Essential Tools).
  * See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -136,15 +136,15 @@
 usage(const boost::program_options::options_description& options)
 {
   std::cout << "Usage: ndnping [options] ndn:/name/prefix\n"
-      "\n"
-      "Ping a NDN name prefix using Interests with name ndn:/name/prefix/ping/number.\n"
-      "The numbers in the Interests are randomly generated unless specified.\n"
-      "\n";
-  std::cout << options;
+               "\n"
+               "Ping a NDN name prefix using Interests with name ndn:/name/prefix/ping/number.\n"
+               "The numbers in the Interests are randomly generated unless specified.\n"
+               "\n"
+            << options;
   exit(2);
 }
 
-int
+static int
 main(int argc, char* argv[])
 {
   Options options;
@@ -269,7 +269,7 @@
 } // namespace ndn
 
 int
-main(int argc, char** argv)
+main(int argc, char* argv[])
 {
   return ndn::ping::client::main(argc, argv);
 }
diff --git a/tools/ping/server/ndn-ping-server.cpp b/tools/ping/server/main.cpp
similarity index 98%
rename from tools/ping/server/ndn-ping-server.cpp
rename to tools/ping/server/main.cpp
index 28c6871..9aa7261 100644
--- a/tools/ping/server/ndn-ping-server.cpp
+++ b/tools/ping/server/main.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2015-2018, Arizona Board of Regents.
+ * Copyright (c) 2015-2019, Arizona Board of Regents.
  *
  * This file is part of ndn-tools (Named Data Networking Essential Tools).
  * See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -187,7 +187,7 @@
 } // namespace ndn
 
 int
-main(int argc, char** argv)
+main(int argc, char* argv[])
 {
   return ndn::ping::server::main(argc, argv);
 }
diff --git a/tools/ping/wscript b/tools/ping/wscript
index f0c5f5e..4b66c04 100644
--- a/tools/ping/wscript
+++ b/tools/ping/wscript
@@ -5,24 +5,24 @@
 
     bld.objects(
         target='ping-client-objects',
-        source=bld.path.ant_glob('client/*.cpp', excl='client/ndn-ping.cpp'),
+        source=bld.path.ant_glob('client/*.cpp', excl='client/main.cpp'),
         use='core-objects')
 
     bld.program(
         target='../../bin/ndnping',
         name='ndnping',
-        source='client/ndn-ping.cpp',
+        source='client/main.cpp',
         use='ping-client-objects')
 
     bld.objects(
         target='ping-server-objects',
-        source=bld.path.ant_glob('server/*.cpp', excl='server/ndn-ping-server.cpp'),
+        source=bld.path.ant_glob('server/*.cpp', excl='server/main.cpp'),
         use='core-objects')
 
     bld.program(
         target='../../bin/ndnpingserver',
         name='ndnpingserver',
-        source='server/ndn-ping-server.cpp',
+        source='server/main.cpp',
         use='ping-server-objects')
 
     ## (for unit tests)