#include <stdio.h>
#include <stdlib.h>
-#include <dirent.h>
#include <errno.h>
#include <ctype.h>
#include <string.h>
/* Check for filename */
if ((c1.rbitmap & (1<<DIRPBIT_LNAME))) {
- if ( (size_t)(-1) == (len = convert_string(vol->v_maccharset, CH_UCS2, path->m_name, strlen(path->m_name), convbuf, 512)) )
+ if ( (size_t)(-1) == (len = convert_string(vol->v_maccharset, CH_UCS2, path->m_name, -1, convbuf, 512)) )
goto crit_check_ret;
if ((c1.rbitmap & (1<<CATPBIT_PARTIAL))) {
}
/* Parse file specifications */
- spec1 = ibuf;
- spec2 = ibuf + spec_len + 2;
+ spec1 = (unsigned char*)ibuf;
+ spec2 = (unsigned char*)ibuf + spec_len + 2;
spec1 += 2;
spec2 += 2;
/* Get the long filename */
memcpy(tmppath, bspec1 + spec1[1] + 1, (bspec1 + spec1[1])[0]);
tmppath[(bspec1 + spec1[1])[0]]= 0;
- len = convert_string ( vol->v_maccharset, CH_UCS2, tmppath, strlen(tmppath), c1.lname, sizeof(c1.lname));
+ len = convert_string ( vol->v_maccharset, CH_UCS2, tmppath, -1, c1.lname, sizeof(c1.lname));
if (len == (size_t)(-1))
return AFPERR_PARAM;