Lines Matching refs:needed
117 size_t needed, count; in fix_excessive_path() local
137 needed = mbstowcs(NULL, in, 0); in fix_excessive_path()
138 if(needed == (size_t)-1 || needed >= max_path_len) in fix_excessive_path()
140 ++needed; /* for NUL */ in fix_excessive_path()
141 ibuf = malloc(needed * sizeof(wchar_t)); in fix_excessive_path()
144 count = mbstowcs(ibuf, in, needed); in fix_excessive_path()
145 if(count == (size_t)-1 || count >= needed) in fix_excessive_path()
155 needed = (size_t)GetFullPathNameW(in_w, 0, NULL, NULL); in fix_excessive_path()
156 if(!needed || needed > max_path_len) in fix_excessive_path()
159 if(needed <= MAX_PATH) in fix_excessive_path()
161 fbuf = malloc(needed * sizeof(wchar_t)); in fix_excessive_path()
164 count = (size_t)GetFullPathNameW(in_w, (DWORD)needed, fbuf, NULL); in fix_excessive_path()
165 if(!count || count >= needed) in fix_excessive_path()
190 needed = 8 + (count - 2) + 1; in fix_excessive_path()
191 if(needed > max_path_len) in fix_excessive_path()
194 temp = malloc(needed * sizeof(wchar_t)); in fix_excessive_path()
203 needed = 4 + count + 1; in fix_excessive_path()
204 if(needed > max_path_len) in fix_excessive_path()
207 temp = malloc(needed * sizeof(wchar_t)); in fix_excessive_path()
221 needed = wcstombs(NULL, fbuf, 0); in fix_excessive_path()
222 if(needed == (size_t)-1 || needed >= max_path_len) in fix_excessive_path()
224 ++needed; /* for NUL */ in fix_excessive_path()
225 obuf = malloc(needed); in fix_excessive_path()
228 count = wcstombs(obuf, fbuf, needed); in fix_excessive_path()
229 if(count == (size_t)-1 || count >= needed) in fix_excessive_path()