/* Make a file name from a stem. Removes the old filename suffix and
* replaces it with a new one. Returns a newed up string. */
-char *fileNameFromStem( char *stemFile, char *suffix )
+char *fileNameFromStem( char *stemFile, const char *suffix )
{
long len = strlen( stemFile );
assert( len > 0 );
char *findFileExtension( char *stemFile );
-char *fileNameFromStem( char *stemFile, char *suffix );
+char *fileNameFromStem( char *stemFile, const char *suffix );
struct Export
{
if ( ext != 0 && strcmp( ext, ".rh" ) == 0 )
outputFileName = fileNameFromStem( inputFile, ".h" );
else {
- char *defExtension = 0;
+ const char *defExtension = 0;
switch ( hostLang->lang ) {
case HostLang::C: defExtension = ".c"; break;
case HostLang::D: defExtension = ".d"; break;
error() << "could not open " << xmlInputFileName << " for reading" << endl;
}
else {
- xmlInputFileName = "<stdin>";
+ xmlInputFileName = strdup("<stdin>");
inStream = &cin;
}
error() << "could not open " << xmlInputFileName << " for reading" << endl;
}
else {
- xmlInputFileName = "<stdin>";
+ xmlInputFileName = strdup("<stdin>");
inStream = &cin;
}
error() << "could not open " << xmlInputFileName << " for reading" << endl;
}
else {
- xmlInputFileName = "<stdin>";
+ xmlInputFileName = strdup("<stdin>");
inStream = &cin;
}
error() << "could not open " << xmlInputFileName << " for reading" << endl;
}
else {
- xmlInputFileName = "<stdin>";
+ xmlInputFileName = strdup("<stdin>");
inStream = &cin;
}