Use proper namespace for iostream classes
[gnucomo.git] / src / gcm_input / gcm_input.cpp
index 51fa9b7..40c5520 100644 (file)
@@ -6,7 +6,7 @@
 ***********************
 **      FILE NAME      : gcm_input.cpp
 **      SYSTEM NAME    : Gnucomo - Gnu Computer Monitoring
-**      VERSION NUMBER : $Revision: 1.1 $
+**      VERSION NUMBER : $Revision: 1.2 $
 **
 **  DESCRIPTION      :  Application to store client messages into the database
 **                      The client message contains a log file from one of the
 ********************************
 **      ORIGINAL AUTHOR : Arjen Baart - arjen@andromeda.nl
 **      CREATION DATE   : Aug 29, 2002
-**      LAST UPDATE     : Sep 30, 2002
+**      LAST UPDATE     : Nov 04, 2002
 **      MODIFICATIONS   : 
 **************************************************************************/
 
 /*****************************
    $Log: gcm_input.cpp,v $
-   Revision 1.1  2002-10-05 10:25:49  arjen
+   Revision 1.2  2002-11-04 10:13:36  arjen
+   Use proper namespace for iostream classes
+
+   Revision 1.1  2002/10/05 10:25:49  arjen
    Creation of gcm_input and a first approach to a web interface
 
 *****************************/
 
-static const char *RCSID = "$Id: gcm_input.cpp,v 1.1 2002-10-05 10:25:49 arjen Exp $";
+static const char *RCSID = "$Id: gcm_input.cpp,v 1.2 2002-11-04 10:13:36 arjen Exp $";
 
 #include <getopt.h>
 
@@ -66,7 +69,7 @@ static const char *RCSID = "$Id: gcm_input.cpp,v 1.1 2002-10-05 10:25:49 arjen E
 bool verbose = false;
 bool testmode = false;
 
-static char *Version = "gcm_input version 0.0.3 - Sep 30, 2002";
+static char *Version = "gcm_input version 0.0.4 - Nov 05, 2002";
 
 
 /*=========================================================================
@@ -119,7 +122,7 @@ int main(int argc, char *argv[])
          arrival = String(optarg);
          if (!arrival.proper())
          {
-            cerr << "gcm_input: Invalid date string: " << optarg << ".\n";
+            std::cerr << "gcm_input: Invalid date string: " << optarg << ".\n";
             exit(1);
          }
          break;
@@ -137,41 +140,41 @@ int main(int argc, char *argv[])
          break;
 
       case 'V':
-         cout << Version << "\n";
+         std::cout << Version << "\n";
          exit(0);
 
       case '?':
       case ':':
-         cerr << usage;
+         std::cerr << usage;
          exit(1);
       }
    }
 
    if (verbose)
    {
-      cout << "Hostname = " << hostname;
-      cout << " Arrival = " << arrival;
-      cout << " Service = " << service << "\n";
+      std::cout << "Hostname = " << hostname;
+      std::cout << " Arrival = " << arrival;
+      std::cout << " Service = " << service << "\n";
    }
 
    /*  Get the configuration file */
 
    if (!cfg.read(config_name))
    {
-      cerr << "Can not read Gnucomo configuration file for " << config_name << ".\n";
+      std::cerr << "Can not read Gnucomo configuration file for " << config_name << ".\n";
       exit(1);
    }
 
    if (verbose)
    {
-      cout << "Config OK.\n";
+      std::cout << "Config OK.\n";
    }
 
    /*  Try to connect to the database */
 
    gnucomo_database db(&cfg);
 
-   client_message  msg(&cin, db);
+   client_message  msg(&std::cin, db);
 
    if (msg.classify(hostname, arrival, service) > 0.9)
    {