CELL func_charp(CELL frame) { return MKBOOL(CHARP(FV0)); }
CELL func_eqvp(CELL frame) { return MKBOOL(internal_eqvp(FV0, FV1)); }
CELL func_pairp(CELL frame) { return MKBOOL(CONSP(FV0)); }
// FIXME can't cope with circular lists CELL func_listp(CELL frame) { CELL list = FV0; while(CONSP(list)) list = CDR(list); return MKBOOL(NULLP(list)); }
CELL func_nullp(CELL frame) { return MKBOOL(NULLP(FV0)); }
//Add 20130724 by Fance LRESULT CCO2_View::ResumeCO2MessageCallBack(WPARAM wParam, LPARAM lParam) { UINT temp_id; _MessageWriteOneInfo *Write_Struct_feedback =(_MessageWriteOneInfo *)lParam; bool msg_result=WRITE_FAIL; msg_result = MKBOOL(wParam); vector <int>::iterator Iter; if(msg_result) { int indexid = -1; for (int i=0;i<(int)Change_Color_ID.size();i++) { if(Change_Color_ID.at(i)!=Write_Struct_feedback->CTRL_ID) continue; else indexid = i; } if(indexid!=-1) { Iter = Change_Color_ID.begin()+indexid; Change_Color_ID.erase(Iter); } CString temp; temp.Format(_T("Change \"%s\" value from %d to %d success!"), Write_Struct_feedback->Changed_Name, Write_Struct_feedback->old_value, Write_Struct_feedback->new_value); temp_id = Write_Struct_feedback->CTRL_ID; SetPaneString(1,temp); product_register_value[Write_Struct_feedback->address]= Write_Struct_feedback->new_value; if(Write_Struct_feedback!=NULL) delete Write_Struct_feedback; //MessageBox(temp); } else { CString temp; temp.Format(_T("Change \"%s\" value from %d to %d Fail!"), Write_Struct_feedback->Changed_Name, Write_Struct_feedback->old_value, Write_Struct_feedback->new_value); temp_id = Write_Struct_feedback->CTRL_ID; SetPaneString(1,temp); Beep(10,100); product_register_value[Write_Struct_feedback->address]= Write_Struct_feedback->old_value; //GetDlgItem(Write_Struct_feedback->CTRL_ID)->SetWindowTextW(_T("")); int indexid = -1; for (int i=0;i<(int)Change_Color_ID.size();i++) { if(Change_Color_ID.at(i)!=Write_Struct_feedback->CTRL_ID) continue; else indexid = i; } Iter = Change_Color_ID.begin()+indexid; if(indexid!=-1) { Iter = Change_Color_ID.begin()+indexid; Change_Color_ID.erase(Iter); } if(Write_Struct_feedback!=NULL) { delete Write_Struct_feedback; } } Fresh(); GetDlgItem(temp_id)->Invalidate(); return 0; }
CELL func_stringp(CELL frame) { return MKBOOL(STRINGP(FV0)); }