Update of /cvsroot/aimmath/AIM/WEB-INF/maple/aim
In directory sc8-pr-cvs1:/tmp/cvs-serv1089
Modified Files:
Tag: develop_2_1
Compile.mpl Util.mpl
Log Message:
Now allows EXAMPLES to be used as an abbreviation for the ROOT/examples
directory (soon to be created), for included files. - GG
Index: Compile.mpl
===================================================================
RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Compile.mpl,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -d -r1.2 -r1.2.2.1
*** Compile.mpl 5 May 2003 03:25:46 -0000 1.2
--- Compile.mpl 9 Jul 2003 10:15:28 -0000 1.2.2.1
***************
*** 114,117 ****
--- 114,119 ----
# make the file list from the comma separated filenames
filelist:=map(`Util/StripEndSpaces`,[`Util/CommaSplit`(lines[n][2])]);
+ # expand EXAMPLES to path of examples directory
+ filelist:=map(`aim/ExpandExamplesPath`, filelist);
# ignore blank filenames
filelist:=remove(x->x="",filelist);
Index: Util.mpl
===================================================================
RCS file: /cvsroot/aimmath/AIM/WEB-INF/maple/aim/Util.mpl,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -d -r1.2 -r1.2.2.1
*** Util.mpl 5 May 2003 03:25:46 -0000 1.2
--- Util.mpl 9 Jul 2003 10:15:28 -0000 1.2.2.1
***************
*** 363,366 ****
--- 363,381 ----
######################################################################
+ `Package/Assign`(
+ `aim/ExpandExamplesPath`::string,
+ "If present, expands @EXAMPLES/@ at the head of path string @path@
+ to the absolute path of the @examples@ directory on the system,
+ or otherwise returns @path@ untouched.",
+ proc(path::string)
+ local p;
+ p := StringTools:-RegSub("^EXAMPLES/(.*)", path,
+ cat(DefaultZone['WebDir'], "/examples/\\1"));
+ return `if`(type(p, string), p, path);
+ end
+ ):
+
+ ######################################################################
+
EndPackage():
|