- Timestamp:
- Oct 15, 2008 1:08:24 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/incdep.c
r1863 r1865 126 126 127 127 /* the parameters */ 128 struct nameseq *filenames; /* One only, its name is a strcache entry. */128 struct incdep_strcache_entry *filename_entry; /* Converted to a nameseq record. */ 129 129 const char *pattern; /* NULL */ 130 130 const char *pattern_percent; /* NULL */ … … 800 800 void *free_me = rec_f; 801 801 struct dep *dep; 802 struct nameseq *filenames; 802 803 803 804 for (dep = rec_f->deps; dep; dep = dep->next) 804 805 dep->name = incdep_flush_strcache_entry (dep->name); 805 rec_f->filenames->name = incdep_flush_strcache_entry (rec_f->filenames->name); 806 807 record_files (rec_f->filenames, 806 807 filenames = (struct nameseq *) alloccache_alloc (&nameseq_cache); 808 filenames->next = 0; 809 filenames->name = incdep_flush_strcache_entry (rec_f->filename_entry); 810 811 record_files (filenames, 808 812 rec_f->pattern, 809 813 rec_f->pattern_percent, … … 951 955 static void 952 956 incdep_record_files (struct incdep *cur, 953 struct nameseq *filenames, const char *pattern,957 const char *filename, const char *pattern, 954 958 const char *pattern_percent, struct dep *deps, 955 959 unsigned int cmds_started, char *commands, … … 958 962 { 959 963 if (cur->worker_tid == -1) 960 record_files (filenames, pattern, pattern_percent, deps, cmds_started, 961 commands, commands_idx, two_colon, flocp); 964 { 965 struct nameseq *filenames = (struct nameseq *) alloccache_alloc (&nameseq_cache); 966 filenames->next = 0; 967 filenames->name = filename; 968 record_files (filenames, pattern, pattern_percent, deps, cmds_started, 969 commands, commands_idx, two_colon, flocp); 970 } 962 971 #ifdef PARSE_IN_WORKER 963 972 else … … 965 974 struct incdep_recorded_files *rec = incdep_xmalloc (cur, sizeof (*rec)); 966 975 967 rec->filename s = filenames;976 rec->filename_entry = (struct incdep_strcache_entry *)filename; 968 977 rec->pattern = pattern; 969 978 rec->pattern_percent = pattern_percent; … … 1331 1340 /* file: dependencies */ 1332 1341 1333 struct nameseq *filenames = 0;1342 const char *filename; 1334 1343 struct dep *deps = 0; 1335 1344 struct dep **nextdep = &deps; … … 1352 1361 break; 1353 1362 } 1354 filenames = incdep_alloc_nameseq (curdep); 1355 memset (filenames, 0, sizeof (*filenames)); 1356 filenames->name = incdep_record_strcache (curdep, cur, endp - cur); 1363 filename = incdep_record_strcache (curdep, cur, endp - cur); 1357 1364 1358 1365 /* parse any dependencies. */ … … 1402 1409 /* enter the file with its dependencies. */ 1403 1410 incdep_record_files (curdep, 1404 filename s, NULL, NULL, deps, 0, NULL, 0, 0, f);1411 filename, NULL, NULL, deps, 0, NULL, 0, 0, f); 1405 1412 } 1406 1413 }
Note:
See TracChangeset
for help on using the changeset viewer.