if(strcmp(&filenames[i][strlen(filenames[i]) - 4], ".dsc") == 0) { dscs[j] = LOADER_LOAD_DSC(filenames[i]); if(dscs[j] != NULL) { ++j; }
dscs[j] = LOADER_LOAD_DSC(filenames[i]); if(dscs[j] != NULL) { ++j;
loaddirectory(void){  unsigned char i, j;    if(cbm_opendir(LFN, 8) != 0) {    show_statustext("Cannot open directory");  } else {    i = 0;    while(cbm_readdir(LFN, &dirent) == 0) {      strncpy(filenames[i], dirent.name, 16);      ++i;      if(i == MAX_NUMFILES) {	break;      }    }    cbm_closedir(LFN);    numfiles = i;    j = 0;    for(i = 0; i < numfiles; ++i) {      if(strcmp(&filenames[i][strlen(filenames[i]) - 4], ".dsc") == 0) {	dscs[j] = LOADER_LOAD_DSC(filenames[i]);	if(dscs[j] != NULL) {	  ++j;	}      }    }    show_statustext("Directory loaded");  }}