Consolidated the single copies of IsoWriteOpts members in Ecma119Image

by having a copy of the whole IsoWriteOpts in Ecma119Image
This commit is contained in:
2013-12-22 19:02:44 +01:00
parent 3e3c15812b
commit fa61b94ac8
14 changed files with 400 additions and 483 deletions

View File

@ -2246,3 +2246,20 @@ void iso_smash_chars_for_joliet(uint16_t *name)
set_ucsbe(name + i, '_');
}
int iso_clone_mem(char *in, char **out, size_t size)
{
if (in == NULL) {
*out = NULL;
return 1;
}
if (size == 0)
size = strlen(in) + 1;
*out = calloc(1, size);
if (*out == NULL)
return ISO_OUT_OF_MEM;
memcpy(*out, in, size);
return 1;
}