Remember that root text `root` stood for directory `rdir`; two different * directories for one root text: it stands for none. */
| 1810 | /* Remember that root text `root` stood for directory `rdir`; two different |
| 1811 | * directories for one root text: it stands for none. */ |
| 1812 | static void gc_note_root(CBMHashTable *roots, const char *root, const char *rdir) { |
| 1813 | const char *known = cbm_ht_get(roots, root); |
| 1814 | if (!known) { |
| 1815 | char *k = cbm_mem_strdup(CBM_MEM_CLASS_OTHER, root); |
| 1816 | char *d = cbm_mem_strdup(CBM_MEM_CLASS_OTHER, rdir); |
| 1817 | if (k && d) { |
| 1818 | cbm_ht_set(roots, k, d); |
| 1819 | return; |
| 1820 | } |
| 1821 | cbm_free(CBM_MEM_CLASS_OTHER, k); |
| 1822 | cbm_free(CBM_MEM_CLASS_OTHER, d); |
| 1823 | return; |
| 1824 | } |
| 1825 | if (strcmp(known, GC_CONFLICT) != 0 && strcmp(known, rdir) != 0) { |
| 1826 | char *c = cbm_mem_strdup(CBM_MEM_CLASS_OTHER, GC_CONFLICT); |
| 1827 | if (c) { |
| 1828 | cbm_free(CBM_MEM_CLASS_OTHER, cbm_ht_set(roots, cbm_ht_get_key(roots, root), c)); |
| 1829 | } |
| 1830 | } |
| 1831 | } |
| 1832 | |
| 1833 | /* Link the chart loads: a tail exactly one chart directory ends with; else, |
| 1834 | * when the loads under the same unknown root (opt.ChartsDirectory) whose |
no test coverage detected