Also, changed all deprecated #include <*stream.h> lines to the new method.
git-svn-id: https://svn.code.sf.net/p/gameservirc/code/trunk@98
bc333340-6410-0410-a689-
9d09f3c113fa
mandir = $(prefix)/man/man1
CC = @CXX@
-CPPFLAGS = -Wno-deprecated -Wall @CPPFLAGS@
+CPPFLAGS = -Wall @CPPFLAGS@
CFLAGS = $(CPPFLAGS) @CFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
#define ACLIENT_H
#include <string.h>
-#include <iostream.h>
#include "player.h"
+#include <iostream>
+using std::ostream;
class Player; // forward declaration
-#include <fstream.h>
+#include <fstream>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "extern.h"
+using std::ifstream;
+
void load_config_file(char *config);
void unload_config_file();
infile.open(config);
if (infile.fail())
{
- cerr << "Error opening " << config << endl;
+ log("Error opening %s", config);
return;
}
if (stricmp(directive, "DIE") == 0)
{
value = strtok(NULL, "");
- cerr << value << endl;
+ log("You should read the entire %s file!", config);
exit(0);
}
if (stricmp(directive, "S_GAMESERV") == 0)
#include <iostream>
using std::cout;
+using std::cerr;
using std::cin;
using std::endl;
using std::ofstream;
outfile.open("options.h");
if (outfile.fail())
{
- cout << "Error opening options.h" << endl;
+ cerr << "Error opening options.h" << endl;
return 1;
}
char c = 0;
#include "sockhelp.h"
#include <cctype>
-#include <fstream.h>
+#include <fstream>
+
+using std::ifstream;
+using std::ofstream;
#if defined(HAVE_CRYPT_H)
if (!outfile)
{
- cerr << "Error opening " << playerdata << endl;
+ log("Error opening %s", playerdata);
return 0;
}
if (infile.fail())
{
- cerr << "Error opening " << playerdata << endl;
+ log("Error opening %s", playerdata);
return 0;
}
infile.open("helpfiles/help");
if (infile.fail())
{
- cerr << "Error opening helpfiles/help" << endl;
+ log("Error opening helpfiles/help");
notice(s_GameServ, u, "Error opening helpfiles/help");
return;
}
if (infile.fail())
{
- cerr << "Error opening monsters.dat" << endl;
+ log("Error opening monsters.dat");
return false;
}
init_monsters();
#ifndef LIST_H
#define LIST_H
-#include <iostream.h>
+#include <iostream>
#include <cassert>
#include "listnode.h"
#include "aClient.h"
#include "extern.h"
+using std::cout;
+using std::endl;
+
template <class T>
class List {
public:
#include "extern.h"
#include <cctype>
#include <stdio.h>
-#include <fstream.h>
+#include <fstream>
+
+using std::endl;
+using std::cerr;
+using std::ofstream;
+using std::ios;
void log(const char *fmt, ...)
{
#define PLAYER_H
#include <string.h>
-#include <iostream.h>
#include "aClient.h"
#include "pouch.h"
#!/bin/bash
-./gameserv > /dev/null 2>&1 &
+./gameserv > /dev/null 2>>error.log &
#include <stdio.h>
#include <unistd.h>
#include <string.h>
-#include <iostream.h>
-#include <fstream.h>
-#include <iomanip.h>
+#include <fstream>
#include <stdlib.h>
+using std::ofstream;
+using std::ifstream;
+
char *PACKAGE = "GameServ";
char *VERSION = "1.1.8";
if (outfile.fail())
{
- cerr << "Error creating new file." << endl;
+ log("Error creating new file .gstimestamp");
return;
}