diff options
author | rcyeske <rcyeske> | 2001-02-22 04:12:24 +0000 |
---|---|---|
committer | rcyeske <rcyeske> | 2001-02-22 04:12:24 +0000 |
commit | 4c14d834ad697379212a827d93ff7be723c09dee (patch) | |
tree | e0079efc76667510742317835ca2ec9828ed8dd2 /src | |
parent | 01c556884263d09bbf50d35657258995d8a0e447 (diff) | |
download | ratpoison-4c14d834ad697379212a827d93ff7be723c09dee.zip |
commented out broken sort stuff
Diffstat (limited to 'src')
-rw-r--r-- | src/list.c | 84 |
1 files changed, 42 insertions, 42 deletions
@@ -243,56 +243,56 @@ find_window_other () /* This somewhat CPU intensive (memcpy) swap function sorta defeats the purpose of a linear linked list. */ -static void -swap_list_elements (rp_window *a, rp_window *b) -{ - rp_window tmp; - rp_window *tmp_a_next, *tmp_a_prev; - rp_window *tmp_b_next, *tmp_b_prev; +/* static void */ +/* swap_list_elements (rp_window *a, rp_window *b) */ +/* { */ +/* rp_window tmp; */ +/* rp_window *tmp_a_next, *tmp_a_prev; */ +/* rp_window *tmp_b_next, *tmp_b_prev; */ - if (a == NULL || b == NULL || a == b) return; +/* if (a == NULL || b == NULL || a == b) return; */ - tmp_a_next = a->next; - tmp_a_prev = a->prev; +/* tmp_a_next = a->next; */ +/* tmp_a_prev = a->prev; */ - tmp_b_next = b->next; - tmp_b_prev = b->prev; +/* tmp_b_next = b->next; */ +/* tmp_b_prev = b->prev; */ - memcpy (&tmp, a, sizeof (rp_window)); - memcpy (a, b, sizeof (rp_window)); - memcpy (b, &tmp, sizeof (rp_window)); +/* memcpy (&tmp, a, sizeof (rp_window)); */ +/* memcpy (a, b, sizeof (rp_window)); */ +/* memcpy (b, &tmp, sizeof (rp_window)); */ - a->next = tmp_a_next; - a->prev = tmp_a_prev; +/* a->next = tmp_a_next; */ +/* a->prev = tmp_a_prev; */ - b->next = tmp_b_next; - b->prev = tmp_b_prev; -} +/* b->next = tmp_b_next; */ +/* b->prev = tmp_b_prev; */ +/* } */ /* Can you say b-b-b-b-bubble sort? */ -void -sort_window_list_by_number () -{ - rp_window *i, *j, *smallest; - - for (i=rp_window_head; i; i=i->next) - { - if (i->state == STATE_UNMAPPED) continue; - - smallest = i; - for (j=i->next; j; j=j->next) - { - if (j->state == STATE_UNMAPPED) continue; - - if (j->number < smallest->number) - { - smallest = j; - } - } - - swap_list_elements (i, smallest); - } -} +/* void */ +/* sort_window_list_by_number () */ +/* { */ +/* rp_window *i, *j, *smallest; */ + +/* for (i=rp_window_head; i; i=i->next) */ +/* { */ +/* if (i->state == STATE_UNMAPPED) continue; */ + +/* smallest = i; */ +/* for (j=i->next; j; j=j->next) */ +/* { */ +/* if (j->state == STATE_UNMAPPED) continue; */ + +/* if (j->number < smallest->number) */ +/* { */ +/* smallest = j; */ +/* } */ +/* } */ + +/* swap_list_elements (i, smallest); */ +/* } */ +/* } */ static void save_mouse_position (rp_window *win) |