| 753 | } |
| 754 | |
| 755 | void |
| 756 | copy_symbols_content(void) |
| 757 | { |
| 758 | char dst_path[MAX_PATH], interim_path[MAX_PATH], orig_path[MAX_PATH]; |
| 759 | |
| 760 | boolean no_template = FALSE; |
| 761 | |
| 762 | /* Using the SYSCONFPREFIX path, lock it so that it does not change */ |
| 763 | fqn_prefix_locked[SYSCONFPREFIX] = TRUE; |
| 764 | |
| 765 | strcpy(orig_path, gf.fqn_prefix[DATAPREFIX]); |
| 766 | strcat(orig_path, SYMBOLS_TEMPLATE); |
| 767 | strcpy(interim_path, gf.fqn_prefix[SYSCONFPREFIX]); |
| 768 | strcat(interim_path, SYMBOLS_TEMPLATE); |
| 769 | strcpy(dst_path, gf.fqn_prefix[SYSCONFPREFIX]); |
| 770 | strcat(dst_path, SYMBOLS); |
| 771 | |
| 772 | if (!file_exists(orig_path)) { |
| 773 | char alt_orig_path[MAX_PATH]; |
| 774 | |
| 775 | strcpy(alt_orig_path, gf.fqn_prefix[DATAPREFIX]); |
| 776 | strcat(alt_orig_path, SYMBOLS); |
| 777 | if (file_exists(alt_orig_path)) { |
| 778 | no_template = TRUE; |
| 779 | /* <dist>symbols -> <dist>symbols.template */ |
| 780 | copy_file(gf.fqn_prefix[DATAPREFIX], SYMBOLS_TEMPLATE, |
| 781 | gf.fqn_prefix[DATAPREFIX], SYMBOLS, TRUE); |
| 782 | } |
| 783 | } |
| 784 | if (!file_exists(interim_path) || file_newer(orig_path, interim_path)) { |
| 785 | /* <dist>symbols.template -> <playground>symbols.template */ |
| 786 | copy_file(gf.fqn_prefix[SYSCONFPREFIX], SYMBOLS_TEMPLATE, |
| 787 | gf.fqn_prefix[DATAPREFIX], SYMBOLS_TEMPLATE, TRUE); |
| 788 | } |
| 789 | if (!file_exists(dst_path) || file_newer(interim_path, dst_path)) { |
| 790 | /* <playground>symbols.template -> <playground>symbols */ |
| 791 | copy_file(gf.fqn_prefix[SYSCONFPREFIX], SYMBOLS, |
| 792 | gf.fqn_prefix[SYSCONFPREFIX], SYMBOLS_TEMPLATE, TRUE); |
| 793 | } |
| 794 | nhUse(no_template); |
| 795 | } |
| 796 | |
| 797 | void |
| 798 | copy_sysconf_content(void) |
no test coverage detected