mirror of
https://github.com/envmodules/modules.git
synced 2026-06-14 00:42:43 +08:00
853 lines
37 KiB
HTML
853 lines
37 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
|
|
<!-- This HTML file generated by cxref (version 1.6a). -->
|
|
<!-- cxref program (c) Andrew M. Bishop 1995,96,97,98,99,2000,01,02,03,04,05. -->
|
|
|
|
<!--
|
|
Cxref: cxref -block-comments -verbatim-comments -xref-all -index-all -html-src -Oxref locate_module.c
|
|
CPP : cxref-cpp -lang-c -C -dD -dI
|
|
-->
|
|
|
|
<HTML>
|
|
|
|
<HEAD>
|
|
<TITLE>Cross reference for locate_module.c of cxref.</TITLE>
|
|
<LINK rel="stylesheet" href="cxref.css" type="text/css">
|
|
</HEAD>
|
|
|
|
<BODY>
|
|
|
|
<h1><a name="file" href="locate_module.c.src.html">File locate_module.c</a></h1>
|
|
<pre>
|
|
** ** Module Header ******************************************************* **
|
|
** **
|
|
** Modules Revision 3.0 **
|
|
** Providing a flexible user environment **
|
|
** **
|
|
** File: locate_module.c **
|
|
** First Edition: 1991/10/23 **
|
|
** **
|
|
** Authors: John Furlan, jlf@behere.com **
|
|
** Jens Hamisch, jens@Strawberry.COM **
|
|
** **
|
|
** Description: Contains the routines which locate the actual **
|
|
** modulefile given a modulefilename by looking in all **
|
|
** of the paths in MODULEPATH. **
|
|
** **
|
|
** Exports: Locate_ModuleFile **
|
|
** SortedDirList **
|
|
** SplitIntoList **
|
|
** FreeList **
|
|
** SourceRC **
|
|
** SourceVers **
|
|
** **
|
|
** Notes: **
|
|
** **
|
|
** ************************************************************************ **
|
|
</pre>
|
|
|
|
<table>
|
|
<tr>
|
|
<td>References Variables:
|
|
<td><a href="locate_module.c.html#var-Id">Id</a>
|
|
<td><a href="locate_module.c.html#var-Id">locate_module.c</a>
|
|
</tr>
|
|
</table>
|
|
|
|
<hr>
|
|
<h2>Included Files</h2>
|
|
|
|
<ul class="cxref-include">
|
|
<li class="cxref-include-local"><tt><span class="cxref-include-local"><a href="modules_def.h.html#file">#include "modules_def.h"</a></span></tt>
|
|
<ul class="cxref-include">
|
|
<li class="cxref-include-system"><tt><span class="cxref-include-system">#include <stdio.h></span></tt>
|
|
<li class="cxref-include-system"><tt><span class="cxref-include-system">#include <stdarg.h></span></tt>
|
|
<li class="cxref-include-system"><tt><span class="cxref-include-system">#include <tcl.h></span></tt>
|
|
<li class="cxref-include-local"><tt><span class="cxref-include-local"><a href="config.h.html#file">#include "config.h"</a></span></tt>
|
|
<li class="cxref-include-system"><tt><span class="cxref-include-system">#include <stdlib.h></span></tt>
|
|
<li class="cxref-include-system"><tt><span class="cxref-include-system">#include <string.h></span></tt>
|
|
<li class="cxref-include-system"><tt><span class="cxref-include-system">#include <unistd.h></span></tt>
|
|
<li class="cxref-include-system"><tt><span class="cxref-include-system">#include <sys/types.h></span></tt>
|
|
<li class="cxref-include-system"><tt><span class="cxref-include-system">#include <ctype.h></span></tt>
|
|
<li class="cxref-include-system"><tt><span class="cxref-include-system">#include <sys/stat.h></span></tt>
|
|
<li class="cxref-include-system"><tt><span class="cxref-include-system">#include <sys/termios.h></span></tt>
|
|
<li class="cxref-include-system"><tt><span class="cxref-include-system">#include <fcntl.h></span></tt>
|
|
<li class="cxref-include-system"><tt><span class="cxref-include-system">#include <sys/ioctl.h></span></tt>
|
|
<li class="cxref-include-system"><tt><span class="cxref-include-system">#include <dirent.h></span></tt>
|
|
<li class="cxref-include-system"><tt><span class="cxref-include-system">#include <errno.h></span></tt>
|
|
</ul>
|
|
</ul>
|
|
|
|
<hr>
|
|
<h2>Preprocessor definitions</h2>
|
|
|
|
<tt><span class="cxref-define"><a href="locate_module.c.src.html#line55">#define SRCFRAG</a> 100</span></tt><br>
|
|
|
|
<hr>
|
|
<h2>Local Variables</h2>
|
|
|
|
<b><a name="var-Id">Id</a></b><br>
|
|
<tt><span class="cxref-variable"><a href="locate_module.c.src.html#line36">static char Id[]</a></span></tt><br>
|
|
<table>
|
|
<tr>
|
|
<td>Used in:
|
|
<td> <td><span class="cxref-reference-local"><a href="locate_module.c.html#file">locate_module.c</a></span>
|
|
</tr>
|
|
</table>
|
|
<p>
|
|
<b><a name="var-UseId">UseId</a></b><br>
|
|
<tt><span class="cxref-variable"><a href="locate_module.c.src.html#line37">static void* UseId[]</a></span></tt><br>
|
|
<p>
|
|
<b><a name="var-module_name">module_name</a></b><br>
|
|
<tt><span class="cxref-variable"><a href="locate_module.c.src.html#line67">static char module_name[]</a></span></tt><br>
|
|
<table>
|
|
<tr>
|
|
<td>Used in:
|
|
<td><a href="#func-GetModuleName">GetModuleName()</a>
|
|
<td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><a href="#func-Locate_ModuleFile">Locate_ModuleFile()</a>
|
|
<td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><a href="#func-SortedDirList">SortedDirList()</a>
|
|
<td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><a href="#func-SourceRC">SourceRC()</a>
|
|
<td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><a href="#func-SourceVers">SourceVers()</a>
|
|
<td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><a href="#func-SplitIntoList">SplitIntoList()</a>
|
|
<td>
|
|
</tr>
|
|
</table>
|
|
<p>
|
|
<b><a name="var-buf">buf</a></b><br>
|
|
<tt><span class="cxref-variable"><a href="locate_module.c.src.html#line83">static char buf[1024]</a></span></tt><br>
|
|
<table>
|
|
<tr>
|
|
<td>Used in:
|
|
<td><a href="#func-Locate_ModuleFile">Locate_ModuleFile()</a>
|
|
<td>
|
|
</tr>
|
|
</table>
|
|
<p>
|
|
<b><a name="var-modfil_buf">modfil_buf</a></b><br>
|
|
<tt><span class="cxref-variable"><a href="locate_module.c.src.html#line84">static char modfil_buf[1024]</a></span></tt><br>
|
|
<table>
|
|
<tr>
|
|
<td>Used in:
|
|
<td><a href="#func-GetModuleName">GetModuleName()</a>
|
|
<td>
|
|
</tr>
|
|
</table>
|
|
|
|
<hr>
|
|
<h2><a name="func-Locate_ModuleFile">Global Function Locate_ModuleFile()</a></h2>
|
|
<pre>
|
|
** ** Function-Header ***************************************************** **
|
|
** **
|
|
** Function: Locate_ModuleFile **
|
|
** **
|
|
** Description: Searches for a modulefile given a string argument **
|
|
** which is either a full path or a modulefile name **
|
|
** -- usually the argument the user gave. If it's not a **
|
|
** full path, the directories in the MODULESPATH **
|
|
** environment variable are searched to find a match **
|
|
** for the given name. **
|
|
** **
|
|
** First Edition: 1991/10/23 **
|
|
** **
|
|
** Parameters: Tcl_Interp *interp Attached Tcl interpr.**
|
|
** char *modulename Name of the module to**
|
|
** be located **
|
|
** char *realname Real modulename (with**
|
|
** version) **
|
|
** char *filename Real full module **
|
|
** file path **
|
|
** **
|
|
** Result: int TCL_OK or TCL_ERROR **
|
|
** filename the full path of the required module **
|
|
** file is copied in here **
|
|
** **
|
|
** Attached Globals: g_current_module The module which is handled **
|
|
** by the current command **
|
|
** **
|
|
** ************************************************************************ **
|
|
</pre>
|
|
|
|
<tt><span class="cxref-function"><a href="locate_module.c.src.html#line154">int Locate_ModuleFile ( Tcl_Interp* interp, char* modulename, char* realname, char* filename )</a></span></tt><br>
|
|
<table>
|
|
<tr>
|
|
<td>Prototyped in:
|
|
<td colspan=2><span class="cxref-reference-local"><a href="modules_def.h.html#file">modules_def.h</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>Calls:
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#func-GetModuleName">GetModuleName()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#func-GetModuleName">locate_module.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="error.c.html#func-Module_Error">Module_Error()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="error.c.html#func-Module_Error">error.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#func-SplitIntoList">SplitIntoList()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#func-SplitIntoList">locate_module.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="cmdVersion.c.html#func-VersionLookup">VersionLookup()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="cmdVersion.c.html#func-VersionLookup">cmdVersion.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-null_free">null_free()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-null_free">utility.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-stringer">stringer()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-stringer">utility.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td colspan=2><span class="cxref-reference-system">getenv(), strcmp(), strlen(), strncpy(), strrchr()</span>
|
|
</tr>
|
|
<tr>
|
|
<td>Called by:
|
|
<td><span class="cxref-reference-local"><a href="ModuleCmd_Display.c.html#func-ModuleCmd_Display">ModuleCmd_Display()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="ModuleCmd_Display.c.html#func-ModuleCmd_Display">ModuleCmd_Display.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="ModuleCmd_Load.c.html#func-ModuleCmd_Load">ModuleCmd_Load()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="ModuleCmd_Load.c.html#func-ModuleCmd_Load">ModuleCmd_Load.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="ModuleCmd_Switch.c.html#func-ModuleCmd_Switch">ModuleCmd_Switch()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="ModuleCmd_Switch.c.html#func-ModuleCmd_Switch">ModuleCmd_Switch.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="ModuleCmd_Whatis.c.html#func-ModuleCmd_Whatis">ModuleCmd_Whatis()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="ModuleCmd_Whatis.c.html#func-ModuleCmd_Whatis">ModuleCmd_Whatis.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="ModuleCmd_Help.c.html#func-PerModuleHelp">PerModuleHelp()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="ModuleCmd_Help.c.html#func-PerModuleHelp">ModuleCmd_Help.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="ModuleCmd_Avail.c.html#func-print_aligned_files">print_aligned_files()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="ModuleCmd_Avail.c.html#func-print_aligned_files">ModuleCmd_Avail.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>References Variables:
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#var-buf">buf</a></span>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#var-buf">locate_module.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="main.c.html#var-g_current_module">g_current_module</a></span>
|
|
<td><span class="cxref-reference-local"><a href="main.c.html#var-g_current_module">main.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#var-module_name">module_name</a></span>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#var-module_name">locate_module.c</a></span>
|
|
</tr>
|
|
</table>
|
|
|
|
<hr>
|
|
<h2><a name="func-SortedDirList">Global Function SortedDirList()</a></h2>
|
|
<pre>
|
|
** ** Function-Header ***************************************************** **
|
|
** **
|
|
** Function: SortedDirList **
|
|
** **
|
|
** Description: Checks the given path for the given modulefile. **
|
|
** If the path + the module filename is the modulefile, **
|
|
** then it is returned as the first element in the list.**
|
|
** If the path + the module filename is a directory, the**
|
|
** directory is read and sorted as the list. **
|
|
** **
|
|
** First Edition: 1991/10/23 **
|
|
** **
|
|
** Parameters: Tcl_Interp *interp According Tcl Interp.**
|
|
** char *path Path to start seeking**
|
|
** char *modulename Name of the module **
|
|
** int *listcnt Buffer to return the **
|
|
** size of the created **
|
|
** list in elements **
|
|
** **
|
|
** Result: char** NULL Any failure (alloc, param) **
|
|
** else Base pointer to the newly **
|
|
** created list. **
|
|
** *listcnt Number of elements in the **
|
|
** list if one was created, un- **
|
|
** changed otherwise **
|
|
** **
|
|
** Attached Globals: - **
|
|
** **
|
|
** ************************************************************************ **
|
|
</pre>
|
|
|
|
<tt><span class="cxref-function"><a href="locate_module.c.src.html#line650">char** SortedDirList ( Tcl_Interp* interp, char* path, char* modulename, int* listcnt )</a></span></tt><br>
|
|
<table>
|
|
<tr>
|
|
<td>Prototyped in:
|
|
<td colspan=2><span class="cxref-reference-local"><a href="modules_def.h.html#file">modules_def.h</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>Calls:
|
|
<td><span class="cxref-reference-local"><a href="error.c.html#func-Module_Error">Module_Error()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="error.c.html#func-Module_Error">error.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-check_magic">check_magic()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-check_magic">utility.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-null_free">null_free()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-null_free">utility.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-stringer">stringer()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-stringer">utility.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td colspan=2><span class="cxref-reference-system">calloc(), closedir(), opendir(), qsort(), readdir(), realloc(), stat(), strcmp(), strcpy(), strdup(), strlen()</span>
|
|
</tr>
|
|
<tr>
|
|
<td>Called by:
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#func-GetModuleName">GetModuleName()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#func-GetModuleName">locate_module.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="cmdConflict.c.html#func-checkConflict">checkConflict()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="cmdConflict.c.html#func-checkConflict">cmdConflict.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="cmdConflict.c.html#func-cmdConflict">cmdConflict()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="cmdConflict.c.html#func-cmdConflict">cmdConflict.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="cmdIsLoaded.c.html#func-cmdIsLoaded">cmdIsLoaded()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="cmdIsLoaded.c.html#func-cmdIsLoaded">cmdIsLoaded.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="cmdConflict.c.html#func-cmdPrereq">cmdPrereq()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="cmdConflict.c.html#func-cmdPrereq">cmdConflict.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>References Functions:
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#func-filename_compare">filename_compare()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#func-filename_compare">locate_module.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>References Variables:
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#var-module_name">module_name</a></span>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#var-module_name">locate_module.c</a></span>
|
|
</tr>
|
|
</table>
|
|
|
|
<hr>
|
|
<h2><a name="func-SourceRC">Global Function SourceRC()</a></h2>
|
|
<pre>
|
|
** ** Function-Header ***************************************************** **
|
|
** **
|
|
** Function: SourceRC **
|
|
** **
|
|
** Description: Source the passed global RC file **
|
|
** **
|
|
** First Edition: 1991/10/23 **
|
|
** **
|
|
** Parameters: Tcl_Interp *interp Tcl interpreter **
|
|
** char *path Path to be used **
|
|
** char *name Name of the RC file **
|
|
** **
|
|
** Result: int TCL_OK Success **
|
|
** TCL_ERROR Failure **
|
|
** **
|
|
** Attached Globals: g_flags These are set up accordingly before **
|
|
** this function is called in order to **
|
|
** control everything **
|
|
** **
|
|
** ************************************************************************ **
|
|
</pre>
|
|
|
|
<tt><span class="cxref-function"><a href="locate_module.c.src.html#line1012">int SourceRC ( Tcl_Interp* interp, char* path, char* name )</a></span></tt><br>
|
|
<table>
|
|
<tr>
|
|
<td>Prototyped in:
|
|
<td colspan=2><span class="cxref-reference-local"><a href="modules_def.h.html#file">modules_def.h</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>Calls:
|
|
<td><span class="cxref-reference-local"><a href="cmdModule.c.html#func-Execute_TclFile">Execute_TclFile()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="cmdModule.c.html#func-Execute_TclFile">cmdModule.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="error.c.html#func-Module_Error">Module_Error()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="error.c.html#func-Module_Error">error.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-check_magic">check_magic()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-check_magic">utility.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-null_free">null_free()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-null_free">utility.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-stringer">stringer()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-stringer">utility.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td colspan=2><span class="cxref-reference-system">malloc(), realloc(), stat(), strcmp()</span>
|
|
</tr>
|
|
<tr>
|
|
<td>Called by:
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#func-GetModuleName">GetModuleName()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#func-GetModuleName">locate_module.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="ModuleCmd_List.c.html#func-ModuleCmd_List">ModuleCmd_List()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="ModuleCmd_List.c.html#func-ModuleCmd_List">ModuleCmd_List.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="main.c.html#func-main">main()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="main.c.html#func-main">main.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="ModuleCmd_Avail.c.html#func-print_aligned_files">print_aligned_files()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="ModuleCmd_Avail.c.html#func-print_aligned_files">ModuleCmd_Avail.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="ModuleCmd_Avail.c.html#func-print_dir">print_dir()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="ModuleCmd_Avail.c.html#func-print_dir">ModuleCmd_Avail.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>References Variables:
|
|
<td><span class="cxref-reference-local"><a href="main.c.html#var-g_flags">g_flags</a></span>
|
|
<td><span class="cxref-reference-local"><a href="main.c.html#var-g_flags">main.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#var-module_name">module_name</a></span>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#var-module_name">locate_module.c</a></span>
|
|
</tr>
|
|
</table>
|
|
|
|
<hr>
|
|
<h2><a name="func-SourceVers">Global Function SourceVers()</a></h2>
|
|
<pre>
|
|
** ** Function-Header ***************************************************** **
|
|
** **
|
|
** Function: SourceVers **
|
|
** **
|
|
** Description: Source the '.version' file **
|
|
** **
|
|
** First Edition: 1991/10/23 **
|
|
** **
|
|
** Parameters: Tcl_Interp *interp Tcl interpreter **
|
|
** char *path Path to be used **
|
|
** char *name Name of the module **
|
|
** **
|
|
** Result: int TCL_OK Success **
|
|
** TCL_ERROR Failure **
|
|
** **
|
|
** Attached Globals: g_flags These are set up accordingly before **
|
|
** this function is called in order to **
|
|
** control everything **
|
|
** **
|
|
** ************************************************************************ **
|
|
</pre>
|
|
|
|
<tt><span class="cxref-function"><a href="locate_module.c.src.html#line1124">int SourceVers ( Tcl_Interp* interp, char* path, char* name )</a></span></tt><br>
|
|
<table>
|
|
<tr>
|
|
<td>Prototyped in:
|
|
<td colspan=2><span class="cxref-reference-local"><a href="modules_def.h.html#file">modules_def.h</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>Calls:
|
|
<td><span class="cxref-reference-local"><a href="cmdModule.c.html#func-Execute_TclFile">Execute_TclFile()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="cmdModule.c.html#func-Execute_TclFile">cmdModule.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="error.c.html#func-Module_Error">Module_Error()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="error.c.html#func-Module_Error">error.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="cmdVersion.c.html#func-VersionLookup">VersionLookup()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="cmdVersion.c.html#func-VersionLookup">cmdVersion.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-check_magic">check_magic()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-check_magic">utility.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="cmdVersion.c.html#func-cmdModuleVersion">cmdModuleVersion()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="cmdVersion.c.html#func-cmdModuleVersion">cmdVersion.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-null_free">null_free()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-null_free">utility.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-stringer">stringer()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-stringer">utility.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td colspan=2><span class="cxref-reference-system">Tcl_GetVar(), stat(), strcmp()</span>
|
|
</tr>
|
|
<tr>
|
|
<td>Called by:
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#func-GetModuleName">GetModuleName()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#func-GetModuleName">locate_module.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="ModuleCmd_List.c.html#func-ModuleCmd_List">ModuleCmd_List()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="ModuleCmd_List.c.html#func-ModuleCmd_List">ModuleCmd_List.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="ModuleCmd_Avail.c.html#func-print_aligned_files">print_aligned_files()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="ModuleCmd_Avail.c.html#func-print_aligned_files">ModuleCmd_Avail.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="ModuleCmd_Avail.c.html#func-print_dir">print_dir()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="ModuleCmd_Avail.c.html#func-print_dir">ModuleCmd_Avail.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>References Variables:
|
|
<td><span class="cxref-reference-local"><a href="main.c.html#var-_default">_default</a></span>
|
|
<td><span class="cxref-reference-local"><a href="main.c.html#var-_default">main.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="main.c.html#var-g_flags">g_flags</a></span>
|
|
<td><span class="cxref-reference-local"><a href="main.c.html#var-g_flags">main.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#var-module_name">module_name</a></span>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#var-module_name">locate_module.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="main.c.html#var-version_file">version_file</a></span>
|
|
<td><span class="cxref-reference-local"><a href="main.c.html#var-version_file">main.c</a></span>
|
|
</tr>
|
|
</table>
|
|
|
|
<hr>
|
|
<h2><a name="func-SplitIntoList">Global Function SplitIntoList()</a></h2>
|
|
<pre>
|
|
** ** Function-Header ***************************************************** **
|
|
** **
|
|
** Function: SplitIntoList **
|
|
** **
|
|
** Description: Splits a path-type environment variable into an array**
|
|
** of char* list. **
|
|
** **
|
|
** First Edition: 1991/10/23 **
|
|
** **
|
|
** Parameters: Tcl_Interp *interp According Tcl Interp.**
|
|
** char *pathenv Path to split **
|
|
** int *numpaths Buffer to write the **
|
|
** number of array ele- **
|
|
** ments to. **
|
|
** **
|
|
** Result: char** NULL Any failure (alloc, param.) **
|
|
** else Base pointer of the created **
|
|
** array **
|
|
** *numpaths Number of elements if an ar- **
|
|
** ray has been created, unchan-**
|
|
** ged otherwise. **
|
|
** **
|
|
** Attached Globals: - **
|
|
** **
|
|
** ************************************************************************ **
|
|
</pre>
|
|
|
|
<tt><span class="cxref-function"><a href="locate_module.c.src.html#line860">char** SplitIntoList ( Tcl_Interp* interp, char* pathenv, int* numpaths )</a></span></tt><br>
|
|
<table>
|
|
<tr>
|
|
<td>Prototyped in:
|
|
<td colspan=2><span class="cxref-reference-local"><a href="modules_def.h.html#file">modules_def.h</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>Calls:
|
|
<td><span class="cxref-reference-local"><a href="error.c.html#func-Module_Error">Module_Error()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="error.c.html#func-Module_Error">error.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-null_free">null_free()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-null_free">utility.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-stringer">stringer()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-stringer">utility.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-xdup">xdup()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-xdup">utility.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td colspan=2><span class="cxref-reference-system">calloc(), realloc(), strtok()</span>
|
|
</tr>
|
|
<tr>
|
|
<td>Called by:
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#func-Locate_ModuleFile">Locate_ModuleFile()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#func-Locate_ModuleFile">locate_module.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="ModuleCmd_Init.c.html#func-ModuleCmd_Init">ModuleCmd_Init()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="ModuleCmd_Init.c.html#func-ModuleCmd_Init">ModuleCmd_Init.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="cmdConflict.c.html#func-cmdConflict">cmdConflict()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="cmdConflict.c.html#func-cmdConflict">cmdConflict.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="cmdIsLoaded.c.html#func-cmdIsLoaded">cmdIsLoaded()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="cmdIsLoaded.c.html#func-cmdIsLoaded">cmdIsLoaded.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="cmdConflict.c.html#func-cmdPrereq">cmdPrereq()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="cmdConflict.c.html#func-cmdPrereq">cmdConflict.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="cmdPath.c.html#func-cmdRemovePath">cmdRemovePath()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="cmdPath.c.html#func-cmdRemovePath">cmdPath.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="cmdPath.c.html#func-cmdSetPath">cmdSetPath()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="cmdPath.c.html#func-cmdSetPath">cmdPath.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>References Variables:
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#var-module_name">module_name</a></span>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#var-module_name">locate_module.c</a></span>
|
|
</tr>
|
|
</table>
|
|
|
|
<hr>
|
|
<h2><a name="func-GetModuleName">Local Function GetModuleName()</a></h2>
|
|
<pre>
|
|
** ** Function-Header ***************************************************** **
|
|
** **
|
|
** Function: GetModuleName **
|
|
** **
|
|
** Description: Given a path and a module filename, this function **
|
|
** checks to find the modulefile. **
|
|
** **
|
|
** Notes: This function is RECURSIVE **
|
|
** **
|
|
** First Edition: 1991/10/23 **
|
|
** **
|
|
** Parameters: Tcl_Interp *interp According Tcl Interp.**
|
|
** char *path Path to start seeking**
|
|
** char *prefix Module name prefix **
|
|
** char *modulename Name of the module **
|
|
** **
|
|
** Result: char* NULL Any failure( parameters, alloc) **
|
|
** else Pointer to an allocated buffer con- **
|
|
** taining the complete module file path**
|
|
** **
|
|
** Attached Globals: - **
|
|
** **
|
|
** ************************************************************************ **
|
|
</pre>
|
|
|
|
<tt><span class="cxref-function"><a href="locate_module.c.src.html#line361">static char* GetModuleName ( Tcl_Interp* interp, char* path, char* prefix, char* modulename )</a></span></tt><br>
|
|
<table>
|
|
<tr>
|
|
<td>Prototyped in:
|
|
<td colspan=2><span class="cxref-reference-local"><a href="locate_module.c.html#file">locate_module.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>Calls:
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#func-GetModuleName">GetModuleName()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#func-GetModuleName">locate_module.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="error.c.html#func-Module_Error">Module_Error()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="error.c.html#func-Module_Error">error.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#func-SortedDirList">SortedDirList()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#func-SortedDirList">locate_module.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#func-SourceRC">SourceRC()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#func-SourceRC">locate_module.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#func-SourceVers">SourceVers()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#func-SourceVers">locate_module.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="cmdVersion.c.html#func-VersionLookup">VersionLookup()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="cmdVersion.c.html#func-VersionLookup">cmdVersion.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-check_magic">check_magic()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-check_magic">utility.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-null_free">null_free()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-null_free">utility.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-stringer">stringer()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="utility.c.html#func-stringer">utility.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td colspan=2><span class="cxref-reference-system">stat(), strchr(), strcmp(), strlen()</span>
|
|
</tr>
|
|
<tr>
|
|
<td>Called by:
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#func-GetModuleName">GetModuleName()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#func-GetModuleName">locate_module.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#func-Locate_ModuleFile">Locate_ModuleFile()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#func-Locate_ModuleFile">locate_module.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>References Variables:
|
|
<td><span class="cxref-reference-local"><a href="main.c.html#var-_default">_default</a></span>
|
|
<td><span class="cxref-reference-local"><a href="main.c.html#var-_default">main.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="main.c.html#var-g_current_module">g_current_module</a></span>
|
|
<td><span class="cxref-reference-local"><a href="main.c.html#var-g_current_module">main.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#var-modfil_buf">modfil_buf</a></span>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#var-modfil_buf">locate_module.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#var-module_name">module_name</a></span>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#var-module_name">locate_module.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<td><span class="cxref-reference-local"><a href="main.c.html#var-modulerc_file">modulerc_file</a></span>
|
|
<td><span class="cxref-reference-local"><a href="main.c.html#var-modulerc_file">main.c</a></span>
|
|
</tr>
|
|
</table>
|
|
|
|
<hr>
|
|
<h2><a name="func-filename_compare">Local Function filename_compare()</a></h2>
|
|
<pre>
|
|
** ** Function-Header ***************************************************** **
|
|
** **
|
|
** Function: filename_compare **
|
|
** **
|
|
** Description: This is a reverse compare function to reverse the **
|
|
** filename list. The function is used as compare func- **
|
|
** tion for qsort. **
|
|
** **
|
|
** First Edition: 1991/10/23 **
|
|
** **
|
|
** Parameters: const void *fi1 First filename to compare **
|
|
** const void *fi2 Second filename to compare **
|
|
** **
|
|
** Result: int -1 filename 1 > filename 2 **
|
|
** 0 filename 1 == filename 2 **
|
|
** 1 filename 1 < filename 2 **
|
|
** **
|
|
** Attached Globals: **
|
|
** **
|
|
** ************************************************************************ **
|
|
</pre>
|
|
|
|
<tt><span class="cxref-function"><a href="locate_module.c.src.html#line116">static int filename_compare ( const void* fi1, const void* fi2 )</a></span></tt><br>
|
|
<table>
|
|
<tr>
|
|
<td>Prototyped in:
|
|
<td colspan=2><span class="cxref-reference-local"><a href="locate_module.c.html#file">locate_module.c</a></span>
|
|
</tr>
|
|
<tr>
|
|
<td>Calls:
|
|
<td colspan=2><span class="cxref-reference-system">strcmp()</span>
|
|
</tr>
|
|
<tr>
|
|
<td>Used in:
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#func-SortedDirList">SortedDirList()</a></span>
|
|
<td><span class="cxref-reference-local"><a href="locate_module.c.html#func-SortedDirList">locate_module.c</a></span>
|
|
</tr>
|
|
</table>
|
|
|
|
</BODY>
|
|
</HTML>
|