Ejemplo n.º 1
0
/* initialise everything */
void PicocInitialise(Picoc *pc, int StackSize)
{
	memset(pc, '\0', sizeof(*pc));
	PlatformInit(pc);
	BasicIOInit(pc);
	HeapInit(pc, StackSize);
	TableInit(pc);
	VariableInit(pc);
	LexInit(pc);
	TypeInit(pc);

#ifndef NO_HASH_INCLUDE
	IncludeInit(pc);
#endif

	LibraryInit(pc);

#ifdef BUILTIN_MINI_STDLIB
	LibraryAdd(pc, &pc->GlobalTable, "c library", &CLibrary[0]);
	CLibraryInit(pc);
#endif

	PlatformLibraryInit(pc);
	DebugInit(pc);
}
Ejemplo n.º 2
0
/* initialise everything */
void PicocInitialise(int StackSize)
{
    BasicIOInit();
    HeapInit(StackSize);
    TableInit();
    VariableInit();
    LexInit();
    TypeInit();
#ifndef NO_HASH_INCLUDE
    IncludeInit();
#endif
    LibraryInit();
#ifdef BUILTIN_MINI_STDLIB
    LibraryAdd(&GlobalTable, "c library", &CLibrary[0]);
    CLibraryInit();
#endif
    PlatformLibraryInit();
}
Ejemplo n.º 3
0
void CNotice::Notify(TNotifyUI& msg)
{
	try
	{
		if( 0 == msg.sType.Compare(_T("windowinit"))){
			TypeInit(msg);
		}
		else if( 0 == msg.sType.Compare(_T("click")) ){
			TypeClick(msg);
		}	
		else if( 0 == msg.sType.Compare(_T("timer")) ){
			GetPaintMgr()->KillTimer(GetPaintMgr()->GetRoot(),100);
			Close(IDOK);
		}
	}
	catch (...)
	{
		throw _T("CNotice::Notify");
	}
}
Ejemplo n.º 4
0
extern  cg_init_info    BEInit( cg_switches cg_data, cg_target_switches tg_data,
                                uint opt_size, proc_revision proc ) {
//===================================================================

    cg_init_info        info;
    int                 i;

    Model = cg_data;
    if( EnvVar( "ACTION_STDOUT" ) ) {
        Actions = FStdOut();
    } else {
        Actions = FCreate( "ACTIONS" );
    }
    ++FilesOpen;
    Action( "BEInit switches==" );
    Action( "%h %h", cg_data, tg_data );
    Action( ", opt_size==%d, proc_rev=%h%n", opt_size, proc );
    SymDebug = 0;
    TypDebug = 0;
    if( cg_data & DBG_LOCALS ) {
        SymDebug = FCreate( "DBGSYM" );
        ++FilesOpen;
    }
    if( cg_data & DBG_TYPES ) {
        TypDebug = FCreate( "DBGTYP" );
        ++FilesOpen;
    }
    TypeIdx = 0;
    InitDbgInfo();
    TypeInit();
    TypeDef( TY_DEFAULT, 0 );
    Inlines = NULL;
    NodeList = NULL;
    AutoList = NULL;
    LblList = NULL;
    BackList = NULL;
    TempList = NULL;
    StaticList = NULL;
    LabelId = 0;
    NodeId = 0;
    BackId = 0;
    TempId = 0;
    SelId = 0;
    SegDefs = NULL;
    CGState = S_INIT;
    InProc = NULL;
    FilesOpen = 0;
    for( i = 0; i < MAX_SEG; ++i ) {
        Locs[i] = 0;
        Files[i].hdl = 0;
        Files[i].name = NULL;
        Files[i].exists = false;
        SegOk[i] = false;
    }
    CurSeg = 0;
    Out = Files[CurSeg].hdl;
    CodeSeg = -1;
    TargTypeInit();
    Action( "BEInit%n" );
    info.version.is_large = true;
    info.version.revision = II_REVISION;
#if _TARGET & _TARG_IAPX86
    info.version.target = II_TARG_8086;
#elif _TARGET & _TARG_80386
    info.version.target = II_TARG_80386;
#elif _TARGET & _TARG_AXP
    info.version.target = II_TARG_AXP;
#elif _TARGET & _TARG_PPC
    info.version.target = II_TARG_PPC;
#else
    #error UNKNOWN TARGET
#endif
    return( info );
}