int main(void) { funcall(1); funcall(1); atomic_printf("result=%d\n", result); atomic_puts("EXIT-SUCCESS"); return 0; }
static void * eval (char **stringp) { void *value; char *p = *stringp, c; /* Whitespace is irrelevant. */ while (isspace (*p)) ++p; switch (*p) { case '"': /* String constant. */ value = ++p; do if (*p == '\\') { switch (*strcpy (p, p + 1)) { case 't': *p = '\t'; break; case 'n': *p = '\n'; break; } ++p; } while (*p != '\0' && *p++ != '"'); if (p[-1] == '"') p[-1] = '\0'; break; case '(': *stringp = ++p; return funcall (stringp); default: /* Try to parse it as a number. */ value = (void *) __strtol_internal (p, stringp, 0, 0); if (*stringp != p) return value; /* Anything else is a symbol that produces its address. */ value = p; do ++p; while (*p != '\0' && !isspace (*p) && (!ispunct (*p) || *p == '_')); c = *p; *p = '\0'; value = dlsym (NULL, value); *p = c; break; } *stringp = p; return value; }
void mrb_state::print_error() { mrb_print_backtrace(this); mrb_value s = funcall(mrb_value::wrap(m_exc), "inspect", 0); if (s.is_string()) { RString *str = s.ptr<RString>(); sys.error_f("%s\n",str->m_ptr); } }
/* Description: Prove knowledge of some secret. Parameters: ( mixed secret, closure cl, mixed extra ) or ( mixed secret, object ob, string func, mixed extra ) secret - something you want to prove knowledge of cl - a closure ob - an object in which to call func func - a function to call in ob extra - an extra parameter to pass Depending on which form is used, one of these will be done: ob->func( hash, extra ) or funcall( hash, extra ) where hash is the hash value of the secret: hash( secret ) Returns: The return value of the call/eval. Notes: None. */ varargs mixed prove( mixed val, mixed ob_or_cl, mixed func_or_extra, mixed extra ) { if( closurep( ob_or_cl ) ) return funcall( (closure) ob_or_cl, hash( val ), func_or_extra ); if( !objectp( ob_or_cl ) || !stringp( func_or_extra )) return 0; return call_other( (object) ob_or_cl, (string) func_or_extra, hash( val ), extra ); }
VALUE kernel_sleep(VALUE self, VALUE arg) { int secs; if (TYPE(arg) != T_INTEGER) arg = funcall(arg, "to_i", 0); secs = INT(arg)->num; while (secs > 0) secs = sleep(secs); return Qnil; }
static object funcall_cs(object fun,ufixnum n,object *b) { object *base; object *vals=(object *)fcall.valp; vs_base=vs_top; for (;n--;) vs_push(*b++); base=vs_base; funcall(fun); return unwind_vals(vals,base); }
int main(int argc, char* argv[]) { char v; char* fix_addr; void* p; breakpoint(); fix_addr = (char*)(((uintptr_t) & v - 256 * 1024) & ~(uintptr_t)(PAGE_SIZE - 1)); p = mmap(fix_addr, PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); test_assert(p == fix_addr); funcall(); return 0; }
RcppExport double evaluate4(long *l_nfeval, double *param, int i_D, const Rcpp::Function & fun, const Rcpp::Environment & env) { (*l_nfeval)++; //increment function evaluation count Rcpp::NumericVector par(i_D); for (int i = 0; i < i_D; i++) par[i] = param[i]; Rcpp::Language funcall(fun, par); Rcpp::NumericVector v = funcall.eval(env); double f_result = v[0]; if (ISNAN(f_result)) ::Rf_error("NaN value of objective function! \nPerhaps adjust the bounds."); return(f_result); }
void clispErrFlush(void) { pushSTACK(Symbol_value(S(error_output))); funcall(L(finish_output),1); }
void clispErrPuts(const char *s) { pushSTACK(asciz_to_string(s,GLO(foreign_encoding))); pushSTACK(Symbol_value(S(error_output))); funcall(L(write_string),2); }
void clispErrPutc(char c) { pushSTACK(int_char(c)); pushSTACK(Symbol_value(S(error_output))); funcall(L(write_char),2); }
void clispPutc(char c) { pushSTACK(int_char(c)); pushSTACK(Symbol_value(S(standard_output))); funcall(L(write_char),2); }
int main(void) { funcall(); atomic_puts("EXIT-SUCCESS"); return 0; }
void prompt2_print() { if (funcall(PS2) < 0 && ps2 != NULL) printf("%s", ps2); }
void prompt_print() { if (funcall(PS1) < 0 && ps1 != NULL) printf("%s", ps1); }
int main(int argc, char* argv[]) { funcall(); atomic_puts("EXIT-SUCCESS"); return 0; }
void clispFlush(void) { pushSTACK(Symbol_value(S(standard_output))); funcall(L(finish_output),1); }
handback(mixed digest, closure callback) { funcall(callback, digest); unspawn(); }