Browse code

Added first attempt to CDS library documentation with very short description in README.

Vaclav Kubart authored on 03/11/2005 09:59:37
Showing 14 changed files
... ...
@@ -51,3 +51,14 @@ you should set LD_LIBRARY_PATH=/usr/local/lib/ser. In the case of
51 51
 nonstandard installation, you can use something like 
52 52
 LD_LIBRARY_PATH=/my/ser/directory/lib/ser.
53 53
 
54
+Documentation
55
+-------------
56
+Documentation for all libraries is (or will be) in 
57
+docbook-XML format and it is stored in doc directory (for example cds/doc 
58
+contains documentation for Common Data Structures library).
59
+
60
+Documentation can be translated into HTML using a XSLT processor
61
+which is able to work with "include" directives.
62
+For example
63
+   xmlto html cds/doc/cds.xml
64
+will create HTML documentation for CDS library in current directory.
54 65
new file mode 100644
... ...
@@ -0,0 +1,45 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+
3
+<!DOCTYPE book PUBLIC '-//OASIS//DTD DocBook XML V4.2//EN'
4
+'file:///usr/share/xml/docbook/schema/dtd/4.2/docbookx.dtd'>
5
+
6
+<!--<!DOCTYPE article PUBLIC '-//OASIS//DTD DocBook XML V4.2//EN'
7
+'http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd'>-->
8
+
9
+<book lang="en">
10
+<bookinfo>
11
+	<title>Common Data Structures</title>
12
+	<author><firstname>Václav</firstname><surname>Kubart</surname></author>
13
+	<abstract><para>Description of CDS (Common Data Structures) library.
14
+	</para></abstract>
15
+</bookinfo>
16
+
17
+<preface><title>Preface</title>
18
+<para>This library contains many useful functions and data structures. It is
19
+possible to use it with Sip Express Router (SER) or without it. In the first case it
20
+is able to use some internal SER's data types like strings.
21
+</para>
22
+
23
+<section><title>Conventions</title>
24
+<para>There is list of conventions used in this library:
25
+<itemizedlist>
26
+	<listitem><para>data types (structures, enums, ...) have their names with suffix 
27
+	<quote>_t</quote> (<structname>dstring_t</structname>, 
28
+	<structname>str_t</structname>, ...)</para></listitem>
29
+	<listitem><para>many functions have prefix according to data structure on
30
+	which are operating (like <function>dstr_append</function> which operates on
31
+	<structname>dstring_t</structname> data structure)</para></listitem>
32
+	<listitem><para>most functions return 0 as successful result and nonzero
33
+	value as error</para></listitem>
34
+</itemizedlist>
35
+</para>
36
+</section>
37
+
38
+</preface>
39
+
40
+<!--<part><title>Functions and data types</title>-->
41
+<include xmlns="http://www.w3.org/2001/XInclude" href="sstr.xml"/>
42
+<include xmlns="http://www.w3.org/2001/XInclude" href="dstring.xml"/>
43
+<include xmlns="http://www.w3.org/2001/XInclude" href="serialization.xml"/>
44
+<!--</part>-->
45
+</book>
0 46
new file mode 100644
... ...
@@ -0,0 +1,77 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+
3
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" 
4
+   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5
+
6
+<refentry id="dstr_append">
7
+
8
+<refmeta><refentrytitle>dstr_append</refentrytitle>
9
+<manvolnum>3</manvolnum></refmeta>
10
+
11
+<refnamediv>
12
+<refname>dstr_append</refname>
13
+<refname id="dstr_append_str">dstr_append_str</refname>
14
+<refname id="dstr_append_zt">dstr_append_zt</refname>
15
+<refpurpose>append string to <structname>dstring_t</structname>
16
+structure</refpurpose>
17
+</refnamediv>
18
+
19
+<refsynopsisdiv><funcsynopsis>
20
+
21
+<funcsynopsisinfo>
22
+#include &lt;cds/dstring.h&gt;
23
+</funcsynopsisinfo>
24
+
25
+<funcprototype>
26
+  <funcdef>int <function>dstr_append</function></funcdef>
27
+  <paramdef>dstring_t *<parameter>dstr</parameter></paramdef>
28
+  <paramdef>const char *<parameter>s</parameter></paramdef>
29
+  <paramdef>int <parameter>len</parameter></paramdef>
30
+</funcprototype>
31
+
32
+<funcprototype>
33
+  <funcdef>int <function>dstr_append_str</function></funcdef>
34
+  <paramdef>dstring_t *<parameter>dstr</parameter></paramdef>
35
+  <paramdef>const str_t *<parameter>s</parameter></paramdef>
36
+</funcprototype>
37
+
38
+<funcprototype>
39
+  <funcdef>int <function>dstr_append_zt</function></funcdef>
40
+  <paramdef>dstring_t *<parameter>dstr</parameter></paramdef>
41
+  <paramdef>const char *<parameter>s</parameter></paramdef>
42
+</funcprototype>
43
+
44
+</funcsynopsis></refsynopsisdiv>
45
+
46
+<refsect1><title>Description</title>
47
+<para>All these functions are used for appending strings to dynamic string. They
48
+differ only in the string and its length specification.
49
+<variablelist>
50
+<varlistentry>
51
+	<term><function>dstr_append</function></term>
52
+	<listitem><para>appends data from buffer <parameter>s</parameter> of
53
+	length <parameter>len</parameter></para></listitem>
54
+</varlistentry>
55
+<varlistentry>
56
+	<term><function>dstr_append_str</function></term>
57
+	<listitem><para>appends content of string <parameter>s</parameter>
58
+	(see <xref linkend="str_t"/>)</para></listitem>
59
+</varlistentry>
60
+<varlistentry>
61
+	<term><function>dstr_append_zt</function></term>
62
+	<listitem><para>appends content of zero terminated string <parameter>s</parameter></para></listitem>
63
+</varlistentry>
64
+</variablelist>
65
+</para>
66
+</refsect1>
67
+
68
+<refsect1><title>Return value</title>
69
+<para>All these functions return 0 if successful, nonzero otherwise.</para>
70
+</refsect1>
71
+
72
+<refsect1><title>See Also</title>
73
+<para><xref linkend="dstring_t"/></para>
74
+</refsect1>
75
+
76
+</refentry> 
77
+
0 78
new file mode 100644
... ...
@@ -0,0 +1,74 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+
3
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" 
4
+   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5
+
6
+<refentry id="dstr_get_data">
7
+
8
+<refmeta><refentrytitle>dstr_get_data</refentrytitle>
9
+<manvolnum>3</manvolnum></refmeta>
10
+
11
+<refnamediv>
12
+<refname>dstr_get_data</refname>
13
+<refname id="dstr_get_data_length">dstr_get_data_length</refname>
14
+<refname id="dstr_get_data_str">dstr_get_data_str</refname>
15
+<refpurpose>exporting data from <structname>dstring_t</structname>
16
+structure</refpurpose>
17
+</refnamediv>
18
+
19
+<refsynopsisdiv><funcsynopsis>
20
+
21
+<funcsynopsisinfo>
22
+#include &lt;cds/dstring.h&gt;
23
+</funcsynopsisinfo>
24
+
25
+<funcprototype>
26
+  <funcdef>int <function>dstr_get_data_length</function></funcdef>
27
+  <paramdef>dstring_t *<parameter>dstr</parameter></paramdef>
28
+</funcprototype>
29
+
30
+<funcprototype>
31
+  <funcdef>int <function>dstr_get_data</function></funcdef>
32
+  <paramdef>dstring_t *<parameter>dstr</parameter></paramdef>
33
+  <paramdef>char *<parameter>dst</parameter></paramdef>
34
+</funcprototype>
35
+
36
+<funcprototype>
37
+  <funcdef>int <function>dstr_get_data_str</function></funcdef>
38
+  <paramdef>dstring_t *<parameter>dstr</parameter></paramdef>
39
+  <paramdef>str_t *<parameter>dst</parameter></paramdef>
40
+</funcprototype>
41
+
42
+</funcsynopsis></refsynopsisdiv>
43
+
44
+<refsect1><title>Description</title>
45
+<para><function>dstr_get_data_length</function> function is used to determine
46
+the size of data present in dynamic string. It returns negative value on error.</para>
47
+
48
+<para><function>dstr_get_data</function> copies data from internal buffers into
49
+given character array allocated by caller. The data size can be 
50
+determined by <function>dstr_get_data_length</function> call.
51
+</para>
52
+
53
+<para><function>dstr_get_data_str</function> copies data from internal buffers into
54
+internally allocated string. This string is returned in the <varname>dst</varname>
55
+parameter.
56
+</para>
57
+
58
+</refsect1>
59
+
60
+<refsect1><title>Return value</title>
61
+<para>Functions <function>dstr_get_data</function> and
62
+<function>dstr_get_data_str</function> return 0 if successful, nonzero otherwise.
63
+</para>
64
+<para>Function <function>dstr_get_data_length</function> returns negative value
65
+on error, zero if there is no data in dynamic string and positive if there was
66
+no error and data present.
67
+</para>
68
+</refsect1>
69
+
70
+<refsect1><title>See Also</title>
71
+<para><xref linkend="dstring_t"/></para>
72
+</refsect1>
73
+
74
+</refentry> 
0 75
new file mode 100644
... ...
@@ -0,0 +1,55 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+
3
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" 
4
+   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5
+
6
+<refentry id="dstr_init">
7
+
8
+<refmeta><refentrytitle>dstr_init</refentrytitle>
9
+<manvolnum>3</manvolnum></refmeta>
10
+
11
+<refnamediv>
12
+<refname>dstr_init</refname>
13
+<refname>dstr_destroy</refname>
14
+<refpurpose>initialization and destruction of <structname>dstring_t</structname>
15
+structure</refpurpose>
16
+</refnamediv>
17
+
18
+<refsynopsisdiv><funcsynopsis>
19
+
20
+<funcsynopsisinfo>
21
+#include &lt;cds/dstring.h&gt;
22
+</funcsynopsisinfo>
23
+
24
+<funcprototype>
25
+  <funcdef>int <function>dstr_init</function></funcdef>
26
+  <paramdef>dstring_t *<parameter>dstr</parameter></paramdef>
27
+  <paramdef>int <parameter>buff_size</parameter></paramdef>
28
+</funcprototype>
29
+
30
+<funcprototype>
31
+  <funcdef>int <function>dstr_destroy</function></funcdef>
32
+  <paramdef>dstring_t *<parameter>dstr</parameter></paramdef>
33
+</funcprototype>
34
+
35
+</funcsynopsis></refsynopsisdiv>
36
+
37
+<refsect1><title>Description</title>
38
+<para><function>dstr_init</function> function initializes
39
+<structname>dstring_t</structname> structure. The
40
+value of <varname>buff_size</varname> is the size of newly allocated data
41
+buffers. These buffers are internal and are allocated if needed by any of
42
+dstring functions.</para>
43
+
44
+<para><function>dstr_destroy</function> function destroys all allocated data
45
+buffers. After calling <function>dstr_destroy</function> can't be called any of
46
+dstring manipulation functions except <function>dstr_init</function>.
47
+</para>
48
+</refsect1>
49
+
50
+<refsect1><title>Return value</title>
51
+<para>Both functions return 0 if successful, nonzero otherwise.
52
+</para>
53
+</refsect1>
54
+
55
+</refentry> 
0 56
new file mode 100644
... ...
@@ -0,0 +1,21 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+
3
+<!DOCTYPE reference PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" 
4
+   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5
+
6
+<reference><title>Dynamic string</title>
7
+
8
+<partintro>
9
+<para>Dynamic string is data structure used for simple string operations
10
+hiding internal operations like memory allocations from the user.</para>
11
+
12
+<para>Functions and data structures for dynamic string are declared in 
13
+<filename class='headerfile'>dstring.h</filename>.</para>
14
+</partintro>
15
+
16
+<include xmlns="http://www.w3.org/2001/XInclude" href="dstring_t.xml"/>
17
+<include xmlns="http://www.w3.org/2001/XInclude" href="dstr_init.xml"/>
18
+<include xmlns="http://www.w3.org/2001/XInclude" href="dstr_append.xml"/>
19
+<include xmlns="http://www.w3.org/2001/XInclude" href="dstr_get_data.xml"/>
20
+
21
+</reference>
0 22
new file mode 100644
... ...
@@ -0,0 +1,102 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+
3
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" 
4
+   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5
+
6
+<refentry id="dstring_t">
7
+
8
+<refmeta><refentrytitle>dstring_t</refentrytitle>
9
+<manvolnum>3</manvolnum></refmeta>
10
+
11
+<refnamediv><refname>dstring_t</refname>
12
+<refpurpose>data structure for dynamic string representation</refpurpose>
13
+</refnamediv>
14
+
15
+<refsynopsisdiv><synopsis>
16
+#include &lt;cds/dstring.h&gt;
17
+
18
+typedef struct _dstring_t {
19
+	dlink_t buffers;
20
+	int len;
21
+	int buff_size;
22
+} dstring_t;
23
+</synopsis></refsynopsisdiv>
24
+
25
+<refsect1><title>Description</title>
26
+<para>This structure represents dynamic string. It allows concatenation of
27
+multiple strings without worry about memory allocations.</para>
28
+
29
+<para>Internaly it uses list of data buffers which are allocated 
30
+if needed. The content of dynamic string may be copied out from internal buffers
31
+using simple function call (see <xref linkend="dstr_get_data"/>).
32
+</para>
33
+
34
+<para>This structure is used as base for simple object serialization (see <xref
35
+linkend="serialization"/>).
36
+</para>
37
+
38
+<refsect2><title>Members</title>
39
+<para><variablelist>
40
+<varlistentry>
41
+	<term><varname>buffers</varname></term>
42
+	<listitem><para>linked list of allocated data buffers</para></listitem>
43
+</varlistentry>
44
+<varlistentry>
45
+	<term><varname>len</varname></term>
46
+	<listitem><para>whole string length</para></listitem>
47
+</varlistentry>
48
+<varlistentry>
49
+	<term><varname>buff_size</varname></term>
50
+	<listitem><para>size of newly allocated buffers</para></listitem>
51
+</varlistentry>
52
+</variablelist></para>
53
+<para>Warning - structure internals may change! For manipulation use
54
+manipulation functions.</para>
55
+</refsect2>
56
+
57
+</refsect1>
58
+
59
+<refsect1><title>Example</title>
60
+<programlisting>
61
+#include &lt;cds/dstring.h&gt;
62
+#include &lt;cds/sstr.h&gt;
63
+
64
+int main(int argc, char **argv)
65
+{
66
+	dstring_t str;
67
+	str_t s;
68
+
69
+	dstr_init(&amp;str, 256);
70
+	dstr_append_zt(&amp;str,"This is a ");
71
+	dstr_append_zt(&amp;str,"very long ");
72
+	dstr_append_zt(&amp;str,"string.");
73
+	if (dstr_get_str(&amp;str, &amp;s) == 0) {
74
+		printf("result: %.*s\n", FMT_STR(s));	
75
+		str_free_content(&amp;s);
76
+	}
77
+	dstr_destroy(&amp;str);
78
+
79
+	return 0;
80
+}	
81
+</programlisting>
82
+<para>This will result in</para>
83
+<para><computeroutput>result: This is a very long
84
+string.</computeroutput>
85
+</para>
86
+</refsect1>
87
+
88
+<refsect1><title>Todo</title>
89
+<para>Create a function like sprintf.
90
+</para>
91
+</refsect1>
92
+
93
+<refsect1><title>See Also</title>
94
+<para>
95
+<xref linkend="dstr_init"/>,
96
+<xref linkend="dstr_get_data"/>,
97
+<xref linkend="dstr_append"/>,
98
+<xref linkend="str_t"/>
99
+</para>
100
+</refsect1>
101
+
102
+</refentry> 
0 103
new file mode 100644
... ...
@@ -0,0 +1,19 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+
3
+<!DOCTYPE reference PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" 
4
+   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5
+
6
+<reference id="serialization">
7
+<title>Serialization</title>
8
+
9
+<partintro>
10
+<para>Serialization is a simple way to store and load data structures. It is
11
+used for example for storing SIP dialogs into database in SER's PA module.</para>
12
+<para>There is a set of functions for serializing basic data elements (strings,
13
+numbers, ...). These functions can be used as base for complex structures
14
+serialization (see <xref linkend="sstream_t.example"/>).</para>
15
+</partintro>
16
+
17
+<include xmlns="http://www.w3.org/2001/XInclude" href="sstream_t.xml"/>
18
+
19
+</reference>
0 20
new file mode 100644
... ...
@@ -0,0 +1,23 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+
3
+<!DOCTYPE reference PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" 
4
+   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5
+
6
+<reference id="sstr">
7
+<title>String</title>
8
+
9
+<partintro>
10
+<para>String is basic data structure. Standard zero terminated C strings have
11
+some bad properties which may slow down processing or disallow use of binary
12
+values. This structure is an attempt to do it better :-).</para>
13
+<para>This structure was taken from SIP Express
14
+Router due to it's usability and need of testing some parts of SER's code
15
+outside of <quote>SER's environment</quote>. Many of string functions were
16
+inspired by or directly taken from SER's code. Another reason for this structure 
17
+was to put string operations to one place and not leave them independently and
18
+often duplictly in SER's modules.</para>
19
+</partintro>
20
+
21
+<include xmlns="http://www.w3.org/2001/XInclude" href="str_t.xml"/>
22
+
23
+</reference>
0 24
new file mode 100644
... ...
@@ -0,0 +1,118 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+
3
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" 
4
+   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5
+
6
+<refentry id="sstream_t">
7
+
8
+<refmeta><refentrytitle>sstream_t</refentrytitle>
9
+<manvolnum>3</manvolnum></refmeta>
10
+
11
+<refnamediv><refname>sstream_t</refname>
12
+<refpurpose>input/output serialization stream</refpurpose>
13
+</refnamediv>
14
+
15
+<refsynopsisdiv><synopsis>
16
+#include &lt;cds/serialize.h&gt;
17
+
18
+typedef struct {
19
+	dstring_t out;
20
+	str_t in;
21
+	int in_pos;
22
+	enum { sstream_in, sstream_out } type;
23
+} sstream_t;
24
+</synopsis></refsynopsisdiv>
25
+
26
+<refsect1><title>Description</title>
27
+<para>This structure represents input and output serialization stream.</para> 
28
+<refsect2><title>Members</title>
29
+<para><variablelist>
30
+<varlistentry>
31
+	<term><varname>out</varname></term>
32
+	<listitem><para>Dynamic string holding output data in the case of output
33
+	stream.</para></listitem>
34
+</varlistentry>
35
+<varlistentry>
36
+	<term><varname>in</varname></term>
37
+	<listitem><para>String holding input data in the case of input 
38
+	stream.</para></listitem>
39
+</varlistentry>
40
+<varlistentry>
41
+	<term><varname>in_pos</varname></term>
42
+	<listitem><para>Actual position in input data (points to first unread char) 
43
+	in the case of input stream.</para></listitem>
44
+</varlistentry>
45
+<varlistentry>
46
+	<term><varname>type</varname></term>
47
+	<listitem><para>Member holding stream type - input or output.</para></listitem>
48
+</varlistentry>
49
+</variablelist></para>
50
+<para>Warning - internals of this data structure may change! Use it only through
51
+manipulation functions.
52
+</para>
53
+</refsect2>
54
+</refsect1>
55
+
56
+<refsect1 id="sstream_t.example"><title>Example</title>
57
+<programlisting>
58
+#include &lt;cds/sstr.h&gt;
59
+#include &lt;cds/serialize.h&gt;
60
+
61
+typedef struct {
62
+	str_t name;
63
+	int number;
64
+	char c;
65
+} test_t;
66
+
67
+int serialize_test_struct(sstream_t *store, test_t *t)
68
+{
69
+	if (serialize_str(store, &amp;t->name) != 0) return -1;
70
+	if (serialize_int(store, &amp;t->number) != 0) return -1;
71
+	if (serialize_char(store, &amp;t->c) != 0) return -1;
72
+	return 0;
73
+}
74
+
75
+int main(int argc, char **argv)
76
+{
77
+	sstream_t store;
78
+	str_t data;
79
+	test_t a = { name: {"test A", 6}, number: 13, c: 'x' };
80
+	test_t b;
81
+
82
+	str_clear(&amp;data);
83
+
84
+	/* storing structure to the string */
85
+	
86
+	init_output_sstream(&amp;store, 256);
87
+	if (serialize_test_struct(&amp;store, &amp;a) == 0) {
88
+		if (get_serialized_sstream(&amp;store, &amp;data) != 0)
89
+			printf("can't get data\n");
90
+	}
91
+	else printf("can't serialize\n");
92
+	destroy_sstream(&amp;store);
93
+
94
+	/* loading structure from the string */
95
+	
96
+	init_input_sstream(&amp;store, data.s, data.len);
97
+	if (serialize_test_struct(&amp;store, &amp;b) == 0) {
98
+		printf("test_t = { %.*s, %d, %c }\n", 
99
+			FMT_STR(b.name), b.number, b.c);
100
+		
101
+		/* cleanup */
102
+		str_free_content(&amp;b.name);
103
+	}
104
+	else printf("can't deserialize\n");
105
+	destroy_sstream(&amp;store);
106
+
107
+	/* cleanup */
108
+	str_free_content(&amp;data);
109
+
110
+	return 0;
111
+}
112
+
113
+</programlisting>
114
+</refsect1>
115
+
116
+</refentry> 
117
+
118
+
0 119
new file mode 100644
... ...
@@ -0,0 +1,41 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+
3
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" 
4
+   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5
+
6
+<refentry id="str_t">
7
+
8
+<refmeta><refentrytitle>str_t</refentrytitle>
9
+<manvolnum>3</manvolnum></refmeta>
10
+
11
+<refnamediv><refname>str_t</refname>
12
+<refpurpose>data structure for string representation</refpurpose>
13
+</refnamediv>
14
+
15
+<refsynopsisdiv><synopsis>
16
+#include &lt;cds/sstr.h&gt;
17
+
18
+outside of SIP Express Router:
19
+
20
+typedef struct {
21
+	char *s;
22
+	int len;
23
+} str_t;
24
+
25
+inside of SIP Express Router:
26
+
27
+typedef str str_t;
28
+
29
+</synopsis></refsynopsisdiv>
30
+
31
+<refsect1><title>Description</title>
32
+<para>This structure represents string. If compiled with SER it is defined using 
33
+SER string defined elsewhere: <programlisting>typedef str str_t;</programlisting>
34
+</para>
35
+<para>Otherwise it is defined as structure containing pointer to data buffer and
36
+length of this buffer.
37
+</para> 
38
+</refsect1>
39
+
40
+</refentry> 
41
+
... ...
@@ -41,7 +41,7 @@ typedef struct dstr_buff {
41 41
 
42 42
 /** Dynamic string structure. It is used
43 43
  * for muliple appends of any strings. */
44
-typedef struct dstring {
44
+typedef struct _dstring_t {
45 45
 	dlink_t buffers;
46 46
 	/** the length of whole string */
47 47
 	int len;
... ...
@@ -187,7 +187,7 @@ void str_clear(str_t *s)
187 187
 	}
188 188
 }
189 189
 
190
-char *str_strchr(const str *s, char c)
190
+char *str_strchr(const str_t *s, char c)
191 191
 {
192 192
 	if (s) {
193 193
 		int i;
... ...
@@ -87,7 +87,7 @@ int str_prefix(const str_t *a, const str_t *b); /* ss_start */
87 87
 void str_clear(str_t *s);
88 88
 
89 89
 /** locate character in string */
90
-char *str_strchr(const str *s, char c);
90
+char *str_strchr(const str_t *s, char c);
91 91
 
92 92
 #ifdef __cplusplus
93 93
 }