6 void factor_vm::c_to_factor_toplevel(cell quot)
8 c_to_factor(quot,this);
18 #define SUFFIX ".image"
21 /* You must delete[] the result yourself. */
22 const char *default_image_path()
24 const char *path = vm_executable_path();
27 return "factor.image";
29 /* We can't call strlen() here because with gcc 4.1.2 this
30 causes an internal compiler error. */
32 const char *iter = path;
33 while(*iter) { len++; iter++; }
35 char *new_path = new char[PATH_MAX + SUFFIX_LEN + 1];
36 memcpy(new_path,path,len + 1);
37 memcpy(new_path + len,SUFFIX,SUFFIX_LEN + 1);