Not sure how to answer that Czar.
The source shows that it switches the first and last links and then switches the prevlink/nextlink pointers for each list entry.
I agree a 'list_backwards' command is useful and quite easy to write. However, it would be more useful as a one-off.
However, if you had a flag set for reversing the list it would be quite confusing what addlast and addfirst would do.
The source shows that it switches the first and last links and then switches the prevlink/nextlink pointers for each list entry.
I agree a 'list_backwards' command is useful and quite easy to write. However, it would be more useful as a one-off.
However, if you had a flag set for reversing the list it would be quite confusing what addlast and addfirst would do.