[teklib-general] teklib: Added TExec_ModulePrefix option to TScanModules().

Timm S. Mueller tmueller at neoscientists.org
Fri May 1 19:25:43 CEST 2009


details:   http://hg.teklib.org/teklib/rev/12d2d00ba17d
changeset: 258:12d2d00ba17d
user:      Timm S. Mueller <tmueller at neoscientists.org>
date:      Wed Mar 18 00:58:50 2009 +0100
description:
Added TExec_ModulePrefix option to TScanModules().

diffs (truncated from 229 to 100 lines):

diff -r f8f8656ee57c -r 12d2d00ba17d doc/manual.html
--- a/doc/manual.html	Wed Mar 18 00:32:39 2009 +0100
+++ b/doc/manual.html	Wed Mar 18 00:58:50 2009 +0100
@@ -4844,11 +4844,12 @@
 </pre>
 			<div class="definition"><dfn>FUNCTION</dfn>
 				<p>
-					This function scans all available TEKlib modules and, if successful,
-					returns a handle that can be queried using <a href="#teklib:TGetNextEntry"><code>teklib:TGetNextEntry()</code></a>.
-					Each invocation of <a href="#teklib:TGetNextEntry"><code>teklib:TGetNextEntry()</code></a> returns a pointer to a
-					taglist, or <code>TNULL</code> when there are no more entries available.
-					Possible tags in this taglist, as currently defined, are:
+					This function searches for modules that are available to TEKlib's module
+					open function and, if successful, returns a handle that can be queried
+					using <a href="#teklib:TGetNextEntry"><code>teklib:TGetNextEntry()</code></a>.
+					Each invocation of <a href="#teklib:TGetNextEntry"><code>teklib:TGetNextEntry()</code></a> on the resulting handle returns
+					a pointer to a taglist, or <code>TNULL</code> when there are no more entries
+					available. Possible tags in this taglist, as currently defined, are:
 				</p>
 				<blockquote>
 					<ul>
@@ -4863,12 +4864,40 @@
 					with <a href="#teklib:TDestroy"><code>teklib:TDestroy()</code></a>.
 				</p>
 			</div>
+			<div class="definition"><dfn>RESULTS</dfn>
+				<ul>
+					<li style="list-style-type: none">
+						<code>handle</code> - A handle that can be passed to <a href="#teklib:TGetNextEntry"><code>teklib:TGetNextEntry()</code></a>,
+						or <code>TNULL</code> if scanning failed.
+					</li>
+				</ul>
+			</div>
+			<div class="definition"><dfn>INPUTS</dfn>
+				<ul>
+					<li style="list-style-type: none">
+						<code>tags</code> - Pointer to an array of tag items:
+						<blockquote>
+							<ul>
+								<li>
+									<code>TExec_ModulePrefix (TSTRPTR)</code> - Pointer to a prefix string.
+									If specified, only modules whose names begin with this prefix will
+									be returned. Default: <code>TNULL</code> 
+								</li>
+							</ul>
+						</blockquote>
+					</li>
+				</ul>
+			</div>
 			<div class="definition"><dfn>EXAMPLE</dfn>
 				<p>
-					The following code snippet scans the system for TEKlib modules:
-				</p>
-<pre>
-struct THandle *handle = TScanModules(TNULL);
+					Scan the system for TEKlib modules with the prefix <code>&quot;io&quot;</code>:
+				</p>
+<pre>
+TTAGITEM tags&#091;2&#093;;
+tags&#091;0&#093;.tti_Tag = TExec_ModulePrefix;
+tags&#091;0&#093;.tti_Value = (TTAG) &quot;io&quot;;
+tags&#091;1&#093;.tti_Tag = TTAG_DONE;
+struct THandle *handle = TScanModules(tags);
 if (handle)
 {
     TTAGITEM *entry;
@@ -4877,14 +4906,6 @@
 }
 TDestroy(handle);
 </pre>
-			</div>
-			<div class="definition"><dfn>RESULTS</dfn>
-				<ul>
-					<li style="list-style-type: none">
-						<code>handle</code> - A handle that can be passed to <a href="#teklib:TGetNextEntry"><code>teklib:TGetNextEntry()</code></a>,
-						or <code>TNULL</code>.
-					</li>
-				</ul>
 				<hr />
 			</div>
 		</div>
@@ -6257,7 +6278,7 @@
 				</p>
 				<hr />
 				<p>
-					Document generated on Wed Mar 18 00:14:02 2009
+					Document generated on Wed Mar 18 00:57:35 2009
 				</p>
 			</div>
 		</div>
diff -r f8f8656ee57c -r 12d2d00ba17d src/exec/exec_api.c
--- a/src/exec/exec_api.c	Wed Mar 18 00:32:39 2009 +0100
+++ b/src/exec/exec_api.c	Wed Mar 18 00:58:50 2009 +0100
@@ -10,6 +10,7 @@
 #include "exec_mod.h"
 #include <tek/debug.h>
 #include <tek/teklib.h>
+#include <tek/string.h>
 
 /*****************************************************************************/


More information about the teklib-general mailing list