wizapp-stdlib/codegen/dbl_list/snippets/node_to_list
Abdelrahman Said 3c32b247c0 Upgrade codegen
2025-04-17 09:03:30 +01:00

14 lines
313 B
Plaintext

{Ttitle}List output = {{.first = node, .last = node, .node_count = 1}};
while (output.first->prev != NULL) {{
output.first = output.first->prev;
++(output.node_count);
}}
while (output.last->next != NULL) {{
output.last = output.last->next;
++(output.node_count);
}}
return output;