static void PrepareModList( void ) /********************************/ { file_list *list; mod_entry *mod; mod_entry *curr; libnamelist *blacklist; mod = Root->mods; for( list = Root->files; list != NULL; list = list->next_file ) { if( strcmp( list->file->name, mod->f.fname ) == 0 ) { SetupModule( &mod, list ); } else if( mod->n.next_mod != NULL ) { if( FNAMECMPSTR( list->file->name, mod->n.next_mod->f.fname ) == 0 ) { mod->modinfo |= MOD_KILL; mod = mod->n.next_mod; SetupModule( &mod, list ); } } if( mod == NULL ) { break; } } while( mod != NULL ) { mod->modinfo |= MOD_KILL; // no match found mod = mod->n.next_mod; } blacklist = CalcLibBlacklist(); mod = LibModules; while( mod != NULL ) { if( mod->f.fname == NULL ) { mod->modinfo |= MOD_KILL; } else if( !(mod->modinfo & MOD_VISITED) ) { list = AddObjLib( mod->f.fname, LIB_PRIORITY_MID ); CheckNewFile( mod, list, 1); CheckBlacklist( list, blacklist ); for( curr = mod->n.next_mod; curr != NULL; curr = curr->n.next_mod){ if( curr->f.fname == mod->f.fname ) { curr->f.source = list; curr->modinfo |= MOD_VISITED; } } mod->f.source = list; } mod->modinfo &= ~MOD_VISITED; mod = mod->n.next_mod; } FreeList( SavedUserLibs ); SavedUserLibs = NULL; }
/************************************************* Function:主函数 Description: 调用各模块 Calls: // 被本函数调用的函数清单 Called By: // 调用本函数的函数清单 Input: // 输入参数说明,包括每个参数的作 // 用、取值说明及参数间关系。 Output: // 对输出参数的说明。 Return: // 函数返回值的说明 Others: *************************************************/ void main() { WorData *alphabet[26]={NULL}; int chioce=1; int loaded = NO; SetUp *setinfo=NULL; //参数要初始化 INTERFACE_COLOR_3; system("title MyPowerWord LinSoft"); system("mode con cols=90 lines=35"); if (Loading(alphabet) == NO) { printf("\nLoading Error 000"); return; } else { loaded = YES; } setinfo=LoadSetup(); if (setinfo->autoinsearch==YES) { system("cls"); printf("\nDo you want to set?(y/n):[ ]\b\b"); if (YesOrNo() == YES) { SetupModule(setinfo); } if (loaded == NO) { if (Loading(alphabet) == NO) { printf("\nLoading Error 001"); return; } } SearchMoulde(alphabet,setinfo); } else { while (1) //5.26 add { system("cls"); printf("\n\n\n1.Search\n2.Set up\n3.exit\n"); printf("Input you chioce:"); chioce=Select(1,3); switch(chioce) { case 1: { SearchMoulde(alphabet,setinfo); return; } case 2: { SetupModule(setinfo); break; } case 3:return; } } } //Destroy(alphabet); }