Lines Matching refs:ncl
1323 DWORD ncl /* Number of contiguous clusters to find (1..) */ in find_bitmap() argument
1344 if (++ctr == ncl) return scl + 2; /* Check if run length is sufficient for required */ in find_bitmap()
1363 DWORD ncl, /* Number of clusters to be changed */ in change_bitmap() argument
1383 if (--ncl == 0) return FR_OK; /* All bits processed? */ in change_bitmap()
1545 DWORD cs, ncl, scl; in create_chain() local
1565 ncl = find_bitmap(fs, scl, 1); /* Find a free cluster */ in create_chain()
1566 if (ncl == 0 || ncl == 0xFFFFFFFF) return ncl; /* No free cluster or hard error? */ in create_chain()
1567 res = change_bitmap(fs, ncl, 1, 1); /* Mark the cluster 'in use' */ in create_chain()
1573 if (obj->stat == 2 && ncl != scl + 1) { /* Is the chain got fragmented? */ in create_chain()
1579 if (ncl == clst + 1) { /* Is the cluster next to previous one? */ in create_chain()
1583 res = fill_last_frag(obj, clst, ncl); /* Fill last fragment on the FAT and link it to new one */ in create_chain()
1590 ncl = 0; in create_chain()
1592 ncl = scl + 1; /* Test if next cluster is free */ in create_chain()
1593 if (ncl >= fs->n_fatent) ncl = 2; in create_chain()
1594 cs = get_fat(obj, ncl); /* Get next cluster status */ in create_chain()
1599 ncl = 0; in create_chain()
1602 if (ncl == 0) { /* The new cluster cannot be contiguous and find another fragment */ in create_chain()
1603 ncl = scl; /* Start cluster */ in create_chain()
1605 ncl++; /* Next cluster */ in create_chain()
1606 if (ncl >= fs->n_fatent) { /* Check wrap-around */ in create_chain()
1607 ncl = 2; in create_chain()
1608 if (ncl > scl) return 0; /* No free cluster found? */ in create_chain()
1610 cs = get_fat(obj, ncl); /* Get the cluster status */ in create_chain()
1613 if (ncl == scl) return 0; /* No free cluster found? */ in create_chain()
1616 res = put_fat(fs, ncl, 0xFFFFFFFF); /* Mark the new cluster 'EOC' */ in create_chain()
1618 res = put_fat(fs, clst, ncl); /* Link it from the previous one if needed */ in create_chain()
1623 fs->last_clst = ncl; in create_chain()
1629 ncl = (res == FR_DISK_ERR) ? 0xFFFFFFFF : 1; /* Failed. Generate error status */ in create_chain()
1632 return ncl; /* Return new cluster number or error status */ in create_chain()
1650 DWORD cl, ncl; in clmt_clust() local
1658 ncl = *tbl++; /* Number of cluters in the fragment */ in clmt_clust()
1659 if (ncl == 0) return 0; /* End of table? (error) */ in clmt_clust()
1660 if (cl < ncl) break; /* In this fragment? */ in clmt_clust()
1661 cl -= ncl; tbl++; /* Next fragment */ in clmt_clust()
4459 DWORD cl, pcl, ncl, tcl, tlen, ulen; local
4482 tcl = cl; ncl = 0; ulen += 2; /* Top, length and used items */
4484 pcl = cl; ncl++;
4490 *tbl++ = ncl; *tbl++ = tcl;
4933 DWORD ncl; local
4945 ncl = get_fat(&fp->obj, fp->clust);
4947 if (ncl == 0xFFFFFFFF) res = FR_DISK_ERR;
4948 if (ncl == 1) res = FR_INT_ERR;
4949 if (res == FR_OK && ncl < fs->n_fatent) {
4950 res = remove_chain(&fp->obj, ncl, fp->clust);
5591 DWORD n, clst, stcl, scl, ncl, tcl, lclst; local
5621 scl = clst = stcl; ncl = 0;
5632 if (++ncl == tcl) break; /* Break if a contiguous cluster block is found */
5634 scl = clst; ncl = 0; /* Not a free cluster */