| 1455 | // --- Node index comparators (project is same for all, skip it) --- |
| 1456 | |
| 1457 | static int cmp_node_by_label(const void *a, const void *b) { |
| 1458 | int ia = *(const int *)a; |
| 1459 | int ib = *(const int *)b; |
| 1460 | int c = strcmp(safe_str(g_sort_nodes[ia].label), safe_str(g_sort_nodes[ib].label)); |
| 1461 | if (c) { |
| 1462 | return c; |
| 1463 | } |
| 1464 | return cmp_i64(g_sort_nodes[ia].id, g_sort_nodes[ib].id); |
| 1465 | } |
| 1466 | |
| 1467 | static int cmp_node_by_name(const void *a, const void *b) { |
| 1468 | int ia = *(const int *)a; |