Lines Matching refs:di
2123 UINT di, si, nc; local
2127 nc = 0; hs = 0; di = 0;
2129 if (si >= MAXDIRB(FF_MAX_LFN)) { di = 0; break; } /* Truncated directory block? */
2135 …wc = put_utf((DWORD)hs << 16 | wc, &fno->fname[di], FF_LFN_BUF - di); /* Store it in API encoding …
2136 if (wc == 0) { di = 0; break; } /* Buffer overflow or wrong encoding? */
2137 di += wc;
2140 if (hs != 0) di = 0; /* Broken surrogate pair? */
2141 if (di == 0) fno->fname[di++] = '?'; /* Inaccessible object name? */
2142 fno->fname[di] = 0; /* Terminate the name */
2428 UINT di, ni; local
2436 …for (nc = fs->dirbuf[XDIR_NumName], di = SZDIRE * 2, ni = 0; nc; nc--, di += 2, ni++) { /* Compare…
2437 if ((di % SZDIRE) == 0) di += 2;
2438 if (ff_wtoupper(ld_word(fs->dirbuf + di)) != ff_wtoupper(fs->lfnbuf[ni])) break;
2650 UINT si, di; local
2672 si = di = hs = 0;
2678 …wc = put_utf((DWORD)hs << 16 | wc, &fno->fname[di], FF_LFN_BUF - di); /* Store it in UTF-16 or UTF…
2679 if (wc == 0) { di = 0; break; } /* Invalid char or buffer overflow? */
2680 di += wc;
2683 if (hs != 0) di = 0; /* Broken surrogate pair? */
2684 fno->fname[di] = 0; /* Terminate the LFN (null string means LFN is invalid) */
2688 si = di = 0;
2693 if (si == 9 && di < FF_SFN_BUF) fno->altname[di++] = '.'; /* Insert a . if extension is exist */
2699 if (wc == 0) { di = 0; break; } /* Wrong char in the current code page? */
2700 wc = put_utf(wc, &fno->altname[di], FF_SFN_BUF - di); /* Store it in Unicode */
2701 if (wc == 0) { di = 0; break; } /* Buffer overflow? */
2702 di += wc;
2704 fno->altname[di++] = (TCHAR)wc; /* Store it without any conversion */
2707 fno->altname[di] = 0; /* Terminate the SFN (null string means SFN is invalid) */
2710 if (di == 0) { /* If LFN and SFN both are invalid, this object is inaccesible */
2711 fno->fname[di++] = '?';
2713 …for (si = di = 0, lcf = NS_BODY; fno->altname[si]; si++, di++) { /* Copy altname[] to fname[] with…
2717 fno->fname[di] = (TCHAR)wc;
2720 fno->fname[di] = 0; /* Terminate the LFN */
2725 si = di = 0;
2730 if (si == 9) fno->fname[di++] = '.';/* Insert a . if extension is exist */
2731 fno->fname[di++] = c;
2733 fno->fname[di] = 0;
2838 UINT i, ni, si, di; local
2843 p = *path; lfn = dp->obj.fs->lfnbuf; di = 0;
2847 if (uc >= 0x10000) lfn[di++] = (WCHAR)(uc >> 16); /* Store high surrogate if needed */
2851 if (di >= FF_MAX_LFN) return FR_INVALID_NAME; /* Reject too long name */
2852 lfn[di++] = wc; /* Store the Unicode character */
2859 if ((di == 1 && lfn[di - 1] == '.') ||
2860 (di == 2 && lfn[di - 1] == '.' && lfn[di - 2] == '.')) { /* Is this segment a dot name? */
2861 lfn[di] = 0;
2863 dp->fn[i] = (i < di) ? '.' : ' ';
2869 while (di) { /* Snip off trailing spaces and dots if exist */
2870 wc = lfn[di - 1];
2872 di--;
2874 lfn[di] = 0; /* LFN is created into the working buffer */
2875 if (di == 0) return FR_INVALID_NAME; /* Reject null name */
2880 while (di > 0 && lfn[di - 1] != '.') di--; /* Find last dot (di<=si: no extension) */
2887 if (wc == ' ' || (wc == '.' && si != di)) { /* Remove embedded spaces and dots */
2892 if (i >= ni || si == di) { /* End of field? */
2897 if (si != di) cf |= NS_LOSS | NS_LFN; /* Name body overflow? */
2898 if (si > di) break; /* No name extension? */
2899 si = di; i = 8; ni = 11; b <<= 2; /* Enter name extension */
5164 UINT si, di; local
5181 …for (si = di = hs = 0; si < dj.dir[XDIR_NumLabel]; si++) { /* Extract volume label from 83 entry */
5186 wc = put_utf((DWORD)hs << 16 | wc, &label[di], 4);
5187 if (wc == 0) { di = 0; break; }
5188 di += wc;
5191 if (hs != 0) di = 0; /* Broken surrogate pair? */
5192 label[di] = 0;
5196 si = di = 0; /* Extract volume label from AM_VOL entry */
5202 if (wc != 0) wc = put_utf(wc, &label[di], 4); /* Put it in Unicode */
5203 if (wc == 0) { di = 0; break; }
5204 di += wc;
5206 label[di++] = (TCHAR)wc;
5210 label[di] = 0;
5211 if (di == 0) break;
5212 } while (label[--di] == ' ');
5228 di = BPB_VolIDEx; break;
5231 di = BS_VolID32; break;
5234 di = BS_VolID;
5236 *vsn = ld_dword(fs->win + di);
5258 UINT di; local
5272 di = 0;
5276 if (dc == 0xFFFFFFFF || di >= 10) { /* Wrong surrogate or buffer overflow */
5279 st_word(dirvn + di * 2, (WCHAR)(dc >> 16)); di++;
5282 …if (dc == 0 || chk_chr(badchr + 7, (int)dc) || di >= 11) { /* Check validity of the volume label */
5285 st_word(dirvn + di * 2, (WCHAR)dc); di++;
5291 di = 0;
5306 …if (wc == 0 || chk_chr(badchr + 0, (int)wc) || di >= (UINT)((wc >= 0x100) ? 10 : 11)) { /* Reject …
5309 if (wc >= 0x100) dirvn[di++] = (BYTE)(wc >> 8);
5310 dirvn[di++] = (BYTE)wc;
5313 while (di && dirvn[di - 1] == ' ') di--; /* Snip trailing spaces */
5323 dj.dir[XDIR_NumLabel] = (BYTE)di; /* Change the volume label */
5326 if (di != 0) {
5337 if (di != 0) { /* Create a volume label entry */
5343 dj.dir[XDIR_NumLabel] = (BYTE)di;