saved states and anaconda

This commit is contained in:
Vitor Santos Costa
2017-11-15 12:18:19 +00:00
parent 450d7a2bdd
commit ed2c85a56b
22 changed files with 230 additions and 150 deletions

View File

@@ -727,14 +727,15 @@ static size_t save_ops(FILE *stream, Term mod) {
return 1;
}
static int save_header(FILE *stream, char type[]) {
char msg[256 * 16];
static size_t save_header(FILE *stream, char type[]) {
char msg[2048];
memset(msg, 0, 2048);
sprintf(msg,
"#!/bin/sh\nexec_dir=${YAPBINDIR:-%s}\nexec $exec_dir/yap $0 "
"\"$@\"\n%s %s\n",
YAP_BINDIR, type, YAP_FULL_VERSION);
return save_bytes(stream, msg, strlen(msg) + 1);
return save_bytes(stream, msg, 2048);
}
static size_t save_module(FILE *stream, Term mod) {