| 1 | #cxx . . $ `<file>/src/util/pm_list.c`/include "prism/util/pm_list.h"cxx . . $ `<file>/include/prism/util/pm_list.h`/ |
| 2 | |
| 3 | /** |
| 4 | * Returns true if the given list is empty. |
| 5 | */ |
| 6 | PRISM_EXPORTED_FUNCTIONcxx . . $ `include/prism/defines.h:50:19`! boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! |
| 7 | pm_list_empty_pcxx . . $ pm_list_empty_p(950fc5b9745e03db).(pm_list_tcxx . . $ pm_list_t# *list) { |
| 8 | return list->headcxx . . $ $anonymous_type_29e0339d49f8eb1_0#head. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 9 | } |
| 10 | |
| 11 | /** |
| 12 | * Returns the size of the list. |
| 13 | */ |
| 14 | PRISM_EXPORTED_FUNCTIONcxx . . $ `include/prism/defines.h:50:19`! size_t |
| 15 | pm_list_sizecxx . . $ pm_list_size(ac1d23e75d3587c8).(pm_list_tcxx . . $ pm_list_t# *list) { |
| 16 | return list->sizecxx . . $ $anonymous_type_29e0339d49f8eb1_0#size.; |
| 17 | } |
| 18 | |
| 19 | /** |
| 20 | * Append a node to the given list. |
| 21 | */ |
| 22 | void |
| 23 | pm_list_appendcxx . . $ pm_list_append(6978dad61e7ac614).(pm_list_tcxx . . $ pm_list_t# *list, pm_list_node_tcxx . . $ pm_list_node_t# *node) { |
| 24 | if (list->headcxx . . $ $anonymous_type_29e0339d49f8eb1_0#head. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 25 | list->headcxx . . $ $anonymous_type_29e0339d49f8eb1_0#head. = node; |
| 26 | } else { |
| 27 | list->tailcxx . . $ $anonymous_type_29e0339d49f8eb1_0#tail.->nextcxx . . $ pm_list_node#next. = node; |
| 28 | } |
| 29 | |
| 30 | list->tailcxx . . $ $anonymous_type_29e0339d49f8eb1_0#tail. = node; |
| 31 | list->sizecxx . . $ $anonymous_type_29e0339d49f8eb1_0#size.++; |
| 32 | } |
| 33 | |
| 34 | /** |
| 35 | * Deallocate the internal state of the given list. |
| 36 | */ |
| 37 | PRISM_EXPORTED_FUNCTIONcxx . . $ `include/prism/defines.h:50:19`! void |
| 38 | pm_list_freecxx . . $ pm_list_free(15653a1d60819db5).(pm_list_tcxx . . $ pm_list_t# *list) { |
| 39 | pm_list_node_tcxx . . $ pm_list_node_t# *node = list->headcxx . . $ $anonymous_type_29e0339d49f8eb1_0#head.; |
| 40 | pm_list_node_tcxx . . $ pm_list_node_t# *next; |
| 41 | |
| 42 | while (node != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!) { |
| 43 | next = node->nextcxx . . $ pm_list_node#next.; |
| 44 | xfreecxx . . $ `include/prism/defines.h:203:17`!(node); |
| 45 | node = next; |
| 46 | } |
| 47 | |
| 48 | list->sizecxx . . $ $anonymous_type_29e0339d49f8eb1_0#size. = 0; |
| 49 | } |