mongrel 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. data/COPYING +504 -0
  2. data/LICENSE +504 -0
  3. data/README +117 -0
  4. data/Rakefile +30 -0
  5. data/doc/rdoc/classes/Mongrel.html +144 -0
  6. data/doc/rdoc/classes/Mongrel/Error404Handler.html +171 -0
  7. data/doc/rdoc/classes/Mongrel/Error404Handler.src/M000023.html +18 -0
  8. data/doc/rdoc/classes/Mongrel/Error404Handler.src/M000024.html +18 -0
  9. data/doc/rdoc/classes/Mongrel/HeaderOut.html +167 -0
  10. data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000013.html +18 -0
  11. data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000014.html +21 -0
  12. data/doc/rdoc/classes/Mongrel/HttpHandler.html +159 -0
  13. data/doc/rdoc/classes/Mongrel/HttpHandler.src/M000019.html +17 -0
  14. data/doc/rdoc/classes/Mongrel/HttpParser.html +271 -0
  15. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000001.html +28 -0
  16. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000002.html +29 -0
  17. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000003.html +29 -0
  18. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000004.html +41 -0
  19. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000005.html +27 -0
  20. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000006.html +27 -0
  21. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000007.html +28 -0
  22. data/doc/rdoc/classes/Mongrel/HttpRequest.html +177 -0
  23. data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000025.html +30 -0
  24. data/doc/rdoc/classes/Mongrel/HttpResponse.html +202 -0
  25. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000020.html +21 -0
  26. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000021.html +20 -0
  27. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000022.html +25 -0
  28. data/doc/rdoc/classes/Mongrel/HttpServer.html +336 -0
  29. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000008.html +26 -0
  30. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000009.html +58 -0
  31. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000010.html +22 -0
  32. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000011.html +18 -0
  33. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000012.html +18 -0
  34. data/doc/rdoc/classes/Mongrel/URIClassifier.html +257 -0
  35. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000015.html +54 -0
  36. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000016.html +50 -0
  37. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000017.html +36 -0
  38. data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000018.html +73 -0
  39. data/doc/rdoc/created.rid +1 -0
  40. data/doc/rdoc/files/COPYING.html +756 -0
  41. data/doc/rdoc/files/LICENSE.html +756 -0
  42. data/doc/rdoc/files/README.html +273 -0
  43. data/doc/rdoc/files/ext/http11/http11_c.html +101 -0
  44. data/doc/rdoc/files/lib/mongrel_rb.html +111 -0
  45. data/doc/rdoc/fr_class_index.html +35 -0
  46. data/doc/rdoc/fr_file_index.html +31 -0
  47. data/doc/rdoc/fr_method_index.html +51 -0
  48. data/doc/rdoc/index.html +24 -0
  49. data/doc/rdoc/rdoc-style.css +208 -0
  50. data/examples/camping/blog.rb +300 -0
  51. data/examples/camping/tepee.rb +168 -0
  52. data/examples/simpletest.rb +16 -0
  53. data/examples/webrick_compare.rb +20 -0
  54. data/ext/http11/MANIFEST +0 -0
  55. data/ext/http11/ext_help.h +14 -0
  56. data/ext/http11/extconf.rb +6 -0
  57. data/ext/http11/http11.c +436 -0
  58. data/ext/http11/http11_parser.c +918 -0
  59. data/ext/http11/http11_parser.h +37 -0
  60. data/ext/http11/tst.h +40 -0
  61. data/ext/http11/tst_cleanup.c +24 -0
  62. data/ext/http11/tst_delete.c +146 -0
  63. data/ext/http11/tst_grow_node_free_list.c +38 -0
  64. data/ext/http11/tst_init.c +41 -0
  65. data/ext/http11/tst_insert.c +192 -0
  66. data/ext/http11/tst_search.c +54 -0
  67. data/lib/mongrel.rb +298 -0
  68. data/setup.rb +1360 -0
  69. data/test/test_http11.rb +38 -0
  70. data/test/test_response.rb +44 -0
  71. data/test/test_uriclassifier.rb +104 -0
  72. data/test/test_ws.rb +33 -0
  73. data/tools/rakehelp.rb +99 -0
  74. metadata +132 -0
@@ -0,0 +1,73 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>resolve (Mongrel::URIClassifier)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre>/**
14
+ * call-seq:
15
+ * uc.resolve(&quot;/someuri&quot;) -&gt; &quot;/someuri&quot;, &quot;&quot;, handler
16
+ * uc.resolve(&quot;/someuri/pathinfo&quot;) -&gt; &quot;/someuri&quot;, &quot;/pathinfo&quot;, handler
17
+ * uc.resolve(&quot;/notfound/orhere&quot;) -&gt; nil, nil, nil
18
+ *
19
+ * Attempts to resolve either the whole URI or at the longest prefix, returning
20
+ * the prefix (as script_info), path (as path_info), and registered handler
21
+ * (usually an HttpHandler).
22
+ *
23
+ * It expects strings. Don't try other string-line stuff yet.
24
+ */
25
+ VALUE URIClassifier_resolve(VALUE self, VALUE uri)
26
+ {
27
+ void *handler = NULL;
28
+ int pref_len = 0;
29
+ struct tst *tst = NULL;
30
+ VALUE result;
31
+ VALUE script_name;
32
+ VALUE path_info;
33
+ unsigned char *uri_str = NULL;
34
+ unsigned char *script_name_str = NULL;
35
+
36
+ DATA_GET(self, struct tst, tst);
37
+ uri_str = (unsigned char *)StringValueCStr(uri);
38
+
39
+ handler = tst_search(uri_str, tst, &amp;pref_len);
40
+
41
+ // setup for multiple return values
42
+ result = rb_ary_new();
43
+
44
+
45
+ if(handler == NULL) {
46
+ script_name = rb_str_substr (uri, 0, pref_len);
47
+ script_name_str = (unsigned char *)StringValueCStr(script_name);
48
+
49
+ handler = tst_search(script_name_str, tst, NULL);
50
+
51
+ if(handler == NULL) {
52
+ // didn't find the script name at all
53
+ rb_ary_push(result, Qnil);
54
+ rb_ary_push(result, Qnil);
55
+ rb_ary_push(result, Qnil);
56
+ return result;
57
+ } else {
58
+ // found a handler, setup the path info and we're good
59
+ path_info = rb_str_substr(uri, pref_len, RSTRING(uri)-&gt;len);
60
+ }
61
+ } else {
62
+ // whole thing was found, so uri is the script name, path info empty
63
+ script_name = uri;
64
+ path_info = rb_str_new2(&quot;&quot;);
65
+ }
66
+
67
+ rb_ary_push(result, script_name);
68
+ rb_ary_push(result, path_info);
69
+ rb_ary_push(result, (VALUE)handler);
70
+ return result;
71
+ }</pre>
72
+ </body>
73
+ </html>
@@ -0,0 +1 @@
1
+ Tue Jan 31 00:48:28 EST 2006
@@ -0,0 +1,756 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>File: COPYING</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="fileHeader">
50
+ <h1>COPYING</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>COPYING
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Sat Jan 28 14:37:18 EST 2006</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+ <div id="description">
72
+ <pre>
73
+ GNU LESSER GENERAL PUBLIC LICENSE
74
+ Version 2.1, February 1999
75
+
76
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
77
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
78
+ Everyone is permitted to copy and distribute verbatim copies
79
+ of this license document, but changing it is not allowed.
80
+ </pre>
81
+ <p>
82
+ [This is the first released version of the Lesser GPL. It also counts
83
+ </p>
84
+ <pre>
85
+ as the successor of the GNU Library Public License, version 2, hence
86
+ the version number 2.1.]
87
+
88
+ Preamble
89
+
90
+ The licenses for most software are designed to take away your
91
+ </pre>
92
+ <p>
93
+ freedom to share and change it. By contrast, the GNU General Public
94
+ Licenses are intended to guarantee your freedom to share and change free
95
+ software&#8212;to make sure the software is free for all its users.
96
+ </p>
97
+ <pre>
98
+ This license, the Lesser General Public License, applies to some
99
+ </pre>
100
+ <p>
101
+ specially designated software packages&#8212;typically libraries&#8212;of
102
+ the Free Software Foundation and other authors who decide to use it. You
103
+ can use it too, but we suggest you first think carefully about whether this
104
+ license or the ordinary General Public License is the better strategy to
105
+ use in any particular case, based on the explanations below.
106
+ </p>
107
+ <pre>
108
+ When we speak of free software, we are referring to freedom of use,
109
+ </pre>
110
+ <p>
111
+ not price. Our General Public Licenses are designed to make sure that you
112
+ have the freedom to distribute copies of free software (and charge for this
113
+ service if you wish); that you receive source code or can get it if you
114
+ want it; that you can change the software and use pieces of it in new free
115
+ programs; and that you are informed that you can do these things.
116
+ </p>
117
+ <pre>
118
+ To protect your rights, we need to make restrictions that forbid
119
+ </pre>
120
+ <p>
121
+ distributors to deny you these rights or to ask you to surrender these
122
+ rights. These restrictions translate to certain responsibilities for you if
123
+ you distribute copies of the library or if you modify it.
124
+ </p>
125
+ <pre>
126
+ For example, if you distribute copies of the library, whether gratis
127
+ </pre>
128
+ <p>
129
+ or for a fee, you must give the recipients all the rights that we gave you.
130
+ You must make sure that they, too, receive or can get the source code. If
131
+ you link other code with the library, you must provide complete object
132
+ files to the recipients, so that they can relink them with the library
133
+ after making changes to the library and recompiling it. And you must show
134
+ them these terms so they know their rights.
135
+ </p>
136
+ <pre>
137
+ We protect your rights with a two-step method: (1) we copyright the
138
+ </pre>
139
+ <p>
140
+ library, and (2) we offer you this license, which gives you legal
141
+ permission to copy, distribute and/or modify the library.
142
+ </p>
143
+ <pre>
144
+ To protect each distributor, we want to make it very clear that
145
+ </pre>
146
+ <p>
147
+ there is no warranty for the free library. Also, if the library is modified
148
+ by someone else and passed on, the recipients should know that what they
149
+ have is not the original version, so that the original author&#8217;s
150
+ reputation will not be affected by problems that might be introduced by
151
+ others.
152
+ </p>
153
+ <pre>
154
+ Finally, software patents pose a constant threat to the existence of
155
+ </pre>
156
+ <p>
157
+ any free program. We wish to make sure that a company cannot effectively
158
+ restrict the users of a free program by obtaining a restrictive license
159
+ from a patent holder. Therefore, we insist that any patent license obtained
160
+ for a version of the library must be consistent with the full freedom of
161
+ use specified in this license.
162
+ </p>
163
+ <pre>
164
+ Most GNU software, including some libraries, is covered by the
165
+ </pre>
166
+ <p>
167
+ ordinary GNU General Public License. This license, the GNU Lesser General
168
+ Public License, applies to certain designated libraries, and is quite
169
+ different from the ordinary General Public License. We use this license for
170
+ certain libraries in order to permit linking those libraries into non-free
171
+ programs.
172
+ </p>
173
+ <pre>
174
+ When a program is linked with a library, whether statically or using
175
+ </pre>
176
+ <p>
177
+ a shared library, the combination of the two is legally speaking a combined
178
+ work, a derivative of the original library. The ordinary General Public
179
+ License therefore permits such linking only if the entire combination fits
180
+ its criteria of freedom. The Lesser General Public License permits more lax
181
+ criteria for linking other code with the library.
182
+ </p>
183
+ <pre>
184
+ We call this license the &quot;Lesser&quot; General Public License because it
185
+ </pre>
186
+ <p>
187
+ does Less to protect the user&#8217;s freedom than the ordinary General
188
+ Public License. It also provides other free software developers Less of an
189
+ advantage over competing non-free programs. These disadvantages are the
190
+ reason we use the ordinary General Public License for many libraries.
191
+ However, the Lesser license provides advantages in certain special
192
+ circumstances.
193
+ </p>
194
+ <pre>
195
+ For example, on rare occasions, there may be a special need to
196
+ </pre>
197
+ <p>
198
+ encourage the widest possible use of a certain library, so that it becomes
199
+ a de-facto standard. To achieve this, non-free programs must be allowed to
200
+ use the library. A more frequent case is that a free library does the same
201
+ job as widely used non-free libraries. In this case, there is little to
202
+ gain by limiting the free library to free software only, so we use the
203
+ Lesser General Public License.
204
+ </p>
205
+ <pre>
206
+ In other cases, permission to use a particular library in non-free
207
+ </pre>
208
+ <p>
209
+ programs enables a greater number of people to use a large body of free
210
+ software. For example, permission to use the GNU C Library in non-free
211
+ programs enables many more people to use the whole GNU operating system, as
212
+ well as its variant, the GNU/Linux operating system.
213
+ </p>
214
+ <pre>
215
+ Although the Lesser General Public License is Less protective of the
216
+ </pre>
217
+ <p>
218
+ users&#8217; freedom, it does ensure that the user of a program that is
219
+ linked with the Library has the freedom and the wherewithal to run that
220
+ program using a modified version of the Library.
221
+ </p>
222
+ <pre>
223
+ The precise terms and conditions for copying, distribution and
224
+ </pre>
225
+ <p>
226
+ modification follow. Pay close attention to the difference between a
227
+ &quot;work based on the library&quot; and a &quot;work that uses the
228
+ library&quot;. The former contains code derived from the library, whereas
229
+ the latter must be combined with the library in order to run.
230
+ </p>
231
+ <pre>
232
+ GNU LESSER GENERAL PUBLIC LICENSE
233
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
234
+
235
+ 0. This License Agreement applies to any software library or other
236
+ </pre>
237
+ <p>
238
+ program which contains a notice placed by the copyright holder or other
239
+ authorized party saying it may be distributed under the terms of this
240
+ Lesser General Public License (also called &quot;this License&quot;). Each
241
+ licensee is addressed as &quot;you&quot;.
242
+ </p>
243
+ <pre>
244
+ A &quot;library&quot; means a collection of software functions and/or data
245
+ </pre>
246
+ <p>
247
+ prepared so as to be conveniently linked with application programs (which
248
+ use some of those functions and data) to form executables.
249
+ </p>
250
+ <pre>
251
+ The &quot;Library&quot;, below, refers to any such software library or work
252
+ </pre>
253
+ <p>
254
+ which has been distributed under these terms. A &quot;work based on the
255
+ Library&quot; means either the Library or any derivative work under
256
+ copyright law: that is to say, a work containing the Library or a portion
257
+ of it, either verbatim or with modifications and/or translated
258
+ straightforwardly into another language. (Hereinafter, translation is
259
+ included without limitation in the term &quot;modification&quot;.)
260
+ </p>
261
+ <pre>
262
+ &quot;Source code&quot; for a work means the preferred form of the work for
263
+ </pre>
264
+ <p>
265
+ making modifications to it. For a library, complete source code means all
266
+ the source code for all modules it contains, plus any associated interface
267
+ definition files, plus the scripts used to control compilation and
268
+ installation of the library.
269
+ </p>
270
+ <pre>
271
+ Activities other than copying, distribution and modification are not
272
+ </pre>
273
+ <p>
274
+ covered by this License; they are outside its scope. The act of running a
275
+ program using the Library is not restricted, and output from such a program
276
+ is covered only if its contents constitute a work based on the Library
277
+ (independent of the use of the Library in a tool for writing it). Whether
278
+ that is true depends on what the Library does and what the program that
279
+ uses the Library does.
280
+ </p>
281
+ <pre>
282
+ 1. You may copy and distribute verbatim copies of the Library's
283
+ </pre>
284
+ <p>
285
+ complete source code as you receive it, in any medium, provided that you
286
+ conspicuously and appropriately publish on each copy an appropriate
287
+ copyright notice and disclaimer of warranty; keep intact all the notices
288
+ that refer to this License and to the absence of any warranty; and
289
+ distribute a copy of this License along with the Library.
290
+ </p>
291
+ <pre>
292
+ You may charge a fee for the physical act of transferring a copy,
293
+ </pre>
294
+ <p>
295
+ and you may at your option offer warranty protection in exchange for a fee.
296
+ </p>
297
+ <pre>
298
+ 2. You may modify your copy or copies of the Library or any portion
299
+ </pre>
300
+ <p>
301
+ of it, thus forming a work based on the Library, and copy and distribute
302
+ such modifications or work under the terms of Section 1 above, provided
303
+ that you also meet all of these conditions:
304
+ </p>
305
+ <pre>
306
+ a) The modified work must itself be a software library.
307
+
308
+ b) You must cause the files modified to carry prominent notices
309
+ stating that you changed the files and the date of any change.
310
+
311
+ c) You must cause the whole of the work to be licensed at no
312
+ charge to all third parties under the terms of this License.
313
+
314
+ d) If a facility in the modified Library refers to a function or a
315
+ table of data to be supplied by an application program that uses
316
+ the facility, other than as an argument passed when the facility
317
+ is invoked, then you must make a good faith effort to ensure that,
318
+ in the event an application does not supply such function or
319
+ table, the facility still operates, and performs whatever part of
320
+ its purpose remains meaningful.
321
+
322
+ (For example, a function in a library to compute square roots has
323
+ a purpose that is entirely well-defined independent of the
324
+ application. Therefore, Subsection 2d requires that any
325
+ application-supplied function or table used by this function must
326
+ be optional: if the application does not supply it, the square
327
+ root function must still compute square roots.)
328
+ </pre>
329
+ <p>
330
+ These requirements apply to the modified work as a whole. If identifiable
331
+ sections of that work are not derived from the Library, and can be
332
+ reasonably considered independent and separate works in themselves, then
333
+ this License, and its terms, do not apply to those sections when you
334
+ distribute them as separate works. But when you distribute the same
335
+ sections as part of a whole which is a work based on the Library, the
336
+ distribution of the whole must be on the terms of this License, whose
337
+ permissions for other licensees extend to the entire whole, and thus to
338
+ each and every part regardless of who wrote it.
339
+ </p>
340
+ <p>
341
+ Thus, it is not the intent of this section to claim rights or contest your
342
+ rights to work written entirely by you; rather, the intent is to exercise
343
+ the right to control the distribution of derivative or collective works
344
+ based on the Library.
345
+ </p>
346
+ <p>
347
+ In addition, mere aggregation of another work not based on the Library with
348
+ the Library (or with a work based on the Library) on a volume of a storage
349
+ or distribution medium does not bring the other work under the scope of
350
+ this License.
351
+ </p>
352
+ <pre>
353
+ 3. You may opt to apply the terms of the ordinary GNU General Public
354
+ </pre>
355
+ <p>
356
+ License instead of this License to a given copy of the Library. To do this,
357
+ you must alter all the notices that refer to this License, so that they
358
+ refer to the ordinary GNU General Public License, version 2, instead of to
359
+ this License. (If a newer version than version 2 of the ordinary GNU
360
+ General Public License has appeared, then you can specify that version
361
+ instead if you wish.) Do not make any other change in these notices.
362
+ </p>
363
+ <pre>
364
+ Once this change is made in a given copy, it is irreversible for
365
+ </pre>
366
+ <p>
367
+ that copy, so the ordinary GNU General Public License applies to all
368
+ subsequent copies and derivative works made from that copy.
369
+ </p>
370
+ <pre>
371
+ This option is useful when you wish to copy part of the code of
372
+ </pre>
373
+ <p>
374
+ the Library into a program that is not a library.
375
+ </p>
376
+ <pre>
377
+ 4. You may copy and distribute the Library (or a portion or
378
+ </pre>
379
+ <p>
380
+ derivative of it, under Section 2) in object code or executable form under
381
+ the terms of Sections 1 and 2 above provided that you accompany it with the
382
+ complete corresponding machine-readable source code, which must be
383
+ distributed under the terms of Sections 1 and 2 above on a medium
384
+ customarily used for software interchange.
385
+ </p>
386
+ <pre>
387
+ If distribution of object code is made by offering access to copy
388
+ </pre>
389
+ <p>
390
+ from a designated place, then offering equivalent access to copy the source
391
+ code from the same place satisfies the requirement to distribute the source
392
+ code, even though third parties are not compelled to copy the source along
393
+ with the object code.
394
+ </p>
395
+ <pre>
396
+ 5. A program that contains no derivative of any portion of the
397
+ </pre>
398
+ <p>
399
+ Library, but is designed to work with the Library by being compiled or
400
+ linked with it, is called a &quot;work that uses the Library&quot;. Such a
401
+ work, in isolation, is not a derivative work of the Library, and therefore
402
+ falls outside the scope of this License.
403
+ </p>
404
+ <pre>
405
+ However, linking a &quot;work that uses the Library&quot; with the Library
406
+ </pre>
407
+ <p>
408
+ creates an executable that is a derivative of the Library (because it
409
+ contains portions of the Library), rather than a &quot;work that uses the
410
+ library&quot;. The executable is therefore covered by this License. Section
411
+ 6 states terms for distribution of such executables.
412
+ </p>
413
+ <pre>
414
+ When a &quot;work that uses the Library&quot; uses material from a header file
415
+ </pre>
416
+ <p>
417
+ that is part of the Library, the object code for the work may be a
418
+ derivative work of the Library even though the source code is not. Whether
419
+ this is true is especially significant if the work can be linked without
420
+ the Library, or if the work is itself a library. The threshold for this to
421
+ be true is not precisely defined by law.
422
+ </p>
423
+ <pre>
424
+ If such an object file uses only numerical parameters, data
425
+ </pre>
426
+ <p>
427
+ structure layouts and accessors, and small macros and small inline
428
+ functions (ten lines or less in length), then the use of the object file is
429
+ unrestricted, regardless of whether it is legally a derivative work.
430
+ (Executables containing this object code plus portions of the Library will
431
+ still fall under Section 6.)
432
+ </p>
433
+ <pre>
434
+ Otherwise, if the work is a derivative of the Library, you may
435
+ </pre>
436
+ <p>
437
+ distribute the object code for the work under the terms of Section 6. Any
438
+ executables containing that work also fall under Section 6, whether or not
439
+ they are linked directly with the Library itself.
440
+ </p>
441
+ <pre>
442
+ 6. As an exception to the Sections above, you may also combine or
443
+ </pre>
444
+ <p>
445
+ link a &quot;work that uses the Library&quot; with the Library to produce a
446
+ work containing portions of the Library, and distribute that work under
447
+ terms of your choice, provided that the terms permit modification of the
448
+ work for the customer&#8217;s own use and reverse engineering for debugging
449
+ such modifications.
450
+ </p>
451
+ <pre>
452
+ You must give prominent notice with each copy of the work that the
453
+ </pre>
454
+ <p>
455
+ Library is used in it and that the Library and its use are covered by this
456
+ License. You must supply a copy of this License. If the work during
457
+ execution displays copyright notices, you must include the copyright notice
458
+ for the Library among them, as well as a reference directing the user to
459
+ the copy of this License. Also, you must do one of these things:
460
+ </p>
461
+ <pre>
462
+ a) Accompany the work with the complete corresponding
463
+ machine-readable source code for the Library including whatever
464
+ changes were used in the work (which must be distributed under
465
+ Sections 1 and 2 above); and, if the work is an executable linked
466
+ with the Library, with the complete machine-readable &quot;work that
467
+ uses the Library&quot;, as object code and/or source code, so that the
468
+ user can modify the Library and then relink to produce a modified
469
+ executable containing the modified Library. (It is understood
470
+ that the user who changes the contents of definitions files in the
471
+ Library will not necessarily be able to recompile the application
472
+ to use the modified definitions.)
473
+
474
+ b) Use a suitable shared library mechanism for linking with the
475
+ Library. A suitable mechanism is one that (1) uses at run time a
476
+ copy of the library already present on the user's computer system,
477
+ rather than copying library functions into the executable, and (2)
478
+ will operate properly with a modified version of the library, if
479
+ the user installs one, as long as the modified version is
480
+ interface-compatible with the version that the work was made with.
481
+
482
+ c) Accompany the work with a written offer, valid for at
483
+ least three years, to give the same user the materials
484
+ specified in Subsection 6a, above, for a charge no more
485
+ than the cost of performing this distribution.
486
+
487
+ d) If distribution of the work is made by offering access to copy
488
+ from a designated place, offer equivalent access to copy the above
489
+ specified materials from the same place.
490
+
491
+ e) Verify that the user has already received a copy of these
492
+ materials or that you have already sent this user a copy.
493
+
494
+ For an executable, the required form of the &quot;work that uses the
495
+ </pre>
496
+ <p>
497
+ Library&quot; must include any data and utility programs needed for
498
+ reproducing the executable from it. However, as a special exception, the
499
+ materials to be distributed need not include anything that is normally
500
+ distributed (in either source or binary form) with the major components
501
+ (compiler, kernel, and so on) of the operating system on which the
502
+ executable runs, unless that component itself accompanies the executable.
503
+ </p>
504
+ <pre>
505
+ It may happen that this requirement contradicts the license
506
+ </pre>
507
+ <p>
508
+ restrictions of other proprietary libraries that do not normally accompany
509
+ the operating system. Such a contradiction means you cannot use both them
510
+ and the Library together in an executable that you distribute.
511
+ </p>
512
+ <pre>
513
+ 7. You may place library facilities that are a work based on the
514
+ </pre>
515
+ <p>
516
+ Library side-by-side in a single library together with other library
517
+ facilities not covered by this License, and distribute such a combined
518
+ library, provided that the separate distribution of the work based on the
519
+ Library and of the other library facilities is otherwise permitted, and
520
+ provided that you do these two things:
521
+ </p>
522
+ <pre>
523
+ a) Accompany the combined library with a copy of the same work
524
+ based on the Library, uncombined with any other library
525
+ facilities. This must be distributed under the terms of the
526
+ Sections above.
527
+
528
+ b) Give prominent notice with the combined library of the fact
529
+ that part of it is a work based on the Library, and explaining
530
+ where to find the accompanying uncombined form of the same work.
531
+
532
+ 8. You may not copy, modify, sublicense, link with, or distribute
533
+ </pre>
534
+ <p>
535
+ the Library except as expressly provided under this License. Any attempt
536
+ otherwise to copy, modify, sublicense, link with, or distribute the Library
537
+ is void, and will automatically terminate your rights under this License.
538
+ However, parties who have received copies, or rights, from you under this
539
+ License will not have their licenses terminated so long as such parties
540
+ remain in full compliance.
541
+ </p>
542
+ <pre>
543
+ 9. You are not required to accept this License, since you have not
544
+ </pre>
545
+ <p>
546
+ signed it. However, nothing else grants you permission to modify or
547
+ distribute the Library or its derivative works. These actions are
548
+ prohibited by law if you do not accept this License. Therefore, by
549
+ modifying or distributing the Library (or any work based on the Library),
550
+ you indicate your acceptance of this License to do so, and all its terms
551
+ and conditions for copying, distributing or modifying the Library or works
552
+ based on it.
553
+ </p>
554
+ <pre>
555
+ 10. Each time you redistribute the Library (or any work based on the
556
+ </pre>
557
+ <p>
558
+ Library), the recipient automatically receives a license from the original
559
+ licensor to copy, distribute, link with or modify the Library subject to
560
+ these terms and conditions. You may not impose any further restrictions on
561
+ the recipients&#8217; exercise of the rights granted herein. You are not
562
+ responsible for enforcing compliance by third parties with this License.
563
+ </p>
564
+ <pre>
565
+ 11. If, as a consequence of a court judgment or allegation of patent
566
+ </pre>
567
+ <p>
568
+ infringement or for any other reason (not limited to patent issues),
569
+ conditions are imposed on you (whether by court order, agreement or
570
+ otherwise) that contradict the conditions of this License, they do not
571
+ excuse you from the conditions of this License. If you cannot distribute so
572
+ as to satisfy simultaneously your obligations under this License and any
573
+ other pertinent obligations, then as a consequence you may not distribute
574
+ the Library at all. For example, if a patent license would not permit
575
+ royalty-free redistribution of the Library by all those who receive copies
576
+ directly or indirectly through you, then the only way you could satisfy
577
+ both it and this License would be to refrain entirely from distribution of
578
+ the Library.
579
+ </p>
580
+ <p>
581
+ If any portion of this section is held invalid or unenforceable under any
582
+ particular circumstance, the balance of the section is intended to apply,
583
+ and the section as a whole is intended to apply in other circumstances.
584
+ </p>
585
+ <p>
586
+ It is not the purpose of this section to induce you to infringe any patents
587
+ or other property right claims or to contest validity of any such claims;
588
+ this section has the sole purpose of protecting the integrity of the free
589
+ software distribution system which is implemented by public license
590
+ practices. Many people have made generous contributions to the wide range
591
+ of software distributed through that system in reliance on consistent
592
+ application of that system; it is up to the author/donor to decide if he or
593
+ she is willing to distribute software through any other system and a
594
+ licensee cannot impose that choice.
595
+ </p>
596
+ <p>
597
+ This section is intended to make thoroughly clear what is believed to be a
598
+ consequence of the rest of this License.
599
+ </p>
600
+ <pre>
601
+ 12. If the distribution and/or use of the Library is restricted in
602
+ </pre>
603
+ <p>
604
+ certain countries either by patents or by copyrighted interfaces, the
605
+ original copyright holder who places the Library under this License may add
606
+ an explicit geographical distribution limitation excluding those countries,
607
+ so that distribution is permitted only in or among countries not thus
608
+ excluded. In such case, this License incorporates the limitation as if
609
+ written in the body of this License.
610
+ </p>
611
+ <pre>
612
+ 13. The Free Software Foundation may publish revised and/or new
613
+ </pre>
614
+ <p>
615
+ versions of the Lesser General Public License from time to time. Such new
616
+ versions will be similar in spirit to the present version, but may differ
617
+ in detail to address new problems or concerns.
618
+ </p>
619
+ <p>
620
+ Each version is given a distinguishing version number. If the Library
621
+ specifies a version number of this License which applies to it and
622
+ &quot;any later version&quot;, you have the option of following the terms
623
+ and conditions either of that version or of any later version published by
624
+ the Free Software Foundation. If the Library does not specify a license
625
+ version number, you may choose any version ever published by the Free
626
+ Software Foundation.
627
+ </p>
628
+ <pre>
629
+ 14. If you wish to incorporate parts of the Library into other free
630
+ </pre>
631
+ <p>
632
+ programs whose distribution conditions are incompatible with these, write
633
+ to the author to ask for permission. For software which is copyrighted by
634
+ the Free Software Foundation, write to the Free Software Foundation; we
635
+ sometimes make exceptions for this. Our decision will be guided by the two
636
+ goals of preserving the free status of all derivatives of our free software
637
+ and of promoting the sharing and reuse of software generally.
638
+ </p>
639
+ <pre>
640
+ NO WARRANTY
641
+
642
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
643
+ </pre>
644
+ <p>
645
+ WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT
646
+ WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
647
+ PROVIDE THE LIBRARY &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND, EITHER
648
+ EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
649
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
650
+ TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE
651
+ LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
652
+ REPAIR OR CORRECTION.
653
+ </p>
654
+ <pre>
655
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
656
+ </pre>
657
+ <p>
658
+ WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
659
+ REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
660
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
661
+ OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED
662
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
663
+ YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER
664
+ SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
665
+ POSSIBILITY OF SUCH DAMAGES.
666
+ </p>
667
+ <pre>
668
+ END OF TERMS AND CONDITIONS
669
+
670
+ How to Apply These Terms to Your New Libraries
671
+
672
+ If you develop a new library, and you want it to be of the greatest
673
+ </pre>
674
+ <p>
675
+ possible use to the public, we recommend making it free software that
676
+ everyone can redistribute and change. You can do so by permitting
677
+ redistribution under these terms (or, alternatively, under the terms of the
678
+ ordinary General Public License).
679
+ </p>
680
+ <pre>
681
+ To apply these terms, attach the following notices to the library. It is
682
+ </pre>
683
+ <p>
684
+ safest to attach them to the start of each source file to most effectively
685
+ convey the exclusion of warranty; and each file should have at least the
686
+ &quot;copyright&quot; line and a pointer to where the full notice is found.
687
+ </p>
688
+ <pre>
689
+ &lt;one line to give the library's name and a brief idea of what it does.&gt;
690
+ Copyright (C) &lt;year&gt; &lt;name of author&gt;
691
+
692
+ This library is free software; you can redistribute it and/or
693
+ modify it under the terms of the GNU Lesser General Public
694
+ License as published by the Free Software Foundation; either
695
+ version 2.1 of the License, or (at your option) any later version.
696
+
697
+ This library is distributed in the hope that it will be useful,
698
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
699
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
700
+ Lesser General Public License for more details.
701
+
702
+ You should have received a copy of the GNU Lesser General Public
703
+ License along with this library; if not, write to the Free Software
704
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
705
+ </pre>
706
+ <p>
707
+ Also add information on how to contact you by electronic and paper mail.
708
+ </p>
709
+ <p>
710
+ You should also get your employer (if you work as a programmer) or your
711
+ school, if any, to sign a &quot;copyright disclaimer&quot; for the library,
712
+ if necessary. Here is a sample; alter the names:
713
+ </p>
714
+ <pre>
715
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
716
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
717
+
718
+ &lt;signature of Ty Coon&gt;, 1 April 1990
719
+ Ty Coon, President of Vice
720
+ </pre>
721
+ <p>
722
+ That&#8217;s all there is to it!
723
+ </p>
724
+
725
+ </div>
726
+
727
+
728
+ </div>
729
+
730
+
731
+ </div>
732
+
733
+
734
+ <!-- if includes -->
735
+
736
+ <div id="section">
737
+
738
+
739
+
740
+
741
+
742
+
743
+
744
+
745
+ <!-- if method_list -->
746
+
747
+
748
+ </div>
749
+
750
+
751
+ <div id="validator-badges">
752
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
753
+ </div>
754
+
755
+ </body>
756
+ </html>