Fix files.swift for Ketan's issues
// FILES.SWIFT
+/*
+ We use temporary variables named l:t for "library-temporary".
+*/
+
#ifndef FILES_SWIFT
#define FILES_SWIFT
@pure
(string f) basename(file p)
"turbine" "0.0"
-[ "set <<f>> [ file tail <<p>> ]" ];
+[ "set l:t [ lindex <<p>> 0 ] ; set <<f>> [ file tail ${l:t} ]" ];
@pure
(string f) rootname_string(string p)
@pure
(string f) rootname(file p)
"turbine" "0.0"
-[ "set <<f>> [ file rootname <<p>> ]" ];
+[ "set l:t [ lindex <<p>> 0 ] ; set <<f>> [ file rootname ${l:t} ]" ];
@pure
(string f) extension_string(string p)
@pure
(string f) extension(file p)
"turbine" "0.0"
-[ "set <<f>> [ file extension <<p>> ]" ];
+[ "set l:t [ lindex <<p>> 0 ] ; set <<f>> [ file extension ${l:t} ]" ];
(file o)
write_array_string(string a[], int chunk)
