/* Extract the file name information from 'slotptr' into 'l_name', starting at l_name. Return 1 if terminator (zero byte) is found, 0 otherwise.  */
static int slot2str(dir_slot *slotptr, char *l_name, int *idx)
/* Extract the file name information from 'slotptr' into 'l_name', starting at l_name. Return 1 if terminator (zero byte) is found, 0 otherwise.  */
static int slot2str(dir_slot *slotptr, char *l_name, int *idx)
{
	int j;
	for (j = 0; j <= 8; j += 2) {
		l_name[*idx] = slotptr->name0_4[j];
		if (l_name[*idx] == 0x00)
			return 1;
		(*idx)++;
	}
	for (j = 0; j <= 10; j += 2) {
		l_name[*idx] = slotptr->name5_10[j];
		if (l_name[*idx] == 0x00)
			return 1;
		(*idx)++;
	}
	for (j = 0; j <= 2; j += 2) {
		l_name[*idx] = slotptr->name11_12[j];
		if (l_name[*idx] == 0x00)
			return 1;
		(*idx)++;
	}
	return 0;
}