/*
- * Copyright (C) 2012, 2013
+ * Copyright (C) 2012, 2013, 2014
* Wolfgang Bumiller
* Dale Weiler
*
return NULL;
}
+ util_swap_header(&header);
+
if (!skipversion && header.version != 6) {
loaderror("header says this is a version %i progs, we need version 6\n", header.version);
fs_file_close(file);
read_data1(strings);
read_data2(globals, 2); /* reserve more in case a RETURN using with the global at "the end" exists */
+ util_swap_statements (prog->code);
+ util_swap_defs_fields(prog->defs);
+ util_swap_defs_fields(prog->fields);
+ util_swap_functions (prog->functions);
+ util_swap_globals (prog->globals);
+
fs_file_close(file);
/* profile counters */
return 0;
}
+static int qc_pow(qc_program_t *prog) {
+ qcany_t *base, *exp, out;
+ CheckArgs(2);
+ base = GetArg(0);
+ exp = GetArg(1);
+ out._float = powf(base->_float, exp->_float);
+ Return(out);
+ return 0;
+}
+
static prog_builtin_t qc_builtins[] = {
NULL,
&qc_print, /* 1 */
&qc_strcmp, /* 11 */
&qc_normalize, /* 12 */
&qc_sqrt, /* 13 */
- &qc_floor /* 14 */
+ &qc_floor, /* 14 */
+ &qc_pow /* 15 */
};
static const char *arg0 = NULL;