[SCM] Lisaac compiler branch, master, updated. cd8063966f0033dbd3b846ff513dd53734436c61

Mildred Ki'Lya silkensedai at online.fr
Fri Jul 31 23:09:29 UTC 2009


The following commit has been merged in the master branch:
commit 5f77754ce096a9434aa3aca949bb9984fb1e2886
Author: Mildred Ki'Lya <silkensedai at online.fr>
Date:   Sat Aug 1 01:05:03 2009 +0200

    Added support for LISAAC_DIRECTORY environment variable that override the directory defined in path.h. If this environment variable is not set, the builtin directory in path.h is used instead

diff --git a/src/lisaac.li b/src/lisaac.li
index b5cc3d4..271cfca 100644
--- a/src/lisaac.li
+++ b/src/lisaac.li
@@ -48,16 +48,22 @@ Section Private
   
   - path_lisaac:STRING_CONSTANT <-
   ( + path:NATIVE_ARRAY[CHARACTER];
+    + path_str :STRING;
     + j:INTEGER;
     //COMMAND_LINE.executable_name.print; '\n'.print;
     // Load LISAAC_DIRECTORY.
-    path := `LISAAC_DIRECTORY`:NATIVE_ARRAY[CHARACTER];
-    string_tmp.clear;
-    j := 0;
-    {path.item j != '\0'}.while_do {
-      string_tmp.add_last (path.item j);
-      j := j + 1;
-    };    
+    path_str := ENVIRONMENT.get_environment_variable "LISAAC_DIRECTORY";
+    (path_str != NULL).if {
+      string_tmp.copy path_str;
+    } else {
+      path := `LISAAC_DIRECTORY`:NATIVE_ARRAY[CHARACTER];
+      string_tmp.clear;
+      j := 0;
+      {path.item j != '\0'}.while_do {
+	string_tmp.add_last (path.item j);
+	j := j + 1;
+      };
+    };
     ((string_tmp.last != '/') && {string_tmp.last != '\\'}).if {
       string_tmp.add_last '/';
     };

-- 
Lisaac compiler



More information about the Lisaac-commits mailing list