Bump version of Envmodules library after the small changes made:
- directly return result of Envmodules_Init last operation
- Tcl_GetBooleanFromObj already set error message, no need to rewrite an
error message in case boolean argument is not boolean
Add an utility library that supersedes the closedir function from libc.
The closedir function from this added library always returns an error
(-1). It is used for coverage test of the closedir call made withing the
Envmodules_GetFilesInDirectoryObjCmd function of the Tcl extension
library.
No need to craft an error message when a non-boolean value is passed to
procedures as the Tcl_GetBooleanFromObj function already set the
accurate message when it returns non-OK.
When coverage is asked (COVERAGE=y) also check lib/envmodules.c (Modules
Tcl extension library) and report obtained coverage result (Codecov
script automatically finds Gcov coverage results).
When looking for modulefiles in enabled modulepaths, take .modulerc file
found at the root of a modulepath directory into account. Which means
these RC files are now evaluated like global rc files and can be used to
define module aliases targeting modulefiles stored in the underlying
file tree.
findModules procedure has been adapted to return any .modulerc file
found at the root of the directory. Code that look at modulepath root
has been adapted to use the getFilesInDirectory procedure or command.
A fetch_dotversion argument is added to the getFilesInDirectory Tcl
procedure and its libtclenvmodules counterpart. This argument is
disabled when looking at modulepath root content to avoid returning
eventual .version file stored there.
Shorthand version notation (ex: /1.0) cannot be used in a modulepath rc
file as a module name cannot be determined from this location.
Add function in libtclenvmodules to implement getFilesInDirectory as a
command, which provides a more IO-optimized way than native Tcl commands
perform by avoiding specific additional queries to get hidden files like
.modulerc and .version. As a result 1 stat and 2 access syscalls are
saved per directory read.
Add code to Tcl extension library to report error specifically when
built against Tcl8.4. This version of Tcl does not propose a
Tcl_ObjPrintf function, so the Tcl_AppendResult function is used instead
when the library is built against this version.
Introduce Modules Tcl extension library (written in C) to extend Tcl
language in order to provide more optimized I/O commands than native Tcl
commands do.
This library first provides a 'readFile' command which performs an open,
read, close of a given modulefile to fetch its content. Compared to the
Tcl native open, read, close commands it saves 1 ioctl + 1 fcntl + N
lstat system calls per modulefile.
numeric substrings numerically (mostly).
* lib/Makefile: Remove auto*-generated file.
* locate_module.c (SortedDirList): Ignore SCCS/ subdirs, too.
* configure.ac: Disable our "look" for RUNTEST; it drives auto*
crazy. Added the --with-file-collate={string,number} test, which
provides a way to enable USE_COLCOMP.
* ModuleCmd_Avail.c (fi_ent_cmp): USE_COLCOMP when told to do so.
* locate_module.c (filename_compare): Ditto.
* Makefile.am (modulecmd_LDFLAGS): lib is in the builddir, not the
srcdir.
(modulecmd_SOURCES): Added colcomp.c .