Add support for ISO-9660:1999.

This commit is contained in:
Vreixo Formoso
2008-01-16 21:51:41 +01:00
parent 46507e68aa
commit 5ed68d20e9
12 changed files with 924 additions and 24 deletions

View File

@ -1086,6 +1086,26 @@ char *strcopy(const char *buf, size_t len)
return str;
}
/**
* Copy up to \p max characters from \p src to \p dest. If \p src has less than
* \p max characters, we pad dest with " " characters.
*/
void strncpy_pad(char *dest, const char *src, size_t max)
{
size_t len, i;
if (src != NULL) {
len = MIN(strlen(src), max);
} else {
len = 0;
}
for (i = 0; i < len; ++i)
dest[i] = src[i];
for (i = len; i < max; ++i)
dest[i] = ' ';
}
char *ucs2str(const char *buf, size_t len)
{
size_t outbytes, inbytes;