Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 26 additions & 24 deletions ipl/procs/paths.icn
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,28 @@ procedure ulibprefix()
if path := (&features ? (="Libraries at " & tab(upto(';') | 0))) then
prefix := path || "/"
else if (path := (&features ? (="Binaries at " & tab(0)))) |
((f := open((path := getpaths()) || ("uniconx" | "iconx" |
"uniconx.exe" |"iconx.exe" |
"wuniconx.exe" | "wiconx.exe"))))
((f := open((path := getpaths()) || ("uniconx" | "iconx" |
"uniconx.exe" |"iconx.exe" |
"wuniconx.exe" | "wiconx.exe"))))
then {
close(\f)
# The returned path has the form /path/unicon/bin/
# Drop the bin directory from the path to get the root
# unicon directory

# remove the trailing slash it could be / or \
c := path[-1:0]
path := path[1:-1]
# find the previous slash and copy the path up to it including the slash
close(\f)
# The returned path has the form /path/unicon/bin/
# Drop the bin directory from the path to get the root
# unicon directory

# remove the trailing slash it could be / or \
c := path[-1:0]
path := path[1:-1]
# find the previous slash and copy the path up to it including the slash
every i:= find(c, path)
prefix := path[1:i+1]
prefix := path[1:i+1]
}
if &features=="MS Windows NT" then
prefix:=map(prefix, '/', '\\')
prefix:=map(\prefix, '/', '\\')
}
return prefix

if \prefix then
return prefix
end

# unicon library paths
Expand All @@ -62,16 +64,16 @@ procedure ulibpaths()
sep := pathsep()
prefix := ulibprefix()
libpath :=
prefix || "ipl/lib" || sep ||
prefix || "uni/lib" || sep ||
prefix || "uni/gui" || sep ||
prefix || "uni/xml" || sep ||
prefix || "uni/parser" || sep ||
prefix || "uni/3d" || sep ||
prefix || "plugins/lib" || sep
prefix || "ipl/lib" || sep ||
prefix || "uni/lib" || sep ||
prefix || "uni/gui" || sep ||
prefix || "uni/xml" || sep ||
prefix || "uni/parser" || sep ||
prefix || "uni/3d" || sep ||
prefix || "plugins/lib" || sep

if &features=="MS Windows NT" then
libpath:=map(libpath, '/', '\\')
libpath:=map(libpath, '/', '\\')
}
return libpath
end
Expand Down Expand Up @@ -105,7 +107,7 @@ local sep, prefix

pathstr := (semicolonpath("LPATH") | ".") || sep || pathstr
if &features=="MS Windows NT" then
pathstr:=map(pathstr, '/', '\\')
pathstr:=map(pathstr, '/', '\\')
}
return pathstr
end
Expand Down
3 changes: 3 additions & 0 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Test: Hdr
$(MAKE) -C $$dir; \
done
@$(MAKE) -s Summary
@$(MAKE) -C ulsp Test

all: Hdr
@for dir in $(TESTS); do \
Expand Down Expand Up @@ -80,6 +81,7 @@ distclean:
-cd pattern && $(MAKE) distclean
-cd thread && $(MAKE) distclean
-cd coexpr && $(MAKE) distclean
-cd ulsp && $(MAKE) distclean
-rm -f posix/x.icn
-rm -f posix/1

Expand All @@ -97,3 +99,4 @@ clean Clean Pure:
-cd pattern && $(MAKE) Clean
-cd thread && $(MAKE) Clean
-cd coexpr && $(MAKE) Clean
-cd ulsp && $(MAKE) Clean
Loading
Loading