1
//Auto-generated file. Please do not modify.
4
//#pragma data_seg(".SYMBIAN")
5
//__EMULATOR_IMAGE_HEADER2 (0x1000007a,0x00000000,0x00000000,EPriorityForeground,0x00000000u,0x00000000u,0x00000000,0x00000000,0x00000000,0)
13
#include <pj/unicode.h>
38
#include <e32cons.h> // Console
44
LOCAL_D CConsoleBase* console; // write all messages to this
47
class MyScheduler : public CActiveScheduler
53
void Error(TInt aError) const;
56
void MyScheduler::Error(TInt aError) const
58
PJ_UNUSED_ARG(aError);
61
LOCAL_C void DoStartL()
63
// Create active scheduler (to run active objects)
64
CActiveScheduler* scheduler = new (ELeave) MyScheduler;
65
CleanupStack::PushL(scheduler);
66
CActiveScheduler::Install(scheduler);
70
CActiveScheduler::Install(NULL);
71
CleanupStack::Pop(scheduler);
75
#define WRITE_TO_DEBUG_CONSOLE
77
#ifdef WRITE_TO_DEBUG_CONSOLE
82
static void log_writer(int level, const char *buf, int len)
84
static wchar_t buf16[PJ_LOG_MAX_SIZE];
88
pj_ansi_to_unicode(buf, len, buf16, PJ_ARRAY_SIZE(buf16));
92
TPtrC16 aBuf((const TUint16*)buf16, (TInt)len);
95
#ifdef WRITE_TO_DEBUG_CONSOLE
101
GLDEF_C TInt E32Main()
103
// Create cleanup stack
105
CTrapCleanup* cleanup = CTrapCleanup::New();
107
// Create output console
108
TRAPD(createError, console = Console::NewL(_L("Console"), TSize(KConsFullScreen,KConsFullScreen)));
112
pj_log_set_log_func(&log_writer);
114
// Run application code inside TRAP harness, wait keypress when terminated
115
TRAPD(mainError, DoStartL());
117
console->Printf(_L(" failed, leave code = %d"), mainError);
119
console->Printf(_L(" [press any key]\n"));