The Meta-Environment API

config-utils.tb

Go to the documentation of this file.
00001 #ifndef __CONFIG_UTILS__
00002 #define __CONFIG_UTILS__
00003 
00004 #include <io-utils.tb>
00005 #include <configuration-manager.idef>
00006 
00007 #define EMPTY_PATH ""
00008 
00009 process GetSearchPaths(Paths: list?) is
00010   snd-msg(cm-get-module-paths)
00011   . rec-msg(cm-module-paths(Paths?))
00012 
00013 process LocateFile(Modulename: str, Extension: str, Path: str?) is
00014 let
00015   Directory: str,
00016   Directories: list,
00017   ExtraModules : list
00018 in
00019   snd-msg(cm-get-module-paths)
00020   . rec-msg(cm-module-paths(Directories?))
00021   . snd-msg(io-find-file(Directories, Modulename, Extension))
00022   .
00023   (
00024     rec-msg(io-file-not-found)
00025     . Path := ""
00026   +
00027     rec-msg(io-file-found(Directories?))
00028     . Directory := first(Directories)
00029     . Directories := next(Directories)
00030     .
00031     if not-equal(Directories, []) then
00032       DealWithMultipleOccurrences(Directory, Modulename, Extension, Directories)
00033     else
00034       tau
00035     fi
00036     . BuildPath(Directory, Modulename, Extension, Path?)
00037   )
00038 endlet
00039 
00040 #endif /* __CONFIG_UTILS__ */

Generated on Fri Sep 12 13:08:53 2008 for meta by  doxygen 1.4.6