void load_config_file(char *config);
void unload_config_file();
-int stricmp(const char *s1, const char *s2);
-int strnicmp(const char *s1, const char *s2, size_t len);
/* Random Configuration Stuff Goes Here until I code it to load from a .conf file :)*/
infile.open(config);
if (infile.fail())
{
- cerr << "Error opening " << config << endl;
+ cout << "Error opening " << config << endl;
return;
}
{
cout << "Buf: " << buf << endl;
- if (buf[0] == '#' || buf[0] == ' ' || buf[0] == '\0')
+ if (buf[0] == '#' || buf[0] == ' ' || buf[0] == '\0' || buf[0] == '\n' || buf[0] == '\r')
continue;
directive = strtok(buf, " ");
}
else
{
- cerr << "Unknown Directive. Buffer: " << buf << endl;
+ cout << "Unknown Directive. Buffer: " << buf << endl;
continue;
}
- //infile.ignore(1);
}
delete [] buf;
infile.close();
#include <fstream>
#include <iostream>
-using std::cerr;
using std::cout;
using std::ofstream;
outfile.open("options.h");
if (outfile.fail())
{
- cerr << "Error opening options.h" << endl;
+ cout << "Error opening options.h" << endl;
return 1;
}
char c = 0;
if (!outfile)
{
- cerr << "Error opening " << playerdata << endl;
+ cout << "Error opening " << playerdata << endl;
return 0;
}
if (infile.fail())
{
- cerr << "Error opening " << playerdata << endl;
+ cout << "Error opening " << playerdata << endl;
return 0;
}
if (infile.fail())
{
- cerr << "Error opening .gstimestamp" << endl;
- cerr << "Generating new timestamp" << endl;
+ cout << "Error opening .gstimestamp" << endl;
+ cout << "Generating new timestamp" << endl;
generate:
timestamp = midnight();
save_timestamp();
if (outfile.fail())
{
- cerr << "Error creating new file." << endl;
+ cout << "Error creating new file." << endl;
return;
}