Re: [fricas-devel] [PATCH] remove default value for $AXIOM

2019-06-26 Thread Waldek Hebisch
> 
> Remove those hard coded default value for $AXIOM.

OK, please commit.
 
-- 
  Waldek Hebisch

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/E1hg7aA-0005Y5-1X%40hera.math.uni.wroc.pl.
For more options, visit https://groups.google.com/d/optout.


[fricas-devel] [PATCH] remove default value for $AXIOM

2019-06-26 Thread oldk1331
Remove those hard coded default value for $AXIOM.

diff --git a/src/hyper/htadd.c b/src/hyper/htadd.c
index 3b4c1e6b..a63cffd1 100644
--- a/src/hyper/htadd.c
+++ b/src/hyper/htadd.c
@@ -211,9 +211,8 @@
 if (flag & System) {
 SPAD = (char *) getenv("AXIOM");
 if (SPAD == NULL) {
-fprintf(stderr,
-"Build_db_filename: Defaulting on $AXIOM\n");
-SPAD = (char *) def_spad;
+fprintf(stderr, "build_db_filename: $AXIOM is empty\n");
+exit(-1);
 }
 sprintf(dbfilename, "%s/share/hypertex/pages/%s", SPAD,
db_file_name);
 sprintf(path, "%s/share/hypertex/pages", SPAD);
diff --git a/src/hyper/hyper.h b/src/hyper/hyper.h
index fcfffd2a..7ce6fc3e 100644
--- a/src/hyper/hyper.h
+++ b/src/hyper/hyper.h
@@ -447,7 +447,6 @@
 #define NoChar   -
 #define temp_dir "/tmp/"
 #define db_file_name "ht.db"
-#define def_spad "/usr/local/fricas"


 /* Types of HyperDoc pages */
diff --git a/src/hyper/spadint.c b/src/hyper/spadint.c
index 9ca1208e..da460309 100644
--- a/src/hyper/spadint.c
+++ b/src/hyper/spadint.c
@@ -190,7 +190,8 @@

 SPAD = (char *) getenv("AXIOM");
 if (SPAD == NULL) {
-sprintf(SPAD, "/spad/mnt/rios");
+fprintf(stderr, "start_user_buffer: $AXIOM is empty\n");
+exit(-1);
 }
 sprintf(spadbuf, "%s/lib/spadbuf", SPAD);
 sprintf(complfile, "%s/lib/command.list", SPAD);

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to fricas-devel+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/2db4e727-d949-edae-2079-4e9a64767758%40gmail.com.
For more options, visit https://groups.google.com/d/optout.