Lines Matching refs:di

1908 	UINT ni, di;  local
1916 for (pchr = 1, di = 0; di < 13; di++) { /* Process all characters in the entry */
1917 chr = ld_word(dir + LfnOfs[di]); /* Pick a character from the entry */
1944 UINT ni, di; local
1952 for (pchr = 1, di = 0; di < 13; di++) { /* Process all characters in the entry */
1953 chr = ld_word(dir + LfnOfs[di]); /* Pick a character from the entry */
1984 UINT ni, di; local
1994 di = chr = 0;
1997 st_word(dir + LfnOfs[di], chr); /* Set it */
1999 } while (++di < 13);
2421 UINT di, ni; local
2429 …for (nc = fs->dirbuf[XDIR_NumName], di = SZDIRE * 2, ni = 0; nc; nc--, di += 2, ni++) { /* Compare…
2430 if ((di % SZDIRE) == 0) di += 2;
2431 if (ff_wtoupper(ld_word(fs->dirbuf + di)) != ff_wtoupper(fs->lfnbuf[ni])) break;
2644 UINT si, di; local
2663 si = SZDIRE * 2; di = 0; /* 1st C1 entry in the entry block */
2667 di = 0; break;
2674 …nw = put_utf((DWORD)hs << 16 | wc, &fno->fname[di], FF_LFN_BUF - di); /* Store it in API encoding …
2676 di = 0; break;
2678 di += nw;
2681 if (hs != 0) di = 0; /* Broken surrogate pair? */
2682 if (di == 0) fno->fname[di++] = '\?'; /* Inaccessible object name? */
2683 fno->fname[di] = 0; /* Terminate the name */
2695 si = di = 0;
2702 …nw = put_utf((DWORD)hs << 16 | wc, &fno->fname[di], FF_LFN_BUF - di); /* Store it in API encoding …
2704 di = 0; break;
2706 di += nw;
2709 if (hs != 0) di = 0; /* Broken surrogate pair? */
2710 fno->fname[di] = 0; /* Terminate the LFN (null string means LFN is invalid) */
2714 si = di = 0;
2719 if (si == 9 && di < FF_SFN_BUF) fno->altname[di++] = '.'; /* Insert a . if extension is exist */
2726 di = 0; break;
2728 nw = put_utf(wc, &fno->altname[di], FF_SFN_BUF - di); /* Store it in API encoding */
2730 di = 0; break;
2732 di += nw;
2734 fno->altname[di++] = (TCHAR)wc; /* Store it without any conversion */
2737 fno->altname[di] = 0; /* Terminate the SFN (null string means SFN is invalid) */
2740 if (di == 0) { /* If LFN and SFN both are invalid, this object is inaccessible */
2741 fno->fname[di++] = '\?';
2743 …for (si = di = 0, lcf = NS_BODY; fno->altname[si]; si++, di++) { /* Copy altname[] to fname[] with…
2747 fno->fname[di] = (TCHAR)wc;
2750 fno->fname[di] = 0; /* Terminate the LFN */
2755 si = di = 0;
2760 if (si == 9) fno->fname[di++] = '.';/* Insert a . if extension is exist */
2761 fno->fname[di++] = c;
2763 fno->fname[di] = 0; /* Terminate the SFN */
2880 UINT i, ni, si, di; local
2884 p = *path; lfn = dp->obj.fs->lfnbuf; di = 0;
2888 if (uc >= 0x10000) lfn[di++] = (WCHAR)(uc >> 16); /* Store high surrogate if needed */
2892 if (di >= FF_MAX_LFN) return FR_INVALID_NAME; /* Reject too long name */
2893 lfn[di++] = wc; /* Store the Unicode character */
2905 if ((di == 1 && lfn[di - 1] == '.') ||
2906 (di == 2 && lfn[di - 1] == '.' && lfn[di - 2] == '.')) { /* Is this segment a dot name? */
2907 lfn[di] = 0;
2909 dp->fn[i] = (i < di) ? '.' : ' ';
2915 while (di) { /* Snip off trailing spaces and dots if exist */
2916 wc = lfn[di - 1];
2918 di--;
2920 lfn[di] = 0; /* LFN is created into the working buffer */
2921 if (di == 0) return FR_INVALID_NAME; /* Reject null name */
2926 while (di > 0 && lfn[di - 1] != '.') di--; /* Find last dot (di<=si: no extension) */
2933 if (wc == ' ' || (wc == '.' && si != di)) { /* Remove embedded spaces and dots */
2938 if (i >= ni || si == di) { /* End of field? */
2943 if (si != di) cf |= NS_LOSS | NS_LFN; /* Name body overflow? */
2944 if (si > di) break; /* No name extension? */
2945 si = di; i = 8; ni = 11; b <<= 2; /* Enter name extension */
5368 UINT si, di; local
5386 …for (si = di = hs = 0; si < dj.dir[XDIR_NumLabel]; si++) { /* Extract volume label from 83 entry */
5391 nw = put_utf((DWORD)hs << 16 | wc, &label[di], 4); /* Store it in API encoding */
5393 di = 0; break;
5395 di += nw;
5398 if (hs != 0) di = 0; /* Broken surrogate pair? */
5399 label[di] = 0;
5403 si = di = 0; /* Extract volume label from AM_VOL entry */
5410 di = 0; break;
5412 di += put_utf(wc, &label[di], 4); /* Store it in Unicode */
5414 label[di++] = (TCHAR)wc;
5418 label[di] = 0;
5419 if (di == 0) break;
5420 } while (label[--di] == ' ');
5436 di = BPB_VolIDEx;
5440 di = BS_VolID32;
5444 di = fs->win[BS_BootSig] == 0x29 ? BS_VolID : 0;
5446 *vsn = di ? ld_dword(fs->win + di) : 0; /* Get VSN in the VBR */
5468 UINT di; local
5485 di = 0;
5489 if (dc == 0xFFFFFFFF || di >= 10) { /* Wrong surrogate or buffer overflow */
5492 st_word(dirvn + di * 2, (WCHAR)(dc >> 16)); di++;
5495 … if (dc == 0 || strchr(&badchr[7], (int)dc) || di >= 11) { /* Check validity of the volume label */
5498 st_word(dirvn + di * 2, (WCHAR)dc); di++;
5504 di = 0;
5519 …if (wc == 0 || strchr(&badchr[0], (int)wc) || di >= (UINT)((wc >= 0x100) ? 10 : 11)) { /* Reject i…
5522 if (wc >= 0x100) dirvn[di++] = (BYTE)(wc >> 8);
5523 dirvn[di++] = (BYTE)wc;
5526 while (di && dirvn[di - 1] == ' ') di--; /* Snip trailing spaces */
5536 dj.dir[XDIR_NumLabel] = (BYTE)di; /* Change the volume label */
5539 if (di != 0) {
5550 if (di != 0) { /* Create a volume label entry */
5556 dj.dir[XDIR_NumLabel] = (BYTE)di;