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;
242 FileList_print(FileList fl)
246 for (i = 0; i < fl->size; i++) {
248 printf("\"%s\"",fl->files[i]);
255 FileList_free(FileList fl)
257 if (fl) {
258 if (fl->files) {
260 for (i = 0; i < fl->size; i++)
261 JLI_MemFree(fl->files[i]);
262 JLI_MemFree(fl->files);
264 JLI_MemFree(fl);
269 FileList_ensureCapacity(FileList fl, int capacity)
271 if (fl->capacity < capacity) {
272 while (fl->capacity < capacity)
273 fl->capacity *= 2;
274 fl->files = JLI_MemRealloc(fl->files,
275 fl->capacity * sizeof(fl->files[0]));
280 FileList_add(FileList fl, char *file)
282 FileList_ensureCapacity(fl, fl->size+1);
283 fl->files[fl->size++] = file;
287 FileList_addSubstring(FileList fl, const char *beg, int len)
292 FileList_ensureCapacity(fl, fl->size+1);
293 fl->files[fl->size++] = filename;
297 FileList_join(FileList fl, char sep)
303 for (i = 0, size = 1; i < fl->size; i++)
304 size += strlen(fl->files[i]) + 1;
308 for (i = 0, p = path; i < fl->size; i++) {
309 int len = strlen(fl->files[i]);
311 memcpy(p, fl->files[i], len);
325 FileList fl;
328 fl = FileList_new(count);
332 FileList_addSubstring(fl, p, q - p);
334 return fl;
369 FileList fl = FileList_new(16);
375 FileList_add(fl, wildcardConcat(wildcard, basename));
377 return fl;
391 FileList_expandWildcards(FileList fl)
394 for (i = 0; i < fl->size; i++) {
395 if (isWildcard(fl->files[i])) {
396 FileList expanded = wildcardFileList(fl->files[i]);
398 JLI_MemFree(fl->files[i]);
399 FileList_ensureCapacity(fl, fl->size + expanded->size);
400 for (j = fl->size - 1; j >= i+1; j--)
401 fl->files[j+expanded->size-1] = fl->files[j];
403 fl->files[i+j] = expanded->files[j];
405 fl->size += expanded->size - 1;
406 /* fl expropriates expanded's elements. */
418 FileList fl;
422 fl = FileList_split(classpath, PATH_SEPARATOR);
423 FileList_expandWildcards(fl);
424 expanded = FileList_join(fl, PATH_SEPARATOR);
425 FileList_free(fl);