1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-07-04 21:05:27 +03:00

utilities: Removed unused functions.

This commit is contained in:
Maarten ter Huurne 2011-10-23 16:51:59 +02:00
parent a01d892eb6
commit 40c510a28a
2 changed files with 12 additions and 35 deletions

View File

@ -1,6 +1,6 @@
/***************************************************************************
* Copyright (C) 2006 by Massimiliano Torromeo *
* massimiliano.torromeo@gmail.com *
* Copyright (C) 2006 by Massimiliano Torromeo *
* massimiliano.torromeo@gmail.com *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@ -18,6 +18,12 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "utilities.h"
#include "debug.h"
#include <SDL.h>
//for browsing the filesystem
#include <sys/stat.h>
#include <sys/types.h>
@ -26,11 +32,6 @@
#include <iostream>
#include <strings.h>
#include <SDL.h>
#include "utilities.h"
#include "debug.h"
using namespace std;
bool case_less::operator()(const string &left, const string &right) const {
@ -48,17 +49,6 @@ string trim(const string& s) {
return string(s, b, e - b + 1);
}
void string_copy(const string &s, char **cs) {
*cs = (char*)malloc(s.length());
strcpy(*cs, s.c_str());
}
char * string_copy(const string &s) {
char *cs = NULL;
string_copy(s, &cs);
return cs;
}
bool fileExists(const string &file) {
fstream fin;
fin.open(file.c_str() ,ios::in);
@ -118,14 +108,6 @@ int evalIntConf (int *val, int def, int imin, int imax) {
return *val;
}
const string &evalStrConf (const string &val, const string &def) {
return val.empty() ? def : val;
}
const string &evalStrConf (string *val, const string &def) {
*val = evalStrConf(*val, def);
return *val;
}
bool split (vector<string> &vec, const string &str, const string &delim, bool destructive) {
vec.clear();

View File

@ -1,6 +1,6 @@
/***************************************************************************
* Copyright (C) 2006 by Massimiliano Torromeo *
* massimiliano.torromeo@gmail.com *
* Copyright (C) 2006 by Massimiliano Torromeo *
* massimiliano.torromeo@gmail.com *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@ -30,11 +30,8 @@ public:
};
std::string trim(const std::string& s);
std::string strreplace (std::string orig, const std::string &search, const std::string &replace);
std::string cmdclean (std::string cmdline);
char *string_copy(const std::string &);
void string_copy(const std::string &, char **);
std::string strreplace(std::string orig, const std::string &search, const std::string &replace);
std::string cmdclean(std::string cmdline);
bool fileExists(const std::string &file);
bool rmtree(std::string path);
@ -45,8 +42,6 @@ int constrain(int x, int imin, int imax);
int evalIntConf(int val, int def, int imin, int imax);
int evalIntConf(int *val, int def, int imin, int imax);
const std::string &evalStrConf(const std::string &val, const std::string &def);
const std::string &evalStrConf(std::string *val, const std::string &def);
bool split(std::vector<std::string> &vec, const std::string &str,
const std::string &delim, bool destructive=true);