Example #1
0
OBJ
builtin_set(OBJ env, OBJ argList) {
    OBJ varName, expr;

    if (!ISCONS(argList)) {
	js_error("(set!) expects 2 arguments:", argList);
    }
    varName = CAR(argList);
    argList = CDR(argList);

    if (!ISCONS(argList)) {
	js_error("(set!) expects 2 arguments:", argList);
    }
    expr = CAR(argList);
    argList = CDR(argList);
    if (argList != js_nil) {
	js_error("(set!) expects 2 arguments:", argList);
    }

    if (!ISSYMBOL(varName)) {
	js_error("(set!) non symbol variable name:", varName);
    }
    if (expr == js_nil) {
	environmentSet(env, varName, expr);
	return js_void;	
    }
    OBJ evaledExpr = js_eval(env, expr);
    environmentSet(env, varName, evaledExpr);
    return js_void;
}
Example #2
0
VOIDPTRFUNC
CP_builtin_set() {
    OBJ env = ARG(0);
    OBJ argList = ARG(1);
    OBJ varName, expr;
    VOIDPTRFUNC CP_builtin_set2();

    if (!ISCONS(argList)) {
	js_error("(set!) expects 2 arguments:", argList);
    }
    varName = CAR(argList);
    argList = CDR(argList);

    if (!ISCONS(argList)) {
	js_error("(set!) expects 2 arguments:", argList);
    }
    expr = CAR(argList);
    argList = CDR(argList);
    if (argList != js_nil) {
	js_error("(set!) expects 2 arguments:", argList);
    }

    if (!ISSYMBOL(varName)) {
	js_error("(set!) non symbol variable name:", varName);
    }
    if (expr == js_nil) {
	environmentSet(env, varName, expr);
	RETURN (js_void);
    }
    CREATE_LOCALS(1);
    SET_LOCAL(0, varName);
    ASSERT(env != NULL, "bad env");
    CALL2(CP_js_eval, env, expr, CP_builtin_set2);
    // not reached
}
Example #3
0
STDMETHODIMP GuestSessionWrap::EnvironmentSet(IN_BSTR aName,
                                              IN_BSTR aValue)
{
    LogRelFlow(("{%p} %s:enter aName=%ls aValue=%ls\n", this, "GuestSession::environmentSet", aName, aValue));

    VirtualBoxBase::clearError();

    HRESULT hrc;

    try
    {

        AutoCaller autoCaller(this);
        if (FAILED(autoCaller.rc()))
            throw autoCaller.rc();

        hrc = environmentSet(BSTRInConverter(aName).str(),
                             BSTRInConverter(aValue).str());
    }
    catch (HRESULT hrc2)
    {
        hrc = hrc2;
    }
    catch (...)
    {
        hrc = VirtualBoxBase::handleUnexpectedExceptions(this, RT_SRC_POS);
    }

    LogRelFlow(("{%p} %s: leave hrc=%Rhrc\n", this, "GuestSession::environmentSet", hrc));
    return hrc;
}
Example #4
0
VOIDPTRFUNC
CP_builtin_set2() {
    {
	OBJ value = RETVAL;
	OBJ env = ARG(0);
	OBJ varName = LOCAL(0);

	environmentSet(env, varName, value);
	RETURN (js_void);
     }
}
Example #5
0
void QInstallPage::initializeConnections()
{
    /* MTest processes: Tests to find system specific functions */

    connect( this, SIGNAL( egsCUtilsCreated() ),
             this, SLOT( test_c_utils() ) ); n_config_steps += 25;
    connect( this, SIGNAL( egsCUtilsTested() ),
             this, SLOT( test_load_beamlib() ) );
    connect( this, SIGNAL( egsCUtilsEnded() ),
             this, SLOT( createSystemFiles() ) );
    connect( this, SIGNAL( egsCUtilsFailed() ),
             this, SLOT( createSystemFiles() ) );
    connect( this, SIGNAL( LoadBeamLibTested() ),
             this, SLOT( createSystemFiles() ) );

    /* Make processes: Only need to go to folder and execute 'make' */

    connect( this, SIGNAL( systemCreated( ushort ) ),
             this, SLOT( buildEGSnrc( ushort ) ) );
    connect( this, SIGNAL( nextBuildStep( ushort )),
             this, SLOT( buildEGSnrc( ushort )) );
    connect( this, SIGNAL( cppSystemCreated( ushort ) ),
             this, SLOT( buildEGSnrc( ushort ) ) );

  /* Environment Configuration */
    connect( this, SIGNAL( cppBuildFinalized() ),
             this, SLOT( copy_user_codes() ) );
    connect( this, SIGNAL( userCodesCopied() ),
             this, SLOT( beamInstall() ) );
    connect( this, SIGNAL( beamDone() ),
             this, SLOT( environmentSetUp() ) );
    connect( this, SIGNAL( skipBeam() ),
             this, SLOT( environmentSetUp() ) );

    connect( this, SIGNAL( environmentSet() ),
             this, SIGNAL( AllDone() ) );

    connect( this, SIGNAL( AllDone() ),
             this, SLOT( resetPage() ) );

}