bool DbgGdb::FilterMessage( const wxString &msg ) { wxString tmpmsg ( msg ); StripString( tmpmsg ); tmpmsg.Trim().Trim( false ); if ( tmpmsg.Contains( wxT( "Variable object not found" ) ) || msg.Contains( wxT( "Variable object not found" ) ) ) { return true; } if ( tmpmsg.Contains( wxT( "mi_cmd_var_create: unable to create variable object" ) )||msg.Contains( wxT( "mi_cmd_var_create: unable to create variable object" ) ) ) { return true; } if ( tmpmsg.Contains( wxT( "Variable object not found" ) )|| msg.Contains( wxT( "Variable object not found" ) ) ) { return true; } if ( tmpmsg.Contains( wxT( "No symbol \"this\" in current context" ) )||msg.Contains( wxT( "No symbol \"this\" in current context" ) ) ) { return true; } if ( tmpmsg.Contains( wxT( "*running,thread-id" ) ) ) { return true; } if ( tmpmsg.StartsWith( wxT( ">" ) )||msg.StartsWith( wxT( ">" ) ) ) { // shell line return true; } return false; }
//컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴컴 //Procedure AddToBuffer //Author Robert Slater //Date Tue 26 Jan 1999 // //Description // //Inputs // //Returns // //------------------------------------------------------------------------------ bool MessageBuffer::AddToBuffer(const MESSAGE_STRUC& msg) { bool retval; SLong index,index2; bool playerRecipient = false; if (_Replay.Playback) //AMM 14Apr99 return (true); //AMM 14Apr99 //Block messages to dead blokes if (msg.callee && msg.callee->Status.deadtime) //RJS 05May99 return true; //RJS 05May99 if (msg.caller) { //FIXA if (msg.caller->nationality != Manual_Pilot.ControlledAC2->nationality) //FIXA return true; if (msg.caller->ai.radiosilent) { if (msg.caller->AcIsPlayer()) //RJS 24May99 { MESSAGE_STRUC tmpmsg(SCRIPT_SILENCE,MSG_SILENCE,NULL,msg.caller,msg.caller); _Radio.TriggerMsg(tmpmsg.SetVoice(VOICE_REST)); } return true; //RJS 24May99 } } if (msg.callee) { //FIXA if (msg.callee->nationality != Manual_Pilot.ControlledAC2->nationality) //FIXA return true; } if ((msg.callee==thePlayer) || (msg.callee==theOtherOne)) //RDH 17May99 playerRecipient = true; //RDH 17May99 //Does this message already exist?... for (index = 0; index < OLDBUFFERSIZE; index++) { if ( (oldbuffer[index].messagetype == msg.messagetype) && (oldbuffer[index].target == msg.target) ) { //is old repeatable? if ( (oldbuffer[index].visibility == VIS_3) //RJS 01Apr99 || (oldbuffer[index].visibility == NOTVIS_1) || (oldbuffer[index].visibility == VIS_1)) { return (true); //RDH 17May99 } } } for (index = 0; index < NEWBUFFERSIZE; index++) { if ( (newbuffer[index].messagetype == msg.messagetype) && (newbuffer[index].target == msg.target) ) { //is new repeatable? if ( (newbuffer[index].visibility == VIS_3) || (newbuffer[index].visibility == NOTVIS_1) ) { return (true); //RDH 17May99 } } } if (!(msg.caller==thePlayer||msg.callee==thePlayer) && !(msg.caller==theOtherOne||msg.callee==theOtherOne)) //PD 04Mar99 { if (!msg.blockchatter) //RJS 06Jul99 { AirStrucPtr checkitem = msg.caller; //AMM 24Jun99 if ( (msg.voiceindex != VOICE_REST) && (msg.voiceindex != VOICE_PLAYER) ) checkitem = msg.callee; //AMM 24Jun99 if (!checkitem) return true; if ( checkitem->PlayerInGroup() || checkitem->PlayerInFlight() ) { //Overhears leader & fac/tac & dentist & tower... if (checkitem->AcIsFlightLeader() || checkitem->AcIsGroupLeader()) { if (noBufferedMessages > 8) return false; } else return false; } else return false; } else return true; //RJS 06Jul99 } //RJS 28May99 // thereIsANewMessage=true; #ifndef NDEBUG #ifdef CHATTERTRACE // defined in rchatter.h UWord cw=GETFPCW(); ::AfxTrace("BUFFERING: %08x\n",msg.messagecnt); SETFPCW(cw); #endif #endif noBufferedMessages++; if (msg.priority >= PRI_MEDMAX) //RJS 24Jun99 { newbufferbot--; if (newbufferbot < 0) newbufferbot = NEWBUFFERSIZE-1; newbuffer[newbufferbot] = msg; } else { // Is this buffer full? if ( (newbufferbot == newbuffertop) && (newbuffer[newbufferbot].priority != GAP) ) { SLong nogaps; if (msg.priority != PRI_LOW) { nogaps = RemoveGaps(newbuffer,newbuffertop,NEWBUFFERSIZE); if (nogaps == 0) { SLong thisone = -1; for (index = newbuffertop; index < NEWBUFFERSIZE; index++) { if (newbuffer[index].priority == PRI_LOW) { thisone = index; break; } } if (thisone < 0) { for (index = 0; index < newbuffertop; index++) { if (newbuffer[index].priority == PRI_LOW) { thisone = index; break; } } } if (thisone > 0) { // Kill 1st low priority one found... newbuffer[thisone].priority = GAP; RemoveGaps(newbuffer,newbuffertop,NEWBUFFERSIZE); } } } } // Is this buffer still full? if ( (newbufferbot == newbuffertop) && (newbuffer[newbufferbot].priority != GAP) ) return(false); newbuffer[newbuffertop] = msg; //is this right?.... newbuffertop++; if (newbuffertop >= NEWBUFFERSIZE) newbuffertop = 0; } return (true); }