void AliasStruct(BITINT *bits, IMODE *ans, IMODE *left, IMODE *right) { ALIASLIST *src; int i, n = ans->offset->v.i; if (left->offset->type == en_tempref && left->mode == i_direct) { src = tempInfo[left->offset->v.sp->value.i]->pointsto; while (src) { ALIASADDRESS *aa = src->address; while (aa->merge) aa = aa->merge; for (i=0; i < n; i++) { ALIASNAME *an = GetAliasName(aa->name, i); if (an) { ALIASADDRESS *aa2 = LookupAddress(an, 0); while (aa2->merge) aa2 = aa2->merge; if (aa2 && aa2->modifiedBy) { ormap(bits, aa2->modifiedBy); } } } src = src->next; } setbit(bits, termMap[left->offset->v.sp->value.i]); return; } else if (left->mode == i_immed) { ALIASNAME *an = LookupMem(left); ALIASADDRESS *aa; for (i=0; i < n; i++) { ALIASNAME *an2 = GetAliasName(an, i); if (an2) { aa = LookupAddress(an2, 0); while (aa->merge) aa = aa->merge; if (aa && aa->modifiedBy) { ormap(bits, aa->modifiedBy); } ResetProcessed(); scanDepends(bits, aa->pointsto); } } return; } else { diag("AliasStruct: invalid src type"); } }
void CActionEngineEffect::DoAction() { const DWORD hashCode = GetValue(eProperty_Name); const DWORD positionX = GetValue(eProperty_PosX); const DWORD positionZ = GetValue(eProperty_PosZ); const DWORD motionIndex = GetValue(eProperty_Value); const DWORD angle = GetValue(eProperty_Angle); const DWORD isLoop = GetValue(eProperty_Loop); MSG_NAME_DWORD5 message; ZeroMemory( &message, sizeof(message)); message.Category = MP_TRIGGER; message.Protocol = MP_TRIGGER_ENGINE_EFFECT_ACK; message.dwData1 = positionX; message.dwData2 = positionZ; message.dwData3 = motionIndex; message.dwData4 = angle; message.dwData5 = isLoop; SafeStrCpy( message.Name, GetAliasName(hashCode), sizeof(message.Name) / sizeof(*message.Name)); for(DWORD objectIndex = GetHeadTarget(); objectIndex > 0; objectIndex = GetNextTarget()) { CObject* const object = g_pUserTable->FindUser(objectIndex); if(0 == object) { continue; } else if(eObjectKind_Player != object->GetObjectKind()) { continue; } object->SendMsg( &message, sizeof(message)); } }
void nsEudoraAddress::ProcessNote( const char *pLine, PRInt32 len, nsString& errors) { nsCString name; PRInt32 cnt = GetAliasName( pLine, len, name); pLine += cnt; len -= cnt; if (!cnt || !len) return; // Find the alias for this note and store the note data there! CAliasEntry *pEntry = nsnull; PRInt32 idx = FindAlias( name); if (idx == -1) return; pEntry = (CAliasEntry *) m_alias.ElementAt( idx); pEntry->m_notes.Append( pLine, len); pEntry->m_notes.Trim( kWhitespace); }
CAliasEntry *nsEudoraAddress::ProcessAlias( const char *pLine, PRInt32 len, nsString& errors) { nsCString name; PRInt32 cnt = GetAliasName( pLine, len, name); pLine += cnt; len -= cnt; // we have 3 known forms of addresses in Eudora // 1) real name <email@address> // 2) email@address // 3) <email@address> // 4) real name email@address // 5) <email@address> (Real name) CAliasEntry *pEntry = new CAliasEntry( name); if (!cnt || !len) return(pEntry); // Theoretically, an alias is just an RFC822 email adress, but it may contain // an alias to another alias as the email! I general, it appears close // but unfortunately not exact so we can't use the nsIMsgHeaderParser to do // the work for us! // Very big bummer! const char *pStart; PRInt32 tLen; nsCString alias; while ( len) { pStart = pLine; cnt = 0; while (len && (*pLine != ',')) { if (*pLine == '"') { tLen = CountQuote( pLine, len); pLine += tLen; len -= tLen; cnt += tLen; } else if (*pLine == '(') { tLen = CountComment( pLine, len); pLine += tLen; len -= tLen; cnt += tLen; } else if (*pLine == '<') { tLen = CountAngle( pLine, len); pLine += tLen; len -= tLen; cnt += tLen; } else { cnt++; pLine++; len--; } } if (cnt) { CAliasData *pData = new CAliasData(); if (pData->Process( pStart, cnt)) { pEntry->m_list.AppendElement( pData); } else delete pData; } if (len && (*pLine == ',')) { pLine++; len--; } } // Always return the entry even if there's no other attribute associated with the contact. return( pEntry); }