This patch saves enums as index number and string. During restore, it tries to restore the string first. Only if that fails, it restored the index number. This can make a difference if new choices are inserted in the middle or choices are re-ordered. Examples are new breakpoint tables for the LINR field inserted in some other order than the date of implementation (e.g. alphabetically). The idea is that if the enum sorting changes, people usually want to have the old string choice restored (the user interface of enums), not the index number (the implementation).
This modification has originally been implemented by David Maden at SLS in 2005.
I like this idea. Thanks. However, I need to modify verify.c for compatibility with this, or refactor so that verify.c
uses code in save_restore.c and dbrestore to read and write .sav files.
This patch saves enums as index number and string. During restore, it tries to restore the string first. Only if that fails, it restored the index number. This can make a difference if new choices are inserted in the middle or choices are re-ordered. Examples are new breakpoint tables for the LINR field inserted in some other order than the date of implementation (e.g. alphabetically). The idea is that if the enum sorting changes, people usually want to have the old string choice restored (the user interface of enums), not the index number (the implementation).
This modification has originally been implemented by David Maden at SLS in 2005.