summaryrefslogtreecommitdiffstatshomepage
path: root/src/tools/chdman.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/chdman.c')
-rw-r--r--src/tools/chdman.c130
1 files changed, 65 insertions, 65 deletions
diff --git a/src/tools/chdman.c b/src/tools/chdman.c
index 87e22bd2dbf..69f0f89a34e 100644
--- a/src/tools/chdman.c
+++ b/src/tools/chdman.c
@@ -327,7 +327,7 @@ public:
m_lastfile = m_info.track[tracknum].fname;
file_error filerr = core_fopen(m_lastfile, OPEN_FLAG_READ, &m_file);
if (filerr != FILERR_NONE)
- report_error(1, "Error opening input file (%s)'", m_lastfile.cstr());
+ report_error(1, "Error opening input file (%s)'", m_lastfile.c_str());
}
// iterate over frames
@@ -351,7 +351,7 @@ public:
core_fseek(m_file, src_frame_start, SEEK_SET);
UINT32 count = core_fread(m_file, dest, bytesperframe);
if (count != bytesperframe)
- report_error(1, "Error reading input file (%s)'", m_lastfile.cstr());
+ report_error(1, "Error reading input file (%s)'", m_lastfile.c_str());
}
// swap if appropriate
@@ -940,7 +940,7 @@ static void parse_input_chd_parameters(const parameters_t &params, chd_file &inp
{
chd_error err = input_parent_chd.open(*input_chd_parent_str);
if (err != CHDERR_NONE)
- report_error(1, "Error opening parent CHD file (%s): %s", input_chd_parent_str->cstr(), chd_file::error_string(err));
+ report_error(1, "Error opening parent CHD file (%s): %s", input_chd_parent_str->c_str(), chd_file::error_string(err));
}
// process input file
@@ -949,7 +949,7 @@ static void parse_input_chd_parameters(const parameters_t &params, chd_file &inp
{
chd_error err = input_chd.open(*input_chd_str, writeable, input_parent_chd.opened() ? &input_parent_chd : NULL);
if (err != CHDERR_NONE)
- report_error(1, "Error opening CHD file (%s): %s", input_chd_str->cstr(), chd_file::error_string(err));
+ report_error(1, "Error opening CHD file (%s): %s", input_chd_str->c_str(), chd_file::error_string(err));
}
}
@@ -1028,7 +1028,7 @@ static astring *parse_output_chd_parameters(const parameters_t &params, chd_file
{
chd_error err = output_parent_chd.open(*output_chd_parent_str);
if (err != CHDERR_NONE)
- report_error(1, "Error opening parent CHD file (%s): %s", output_chd_parent_str->cstr(), chd_file::error_string(err));
+ report_error(1, "Error opening parent CHD file (%s): %s", output_chd_parent_str->c_str(), chd_file::error_string(err));
}
// process output file
@@ -1083,10 +1083,10 @@ static void parse_compression(const parameters_t &params, chd_codec_type compres
{
astring name(*compression_str, start, (end == -1) ? -1 : end - start);
if (name.len() != 4)
- report_error(1, "Invalid compressor '%s' specified", name.cstr());
+ report_error(1, "Invalid compressor '%s' specified", name.c_str());
chd_codec_type type = CHD_MAKE_TAG(name[0], name[1], name[2], name[3]);
if (!chd_codec_list::codec_exists(type))
- report_error(1, "Invalid compressor '%s' specified", name.cstr());
+ report_error(1, "Invalid compressor '%s' specified", name.c_str());
compression[index++] = type;
if (end == -1)
break;
@@ -1258,7 +1258,7 @@ void output_track_metadata(int mode, core_file *file, int tracknum, const cdrom_
}
// output TRACK entry
- core_fprintf(file, " TRACK %02d %s\n", tracknum + 1, tempstr.cstr());
+ core_fprintf(file, " TRACK %02d %s\n", tracknum + 1, tempstr.c_str());
// output PREGAP tag if pregap sectors are not in the file
if ((info.pregap > 0) && (info.pgdatasize == 0))
@@ -1296,7 +1296,7 @@ void output_track_metadata(int mode, core_file *file, int tracknum, const cdrom_
modesubmode.format("%s %s", cdrom_get_type_string(info.trktype), cdrom_get_subtype_string(info.subtype));
else
modesubmode.format("%s", cdrom_get_type_string(info.trktype));
- core_fprintf(file, "TRACK %s\n", modesubmode.cstr());
+ core_fprintf(file, "TRACK %s\n", modesubmode.c_str());
// write out the attributes
core_fprintf(file, "NO COPY\n");
@@ -1309,7 +1309,7 @@ void output_track_metadata(int mode, core_file *file, int tracknum, const cdrom_
// output pregap
astring tempstr;
if (info.pregap > 0)
- core_fprintf(file, "ZERO %s %s\n", modesubmode.cstr(), msf_string_from_frames(tempstr, info.pregap));
+ core_fprintf(file, "ZERO %s %s\n", modesubmode.c_str(), msf_string_from_frames(tempstr, info.pregap));
// all tracks but the first one have a file offset
if (tracknum > 0)
@@ -1340,7 +1340,7 @@ static void do_info(parameters_t &params)
// print filename and version
astring tempstr;
- printf("Input file: %s\n", params.find(OPTION_INPUT)->cstr());
+ printf("Input file: %s\n", params.find(OPTION_INPUT)->c_str());
printf("File Version: %d\n", input_chd.version());
if (input_chd.version() < 3)
report_error(1, "Unsupported version (%d); use an older chdman to upgrade to version 3 or later", input_chd.version());
@@ -1504,7 +1504,7 @@ static void do_verify(parameters_t &params)
UINT32 bytes_to_read = MIN((UINT32)buffer.count(), input_chd.logical_bytes() - offset);
chd_error err = input_chd.read_bytes(offset, buffer, bytes_to_read);
if (err != CHDERR_NONE)
- report_error(1, "Error reading CHD file (%s): %s", params.find(OPTION_INPUT)->cstr(), chd_file::error_string(err));
+ report_error(1, "Error reading CHD file (%s): %s", params.find(OPTION_INPUT)->c_str(), chd_file::error_string(err));
// add to the checksum
rawsha1.append(buffer, bytes_to_read);
@@ -1568,7 +1568,7 @@ static void do_create_raw(parameters_t &params)
{
file_error filerr = core_fopen(*input_file_str, OPEN_FLAG_READ, &input_file);
if (filerr != FILERR_NONE)
- report_error(1, "Unable to open file (%s)", input_file_str->cstr());
+ report_error(1, "Unable to open file (%s)", input_file_str->c_str());
}
// process output CHD
@@ -1604,10 +1604,10 @@ static void do_create_raw(parameters_t &params)
// print some info
astring tempstr;
- printf("Output CHD: %s\n", output_chd_str->cstr());
+ printf("Output CHD: %s\n", output_chd_str->c_str());
if (output_parent.opened())
- printf("Parent CHD: %s\n", params.find(OPTION_OUTPUT_PARENT)->cstr());
- printf("Input file: %s\n", input_file_str->cstr());
+ printf("Parent CHD: %s\n", params.find(OPTION_OUTPUT_PARENT)->c_str());
+ printf("Input file: %s\n", input_file_str->c_str());
if (input_start != 0 || input_end != core_fsize(input_file))
{
printf("Input start: %s\n", big_int_string(tempstr, input_start));
@@ -1629,7 +1629,7 @@ static void do_create_raw(parameters_t &params)
else
err = chd->create(*output_chd_str, input_end - input_start, hunk_size, unit_size, compression);
if (err != CHDERR_NONE)
- report_error(1, "Error creating CHD file (%s): %s", output_chd_str->cstr(), chd_file::error_string(err));
+ report_error(1, "Error creating CHD file (%s): %s", output_chd_str->c_str(), chd_file::error_string(err));
// if we have a parent, copy forward all the metadata
if (output_parent.opened())
@@ -1665,7 +1665,7 @@ static void do_create_hd(parameters_t &params)
{
file_error filerr = core_fopen(*input_file_str, OPEN_FLAG_READ, &input_file);
if (filerr != FILERR_NONE)
- report_error(1, "Unable to open file (%s)", input_file_str->cstr());
+ report_error(1, "Unable to open file (%s)", input_file_str->c_str());
}
// process output CHD
@@ -1740,11 +1740,11 @@ static void do_create_hd(parameters_t &params)
// load the file
file_error filerr = core_fload(*ident_str, identdata);
if (filerr != FILERR_NONE)
- report_error(1, "Error reading ident file (%s)", ident_str->cstr());
+ report_error(1, "Error reading ident file (%s)", ident_str->c_str());
// must be at least 14 bytes; extract CHS data from there
if (identdata.count() < 14)
- report_error(1, "Ident file '%s' is invalid (too short)", ident_str->cstr());
+ report_error(1, "Ident file '%s' is invalid (too short)", ident_str->c_str());
cylinders = (identdata[3] << 8) | identdata[2];
heads = (identdata[7] << 8) | identdata[6];
sectors = (identdata[13] << 8) | identdata[12];
@@ -1775,12 +1775,12 @@ static void do_create_hd(parameters_t &params)
// print some info
astring tempstr;
- printf("Output CHD: %s\n", output_chd_str->cstr());
+ printf("Output CHD: %s\n", output_chd_str->c_str());
if (output_parent.opened())
- printf("Parent CHD: %s\n", params.find(OPTION_OUTPUT_PARENT)->cstr());
+ printf("Parent CHD: %s\n", params.find(OPTION_OUTPUT_PARENT)->c_str());
if (input_file != NULL)
{
- printf("Input file: %s\n", input_file_str->cstr());
+ printf("Input file: %s\n", input_file_str->c_str());
if (input_start != 0 || input_end != core_fsize(input_file))
{
printf("Input start: %s\n", big_int_string(tempstr, input_start));
@@ -1807,7 +1807,7 @@ static void do_create_hd(parameters_t &params)
else
err = chd->create(*output_chd_str, UINT64(totalsectors) * UINT64(sector_size), hunk_size, sector_size, compression);
if (err != CHDERR_NONE)
- report_error(1, "Error creating CHD file (%s): %s", output_chd_str->cstr(), chd_file::error_string(err));
+ report_error(1, "Error creating CHD file (%s): %s", output_chd_str->c_str(), chd_file::error_string(err));
// add the standard hard disk metadata
astring metadata;
@@ -1856,7 +1856,7 @@ static void do_create_cd(parameters_t &params)
{
chd_error err = chdcd_parse_toc(*input_file_str, toc, track_info);
if (err != CHDERR_NONE)
- report_error(1, "Error parsing input file (%s: %s)\n", input_file_str->cstr(), chd_file::error_string(err));
+ report_error(1, "Error parsing input file (%s: %s)\n", input_file_str->c_str(), chd_file::error_string(err));
}
// process output CHD
@@ -1889,10 +1889,10 @@ static void do_create_cd(parameters_t &params)
// print some info
astring tempstr;
- printf("Output CHD: %s\n", output_chd_str->cstr());
+ printf("Output CHD: %s\n", output_chd_str->c_str());
if (output_parent.opened())
- printf("Parent CHD: %s\n", params.find(OPTION_OUTPUT_PARENT)->cstr());
- printf("Input file: %s\n", input_file_str->cstr());
+ printf("Parent CHD: %s\n", params.find(OPTION_OUTPUT_PARENT)->c_str());
+ printf("Input file: %s\n", input_file_str->c_str());
printf("Input tracks: %d\n", toc.numtrks);
printf("Input length: %s\n", msf_string_from_frames(tempstr, origtotalsectors));
printf("Compression: %s\n", compression_string(tempstr, compression));
@@ -1910,7 +1910,7 @@ static void do_create_cd(parameters_t &params)
else
err = chd->create(*output_chd_str, UINT64(totalsectors) * UINT64(CD_FRAME_SIZE), hunk_size, CD_FRAME_SIZE, compression);
if (err != CHDERR_NONE)
- report_error(1, "Error creating CHD file (%s): %s", output_chd_str->cstr(), chd_file::error_string(err));
+ report_error(1, "Error creating CHD file (%s): %s", output_chd_str->c_str(), chd_file::error_string(err));
// add the standard CD metadata; we do this even if we have a parent because it might be different
err = cdrom_write_metadata(chd, &toc);
@@ -1947,7 +1947,7 @@ static void do_create_ld(parameters_t &params)
{
avi_error avierr = avi_open(*input_file_str, &input_file);
if (avierr != AVIERR_NONE)
- report_error(1, "Error opening AVI file (%s): %s\n", input_file_str->cstr(), avi_error_string(avierr));
+ report_error(1, "Error opening AVI file (%s): %s\n", input_file_str->c_str(), avi_error_string(avierr));
}
const avi_movie_info *aviinfo = avi_get_movie_info(input_file);
@@ -1999,10 +1999,10 @@ static void do_create_ld(parameters_t &params)
// print some info
astring tempstr;
- printf("Output CHD: %s\n", output_chd_str->cstr());
+ printf("Output CHD: %s\n", output_chd_str->c_str());
if (output_parent.opened())
- printf("Parent CHD: %s\n", params.find(OPTION_OUTPUT_PARENT)->cstr());
- printf("Input file: %s\n", input_file_str->cstr());
+ printf("Parent CHD: %s\n", params.find(OPTION_OUTPUT_PARENT)->c_str());
+ printf("Input file: %s\n", input_file_str->c_str());
if (input_start != 0 && input_end != aviinfo->video_numsamples)
printf("Input start: %s\n", big_int_string(tempstr, input_start));
printf("Input length: %s (%02d:%02d:%02d)\n", big_int_string(tempstr, input_end - input_start),
@@ -2028,7 +2028,7 @@ static void do_create_ld(parameters_t &params)
else
err = chd->create(*output_chd_str, UINT64(input_end - input_start) * hunk_size, hunk_size, info.bytes_per_frame, compression);
if (err != CHDERR_NONE)
- report_error(1, "Error creating CHD file (%s): %s", output_chd_str->cstr(), chd_file::error_string(err));
+ report_error(1, "Error creating CHD file (%s): %s", output_chd_str->c_str(), chd_file::error_string(err));
// write the core A/V metadata
astring metadata;
@@ -2112,10 +2112,10 @@ static void do_copy(parameters_t &params)
// print some info
astring tempstr;
- printf("Output CHD: %s\n", output_chd_str->cstr());
+ printf("Output CHD: %s\n", output_chd_str->c_str());
if (output_parent.opened())
- printf("Parent CHD: %s\n", params.find(OPTION_OUTPUT_PARENT)->cstr());
- printf("Input CHD: %s\n", params.find(OPTION_INPUT)->cstr());
+ printf("Parent CHD: %s\n", params.find(OPTION_OUTPUT_PARENT)->c_str());
+ printf("Input CHD: %s\n", params.find(OPTION_INPUT)->c_str());
if (input_start != 0 || input_end != input_chd.logical_bytes())
{
printf("Input start: %s\n", big_int_string(tempstr, input_start));
@@ -2137,7 +2137,7 @@ static void do_copy(parameters_t &params)
else
err = chd->create(*output_chd_str, input_end - input_start, hunk_size, input_chd.unit_bytes(), compression);
if (err != CHDERR_NONE)
- report_error(1, "Error creating CHD file (%s): %s", output_chd_str->cstr(), chd_file::error_string(err));
+ report_error(1, "Error creating CHD file (%s): %s", output_chd_str->c_str(), chd_file::error_string(err));
// clone all the metadata, upgrading where appropriate
dynamic_buffer metadata;
@@ -2221,8 +2221,8 @@ static void do_extract_raw(parameters_t &params)
// print some info
astring tempstr;
- printf("Output File: %s\n", output_file_str->cstr());
- printf("Input CHD: %s\n", params.find(OPTION_INPUT)->cstr());
+ printf("Output File: %s\n", output_file_str->c_str());
+ printf("Input CHD: %s\n", params.find(OPTION_INPUT)->c_str());
if (input_start != 0 || input_end != input_chd.logical_bytes())
{
printf("Input start: %s\n", big_int_string(tempstr, input_start));
@@ -2236,7 +2236,7 @@ static void do_extract_raw(parameters_t &params)
// process output file
file_error filerr = core_fopen(*output_file_str, OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, &output_file);
if (filerr != FILERR_NONE)
- report_error(1, "Unable to open file (%s)", output_file_str->cstr());
+ report_error(1, "Unable to open file (%s)", output_file_str->c_str());
// copy all data
dynamic_buffer buffer((TEMP_BUFFER_SIZE / input_chd.hunk_bytes()) * input_chd.hunk_bytes());
@@ -2248,12 +2248,12 @@ static void do_extract_raw(parameters_t &params)
UINT32 bytes_to_read = MIN((UINT32)buffer.count(), input_end - offset);
chd_error err = input_chd.read_bytes(offset, buffer, bytes_to_read);
if (err != CHDERR_NONE)
- report_error(1, "Error reading CHD file (%s): %s", params.find(OPTION_INPUT)->cstr(), chd_file::error_string(err));
+ report_error(1, "Error reading CHD file (%s): %s", params.find(OPTION_INPUT)->c_str(), chd_file::error_string(err));
// write to the output
UINT32 count = core_fwrite(output_file, buffer, bytes_to_read);
if (count != bytes_to_read)
- report_error(1, "Error writing to file; check disk space (%s)", output_file_str->cstr());
+ report_error(1, "Error writing to file; check disk space (%s)", output_file_str->c_str());
// advance
offset += bytes_to_read;
@@ -2306,7 +2306,7 @@ static void do_extract_cd(parameters_t &params)
if (chop != -1)
default_name.substr(0, chop);
char basename[128];
- strncpy(basename, default_name.cstr(), 127);
+ strncpy(basename, default_name.c_str(), 127);
default_name.cat(".bin");
if (output_bin_file_str == NULL)
output_bin_file_str = &default_name;
@@ -2314,9 +2314,9 @@ static void do_extract_cd(parameters_t &params)
// print some info
astring tempstr;
- printf("Output TOC: %s\n", output_file_str->cstr());
- printf("Output Data: %s\n", output_bin_file_str->cstr());
- printf("Input CHD: %s\n", params.find(OPTION_INPUT)->cstr());
+ printf("Output TOC: %s\n", output_file_str->c_str());
+ printf("Output Data: %s\n", output_bin_file_str->c_str());
+ printf("Input CHD: %s\n", params.find(OPTION_INPUT)->c_str());
// catch errors so we can close & delete the output file
core_file *output_bin_file = NULL;
@@ -2337,14 +2337,14 @@ static void do_extract_cd(parameters_t &params)
// process output file
file_error filerr = core_fopen(*output_file_str, OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_NO_BOM, &output_toc_file);
if (filerr != FILERR_NONE)
- report_error(1, "Unable to open file (%s)", output_file_str->cstr());
+ report_error(1, "Unable to open file (%s)", output_file_str->c_str());
// process output BIN file
if (mode != MODE_GDI)
{
filerr = core_fopen(*output_bin_file_str, OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, &output_bin_file);
if (filerr != FILERR_NONE)
- report_error(1, "Unable to open file (%s)", output_bin_file_str->cstr());
+ report_error(1, "Unable to open file (%s)", output_bin_file_str->c_str());
}
// determine total frames
@@ -2384,7 +2384,7 @@ static void do_extract_cd(parameters_t &params)
filerr = core_fopen(trackbin_name, OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, &output_bin_file);
if (filerr != FILERR_NONE)
- report_error(1, "Unable to open file (%s)", trackbin_name.cstr());
+ report_error(1, "Unable to open file (%s)", trackbin_name.c_str());
outputoffs = 0;
}
@@ -2449,7 +2449,7 @@ static void do_extract_cd(parameters_t &params)
core_fseek(output_bin_file, outputoffs, SEEK_SET);
UINT32 byteswritten = core_fwrite(output_bin_file, buffer, bufferoffs);
if (byteswritten != bufferoffs)
- report_error(1, "Error writing frame %d to file (%s): %s\n", frame, output_file_str->cstr(), chd_file::error_string(CHDERR_WRITE_ERROR));
+ report_error(1, "Error writing frame %d to file (%s): %s\n", frame, output_file_str->c_str(), chd_file::error_string(CHDERR_WRITE_ERROR));
outputoffs += bufferoffs;
bufferoffs = 0;
}
@@ -2548,8 +2548,8 @@ static void do_extract_ld(parameters_t &params)
// print some info
astring tempstr;
- printf("Output File: %s\n", output_file_str->cstr());
- printf("Input CHD: %s\n", params.find(OPTION_INPUT)->cstr());
+ printf("Output File: %s\n", output_file_str->c_str());
+ printf("Input CHD: %s\n", params.find(OPTION_INPUT)->c_str());
if (input_start != 0 || input_end != input_chd.hunk_count())
{
printf("Input start: %s\n", big_int_string(tempstr, input_start));
@@ -2563,7 +2563,7 @@ static void do_extract_ld(parameters_t &params)
// process output file
avi_error avierr = avi_create(*output_file_str, &info, &output_file);
if (avierr != AVIERR_NONE)
- report_error(1, "Unable to open file (%s)", output_file_str->cstr());
+ report_error(1, "Unable to open file (%s)", output_file_str->c_str());
// create the codec configuration
avhuff_decompress_config avconfig;
@@ -2592,7 +2592,7 @@ static void do_extract_ld(parameters_t &params)
if (err != CHDERR_NONE)
{
UINT64 filepos = core_ftell(input_chd);
- report_error(1, "Error reading hunk %" I64FMT "d at offset %" I64FMT "d from CHD file (%s): %s\n", framenum, filepos, params.find(OPTION_INPUT)->cstr(), chd_file::error_string(err));
+ report_error(1, "Error reading hunk %" I64FMT "d at offset %" I64FMT "d from CHD file (%s): %s\n", framenum, filepos, params.find(OPTION_INPUT)->c_str(), chd_file::error_string(err));
}
// write audio
@@ -2600,7 +2600,7 @@ static void do_extract_ld(parameters_t &params)
{
avi_error avierr = avi_append_sound_samples(output_file, chnum, avconfig.audio[chnum], actsamples, 0);
if (avierr != AVIERR_NONE)
- report_error(1, "Error writing samples for hunk %" I64FMT "d to file (%s): %s\n", framenum, output_file_str->cstr(), avi_error_string(avierr));
+ report_error(1, "Error writing samples for hunk %" I64FMT "d to file (%s): %s\n", framenum, output_file_str->c_str(), avi_error_string(avierr));
}
// write video
@@ -2608,7 +2608,7 @@ static void do_extract_ld(parameters_t &params)
{
avi_error avierr = avi_append_video_frame(output_file, fullbitmap);
if (avierr != AVIERR_NONE)
- report_error(1, "Error writing video for hunk %" I64FMT "d to file (%s): %s\n", framenum, output_file_str->cstr(), avi_error_string(avierr));
+ report_error(1, "Error writing video for hunk %" I64FMT "d to file (%s): %s\n", framenum, output_file_str->c_str(), avi_error_string(avierr));
}
}
@@ -2671,7 +2671,7 @@ static void do_add_metadata(parameters_t &params)
{
file_error filerr = core_fload(*file_str, file);
if (filerr != FILERR_NONE)
- report_error(1, "Error reading metadata file (%s)", file_str->cstr());
+ report_error(1, "Error reading metadata file (%s)", file_str->c_str());
}
// make sure we have one or the other
@@ -2687,13 +2687,13 @@ static void do_add_metadata(parameters_t &params)
// print some info
astring tempstr;
- printf("Input file: %s\n", params.find(OPTION_INPUT)->cstr());
+ printf("Input file: %s\n", params.find(OPTION_INPUT)->c_str());
printf("Tag: %c%c%c%c\n", (tag >> 24) & 0xff, (tag >> 16) & 0xff, (tag >> 8) & 0xff, tag & 0xff);
printf("Index: %d\n", index);
if (text_str != NULL)
- printf("Text: %s\n", text.cstr());
+ printf("Text: %s\n", text.c_str());
else
- printf("Data: %s (%d bytes)\n", file_str->cstr(), file.count());
+ printf("Data: %s (%d bytes)\n", file_str->c_str(), file.count());
// write the metadata
chd_error err;
@@ -2736,7 +2736,7 @@ static void do_del_metadata(parameters_t &params)
// print some info
astring tempstr;
- printf("Input file: %s\n", params.find(OPTION_INPUT)->cstr());
+ printf("Input file: %s\n", params.find(OPTION_INPUT)->c_str());
printf("Tag: %c%c%c%c\n", (tag >> 24) & 0xff, (tag >> 16) & 0xff, (tag >> 8) & 0xff, tag & 0xff);
printf("Index: %d\n", index);
@@ -2795,17 +2795,17 @@ static void do_dump_metadata(parameters_t &params)
{
file_error filerr = core_fopen(*output_file_str, OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, &output_file);
if (filerr != FILERR_NONE)
- report_error(1, "Unable to open file (%s)", output_file_str->cstr());
+ report_error(1, "Unable to open file (%s)", output_file_str->c_str());
// output the metadata
UINT32 count = core_fwrite(output_file, buffer, buffer.count());
if (count != buffer.count())
- report_error(1, "Error writing file (%s)", output_file_str->cstr());
+ report_error(1, "Error writing file (%s)", output_file_str->c_str());
core_fclose(output_file);
// provide some feedback
astring tempstr;
- printf("File (%s) written, %s bytes\n", output_file_str->cstr(), big_int_string(tempstr, buffer.count()));
+ printf("File (%s) written, %s bytes\n", output_file_str->c_str(), big_int_string(tempstr, buffer.count()));
}
// flush to stdout