Lines Matching refs:ncl

1277 	DWORD ncl	/* Number of contiguous clusters to find (1..) */  in find_bitmap()  argument
1298 if (++ctr == ncl) return scl + 2; /* Check if run length is sufficient for required */ in find_bitmap()
1317 DWORD ncl, /* Number of clusters to be changed */ in change_bitmap() argument
1337 if (--ncl == 0) return FR_OK; /* All bits processed? */ in change_bitmap()
1499 DWORD cs, ncl, scl; in create_chain() local
1519 ncl = find_bitmap(fs, scl, 1); /* Find a free cluster */ in create_chain()
1520 if (ncl == 0 || ncl == 0xFFFFFFFF) return ncl; /* No free cluster or hard error? */ in create_chain()
1521 res = change_bitmap(fs, ncl, 1, 1); /* Mark the cluster 'in use' */ in create_chain()
1527 if (obj->stat == 2 && ncl != scl + 1) { /* Is the chain got fragmented? */ in create_chain()
1533 if (ncl == clst + 1) { /* Is the cluster next to previous one? */ in create_chain()
1537 res = fill_last_frag(obj, clst, ncl); /* Fill last fragment on the FAT and link it to new one */ in create_chain()
1544 ncl = 0; in create_chain()
1546 ncl = scl + 1; /* Test if next cluster is free */ in create_chain()
1547 if (ncl >= fs->n_fatent) ncl = 2; in create_chain()
1548 cs = get_fat(obj, ncl); /* Get next cluster status */ in create_chain()
1553 ncl = 0; in create_chain()
1556 if (ncl == 0) { /* The new cluster cannot be contiguous and find another fragment */ in create_chain()
1557 ncl = scl; /* Start cluster */ in create_chain()
1559 ncl++; /* Next cluster */ in create_chain()
1560 if (ncl >= fs->n_fatent) { /* Check wrap-around */ in create_chain()
1561 ncl = 2; in create_chain()
1562 if (ncl > scl) return 0; /* No free cluster found? */ in create_chain()
1564 cs = get_fat(obj, ncl); /* Get the cluster status */ in create_chain()
1567 if (ncl == scl) return 0; /* No free cluster found? */ in create_chain()
1570 res = put_fat(fs, ncl, 0xFFFFFFFF); /* Mark the new cluster 'EOC' */ in create_chain()
1572 res = put_fat(fs, clst, ncl); /* Link it from the previous one if needed */ in create_chain()
1577 fs->last_clst = ncl; in create_chain()
1581 ncl = (res == FR_DISK_ERR) ? 0xFFFFFFFF : 1; /* Failed. Generate error status */ in create_chain()
1584 return ncl; /* Return new cluster number or error status */ in create_chain()
1602 DWORD cl, ncl, *tbl; in clmt_clust() local
1609 ncl = *tbl++; /* Number of cluters in the fragment */ in clmt_clust()
1610 if (ncl == 0) return 0; /* End of table? (error) */ in clmt_clust()
1611 if (cl < ncl) break; /* In this fragment? */ in clmt_clust()
1612 cl -= ncl; tbl++; /* Next fragment */ in clmt_clust()
4378 DWORD cl, pcl, ncl, tcl, tlen, ulen; local
4401 tcl = cl; ncl = 0; ulen += 2; /* Top, length and used items */
4403 pcl = cl; ncl++;
4409 *tbl++ = ncl; *tbl++ = tcl;
4848 DWORD ncl; local
4860 ncl = get_fat(&fp->obj, fp->clust);
4862 if (ncl == 0xFFFFFFFF) res = FR_DISK_ERR;
4863 if (ncl == 1) res = FR_INT_ERR;
4864 if (res == FR_OK && ncl < fs->n_fatent) {
4865 res = remove_chain(&fp->obj, ncl, fp->clust);
5499 DWORD n, clst, stcl, scl, ncl, tcl, lclst; local
5529 scl = clst = stcl; ncl = 0;
5536 if (++ncl == tcl) break; /* Break if a contiguous cluster block is found */
5538 scl = clst; ncl = 0; /* Not a free cluster */