* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-
+
#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
#include <string>
#include <list>
#include "sdlemu_config.h"
{
FILE *f = fopen(filename, "r");
if(!f) return 0;
-
+
fseek(f, 0, SEEK_END);
int len = ftell(f);
fseek(f, 0, SEEK_SET);
-
+
char *s = new char[len];
fread(s, 1, len, f);
string str(s);
{
list<token_list>::iterator p;
for(p = vec.begin(); p != vec.end(); p++) {
-
+
if(strcmp((*p).Token().c_str(), key_string) == 0)
return (*p).Value().c_str();
}
{
list<token_list>::iterator p;
for(p = vec.begin(); p != vec.end(); p++) {
-
+
if(strcmp((*p).Token().c_str(), key_string) == 0) {
const char *ret = (*p).Value().c_str();
if(ret) return atoi(ret);
{
list<token_list>::iterator p;
for(p = vec.begin(); p != vec.end(); p++) {
-
+
if(strcmp((*p).Token().c_str(), key_string) == 0) {
const char *ret = (*p).Value().c_str();
if(ret) return atoi(ret)>0;