// Will check whether the message header matches an error message. In this case it prints // it on the LCD. TODO: Tell the webserver that something is wrong. inline void checkError(char* ret) { if (!(ret[0] & ERROR_FLAG)) { return; } bBuf(30); bStr("ERR: "); bByte(ret[1]); bPrint(6); dbg(Error, ret[1]); }
GLDEF_C void TestTDes<T,S,L,R>::Test11() // // Constructs a TBuf view over a buffer // { T aBuf(_TL("ABCDEF")); aBuf.__DbgTestInvariant(); T bBuf(aBuf); bBuf.__DbgTestInvariant(); test(bBuf.MaxLength()==aBuf.MaxLength()); test(bBuf.MaxLength()==0x40); test(bBuf.Length()==aBuf.Length()); test(bBuf.Length()==6); for(S count=0;count<bBuf.Length();count++) { test(*(bBuf.Ptr()+count)==('A' + count)); test(*(bBuf.Ptr()+count)==*(aBuf.Ptr()+count)); } }