Loads our tables
| 630 | } |
| 631 | // Loads our tables |
| 632 | int mng_LoadTableFiles(int show_progress) { |
| 633 | if (Network_up) { |
| 634 | LockList = (mngs_Pagelock *)mem_malloc(MAX_LOCKLIST_ELEMENTS * sizeof(mngs_Pagelock)); |
| 635 | Num_locklist = mng_GetListOfLocks(LockList, MAX_LOCKLIST_ELEMENTS, TableUser); |
| 636 | OldFiles = (old_file *)mem_malloc(MAX_OLDFILE_ELEMENTS * sizeof(old_file)); |
| 637 | Num_old_files = 0; |
| 638 | ASSERT(OldFiles); |
| 639 | #if defined(WIN32) |
| 640 | if (TableTimeThreshold.dwHighDateTime != -1) |
| 641 | BuildOldFileList(TableTimeThreshold); |
| 642 | #endif |
| 643 | |
| 644 | Starting_editor = 1; |
| 645 | } |
| 646 | int ret1, ret2; |
| 647 | if (Fast_load_trick && !FindArg("-filter")) |
| 648 | Network_up = 0; |
| 649 | |
| 650 | ret1 = mng_LoadNetPages(show_progress); |
| 651 | if (Fast_load_trick) { |
| 652 | Network_up = 1; |
| 653 | Fast_load_trick = 0; |
| 654 | } |
| 655 | ret2 = mng_LoadLocalPages(); |
| 656 | if (Network_up) { |
| 657 | Starting_editor = 0; |
| 658 | Num_locklist = 0; |
| 659 | Num_old_files = 0; |
| 660 | mem_free(OldFiles); |
| 661 | mem_free(LockList); |
| 662 | #ifndef RELEASE |
| 663 | #if defined(WIN32) |
| 664 | remove("c:\\edload"); |
| 665 | #endif |
| 666 | #endif |
| 667 | } |
| 668 | RemapEverything(); |
| 669 | |
| 670 | if (!ret1 || !ret2) |
| 671 | return 0; |
| 672 | return 1; |
| 673 | } |
| 674 | // This is for initting tables on STAND_ALONE, if the network is down, or if |
| 675 | // the user doesn't want network support |
| 676 | int mng_InitLocalTables() { |
no test coverage detected