oups, seems like I broke some constness in D1 last commit, compiles again!

This commit is contained in:
Tomas Lindquist Olsen
2009-02-26 14:23:18 +01:00
parent 024946219a
commit d5d15cdc05
2 changed files with 10 additions and 10 deletions

View File

@@ -71,11 +71,11 @@ void DebugCondition::setGlobalLevel(unsigned level)
global.params.debuglevel = level;
}
void DebugCondition::addGlobalIdent(char *ident)
void DebugCondition::addGlobalIdent(const char *ident)
{
if (!global.params.debugids)
global.params.debugids = new Array();
global.params.debugids->push(ident);
global.params.debugids->push((void*)ident);
}
@@ -123,7 +123,7 @@ void VersionCondition::setGlobalLevel(unsigned level)
global.params.versionlevel = level;
}
void VersionCondition::checkPredefined(Loc loc, char *ident)
void VersionCondition::checkPredefined(Loc loc, const char *ident)
{
static const char* reserved[] =
{
@@ -151,17 +151,17 @@ void VersionCondition::checkPredefined(Loc loc, char *ident)
error(loc, "version identifier '%s' is reserved and cannot be set", ident);
}
void VersionCondition::addGlobalIdent(char *ident)
void VersionCondition::addGlobalIdent(const char *ident)
{
checkPredefined(0, ident);
addPredefinedGlobalIdent(ident);
}
void VersionCondition::addPredefinedGlobalIdent(char *ident)
void VersionCondition::addPredefinedGlobalIdent(const char *ident)
{
if (!global.params.versionids)
global.params.versionids = new Array();
global.params.versionids->push(ident);
global.params.versionids->push((void*)ident);
}

View File

@@ -50,7 +50,7 @@ char *strupr(char *s)
void inifile(char *argv0, const char *inifile)
{
char *path; // need path for @P macro
char *filename;
const char *filename;
OutBuffer buf;
int i;
int k;
@@ -80,7 +80,7 @@ void inifile(char *argv0, const char *inifile)
filename = FileName::combine(getenv("HOME"), inifile);
if (!FileName::exists(filename))
{
filename = FileName::replaceName(argv0, inifile);
filename = FileName::replaceName(argv0, (char*)inifile);
if (!FileName::exists(filename))
{
#if POSIX
@@ -112,7 +112,7 @@ void inifile(char *argv0, const char *inifile)
filename = FileName::searchPath(paths, argv0, 0);
if (!filename)
goto Letc; // argv0 not found on path
filename = FileName::replaceName(filename, inifile);
filename = FileName::replaceName((char*)filename, (char*)inifile);
if (FileName::exists(filename))
goto Ldone;
#endif
@@ -132,7 +132,7 @@ void inifile(char *argv0, const char *inifile)
printf("\tpath = '%s', filename = '%s'\n", path, filename);
#endif
File file(filename);
File file((char*)filename);
if (file.read())
return; // error reading file