6 void c_to_factor_toplevel(cell quot)
18 #define SUFFIX ".image"
21 const char *default_image_path()
23 const char *path = vm_executable_path();
26 return "factor.image";
28 /* We can't call strlen() here because with gcc 4.1.2 this
29 causes an internal compiler error. */
31 const char *iter = path;
32 while(*iter) { len++; iter++; }
34 char *new_path = (char *)safe_malloc(PATH_MAX + SUFFIX_LEN + 1);
35 memcpy(new_path,path,len + 1);
36 memcpy(new_path + len,SUFFIX,SUFFIX_LEN + 1);