Deleted Added
full compact
fibheap.c (89857) fibheap.c (130561)
1/* A Fibonacci heap datatype.
2 Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
3 Contributed by Daniel Berlin (dan@cgsoftware.com).
4
5This file is part of GNU CC.
6
7GNU CC is free software; you can redistribute it and/or modify it
8under the terms of the GNU General Public License as published by

--- 52 unchanged lines hidden (view full) ---

61}
62
63/* Create a new fibonacci heap node. */
64static fibnode_t
65fibnode_new ()
66{
67 fibnode_t node;
68
1/* A Fibonacci heap datatype.
2 Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
3 Contributed by Daniel Berlin (dan@cgsoftware.com).
4
5This file is part of GNU CC.
6
7GNU CC is free software; you can redistribute it and/or modify it
8under the terms of the GNU General Public License as published by

--- 52 unchanged lines hidden (view full) ---

61}
62
63/* Create a new fibonacci heap node. */
64static fibnode_t
65fibnode_new ()
66{
67 fibnode_t node;
68
69 node = xcalloc (1, sizeof *node);
69 node = (fibnode_t) xcalloc (1, sizeof *node);
70 node->left = node;
71 node->right = node;
72
73 return node;
74}
75
76static inline int
77fibheap_compare (heap, a, b)

--- 135 unchanged lines hidden (view full) ---

213void *
214fibheap_replace_key_data (heap, node, key, data)
215 fibheap_t heap;
216 fibnode_t node;
217 fibheapkey_t key;
218 void *data;
219{
220 void *odata;
70 node->left = node;
71 node->right = node;
72
73 return node;
74}
75
76static inline int
77fibheap_compare (heap, a, b)

--- 135 unchanged lines hidden (view full) ---

213void *
214fibheap_replace_key_data (heap, node, key, data)
215 fibheap_t heap;
216 fibnode_t node;
217 fibheapkey_t key;
218 void *data;
219{
220 void *odata;
221 int okey;
221 fibheapkey_t okey;
222 fibnode_t y;
223
224 /* If we wanted to, we could actually do a real increase by redeleting and
225 inserting. However, this would require O (log n) time. So just bail out
226 for now. */
227 if (fibheap_comp_data (heap, key, data, node) > 0)
228 return NULL;
229

--- 294 unchanged lines hidden ---
222 fibnode_t y;
223
224 /* If we wanted to, we could actually do a real increase by redeleting and
225 inserting. However, this would require O (log n) time. So just bail out
226 for now. */
227 if (fibheap_comp_data (heap, key, data, node) > 0)
228 return NULL;
229

--- 294 unchanged lines hidden ---