summaryrefslogtreecommitdiffstats
path: root/runtime/docs/html/group__string.html
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/docs/html/group__string.html')
-rw-r--r--runtime/docs/html/group__string.html389
1 files changed, 389 insertions, 0 deletions
diff --git a/runtime/docs/html/group__string.html b/runtime/docs/html/group__string.html
new file mode 100644
index 00000000..834b7513
--- /dev/null
+++ b/runtime/docs/html/group__string.html
@@ -0,0 +1,389 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>SystemTap: String Functions</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.1 -->
+<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
+<h1>String Functions</h1>One of the biggest restrictions the library has is that it cannot allocate things like strings off the stack.
+<a href="#_details">More...</a><table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><b>string</b></td></tr>
+
+<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga8" doxytag="string::STP_STRING_SIZE"></a>
+#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__string.html#ga8">STP_STRING_SIZE</a>&nbsp;&nbsp;&nbsp;2048</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Maximum string size allowed in Strings. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__string.html#ga9">_stp_string_cat</a>(str1, str2)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">ConCATenate (append) a String or C string to a String. <a href="#ga9"></a><br></td></tr>
+<tr><td colspan="2"><br><h2>Typedefs</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga1" doxytag="string::String"></a>
+typedef string *&nbsp;</td><td class="memItemRight" valign="bottom"><b>String</b></td></tr>
+
+<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">String&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__string.html#ga2">_stp_string_init</a> (int num)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialize a String for our use. <a href="#ga2"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__string.html#ga3">_stp_sprintf</a> (String str, const char *fmt,...)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sprintf into a String. <a href="#ga3"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__string.html#ga4">_stp_vsprintf</a> (String str, const char *fmt, va_list args)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Vsprintf into a String Use this if your function already has a va_list. <a href="#ga4"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__string.html#ga5">_stp_string_cat_cstr</a> (String str1, const char *str2)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">ConCATenate (append) a C string to a String. <a href="#ga5"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__string.html#ga6">_stp_string_cat_string</a> (String str1, String str2)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">ConCATenate (append) a String to a String. <a href="#ga6"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__string.html#ga7">_stp_string_ptr</a> (String str)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a pointer to String's buffer For rare cases when a C string is needed and you have a String. <a href="#ga7"></a><br></td></tr>
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+One of the biggest restrictions the library has is that it cannot allocate things like strings off the stack.
+<p>
+It is also not a good idea to dynamically allocate space for strings with kmalloc(). That leaves us with statically allocated space for strings. This is what is implemented in the String module. Strings use preallocated per-cpu buffers and are safe to use (unlike C strings). <hr><h2>Define Documentation</h2>
+<a class="anchor" name="ga9" doxytag="string.c::_stp_string_cat"></a><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top">#define _stp_string_cat </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">str1, <tr>
+ <td class="md" nowrap align="right"></td>
+ <td class="md"></td>
+ <td class="md" nowrap>str2&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+<b>Value:</b><div class="fragment"><pre class="fragment">({ \
+ <span class="keywordflow">if</span> (__builtin_types_compatible_p (typeof (str2), <span class="keywordtype">char</span>[])) { \
+ <span class="keywordtype">char</span> *x = (<span class="keywordtype">char</span> *)str2; \
+ _str_string_cat_cstr(str1,x); \
+ } <span class="keywordflow">else</span> { \
+ String x = (String)str2; \
+ _str_string_cat_string(str1,x); \
+ } \
+ })
+</pre></div>ConCATenate (append) a String or C string to a String.
+<p>
+This macro selects the proper function to call. <dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"></td><td valign="top"><em>str1</em>&nbsp;</td><td>A String </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>str2</em>&nbsp;</td><td>A String or C string (char *) </td></tr>
+ </table>
+</dl>
+<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__string.html#ga5">_stp_string_cat_cstr</a> <a class="el" href="group__string.html#ga6">_stp_string_cat_string</a> </dd></dl>
+
+<p>
+Definition at line <a class="el" href="string_8c-source.html#l00150">150</a> of file <a class="el" href="string_8c-source.html">string.c</a>. </td>
+ </tr>
+</table>
+<hr><h2>Function Documentation</h2>
+<a class="anchor" name="ga3" doxytag="string.c::_stp_sprintf"></a><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top">void _stp_sprintf </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">String&nbsp;</td>
+ <td class="mdname" nowrap> <em>str</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td class="md"></td>
+ <td class="md" nowrap>const char *&nbsp;</td>
+ <td class="mdname" nowrap> <em>fmt</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td class="md"></td>
+ <td class="md" nowrap>&nbsp;</td>
+ <td class="mdname" nowrap> <em>...</em></td>
+ </tr>
+ <tr>
+ <td class="md"></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Sprintf into a String.
+<p>
+Like printf, except output goes into a String. Safe because overflowing the buffer is not allowed. Size is limited by length of String, <a class="el" href="group__string.html#ga8">STP_STRING_SIZE</a>.<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"></td><td valign="top"><em>str</em>&nbsp;</td><td>String </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>fmt</em>&nbsp;</td><td>A printf-style format string followed by a variable number of args. </td></tr>
+ </table>
+</dl>
+
+<p>
+Definition at line <a class="el" href="string_8c-source.html#l00077">77</a> of file <a class="el" href="string_8c-source.html">string.c</a>.
+<p>
+References <a class="el" href="string_8c-source.html#l00020">STP_STRING_SIZE</a>.
+<p>
+Referenced by <a class="el" href="sym_8c-source.html#l00030">_stp_symbol_sprint()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="ga5" doxytag="string.c::_stp_string_cat_cstr"></a><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top">void _stp_string_cat_cstr </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">String&nbsp;</td>
+ <td class="mdname" nowrap> <em>str1</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td class="md"></td>
+ <td class="md" nowrap>const char *&nbsp;</td>
+ <td class="mdname" nowrap> <em>str2</em></td>
+ </tr>
+ <tr>
+ <td class="md"></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+ConCATenate (append) a C string to a String.
+<p>
+Like strcat(). <dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"></td><td valign="top"><em>str1</em>&nbsp;</td><td>String </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>str2</em>&nbsp;</td><td>C string (char *) </td></tr>
+ </table>
+</dl>
+<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__string.html#ga9">_stp_string_cat</a> </dd></dl>
+
+<p>
+Definition at line <a class="el" href="string_8c-source.html#l00106">106</a> of file <a class="el" href="string_8c-source.html">string.c</a>.
+<p>
+References <a class="el" href="string_8c-source.html#l00020">STP_STRING_SIZE</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="ga6" doxytag="string.c::_stp_string_cat_string"></a><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top">void _stp_string_cat_string </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">String&nbsp;</td>
+ <td class="mdname" nowrap> <em>str1</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td class="md"></td>
+ <td class="md" nowrap>String&nbsp;</td>
+ <td class="mdname" nowrap> <em>str2</em></td>
+ </tr>
+ <tr>
+ <td class="md"></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+ConCATenate (append) a String to a String.
+<p>
+Like strcat(). <dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"></td><td valign="top"><em>str1</em>&nbsp;</td><td>String </td></tr>
+ <tr><td valign="top"></td><td valign="top"><em>str2</em>&nbsp;</td><td>String </td></tr>
+ </table>
+</dl>
+<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__string.html#ga9">_stp_string_cat</a> </dd></dl>
+
+<p>
+Definition at line <a class="el" href="string_8c-source.html#l00121">121</a> of file <a class="el" href="string_8c-source.html">string.c</a>.
+<p>
+References <a class="el" href="string_8c-source.html#l00020">STP_STRING_SIZE</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="ga2" doxytag="string.c::_stp_string_init"></a><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top">String _stp_string_init </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">int&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>num</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Initialize a String for our use.
+<p>
+This grabs one of the global Strings for our use.<p>
+<dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"></td><td valign="top"><em>num</em>&nbsp;</td><td>Number of the preallocated String to use. #STP_NUM_STRINGS are statically allocated for our use. The translator (or author) should be sure to grab a free one. </td></tr>
+ </table>
+</dl>
+<dl compact><dt><b><a class="el" href="todo.html#_todo000009">Todo:</a></b></dt><dd>Global (and static) Strings not implemented yet. </dd></dl>
+
+<p>
+Definition at line <a class="el" href="string_8c-source.html#l00042">42</a> of file <a class="el" href="string_8c-source.html">string.c</a>.
+<p>
+References <a class="el" href="io_8c-source.html#l00029">_stp_log()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="ga7" doxytag="string.c::_stp_string_ptr"></a><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top">char* _stp_string_ptr </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">String&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>str</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Get a pointer to String's buffer For rare cases when a C string is needed and you have a String.
+<p>
+One example is when you want to print a String with <a class="el" href="group__print.html#ga3">_stp_printf()</a>. <dl compact><dt><b>Parameters:</b></dt><dd>
+ <table border="0" cellspacing="2" cellpadding="0">
+ <tr><td valign="top"></td><td valign="top"><em>str</em>&nbsp;</td><td>String </td></tr>
+ </table>
+</dl>
+<dl compact><dt><b>Returns:</b></dt><dd>A C string (char *) </dd></dl>
+<dl compact><dt><b>Note:</b></dt><dd>Readonly. Don't write to this pointer or it will mess up the internal String state and probably mess up your output or crash something. </dd></dl>
+
+<p>
+Definition at line <a class="el" href="string_8c-source.html#l00138">138</a> of file <a class="el" href="string_8c-source.html">string.c</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="ga4" doxytag="string.c::_stp_vsprintf"></a><p>
+<table class="mdTable" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top">void _stp_vsprintf </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">String&nbsp;</td>
+ <td class="mdname" nowrap> <em>str</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td class="md"></td>
+ <td class="md" nowrap>const char *&nbsp;</td>
+ <td class="mdname" nowrap> <em>fmt</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td class="md"></td>
+ <td class="md" nowrap>va_list&nbsp;</td>
+ <td class="mdname" nowrap> <em>args</em></td>
+ </tr>
+ <tr>
+ <td class="md"></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing="5" cellpadding="0" border="0">
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Vsprintf into a String Use this if your function already has a va_list.
+<p>
+You probably want <a class="el" href="group__string.html#ga3">_stp_sprintf()</a>.
+<p>
+Definition at line <a class="el" href="string_8c-source.html#l00092">92</a> of file <a class="el" href="string_8c-source.html">string.c</a>.
+<p>
+References <a class="el" href="string_8c-source.html#l00020">STP_STRING_SIZE</a>. </td>
+ </tr>
+</table>
+</body></html>