persistentstorage/sqlite3api/OsLayer/test_fileutil.cpp
branchRCL_3
changeset 11 211563e4b919
parent 0 08ec8eefde2f
equal deleted inserted replaced
10:31a8f755b7fe 11:211563e4b919
   332     return TCL_ERROR;
   332     return TCL_ERROR;
   333 	}
   333 	}
   334 
   334 
   335 extern "C" void PrintS(const char* aTxt)
   335 extern "C" void PrintS(const char* aTxt)
   336 	{
   336 	{
   337 	TBuf<128> buf;
   337 	if(!aTxt)
   338 	buf.Copy(TPtrC8((const TUint8*)aTxt));
   338 	    {
   339 	
   339 	    return;
   340 	RProcess process;
   340 	    }
   341 	TProcessId processId = process.Id();
   341 	TPtrC8 msg((const TUint8*)aTxt);
   342 	
   342     TInt msglen = msg.Length();
   343 	RDebug::Print(_L("%S. Process Id=%ld.\n"), &buf, processId.Id());
   343     TInt pos = 0;
   344 	}
   344     const TInt KMaxLineLength = 220;
       
   345     TBuf<KMaxLineLength> line;
       
   346     do
       
   347         {
       
   348         if(pos == 0)
       
   349             {
       
   350             RProcess process;
       
   351             TProcessId processId = process.Id();
       
   352             line.Format(_L("Process Id=%ld: "), processId.Id());
       
   353             }
       
   354         TInt len = Min(msglen, (line.MaxLength() - line.Length()));
       
   355         TPtrC8 ptr(msg.Ptr() + pos, len);
       
   356         pos += len;
       
   357         msglen -= len;
       
   358         TPtr p2((TUint16*)line.Ptr() + line.Length(), 0, len);  
       
   359         p2.Copy(ptr);
       
   360         line.SetLength(line.Length() + p2.Length());
       
   361         RDebug::Print(_L("%S\n"), &line);
       
   362         line.Zero();
       
   363         } while(msglen > 0);
       
   364 	}