| 1400 | // --- Node index comparators (project is same for all, skip it) --- |
| 1401 | |
| 1402 | static int cmp_node_by_label(const void *a, const void *b) { |
| 1403 | int ia = *(const int *)a; |
| 1404 | int ib = *(const int *)b; |
| 1405 | int c = strcmp(safe_str(g_sort_nodes[ia].label), safe_str(g_sort_nodes[ib].label)); |
| 1406 | if (c) { |
| 1407 | return c; |
| 1408 | } |
| 1409 | return cmp_i64(g_sort_nodes[ia].id, g_sort_nodes[ib].id); |
| 1410 | } |
| 1411 | |
| 1412 | static int cmp_node_by_name(const void *a, const void *b) { |
| 1413 | int ia = *(const int *)a; |