On 3/17/21 10:15 PM, Waldek Hebisch wrote:
On Tue, Mar 16, 2021 at 08:55:02PM +0800, Qian Yun wrote:
The patch is here, discussions are welcome. If my idea is accepted,
I can refine the patch a bit more.
It uses "argv[0]" to determine the path of "FRICASsys" binary,
not very reliable, but portable.
So the logic is to use env var "FRICAS" first if it exists,
then use "newroot" if it is passed as function argument,
then use "$spadroot" which is build time value, use if it still exists,
then use the parent directory of "FRICASsys", if it contains
"algebra/compress.daase".
In general that is very reasonable. I would probably look
at "algebra/interp.daase" as it is more fundamental. I am
not sure if we always have "argv[0]" (more precisely, if
setting argv[0] to null is merely perverse or illegal).
OK, I'll try to generate a proper patch utilizing this idea.
argv[0] can be modified, that is unfortunate, but it is most
portable, because it is from C, unlike "$0" from shell.
Anyway, I'll check existence of "algebra/interp.daase" before use,
for both "$FRICAS", "$spadroot", and "argv[0]".
- Qian
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/0c2a0b4d-9ad2-5800-4f67-5cc86c0ef42e%40gmail.com.