/************************************************************************ * Method: * Destructor */ CHXSiteManager::~CHXSiteManager() { #if defined(HELIX_CONFIG_NOSTATICS) //INT32& zm_nSiteManagerCount = HXGlobalInt32::Get(&CHXSiteManager::zm_nSiteManagerCount); #endif #if defined(HX_ENABLE_SITE_EVENTHANDLER) LISTPOSITION pos = zm_SiteManagerList.Find(this); zm_SiteManagerList.RemoveAt(pos); zm_nSiteManagerCount--; #endif /* HX_ENABLE_SITE_EVENTHANDLER */ HX_ASSERT(m_MasterListOfSites.IsEmpty()); HX_ASSERT(m_SitesToSUS.IsEmpty()); RemoveMapStrToObj(&m_ChannelsToLists); RemoveMapStrToObj(&m_PersistentChannelsToLists); RemoveMapStrToObj(&m_LSGNamesToLists); RemoveMapStrToObj(&m_PersistentLSGNamesToLists); CHXMapStringToOb::Iterator ndx = m_EventHookMap.Begin(); for (; ndx != m_EventHookMap.End(); ++ndx) { RemoveList((CHXSimpleList*)*ndx); delete (CHXSimpleList*)*ndx; } m_EventHookMap.RemoveAll(); RemoveList(&m_UnnamedEventHookList); CleanupPendingValues(); HX_RELEASE(m_pContext); }
LIST *plLoadTools(FILE * fh) { register LIST *l = txtGoKey(PLAN_TXT, "SYSTEM_TOOLS_MISSING_1"); register ubyte foundAll = 1, canGet = 2, toolsNr = 0; char buffer[64]; U32 id; buffer[0] = '\0'; if (fh) { while (dskGetLine(buffer, sizeof(buffer), fh) && strcmp(buffer, PLANING_PLAN_TOOL_END_ID) != 0) { if (sscanf(buffer, "%" SCNu32 "\r\n", &id) == 1) { toolsNr++; if (!has(Person_Matt_Stuvysunt, id)) { if (has(Person_Mary_Bolton, id)) { canGet++; dbAddObjectNode(l, id, OLF_INCLUDE_NAME); } foundAll = 0; } } } } if (foundAll) { RemoveList(l); l = NULL; } else { LIST *extList = NULL; NODE *n; if (canGet == 2) extList = txtGoKey(PLAN_TXT, "SYSTEM_TOOLS_MISSING_3"); else { if ((toolsNr - canGet) > 1) extList = txtGoKeyAndInsert(PLAN_TXT, "SYSTEM_TOOLS_MISSING_2", (U32) (toolsNr - canGet)); else if (toolsNr - canGet) extList = txtGoKey(PLAN_TXT, "SYSTEM_TOOLS_MISSING_4"); } if (extList) { for (n = LIST_HEAD(extList); NODE_SUCC(n); n = NODE_SUCC(n)) CreateNode(l, 0, NODE_NAME(n)); RemoveList(extList); } } return l; }
void tcColorCar(Car car) { LIST *colors, *bubble; ubyte choice; U32 costs; Person marc = (Person) dbGetObject(Person_Marc_Smith); costs = (U32)tcColorCosts(car); bubble = txtGoKeyAndInsert(BUSINESS_TXT, "LACKIEREN", (U32) costs, NULL); SetPictID(marc->PictID); Bubble(bubble, 0, 0L, 0L); RemoveList(bubble); if (Say(BUSINESS_TXT, 0, MATT_PICTID, "LACKIEREN_ANT") == 0) { colors = txtGoKey(OBJECTS_ENUM_TXT, "enum_ColorE"); txtPutCharacter(colors, 0, '*'); if (tcSpendMoney(costs, 1)) { char exp[TXT_KEY_LENGTH]; txtGetFirstLine(BUSINESS_TXT, "NO_CHOICE", exp); ExpandObjectList(colors, exp); if (ChoiceOk (choice = Bubble(colors, (ubyte) car->ColorIndex, 0L, 0L), GET_OUT, colors)) { car->ColorIndex = (ubyte) choice; SetCarColors(car->ColorIndex); gfxPrepareRefresh(); PlayAnim("Umlackieren", 3000, GFX_DONT_SHOW_FIRST_PIC); inpSetWaitTicks(200L); inpWaitFor(INP_LBUTTONP | INP_TIME); StopAnim(); inpSetWaitTicks(1L); gfxRefresh(); /*gfxShow(26,GFX_NO_REFRESH|GFX_ONE_STEP,0L,-1L,-1L);*/ /*gfxShow((uword)car->PictID,GFX_NO_REFRESH|GFX_OVERLAY,1L,-1L,-1L);*/ } } RemoveList(colors); } AddVTime(137); }
void plLoad(U32 objId) { FILE *fh = NULL; ubyte ret; if (objId == Building_Starford_Kaserne) while ((ret = plOpen(objId, PLANING_OPEN_READ_PLAN, &fh)) != PLANING_OPEN_OK); else ret = plOpen(objId, PLANING_OPEN_READ_PLAN, &fh); if (ret == PLANING_OPEN_OK) { if (GamePlayMode & GP_GUARD_DESIGN) grdDo(fh, plSys, PersonsList, BurglarsNr, PersonsNr, GUARDS_DO_LOAD); else { LIST *l = NULL; ubyte i; ubyte goon = 1; if ((l = LoadSystem(fh, plSys))) { inpTurnESC(0); Bubble(l, 0, NULL, 0L); inpTurnESC(1); RemoveList(l); goon = 0; l = NULL; } if ((l = plLoadTools(fh))) { inpTurnESC(0); Bubble(l, 0, NULL, 0L); inpTurnESC(1); RemoveList(l); goon = 0; } if (goon) { for (i = 0; i < BurglarsNr; i++) LoadHandler(fh, plSys, OL_NR(GetNthNode(PersonsList, i))); } } dskClose(fh); } else { if (ret == PLANING_OPEN_ERR_NO_PLAN) plMessage("NO_PLAN", PLANING_MSG_REFRESH | PLANING_MSG_WAIT); } }
U32 tcPersonWanted(U32 persId) { U32 hours, i = 0, caught = 0; Person john = dbGetObject(Person_John_Gludo); Person miles = dbGetObject(Person_Miles_Chickenwing); LIST *bubble; LIST *jobs = txtGoKey(OBJECTS_ENUM_TXT, "enum_JobE"); char line[TXT_KEY_LENGTH], name[TXT_KEY_LENGTH]; dbGetObjectName(persId, name); bubble = txtGoKey(BUSINESS_TXT, "BURGLAR_RECOG"); sprintf(line, "%s %s.", NODE_NAME(GetNthNode(bubble, 3)), name); RemoveNode(bubble, NODE_NAME(GetNthNode(bubble, 3))); CreateNode(bubble, 0L, line); SetPictID(john->PictID); Bubble(bubble, 0, 0L, 0L); RemoveList(bubble); Say(BUSINESS_TXT, 0, miles->PictID, "ARREST_HIM"); livesInUnSet(London_London_1, persId); tcMoveAPerson(persId, Location_Nirvana); hours = CalcRandomNr(4L, 7L); while ((i++) < hours) { AddVTime(60); inpDelay(35); ShowTime(2); } if (tcGuyCanEscape(dbGetObject(persId)) > CalcRandomNr(100, 255)) { /* Flucht gelingt */ Say(BUSINESS_TXT, 0, john->PictID, "ESCAPED"); livesInSet(London_Escape, persId); } else { /* nicht */ Say(BUSINESS_TXT, 0, john->PictID, "ARRESTED"); livesInSet(London_Jail, persId); caught = tcPersonQuestioning(dbGetObject(persId)); } RemoveList(jobs); return caught; }
int DelNode(listPtr List) { if (List == NULL) return LLIST_NULL; switch (List->Flags & LISTDELMASK) { case LISTDELCURR: return RemoveList(List); break; case LISTDELHEAD: return DelHeadList(List); break; case LISTDELTAIL: return DelTailList(List); break; case LISTDELSPLAY: return SplayRemoveList(List); break; default: return RemoveList(List); break; } return LLIST_ERROR; } /* DelNode() */
void alg2_recommon_n(Term a2) { List m2l,l,l1,nl; int cnum,n,d; m2l=CompoundArgN(a2,5); nl=NewList(); l=m2l; if(is_empty_list(l)) return; while(!is_empty_list(l)) { nl=AppendLast(nl,CompoundArg1(ListFirst(l))); l=ListTail(l); } cnum=gcf_list(nl); if(IntegerValue(ListFirst(nl))<0) cnum*=-1; if(cnum==1) { RemoveList(nl); return; } l1=m2l; l=nl; while(!is_empty_list(l)) { SetCompoundArg(ListFirst(l1),1, NewInteger(IntegerValue(ListFirst(l))/cnum)); l=ListTail(l); l1=ListTail(l1); } RemoveList(nl); n=IntegerValue(CompoundArg1(CompoundArg2(a2))); d=IntegerValue(CompoundArg2(CompoundArg2(a2))); n*=cnum; cnum=gcf(n,d); n/=cnum; d/=cnum; SetCompoundArg(CompoundArg2(a2),1,NewInteger(n)); SetCompoundArg(CompoundArg2(a2),2,NewInteger(d)); return ; }
int main(void){ DL node = InitList(); ShowList(node); AddElem(node,1); AddElem(node,2); AddElem(node,3); AddElem(node,4); AddElem(node,5); printf("%d\n",node->data); ShowList(node); InsertList(node,3,10); printf("%d\n",node->data); ShowList(node); int e; RemoveList(node,3,&e); printf("%d %d\n",node->data,e); ShowList(node); GetElem(node,3); printf("%d %d\n",GetElem(node,3),GetElem(node,20)); ClearList(node); ShowList(node); free(node); return(EXIT_SUCCESS); }
// Saves the active watch list together with the current evaluations as // a new persisted watch list HRESULT WatchCmd::SaveList(__in_z WCHAR* pSaveName) { HRESULT Status = S_OK; INIT_API_EE(); INIT_API_DAC(); IfFailRet(InitCorDebugInterface()); RemoveList(pSaveName); PersistList* pList = new PersistList(); wcsncpy_s(pList->pName, MAX_EXPRESSION, pSaveName, _TRUNCATE); pList->pHeadExpr = NULL; PersistCallbackData data; data.ppNext = &(pList->pHeadExpr); WatchExpression* pExpression = pExpressionListHead; while(pExpression != NULL) { ExpressionNode* pResult = NULL; if(SUCCEEDED(Status = ExpressionNode::CreateExpressionNode(pExpression->pExpression, &pResult))) { pResult->DFSVisit(PersistCallback, (VOID*)&data); delete pResult; } pExpression = pExpression->pNext; } pList->pNext = pPersistListHead; pPersistListHead = pList; return Status; }
void tcSellCar(U32 ObjectID) { LIST *bubble; U32 offer; Car car; Person marc = (Person) dbGetObject(Person_Marc_Smith); car = (Car) dbGetObject(ObjectID); offer = tcGetCarTraderOffer(car); if (tcRGetCarAge(car) < 1) bubble = txtGoKeyAndInsert(BUSINESS_TXT, "ANGEBOT_1", tcRGetCarValue(car), offer, NULL); else bubble = txtGoKeyAndInsert(BUSINESS_TXT, "ANGEBOT", tcRGetCarValue(car), tcRGetCarAge(car), offer, NULL); SetPictID(marc->PictID); Bubble(bubble, 0, 0L, 0L); RemoveList(bubble); if ((Say(BUSINESS_TXT, 0, MATT_PICTID, "VERKAUF")) == 0) { tcAddPlayerMoney(offer); hasSet(Person_Marc_Smith, ObjectID); hasUnSet(Person_Matt_Stuvysunt, ObjectID); } gfxShow(27, GFX_NO_REFRESH | GFX_ONE_STEP, 0L, -1L, -1L); AddVTime(97); }
void *GetNode(listPtr List) { void *Data; int Delete; if (List == NULL) return NULL; Data = NULL; Delete = ((List->Flags & LISTFLAGMASK) & LISTDELREAD); switch (List->Flags & LISTREADMASK) { case LISTREADHEAD: if (List->Head != NULL) { Data = List->Head->Data; if (Delete) DelHeadList(List); } break; case LISTREADTAIL: if (List->Tail != NULL) { Data = List->Tail->Data; if (Delete) DelTailList(List); } break; default: case LISTREADCURR: if (List->Current != NULL) { Data = List->Current->Data; if (Delete) RemoveList(List); } break; } return Data; } /* GetNode() */
LIST *txtGoKeyAndInsert(U32 textId, char *key, ...) { va_list argument; LIST *txtList = CreateList(), *originList = NULL; NODE *node; va_start(argument, key); originList = txtGoKey(textId, key); for (node = LIST_HEAD(originList); NODE_SUCC(node); node = NODE_SUCC(node)) { U8 i; char originLine[256], txtLine[256]; strcpy(originLine, NODE_NAME(node)); strcpy(txtLine, NODE_NAME(node)); for (i = 2; i < strlen(originLine); i++) { if (originLine[i - 2] == '%') { sprintf(txtLine, originLine, va_arg(argument, U32)); i = strlen(originLine) + 1; } } CreateNode(txtList, 0, txtLine); } RemoveList(originList); return txtList; }
static ubyte StartupMenu(void) { LIST *menu = txtGoKey(MENU_TXT, "STARTUP_MENU"); U32 activ; char line[TXT_KEY_LENGTH]; ubyte ret = 0; ShowMenuBackground(); if (setup.Profidisk) { if (setup.CDRom) { PrintStatus(txtGetFirstLine(THECLOU_TXT, "BITTE_WARTEN_PC_CD_ROM_PROFI", line)); } else { PrintStatus(txtGetFirstLine(THECLOU_TXT, "BITTE_WARTEN_PC_PROFI", line)); } } else { if (setup.CDRom) { PrintStatus(txtGetFirstLine(THECLOU_TXT, "BITTE_WARTEN_PC_CD_ROM", line)); } else { PrintStatus(txtGetFirstLine(THECLOU_TXT, "BITTE_WARTEN_PC", line)); } } inpTurnFunctionKey(0); inpTurnESC(0); activ = Menu(menu, 7L, 0, NULL, 0L); inpTurnESC(1); inpTurnFunctionKey(1); switch (activ) { case 0: InitData(); ret = 1; break; case 1: txtReset(OBJECTS_TXT); if (tcLoadTheClou()) { film->StartScene = SceneArgs.ReturnValue; ret = 1; } break; case 2: ret = 2; break; } RemoveList(menu); return ret; }
void lsShowRaster(U32 areaID, ubyte perc) { LSArea area = dbGetObject(areaID); struct ObjectNode *node; S32 count, i; LIST *objects; gfxShow(154, GFX_NO_REFRESH | GFX_ONE_STEP, 0, -1, -1); SetObjectListAttr(OLF_PRIVATE_LIST, Object_LSObject); AskAll(area, ConsistOfRelationID, BuildObjectList); objects = ObjectListPrivate; /*lsSortObjectList(&objects);*/ if (!(LIST_EMPTY(objects))) { count = (GetNrOfNodes(objects) * perc) / 255; for (node = (struct ObjectNode *) LIST_HEAD(objects), i = 0; (NODE_SUCC((NODE *) node)) && (i < count); node = (struct ObjectNode *) NODE_SUCC((NODE *) node), i++) { LSObject lso = OL_DATA(node); switch (lso->Type) { case Item_Mauer: case Item_Mauerecke: case Item_Steinmauer: lsFadeRasterObject(areaID, lso, 1); break; default: break; } } for (node = (struct ObjectNode *) LIST_HEAD(objects), i = 0; (NODE_SUCC((NODE *) node)) && (i < count); node = (struct ObjectNode *) NODE_SUCC((NODE *) node), i++) { LSObject lso = OL_DATA(node); switch (lso->Type) { case Item_Mauer: case Item_Mauerecke: case Item_Steinmauer: break; default: lsFadeRasterObject(areaID, lso, 1); break; } } } else Say(THECLOU_TXT, 0, MATT_PICTID, "KEIN_GRUNDRISS"); RemoveList(objects); }
List SetLets(List l) { List l1,lr, lre=0; lr=NewList(); slrl++; l1=l; while(!is_empty_list(l1)) { List nl=s_l_1(ListFirst(l1)); if(nl==0) {l1=ListTail(l1);continue;} if(lr==0) {lr=nl;lre=lr;} else ConcatList(lre,nl); while(ListTail(lre)) lre=ListTail(lre); /*lr=ConcatList(lr,);*/ l1=ListTail(l1); } RemoveList(l); slrl--; if(slrl==0) { for(l1=lr;l1;l1=ListTail(l1)) { List l2,sl=ConsumeCompoundArg(ListFirst(l1),3); int ch=0; for(l2=sl;l2;l2=ListTail(l2)) if(CompoundName(ListFirst(l2))==A_INFINITESIMAL) { FreeAtomic(ListFirst(l2)); ChangeList(l2,0); ch++; } if(ch) do { for(l2=sl;l2;l2=ListTail(l2)) if(ListFirst(l2)==0) { sl=CutFromList(sl,l2); break; } } while(l2); SetCompoundArg(ListFirst(l1),3,sl); } } lr=a1l_rem_inf(lr); return lr; }
void alg1_sum_wild(Term a1) { List ww,l1,rl; List free_w; free_w=NewList(); rl=NewList(); l1=CompoundArg2(a1); while(!is_empty_list(l1)) { Term t1; t1=ListFirst(l1); if(CompoundName(t1)==OPR_WILD) free_w=AppendFirst(free_w,CompoundArg2(t1)); l1=ListTail(l1); } l1=CompoundArg1(a1); while(!is_empty_list(l1)) { Term t1; t1=ListFirst(l1); ww=alg1_w_ind(t1,free_w); /*WriteTerm(free_w);WriteTerm(ww);fflush(stdout);*/ if(is_empty_list(ww)) { /*WriteTerm(t1); puts(": pure");*/ rl=AppendLast(rl,t1); } else rl=ConcatList(rl,alg1_s_w_m(t1,ww)); l1=ListTail(l1); } RemoveList(free_w); l1=ConsumeCompoundArg(a1,1); RemoveList(l1); SetCompoundArg(a1,1,rl); }
/* functions - STRING */ char *txtGetNthString(U32 textId, const char *key, U32 nth, char *dest) { LIST *txtList = txtGoKey(textId, key); void *src; if ((src = GetNthNode(txtList, nth))) { strcpy(dest, NODE_NAME(src)); } else { strcpy(dest, ""); } RemoveList(txtList); return dest; }
static U32 tcATraitor(U32 traitorId) { char name[TXT_KEY_LENGTH], line[TXT_KEY_LENGTH]; LIST *bubble = txtGoKey(BUSINESS_TXT, "A_TRAITOR"); LIST *newList = CreateList(); Person john = dbGetObject(Person_John_Gludo); dbGetObjectName(traitorId, name); sprintf(line, NODE_NAME(LIST_HEAD(bubble)), name); CreateNode(newList, 0L, line); CreateNode(newList, 0L, NODE_NAME(GetNthNode(bubble, 1))); CreateNode(newList, 0L, NODE_NAME(GetNthNode(bubble, 2))); SetPictID(john->PictID); Bubble(newList, 0, 0L, 0L); RemoveList(bubble); RemoveList(newList); Say(BUSINESS_TXT, 0, john->PictID, "ARRESTED"); return 1; /* gefangen! */ }
void txtDone(void) { if (txtBase) { U32 i, nr; nr = GetNrOfNodes(txtBase->tc_Texts); for (i=0; i<nr; i++) { txtUnLoad(i); } RemoveList(txtBase->tc_Texts); TCFreeMem(txtBase, sizeof(*txtBase)); } }
void plMessage(char *msg, ubyte flags) { LIST *m = txtGoKey(PLAN_TXT, msg); if (flags & PLANING_MSG_REFRESH) ShowMenuBackground(); if (m) plPrintInfo((char *) NODE_NAME(LIST_HEAD(m))); RemoveList(m); if (flags & PLANING_MSG_WAIT) { inpSetWaitTicks(140L); inpWaitFor(INP_LBUTTONP | INP_TIME); inpSetWaitTicks(0L); } }
// Renames a previously saved persisted watch list HRESULT WatchCmd::RenameList(__in_z WCHAR* pOldName, __in_z WCHAR* pNewName) { if(_wcscmp(pOldName, pNewName)==0) return S_OK; PersistList** ppList = &pPersistListHead; while(*ppList != NULL) { if(_wcscmp((*ppList)->pName, pOldName) == 0) { PersistList* pListToChangeName = *ppList; RemoveList(pNewName); wcsncpy_s(pListToChangeName->pName, MAX_EXPRESSION, pNewName, _TRUNCATE); return S_OK; } ppList = &((*ppList)->pNext); } return S_FALSE; }
void RemoveList (tlist_t *ListHead) /* * Remove the list from memory and free the memory * * ListHead - pointer on list to remove * */ { if (ListHead) { if (ListHead->next) RemoveList (ListHead->next); fiasco_free (ListHead); } else warning ("Can't free tlist <NULL>"); }
U32 tcChooseCar(U32 backgroundNr) { LIST *bubble; U32 carCount, carID = 0L; ubyte choice; Car matts_car; hasAll(Person_Matt_Stuvysunt, OLF_PRIVATE_LIST | OLF_INCLUDE_NAME | OLF_INSERT_STAR, Object_Car); bubble = ObjectListPrivate; if (!(LIST_EMPTY(bubble))) { carCount = GetNrOfNodes(bubble); if (carCount == 1) { carID = OL_NR(LIST_HEAD(bubble)); choice = 1; } else { char exp[TXT_KEY_LENGTH]; txtGetFirstLine(BUSINESS_TXT, "NO_CHOICE", exp); ExpandObjectList(bubble, exp); Say(BUSINESS_TXT, 0, 7, "ES GEHT UM.."); if (ChoiceOk((choice = Bubble(bubble, 0, 0L, 0L)), GET_OUT, bubble)) carID = OL_NR(GetNthNode(bubble, (U32) choice)); else choice = GET_OUT; } if (choice != GET_OUT) { matts_car = (Car) dbGetObject(carID); SetCarColors((ubyte) matts_car->ColorIndex); gfxShow(backgroundNr, GFX_NO_REFRESH | GFX_ONE_STEP, 0L, -1L, -1L); gfxShow((uword) matts_car->PictID, GFX_NO_REFRESH | GFX_OVERLAY, 1L, -1L, -1L); } } RemoveList(bubble); return (carID); }
void tcCarGeneralOverhoul(Car car) { Person marc = dbGetObject(Person_Marc_Smith); LIST *bubble; ubyte choice; SetPictID(marc->PictID); bubble = txtGoKeyAndInsert(BUSINESS_TXT, "GENERAL_OVERHOUL", (U32) ((tcCostsPerTotalRepair(car) * 255) / 8), NULL); Bubble(bubble, 0, 0L, 0L); RemoveList(bubble); choice = Say(BUSINESS_TXT, 0, MATT_PICTID, "GENERAL_OVERHOUL_QUEST"); if (choice == 0) tcRepairCar(car, "TotalRepair"); }
void plSaveChanged(U32 objId) { if (PlanChanged) { LIST *l = txtGoKey(PLAN_TXT, "PLAN_CHANGED"); inpTurnESC(0); if (Bubble(l, 0, NULL, 0L) == 0) { inpTurnESC(1); if (!plAllInCar(objId)) plSay("PLAN_NOT_FINISHED", 0); plSave(objId); } else inpTurnESC(1); RemoveList(l); } }
void RAS_ListSlot::DrawList() { if (m_flag &LIST_STREAM || m_flag& LIST_NOCREATE) { RemoveList(); return; } if (m_flag &LIST_MODIFY) { if (m_flag &LIST_CREATE) { if (m_list == 0) { m_list = (unsigned int)glGenLists(1); m_flag = m_flag &~ LIST_CREATE; spit("Created display list (" << m_list << ")"); } } if (m_list != 0) glNewList((GLuint)m_list, GL_COMPILE); m_flag |= LIST_BEGIN; return; } glCallList(m_list); }
void tcForgetGuys(void) { LIST *guys; NODE *node; joined_byAll(Person_Matt_Stuvysunt, OLF_PRIVATE_LIST, Object_Person); guys = ObjectListPrivate; for (node = (NODE *) LIST_HEAD(guys); NODE_SUCC(node); node = (NODE *) NODE_SUCC(node)) { if (OL_NR(node) != Person_Matt_Stuvysunt) { Person pers = OL_DATA(node); pers->TalkBits |= (1 << Const_tcTALK_JOB_OFFER); /* �ber Jobs kann man wieder reden! */ joined_byUnSet(Person_Matt_Stuvysunt, OL_NR(node)); joinUnSet(Person_Matt_Stuvysunt, OL_NR(node)); rememberUnSet(Person_Matt_Stuvysunt, OL_NR(node)); } } RemoveList(guys); }
static List alg1_w_ind(Term m1, List wf) { List l1,l2,wi,wn; wi=wn=NewList(); l2=CompoundArgN(m1,3); while(!is_empty_list(l2)) { List l3; l3=CompoundArg1(ListFirst(l2)); while(!is_empty_list(l3)) { Atomic t1,t2; t1=ListFirst(l3); t2=CompoundArg2(t1); if(CompoundName(t1)==OPR_WILD && !ListMember(wf,t2) && !ListMember(wi,t2)) { wi=AppendLast(wi,t2); wn=AppendLast(wn,CompoundArgN(t1,3)); } l3=ListTail(l3); } l2=ListTail(l2); } l1=wi; l2=wn; while(!is_empty_list(l1)) { ChangeList(l1,MakeCompound2(OPR_DIV,ListFirst(l1),ListFirst(l2))); l1=ListTail(l1); l2=ListTail(l2); } RemoveList(wn); return wi; }
ubyte plSay(char *msg, U32 persId) { register LIST *l = txtGoKey(PLAN_TXT, msg); register ubyte choice; SetPictID(((Person) dbGetObject(OL_NR(GetNthNode(PersonsList, persId))))-> PictID); inpTurnESC(0); inpTurnFunctionKey(0); choice = Bubble(l, 0, NULL, 200); inpTurnFunctionKey(1); inpTurnESC(1); RemoveList(l); plDisplayTimer(0, 1); plDisplayInfo(); return choice; }
RAS_ListSlot::~RAS_ListSlot() { RemoveList(); }