put roleoptvals[][] into save file; will be needed if #saveoptions takes place after restore */
| 798 | /* put roleoptvals[][] into save file; will be needed if #saveoptions |
| 799 | takes place after restore */ |
| 800 | void |
| 801 | saveoptvals(NHFILE *nhfp) |
| 802 | { |
| 803 | if (update_file(nhfp)) { |
| 804 | char *val; |
| 805 | unsigned len; |
| 806 | int i, j; |
| 807 | |
| 808 | for (i = 0; i < 4; ++i) |
| 809 | for (j = 0; j < num_opt_phases; ++j) { |
| 810 | val = roleoptvals[i][j]; |
| 811 | len = val ? Strlen(val) + 1 : 0; |
| 812 | Sfo_unsigned(nhfp, &len, "optvals-len"); |
| 813 | if (val) |
| 814 | Sfo_char(nhfp, val, "optvals-val", len); |
| 815 | } |
| 816 | } |
| 817 | if (release_data(nhfp)) |
| 818 | freeroleoptvals(); |
| 819 | } |
| 820 | |
| 821 | /* get roleoptvals[][] from save file */ |
| 822 | void |
nothing calls this directly
no test coverage detected