Lines Matching refs:fl

233     FileList fl = NEW_(FileList);
234 fl->capacity = capacity;
235 fl->files = (char **) JLI_MemAlloc(capacity * sizeof(fl->files[0]));
236 fl->size = 0;
237 return fl;
243 FileList_free(FileList fl)
245 if (fl) {
246 if (fl->files) {
248 for (i = 0; i < fl->size; i++)
249 JLI_MemFree(fl->files[i]);
250 JLI_MemFree(fl->files);
252 JLI_MemFree(fl);
257 FileList_ensureCapacity(FileList fl, int capacity)
259 if (fl->capacity < capacity) {
260 while (fl->capacity < capacity)
261 fl->capacity *= 2;
262 fl->files = JLI_MemRealloc(fl->files,
263 fl->capacity * sizeof(fl->files[0]));
268 FileList_add(FileList fl, char *file)
270 FileList_ensureCapacity(fl, fl->size+1);
271 fl->files[fl->size++] = file;
275 FileList_addSubstring(FileList fl, const char *beg, int len)
280 FileList_ensureCapacity(fl, fl->size+1);
281 fl->files[fl->size++] = filename;
285 FileList_join(FileList fl, char sep)
291 for (i = 0, size = 1; i < fl->size; i++)
292 size += (int)JLI_StrLen(fl->files[i]) + 1;
296 for (i = 0, p = path; i < fl->size; i++) {
297 int len = (int)JLI_StrLen(fl->files[i]);
299 memcpy(p, fl->files[i], len);
313 FileList fl;
316 fl = FileList_new(count);
320 FileList_addSubstring(fl, p, q - p);
322 return fl;
357 FileList fl = FileList_new(16);
363 FileList_add(fl, wildcardConcat(wildcard, basename));
365 return fl;
379 FileList_expandWildcards(FileList fl)
382 for (i = 0; i < fl->size; i++) {
383 if (isWildcard(fl->files[i])) {
384 FileList expanded = wildcardFileList(fl->files[i]);
386 JLI_MemFree(fl->files[i]);
387 FileList_ensureCapacity(fl, fl->size + expanded->size);
388 for (j = fl->size - 1; j >= i+1; j--)
389 fl->files[j+expanded->size-1] = fl->files[j];
391 fl->files[i+j] = expanded->files[j];
393 fl->size += expanded->size - 1;
394 /* fl expropriates expanded's elements. */
406 FileList fl;
410 fl = FileList_split(classpath, PATH_SEPARATOR);
411 FileList_expandWildcards(fl);
412 expanded = FileList_join(fl, PATH_SEPARATOR);
413 FileList_free(fl);
424 FileList_print(FileList fl)
428 for (i = 0; i < fl->size; i++) {
430 printf("\"%s\"",fl->files[i]);