mirror of
https://github.com/glest/glest-source.git
synced 2025-08-08 01:16:30 +02:00
Updates to Win32 code to port latest mega-glest features
This commit is contained in:
@@ -19,14 +19,15 @@
|
|||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "conversion.h"
|
#include "conversion.h"
|
||||||
|
|
||||||
#include "leak_dumper.h"
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <direct.h>
|
#include <direct.h>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
|
#include "leak_dumper.h"
|
||||||
|
|
||||||
#define S_ISDIR(mode) ((mode) & _S_IFDIR)
|
#define S_ISDIR(mode) ((mode) & _S_IFDIR)
|
||||||
|
|
||||||
|
|
||||||
using namespace Shared::Util;
|
using namespace Shared::Util;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
@@ -169,7 +170,7 @@ void findDirs(const vector<string> &paths, vector<string> &results, bool errorOn
|
|||||||
vector<string> current_results;
|
vector<string> current_results;
|
||||||
findAll(path, current_results, false, errorOnNotFound);
|
findAll(path, current_results, false, errorOnNotFound);
|
||||||
if(current_results.size() > 0) {
|
if(current_results.size() > 0) {
|
||||||
for(int folder_index = 0; folder_index < current_results.size(); folder_index++) {
|
for(unsigned int folder_index = 0; folder_index < current_results.size(); folder_index++) {
|
||||||
const string current_folder = current_results[folder_index];
|
const string current_folder = current_results[folder_index];
|
||||||
const string current_folder_path = paths[idx] + "/" + current_folder;
|
const string current_folder_path = paths[idx] + "/" + current_folder;
|
||||||
if(isdir(current_folder_path.c_str()) == true) {
|
if(isdir(current_folder_path.c_str()) == true) {
|
||||||
@@ -192,7 +193,7 @@ void findAll(const vector<string> &paths, const string &fileFilter, vector<strin
|
|||||||
vector<string> current_results;
|
vector<string> current_results;
|
||||||
findAll(path, current_results, cutExtension, errorOnNotFound);
|
findAll(path, current_results, cutExtension, errorOnNotFound);
|
||||||
if(current_results.size() > 0) {
|
if(current_results.size() > 0) {
|
||||||
for(int folder_index = 0; folder_index < current_results.size(); folder_index++) {
|
for(unsigned int folder_index = 0; folder_index < current_results.size(); folder_index++) {
|
||||||
string ¤t_file = current_results[folder_index];
|
string ¤t_file = current_results[folder_index];
|
||||||
if(std::find(results.begin(),results.end(),current_file) == results.end()) {
|
if(std::find(results.begin(),results.end(),current_file) == results.end()) {
|
||||||
results.push_back(current_file);
|
results.push_back(current_file);
|
||||||
@@ -235,7 +236,7 @@ void findAll(const string &path, vector<string> &results, bool cutExtension, boo
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(cutExtension){
|
if(cutExtension){
|
||||||
for (int i=0; i<results.size(); ++i){
|
for (unsigned int i=0; i<results.size(); ++i){
|
||||||
results.at(i)=cutLastExt(results.at(i));
|
results.at(i)=cutLastExt(results.at(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -14,11 +14,12 @@
|
|||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
#include "conversion.h"
|
#include "conversion.h"
|
||||||
|
|
||||||
#include "leak_dumper.h"
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <strstream>
|
#include <strstream>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include "util.h"
|
||||||
|
|
||||||
|
#include "leak_dumper.h"
|
||||||
|
|
||||||
#define socklen_t int
|
#define socklen_t int
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user