aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS27
-rw-r--r--COPYING506
-rw-r--r--COPYRIGHT7
-rw-r--r--ChangeLog245
-rw-r--r--INSTALL229
-rw-r--r--Makefile.am3
-rw-r--r--NEWS1
-rw-r--r--README7
-rw-r--r--TODO51
-rwxr-xr-xconfig.guess1500
-rwxr-xr-xconfig.sub1608
-rw-r--r--configure.ac36
-rw-r--r--contrib/Win32/dirent.c277
-rw-r--r--contrib/Win32/dirent.h56
-rw-r--r--contrib/Win32/flock.c57
-rw-r--r--contrib/Win32/flock.h31
-rw-r--r--contrib/Win32/help/help.cfg13
-rw-r--r--contrib/Win32/help/help.dsp157
-rw-r--r--contrib/Win32/help/help.icobin0 -> 766 bytes
-rw-r--r--contrib/Win32/help/help.rc72
-rw-r--r--contrib/Win32/help/mime.types469
-rw-r--r--contrib/Win32/help/resource.h16
-rw-r--r--contrib/Win32/libwebserver.dsp237
-rw-r--r--contrib/Win32/libwebserver.dsw44
-rw-r--r--contrib/help/engine.h9
-rw-r--r--contrib/help/examples.h605
-rw-r--r--contrib/help/functions.h800
-rw-r--r--contrib/help/help.c421
-rw-r--r--contrib/help/help.cfg13
-rw-r--r--contrib/help/info.h87
-rw-r--r--contrib/help/makeheader.bat4
-rw-r--r--contrib/help/mime.types469
-rw-r--r--contrib/help/security.h143
-rw-r--r--contrib/tools/checkpid4
-rw-r--r--contrib/tools/data2header.c41
-rw-r--r--contrib/tools/httptest.pl195
-rw-r--r--contrib/tools/myvc_install.bat1
-rwxr-xr-xcontrib/tools/win2unix.sh2
-rw-r--r--doc/examples.html445
-rw-r--r--doc/examples/SoundRecorder/include/debug.h24
-rw-r--r--doc/examples/SoundRecorder/include/soundbuffers.h39
-rw-r--r--doc/examples/SoundRecorder/include/soundcard.h31
-rw-r--r--doc/examples/SoundRecorder/include/soundmixer.h23
-rw-r--r--doc/examples/SoundRecorder/src/main.c296
-rw-r--r--doc/examples/SoundRecorder/src/soundbuffers.c86
-rw-r--r--doc/examples/SoundRecorder/src/soundcard.c49
-rw-r--r--doc/examples/SoundRecorder/src/soundmixer.c104
-rw-r--r--doc/examples/cgi-bin/index.cgi1137
-rw-r--r--doc/examples/cgi-bin/simple.cgi14
-rw-r--r--doc/examples/cgi-bin/simple1.cgi125
-rw-r--r--doc/examples/cgi.c100
-rw-r--r--doc/examples/demo.c66
-rw-r--r--doc/examples/foo-cert.pem86
-rw-r--r--doc/examples/packetmounter.c236
-rw-r--r--doc/functions.html355
-rw-r--r--doc/info.html25
-rw-r--r--doc/security.html67
-rw-r--r--include/Makefile.am7
-rw-r--r--include/webserver_gnunet.h0
-rwxr-xr-xltmain.sh6871
-rw-r--r--src/Makefile.am26
-rw-r--r--src/client.c1190
-rw-r--r--src/client.h159
-rw-r--r--src/clientinfo.c1124
-rw-r--r--src/clientinfo.h118
-rw-r--r--src/config.h133
-rw-r--r--src/debug.h29
-rw-r--r--src/error.c34
-rw-r--r--src/error.h33
-rw-r--r--src/fnmatch.c195
-rw-r--r--src/fnmatch.h59
-rw-r--r--src/gethandler.c96
-rw-r--r--src/gethandler.h60
-rw-r--r--src/logo.h396
-rw-r--r--src/memory.c155
-rw-r--r--src/memory.h46
-rw-r--r--src/module.c22
-rw-r--r--src/module.h25
-rw-r--r--src/outgif.c587
-rw-r--r--src/outgif.h63
-rw-r--r--src/outstream.c122
-rw-r--r--src/outstream.h53
-rw-r--r--src/server.c448
-rw-r--r--src/server.h86
-rw-r--r--src/socket.c74
-rw-r--r--src/socket.h51
-rw-r--r--src/utils.c155
-rw-r--r--src/utils.h59
-rw-r--r--src/web_server.h129
-rw-r--r--src/weblog.c43
-rw-r--r--src/weblog.h40
91 files changed, 24439 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 00000000..4546b619
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,27 @@
1Luis Figueiredo (stdio@netc.pt)
2 Main Programmer, designer
3
4Christian Grothoff (christian@grothoff.org)
5 Adaptation for GNUnet (work in progress)
6
7People who contributed:
8 Joćo Luis Marques (lamego@ptlink.net)
9 minor bug reported (redirectors, stdout)
10 'oddsock' (oddsock@oddsock.org)
11 Licensing tip, and minor bug reported (segv in querystring)
12 Rocco Carbone (rocco@tecsiel.it)
13 Return code for web_server_run tip
14 Johannes E. Schindelin (Johannes.Schindelin@gmx.de)
15 Spell checking, Makefile portability, and security 'How do I create my own certificate?'
16 bugfixes, examples hello world!
17 Richard Offer (offer@sgi.com)
18 checkboxes, (multiple variables) tip
19 Sven Anders (anders@anduras.de)
20 new web_client_setcookie()
21 Hilobok Andrew (han@km.if.ua)
22 FreeBSD portability
23
24#linuxhelp @ ptnet.org
25
26Rui - to let me know the existence of strftime (yeah i didn't knew)
27Joćo Luis Marques Pinto - a problem with redirection (stdout & exit());
diff --git a/COPYING b/COPYING
new file mode 100644
index 00000000..807db791
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,506 @@
1 GNU LESSER GENERAL PUBLIC LICENSE
2 Version 2.1, February 1999
3
4 Copyright (C) 1991, 1999 Free Software Foundation, Inc.
5 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
6 Everyone is permitted to copy and distribute verbatim copies
7 of this license document, but changing it is not allowed.
8
9[This is the first released version of the Lesser GPL. It also counts
10 as the successor of the GNU Library Public License, version 2, hence
11 the version number 2.1.]
12
13 Preamble
14
15 The licenses for most software are designed to take away your
16freedom to share and change it. By contrast, the GNU General Public
17Licenses are intended to guarantee your freedom to share and change
18free software--to make sure the software is free for all its users.
19
20 This license, the Lesser General Public License, applies to some
21specially designated software packages--typically libraries--of the
22Free Software Foundation and other authors who decide to use it. You
23can use it too, but we suggest you first think carefully about whether
24this license or the ordinary General Public License is the better
25strategy to use in any particular case, based on the explanations below.
26
27 When we speak of free software, we are referring to freedom of use,
28not price. Our General Public Licenses are designed to make sure that
29you have the freedom to distribute copies of free software (and charge
30for this service if you wish); that you receive source code or can get
31it if you want it; that you can change the software and use pieces of
32it in new free programs; and that you are informed that you can do
33these things.
34
35 To protect your rights, we need to make restrictions that forbid
36distributors to deny you these rights or to ask you to surrender these
37rights. These restrictions translate to certain responsibilities for
38you if you distribute copies of the library or if you modify it.
39
40 For example, if you distribute copies of the library, whether gratis
41or for a fee, you must give the recipients all the rights that we gave
42you. You must make sure that they, too, receive or can get the source
43code. If you link other code with the library, you must provide
44complete object files to the recipients, so that they can relink them
45with the library after making changes to the library and recompiling
46it. And you must show them these terms so they know their rights.
47
48 We protect your rights with a two-step method: (1) we copyright the
49library, and (2) we offer you this license, which gives you legal
50permission to copy, distribute and/or modify the library.
51
52 To protect each distributor, we want to make it very clear that
53there is no warranty for the free library. Also, if the library is
54modified by someone else and passed on, the recipients should know
55that what they have is not the original version, so that the original
56author's reputation will not be affected by problems that might be
57introduced by others.
58
59 Finally, software patents pose a constant threat to the existence of
60any free program. We wish to make sure that a company cannot
61effectively restrict the users of a free program by obtaining a
62restrictive license from a patent holder. Therefore, we insist that
63any patent license obtained for a version of the library must be
64consistent with the full freedom of use specified in this license.
65
66 Most GNU software, including some libraries, is covered by the
67ordinary GNU General Public License. This license, the GNU Lesser
68General Public License, applies to certain designated libraries, and
69is quite different from the ordinary General Public License. We use
70this license for certain libraries in order to permit linking those
71libraries into non-free programs.
72
73 When a program is linked with a library, whether statically or using
74a shared library, the combination of the two is legally speaking a
75combined work, a derivative of the original library. The ordinary
76General Public License therefore permits such linking only if the
77entire combination fits its criteria of freedom. The Lesser General
78Public License permits more lax criteria for linking other code with
79the library.
80
81 We call this license the "Lesser" General Public License because it
82does Less to protect the user's freedom than the ordinary General
83Public License. It also provides other free software developers Less
84of an advantage over competing non-free programs. These disadvantages
85are the reason we use the ordinary General Public License for many
86libraries. However, the Lesser license provides advantages in certain
87special circumstances.
88
89 For example, on rare occasions, there may be a special need to
90encourage the widest possible use of a certain library, so that it becomes
91a de-facto standard. To achieve this, non-free programs must be
92allowed to use the library. A more frequent case is that a free
93library does the same job as widely used non-free libraries. In this
94case, there is little to gain by limiting the free library to free
95software only, so we use the Lesser General Public License.
96
97 In other cases, permission to use a particular library in non-free
98programs enables a greater number of people to use a large body of
99free software. For example, permission to use the GNU C Library in
100non-free programs enables many more people to use the whole GNU
101operating system, as well as its variant, the GNU/Linux operating
102system.
103
104 Although the Lesser General Public License is Less protective of the
105users' freedom, it does ensure that the user of a program that is
106linked with the Library has the freedom and the wherewithal to run
107that program using a modified version of the Library.
108
109 The precise terms and conditions for copying, distribution and
110modification follow. Pay close attention to the difference between a
111"work based on the library" and a "work that uses the library". The
112former contains code derived from the library, whereas the latter must
113be combined with the library in order to run.
114
115 GNU LESSER GENERAL PUBLIC LICENSE
116 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
117
118 0. This License Agreement applies to any software library or other
119program which contains a notice placed by the copyright holder or
120other authorized party saying it may be distributed under the terms of
121this Lesser General Public License (also called "this License").
122Each licensee is addressed as "you".
123
124 A "library" means a collection of software functions and/or data
125prepared so as to be conveniently linked with application programs
126(which use some of those functions and data) to form executables.
127
128 The "Library", below, refers to any such software library or work
129which has been distributed under these terms. A "work based on the
130Library" means either the Library or any derivative work under
131copyright law: that is to say, a work containing the Library or a
132portion of it, either verbatim or with modifications and/or translated
133straightforwardly into another language. (Hereinafter, translation is
134included without limitation in the term "modification".)
135
136 "Source code" for a work means the preferred form of the work for
137making modifications to it. For a library, complete source code means
138all the source code for all modules it contains, plus any associated
139interface definition files, plus the scripts used to control compilation
140and installation of the library.
141
142 Activities other than copying, distribution and modification are not
143covered by this License; they are outside its scope. The act of
144running a program using the Library is not restricted, and output from
145such a program is covered only if its contents constitute a work based
146on the Library (independent of the use of the Library in a tool for
147writing it). Whether that is true depends on what the Library does
148and what the program that uses the Library does.
149
150 1. You may copy and distribute verbatim copies of the Library's
151complete source code as you receive it, in any medium, provided that
152you conspicuously and appropriately publish on each copy an
153appropriate copyright notice and disclaimer of warranty; keep intact
154all the notices that refer to this License and to the absence of any
155warranty; and distribute a copy of this License along with the
156Library.
157
158 You may charge a fee for the physical act of transferring a copy,
159and you may at your option offer warranty protection in exchange for a
160fee.
161
162 2. You may modify your copy or copies of the Library or any portion
163of it, thus forming a work based on the Library, and copy and
164distribute such modifications or work under the terms of Section 1
165above, provided that you also meet all of these conditions:
166
167 a) The modified work must itself be a software library.
168
169 b) You must cause the files modified to carry prominent notices
170 stating that you changed the files and the date of any change.
171
172 c) You must cause the whole of the work to be licensed at no
173 charge to all third parties under the terms of this License.
174
175 d) If a facility in the modified Library refers to a function or a
176 table of data to be supplied by an application program that uses
177 the facility, other than as an argument passed when the facility
178 is invoked, then you must make a good faith effort to ensure that,
179 in the event an application does not supply such function or
180 table, the facility still operates, and performs whatever part of
181 its purpose remains meaningful.
182
183 (For example, a function in a library to compute square roots has
184 a purpose that is entirely well-defined independent of the
185 application. Therefore, Subsection 2d requires that any
186 application-supplied function or table used by this function must
187 be optional: if the application does not supply it, the square
188 root function must still compute square roots.)
189
190These requirements apply to the modified work as a whole. If
191identifiable sections of that work are not derived from the Library,
192and can be reasonably considered independent and separate works in
193themselves, then this License, and its terms, do not apply to those
194sections when you distribute them as separate works. But when you
195distribute the same sections as part of a whole which is a work based
196on the Library, the distribution of the whole must be on the terms of
197this License, whose permissions for other licensees extend to the
198entire whole, and thus to each and every part regardless of who wrote
199it.
200
201Thus, it is not the intent of this section to claim rights or contest
202your rights to work written entirely by you; rather, the intent is to
203exercise the right to control the distribution of derivative or
204collective works based on the Library.
205
206In addition, mere aggregation of another work not based on the Library
207with the Library (or with a work based on the Library) on a volume of
208a storage or distribution medium does not bring the other work under
209the scope of this License.
210
211 3. You may opt to apply the terms of the ordinary GNU General Public
212License instead of this License to a given copy of the Library. To do
213this, you must alter all the notices that refer to this License, so
214that they refer to the ordinary GNU General Public License, version 2,
215instead of to this License. (If a newer version than version 2 of the
216ordinary GNU General Public License has appeared, then you can specify
217that version instead if you wish.) Do not make any other change in
218these notices.
219
220 Once this change is made in a given copy, it is irreversible for
221that copy, so the ordinary GNU General Public License applies to all
222subsequent copies and derivative works made from that copy.
223
224 This option is useful when you wish to copy part of the code of
225the Library into a program that is not a library.
226
227 4. You may copy and distribute the Library (or a portion or
228derivative of it, under Section 2) in object code or executable form
229under the terms of Sections 1 and 2 above provided that you accompany
230it with the complete corresponding machine-readable source code, which
231must be distributed under the terms of Sections 1 and 2 above on a
232medium customarily used for software interchange.
233
234 If distribution of object code is made by offering access to copy
235from a designated place, then offering equivalent access to copy the
236source code from the same place satisfies the requirement to
237distribute the source code, even though third parties are not
238compelled to copy the source along with the object code.
239
240 5. A program that contains no derivative of any portion of the
241Library, but is designed to work with the Library by being compiled or
242linked with it, is called a "work that uses the Library". Such a
243work, in isolation, is not a derivative work of the Library, and
244therefore falls outside the scope of this License.
245
246 However, linking a "work that uses the Library" with the Library
247creates an executable that is a derivative of the Library (because it
248contains portions of the Library), rather than a "work that uses the
249library". The executable is therefore covered by this License.
250Section 6 states terms for distribution of such executables.
251
252 When a "work that uses the Library" uses material from a header file
253that is part of the Library, the object code for the work may be a
254derivative work of the Library even though the source code is not.
255Whether this is true is especially significant if the work can be
256linked without the Library, or if the work is itself a library. The
257threshold for this to be true is not precisely defined by law.
258
259 If such an object file uses only numerical parameters, data
260structure layouts and accessors, and small macros and small inline
261functions (ten lines or less in length), then the use of the object
262file is unrestricted, regardless of whether it is legally a derivative
263work. (Executables containing this object code plus portions of the
264Library will still fall under Section 6.)
265
266 Otherwise, if the work is a derivative of the Library, you may
267distribute the object code for the work under the terms of Section 6.
268Any executables containing that work also fall under Section 6,
269whether or not they are linked directly with the Library itself.
270
271 6. As an exception to the Sections above, you may also combine or
272link a "work that uses the Library" with the Library to produce a
273work containing portions of the Library, and distribute that work
274under terms of your choice, provided that the terms permit
275modification of the work for the customer's own use and reverse
276engineering for debugging such modifications.
277
278 You must give prominent notice with each copy of the work that the
279Library is used in it and that the Library and its use are covered by
280this License. You must supply a copy of this License. If the work
281during execution displays copyright notices, you must include the
282copyright notice for the Library among them, as well as a reference
283directing the user to the copy of this License. Also, you must do one
284of these things:
285
286 a) Accompany the work with the complete corresponding
287 machine-readable source code for the Library including whatever
288 changes were used in the work (which must be distributed under
289 Sections 1 and 2 above); and, if the work is an executable linked
290 with the Library, with the complete machine-readable "work that
291 uses the Library", as object code and/or source code, so that the
292 user can modify the Library and then relink to produce a modified
293 executable containing the modified Library. (It is understood
294 that the user who changes the contents of definitions files in the
295 Library will not necessarily be able to recompile the application
296 to use the modified definitions.)
297
298 b) Use a suitable shared library mechanism for linking with the
299 Library. A suitable mechanism is one that (1) uses at run time a
300 copy of the library already present on the user's computer system,
301 rather than copying library functions into the executable, and (2)
302 will operate properly with a modified version of the library, if
303 the user installs one, as long as the modified version is
304 interface-compatible with the version that the work was made with.
305
306 c) Accompany the work with a written offer, valid for at
307 least three years, to give the same user the materials
308 specified in Subsection 6a, above, for a charge no more
309 than the cost of performing this distribution.
310
311 d) If distribution of the work is made by offering access to copy
312 from a designated place, offer equivalent access to copy the above
313 specified materials from the same place.
314
315 e) Verify that the user has already received a copy of these
316 materials or that you have already sent this user a copy.
317
318 For an executable, the required form of the "work that uses the
319Library" must include any data and utility programs needed for
320reproducing the executable from it. However, as a special exception,
321the materials to be distributed need not include anything that is
322normally distributed (in either source or binary form) with the major
323components (compiler, kernel, and so on) of the operating system on
324which the executable runs, unless that component itself accompanies
325the executable.
326
327 It may happen that this requirement contradicts the license
328restrictions of other proprietary libraries that do not normally
329accompany the operating system. Such a contradiction means you cannot
330use both them and the Library together in an executable that you
331distribute.
332
333 7. You may place library facilities that are a work based on the
334Library side-by-side in a single library together with other library
335facilities not covered by this License, and distribute such a combined
336library, provided that the separate distribution of the work based on
337the Library and of the other library facilities is otherwise
338permitted, and provided that you do these two things:
339
340 a) Accompany the combined library with a copy of the same work
341 based on the Library, uncombined with any other library
342 facilities. This must be distributed under the terms of the
343 Sections above.
344
345 b) Give prominent notice with the combined library of the fact
346 that part of it is a work based on the Library, and explaining
347 where to find the accompanying uncombined form of the same work.
348
349 8. You may not copy, modify, sublicense, link with, or distribute
350the Library except as expressly provided under this License. Any
351attempt otherwise to copy, modify, sublicense, link with, or
352distribute the Library is void, and will automatically terminate your
353rights under this License. However, parties who have received copies,
354or rights, from you under this License will not have their licenses
355terminated so long as such parties remain in full compliance.
356
357 9. You are not required to accept this License, since you have not
358signed it. However, nothing else grants you permission to modify or
359distribute the Library or its derivative works. These actions are
360prohibited by law if you do not accept this License. Therefore, by
361modifying or distributing the Library (or any work based on the
362Library), you indicate your acceptance of this License to do so, and
363all its terms and conditions for copying, distributing or modifying
364the Library or works based on it.
365
366 10. Each time you redistribute the Library (or any work based on the
367Library), the recipient automatically receives a license from the
368original licensor to copy, distribute, link with or modify the Library
369subject to these terms and conditions. You may not impose any further
370restrictions on the recipients' exercise of the rights granted herein.
371You are not responsible for enforcing compliance by third parties with
372this License.
373
374 11. If, as a consequence of a court judgment or allegation of patent
375infringement or for any other reason (not limited to patent issues),
376conditions are imposed on you (whether by court order, agreement or
377otherwise) that contradict the conditions of this License, they do not
378excuse you from the conditions of this License. If you cannot
379distribute so as to satisfy simultaneously your obligations under this
380License and any other pertinent obligations, then as a consequence you
381may not distribute the Library at all. For example, if a patent
382license would not permit royalty-free redistribution of the Library by
383all those who receive copies directly or indirectly through you, then
384the only way you could satisfy both it and this License would be to
385refrain entirely from distribution of the Library.
386
387If any portion of this section is held invalid or unenforceable under any
388particular circumstance, the balance of the section is intended to apply,
389and the section as a whole is intended to apply in other circumstances.
390
391It is not the purpose of this section to induce you to infringe any
392patents or other property right claims or to contest validity of any
393such claims; this section has the sole purpose of protecting the
394integrity of the free software distribution system which is
395implemented by public license practices. Many people have made
396generous contributions to the wide range of software distributed
397through that system in reliance on consistent application of that
398system; it is up to the author/donor to decide if he or she is willing
399to distribute software through any other system and a licensee cannot
400impose that choice.
401
402This section is intended to make thoroughly clear what is believed to
403be a consequence of the rest of this License.
404
405 12. If the distribution and/or use of the Library is restricted in
406certain countries either by patents or by copyrighted interfaces, the
407original copyright holder who places the Library under this License may add
408an explicit geographical distribution limitation excluding those countries,
409so that distribution is permitted only in or among countries not thus
410excluded. In such case, this License incorporates the limitation as if
411written in the body of this License.
412
413 13. The Free Software Foundation may publish revised and/or new
414versions of the Lesser General Public License from time to time.
415Such new versions will be similar in spirit to the present version,
416but may differ in detail to address new problems or concerns.
417
418Each version is given a distinguishing version number. If the Library
419specifies a version number of this License which applies to it and
420"any later version", you have the option of following the terms and
421conditions either of that version or of any later version published by
422the Free Software Foundation. If the Library does not specify a
423license version number, you may choose any version ever published by
424the Free Software Foundation.
425
426 14. If you wish to incorporate parts of the Library into other free
427programs whose distribution conditions are incompatible with these,
428write to the author to ask for permission. For software which is
429copyrighted by the Free Software Foundation, write to the Free
430Software Foundation; we sometimes make exceptions for this. Our
431decision will be guided by the two goals of preserving the free status
432of all derivatives of our free software and of promoting the sharing
433and reuse of software generally.
434
435 NO WARRANTY
436
437 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
438WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
439EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
440OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
441KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
442IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
443PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
444LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
445THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
446
447 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
448WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
449AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
450FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
451CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
452LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
453RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
454FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
455SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
456DAMAGES.
457
458 END OF TERMS AND CONDITIONS
459
460 How to Apply These Terms to Your New Libraries
461
462 If you develop a new library, and you want it to be of the greatest
463possible use to the public, we recommend making it free software that
464everyone can redistribute and change. You can do so by permitting
465redistribution under these terms (or, alternatively, under the terms of the
466ordinary General Public License).
467
468 To apply these terms, attach the following notices to the library. It is
469safest to attach them to the start of each source file to most effectively
470convey the exclusion of warranty; and each file should have at least the
471"copyright" line and a pointer to where the full notice is found.
472
473 <one line to give the library's name and a brief idea of what it does.>
474 Copyright (C) <year> <name of author>
475
476 This library is free software; you can redistribute it and/or
477 modify it under the terms of the GNU Lesser General Public
478 License as published by the Free Software Foundation; either
479 version 2.1 of the License, or (at your option) any later version.
480
481 This library is distributed in the hope that it will be useful,
482 but WITHOUT ANY WARRANTY; without even the implied warranty of
483 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
484 Lesser General Public License for more details.
485
486 You should have received a copy of the GNU Lesser General Public
487 License along with this library; if not, write to the Free Software
488 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
489
490Also add information on how to contact you by electronic and paper mail.
491
492You should also get your employer (if you work as a programmer) or your
493school, if any, to sign a "copyright disclaimer" for the library, if
494necessary. Here is a sample; alter the names:
495
496 Yoyodyne, Inc., hereby disclaims all copyright interest in the
497 library `Frob' (a library for tweaking knobs) written by James Random Hacker.
498
499 <signature of Ty Coon>, 1 April 1990
500 Ty Coon, President of Vice
501
502That's all there is to it!
503
504
505
506
diff --git a/COPYRIGHT b/COPYRIGHT
new file mode 100644
index 00000000..1b60ef9e
--- /dev/null
+++ b/COPYRIGHT
@@ -0,0 +1,7 @@
1Copyright 2002, 2003 Luis Figueiredo. All rights reserved
2
3See the LICENSE file
4
5The origin of this software must not be misrepresented, either by
6explicit claim or by omission. Since few users ever read sources,
7credits must appear in the documentation.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 00000000..f0661cd6
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,245 @@
1Fri Aug 18 15:21:30 PDT 2006
2 Starting to adopt the code to the GNUnet build system.
3 Applied patch to allow for shutdown.
4
50.5.3
6 Wen Apr 28 14:52:43 GMT 2004
7 Luis Figueiredo -- Long time no see, i've decided to check one mail dated from released version 0.5.2, was about cookies
8 it seems that was no problem to me, but i made a minor changes anyway
9 void web_client_setcookie(char *name, char *value, char *timeoutf, char *path, char *domain, int secure)
10 path and domain, can be called as "" for disable, instead of previous only, NULL that disables the domain and path
11 Tue Jan 13 18:43:11 GMT 2004
12 Luis Figueiredo -- I've put a prefix in each internal function "__ILWS_"
13
14 Wen Oct 22 18:38:52 GMT 2003
15 Luis Figueiredo -- Applied some changes reported by (freebsd port): Hilobok Andrew (han@km.if.ua), added Last-Modified on lws_list(); improved file handling
16
17 Thu Sep 25 13:11:21 GMT 2003
18 Luis Figueiredo -- Minor change the ClientInfo->request also gives the '/' (for lws_list)
19
20 Wen Sep 24 23:02:51 GMT 2003
21 Luis Figueiredo -- Corrected some code (for portability) reported by Hilobok Andrew (han@km.if.ua)
220.5.2
23 Thu Sep 18 21:33:05 GMT 2003
24 Luis Figueiredo -- Changed function set_EGApalette to web_client_gifsetpalette("filename.act oe "EGA");, and web_client_outputgif to web_client_gifoutput
25 (sorry for usual users of web_client_gif* :P)
26
27 Sun Sep 14 22:29:02 GMT 2003
28 Luis Figueiredo -- new functions added (web_server_aliasdir, web_server_useMIMEfile, web_client_contenttype);
29
300.5.1
31 Wen Sep 10 17:56:14 GMT 2003
32 Luis Figueiredo -- Code clean up, new error system!
33
34 Sex Sep 05 19:12:14 GMT 2003
35 Luis Figueiredo -- improved the function tmpfname, added documentation to section security
36
37 Sex Sep 05 06:16:01 GMT 2003
38 Luis Figueiredo -- i have lie down late, lately :o), well add_oustream prototipe changed to handle flock (filelock)
39 to avoid race condition on temorary files, added the util funtion for winnt flock
40
41 -- changed way to log "stetic?"
42
43 -- calculate and outputs Content-rage and Content-length if the get handler has the WS_USELEN turned on
44
45 Wen Sep 03 05:57:11 GMT 2003
46 Luis Figueiredo -- one day after (almost literaly), corrected something in ClientInfo->Cookie(),
47 And an new feature to web_client_setcookie, this function can now be called after end of headers.
48
49 Tue Sep 02 05:28:11 GMT 2003
50 Luis Figueiredo -- oh my!, nice hour for coding, finished 206 (partial content) resuming (Content-range:)
51
52 Mon Sep 01 19:35:32 GMT 2003
53 Luis Figueiredo -- now output header : "Content-length:"
54
55 Mon Sep 01 06:22:21 GMT 2003
56 Luis Figueiredo -- read_client optimized for speed (select removed, non_block sockets only)
57
58 Sex Aug 29 16:07:15 GMT 2003
59 Luis Figueiredo -- Corrected a bug on output_client() (writetemp) if the lib doesn't output (EAGAIN) the function
60 was returning, and retry using local variable writetemp (reading new data), now fseeks to last data written
61
62 Fri Aug 22 15:20:31 GMT 2003
63 Luis Figueiredo -- removed engine.h from help server (read the source if you want to know how it works), some changes in web_server_getconf!
64
65 Thu Aug 15 16:59:04 GMT 2003
66 Luis Figueiredo -- New functions and flag, flag is WS_DYNVAR (handler), to use dynamic variables on data ouput
67 web_client_setvar, web_client_delvar , web_client_getvar, exchanges "$variable;" into 'variable' value
68 previous defined with web_client_setvar("variable","something");
69
700.5.0
71
72 Wen Jul 30 03:45:28 GMT 2003
73 Luis Figueiredo -- IE 5.0 was confusing me with no \r\n\r\n after post data, i solved the problem using content-length value
74 changed errno (on output_client) to WSAGetLastError() on windows (#ifdef WIN32)
75
76 Fri Jul 25 06:10:03 GMT 2003
77 Luis Figueiredo -- Work around outgif.c, to support transparency
78
79 Wen Jul 21 20:13:12 GMT 2003
80 Luis Figueiredo -- Added set_gifEGApalette(), and global var GLOBALGIFPAL for web_client_outputgif();
81
82 Tue Jul 15 15:31:10 GMT 2003
83 Luis Figueiredo -- Start develop the config file, added some new elements to struct server, Added a ClientInfo->Conf( to get entries from config file )
84
85 Thu Apr 10 14:11:31 GMT 2003
86 Luis Figueiredo -- Some changes on web_client_setcookie() made by Sven Anders <anders@anduras.de> applied
87
88 Thu Apr 10 14:11:34 GMT 2003
89 Luis Figueiredo -- Some bugfixes reported by (http://www.stanford.edu/~engler) Ken Ashcraft <kash@stanford.edu>
90
910.4.1
92
93 Thu Mar 20 14:35:23 GMT 2003
94 Luis Figueiredo -- Fuck war! :o), minor Changes in help server
95
96 Wen Mar 19 21:46:32 GMT 2003
97 Luis Figueiredo -- new features for checkbox (or multiple variables) ClientInfo->Query("#xpto") returns the number of references to xpto
98 ClientInfo->Query("xpto") gives one value and fetches to another; if "#xpto" is bigger than one, "xpto" called twice will be diferent
99
100 Fri Mar 07 11:29:12 GMT 2003
101 Luis Figueiredo -- Added the extern "C" {} to web_server.h
102
1030.4.0 // new features and fixes (new version)
104
105 Wen Feb 12 16:23:13 GMT 2003
106 Luis Figueiredo -- Added Cookie example, and Johannes E. Schindelin entered on project (officialy)
107
108 Mon Feb 09 17:24:45 GMT 2003
109 Luis Figueiredo -- web_client_setcookie(); done, Changed ClientInfo->Header(),Post(),Query(); when is called with
110 NULL argument, this function returns whole client header;
111 Added ClientInfo->Cookie();
112
113 Wen Feb 05 22:12:03 GMT 2003
114 Luis Figueiredo -- Start to develop web_client_setcookie();
115
116 Fri Jan 31 05:24:31 GMT 2003
117 Johannes E. Schindelin (patch) -- More spell checking (even in the code, heh!) client.h, client.c, examples.html functions.html info.html security.html
118 He also added an example (hello_world)
119 bugfix on clientinfo.c: post data and query data!
120 Sun Jan 26 21:22:34 GMT 2003
121 Luis Figueiredo -- Change the order of ChangeLog (this file) (was last version on Bottom)
122
123 Thu Jan 23 17:10:11 GMT 2003
124 Luis Figueiredo -- Patch from Johannes E. Schindelin, spell checking and make file portabilitie
125
1260.3.5
127
128 Mon Jan 20 01:43:45 GMT 2003
129 Luis Figueiredo -- Changed the return codes from web_server_run() (Rocco Carbone [rocco@tecsiel.it] ideia), and some minor fix's on socket.c
130
131 Sat Jan 18 18:31:23 GMT 2003
132 Luis Figueiredo -- Corrected a querystring parser error(thanks 'oddsock')
133
1340.3.4
135
136 Fri Dec 27 20:01:04 GMT 2002
137 Luis Figueiredo -- using closesocket (when deleting client) on WIN32, when client lost the connection the stat is (5) (5 delete client)
138
139 Thu Dec 26 23:16:21 GMT 2002
140 Luis Figueiredo -- (outstream.[ch]) Added an argument to add_outstream (char *fname); since the lib have a problem with atributing to stdout (*stdout=*nfile),
141 changed the tmpfile(), to 'tmpnam' (tmpfname) and use freopen; (unlinking fname when deleting outstreams)
1420.3.3
143
144 Wen Nov 27 18:16:34 GMT 2002
145 Luis Figueiredo -- Produces output files to projectroot/bin
146
147 Wen Nov 27 00:24:31 GMT 2002
148 Luis Figueiredo -- Built strncasecmp function (Win32 doesn't have) for using in strcasestr (MultiPart in clientinfo)
149
150 Mon Nov 25 16:16:23 GMT 2002
151 Luis Figueiredo -- Help html's converted into header files, help server, doesn't need external files now, help.html directory moved to project root
152
153 Fri Nov 22 17:45:34 GMT 2002
154 Luis Figueiredo -- Win32 project files and help server updated
155
156 Sat Nov 16 21:22:13 GMT 2002
157 Luis Figueiredo -- Example SoundRecorder w/ new features
158
159 Fri Nov 15 20:38:48 GMT 2002
160 Luis Figueiredo -- Mem checker added (case of low mem)
161
1620.3.2
163
164 Fri Nov 15 11:11:50 GMT 2002
165 Luis Figueiredo -- Added a new example (SoundRecorder)
166
167 Fri Nov 15 00:37:44 GMT 2002
168 Luis Figueiredo -- Created make install
169
170 Thu Nov 14 19:45:47 GMT 2002
171 Luis Figueiredo -- Changed client.c (now outputs 400 invalid request)
172
173 Wed Nov 13 23:39:46 GMT 2002
174 Luis Figueiredo -- added a feature, (web_client_outputgif) using xvgifwr.c (from xv 3.10a)
175 module is callod outgif.c
176
177 Wed Nov 13 04:27:12 GMT 2002
178 Luis Figueiredo -- Added a debug program (.pl) http butcher
179
180 Wed Nov 13 04:06:48 GMT 2002
181 Luis Figueiredo -- Fixed up a minor bug on client read data, make rule dist (to create package on makefile), removed Hdrdate to new mydate (using strftime)
182 discard hextoi to using strtol(str,NULL,16)
1830.3.1
184
185 Sun Nov 10 21:05:40 GMT 2002
186 Luis Figueiredo -- Code cleanup, removed useless functions, developing documentation
187
188 Sun Nov 10 12:08:02 GMT 2002
189 Luis Figueiredo -- Changed regex to fnmatch once again (regex was giving problems w/ portability, and fnmatch is easier to use for
190 newbies)
191
192
193 Thu Nov 7 20:05:48 GMT 2002
194 Luis Figueiredo -- create module (utils.c) for base64decode, hextoi, strcasestr, Add documentation to example
195
196
197 Wed Nov 6 16:12:22 GMT 2002
198 Luis Figueiredo -- Changed again way of determine that the client sent all data, it checks about 5 times if doesn't have new data,
199 then marks all data readed, ClientInfo upload files (MultiPart) done, wow, new logo,
200 supports (enctype='Multipart/form-data') (tested in lynx and netscape and IE)
201
202 Thu Oct 31 18:11:28 GMT 2002
203 Luis Figueiredo -- Optimized functions Post,Header,Query // now holds the already queryied into a list, when it requests again
204 lib doesn't process request gives the saved data: ex:
205 if(ClientInfo->Query("queryval")) { // query val doesn't exists in list add
206 blah=atoi(ClientInfo->Query("queryval")); // return previous saved val that's on the list
207 };
208 better for memory and speed optimizations
209
2100.3.0 and previous
211
212 Wed Oct 30 22:54:37 GMT 2002
213 Luis Figueiredo -- Changed way of determine that the client sent all data
214 before:
215 if there is no more data then search \r\n\r\n in the hole data readed // wrong, multipart/form-data was not doing right now
216 now:
217 if there is no more data then if the last two bytes is \r\n then mark all readed and process // i think that need improvments
218
219 Mon Oct 14 20:20:05 GMT 2002
220 Luis Figueiredo -- An example of a cgi handler was made, added the Date: header to server header
221
222 Mon Oct 7 16:56:15 GMT 2002
223 Luis Figueiredo -- Repaired some safe bugs, Added vars to stats proposes, inserted an liblogo, added debug instructions
224
225 Wed Apr 10 20:02:55 GMT 2002
226 Luis Figueiredo -- Make use of autoconf , removed open_memstream (doesn't work well w/ stdout structure on netbsd portability)
227 linux slack 7.1 uses "extern FILE *stdout", netbsd uses "extern FILE __sF[]" so i cannot make use of pointers
228
229 Mon Apr 8 15:04:31 GMT 2002
230 Luis Figueiredo -- Oh my.. kurt cobain is dead :o), restructured the code, separated into various files
231
232 Wed Mar 27 18:59:10 GMT 2002
233 Luis Figueiredo -- using regex instead of fnmatch(fnmatch only appears becouse of apache, i didn't knew it)
234
235 Mon Mar 25 14:46:13 GMT 2002
236 Luis Figueiredo -- wow, one month later..., discard web_server_addstr, and now process the stdout to server
237 using a tmpfile for streaming (not so good, but :o))
238
239 Mon Feb 25 06:27:58 GMT 2002
240 Luis Figueiredo -- Many corrections and new functions were added, until today
241
242 Fri Dec 28 12:51:11 GMT 2001
243 Luis Figueiredo -- I Corrected the input to handle only data when \n\r(twice) is arrived
244
245
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 00000000..54caf7c1
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,229 @@
1Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
2Foundation, Inc.
3
4 This file is free documentation; the Free Software Foundation gives
5unlimited permission to copy, distribute and modify it.
6
7Basic Installation
8==================
9
10 These are generic installation instructions.
11
12 The `configure' shell script attempts to guess correct values for
13various system-dependent variables used during compilation. It uses
14those values to create a `Makefile' in each directory of the package.
15It may also create one or more `.h' files containing system-dependent
16definitions. Finally, it creates a shell script `config.status' that
17you can run in the future to recreate the current configuration, and a
18file `config.log' containing compiler output (useful mainly for
19debugging `configure').
20
21 It can also use an optional file (typically called `config.cache'
22and enabled with `--cache-file=config.cache' or simply `-C') that saves
23the results of its tests to speed up reconfiguring. (Caching is
24disabled by default to prevent problems with accidental use of stale
25cache files.)
26
27 If you need to do unusual things to compile the package, please try
28to figure out how `configure' could check whether to do them, and mail
29diffs or instructions to the address given in the `README' so they can
30be considered for the next release. If you are using the cache, and at
31some point `config.cache' contains results you don't want to keep, you
32may remove or edit it.
33
34 The file `configure.ac' (or `configure.in') is used to create
35`configure' by a program called `autoconf'. You only need
36`configure.ac' if you want to change it or regenerate `configure' using
37a newer version of `autoconf'.
38
39The simplest way to compile this package is:
40
41 1. `cd' to the directory containing the package's source code and type
42 `./configure' to configure the package for your system. If you're
43 using `csh' on an old version of System V, you might need to type
44 `sh ./configure' instead to prevent `csh' from trying to execute
45 `configure' itself.
46
47 Running `configure' takes awhile. While running, it prints some
48 messages telling which features it is checking for.
49
50 2. Type `make' to compile the package.
51
52 3. Optionally, type `make check' to run any self-tests that come with
53 the package.
54
55 4. Type `make install' to install the programs and any data files and
56 documentation.
57
58 5. You can remove the program binaries and object files from the
59 source code directory by typing `make clean'. To also remove the
60 files that `configure' created (so you can compile the package for
61 a different kind of computer), type `make distclean'. There is
62 also a `make maintainer-clean' target, but that is intended mainly
63 for the package's developers. If you use it, you may have to get
64 all sorts of other programs in order to regenerate files that came
65 with the distribution.
66
67Compilers and Options
68=====================
69
70 Some systems require unusual options for compilation or linking that
71the `configure' script does not know about. Run `./configure --help'
72for details on some of the pertinent environment variables.
73
74 You can give `configure' initial values for configuration parameters
75by setting variables in the command line or in the environment. Here
76is an example:
77
78 ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
79
80 *Note Defining Variables::, for more details.
81
82Compiling For Multiple Architectures
83====================================
84
85 You can compile the package for more than one kind of computer at the
86same time, by placing the object files for each architecture in their
87own directory. To do this, you must use a version of `make' that
88supports the `VPATH' variable, such as GNU `make'. `cd' to the
89directory where you want the object files and executables to go and run
90the `configure' script. `configure' automatically checks for the
91source code in the directory that `configure' is in and in `..'.
92
93 If you have to use a `make' that does not support the `VPATH'
94variable, you have to compile the package for one architecture at a
95time in the source code directory. After you have installed the
96package for one architecture, use `make distclean' before reconfiguring
97for another architecture.
98
99Installation Names
100==================
101
102 By default, `make install' will install the package's files in
103`/usr/local/bin', `/usr/local/man', etc. You can specify an
104installation prefix other than `/usr/local' by giving `configure' the
105option `--prefix=PATH'.
106
107 You can specify separate installation prefixes for
108architecture-specific files and architecture-independent files. If you
109give `configure' the option `--exec-prefix=PATH', the package will use
110PATH as the prefix for installing programs and libraries.
111Documentation and other data files will still use the regular prefix.
112
113 In addition, if you use an unusual directory layout you can give
114options like `--bindir=PATH' to specify different values for particular
115kinds of files. Run `configure --help' for a list of the directories
116you can set and what kinds of files go in them.
117
118 If the package supports it, you can cause programs to be installed
119with an extra prefix or suffix on their names by giving `configure' the
120option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
121
122Optional Features
123=================
124
125 Some packages pay attention to `--enable-FEATURE' options to
126`configure', where FEATURE indicates an optional part of the package.
127They may also pay attention to `--with-PACKAGE' options, where PACKAGE
128is something like `gnu-as' or `x' (for the X Window System). The
129`README' should mention any `--enable-' and `--with-' options that the
130package recognizes.
131
132 For packages that use the X Window System, `configure' can usually
133find the X include and library files automatically, but if it doesn't,
134you can use the `configure' options `--x-includes=DIR' and
135`--x-libraries=DIR' to specify their locations.
136
137Specifying the System Type
138==========================
139
140 There may be some features `configure' cannot figure out
141automatically, but needs to determine by the type of machine the package
142will run on. Usually, assuming the package is built to be run on the
143_same_ architectures, `configure' can figure that out, but if it prints
144a message saying it cannot guess the machine type, give it the
145`--build=TYPE' option. TYPE can either be a short name for the system
146type, such as `sun4', or a canonical name which has the form:
147
148 CPU-COMPANY-SYSTEM
149
150where SYSTEM can have one of these forms:
151
152 OS KERNEL-OS
153
154 See the file `config.sub' for the possible values of each field. If
155`config.sub' isn't included in this package, then this package doesn't
156need to know the machine type.
157
158 If you are _building_ compiler tools for cross-compiling, you should
159use the `--target=TYPE' option to select the type of system they will
160produce code for.
161
162 If you want to _use_ a cross compiler, that generates code for a
163platform different from the build platform, you should specify the
164"host" platform (i.e., that on which the generated programs will
165eventually be run) with `--host=TYPE'.
166
167Sharing Defaults
168================
169
170 If you want to set default values for `configure' scripts to share,
171you can create a site shell script called `config.site' that gives
172default values for variables like `CC', `cache_file', and `prefix'.
173`configure' looks for `PREFIX/share/config.site' if it exists, then
174`PREFIX/etc/config.site' if it exists. Or, you can set the
175`CONFIG_SITE' environment variable to the location of the site script.
176A warning: not all `configure' scripts look for a site script.
177
178Defining Variables
179==================
180
181 Variables not defined in a site shell script can be set in the
182environment passed to `configure'. However, some packages may run
183configure again during the build, and the customized values of these
184variables may be lost. In order to avoid this problem, you should set
185them in the `configure' command line, using `VAR=value'. For example:
186
187 ./configure CC=/usr/local2/bin/gcc
188
189will cause the specified gcc to be used as the C compiler (unless it is
190overridden in the site shell script).
191
192`configure' Invocation
193======================
194
195 `configure' recognizes the following options to control how it
196operates.
197
198`--help'
199`-h'
200 Print a summary of the options to `configure', and exit.
201
202`--version'
203`-V'
204 Print the version of Autoconf used to generate the `configure'
205 script, and exit.
206
207`--cache-file=FILE'
208 Enable the cache: use and save the results of the tests in FILE,
209 traditionally `config.cache'. FILE defaults to `/dev/null' to
210 disable caching.
211
212`--config-cache'
213`-C'
214 Alias for `--cache-file=config.cache'.
215
216`--quiet'
217`--silent'
218`-q'
219 Do not print messages saying which checks are being made. To
220 suppress all normal output, redirect it to `/dev/null' (any error
221 messages will still be shown).
222
223`--srcdir=DIR'
224 Look for the package's source code in directory DIR. Usually
225 `configure' can determine that directory automatically.
226
227`configure' also accepts some other, not widely useful, options. Run
228`configure --help' for more details.
229
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 00000000..3f11093b
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,3 @@
1SUBDIRS = include src
2
3
diff --git a/NEWS b/NEWS
new file mode 100644
index 00000000..898a3dab
--- /dev/null
+++ b/NEWS
@@ -0,0 +1 @@
See ChangeLog.
diff --git a/README b/README
new file mode 100644
index 00000000..dda765bc
--- /dev/null
+++ b/README
@@ -0,0 +1,7 @@
1This is an adaptation of libwebserver for GNUnet.
2
3Non-essential code from old libwebserver library
4was moved to contrib/, documentation was moved
5to doc/.
6
7The build system was changed to use automake.
diff --git a/TODO b/TODO
new file mode 100644
index 00000000..062c6b10
--- /dev/null
+++ b/TODO
@@ -0,0 +1,51 @@
1
2
3
4
5
6
7try to make just makefile for win instead of project file
8
9check for integer overflow
10do a webserver stresser
11
12
13
14
15CORRECT: netbsd dont free's the memory (linux's free) // i don't know why!
16
17
18DONE: WS_USECONF is completed just make test and turn it better
19DONE: WS_DYNVAR ( for using web_client_setvar("color","#FFFFFF")), printf("<BODY bgcolor='$color;>"); ) usefull for web_client_addfile();) <- DONE
20DONE: there is some mem buffer that is not freeing on logfile example something related to web_client_addfile (corrected)
21DONE: upload is missing somethind debug ok, but release is crashing (was related to writetemp[WRITEMAX+1])
22DONE: faster way to upload and download! remove newdata ( is delaying operation)
23DONE: content-range header (for resuming)
24DONE: logging (put it on process_client)
25DONE: Find a better way to manage "tmpfname" (using flocks)
26DONE: make web_client_setcookie works called in whatever where in the handle function, (keep on an database maybe as varlist);
27DONE: remove wrotesize and varsize from client to outstream
28DONE: The war beguns, and i'm coding :o), reduce error mensaging to one file (reduce static mem space);
29DONE: similar: maybe make the web_server_MIMEfile(server,"const char *");, to next do the web_server_adddir(server,"/home/users/www",WS_LISTING);
30
31MAYBE DONE: Well something wrong about downloading several imgs, sometimes apears the 'X' image! figure why (requires intensive tests)
32DONE: lib isn't close files well, probably is that becouse the Ximage
33DONE: do the freebsd port by Hilobok Andrew (han@km.if.ua)
34DONE: URGENT: Change names of internal functions, we don't want conflits with other ppl functions (such as already defined symbols)
35
36
37TODO: The flag WS_USECGI, act as a cgi using env instead ClientInfo
38TODO: better to do is web_server_addcgi("* /*",execfile.exe,0);
39
40
41TODO: make the web_client_addurl function (web_client_addurl("http://127.0.0.1"); as web_client_addfile("path/to/file");)
42TODO: WS_USEMOD (modulated system to use) /(maybe need WS_USECONF, for describe modules)
43
44
45IMPROVE: Find a way to manage dll (stdout,stdin,etc)
46IMPROVE: WS_DYNVAR
47
48
49
50
51
diff --git a/config.guess b/config.guess
new file mode 100755
index 00000000..396482d6
--- /dev/null
+++ b/config.guess
@@ -0,0 +1,1500 @@
1#! /bin/sh
2# Attempt to guess a canonical system name.
3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
5# Inc.
6
7timestamp='2006-07-02'
8
9# This file is free software; you can redistribute it and/or modify it
10# under the terms of the GNU General Public License as published by
11# the Free Software Foundation; either version 2 of the License, or
12# (at your option) any later version.
13#
14# This program is distributed in the hope that it will be useful, but
15# WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17# General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with this program; if not, write to the Free Software
21# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
22# 02110-1301, USA.
23#
24# As a special exception to the GNU General Public License, if you
25# distribute this file as part of a program that contains a
26# configuration script generated by Autoconf, you may include it under
27# the same distribution terms that you use for the rest of that program.
28
29
30# Originally written by Per Bothner <per@bothner.com>.
31# Please send patches to <config-patches@gnu.org>. Submit a context
32# diff and a properly formatted ChangeLog entry.
33#
34# This script attempts to guess a canonical system name similar to
35# config.sub. If it succeeds, it prints the system name on stdout, and
36# exits with 0. Otherwise, it exits with 1.
37#
38# The plan is that this can be called by configure scripts if you
39# don't specify an explicit build system type.
40
41me=`echo "$0" | sed -e 's,.*/,,'`
42
43usage="\
44Usage: $0 [OPTION]
45
46Output the configuration name of the system \`$me' is run on.
47
48Operation modes:
49 -h, --help print this help, then exit
50 -t, --time-stamp print date of last modification, then exit
51 -v, --version print version number, then exit
52
53Report bugs and patches to <config-patches@gnu.org>."
54
55version="\
56GNU config.guess ($timestamp)
57
58Originally written by Per Bothner.
59Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
60Free Software Foundation, Inc.
61
62This is free software; see the source for copying conditions. There is NO
63warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
64
65help="
66Try \`$me --help' for more information."
67
68# Parse command line
69while test $# -gt 0 ; do
70 case $1 in
71 --time-stamp | --time* | -t )
72 echo "$timestamp" ; exit ;;
73 --version | -v )
74 echo "$version" ; exit ;;
75 --help | --h* | -h )
76 echo "$usage"; exit ;;
77 -- ) # Stop option processing
78 shift; break ;;
79 - ) # Use stdin as input.
80 break ;;
81 -* )
82 echo "$me: invalid option $1$help" >&2
83 exit 1 ;;
84 * )
85 break ;;
86 esac
87done
88
89if test $# != 0; then
90 echo "$me: too many arguments$help" >&2
91 exit 1
92fi
93
94trap 'exit 1' 1 2 15
95
96# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
97# compiler to aid in system detection is discouraged as it requires
98# temporary files to be created and, as you can see below, it is a
99# headache to deal with in a portable fashion.
100
101# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
102# use `HOST_CC' if defined, but it is deprecated.
103
104# Portable tmp directory creation inspired by the Autoconf team.
105
106set_cc_for_build='
107trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
108trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
109: ${TMPDIR=/tmp} ;
110 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
111 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
112 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
113 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
114dummy=$tmp/dummy ;
115tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
116case $CC_FOR_BUILD,$HOST_CC,$CC in
117 ,,) echo "int x;" > $dummy.c ;
118 for c in cc gcc c89 c99 ; do
119 if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
120 CC_FOR_BUILD="$c"; break ;
121 fi ;
122 done ;
123 if test x"$CC_FOR_BUILD" = x ; then
124 CC_FOR_BUILD=no_compiler_found ;
125 fi
126 ;;
127 ,,*) CC_FOR_BUILD=$CC ;;
128 ,*,*) CC_FOR_BUILD=$HOST_CC ;;
129esac ; set_cc_for_build= ;'
130
131# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
132# (ghazi@noc.rutgers.edu 1994-08-24)
133if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
134 PATH=$PATH:/.attbin ; export PATH
135fi
136
137UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
138UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
139UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
140UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
141
142# Note: order is significant - the case branches are not exclusive.
143
144case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
145 *:NetBSD:*:*)
146 # NetBSD (nbsd) targets should (where applicable) match one or
147 # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
148 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
149 # switched to ELF, *-*-netbsd* would select the old
150 # object file format. This provides both forward
151 # compatibility and a consistent mechanism for selecting the
152 # object file format.
153 #
154 # Note: NetBSD doesn't particularly care about the vendor
155 # portion of the name. We always set it to "unknown".
156 sysctl="sysctl -n hw.machine_arch"
157 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
158 /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
159 case "${UNAME_MACHINE_ARCH}" in
160 armeb) machine=armeb-unknown ;;
161 arm*) machine=arm-unknown ;;
162 sh3el) machine=shl-unknown ;;
163 sh3eb) machine=sh-unknown ;;
164 *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
165 esac
166 # The Operating System including object format, if it has switched
167 # to ELF recently, or will in the future.
168 case "${UNAME_MACHINE_ARCH}" in
169 arm*|i386|m68k|ns32k|sh3*|sparc|vax)
170 eval $set_cc_for_build
171 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
172 | grep __ELF__ >/dev/null
173 then
174 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
175 # Return netbsd for either. FIX?
176 os=netbsd
177 else
178 os=netbsdelf
179 fi
180 ;;
181 *)
182 os=netbsd
183 ;;
184 esac
185 # The OS release
186 # Debian GNU/NetBSD machines have a different userland, and
187 # thus, need a distinct triplet. However, they do not need
188 # kernel version information, so it can be replaced with a
189 # suitable tag, in the style of linux-gnu.
190 case "${UNAME_VERSION}" in
191 Debian*)
192 release='-gnu'
193 ;;
194 *)
195 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
196 ;;
197 esac
198 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
199 # contains redundant information, the shorter form:
200 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
201 echo "${machine}-${os}${release}"
202 exit ;;
203 *:OpenBSD:*:*)
204 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
205 echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
206 exit ;;
207 *:ekkoBSD:*:*)
208 echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
209 exit ;;
210 *:SolidBSD:*:*)
211 echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
212 exit ;;
213 macppc:MirBSD:*:*)
214 echo powerpc-unknown-mirbsd${UNAME_RELEASE}
215 exit ;;
216 *:MirBSD:*:*)
217 echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
218 exit ;;
219 alpha:OSF1:*:*)
220 case $UNAME_RELEASE in
221 *4.0)
222 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
223 ;;
224 *5.*)
225 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
226 ;;
227 esac
228 # According to Compaq, /usr/sbin/psrinfo has been available on
229 # OSF/1 and Tru64 systems produced since 1995. I hope that
230 # covers most systems running today. This code pipes the CPU
231 # types through head -n 1, so we only detect the type of CPU 0.
232 ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
233 case "$ALPHA_CPU_TYPE" in
234 "EV4 (21064)")
235 UNAME_MACHINE="alpha" ;;
236 "EV4.5 (21064)")
237 UNAME_MACHINE="alpha" ;;
238 "LCA4 (21066/21068)")
239 UNAME_MACHINE="alpha" ;;
240 "EV5 (21164)")
241 UNAME_MACHINE="alphaev5" ;;
242 "EV5.6 (21164A)")
243 UNAME_MACHINE="alphaev56" ;;
244 "EV5.6 (21164PC)")
245 UNAME_MACHINE="alphapca56" ;;
246 "EV5.7 (21164PC)")
247 UNAME_MACHINE="alphapca57" ;;
248 "EV6 (21264)")
249 UNAME_MACHINE="alphaev6" ;;
250 "EV6.7 (21264A)")
251 UNAME_MACHINE="alphaev67" ;;
252 "EV6.8CB (21264C)")
253 UNAME_MACHINE="alphaev68" ;;
254 "EV6.8AL (21264B)")
255 UNAME_MACHINE="alphaev68" ;;
256 "EV6.8CX (21264D)")
257 UNAME_MACHINE="alphaev68" ;;
258 "EV6.9A (21264/EV69A)")
259 UNAME_MACHINE="alphaev69" ;;
260 "EV7 (21364)")
261 UNAME_MACHINE="alphaev7" ;;
262 "EV7.9 (21364A)")
263 UNAME_MACHINE="alphaev79" ;;
264 esac
265 # A Pn.n version is a patched version.
266 # A Vn.n version is a released version.
267 # A Tn.n version is a released field test version.
268 # A Xn.n version is an unreleased experimental baselevel.
269 # 1.2 uses "1.2" for uname -r.
270 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
271 exit ;;
272 Alpha\ *:Windows_NT*:*)
273 # How do we know it's Interix rather than the generic POSIX subsystem?
274 # Should we change UNAME_MACHINE based on the output of uname instead
275 # of the specific Alpha model?
276 echo alpha-pc-interix
277 exit ;;
278 21064:Windows_NT:50:3)
279 echo alpha-dec-winnt3.5
280 exit ;;
281 Amiga*:UNIX_System_V:4.0:*)
282 echo m68k-unknown-sysv4
283 exit ;;
284 *:[Aa]miga[Oo][Ss]:*:*)
285 echo ${UNAME_MACHINE}-unknown-amigaos
286 exit ;;
287 *:[Mm]orph[Oo][Ss]:*:*)
288 echo ${UNAME_MACHINE}-unknown-morphos
289 exit ;;
290 *:OS/390:*:*)
291 echo i370-ibm-openedition
292 exit ;;
293 *:z/VM:*:*)
294 echo s390-ibm-zvmoe
295 exit ;;
296 *:OS400:*:*)
297 echo powerpc-ibm-os400
298 exit ;;
299 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
300 echo arm-acorn-riscix${UNAME_RELEASE}
301 exit ;;
302 arm:riscos:*:*|arm:RISCOS:*:*)
303 echo arm-unknown-riscos
304 exit ;;
305 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
306 echo hppa1.1-hitachi-hiuxmpp
307 exit ;;
308 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
309 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
310 if test "`(/bin/universe) 2>/dev/null`" = att ; then
311 echo pyramid-pyramid-sysv3
312 else
313 echo pyramid-pyramid-bsd
314 fi
315 exit ;;
316 NILE*:*:*:dcosx)
317 echo pyramid-pyramid-svr4
318 exit ;;
319 DRS?6000:unix:4.0:6*)
320 echo sparc-icl-nx6
321 exit ;;
322 DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
323 case `/usr/bin/uname -p` in
324 sparc) echo sparc-icl-nx7; exit ;;
325 esac ;;
326 sun4H:SunOS:5.*:*)
327 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
328 exit ;;
329 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
330 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
331 exit ;;
332 i86pc:SunOS:5.*:*)
333 echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
334 exit ;;
335 sun4*:SunOS:6*:*)
336 # According to config.sub, this is the proper way to canonicalize
337 # SunOS6. Hard to guess exactly what SunOS6 will be like, but
338 # it's likely to be more like Solaris than SunOS4.
339 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
340 exit ;;
341 sun4*:SunOS:*:*)
342 case "`/usr/bin/arch -k`" in
343 Series*|S4*)
344 UNAME_RELEASE=`uname -v`
345 ;;
346 esac
347 # Japanese Language versions have a version number like `4.1.3-JL'.
348 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
349 exit ;;
350 sun3*:SunOS:*:*)
351 echo m68k-sun-sunos${UNAME_RELEASE}
352 exit ;;
353 sun*:*:4.2BSD:*)
354 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
355 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
356 case "`/bin/arch`" in
357 sun3)
358 echo m68k-sun-sunos${UNAME_RELEASE}
359 ;;
360 sun4)
361 echo sparc-sun-sunos${UNAME_RELEASE}
362 ;;
363 esac
364 exit ;;
365 aushp:SunOS:*:*)
366 echo sparc-auspex-sunos${UNAME_RELEASE}
367 exit ;;
368 # The situation for MiNT is a little confusing. The machine name
369 # can be virtually everything (everything which is not
370 # "atarist" or "atariste" at least should have a processor
371 # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
372 # to the lowercase version "mint" (or "freemint"). Finally
373 # the system name "TOS" denotes a system which is actually not
374 # MiNT. But MiNT is downward compatible to TOS, so this should
375 # be no problem.
376 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
377 echo m68k-atari-mint${UNAME_RELEASE}
378 exit ;;
379 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
380 echo m68k-atari-mint${UNAME_RELEASE}
381 exit ;;
382 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
383 echo m68k-atari-mint${UNAME_RELEASE}
384 exit ;;
385 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
386 echo m68k-milan-mint${UNAME_RELEASE}
387 exit ;;
388 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
389 echo m68k-hades-mint${UNAME_RELEASE}
390 exit ;;
391 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
392 echo m68k-unknown-mint${UNAME_RELEASE}
393 exit ;;
394 m68k:machten:*:*)
395 echo m68k-apple-machten${UNAME_RELEASE}
396 exit ;;
397 powerpc:machten:*:*)
398 echo powerpc-apple-machten${UNAME_RELEASE}
399 exit ;;
400 RISC*:Mach:*:*)
401 echo mips-dec-mach_bsd4.3
402 exit ;;
403 RISC*:ULTRIX:*:*)
404 echo mips-dec-ultrix${UNAME_RELEASE}
405 exit ;;
406 VAX*:ULTRIX*:*:*)
407 echo vax-dec-ultrix${UNAME_RELEASE}
408 exit ;;
409 2020:CLIX:*:* | 2430:CLIX:*:*)
410 echo clipper-intergraph-clix${UNAME_RELEASE}
411 exit ;;
412 mips:*:*:UMIPS | mips:*:*:RISCos)
413 eval $set_cc_for_build
414 sed 's/^ //' << EOF >$dummy.c
415#ifdef __cplusplus
416#include <stdio.h> /* for printf() prototype */
417 int main (int argc, char *argv[]) {
418#else
419 int main (argc, argv) int argc; char *argv[]; {
420#endif
421 #if defined (host_mips) && defined (MIPSEB)
422 #if defined (SYSTYPE_SYSV)
423 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
424 #endif
425 #if defined (SYSTYPE_SVR4)
426 printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
427 #endif
428 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
429 printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
430 #endif
431 #endif
432 exit (-1);
433 }
434EOF
435 $CC_FOR_BUILD -o $dummy $dummy.c &&
436 dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
437 SYSTEM_NAME=`$dummy $dummyarg` &&
438 { echo "$SYSTEM_NAME"; exit; }
439 echo mips-mips-riscos${UNAME_RELEASE}
440 exit ;;
441 Motorola:PowerMAX_OS:*:*)
442 echo powerpc-motorola-powermax
443 exit ;;
444 Motorola:*:4.3:PL8-*)
445 echo powerpc-harris-powermax
446 exit ;;
447 Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
448 echo powerpc-harris-powermax
449 exit ;;
450 Night_Hawk:Power_UNIX:*:*)
451 echo powerpc-harris-powerunix
452 exit ;;
453 m88k:CX/UX:7*:*)
454 echo m88k-harris-cxux7
455 exit ;;
456 m88k:*:4*:R4*)
457 echo m88k-motorola-sysv4
458 exit ;;
459 m88k:*:3*:R3*)
460 echo m88k-motorola-sysv3
461 exit ;;
462 AViiON:dgux:*:*)
463 # DG/UX returns AViiON for all architectures
464 UNAME_PROCESSOR=`/usr/bin/uname -p`
465 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
466 then
467 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
468 [ ${TARGET_BINARY_INTERFACE}x = x ]
469 then
470 echo m88k-dg-dgux${UNAME_RELEASE}
471 else
472 echo m88k-dg-dguxbcs${UNAME_RELEASE}
473 fi
474 else
475 echo i586-dg-dgux${UNAME_RELEASE}
476 fi
477 exit ;;
478 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
479 echo m88k-dolphin-sysv3
480 exit ;;
481 M88*:*:R3*:*)
482 # Delta 88k system running SVR3
483 echo m88k-motorola-sysv3
484 exit ;;
485 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
486 echo m88k-tektronix-sysv3
487 exit ;;
488 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
489 echo m68k-tektronix-bsd
490 exit ;;
491 *:IRIX*:*:*)
492 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
493 exit ;;
494 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
495 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
496 exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
497 i*86:AIX:*:*)
498 echo i386-ibm-aix
499 exit ;;
500 ia64:AIX:*:*)
501 if [ -x /usr/bin/oslevel ] ; then
502 IBM_REV=`/usr/bin/oslevel`
503 else
504 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
505 fi
506 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
507 exit ;;
508 *:AIX:2:3)
509 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
510 eval $set_cc_for_build
511 sed 's/^ //' << EOF >$dummy.c
512 #include <sys/systemcfg.h>
513
514 main()
515 {
516 if (!__power_pc())
517 exit(1);
518 puts("powerpc-ibm-aix3.2.5");
519 exit(0);
520 }
521EOF
522 if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
523 then
524 echo "$SYSTEM_NAME"
525 else
526 echo rs6000-ibm-aix3.2.5
527 fi
528 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
529 echo rs6000-ibm-aix3.2.4
530 else
531 echo rs6000-ibm-aix3.2
532 fi
533 exit ;;
534 *:AIX:*:[45])
535 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
536 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
537 IBM_ARCH=rs6000
538 else
539 IBM_ARCH=powerpc
540 fi
541 if [ -x /usr/bin/oslevel ] ; then
542 IBM_REV=`/usr/bin/oslevel`
543 else
544 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
545 fi
546 echo ${IBM_ARCH}-ibm-aix${IBM_REV}
547 exit ;;
548 *:AIX:*:*)
549 echo rs6000-ibm-aix
550 exit ;;
551 ibmrt:4.4BSD:*|romp-ibm:BSD:*)
552 echo romp-ibm-bsd4.4
553 exit ;;
554 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
555 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
556 exit ;; # report: romp-ibm BSD 4.3
557 *:BOSX:*:*)
558 echo rs6000-bull-bosx
559 exit ;;
560 DPX/2?00:B.O.S.:*:*)
561 echo m68k-bull-sysv3
562 exit ;;
563 9000/[34]??:4.3bsd:1.*:*)
564 echo m68k-hp-bsd
565 exit ;;
566 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
567 echo m68k-hp-bsd4.4
568 exit ;;
569 9000/[34678]??:HP-UX:*:*)
570 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
571 case "${UNAME_MACHINE}" in
572 9000/31? ) HP_ARCH=m68000 ;;
573 9000/[34]?? ) HP_ARCH=m68k ;;
574 9000/[678][0-9][0-9])
575 if [ -x /usr/bin/getconf ]; then
576 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
577 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
578 case "${sc_cpu_version}" in
579 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
580 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
581 532) # CPU_PA_RISC2_0
582 case "${sc_kernel_bits}" in
583 32) HP_ARCH="hppa2.0n" ;;
584 64) HP_ARCH="hppa2.0w" ;;
585 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
586 esac ;;
587 esac
588 fi
589 if [ "${HP_ARCH}" = "" ]; then
590 eval $set_cc_for_build
591 sed 's/^ //' << EOF >$dummy.c
592
593 #define _HPUX_SOURCE
594 #include <stdlib.h>
595 #include <unistd.h>
596
597 int main ()
598 {
599 #if defined(_SC_KERNEL_BITS)
600 long bits = sysconf(_SC_KERNEL_BITS);
601 #endif
602 long cpu = sysconf (_SC_CPU_VERSION);
603
604 switch (cpu)
605 {
606 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
607 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
608 case CPU_PA_RISC2_0:
609 #if defined(_SC_KERNEL_BITS)
610 switch (bits)
611 {
612 case 64: puts ("hppa2.0w"); break;
613 case 32: puts ("hppa2.0n"); break;
614 default: puts ("hppa2.0"); break;
615 } break;
616 #else /* !defined(_SC_KERNEL_BITS) */
617 puts ("hppa2.0"); break;
618 #endif
619 default: puts ("hppa1.0"); break;
620 }
621 exit (0);
622 }
623EOF
624 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
625 test -z "$HP_ARCH" && HP_ARCH=hppa
626 fi ;;
627 esac
628 if [ ${HP_ARCH} = "hppa2.0w" ]
629 then
630 eval $set_cc_for_build
631
632 # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
633 # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
634 # generating 64-bit code. GNU and HP use different nomenclature:
635 #
636 # $ CC_FOR_BUILD=cc ./config.guess
637 # => hppa2.0w-hp-hpux11.23
638 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
639 # => hppa64-hp-hpux11.23
640
641 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
642 grep __LP64__ >/dev/null
643 then
644 HP_ARCH="hppa2.0w"
645 else
646 HP_ARCH="hppa64"
647 fi
648 fi
649 echo ${HP_ARCH}-hp-hpux${HPUX_REV}
650 exit ;;
651 ia64:HP-UX:*:*)
652 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
653 echo ia64-hp-hpux${HPUX_REV}
654 exit ;;
655 3050*:HI-UX:*:*)
656 eval $set_cc_for_build
657 sed 's/^ //' << EOF >$dummy.c
658 #include <unistd.h>
659 int
660 main ()
661 {
662 long cpu = sysconf (_SC_CPU_VERSION);
663 /* The order matters, because CPU_IS_HP_MC68K erroneously returns
664 true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
665 results, however. */
666 if (CPU_IS_PA_RISC (cpu))
667 {
668 switch (cpu)
669 {
670 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
671 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
672 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
673 default: puts ("hppa-hitachi-hiuxwe2"); break;
674 }
675 }
676 else if (CPU_IS_HP_MC68K (cpu))
677 puts ("m68k-hitachi-hiuxwe2");
678 else puts ("unknown-hitachi-hiuxwe2");
679 exit (0);
680 }
681EOF
682 $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
683 { echo "$SYSTEM_NAME"; exit; }
684 echo unknown-hitachi-hiuxwe2
685 exit ;;
686 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
687 echo hppa1.1-hp-bsd
688 exit ;;
689 9000/8??:4.3bsd:*:*)
690 echo hppa1.0-hp-bsd
691 exit ;;
692 *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
693 echo hppa1.0-hp-mpeix
694 exit ;;
695 hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
696 echo hppa1.1-hp-osf
697 exit ;;
698 hp8??:OSF1:*:*)
699 echo hppa1.0-hp-osf
700 exit ;;
701 i*86:OSF1:*:*)
702 if [ -x /usr/sbin/sysversion ] ; then
703 echo ${UNAME_MACHINE}-unknown-osf1mk
704 else
705 echo ${UNAME_MACHINE}-unknown-osf1
706 fi
707 exit ;;
708 parisc*:Lites*:*:*)
709 echo hppa1.1-hp-lites
710 exit ;;
711 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
712 echo c1-convex-bsd
713 exit ;;
714 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
715 if getsysinfo -f scalar_acc
716 then echo c32-convex-bsd
717 else echo c2-convex-bsd
718 fi
719 exit ;;
720 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
721 echo c34-convex-bsd
722 exit ;;
723 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
724 echo c38-convex-bsd
725 exit ;;
726 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
727 echo c4-convex-bsd
728 exit ;;
729 CRAY*Y-MP:*:*:*)
730 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
731 exit ;;
732 CRAY*[A-Z]90:*:*:*)
733 echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
734 | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
735 -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
736 -e 's/\.[^.]*$/.X/'
737 exit ;;
738 CRAY*TS:*:*:*)
739 echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
740 exit ;;
741 CRAY*T3E:*:*:*)
742 echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
743 exit ;;
744 CRAY*SV1:*:*:*)
745 echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
746 exit ;;
747 *:UNICOS/mp:*:*)
748 echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
749 exit ;;
750 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
751 FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
752 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
753 FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
754 echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
755 exit ;;
756 5000:UNIX_System_V:4.*:*)
757 FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
758 FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
759 echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
760 exit ;;
761 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
762 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
763 exit ;;
764 sparc*:BSD/OS:*:*)
765 echo sparc-unknown-bsdi${UNAME_RELEASE}
766 exit ;;
767 *:BSD/OS:*:*)
768 echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
769 exit ;;
770 *:FreeBSD:*:*)
771 case ${UNAME_MACHINE} in
772 pc98)
773 echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
774 amd64)
775 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
776 *)
777 echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
778 esac
779 exit ;;
780 i*:CYGWIN*:*)
781 echo ${UNAME_MACHINE}-pc-cygwin
782 exit ;;
783 i*:MINGW*:*)
784 echo ${UNAME_MACHINE}-pc-mingw32
785 exit ;;
786 i*:windows32*:*)
787 # uname -m includes "-pc" on this system.
788 echo ${UNAME_MACHINE}-mingw32
789 exit ;;
790 i*:PW*:*)
791 echo ${UNAME_MACHINE}-pc-pw32
792 exit ;;
793 x86:Interix*:[3456]*)
794 echo i586-pc-interix${UNAME_RELEASE}
795 exit ;;
796 EM64T:Interix*:[3456]*)
797 echo x86_64-unknown-interix${UNAME_RELEASE}
798 exit ;;
799 [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
800 echo i${UNAME_MACHINE}-pc-mks
801 exit ;;
802 i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
803 # How do we know it's Interix rather than the generic POSIX subsystem?
804 # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
805 # UNAME_MACHINE based on the output of uname instead of i386?
806 echo i586-pc-interix
807 exit ;;
808 i*:UWIN*:*)
809 echo ${UNAME_MACHINE}-pc-uwin
810 exit ;;
811 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
812 echo x86_64-unknown-cygwin
813 exit ;;
814 p*:CYGWIN*:*)
815 echo powerpcle-unknown-cygwin
816 exit ;;
817 prep*:SunOS:5.*:*)
818 echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
819 exit ;;
820 *:GNU:*:*)
821 # the GNU system
822 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
823 exit ;;
824 *:GNU/*:*:*)
825 # other systems with GNU libc and userland
826 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
827 exit ;;
828 i*86:Minix:*:*)
829 echo ${UNAME_MACHINE}-pc-minix
830 exit ;;
831 arm*:Linux:*:*)
832 echo ${UNAME_MACHINE}-unknown-linux-gnu
833 exit ;;
834 avr32*:Linux:*:*)
835 echo ${UNAME_MACHINE}-unknown-linux-gnu
836 exit ;;
837 cris:Linux:*:*)
838 echo cris-axis-linux-gnu
839 exit ;;
840 crisv32:Linux:*:*)
841 echo crisv32-axis-linux-gnu
842 exit ;;
843 frv:Linux:*:*)
844 echo frv-unknown-linux-gnu
845 exit ;;
846 ia64:Linux:*:*)
847 echo ${UNAME_MACHINE}-unknown-linux-gnu
848 exit ;;
849 m32r*:Linux:*:*)
850 echo ${UNAME_MACHINE}-unknown-linux-gnu
851 exit ;;
852 m68*:Linux:*:*)
853 echo ${UNAME_MACHINE}-unknown-linux-gnu
854 exit ;;
855 mips:Linux:*:*)
856 eval $set_cc_for_build
857 sed 's/^ //' << EOF >$dummy.c
858 #undef CPU
859 #undef mips
860 #undef mipsel
861 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
862 CPU=mipsel
863 #else
864 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
865 CPU=mips
866 #else
867 CPU=
868 #endif
869 #endif
870EOF
871 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
872 /^CPU/{
873 s: ::g
874 p
875 }'`"
876 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
877 ;;
878 mips64:Linux:*:*)
879 eval $set_cc_for_build
880 sed 's/^ //' << EOF >$dummy.c
881 #undef CPU
882 #undef mips64
883 #undef mips64el
884 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
885 CPU=mips64el
886 #else
887 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
888 CPU=mips64
889 #else
890 CPU=
891 #endif
892 #endif
893EOF
894 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
895 /^CPU/{
896 s: ::g
897 p
898 }'`"
899 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
900 ;;
901 or32:Linux:*:*)
902 echo or32-unknown-linux-gnu
903 exit ;;
904 ppc:Linux:*:*)
905 echo powerpc-unknown-linux-gnu
906 exit ;;
907 ppc64:Linux:*:*)
908 echo powerpc64-unknown-linux-gnu
909 exit ;;
910 alpha:Linux:*:*)
911 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
912 EV5) UNAME_MACHINE=alphaev5 ;;
913 EV56) UNAME_MACHINE=alphaev56 ;;
914 PCA56) UNAME_MACHINE=alphapca56 ;;
915 PCA57) UNAME_MACHINE=alphapca56 ;;
916 EV6) UNAME_MACHINE=alphaev6 ;;
917 EV67) UNAME_MACHINE=alphaev67 ;;
918 EV68*) UNAME_MACHINE=alphaev68 ;;
919 esac
920 objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
921 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
922 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
923 exit ;;
924 parisc:Linux:*:* | hppa:Linux:*:*)
925 # Look for CPU level
926 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
927 PA7*) echo hppa1.1-unknown-linux-gnu ;;
928 PA8*) echo hppa2.0-unknown-linux-gnu ;;
929 *) echo hppa-unknown-linux-gnu ;;
930 esac
931 exit ;;
932 parisc64:Linux:*:* | hppa64:Linux:*:*)
933 echo hppa64-unknown-linux-gnu
934 exit ;;
935 s390:Linux:*:* | s390x:Linux:*:*)
936 echo ${UNAME_MACHINE}-ibm-linux
937 exit ;;
938 sh64*:Linux:*:*)
939 echo ${UNAME_MACHINE}-unknown-linux-gnu
940 exit ;;
941 sh*:Linux:*:*)
942 echo ${UNAME_MACHINE}-unknown-linux-gnu
943 exit ;;
944 sparc:Linux:*:* | sparc64:Linux:*:*)
945 echo ${UNAME_MACHINE}-unknown-linux-gnu
946 exit ;;
947 vax:Linux:*:*)
948 echo ${UNAME_MACHINE}-dec-linux-gnu
949 exit ;;
950 x86_64:Linux:*:*)
951 echo x86_64-unknown-linux-gnu
952 exit ;;
953 i*86:Linux:*:*)
954 # The BFD linker knows what the default object file format is, so
955 # first see if it will tell us. cd to the root directory to prevent
956 # problems with other programs or directories called `ld' in the path.
957 # Set LC_ALL=C to ensure ld outputs messages in English.
958 ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
959 | sed -ne '/supported targets:/!d
960 s/[ ][ ]*/ /g
961 s/.*supported targets: *//
962 s/ .*//
963 p'`
964 case "$ld_supported_targets" in
965 elf32-i386)
966 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
967 ;;
968 a.out-i386-linux)
969 echo "${UNAME_MACHINE}-pc-linux-gnuaout"
970 exit ;;
971 coff-i386)
972 echo "${UNAME_MACHINE}-pc-linux-gnucoff"
973 exit ;;
974 "")
975 # Either a pre-BFD a.out linker (linux-gnuoldld) or
976 # one that does not give us useful --help.
977 echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
978 exit ;;
979 esac
980 # Determine whether the default compiler is a.out or elf
981 eval $set_cc_for_build
982 sed 's/^ //' << EOF >$dummy.c
983 #include <features.h>
984 #ifdef __ELF__
985 # ifdef __GLIBC__
986 # if __GLIBC__ >= 2
987 LIBC=gnu
988 # else
989 LIBC=gnulibc1
990 # endif
991 # else
992 LIBC=gnulibc1
993 # endif
994 #else
995 #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
996 LIBC=gnu
997 #else
998 LIBC=gnuaout
999 #endif
1000 #endif
1001 #ifdef __dietlibc__
1002 LIBC=dietlibc
1003 #endif
1004EOF
1005 eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
1006 /^LIBC/{
1007 s: ::g
1008 p
1009 }'`"
1010 test x"${LIBC}" != x && {
1011 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
1012 exit
1013 }
1014 test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
1015 ;;
1016 i*86:DYNIX/ptx:4*:*)
1017 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1018 # earlier versions are messed up and put the nodename in both
1019 # sysname and nodename.
1020 echo i386-sequent-sysv4
1021 exit ;;
1022 i*86:UNIX_SV:4.2MP:2.*)
1023 # Unixware is an offshoot of SVR4, but it has its own version
1024 # number series starting with 2...
1025 # I am not positive that other SVR4 systems won't match this,
1026 # I just have to hope. -- rms.
1027 # Use sysv4.2uw... so that sysv4* matches it.
1028 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1029 exit ;;
1030 i*86:OS/2:*:*)
1031 # If we were able to find `uname', then EMX Unix compatibility
1032 # is probably installed.
1033 echo ${UNAME_MACHINE}-pc-os2-emx
1034 exit ;;
1035 i*86:XTS-300:*:STOP)
1036 echo ${UNAME_MACHINE}-unknown-stop
1037 exit ;;
1038 i*86:atheos:*:*)
1039 echo ${UNAME_MACHINE}-unknown-atheos
1040 exit ;;
1041 i*86:syllable:*:*)
1042 echo ${UNAME_MACHINE}-pc-syllable
1043 exit ;;
1044 i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
1045 echo i386-unknown-lynxos${UNAME_RELEASE}
1046 exit ;;
1047 i*86:*DOS:*:*)
1048 echo ${UNAME_MACHINE}-pc-msdosdjgpp
1049 exit ;;
1050 i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
1051 UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
1052 if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
1053 echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
1054 else
1055 echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
1056 fi
1057 exit ;;
1058 i*86:*:5:[678]*)
1059 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1060 case `/bin/uname -X | grep "^Machine"` in
1061 *486*) UNAME_MACHINE=i486 ;;
1062 *Pentium) UNAME_MACHINE=i586 ;;
1063 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
1064 esac
1065 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
1066 exit ;;
1067 i*86:*:3.2:*)
1068 if test -f /usr/options/cb.name; then
1069 UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
1070 echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
1071 elif /bin/uname -X 2>/dev/null >/dev/null ; then
1072 UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
1073 (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
1074 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
1075 && UNAME_MACHINE=i586
1076 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
1077 && UNAME_MACHINE=i686
1078 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
1079 && UNAME_MACHINE=i686
1080 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
1081 else
1082 echo ${UNAME_MACHINE}-pc-sysv32
1083 fi
1084 exit ;;
1085 pc:*:*:*)
1086 # Left here for compatibility:
1087 # uname -m prints for DJGPP always 'pc', but it prints nothing about
1088 # the processor, so we play safe by assuming i386.
1089 echo i386-pc-msdosdjgpp
1090 exit ;;
1091 Intel:Mach:3*:*)
1092 echo i386-pc-mach3
1093 exit ;;
1094 paragon:*:*:*)
1095 echo i860-intel-osf1
1096 exit ;;
1097 i860:*:4.*:*) # i860-SVR4
1098 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
1099 echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
1100 else # Add other i860-SVR4 vendors below as they are discovered.
1101 echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
1102 fi
1103 exit ;;
1104 mini*:CTIX:SYS*5:*)
1105 # "miniframe"
1106 echo m68010-convergent-sysv
1107 exit ;;
1108 mc68k:UNIX:SYSTEM5:3.51m)
1109 echo m68k-convergent-sysv
1110 exit ;;
1111 M680?0:D-NIX:5.3:*)
1112 echo m68k-diab-dnix
1113 exit ;;
1114 M68*:*:R3V[5678]*:*)
1115 test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
1116 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
1117 OS_REL=''
1118 test -r /etc/.relid \
1119 && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
1120 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1121 && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
1122 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
1123 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
1124 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
1125 /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
1126 && { echo i486-ncr-sysv4; exit; } ;;
1127 m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
1128 echo m68k-unknown-lynxos${UNAME_RELEASE}
1129 exit ;;
1130 mc68030:UNIX_System_V:4.*:*)
1131 echo m68k-atari-sysv4
1132 exit ;;
1133 TSUNAMI:LynxOS:2.*:*)
1134 echo sparc-unknown-lynxos${UNAME_RELEASE}
1135 exit ;;
1136 rs6000:LynxOS:2.*:*)
1137 echo rs6000-unknown-lynxos${UNAME_RELEASE}
1138 exit ;;
1139 PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
1140 echo powerpc-unknown-lynxos${UNAME_RELEASE}
1141 exit ;;
1142 SM[BE]S:UNIX_SV:*:*)
1143 echo mips-dde-sysv${UNAME_RELEASE}
1144 exit ;;
1145 RM*:ReliantUNIX-*:*:*)
1146 echo mips-sni-sysv4
1147 exit ;;
1148 RM*:SINIX-*:*:*)
1149 echo mips-sni-sysv4
1150 exit ;;
1151 *:SINIX-*:*:*)
1152 if uname -p 2>/dev/null >/dev/null ; then
1153 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1154 echo ${UNAME_MACHINE}-sni-sysv4
1155 else
1156 echo ns32k-sni-sysv
1157 fi
1158 exit ;;
1159 PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
1160 # says <Richard.M.Bartel@ccMail.Census.GOV>
1161 echo i586-unisys-sysv4
1162 exit ;;
1163 *:UNIX_System_V:4*:FTX*)
1164 # From Gerald Hewes <hewes@openmarket.com>.
1165 # How about differentiating between stratus architectures? -djm
1166 echo hppa1.1-stratus-sysv4
1167 exit ;;
1168 *:*:*:FTX*)
1169 # From seanf@swdc.stratus.com.
1170 echo i860-stratus-sysv4
1171 exit ;;
1172 i*86:VOS:*:*)
1173 # From Paul.Green@stratus.com.
1174 echo ${UNAME_MACHINE}-stratus-vos
1175 exit ;;
1176 *:VOS:*:*)
1177 # From Paul.Green@stratus.com.
1178 echo hppa1.1-stratus-vos
1179 exit ;;
1180 mc68*:A/UX:*:*)
1181 echo m68k-apple-aux${UNAME_RELEASE}
1182 exit ;;
1183 news*:NEWS-OS:6*:*)
1184 echo mips-sony-newsos6
1185 exit ;;
1186 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
1187 if [ -d /usr/nec ]; then
1188 echo mips-nec-sysv${UNAME_RELEASE}
1189 else
1190 echo mips-unknown-sysv${UNAME_RELEASE}
1191 fi
1192 exit ;;
1193 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
1194 echo powerpc-be-beos
1195 exit ;;
1196 BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
1197 echo powerpc-apple-beos
1198 exit ;;
1199 BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
1200 echo i586-pc-beos
1201 exit ;;
1202 SX-4:SUPER-UX:*:*)
1203 echo sx4-nec-superux${UNAME_RELEASE}
1204 exit ;;
1205 SX-5:SUPER-UX:*:*)
1206 echo sx5-nec-superux${UNAME_RELEASE}
1207 exit ;;
1208 SX-6:SUPER-UX:*:*)
1209 echo sx6-nec-superux${UNAME_RELEASE}
1210 exit ;;
1211 Power*:Rhapsody:*:*)
1212 echo powerpc-apple-rhapsody${UNAME_RELEASE}
1213 exit ;;
1214 *:Rhapsody:*:*)
1215 echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
1216 exit ;;
1217 *:Darwin:*:*)
1218 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1219 case $UNAME_PROCESSOR in
1220 unknown) UNAME_PROCESSOR=powerpc ;;
1221 esac
1222 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1223 exit ;;
1224 *:procnto*:*:* | *:QNX:[0123456789]*:*)
1225 UNAME_PROCESSOR=`uname -p`
1226 if test "$UNAME_PROCESSOR" = "x86"; then
1227 UNAME_PROCESSOR=i386
1228 UNAME_MACHINE=pc
1229 fi
1230 echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
1231 exit ;;
1232 *:QNX:*:4*)
1233 echo i386-pc-qnx
1234 exit ;;
1235 NSE-?:NONSTOP_KERNEL:*:*)
1236 echo nse-tandem-nsk${UNAME_RELEASE}
1237 exit ;;
1238 NSR-?:NONSTOP_KERNEL:*:*)
1239 echo nsr-tandem-nsk${UNAME_RELEASE}
1240 exit ;;
1241 *:NonStop-UX:*:*)
1242 echo mips-compaq-nonstopux
1243 exit ;;
1244 BS2000:POSIX*:*:*)
1245 echo bs2000-siemens-sysv
1246 exit ;;
1247 DS/*:UNIX_System_V:*:*)
1248 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
1249 exit ;;
1250 *:Plan9:*:*)
1251 # "uname -m" is not consistent, so use $cputype instead. 386
1252 # is converted to i386 for consistency with other x86
1253 # operating systems.
1254 if test "$cputype" = "386"; then
1255 UNAME_MACHINE=i386
1256 else
1257 UNAME_MACHINE="$cputype"
1258 fi
1259 echo ${UNAME_MACHINE}-unknown-plan9
1260 exit ;;
1261 *:TOPS-10:*:*)
1262 echo pdp10-unknown-tops10
1263 exit ;;
1264 *:TENEX:*:*)
1265 echo pdp10-unknown-tenex
1266 exit ;;
1267 KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
1268 echo pdp10-dec-tops20
1269 exit ;;
1270 XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
1271 echo pdp10-xkl-tops20
1272 exit ;;
1273 *:TOPS-20:*:*)
1274 echo pdp10-unknown-tops20
1275 exit ;;
1276 *:ITS:*:*)
1277 echo pdp10-unknown-its
1278 exit ;;
1279 SEI:*:*:SEIUX)
1280 echo mips-sei-seiux${UNAME_RELEASE}
1281 exit ;;
1282 *:DragonFly:*:*)
1283 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
1284 exit ;;
1285 *:*VMS:*:*)
1286 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1287 case "${UNAME_MACHINE}" in
1288 A*) echo alpha-dec-vms ; exit ;;
1289 I*) echo ia64-dec-vms ; exit ;;
1290 V*) echo vax-dec-vms ; exit ;;
1291 esac ;;
1292 *:XENIX:*:SysV)
1293 echo i386-pc-xenix
1294 exit ;;
1295 i*86:skyos:*:*)
1296 echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1297 exit ;;
1298 i*86:rdos:*:*)
1299 echo ${UNAME_MACHINE}-pc-rdos
1300 exit ;;
1301esac
1302
1303#echo '(No uname command or uname output not recognized.)' 1>&2
1304#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1305
1306eval $set_cc_for_build
1307cat >$dummy.c <<EOF
1308#ifdef _SEQUENT_
1309# include <sys/types.h>
1310# include <sys/utsname.h>
1311#endif
1312main ()
1313{
1314#if defined (sony)
1315#if defined (MIPSEB)
1316 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1317 I don't know.... */
1318 printf ("mips-sony-bsd\n"); exit (0);
1319#else
1320#include <sys/param.h>
1321 printf ("m68k-sony-newsos%s\n",
1322#ifdef NEWSOS4
1323 "4"
1324#else
1325 ""
1326#endif
1327 ); exit (0);
1328#endif
1329#endif
1330
1331#if defined (__arm) && defined (__acorn) && defined (__unix)
1332 printf ("arm-acorn-riscix\n"); exit (0);
1333#endif
1334
1335#if defined (hp300) && !defined (hpux)
1336 printf ("m68k-hp-bsd\n"); exit (0);
1337#endif
1338
1339#if defined (NeXT)
1340#if !defined (__ARCHITECTURE__)
1341#define __ARCHITECTURE__ "m68k"
1342#endif
1343 int version;
1344 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1345 if (version < 4)
1346 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1347 else
1348 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1349 exit (0);
1350#endif
1351
1352#if defined (MULTIMAX) || defined (n16)
1353#if defined (UMAXV)
1354 printf ("ns32k-encore-sysv\n"); exit (0);
1355#else
1356#if defined (CMU)
1357 printf ("ns32k-encore-mach\n"); exit (0);
1358#else
1359 printf ("ns32k-encore-bsd\n"); exit (0);
1360#endif
1361#endif
1362#endif
1363
1364#if defined (__386BSD__)
1365 printf ("i386-pc-bsd\n"); exit (0);
1366#endif
1367
1368#if defined (sequent)
1369#if defined (i386)
1370 printf ("i386-sequent-dynix\n"); exit (0);
1371#endif
1372#if defined (ns32000)
1373 printf ("ns32k-sequent-dynix\n"); exit (0);
1374#endif
1375#endif
1376
1377#if defined (_SEQUENT_)
1378 struct utsname un;
1379
1380 uname(&un);
1381
1382 if (strncmp(un.version, "V2", 2) == 0) {
1383 printf ("i386-sequent-ptx2\n"); exit (0);
1384 }
1385 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1386 printf ("i386-sequent-ptx1\n"); exit (0);
1387 }
1388 printf ("i386-sequent-ptx\n"); exit (0);
1389
1390#endif
1391
1392#if defined (vax)
1393# if !defined (ultrix)
1394# include <sys/param.h>
1395# if defined (BSD)
1396# if BSD == 43
1397 printf ("vax-dec-bsd4.3\n"); exit (0);
1398# else
1399# if BSD == 199006
1400 printf ("vax-dec-bsd4.3reno\n"); exit (0);
1401# else
1402 printf ("vax-dec-bsd\n"); exit (0);
1403# endif
1404# endif
1405# else
1406 printf ("vax-dec-bsd\n"); exit (0);
1407# endif
1408# else
1409 printf ("vax-dec-ultrix\n"); exit (0);
1410# endif
1411#endif
1412
1413#if defined (alliant) && defined (i860)
1414 printf ("i860-alliant-bsd\n"); exit (0);
1415#endif
1416
1417 exit (1);
1418}
1419EOF
1420
1421$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1422 { echo "$SYSTEM_NAME"; exit; }
1423
1424# Apollos put the system type in the environment.
1425
1426test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
1427
1428# Convex versions that predate uname can use getsysinfo(1)
1429
1430if [ -x /usr/convex/getsysinfo ]
1431then
1432 case `getsysinfo -f cpu_type` in
1433 c1*)
1434 echo c1-convex-bsd
1435 exit ;;
1436 c2*)
1437 if getsysinfo -f scalar_acc
1438 then echo c32-convex-bsd
1439 else echo c2-convex-bsd
1440 fi
1441 exit ;;
1442 c34*)
1443 echo c34-convex-bsd
1444 exit ;;
1445 c38*)
1446 echo c38-convex-bsd
1447 exit ;;
1448 c4*)
1449 echo c4-convex-bsd
1450 exit ;;
1451 esac
1452fi
1453
1454cat >&2 <<EOF
1455$0: unable to guess system type
1456
1457This script, last modified $timestamp, has failed to recognize
1458the operating system you are using. It is advised that you
1459download the most up to date version of the config scripts from
1460
1461 http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
1462and
1463 http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
1464
1465If the version you run ($0) is already up to date, please
1466send the following data and any information you think might be
1467pertinent to <config-patches@gnu.org> in order to provide the needed
1468information to handle your system.
1469
1470config.guess timestamp = $timestamp
1471
1472uname -m = `(uname -m) 2>/dev/null || echo unknown`
1473uname -r = `(uname -r) 2>/dev/null || echo unknown`
1474uname -s = `(uname -s) 2>/dev/null || echo unknown`
1475uname -v = `(uname -v) 2>/dev/null || echo unknown`
1476
1477/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
1478/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
1479
1480hostinfo = `(hostinfo) 2>/dev/null`
1481/bin/universe = `(/bin/universe) 2>/dev/null`
1482/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
1483/bin/arch = `(/bin/arch) 2>/dev/null`
1484/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
1485/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
1486
1487UNAME_MACHINE = ${UNAME_MACHINE}
1488UNAME_RELEASE = ${UNAME_RELEASE}
1489UNAME_SYSTEM = ${UNAME_SYSTEM}
1490UNAME_VERSION = ${UNAME_VERSION}
1491EOF
1492
1493exit 1
1494
1495# Local variables:
1496# eval: (add-hook 'write-file-hooks 'time-stamp)
1497# time-stamp-start: "timestamp='"
1498# time-stamp-format: "%:y-%02m-%02d"
1499# time-stamp-end: "'"
1500# End:
diff --git a/config.sub b/config.sub
new file mode 100755
index 00000000..387c18d1
--- /dev/null
+++ b/config.sub
@@ -0,0 +1,1608 @@
1#! /bin/sh
2# Configuration validation subroutine script.
3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
5# Inc.
6
7timestamp='2006-07-02'
8
9# This file is (in principle) common to ALL GNU software.
10# The presence of a machine in this file suggests that SOME GNU software
11# can handle that machine. It does not imply ALL GNU software can.
12#
13# This file is free software; you can redistribute it and/or modify
14# it under the terms of the GNU General Public License as published by
15# the Free Software Foundation; either version 2 of the License, or
16# (at your option) any later version.
17#
18# This program is distributed in the hope that it will be useful,
19# but WITHOUT ANY WARRANTY; without even the implied warranty of
20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21# GNU General Public License for more details.
22#
23# You should have received a copy of the GNU General Public License
24# along with this program; if not, write to the Free Software
25# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
26# 02110-1301, USA.
27#
28# As a special exception to the GNU General Public License, if you
29# distribute this file as part of a program that contains a
30# configuration script generated by Autoconf, you may include it under
31# the same distribution terms that you use for the rest of that program.
32
33
34# Please send patches to <config-patches@gnu.org>. Submit a context
35# diff and a properly formatted ChangeLog entry.
36#
37# Configuration subroutine to validate and canonicalize a configuration type.
38# Supply the specified configuration type as an argument.
39# If it is invalid, we print an error message on stderr and exit with code 1.
40# Otherwise, we print the canonical config type on stdout and succeed.
41
42# This file is supposed to be the same for all GNU packages
43# and recognize all the CPU types, system types and aliases
44# that are meaningful with *any* GNU software.
45# Each package is responsible for reporting which valid configurations
46# it does not support. The user should be able to distinguish
47# a failure to support a valid configuration from a meaningless
48# configuration.
49
50# The goal of this file is to map all the various variations of a given
51# machine specification into a single specification in the form:
52# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
53# or in some cases, the newer four-part form:
54# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
55# It is wrong to echo any other type of specification.
56
57me=`echo "$0" | sed -e 's,.*/,,'`
58
59usage="\
60Usage: $0 [OPTION] CPU-MFR-OPSYS
61 $0 [OPTION] ALIAS
62
63Canonicalize a configuration name.
64
65Operation modes:
66 -h, --help print this help, then exit
67 -t, --time-stamp print date of last modification, then exit
68 -v, --version print version number, then exit
69
70Report bugs and patches to <config-patches@gnu.org>."
71
72version="\
73GNU config.sub ($timestamp)
74
75Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
76Free Software Foundation, Inc.
77
78This is free software; see the source for copying conditions. There is NO
79warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
80
81help="
82Try \`$me --help' for more information."
83
84# Parse command line
85while test $# -gt 0 ; do
86 case $1 in
87 --time-stamp | --time* | -t )
88 echo "$timestamp" ; exit ;;
89 --version | -v )
90 echo "$version" ; exit ;;
91 --help | --h* | -h )
92 echo "$usage"; exit ;;
93 -- ) # Stop option processing
94 shift; break ;;
95 - ) # Use stdin as input.
96 break ;;
97 -* )
98 echo "$me: invalid option $1$help"
99 exit 1 ;;
100
101 *local*)
102 # First pass through any local machine types.
103 echo $1
104 exit ;;
105
106 * )
107 break ;;
108 esac
109done
110
111case $# in
112 0) echo "$me: missing argument$help" >&2
113 exit 1;;
114 1) ;;
115 *) echo "$me: too many arguments$help" >&2
116 exit 1;;
117esac
118
119# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
120# Here we must recognize all the valid KERNEL-OS combinations.
121maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
122case $maybe_os in
123 nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
124 uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
125 storm-chaos* | os2-emx* | rtmk-nova*)
126 os=-$maybe_os
127 basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
128 ;;
129 *)
130 basic_machine=`echo $1 | sed 's/-[^-]*$//'`
131 if [ $basic_machine != $1 ]
132 then os=`echo $1 | sed 's/.*-/-/'`
133 else os=; fi
134 ;;
135esac
136
137### Let's recognize common machines as not being operating systems so
138### that things like config.sub decstation-3100 work. We also
139### recognize some manufacturers as not being operating systems, so we
140### can provide default operating systems below.
141case $os in
142 -sun*os*)
143 # Prevent following clause from handling this invalid input.
144 ;;
145 -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
146 -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
147 -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
148 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
149 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
150 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
151 -apple | -axis | -knuth | -cray)
152 os=
153 basic_machine=$1
154 ;;
155 -sim | -cisco | -oki | -wec | -winbond)
156 os=
157 basic_machine=$1
158 ;;
159 -scout)
160 ;;
161 -wrs)
162 os=-vxworks
163 basic_machine=$1
164 ;;
165 -chorusos*)
166 os=-chorusos
167 basic_machine=$1
168 ;;
169 -chorusrdb)
170 os=-chorusrdb
171 basic_machine=$1
172 ;;
173 -hiux*)
174 os=-hiuxwe2
175 ;;
176 -sco6)
177 os=-sco5v6
178 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
179 ;;
180 -sco5)
181 os=-sco3.2v5
182 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
183 ;;
184 -sco4)
185 os=-sco3.2v4
186 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
187 ;;
188 -sco3.2.[4-9]*)
189 os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
190 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
191 ;;
192 -sco3.2v[4-9]*)
193 # Don't forget version if it is 3.2v4 or newer.
194 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
195 ;;
196 -sco5v6*)
197 # Don't forget version if it is 3.2v4 or newer.
198 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
199 ;;
200 -sco*)
201 os=-sco3.2v2
202 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
203 ;;
204 -udk*)
205 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
206 ;;
207 -isc)
208 os=-isc2.2
209 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
210 ;;
211 -clix*)
212 basic_machine=clipper-intergraph
213 ;;
214 -isc*)
215 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
216 ;;
217 -lynx*)
218 os=-lynxos
219 ;;
220 -ptx*)
221 basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
222 ;;
223 -windowsnt*)
224 os=`echo $os | sed -e 's/windowsnt/winnt/'`
225 ;;
226 -psos*)
227 os=-psos
228 ;;
229 -mint | -mint[0-9]*)
230 basic_machine=m68k-atari
231 os=-mint
232 ;;
233esac
234
235# Decode aliases for certain CPU-COMPANY combinations.
236case $basic_machine in
237 # Recognize the basic CPU types without company name.
238 # Some are omitted here because they have special meanings below.
239 1750a | 580 \
240 | a29k \
241 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
242 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
243 | am33_2.0 \
244 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
245 | bfin \
246 | c4x | clipper \
247 | d10v | d30v | dlx | dsp16xx \
248 | fr30 | frv \
249 | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
250 | i370 | i860 | i960 | ia64 \
251 | ip2k | iq2000 \
252 | m32c | m32r | m32rle | m68000 | m68k | m88k \
253 | maxq | mb | microblaze | mcore \
254 | mips | mipsbe | mipseb | mipsel | mipsle \
255 | mips16 \
256 | mips64 | mips64el \
257 | mips64vr | mips64vrel \
258 | mips64orion | mips64orionel \
259 | mips64vr4100 | mips64vr4100el \
260 | mips64vr4300 | mips64vr4300el \
261 | mips64vr5000 | mips64vr5000el \
262 | mips64vr5900 | mips64vr5900el \
263 | mipsisa32 | mipsisa32el \
264 | mipsisa32r2 | mipsisa32r2el \
265 | mipsisa64 | mipsisa64el \
266 | mipsisa64r2 | mipsisa64r2el \
267 | mipsisa64sb1 | mipsisa64sb1el \
268 | mipsisa64sr71k | mipsisa64sr71kel \
269 | mipstx39 | mipstx39el \
270 | mn10200 | mn10300 \
271 | mt \
272 | msp430 \
273 | nios | nios2 \
274 | ns16k | ns32k \
275 | or32 \
276 | pdp10 | pdp11 | pj | pjl \
277 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
278 | pyramid \
279 | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
280 | sh64 | sh64le \
281 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
282 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
283 | spu | strongarm \
284 | tahoe | thumb | tic4x | tic80 | tron \
285 | v850 | v850e \
286 | we32k \
287 | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
288 | z8k)
289 basic_machine=$basic_machine-unknown
290 ;;
291 m6811 | m68hc11 | m6812 | m68hc12)
292 # Motorola 68HC11/12.
293 basic_machine=$basic_machine-unknown
294 os=-none
295 ;;
296 m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
297 ;;
298 ms1)
299 basic_machine=mt-unknown
300 ;;
301
302 # We use `pc' rather than `unknown'
303 # because (1) that's what they normally are, and
304 # (2) the word "unknown" tends to confuse beginning users.
305 i*86 | x86_64)
306 basic_machine=$basic_machine-pc
307 ;;
308 # Object if more than one company name word.
309 *-*-*)
310 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
311 exit 1
312 ;;
313 # Recognize the basic CPU types with company name.
314 580-* \
315 | a29k-* \
316 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
317 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
318 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
319 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
320 | avr-* | avr32-* \
321 | bfin-* | bs2000-* \
322 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
323 | clipper-* | craynv-* | cydra-* \
324 | d10v-* | d30v-* | dlx-* \
325 | elxsi-* \
326 | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
327 | h8300-* | h8500-* \
328 | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
329 | i*86-* | i860-* | i960-* | ia64-* \
330 | ip2k-* | iq2000-* \
331 | m32c-* | m32r-* | m32rle-* \
332 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
333 | m88110-* | m88k-* | maxq-* | mcore-* \
334 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
335 | mips16-* \
336 | mips64-* | mips64el-* \
337 | mips64vr-* | mips64vrel-* \
338 | mips64orion-* | mips64orionel-* \
339 | mips64vr4100-* | mips64vr4100el-* \
340 | mips64vr4300-* | mips64vr4300el-* \
341 | mips64vr5000-* | mips64vr5000el-* \
342 | mips64vr5900-* | mips64vr5900el-* \
343 | mipsisa32-* | mipsisa32el-* \
344 | mipsisa32r2-* | mipsisa32r2el-* \
345 | mipsisa64-* | mipsisa64el-* \
346 | mipsisa64r2-* | mipsisa64r2el-* \
347 | mipsisa64sb1-* | mipsisa64sb1el-* \
348 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
349 | mipstx39-* | mipstx39el-* \
350 | mmix-* \
351 | mt-* \
352 | msp430-* \
353 | nios-* | nios2-* \
354 | none-* | np1-* | ns16k-* | ns32k-* \
355 | orion-* \
356 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
357 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
358 | pyramid-* \
359 | romp-* | rs6000-* \
360 | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
361 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
362 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
363 | sparclite-* \
364 | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
365 | tahoe-* | thumb-* \
366 | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
367 | tron-* \
368 | v850-* | v850e-* | vax-* \
369 | we32k-* \
370 | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
371 | xstormy16-* | xtensa-* \
372 | ymp-* \
373 | z8k-*)
374 ;;
375 # Recognize the various machine names and aliases which stand
376 # for a CPU type and a company and sometimes even an OS.
377 386bsd)
378 basic_machine=i386-unknown
379 os=-bsd
380 ;;
381 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
382 basic_machine=m68000-att
383 ;;
384 3b*)
385 basic_machine=we32k-att
386 ;;
387 a29khif)
388 basic_machine=a29k-amd
389 os=-udi
390 ;;
391 abacus)
392 basic_machine=abacus-unknown
393 ;;
394 adobe68k)
395 basic_machine=m68010-adobe
396 os=-scout
397 ;;
398 alliant | fx80)
399 basic_machine=fx80-alliant
400 ;;
401 altos | altos3068)
402 basic_machine=m68k-altos
403 ;;
404 am29k)
405 basic_machine=a29k-none
406 os=-bsd
407 ;;
408 amd64)
409 basic_machine=x86_64-pc
410 ;;
411 amd64-*)
412 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
413 ;;
414 amdahl)
415 basic_machine=580-amdahl
416 os=-sysv
417 ;;
418 amiga | amiga-*)
419 basic_machine=m68k-unknown
420 ;;
421 amigaos | amigados)
422 basic_machine=m68k-unknown
423 os=-amigaos
424 ;;
425 amigaunix | amix)
426 basic_machine=m68k-unknown
427 os=-sysv4
428 ;;
429 apollo68)
430 basic_machine=m68k-apollo
431 os=-sysv
432 ;;
433 apollo68bsd)
434 basic_machine=m68k-apollo
435 os=-bsd
436 ;;
437 aux)
438 basic_machine=m68k-apple
439 os=-aux
440 ;;
441 balance)
442 basic_machine=ns32k-sequent
443 os=-dynix
444 ;;
445 c90)
446 basic_machine=c90-cray
447 os=-unicos
448 ;;
449 convex-c1)
450 basic_machine=c1-convex
451 os=-bsd
452 ;;
453 convex-c2)
454 basic_machine=c2-convex
455 os=-bsd
456 ;;
457 convex-c32)
458 basic_machine=c32-convex
459 os=-bsd
460 ;;
461 convex-c34)
462 basic_machine=c34-convex
463 os=-bsd
464 ;;
465 convex-c38)
466 basic_machine=c38-convex
467 os=-bsd
468 ;;
469 cray | j90)
470 basic_machine=j90-cray
471 os=-unicos
472 ;;
473 craynv)
474 basic_machine=craynv-cray
475 os=-unicosmp
476 ;;
477 cr16c)
478 basic_machine=cr16c-unknown
479 os=-elf
480 ;;
481 crds | unos)
482 basic_machine=m68k-crds
483 ;;
484 crisv32 | crisv32-* | etraxfs*)
485 basic_machine=crisv32-axis
486 ;;
487 cris | cris-* | etrax*)
488 basic_machine=cris-axis
489 ;;
490 crx)
491 basic_machine=crx-unknown
492 os=-elf
493 ;;
494 da30 | da30-*)
495 basic_machine=m68k-da30
496 ;;
497 decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
498 basic_machine=mips-dec
499 ;;
500 decsystem10* | dec10*)
501 basic_machine=pdp10-dec
502 os=-tops10
503 ;;
504 decsystem20* | dec20*)
505 basic_machine=pdp10-dec
506 os=-tops20
507 ;;
508 delta | 3300 | motorola-3300 | motorola-delta \
509 | 3300-motorola | delta-motorola)
510 basic_machine=m68k-motorola
511 ;;
512 delta88)
513 basic_machine=m88k-motorola
514 os=-sysv3
515 ;;
516 djgpp)
517 basic_machine=i586-pc
518 os=-msdosdjgpp
519 ;;
520 dpx20 | dpx20-*)
521 basic_machine=rs6000-bull
522 os=-bosx
523 ;;
524 dpx2* | dpx2*-bull)
525 basic_machine=m68k-bull
526 os=-sysv3
527 ;;
528 ebmon29k)
529 basic_machine=a29k-amd
530 os=-ebmon
531 ;;
532 elxsi)
533 basic_machine=elxsi-elxsi
534 os=-bsd
535 ;;
536 encore | umax | mmax)
537 basic_machine=ns32k-encore
538 ;;
539 es1800 | OSE68k | ose68k | ose | OSE)
540 basic_machine=m68k-ericsson
541 os=-ose
542 ;;
543 fx2800)
544 basic_machine=i860-alliant
545 ;;
546 genix)
547 basic_machine=ns32k-ns
548 ;;
549 gmicro)
550 basic_machine=tron-gmicro
551 os=-sysv
552 ;;
553 go32)
554 basic_machine=i386-pc
555 os=-go32
556 ;;
557 h3050r* | hiux*)
558 basic_machine=hppa1.1-hitachi
559 os=-hiuxwe2
560 ;;
561 h8300hms)
562 basic_machine=h8300-hitachi
563 os=-hms
564 ;;
565 h8300xray)
566 basic_machine=h8300-hitachi
567 os=-xray
568 ;;
569 h8500hms)
570 basic_machine=h8500-hitachi
571 os=-hms
572 ;;
573 harris)
574 basic_machine=m88k-harris
575 os=-sysv3
576 ;;
577 hp300-*)
578 basic_machine=m68k-hp
579 ;;
580 hp300bsd)
581 basic_machine=m68k-hp
582 os=-bsd
583 ;;
584 hp300hpux)
585 basic_machine=m68k-hp
586 os=-hpux
587 ;;
588 hp3k9[0-9][0-9] | hp9[0-9][0-9])
589 basic_machine=hppa1.0-hp
590 ;;
591 hp9k2[0-9][0-9] | hp9k31[0-9])
592 basic_machine=m68000-hp
593 ;;
594 hp9k3[2-9][0-9])
595 basic_machine=m68k-hp
596 ;;
597 hp9k6[0-9][0-9] | hp6[0-9][0-9])
598 basic_machine=hppa1.0-hp
599 ;;
600 hp9k7[0-79][0-9] | hp7[0-79][0-9])
601 basic_machine=hppa1.1-hp
602 ;;
603 hp9k78[0-9] | hp78[0-9])
604 # FIXME: really hppa2.0-hp
605 basic_machine=hppa1.1-hp
606 ;;
607 hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
608 # FIXME: really hppa2.0-hp
609 basic_machine=hppa1.1-hp
610 ;;
611 hp9k8[0-9][13679] | hp8[0-9][13679])
612 basic_machine=hppa1.1-hp
613 ;;
614 hp9k8[0-9][0-9] | hp8[0-9][0-9])
615 basic_machine=hppa1.0-hp
616 ;;
617 hppa-next)
618 os=-nextstep3
619 ;;
620 hppaosf)
621 basic_machine=hppa1.1-hp
622 os=-osf
623 ;;
624 hppro)
625 basic_machine=hppa1.1-hp
626 os=-proelf
627 ;;
628 i370-ibm* | ibm*)
629 basic_machine=i370-ibm
630 ;;
631# I'm not sure what "Sysv32" means. Should this be sysv3.2?
632 i*86v32)
633 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
634 os=-sysv32
635 ;;
636 i*86v4*)
637 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
638 os=-sysv4
639 ;;
640 i*86v)
641 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
642 os=-sysv
643 ;;
644 i*86sol2)
645 basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
646 os=-solaris2
647 ;;
648 i386mach)
649 basic_machine=i386-mach
650 os=-mach
651 ;;
652 i386-vsta | vsta)
653 basic_machine=i386-unknown
654 os=-vsta
655 ;;
656 iris | iris4d)
657 basic_machine=mips-sgi
658 case $os in
659 -irix*)
660 ;;
661 *)
662 os=-irix4
663 ;;
664 esac
665 ;;
666 isi68 | isi)
667 basic_machine=m68k-isi
668 os=-sysv
669 ;;
670 m88k-omron*)
671 basic_machine=m88k-omron
672 ;;
673 magnum | m3230)
674 basic_machine=mips-mips
675 os=-sysv
676 ;;
677 merlin)
678 basic_machine=ns32k-utek
679 os=-sysv
680 ;;
681 mingw32)
682 basic_machine=i386-pc
683 os=-mingw32
684 ;;
685 miniframe)
686 basic_machine=m68000-convergent
687 ;;
688 *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
689 basic_machine=m68k-atari
690 os=-mint
691 ;;
692 mips3*-*)
693 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
694 ;;
695 mips3*)
696 basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
697 ;;
698 monitor)
699 basic_machine=m68k-rom68k
700 os=-coff
701 ;;
702 morphos)
703 basic_machine=powerpc-unknown
704 os=-morphos
705 ;;
706 msdos)
707 basic_machine=i386-pc
708 os=-msdos
709 ;;
710 ms1-*)
711 basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
712 ;;
713 mvs)
714 basic_machine=i370-ibm
715 os=-mvs
716 ;;
717 ncr3000)
718 basic_machine=i486-ncr
719 os=-sysv4
720 ;;
721 netbsd386)
722 basic_machine=i386-unknown
723 os=-netbsd
724 ;;
725 netwinder)
726 basic_machine=armv4l-rebel
727 os=-linux
728 ;;
729 news | news700 | news800 | news900)
730 basic_machine=m68k-sony
731 os=-newsos
732 ;;
733 news1000)
734 basic_machine=m68030-sony
735 os=-newsos
736 ;;
737 news-3600 | risc-news)
738 basic_machine=mips-sony
739 os=-newsos
740 ;;
741 necv70)
742 basic_machine=v70-nec
743 os=-sysv
744 ;;
745 next | m*-next )
746 basic_machine=m68k-next
747 case $os in
748 -nextstep* )
749 ;;
750 -ns2*)
751 os=-nextstep2
752 ;;
753 *)
754 os=-nextstep3
755 ;;
756 esac
757 ;;
758 nh3000)
759 basic_machine=m68k-harris
760 os=-cxux
761 ;;
762 nh[45]000)
763 basic_machine=m88k-harris
764 os=-cxux
765 ;;
766 nindy960)
767 basic_machine=i960-intel
768 os=-nindy
769 ;;
770 mon960)
771 basic_machine=i960-intel
772 os=-mon960
773 ;;
774 nonstopux)
775 basic_machine=mips-compaq
776 os=-nonstopux
777 ;;
778 np1)
779 basic_machine=np1-gould
780 ;;
781 nsr-tandem)
782 basic_machine=nsr-tandem
783 ;;
784 op50n-* | op60c-*)
785 basic_machine=hppa1.1-oki
786 os=-proelf
787 ;;
788 openrisc | openrisc-*)
789 basic_machine=or32-unknown
790 ;;
791 os400)
792 basic_machine=powerpc-ibm
793 os=-os400
794 ;;
795 OSE68000 | ose68000)
796 basic_machine=m68000-ericsson
797 os=-ose
798 ;;
799 os68k)
800 basic_machine=m68k-none
801 os=-os68k
802 ;;
803 pa-hitachi)
804 basic_machine=hppa1.1-hitachi
805 os=-hiuxwe2
806 ;;
807 paragon)
808 basic_machine=i860-intel
809 os=-osf
810 ;;
811 pbd)
812 basic_machine=sparc-tti
813 ;;
814 pbb)
815 basic_machine=m68k-tti
816 ;;
817 pc532 | pc532-*)
818 basic_machine=ns32k-pc532
819 ;;
820 pc98)
821 basic_machine=i386-pc
822 ;;
823 pc98-*)
824 basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
825 ;;
826 pentium | p5 | k5 | k6 | nexgen | viac3)
827 basic_machine=i586-pc
828 ;;
829 pentiumpro | p6 | 6x86 | athlon | athlon_*)
830 basic_machine=i686-pc
831 ;;
832 pentiumii | pentium2 | pentiumiii | pentium3)
833 basic_machine=i686-pc
834 ;;
835 pentium4)
836 basic_machine=i786-pc
837 ;;
838 pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
839 basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
840 ;;
841 pentiumpro-* | p6-* | 6x86-* | athlon-*)
842 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
843 ;;
844 pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
845 basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
846 ;;
847 pentium4-*)
848 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
849 ;;
850 pn)
851 basic_machine=pn-gould
852 ;;
853 power) basic_machine=power-ibm
854 ;;
855 ppc) basic_machine=powerpc-unknown
856 ;;
857 ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
858 ;;
859 ppcle | powerpclittle | ppc-le | powerpc-little)
860 basic_machine=powerpcle-unknown
861 ;;
862 ppcle-* | powerpclittle-*)
863 basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
864 ;;
865 ppc64) basic_machine=powerpc64-unknown
866 ;;
867 ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
868 ;;
869 ppc64le | powerpc64little | ppc64-le | powerpc64-little)
870 basic_machine=powerpc64le-unknown
871 ;;
872 ppc64le-* | powerpc64little-*)
873 basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
874 ;;
875 ps2)
876 basic_machine=i386-ibm
877 ;;
878 pw32)
879 basic_machine=i586-unknown
880 os=-pw32
881 ;;
882 rdos)
883 basic_machine=i386-pc
884 os=-rdos
885 ;;
886 rom68k)
887 basic_machine=m68k-rom68k
888 os=-coff
889 ;;
890 rm[46]00)
891 basic_machine=mips-siemens
892 ;;
893 rtpc | rtpc-*)
894 basic_machine=romp-ibm
895 ;;
896 s390 | s390-*)
897 basic_machine=s390-ibm
898 ;;
899 s390x | s390x-*)
900 basic_machine=s390x-ibm
901 ;;
902 sa29200)
903 basic_machine=a29k-amd
904 os=-udi
905 ;;
906 sb1)
907 basic_machine=mipsisa64sb1-unknown
908 ;;
909 sb1el)
910 basic_machine=mipsisa64sb1el-unknown
911 ;;
912 sei)
913 basic_machine=mips-sei
914 os=-seiux
915 ;;
916 sequent)
917 basic_machine=i386-sequent
918 ;;
919 sh)
920 basic_machine=sh-hitachi
921 os=-hms
922 ;;
923 sh64)
924 basic_machine=sh64-unknown
925 ;;
926 sparclite-wrs | simso-wrs)
927 basic_machine=sparclite-wrs
928 os=-vxworks
929 ;;
930 sps7)
931 basic_machine=m68k-bull
932 os=-sysv2
933 ;;
934 spur)
935 basic_machine=spur-unknown
936 ;;
937 st2000)
938 basic_machine=m68k-tandem
939 ;;
940 stratus)
941 basic_machine=i860-stratus
942 os=-sysv4
943 ;;
944 sun2)
945 basic_machine=m68000-sun
946 ;;
947 sun2os3)
948 basic_machine=m68000-sun
949 os=-sunos3
950 ;;
951 sun2os4)
952 basic_machine=m68000-sun
953 os=-sunos4
954 ;;
955 sun3os3)
956 basic_machine=m68k-sun
957 os=-sunos3
958 ;;
959 sun3os4)
960 basic_machine=m68k-sun
961 os=-sunos4
962 ;;
963 sun4os3)
964 basic_machine=sparc-sun
965 os=-sunos3
966 ;;
967 sun4os4)
968 basic_machine=sparc-sun
969 os=-sunos4
970 ;;
971 sun4sol2)
972 basic_machine=sparc-sun
973 os=-solaris2
974 ;;
975 sun3 | sun3-*)
976 basic_machine=m68k-sun
977 ;;
978 sun4)
979 basic_machine=sparc-sun
980 ;;
981 sun386 | sun386i | roadrunner)
982 basic_machine=i386-sun
983 ;;
984 sv1)
985 basic_machine=sv1-cray
986 os=-unicos
987 ;;
988 symmetry)
989 basic_machine=i386-sequent
990 os=-dynix
991 ;;
992 t3e)
993 basic_machine=alphaev5-cray
994 os=-unicos
995 ;;
996 t90)
997 basic_machine=t90-cray
998 os=-unicos
999 ;;
1000 tic54x | c54x*)
1001 basic_machine=tic54x-unknown
1002 os=-coff
1003 ;;
1004 tic55x | c55x*)
1005 basic_machine=tic55x-unknown
1006 os=-coff
1007 ;;
1008 tic6x | c6x*)
1009 basic_machine=tic6x-unknown
1010 os=-coff
1011 ;;
1012 tx39)
1013 basic_machine=mipstx39-unknown
1014 ;;
1015 tx39el)
1016 basic_machine=mipstx39el-unknown
1017 ;;
1018 toad1)
1019 basic_machine=pdp10-xkl
1020 os=-tops20
1021 ;;
1022 tower | tower-32)
1023 basic_machine=m68k-ncr
1024 ;;
1025 tpf)
1026 basic_machine=s390x-ibm
1027 os=-tpf
1028 ;;
1029 udi29k)
1030 basic_machine=a29k-amd
1031 os=-udi
1032 ;;
1033 ultra3)
1034 basic_machine=a29k-nyu
1035 os=-sym1
1036 ;;
1037 v810 | necv810)
1038 basic_machine=v810-nec
1039 os=-none
1040 ;;
1041 vaxv)
1042 basic_machine=vax-dec
1043 os=-sysv
1044 ;;
1045 vms)
1046 basic_machine=vax-dec
1047 os=-vms
1048 ;;
1049 vpp*|vx|vx-*)
1050 basic_machine=f301-fujitsu
1051 ;;
1052 vxworks960)
1053 basic_machine=i960-wrs
1054 os=-vxworks
1055 ;;
1056 vxworks68)
1057 basic_machine=m68k-wrs
1058 os=-vxworks
1059 ;;
1060 vxworks29k)
1061 basic_machine=a29k-wrs
1062 os=-vxworks
1063 ;;
1064 w65*)
1065 basic_machine=w65-wdc
1066 os=-none
1067 ;;
1068 w89k-*)
1069 basic_machine=hppa1.1-winbond
1070 os=-proelf
1071 ;;
1072 xbox)
1073 basic_machine=i686-pc
1074 os=-mingw32
1075 ;;
1076 xps | xps100)
1077 basic_machine=xps100-honeywell
1078 ;;
1079 ymp)
1080 basic_machine=ymp-cray
1081 os=-unicos
1082 ;;
1083 z8k-*-coff)
1084 basic_machine=z8k-unknown
1085 os=-sim
1086 ;;
1087 none)
1088 basic_machine=none-none
1089 os=-none
1090 ;;
1091
1092# Here we handle the default manufacturer of certain CPU types. It is in
1093# some cases the only manufacturer, in others, it is the most popular.
1094 w89k)
1095 basic_machine=hppa1.1-winbond
1096 ;;
1097 op50n)
1098 basic_machine=hppa1.1-oki
1099 ;;
1100 op60c)
1101 basic_machine=hppa1.1-oki
1102 ;;
1103 romp)
1104 basic_machine=romp-ibm
1105 ;;
1106 mmix)
1107 basic_machine=mmix-knuth
1108 ;;
1109 rs6000)
1110 basic_machine=rs6000-ibm
1111 ;;
1112 vax)
1113 basic_machine=vax-dec
1114 ;;
1115 pdp10)
1116 # there are many clones, so DEC is not a safe bet
1117 basic_machine=pdp10-unknown
1118 ;;
1119 pdp11)
1120 basic_machine=pdp11-dec
1121 ;;
1122 we32k)
1123 basic_machine=we32k-att
1124 ;;
1125 sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
1126 basic_machine=sh-unknown
1127 ;;
1128 sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
1129 basic_machine=sparc-sun
1130 ;;
1131 cydra)
1132 basic_machine=cydra-cydrome
1133 ;;
1134 orion)
1135 basic_machine=orion-highlevel
1136 ;;
1137 orion105)
1138 basic_machine=clipper-highlevel
1139 ;;
1140 mac | mpw | mac-mpw)
1141 basic_machine=m68k-apple
1142 ;;
1143 pmac | pmac-mpw)
1144 basic_machine=powerpc-apple
1145 ;;
1146 *-unknown)
1147 # Make sure to match an already-canonicalized machine name.
1148 ;;
1149 *)
1150 echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
1151 exit 1
1152 ;;
1153esac
1154
1155# Here we canonicalize certain aliases for manufacturers.
1156case $basic_machine in
1157 *-digital*)
1158 basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
1159 ;;
1160 *-commodore*)
1161 basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
1162 ;;
1163 *)
1164 ;;
1165esac
1166
1167# Decode manufacturer-specific aliases for certain operating systems.
1168
1169if [ x"$os" != x"" ]
1170then
1171case $os in
1172 # First match some system type aliases
1173 # that might get confused with valid system types.
1174 # -solaris* is a basic system type, with this one exception.
1175 -solaris1 | -solaris1.*)
1176 os=`echo $os | sed -e 's|solaris1|sunos4|'`
1177 ;;
1178 -solaris)
1179 os=-solaris2
1180 ;;
1181 -svr4*)
1182 os=-sysv4
1183 ;;
1184 -unixware*)
1185 os=-sysv4.2uw
1186 ;;
1187 -gnu/linux*)
1188 os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
1189 ;;
1190 # First accept the basic system types.
1191 # The portable systems comes first.
1192 # Each alternative MUST END IN A *, to match a version number.
1193 # -sysv* is not here because it comes later, after sysvr4.
1194 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
1195 | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
1196 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
1197 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
1198 | -aos* \
1199 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
1200 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
1201 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1202 | -openbsd* | -solidbsd* \
1203 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
1204 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
1205 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
1206 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1207 | -chorusos* | -chorusrdb* \
1208 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1209 | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
1210 | -uxpv* | -beos* | -mpeix* | -udk* \
1211 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1212 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
1213 | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
1214 | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
1215 | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
1216 | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
1217 | -skyos* | -haiku* | -rdos* | -toppers*)
1218 # Remember, each alternative MUST END IN *, to match a version number.
1219 ;;
1220 -qnx*)
1221 case $basic_machine in
1222 x86-* | i*86-*)
1223 ;;
1224 *)
1225 os=-nto$os
1226 ;;
1227 esac
1228 ;;
1229 -nto-qnx*)
1230 ;;
1231 -nto*)
1232 os=`echo $os | sed -e 's|nto|nto-qnx|'`
1233 ;;
1234 -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
1235 | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
1236 | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
1237 ;;
1238 -mac*)
1239 os=`echo $os | sed -e 's|mac|macos|'`
1240 ;;
1241 -linux-dietlibc)
1242 os=-linux-dietlibc
1243 ;;
1244 -linux*)
1245 os=`echo $os | sed -e 's|linux|linux-gnu|'`
1246 ;;
1247 -sunos5*)
1248 os=`echo $os | sed -e 's|sunos5|solaris2|'`
1249 ;;
1250 -sunos6*)
1251 os=`echo $os | sed -e 's|sunos6|solaris3|'`
1252 ;;
1253 -opened*)
1254 os=-openedition
1255 ;;
1256 -os400*)
1257 os=-os400
1258 ;;
1259 -wince*)
1260 os=-wince
1261 ;;
1262 -osfrose*)
1263 os=-osfrose
1264 ;;
1265 -osf*)
1266 os=-osf
1267 ;;
1268 -utek*)
1269 os=-bsd
1270 ;;
1271 -dynix*)
1272 os=-bsd
1273 ;;
1274 -acis*)
1275 os=-aos
1276 ;;
1277 -atheos*)
1278 os=-atheos
1279 ;;
1280 -syllable*)
1281 os=-syllable
1282 ;;
1283 -386bsd)
1284 os=-bsd
1285 ;;
1286 -ctix* | -uts*)
1287 os=-sysv
1288 ;;
1289 -nova*)
1290 os=-rtmk-nova
1291 ;;
1292 -ns2 )
1293 os=-nextstep2
1294 ;;
1295 -nsk*)
1296 os=-nsk
1297 ;;
1298 # Preserve the version number of sinix5.
1299 -sinix5.*)
1300 os=`echo $os | sed -e 's|sinix|sysv|'`
1301 ;;
1302 -sinix*)
1303 os=-sysv4
1304 ;;
1305 -tpf*)
1306 os=-tpf
1307 ;;
1308 -triton*)
1309 os=-sysv3
1310 ;;
1311 -oss*)
1312 os=-sysv3
1313 ;;
1314 -svr4)
1315 os=-sysv4
1316 ;;
1317 -svr3)
1318 os=-sysv3
1319 ;;
1320 -sysvr4)
1321 os=-sysv4
1322 ;;
1323 # This must come after -sysvr4.
1324 -sysv*)
1325 ;;
1326 -ose*)
1327 os=-ose
1328 ;;
1329 -es1800*)
1330 os=-ose
1331 ;;
1332 -xenix)
1333 os=-xenix
1334 ;;
1335 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1336 os=-mint
1337 ;;
1338 -aros*)
1339 os=-aros
1340 ;;
1341 -kaos*)
1342 os=-kaos
1343 ;;
1344 -zvmoe)
1345 os=-zvmoe
1346 ;;
1347 -none)
1348 ;;
1349 *)
1350 # Get rid of the `-' at the beginning of $os.
1351 os=`echo $os | sed 's/[^-]*-//'`
1352 echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
1353 exit 1
1354 ;;
1355esac
1356else
1357
1358# Here we handle the default operating systems that come with various machines.
1359# The value should be what the vendor currently ships out the door with their
1360# machine or put another way, the most popular os provided with the machine.
1361
1362# Note that if you're going to try to match "-MANUFACTURER" here (say,
1363# "-sun"), then you have to tell the case statement up towards the top
1364# that MANUFACTURER isn't an operating system. Otherwise, code above
1365# will signal an error saying that MANUFACTURER isn't an operating
1366# system, and we'll never get to this point.
1367
1368case $basic_machine in
1369 spu-*)
1370 os=-elf
1371 ;;
1372 *-acorn)
1373 os=-riscix1.2
1374 ;;
1375 arm*-rebel)
1376 os=-linux
1377 ;;
1378 arm*-semi)
1379 os=-aout
1380 ;;
1381 c4x-* | tic4x-*)
1382 os=-coff
1383 ;;
1384 # This must come before the *-dec entry.
1385 pdp10-*)
1386 os=-tops20
1387 ;;
1388 pdp11-*)
1389 os=-none
1390 ;;
1391 *-dec | vax-*)
1392 os=-ultrix4.2
1393 ;;
1394 m68*-apollo)
1395 os=-domain
1396 ;;
1397 i386-sun)
1398 os=-sunos4.0.2
1399 ;;
1400 m68000-sun)
1401 os=-sunos3
1402 # This also exists in the configure program, but was not the
1403 # default.
1404 # os=-sunos4
1405 ;;
1406 m68*-cisco)
1407 os=-aout
1408 ;;
1409 mips*-cisco)
1410 os=-elf
1411 ;;
1412 mips*-*)
1413 os=-elf
1414 ;;
1415 or32-*)
1416 os=-coff
1417 ;;
1418 *-tti) # must be before sparc entry or we get the wrong os.
1419 os=-sysv3
1420 ;;
1421 sparc-* | *-sun)
1422 os=-sunos4.1.1
1423 ;;
1424 *-be)
1425 os=-beos
1426 ;;
1427 *-haiku)
1428 os=-haiku
1429 ;;
1430 *-ibm)
1431 os=-aix
1432 ;;
1433 *-knuth)
1434 os=-mmixware
1435 ;;
1436 *-wec)
1437 os=-proelf
1438 ;;
1439 *-winbond)
1440 os=-proelf
1441 ;;
1442 *-oki)
1443 os=-proelf
1444 ;;
1445 *-hp)
1446 os=-hpux
1447 ;;
1448 *-hitachi)
1449 os=-hiux
1450 ;;
1451 i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
1452 os=-sysv
1453 ;;
1454 *-cbm)
1455 os=-amigaos
1456 ;;
1457 *-dg)
1458 os=-dgux
1459 ;;
1460 *-dolphin)
1461 os=-sysv3
1462 ;;
1463 m68k-ccur)
1464 os=-rtu
1465 ;;
1466 m88k-omron*)
1467 os=-luna
1468 ;;
1469 *-next )
1470 os=-nextstep
1471 ;;
1472 *-sequent)
1473 os=-ptx
1474 ;;
1475 *-crds)
1476 os=-unos
1477 ;;
1478 *-ns)
1479 os=-genix
1480 ;;
1481 i370-*)
1482 os=-mvs
1483 ;;
1484 *-next)
1485 os=-nextstep3
1486 ;;
1487 *-gould)
1488 os=-sysv
1489 ;;
1490 *-highlevel)
1491 os=-bsd
1492 ;;
1493 *-encore)
1494 os=-bsd
1495 ;;
1496 *-sgi)
1497 os=-irix
1498 ;;
1499 *-siemens)
1500 os=-sysv4
1501 ;;
1502 *-masscomp)
1503 os=-rtu
1504 ;;
1505 f30[01]-fujitsu | f700-fujitsu)
1506 os=-uxpv
1507 ;;
1508 *-rom68k)
1509 os=-coff
1510 ;;
1511 *-*bug)
1512 os=-coff
1513 ;;
1514 *-apple)
1515 os=-macos
1516 ;;
1517 *-atari*)
1518 os=-mint
1519 ;;
1520 *)
1521 os=-none
1522 ;;
1523esac
1524fi
1525
1526# Here we handle the case where we know the os, and the CPU type, but not the
1527# manufacturer. We pick the logical manufacturer.
1528vendor=unknown
1529case $basic_machine in
1530 *-unknown)
1531 case $os in
1532 -riscix*)
1533 vendor=acorn
1534 ;;
1535 -sunos*)
1536 vendor=sun
1537 ;;
1538 -aix*)
1539 vendor=ibm
1540 ;;
1541 -beos*)
1542 vendor=be
1543 ;;
1544 -hpux*)
1545 vendor=hp
1546 ;;
1547 -mpeix*)
1548 vendor=hp
1549 ;;
1550 -hiux*)
1551 vendor=hitachi
1552 ;;
1553 -unos*)
1554 vendor=crds
1555 ;;
1556 -dgux*)
1557 vendor=dg
1558 ;;
1559 -luna*)
1560 vendor=omron
1561 ;;
1562 -genix*)
1563 vendor=ns
1564 ;;
1565 -mvs* | -opened*)
1566 vendor=ibm
1567 ;;
1568 -os400*)
1569 vendor=ibm
1570 ;;
1571 -ptx*)
1572 vendor=sequent
1573 ;;
1574 -tpf*)
1575 vendor=ibm
1576 ;;
1577 -vxsim* | -vxworks* | -windiss*)
1578 vendor=wrs
1579 ;;
1580 -aux*)
1581 vendor=apple
1582 ;;
1583 -hms*)
1584 vendor=hitachi
1585 ;;
1586 -mpw* | -macos*)
1587 vendor=apple
1588 ;;
1589 -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
1590 vendor=atari
1591 ;;
1592 -vos*)
1593 vendor=stratus
1594 ;;
1595 esac
1596 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
1597 ;;
1598esac
1599
1600echo $basic_machine$os
1601exit
1602
1603# Local variables:
1604# eval: (add-hook 'write-file-hooks 'time-stamp)
1605# time-stamp-start: "timestamp='"
1606# time-stamp-format: "%:y-%02m-%02d"
1607# time-stamp-end: "'"
1608# End:
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 00000000..39fed6af
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,36 @@
1dnl Process this file with autoconf to produce a configure script.
2AC_INIT([libwebserver],[0.5.3-GNUnet],[bug-gnunet@gnu.org])
3AM_INIT_AUTOMAKE([libwebserver], [0.5.3-GNUnet])
4AC_CONFIG_HEADER([config.h])
5
6AC_PROG_CC
7AC_PROG_MAKE_SET
8AC_PROG_INSTALL
9AC_DISABLE_STATIC
10AC_PROG_LIBTOOL
11
12AC_HEADER_STDC
13AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netinet/in.h stddef.h stdlib.h string.h sys/socket.h sys/time.h unistd.h])
14
15# Checks for typedefs, structures, and compiler characteristics.
16AC_C_CONST
17AC_TYPE_SIZE_T
18AC_HEADER_TIME
19AC_STRUCT_TM
20
21# Checks for library functions.
22AC_FUNC_MEMCMP
23AC_TYPE_SIGNAL
24AC_FUNC_STRFTIME
25AC_FUNC_VPRINTF
26AC_CHECK_FUNCS([inet_ntoa memset select socket strchr strerror strncasecmp strstr strtol])
27
28AC_SUBST(INCLUDE)
29AC_SUBST(LIBDIR)
30AC_SUBST(LIBS)
31
32AC_CONFIG_FILES([Makefile
33src/Makefile
34include/Makefile
35])
36AC_OUTPUT
diff --git a/contrib/Win32/dirent.c b/contrib/Win32/dirent.c
new file mode 100644
index 00000000..5f31686e
--- /dev/null
+++ b/contrib/Win32/dirent.c
@@ -0,0 +1,277 @@
1/*
2 dir.c for MS-DOS by Samuel Lam <skl@van-bc.UUCP>, June/87
3 */
4
5/* #ifdef WIN32 */
6/*
7 * @(#)dir.c 1.4 87/11/06 Public Domain.
8 *
9 * A public domain implementation of BSD directory routines for
10 * MS-DOS. Written by Michael Rendell ({uunet,utai}michael@garfield),
11 * August 1897
12 * Ported to OS/2 by Kai Uwe Rommel
13 * December 1989, February 1990
14 * Ported to Windows NT 22 May 91
15 * other mods Summer '92 brianmo@microsoft.com
16 * opendirx() was horribly written, very inefficient, and did not take care
17 * of all cases. It is still not too clean, but it is far more efficient.
18 * Changes made by Gordon Chaffee (chaffee@bugs-bunny.cs.berkeley.edu)
19 */
20
21
22/*Includes:
23 * crt
24 */
25#include <windows.h>
26#include <stdlib.h>
27#include <string.h>
28#include <sys\types.h>
29#include <sys\stat.h>
30#include "dirent.h"
31
32#define stat _stat
33
34/*
35 * NT specific
36 */
37#include <stdio.h>
38
39/*
40 * random typedefs
41 */
42#define HDIR HANDLE
43#define HFILE HANDLE
44#define PHFILE PHANDLE
45
46/*
47 * local functions
48 */
49static char *getdirent(char *);
50static void free_dircontents(struct _dircontents *);
51
52static HDIR FindHandle;
53static WIN32_FIND_DATA FileFindData;
54
55static struct dirent dp;
56
57DIR *opendirx(char *name, char *pattern)
58{
59 struct stat statb;
60 DIR *dirp;
61 char c;
62 char *s;
63 struct _dircontents *dp;
64 int len;
65 int unc;
66 char path[OFS_MAXPATHNAME];
67 register char *ip, *op;
68
69 for (ip = name, op = path;; op++, ip++) {
70 *op = *ip;
71 if (*ip == '\0') {
72 break;
73 }
74 }
75 len = ip - name;
76 if (len > 0) {
77 unc = ((path[0] == '\\' || path[0] == '/') &&
78 (path[1] == '\\' || path[1] == '/'));
79 c = path[len - 1];
80 if (unc) {
81 if (c != '\\' && c != '/') {
82 path[len] = '/';
83 len++;
84 path[len] = '\0';
85 }
86 } else {
87 if ((c == '\\' || c == '/') && (len > 1)) {
88 len--;
89 path[len] = '\0';
90
91 if (path[len - 1] == ':') {
92 path[len] = '/';
93 len++;
94 path[len] = '.';
95 len++;
96 path[len] = '\0';
97 }
98 } else if (c == ':') {
99 path[len] = '.';
100 len++;
101 path[len] = '\0';
102 }
103 }
104 } else {
105 unc = 0;
106 path[0] = '.';
107 path[1] = '\0';
108 len = 1;
109 }
110
111 if (stat(path, &statb) < 0 || (statb.st_mode & S_IFMT) != S_IFDIR) {
112 return NULL;
113 }
114 dirp = malloc(sizeof(DIR));
115 if (dirp == NULL) {
116 return dirp;
117 }
118 c = path[len - 1];
119 if (c == '.') {
120 if (len == 1) {
121 len--;
122 } else {
123 c = path[len - 2];
124 if (c == '\\' || c == ':') {
125 len--;
126 } else {
127 path[len] = '/';
128 len++;
129 }
130 }
131 } else if (!unc && ((len != 1) || (c != '\\' && c != '/'))) {
132 path[len] = '/';
133 len++;
134 }
135 strcpy(path + len, pattern);
136
137 dirp->dd_loc = 0;
138 dirp->dd_contents = dirp->dd_cp = NULL;
139
140 if ((s = getdirent(path)) == NULL) {
141 return dirp;
142 }
143 do {
144 if (((dp = malloc(sizeof(struct _dircontents))) == NULL) ||
145 ((dp->_d_entry = malloc(strlen(s) + 1)) == NULL)) {
146 if (dp)
147 free(dp);
148 free_dircontents(dirp->dd_contents);
149
150 return NULL;
151 }
152 if (dirp->dd_contents)
153 dirp->dd_cp = dirp->dd_cp->_d_next = dp;
154 else
155 dirp->dd_contents = dirp->dd_cp = dp;
156
157 strcpy(dp->_d_entry, s);
158 dp->_d_next = NULL;
159
160 }
161 while ((s = getdirent(NULL)) != NULL);
162
163 dirp->dd_cp = dirp->dd_contents;
164 return dirp;
165}
166
167DIR *opendir(char *name)
168{
169 return opendirx(name, "*");
170}
171
172void closedir(DIR * dirp)
173{
174 free_dircontents(dirp->dd_contents);
175 free(dirp);
176}
177
178struct dirent *readdir(DIR * dirp)
179{
180 /* static struct dirent dp; */
181 if (dirp->dd_cp == NULL)
182 return NULL;
183
184 /*strcpy(dp.d_name,dirp->dd_cp->_d_entry); */
185
186 dp.d_name = dirp->dd_cp->_d_entry;
187
188 dp.d_namlen = dp.d_reclen =
189 strlen(dp.d_name);
190
191 dp.d_ino = dirp->dd_loc + 1; /* fake the inode */
192
193 dirp->dd_cp = dirp->dd_cp->_d_next;
194 dirp->dd_loc++;
195
196
197 return &dp;
198}
199
200void seekdir(DIR * dirp, long off)
201{
202 long i = off;
203 struct _dircontents *dp;
204
205 if (off >= 0) {
206 for (dp = dirp->dd_contents; --i >= 0 && dp; dp = dp->_d_next);
207
208 dirp->dd_loc = off - (i + 1);
209 dirp->dd_cp = dp;
210 }
211}
212
213
214long telldir(DIR * dirp)
215{
216 return dirp->dd_loc;
217}
218
219static void free_dircontents(struct _dircontents *dp)
220{
221 struct _dircontents *odp;
222
223 while (dp) {
224 if (dp->_d_entry)
225 free(dp->_d_entry);
226
227 dp = (odp = dp)->_d_next;
228 free(odp);
229 }
230}
231/* end of "free_dircontents" */
232
233static char *getdirent(char *dir)
234{
235 int got_dirent;
236
237 if (dir != NULL) { /* get first entry */
238 if ((FindHandle = FindFirstFile(dir, &FileFindData))
239 == (HDIR) 0xffffffff) {
240 return NULL;
241 }
242 got_dirent = 1;
243 } else /* get next entry */
244 got_dirent = FindNextFile(FindHandle, &FileFindData);
245
246 if (got_dirent)
247 return FileFindData.cFileName;
248 else {
249 FindClose(FindHandle);
250 return NULL;
251 }
252}
253/* end of getdirent() */
254
255struct passwd *_cdecl
256 getpwnam(char *name)
257{
258 return NULL;
259}
260
261struct passwd *_cdecl
262 getpwuid(int uid)
263{
264 return NULL;
265}
266
267int getuid()
268{
269 return 0;
270}
271
272void _cdecl
273 endpwent(void)
274{
275}
276
277/* #endif */
diff --git a/contrib/Win32/dirent.h b/contrib/Win32/dirent.h
new file mode 100644
index 00000000..c0852a17
--- /dev/null
+++ b/contrib/Win32/dirent.h
@@ -0,0 +1,56 @@
1/*
2 * @(#) dirent.h 2.0 17 Jun 91 Public Domain.
3 *
4 * A public domain implementation of BSD directory routines for
5 * MS-DOS. Written by Michael Rendell ({uunet,utai}michael@garfield),
6 * August 1987
7 *
8 * Enhanced and ported to OS/2 by Kai Uwe Rommel; added scandir() prototype
9 * December 1989, February 1990
10 * Change of MAXPATHLEN for HPFS, October 1990
11 *
12 * Unenhanced and ported to Windows NT by Bill Gallagher
13 * 17 Jun 91
14 * changed d_name to char * instead of array, removed non-std extensions
15 *
16 * Cleanup, other hackery, Summer '92, Brian Moran , brianmo@microsoft.com
17 */
18
19#ifndef _DIRENT
20#define _DIRENT
21
22#include <direct.h>
23
24struct dirent
25{
26 ino_t d_ino; /* a bit of a farce */
27 short d_reclen; /* more farce */
28 short d_namlen; /* length of d_name */
29 char *d_name;
30};
31
32struct _dircontents
33{
34 char *_d_entry;
35 struct _dircontents *_d_next;
36};
37
38typedef struct _dirdesc
39{
40 int dd_id; /* uniquely identify each open directory*/
41 long dd_loc; /* where we are in directory entry */
42 struct _dircontents *dd_contents; /* pointer to contents of dir */
43 struct _dircontents *dd_cp; /* pointer to current position */
44}
45DIR;
46
47extern DIR *opendir(char *);
48extern struct dirent *readdir(DIR *);
49extern void seekdir(DIR *, long);
50extern long telldir(DIR *);
51extern void closedir(DIR *);
52#define rewinddir(dirp) seekdir(dirp, 0L)
53
54#endif /* _DIRENT */
55
56/* end of dirent.h */
diff --git a/contrib/Win32/flock.c b/contrib/Win32/flock.c
new file mode 100644
index 00000000..89238625
--- /dev/null
+++ b/contrib/Win32/flock.c
@@ -0,0 +1,57 @@
1/* Copyrights 2002 Luis Figueiredo (stdio@netc.pt) All rights reserved.
2 *
3 * See the LICENSE file
4 *
5 * The origin of this software must not be misrepresented, either by
6 * explicit claim or by omission. Since few users ever read sources,
7 * credits must appear in the documentation.
8 *
9 * date: 19:49,07-49-2002
10 *
11 * -- description: File lock for winnt
12 *
13
14/*********************************************************************************************************/
15/*
16 * simulate a file lock, using locking region on WINNT
17 */
18#include "flock.h"
19
20
21
22#define LK_ERR(f,i) ((f) ? (i = 0) : (i=-1))
23#define LK_LEN 0xffff0000
24
25int flock(int fd, int oper) {
26 OVERLAPPED o;
27 int i = -1;
28 HANDLE fh;
29
30 fh = (HANDLE)_get_osfhandle(fd);
31 memset(&o, 0, sizeof(o));
32
33 switch(oper) {
34 case LOCK_SH: /* shared lock */
35 LK_ERR(LockFileEx(fh, 0, 0, LK_LEN, 0, &o),i);
36 break;
37 case LOCK_EX: /* exclusive lock */
38 LK_ERR(LockFileEx(fh, LOCKFILE_EXCLUSIVE_LOCK, 0, LK_LEN, 0, &o),i);
39 break;
40 case LOCK_SH|LOCK_NB: /* non-blocking shared lock */
41 LK_ERR(LockFileEx(fh, LOCKFILE_FAIL_IMMEDIATELY, 0, LK_LEN, 0, &o),i);
42 break;
43 case LOCK_EX|LOCK_NB: /* non-blocking exclusive lock */
44 LK_ERR(LockFileEx(fh,LOCKFILE_EXCLUSIVE_LOCK|LOCKFILE_FAIL_IMMEDIATELY,0, LK_LEN, 0, &o),i);
45 break;
46 case LOCK_UN: /* unlock lock */
47 LK_ERR(UnlockFileEx(fh, 0, LK_LEN, 0, &o),i);
48 break;
49 default: /* unknown */
50 //errno = EINVAL; // i heard that on some versions errno is a function (win32 MT lib?)
51 break;
52 }
53 return i;
54}
55
56#undef LK_ERR
57#undef LK_LEN \ No newline at end of file
diff --git a/contrib/Win32/flock.h b/contrib/Win32/flock.h
new file mode 100644
index 00000000..0ea72cf1
--- /dev/null
+++ b/contrib/Win32/flock.h
@@ -0,0 +1,31 @@
1/* Copyrights 2002 Luis Figueiredo (stdio@netc.pt) All rights reserved.
2 *
3 * See the LICENSE file
4 *
5 * The origin of this software must not be misrepresented, either by
6 * explicit claim or by omission. Since few users ever read sources,
7 * credits must appear in the documentation.
8 *
9 * file: utils.h
10 *
11 * description: Header
12 *
13 * date: 19:50,07-50-2002
14 */
15
16#ifndef _FLOCK_H_
17#define _FLOCK_H_
18
19#include <windows.h>
20#include <io.h> // this?
21#include <errno.h>
22
23#define LOCK_SH 1
24#define LOCK_EX 2
25#define LOCK_NB 4
26#define LOCK_UN 8
27
28int flock (int,int);
29
30
31#endif \ No newline at end of file
diff --git a/contrib/Win32/help/help.cfg b/contrib/Win32/help/help.cfg
new file mode 100644
index 00000000..6fbb727e
--- /dev/null
+++ b/contrib/Win32/help/help.cfg
@@ -0,0 +1,13 @@
1[LIBWEBSERVER]
2LOG=help.log
3PORT=81
4USESSL=0
5LOCAL=0
6DYNVAR=0
7
8
9[PERSONAL_CONF]
10PORT=Portability
11MOST=general key guard
12IP=127.0.0.1
13
diff --git a/contrib/Win32/help/help.dsp b/contrib/Win32/help/help.dsp
new file mode 100644
index 00000000..a1cecd1d
--- /dev/null
+++ b/contrib/Win32/help/help.dsp
@@ -0,0 +1,157 @@
1# Microsoft Developer Studio Project File - Name="help" - Package Owner=<4>
2# Microsoft Developer Studio Generated Build File, Format Version 6.00
3# ** DO NOT EDIT **
4
5# TARGTYPE "Win32 (x86) Console Application" 0x0103
6
7CFG=help - Win32 Release
8!MESSAGE This is not a valid makefile. To build this project using NMAKE,
9!MESSAGE use the Export Makefile command and run
10!MESSAGE
11!MESSAGE NMAKE /f "help.mak".
12!MESSAGE
13!MESSAGE You can specify a configuration when running NMAKE
14!MESSAGE by defining the macro CFG on the command line. For example:
15!MESSAGE
16!MESSAGE NMAKE /f "help.mak" CFG="help - Win32 Release"
17!MESSAGE
18!MESSAGE Possible choices for configuration are:
19!MESSAGE
20!MESSAGE "help - Win32 Release" (based on "Win32 (x86) Console Application")
21!MESSAGE "help - Win32 Debug" (based on "Win32 (x86) Console Application")
22!MESSAGE
23
24# Begin Project
25# PROP AllowPerConfigDependencies 0
26# PROP Scc_ProjName ""
27# PROP Scc_LocalPath ""
28CPP=cl.exe
29RSC=rc.exe
30
31!IF "$(CFG)" == "help - Win32 Release"
32
33# PROP BASE Use_MFC 0
34# PROP BASE Use_Debug_Libraries 0
35# PROP BASE Output_Dir "Release"
36# PROP BASE Intermediate_Dir "Release"
37# PROP BASE Target_Dir ""
38# PROP Use_MFC 0
39# PROP Use_Debug_Libraries 0
40# PROP Output_Dir "Release"
41# PROP Intermediate_Dir "Release"
42# PROP Ignore_Export_Lib 0
43# PROP Target_Dir ""
44# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
45# ADD CPP /nologo /W3 /GX /O2 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /Zm200 /c
46# ADD BASE RSC /l 0x816 /d "NDEBUG"
47# ADD RSC /l 0x816 /d "NDEBUG"
48BSC32=bscmake.exe
49# ADD BASE BSC32 /nologo
50# ADD BSC32 /nologo
51LINK32=link.exe
52# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
53# ADD LINK32 libwebserver.lib wsock32.lib user32.lib /nologo /subsystem:console /machine:I386 /out:"../../bin/help.exe" /libpath:"../../bin"
54# SUBTRACT LINK32 /pdb:none /nodefaultlib
55
56!ELSEIF "$(CFG)" == "help - Win32 Debug"
57
58# PROP BASE Use_MFC 0
59# PROP BASE Use_Debug_Libraries 1
60# PROP BASE Output_Dir "Debug"
61# PROP BASE Intermediate_Dir "Debug"
62# PROP BASE Target_Dir ""
63# PROP Use_MFC 0
64# PROP Use_Debug_Libraries 1
65# PROP Output_Dir "Debug"
66# PROP Intermediate_Dir "Debug"
67# PROP Ignore_Export_Lib 0
68# PROP Target_Dir ""
69# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
70# ADD CPP /nologo /Gm /GX /ZI /Od /I "../../include" /D "_CONSOLE" /D "WIN32" /D "DEBUG" /D "_MBCS" /FA /FR /YX /FD /Zm200 /GZ /c
71# ADD BASE RSC /l 0x816 /d "_DEBUG"
72# ADD RSC /l 0x816 /d "DEBUG"
73BSC32=bscmake.exe
74# ADD BASE BSC32 /nologo
75# ADD BSC32 /nologo
76LINK32=link.exe
77# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
78# ADD LINK32 libwebserver.lib wsock32.lib user32.lib /nologo /subsystem:console /debug /machine:I386 /out:"../../bin/help.exe" /pdbtype:sept /libpath:"../../bin"
79# SUBTRACT LINK32 /pdb:none
80
81!ENDIF
82
83# Begin Target
84
85# Name "help - Win32 Release"
86# Name "help - Win32 Debug"
87# Begin Group "Source Files"
88
89# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
90# Begin Source File
91
92SOURCE=..\..\help\help.c
93
94!IF "$(CFG)" == "help - Win32 Release"
95
96# ADD CPP /I "../../include ./"
97# SUBTRACT CPP /I "../../include"
98
99!ELSEIF "$(CFG)" == "help - Win32 Debug"
100
101# ADD CPP /I "../../include help/"
102# SUBTRACT CPP /I "../../include"
103
104!ENDIF
105
106# End Source File
107# Begin Source File
108
109SOURCE=.\help.rc
110# End Source File
111# End Group
112# Begin Group "Header Files"
113
114# PROP Default_Filter "h;hpp;hxx;hm;inl"
115# Begin Source File
116
117SOURCE=..\..\help\examples.h
118# End Source File
119# Begin Source File
120
121SOURCE=..\..\help\functions.h
122# End Source File
123# Begin Source File
124
125SOURCE=..\..\help\info.h
126# End Source File
127# Begin Source File
128
129SOURCE=..\..\help\security.h
130# End Source File
131# End Group
132# Begin Group "Resource Files"
133
134# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
135# Begin Source File
136
137SOURCE=.\help.ico
138# End Source File
139# End Group
140# Begin Source File
141
142SOURCE=..\..\help.html\examples.html
143# End Source File
144# Begin Source File
145
146SOURCE=..\..\help.html\functions.html
147# End Source File
148# Begin Source File
149
150SOURCE=..\..\help.html\info.html
151# End Source File
152# Begin Source File
153
154SOURCE=..\..\help.html\security.html
155# End Source File
156# End Target
157# End Project
diff --git a/contrib/Win32/help/help.ico b/contrib/Win32/help/help.ico
new file mode 100644
index 00000000..1523bb39
--- /dev/null
+++ b/contrib/Win32/help/help.ico
Binary files differ
diff --git a/contrib/Win32/help/help.rc b/contrib/Win32/help/help.rc
new file mode 100644
index 00000000..23179828
--- /dev/null
+++ b/contrib/Win32/help/help.rc
@@ -0,0 +1,72 @@
1//Microsoft Developer Studio generated resource script.
2//
3#include "resource.h"
4
5#define APSTUDIO_READONLY_SYMBOLS
6/////////////////////////////////////////////////////////////////////////////
7//
8// Generated from the TEXTINCLUDE 2 resource.
9//
10#include "afxres.h"
11
12/////////////////////////////////////////////////////////////////////////////
13#undef APSTUDIO_READONLY_SYMBOLS
14
15/////////////////////////////////////////////////////////////////////////////
16// Portuguese (Portugal) resources
17
18#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_PTG)
19#ifdef _WIN32
20LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE
21#pragma code_page(1252)
22#endif //_WIN32
23
24#ifdef APSTUDIO_INVOKED
25/////////////////////////////////////////////////////////////////////////////
26//
27// TEXTINCLUDE
28//
29
301 TEXTINCLUDE DISCARDABLE
31BEGIN
32 "resource.h\0"
33END
34
352 TEXTINCLUDE DISCARDABLE
36BEGIN
37 "#include ""afxres.h""\r\n"
38 "\0"
39END
40
413 TEXTINCLUDE DISCARDABLE
42BEGIN
43 "\r\n"
44 "\0"
45END
46
47#endif // APSTUDIO_INVOKED
48
49
50/////////////////////////////////////////////////////////////////////////////
51//
52// Icon
53//
54
55// Icon with lowest ID value placed first to ensure application icon
56// remains consistent on all systems.
57IDI_ICON1 ICON DISCARDABLE "help.ico"
58#endif // Portuguese (Portugal) resources
59/////////////////////////////////////////////////////////////////////////////
60
61
62
63#ifndef APSTUDIO_INVOKED
64/////////////////////////////////////////////////////////////////////////////
65//
66// Generated from the TEXTINCLUDE 3 resource.
67//
68
69
70/////////////////////////////////////////////////////////////////////////////
71#endif // not APSTUDIO_INVOKED
72
diff --git a/contrib/Win32/help/mime.types b/contrib/Win32/help/mime.types
new file mode 100644
index 00000000..16c8cbd5
--- /dev/null
+++ b/contrib/Win32/help/mime.types
@@ -0,0 +1,469 @@
1# This is a comment. I love comments.
2
3# This file controls what Internet media types are sent to the client for
4# given file extension(s). Sending the correct media type to the client
5# is important so they know how to handle the content of the file.
6# Extra types can either be added here or by using an AddType directive
7# in your config files. For more information about Internet media types,
8# please read RFC 2045, 2046, 2047, 2048, and 2077. The Internet media type
9# registry is at <ftp://ftp.iana.org/in-notes/iana/assignments/media-types/>.
10
11# MIME type Extension
12application/EDI-Consent
13application/EDI-X12
14application/EDIFACT
15application/activemessage
16application/andrew-inset ez
17application/applefile
18application/atomicmail
19application/batch-SMTP
20application/beep+xml
21application/cals-1840
22application/commonground
23application/cybercash
24application/dca-rft
25application/dec-dx
26application/dvcs
27application/eshop
28application/http
29application/hyperstudio
30application/iges
31application/index
32application/index.cmd
33application/index.obj
34application/index.response
35application/index.vnd
36application/iotp
37application/ipp
38application/isup
39application/font-tdpfr
40application/mac-binhex40 hqx
41application/mac-compactpro cpt
42application/macwriteii
43application/marc
44application/mathematica
45application/mathematica-old
46application/msword doc
47application/news-message-id
48application/news-transmission
49application/ocsp-request
50application/ocsp-response
51application/octet-stream bin dms lha lzh exe class so dll
52application/oda oda
53application/parityfec
54application/pdf pdf
55application/pgp-encrypted
56application/pgp-keys
57application/pgp-signature
58application/pkcs10
59application/pkcs7-mime
60application/pkcs7-signature
61application/pkix-cert
62application/pkix-crl
63application/pkixcmp
64application/postscript ai eps ps
65application/prs.alvestrand.titrax-sheet
66application/prs.cww
67application/prs.nprend
68application/qsig
69application/remote-printing
70application/riscos
71application/rtf
72application/sdp
73application/set-payment
74application/set-payment-initiation
75application/set-registration
76application/set-registration-initiation
77application/sgml
78application/sgml-open-catalog
79application/sieve
80application/slate
81application/smil smi smil
82application/timestamp-query
83application/timestamp-reply
84application/vemmi
85application/vnd.3M.Post-it-Notes
86application/vnd.FloGraphIt
87application/vnd.accpac.simply.aso
88application/vnd.accpac.simply.imp
89application/vnd.acucobol
90application/vnd.aether.imp
91application/vnd.anser-web-certificate-issue-initiation
92application/vnd.anser-web-funds-transfer-initiation
93application/vnd.audiograph
94application/vnd.businessobjects
95application/vnd.bmi
96application/vnd.canon-cpdl
97application/vnd.canon-lips
98application/vnd.claymore
99application/vnd.commerce-battelle
100application/vnd.commonspace
101application/vnd.comsocaller
102application/vnd.contact.cmsg
103application/vnd.cosmocaller
104application/vnd.cups-postscript
105application/vnd.cups-raster
106application/vnd.cups-raw
107application/vnd.ctc-posml
108application/vnd.cybank
109application/vnd.dna
110application/vnd.dpgraph
111application/vnd.dxr
112application/vnd.ecdis-update
113application/vnd.ecowin.chart
114application/vnd.ecowin.filerequest
115application/vnd.ecowin.fileupdate
116application/vnd.ecowin.series
117application/vnd.ecowin.seriesrequest
118application/vnd.ecowin.seriesupdate
119application/vnd.enliven
120application/vnd.epson.esf
121application/vnd.epson.msf
122application/vnd.epson.quickanime
123application/vnd.epson.salt
124application/vnd.epson.ssf
125application/vnd.ericsson.quickcall
126application/vnd.eudora.data
127application/vnd.fdf
128application/vnd.ffsns
129application/vnd.framemaker
130application/vnd.fsc.weblaunch
131application/vnd.fujitsu.oasys
132application/vnd.fujitsu.oasys2
133application/vnd.fujitsu.oasys3
134application/vnd.fujitsu.oasysgp
135application/vnd.fujitsu.oasysprs
136application/vnd.fujixerox.ddd
137application/vnd.fujixerox.docuworks
138application/vnd.fujixerox.docuworks.binder
139application/vnd.fut-misnet
140application/vnd.grafeq
141application/vnd.groove-account
142application/vnd.groove-identity-message
143application/vnd.groove-injector
144application/vnd.groove-tool-message
145application/vnd.groove-tool-template
146application/vnd.groove-vcard
147application/vnd.hhe.lesson-player
148application/vnd.hp-HPGL
149application/vnd.hp-PCL
150application/vnd.hp-PCLXL
151application/vnd.hp-hpid
152application/vnd.hp-hps
153application/vnd.httphone
154application/vnd.hzn-3d-crossword
155application/vnd.ibm.afplinedata
156application/vnd.ibm.MiniPay
157application/vnd.ibm.modcap
158application/vnd.informix-visionary
159application/vnd.intercon.formnet
160application/vnd.intertrust.digibox
161application/vnd.intertrust.nncp
162application/vnd.intu.qbo
163application/vnd.intu.qfx
164application/vnd.irepository.package+xml
165application/vnd.is-xpr
166application/vnd.japannet-directory-service
167application/vnd.japannet-jpnstore-wakeup
168application/vnd.japannet-payment-wakeup
169application/vnd.japannet-registration
170application/vnd.japannet-registration-wakeup
171application/vnd.japannet-setstore-wakeup
172application/vnd.japannet-verification
173application/vnd.japannet-verification-wakeup
174application/vnd.koan
175application/vnd.lotus-1-2-3
176application/vnd.lotus-approach
177application/vnd.lotus-freelance
178application/vnd.lotus-notes
179application/vnd.lotus-organizer
180application/vnd.lotus-screencam
181application/vnd.lotus-wordpro
182application/vnd.mcd
183application/vnd.mediastation.cdkey
184application/vnd.meridian-slingshot
185application/vnd.mif mif
186application/vnd.minisoft-hp3000-save
187application/vnd.mitsubishi.misty-guard.trustweb
188application/vnd.mobius.daf
189application/vnd.mobius.dis
190application/vnd.mobius.msl
191application/vnd.mobius.plc
192application/vnd.mobius.txf
193application/vnd.motorola.flexsuite
194application/vnd.motorola.flexsuite.adsi
195application/vnd.motorola.flexsuite.fis
196application/vnd.motorola.flexsuite.gotap
197application/vnd.motorola.flexsuite.kmr
198application/vnd.motorola.flexsuite.ttc
199application/vnd.motorola.flexsuite.wem
200application/vnd.mozilla.xul+xml
201application/vnd.ms-artgalry
202application/vnd.ms-asf
203application/vnd.ms-excel xls
204application/vnd.ms-lrm
205application/vnd.ms-powerpoint ppt
206application/vnd.ms-project
207application/vnd.ms-tnef
208application/vnd.ms-works
209application/vnd.mseq
210application/vnd.msign
211application/vnd.music-niff
212application/vnd.musician
213application/vnd.netfpx
214application/vnd.noblenet-directory
215application/vnd.noblenet-sealer
216application/vnd.noblenet-web
217application/vnd.novadigm.EDM
218application/vnd.novadigm.EDX
219application/vnd.novadigm.EXT
220application/vnd.osa.netdeploy
221application/vnd.palm
222application/vnd.pg.format
223application/vnd.pg.osasli
224application/vnd.powerbuilder6
225application/vnd.powerbuilder6-s
226application/vnd.powerbuilder7
227application/vnd.powerbuilder7-s
228application/vnd.powerbuilder75
229application/vnd.powerbuilder75-s
230application/vnd.previewsystems.box
231application/vnd.publishare-delta-tree
232application/vnd.pvi.ptid1
233application/vnd.pwg-xhtml-print+xml
234application/vnd.rapid
235application/vnd.s3sms
236application/vnd.seemail
237application/vnd.shana.informed.formdata
238application/vnd.shana.informed.formtemplate
239application/vnd.shana.informed.interchange
240application/vnd.shana.informed.package
241application/vnd.sss-cod
242application/vnd.sss-dtf
243application/vnd.sss-ntf
244application/vnd.street-stream
245application/vnd.svd
246application/vnd.swiftview-ics
247application/vnd.triscape.mxs
248application/vnd.trueapp
249application/vnd.truedoc
250application/vnd.tve-trigger
251application/vnd.ufdl
252application/vnd.uplanet.alert
253application/vnd.uplanet.alert-wbxml
254application/vnd.uplanet.bearer-choice-wbxml
255application/vnd.uplanet.bearer-choice
256application/vnd.uplanet.cacheop
257application/vnd.uplanet.cacheop-wbxml
258application/vnd.uplanet.channel
259application/vnd.uplanet.channel-wbxml
260application/vnd.uplanet.list
261application/vnd.uplanet.list-wbxml
262application/vnd.uplanet.listcmd
263application/vnd.uplanet.listcmd-wbxml
264application/vnd.uplanet.signal
265application/vnd.vcx
266application/vnd.vectorworks
267application/vnd.vidsoft.vidconference
268application/vnd.visio
269application/vnd.vividence.scriptfile
270application/vnd.wap.sic
271application/vnd.wap.slc
272application/vnd.wap.wbxml wbxml
273application/vnd.wap.wmlc wmlc
274application/vnd.wap.wmlscriptc wmlsc
275application/vnd.webturbo
276application/vnd.wrq-hp3000-labelled
277application/vnd.wt.stf
278application/vnd.xara
279application/vnd.xfdl
280application/vnd.yellowriver-custom-menu
281application/whoispp-query
282application/whoispp-response
283application/wita
284application/wordperfect5.1
285application/x-bcpio bcpio
286application/x-cdlink vcd
287application/x-chess-pgn pgn
288application/x-compress
289application/x-cpio cpio
290application/x-csh csh
291application/x-director dcr dir dxr
292application/x-dvi dvi
293application/x-futuresplash spl
294application/x-gtar gtar
295application/x-gzip
296application/x-hdf hdf
297application/x-javascript js
298application/x-koan skp skd skt skm
299application/x-latex latex
300application/x-netcdf nc cdf
301application/x-sh sh
302application/x-shar shar
303application/x-shockwave-flash swf
304application/x-stuffit sit
305application/x-sv4cpio sv4cpio
306application/x-sv4crc sv4crc
307application/x-tar tar
308application/x-tcl tcl
309application/x-tex tex
310application/x-texinfo texinfo texi
311application/x-troff t tr roff
312application/x-troff-man man
313application/x-troff-me me
314application/x-troff-ms ms
315application/x-ustar ustar
316application/x-wais-source src
317application/x400-bp
318application/xml
319application/xml-dtd
320application/xml-external-parsed-entity
321application/zip zip
322audio/32kadpcm
323audio/basic au snd
324audio/g.722.1
325audio/l16
326audio/midi mid midi kar
327audio/mp4a-latm
328audio/mpa-robust
329audio/mpeg mpga mp2 mp3
330audio/parityfec
331audio/prs.sid
332audio/telephone-event
333audio/tone
334audio/vnd.cisco.nse
335audio/vnd.cns.anp1
336audio/vnd.cns.inf1
337audio/vnd.digital-winds
338audio/vnd.everad.plj
339audio/vnd.lucent.voice
340audio/vnd.nortel.vbk
341audio/vnd.nuera.ecelp4800
342audio/vnd.nuera.ecelp7470
343audio/vnd.nuera.ecelp9600
344audio/vnd.octel.sbc
345audio/vnd.qcelp
346audio/vnd.rhetorex.32kadpcm
347audio/vnd.vmx.cvsd
348audio/x-aiff aif aiff aifc
349audio/x-mpegurl m3u
350audio/x-pn-realaudio ram rm
351audio/x-pn-realaudio-plugin rpm
352audio/x-realaudio ra
353audio/x-wav wav
354chemical/x-pdb pdb
355chemical/x-xyz xyz
356image/bmp bmp
357image/cgm
358image/g3fax
359image/gif gif
360image/ief ief
361image/jpeg jpeg jpg jpe
362image/naplps
363image/png png
364image/prs.btif
365image/prs.pti
366image/tiff tiff tif
367image/vnd.cns.inf2
368image/vnd.dwg
369image/vnd.dxf
370image/vnd.fastbidsheet
371image/vnd.fpx
372image/vnd.fst
373image/vnd.fujixerox.edmics-mmr
374image/vnd.fujixerox.edmics-rlc
375image/vnd.mix
376image/vnd.net-fpx
377image/vnd.svf
378image/vnd.wap.wbmp wbmp
379image/vnd.xiff
380image/x-cmu-raster ras
381image/x-portable-anymap pnm
382image/x-portable-bitmap pbm
383image/x-portable-graymap pgm
384image/x-portable-pixmap ppm
385image/x-rgb rgb
386image/x-xbitmap xbm
387image/x-xpixmap xpm
388image/x-xwindowdump xwd
389message/delivery-status
390message/disposition-notification
391message/external-body
392message/http
393message/news
394message/partial
395message/rfc822
396message/s-http
397model/iges igs iges
398model/mesh msh mesh silo
399model/vnd.dwf
400model/vnd.flatland.3dml
401model/vnd.gdl
402model/vnd.gs-gdl
403model/vnd.gtw
404model/vnd.mts
405model/vnd.vtu
406model/vrml wrl vrml
407multipart/alternative
408multipart/appledouble
409multipart/byteranges
410multipart/digest
411multipart/encrypted
412multipart/form-data
413multipart/header-set
414multipart/mixed
415multipart/parallel
416multipart/related
417multipart/report
418multipart/signed
419multipart/voice-message
420text/calendar
421text/css css
422text/directory
423text/enriched
424text/html html htm
425text/parityfec
426text/plain asc txt
427text/prs.lines.tag
428text/rfc822-headers
429text/richtext rtx
430text/rtf rtf
431text/sgml sgml sgm
432text/tab-separated-values tsv
433text/t140
434text/uri-list
435text/vnd.DMClientScript
436text/vnd.IPTC.NITF
437text/vnd.IPTC.NewsML
438text/vnd.abc
439text/vnd.curl
440text/vnd.flatland.3dml
441text/vnd.fly
442text/vnd.fmi.flexstor
443text/vnd.in3d.3dml
444text/vnd.in3d.spot
445text/vnd.latex-z
446text/vnd.motorola.reflex
447text/vnd.ms-mediapackage
448text/vnd.wap.si
449text/vnd.wap.sl
450text/vnd.wap.wml wml
451text/vnd.wap.wmlscript wmls
452text/x-setext etx
453text/xml xml xsl
454text/xml-external-parsed-entity
455video/mp4v-es
456video/mpeg mpeg mpg mpe
457video/parityfec
458video/pointer
459video/quicktime qt mov
460video/vnd.fvt
461video/vnd.motorola.video
462video/vnd.motorola.videop
463video/vnd.mpegurl mxu
464video/vnd.mts
465video/vnd.nokia.interleaved-multimedia
466video/vnd.vivo
467video/x-msvideo avi
468video/x-sgi-movie movie
469x-conference/x-cooltalk ice
diff --git a/contrib/Win32/help/resource.h b/contrib/Win32/help/resource.h
new file mode 100644
index 00000000..a16dbd2c
--- /dev/null
+++ b/contrib/Win32/help/resource.h
@@ -0,0 +1,16 @@
1//{{NO_DEPENDENCIES}}
2// Microsoft Developer Studio generated include file.
3// Used by help.rc
4//
5#define IDI_ICON1 101
6
7// Next default values for new objects
8//
9#ifdef APSTUDIO_INVOKED
10#ifndef APSTUDIO_READONLY_SYMBOLS
11#define _APS_NEXT_RESOURCE_VALUE 102
12#define _APS_NEXT_COMMAND_VALUE 40001
13#define _APS_NEXT_CONTROL_VALUE 1000
14#define _APS_NEXT_SYMED_VALUE 101
15#endif
16#endif
diff --git a/contrib/Win32/libwebserver.dsp b/contrib/Win32/libwebserver.dsp
new file mode 100644
index 00000000..00f36e24
--- /dev/null
+++ b/contrib/Win32/libwebserver.dsp
@@ -0,0 +1,237 @@
1# Microsoft Developer Studio Project File - Name="libwebserver" - Package Owner=<4>
2# Microsoft Developer Studio Generated Build File, Format Version 6.00
3# ** DO NOT EDIT **
4
5# TARGTYPE "Win32 (x86) Static Library" 0x0104
6
7CFG=libwebserver - Win32 Release
8!MESSAGE This is not a valid makefile. To build this project using NMAKE,
9!MESSAGE use the Export Makefile command and run
10!MESSAGE
11!MESSAGE NMAKE /f "libwebserver.mak".
12!MESSAGE
13!MESSAGE You can specify a configuration when running NMAKE
14!MESSAGE by defining the macro CFG on the command line. For example:
15!MESSAGE
16!MESSAGE NMAKE /f "libwebserver.mak" CFG="libwebserver - Win32 Release"
17!MESSAGE
18!MESSAGE Possible choices for configuration are:
19!MESSAGE
20!MESSAGE "libwebserver - Win32 Release" (based on "Win32 (x86) Static Library")
21!MESSAGE "libwebserver - Win32 Debug" (based on "Win32 (x86) Static Library")
22!MESSAGE
23
24# Begin Project
25# PROP AllowPerConfigDependencies 0
26# PROP Scc_ProjName ""
27# PROP Scc_LocalPath ""
28CPP=cl.exe
29RSC=rc.exe
30
31!IF "$(CFG)" == "libwebserver - Win32 Release"
32
33# PROP BASE Use_MFC 0
34# PROP BASE Use_Debug_Libraries 0
35# PROP BASE Output_Dir "Release"
36# PROP BASE Intermediate_Dir "Release"
37# PROP BASE Target_Dir ""
38# PROP Use_MFC 0
39# PROP Use_Debug_Libraries 0
40# PROP Output_Dir "Release"
41# PROP Intermediate_Dir "Release"
42# PROP Target_Dir ""
43# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
44# ADD CPP /nologo /W3 /GX /O2 /I "../include" /I "./" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
45# ADD BASE RSC /l 0x816 /d "NDEBUG"
46# ADD RSC /l 0x816 /d "NDEBUG"
47BSC32=bscmake.exe
48# ADD BASE BSC32 /nologo
49# ADD BSC32 /nologo
50LIB32=link.exe -lib
51# ADD BASE LIB32 /nologo
52# ADD LIB32 /nologo /out:"../bin/libwebserver.lib"
53
54!ELSEIF "$(CFG)" == "libwebserver - Win32 Debug"
55
56# PROP BASE Use_MFC 0
57# PROP BASE Use_Debug_Libraries 1
58# PROP BASE Output_Dir "Debug"
59# PROP BASE Intermediate_Dir "Debug"
60# PROP BASE Target_Dir ""
61# PROP Use_MFC 0
62# PROP Use_Debug_Libraries 1
63# PROP Output_Dir "Debug"
64# PROP Intermediate_Dir "Debug"
65# PROP Target_Dir ""
66# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
67# ADD CPP /nologo /Gm /GX /ZI /Od /I "./" /I "../include" /D "_LIB" /D "WIN32" /D "_DEBUG" /D "_MBCS" /FA /YX /FD /GZ /c
68# SUBTRACT CPP /X
69# ADD BASE RSC /l 0x816 /d "_DEBUG"
70# ADD RSC /l 0x816 /d "DEBUG"
71BSC32=bscmake.exe
72# ADD BASE BSC32 /nologo
73# ADD BSC32 /nologo
74LIB32=link.exe -lib
75# ADD BASE LIB32 /nologo
76# ADD LIB32 /nologo /out:"../bin/libwebserver.lib"
77
78!ENDIF
79
80# Begin Target
81
82# Name "libwebserver - Win32 Release"
83# Name "libwebserver - Win32 Debug"
84# Begin Group "Source Files"
85
86# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
87# Begin Source File
88
89SOURCE=..\src\client.c
90# End Source File
91# Begin Source File
92
93SOURCE=..\src\clientinfo.c
94# End Source File
95# Begin Source File
96
97SOURCE=.\dirent.c
98# End Source File
99# Begin Source File
100
101SOURCE=..\src\error.c
102# End Source File
103# Begin Source File
104
105SOURCE=.\flock.c
106# End Source File
107# Begin Source File
108
109SOURCE=..\src\fnmatch.c
110# End Source File
111# Begin Source File
112
113SOURCE=..\src\gethandler.c
114# End Source File
115# Begin Source File
116
117SOURCE=..\src\memory.c
118# End Source File
119# Begin Source File
120
121SOURCE=..\src\outgif.c
122# End Source File
123# Begin Source File
124
125SOURCE=..\src\outstream.c
126# End Source File
127# Begin Source File
128
129SOURCE=..\src\server.c
130# End Source File
131# Begin Source File
132
133SOURCE=..\src\socket.c
134# End Source File
135# Begin Source File
136
137SOURCE=..\src\utils.c
138# End Source File
139# Begin Source File
140
141SOURCE=..\src\weblog.c
142# End Source File
143# End Group
144# Begin Group "Header Files"
145
146# PROP Default_Filter "h;hpp;hxx;hm;inl"
147# Begin Source File
148
149SOURCE=..\include\client.h
150# End Source File
151# Begin Source File
152
153SOURCE=..\include\clientinfo.h
154# End Source File
155# Begin Source File
156
157SOURCE=..\include\config.h
158# End Source File
159# Begin Source File
160
161SOURCE=..\include\debug.h
162# End Source File
163# Begin Source File
164
165SOURCE=.\dirent.h
166# End Source File
167# Begin Source File
168
169SOURCE=..\include\error.h
170# End Source File
171# Begin Source File
172
173SOURCE=.\flock.h
174# End Source File
175# Begin Source File
176
177SOURCE=..\include\fnmatch.h
178# End Source File
179# Begin Source File
180
181SOURCE=..\include\gethandler.h
182# End Source File
183# Begin Source File
184
185SOURCE=..\include\logo.h
186# End Source File
187# Begin Source File
188
189SOURCE=..\include\memory.h
190# End Source File
191# Begin Source File
192
193SOURCE=..\include\module.h
194# End Source File
195# Begin Source File
196
197SOURCE=..\include\outgif.h
198# End Source File
199# Begin Source File
200
201SOURCE=..\include\outstream.h
202# End Source File
203# Begin Source File
204
205SOURCE=..\include\server.h
206# End Source File
207# Begin Source File
208
209SOURCE=..\include\socket.h
210# End Source File
211# Begin Source File
212
213SOURCE=..\include\utils.h
214# End Source File
215# Begin Source File
216
217SOURCE=..\include\web_server.h
218# End Source File
219# Begin Source File
220
221SOURCE=..\include\weblog.h
222# End Source File
223# End Group
224# Begin Source File
225
226SOURCE=..\Authors
227# End Source File
228# Begin Source File
229
230SOURCE=..\ChangeLog
231# End Source File
232# Begin Source File
233
234SOURCE=..\Todo
235# End Source File
236# End Target
237# End Project
diff --git a/contrib/Win32/libwebserver.dsw b/contrib/Win32/libwebserver.dsw
new file mode 100644
index 00000000..5ae9bb2f
--- /dev/null
+++ b/contrib/Win32/libwebserver.dsw
@@ -0,0 +1,44 @@
1Microsoft Developer Studio Workspace File, Format Version 6.00
2# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
3
4###############################################################################
5
6Project: "help"=".\help\help.dsp" - Package Owner=<4>
7
8Package=<5>
9{{{
10}}}
11
12Package=<4>
13{{{
14 Begin Project Dependency
15 Project_Dep_Name libwebserver
16 End Project Dependency
17}}}
18
19###############################################################################
20
21Project: "libwebserver"=".\libwebserver.dsp" - Package Owner=<4>
22
23Package=<5>
24{{{
25}}}
26
27Package=<4>
28{{{
29}}}
30
31###############################################################################
32
33Global:
34
35Package=<5>
36{{{
37}}}
38
39Package=<3>
40{{{
41}}}
42
43###############################################################################
44
diff --git a/contrib/help/engine.h b/contrib/help/engine.h
new file mode 100644
index 00000000..e9dbf334
--- /dev/null
+++ b/contrib/help/engine.h
@@ -0,0 +1,9 @@
1/*
2 * by data2header by Luis Figueiredo (stdio@netc.pt)
3 */
4#ifndef _ENGINE_H_
5#define _ENGINE_H_
6
7char engine[]="";
8
9#endif
diff --git a/contrib/help/examples.h b/contrib/help/examples.h
new file mode 100644
index 00000000..6abbf790
--- /dev/null
+++ b/contrib/help/examples.h
@@ -0,0 +1,605 @@
1/*
2 * by data2header by Luis Figueiredo (stdio@netc.pt)
3 */
4#ifndef _EXAMPLES_H_
5#define _EXAMPLES_H_
6
7char examples[]="\x3C\x63\x65\x6E\x74\x65\x72\x3E\x3C\x48\x33\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27"
8"\x30\x30\x37\x37\x30\x30\x27\x3E\x6C\x69\x62\x77\x65\x62\x73\x65\x72\x76\x65\x72\x20\x65\x78\x61\x6D\x70"
9"\x6C\x65\x73\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x48\x33\x3E\x3C\x2F\x63\x65\x6E\x74\x65\x72\x3E\x3C\x42"
10"\x52\x3E\x3C\x42\x52\x3E\xA\xA\x3C\x21\x2D\x2D\x20\x4A\x6F\x68\x61\x6E\x6E\x65\x73\x20\x45\x2E\x20\x53"
11"\x63\x68\x69\x6E\x64\x65\x6C\x69\x6E\x20\x2D\x2D\x3E\xA\x3C\x63\x65\x6E\x74\x65\x72\x3E\x3C\x41\x20\x6E"
12"\x61\x6D\x65\x3D\x68\x65\x6C\x6C\x6F\x77\x6F\x72\x6C\x64\x3E\x3C\x42\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F"
13"\x6C\x6F\x72\x3D\x27\x30\x30\x30\x30\x37\x37\x27\x3E\x3C\x61\x20\x68\x72\x65\x66\x3D\x2F\x68\x65\x6C\x6C"
14"\x6F\x3E\x3C\x48\x33\x3E\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x3C\x2F\x48\x33\x3E\x3C\x2F\x61\x3E"
15"\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x42\x3E\x3C\x2F\x63\x65\x6E\x74\x65\x72\x3E\xA\x3C\x73\x6D\x61\x6C"
16"\x6C\x3E\x20\x3C\x42\x3E\x75\x73\x65\x64\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x3A\x3C\x2F\x42\x3E\x3C"
17"\x42\x52\x3E\xA\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69"
18"\x6F\x6E\x73\x23\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x69\x74\x27\x3E\x77\x65\x62\x5F\x73"
19"\x65\x72\x76\x65\x72\x5F\x69\x6E\x69\x74\x3C\x2F\x61\x3E\x3C\x42\x52\x3E\xA\x3C\x61\x20\x68\x72\x65\x66"
20"\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x73\x65\x72"
21"\x76\x65\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x27\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72"
22"\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x3C\x2F\x61\x3E\x3C\x42\x52\x3E\xA\x3C\x61\x20\x68\x72\x65"
23"\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x73\x65"
24"\x72\x76\x65\x72\x5F\x72\x75\x6E\x27\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x72\x75\x6E\x3C\x2F"
25"\x61\x3E\x3C\x42\x52\x3E\xA\x3C\x2F\x73\x6D\x61\x6C\x6C\x3E\x3C\x42\x52\x3E\xA\xA\x54\x68\x69\x73\x20"
26"\x65\x78\x61\x6D\x70\x6C\x65\x20\x73\x74\x61\x72\x74\x73\x20\x74\x68\x65\x20\x73\x65\x72\x76\x65\x72\x20"
27"\x77\x69\x74\x68\x20\x6F\x6E\x65\x20\x68\x61\x6E\x64\x6C\x65\x72\x20\x66\x6F\x72\x20\x61\x6C\x6C\x20\x72"
28"\x65\x71\x75\x65\x73\x74\x73\x20\x70\x6F\x69\x6E\x74\x69\x6E\x67\x20\x74\x6F\x20\x68\x65\x6C\x6C\x6F\x5F"
29"\x77\x6F\x72\x6C\x64\x28\x29\xA\x74\x68\x61\x74\x20\x70\x72\x69\x6E\x74\x73\x20\x74\x68\x65\x20\x63\x6F"
30"\x6E\x74\x65\x6E\x74\x2D\x74\x79\x70\x65\x20\x77\x69\x74\x68\x20\x74\x68\x65\x20\x65\x6E\x64\x20\x6F\x66"
31"\x20\x74\x68\x65\x20\x68\x65\x61\x64\x65\x72\x20\x22\x5C\x72\x5C\x6E\x5C\x72\x5C\x6E\x22\x20\x61\x6E\x64"
32"\x20\x6F\x6E\x65\x20\x73\x69\x6D\x70\x6C\x65\x20\x70\x72\x69\x6E\x74\x66\x20\x77\x69\x74\x68\x20\x48\x65"
33"\x6C\x6C\x6F\x20\x77\x6F\x72\x6C\x64\x3C\x42\x52\x3E\x3C\x42\x52\x3E\xA\xA\x3C\x54\x41\x42\x4C\x45\x20"
34"\x77\x69\x64\x74\x68\x3D\x27\x31\x30\x30\x25\x27\x20\x62\x67\x63\x6F\x6C\x6F\x72\x3D\x27\x43\x46\x43\x46"
35"\x43\x46\x27\x20\x62\x6F\x72\x64\x65\x72\x3D\x30\x3E\x3C\x54\x52\x3E\x3C\x54\x44\x3E\xA\x3C\x43\x4F\x44"
36"\x45\x3E\x3C\x50\x52\x45\x3E\xA\x23\x69\x6E\x63\x6C\x75\x64\x65\x20\x22\x77\x65\x62\x5F\x73\x65\x72\x76"
37"\x65\x72\x2E\x68\x22\xA\x23\x69\x6E\x63\x6C\x75\x64\x65\x20\x26\x6C\x74\x3B\x73\x74\x64\x69\x6F\x2E\x68"
38"\x26\x67\x74\x3B\xA\xA\xA\x76\x6F\x69\x64\x20\x68\x65\x6C\x6C\x6F\x5F\x77\x6F\x72\x6C\x64\x28\x29\x20"
39"\x7B\xA\x9\x70\x72\x69\x6E\x74\x66\x28\x22\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x74\x79\x70\x65\x3A\x20\x74"
40"\x65\x78\x74\x2F\x70\x6C\x61\x69\x6E\x5C\x72\x5C\x6E\x5C\x72\x5C\x6E\x22\x29\x3B\xA\x9\x70\x72\x69\x6E"
41"\x74\x66\x28\x22\x48\x65\x6C\x6C\x6F\x2C\x20\x57\x6F\x72\x6C\x64\x21\x5C\x72\x5C\x6E\x22\x29\x3B\xA\x7D"
42"\xA\xA\x69\x6E\x74\x20\x6D\x61\x69\x6E\x28\x69\x6E\x74\x20\x61\x72\x67\x63\x2C\x63\x68\x61\x72\x2A\x2A"
43"\x20\x61\x72\x67\x76\x29\x20\x7B\xA\x20\x20\x20\x20\x20\x20\x20\x20\x73\x74\x72\x75\x63\x74\x20\x77\x65"
44"\x62\x5F\x73\x65\x72\x76\x65\x72\x20\x73\x65\x72\x76\x65\x72\x3B\x20\x2F\x2F\x20\x73\x65\x72\x76\x65\x72"
45"\x20\x68\x61\x6E\x64\x6C\x65\x72\xA\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x28\x21\x77\x65\x62\x5F\x73"
46"\x65\x72\x76\x65\x72\x5F\x69\x6E\x69\x74\x28\x26\x73\x65\x72\x76\x65\x72\x2C\x38\x30\x2C\x22\x68\x65\x6C"
47"\x70\x2E\x6C\x6F\x67\x22\x2C\x30\x29\x29\x20\x7B\x20\x2F\x2F\x20\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x65"
48"\x20\x61\x6E\x64\x20\x73\x74\x61\x72\x74\x20\x74\x68\x65\x20\x73\x65\x72\x76\x65\x72\x20\x61\x74\x20\x70"
49"\x6F\x72\x74\x20\x38\x30\x2C\x20\x6C\x6F\x67\x67\x69\x6E\x67\x20\x74\x6F\x20\x68\x65\x6C\x70\x2E\x6C\x6F"
50"\x67\xA\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x66\x70\x72\x69\x6E\x74\x66\x28"
51"\x73\x74\x64\x65\x72\x72\x2C\x22\x63\x61\x6E\x27\x74\x20\x6F\x70\x65\x6E\x20\x6C\x69\x73\x74\x65\x6E\x20"
52"\x73\x6F\x63\x6B\x65\x74\x5C\x6E\x22\x29\x3B\xA\x9\x9\x72\x65\x74\x75\x72\x6E\x20\x31\x3B\xA\x20\x20"
53"\x20\x20\x20\x20\x20\x20\x7D\x3B\xA\xA\x20\x20\x20\x20\x20\x20\x20\x20\x77\x65\x62\x5F\x73\x65\x72\x76"
54"\x65\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x28\x26\x73\x65\x72\x76\x65\x72\x2C\x22\x2A\x20\x2A"
55"\x22\x2C\x68\x65\x6C\x6C\x6F\x5F\x77\x6F\x72\x6C\x64\x2C\x30\x29\x3B\x20\x2F\x2F\x20\x61\x64\x64\x20\x68"
56"\x61\x6E\x64\x6C\x65\x72\x20\x66\x6F\x72\x20\x61\x6C\x6C\x20\x72\x65\x71\x75\x65\x73\x74\x73\xA\x20\x20"
57"\x20\x20\x20\x20\x20\x20\x77\x68\x69\x6C\x65\x28\x31\x29\x20\x7B\xA\x20\x20\x20\x20\x20\x20\x20\x20\x20"
58"\x20\x20\x20\x20\x20\x20\x20\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x72\x75\x6E\x28\x26\x73\x65\x72"
59"\x76\x65\x72\x29\x3B\x20\x20\x20\x2F\x2F\x20\x72\x75\x6E\x20\x73\x65\x72\x76\x65\x72\xA\x20\x20\x20\x20"
60"\x20\x20\x20\x20\x7D\x3B\xA\x7D\xA\x3C\x2F\x50\x52\x45\x3E\x3C\x2F\x43\x4F\x44\x45\x3E\xA\x3C\x2F\x54"
61"\x44\x3E\x3C\x2F\x54\x52\x3E\x3C\x2F\x54\x41\x42\x4C\x45\x3E\xA\x3C\x48\x52\x3E\x3C\x42\x52\x3E\xA\xA"
62"\x3C\x63\x65\x6E\x74\x65\x72\x3E\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x6C\x6F\x67\x66\x69\x6C\x65\x3E\x3C\x42"
63"\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x30\x30\x30\x30\x37\x37\x27\x3E\x3C\x61\x20\x68"
64"\x72\x65\x66\x3D\x27\x2F\x6C\x6F\x67\x27\x3E\x3C\x48\x33\x3E\x6C\x6F\x67\x66\x69\x6C\x65\x3C\x2F\x48\x33"
65"\x3E\x3C\x2F\x61\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x42\x3E\x3C\x2F\x63\x65\x6E\x74\x65\x72\x3E\xA"
66"\x3C\x73\x6D\x61\x6C\x6C\x3E\x20\x3C\x42\x3E\x75\x73\x65\x64\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x3A"
67"\x3C\x2F\x42\x3E\x3C\x42\x52\x3E\xA\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66"
68"\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x69\x74\x27\x3E"
69"\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x69\x74\x3C\x2F\x61\x3E\x3C\x42\x52\x3E\xA\x3C\x61"
70"\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65"
71"\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x27\x3E\x77\x65\x62\x5F\x73"
72"\x65\x72\x76\x65\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x3C\x2F\x61\x3E\x3C\x42\x52\x3E\xA\x3C"
73"\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77"
74"\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x72\x75\x6E\x27\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F"
75"\x72\x75\x6E\x3C\x2F\x61\x3E\x3C\x42\x52\x3E\xA\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C"
76"\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x61\x64\x64"
77"\x66\x69\x6C\x65\x27\x3E\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x61\x64\x64\x66\x69\x6C\x65\x3C\x2F"
78"\x61\x3E\x3C\x42\x52\x3E\xA\x3C\x2F\x73\x6D\x61\x6C\x6C\x3E\x3C\x42\x52\x3E\xA\xA\x54\x68\x69\x73\x20"
79"\x65\x78\x61\x6D\x70\x6C\x65\x20\x75\x73\x65\x73\x20\x74\x68\x65\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20"
80"\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23"
81"\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x61\x64\x64\x66\x69\x6C\x65\x27\x3E\x77\x65\x62\x5F\x63\x6C"
82"\x69\x65\x6E\x74\x5F\x61\x64\x64\x66\x69\x6C\x65\x3C\x2F\x61\x3E\x20\x74\x6F\x20\x73\x65\x6E\x64\x20\x61"
83"\x20\x66\x69\x6C\x65\x20\x74\x6F\x20\x63\x6C\x69\x65\x6E\x74\xA\x3C\x42\x52\x3E\x3C\x42\x52\x3E\xA\x3C"
84"\x54\x41\x42\x4C\x45\x20\x77\x69\x64\x74\x68\x3D\x27\x31\x30\x30\x25\x27\x20\x62\x67\x63\x6F\x6C\x6F\x72"
85"\x3D\x27\x43\x46\x43\x46\x43\x46\x27\x20\x62\x6F\x72\x64\x65\x72\x3D\x30\x3E\x3C\x54\x52\x3E\x3C\x54\x44"
86"\x3E\xA\x3C\x43\x4F\x44\x45\x3E\x3C\x50\x52\x45\x3E\xA\x23\x69\x6E\x63\x6C\x75\x64\x65\x20\x22\x77\x65"
87"\x62\x5F\x73\x65\x72\x76\x65\x72\x2E\x68\x22\xA\x23\x69\x6E\x63\x6C\x75\x64\x65\x20\x26\x6C\x74\x3B\x73"
88"\x74\x64\x69\x6F\x2E\x68\x26\x67\x74\x3B\xA\xA\x76\x6F\x69\x64\x20\x6C\x6F\x67\x66\x69\x6C\x65\x28\x29"
89"\x20\x7B\xA\x20\x20\x20\x20\x20\x20\x20\x20\x70\x72\x69\x6E\x74\x66\x28\x22\x43\x6F\x6E\x74\x65\x6E\x74"
90"\x2D\x74\x79\x70\x65\x3A\x20\x74\x65\x78\x74\x2F\x70\x6C\x61\x69\x6E\x5C\x72\x5C\x6E\x5C\x72\x5C\x6E\x22"
91"\x29\x3B\xA\x20\x20\x20\x20\x20\x20\x20\x20\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x61\x64\x64\x66"
92"\x69\x6C\x65\x28\x73\x65\x72\x76\x65\x72\x2E\x6C\x6F\x67\x66\x69\x6C\x65\x29\x3B\x20\x2F\x2F\x20\x61\x64"
93"\x64\x20\x68\x65\x6C\x70\x2E\x6C\x6F\x67\x20\x66\x69\x6C\x65\x20\x74\x6F\x20\x6F\x75\x74\x70\x75\x74\xA"
94"\x20\x20\x20\x20\x20\x20\x20\x20\x70\x72\x69\x6E\x74\x66\x28\x22\x45\x6E\x64\x20\x6F\x66\x20\x6C\x6F\x67"
95"\x5C\x6E\x22\x29\x3B\xA\x7D\x3B\xA\x20\x20\x20\x20\x20\x20\x20\x20\xA\xA\x6D\x61\x69\x6E\x28\x29\x20"
96"\x7B\xA\x20\x20\x20\x20\x20\x20\x20\x20\x73\x74\x72\x75\x63\x74\x20\x77\x65\x62\x5F\x73\x65\x72\x76\x65"
97"\x72\x20\x73\x65\x72\x76\x65\x72\x3B\x20\x2F\x2F\x20\x73\x65\x72\x76\x65\x72\x20\x68\x61\x6E\x64\x6C\x65"
98"\x72\xA\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x28\x21\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x69"
99"\x6E\x69\x74\x28\x26\x73\x65\x72\x76\x65\x72\x2C\x38\x32\x2C\x22\x68\x65\x6C\x70\x2E\x6C\x6F\x67\x22\x2C"
100"\x30\x29\x29\x20\x7B\x20\x2F\x2F\x20\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x65\xA\x20\x20\x20\x20"
101"\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x66\x70\x72\x69\x6E\x74\x66\x28\x73\x74\x64\x65\x72\x72"
102"\x2C\x22\x63\x61\x6E\x27\x74\x20\x6F\x70\x65\x6E\x20\x6C\x69\x73\x74\x65\x6E\x20\x73\x6F\x63\x6B\x65\x74"
103"\x5C\x6E\x22\x29\x3B\xA\x20\x20\x20\x20\x20\x20\x20\x20\x7D\x3B\xA\xA\x20\x20\x20\x20\x20\x20\x20\x20"
104"\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x28\x26\x73\x65\x72"
105"\x76\x65\x72\x2C\x22\x2A\x20\x2F\x6C\x6F\x67\x22\x2C\x6C\x6F\x67\x66\x69\x6C\x65\x2C\x30\x29\x3B\x20\x2F"
106"\x2F\x20\x61\x64\x64\x20\x68\x61\x6E\x64\x6C\x65\x72\x20\x66\x6F\x72\x20\x68\x74\x74\x70\x3A\x2F\x2F\x68"
107"\x6F\x73\x74\x2F\x6C\x6F\x67\x20\x72\x65\x71\x75\x65\x73\x74\x73\xA\x20\x20\x20\x20\x20\x20\x20\x20\x77"
108"\x68\x69\x6C\x65\x28\x31\x29\x20\x7B\xA\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
109"\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x72\x75\x6E\x28\x26\x73\x65\x72\x76\x65\x72\x29\x3B\x20\x20"
110"\x20\x2F\x2F\x20\x72\x75\x6E\x20\x73\x65\x72\x76\x65\x72\xA\x20\x20\x20\x20\x20\x20\x20\x20\x7D\x3B\xA"
111"\x7D\x3B\xA\x3C\x2F\x50\x52\x45\x3E\x3C\x2F\x43\x4F\x44\x45\x3E\xA\x3C\x2F\x54\x44\x3E\x3C\x2F\x54\x52"
112"\x3E\x3C\x2F\x54\x41\x42\x4C\x45\x3E\xA\x3C\x48\x52\x3E\x3C\x42\x52\x3E\xA\xA\xA\x3C\x63\x65\x6E\x74"
113"\x65\x72\x3E\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x69\x6D\x61\x67\x65\x75\x70\x3E\x3C\x42\x3E\x3C\x66\x6F\x6E"
114"\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x30\x30\x30\x30\x37\x37\x27\x3E\x3C\x61\x20\x68\x72\x65\x66\x3D\x27"
115"\x2F\x69\x6D\x61\x67\x65\x27\x3E\x3C\x48\x33\x3E\x49\x6D\x61\x67\x65\x20\x55\x70\x6C\x6F\x61\x64\x65\x72"
116"\x3C\x2F\x48\x33\x3E\x3C\x2F\x61\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x42\x3E\x3C\x2F\x63\x65\x6E\x74"
117"\x65\x72\x3E\xA\x3C\x73\x6D\x61\x6C\x6C\x3E\x20\x3C\x42\x3E\x75\x73\x65\x64\x20\x66\x75\x6E\x63\x74\x69"
118"\x6F\x6E\x73\x3A\x3C\x2F\x42\x3E\x3C\x42\x52\x3E\xA\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65"
119"\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E"
120"\x69\x74\x27\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x69\x74\x3C\x2F\x61\x3E\x3C\x42\x52"
121"\x3E\xA\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E"
122"\x73\x23\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x27\x3E\x77"
123"\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x3C\x2F\x61\x3E\x3C\x42"
124"\x52\x3E\xA\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F"
125"\x6E\x73\x23\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x72\x75\x6E\x27\x3E\x77\x65\x62\x5F\x73\x65\x72"
126"\x76\x65\x72\x5F\x72\x75\x6E\x3C\x2F\x61\x3E\x3C\x42\x52\x3E\xA\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F"
127"\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x63\x6C\x69\x65\x6E\x74\x69\x6E\x66\x6F"
128"\x27\x3E\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x3C\x2F\x61\x3E\x3C\x42\x52\x3E\xA\x3C\x2F\x73\x6D\x61"
129"\x6C\x6C\x3E\x3C\x42\x52\x3E\xA\xA\xA\x54\x68\x69\x73\x20\x65\x78\x61\x6D\x70\x6C\x65\x20\x75\x73\x65"
130"\x73\x20\x74\x68\x65\x20\x73\x74\x72\x75\x63\x74\x20\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65"
131"\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x63\x6C\x69\x65\x6E\x74\x69\x6E\x66\x6F\x27\x3E\x43"
132"\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x3C\x2F\x61\x3E\x20\x66\x6F\x72\x20\x66\x65\x74\x63\x68\x69\x6E\x67"
133"\x20\x74\x68\x65\x20\x69\x6E\x70\x75\x74\x20\x66\x72\x6F\x6D\x20\x74\x68\x65\x20\x63\x6C\x69\x65\x6E\x74"
134"\xA\x75\x73\x69\x6E\x67\x20\x74\x68\x65\x20\x51\x75\x65\x72\x79\x28\x22\x69\x6D\x67\x22\x29\x20\x74\x6F"
135"\x20\x73\x65\x6E\x64\x20\x74\x68\x65\x20\x69\x6D\x61\x67\x65\x20\x3C\x42\x52\x3E\xA\x61\x6E\x64\x20\x6D"
136"\x75\x6C\x74\x69\x70\x61\x72\x74\x20\x66\x6F\x72\x20\x66\x65\x74\x63\x68\x69\x6E\x67\x20\x74\x68\x65\x20"
137"\x75\x70\x6C\x6F\x61\x64\x65\x64\x20\x66\x69\x6C\x65\x3C\x42\x52\x3E\xA\xA\xA\x3C\x42\x52\x3E\x3C\x42"
138"\x52\x3E\xA\x3C\x54\x41\x42\x4C\x45\x20\x77\x69\x64\x74\x68\x3D\x27\x31\x30\x30\x25\x27\x20\x62\x67\x63"
139"\x6F\x6C\x6F\x72\x3D\x27\x43\x46\x43\x46\x43\x46\x27\x20\x62\x6F\x72\x64\x65\x72\x3D\x30\x3E\x3C\x54\x52"
140"\x3E\x3C\x54\x44\x3E\xA\x3C\x43\x4F\x44\x45\x3E\x3C\x50\x52\x45\x3E\xA\x23\x69\x6E\x63\x6C\x75\x64\x65"
141"\x20\x22\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x2E\x68\x22\xA\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
142"\x20\x20\x20\x20\x20\x20\xA\x23\x69\x6E\x63\x6C\x75\x64\x65\x20\x26\x6C\x74\x3B\x73\x74\x64\x6C\x69\x62"
143"\x2E\x68\x26\x67\x74\x3B\xA\x20\x20\x20\x20\x20\x20\x20\x20\xA\x73\x74\x72\x75\x63\x74\x20\x69\x6D\x61"
144"\x67\x65\x20\x7B\xA\x9\x63\x68\x61\x72\x20\x2A\x64\x61\x74\x61\x3B\xA\x9\x73\x69\x7A\x65\x5F\x74\x20"
145"\x73\x69\x7A\x65\x3B\xA\x7D\x20\x69\x6D\x61\x67\x65\x3D\x7B\x4E\x55\x4C\x4C\x2C\x30\x7D\x3B\xA\xA\x76"
146"\x6F\x69\x64\x20\x69\x6D\x61\x67\x65\x6F\x75\x74\x28\x29\x20\x7B\xA\x9\x69\x66\x28\x73\x74\x72\x6C\x65"
147"\x6E\x28\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x3E\x51\x75\x65\x72\x79\x28\x22\x69\x6D\x67\x22\x29"
148"\x29\x29\x20\x7B\xA\x9\x9\x69\x66\x28\x69\x6D\x61\x67\x65\x2E\x64\x61\x74\x61\x21\x3D\x4E\x55\x4C\x4C"
149"\x29\x20\x7B\xA\x9\x9\x9\x70\x72\x69\x6E\x74\x66\x28\x22\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x74\x79\x70"
150"\x65\x3A\x20\x69\x6D\x61\x67\x65\x2F\x6A\x70\x65\x67\x5C\x72\x5C\x6E\x5C\x72\x5C\x6E\x22\x29\x3B\xA\x9"
151"\x9\x9\x66\x77\x72\x69\x74\x65\x28\x69\x6D\x61\x67\x65\x2E\x64\x61\x74\x61\x2C\x69\x6D\x61\x67\x65\x2E"
152"\x73\x69\x7A\x65\x2C\x31\x2C\x73\x74\x64\x6F\x75\x74\x29\x3B\xA\x9\x9\x7D\x3B\xA\x9\x9\x72\x65\x74"
153"\x75\x72\x6E\x3B\xA\x9\x7D\x3B\xA\x9\x70\x72\x69\x6E\x74\x66\x28\x22\x43\x6F\x6E\x74\x65\x6E\x74\x2D"
154"\x74\x79\x70\x65\x3A\x20\x74\x65\x78\x74\x2F\x68\x74\x6D\x6C\x5C\x72\x5C\x6E\x5C\x72\x5C\x6E\x22\x29\x3B"
155"\xA\x9\x70\x72\x69\x6E\x74\x66\x28\x22\x26\x6C\x74\x3B\x48\x54\x4D\x4C\x26\x67\x74\x3B\x5C\x6E\x22\x29"
156"\x3B\xA\x9\x70\x72\x69\x6E\x74\x66\x28\x22\x26\x6C\x74\x3B\x42\x4F\x44\x59\x20\x62\x67\x63\x6F\x6C\x6F"
157"\x72\x3D\x27\x45\x46\x45\x46\x45\x46\x27\x26\x67\x74\x3B\x5C\x6E\x22\x29\x3B\x20\x20\x20\x20\x20\x20\x20"
158"\x20\xA\x9\x70\x72\x69\x6E\x74\x66\x28\x22\x26\x6C\x74\x3B\x66\x6F\x72\x6D\x20\x61\x63\x74\x69\x6F\x6E"
159"\x3D\x27\x2F\x27\x20\x65\x6E\x63\x74\x79\x70\x65\x3D\x27\x6D\x75\x6C\x74\x69\x70\x61\x72\x74\x2F\x66\x6F"
160"\x72\x6D\x2D\x64\x61\x74\x61\x27\x26\x67\x74\x3B\x5C\x6E\x22\x29\x3B\xA\x9\x70\x72\x69\x6E\x74\x66\x28"
161"\x22\x26\x6C\x74\x3B\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x66\x69\x6C\x65\x20\x6E\x61\x6D\x65\x3D"
162"\x69\x6D\x61\x67\x65\x26\x67\x74\x3B\x26\x6C\x74\x3B\x42\x52\x26\x67\x74\x3B\x5C\x6E\x22\x29\x3B\xA\x9"
163"\x70\x72\x69\x6E\x74\x66\x28\x22\x26\x6C\x74\x3B\x2F\x66\x6F\x72\x6D\x26\x67\x74\x3B\x5C\x6E\x22\x29\x3B"
164"\xA\x9\x69\x66\x28\x73\x74\x72\x6C\x65\x6E\x28\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x3E\x4D\x75"
165"\x6C\x74\x69\x50\x61\x72\x74\x28\x22\x69\x6D\x61\x67\x65\x22\x29\x2E\x64\x61\x74\x61\x29\x29\x20\x7B\xA"
166"\x9\x9\x70\x72\x69\x6E\x74\x66\x28\x22\x25\x73\x26\x6C\x74\x3B\x42\x52\x26\x67\x74\x3B\x26\x6C\x74\x3B"
167"\x69\x6D\x67\x20\x73\x72\x63\x3D\x27\x2F\x3F\x69\x6D\x67\x3D\x25\x73\x2E\x6A\x70\x67\x27\x26\x67\x74\x3B"
168"\x5C\x6E\x22\x2C\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x3E\x4D\x75\x6C\x74\x69\x50\x61\x72\x74\x28"
169"\x22\x69\x6D\x61\x67\x65\x22\x29\x2E\x66\x69\x6C\x65\x6E\x61\x6D\x65\x2C\x43\x6C\x69\x65\x6E\x74\x49\x6E"
170"\x66\x6F\x2D\x3E\x4D\x75\x6C\x74\x69\x50\x61\x72\x74\x28\x22\x69\x6D\x61\x67\x65\x22\x29\x2E\x66\x69\x6C"
171"\x65\x6E\x61\x6D\x65\x29\x3B\xA\x9\x9\x66\x72\x65\x65\x28\x69\x6D\x61\x67\x65\x2E\x64\x61\x74\x61\x29"
172"\x3B\xA\x9\x9\x69\x6D\x61\x67\x65\x2E\x64\x61\x74\x61\x3D\x6D\x61\x6C\x6C\x6F\x63\x28\x43\x6C\x69\x65"
173"\x6E\x74\x49\x6E\x66\x6F\x2D\x3E\x4D\x75\x6C\x74\x69\x50\x61\x72\x74\x28\x22\x69\x6D\x61\x67\x65\x22\x29"
174"\x2E\x73\x69\x7A\x65\x2B\x31\x29\x3B\xA\x9\x9\x6D\x65\x6D\x63\x70\x79\x28\x69\x6D\x61\x67\x65\x2E\x64"
175"\x61\x74\x61\x2C\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x3E\x4D\x75\x6C\x74\x69\x50\x61\x72\x74\x28"
176"\x22\x69\x6D\x61\x67\x65\x22\x29\x2E\x64\x61\x74\x61\x2C\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x3E"
177"\x4D\x75\x6C\x74\x69\x50\x61\x72\x74\x28\x22\x69\x6D\x61\x67\x65\x22\x29\x2E\x73\x69\x7A\x65\x29\x3B\xA"
178"\x9\x9\x69\x6D\x61\x67\x65\x2E\x73\x69\x7A\x65\x3D\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x3E\x4D"
179"\x75\x6C\x74\x69\x50\x61\x72\x74\x28\x22\x69\x6D\x61\x67\x65\x22\x29\x2E\x73\x69\x7A\x65\x3B\xA\x9\x7D"
180"\x65\x6C\x73\x65\x20\x7B\xA\x9\x9\x66\x72\x65\x65\x28\x69\x6D\x61\x67\x65\x2E\x64\x61\x74\x61\x29\x3B"
181"\xA\x9\x9\x69\x6D\x61\x67\x65\x2E\x64\x61\x74\x61\x3D\x4E\x55\x4C\x4C\x3B\xA\x9\x7D\x3B\xA\x9\x70"
182"\x72\x69\x6E\x74\x66\x28\x22\x26\x6C\x74\x3B\x2F\x42\x4F\x44\x59\x26\x67\x74\x3B\x5C\x6E\x22\x29\x3B\xA"
183"\x9\x70\x72\x69\x6E\x74\x66\x28\x22\x26\x6C\x74\x3B\x2F\x48\x54\x4D\x4C\x26\x67\x74\x3B\x5C\x6E\x22\x29"
184"\x3B\xA\x7D\x3B\xA\xA\xA\xA\x6D\x61\x69\x6E\x28\x29\x20\x7B\xA\x9\x73\x74\x72\x75\x63\x74\x20\x77"
185"\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x20\x73\x65\x72\x76\x65\x72\x3B\xA\x9\x69\x66\x28\x21\x77\x65\x62"
186"\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x69\x74\x28\x26\x73\x65\x72\x76\x65\x72\x2C\x38\x30\x2C\x22\x74"
187"\x65\x73\x74\x65\x2E\x6C\x6F\x67\x22\x2C\x30\x29\x29\x20\x7B\xA\x9\x9\x66\x70\x72\x69\x6E\x74\x66\x28"
188"\x73\x74\x64\x65\x72\x72\x2C\x22\x63\x61\x6E\x27\x74\x20\x6F\x70\x65\x6E\x20\x6C\x69\x73\x74\x65\x6E\x20"
189"\x73\x6F\x63\x6B\x65\x74\x5C\x6E\x22\x29\x3B\xA\x9\x7D\x3B\xA\x9\x77\x65\x62\x5F\x73\x65\x72\x76\x65"
190"\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x28\x26\x73\x65\x72\x76\x65\x72\x2C\x22\x2A\x20\x2F\x22"
191"\x2C\x69\x6D\x61\x67\x65\x6F\x75\x74\x2C\x30\x29\x3B\xA\x9\x77\x68\x69\x6C\x65\x28\x31\x29\x20\x7B\xA"
192"\x9\x9\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x72\x75\x6E\x28\x26\x73\x65\x72\x76\x65\x72\x29\x3B"
193"\xA\x9\x7D\x3B\xA\x7D\x3B\xA\x3C\x2F\x50\x52\x45\x3E\x3C\x2F\x43\x4F\x44\x45\x3E\xA\x3C\x2F\x54\x44"
194"\x3E\x3C\x2F\x54\x52\x3E\x3C\x2F\x54\x41\x42\x4C\x45\x3E\xA\x3C\x48\x52\x3E\x3C\x42\x52\x3E\xA\xA\xA"
195"\x3C\x63\x65\x6E\x74\x65\x72\x3E\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x61\x75\x74\x68\x3E\x3C\x42\x3E\x3C\x66"
196"\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x30\x30\x30\x30\x37\x37\x27\x3E\x3C\x61\x20\x68\x72\x65\x66"
197"\x3D\x27\x2F\x61\x75\x74\x68\x27\x3E\x3C\x48\x33\x3E\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x69\x6F"
198"\x6E\x3C\x2F\x48\x33\x3E\x3C\x2F\x61\x3E\x20\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x42\x3E\x3C\x2F\x63\x65"
199"\x6E\x74\x65\x72\x3E\xA\x3C\x73\x6D\x61\x6C\x6C\x3E\x20\x3C\x42\x3E\x75\x73\x65\x64\x20\x66\x75\x6E\x63"
200"\x74\x69\x6F\x6E\x73\x3A\x3C\x2F\x42\x3E\x3C\x42\x52\x3E\xA\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F"
201"\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F"
202"\x69\x6E\x69\x74\x27\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x69\x74\x3C\x2F\x61\x3E\x3C"
203"\x42\x52\x3E\xA\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69"
204"\x6F\x6E\x73\x23\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x27"
205"\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x3C\x2F\x61\x3E"
206"\x3C\x42\x52\x3E\xA\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74"
207"\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x72\x75\x6E\x27\x3E\x77\x65\x62\x5F\x73"
208"\x65\x72\x76\x65\x72\x5F\x72\x75\x6E\x3C\x2F\x61\x3E\x3C\x42\x52\x3E\xA\x3C\x61\x20\x68\x72\x65\x66\x3D"
209"\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x63\x6C\x69\x65"
210"\x6E\x74\x5F\x48\x54\x54\x50\x64\x69\x72\x65\x63\x74\x69\x76\x65\x27\x3E\x77\x65\x62\x5F\x63\x6C\x69\x65"
211"\x6E\x74\x5F\x48\x54\x54\x50\x64\x69\x72\x65\x63\x74\x69\x76\x65\x3C\x2F\x61\x3E\x3C\x42\x52\x3E\xA\x3C"
212"\x2F\x73\x6D\x61\x6C\x6C\x3E\x3C\x42\x52\x3E\xA\xA\x48\x65\x72\x65\x20\x77\x65\x27\x72\x65\x20\x75\x73"
213"\x69\x6E\x67\x20\x74\x68\x65\x20\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75"
214"\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x48\x54\x54\x50\x64\x69\x72"
215"\x65\x63\x74\x69\x76\x65\x27\x3E\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x48\x54\x54\x50\x64\x69\x72"
216"\x65\x63\x74\x69\x76\x65\x3C\x2F\x61\x3E\x20\x74\x6F\x20\x73\x65\x74\x20\x75\x70\x20\x74\x68\x65\x20\x73"
217"\x65\x72\x76\x65\x72\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\xA\xA\x3C\x42\x52\x3E\x3C\x42\x52\x3E\xA\x75"
218"\x73\x65\x72\x3A\x20\x22\x75\x73\x65\x72\x6E\x61\x6D\x65\x22\x2C\x20\x70\x61\x73\x73\x3A\x20\x22\x70\x61"
219"\x73\x73\x77\x6F\x72\x64\x22\xA\x3C\x42\x52\x3E\xA\x3C\x54\x41\x42\x4C\x45\x20\x77\x69\x64\x74\x68\x3D"
220"\x27\x31\x30\x30\x25\x27\x20\x62\x67\x63\x6F\x6C\x6F\x72\x3D\x27\x43\x46\x43\x46\x43\x46\x27\x20\x62\x6F"
221"\x72\x64\x65\x72\x3D\x30\x3E\x3C\x54\x52\x3E\x3C\x54\x44\x3E\xA\x3C\x43\x4F\x44\x45\x3E\x3C\x50\x52\x45"
222"\x3E\xA\x23\x69\x6E\x63\x6C\x75\x64\x65\x20\x22\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x2E\x68\x22\xA"
223"\x23\x69\x6E\x63\x6C\x75\x64\x65\x20\x26\x6C\x74\x3B\x73\x74\x64\x69\x6F\x2E\x68\x26\x67\x74\x3B\xA\x23"
224"\x69\x6E\x63\x6C\x75\x64\x65\x20\x26\x6C\x74\x3B\x73\x74\x72\x69\x6E\x67\x2E\x68\x26\x67\x74\x3B\xA\xA"
225"\xA\x76\x6F\x69\x64\x20\x75\x72\x6C\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x28\x29\x20\x7B\xA"
226"\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x28\x21\x73\x74\x72\x6C\x65\x6E\x28\x43\x6C\x69\x65\x6E\x74\x49"
227"\x6E\x66\x6F\x2D\x3E\x75\x73\x65\x72\x29\x20\x7C\x7C\x20\x21\x73\x74\x72\x6C\x65\x6E\x28\x43\x6C\x69\x65"
228"\x6E\x74\x49\x6E\x66\x6F\x2D\x3E\x70\x61\x73\x73\x29\x20\x26\x26\xA\x20\x20\x20\x20\x20\x20\x20\x20\x20"
229"\x20\x20\x20\x73\x74\x72\x63\x6D\x70\x28\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x3E\x75\x73\x65\x72"
230"\x2C\x22\x75\x73\x65\x72\x6E\x61\x6D\x65\x22\x29\x20\x7C\x7C\x20\x73\x74\x72\x63\x6D\x70\x28\x43\x6C\x69"
231"\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x3E\x70\x61\x73\x73\x2C\x22\x70\x61\x73\x73\x77\x6F\x72\x64\x22\x29\x29"
232"\x20\x7B\x20\x2F\x2F\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x72\x65\x61\x64\x20\x74\x68\x69\x6E\x67\x73\x20"
233"\x66\x72\x6F\x6D\x20\x61\x20\x61\x75\x74\x68\x20\x66\x69\x6C\x65\xA\x20\x20\x20\x20\x20\x20\x20\x20\x20"
234"\x20\x20\x20\x20\x20\x20\x20\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x48\x54\x54\x50\x64\x69\x72\x65"
235"\x63\x74\x69\x76\x65\x28\x22\x48\x54\x54\x50\x2F\x31\x2E\x31\x20\x34\x30\x31\x20\x41\x75\x74\x68\x6F\x72"
236"\x69\x7A\x61\x74\x69\x6F\x6E\x20\x52\x65\x71\x75\x69\x72\x65\x64\x22\x29\x3B\xA\x20\x20\x20\x20\x20\x20"
237"\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x72\x69\x6E\x74\x66\x28\x22\x57\x57\x57\x2D\x41\x75\x74\x68"
238"\x65\x6E\x74\x69\x63\x61\x74\x65\x3A\x20\x42\x61\x73\x69\x63\x20\x72\x65\x61\x6C\x6D\x3D\x5C\x22\x54\x68"
239"\x69\x73\x20\x73\x69\x74\x65\x20\x69\x6E\x66\x6F\x5C\x22\x5C\x72\x5C\x6E\x22\x29\x3B\xA\x20\x20\x20\x20"
240"\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x72\x69\x6E\x74\x66\x28\x22\x43\x6F\x6E\x74\x65\x6E"
241"\x74\x2D\x74\x79\x70\x65\x3A\x20\x74\x65\x78\x74\x2F\x68\x74\x6D\x6C\x5C\x72\x5C\x6E\x5C\x72\x5C\x6E\x22"
242"\x29\x3B\xA\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x72\x69\x6E\x74\x66\x28"
243"\x22\x26\x6C\x74\x3B\x42\x4F\x44\x59\x26\x67\x74\x3B\x5C\x6E\x22\x29\x3B\xA\x20\x20\x20\x20\x20\x20\x20"
244"\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x72\x69\x6E\x74\x66\x28\x22\x26\x6C\x74\x3B\x66\x6F\x6E\x74\x20"
245"\x63\x6F\x6C\x6F\x72\x3D\x27\x46\x46\x30\x30\x30\x30\x27\x26\x67\x74\x3B\x41\x63\x63\x65\x73\x73\x20\x64"
246"\x65\x6E\x69\x65\x64\x26\x6C\x74\x3B\x2F\x66\x6F\x6E\x74\x26\x67\x74\x3B\x5C\x6E\x22\x29\x3B\xA\x20\x20"
247"\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x70\x72\x69\x6E\x74\x66\x28\x22\x26\x6C\x74\x3B"
248"\x2F\x42\x4F\x44\x59\x26\x67\x74\x3B\x5C\x6E\x22\x29\x3B\xA\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
249"\x20\x20\x20\x20\x20\x72\x65\x74\x75\x72\x6E\x3B\xA\x20\x20\x20\x20\x20\x20\x20\x20\x7D\xA\x20\x20\x20"
250"\x20\x20\x20\x20\x20\x70\x72\x69\x6E\x74\x66\x28\x22\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x74\x79\x70\x65\x3A"
251"\x20\x74\x65\x78\x74\x2F\x68\x74\x6D\x6C\x5C\x72\x5C\x6E\x5C\x72\x5C\x6E\x22\x29\x3B\x20\x20\x20\x20\x20"
252"\x20\x20\x20\x20\xA\x20\x20\x20\x20\x20\x20\x20\x20\x70\x72\x69\x6E\x74\x66\x28\x22\x26\x6C\x74\x3B\x42"
253"\x4F\x44\x59\x20\x62\x67\x63\x6F\x6C\x6F\x72\x3D\x27\x45\x46\x45\x46\x45\x46\x27\x26\x67\x74\x3B\x5C\x6E"
254"\x22\x29\x3B\x20\x20\x20\x20\x20\x20\x20\x20\xA\x20\x20\x20\x20\x20\x20\x20\x20\x70\x72\x69\x6E\x74\x66"
255"\x28\x22\x59\x6F\x75\x20\x65\x6E\x74\x65\x72\x65\x64\x20\x69\x6E\x20\x79\x6F\x75\x72\x20\x61\x72\x65\x61"
256"\x5C\x6E\x22\x29\x3B\xA\x20\x20\x20\x20\x20\x20\x20\x20\x70\x72\x69\x6E\x74\x66\x28\x22\x26\x6C\x74\x3B"
257"\x2F\x42\x4F\x44\x59\x26\x67\x74\x3B\x26\x6C\x74\x3B\x2F\x48\x54\x4D\x4C\x26\x67\x74\x3B\x5C\x6E\x22\x29"
258"\x3B\xA\x7D\x3B\xA\xA\xA\x6D\x61\x69\x6E\x28\x29\x20\x7B\xA\x20\x20\x20\x20\x20\x20\x20\x20\x73\x74"
259"\x72\x75\x63\x74\x20\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x20\x73\x65\x72\x76\x65\x72\x3B\x20\x2F\x2F"
260"\x20\x73\x65\x72\x76\x65\x72\x20\x68\x61\x6E\x64\x6C\x65\x72\xA\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66"
261"\x28\x21\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x69\x74\x28\x26\x73\x65\x72\x76\x65\x72\x2C"
262"\x38\x33\x2C\x22\x68\x65\x6C\x70\x2E\x6C\x6F\x67\x22\x2C\x30\x29\x29\x20\x7B\x20\x2F\x2F\x20\x69\x6E\x69"
263"\x74\x69\x61\x6C\x69\x7A\x65\xA\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x66\x70"
264"\x72\x69\x6E\x74\x66\x28\x73\x74\x64\x65\x72\x72\x2C\x22\x63\x61\x6E\x27\x74\x20\x6F\x70\x65\x6E\x20\x6C"
265"\x69\x73\x74\x65\x6E\x20\x73\x6F\x63\x6B\x65\x74\x5C\x6E\x22\x29\x3B\xA\x20\x20\x20\x20\x20\x20\x20\x20"
266"\x7D\x3B\xA\xA\x20\x20\x20\x20\x20\x20\x20\x20\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x64\x64"
267"\x68\x61\x6E\x64\x6C\x65\x72\x28\x26\x73\x65\x72\x76\x65\x72\x2C\x22\x2A\x20\x2F\x61\x75\x74\x68\x22\x2C"
268"\x75\x72\x6C\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x2C\x30\x29\x3B\xA\x20\x20\x20\x20\x20\x20"
269"\x20\x20\x77\x68\x69\x6C\x65\x28\x31\x29\x20\x7B\xA\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
270"\x20\x20\x20\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x72\x75\x6E\x28\x26\x73\x65\x72\x76\x65\x72\x29"
271"\x3B\x20\x20\x20\x2F\x2F\x20\x72\x75\x6E\x20\x73\x65\x72\x76\x65\x72\xA\x20\x20\x20\x20\x20\x20\x20\x20"
272"\x7D\x3B\xA\x7D\x3B\xA\x3C\x2F\x50\x52\x45\x3E\x3C\x2F\x43\x4F\x44\x45\x3E\xA\x3C\x2F\x54\x44\x3E\x3C"
273"\x2F\x54\x52\x3E\x3C\x2F\x54\x41\x42\x4C\x45\x3E\xA\x3C\x48\x52\x3E\x3C\x42\x52\x3E\xA\xA\xA\x3C\x43"
274"\x45\x4E\x54\x45\x52\x3E\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x73\x73\x6C\x3E\x3C\x42\x3E\x3C\x66\x6F\x6E\x74"
275"\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x30\x30\x30\x30\x37\x37\x27\x3E\x3C\x48\x33\x3E\x6F\x70\x65\x6E\x73\x73"
276"\x6C\x20\x66\x6F\x72\x20\x28\x68\x74\x74\x70\x73\x29\x3C\x2F\x48\x33\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C"
277"\x2F\x42\x3E\x3C\x2F\x43\x45\x4E\x54\x45\x52\x3E\xA\x3C\x73\x6D\x61\x6C\x6C\x3E\x20\x3C\x42\x3E\x75\x73"
278"\x65\x64\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x3A\x3C\x2F\x42\x3E\x3C\x42\x52\x3E\xA\x3C\x61\x20\x68"
279"\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F"
280"\x73\x65\x72\x76\x65\x72\x5F\x48\x54\x54\x50\x64\x69\x72\x65\x63\x74\x69\x76\x65\x27\x3E\x77\x65\x62\x5F"
281"\x73\x65\x72\x76\x65\x72\x5F\x75\x73\x65\x53\x53\x4C\x63\x65\x72\x74\x3C\x2F\x61\x3E\x3C\x42\x52\x3E\xA"
282"\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23"
283"\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x69\x74\x27\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65"
284"\x72\x5F\x69\x6E\x69\x74\x3C\x2F\x61\x3E\x3C\x42\x52\x3E\xA\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F"
285"\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F"
286"\x72\x75\x6E\x27\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x72\x75\x6E\x3C\x2F\x61\x3E\x3C\x42\x52"
287"\x3E\xA\x3C\x2F\x73\x6D\x61\x6C\x6C\x3E\x3C\x42\x52\x3E\xA\xA\x48\x65\x72\x65\x20\x77\x65\x20\x73\x65"
288"\x74\x75\x70\x20\x61\x20\x73\x65\x72\x76\x65\x72\x20\x61\x6E\x64\x20\x77\x65\x20\x75\x73\x65\x20\x74\x68"
289"\x65\x20\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E"
290"\x73\x23\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x75\x73\x65\x53\x53\x4C\x63\x65\x72\x74\x27\x3E\x77"
291"\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x75\x73\x65\x53\x53\x4C\x63\x65\x72\x74\x3C\x2F\x61\x3E\x20\x74"
292"\x6F\x20\x75\x73\x65\x20\x73\x70\x65\x63\x69\x66\x69\x63\x20\x63\x65\x72\x74\x69\x66\x69\x63\x61\x74\x65"
293"\x20\x66\x69\x6C\x65\xA\x61\x6E\x64\x20\x77\x65\x20\x73\x74\x61\x72\x74\x20\x74\x68\x65\x20\x73\x65\x72"
294"\x76\x65\x72\x20\x77\x69\x74\x68\x20\x74\x68\x65\x20\x66\x6C\x61\x67\x20\x57\x53\x5F\x55\x53\x45\x53\x53"
295"\x4C\x20\x66\x6F\x72\x20\x73\x65\x63\x75\x72\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x28"
296"\x6C\x69\x62\x77\x65\x62\x73\x65\x72\x76\x65\x72\x20\x63\x6F\x6D\x70\x69\x6C\x65\x64\x20\x77\x2F\x20\x6F"
297"\x70\x65\x6E\x73\x73\x6C\x29\x3C\x42\x52\x3E\x3C\x42\x52\x3E\xA\xA\x53\x65\x65\x20\x61\x6C\x73\x6F\x20"
298"\x74\x68\x65\x20\x70\x61\x63\x6B\x65\x74\x6D\x6F\x75\x6E\x74\x65\x72\x20\x65\x78\x61\x6D\x70\x6C\x65\x20"
299"\x69\x6E\x20\x74\x68\x65\x20\x65\x78\x61\x6D\x70\x6C\x65\x20\x64\x69\x72\x65\x63\x74\x6F\x72\x79\x2E\x20"
300"\xA\x3C\x42\x52\x3E\xA\x3C\x54\x41\x42\x4C\x45\x20\x77\x69\x64\x74\x68\x3D\x27\x31\x30\x30\x25\x27\x20"
301"\x62\x67\x63\x6F\x6C\x6F\x72\x3D\x27\x43\x46\x43\x46\x43\x46\x27\x20\x62\x6F\x72\x64\x65\x72\x3D\x30\x3E"
302"\x3C\x54\x52\x3E\x3C\x54\x44\x3E\xA\x3C\x43\x4F\x44\x45\x3E\x3C\x50\x52\x45\x3E\xA\xA\x20\x20\xA\x23"
303"\x69\x6E\x63\x6C\x75\x64\x65\x20\x22\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x2E\x68\x22\xA\xA\x69\x6E"
304"\x74\x20\x6D\x61\x69\x6E\x28\x29\xA\x20\x20\x20\x20\x20\x20\x20\x20\x73\x74\x72\x75\x63\x74\x20\x77\x65"
305"\x62\x5F\x73\x65\x72\x76\x65\x72\x20\x73\x65\x72\x76\x65\x72\x73\x73\x6C\x3B\xA\x20\x20\x20\x20\x20\x20"
306"\x20\x20\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x75\x73\x65\x53\x53\x4C\x63\x65\x72\x74\x28\x26\x73"
307"\x65\x72\x76\x65\x72\x73\x73\x6C\x2C\x22\x66\x6F\x6F\x2D\x63\x65\x72\x74\x2E\x70\x65\x6D\x22\x29\x3B\x20"
308"\x2F\x2F\x20\x43\x65\x72\x74\x69\x66\x69\x63\x61\x74\x65\x20\x66\x69\x6C\x65\x20\x20\x20\x20\xA\x20\x20"
309"\x20\x20\x20\x20\x20\x20\x69\x66\x28\x21\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x69\x74\x28"
310"\x26\x73\x65\x72\x76\x65\x72\x73\x73\x6C\x2C\x34\x34\x33\x2C\x22\x68\x65\x6C\x70\x2E\x6C\x6F\x67\x22\x2C"
311"\x57\x53\x5F\x55\x53\x45\x53\x53\x4C\x29\x29\x20\x7B\xA\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
312"\x20\x20\x20\x20\x66\x70\x72\x69\x6E\x74\x66\x28\x73\x74\x64\x65\x72\x72\x2C\x22\x43\x61\x6E\x6E\x6F\x74"
313"\x20\x6F\x70\x65\x6E\x20\x70\x6F\x72\x74\x5C\x6E\x22\x29\x3B\xA\x20\x20\x20\x20\x20\x20\x20\x20\x7D\x3B"
314"\xA\x20\x20\x20\x20\x20\x20\x20\x20\x77\x68\x69\x6C\x65\x28\x31\x29\x20\x7B\xA\x20\x20\x20\x20\x20\x20"
315"\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x72\x75\x6E\x28\x26"
316"\x73\x65\x72\x76\x65\x72\x73\x73\x6C\x29\x3B\xA\x20\x20\x20\x20\x20\x20\x20\x20\x7D\x3B\xA\x7D\x3B\xA"
317"\x3C\x2F\x50\x52\x45\x3E\x3C\x2F\x43\x4F\x44\x45\x3E\xA\x3C\x2F\x54\x44\x3E\x3C\x2F\x54\x52\x3E\x3C\x2F"
318"\x54\x41\x42\x4C\x45\x3E\xA\x41\x6C\x6C\x20\x74\x68\x65\x20\x72\x65\x73\x74\x20\x69\x73\x20\x74\x68\x65"
319"\x20\x73\x61\x6D\x65\x20\x61\x73\x20\x77\x69\x74\x68\x6F\x75\x74\x20\x53\x53\x4C\x2E\x20\xA\x3C\x48\x52"
320"\x3E\x3C\x42\x52\x3E\xA\xA\xA\x3C\x63\x65\x6E\x74\x65\x72\x3E\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x6F\x75"
321"\x74\x67\x69\x66\x3E\x3C\x42\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x30\x30\x30\x30\x37"
322"\x37\x27\x3E\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x67\x69\x66\x27\x3E\x3C\x48\x33\x3E\x47\x69\x66\x20"
323"\x67\x65\x6E\x65\x72\x61\x74\x6F\x72\x3C\x2F\x48\x33\x3E\x3C\x2F\x61\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C"
324"\x2F\x42\x3E\x3C\x2F\x63\x65\x6E\x74\x65\x72\x3E\xA\x3C\x73\x6D\x61\x6C\x6C\x3E\x20\x3C\x42\x3E\x75\x73"
325"\x65\x64\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x3B\x3C\x2F\x42\x3E\x3C\x42\x52\x3E\xA\x3C\x61\x20\x68"
326"\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F"
327"\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x69\x74\x27\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E"
328"\x69\x74\x3C\x2F\x61\x3E\x3C\x42\x52\x3E\xA\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70"
329"\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x64\x64\x68"
330"\x61\x6E\x64\x6C\x65\x72\x27\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x64\x64\x68\x61\x6E\x64"
331"\x6C\x65\x72\x3C\x2F\x61\x3E\x3C\x42\x52\x3E\xA\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C"
332"\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x72\x75\x6E"
333"\x27\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x72\x75\x6E\x3C\x2F\x61\x3E\x3C\x42\x52\x3E\xA\x3C"
334"\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77"
335"\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x67\x69\x66\x73\x65\x74\x70\x61\x6C\x65\x74\x74\x65\x27\x3E\x77"
336"\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x67\x69\x66\x73\x65\x74\x70\x61\x6C\x65\x74\x74\x65\x3C\x2F\x61"
337"\x3E\x3C\x42\x52\x3E\xA\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63"
338"\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x67\x69\x66\x6F\x75\x74\x70\x75\x74"
339"\x27\x3E\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x67\x69\x66\x6F\x75\x74\x70\x75\x74\x3C\x2F\x61\x3E"
340"\x3C\x42\x52\x3E\xA\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74"
341"\x69\x6F\x6E\x73\x23\x63\x6C\x69\x65\x6E\x74\x69\x6E\x66\x6F\x27\x3E\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66"
342"\x6F\x3C\x2F\x61\x3E\x3C\x42\x52\x3E\xA\x3C\x2F\x73\x6D\x61\x6C\x6C\x3E\x3C\x42\x52\x3E\xA\xA\x54\x68"
343"\x69\x73\x20\x65\x78\x61\x6D\x70\x6C\x65\x20\x64\x72\x61\x77\x73\x20\x61\x6E\x20\x63\x69\x72\x63\x6C\x65"
344"\x20\x61\x74\x20\x78\x2C\x79\x20\x72\x65\x71\x75\x65\x73\x74\x65\x64\x20\x62\x79\x20\x63\x6C\x69\x65\x6E"
345"\x74\x2C\x20\x61\x6E\x64\x20\x6F\x75\x74\x70\x75\x74\x73\x20\x77\x69\x74\x68\x20\x66\x75\x6E\x63\x74\x69"
346"\x6F\x6E\x20\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F"
347"\x6E\x73\x23\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x67\x69\x66\x6F\x75\x74\x70\x75\x74\x27\x3E\x77"
348"\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x67\x69\x66\x6F\x75\x74\x70\x75\x74\x3C\x2F\x61\x3E\xA\xA\xA"
349"\x3C\x42\x52\x3E\x3C\x42\x52\x3E\xA\x3C\x54\x41\x42\x4C\x45\x20\x77\x69\x64\x74\x68\x3D\x27\x31\x30\x30"
350"\x25\x27\x20\x62\x67\x63\x6F\x6C\x6F\x72\x3D\x27\x43\x46\x43\x46\x43\x46\x27\x20\x62\x6F\x72\x64\x65\x72"
351"\x3D\x30\x3E\x3C\x54\x52\x3E\x3C\x54\x44\x3E\xA\x3C\x43\x4F\x44\x45\x3E\x3C\x50\x52\x45\x3E\xA\x23\x69"
352"\x6E\x63\x6C\x75\x64\x65\x20\x22\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x2E\x68\x22\xA\x23\x69\x6E\x63"
353"\x6C\x75\x64\x65\x20\x26\x6C\x74\x3B\x73\x74\x64\x69\x6F\x2E\x68\x26\x67\x74\x3B\xA\x23\x69\x6E\x63\x6C"
354"\x75\x64\x65\x20\x26\x6C\x74\x3B\x6D\x61\x74\x68\x2E\x68\x26\x67\x74\x3B\xA\xA\xA\x23\x64\x65\x66\x69"
355"\x6E\x65\x20\x47\x49\x46\x53\x49\x44\x45\x20\x33\x32\x30\xA\x63\x68\x61\x72\x20\x67\x69\x66\x64\x61\x74"
356"\x61\x5B\x47\x49\x46\x53\x49\x44\x45\x2A\x47\x49\x46\x53\x49\x44\x45\x5D\x3B\xA\x76\x6F\x69\x64\x20\x6F"
357"\x75\x74\x67\x69\x66\x28\x29\x20\x7B\xA\x9\x66\x6C\x6F\x61\x74\x20\x69\x3B\xA\x9\x69\x6E\x74\x20\x78"
358"\x2C\x79\x2C\x78\x63\x2C\x79\x63\x3B\xA\x9\x69\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3B\xA\x9\x77\x65\x62"
359"\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x67\x69\x66\x73\x65\x74\x70\x61\x6C\x65\x74\x74\x65\x28\x22\x45\x47\x41"
360"\x22\x29\x3B\xA\x9\x69\x66\x28\x2A\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x3E\x51\x75\x65\x72\x79"
361"\x28\x22\x69\x6D\x67\x22\x29\x21\x3D\x30\x29\x20\x7B\xA\x9\x9\x70\x72\x69\x6E\x74\x66\x28\x22\x43\x6F"
362"\x6E\x74\x65\x6E\x74\x2D\x74\x79\x70\x65\x3A\x20\x69\x6D\x61\x67\x65\x2F\x67\x69\x66\x5C\x72\x5C\x6E\x5C"
363"\x72\x5C\x6E\x22\x29\x3B\xA\x9\x9\x69\x66\x28\x21\x73\x74\x72\x63\x6D\x70\x28\x43\x6C\x69\x65\x6E\x74"
364"\x49\x6E\x66\x6F\x2D\x3E\x51\x75\x65\x72\x79\x28\x22\x69\x6D\x67\x22\x29\x2C\x22\x63\x69\x72\x63\x6C\x65"
365"\x22\x29\x29\x20\x7B\xA\x9\x9\x9\x78\x63\x3D\x61\x74\x6F\x69\x28\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66"
366"\x6F\x2D\x3E\x51\x75\x65\x72\x79\x28\x22\x78\x22\x29\x29\x25\x47\x49\x46\x53\x49\x44\x45\x3B\xA\x9\x9"
367"\x9\x79\x63\x3D\x61\x74\x6F\x69\x28\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x3E\x51\x75\x65\x72\x79"
368"\x28\x22\x79\x22\x29\x29\x25\x47\x49\x46\x53\x49\x44\x45\x3B\xA\x9\x9\x9\x63\x6F\x6C\x6F\x72\x3D\x28"
369"\x72\x61\x6E\x64\x28\x29\x25\x31\x35\x29\x2B\x31\x3B\xA\x9\x9\x9\x66\x6F\x72\x28\x69\x3D\x30\x3B\x69"
370"\x3C\x36\x2E\x32\x38\x3B\x69\x2B\x3D\x30\x2E\x30\x31\x29\x20\x7B\xA\x9\x9\x9\x9\x78\x3D\x28\x69\x6E"
371"\x74\x29\x28\x47\x49\x46\x53\x49\x44\x45\x2B\x28\x78\x63\x2B\x63\x6F\x73\x28\x69\x29\x2A\x31\x30\x29\x29"
372"\x25\x47\x49\x46\x53\x49\x44\x45\x3B\xA\x9\x9\x9\x9\x79\x3D\x28\x69\x6E\x74\x29\x28\x47\x49\x46\x53"
373"\x49\x44\x45\x2B\x28\x79\x63\x2B\x73\x69\x6E\x28\x69\x29\x2A\x31\x30\x29\x29\x25\x47\x49\x46\x53\x49\x44"
374"\x45\x3B\xA\x9\x9\x9\x9\x67\x69\x66\x64\x61\x74\x61\x5B\x78\x2B\x28\x79\x2A\x47\x49\x46\x53\x49\x44"
375"\x45\x29\x5D\x3D\x63\x6F\x6C\x6F\x72\x3B\xA\x9\x9\x9\x7D\x3B\xA\x9\x9\x7D\x3B\xA\x9\x9\x77\x65"
376"\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x67\x69\x66\x6F\x75\x74\x70\x75\x74\x28\x67\x69\x66\x64\x61\x74\x61"
377"\x2C\x47\x49\x46\x53\x49\x44\x45\x2C\x47\x49\x46\x53\x49\x44\x45\x29\x3B\xA\x9\x7D\x3B\xA\x9\x70\x72"
378"\x69\x6E\x74\x66\x28\x22\x26\x6C\x74\x3B\x63\x65\x6E\x74\x65\x72\x26\x67\x74\x3B\x47\x65\x6E\x65\x72\x61"
379"\x74\x65\x64\x20\x61\x20\x63\x69\x72\x63\x6C\x65\x20\x28\x63\x6C\x69\x63\x6B\x20\x69\x6E\x73\x69\x64\x65"
380"\x20\x74\x68\x65\x20\x69\x6D\x61\x67\x65\x29\x26\x6C\x74\x3B\x42\x52\x26\x67\x74\x3B\x5C\x6E\x22\x29\x3B"
381"\xA\x9\x70\x72\x69\x6E\x74\x66\x28\x22\x50\x72\x65\x73\x73\x65\x64\x20\x78\x3D\x25\x73\x2C\x79\x3D\x25"
382"\x73\x26\x6C\x74\x3B\x42\x52\x26\x67\x74\x3B\x5C\x6E\x22\x2C\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D"
383"\x3E\x51\x75\x65\x72\x79\x28\x22\x78\x22\x29\x2C\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x3E\x51\x75"
384"\x65\x72\x79\x28\x22\x79\x22\x29\x29\x3B\xA\x9\x70\x72\x69\x6E\x74\x66\x28\x22\x26\x6C\x74\x3B\x66\x6F"
385"\x72\x6D\x26\x67\x74\x3B\x26\x6C\x74\x3B\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x69\x6D\x61\x67\x65"
386"\x20\x62\x6F\x72\x64\x65\x72\x3D\x30\x20\x73\x72\x63\x3D\x27\x2F\x67\x69\x66\x3F\x69\x6D\x67\x3D\x63\x69"
387"\x72\x63\x6C\x65\x26\x78\x3D\x25\x73\x26\x79\x3D\x25\x73\x27\x26\x67\x74\x3B\x26\x6C\x74\x3B\x2F\x66\x6F"
388"\x72\x6D\x26\x67\x74\x3B\x26\x6C\x74\x3B\x2F\x43\x45\x4E\x54\x45\x52\x26\x67\x74\x3B\x5C\x6E\x22\x2C\x43"
389"\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x3E\x51\x75\x65\x72\x79\x28\x22\x78\x22\x29\x2C\x43\x6C\x69\x65"
390"\x6E\x74\x49\x6E\x66\x6F\x2D\x3E\x51\x75\x65\x72\x79\x28\x22\x79\x22\x29\x29\x3B\xA\x7D\x3B\xA\xA\xA"
391"\x6D\x61\x69\x6E\x28\x29\x20\x7B\xA\x9\x73\x74\x72\x75\x63\x74\x20\x77\x65\x62\x5F\x73\x65\x72\x76\x65"
392"\x72\x20\x73\x65\x72\x76\x65\x72\x3B\x20\x2F\x2F\x20\x73\x65\x72\x76\x65\x72\x20\x68\x61\x6E\x64\x6C\x65"
393"\x72\xA\x9\x6D\x65\x6D\x73\x65\x74\x28\x67\x69\x66\x64\x61\x74\x61\x2C\x30\x2C\x47\x49\x46\x53\x49\x44"
394"\x45\x2A\x47\x49\x46\x53\x49\x44\x45\x29\x3B\xA\x9\x69\x66\x28\x21\x77\x65\x62\x5F\x73\x65\x72\x76\x65"
395"\x72\x5F\x69\x6E\x69\x74\x28\x26\x73\x65\x72\x76\x65\x72\x2C\x38\x33\x2C\x22\x68\x65\x6C\x70\x2E\x6C\x6F"
396"\x67\x22\x2C\x30\x29\x29\x20\x7B\x20\x2F\x2F\x20\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x65\xA\x9\x9\x66"
397"\x70\x72\x69\x6E\x74\x66\x28\x73\x74\x64\x65\x72\x72\x2C\x22\x63\x61\x6E\x27\x74\x20\x6F\x70\x65\x6E\x20"
398"\x6C\x69\x73\x74\x65\x6E\x20\x73\x6F\x63\x6B\x65\x74\x5C\x6E\x22\x29\x3B\xA\x9\x7D\x3B\xA\xA\x9\x77"
399"\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x28\x26\x73\x65\x72\x76"
400"\x65\x72\x2C\x22\x2A\x20\x2F\x67\x69\x66\x22\x2C\x6F\x75\x74\x67\x69\x66\x2C\x30\x29\x3B\xA\x9\x77\x68"
401"\x69\x6C\x65\x28\x31\x29\x20\x7B\xA\x9\x9\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x72\x75\x6E\x28"
402"\x26\x73\x65\x72\x76\x65\x72\x29\x3B\x20\x20\x20\x2F\x2F\x20\x72\x75\x6E\x20\x73\x65\x72\x76\x65\x72\xA"
403"\x9\x7D\x3B\xA\x7D\x3B\xA\x3C\x2F\x50\x52\x45\x3E\x3C\x2F\x43\x4F\x44\x45\x3E\xA\x3C\x2F\x54\x44\x3E"
404"\x3C\x2F\x54\x52\x3E\x3C\x2F\x54\x41\x42\x4C\x45\x3E\xA\x3C\x48\x52\x3E\x3C\x42\x52\x3E\xA\xA\xA\xA"
405"\x3C\x43\x45\x4E\x54\x45\x52\x3E\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x63\x6F\x6F\x6B\x69\x65\x3E\x3C\x42\x3E"
406"\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x30\x30\x30\x30\x37\x37\x27\x3E\x3C\x61\x20\x68\x72"
407"\x65\x66\x3D\x2F\x63\x6F\x6F\x6B\x69\x65\x3E\x3C\x48\x33\x3E\x43\x6F\x6F\x6B\x69\x65\x73\x3C\x2F\x48\x33"
408"\x3E\x3C\x2F\x61\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x42\x3E\x3C\x2F\x43\x45\x4E\x54\x45\x52\x3E\xA"
409"\x3C\x73\x6D\x61\x6C\x6C\x3E\x20\x3C\x42\x3E\x75\x73\x65\x64\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x3B"
410"\x3C\x2F\x42\x3E\x3C\x42\x52\x3E\xA\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66"
411"\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x69\x74\x27\x3E"
412"\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x69\x74\x3C\x2F\x61\x3E\x3C\x42\x52\x3E\xA\x3C\x61"
413"\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65"
414"\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x27\x3E\x77\x65\x62\x5F\x73"
415"\x65\x72\x76\x65\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x3C\x2F\x61\x3E\x3C\x42\x52\x3E\xA\x3C"
416"\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77"
417"\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x72\x75\x6E\x27\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F"
418"\x72\x75\x6E\x3C\x2F\x61\x3E\x3C\x42\x52\x3E\xA\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C"
419"\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x63\x6C\x69\x65\x6E\x74\x69\x6E\x66\x6F\x27\x3E\x43\x6C"
420"\x69\x65\x6E\x74\x49\x6E\x66\x6F\x3C\x2F\x61\x3E\x3C\x42\x52\x3E\xA\x3C\x61\x20\x68\x72\x65\x66\x3D\x27"
421"\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E"
422"\x74\x5F\x73\x65\x74\x63\x6F\x6F\x6B\x69\x65\x27\x3E\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x73\x65"
423"\x74\x63\x6F\x6F\x6B\x69\x65\x3C\x2F\x61\x3E\x3C\x42\x52\x3E\xA\x3C\x2F\x73\x6D\x61\x6C\x6C\x3E\x3C\x42"
424"\x52\x3E\xA\xA\x54\x68\x69\x73\x20\x65\x78\x61\x6D\x70\x6C\x65\x20\x66\x65\x74\x63\x68\x73\x20\x61\x6E"
425"\x20\x63\x6C\x69\x65\x6E\x74\x20\x69\x6E\x70\x75\x74\x20\x61\x6E\x64\x20\x73\x65\x74\x27\x73\x20\x61\x6E"
426"\x20\x63\x6F\x6F\x6B\x69\x65\x20\x66\x6F\x72\x20\x31\x35\x20\x6D\x69\x6E\x75\x74\x65\x73\x20\x22\x2B\x31"
427"\x35\x4D\x22\x20\x75\x73\x69\x6E\x67\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x3C\x61\x20\x68\x72\x65\x66"
428"\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x63\x6C\x69"
429"\x65\x6E\x74\x5F\x73\x65\x74\x63\x6F\x6F\x6B\x69\x65\x27\x3E\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F"
430"\x73\x65\x74\x63\x6F\x6F\x6B\x69\x65\x3C\x2F\x61\x3E\xA\xA\x3C\x42\x52\x3E\x3C\x42\x52\x3E\xA\x3C\x54"
431"\x41\x42\x4C\x45\x20\x77\x69\x64\x74\x68\x3D\x27\x31\x30\x30\x25\x27\x20\x62\x67\x63\x6F\x6C\x6F\x72\x3D"
432"\x27\x43\x46\x43\x46\x43\x46\x27\x20\x62\x6F\x72\x64\x65\x72\x3D\x30\x3E\x3C\x54\x52\x3E\x3C\x54\x44\x3E"
433"\xA\x3C\x43\x4F\x44\x45\x3E\x3C\x50\x52\x45\x3E\xA\x23\x69\x6E\x63\x6C\x75\x64\x65\x20\x22\x77\x65\x62"
434"\x5F\x73\x65\x72\x76\x65\x72\x2E\x68\x22\xA\x23\x69\x6E\x63\x6C\x75\x64\x65\x20\x26\x6C\x74\x3B\x73\x74"
435"\x64\x69\x6F\x2E\x68\x26\x67\x74\x3B\xA\xA\xA\x76\x6F\x69\x64\x20\x63\x6F\x6F\x6B\x69\x65\x28\x29\x20"
436"\x7B\xA\x9\x69\x66\x28\x73\x74\x72\x6C\x65\x6E\x28\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x3E\x50"
437"\x6F\x73\x74\x28\x22\x75\x73\x65\x72\x22\x29\x29\x29\xA\x9\x9\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74"
438"\x5F\x73\x65\x74\x63\x6F\x6F\x6B\x69\x65\x28\x22\x75\x73\x65\x72\x6E\x61\x6D\x65\x22\x2C\x43\x6C\x69\x65"
439"\x6E\x74\x49\x6E\x66\x6F\x2D\x3E\x50\x6F\x73\x74\x28\x22\x75\x73\x65\x72\x22\x29\x2C\x22\x2B\x31\x35\x4D"
440"\x22\x29\x3B\xA\x9\x70\x72\x69\x6E\x74\x66\x28\x22\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x74\x79\x70\x65\x3A"
441"\x20\x74\x65\x78\x74\x2F\x68\x74\x6D\x6C\x5C\x72\x5C\x6E\x5C\x72\x5C\x6E\x22\x29\x3B\xA\x9\x70\x72\x69"
442"\x6E\x74\x66\x28\x22\x26\x6C\x74\x3B\x66\x6F\x72\x6D\x20\x6D\x65\x74\x68\x6F\x64\x3D\x27\x50\x4F\x53\x54"
443"\x27\x26\x67\x74\x3B\x5C\x72\x5C\x6E\x22\x29\x3B\xA\x9\x70\x72\x69\x6E\x74\x66\x28\x22\x26\x6C\x74\x3B"
444"\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x27\x74\x65\x78\x74\x27\x20\x6E\x61\x6D\x65\x3D\x27\x75\x73"
445"\x65\x72\x27\x20\x76\x61\x6C\x75\x65\x3D\x27\x25\x73\x27\x26\x67\x74\x3B\x5C\x72\x5C\x6E\x26\x6C\x74\x3B"
446"\x42\x52\x26\x67\x74\x3B\x22\x2C\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x3E\x43\x6F\x6F\x6B\x69\x65"
447"\x28\x22\x75\x73\x65\x72\x6E\x61\x6D\x65\x22\x29\x29\x3B\xA\x9\x70\x72\x69\x6E\x74\x66\x28\x22\x26\x6C"
448"\x74\x3B\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x27\x73\x75\x62\x6D\x69\x74\x27\x20\x6E\x61\x6D\x65"
449"\x3D\x27\x73\x65\x6E\x64\x27\x20\x76\x61\x6C\x75\x65\x3D\x27\x20\x47\x4F\x21\x20\x27\x26\x67\x74\x3B\x5C"
450"\x72\x5C\x6E\x26\x6C\x74\x3B\x42\x52\x26\x67\x74\x3B\x22\x29\x3B\xA\x9\x70\x72\x69\x6E\x74\x66\x28\x22"
451"\x26\x6C\x74\x3B\x2F\x66\x6F\x72\x6D\x26\x67\x74\x3B\x5C\x72\x5C\x6E\x22\x29\x3B\xA\x7D\xA\xA\x69\x6E"
452"\x74\x20\x6D\x61\x69\x6E\x28\x69\x6E\x74\x20\x61\x72\x67\x63\x2C\x63\x68\x61\x72\x2A\x2A\x20\x61\x72\x67"
453"\x76\x29\x20\x7B\xA\x20\x20\x20\x20\x20\x20\x20\x20\x73\x74\x72\x75\x63\x74\x20\x77\x65\x62\x5F\x73\x65"
454"\x72\x76\x65\x72\x20\x73\x65\x72\x76\x65\x72\x3B\x20\x2F\x2F\x20\x73\x65\x72\x76\x65\x72\x20\x68\x61\x6E"
455"\x64\x6C\x65\x72\xA\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x28\x21\x77\x65\x62\x5F\x73\x65\x72\x76\x65"
456"\x72\x5F\x69\x6E\x69\x74\x28\x26\x73\x65\x72\x76\x65\x72\x2C\x38\x30\x2C\x22\x68\x65\x6C\x70\x2E\x6C\x6F"
457"\x67\x22\x2C\x30\x29\x29\x20\x7B\x20\x2F\x2F\x20\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x65\xA\x20\x20\x20"
458"\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x66\x70\x72\x69\x6E\x74\x66\x28\x73\x74\x64\x65\x72"
459"\x72\x2C\x22\x63\x61\x6E\x27\x74\x20\x6F\x70\x65\x6E\x20\x6C\x69\x73\x74\x65\x6E\x20\x73\x6F\x63\x6B\x65"
460"\x74\x5C\x6E\x22\x29\x3B\xA\x9\x9\x72\x65\x74\x75\x72\x6E\x20\x31\x3B\xA\x20\x20\x20\x20\x20\x20\x20"
461"\x20\x7D\x3B\xA\xA\x20\x20\x20\x20\x20\x20\x20\x20\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x64"
462"\x64\x68\x61\x6E\x64\x6C\x65\x72\x28\x26\x73\x65\x72\x76\x65\x72\x2C\x22\x2A\x20\x2F\x2A\x22\x2C\x63\x6F"
463"\x6F\x6B\x69\x65\x2C\x30\x29\x3B\x20\x2F\x2F\x20\x61\x64\x64\x20\x68\x61\x6E\x64\x6C\x65\x72\x20\x66\x6F"
464"\x72\x20\x61\x6C\x6C\x20\x72\x65\x71\x75\x65\x73\x74\x73\xA\x20\x20\x20\x20\x20\x20\x20\x20\x77\x68\x69"
465"\x6C\x65\x28\x31\x29\x20\x7B\xA\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x77\x65"
466"\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x72\x75\x6E\x28\x26\x73\x65\x72\x76\x65\x72\x29\x3B\x20\x20\x20\x2F"
467"\x2F\x20\x72\x75\x6E\x20\x73\x65\x72\x76\x65\x72\xA\x20\x20\x20\x20\x20\x20\x20\x20\x7D\x3B\xA\x7D\xA"
468"\xA\x3C\x2F\x50\x52\x45\x3E\x3C\x2F\x43\x4F\x44\x45\x3E\xA\x3C\x2F\x54\x44\x3E\x3C\x2F\x54\x52\x3E\x3C"
469"\x2F\x54\x41\x42\x4C\x45\x3E\xA\x3C\x48\x52\x3E\x3C\x42\x52\x3E\xA\xA\x3C\x63\x65\x6E\x74\x65\x72\x3E"
470"\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x63\x68\x65\x63\x6B\x62\x6F\x78\x3E\x3C\x42\x3E\x3C\x66\x6F\x6E\x74\x20"
471"\x63\x6F\x6C\x6F\x72\x3D\x27\x30\x30\x30\x30\x37\x37\x27\x3E\x3C\x61\x20\x68\x72\x65\x66\x3D\x2F\x63\x68"
472"\x65\x63\x6B\x62\x6F\x78\x3E\x3C\x48\x33\x3E\x43\x68\x65\x63\x6B\x62\x6F\x78\x3C\x2F\x48\x33\x3E\x3C\x2F"
473"\x61\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x42\x3E\x3C\x2F\x63\x65\x6E\x74\x65\x72\x3E\xA\x3C\x73\x6D"
474"\x61\x6C\x6C\x3E\x20\x3C\x42\x3E\x75\x73\x65\x64\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x3B\x3C\x2F\x42"
475"\x3E\x3C\x42\x52\x3E\xA\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63"
476"\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x69\x74\x27\x3E\x77\x65\x62"
477"\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x69\x74\x3C\x2F\x61\x3E\x3C\x42\x52\x3E\xA\x3C\x61\x20\x68\x72"
478"\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x73"
479"\x65\x72\x76\x65\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x27\x3E\x77\x65\x62\x5F\x73\x65\x72\x76"
480"\x65\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x3C\x2F\x61\x3E\x3C\x42\x52\x3E\xA\x3C\x61\x20\x68"
481"\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F"
482"\x73\x65\x72\x76\x65\x72\x5F\x72\x75\x6E\x27\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x72\x75\x6E"
483"\x3C\x2F\x61\x3E\x3C\x42\x52\x3E\xA\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66"
484"\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x63\x6C\x69\x65\x6E\x74\x69\x6E\x66\x6F\x27\x3E\x43\x6C\x69\x65\x6E"
485"\x74\x49\x6E\x66\x6F\x3C\x2F\x61\x3E\x3C\x42\x52\x3E\xA\x3C\x2F\x73\x6D\x61\x6C\x6C\x3E\x3C\x42\x52\x3E"
486"\xA\xA\x54\x68\x69\x73\x20\x65\x78\x61\x6D\x70\x6C\x65\x20\x75\x73\x65\x73\x20\x61\x20\x65\x73\x70\x65"
487"\x63\x69\x66\x69\x63\x20\x63\x61\x73\x65\x20\x66\x72\x6F\x6D\x20\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F"
488"\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x63\x6C\x69\x65\x6E\x74\x69\x6E\x66\x6F"
489"\x27\x3E\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x3C\x2F\x61\x3E\x20\x71\x75\x65\x72\x79\x20\x61\x6E\x64"
490"\x20\x70\x6F\x73\x74\x2C\x20\x75\x73\x69\x6E\x67\x20\x74\x68\x65\x20\x27\x23\x27\x20\x61\x73\x20\x70\x72"
491"\x65\x66\x69\x78\x20\x6F\x66\x20\x76\x61\x72\x6E\x61\x6D\x65\x20\x72\x65\x74\x75\x72\x6E\x69\x6E\x67\x20"
492"\x74\x68\x65\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x6F\x63\x63\x75\x72\x65\x6E\x63\x65\x73\xA\xA"
493"\xA\x3C\x42\x52\x3E\x3C\x42\x52\x3E\xA\x3C\x54\x41\x42\x4C\x45\x20\x77\x69\x64\x74\x68\x3D\x27\x31\x30"
494"\x30\x25\x27\x20\x62\x67\x63\x6F\x6C\x6F\x72\x3D\x27\x43\x46\x43\x46\x43\x46\x27\x20\x62\x6F\x72\x64\x65"
495"\x72\x3D\x30\x3E\x3C\x54\x52\x3E\x3C\x54\x44\x3E\xA\x3C\x43\x4F\x44\x45\x3E\x3C\x50\x52\x45\x3E\xA\xA"
496"\x23\x69\x6E\x63\x6C\x75\x64\x65\x20\x22\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x2E\x68\x22\xA\x23\x69"
497"\x6E\x63\x6C\x75\x64\x65\x20\x26\x6C\x74\x3B\x73\x74\x64\x69\x6F\x2E\x68\x26\x67\x74\x3B\xA\xA\xA\x76"
498"\x6F\x69\x64\x20\x63\x68\x65\x63\x6B\x62\x6F\x78\x28\x29\x20\x7B\xA\x9\x69\x6E\x74\x20\x69\x3D\x30\x3B"
499"\xA\x9\x63\x68\x61\x72\x20\x2A\x74\x78\x74\x5B\x5D\x3D\x7B\x22\x6F\x6E\x65\x22\x2C\x22\x74\x77\x6F\x22"
500"\x2C\x22\x74\x68\x72\x65\x65\x22\x2C\x22\x66\x6F\x75\x72\x22\x2C\x22\x66\x69\x76\x65\x22\x7D\x3B\xA\x9"
501"\x70\x72\x69\x6E\x74\x66\x28\x22\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x74\x79\x70\x65\x3A\x20\x74\x65\x78\x74"
502"\x2F\x68\x74\x6D\x6C\x5C\x72\x5C\x6E\x5C\x72\x5C\x6E\x22\x29\x3B\xA\x9\x70\x72\x69\x6E\x74\x66\x28\x22"
503"\x26\x6C\x74\x3B\x66\x6F\x72\x6D\x20\x6D\x65\x74\x68\x6F\x64\x3D\x27\x51\x55\x45\x52\x59\x27\x26\x67\x74"
504"\x3B\x5C\x72\x5C\x6E\x22\x29\x3B\xA\x9\xA\x9\x66\x6F\x72\x28\x69\x3D\x30\x3B\x69\x3C\x35\x3B\x69\x2B"
505"\x2B\x29\x20\x7B\x9\xA\x9\x9\x70\x72\x69\x6E\x74\x66\x28\x22\x26\x6C\x74\x3B\x69\x6E\x70\x75\x74\x20"
506"\x74\x79\x70\x65\x3D\x27\x63\x68\x65\x63\x6B\x62\x6F\x78\x27\x20\x6E\x61\x6D\x65\x3D\x27\x6E\x75\x6D\x62"
507"\x65\x72\x27\x20\x76\x61\x6C\x75\x65\x3D\x27\x25\x73\x27\x26\x67\x74\x3B\x5C\x72\x5C\x6E\x26\x6C\x74\x3B"
508"\x42\x52\x26\x67\x74\x3B\x22\x2C\x74\x78\x74\x5B\x69\x5D\x29\x3B\x9\xA\x9\x7D\x3B\xA\x9\x70\x72\x69"
509"\x6E\x74\x66\x28\x22\x26\x6C\x74\x3B\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x27\x73\x75\x62\x6D\x69"
510"\x74\x27\x20\x6E\x61\x6D\x65\x3D\x27\x73\x65\x6E\x64\x27\x20\x76\x61\x6C\x75\x65\x3D\x27\x20\x53\x45\x4E"
511"\x44\x20\x27\x26\x67\x74\x3B\x5C\x72\x5C\x6E\x26\x6C\x74\x3B\x42\x52\x26\x67\x74\x3B\x22\x29\x3B\xA\x9"
512"\x70\x72\x69\x6E\x74\x66\x28\x22\x26\x6C\x74\x3B\x2F\x66\x6F\x72\x6D\x26\x67\x74\x3B\x5C\x72\x5C\x6E\x22"
513"\x29\x3B\xA\x9\xA\x9\x70\x72\x69\x6E\x74\x66\x28\x22\x59\x6F\x75\x20\x68\x61\x76\x65\x20\x63\x68\x6F"
514"\x6F\x73\x65\x6E\x20\x26\x6C\x74\x3B\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x46\x46\x30\x30\x30"
515"\x30\x27\x26\x67\x74\x3B\x25\x64\x26\x6C\x74\x3B\x2F\x66\x6F\x6E\x74\x26\x67\x74\x3B\x20\x6E\x75\x6D\x62"
516"\x65\x72\x73\x3A\x20\x5C\x72\x5C\x6E\x22\x2C\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x3E\x51\x75\x65"
517"\x72\x79\x28\x22\x23\x6E\x75\x6D\x62\x65\x72\x22\x29\x29\x3B\xA\x9\x66\x6F\x72\x28\x69\x3D\x30\x3B\x69"
518"\x26\x6C\x74\x3B\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x3E\x51\x75\x65\x72\x79\x28\x22\x23\x6E\x75"
519"\x6D\x62\x65\x72\x22\x29\x3B\x69\x2B\x2B\x29\x20\x7B\x9\xA\x9\x9\x70\x72\x69\x6E\x74\x66\x28\x22\x26"
520"\x6C\x74\x3B\x62\x3E\x25\x73\x26\x6C\x74\x3B\x2F\x62\x26\x67\x74\x3B\x2C\x5C\x72\x5C\x6E\x5C\x72\x5C\x6E"
521"\x22\x2C\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x3E\x51\x75\x65\x72\x79\x28\x22\x6E\x75\x6D\x62\x65"
522"\x72\x22\x29\x29\x3B\xA\x9\x7D\x3B\xA\x9\x70\x72\x69\x6E\x74\x66\x28\x22\x2E\x2E\x2E\x26\x6C\x74\x3B"
523"\x42\x52\x26\x67\x74\x3B\x5C\x72\x5C\x6E\x5C\x72\x5C\x6E\x22\x29\x3B\xA\x9\xA\x7D\xA\x69\x6E\x74\x20"
524"\x6D\x61\x69\x6E\x28\x69\x6E\x74\x20\x61\x72\x67\x63\x2C\x63\x68\x61\x72\x2A\x2A\x20\x61\x72\x67\x76\x29"
525"\x20\x7B\xA\x20\x20\x20\x20\x20\x20\x20\x20\x73\x74\x72\x75\x63\x74\x20\x77\x65\x62\x5F\x73\x65\x72\x76"
526"\x65\x72\x20\x73\x65\x72\x76\x65\x72\x3B\x20\x2F\x2F\x20\x73\x65\x72\x76\x65\x72\x20\x68\x61\x6E\x64\x6C"
527"\x65\x72\xA\x20\x20\x20\x20\x20\x20\x20\x20\x69\x66\x28\x21\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F"
528"\x69\x6E\x69\x74\x28\x26\x73\x65\x72\x76\x65\x72\x2C\x38\x30\x2C\x22\x68\x65\x6C\x70\x2E\x6C\x6F\x67\x22"
529"\x2C\x30\x29\x29\x20\x7B\x20\x2F\x2F\x20\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x65\xA\x20\x20\x20\x20\x20"
530"\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x66\x70\x72\x69\x6E\x74\x66\x28\x73\x74\x64\x65\x72\x72\x2C"
531"\x22\x63\x61\x6E\x27\x74\x20\x6F\x70\x65\x6E\x20\x6C\x69\x73\x74\x65\x6E\x20\x73\x6F\x63\x6B\x65\x74\x5C"
532"\x6E\x22\x29\x3B\xA\x9\x9\x72\x65\x74\x75\x72\x6E\x20\x31\x3B\xA\x20\x20\x20\x20\x20\x20\x20\x20\x7D"
533"\x3B\xA\xA\x20\x20\x20\x20\x20\x20\x20\x20\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x64\x64\x68"
534"\x61\x6E\x64\x6C\x65\x72\x28\x26\x73\x65\x72\x76\x65\x72\x2C\x22\x2A\x20\x2F\x2A\x22\x2C\x63\x68\x65\x63"
535"\x6B\x62\x6F\x78\x2C\x30\x29\x3B\x20\x2F\x2F\x20\x61\x64\x64\x20\x68\x61\x6E\x64\x6C\x65\x72\x20\x66\x6F"
536"\x72\x20\x61\x6C\x6C\x20\x72\x65\x71\x75\x65\x73\x74\x73\xA\x20\x20\x20\x20\x20\x20\x20\x20\x77\x68\x69"
537"\x6C\x65\x28\x31\x29\x20\x7B\xA\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x77\x65"
538"\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x72\x75\x6E\x28\x26\x73\x65\x72\x76\x65\x72\x29\x3B\x20\x20\x20\x2F"
539"\x2F\x20\x72\x75\x6E\x20\x73\x65\x72\x76\x65\x72\xA\x20\x20\x20\x20\x20\x20\x20\x20\x7D\x3B\xA\x7D\xA"
540"\xA\x3C\x2F\x50\x52\x45\x3E\x3C\x2F\x43\x4F\x44\x45\x3E\xA\x3C\x2F\x54\x44\x3E\x3C\x2F\x54\x52\x3E\x3C"
541"\x2F\x54\x41\x42\x4C\x45\x3E\xA\x3C\x48\x52\x3E\x3C\x42\x52\x3E\xA\xA\x3C\x41\x20\x6E\x61\x6D\x65\x3D"
542"\x63\x6F\x6E\x66\x65\x78\x61\x6D\x70\x6C\x65\x3E\x3C\x42\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72"
543"\x3D\x27\x30\x30\x30\x30\x37\x37\x27\x3E\x3C\x61\x20\x68\x72\x65\x66\x3D\x2F\x63\x6F\x6E\x66\x65\x78\x61"
544"\x6D\x70\x6C\x65\x3E\x3C\x48\x33\x3E\x43\x6F\x6E\x66\x69\x67\x20\x65\x78\x61\x6D\x70\x6C\x65\x3C\x2F\x48"
545"\x33\x3E\x3C\x2F\x61\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x42\x3E\xA\x3C\x73\x6D\x61\x6C\x6C\x3E\x20"
546"\x3C\x42\x3E\x75\x73\x65\x64\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x3B\x3C\x2F\x42\x3E\x3C\x42\x52\x3E"
547"\xA\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73"
548"\x23\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x69\x74\x27\x3E\x77\x65\x62\x5F\x73\x65\x72\x76"
549"\x65\x72\x5F\x69\x6E\x69\x74\x3C\x2F\x61\x3E\x3C\x42\x52\x3E\xA\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F"
550"\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72"
551"\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x27\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x64"
552"\x64\x68\x61\x6E\x64\x6C\x65\x72\x3C\x2F\x61\x3E\x3C\x42\x52\x3E\xA\x3C\x61\x20\x68\x72\x65\x66\x3D\x27"
553"\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x73\x65\x72\x76\x65"
554"\x72\x5F\x72\x75\x6E\x27\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x72\x75\x6E\x3C\x2F\x61\x3E\x3C"
555"\x42\x52\x3E\xA\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69"
556"\x6F\x6E\x73\x23\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x61\x64\x64\x66\x69\x6C\x65\x27\x3E\x77\x65"
557"\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x61\x64\x64\x66\x69\x6C\x65\x3C\x2F\x61\x3E\x3C\x42\x52\x3E\xA\x3C"
558"\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x63"
559"\x6C\x69\x65\x6E\x74\x69\x6E\x66\x6F\x27\x3E\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x3C\x2F\x61\x3E\x3C"
560"\x42\x52\x3E\xA\x3C\x2F\x73\x6D\x61\x6C\x6C\x3E\x3C\x42\x52\x3E\xA\xA\xA\x3C\x42\x52\x3E\x3C\x42\x52"
561"\x3E\xA\x3C\x54\x41\x42\x4C\x45\x20\x77\x69\x64\x74\x68\x3D\x27\x31\x30\x30\x25\x27\x20\x62\x67\x63\x6F"
562"\x6C\x6F\x72\x3D\x27\x43\x46\x43\x46\x43\x46\x27\x20\x62\x6F\x72\x64\x65\x72\x3D\x30\x3E\x3C\x54\x52\x3E"
563"\x3C\x54\x44\x3E\xA\x3C\x43\x4F\x44\x45\x3E\x3C\x50\x52\x45\x3E\xA\x23\x69\x6E\x63\x6C\x75\x64\x65\x20"
564"\x22\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x2E\x68\x22\xA\x23\x69\x6E\x63\x6C\x75\x64\x65\x20\x26\x6C"
565"\x74\x3B\x73\x74\x64\x69\x6F\x2E\x68\x26\x67\x74\x3B\xA\xA\xA\x76\x6F\x69\x64\x20\x63\x6F\x6E\x66\x65"
566"\x78\x61\x6D\x70\x6C\x65\x28\x29\x20\x7B\xA\x9\x70\x72\x69\x6E\x74\x66\x28\x22\x43\x6F\x6E\x74\x65\x6E"
567"\x74\x2D\x74\x79\x70\x65\x3A\x20\x74\x65\x78\x74\x2F\x68\x74\x6D\x6C\x5C\x72\x5C\x6E\x5C\x72\x5C\x6E\x22"
568"\x29\x3B\xA\x9\x70\x72\x69\x6E\x74\x66\x28\x22\x26\x6C\x74\x3B\x50\x52\x45\x26\x67\x74\x3B\x22\x29\x3B"
569"\xA\x9\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x61\x64\x64\x66\x69\x6C\x65\x28\x73\x65\x72\x76\x65"
570"\x72\x2E\x63\x6F\x6E\x66\x66\x69\x6C\x65\x29\x3B\x20\x2F\x2F\x20\x61\x64\x64\x20\x68\x65\x6C\x70\x2E\x63"
571"\x66\x67\x20\x66\x69\x6C\x65\x20\x74\x6F\x20\x6F\x75\x74\x70\x75\x74\x9\xA\x9\x70\x72\x69\x6E\x74\x66"
572"\x28\x22\x26\x6C\x74\x3B\x2F\x50\x52\x45\x26\x67\x74\x3B\x22\x29\x3B\xA\x9\x70\x72\x69\x6E\x74\x66\x28"
573"\x22\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x3E\x43\x6F\x6E\x66\x28\x5C\x22\x50\x45\x52\x53\x4F\x4E"
574"\x41\x4C\x5F\x43\x4F\x4E\x46\x5C\x22\x2C\x5C\x22\x50\x4F\x52\x54\x5C\x22\x29\x3D\x25\x73\x26\x6C\x74\x3B"
575"\x42\x52\x26\x67\x74\x3B\x5C\x6E\x22\x2C\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x3E\x43\x6F\x6E\x66"
576"\x28\x22\x50\x45\x52\x53\x4F\x4E\x41\x4C\x5F\x43\x4F\x4E\x46\x22\x2C\x22\x50\x4F\x52\x54\x22\x29\x29\x3B"
577"\xA\x9\x70\x72\x69\x6E\x74\x66\x28\x22\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x3E\x43\x6F\x6E\x66"
578"\x28\x5C\x22\x50\x45\x52\x53\x4F\x4E\x41\x4C\x5F\x43\x4F\x4E\x46\x5C\x22\x2C\x5C\x22\x49\x50\x5C\x22\x29"
579"\x3D\x25\x73\x26\x6C\x74\x3B\x42\x52\x26\x67\x74\x3B\x5C\x6E\x22\x2C\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66"
580"\x6F\x2D\x3E\x43\x6F\x6E\x66\x28\x22\x50\x45\x52\x53\x4F\x4E\x41\x4C\x5F\x43\x4F\x4E\x46\x22\x2C\x22\x49"
581"\x50\x22\x29\x29\x3B\xA\x9\x70\x72\x69\x6E\x74\x66\x28\x22\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D"
582"\x3E\x43\x6F\x6E\x66\x28\x5C\x22\x4C\x49\x42\x57\x45\x42\x53\x45\x52\x56\x45\x52\x5C\x22\x2C\x5C\x22\x50"
583"\x4F\x52\x54\x5C\x22\x29\x3D\x25\x73\x26\x6C\x74\x3B\x42\x52\x26\x67\x74\x3B\x5C\x6E\x22\x2C\x43\x6C\x69"
584"\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x3E\x43\x6F\x6E\x66\x28\x22\x4C\x49\x42\x57\x45\x42\x53\x45\x52\x56\x45"
585"\x52\x22\x2C\x22\x50\x4F\x52\x54\x22\x29\x29\x3B\xA\x9\xA\x7D\xA\xA\x69\x6E\x74\x20\x6D\x61\x69\x6E"
586"\x28\x69\x6E\x74\x20\x61\x72\x67\x63\x2C\x63\x68\x61\x72\x2A\x2A\x20\x61\x72\x67\x76\x29\x20\x7B\xA\x20"
587"\x20\x20\x20\x20\x20\x20\x20\x73\x74\x72\x75\x63\x74\x20\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x20\x73"
588"\x65\x72\x76\x65\x72\x3B\x20\x2F\x2F\x20\x73\x65\x72\x76\x65\x72\x20\x68\x61\x6E\x64\x6C\x65\x72\xA\x20"
589"\x20\x20\x20\x20\x20\x20\x20\x69\x66\x28\x21\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x69\x74"
590"\x28\x26\x73\x65\x72\x76\x65\x72\x2C\x38\x30\x2C\x22\x68\x65\x6C\x70\x2E\x63\x66\x67\x22\x2C\x57\x53\x5F"
591"\x55\x53\x45\x45\x58\x54\x43\x4F\x4E\x46\x29\x29\x20\x7B\x20\x2F\x2F\x20\x69\x6E\x69\x74\x69\x61\x6C\x69"
592"\x7A\x65\xA\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x66\x70\x72\x69\x6E\x74\x66"
593"\x28\x73\x74\x64\x65\x72\x72\x2C\x22\x63\x61\x6E\x27\x74\x20\x6F\x70\x65\x6E\x20\x6C\x69\x73\x74\x65\x6E"
594"\x20\x73\x6F\x63\x6B\x65\x74\x5C\x6E\x22\x29\x3B\xA\x9\x9\x72\x65\x74\x75\x72\x6E\x20\x31\x3B\xA\x20"
595"\x20\x20\x20\x20\x20\x20\x20\x7D\x3B\xA\xA\x20\x20\x20\x20\x20\x20\x20\x20\x77\x65\x62\x5F\x73\x65\x72"
596"\x76\x65\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x28\x26\x73\x65\x72\x76\x65\x72\x2C\x22\x2A\x20"
597"\x2A\x22\x2C\x63\x6F\x6E\x66\x65\x78\x61\x6D\x70\x6C\x65\x2C\x30\x29\x3B\x20\x2F\x2F\x20\x61\x64\x64\x20"
598"\x68\x61\x6E\x64\x6C\x65\x72\x20\x66\x6F\x72\x20\x61\x6C\x6C\x20\x72\x65\x71\x75\x65\x73\x74\x73\xA\x20"
599"\x20\x20\x20\x20\x20\x20\x20\x77\x68\x69\x6C\x65\x28\x31\x29\x20\x7B\xA\x20\x20\x20\x20\x20\x20\x20\x20"
600"\x20\x20\x20\x20\x20\x20\x20\x20\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x72\x75\x6E\x28\x26\x73\x65"
601"\x72\x76\x65\x72\x29\x3B\x20\x20\x20\x2F\x2F\x20\x72\x75\x6E\x20\x73\x65\x72\x76\x65\x72\xA\x20\x20\x20"
602"\x20\x20\x20\x20\x20\x7D\x3B\xA\x7D\xA\x3C\x2F\x50\x52\x45\x3E\x3C\x2F\x43\x4F\x44\x45\x3E\xA\x3C\x2F"
603"\x54\x44\x3E\x3C\x2F\x54\x52\x3E\x3C\x2F\x54\x41\x42\x4C\x45\x3E";
604
605#endif
diff --git a/contrib/help/functions.h b/contrib/help/functions.h
new file mode 100644
index 00000000..a151275e
--- /dev/null
+++ b/contrib/help/functions.h
@@ -0,0 +1,800 @@
1/*
2 * by data2header by Luis Figueiredo (stdio@netc.pt)
3 */
4#ifndef _FUNCTIONS_H_
5#define _FUNCTIONS_H_
6
7char functions[]="\x3C\x63\x65\x6E\x74\x65\x72\x3E\x3C\x48\x33\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27"
8"\x30\x30\x37\x37\x30\x30\x27\x3E\x6C\x69\x62\x77\x65\x62\x73\x65\x72\x76\x65\x72\x20\x46\x75\x6E\x63\x74"
9"\x69\x6F\x6E\x73\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x48\x33\x3E\x3C\x2F\x63\x65\x6E\x74\x65\x72\x3E\x3C"
10"\x42\x52\x3E\x3C\x42\x52\x3E\xA\x3C\x66\x6F\x6E\x74\x20\x66\x61\x63\x65\x3D\x27\x56\x65\x72\x64\x61\x6E"
11"\x61\x27\x3E\xA\xA\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E"
12"\x69\x74\x3E\x3C\x42\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x30\x30\x30\x30\x37\x37\x27"
13"\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x69\x74\x28\x29\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C"
14"\x2F\x42\x3E\x3C\x42\x52\x3E\x3C\x42\x52\x3E\xA\x3C\x42\x3E\x4E\x41\x4D\x45\x3C\x2F\x42\x3E\xA\x3C\x55"
15"\x4C\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x69\x74\x20\x2D\x20\x49\x6E\x69\x74\x69\x61"
16"\x6C\x69\x7A\x65\x20\x77\x65\x62\x73\x65\x72\x76\x65\x72\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x53\x59\x4E"
17"\x4F\x50\x53\x49\x53\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x23\x69\x6E\x63\x6C\x75\x64\x65\x20\x22\x77\x65"
18"\x62\x5F\x73\x65\x72\x76\x65\x72\x2E\x68\x22\x3C\x42\x52\x3E\x3C\x42\x52\x3E\x69\x6E\x74\x20\x77\x65\x62"
19"\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x69\x74\x28\x73\x74\x72\x75\x63\x74\x20\x77\x65\x62\x5F\x73\x65"
20"\x72\x76\x65\x72\x20\x2A\x3C\x55\x3E\x73\x65\x72\x76\x65\x72\x3C\x2F\x55\x3E\x2C\x20\x69\x6E\x74\x20\x3C"
21"\x55\x3E\x70\x6F\x72\x74\x3C\x2F\x55\x3E\x2C\x20\x63\x6F\x6E\x73\x74\x20\x63\x68\x61\x72\x20\x2A\x3C\x55"
22"\x3E\x6C\x6F\x67\x66\x69\x6C\x65\x3C\x2F\x55\x3E\x2C\x20\x69\x6E\x74\x20\x3C\x55\x3E\x66\x6C\x61\x67\x73"
23"\x3C\x2F\x55\x3E\x29\x3B\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x44\x45\x53\x43\x52\x49\x50\x54\x49\x4F\x4E"
24"\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x54\x68\x65\x20\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E"
25"\x69\x74\x28\x29\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x65\x73\x20"
26"\x74\x68\x65\x20\x73\x65\x72\x76\x65\x72\x20\x68\x61\x6E\x64\x6C\x65\x72\x20\x3C\x55\x3E\x73\x65\x72\x76"
27"\x65\x72\x3C\x2F\x55\x3E\x2C\x20\x73\x74\x61\x72\x74\x20\x61\x20\x6C\x69\x73\x74\x65\x6E\x20\x73\x6F\x63"
28"\x6B\x65\x74\x20\x61\x74\x20\x70\x6F\x72\x74\x20\x3C\x55\x3E\x70\x6F\x72\x74\x3C\x2F\x55\x3E\x2C\x20\x77"
29"\x69\x74\x68\x20\x74\x68\x65\x20\x6C\x6F\x67\x66\x69\x6C\x65\x20\x3C\x55\x3E\x6C\x6F\x67\x66\x69\x6C\x65"
30"\x3C\x2F\x55\x3E\x20\x74\x6F\x20\x70\x72\x6F\x64\x75\x63\x65\x20\x74\x68\x65\x20\x77\x65\x62\x73\x65\x72"
31"\x76\x65\x72\x20\x6C\x6F\x67\x3C\x42\x52\x3E\x20\x69\x66\x20\x57\x53\x5F\x55\x53\x45\x45\x58\x54\x43\x4F"
32"\x4E\x46\x20\x66\x6C\x61\x67\x20\x69\x73\x20\x75\x73\x65\x64\x2C\x20\x74\x68\x65\x20\x3C\x55\x3E\x6C\x6F"
33"\x67\x66\x69\x6C\x65\x3C\x2F\x55\x3E\x20\x77\x69\x6C\x6C\x20\x62\x65\x20\x74\x68\x65\x20\x63\x6F\x6E\x66"
34"\x69\x67\x20\x66\x69\x6C\x65\x20\x3C\x42\x52\x3E\xA\x3C\x55\x3E\x66\x6C\x61\x67\x73\x3C\x2F\x55\x3E\x20"
35"\x3C\x42\x52\x3E\xA\x57\x53\x5F\x55\x53\x45\x53\x53\x4C\x20\x66\x6F\x72\x20\x6F\x70\x65\x6E\x73\x73\x6C"
36"\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x28\x68\x74\x74\x70\x73\x20\x73\x75\x70\x70\x6F\x72"
37"\x74\x29\x3C\x42\x52\x3E\xA\x57\x53\x5F\x55\x53\x45\x45\x58\x54\x43\x4F\x4E\x46\x20\x66\x6F\x72\x20\x75"
38"\x73\x69\x6E\x67\x20\x61\x20\x65\x78\x74\x65\x72\x6E\x61\x6C\x20\x63\x6F\x6E\x66\x69\x67\x20\x66\x69\x6C"
39"\x65\x3C\x42\x52\x3E\xA\x57\x53\x5F\x4C\x4F\x43\x41\x4C\x20\x6F\x6E\x6C\x79\x20\x61\x63\x63\x65\x70\x74"
40"\x73\x20\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31\x20\x28\x6C\x6F\x63\x61\x6C\x29\x20\x63\x6F\x6E\x6E\x65\x63"
41"\x74\x69\x6F\x6E\x73\xA\x3C\x2F\x55\x4C\x3E\xA\xA\x3C\x42\x3E\x52\x45\x54\x55\x52\x4E\x20\x56\x41\x4C"
42"\x55\x45\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x4F\x6E\x20\x73\x75\x63\x63\x65\x73\x73\x2C\x20\x31\x20\x69"
43"\x73\x20\x72\x65\x74\x75\x72\x6E\x65\x64\x2C\x20\x4F\x6E\x20\x65\x72\x72\x6F\x72\x2C\x20\x30\x20\x69\x73"
44"\x20\x72\x65\x74\x75\x72\x6E\x65\x64\x3C\x2F\x55\x4C\x3E\xA\x3C\x48\x52\x3E\x3C\x42\x52\x3E\xA\x20\xA"
45"\xA\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x64\x64\x68\x61\x6E"
46"\x64\x6C\x65\x72\x3E\x3C\x42\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x30\x30\x30\x30\x37"
47"\x37\x27\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x28\x29"
48"\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x42\x3E\x3C\x42\x52\x3E\x3C\x42\x52\x3E\xA\x3C\x42\x3E\x4E\x41\x4D"
49"\x45\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x64\x64\x68\x61"
50"\x6E\x64\x6C\x65\x72\x20\x2D\x20\x61\x64\x64\x73\x20\x61\x20\x72\x65\x71\x75\x65\x73\x74\x20\x68\x61\x6E"
51"\x64\x6C\x65\x72\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x53\x59\x4E\x4F\x50\x53\x49\x53\x3C\x2F\x42\x3E\xA"
52"\x3C\x55\x4C\x3E\x23\x69\x6E\x63\x6C\x75\x64\x65\x20\x22\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x2E\x68"
53"\x22\x3C\x42\x52\x3E\x3C\x42\x52\x3E\x69\x6E\x74\x20\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x64"
54"\x64\x68\x61\x6E\x64\x6C\x65\x72\x28\x73\x74\x72\x75\x63\x74\x20\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72"
55"\x20\x2A\x3C\x55\x3E\x73\x65\x72\x76\x65\x72\x3C\x2F\x55\x3E\x2C\x20\x63\x6F\x6E\x73\x74\x20\x63\x68\x61"
56"\x72\x20\x2A\x3C\x55\x3E\x6D\x73\x74\x72\x3C\x2F\x55\x3E\x2C\x20\x76\x6F\x69\x64\x20\x28\x2A\x3C\x55\x3E"
57"\x66\x75\x6E\x63\x3C\x2F\x55\x3E\x29\x28\x29\x2C\x20\x69\x6E\x74\x20\x3C\x55\x3E\x66\x6C\x61\x67\x73\x3C"
58"\x2F\x55\x3E\x29\x3B\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x44\x45\x53\x43\x52\x49\x50\x54\x49\x4F\x4E\x3C"
59"\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x54\x68\x65\x20\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x64\x64"
60"\x68\x61\x6E\x64\x6C\x65\x72\x28\x29\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x61\x64\x64\x73\x20\x61\x20"
61"\x72\x65\x71\x75\x65\x73\x74\x20\x68\x61\x6E\x64\x6C\x65\x72\x20\x3C\x55\x3E\x6D\x73\x74\x72\x3C\x2F\x55"
62"\x3E\x20\x74\x6F\x20\x74\x68\x65\x20\x73\x65\x72\x76\x65\x72\x20\x68\x61\x6E\x64\x6C\x65\x72\x20\x3C\x55"
63"\x3E\x73\x65\x72\x76\x65\x72\x3C\x2F\x55\x3E\x20\x74\x68\x72\x6F\x75\x67\x68\x20\x74\x68\x65\x20\x66\x75"
64"\x6E\x63\x74\x69\x6F\x6E\x20\x3C\x55\x3E\x66\x75\x6E\x63\x3C\x2F\x55\x3E\x2E\x3C\x42\x52\x3E\xA\x3C\x55"
65"\x3E\x6D\x73\x74\x72\x3C\x2F\x55\x3E\x20\x69\x73\x20\x61\x20\x73\x74\x72\x69\x6E\x67\x20\x63\x6F\x6E\x74"
66"\x61\x69\x6E\x69\x6E\x67\x20\x65\x78\x70\x72\x65\x73\x73\x69\x6F\x6E\x73\x20\x28\x61\x73\x20\x6D\x61\x74"
67"\x63\x68\x69\x6E\x67\x20\x66\x69\x6C\x65\x73\x29\x20\x74\x6F\x20\x6D\x61\x74\x63\x68\x20\x77\x69\x74\x68"
68"\x20\x74\x68\x65\x20\x63\x6C\x69\x65\x6E\x74\x20\x72\x65\x71\x75\x65\x73\x74\x20\x28\x47\x45\x54\x20\x2F"
69"\x3C\x42\x3E\x62\x6C\x61\x68\x2E\x68\x74\x6D\x6C\x3C\x2F\x42\x3E\x3F\x69\x64\x3D\x31\x20\x48\x54\x54\x50"
70"\x2F\x31\x2E\x30\x2C\x20\x77\x69\x6C\x6C\x20\x62\x65\x20\x6D\x61\x74\x63\x68\x65\x64\x20\x62\x79\x20\x3C"
71"\x55\x3E\x6D\x73\x74\x72\x3C\x2F\x55\x3E\x3D\x22\x2A\x20\x2F\x62\x6C\x61\x68\x2E\x68\x74\x6D\x6C\x22\x29"
72"\x3C\x42\x52\x3E\xA\x3C\x55\x3E\x66\x6C\x61\x67\x73\x3A\x3C\x2F\x55\x3E\x20\x3C\x42\x52\x3E\xA\x57\x53"
73"\x5F\x4C\x4F\x43\x41\x4C\x20\x2D\x20\x6F\x6E\x6C\x79\x20\x6C\x6F\x63\x61\x6C\x20\x63\x6F\x6E\x6E\x65\x63"
74"\x74\x69\x6F\x6E\x73\x20\x61\x72\x65\x20\x68\x61\x6E\x64\x6C\x65\x64\x3C\x42\x52\x3E\xA\x57\x53\x5F\x44"
75"\x59\x4E\x56\x41\x52\x20\x2D\x20\x74\x72\x65\x61\x74\x20\x64\x79\x6E\x61\x6D\x69\x63\x20\x76\x61\x72\x69"
76"\x61\x62\x6C\x65\x73\x20\x6F\x6E\x20\x6F\x75\x74\x70\x75\x74\x20\x28\x41\x74\x65\x6E\x74\x69\x6F\x6E\x3A"
77"\x20\x74\x68\x69\x73\x20\x64\x69\x73\x61\x62\x6C\x65\x73\x20\x22\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x72\x61"
78"\x6E\x67\x65\x22\x20\x61\x6E\x64\x20\x22\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x6C\x65\x6E\x67\x74\x68\x22\x20"
79"\x68\x65\x61\x64\x65\x72\x2C\x20\x72\x65\x73\x70\x6F\x6E\x64\x69\x6E\x67\x20\x22\x35\x30\x31\x20\x6E\x6F"
80"\x74\x20\x69\x6D\x70\x6C\x65\x6D\x65\x6E\x74\x65\x64\x22\x29\x3C\x42\x52\x3E\xA\x57\x53\x5F\x55\x53\x45"
81"\x4C\x45\x4E\x20\x2D\x20\x57\x69\x74\x68\x20\x74\x68\x69\x73\x20\x66\x6C\x61\x67\x2C\x20\x6C\x69\x62\x72"
82"\x61\x72\x79\x20\x63\x61\x6C\x63\x75\x6C\x61\x74\x65\x20\x74\x68\x65\x20\x68\x65\x61\x64\x65\x72\x20\x22"
83"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x6C\x65\x6E\x67\x74\x68\x22\x20\x61\x6E\x64\x20\x22\x43\x6F\x6E\x74\x65"
84"\x6E\x74\x2D\x72\x61\x6E\x67\x65\x22\x20\x69\x74\x20\x73\x65\x6C\x66\x2C\x20\x75\x73\x65\x66\x75\x6C\x20"
85"\x66\x6F\x72\x20\x72\x65\x73\x75\x6D\x69\x6E\x67\x2C\x20\x63\x6F\x6E\x74\x65\x6E\x74\x2D\x6C\x65\x6E\x67"
86"\x74\x68\x20\x63\x61\x6E\x20\x62\x65\x20\x6D\x69\x73\x63\x61\x6C\x63\x75\x6C\x61\x74\x65\x64\x20\x69\x66"
87"\x20\x74\x68\x65\x20\x66\x69\x6C\x65\x20\x61\x64\x64\x65\x64\x20\x62\x79\x20\x28\x77\x65\x62\x5F\x63\x6C"
88"\x69\x65\x6E\x74\x5F\x61\x64\x64\x66\x69\x6C\x65\x29\x20\x63\x68\x61\x6E\x67\x65\x73\x20\x74\x68\x65\x20"
89"\x73\x69\x7A\x65\x20\x6F\x66\x20\x63\x6F\x6E\x74\x65\x6E\x74\x73\x2C\x20\x62\x65\x74\x77\x65\x65\x6E\x20"
90"\x63\x61\x6C\x63\x75\x6C\x61\x74\x69\x6E\x67\x20\x61\x6E\x64\x20\x6F\x75\x74\x70\x75\x74\x3C\x42\x52\x3E"
91"\xA\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x52\x45\x54\x55\x52\x4E\x20\x56\x41\x4C\x55\x45\x3C\x2F\x42\x3E"
92"\xA\x3C\x55\x4C\x3E\x4F\x6E\x20\x73\x75\x63\x63\x65\x73\x73\x2C\x20\x31\x20\x69\x73\x20\x72\x65\x74\x75"
93"\x72\x6E\x65\x64\x2C\x20\x4F\x6E\x20\x65\x72\x72\x6F\x72\x2C\x20\x30\x20\x69\x73\x20\x72\x65\x74\x75\x72"
94"\x6E\x65\x64\x3C\x2F\x55\x4C\x3E\xA\x3C\x48\x52\x3E\x3C\x42\x52\x3E\xA\xA\x3C\x41\x20\x6E\x61\x6D\x65"
95"\x3D\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x6C\x69\x61\x73\x64\x69\x72\x3E\x3C\x42\x3E\x3C\x66"
96"\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x30\x30\x30\x30\x37\x37\x27\x3E\x77\x65\x62\x5F\x73\x65\x72"
97"\x76\x65\x72\x5F\x61\x6C\x69\x61\x73\x64\x69\x72\x28\x29\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x42\x3E\x3C"
98"\x42\x52\x3E\x3C\x42\x52\x3E\xA\x3C\x42\x3E\x4E\x41\x4D\x45\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x77\x65"
99"\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x6C\x69\x61\x73\x64\x69\x72\x20\x2D\x20\x47\x65\x6E\x65\x72\x61"
100"\x74\x65\x73\x20\x61\x20\x64\x69\x72\x65\x63\x74\x6F\x72\x79\x20\x6C\x69\x73\x74\x2C\x20\x61\x6E\x64\x20"
101"\x75\x73\x65\x20\x66\x69\x6C\x65\x20\x62\x61\x73\x65\x64\x20\x73\x65\x72\x76\x65\x72\x3C\x2F\x55\x4C\x3E"
102"\xA\x3C\x42\x3E\x53\x59\x4E\x4F\x50\x53\x49\x53\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x23\x69\x6E\x63\x6C"
103"\x75\x64\x65\x20\x22\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x2E\x68\x22\x3C\x42\x52\x3E\x3C\x42\x52\x3E"
104"\x69\x6E\x74\x20\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x6C\x69\x61\x73\x64\x69\x72\x28\x73\x74"
105"\x72\x75\x63\x74\x20\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x20\x2A\x3C\x55\x3E\x73\x65\x72\x76\x65\x72"
106"\x3C\x2F\x55\x3E\x2C\x20\x63\x6F\x6E\x73\x74\x20\x63\x68\x61\x72\x20\x2A\x3C\x55\x3E\x61\x6C\x69\x61\x73"
107"\x3C\x2F\x55\x3E\x2C\x20\x63\x68\x61\x72\x20\x2A\x3C\x55\x3E\x70\x61\x74\x68\x3C\x2F\x55\x3E\x2C\x20\x69"
108"\x6E\x74\x20\x3C\x55\x3E\x66\x6C\x61\x67\x73\x3C\x2F\x55\x3E\x29\x3B\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E"
109"\x44\x45\x53\x43\x52\x49\x50\x54\x49\x4F\x4E\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x54\x68\x65\x20\x77\x65"
110"\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x6C\x69\x61\x73\x64\x69\x72\x28\x29\x20\x66\x75\x6E\x63\x74\x69"
111"\x6F\x6E\x20\x61\x64\x64\x73\x20\x61\x6E\x20\x61\x6C\x69\x61\x73\x20\x3C\x55\x3E\x61\x6C\x69\x61\x73\x3C"
112"\x2F\x55\x3E\x20\x74\x6F\x20\x74\x68\x65\x20\x73\x65\x72\x76\x65\x72\x20\x68\x61\x6E\x64\x6C\x65\x72\x20"
113"\x3C\x55\x3E\x73\x65\x72\x76\x65\x72\x3C\x2F\x55\x3E\x20\x61\x6E\x64\x20\x75\x73\x65\x20\x66\x69\x6C\x65"
114"\x73\x20\x66\x72\x6F\x6D\x20\x3C\x55\x3E\x70\x61\x74\x68\x3C\x2F\x55\x3E\x2E\x3C\x42\x52\x3E\xA\x3C\x55"
115"\x3E\x66\x6C\x61\x67\x73\x3A\x3C\x2F\x55\x3E\x20\x3C\x42\x52\x3E\xA\x57\x53\x5F\x4C\x4F\x43\x41\x4C\x20"
116"\x2D\x20\x6F\x6E\x6C\x79\x20\x6C\x6F\x63\x61\x6C\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x61"
117"\x72\x65\x20\x68\x61\x6E\x64\x6C\x65\x64\x3C\x42\x52\x3E\xA\x57\x53\x5F\x44\x59\x4E\x56\x41\x52\x20\x2D"
118"\x20\x74\x72\x65\x61\x74\x20\x64\x79\x6E\x61\x6D\x69\x63\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x73\x20\x6F"
119"\x6E\x20\x6F\x75\x74\x70\x75\x74\x20\x28\x41\x74\x65\x6E\x74\x69\x6F\x6E\x3A\x20\x74\x68\x69\x73\x20\x64"
120"\x69\x73\x61\x62\x6C\x65\x73\x20\x22\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x72\x61\x6E\x67\x65\x22\x20\x61\x6E"
121"\x64\x20\x22\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x6C\x65\x6E\x67\x74\x68\x22\x20\x68\x65\x61\x64\x65\x72\x2C"
122"\x20\x72\x65\x73\x70\x6F\x6E\x64\x69\x6E\x67\x20\x22\x35\x30\x31\x20\x6E\x6F\x74\x20\x69\x6D\x70\x6C\x65"
123"\x6D\x65\x6E\x74\x65\x64\x22\x29\x3C\x42\x52\x3E\xA\x57\x53\x5F\x55\x53\x45\x4C\x45\x4E\x20\x2D\x20\x57"
124"\x69\x74\x68\x20\x74\x68\x69\x73\x20\x66\x6C\x61\x67\x2C\x20\x6C\x69\x62\x72\x61\x72\x79\x20\x63\x61\x6C"
125"\x63\x75\x6C\x61\x74\x65\x20\x74\x68\x65\x20\x68\x65\x61\x64\x65\x72\x20\x22\x43\x6F\x6E\x74\x65\x6E\x74"
126"\x2D\x6C\x65\x6E\x67\x74\x68\x22\x20\x61\x6E\x64\x20\x22\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x72\x61\x6E\x67"
127"\x65\x22\x20\x69\x74\x20\x73\x65\x6C\x66\x2C\x20\x75\x73\x65\x66\x75\x6C\x20\x66\x6F\x72\x20\x72\x65\x73"
128"\x75\x6D\x69\x6E\x67\x2C\x20\x63\x6F\x6E\x74\x65\x6E\x74\x2D\x6C\x65\x6E\x67\x74\x68\x20\x63\x61\x6E\x20"
129"\x62\x65\x20\x6D\x69\x73\x63\x61\x6C\x63\x75\x6C\x61\x74\x65\x64\x20\x69\x66\x20\x74\x68\x65\x20\x66\x69"
130"\x6C\x65\x20\x61\x64\x64\x65\x64\x20\x62\x79\x20\x28\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x61\x64"
131"\x64\x66\x69\x6C\x65\x29\x20\x63\x68\x61\x6E\x67\x65\x73\x20\x74\x68\x65\x20\x73\x69\x7A\x65\x20\x6F\x66"
132"\x20\x63\x6F\x6E\x74\x65\x6E\x74\x73\x2C\x20\x62\x65\x74\x77\x65\x65\x6E\x20\x63\x61\x6C\x63\x75\x6C\x61"
133"\x74\x69\x6E\x67\x20\x61\x6E\x64\x20\x6F\x75\x74\x70\x75\x74\x3C\x42\x52\x3E\xA\x3C\x2F\x55\x4C\x3E\xA"
134"\x3C\x42\x3E\x52\x45\x54\x55\x52\x4E\x20\x56\x41\x4C\x55\x45\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x4F\x6E"
135"\x20\x73\x75\x63\x63\x65\x73\x73\x2C\x20\x31\x20\x69\x73\x20\x72\x65\x74\x75\x72\x6E\x65\x64\x2C\x20\x4F"
136"\x6E\x20\x65\x72\x72\x6F\x72\x2C\x20\x30\x20\x69\x73\x20\x72\x65\x74\x75\x72\x6E\x65\x64\x3C\x2F\x55\x4C"
137"\x3E\xA\x3C\x48\x52\x3E\x3C\x42\x52\x3E\xA\xA\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x77\x65\x62\x5F\x73\x65"
138"\x72\x76\x65\x72\x5F\x72\x75\x6E\x3E\x3C\x42\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x30"
139"\x30\x30\x30\x37\x37\x27\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x72\x75\x6E\x28\x29\x3C\x2F\x66"
140"\x6F\x6E\x74\x3E\x3C\x2F\x42\x3E\x3C\x42\x52\x3E\x3C\x42\x52\x3E\xA\x3C\x42\x3E\x4E\x41\x4D\x45\x3C\x2F"
141"\x42\x3E\xA\x3C\x55\x4C\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x72\x75\x6E\x20\x2D\x20\x72\x75"
142"\x6E\x20\x74\x68\x65\x20\x73\x65\x72\x76\x65\x72\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x53\x59\x4E\x4F\x50"
143"\x53\x49\x53\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x23\x69\x6E\x63\x6C\x75\x64\x65\x20\x22\x77\x65\x62\x5F"
144"\x73\x65\x72\x76\x65\x72\x2E\x68\x22\x3C\x42\x52\x3E\x3C\x42\x52\x3E\x69\x6E\x74\x20\x77\x65\x62\x5F\x73"
145"\x65\x72\x76\x65\x72\x5F\x72\x75\x6E\x28\x73\x74\x72\x75\x63\x74\x20\x77\x65\x62\x5F\x73\x65\x72\x76\x65"
146"\x72\x20\x2A\x3C\x55\x3E\x73\x65\x72\x76\x65\x72\x3C\x2F\x55\x3E\x29\x3B\x3C\x2F\x55\x4C\x3E\xA\x3C\x42"
147"\x3E\x44\x45\x53\x43\x52\x49\x50\x54\x49\x4F\x4E\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x54\x68\x65\x20\x77"
148"\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x72\x75\x6E\x28\x29\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x70"
149"\x72\x6F\x63\x65\x73\x73\x65\x73\x20\x72\x65\x71\x75\x65\x73\x74\x73\x20\x74\x6F\x20\x74\x68\x65\x20\x73"
150"\x65\x72\x76\x65\x72\x20\x3C\x55\x3E\x73\x65\x72\x76\x65\x72\x3C\x2F\x55\x3E\x2E\x20\x54\x68\x69\x73\x20"
151"\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x6D\x75\x73\x74\x20\x62\x65\x20\x63\x61\x6C\x6C\x65\x64\x20\x66\x72"
152"\x6F\x6D\x20\x74\x68\x65\x20\x6D\x61\x69\x6E\x20\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x6C\x6F"
153"\x6F\x70\x20\x28\x74\x68\x65\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x20\x64\x6F\x65\x73\x6E\x27\x74\x20"
154"\x6C\x6F\x6F\x70\x20\x69\x74\x20\x73\x65\x6C\x66\x29\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x52\x45\x54\x55"
155"\x52\x4E\x20\x56\x41\x4C\x55\x45\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x4F\x6E\x20\x73\x75\x63\x63\x65\x73"
156"\x73\x2C\x20\x67\x72\x65\x61\x74\x65\x72\x20\x74\x68\x61\x6E\x20\x30\x2C\x20\x69\x73\x20\x72\x65\x74\x75"
157"\x72\x6E\x65\x64\x20\x28\x32\x20\x69\x66\x20\x74\x68\x65\x72\x65\x20\x77\x61\x73\x6E\x27\x74\x20\x63\x6C"
158"\x69\x65\x6E\x74\x2C\x20\x31\x20\x69\x66\x20\x73\x6F\x6D\x65\x20\x72\x65\x71\x75\x65\x73\x74\x20\x77\x61"
159"\x73\x20\x70\x72\x6F\x63\x65\x73\x73\x65\x64\x29\x2C\x20\x4F\x6E\x20\x65\x72\x72\x6F\x72\x2C\x20\x30\x20"
160"\x69\x73\x20\x72\x65\x74\x75\x72\x6E\x65\x64\x3C\x2F\x55\x4C\x3E\xA\x3C\x48\x52\x3E\x3C\x42\x52\x3E\xA"
161"\xA\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x67\x65\x74\x63\x6F\x6E"
162"\x66\x3E\x3C\x42\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x30\x30\x30\x30\x37\x37\x27\x3E"
163"\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x67\x65\x74\x63\x6F\x6E\x66\x28\x29\x3C\x2F\x66\x6F\x6E\x74"
164"\x3E\x3C\x2F\x42\x3E\x3C\x42\x52\x3E\x3C\x42\x52\x3E\xA\x3C\x42\x3E\x4E\x41\x4D\x45\x3C\x2F\x42\x3E\xA"
165"\x3C\x55\x4C\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x67\x65\x74\x63\x6F\x6E\x66\x20\x2D\x20\x67"
166"\x65\x74\x20\x64\x61\x74\x61\x20\x66\x72\x6F\x6D\x20\x63\x6F\x6E\x66\x69\x67\x20\x66\x69\x6C\x65\x72\x3C"
167"\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x53\x59\x4E\x4F\x50\x53\x49\x53\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x23"
168"\x69\x6E\x63\x6C\x75\x64\x65\x20\x22\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x2E\x68\x22\x3C\x42\x52\x3E"
169"\x3C\x42\x52\x3E\x63\x68\x61\x72\x20\x2A\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x67\x65\x74\x63\x6F"
170"\x6E\x66\x28\x73\x74\x72\x75\x63\x74\x20\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x20\x2A\x3C\x55\x3E\x73"
171"\x65\x72\x76\x65\x72\x3C\x2F\x55\x3E\x2C\x63\x68\x61\x72\x20\x2A\x3C\x55\x3E\x74\x6F\x70\x69\x63\x3C\x2F"
172"\x55\x3E\x2C\x63\x68\x61\x72\x20\x2A\x3C\x55\x3E\x6B\x65\x79\x3C\x2F\x55\x3E\x29\x3B\x3C\x2F\x55\x4C\x3E"
173"\xA\x3C\x42\x3E\x44\x45\x53\x43\x52\x49\x50\x54\x49\x4F\x4E\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x54\x68"
174"\x65\x20\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x67\x65\x74\x63\x6F\x6E\x66\x28\x29\x20\x66\x75\x6E"
175"\x63\x74\x69\x6F\x6E\x20\x61\x6C\x6C\x6F\x63\x61\x74\x65\x73\x20\x61\x6E\x64\x20\x72\x65\x74\x75\x72\x6E"
176"\x20\x61\x20\x73\x74\x72\x69\x6E\x67\x20\x66\x72\x6F\x6D\x20\x63\x6F\x6E\x66\x69\x67\x20\x66\x69\x6C\x65"
177"\x20\x72\x65\x6C\x61\x74\x65\x64\x20\x74\x6F\x20\x3C\x55\x3E\x74\x6F\x70\x69\x63\x3C\x2F\x55\x3E\x20\x61"
178"\x6E\x64\x20\x3C\x55\x3E\x6B\x65\x79\x3C\x2F\x55\x3E\x20\x28\x73\x65\x65\x20\x3C\x61\x20\x68\x72\x65\x66"
179"\x3D\x22\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x63\x6F\x6E\x66\x69\x67\x66"
180"\x69\x6C\x65\x22\x3E\x63\x6F\x6E\x66\x69\x67\x20\x66\x69\x6C\x65\x20\x68\x65\x6C\x70\x3C\x2F\x61\x3E\x29"
181"\x20\x54\x68\x69\x73\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x6D\x75\x73\x74\x20\x62\x65\x20\x63\x61\x6C"
182"\x6C\x65\x64\x20\x61\x66\x74\x65\x72\x20\x74\x68\x65\x20\x69\x6E\x69\x74\x20\x6F\x66\x20\x74\x68\x65\x20"
183"\x76\x61\x72\x20\x3C\x55\x3E\x73\x65\x72\x76\x65\x72\x3C\x2F\x55\x3E\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E"
184"\x52\x45\x54\x55\x52\x4E\x20\x56\x41\x4C\x55\x45\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x72\x65\x74\x75\x72"
185"\x6E\x73\x20\x61\x6C\x6C\x6F\x63\x61\x74\x65\x64\x20\x73\x74\x72\x69\x6E\x67\x2C\x20\x28\x79\x6F\x75\x20"
186"\x73\x68\x6F\x75\x6C\x64\x20\x66\x72\x65\x65\x20\x61\x66\x74\x65\x72\x20\x75\x73\x65\x29\x20\x6F\x72\x20"
187"\x6E\x75\x6C\x6C\x20\x69\x66\x20\x6E\x6F\x74\x68\x69\x6E\x67\x20\x72\x65\x6C\x61\x74\x65\x64\x20\x74\x6F"
188"\x20\x61\x72\x67\x75\x6D\x65\x6E\x74\x73\x20\x66\x6F\x75\x6E\x64\x3C\x2F\x55\x4C\x3E\xA\x3C\x48\x52\x3E"
189"\x3C\x42\x52\x3E\xA\xA\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x75"
190"\x73\x65\x53\x53\x4C\x63\x65\x72\x74\x3E\x3C\x42\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27"
191"\x30\x30\x30\x30\x37\x37\x27\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x75\x73\x65\x53\x53\x4C\x63"
192"\x65\x72\x74\x28\x29\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x42\x3E\x3C\x42\x52\x3E\x3C\x42\x52\x3E\xA\x3C"
193"\x42\x3E\x4E\x41\x4D\x45\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F"
194"\x75\x73\x65\x53\x53\x4C\x63\x65\x72\x74\x20\x2D\x20\x75\x73\x65\x20\x63\x65\x72\x74\x69\x66\x69\x63\x61"
195"\x74\x65\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x53\x59\x4E\x4F\x50\x53\x49\x53\x3C\x2F\x42\x3E\xA\x3C\x55"
196"\x4C\x3E\x23\x69\x6E\x63\x6C\x75\x64\x65\x20\x22\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x2E\x68\x22\x3C"
197"\x42\x52\x3E\x3C\x42\x52\x3E\x76\x6F\x69\x64\x20\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x75\x73\x65"
198"\x53\x53\x4C\x63\x65\x72\x74\x28\x73\x74\x72\x75\x63\x74\x20\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x20"
199"\x2A\x3C\x55\x3E\x73\x65\x72\x76\x65\x72\x3C\x2F\x55\x3E\x2C\x20\x63\x6F\x6E\x73\x74\x20\x63\x68\x61\x72"
200"\x20\x2A\x3C\x55\x3E\x66\x69\x6C\x65\x3C\x2F\x55\x3E\x29\x3B\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x44\x45"
201"\x53\x43\x52\x49\x50\x54\x49\x4F\x4E\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x54\x68\x65\x20\x77\x65\x62\x5F"
202"\x73\x65\x72\x76\x65\x72\x5F\x75\x73\x65\x53\x53\x4C\x63\x65\x72\x74\x28\x29\x20\x66\x75\x6E\x63\x74\x69"
203"\x6F\x6E\x20\x74\x65\x6C\x6C\x73\x20\x73\x65\x72\x76\x65\x72\x20\x3C\x55\x3E\x73\x65\x72\x76\x65\x72\x3C"
204"\x2F\x55\x3E\x20\x74\x6F\x20\x75\x73\x65\x20\x63\x65\x72\x74\x69\x66\x69\x63\x61\x74\x65\x20\x66\x69\x6C"
205"\x65\x20\x3C\x55\x3E\x66\x69\x6C\x65\x3C\x2F\x55\x3E\x20\x6F\x6E\x20\x73\x73\x6C\x20\x63\x6F\x6E\x6E\x65"
206"\x63\x74\x69\x6F\x6E\x73\x20\x28\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x65\x64\x20\x77\x2F\x20\x66"
207"\x6C\x61\x67\x20\x57\x53\x5F\x55\x53\x45\x53\x53\x4C\x29\x3C\x2F\x55\x4C\x3E\xA\x3C\x48\x52\x3E\x3C\x42"
208"\x52\x3E\xA\xA\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x75\x73\x65"
209"\x4D\x49\x4D\x45\x66\x69\x6C\x65\x3E\x3C\x42\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x30"
210"\x30\x30\x30\x37\x37\x27\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x75\x73\x65\x4D\x49\x4D\x45\x66"
211"\x69\x6C\x65\x28\x29\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x42\x3E\x3C\x42\x52\x3E\x3C\x42\x52\x3E\xA\x3C"
212"\x42\x3E\x4E\x41\x4D\x45\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F"
213"\x75\x73\x65\x4D\x49\x4D\x45\x66\x69\x6C\x65\x20\x2D\x20\x75\x73\x65\x20\x6D\x69\x6D\x65\x20\x74\x79\x70"
214"\x65\x73\x20\x66\x69\x6C\x65\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x53\x59\x4E\x4F\x50\x53\x49\x53\x3C\x2F"
215"\x42\x3E\xA\x3C\x55\x4C\x3E\x23\x69\x6E\x63\x6C\x75\x64\x65\x20\x22\x77\x65\x62\x5F\x73\x65\x72\x76\x65"
216"\x72\x2E\x68\x22\x3C\x42\x52\x3E\x3C\x42\x52\x3E\x76\x6F\x69\x64\x20\x77\x65\x62\x5F\x73\x65\x72\x76\x65"
217"\x72\x5F\x75\x73\x65\x4D\x49\x4D\x45\x66\x69\x6C\x65\x28\x73\x74\x72\x75\x63\x74\x20\x77\x65\x62\x5F\x73"
218"\x65\x72\x76\x65\x72\x20\x2A\x3C\x55\x3E\x73\x65\x72\x76\x65\x72\x3C\x2F\x55\x3E\x2C\x20\x63\x6F\x6E\x73"
219"\x74\x20\x63\x68\x61\x72\x20\x2A\x3C\x55\x3E\x66\x69\x6C\x65\x3C\x2F\x55\x3E\x29\x3B\x3C\x2F\x55\x4C\x3E"
220"\xA\x3C\x42\x3E\x44\x45\x53\x43\x52\x49\x50\x54\x49\x4F\x4E\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x54\x68"
221"\x65\x20\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x75\x73\x65\x4D\x49\x4D\x45\x66\x69\x6C\x65\x28\x29"
222"\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x74\x65\x6C\x6C\x73\x20\x73\x65\x72\x76\x65\x72\x20\x3C\x55\x3E"
223"\x73\x65\x72\x76\x65\x72\x3C\x2F\x55\x3E\x20\x74\x6F\x20\x75\x73\x65\x20\x6D\x69\x6D\x65\x73\x20\x74\x79"
224"\x70\x65\x20\x66\x69\x6C\x65\x20\x3C\x55\x3E\x66\x69\x6C\x65\x3C\x2F\x55\x3E\x20\x66\x6F\x72\x20\x64\x65"
225"\x74\x65\x72\x6D\x69\x6E\x69\x6E\x67\x20\x6D\x69\x6D\x65\x20\x74\x79\x70\x65\x20\x62\x79\x20\x65\x78\x74"
226"\x65\x6E\x73\x69\x6F\x6E\x20\x75\x73\x65\x64\x20\x62\x79\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x3C\x61"
227"\x20\x68\x72\x65\x66\x3D\x22\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65"
228"\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x63\x6F\x6E\x74\x65\x6E\x74\x74\x79\x70\x65\x22\x3E\x77\x65\x62\x5F"
229"\x63\x6C\x69\x65\x6E\x74\x5F\x63\x6F\x6E\x74\x65\x6E\x74\x74\x79\x70\x65\x28\x29\x3C\x2F\x61\x3E\x3C\x2F"
230"\x55\x4C\x3E\xA\x3C\x48\x52\x3E\x3C\x42\x52\x3E\xA\xA\xA\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x77\x65\x62"
231"\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x61\x64\x64\x73\x74\x72\x65\x61\x6D\x3E\x3C\x42\x3E\x3C\x66\x6F\x6E\x74"
232"\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x30\x30\x30\x30\x37\x37\x27\x3E\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74"
233"\x5F\x61\x64\x64\x73\x74\x72\x65\x61\x6D\x28\x29\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x42\x3E\x3C\x42\x52"
234"\x3E\x3C\x42\x52\x3E\xA\x3C\x42\x3E\x4E\x41\x4D\x45\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x77\x65\x62\x5F"
235"\x63\x6C\x69\x65\x6E\x74\x5F\x61\x64\x64\x73\x74\x72\x65\x61\x6D\x20\x2D\x20\x61\x64\x64\x20\x61\x6E\x20"
236"\x6F\x75\x74\x70\x75\x74\x20\x73\x74\x72\x65\x61\x6D\x20\x74\x6F\x20\x74\x68\x65\x20\x63\x6C\x69\x65\x6E"
237"\x74\x20\x73\x74\x72\x75\x63\x74\x20\x6F\x6E\x20\x77\x65\x62\x73\x65\x72\x76\x65\x72\x3C\x2F\x55\x4C\x3E"
238"\xA\x3C\x42\x3E\x53\x59\x4E\x4F\x50\x53\x49\x53\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x23\x69\x6E\x63\x6C"
239"\x75\x64\x65\x20\x22\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x2E\x68\x22\x3C\x42\x52\x3E\x3C\x42\x52\x3E"
240"\x69\x6E\x74\x20\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x61\x64\x64\x73\x74\x72\x65\x61\x6D\x28\x46"
241"\x49\x4C\x45\x20\x2A\x3C\x55\x3E\x73\x74\x72\x65\x61\x6D\x3C\x2F\x55\x3E\x29\x3B\x3C\x2F\x55\x4C\x3E\xA"
242"\x3C\x42\x3E\x44\x45\x53\x43\x52\x49\x50\x54\x49\x4F\x4E\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x54\x68\x65"
243"\x20\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x61\x64\x64\x73\x74\x72\x65\x61\x6D\x28\x29\x20\x66\x75"
244"\x6E\x63\x74\x69\x6F\x6E\x20\x61\x64\x64\x73\x20\x74\x68\x65\x20\x73\x74\x72\x65\x61\x6D\x20\x3C\x55\x3E"
245"\x73\x74\x72\x65\x61\x6D\x3C\x2F\x55\x3E\x20\x74\x6F\x20\x74\x68\x65\x20\x6F\x75\x74\x70\x75\x74\x20\x73"
246"\x74\x72\x65\x61\x6D\x20\x6C\x69\x73\x74\x20\x69\x6E\x20\x74\x68\x65\x20\x63\x75\x72\x72\x65\x6E\x74\x20"
247"\x63\x6C\x69\x65\x6E\x74\x20\x6E\x6F\x64\x65\x3C\x2F\x55\x4C\x3E\xA\x20\x3C\x42\x3E\x4E\x4F\x54\x45\x3C"
248"\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x54\x68\x65\x20\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x61\x64\x64"
249"\x73\x74\x72\x65\x61\x6D\x28\x29\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x63\x61\x6E\x20\x3C\x42\x3E\x6F"
250"\x6E\x6C\x79\x3C\x2F\x42\x3E\x20\x62\x65\x20\x63\x61\x6C\x6C\x65\x64\x20\x66\x72\x6F\x6D\x20\x66\x75\x6E"
251"\x63\x74\x69\x6F\x6E\x73\x20\x63\x61\x6C\x6C\x65\x64\x20\x62\x79\x20\x67\x65\x74\x68\x61\x6E\x64\x6C\x65"
252"\x72\x73\x20\x72\x65\x67\x69\x73\x74\x65\x72\x65\x64\x20\x62\x79\x20\x3C\x61\x20\x68\x72\x65\x66\x3D\x27"
253"\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x73\x65\x72\x76\x65"
254"\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x27\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61"
255"\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x28\x29\x3C\x2F\x61\x3E\x2E\x3C\x2F\x55\x4C\x3E\xA\x3C\x55\x4C\x3E"
256"\x54\x68\x65\x20\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x61\x64\x64\x73\x74\x72\x65\x61\x6D\x28\x29"
257"\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x69\x73\x20\x6F\x62\x73\x6F\x6C\x65\x74\x65\x20\x61\x6E\x64\x20"
258"\x6E\x6F\x20\x6C\x6F\x6E\x67\x65\x72\x20\x69\x6E\x20\x75\x73\x65\x20\x6F\x6E\x20\x30\x2E\x33\x2E\x34\x20"
259"\x76\x65\x72\x73\x69\x6F\x6E\x73\x2C\x20\x75\x73\x65\x20\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x61"
260"\x64\x64\x66\x69\x6C\x65\x20\x69\x6E\x73\x74\x65\x61\x64\x3C\x2F\x75\x6C\x3E\xA\x3C\x42\x3E\x52\x45\x54"
261"\x55\x52\x4E\x20\x56\x41\x4C\x55\x45\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x4F\x6E\x20\x73\x75\x63\x63\x65"
262"\x73\x73\x2C\x20\x31\x20\x69\x73\x20\x72\x65\x74\x75\x72\x6E\x65\x64\x2C\x20\x4F\x6E\x20\x65\x72\x72\x6F"
263"\x72\x2C\x20\x30\x20\x69\x73\x20\x72\x65\x74\x75\x72\x6E\x65\x64\x3C\x2F\x55\x4C\x3E\xA\x3C\x48\x52\x3E"
264"\x3C\x42\x52\x3E\xA\xA\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x61"
265"\x64\x64\x66\x69\x6C\x65\x3E\x3C\x42\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x30\x30\x30"
266"\x30\x37\x37\x27\x3E\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x61\x64\x64\x66\x69\x6C\x65\x28\x29\x3C"
267"\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x42\x3E\x3C\x42\x52\x3E\x3C\x42\x52\x3E\xA\x3C\x42\x3E\x4E\x41\x4D\x45"
268"\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x61\x64\x64\x66\x69\x6C"
269"\x65\x20\x2D\x20\x61\x64\x64\x20\x61\x20\x66\x69\x6C\x65\x20\x74\x6F\x20\x74\x68\x65\x20\x6F\x75\x74\x70"
270"\x75\x74\x20\x73\x74\x72\x65\x61\x6D\x20\x6F\x66\x20\x74\x68\x65\x20\x63\x6C\x69\x65\x6E\x74\x20\x73\x74"
271"\x72\x75\x63\x74\x20\x6F\x6E\x20\x74\x68\x65\x20\x77\x65\x62\x73\x65\x72\x76\x65\x72\x3C\x2F\x55\x4C\x3E"
272"\xA\x3C\x42\x3E\x53\x59\x4E\x4F\x50\x53\x49\x53\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x23\x69\x6E\x63\x6C"
273"\x75\x64\x65\x20\x22\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x2E\x68\x22\x3C\x42\x52\x3E\x3C\x42\x52\x3E"
274"\x69\x6E\x74\x20\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x61\x64\x64\x66\x69\x6C\x65\x28\x63\x6F\x6E"
275"\x73\x74\x20\x63\x68\x61\x72\x20\x2A\x3C\x55\x3E\x66\x69\x6C\x65\x3C\x2F\x55\x3E\x29\x3B\x3C\x2F\x55\x4C"
276"\x3E\xA\x3C\x42\x3E\x44\x45\x53\x43\x52\x49\x50\x54\x49\x4F\x4E\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x54"
277"\x68\x65\x20\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x61\x64\x64\x66\x69\x6C\x65\x28\x29\x20\x66\x75"
278"\x6E\x63\x74\x69\x6F\x6E\x20\x6F\x70\x65\x6E\x73\x20\x74\x68\x65\x20\x66\x69\x6C\x65\x20\x3C\x55\x3E\x66"
279"\x69\x6C\x65\x3C\x2F\x55\x3E\x20\x61\x6E\x64\x20\x61\x64\x64\x73\x20\x69\x74\x20\x61\x73\x20\x73\x74\x72"
280"\x65\x61\x6D\x20\x74\x6F\x20\x74\x68\x65\x20\x6F\x75\x74\x70\x75\x74\x20\x73\x74\x72\x65\x61\x6D\x20\x6C"
281"\x69\x73\x74\x20\x69\x6E\x20\x74\x68\x65\x20\x63\x75\x72\x72\x65\x6E\x74\x20\x63\x6C\x69\x65\x6E\x74\x20"
282"\x6E\x6F\x64\x65\x3C\x2F\x55\x4C\x3E\xA\x20\x3C\x42\x3E\x4E\x4F\x54\x45\x3C\x2F\x42\x3E\xA\x3C\x55\x4C"
283"\x3E\x54\x68\x65\x20\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x61\x64\x64\x66\x69\x6C\x65\x28\x29\x20"
284"\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x63\x61\x6E\x20\x62\x65\x20\x63\x61\x6C\x6C\x65\x64\x20\x3C\x42\x3E"
285"\x6F\x6E\x6C\x79\x3C\x2F\x42\x3E\x20\x66\x72\x6F\x6D\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x20\x63\x61"
286"\x6C\x6C\x65\x64\x20\x62\x79\x20\x67\x65\x74\x68\x61\x6E\x64\x6C\x65\x72\x73\x20\x72\x65\x67\x69\x73\x74"
287"\x65\x72\x65\x64\x20\x76\x69\x61\x20\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66"
288"\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x64\x64\x68\x61\x6E"
289"\x64\x6C\x65\x72\x27\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65"
290"\x72\x28\x29\x3C\x2F\x61\x3E\x2E\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x52\x45\x54\x55\x52\x4E\x20\x56\x41"
291"\x4C\x55\x45\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x4F\x6E\x20\x53\x75\x63\x63\x65\x73\x73\x2C\x20\x31\x20"
292"\x69\x73\x20\x72\x65\x74\x75\x72\x6E\x65\x64\x2C\x20\x4F\x6E\x20\x65\x72\x72\x6F\x72\x2C\x20\x30\x20\x69"
293"\x73\x20\x72\x65\x74\x75\x72\x6E\x65\x64\x3C\x2F\x55\x4C\x3E\xA\x3C\x48\x52\x3E\x3C\x42\x52\x3E\xA\xA"
294"\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x67\x69\x66\x6F\x75\x74\x70"
295"\x75\x74\x3E\x3C\x42\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x30\x30\x30\x30\x37\x37\x27"
296"\x3E\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x67\x69\x66\x6F\x75\x74\x70\x75\x74\x28\x29\x3C\x2F\x66"
297"\x6F\x6E\x74\x3E\x3C\x2F\x42\x3E\x3C\x42\x52\x3E\x3C\x42\x52\x3E\xA\x3C\x42\x3E\x4E\x41\x4D\x45\x3C\x2F"
298"\x42\x3E\xA\x3C\x55\x4C\x3E\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x67\x69\x66\x6F\x75\x74\x70\x75"
299"\x74\x20\x2D\x20\x65\x78\x70\x6F\x72\x74\x20\x64\x61\x74\x61\x20\x61\x73\x20\x67\x69\x66\x3C\x2F\x55\x4C"
300"\x3E\xA\x3C\x42\x3E\x53\x59\x4E\x4F\x50\x53\x49\x53\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x23\x69\x6E\x63"
301"\x6C\x75\x64\x65\x20\x22\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x2E\x68\x22\x3C\x42\x52\x3E\x3C\x42\x52"
302"\x3E\x69\x6E\x74\x20\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x67\x69\x66\x6F\x75\x74\x70\x75\x74\x28"
303"\x63\x68\x61\x72\x20\x2A\x3C\x55\x3E\x64\x61\x74\x61\x3C\x2F\x55\x3E\x2C\x69\x6E\x74\x20\x3C\x55\x3E\x77"
304"\x3C\x2F\x55\x3E\x2C\x69\x6E\x74\x20\x3C\x55\x3E\x68\x3C\x2F\x75\x3E\x29\x3B\x3C\x2F\x55\x4C\x3E\xA\x3C"
305"\x42\x3E\x44\x45\x53\x43\x52\x49\x50\x54\x49\x4F\x4E\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x54\x68\x65\x20"
306"\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x67\x69\x66\x6F\x75\x74\x70\x75\x74\x28\x29\x20\x66\x75\x6E"
307"\x63\x74\x69\x6F\x6E\x20\x70\x72\x69\x6E\x74\x73\x20\x74\x6F\x20\x73\x74\x64\x6F\x75\x74\x20\x61\x20\x67"
308"\x69\x66\x20\x68\x65\x61\x64\x65\x72\x20\x28\x77\x69\x74\x68\x20\x77\x69\x64\x74\x68\x20\x3C\x55\x3E\x77"
309"\x3C\x2F\x55\x3E\x20\x61\x6E\x64\x20\x68\x65\x69\x67\x68\x74\x20\x3C\x55\x3E\x68\x3C\x2F\x55\x3E\x29\x20"
310"\x61\x6E\x64\x20\x74\x68\x65\x20\x69\x6D\x61\x67\x65\x20\x70\x6F\x69\x6E\x74\x65\x64\x20\x62\x79\x20\x3C"
311"\x55\x3E\x64\x61\x74\x61\x3C\x2F\x55\x3E\x2E\x3C\x42\x52\x3E\xA\x54\x68\x65\x20\x61\x6C\x6C\x6F\x63\x61"
312"\x74\x65\x64\x20\x6D\x65\x6D\x6F\x72\x79\x20\x3C\x55\x3E\x64\x61\x74\x61\x3C\x2F\x55\x3E\x20\x70\x6F\x69"
313"\x6E\x74\x73\x20\x74\x6F\x20\x6D\x75\x73\x74\x6E\x27\x74\x20\x62\x65\x20\x73\x6D\x61\x6C\x6C\x65\x72\x20"
314"\x74\x68\x61\x6E\x20\x3C\x55\x3E\x77\x3C\x2F\x55\x3E\x2A\x3C\x55\x3E\x68\x3C\x2F\x55\x3E\x2E\x3C\x42\x52"
315"\x3E\xA\x54\x68\x65\x20\x67\x69\x66\x20\x70\x61\x6C\x65\x74\x74\x65\x20\x69\x73\x20\x64\x65\x73\x63\x72"
316"\x69\x62\x65\x64\x20\x62\x79\x20\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75"
317"\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x67\x69\x66\x73\x65\x74\x70"
318"\x61\x6C\x65\x74\x74\x65\x27\x3E\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x67\x69\x66\x73\x65\x74\x70"
319"\x61\x6C\x65\x74\x74\x65\x3C\x2F\x61\x3E\xA\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x4E\x4F\x54\x45\x3C\x2F"
320"\x42\x3E\xA\x3C\x55\x4C\x3E\x54\x68\x65\x20\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x67\x69\x66\x6F"
321"\x75\x74\x70\x75\x74\x28\x29\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x63\x61\x6E\x20\x62\x65\x20\x63\x61"
322"\x6C\x6C\x65\x64\x20\x3C\x42\x3E\x6F\x6E\x6C\x79\x3C\x2F\x42\x3E\x20\x66\x72\x6F\x6D\x20\x66\x75\x6E\x63"
323"\x74\x69\x6F\x6E\x73\x20\x63\x61\x6C\x6C\x65\x64\x20\x62\x79\x20\x67\x65\x74\x68\x61\x6E\x64\x6C\x65\x72"
324"\x73\x20\x72\x65\x67\x69\x73\x74\x65\x72\x65\x64\x20\x76\x69\x61\x20\x3C\x61\x20\x68\x72\x65\x66\x3D\x27"
325"\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x73\x65\x72\x76\x65"
326"\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x27\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61"
327"\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x28\x29\x3C\x2F\x61\x3E\x2E\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x52"
328"\x45\x54\x55\x52\x4E\x20\x56\x41\x4C\x55\x45\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x4F\x6E\x20\x53\x75\x63"
329"\x63\x65\x73\x73\x2C\x20\x30\x20\x69\x73\x20\x72\x65\x74\x75\x72\x6E\x65\x64\x2C\x20\x4F\x6E\x20\x65\x72"
330"\x72\x6F\x72\x2C\x20\x6E\x6F\x6E\x20\x7A\x65\x72\x6F\x20\x69\x73\x20\x72\x65\x74\x75\x72\x6E\x65\x64\x2E"
331"\x3C\x2F\x55\x4C\x3E\xA\x3C\x48\x52\x3E\x3C\x42\x52\x3E\xA\xA\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x77\x65"
332"\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x67\x69\x66\x73\x65\x74\x70\x61\x6C\x65\x74\x74\x65\x3E\x3C\x42\x3E"
333"\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x30\x30\x30\x30\x37\x37\x27\x3E\x77\x65\x62\x5F\x63"
334"\x6C\x69\x65\x6E\x74\x5F\x67\x69\x66\x73\x65\x74\x70\x61\x6C\x65\x74\x74\x65\x28\x29\x3C\x2F\x66\x6F\x6E"
335"\x74\x3E\x3C\x2F\x42\x3E\x3C\x42\x52\x3E\x3C\x42\x52\x3E\xA\x3C\x42\x3E\x4E\x41\x4D\x45\x3C\x2F\x42\x3E"
336"\xA\x3C\x55\x4C\x3E\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x67\x69\x66\x73\x65\x74\x70\x61\x6C\x65"
337"\x74\x74\x65\x20\x2D\x20\x53\x65\x74\x75\x70\x20\x74\x68\x65\x20\x67\x69\x66\x20\x70\x61\x6C\x65\x74\x74"
338"\x65\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x53\x59\x4E\x4F\x50\x53\x49\x53\x3C\x2F\x42\x3E\xA\x3C\x55\x4C"
339"\x3E\x23\x69\x6E\x63\x6C\x75\x64\x65\x20\x22\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x2E\x68\x22\x3C\x42"
340"\x52\x3E\x3C\x42\x52\x3E\x76\x6F\x69\x64\x20\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x67\x69\x66\x73"
341"\x65\x74\x70\x61\x6C\x65\x74\x74\x65\x28\x63\x68\x61\x72\x20\x2A\x3C\x55\x3E\x66\x69\x6C\x65\x3C\x2F\x55"
342"\x3E\x29\x3B\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x44\x45\x53\x43\x52\x49\x50\x54\x49\x4F\x4E\x3C\x2F\x42"
343"\x3E\xA\x3C\x55\x4C\x3E\x54\x68\x65\x20\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x67\x69\x66\x73\x65"
344"\x74\x70\x61\x6C\x65\x74\x74\x65\x28\x29\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x6C\x6F\x61\x64\x73\x20"
345"\x72\x61\x77\x20\x70\x61\x6C\x65\x74\x74\x65\x20\x28\x2E\x61\x63\x74\x29\x20\x66\x72\x6F\x6D\x20\x3C\x55"
346"\x3E\x66\x69\x6C\x65\x3C\x2F\x55\x3E\x20\x6F\x72\x20\x69\x66\x20\x3C\x55\x3E\x66\x69\x6C\x65\x3C\x2F\x55"
347"\x3E\x20\x69\x73\x20\x22\x45\x47\x41\x22\x20\x74\x68\x65\x6E\x20\x74\x68\x69\x73\x20\x66\x75\x6E\x63\x74"
348"\x69\x6F\x6E\x20\x73\x65\x74\x75\x70\x73\x20\x74\x68\x65\x20\x70\x61\x6C\x65\x74\x74\x65\x20\x74\x6F\x20"
349"\x45\x47\x41\x20\x6D\x6F\x64\x65\x3C\x42\x52\x3E\xA\x3C\x2F\x55\x4C\x3E\xA\x3C\x48\x52\x3E\x3C\x42\x52"
350"\x3E\xA\xA\xA\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x73\x65\x74"
351"\x63\x6F\x6F\x6B\x69\x65\x3E\x3C\x42\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x30\x30\x30"
352"\x30\x37\x37\x27\x3E\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x73\x65\x74\x63\x6F\x6F\x6B\x69\x65\x28"
353"\x29\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x42\x3E\x3C\x42\x52\x3E\x3C\x42\x52\x3E\xA\x3C\x42\x3E\x4E\x41"
354"\x4D\x45\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x73\x65\x74\x63"
355"\x6F\x6F\x6B\x69\x65\x20\x2D\x20\x73\x65\x74\x20\x61\x20\x63\x6F\x6F\x6B\x69\x65\x3C\x2F\x55\x4C\x3E\xA"
356"\x3C\x42\x3E\x53\x59\x4E\x4F\x50\x53\x49\x53\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x23\x69\x6E\x63\x6C\x75"
357"\x64\x65\x20\x22\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x2E\x68\x22\x3C\x42\x52\x3E\x3C\x42\x52\x3E\x76"
358"\x6F\x69\x64\x20\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x73\x65\x74\x63\x6F\x6F\x6B\x69\x65\x28\x63"
359"\x68\x61\x72\x20\x2A\x3C\x55\x3E\x6B\x65\x79\x3C\x2F\x55\x3E\x2C\x20\x63\x68\x61\x72\x20\x2A\x3C\x55\x3E"
360"\x76\x61\x6C\x75\x65\x3C\x2F\x55\x3E\x2C\x20\x63\x68\x61\x72\x20\x2A\x3C\x55\x3E\x74\x69\x6D\x65\x6F\x66"
361"\x66\x73\x65\x74\x3C\x2F\x55\x3E\x2C\x20\x63\x68\x61\x72\x20\x2A\x3C\x55\x3E\x70\x61\x74\x68\x3C\x2F\x55"
362"\x3E\x2C\x63\x68\x61\x72\x20\x2A\x3C\x55\x3E\x64\x6F\x6D\x61\x69\x6E\x3C\x2F\x55\x3E\x2C\x69\x6E\x74\x20"
363"\x3C\x55\x3E\x73\x65\x63\x75\x72\x65\x3C\x2F\x55\x3E\x29\x3B\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x44\x45"
364"\x53\x43\x52\x49\x50\x54\x49\x4F\x4E\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x54\x68\x65\x20\x77\x65\x62\x5F"
365"\x63\x6C\x69\x65\x6E\x74\x5F\x73\x65\x74\x63\x6F\x6F\x6B\x69\x65\x28\x29\x20\x66\x75\x6E\x63\x74\x69\x6F"
366"\x6E\x20\x73\x65\x74\x73\x20\x61\x20\x63\x6F\x6F\x6B\x69\x65\x20\x6F\x6E\x20\x63\x6C\x69\x65\x6E\x74\x20"
367"\x62\x72\x6F\x77\x73\x65\x72\x20\x77\x69\x74\x68\x20\x6B\x65\x79\x20\x3C\x55\x3E\x6B\x65\x79\x3C\x2F\x55"
368"\x3E\x2C\x20\x76\x61\x6C\x75\x65\x20\x3C\x55\x3E\x76\x61\x6C\x75\x65\x3C\x2F\x55\x3E\x20\x61\x6E\x64\x20"
369"\x65\x78\x70\x69\x72\x65\x73\x20\x61\x74\x20\x3C\x55\x3E\x74\x69\x6D\x65\x6F\x66\x66\x73\x65\x74\x3C\x2F"
370"\x55\x3E\x2E\x3C\x42\x52\x3E\xA\x74\x69\x6D\x65\x6F\x66\x66\x73\x65\x74\x20\x66\x6F\x72\x6D\x61\x74\x20"
371"\x69\x73\x20\x6F\x6E\x65\x20\x6C\x69\x6B\x65\x20\x3C\x55\x3E\x73\x69\x67\x6E\x3C\x2F\x55\x3E\x2C\x20\x3C"
372"\x55\x3E\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x66\x73\x65\x74\x3C\x2F\x55\x3E\x20\x61\x6E\x64\x20\x3C\x55"
373"\x3E\x64\x69\x72\x65\x63\x74\x69\x76\x65\x3C\x2F\x55\x3E\x20\x3C\x73\x6D\x61\x6C\x6C\x3E\x20\x28\x69\x2E"
374"\x65\x20\x2B\x31\x30\x6D\x2C\x20\x31\x30\x20\x6D\x6F\x6E\x74\x68\x73\x29\x3C\x2F\x73\x6D\x61\x6C\x6C\x3E"
375"\xA\x9\x3C\x55\x4C\x3E\x3C\x55\x3E\x73\x69\x67\x6E\x3C\x2F\x55\x3E\x20\x69\x73\x20\x6F\x6E\x20\x6C\x69"
376"\x6B\x65\x20\x27\x2D\x27\x20\x6F\x72\x20\x27\x2B\x27\x3C\x2F\x55\x4C\x3E\xA\x9\x3C\x55\x4C\x3E\x3C\x55"
377"\x3E\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x66\x73\x65\x74\x3C\x2F\x55\x3E\x20\x69\x73\x20\x6C\x69\x6B\x65"
378"\x20\x2B\x3C\x55\x3E\x35\x3C\x2F\x55\x3E\x4D\x20\x6D\x65\x61\x6E\x73\x20\x65\x78\x70\x69\x72\x65\x73\x20"
379"\x61\x74\x20\x6E\x65\x78\x74\x20\x35\x20\x6D\x69\x6E\x75\x74\x65\x73\x20\x3C\x2F\x55\x4C\x3E\xA\x9\x3C"
380"\x55\x4C\x3E\x3C\x55\x3E\x64\x69\x72\x65\x63\x74\x69\x76\x65\x3C\x2F\x55\x3E\x20\x69\x73\x3A\xA\x9\x9"
381"\x3C\x55\x4C\x3E\x53\x20\x2D\x20\x73\x65\x63\x6F\x6E\x64\x73\x3C\x2F\x55\x4C\x3E\xA\x9\x9\x3C\x55\x4C"
382"\x3E\x4D\x20\x2D\x20\x6D\x69\x6E\x75\x74\x65\x73\x3C\x2F\x55\x4C\x3E\xA\x9\x9\x3C\x55\x4C\x3E\x48\x20"
383"\x2D\x20\x68\x6F\x75\x72\x73\x3C\x2F\x55\x4C\x3E\xA\x9\x9\x3C\x55\x4C\x3E\x64\x20\x2D\x20\x64\x61\x79"
384"\x73\x3C\x2F\x55\x4C\x3E\xA\x9\x9\x3C\x55\x4C\x3E\x6D\x20\x2D\x20\x6D\x6F\x6E\x74\x68\x73\x3C\x2F\x55"
385"\x4C\x3E\xA\x9\x9\x3C\x55\x4C\x3E\x79\x20\x2D\x20\x79\x65\x61\x72\x73\x3C\x2F\x55\x4C\x3E\xA\x9\x3C"
386"\x2F\x55\x4C\x3E\xA\x9\x70\x61\x74\x68\x20\x2D\x20\x53\x75\x62\x73\x65\x74\x20\x6F\x66\x20\x55\x52\x4C"
387"\x73\x20\x69\x6E\x20\x61\x20\x64\x6F\x6D\x61\x69\x6E\x20\x66\x6F\x72\x20\x77\x68\x69\x63\x68\x20\x74\x68"
388"\x65\x20\x63\x6F\x6F\x6B\x69\x65\x20\x69\x73\x20\x76\x61\x6C\x69\x64\xA\x20\x20\x20\x20\x20\x20\x20\x20"
389"\x20\x20\x20\x28\x49\x66\x20\x74\x68\x65\x20\x70\x61\x74\x68\x20\x69\x73\x20\x6E\x6F\x74\x20\x73\x70\x65"
390"\x63\x69\x66\x69\x65\x64\x20\x28\x70\x61\x74\x68\x20\x3D\x3D\x20\x4E\x55\x4C\x4C\x29\x2C\x20\x69\x74\x20"
391"\x61\x73\x20\x61\x73\x73\x75\x6D\x65\x64\x20\x74\x6F\x20\x62\x65\xA\x20\x20\x20\x20\x20\x20\x20\x20\x20"
392"\x20\x20\x20\x74\x68\x65\x20\x73\x61\x6D\x65\x20\x70\x61\x74\x68\x20\x61\x73\x20\x74\x68\x65\x20\x64\x6F"
393"\x63\x75\x6D\x65\x6E\x74\x20\x62\x65\x69\x6E\x67\x20\x64\x65\x73\x63\x72\x69\x62\x65\x64\x20\x62\x79\x20"
394"\x74\x68\x65\x20\x68\x65\x61\x64\x65\x72\x20\x77\x68\x69\x63\x68\xA\x20\x20\x20\x20\x20\x20\x20\x20\x20"
395"\x20\x20\x20\x63\x6F\x6E\x74\x61\x69\x6E\x73\x20\x74\x68\x65\x20\x63\x6F\x6F\x6B\x69\x65\x2E\x29\x3C\x42"
396"\x52\x3E\xA\x20\x20\x20\x20\x64\x6F\x6D\x61\x69\x6E\x20\x3D\x20\x44\x6F\x6D\x61\x69\x6E\x20\x74\x68\x65"
397"\x20\x63\x6F\x6F\x6B\x69\x65\x20\x69\x73\x20\x76\x61\x6C\x69\x64\x20\x66\x6F\x72\xA\x20\x20\x20\x20\x20"
398"\x20\x20\x20\x20\x20\x20\x20\x20\x28\x49\x66\x20\x74\x68\x65\x20\x64\x6F\x6D\x61\x69\x6E\x20\x69\x73\x20"
399"\x6E\x6F\x74\x20\x73\x65\x74\x20\x28\x64\x6F\x6D\x61\x69\x6E\x20\x3D\x3D\x20\x4E\x55\x4C\x4C\x29\x2C\x20"
400"\x74\x68\x65\x20\x64\x65\x66\x61\x75\x6C\x74\x20\x76\x61\x6C\x75\x65\x20\x6F\x66\xA\x20\x20\x20\x20\x20"
401"\x20\x20\x20\x20\x20\x20\x20\x20\x64\x6F\x6D\x61\x69\x6E\x20\x69\x73\x20\x74\x68\x65\x20\x68\x6F\x73\x74"
402"\x20\x6E\x61\x6D\x65\x20\x6F\x66\x20\x74\x68\x65\x20\x73\x65\x72\x76\x65\x72\x20\x77\x68\x69\x63\x68\x20"
403"\x67\x65\x6E\x65\x72\x61\x74\x65\x64\x20\x74\x68\x65\x20\x63\x6F\x6F\x6B\x69\x65\xA\x20\x20\x20\x20\x20"
404"\x20\x20\x20\x20\x20\x20\x20\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x2E\x29\x3C\x42\x52\x3E\xA\x9\x73\x65"
405"\x63\x75\x72\x65\x20\x3D\x20\x49\x66\x20\x61\x20\x63\x6F\x6F\x6B\x69\x65\x20\x69\x73\x20\x6D\x61\x72\x6B"
406"\x65\x64\x20\x73\x65\x63\x75\x72\x65\x20\x28\x73\x65\x63\x75\x72\x65\x20\x3D\x3D\x20\x31\x29\x2C\x20\x69"
407"\x74\x20\x77\x69\x6C\x6C\x20\x6F\x6E\x6C\x79\x20\x62\x65\xA\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
408"\x20\x20\x74\x72\x61\x6E\x73\x6D\x69\x74\x74\x65\x64\x20\x69\x66\x20\x74\x68\x65\x20\x63\x6F\x6D\x6D\x75"
409"\x6E\x69\x63\x61\x74\x69\x6F\x6E\x73\x20\x63\x68\x61\x6E\x6E\x65\x6C\x20\x77\x69\x74\x68\x20\x74\x68\x65"
410"\x20\x68\x6F\x73\x74\x20\x69\x73\x20\x61\xA\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x65"
411"\x63\x75\x72\x65\x20\x6F\x6E\x65\x2E\x20\x43\x75\x72\x72\x65\x6E\x74\x6C\x79\x20\x74\x68\x69\x73\x20\x6D"
412"\x65\x61\x6E\x73\x20\x74\x68\x61\x74\x20\x73\x65\x63\x75\x72\x65\x20\x63\x6F\x6F\x6B\x69\x65\x73\x20\x77"
413"\x69\x6C\x6C\x20\x6F\x6E\x6C\x79\x20\x62\x65\xA\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73"
414"\x65\x6E\x74\x20\x74\x6F\x20\x48\x54\x54\x50\x53\x20\x28\x48\x54\x54\x50\x20\x6F\x76\x65\x72\x20\x53\x53"
415"\x4C\x29\x20\x73\x65\x72\x76\x65\x72\x73\x2E\xA\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x28"
416"\x49\x66\x20\x73\x65\x63\x75\x72\x65\x20\x69\x73\x20\x6E\x6F\x74\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64"
417"\x20\x28\x73\x65\x63\x75\x72\x65\x20\x3D\x3D\x20\x30\x29\x2C\x20\x61\x20\x63\x6F\x6F\x6B\x69\x65\x20\x69"
418"\x73\x20\x63\x6F\x6E\x73\x69\x64\x65\x72\x65\x64\xA\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
419"\x20\x73\x61\x66\x65\x20\x74\x6F\x20\x62\x65\x20\x73\x65\x6E\x74\x20\x69\x6E\x20\x74\x68\x65\x20\x63\x6C"
420"\x65\x61\x72\x20\x6F\x76\x65\x72\x20\x75\x6E\x73\x65\x63\x75\x72\x65\x64\x20\x63\x68\x61\x6E\x6E\x65\x6C"
421"\x73\x2E\x20\x29\x3C\x42\x52\x3E\xA\x20\xA\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x4E\x4F\x54\x45\x3C\x2F"
422"\x42\x3E\xA\x3C\x55\x4C\x3E\x20\x54\x68\x65\x20\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x73\x65\x74"
423"\x63\x6F\x6F\x6B\x69\x65\x28\x29\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x73\x68\x6F\x75\x6C\x64\x20\x62"
424"\x65\x20\x63\x61\x6C\x6C\x65\x64\x20\x3C\x42\x3E\x6F\x6E\x6C\x79\x3C\x2F\x42\x3E\x20\x66\x72\x6F\x6D\x20"
425"\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x20\x63\x61\x6C\x6C\x65\x64\x20\x62\x79\x20\x67\x65\x74\x68\x61\x6E"
426"\x64\x6C\x65\x72\x73\x20\x72\x65\x67\x69\x73\x74\x65\x72\x65\x64\x20\x76\x69\x61\x20\x3C\x61\x20\x68\x72"
427"\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x73"
428"\x65\x72\x76\x65\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x27\x3E\x77\x65\x62\x5F\x73\x65\x72\x76"
429"\x65\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x28\x29\x3C\x2F\x61\x3E\x3C\x42\x52\x3E\x3C\x2F\x55"
430"\x4C\x3E\xA\x3C\x48\x52\x3E\x3C\x42\x52\x3E\xA\xA\xA\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x77\x65\x62\x5F"
431"\x63\x6C\x69\x65\x6E\x74\x5F\x64\x65\x6C\x65\x74\x65\x63\x6F\x6F\x6B\x69\x65\x3E\x3C\x42\x3E\x3C\x66\x6F"
432"\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x30\x30\x30\x30\x37\x37\x27\x3E\x77\x65\x62\x5F\x63\x6C\x69\x65"
433"\x6E\x74\x5F\x64\x65\x6C\x65\x74\x65\x63\x6F\x6F\x6B\x69\x65\x28\x29\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F"
434"\x42\x3E\x3C\x42\x52\x3E\x3C\x42\x52\x3E\xA\x3C\x42\x3E\x4E\x41\x4D\x45\x3C\x2F\x42\x3E\xA\x3C\x55\x4C"
435"\x3E\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x64\x65\x6C\x65\x74\x65\x63\x6F\x6F\x6B\x69\x65\x20\x2D"
436"\x20\x64\x65\x6C\x65\x74\x65\x20\x61\x20\x63\x6F\x6F\x6B\x69\x65\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x53"
437"\x59\x4E\x4F\x50\x53\x49\x53\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x23\x69\x6E\x63\x6C\x75\x64\x65\x20\x22"
438"\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x2E\x68\x22\x3C\x42\x52\x3E\x3C\x42\x52\x3E\x76\x6F\x69\x64\x20"
439"\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x64\x65\x6C\x65\x74\x65\x63\x6F\x6F\x6B\x69\x65\x28\x63\x68"
440"\x61\x72\x20\x2A\x3C\x55\x3E\x6B\x65\x79\x3C\x2F\x55\x3E\x29\x3B\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x44"
441"\x45\x53\x43\x52\x49\x50\x54\x49\x4F\x4E\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x54\x68\x65\x20\x77\x65\x62"
442"\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x64\x65\x6C\x65\x74\x65\x63\x6F\x6F\x6B\x69\x65\x28\x29\x20\x66\x75\x6E"
443"\x63\x74\x69\x6F\x6E\x20\x64\x65\x6C\x65\x74\x65\x20\x61\x20\x63\x6F\x6F\x6B\x69\x65\x20\x6F\x6E\x20\x63"
444"\x6C\x69\x65\x6E\x74\x20\x62\x72\x6F\x77\x73\x65\x72\x20\x77\x69\x74\x68\x20\x6B\x65\x79\x20\x3C\x55\x3E"
445"\x6B\x65\x79\x3C\x2F\x55\x3E\x3C\x42\x52\x3E\xA\xA\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x4E\x4F\x54\x45"
446"\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x20\x54\x68\x65\x20\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x64"
447"\x65\x6C\x65\x74\x65\x63\x6F\x6F\x6B\x69\x65\x28\x29\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x73\x68\x6F"
448"\x75\x6C\x64\x20\x62\x65\x20\x63\x61\x6C\x6C\x65\x64\x20\x3C\x42\x3E\x6F\x6E\x6C\x79\x3C\x2F\x42\x3E\x20"
449"\x66\x72\x6F\x6D\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x20\x63\x61\x6C\x6C\x65\x64\x20\x62\x79\x20\x67"
450"\x65\x74\x68\x61\x6E\x64\x6C\x65\x72\x73\x20\x72\x65\x67\x69\x73\x74\x65\x72\x65\x64\x20\x76\x69\x61\x20"
451"\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23"
452"\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x27\x3E\x77\x65\x62"
453"\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x28\x29\x3C\x2F\x61\x3E\x3C\x42"
454"\x52\x3E\x3C\x2F\x55\x4C\x3E\xA\x3C\x48\x52\x3E\x3C\x42\x52\x3E\xA\xA\x3C\x41\x20\x6E\x61\x6D\x65\x3D"
455"\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x73\x65\x74\x76\x61\x72\x3E\x3C\x42\x3E\x3C\x66\x6F\x6E\x74"
456"\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x30\x30\x30\x30\x37\x37\x27\x3E\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74"
457"\x5F\x73\x65\x74\x76\x61\x72\x28\x29\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x42\x3E\x3C\x42\x52\x3E\x3C\x42"
458"\x52\x3E\xA\x3C\x42\x3E\x4E\x41\x4D\x45\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x77\x65\x62\x5F\x63\x6C\x69"
459"\x65\x6E\x74\x5F\x73\x65\x74\x76\x61\x72\x20\x2D\x20\x73\x65\x74\x73\x20\x61\x20\x76\x61\x72\x69\x61\x62"
460"\x6C\x65\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x53\x59\x4E\x4F\x50\x53\x49\x53\x3C\x2F\x42\x3E\xA\x3C\x55"
461"\x4C\x3E\x23\x69\x6E\x63\x6C\x75\x64\x65\x20\x22\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x2E\x68\x22\x3C"
462"\x42\x52\x3E\x3C\x42\x52\x3E\x69\x6E\x74\x20\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x73\x65\x74\x76"
463"\x61\x72\x28\x63\x68\x61\x72\x20\x2A\x3C\x55\x3E\x6E\x61\x6D\x65\x3C\x2F\x55\x3E\x2C\x20\x63\x68\x61\x72"
464"\x20\x2A\x3C\x55\x3E\x76\x61\x6C\x75\x65\x3C\x2F\x55\x3E\x29\x3B\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x44"
465"\x45\x53\x43\x52\x49\x50\x54\x49\x4F\x4E\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x54\x68\x65\x20\x77\x65\x62"
466"\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x73\x65\x74\x76\x61\x72\x28\x29\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20"
467"\x73\x65\x74\x73\x20\x61\x6E\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x6E\x61\x6D\x65\x64\x20\x3C\x55\x3E"
468"\x6E\x61\x6D\x65\x3C\x2F\x55\x3E\x20\x77\x69\x74\x68\x20\x76\x61\x6C\x75\x65\x20\x3C\x55\x3E\x76\x61\x6C"
469"\x75\x65\x3C\x2F\x55\x3E\x20\x69\x6E\x20\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x2C\x20\x74\x6F"
470"\x20\x62\x65\x20\x75\x73\x65\x64\x20\x69\x6E\x20\x6F\x75\x74\x70\x75\x74\x20\x28\x6F\x6E\x6C\x79\x20\x61"
471"\x76\x61\x69\x6C\x61\x62\x6C\x65\x20\x69\x66\x20\x57\x53\x5F\x44\x59\x4E\x56\x41\x52\x20\x66\x6C\x61\x67"
472"\x20\x75\x73\x65\x64\x29\x3C\x42\x52\x3E\xA\x9\x20\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x73\x65"
473"\x74\x76\x61\x72\x28\x22\x62\x67\x63\x22\x2C\x22\x23\x66\x66\x30\x30\x64\x64\x22\x29\x3B\x3C\x42\x52\x3E"
474"\xA\x20\x20\x20\x20\x20\x70\x72\x69\x6E\x74\x66\x28\x22\x26\x6C\x74\x3B\x42\x4F\x44\x59\x20\x62\x67\x63"
475"\x6F\x6C\x6F\x72\x3D\x27\x24\x62\x67\x63\x3B\x27\x26\x67\x74\x3B\x22\x29\x3B\x20\x20\x2D\x20\x77\x69\x6C"
476"\x6C\x20\x65\x78\x63\x68\x61\x6E\x67\x65\x20\x74\x68\x65\x20\x73\x74\x72\x69\x6E\x67\x20\x24\x62\x67\x63"
477"\x3B\x20\x74\x6F\x20\x23\x66\x66\x30\x30\x64\x64\x20\x6F\x6E\x20\x6F\x75\x74\x70\x75\x74\x3C\x2F\x55\x4C"
478"\x3E\xA\xA\x3C\x42\x3E\x4E\x4F\x54\x45\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x54\x68\x65\x20\x77\x65\x62"
479"\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x73\x65\x74\x76\x61\x72\x28\x29\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20"
480"\x3C\x42\x3E\x73\x68\x6F\x75\x6C\x64\x3C\x2F\x42\x3E\x20\x62\x65\x20\x63\x61\x6C\x6C\x65\x64\x20\x3C\x42"
481"\x3E\x6F\x6E\x6C\x79\x3C\x2F\x42\x3E\x20\x66\x72\x6F\x6D\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x20\x63"
482"\x61\x6C\x6C\x65\x64\x20\x62\x79\x20\x67\x65\x74\x68\x61\x6E\x64\x6C\x65\x72\x73\x20\x72\x65\x67\x69\x73"
483"\x74\x65\x72\x65\x64\x20\x76\x69\x61\x20\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D"
484"\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x64\x64\x68\x61"
485"\x6E\x64\x6C\x65\x72\x27\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C"
486"\x65\x72\x28\x29\x3C\x2F\x61\x3E\x2E\x3C\x2F\x55\x4C\x3E\xA\x3C\x48\x52\x3E\x3C\x42\x52\x3E\xA\xA\x3C"
487"\x41\x20\x6E\x61\x6D\x65\x3D\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x67\x65\x74\x76\x61\x72\x3E\x3C"
488"\x42\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x30\x30\x30\x30\x37\x37\x27\x3E\x77\x65\x62"
489"\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x67\x65\x74\x76\x61\x72\x28\x29\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x42"
490"\x3E\x3C\x42\x52\x3E\x3C\x42\x52\x3E\xA\x3C\x42\x3E\x4E\x41\x4D\x45\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E"
491"\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x67\x65\x74\x76\x61\x72\x20\x2D\x20\x67\x65\x74\x73\x20\x61"
492"\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x76\x61\x6C\x75\x65\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x53\x59"
493"\x4E\x4F\x50\x53\x49\x53\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x23\x69\x6E\x63\x6C\x75\x64\x65\x20\x22\x77"
494"\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x2E\x68\x22\x3C\x42\x52\x3E\x3C\x42\x52\x3E\x69\x6E\x74\x20\x77\x65"
495"\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x67\x65\x74\x76\x61\x72\x28\x63\x68\x61\x72\x20\x2A\x3C\x55\x3E\x6E"
496"\x61\x6D\x65\x3C\x2F\x55\x3E\x29\x3B\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x44\x45\x53\x43\x52\x49\x50\x54"
497"\x49\x4F\x4E\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x54\x68\x65\x20\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74"
498"\x5F\x67\x65\x74\x76\x61\x72\x28\x29\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x67\x65\x74\x73\x20\x74\x68"
499"\x65\x20\x76\x61\x6C\x75\x65\x20\x6F\x66\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x3C\x55\x3E\x6E\x61\x6D"
500"\x65\x3C\x2F\x55\x3E\x2C\x20\x28\x73\x65\x65\x20\x61\x6C\x73\x6F\x20\x3C\x61\x20\x68\x72\x65\x66\x3D\x2F"
501"\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74"
502"\x5F\x73\x65\x74\x76\x61\x72\x3E\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x73\x65\x74\x76\x61\x72\x28"
503"\x29\x3C\x2F\x61\x3E\x29\x3C\x42\x52\x3E\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x4E\x4F\x54\x45\x3C\x2F\x42"
504"\x3E\xA\x3C\x55\x4C\x3E\x54\x68\x65\x20\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x67\x65\x74\x76\x61"
505"\x72\x28\x29\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x3C\x42\x3E\x73\x68\x6F\x75\x6C\x64\x3C\x2F\x42\x3E"
506"\x20\x62\x65\x20\x63\x61\x6C\x6C\x65\x64\x20\x3C\x42\x3E\x6F\x6E\x6C\x79\x3C\x2F\x42\x3E\x20\x66\x72\x6F"
507"\x6D\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x20\x63\x61\x6C\x6C\x65\x64\x20\x62\x79\x20\x67\x65\x74\x68"
508"\x61\x6E\x64\x6C\x65\x72\x73\x20\x72\x65\x67\x69\x73\x74\x65\x72\x65\x64\x20\x76\x69\x61\x20\x3C\x61\x20"
509"\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62"
510"\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x27\x3E\x77\x65\x62\x5F\x73\x65"
511"\x72\x76\x65\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x28\x29\x3C\x2F\x61\x3E\x2E\x3C\x2F\x55\x4C"
512"\x3E\xA\x3C\x48\x52\x3E\x3C\x42\x52\x3E\xA\xA\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x77\x65\x62\x5F\x63\x6C"
513"\x69\x65\x6E\x74\x5F\x64\x65\x6C\x76\x61\x72\x3E\x3C\x42\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72"
514"\x3D\x27\x30\x30\x30\x30\x37\x37\x27\x3E\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x64\x65\x6C\x76\x61"
515"\x72\x28\x29\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x42\x3E\x3C\x42\x52\x3E\x3C\x42\x52\x3E\xA\x3C\x42\x3E"
516"\x4E\x41\x4D\x45\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x64\x65"
517"\x6C\x76\x61\x72\x20\x2D\x20\x64\x65\x6C\x65\x74\x65\x20\x61\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x3C\x2F"
518"\x55\x4C\x3E\xA\x3C\x42\x3E\x53\x59\x4E\x4F\x50\x53\x49\x53\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x23\x69"
519"\x6E\x63\x6C\x75\x64\x65\x20\x22\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x2E\x68\x22\x3C\x42\x52\x3E\x3C"
520"\x42\x52\x3E\x69\x6E\x74\x20\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x64\x65\x6C\x76\x61\x72\x28\x63"
521"\x68\x61\x72\x20\x2A\x3C\x55\x3E\x6E\x61\x6D\x65\x3C\x2F\x55\x3E\x29\x3B\x3C\x2F\x55\x4C\x3E\xA\x3C\x42"
522"\x3E\x44\x45\x53\x43\x52\x49\x50\x54\x49\x4F\x4E\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x54\x68\x65\x20\x77"
523"\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x64\x65\x6C\x76\x61\x72\x28\x29\x20\x66\x75\x6E\x63\x74\x69\x6F"
524"\x6E\x20\x64\x65\x6C\x65\x74\x65\x73\x20\x61\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x77\x69\x74\x68\x20"
525"\x6E\x61\x6D\x65\x20\x3C\x55\x3E\x6E\x61\x6D\x65\x3C\x2F\x55\x3E\x3C\x42\x52\x3E\x3C\x2F\x55\x4C\x3E\xA"
526"\x3C\x42\x3E\x4E\x4F\x54\x45\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x54\x68\x65\x20\x77\x65\x62\x5F\x63\x6C"
527"\x69\x65\x6E\x74\x5F\x64\x65\x6C\x76\x61\x72\x28\x29\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x3C\x42\x3E"
528"\x73\x68\x6F\x75\x6C\x64\x3C\x2F\x42\x3E\x20\x62\x65\x20\x63\x61\x6C\x6C\x65\x64\x20\x3C\x42\x3E\x6F\x6E"
529"\x6C\x79\x3C\x2F\x42\x3E\x20\x66\x72\x6F\x6D\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x20\x63\x61\x6C\x6C"
530"\x65\x64\x20\x62\x79\x20\x67\x65\x74\x68\x61\x6E\x64\x6C\x65\x72\x73\x20\x72\x65\x67\x69\x73\x74\x65\x72"
531"\x65\x64\x20\x76\x69\x61\x20\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E"
532"\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C"
533"\x65\x72\x27\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x28"
534"\x29\x3C\x2F\x61\x3E\x2E\x3C\x2F\x55\x4C\x3E\xA\x3C\x48\x52\x3E\x3C\x42\x52\x3E\xA\xA\xA\x3C\x41\x20"
535"\x6E\x61\x6D\x65\x3D\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x48\x54\x54\x50\x64\x69\x72\x65\x63\x74"
536"\x69\x76\x65\x3E\x3C\x42\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x30\x30\x30\x30\x37\x37"
537"\x27\x3E\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x48\x54\x54\x50\x64\x69\x72\x65\x63\x74\x69\x76\x65"
538"\x28\x29\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x42\x3E\x3C\x42\x52\x3E\x3C\x42\x52\x3E\xA\x3C\x42\x3E\x4E"
539"\x41\x4D\x45\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x48\x54\x54"
540"\x50\x64\x69\x72\x65\x63\x74\x69\x76\x65\x20\x2D\x20\x43\x68\x61\x6E\x67\x65\x20\x74\x68\x65\x20\x48\x54"
541"\x54\x50\x20\x68\x65\x61\x64\x65\x72\x20\x73\x74\x61\x74\x75\x73\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x53"
542"\x59\x4E\x4F\x50\x53\x49\x53\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x23\x69\x6E\x63\x6C\x75\x64\x65\x20\x22"
543"\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x2E\x68\x22\x3C\x42\x52\x3E\x3C\x42\x52\x3E\x76\x6F\x69\x64\x20"
544"\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x48\x54\x54\x50\x64\x69\x72\x65\x63\x74\x69\x76\x65\x28\x63"
545"\x68\x61\x72\x20\x2A\x3C\x55\x3E\x64\x69\x72\x65\x63\x74\x69\x76\x65\x3C\x2F\x55\x3E\x29\x3B\x3C\x2F\x55"
546"\x4C\x3E\xA\x3C\x42\x3E\x44\x45\x53\x43\x52\x49\x50\x54\x49\x4F\x4E\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E"
547"\x54\x68\x65\x20\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x48\x54\x54\x50\x64\x69\x72\x65\x63\x74\x69"
548"\x76\x65\x28\x29\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x63\x68\x61\x6E\x67\x65\x73\x20\x74\x68\x65\x20"
549"\x48\x54\x54\x50\x20\x68\x65\x61\x64\x65\x72\x20\x73\x74\x61\x74\x75\x73\x20\x28\x69\x2E\x65\x2E\x20\x22"
550"\x48\x54\x54\x50\x2F\x31\x2E\x31\x20\x32\x30\x30\x20\x4F\x4B\x22\x29\x20\x74\x6F\x20\x74\x68\x65\x20\x73"
551"\x74\x72\x69\x6E\x67\x20\x3C\x55\x3E\x64\x69\x72\x65\x63\x74\x69\x76\x65\x3C\x2F\x55\x3E\x3C\x42\x52\x3E"
552"\xA\x3C\x73\x6D\x61\x6C\x6C\x3E\x3C\x69\x3E\x75\x73\x65\x66\x75\x6C\x20\x66\x6F\x72\x20\x22\x48\x54\x54"
553"\x50\x2F\x31\x2E\x31\x20\x34\x30\x31\x20\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E\x20\x52\x65"
554"\x71\x75\x69\x72\x65\x64\x22\x20\x28\x74\x6F\x20\x72\x65\x71\x75\x69\x72\x65\x20\x61\x20\x70\x61\x73\x73"
555"\x77\x6F\x72\x64\x29\x2C\x20\x72\x65\x64\x69\x72\x65\x63\x74\x69\x6F\x6E\x20\x6F\x72\x20\x73\x69\x6D\x69"
556"\x6C\x61\x72\x20\x61\x63\x74\x69\x6F\x6E\x73\x20\x6F\x6E\x20\x74\x68\x65\x20\x63\x6C\x69\x65\x6E\x74\x20"
557"\x73\x69\x64\x65\x3C\x2F\x69\x3E\x3C\x2F\x73\x6D\x61\x6C\x6C\x3E\x2E\x3C\x2F\x55\x4C\x3E\xA\x20\x3C\x42"
558"\x3E\x4E\x4F\x54\x45\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x54\x68\x65\x20\x77\x65\x62\x5F\x63\x6C\x69\x65"
559"\x6E\x74\x5F\x48\x54\x54\x50\x64\x69\x72\x65\x63\x74\x69\x76\x65\x28\x29\x20\x66\x75\x6E\x63\x74\x69\x6F"
560"\x6E\x20\x63\x61\x6E\x20\x62\x65\x20\x63\x61\x6C\x6C\x65\x64\x20\x3C\x42\x3E\x6F\x6E\x6C\x79\x3C\x2F\x42"
561"\x3E\x20\x66\x72\x6F\x6D\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x20\x63\x61\x6C\x6C\x65\x64\x20\x62\x79"
562"\x20\x67\x65\x74\x68\x61\x6E\x64\x6C\x65\x72\x73\x20\x72\x65\x67\x69\x73\x74\x65\x72\x65\x64\x20\x76\x69"
563"\x61\x20\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E"
564"\x73\x23\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x27\x3E\x77"
565"\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x28\x29\x3C\x2F\x61\x3E"
566"\x2E\x3C\x2F\x55\x4C\x3E\xA\x3C\x48\x52\x3E\x3C\x42\x52\x3E\xA\xA\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x77"
567"\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x63\x6F\x6E\x74\x65\x6E\x74\x74\x79\x70\x65\x3E\x3C\x42\x3E\x3C"
568"\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x30\x30\x30\x30\x37\x37\x27\x3E\x77\x65\x62\x5F\x63\x6C"
569"\x69\x65\x6E\x74\x5F\x63\x6F\x6E\x74\x65\x6E\x74\x74\x79\x70\x65\x28\x29\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C"
570"\x2F\x42\x3E\x3C\x42\x52\x3E\x3C\x42\x52\x3E\xA\x3C\x42\x3E\x4E\x41\x4D\x45\x3C\x2F\x42\x3E\xA\x3C\x55"
571"\x4C\x3E\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x63\x6F\x6E\x74\x65\x6E\x74\x74\x79\x70\x65\x20\x2D"
572"\x20\x70\x72\x69\x6E\x74\x73\x20\x74\x6F\x20\x73\x74\x64\x6F\x75\x74\x20\x74\x68\x65\x20\x68\x65\x61\x64"
573"\x65\x72\x20\x22\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x74\x79\x70\x65\x3A\x20\x2A\x2F\x2A\x22\x3C\x2F\x55\x4C"
574"\x3E\xA\x3C\x42\x3E\x53\x59\x4E\x4F\x50\x53\x49\x53\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x23\x69\x6E\x63"
575"\x6C\x75\x64\x65\x20\x22\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x2E\x68\x22\x3C\x42\x52\x3E\x3C\x42\x52"
576"\x3E\x76\x6F\x69\x64\x20\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x63\x6F\x6E\x74\x65\x6E\x74\x74\x79"
577"\x70\x65\x28\x63\x68\x61\x72\x20\x2A\x3C\x55\x3E\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x3C\x2F\x55\x3E\x29"
578"\x3B\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x44\x45\x53\x43\x52\x49\x50\x54\x49\x4F\x4E\x3C\x2F\x42\x3E\xA"
579"\x3C\x55\x4C\x3E\x54\x68\x65\x20\x77\x65\x62\x5F\x63\x6C\x69\x65\x6E\x74\x5F\x63\x6F\x6E\x74\x65\x6E\x74"
580"\x74\x79\x70\x65\x28\x29\x20\x70\x72\x69\x6E\x74\x73\x20\x74\x6F\x20\x73\x74\x64\x6F\x75\x74\x20\x74\x68"
581"\x65\x20\x68\x65\x61\x64\x65\x72\x20\x22\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x74\x79\x70\x65\x3A\x20\x2A\x2F"
582"\x2A\x22\x2C\x20\x77\x68\x65\x72\x65\x20\x27\x2A\x2F\x2A\x27\x20\x69\x73\x20\x64\x65\x74\x65\x72\x6D\x69"
583"\x6E\x65\x64\x20\x62\x79\x20\x3C\x55\x3E\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x3C\x2F\x55\x3E\x20\x28\x69"
584"\x2E\x65\x2E\x20\x22\x68\x74\x6D\x6C\x22\x20\x62\x61\x73\x65\x64\x20\x6F\x6E\x20\x6D\x69\x6D\x65\x66\x69"
585"\x6C\x65\x20\x70\x72\x6F\x64\x75\x63\x65\x73\x20\x22\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x74\x79\x70\x65\x3A"
586"\x20\x74\x65\x78\x74\x2F\x68\x74\x6D\x6C\x5C\x72\x5C\x6E\x5C\x72\x5C\x6E\x22\x20\x61\x6E\x64\x20\x22\x6A"
587"\x70\x67\x22\x20\x70\x72\x6F\x64\x75\x63\x65\x73\x20\x22\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x74\x79\x70\x65"
588"\x3A\x20\x69\x6D\x61\x67\x65\x2F\x6A\x70\x65\x67\x5C\x72\x5C\x6E\x5C\x72\x5C\x6E\x22\x29\x3C\x42\x52\x3E"
589"\xA\x3C\x73\x6D\x61\x6C\x6C\x3E\x74\x68\x69\x73\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x69\x73\x20\x75"
590"\x73\x65\x64\x20\x6F\x6E\x20\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E"
591"\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x6C\x69\x61\x73\x64\x69\x72"
592"\x22\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x61\x6C\x69\x61\x73\x64\x69\x72\x28\x29\x3C\x2F\x61"
593"\x3E\x3C\x2F\x73\x6D\x61\x6C\x6C\x3E\x3C\x2F\x55\x4C\x3E\xA\x20\x3C\x42\x3E\x4E\x4F\x54\x45\x3C\x2F\x42"
594"\x3E\xA\x3C\x55\x4C\x3E\x54\x68\x69\x73\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x75\x73\x65\x73\x20\x6D"
595"\x69\x6D\x65\x20\x74\x79\x70\x65\x73\x20\x6C\x6F\x61\x64\x65\x64\x20\x61\x74\x20\x3C\x61\x20\x68\x72\x65"
596"\x66\x3D\x22\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x73\x65"
597"\x72\x76\x65\x72\x5F\x75\x73\x65\x4D\x49\x4D\x45\x66\x69\x6C\x65\x22\x3E\x77\x65\x62\x5F\x73\x65\x72\x76"
598"\x65\x72\x5F\x75\x73\x65\x4D\x49\x4D\x45\x66\x69\x6C\x65\x28\x29\x3C\x2F\x61\x3E\x20\x65\x6C\x73\x65\x20"
599"\x69\x74\x20\x77\x69\x6C\x6C\x20\x70\x72\x69\x6E\x74\x20\x6F\x6E\x6C\x79\x20\x22\x43\x6F\x6E\x74\x65\x6E"
600"\x74\x2D\x74\x79\x70\x65\x3A\x20\x74\x65\x78\x74\x2F\x70\x6C\x61\x69\x6E\x5C\x72\x5C\x6E\x5C\x72\x5C\x6E"
601"\x22\x3C\x2F\x55\x4C\x3E\xA\x3C\x48\x52\x3E\x3C\x42\x52\x3E\xA\xA\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x77"
602"\x65\x62\x5F\x6C\x6F\x67\x3E\x3C\x42\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x30\x30\x30"
603"\x30\x37\x37\x27\x3E\x77\x65\x62\x5F\x6C\x6F\x67\x28\x29\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x42\x3E\x3C"
604"\x42\x52\x3E\x3C\x42\x52\x3E\xA\x3C\x42\x3E\x4E\x41\x4D\x45\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x77\x65"
605"\x62\x5F\x6C\x6F\x67\x20\x2D\x20\x77\x72\x69\x74\x65\x20\x74\x6F\x20\x6C\x6F\x67\x66\x69\x6C\x65\x3C\x2F"
606"\x55\x4C\x3E\xA\x3C\x42\x3E\x53\x59\x4E\x4F\x50\x53\x49\x53\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x23\x69"
607"\x6E\x63\x6C\x75\x64\x65\x20\x22\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x2E\x68\x22\x3C\x42\x52\x3E\x3C"
608"\x42\x52\x3E\x76\x6F\x69\x64\x20\x77\x65\x62\x5F\x6C\x6F\x67\x28\x63\x6F\x6E\x73\x74\x20\x63\x68\x61\x72"
609"\x20\x2A\x3C\x55\x3E\x66\x6F\x72\x6D\x61\x74\x3C\x2F\x55\x3E\x2C\x3C\x55\x3E\x2E\x2E\x2E\x3C\x2F\x55\x3E"
610"\x29\x3B\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x44\x45\x53\x43\x52\x49\x50\x54\x49\x4F\x4E\x3C\x2F\x42\x3E"
611"\xA\x3C\x55\x4C\x3E\x54\x68\x65\x20\x77\x65\x62\x5F\x6C\x6F\x67\x28\x29\x20\x69\x73\x20\x73\x69\x6D\x69"
612"\x6C\x61\x72\x20\x74\x6F\x20\x70\x72\x69\x6E\x74\x66\x2C\x20\x62\x75\x74\x20\x77\x72\x69\x74\x65\x73\x20"
613"\x74\x6F\x20\x61\x20\x6C\x6F\x67\x66\x69\x6C\x65\x20\x28\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x69\x6E"
614"\x20\x3C\x61\x20\x68\x72\x65\x66\x3D\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23"
615"\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x69\x74\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72"
616"\x5F\x69\x6E\x69\x74\x28\x29\x3C\x2F\x61\x3E\x29\x2E\x20\x4A\x75\x73\x74\x20\x61\x73\x20\x70\x72\x69\x6E"
617"\x74\x66\x2C\x20\x69\x74\x20\x64\x6F\x65\x73\x6E\x27\x74\x20\x61\x64\x64\x20\x61\x20\x6E\x65\x77\x6C\x69"
618"\x6E\x65\x20\x61\x74\x20\x74\x68\x65\x20\x65\x6E\x64\x2E\x3C\x2F\x55\x4C\x3E\xA\x20\x3C\x42\x3E\x4E\x4F"
619"\x54\x45\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x54\x68\x65\x20\x77\x65\x62\x5F\x6C\x6F\x67\x28\x29\x20\x66"
620"\x75\x6E\x63\x74\x69\x6F\x6E\x20\x3C\x42\x3E\x73\x68\x6F\x75\x6C\x64\x3C\x2F\x42\x3E\x20\x62\x65\x20\x63"
621"\x61\x6C\x6C\x65\x64\x20\x3C\x42\x3E\x6F\x6E\x6C\x79\x3C\x2F\x42\x3E\x20\x66\x72\x6F\x6D\x20\x66\x75\x6E"
622"\x63\x74\x69\x6F\x6E\x73\x20\x63\x61\x6C\x6C\x65\x64\x20\x62\x79\x20\x67\x65\x74\x68\x61\x6E\x64\x6C\x65"
623"\x72\x73\x20\x72\x65\x67\x69\x73\x74\x65\x72\x65\x64\x20\x76\x69\x61\x20\x3C\x61\x20\x68\x72\x65\x66\x3D"
624"\x27\x2F\x3F\x68\x65\x6C\x70\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x23\x77\x65\x62\x5F\x73\x65\x72\x76"
625"\x65\x72\x5F\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x27\x3E\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x5F"
626"\x61\x64\x64\x68\x61\x6E\x64\x6C\x65\x72\x28\x29\x3C\x2F\x61\x3E\x2E\x3C\x2F\x55\x4C\x3E\xA\x3C\x48\x52"
627"\x3E\x3C\x42\x52\x3E\xA\xA\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x3E"
628"\x3C\x42\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x30\x30\x30\x30\x37\x37\x27\x3E\x43\x6C"
629"\x69\x65\x6E\x74\x49\x6E\x66\x6F\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x42\x3E\x3C\x42\x52\x3E\x3C\x42\x52"
630"\x3E\xA\x3C\x42\x3E\x4E\x41\x4D\x45\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x43\x6C\x69\x65\x6E\x74\x49\x6E"
631"\x66\x6F\x20\x2D\x20\x61\x20\x73\x74\x72\x75\x63\x74\x20\x74\x6F\x20\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x63"
632"\x6C\x69\x65\x6E\x74\x20\x48\x65\x61\x64\x65\x72\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x53\x59\x4E\x4F\x50"
633"\x53\x49\x53\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x20\x44\x65\x63\x6C\x61\x72\x65\x64\x20\x69\x6E\x20\x77"
634"\x65\x62\x5F\x73\x65\x72\x76\x65\x72\x2E\x68\x20\x3C\x42\x52\x3E\x3C\x42\x52\x3E\xA\x65\x78\x74\x65\x72"
635"\x6E\x20\x73\x74\x72\x75\x63\x74\x20\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x20\x7B\x3C\x42\x52\x3E\xA"
636"\x3C\x55\x4C\x3E\xA\x20\x20\x20\x20\x20\x20\x20\x20\x69\x6E\x74\x20\x3C\x55\x3E\x6F\x75\x74\x66\x64\x3C"
637"\x2F\x55\x3E\x3B\x3C\x42\x52\x3E\xA\x20\x20\x20\x20\x20\x20\x20\x20\x63\x68\x61\x72\x20\x2A\x3C\x55\x3E"
638"\x69\x6E\x65\x74\x6E\x61\x6D\x65\x3C\x2F\x55\x3E\x3B\x3C\x42\x52\x3E\xA\x20\x20\x20\x20\x20\x20\x20\x20"
639"\x63\x68\x61\x72\x20\x2A\x3C\x55\x3E\x72\x65\x71\x75\x65\x73\x74\x3C\x2F\x55\x3E\x3B\x3C\x42\x52\x3E\xA"
640"\x20\x20\x20\x20\x20\x20\x20\x20\x63\x68\x61\x72\x20\x2A\x3C\x55\x3E\x6D\x65\x74\x68\x6F\x64\x3C\x2F\x55"
641"\x3E\x3B\x3C\x42\x52\x3E\xA\x20\x20\x20\x20\x20\x20\x20\x20\x63\x68\x61\x72\x20\x2A\x3C\x55\x3E\x75\x73"
642"\x65\x72\x3C\x2F\x55\x3E\x3B\x3C\x42\x52\x3E\xA\x20\x20\x20\x20\x20\x20\x20\x20\x63\x68\x61\x72\x20\x2A"
643"\x3C\x55\x3E\x70\x61\x73\x73\x3C\x2F\x55\x3E\x3B\x3C\x42\x52\x3E\xA\x9\x9\x63\x68\x61\x72\x20\x2A\x28"
644"\x2A\x3C\x55\x3E\x48\x65\x61\x64\x65\x72\x3C\x2F\x55\x3E\x29\x28\x63\x68\x61\x72\x20\x2A\x68\x61\x6E\x64"
645"\x6C\x65\x29\x3B\x3C\x42\x52\x3E\xA\x20\x20\x20\x20\x20\x20\x20\x20\x63\x68\x61\x72\x20\x2A\x28\x2A\x3C"
646"\x55\x3E\x51\x75\x65\x72\x79\x3C\x2F\x55\x3E\x29\x28\x63\x68\x61\x72\x20\x2A\x68\x61\x6E\x64\x6C\x65\x29"
647"\x3B\x3C\x42\x52\x3E\xA\x20\x20\x20\x20\x20\x20\x20\x20\x63\x68\x61\x72\x20\x2A\x28\x2A\x3C\x55\x3E\x50"
648"\x6F\x73\x74\x3C\x2F\x55\x3E\x29\x28\x63\x68\x61\x72\x20\x2A\x68\x61\x6E\x64\x6C\x65\x29\x3B\x3C\x42\x52"
649"\x3E\xA\x20\x20\x20\x20\x20\x20\x20\x20\x63\x68\x61\x72\x20\x2A\x28\x2A\x3C\x55\x3E\x43\x6F\x6F\x6B\x69"
650"\x65\x3C\x2F\x55\x3E\x29\x28\x63\x68\x61\x72\x20\x2A\x68\x61\x6E\x64\x6C\x65\x29\x3B\x3C\x42\x52\x3E\xA"
651"\x9\x9\x63\x68\x61\x72\x20\x2A\x28\x2A\x3C\x55\x3E\x43\x6F\x6E\x66\x3C\x2F\x55\x3E\x29\x28\x63\x68\x61"
652"\x72\x20\x2A\x68\x61\x6E\x64\x6C\x65\x29\x3B\x3C\x42\x52\x3E\xA\x20\x20\x20\x20\x20\x20\x20\x20\x73\x74"
653"\x72\x75\x63\x74\x20\x5F\x4D\x75\x6C\x74\x69\x50\x61\x72\x74\x20\x28\x2A\x3C\x55\x3E\x4D\x75\x6C\x74\x69"
654"\x50\x61\x72\x74\x3C\x2F\x55\x3E\x29\x28\x63\x68\x61\x72\x20\x2A\x68\x61\x6E\x64\x6C\x65\x29\x3B\x3C\x42"
655"\x52\x3E\xA\x20\x20\x20\x20\x20\x20\x20\x20\x76\x6F\x69\x64\x20\x2A\x5F\x5F\x70\x61\x64\x5B\x35\x5D\x3B"
656"\x3C\x42\x52\x3E\xA\x3C\x2F\x55\x4C\x3E\xA\x7D\x20\x2A\x3C\x55\x3E\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66"
657"\x6F\x3C\x2F\x55\x3E\x3B\xA\x3C\x2F\x55\x4C\x3E\xA\x3C\x42\x3E\x44\x45\x53\x43\x52\x49\x50\x54\x49\x4F"
658"\x4E\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\xA\x3C\x42\x3E\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x26"
659"\x67\x74\x3B\x3C\x55\x3E\x6F\x75\x74\x66\x64\x3C\x2F\x55\x3E\x3C\x2F\x42\x3E\x20\x3C\x55\x4C\x3E\x69\x73"
660"\x20\x74\x68\x65\x20\x66\x69\x6C\x65\x64\x65\x73\x63\x72\x69\x70\x74\x6F\x72\x20\x6F\x66\x20\x74\x68\x65"
661"\x20\x63\x75\x72\x72\x65\x6E\x74\x20\x6F\x75\x74\x70\x75\x74\x20\x73\x74\x72\x65\x61\x6D\x20\x28\x75\x73"
662"\x65\x66\x75\x6C\x20\x66\x6F\x72\x20\x63\x67\x69\x20\x68\x61\x6E\x64\x6C\x65\x72\x73\x20\x61\x6E\x64\x20"
663"\x66\x72\x69\x65\x6E\x64\x73\x29\x2E\x3C\x2F\x55\x4C\x3E\x3C\x42\x52\x3E\xA\x3C\x42\x3E\x43\x6C\x69\x65"
664"\x6E\x74\x49\x6E\x66\x6F\x2D\x26\x67\x74\x3B\x3C\x55\x3E\x69\x6E\x65\x74\x6E\x61\x6D\x65\x3C\x2F\x55\x3E"
665"\x3C\x2F\x42\x3E\x20\x3C\x55\x4C\x3E\x61\x20\x73\x74\x72\x69\x6E\x67\x20\x74\x6F\x20\x69\x6E\x65\x74\x6E"
666"\x61\x6D\x65\x20\x28\x69\x2E\x65\x2E\x20\x22\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31\x22\x29\x3C\x2F\x55\x4C"
667"\x3E\x20\x3C\x42\x52\x3E\xA\x3C\x42\x3E\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x26\x67\x74\x3B\x3C"
668"\x55\x3E\x72\x65\x71\x75\x65\x73\x74\x3C\x2F\x55\x3E\x3C\x2F\x42\x3E\x20\x3C\x55\x4C\x3E\x69\x73\x20\x74"
669"\x68\x65\x20\x72\x65\x71\x75\x65\x73\x74\x65\x64\x20\x27\x66\x69\x6C\x65\x27\x20\x28\x69\x2E\x65\x2E\x20"
670"\x66\x6F\x72\x20\x22\x47\x45\x54\x20\x2F\x69\x6E\x64\x65\x78\x2E\x68\x74\x6D\x6C\x20\x48\x54\x54\x50\x2F"
671"\x31\x2E\x30\x5C\x72\x5C\x6E\x22\x20\x74\x68\x65\x20\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x26\x67"
672"\x74\x3B\x72\x65\x71\x75\x65\x73\x74\x20\x69\x73\x20\x22\x2F\x69\x6E\x64\x65\x78\x2E\x68\x74\x6D\x6C\x22"
673"\x29\x3C\x2F\x55\x4C\x3E\x3C\x42\x52\x3E\xA\x3C\x42\x3E\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x26"
674"\x67\x74\x3B\x3C\x55\x3E\x6D\x65\x74\x68\x6F\x64\x3C\x2F\x55\x3E\x3C\x2F\x42\x3E\x20\x3C\x55\x4C\x3E\x69"
675"\x73\x20\x74\x68\x65\x20\x72\x65\x71\x75\x65\x73\x74\x20\x6D\x65\x74\x68\x6F\x64\x20\x28\x22\x47\x45\x54"
676"\x22\x20\x6F\x72\x20\x22\x50\x4F\x53\x54\x22\x20\x65\x74\x63\x2E\x2E\x29\x3C\x2F\x55\x4C\x3E\x3C\x42\x52"
677"\x3E\xA\x3C\x42\x3E\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x26\x67\x74\x3B\x3C\x55\x3E\x75\x73\x65"
678"\x72\x3C\x2F\x55\x3E\x3C\x2F\x42\x3E\x20\x3C\x55\x4C\x3E\x41\x75\x74\x68\x52\x65\x61\x6C\x6D\x20\x75\x73"
679"\x65\x72\x6E\x61\x6D\x65\x3C\x2F\x55\x4C\x3E\x3C\x42\x52\x3E\xA\x3C\x42\x3E\x43\x6C\x69\x65\x6E\x74\x49"
680"\x6E\x66\x6F\x2D\x26\x67\x74\x3B\x3C\x55\x3E\x70\x61\x73\x73\x3C\x2F\x55\x3E\x3C\x2F\x42\x3E\x20\x3C\x55"
681"\x4C\x3E\x41\x75\x74\x68\x52\x65\x61\x6C\x6D\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x3C\x2F\x55\x4C\x3E\x3C"
682"\x42\x52\x3E\xA\x3C\x42\x3E\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x26\x67\x74\x3B\x3C\x55\x3E\x48"
683"\x65\x61\x64\x65\x72\x28\x3C\x2F\x55\x3E\x63\x68\x61\x72\x20\x2A\x3C\x55\x3E\x68\x61\x6E\x64\x6C\x65\x3C"
684"\x2F\x55\x3E\x29\x3C\x2F\x42\x3E\x20\x3C\x55\x4C\x3E\x46\x75\x6E\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x70"
685"\x61\x72\x73\x65\x20\x74\x68\x65\x20\x68\x65\x61\x64\x65\x72\x2C\x20\x61\x6E\x64\x20\x72\x65\x74\x75\x72"
686"\x6E\x73\x20\x48\x65\x61\x64\x65\x72\x20\x69\x6E\x66\x6F\x72\x6D\x61\x74\x69\x6F\x6E\x20\x28\x69\x2E\x65"
687"\x2E\x20\x66\x6F\x72\x20\x22\x48\x6F\x73\x74\x3A\x20\x68\x74\x74\x70\x3A\x2F\x2F\x31\x32\x37\x2E\x30\x2E"
688"\x30\x2E\x31\x3A\x38\x31\x22\x20\x74\x68\x65\x20\x72\x65\x73\x75\x6C\x74\x20\x6F\x66\x20\x43\x6C\x69\x65"
689"\x6E\x74\x49\x6E\x66\x6F\x2D\x26\x67\x74\x3B\x48\x65\x61\x64\x65\x72\x28\x22\x48\x6F\x73\x74\x22\x29\x20"
690"\x69\x73\x20\x22\x68\x74\x74\x70\x3A\x2F\x2F\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31\x3A\x38\x31\x22\x29\x20"
691"\x69\x66\x20\x61\x72\x67\x75\x6D\x65\x6E\x74\x20\x3C\x55\x3E\x68\x61\x6E\x64\x6C\x65\x3C\x2F\x55\x3E\x20"
692"\x69\x73\x20\x4E\x55\x4C\x4C\x20\x74\x68\x65\x6E\x20\x74\x68\x69\x73\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E"
693"\x20\x72\x65\x74\x75\x72\x6E\x73\x20\x77\x68\x6F\x6C\x65\x20\x48\x65\x61\x64\x65\x72\x20\x66\x72\x6F\x6D"
694"\x20\x63\x6C\x69\x65\x6E\x74\x3C\x2F\x55\x4C\x3E\x3C\x42\x52\x3E\xA\x3C\x42\x3E\x43\x6C\x69\x65\x6E\x74"
695"\x49\x6E\x66\x6F\x2D\x26\x67\x74\x3B\x3C\x55\x3E\x51\x75\x65\x72\x79\x28\x3C\x2F\x55\x3E\x63\x68\x61\x72"
696"\x20\x2A\x3C\x55\x3E\x68\x61\x6E\x64\x6C\x65\x3C\x2F\x55\x3E\x29\x3C\x2F\x42\x3E\x20\x3C\x55\x4C\x3E\x41"
697"\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x74\x68\x61\x74\x20\x72\x65\x74\x75\x72\x6E\x73\x20\x74\x68\x65"
698"\x20\x71\x75\x65\x72\x79\x20\x76\x61\x6C\x75\x65\x20\x66\x72\x6F\x6D\x20\x74\x68\x65\x20\x62\x72\x6F\x77"
699"\x73\x65\x72\x20\x28\x69\x2E\x65\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x72\x65\x71\x75\x65\x73\x74\x20\x22"
700"\x68\x74\x74\x70\x3A\x2F\x2F\x73\x6F\x6D\x65\x68\x6F\x73\x74\x2E\x6E\x65\x74\x2F\x72\x65\x71\x2E\x68\x74"
701"\x6D\x6C\x3F\x69\x64\x3D\x35\x26\x66\x3D\x31\x22\x2C\x20\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x26"
702"\x67\x74\x3B\x51\x75\x65\x72\x79\x28\x22\x69\x64\x22\x29\x20\x69\x73\x20\x22\x35\x22\x2E\x69\x66\x20\x61"
703"\x72\x67\x75\x6D\x65\x6E\x74\x20\x3C\x55\x3E\x68\x61\x6E\x64\x6C\x65\x3C\x2F\x55\x3E\x20\x69\x73\x20\x4E"
704"\x55\x4C\x4C\x20\x74\x68\x65\x6E\x20\x74\x68\x69\x73\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x72\x65\x74"
705"\x75\x72\x6E\x73\x20\x77\x68\x6F\x6C\x65\x20\x51\x75\x65\x72\x79\x20\x73\x74\x72\x69\x6E\x67\x20\x66\x72"
706"\x6F\x6D\x20\x63\x6C\x69\x65\x6E\x74\x3C\x42\x52\x3E\x69\x66\x20\x74\x68\x65\x20\x68\x61\x6E\x64\x6C\x65"
707"\x20\x68\x61\x76\x65\x20\x74\x68\x65\x20\x63\x68\x61\x72\x20\x23\x20\x66\x69\x72\x73\x74\x20\x28\x6C\x69"
708"\x6B\x65\x20\x22\x23\x68\x61\x6E\x64\x6C\x65\x22\x29\x20\x69\x74\x20\x72\x65\x74\x75\x72\x6E\x73\x20\x74"
709"\x68\x65\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x73\x20\x28\x75\x73"
710"\x65\x66\x75\x6C\x6C\x20\x66\x6F\x72\x20\x63\x68\x65\x63\x6B\x62\x6F\x78\x65\x73\x20\x61\x6E\x64\x20\x65"
711"\x74\x63\x2E\x2E\x2E\x29\x20\x43\x68\x65\x63\x6B\x20\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F\x3F\x68\x65"
712"\x6C\x70\x3D\x65\x78\x61\x6D\x70\x6C\x65\x73\x23\x63\x68\x65\x63\x6B\x62\x6F\x78\x27\x3E\x63\x68\x65\x63"
713"\x6B\x62\x6F\x78\x20\x65\x78\x61\x6D\x70\x6C\x65\x3C\x2F\x61\x3E\x3C\x2F\x55\x4C\x3E\x3C\x42\x52\x3E\xA"
714"\x3C\x42\x3E\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x26\x67\x74\x3B\x3C\x55\x3E\x50\x6F\x73\x74\x28"
715"\x3C\x2F\x55\x3E\x63\x68\x61\x72\x20\x2A\x3C\x55\x3E\x68\x61\x6E\x64\x6C\x65\x3C\x2F\x55\x3E\x29\x3C\x2F"
716"\x42\x3E\x20\x3C\x55\x4C\x3E\x41\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x74\x68\x61\x74\x20\x72\x65\x74"
717"\x75\x72\x6E\x73\x20\x74\x68\x65\x20\x50\x6F\x73\x74\x20\x64\x61\x74\x61\x20\x66\x72\x6F\x6D\x20\x74\x68"
718"\x65\x20\x66\x6F\x72\x6D\x73\x20\x77\x69\x74\x68\x20\x6D\x65\x74\x68\x6F\x64\x20\x27\x50\x4F\x53\x54\x27"
719"\x2E\x20\x3C\x55\x3E\x68\x61\x6E\x64\x6C\x65\x3C\x2F\x55\x3E\x20\x69\x73\x20\x74\x68\x65\x20\x6E\x61\x6D"
720"\x65\x20\x6F\x66\x20\x73\x6F\x6D\x65\x20\x26\x6C\x74\x3B\x69\x6E\x70\x75\x74\x26\x67\x74\x3B\x20\x74\x61"
721"\x67\x2E\x69\x66\x20\x61\x72\x67\x75\x6D\x65\x6E\x74\x20\x3C\x55\x3E\x68\x61\x6E\x64\x6C\x65\x3C\x2F\x55"
722"\x3E\x20\x69\x73\x20\x4E\x55\x4C\x4C\x20\x74\x68\x65\x6E\x20\x74\x68\x69\x73\x20\x66\x75\x6E\x63\x74\x69"
723"\x6F\x6E\x20\x72\x65\x74\x75\x72\x6E\x73\x20\x77\x68\x6F\x6C\x65\x20\x50\x6F\x73\x74\x20\x64\x61\x74\x61"
724"\x20\x66\x72\x6F\x6D\x20\x63\x6C\x69\x65\x6E\x74\x3C\x42\x52\x3E\x69\x66\x20\x74\x68\x65\x20\x68\x61\x6E"
725"\x64\x6C\x65\x20\x68\x61\x76\x65\x20\x74\x68\x65\x20\x63\x68\x61\x72\x20\x23\x20\x66\x69\x72\x73\x74\x20"
726"\x28\x6C\x69\x6B\x65\x20\x22\x23\x68\x61\x6E\x64\x6C\x65\x22\x29\x20\x69\x74\x20\x72\x65\x74\x75\x72\x6E"
727"\x73\x20\x74\x68\x65\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x73\x20"
728"\x28\x75\x73\x65\x66\x75\x6C\x6C\x20\x66\x6F\x72\x20\x63\x68\x65\x63\x6B\x62\x6F\x78\x65\x73\x20\x61\x6E"
729"\x64\x20\x65\x74\x63\x2E\x2E\x2E\x29\x20\x43\x68\x65\x63\x6B\x20\x3C\x61\x20\x68\x72\x65\x66\x3D\x27\x2F"
730"\x3F\x68\x65\x6C\x70\x3D\x65\x78\x61\x6D\x70\x6C\x65\x73\x23\x63\x68\x65\x63\x6B\x62\x6F\x78\x27\x3E\x63"
731"\x68\x65\x63\x6B\x62\x6F\x78\x20\x65\x78\x61\x6D\x70\x6C\x65\x3C\x2F\x61\x3E\x3C\x2F\x55\x4C\x3E\x3C\x42"
732"\x52\x3E\xA\x3C\x42\x3E\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x26\x67\x74\x3B\x3C\x55\x3E\x43\x6F"
733"\x6F\x6B\x69\x65\x28\x3C\x2F\x55\x3E\x63\x68\x61\x72\x20\x2A\x3C\x55\x3E\x68\x61\x6E\x64\x6C\x65\x3C\x2F"
734"\x55\x3E\x29\x3C\x2F\x42\x3E\x20\x3C\x55\x4C\x3E\x41\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x74\x68\x61"
735"\x74\x20\x72\x65\x74\x75\x72\x6E\x73\x20\x74\x68\x65\x20\x43\x6F\x6F\x6B\x69\x65\x20\x64\x61\x74\x61\x20"
736"\x66\x72\x6F\x6D\x20\x62\x72\x6F\x77\x73\x65\x72\x2E\x20\x69\x66\x20\x61\x72\x67\x75\x6D\x65\x6E\x74\x20"
737"\x3C\x55\x3E\x68\x61\x6E\x64\x6C\x65\x3C\x2F\x55\x3E\x20\x69\x73\x20\x4E\x55\x4C\x4C\x20\x74\x68\x65\x6E"
738"\x20\x74\x68\x69\x73\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x72\x65\x74\x75\x72\x6E\x73\x20\x77\x68\x6F"
739"\x6C\x65\x20\x43\x6F\x6F\x6B\x69\x65\x73\x74\x72\x69\x6E\x67\x20\x66\x72\x6F\x6D\x20\x63\x6C\x69\x65\x6E"
740"\x74\x3C\x2F\x55\x4C\x3E\x3C\x42\x52\x3E\xA\x3C\x42\x3E\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x26"
741"\x67\x74\x3B\x3C\x55\x3E\x43\x6F\x6E\x66\x28\x3C\x2F\x55\x3E\x63\x68\x61\x72\x20\x2A\x20\x3C\x55\x3E\x74"
742"\x6F\x70\x69\x63\x3C\x2F\x55\x3E\x2C\x63\x68\x61\x72\x20\x2A\x3C\x55\x3E\x68\x61\x6E\x64\x6C\x65\x3C\x2F"
743"\x55\x3E\x29\x3C\x2F\x42\x3E\x20\x3C\x55\x4C\x3E\x41\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x74\x68\x61"
744"\x74\x20\x72\x65\x74\x75\x72\x6E\x73\x20\x61\x6E\x20\x76\x61\x6C\x75\x65\x20\x66\x72\x6F\x6D\x20\x61\x20"
745"\x3C\x55\x3E\x6B\x65\x79\x3C\x2F\x55\x3E\x20\x69\x6E\x20\x3C\x55\x3E\x74\x6F\x70\x69\x63\x3C\x2F\x55\x3E"
746"\x20\x69\x6E\x20\x74\x68\x65\x20\x63\x6F\x6E\x66\x69\x67\x20\x66\x69\x6C\x65\x20\x69\x66\x20\x75\x73\x65"
747"\x64\x3C\x2F\x55\x4C\x3E\x3C\x42\x52\x3E\xA\x3C\x42\x3E\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x26"
748"\x67\x74\x3B\x3C\x55\x3E\x4D\x75\x6C\x74\x69\x50\x61\x72\x74\x28\x3C\x2F\x55\x3E\x63\x68\x61\x72\x20\x2A"
749"\x3C\x55\x3E\x68\x61\x6E\x64\x6C\x65\x3C\x2F\x55\x3E\x29\x3C\x2F\x42\x3E\x20\x3C\x55\x4C\x3E\x41\x20\x66"
750"\x75\x6E\x63\x74\x69\x6F\x6E\x20\x74\x68\x61\x74\x20\x72\x65\x74\x75\x72\x6E\x73\x20\x61\x20\x64\x61\x74"
751"\x61\x20\x73\x74\x72\x75\x63\x74\x75\x72\x65\x20\x66\x72\x6F\x6D\x20\x74\x68\x65\x20\x66\x6F\x72\x6D\x73"
752"\x20\x77\x69\x74\x68\x20\x6D\x65\x74\x68\x6F\x64\x20\x27\x50\x4F\x53\x54\x27\x20\x61\x6E\x64\x20\x65\x6E"
753"\x63\x74\x79\x70\x65\x3D\x27\x6D\x75\x6C\x74\x69\x70\x61\x72\x74\x2F\x66\x6F\x72\x6D\x2D\x64\x61\x74\x61"
754"\x27\x20\x28\x75\x73\x65\x66\x75\x6C\x20\x66\x6F\x72\x20\x75\x70\x6C\x6F\x61\x64\x69\x6E\x67\x20\x66\x69"
755"\x6C\x65\x73\x29\x2E\x20\x3C\x55\x3E\x68\x61\x6E\x64\x6C\x65\x3C\x2F\x55\x3E\x20\x69\x73\x20\x74\x68\x65"
756"\x20\x6E\x61\x6D\x65\x20\x6F\x66\x20\x73\x6F\x6D\x65\x20\x26\x6C\x74\x3B\x69\x6E\x70\x75\x74\x26\x67\x74"
757"\x3B\x20\x74\x61\x67\x2E\x3C\x42\x52\x3E\x3C\x42\x52\x3E\xA\x74\x68\x65\x20\x73\x74\x72\x75\x63\x74\x75"
758"\x72\x65\x20\x69\x73\x3C\x42\x52\x3E\xA\x73\x74\x72\x75\x63\x74\x20\x5F\x4D\x75\x6C\x74\x69\x50\x61\x72"
759"\x74\x20\x7B\xA\x3C\x55\x4C\x3E\xA\x63\x68\x61\x72\x20\x2A\x3C\x55\x3E\x69\x64\x3C\x2F\x75\x3E\x3B\x3C"
760"\x42\x52\x3E\xA\x63\x68\x61\x72\x20\x2A\x3C\x55\x3E\x64\x61\x74\x61\x3C\x2F\x55\x3E\x3B\x3C\x42\x52\x3E"
761"\xA\x75\x6E\x73\x69\x67\x6E\x65\x64\x20\x69\x6E\x74\x20\x3C\x55\x3E\x73\x69\x7A\x65\x3C\x2F\x55\x3E\x3B"
762"\x3C\x42\x52\x3E\xA\x63\x68\x61\x72\x20\x2A\x3C\x55\x3E\x66\x69\x6C\x65\x6E\x61\x6D\x65\x3C\x2F\x55\x3E"
763"\x3B\x3C\x42\x52\x3E\xA\x76\x6F\x69\x64\x20\x2A\x3C\x55\x3E\x70\x61\x64\x3C\x2F\x55\x3E\x3B\x3C\x42\x52"
764"\x3E\xA\x3C\x2F\x55\x4C\x3E\xA\x7D\x3B\x3C\x42\x52\x3E\xA\x74\x6F\x20\x62\x65\x20\x75\x73\x65\x64\x20"
765"\x61\x73\x20\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x26\x67\x74\x3B\x3C\x55\x3E\x4D\x75\x6C\x74\x69"
766"\x50\x61\x72\x74\x3C\x2F\x55\x3E\x28\x22\x66\x69\x6C\x65\x31\x22\x29\x2E\x3C\x55\x3E\x64\x61\x74\x61\x3C"
767"\x2F\x55\x3E\x3B\x20\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x26\x67\x74\x3B\x3C\x55\x3E\x4D\x75\x6C"
768"\x74\x69\x50\x61\x72\x74\x3C\x2F\x55\x3E\x28\x22\x66\x69\x6C\x65\x31\x22\x29\x2E\x3C\x55\x3E\x73\x69\x7A"
769"\x65\x3C\x2F\x55\x3E\x3B\x20\x43\x6C\x69\x65\x6E\x74\x49\x6E\x66\x6F\x2D\x26\x67\x74\x3B\x3C\x55\x3E\x4D"
770"\x75\x6C\x74\x69\x50\x61\x72\x74\x3C\x2F\x55\x3E\x28\x22\x66\x69\x6C\x65\x31\x22\x29\x2E\x3C\x55\x3E\x66"
771"\x69\x6C\x65\x6E\x61\x6D\x65\x3C\x2F\x55\x3E\x3B\xA\x3C\x2F\x55\x4C\x3E\xA\xA\x3C\x2F\x55\x4C\x3E\xA"
772"\x3C\x48\x52\x3E\x3C\x42\x52\x3E\xA\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x63\x6F\x6E\x66\x69\x67\x66\x69\x6C"
773"\x65\x3E\x3C\x42\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x30\x30\x30\x30\x37\x37\x27\x3E"
774"\x54\x68\x65\x20\x63\x6F\x6E\x66\x69\x67\x20\x66\x69\x6C\x65\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x42\x3E"
775"\x3C\x42\x52\x3E\x3C\x42\x52\x3E\xA\x3C\x55\x4C\x3E\x74\x68\x65\x20\x63\x6F\x6E\x66\x69\x67\x20\x66\x69"
776"\x6C\x65\x20\x69\x73\x20\x75\x73\x65\x64\x20\x61\x73\x3C\x42\x52\x3E\x3C\x42\x52\x3E\xA\x3C\x50\x52\x45"
777"\x3E\xA\x5B\x54\x4F\x50\x49\x43\x5D\xA\x4B\x45\x59\x3D\x56\x41\x4C\x55\x45\xA\xA\x6C\x69\x62\x77\x65"
778"\x62\x73\x65\x72\x76\x65\x72\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x20\x6D\x75\x73"
779"\x74\x20\x62\x65\x20\x69\x6E\x20\x74\x6F\x70\x69\x63\x20\x4C\x49\x42\x57\x45\x42\x53\x45\x52\x56\x45\x52"
780"\x20\x61\x73\x3A\xA\x5B\x4C\x49\x42\x57\x45\x42\x53\x45\x52\x56\x45\x52\x5D\xA\x4C\x4F\x47\x3D\x68\x65"
781"\x6C\x70\x2E\x6C\x6F\x67\x20\xA\x50\x4F\x52\x54\x3D\x38\x30\xA\x55\x53\x45\x53\x53\x4C\x3D\x31\xA\x43"
782"\x45\x52\x54\x46\x49\x4C\x45\x3D\x66\x6F\x6F\x63\x65\x72\x74\x2E\x70\x6D\xA\x4D\x49\x4D\x45\x46\x49\x4C"
783"\x45\x3D\x2F\x65\x74\x63\x2F\x6D\x69\x6D\x65\x2E\x74\x79\x70\x65\x73\xA\x4C\x4F\x43\x41\x4C\x3D\x31\xA"
784"\xA\x4C\x4F\x47\x20\x2D\x3E\x20\x74\x68\x65\x20\x6C\x6F\x67\x20\x66\x69\x6C\x65\xA\x50\x4F\x52\x54\x20"
785"\x2D\x3E\x20\x74\x68\x65\x20\x6C\x69\x73\x74\x65\x6E\x20\x70\x6F\x72\x74\x20\x74\x68\x61\x74\x20\x77\x69"
786"\x6C\x6C\x20\x62\x65\x20\x75\x73\x65\x64\x20\x66\x6F\x72\x20\x74\x63\x70\x20\x63\x6F\x6E\x6E\x65\x63\x74"
787"\x69\x6F\x6E\x73\xA\xA\x55\x53\x45\x53\x53\x4C\x20\x2D\x3E\x20\x74\x68\x65\x20\x73\x73\x6C\x20\x66\x6C"
788"\x61\x67\x20\x69\x66\x20\x79\x6F\x75\x20\x77\x61\x6E\x74\x20\x74\x6F\x20\x75\x73\x65\x20\x6F\x70\x65\x6E"
789"\x73\x73\x6C\x20\x66\x6F\x72\x20\x73\x65\x63\x75\x72\x65\x20\x73\x65\x72\x76\x65\x72\x20\x28\x68\x74\x74"
790"\x70\x73\x29\xA\x43\x45\x52\x54\x46\x49\x4C\x45\x20\x2D\x3E\x20\x74\x68\x65\x20\x66\x69\x6C\x65\x20\x74"
791"\x68\x61\x74\x20\x63\x6F\x6E\x74\x61\x69\x6E\x73\x20\x63\x65\x72\x74\x69\x66\x69\x63\x61\x74\x65\x20\x66"
792"\x6F\x72\x20\x73\x73\x6C\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\xA\x4D\x49\x4D\x45\x46\x49\x4C"
793"\x45\x20\x2D\x3E\x20\x74\x68\x65\x20\x66\x69\x6C\x65\x20\x74\x68\x61\x74\x20\x63\x6F\x6E\x74\x61\x69\x6E"
794"\x73\x20\x6D\x69\x6D\x65\x2E\x74\x79\x70\x65\x73\x20\x73\x69\x6D\x69\x6C\x65\x72\x20\x74\x6F\x20\x61\x70"
795"\x61\x63\x68\x65\x20\x6D\x69\x6D\x65\x66\x69\x6C\x65\xA\x4C\x4F\x43\x41\x4C\x20\x2D\x3E\x20\x6F\x6E\x6C"
796"\x79\x20\x61\x63\x63\x65\x70\x74\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x66\x72\x6F\x6D\x20"
797"\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31\xA\xA\x3C\x2F\x50\x52\x45\x3E\xA\x3C\x2F\x55\x4C\x3E\xA\xA\x3C"
798"\x2F\x66\x6F\x6E\x74\x3E\xA\xA\xA\xA";
799
800#endif
diff --git a/contrib/help/help.c b/contrib/help/help.c
new file mode 100644
index 00000000..86e5f1f0
--- /dev/null
+++ b/contrib/help/help.c
@@ -0,0 +1,421 @@
1#include "web_server.h"
2
3#include <string.h>
4#include <signal.h>
5#include <stdlib.h>
6#include <math.h>
7
8#include "info.h"
9#include "functions.h"
10#include "examples.h"
11#include "security.h"
12
13struct web_server server;
14
15
16#ifdef WIN32
17#include <windows.h>
18#endif
19
20
21int PORT=81;
22
23
24void teste1() {
25 printf("Content-type: text/html\r\n\r\n");
26 printf("here's location:<BR>\n");
27 printf("%s\r\n",ClientInfo->Header("Location"));
28 printf("NOTHING=%s\n<BR>",ClientInfo->Conf("[PERSONAL_CONF]","NOTHING"));
29 printf("IP=%s\n<BR>",ClientInfo->Conf("[PERSONAL_CONF]","IP"));
30 printf("MOST=%s\n<BR>",ClientInfo->Conf("[PERSONAL_CONF]","MOST"));
31 printf("IP=%s\n<BR>",ClientInfo->Conf("[LIBWEBSERVER]","IP"));
32 printf("Connection: %s\n",ClientInfo->Header("Connection"));
33};
34
35void varteste() {
36 web_client_setvar("bg",ClientInfo->Conf("PAGE_1","background"));
37 web_client_setvar("pata","#00FF00");
38 printf("Content-type: text/html\r\n\r\n");
39 printf("<HR>\n");
40 printf("$;pata;=\"$pata;\"");
41 printf("<B>&lt;$pata;BODY bgcolor=\"$pata;\"&gt;</B> $ (prototipe 0.5.1)<BR>\n");
42 printf("Luis Figueiredo$pata;coninhas\r\n");
43
44};
45
46void teste() {
47 int i=0;
48
49 web_client_setcookie("caos","teste da noia",NULL,NULL,NULL,0);
50
51 printf("content-type: text/html\r\n\r\n");
52 printf("hal is \"%s\" hallo is \"%s\"<BR>\n",ClientInfo->Post("hal"),ClientInfo->Post("hallo"));
53 printf("hal is \"%s\" hallo is \"%s\"<BR>\n",ClientInfo->Post("hal"),ClientInfo->Post("hallo"));
54 printf("<form method=post>\n");
55 printf("<input type=text name=hal value='%s'>\n",ClientInfo->Cookie("stdio"));
56 web_client_setcookie("teste",ClientInfo->Post("hallo"),"+1m",NULL,NULL,0);
57 printf("<input type=text name=hallo value='%s'>\n",ClientInfo->Cookie("teste"));
58 printf("<input type=submit name=send value='POST'>\n");
59 printf("</form>\n");
60
61 printf("<form method=query>\n");
62 for (i=0;i<5;i++) {
63 printf("<input type=checkbox name=teste value='%d'>%d<BR>\n",i,i);
64 };
65 printf("<input type=submit name=send1 value='SEND'>\n");
66 printf("</form>\n");
67 printf("You choose: ");
68 printf("%d numbers: \n",ClientInfo->Query("#teste"));
69 for(i=0;i<(int)ClientInfo->Query("#teste");i++){
70 printf("%s,",ClientInfo->Query("teste"));
71 };
72 web_client_setcookie("quatro","ratata","+1m","/","127.0.0.1",0);
73 printf("...<BR>");
74 printf("<form method=post>\n");
75 for (i=0;i<5;i++) {
76 printf("<input type=checkbox name=teste value='%d'>post %d<BR>\n",i,i);
77 };
78 printf("<input type=submit name=send1 value='SEND'>\n");
79 printf("</form>\n");
80 printf("You choose: ");
81 web_client_setcookie("tres","ratata","+1m",NULL,NULL,0);
82 printf("%d numbers: ",ClientInfo->Post("#teste"));
83 for (i=0;i<(int)ClientInfo->Post("#teste");i++) {
84 printf("%s,",ClientInfo->Post("teste"));
85 };
86 printf("...<BR>");
87 web_client_deletecookie("cinco");
88 printf("<form method=query>\n");
89 printf("<input type=submit name=test value='pipi'><BR>\n");
90 printf("</form>\n");
91 printf("The value of test is '%s'<BR>\n",ClientInfo->Query("test"));
92 printf("The value of test is '%s'<BR>\n",ClientInfo->Query("test"));
93 printf("The value of test is '%s'<BR>\n",ClientInfo->Query("test"));
94 printf("ClientInfo->Cookie(\"teste\")='%s'<BR>\n",ClientInfo->Cookie("teste"));
95 printf("ClientInfo->Cookie(\"stdio\")='%s'<BR>\n",ClientInfo->Cookie("stdio"));
96 printf("ClientInfo->Cookie(\"merdinha\")='%s'<BR>\n",ClientInfo->Cookie("merdinha"));
97 printf("ClientInfo->Cookie(\"activo\")='%s'<BR>\n",ClientInfo->Cookie("activo"));
98 printf("ClientInfo->Cookie(\"caos\")='%s'<BR>\n",ClientInfo->Cookie("caos"));
99 printf("ClientInfo->Cookie(\"caos\")='%s'<BR>\n",ClientInfo->Cookie("caos"));
100 printf("Method is %s\n<BR>",ClientInfo->method);
101 printf("Inetaddr=%s\n<BR>",ClientInfo->inetname);
102
103 for(i=0;i<10;i++) {
104 printf("<BR>ClientInfo->Post(\"teste\")='%s'\n",ClientInfo->Post("teste"));
105 };
106 printf("<BR>ClientInfo->Cookie(NULL)=\"%s\"<BR>",ClientInfo->Cookie(NULL));
107 printf("<BR>ClientInfo->Post(NULL)=\"%s\"<BR>",ClientInfo->Post(NULL));
108 printf("<BR>ClientInfo->Query(NULL)=\"%s\"<BR>",ClientInfo->Query(NULL));
109 printf("<BR>ClientInfo->Query(\"teste 0\")=\"%s\"<BR>",ClientInfo->Query("teste 0"));
110 printf("<PRE>ClientInfo->Header(NULL)=\"%s\"</PRE>\r\n",ClientInfo->Header(NULL));
111
112};
113
114
115void links() {
116 printf("[<a href='/'>main</a>] [<a href='/?help=info'>info</a>] [<a href='/?help=functions'>functions</a>] [<a href='/?help=examples'>examples</a>] [<a href='/?help=security'>security</a>] [<a href='/?help=Authors'>authors</a>] ");
117};
118
119void startpage(char *topic) {
120 printf("Content-type: text/html\r\n\r\n");
121 printf("<HTML>\n<body bgcolor='EFEFFF'>\n<CENTER>\n<TABLE><TR><TD align=center>\n<a href='http://libwebserver.sourceforge.net'><img border=0 src='/libwebserver.gif'></a>\n</TD><TR><TR><TD align=center>\n<font face='Verdana'><B>HELP<BR>(%s)</B></font>\n</TD></TR></TABLE>\n</CENTER>\n",topic);
122 links();
123 printf("<HR><BR>\n");
124};
125void endpage() {
126 printf("<HR>");
127 links();
128 printf("<p align=right> <small> by Luis Figueiredo (<a href='mailto:stdio@netc.pt'>stdio@netc.pt</a>) (%s)</BODY></HTML>\n",_libwebserver_version);
129};
130
131
132
133
134
135
136
137
138
139//Johannes E. Schindelin // new on 0.4.0
140void hello_world() {
141 startpage("hello world example");
142 printf("Hello, World!\r\n");
143 endpage();
144}
145//
146
147
148// NEW on 0.4.1
149void checkbox() {
150 int i=0;
151 char *txt[]={"one","two","three","four","five"};
152 startpage("checkbox example");
153 printf("<form method=query>\n");
154 for(i=0;i<5;i++) {
155 printf("<input type=checkbox name=number value='%s'\n> %s<BR>",txt[i],txt[i]);
156 };
157 printf("<input type=submit name=send value=' SEND '>\n");
158 printf("</form>\n");
159 printf("You have choosen <font color='FF0000'>%d</font> numbers: \n",ClientInfo->Query("#number"));
160 for(i=0;i<(int)ClientInfo->Query("#number");i++) {
161 printf("<b>%s</b>,\n",ClientInfo->Query("number"));
162 };
163 printf("...<BR>");
164 endpage();
165};
166
167
168
169// NEW on 0.4.0
170void cookie() {
171 if(strlen(ClientInfo->Post("user")))
172 web_client_setcookie("username",ClientInfo->Post("user"),"+15M",NULL,NULL,0);
173 startpage("Cookie example");
174 printf("<form method='POST'>\n");
175 printf("<input type=text name='user' value='%s'>\r\n<BR>",ClientInfo->Cookie("username"));
176 printf("<input type=submit name='send' value=' GO! '><BR>\r\n");
177 printf("</form>\n");
178 endpage();
179};
180//
181
182void logfile() {
183 startpage("logfile");
184 printf("<PRE>\n");
185 web_client_addfile(server.logfile);
186 printf("</PRE>\n");
187 endpage();
188};
189
190struct image {
191 char *data;
192 size_t size;
193} image={NULL,0};
194
195
196void imageout() {
197 if(strlen(ClientInfo->Query("img"))) {
198 if(image.data!=NULL) {
199 printf("Content-type: image/jpeg\r\n\r\n");
200 fwrite(image.data,image.size,1,stdout);
201 };
202 return;
203 };
204
205 startpage("Image example");
206 printf("<form action='/image' method='POST' enctype='multipart/form-data'>\n");
207 printf("<input type=file name=image><BR>\n");
208 printf("<input type=submit name='GOO' value='See'>\n");
209 printf("</form>\n");
210 if(strlen(ClientInfo->MultiPart("image").data)) {
211 printf("%s<BR><img src='/image?img=%s.jpg'>\n",ClientInfo->MultiPart("image").filename,ClientInfo->MultiPart("image").filename);
212 free(image.data);
213 image.data=malloc(ClientInfo->MultiPart("image").size+1);
214 memcpy(image.data,ClientInfo->MultiPart("image").data,ClientInfo->MultiPart("image").size);
215 image.size=ClientInfo->MultiPart("image").size;
216 }else {
217 free(image.data);
218 image.data=NULL;
219 };
220 endpage();
221};
222
223#define GIFSIDE 320
224char gifdata[GIFSIDE*GIFSIDE];
225void outgif() {
226 float i;
227 int x,y,xc,yc;
228 char color;
229 web_client_gifsetpalette("EGA");
230 if(*ClientInfo->Query("img")!=0) {
231 printf("Content-type: image/gif\r\n\r\n");
232 if(!strcmp(ClientInfo->Query("img"),"circle")) {
233 xc=atoi(ClientInfo->Query("x"))%GIFSIDE;
234 yc=atoi(ClientInfo->Query("y"))%GIFSIDE;
235 color=(char)(rand()%15)+1;
236 for(i=0;i<6.28;i+=(float)0.01) {
237 x=(int)((GIFSIDE+xc+cos(i)*10))%GIFSIDE; // Johannes E. Schindelin bugfix
238 y=(int)((GIFSIDE+yc+sin(i)*10))%GIFSIDE; // Johannes E. Schindelin bugfix
239 gifdata[x+(y*GIFSIDE)]=color;
240 };
241 };
242 web_client_gifoutput(gifdata,GIFSIDE,GIFSIDE,0);
243 };
244 startpage("Gif example");
245 printf("<center>Generated a circle (click inside the image)<BR>\n");
246 printf("Pressed x=%s,y=%s<BR>\n",ClientInfo->Query("x"),ClientInfo->Query("y"));
247 printf("<form><input type=image border=0 src='/gif?img=circle&x=%s&y=%s'></form></CENTER>\n",ClientInfo->Query("x"),ClientInfo->Query("y"));
248 endpage();
249};
250
251
252void urlauthenticate() {
253 if(!strlen(ClientInfo->user) || !strlen(ClientInfo->pass) &&
254 strcmp(ClientInfo->user,"username") || strcmp(ClientInfo->pass,"password")) { // you can read things from a auth file
255 web_client_HTTPdirective("HTTP/1.1 401 Authorization Required\r\n"
256 "WWW-Authenticate: Basic realm=\"This site info\"");
257 startpage("Authenticate example");
258 printf("<CENTER><font color='FF0000'>Access denied</font></CENTER>\n");
259 endpage();
260 return;
261 }
262 startpage("Authenticate example");
263 printf("You entered in your area\n");
264 endpage();
265};
266
267
268void help() {
269 // info
270 // engine // removed (read the source)
271 // functions help
272 // functionall examples
273 // security
274 // regards
275 // authors
276 if(!strlen(ClientInfo->Query("help"))) {
277 startpage("Table of contents");
278 printf("<B>\n");
279 printf("<ol>\n");
280 printf("<li><a href='/?help=info'>libwebserver info</a></li>\n");
281 printf("<ul><li><a href='/?help=info#what'>What's libwebserver for?</a></li></ul>\n");
282 printf("<ul><li><a href='/?help=info#who'>Who's supposed to use libwebserver?</a></li></ul>\n"); // Johannes E. Schindelin spellcheck
283 printf("<ul><li><a href='/?help=info#when'>When am i supposed to use libwebserver?</a></li></ul>\n"); // Johannes E. Schindelin spellcheck
284 printf("<ul><li><a href='/?help=info#server_scripts'>Is there support for server scripts such as .php .cgi .asp?</a></li></ul>\n"); // Johannes E. Schindelin spellcheck
285 printf("<li><a href='/?help=functions'>libwebserver functions</a></li>\n");
286 printf("<ul><li><a href='/?help=functions#web_server_init'>web_server_init()</a></li></ul>\n");
287 printf("<ul><li><a href='/?help=functions#web_server_addhandler'>web_server_addhandler()</a></li></ul>\n");
288 printf("<ul><li><a href='/?help=functions#web_server_aliasdir'>web_server_aliasdir()</a><small>(new)</small></li></ul>\n");
289 printf("<ul><li><a href='/?help=functions#web_server_run'>web_server_run()</a></li></ul>\n");
290 printf("<ul><li><a href='/?help=functions#web_server_getconf'>web_server_getconf()</a></li></ul>\n");
291 printf("<ul><li><a href='/?help=functions#web_server_useSSLcert'>web_server_useSSLcert()</a></li></ul>\n");
292 printf("<ul><li><a href='/?help=functions#web_server_useMIMEfile'>web_server_useMIMEfile()</a><small>(new)</small></li></ul>\n");
293 printf("<ul><li><a href='/?help=functions#web_client_addstream'>web_client_addstream() </a><small><small>(obsolet, no longer in use in 0.3.4) use web_client_addfile instead</small></small></li></ul>\n");
294 printf("<ul><li><a href='/?help=functions#web_client_addfile'>web_client_addfile()</a></li></ul>\n");
295 printf("<ul><li><a href='/?help=functions#web_client_gifoutput'>web_client_gifoutput()</a><small>(changed)</small></li></ul>\n");
296 printf("<ul><li><a href='/?help=functions#web_client_gifsetpalette'>web_client_gifsetpalette()</a><small>(new)</small></li></ul>\n");
297 printf("<ul><li><a href='/?help=functions#web_client_setcookie'>web_client_setcookie()</a></li></ul>\n");
298 printf("<ul><li><a href='/?help=functions#web_client_deletecookie'>web_client_deletecookie()</a></li></ul>\n");
299 printf("<ul><li><a href='/?help=functions#web_client_setvar'>web_client_setvar()</a></li></ul>\n");
300 printf("<ul><li><a href='/?help=functions#web_client_getvar'>web_client_getvar()</a></li></ul>\n");
301 printf("<ul><li><a href='/?help=functions#web_client_delvar'>web_client_delvar()</a></li></ul>\n");
302 printf("<ul><li><a href='/?help=functions#web_client_HTTPdirective'>web_client_HTTPdirective()</a></li></ul>\n");
303 printf("<ul><li><a href='/?help=functions#web_client_contenttype'>web_client_contenttype()</a><small>(new)</small></li></ul>\n");
304 printf("<ul><li><a href='/?help=functions#web_log'>web_log()</a></li></ul>\n");
305 printf("<ul><li><a href='/?help=functions#ClientInfo'>ClientInfo</a></li></ul>\n");
306 printf("<ul><li><a href='/?help=functions#configfile'>The config file</a></li></ul>\n");
307 printf("<li><a href='/?help=examples'>libwebserver examples</a></li>\n");
308 printf("<ul><li><a href='/?help=examples#helloworld'>Hello, World!</a></li></ul>\n");
309 printf("<ul><li><a href='/?help=examples#logfile'>Show's log file</a></li></ul>\n");
310 printf("<ul><li><a href='/?help=examples#imageup'>Image Uploader</a></li></ul>\n");
311 printf("<ul><li><a href='/?help=examples#auth'>Authentication</a></li></ul>\n");
312 printf("<ul><li><a href='/?help=examples#ssl'>Openssl for (https)</a></li></ul>\n");
313 printf("<ul><li><a href='/?help=examples#outgif'>Gif generator</a><small>Changed</small></li></ul>\n");
314 printf("<ul><li><a href='/?help=examples#cookie'>Cookies</a></li></ul>\n");
315 printf("<ul><li><a href='/?help=examples#checkbox'>checkbox</a></li></ul>\n");
316 printf("<ul><li><a href='/?help=examples#confexample'>Config example</a></li></ul>\n");
317 printf("<ul><li><a href='/brokenlink'>Broken link</a></li></ul>\n");
318 printf("<ul><li><a href='/fs/'>aliasdir</a></li></ul>\n");
319 printf("<li><a href='/?help=security'>libwebserver security</a></li>\n");
320 printf("<ul><li><a href='/?help=security#safe'>It is safe to use?</a></li></ul>\n"); // Johannes E. Schindelin spellcheck
321 printf("<ul><li><a href='/?help=security#certificate'>How do I create my own certificate?</a></li></ul>\n"); // Johannes E. Schindelin made
322 printf("<ul><li><a href='/?help=security#racecondition'>Avoid race condition problems</a></li></ul>\n"); // Johannes E. Schindelin made
323
324 printf("<li><a href='/?help=Authors'>Authors</a></li>\n");
325 printf("</ol>\n");
326 printf("</B>\n");
327 endpage();
328 return;
329 };
330
331 startpage(ClientInfo->Query("help"));
332 if(!strcmp(ClientInfo->Query("help"),"info")) {
333 fwrite(info,sizeof(info),1,stdout);
334 //web_client_addfile("help.html/info.html");
335 };
336 if(!strcmp(ClientInfo->Query("help"),"security")) {
337 fwrite(security,sizeof(security),1,stdout);
338 //web_client_addfile("help.html/security.html");
339 };
340 if(!strcmp(ClientInfo->Query("help"),"functions")) {
341 fwrite(functions,sizeof(functions),1,stdout);
342 //web_client_addfile("help.html/functions.html");
343 };
344 if(!strcmp(ClientInfo->Query("help"),"examples")) {
345 fwrite(examples,sizeof(examples),1,stdout);
346 //web_client_addfile("help.html/examples.html");
347 };
348 if(!strcmp(ClientInfo->Query("help"),"Authors")) {
349 printf("Luis Figueiredo (<a href='mailto:stdio@netc.pt'>stdio@netc.pt</a>) - Main programmer, designer<BR><BR>\n");
350 printf("People who contributed:<BR>\n");
351 printf("<UL>Joćo Luis Marques (<a href='mailto:Lamego@PTLink.net'>Lamego@PTLink.net</a>)<BR>\n");
352 printf("<UL>minor bug reported (redirectors, stdout)</UL></UL>\n");
353 printf("<UL>'oddsock' (<a href='mailto:oddsock@oddsock.org'>oddsock@oddsock.org</a>)<BR>\n");
354 printf("<UL>Licensing tip, and minor bug reported (segv in querystring)</UL></UL>\n");
355 printf("<UL>Rocco Carbone (<a href='mailto:rocco@tecsiel.it'>rocco@tecsiel.it</a>)<BR>\n");
356 printf("<UL>Return code for web_server_run tip</UL></UL>\n");
357 printf("<UL>Johannes E. Schindelin (<a href='mailto:Johannes.Schindelin@gmx.de'>Johannes.Schindelin@gmx.de</a>)<BR>\n");
358 printf("<UL>Spell checking, Makefile portability, and security 'How do I create my own certificate?'<BR>\n");
359 printf("bugfixes, example 'hello world!'</UL></UL>\n");
360 printf("<UL>Richard Offer (<a href='mailto:offer@sgi.com'>offer@sgi.com</a>)<BR>\n");
361 printf("<UL>checkboxes, (multiple variables) tip</UL></UL>\n");
362 printf("<UL>Sven Anders (<a href='mailto:anders@anduras.de'>anders@anduras.de</a>)<BR>\n");
363 printf("<UL>Created a new web_client_setcookie()(i made some changes)</UL></UL>\n");
364 printf("<UL>Hilobok Andrew (<a href='mailto:han@km.if.ua'>han@km.if.ua</a>)<BR>\n");
365 printf("<UL>FreeBSD portability</UL></UL>\n");
366 };
367 endpage();
368};
369
370
371
372void confexample() {
373 startpage("confexample");
374 printf("<PRE>\n");
375 web_client_addfile(server.conffile);
376 printf("</PRE>\n");
377 printf("ClientInfo->Conf(\"PERSONAL_CONF\",\"PORT\")->%s<BR>\n",ClientInfo->Conf("PERSONAL_CONF","PORT"));
378 printf("ClientInfo->Conf(\"PERSONAL_CONF\",\"IP\")->%s<BR>\n",ClientInfo->Conf("PERSONAL_CONF","IP"));
379 printf("ClientInfo->Conf(\"LIBWEBSERVER\",\"PORT\")->%s<BR>\n",ClientInfo->Conf("LIBWEBSERVER","PORT"));
380 endpage();
381
382};
383
384
385
386
387
388int main() {
389
390#ifdef DEBUG
391 //FILE *err=freopen("debug.log","w",stderr);
392#endif // DEBUG
393
394 memset(gifdata,0,GIFSIDE*GIFSIDE);
395 while(!web_server_init(&server,PORT,"help.cfg",WS_USEEXTCONF|WS_USELEN))PORT++;
396 web_server_useMIMEfile(&server,"mime.types");
397
398 //web_server_addhandler(&server,"* /",skip,0);
399 web_server_addhandler(&server,"* /",help,0);
400 web_server_addhandler(&server,"* /teste",teste,WS_LOCAL);
401 web_server_addhandler(&server,"* /varteste",varteste,WS_DYNVAR|WS_USELEN);
402 web_server_addhandler(&server,"* /teste1",teste1,WS_LOCAL);
403 web_server_addhandler(&server,"* /hello",hello_world,0);
404 web_server_addhandler(&server,"* /log",logfile,WS_USELEN); // turn off global flag
405 web_server_addhandler(&server,"* /image",imageout,0);
406 web_server_addhandler(&server,"* /gif",outgif,0);
407 web_server_addhandler(&server,"* /auth",urlauthenticate,0);
408 web_server_addhandler(&server,"* /cookie",cookie,0);
409 web_server_addhandler(&server,"* /checkbox",checkbox,0);
410 web_server_addhandler(&server,"* /confexample",confexample,0);
411
412 web_server_aliasdir(&server,"fs","/",0);
413 _tmpnameprefix="lws";
414 printf("http://localhost:%d\n",server.port);
415 //putenv("TEMP=c:\\temp");
416 for(;;) {
417 web_server_run(&server);
418 };
419
420
421};
diff --git a/contrib/help/help.cfg b/contrib/help/help.cfg
new file mode 100644
index 00000000..6fbb727e
--- /dev/null
+++ b/contrib/help/help.cfg
@@ -0,0 +1,13 @@
1[LIBWEBSERVER]
2LOG=help.log
3PORT=81
4USESSL=0
5LOCAL=0
6DYNVAR=0
7
8
9[PERSONAL_CONF]
10PORT=Portability
11MOST=general key guard
12IP=127.0.0.1
13
diff --git a/contrib/help/info.h b/contrib/help/info.h
new file mode 100644
index 00000000..02a80798
--- /dev/null
+++ b/contrib/help/info.h
@@ -0,0 +1,87 @@
1/*
2 * by data2header by Luis Figueiredo (stdio@netc.pt)
3 */
4#ifndef _INFO_H_
5#define _INFO_H_
6
7char info[]="\x3C\x63\x65\x6E\x74\x65\x72\x3E\x3C\x48\x33\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27"
8"\x30\x30\x37\x37\x30\x30\x27\x3E\x6C\x69\x62\x77\x65\x62\x73\x65\x72\x76\x65\x72\x20\x49\x6E\x66\x6F\x3C"
9"\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x48\x33\x3E\x3C\x2F\x63\x65\x6E\x74\x65\x72\x3E\x3C\x42\x52\x3E\x3C\x42"
10"\x52\x3E\xA\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x77\x68\x61\x74\x3E\x3C\x42\x3E\x3C\x66\x6F\x6E\x74\x20\x63"
11"\x6F\x6C\x6F\x72\x3D\x27\x30\x30\x30\x30\x37\x37\x27\x3E\x57\x68\x61\x74\x27\x73\x20\x6C\x69\x62\x77\x65"
12"\x62\x73\x65\x72\x76\x65\x72\x20\x66\x6F\x72\x3F\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x42\x3E\x3C\x42\x52"
13"\x3E\xA\x3C\x55\x4C\x3E\x54\x68\x69\x73\x20\x6C\x69\x62\x20\x69\x73\x20\x69\x6E\x74\x65\x6E\x64\x65\x64"
14"\x20\x74\x6F\x20\x61\x64\x64\x20\x77\x65\x62\x73\x65\x72\x76\x65\x72\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E"
15"\x61\x6C\x69\x74\x79\x20\x74\x6F\x20\x70\x72\x6F\x67\x72\x61\x6D\x73\x20\x69\x6E\x73\x74\x65\x61\x64\x20"
16"\x6F\x66\x20\x75\x73\x69\x6E\x67\x20\x61\x6E\x20\x65\x78\x74\x65\x72\x6E\x61\x6C\x20\x77\x65\x62\x73\x65"
17"\x72\x76\x65\x72\x2E\x3C\x42\x52\x3E\xA\x9\x54\x77\x6F\x20\x65\x78\x61\x6D\x70\x6C\x65\x73\x20\x66\x6F"
18"\x72\x20\x65\x6D\x62\x65\x64\x64\x65\x64\x20\x77\x65\x62\x73\x65\x72\x76\x65\x72\x73\x20\x74\x68\x61\x74"
19"\x20\x69\x20\x6B\x6E\x6F\x77\x20\x6F\x66\x20\x61\x72\x65\x20\x73\x69\x6D\x70\x6C\x65\x20\x28\x73\x68\x6F"
20"\x75\x74\x63\x61\x73\x74\x20\x28\x69\x20\x67\x75\x65\x73\x73\x29\x2C\x20\x61\x6E\x64\x20\x77\x65\x62\x54"
21"\x56\x20\x28\x74\x65\x6C\x65\x74\x65\x78\x74\x20\x61\x73\x20\x61\x20\x77\x65\x62\x70\x61\x67\x65\x20\x28"
22"\x66\x72\x6F\x6D\x20\x70\x69\x6E\x6E\x61\x63\x6C\x65\x29\x29\x3B\x20\x61\x6E\x64\x20\x6D\x61\x6E\x79\x20"
23"\x6F\x74\x68\x65\x72\x73\x20\x70\x72\x6F\x62\x61\x62\x6C\x79\x20\x64\x6F\x20\x74\x68\x65\x20\x73\x61\x6D"
24"\x65\x2E\xA\x3C\x2F\x55\x4C\x3E\xA\x3C\x48\x52\x3E\xA\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x77\x68\x6F\x3E"
25"\x3C\x42\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x30\x30\x30\x30\x37\x37\x27\x3E\x57\x68"
26"\x6F\x27\x73\x20\x73\x75\x70\x70\x6F\x73\x65\x64\x20\x74\x6F\x20\x75\x73\x65\x20\x6C\x69\x62\x77\x65\x62"
27"\x73\x65\x72\x76\x65\x72\x3F\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x54\x68\x69"
28"\x73\x20\x69\x73\x20\x6D\x61\x69\x6E\x6C\x79\x20\x64\x65\x76\x65\x6C\x6F\x70\x65\x64\x20\x66\x6F\x72\x20"
29"\x64\x65\x76\x65\x6C\x6F\x70\x65\x72\x73\x20\x74\x6F\x20\x6D\x61\x6B\x65\x20\x69\x74\x20\x65\x61\x73\x69"
30"\x65\x72\x20\x74\x6F\x20\x77\x72\x69\x74\x65\x20\x61\x20\x77\x65\x62\x20\x69\x6E\x74\x65\x72\x66\x61\x63"
31"\x65\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x73\x6F\x66\x74\x77\x61\x72\x65\x2C\x20\x28\x6E\x6F\x74\x65"
32"\x20\x61\x20\x77\x65\x62\x62\x72\x6F\x77\x73\x65\x72\x20\x69\x73\x20\x63\x6F\x6D\x6D\x6F\x6E\x6C\x79\x20"
33"\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x20\x69\x6E\x20\x6D\x6F\x73\x74\x20\x6F\x70\x65\x72\x61\x74\x69\x6E"
34"\x67\xA\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x73\x79\x73\x74\x65\x6D\x73\x29\x20\x73\x6F"
35"\x20\x69\x74\x20\x69\x73\x20\x6C\x69\x6B\x65\x20\x61\x20\x70\x6F\x72\x74\x61\x62\x6C\x65\x20\x22\x74\x65"
36"\x72\x6D\x69\x6E\x61\x6C\x22\x20\x74\x68\x61\x74\x20\x63\x61\x6E\x20\x62\x65\x20\x61\x63\x63\x65\x73\x73"
37"\x65\x64\x20\x66\x72\x6F\x6D\x20\x61\x6E\x79\x20\x63\x6F\x6D\x70\x75\x74\x65\x72\x20\x28\x77\x69\x74\x68"
38"\x20\x61\x20\x62\x72\x6F\x77\x73\x65\x72\x20\x6F\x66\x20\x63\x6F\x75\x72\x73\x65\x2E\x2E\x2E\x29\x2E\x3C"
39"\x2F\x55\x4C\x3E\xA\x3C\x48\x52\x3E\xA\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x77\x68\x65\x6E\x3E\x3C\x42\x3E"
40"\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x30\x30\x30\x30\x37\x37\x27\x3E\x57\x68\x65\x6E\x20"
41"\x61\x6D\x20\x69\x20\x73\x75\x70\x70\x6F\x73\x65\x64\x20\x74\x6F\x20\x75\x73\x65\x20\x6C\x69\x62\x77\x65"
42"\x62\x73\x65\x72\x76\x65\x72\x3F\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x46\x6F"
43"\x72\x20\x65\x78\x61\x6D\x70\x6C\x65\x2C\x20\x69\x6D\x61\x67\x69\x6E\x65\x20\x74\x68\x61\x74\x20\x79\x6F"
44"\x75\x20\x61\x72\x65\x20\x64\x65\x76\x65\x6C\x6F\x70\x69\x6E\x67\x20\x61\x20\x64\x61\x65\x6D\x6F\x6E\x20"
45"\x61\x6E\x64\x20\x77\x61\x6E\x74\x20\x74\x6F\x20\x63\x68\x65\x63\x6B\x20\x73\x74\x61\x74\x73\x20\x6F\x72"
46"\x20\x72\x65\x2D\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x20\x61\x74\x20\x72\x75\x6E\x2D\x74\x69\x6D\x65\x3B"
47"\xA\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x77\x69\x74\x68\x20\x74\x68"
48"\x69\x73\x20\x6C\x69\x62\x72\x61\x72\x79\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x61\x64\x64\x20\x61\x20\x6C"
49"\x69\x73\x74\x65\x6E\x20\x70\x6F\x72\x74\x20\x66\x6F\x72\x20\x72\x75\x6E\x74\x69\x6D\x65\x2C\x20\x61\x6E"
50"\x64\x20\x63\x6F\x6E\x6E\x65\x63\x74\x20\x77\x69\x74\x68\x20\x77\x68\x61\x74\x65\x76\x65\x72\x20\x62\x72"
51"\x6F\x77\x73\x65\x72\x20\x28\x76\x69\x61\x20\x48\x54\x4D\x4C\x20\x69\x6E\x74\x65\x72\x66\x61\x63\x65\x29"
52"\xA\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x77\x69\x74\x68\x6F\x75\x74"
53"\x20\x64\x65\x70\x65\x6E\x64\x65\x6E\x63\x69\x65\x73\x20\x6F\x66\x20\x61\x6E\x20\x65\x78\x74\x65\x72\x6E"
54"\x61\x6C\x20\x77\x65\x62\x73\x65\x72\x76\x65\x72\x2E\x3C\x42\x52\x3E\xA\x20\x20\x20\x20\x20\x20\x20\x20"
55"\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x59\x6F\x75\x20\x63\x61\x6E\x20\x65\x76\x65\x6E\x20\x64\x6F\x20"
56"\x61\x20\x77\x65\x62\x73\x65\x72\x76\x65\x72\x20\x28\x6F\x66\x20\x63\x6F\x75\x72\x73\x65\x29\x2C\x20\x6A"
57"\x75\x73\x74\x20\x75\x73\x65\x20\x79\x6F\x75\x72\x20\x69\x6D\x61\x67\x69\x6E\x61\x74\x69\x6F\x6E\x2E\x3C"
58"\x42\x52\x3E\xA\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x41\x6E\x6F\x74"
59"\x68\x65\x72\x20\x71\x75\x69\x74\x65\x20\x73\x69\x6D\x70\x6C\x65\x20\x65\x78\x61\x6D\x70\x6C\x65\x2C\x20"
60"\x61\x20\x73\x6F\x75\x6E\x64\x20\x72\x65\x63\x6F\x72\x64\x65\x72\x20\x28\x75\x73\x69\x6E\x67\x20\x6F\x6E"
61"\x6C\x79\x20\x6C\x6F\x63\x61\x6C\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x66\x6F\x72\x20\x73"
62"\x65\x63\x75\x72\x69\x74\x79\x20\x72\x65\x61\x73\x6F\x6E\x73\x29\x20\x75\x73\x65\x73\x20\x61\x20\x77\x65"
63"\x62\x20\x69\x6E\x74\x65\x72\x66\x61\x63\x65\x20\x74\x6F\x20\x63\x6F\x6E\x74\x72\x6F\x6C\xA\x20\x20\x20"
64"\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x2F\x64\x65\x76\x2F\x64\x73\x70\x20\x72\x65"
65"\x61\x64\x69\x6E\x67\x2F\x77\x72\x69\x74\x69\x6E\x67\x20\x28\x76\x69\x61\x20\x48\x54\x4D\x4C\x20\x69\x6E"
66"\x74\x65\x72\x66\x61\x63\x65\x29\x2E\xA\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20"
67"\x20\x20\x74\x68\x65\x72\x65\x20\x61\x72\x65\x20\x6D\x61\x6E\x79\x20\x6F\x74\x68\x65\x72\x20\x74\x68\x69"
68"\x6E\x67\x73\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x64\x6F\x20\x2E\x2E\x2E\x3C\x2F\x55\x4C\x3E\xA\xA\x3C"
69"\x48\x52\x3E\xA\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x73\x65\x72\x76\x65\x72\x5F\x73\x63\x72\x69\x70\x74\x73"
70"\x3E\x3C\x42\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x30\x30\x30\x30\x37\x37\x27\x3E\x49"
71"\x73\x20\x74\x68\x65\x72\x65\x20\x73\x75\x70\x70\x6F\x72\x74\x20\x66\x6F\x72\x20\x73\x65\x72\x76\x65\x72"
72"\x20\x73\x63\x72\x69\x70\x74\x73\x20\x73\x75\x63\x68\x20\x61\x73\x20\x2E\x70\x68\x70\x20\x2E\x63\x67\x69"
73"\x20\x2E\x61\x73\x70\x3F\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x42\x3E\xA\x3C\x55\x4C\x3E\x20\x57\x65\x6C"
74"\x6C\x2C\x20\x74\x68\x69\x73\x20\x6C\x69\x62\x72\x61\x72\x79\x20\x6F\x6E\x6C\x79\x20\x70\x72\x6F\x76\x69"
75"\x64\x65\x73\x20\x77\x65\x62\x20\x73\x65\x72\x76\x65\x72\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x73\x20\x74"
76"\x68\x61\x74\x20\x6D\x61\x6B\x65\x20\x61\x20\x73\x65\x72\x76\x65\x72\x20\x72\x75\x6E\x6E\x69\x6E\x67\x2C"
77"\x20\x73\x65\x72\x76\x65\x72\x20\x73\x63\x72\x69\x70\x74\x73\x20\x63\x61\x6E\x20\x62\x65\x20\x73\x75\x70"
78"\x70\x6F\x72\x74\x65\x64\x20\x69\x66\x20\x79\x6F\x75\x20\x77\x61\x6E\x74\x20\x74\x6F\x20\x64\x6F\x20\x69"
79"\x74\x3A\xA\x20\x20\x20\x20\x20\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x64\x65\x76\x65\x6C\x6F\x70\x20\x61"
80"\x20\x68\x61\x6E\x64\x6C\x65\x72\x20\x66\x6F\x72\x20\x74\x79\x70\x65\x20\x22\x2E\x73\x6F\x6D\x65\x74\x68"
81"\x69\x6E\x67\x22\x20\x6F\x72\x20\x77\x68\x61\x74\x65\x76\x65\x72\x2C\x20\x74\x68\x69\x73\x20\x70\x61\x63"
82"\x6B\x61\x67\x65\x20\x70\x72\x6F\x76\x69\x64\x65\x73\x20\x61\x20\x2E\x63\x67\x69\x20\x68\x61\x6E\x64\x6C"
83"\x65\x72\x20\x61\x73\x20\x61\x6E\x20\x65\x78\x61\x6D\x70\x6C\x65\x2C\x20\x28\x75\x73\x65\x20\x61\x74\x20"
84"\x79\x6F\x75\x72\x20\x6F\x77\x6E\x20\x72\x69\x73\x6B\x20\x6F\x72\x20\x6D\x61\x6B\x65\x20\x69\x74\x20\x62"
85"\x65\x74\x74\x65\x72\x29\x2E\x3C\x2F\x55\x4C\x3E\xA\xA\xA";
86
87#endif
diff --git a/contrib/help/makeheader.bat b/contrib/help/makeheader.bat
new file mode 100644
index 00000000..5d664ed6
--- /dev/null
+++ b/contrib/help/makeheader.bat
@@ -0,0 +1,4 @@
1type ..\help.html\info.html |..\tools\data2header.exe info >info.h
2type ..\help.html\functions.html |..\tools\data2header.exe functions >functions.h
3type ..\help.html\examples.html |..\tools\data2header.exe examples >examples.h
4type ..\help.html\security.html |..\tools\data2header.exe security >security.h \ No newline at end of file
diff --git a/contrib/help/mime.types b/contrib/help/mime.types
new file mode 100644
index 00000000..16c8cbd5
--- /dev/null
+++ b/contrib/help/mime.types
@@ -0,0 +1,469 @@
1# This is a comment. I love comments.
2
3# This file controls what Internet media types are sent to the client for
4# given file extension(s). Sending the correct media type to the client
5# is important so they know how to handle the content of the file.
6# Extra types can either be added here or by using an AddType directive
7# in your config files. For more information about Internet media types,
8# please read RFC 2045, 2046, 2047, 2048, and 2077. The Internet media type
9# registry is at <ftp://ftp.iana.org/in-notes/iana/assignments/media-types/>.
10
11# MIME type Extension
12application/EDI-Consent
13application/EDI-X12
14application/EDIFACT
15application/activemessage
16application/andrew-inset ez
17application/applefile
18application/atomicmail
19application/batch-SMTP
20application/beep+xml
21application/cals-1840
22application/commonground
23application/cybercash
24application/dca-rft
25application/dec-dx
26application/dvcs
27application/eshop
28application/http
29application/hyperstudio
30application/iges
31application/index
32application/index.cmd
33application/index.obj
34application/index.response
35application/index.vnd
36application/iotp
37application/ipp
38application/isup
39application/font-tdpfr
40application/mac-binhex40 hqx
41application/mac-compactpro cpt
42application/macwriteii
43application/marc
44application/mathematica
45application/mathematica-old
46application/msword doc
47application/news-message-id
48application/news-transmission
49application/ocsp-request
50application/ocsp-response
51application/octet-stream bin dms lha lzh exe class so dll
52application/oda oda
53application/parityfec
54application/pdf pdf
55application/pgp-encrypted
56application/pgp-keys
57application/pgp-signature
58application/pkcs10
59application/pkcs7-mime
60application/pkcs7-signature
61application/pkix-cert
62application/pkix-crl
63application/pkixcmp
64application/postscript ai eps ps
65application/prs.alvestrand.titrax-sheet
66application/prs.cww
67application/prs.nprend
68application/qsig
69application/remote-printing
70application/riscos
71application/rtf
72application/sdp
73application/set-payment
74application/set-payment-initiation
75application/set-registration
76application/set-registration-initiation
77application/sgml
78application/sgml-open-catalog
79application/sieve
80application/slate
81application/smil smi smil
82application/timestamp-query
83application/timestamp-reply
84application/vemmi
85application/vnd.3M.Post-it-Notes
86application/vnd.FloGraphIt
87application/vnd.accpac.simply.aso
88application/vnd.accpac.simply.imp
89application/vnd.acucobol
90application/vnd.aether.imp
91application/vnd.anser-web-certificate-issue-initiation
92application/vnd.anser-web-funds-transfer-initiation
93application/vnd.audiograph
94application/vnd.businessobjects
95application/vnd.bmi
96application/vnd.canon-cpdl
97application/vnd.canon-lips
98application/vnd.claymore
99application/vnd.commerce-battelle
100application/vnd.commonspace
101application/vnd.comsocaller
102application/vnd.contact.cmsg
103application/vnd.cosmocaller
104application/vnd.cups-postscript
105application/vnd.cups-raster
106application/vnd.cups-raw
107application/vnd.ctc-posml
108application/vnd.cybank
109application/vnd.dna
110application/vnd.dpgraph
111application/vnd.dxr
112application/vnd.ecdis-update
113application/vnd.ecowin.chart
114application/vnd.ecowin.filerequest
115application/vnd.ecowin.fileupdate
116application/vnd.ecowin.series
117application/vnd.ecowin.seriesrequest
118application/vnd.ecowin.seriesupdate
119application/vnd.enliven
120application/vnd.epson.esf
121application/vnd.epson.msf
122application/vnd.epson.quickanime
123application/vnd.epson.salt
124application/vnd.epson.ssf
125application/vnd.ericsson.quickcall
126application/vnd.eudora.data
127application/vnd.fdf
128application/vnd.ffsns
129application/vnd.framemaker
130application/vnd.fsc.weblaunch
131application/vnd.fujitsu.oasys
132application/vnd.fujitsu.oasys2
133application/vnd.fujitsu.oasys3
134application/vnd.fujitsu.oasysgp
135application/vnd.fujitsu.oasysprs
136application/vnd.fujixerox.ddd
137application/vnd.fujixerox.docuworks
138application/vnd.fujixerox.docuworks.binder
139application/vnd.fut-misnet
140application/vnd.grafeq
141application/vnd.groove-account
142application/vnd.groove-identity-message
143application/vnd.groove-injector
144application/vnd.groove-tool-message
145application/vnd.groove-tool-template
146application/vnd.groove-vcard
147application/vnd.hhe.lesson-player
148application/vnd.hp-HPGL
149application/vnd.hp-PCL
150application/vnd.hp-PCLXL
151application/vnd.hp-hpid
152application/vnd.hp-hps
153application/vnd.httphone
154application/vnd.hzn-3d-crossword
155application/vnd.ibm.afplinedata
156application/vnd.ibm.MiniPay
157application/vnd.ibm.modcap
158application/vnd.informix-visionary
159application/vnd.intercon.formnet
160application/vnd.intertrust.digibox
161application/vnd.intertrust.nncp
162application/vnd.intu.qbo
163application/vnd.intu.qfx
164application/vnd.irepository.package+xml
165application/vnd.is-xpr
166application/vnd.japannet-directory-service
167application/vnd.japannet-jpnstore-wakeup
168application/vnd.japannet-payment-wakeup
169application/vnd.japannet-registration
170application/vnd.japannet-registration-wakeup
171application/vnd.japannet-setstore-wakeup
172application/vnd.japannet-verification
173application/vnd.japannet-verification-wakeup
174application/vnd.koan
175application/vnd.lotus-1-2-3
176application/vnd.lotus-approach
177application/vnd.lotus-freelance
178application/vnd.lotus-notes
179application/vnd.lotus-organizer
180application/vnd.lotus-screencam
181application/vnd.lotus-wordpro
182application/vnd.mcd
183application/vnd.mediastation.cdkey
184application/vnd.meridian-slingshot
185application/vnd.mif mif
186application/vnd.minisoft-hp3000-save
187application/vnd.mitsubishi.misty-guard.trustweb
188application/vnd.mobius.daf
189application/vnd.mobius.dis
190application/vnd.mobius.msl
191application/vnd.mobius.plc
192application/vnd.mobius.txf
193application/vnd.motorola.flexsuite
194application/vnd.motorola.flexsuite.adsi
195application/vnd.motorola.flexsuite.fis
196application/vnd.motorola.flexsuite.gotap
197application/vnd.motorola.flexsuite.kmr
198application/vnd.motorola.flexsuite.ttc
199application/vnd.motorola.flexsuite.wem
200application/vnd.mozilla.xul+xml
201application/vnd.ms-artgalry
202application/vnd.ms-asf
203application/vnd.ms-excel xls
204application/vnd.ms-lrm
205application/vnd.ms-powerpoint ppt
206application/vnd.ms-project
207application/vnd.ms-tnef
208application/vnd.ms-works
209application/vnd.mseq
210application/vnd.msign
211application/vnd.music-niff
212application/vnd.musician
213application/vnd.netfpx
214application/vnd.noblenet-directory
215application/vnd.noblenet-sealer
216application/vnd.noblenet-web
217application/vnd.novadigm.EDM
218application/vnd.novadigm.EDX
219application/vnd.novadigm.EXT
220application/vnd.osa.netdeploy
221application/vnd.palm
222application/vnd.pg.format
223application/vnd.pg.osasli
224application/vnd.powerbuilder6
225application/vnd.powerbuilder6-s
226application/vnd.powerbuilder7
227application/vnd.powerbuilder7-s
228application/vnd.powerbuilder75
229application/vnd.powerbuilder75-s
230application/vnd.previewsystems.box
231application/vnd.publishare-delta-tree
232application/vnd.pvi.ptid1
233application/vnd.pwg-xhtml-print+xml
234application/vnd.rapid
235application/vnd.s3sms
236application/vnd.seemail
237application/vnd.shana.informed.formdata
238application/vnd.shana.informed.formtemplate
239application/vnd.shana.informed.interchange
240application/vnd.shana.informed.package
241application/vnd.sss-cod
242application/vnd.sss-dtf
243application/vnd.sss-ntf
244application/vnd.street-stream
245application/vnd.svd
246application/vnd.swiftview-ics
247application/vnd.triscape.mxs
248application/vnd.trueapp
249application/vnd.truedoc
250application/vnd.tve-trigger
251application/vnd.ufdl
252application/vnd.uplanet.alert
253application/vnd.uplanet.alert-wbxml
254application/vnd.uplanet.bearer-choice-wbxml
255application/vnd.uplanet.bearer-choice
256application/vnd.uplanet.cacheop
257application/vnd.uplanet.cacheop-wbxml
258application/vnd.uplanet.channel
259application/vnd.uplanet.channel-wbxml
260application/vnd.uplanet.list
261application/vnd.uplanet.list-wbxml
262application/vnd.uplanet.listcmd
263application/vnd.uplanet.listcmd-wbxml
264application/vnd.uplanet.signal
265application/vnd.vcx
266application/vnd.vectorworks
267application/vnd.vidsoft.vidconference
268application/vnd.visio
269application/vnd.vividence.scriptfile
270application/vnd.wap.sic
271application/vnd.wap.slc
272application/vnd.wap.wbxml wbxml
273application/vnd.wap.wmlc wmlc
274application/vnd.wap.wmlscriptc wmlsc
275application/vnd.webturbo
276application/vnd.wrq-hp3000-labelled
277application/vnd.wt.stf
278application/vnd.xara
279application/vnd.xfdl
280application/vnd.yellowriver-custom-menu
281application/whoispp-query
282application/whoispp-response
283application/wita
284application/wordperfect5.1
285application/x-bcpio bcpio
286application/x-cdlink vcd
287application/x-chess-pgn pgn
288application/x-compress
289application/x-cpio cpio
290application/x-csh csh
291application/x-director dcr dir dxr
292application/x-dvi dvi
293application/x-futuresplash spl
294application/x-gtar gtar
295application/x-gzip
296application/x-hdf hdf
297application/x-javascript js
298application/x-koan skp skd skt skm
299application/x-latex latex
300application/x-netcdf nc cdf
301application/x-sh sh
302application/x-shar shar
303application/x-shockwave-flash swf
304application/x-stuffit sit
305application/x-sv4cpio sv4cpio
306application/x-sv4crc sv4crc
307application/x-tar tar
308application/x-tcl tcl
309application/x-tex tex
310application/x-texinfo texinfo texi
311application/x-troff t tr roff
312application/x-troff-man man
313application/x-troff-me me
314application/x-troff-ms ms
315application/x-ustar ustar
316application/x-wais-source src
317application/x400-bp
318application/xml
319application/xml-dtd
320application/xml-external-parsed-entity
321application/zip zip
322audio/32kadpcm
323audio/basic au snd
324audio/g.722.1
325audio/l16
326audio/midi mid midi kar
327audio/mp4a-latm
328audio/mpa-robust
329audio/mpeg mpga mp2 mp3
330audio/parityfec
331audio/prs.sid
332audio/telephone-event
333audio/tone
334audio/vnd.cisco.nse
335audio/vnd.cns.anp1
336audio/vnd.cns.inf1
337audio/vnd.digital-winds
338audio/vnd.everad.plj
339audio/vnd.lucent.voice
340audio/vnd.nortel.vbk
341audio/vnd.nuera.ecelp4800
342audio/vnd.nuera.ecelp7470
343audio/vnd.nuera.ecelp9600
344audio/vnd.octel.sbc
345audio/vnd.qcelp
346audio/vnd.rhetorex.32kadpcm
347audio/vnd.vmx.cvsd
348audio/x-aiff aif aiff aifc
349audio/x-mpegurl m3u
350audio/x-pn-realaudio ram rm
351audio/x-pn-realaudio-plugin rpm
352audio/x-realaudio ra
353audio/x-wav wav
354chemical/x-pdb pdb
355chemical/x-xyz xyz
356image/bmp bmp
357image/cgm
358image/g3fax
359image/gif gif
360image/ief ief
361image/jpeg jpeg jpg jpe
362image/naplps
363image/png png
364image/prs.btif
365image/prs.pti
366image/tiff tiff tif
367image/vnd.cns.inf2
368image/vnd.dwg
369image/vnd.dxf
370image/vnd.fastbidsheet
371image/vnd.fpx
372image/vnd.fst
373image/vnd.fujixerox.edmics-mmr
374image/vnd.fujixerox.edmics-rlc
375image/vnd.mix
376image/vnd.net-fpx
377image/vnd.svf
378image/vnd.wap.wbmp wbmp
379image/vnd.xiff
380image/x-cmu-raster ras
381image/x-portable-anymap pnm
382image/x-portable-bitmap pbm
383image/x-portable-graymap pgm
384image/x-portable-pixmap ppm
385image/x-rgb rgb
386image/x-xbitmap xbm
387image/x-xpixmap xpm
388image/x-xwindowdump xwd
389message/delivery-status
390message/disposition-notification
391message/external-body
392message/http
393message/news
394message/partial
395message/rfc822
396message/s-http
397model/iges igs iges
398model/mesh msh mesh silo
399model/vnd.dwf
400model/vnd.flatland.3dml
401model/vnd.gdl
402model/vnd.gs-gdl
403model/vnd.gtw
404model/vnd.mts
405model/vnd.vtu
406model/vrml wrl vrml
407multipart/alternative
408multipart/appledouble
409multipart/byteranges
410multipart/digest
411multipart/encrypted
412multipart/form-data
413multipart/header-set
414multipart/mixed
415multipart/parallel
416multipart/related
417multipart/report
418multipart/signed
419multipart/voice-message
420text/calendar
421text/css css
422text/directory
423text/enriched
424text/html html htm
425text/parityfec
426text/plain asc txt
427text/prs.lines.tag
428text/rfc822-headers
429text/richtext rtx
430text/rtf rtf
431text/sgml sgml sgm
432text/tab-separated-values tsv
433text/t140
434text/uri-list
435text/vnd.DMClientScript
436text/vnd.IPTC.NITF
437text/vnd.IPTC.NewsML
438text/vnd.abc
439text/vnd.curl
440text/vnd.flatland.3dml
441text/vnd.fly
442text/vnd.fmi.flexstor
443text/vnd.in3d.3dml
444text/vnd.in3d.spot
445text/vnd.latex-z
446text/vnd.motorola.reflex
447text/vnd.ms-mediapackage
448text/vnd.wap.si
449text/vnd.wap.sl
450text/vnd.wap.wml wml
451text/vnd.wap.wmlscript wmls
452text/x-setext etx
453text/xml xml xsl
454text/xml-external-parsed-entity
455video/mp4v-es
456video/mpeg mpeg mpg mpe
457video/parityfec
458video/pointer
459video/quicktime qt mov
460video/vnd.fvt
461video/vnd.motorola.video
462video/vnd.motorola.videop
463video/vnd.mpegurl mxu
464video/vnd.mts
465video/vnd.nokia.interleaved-multimedia
466video/vnd.vivo
467video/x-msvideo avi
468video/x-sgi-movie movie
469x-conference/x-cooltalk ice
diff --git a/contrib/help/security.h b/contrib/help/security.h
new file mode 100644
index 00000000..c9d02967
--- /dev/null
+++ b/contrib/help/security.h
@@ -0,0 +1,143 @@
1/*
2 * by data2header by Luis Figueiredo (stdio@netc.pt)
3 */
4#ifndef _SECURITY_H_
5#define _SECURITY_H_
6
7char security[]="\x3C\x63\x65\x6E\x74\x65\x72\x3E\x3C\x48\x33\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27"
8"\x30\x30\x37\x37\x30\x30\x27\x3E\x6C\x69\x62\x77\x65\x62\x73\x65\x72\x76\x65\x72\x20\x53\x65\x63\x75\x72"
9"\x69\x74\x79\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x48\x33\x3E\x3C\x2F\x63\x65\x6E\x74\x65\x72\x3E\x3C\x42"
10"\x52\x3E\x3C\x42\x52\x3E\xA\xA\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x77\x68\x61\x74\x3E\x3C\x42\x3E\x3C\x66"
11"\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x30\x30\x30\x30\x37\x37\x27\x3E\x49\x73\x20\x69\x74\x20\x73"
12"\x61\x66\x65\x20\x74\x6F\x20\x75\x73\x65\x3F\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x42\x3E\x3C\x42\x52\x3E"
13"\xA\x3C\x55\x4C\x3E\x57\x65\x6C\x6C\x2C\x20\x49\x20\x63\x61\x6E\x27\x74\x20\x70\x72\x6F\x6D\x69\x73\x65"
14"\x20\x74\x68\x61\x74\x20\x69\x74\x27\x73\x20\x61\x20\x73\x65\x63\x75\x72\x65\x20\x73\x6F\x66\x74\x77\x61"
15"\x72\x65\x20\x73\x69\x6E\x63\x65\x20\x74\x68\x61\x74\x20\x6E\x6F\x74\x20\x6F\x6E\x6C\x79\x20\x64\x65\x70"
16"\x65\x6E\x64\x73\x20\x6F\x6E\x20\x74\x68\x65\x20\x73\x6F\x66\x74\x77\x61\x72\x65\x2C\x20\xA\x20\x20\x20"
17"\x20\x20\x20\x20\x20\x20\x62\x75\x74\x20\x61\x6C\x6C\x20\x69\x20\x63\x61\x6E\x20\x73\x61\x79\x20\x69\x73"
18"\x20\x74\x68\x61\x74\x20\x77\x61\x73\x6E\x27\x74\x20\x66\x6F\x75\x6E\x64\x20\x61\x6E\x79\x20\x73\x65\x63"
19"\x75\x72\x69\x74\x79\x20\x62\x75\x67\x20\x79\x65\x74\x2C\x20\x74\x68\x69\x73\x20\x77\x61\x73\x20\x64\x65"
20"\x76\x65\x6C\x6F\x70\x65\x64\x20\x69\x6E\x74\x65\x6E\x64\x65\x64\x20\x74\x6F\x20\x62\x65\x20\x73\x65\x63"
21"\x75\x72\x65\x2C\x20\x20\xA\x9\x9\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x75\x73\x65\x20\x6F\x70\x65\x6E"
22"\x73\x73\x6C\x20\x28\x65\x6E\x63\x72\x79\x70\x74\x65\x64\x20\x73\x74\x72\x65\x61\x6D\x73\x29\x20\x74\x6F"
23"\x20\x70\x72\x6F\x74\x65\x63\x74\x20\x69\x6E\x66\x6F\x72\x6D\x61\x74\x69\x6F\x6E\x20\x74\x68\x61\x74\x20"
24"\x70\x61\x73\x73\x65\x73\x20\x66\x72\x6F\x6D\x20\x77\x65\x62\x73\x65\x72\x76\x65\x72\x28\x6C\x69\x62\x29"
25"\x20\x74\x6F\x20\x63\x6C\x69\x65\x6E\x74\x3C\x2F\x55\x4C\x3E\xA\x9\xA\x3C\x41\x20\x6E\x61\x6D\x65\x3D"
26"\x63\x65\x72\x74\x69\x66\x69\x63\x61\x74\x65\x3E\x3C\x42\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72"
27"\x3D\x27\x30\x30\x30\x30\x37\x37\x27\x3E\x48\x6F\x77\x20\x64\x6F\x20\x49\x20\x63\x72\x65\x61\x74\x65\x20"
28"\x6D\x79\x20\x6F\x77\x6E\x20\x63\x65\x72\x74\x69\x66\x69\x63\x61\x74\x65\x3F\x3C\x2F\x66\x6F\x6E\x74\x3E"
29"\x3C\x2F\x42\x3E\x3C\x42\x52\x3E\xA\x3C\x55\x4C\x3E\x59\x6F\x75\x20\x63\x61\x6E\x20\x65\x69\x74\x68\x65"
30"\x72\x20\x62\x75\x79\x20\x6F\x6E\x65\x20\x66\x72\x6F\x6D\x20\x6F\x6E\x65\x20\x6F\x66\x20\x74\x68\x65\x20"
31"\x62\x69\x67\x20\x76\x65\x6E\x64\x6F\x72\x73\x20\x28\x73\x65\x65\x20\x79\x6F\x75\x72\x20\x62\x72\x6F\x77"
32"\x73\x65\x72\x27\x73\x20\x73\x74\x6F\x72\x65\x64\x20\x63\x65\x72\x74\x69\x66\x69\x63\x61\x74\x65\x73\xA"
33"\x9\x66\x6F\x72\x20\x74\x68\x65\x69\x72\x20\x61\x64\x64\x72\x65\x73\x73\x65\x73\x29\x20\x6F\x72\x20\x73"
34"\x65\x6C\x66\x2D\x73\x69\x67\x6E\x20\x61\x20\x73\x65\x6C\x66\x2D\x63\x72\x65\x61\x74\x65\x64\x20\x6F\x6E"
35"\x65\x2E\x20\x54\x68\x65\x20\x75\x70\x73\x69\x64\x65\x20\x6F\x66\x20\x74\x68\x65\x20\x62\x6F\x75\x67\x68"
36"\x74\xA\x9\x63\x65\x72\x74\x69\x66\x69\x63\x61\x74\x65\x73\x20\x69\x73\x2C\x20\x74\x68\x61\x74\x20\x74"
37"\x68\x65\x20\x77\x65\x62\x62\x72\x6F\x77\x73\x65\x72\x20\x64\x6F\x65\x73\x6E\x27\x74\x20\x61\x73\x6B\x20"
38"\x69\x66\x20\x74\x68\x65\x20\x75\x73\x65\x72\x20\x77\x61\x6E\x74\x73\x20\x74\x6F\xA\x9\x61\x63\x63\x65"
39"\x70\x74\x20\x74\x68\x61\x74\x20\x63\x65\x72\x74\x69\x66\x69\x63\x61\x74\x65\x2C\x20\x62\x75\x74\x20\x69"
40"\x6E\x73\x74\x65\x61\x64\x20\x63\x68\x65\x63\x6B\x73\x20\x77\x69\x74\x68\x20\x74\x68\x65\x20\x63\x65\x72"
41"\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E\x20\x61\x75\x74\x68\x6F\x72\x69\x74\x79\xA\x9\x79\x6F\x75\x20"
42"\x62\x6F\x75\x67\x68\x74\x20\x79\x6F\x75\x72\x20\x63\x65\x72\x74\x69\x66\x69\x63\x61\x74\x65\x20\x66\x72"
43"\x6F\x6D\x2E\x3C\x62\x72\x3E\xA\x9\x54\x68\x65\x20\x64\x6F\x77\x6E\x73\x69\x64\x65\x20\x69\x73\x20\x74"
44"\x68\x61\x74\x20\x69\x74\x20\x63\x6F\x73\x74\x73\x20\x71\x75\x69\x74\x65\x20\x61\x20\x6C\x6F\x74\x20\x6F"
45"\x66\x20\x6D\x6F\x6E\x65\x79\x2E\x3C\x62\x72\x3E\xA\x9\x54\x6F\x20\x63\x72\x65\x61\x74\x65\x20\x79\x6F"
46"\x75\x72\x20\x6F\x77\x6E\x20\x63\x65\x72\x74\x69\x66\x69\x63\x61\x74\x65\x20\x75\x73\x65\x20\x6F\x70\x65"
47"\x6E\x73\x73\x6C\x20\x6C\x69\x6B\x65\x20\x74\x68\x61\x74\x3A\xA\x9\x3C\x75\x6C\x3E\x3C\x6C\x69\x3E\x63"
48"\x72\x65\x61\x74\x65\x20\x61\x20\x6B\x65\x79\x20\x61\x6E\x64\x20\x72\x65\x71\x75\x65\x73\x74\x3A\x3C\x62"
49"\x72\x3E\xA\x9\x9\x3C\x70\x72\x65\x3E\x3C\x62\x3E\x6F\x70\x65\x6E\x73\x73\x6C\x20\x72\x65\x71\x20\x2D"
50"\x6E\x65\x77\x20\x3E\x20\x66\x6F\x6F\x2D\x63\x65\x72\x74\x2E\x63\x73\x72\x3C\x2F\x62\x3E\x3C\x2F\x70\x72"
51"\x65\x3E\x3C\x62\x72\x3E\xA\x9\x9\x41\x73\x20\x22\x43\x6F\x6D\x6D\x6F\x6E\x20\x4E\x61\x6D\x65\x22\x20"
52"\x79\x6F\x75\x20\x68\x61\x76\x65\x20\x74\x6F\x20\x74\x79\x70\x65\x20\x69\x6E\x20\x74\x68\x65\x20\x6E\x61"
53"\x6D\x65\x20\x70\x61\x72\x74\x20\x6F\x66\xA\x9\x9\x79\x6F\x75\x72\x20\x55\x52\x4C\x2C\x20\x69\x2E\x65"
54"\x2E\x20\x69\x66\x20\x79\x6F\x75\x72\x20\x77\x65\x62\x20\x73\x69\x74\x65\x20\x77\x69\x6C\x6C\x20\x62\x65"
55"\xA\x9\x9\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x6C\x69\x62\x77\x65\x62\x73\x65\x72\x76"
56"\x65\x72\x2E\x72\x75\x6C\x65\x73\x3A\x34\x34\x33\x2F\x22\x20\x74\x68\x65\x20\x43\x6F\x6D\x6D\x6F\x6E\x20"
57"\x4E\x61\x6D\x65\x20\x69\x73\xA\x9\x9\x22\x77\x77\x77\x2E\x6C\x69\x62\x77\x65\x62\x73\x65\x72\x76\x65"
58"\x72\x2E\x72\x75\x6C\x65\x73\x22\x2E\xA\x9\x3C\x6C\x69\x3E\x20\x72\x65\x6D\x6F\x76\x65\x20\x74\x68\x65"
59"\x20\x70\x61\x73\x73\x70\x68\x72\x61\x73\x65\x20\x66\x72\x6F\x6D\x20\x74\x68\x65\x20\x6B\x65\x79\x3A\x3C"
60"\x62\x72\x3E\xA\x9\x9\x3C\x70\x72\x65\x3E\x3C\x62\x3E\x6F\x70\x65\x6E\x73\x73\x6C\x20\x72\x73\x61\x20"
61"\x2D\x69\x6E\x20\x70\x72\x69\x76\x6B\x65\x79\x2E\x70\x65\x6D\x20\x2D\x6F\x75\x74\x20\x66\x6F\x6F\x2D\x63"
62"\x65\x72\x74\x2E\x6B\x65\x79\x3C\x2F\x62\x3E\x3C\x2F\x70\x72\x65\x3E\x3C\x62\x72\x3E\xA\x9\x3C\x6C\x69"
63"\x3E\x63\x6F\x6E\x76\x65\x72\x74\x20\x72\x65\x71\x75\x65\x73\x74\x20\x69\x6E\x74\x6F\x20\x61\x20\x73\x69"
64"\x67\x6E\x65\x64\x20\x63\x65\x72\x74\x69\x66\x69\x63\x61\x74\x65\x3A\x3C\x62\x72\x3E\xA\x9\x9\x3C\x70"
65"\x72\x65\x3E\x3C\x62\x3E\x6F\x70\x65\x6E\x73\x73\x6C\x20\x78\x35\x30\x39\x20\x2D\x69\x6E\x20\x66\x6F\x6F"
66"\x2D\x63\x65\x72\x74\x2E\x63\x73\x72\x20\x2D\x6F\x75\x74\x20\x66\x6F\x6F\x2D\x63\x65\x72\x74\x2E\x63\x65"
67"\x72\x74\x20\x2D\x72\x65\x71\x20\x2D\x73\x69\x67\x6E\x6B\x65\x79\x20\x66\x6F\x6F\x2D\x63\x65\x72\x74\x2E"
68"\x6B\x65\x79\x20\x2D\x64\x61\x79\x73\x20\x33\x35\x36\x3C\x2F\x62\x3E\x3C\x2F\x70\x72\x65\x3E\x3C\x62\x72"
69"\x3E\xA\x9\x3C\x6C\x69\x3E\x63\x72\x65\x61\x74\x65\x20\x2E\x70\x65\x6D\x20\x66\x69\x6C\x65\x3A\x3C\x62"
70"\x72\x3E\xA\x9\x9\x3C\x70\x72\x65\x3E\x3C\x62\x3E\x63\x61\x74\x20\x66\x6F\x6F\x2D\x63\x65\x72\x74\x2E"
71"\x63\x65\x72\x74\x20\x66\x6F\x6F\x2D\x63\x65\x72\x74\x2E\x6B\x65\x79\x20\x3E\x66\x6F\x6F\x2D\x63\x65\x72"
72"\x74\x2E\x70\x65\x6D\x3C\x2F\x62\x3E\x3C\x2F\x70\x72\x65\x3E\x3C\x62\x72\x3E\xA\x9\x3C\x2F\x75\x6C\x3E"
73"\xA\x3C\x2F\x75\x6C\x3E\xA\xA\xA\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x74\x69\x70\x73\x3E\x3C\x42\x3E\x3C"
74"\x66\x6F\x6E\x74\x20\x73\x69\x7A\x65\x3D\x34\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x37\x37\x30\x30\x37\x37\x27"
75"\x3E\x53\x65\x63\x75\x72\x69\x74\x79\x20\x74\x69\x70\x73\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x42\x3E\x3C"
76"\x42\x52\x3E\x3C\x48\x52\x3E\xA\xA\x3C\x41\x20\x6E\x61\x6D\x65\x3D\x72\x61\x63\x65\x63\x6F\x6E\x64\x69"
77"\x74\x69\x6F\x6E\x3E\x3C\x42\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x30\x30\x30\x30\x37"
78"\x37\x27\x3E\x41\x76\x6F\x69\x64\x20\x72\x61\x63\x65\x20\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x20\x70\x72"
79"\x6F\x62\x6C\x65\x6D\x73\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x42\x3E\x3C\x42\x52\x3E\xA\x3C\x55\x4C\x3E"
80"\xA\x9\x3C\x42\x3E\x20\x57\x68\x61\x74\x20\x69\x73\x20\x72\x61\x63\x65\x20\x63\x6F\x6E\x64\x69\x74\x69"
81"\x6F\x6E\x3F\x3C\x2F\x42\x3E\xA\x9\x9\x3C\x55\x4C\x3E\x41\x20\x72\x61\x63\x65\x20\x63\x6F\x6E\x64\x69"
82"\x74\x69\x6F\x6E\x20\x6F\x63\x63\x75\x72\x73\x20\x77\x68\x65\x6E\x20\x74\x77\x6F\x20\x6F\x72\x20\x6D\x6F"
83"\x72\x65\x20\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E\x73\x20\x6F\x63\x63\x75\x72\x20\x69\x6E\x20\x61\x6E\x20"
84"\xA\x20\x20\x20\x20\x20\x20\x75\x6E\x64\x65\x66\x69\x6E\x65\x64\x20\x6D\x61\x6E\x6E\x65\x72\x20\x28\x4D"
85"\x63\x4B\x75\x73\x69\x63\x6B\x20\x65\x74\x20\x61\x6C\x2E\x20\x31\x39\x39\x36\x29\x2E\x20\x53\x70\x65\x63"
86"\x69\x66\x69\x63\x61\x6C\x6C\x79\x20\x69\x6E\x20\x66\x69\x6C\x65\x20\xA\x20\x20\x20\x20\x20\x20\x73\x79"
87"\x73\x74\x65\x6D\x20\x72\x61\x63\x65\x73\x20\x74\x68\x65\x20\x61\x74\x74\x61\x63\x6B\x65\x72\x20\x61\x74"
88"\x74\x65\x6D\x70\x74\x73\x20\x74\x6F\x20\x63\x68\x61\x6E\x67\x65\x20\x74\x68\x65\x20\x73\x74\x61\x74\x65"
89"\x20\x6F\x66\x20\x74\x68\x65\x20\xA\x20\x20\x20\x20\x20\x20\x66\x69\x6C\x65\x20\x73\x79\x73\x74\x65\x6D"
90"\x20\x69\x6E\x20\x62\x65\x74\x77\x65\x65\x6E\x20\x74\x77\x6F\x20\x66\x69\x6C\x65\x20\x73\x79\x73\x74\x65"
91"\x6D\x20\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E\x73\x20\x6F\x6E\x20\x74\x68\x65\x20\x70\x61\x72\x74\x20\xA"
92"\x20\x20\x20\x20\x20\x20\x6F\x66\x20\x74\x68\x65\x20\x70\x72\x6F\x67\x72\x61\x6D\x2E\x3C\x2F\x55\x4C\x3E"
93"\x3C\x42\x52\x3E\x20\xA\x9\x3C\x42\x3E\x20\x48\x6F\x77\x20\x74\x68\x65\x20\x6C\x69\x62\x20\x64\x65\x74"
94"\x65\x72\x6D\x69\x6E\x65\x20\x74\x65\x6D\x70\x6F\x72\x61\x72\x79\x20\x66\x69\x6C\x65\x20\x6E\x61\x6D\x65"
95"\x3F\x3C\x2F\x42\x3E\xA\x9\x3C\x55\x4C\x3E\x20\xA\x9\x3C\x6C\x69\x3E\x67\x65\x6E\x65\x72\x61\x74\x65"
96"\x20\x66\x69\x6C\x65\x20\x6E\x61\x6D\x65\x20\x28\x6E\x6F\x74\x65\x3A\x20\x6B\x65\x65\x70\x20\x67\x65\x6E"
97"\x65\x72\x61\x74\x69\x6E\x67\x20\x75\x6E\x74\x69\x6C\x20\x69\x74\x20\x64\x6F\x65\x73\x6E\x27\x74\x20\x65"
98"\x78\x69\x73\x74\x73\x29\x3C\x42\x52\x3E\x3C\x2F\x6C\x69\x3E\xA\x9\x3C\x6C\x69\x3E\x63\x68\x65\x63\x6B"
99"\x20\x69\x66\x20\x66\x69\x6C\x65\x20\x65\x78\x69\x73\x74\x73\x3C\x42\x52\x3E\xA\x9\x2D\x3C\x73\x6D\x61"
100"\x6C\x6C\x3E\x61\x74\x74\x61\x63\x6B\x65\x72\x20\x63\x61\x6E\x20\x63\x72\x65\x61\x74\x65\x20\x74\x68\x65"
101"\x20\x66\x69\x6C\x65\x20\x6E\x6F\x77\x2C\x20\x69\x66\x20\x68\x65\x20\x6B\x6E\x6F\x77\x73\x20\x74\x68\x65"
102"\x20\x72\x69\x67\x68\x74\x20\x66\x69\x6C\x65\x6E\x61\x6D\x65\x3C\x2F\x73\x6D\x61\x6C\x6C\x3E\x3C\x42\x52"
103"\x3E\x3C\x2F\x6C\x69\x3E\xA\x9\x3C\x6C\x69\x3E\x63\x68\x65\x63\x6B\x20\x69\x66\x20\x73\x79\x6D\x6C\x69"
104"\x6E\x6B\x20\x65\x78\x69\x73\x74\x73\x3C\x42\x52\x3E\xA\x9\x2D\x3C\x73\x6D\x61\x6C\x6C\x3E\x61\x74\x74"
105"\x61\x63\x6B\x65\x72\x20\x63\x61\x6E\x20\x63\x72\x65\x61\x74\x65\x20\x74\x68\x65\x20\x73\x79\x6D\x6C\x69"
106"\x6E\x6B\x20\x6E\x6F\x77\x2C\x20\x69\x66\x20\x68\x65\x20\x6B\x6E\x6F\x77\x73\x20\x74\x68\x65\x20\x72\x69"
107"\x67\x68\x74\x20\x66\x69\x6C\x65\x6E\x61\x6D\x65\x3C\x2F\x73\x6D\x61\x6C\x6C\x3E\x3C\x42\x52\x3E\x3C\x2F"
108"\x6C\x69\x3E\xA\x9\x3C\x6C\x69\x3E\x63\x72\x65\x61\x74\x65\x20\x74\x68\x65\x20\x66\x69\x6C\x65\x20\x61"
109"\x6E\x64\x20\x72\x65\x64\x69\x72\x65\x63\x74\x20\x73\x74\x64\x6F\x75\x74\x20\x74\x6F\x20\x69\x74\x20\x3C"
110"\x42\x52\x3E\xA\x9\x2D\x3C\x73\x6D\x61\x6C\x6C\x3E\x61\x74\x74\x61\x63\x6B\x65\x72\x20\x63\x61\x6E\x20"
111"\x6F\x70\x65\x6E\x20\x74\x68\x65\x20\x66\x69\x6C\x65\x20\x61\x6E\x64\x20\x77\x72\x69\x74\x65\x20\x74\x6F"
112"\x20\x69\x74\x3C\x2F\x73\x6D\x61\x6C\x6C\x3E\x3C\x42\x52\x3E\x3C\x2F\x6C\x69\x3E\xA\x9\x3C\x6C\x69\x3E"
113"\x70\x6C\x61\x63\x65\x73\x20\x61\x20\x6C\x6F\x63\x6B\x20\x69\x6E\x74\x6F\x20\x66\x69\x6C\x65\x20\x28\x6E"
114"\x6F\x74\x65\x3A\x20\x6E\x6F\x74\x20\x69\x6E\x20\x77\x69\x6E\x39\x38\x29\x3C\x42\x52\x3E\x20\x3C\x2F\x6C"
115"\x69\x3E\xA\x9\x3C\x6C\x69\x3E\x75\x73\x65\x72\x73\x20\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E\x73\x2C\x20"
116"\x77\x72\x69\x74\x65\x2C\x20\x66\x6C\x75\x73\x68\x2C\x20\x72\x65\x61\x64\x3C\x42\x52\x3E\x3C\x2F\x6C\x69"
117"\x3E\xA\x9\x3C\x6C\x69\x3E\x75\x6E\x6C\x69\x6E\x6B\x20\x74\x68\x65\x20\x66\x69\x6C\x65\x6E\x61\x6D\x65"
118"\x20\x66\x72\x6F\x6D\x20\x74\x68\x65\x20\x4F\x53\x3C\x42\x52\x3E\x3C\x2F\x6C\x69\x3E\xA\x9\x3C\x2F\x55"
119"\x4C\x3E\x3C\x42\x52\x3E\xA\x9\xA\x9\xA\x9\x6C\x69\x62\x77\x65\x62\x73\x65\x72\x76\x65\x72\x20\x75"
120"\x73\x65\x73\x20\x74\x65\x6D\x70\x6F\x72\x61\x72\x79\x20\x66\x69\x6C\x65\x6E\x61\x6D\x65\x73\x20\x74\x6F"
121"\x20\x68\x6F\x6C\x64\x20\x61\x6E\x64\x20\x70\x72\x6F\x63\x65\x73\x73\x20\x64\x61\x74\x61\x20\x62\x65\x66"
122"\x6F\x72\x65\x20\x73\x65\x6E\x64\x20\x69\x74\x20\x74\x6F\x20\x63\x6C\x69\x65\x6E\x74\x2C\x20\x69\x74\x20"
123"\x75\x73\x65\x73\x20\x74\x68\x65\x20\x61\x6D\x62\x69\x65\x6E\x74\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x73"
124"\x20\x74\x6F\x20\xA\x9\x64\x65\x74\x65\x72\x6D\x69\x6E\x65\x20\x74\x65\x6D\x70\x6F\x72\x61\x72\x79\x20"
125"\x64\x69\x72\x65\x63\x74\x6F\x72\x79\x20\x62\x79\x20\x66\x6F\x6C\x6C\x6F\x77\x69\x6E\x67\x20\x6F\x72\x64"
126"\x65\x72\x20\x22\x24\x54\x45\x4D\x50\x2C\x24\x54\x4D\x50\x2C\x24\x54\x4D\x50\x44\x49\x52\x20\x61\x6E\x64"
127"\x20\x74\x68\x65\x20\x73\x74\x64\x69\x6F\x2E\x68\x20\x50\x5F\x74\x6D\x70\x64\x69\x72\x22\x2C\x20\x6C\x69"
128"\x62\x77\x65\x62\x73\x65\x72\x76\x65\x72\x20\x68\x61\x76\x65\x20\x73\x65\x76\x65\x72\x61\x6C\x20\x63\x68"
129"\x65\x63\x6B\x73\xA\x9\x61\x6E\x64\x20\x69\x74\x20\x6C\x6F\x63\x6B\x73\x20\x66\x69\x6C\x65\x20\x66\x6F"
130"\x72\x20\x61\x76\x6F\x69\x64\x20\x61\x74\x74\x61\x63\x6B\x65\x72\x73\x20\x66\x72\x6F\x6D\x20\x6D\x65\x73"
131"\x73\x69\x6E\x67\x20\x77\x69\x74\x68\x20\x74\x65\x6D\x70\x6F\x72\x61\x72\x79\x20\x66\x69\x6C\x65\x73\x2C"
132"\x20\x6D\x65\x61\x6E\x77\x68\x69\x6C\x65\x20\x69\x73\x20\x73\x61\x66\x65\x6C\x79\x20\x74\x6F\x20\x63\x68"
133"\x61\x6E\x67\x65\x20\x74\x68\x65\x20\x74\x65\x6D\x70\x64\x69\x72\x20\x28\x73\x65\x74\x74\x69\x6E\x67\x20"
134"\x74\x68\x65\x20\x61\x6D\x62\x69\x65\x6E\x74\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x29\xA\x9\x74\x6F\x20"
135"\x61\x6E\x20\x64\x69\x72\x65\x63\x74\x6F\x72\x79\x20\x74\x68\x61\x74\x20\x69\x73\x20\x6E\x6F\x74\x20\x77"
136"\x72\x69\x74\x61\x62\x6C\x65\x20\x66\x6F\x72\x20\x65\x76\x65\x72\x79\x6F\x6E\x65\x20\x61\x6E\x64\x20\x77"
137"\x72\x69\x74\x61\x62\x6C\x65\x20\x74\x6F\x20\x6C\x69\x62\x20\x28\x73\x65\x74\x65\x6E\x76\x28\x22\x54\x45"
138"\x4D\x50\x22\x2C\x22\x2F\x73\x61\x66\x65\x64\x69\x72\x22\x29\x3B\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x64"
139"\x6F\x20\x69\x74\x20\x62\x65\x66\x6F\x72\x65\x20\x74\x68\x65\x20\x77\x65\x62\x5F\x73\x65\x72\x76\x65\x72"
140"\x5F\x72\x75\x6E\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\xA\xA\x9\xA\xA\x3C\x2F\x55\x4C\x3E\xA\xA\xA"
141"\xA";
142
143#endif
diff --git a/contrib/tools/checkpid b/contrib/tools/checkpid
new file mode 100644
index 00000000..d5d4835c
--- /dev/null
+++ b/contrib/tools/checkpid
@@ -0,0 +1,4 @@
1
2echo "checking pid $1";
3
4while true; do echo -e "\33[2J\33[0;0H";cat /proc/$1/status ;done
diff --git a/contrib/tools/data2header.c b/contrib/tools/data2header.c
new file mode 100644
index 00000000..885a5a7b
--- /dev/null
+++ b/contrib/tools/data2header.c
@@ -0,0 +1,41 @@
1/*
2 * by Luis Figueiredo (stdio@netc.pt)
3 */
4#include <stdio.h>
5#include <fcntl.h>
6#include <stdlib.h>
7#include <string.h>
8#ifdef WIN32
9#include <io.h>
10#endif
11
12
13
14int main(int argc, char *argv[]) { // Johannes E. Schindelin
15 unsigned char ch;
16 char *vn;
17 unsigned int i=0;
18 if(argc<2) {
19 fprintf(stderr,"Need a name for VAR\n");
20 exit(1); // Johannes E. Schindelin
21 };
22 vn=malloc(strlen(argv[1])+1);
23 for(i=0;i<strlen(argv[1]);i++)vn[i]=toupper(argv[1][i]);
24 vn[i]='\0';
25 printf("/*\n * by data2header by Luis Figueiredo (stdio@netc.pt)\n */\n");
26 printf("#ifndef _%s_H_\n",vn);
27 printf("#define _%s_H_\n\n",vn);
28 free(vn);
29 i=0;
30 printf("char %s[]=\"",argv[1]);
31 while(read(0,&ch,1)) {
32 i++;if(i>25){i=0;printf("\"\n\"");};
33 printf("\\x%X",ch);
34 };
35 printf("\";\n\n");
36 printf("#endif\n");
37 return 0; // Johannes E. Schindelin
38};
39
40
41
diff --git a/contrib/tools/httptest.pl b/contrib/tools/httptest.pl
new file mode 100644
index 00000000..23360d28
--- /dev/null
+++ b/contrib/tools/httptest.pl
@@ -0,0 +1,195 @@
1#!/usr/bin/perl
2
3
4
5use Socket;
6sub newdata {
7 #my $self = shift;
8 my ($nfound,$timeout,$rin,$rout)=(0,0.2,"");
9 vec($rin,fileno(shift()),1)=1;
10 $nfound=select($rout=$rin,undef,undef,$timeout);
11 return $nfound;
12};
13
14
15my $host = shift;
16my $port = shift || 80;
17print "\n\tWARNING: If program exit before msg that's mean that the server crashed or something happened to server\n\n";
18$saddr=sockaddr_in($port,inet_aton($host));
19$SIG{PIPE}=NULL;
20
21
22socket(SOCK,AF_INET,SOCK_STREAM,6) or print "Died";
23print "a normal connection\n";
24<STDIN>;
25connect(SOCK,$saddr) or exit;
26print "Connected\n";
27$header="GET / HTTP/1.0\r\nConnection: Keep-Alive\r\nUser-Agent: Mozilla/4.73 [en] (X11; U; Linux 2.4.12 i686)\r\nHost: localhost:81\r\nAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*\r\nAccept-Encoding: gzip\r\nAccept-Language: en\r\nAccept-Charset: iso-8859-1,*,utf-8\r\n\r\n";
28syswrite(SOCK,"$header");
29$keep=1;
30while($keep) {
31 if(newdata(SOCK)) {
32 if(($data=<SOCK>)) {
33 print "Read: ".$data;
34 }else {
35 $keep=0;
36 };
37 };
38};
39close(SOCK);
40
41
42
43socket(SOCK,AF_INET,SOCK_STREAM,6) or exit;
44print "Trying to send (nothing) press (enter) to continue\n";
45<STDIN>;
46connect(SOCK,$saddr) or exit;
47print "Connected\n";
48$header="";
49syswrite(SOCK,"$header");
50$keep=1;
51while($keep) {
52 if(newdata(SOCK)) {
53 if(($data=<SOCK>)) {
54 print "Read: ".$data;
55 }else {
56 $keep=0;
57 };
58 };
59};
60close(SOCK);
61
62
63socket(SOCK,AF_INET,SOCK_STREAM,6) or print "Died";
64print "a post (foo)value with 10000000 bytes press (enter) to continue\n";
65<STDIN>;
66connect(SOCK,$saddr) or exit;
67print "Connected\n";
68$header="POST / HTTP/1.0\r\nConnection: Keep-Alive\r\nUser-Agent: Mozilla/4.73 [en] (X11; U; Linux 2.4.12 i686)\r\nHost: localhost:81\r\nAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*\r\nAccept-Encoding: gzip\r\nAccept-Language: en\r\nAccept-Charset: iso-8859-1,*,utf-8\r\n\r\ndev=".("a"x1000000)."&teste=1\r\n\r\n"; #big values
69syswrite(SOCK,"$header");
70$keep=1;
71while($keep) {
72 if(newdata(SOCK)) {
73 if(($data=<SOCK>)) {
74 print "Read: ".$data;
75 }else {
76 $keep=0;
77 };
78 };
79};
80close(SOCK);
81
82socket(SOCK,AF_INET,SOCK_STREAM,6) or exit;
83print "Trying to send a big data for ClientInfo\n";
84<STDIN>;
85connect(SOCK,$saddr) or exit;
86print "Connected\n";
87$header="GET / HTTP/1.0\r\nConnection: Keep-Alive\r\nUser-Agent: Mozilla/4.73 [en] (X11; U; Linux 2.4.12 i686)\r\nHost: localhost:81\r\nAccept: ".("a"x1000000)."\r\nAccept-Encoding: gzip\r\nAccept-Language: en\r\nAccept-Charset: iso-8859-1,*,utf-8\r\n\r\n";
88syswrite(SOCK,"$header");
89$keep=1;
90while($keep) {
91 if(newdata(SOCK)) {
92 if(($data=<SOCK>)) {
93 print "Read: ".$data;
94 }else {
95 $keep=0;
96 };
97 };
98};
99close(SOCK);
100
101socket(SOCK,AF_INET,SOCK_STREAM,6) or exit;
102print "Change method by a big name\n";
103<STDIN>;
104connect(SOCK,$saddr) or exit;
105print "Connected\n";
106$header=("a"x1000000)." / HTTP/1.0\r\nConnection: Keep-Alive\r\nUser-Agent: Mozilla/4.73 [en] (X11; U; Linux 2.4.12 i686)\r\nAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*\r\nAccept-Encoding: gzip\r\nAccept-Language: en\r\nAccept-Charset: iso-8859-1,*,utf-8\r\n\r\n";
107syswrite(SOCK,"$header");
108$keep=1;
109while($keep) {
110 if(newdata(SOCK)) {
111 if(($data=<SOCK>)) {
112 print "Read: ".$data;
113 }else {
114 $keep=0;
115 };
116 };
117};
118close(SOCK);
119
120socket(SOCK,AF_INET,SOCK_STREAM,6) or exit;
121print "big query value\n";
122<STDIN>;
123connect(SOCK,$saddr) or exit;
124print "Connected\n";
125$header="GET /?teste=".("a"x1000000)." / HTTP/1.0\r\nConnection: Keep-Alive\r\nUser-Agent: Mozilla/4.73 [en] (X11; U; Linux 2.4.12 i686)\r\nAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*\r\nAccept-Encoding: gzip\r\nAccept-Language: en\r\nAccept-Charset: iso-8859-1,*,utf-8\r\n\r\n";
126syswrite(SOCK,"$header");
127$keep=1;
128while($keep) {
129 if(newdata(SOCK)) {
130 if(($data=<SOCK>)) {
131 print "Read: ".$data;
132 }else {
133 $keep=0;
134 };
135 };
136};
137close(SOCK);
138
139socket(SOCK,AF_INET,SOCK_STREAM,6) or exit;
140print "requestname filled w 0's\n";
141<STDIN>;
142connect(SOCK,$saddr) or exit;
143print "Connected\n";
144$header="GET /".("\0"x1000000)." HTTP/1.0\r\nConnection: Keep-Alive\r\nUser-Agent: Mozilla/4.73 [en] (X11; U; Linux 2.4.12 i686)\r\nAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*\r\nAccept-Encoding: gzip\r\nAccept-Language: en\r\nAccept-Charset: iso-8859-1,*,utf-8\r\n\r\n";
145syswrite(SOCK,"$header");
146$keep=1;
147while($keep) {
148 if(newdata(SOCK)) {
149 if(($data=<SOCK>)) {
150 print "Read: ".$data;
151 }else {
152 $keep=0;
153 };
154 };
155};
156close(SOCK);
157
158socket(SOCK,AF_INET,SOCK_STREAM,6) or exit;
159print "query filled w 0's\n";
160<STDIN>;
161connect(SOCK,$saddr) or exit;
162print "Connected\n";
163$header="GET /teste?teste=".("\0"x1000000)." HTTP/1.0\r\nConnection: Keep-Alive\r\nUser-Agent: Mozilla/4.73 [en] (X11; U; Linux 2.4.12 i686)\r\nAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*\r\nAccept-Encoding: gzip\r\nAccept-Language: en\r\nAccept-Charset: iso-8859-1,*,utf-8\r\n\r\n";
164syswrite(SOCK,"$header");
165$keep=1;
166while($keep) {
167 if(newdata(SOCK)) {
168 if(($data=<SOCK>)) {
169 print "Read: ".$data;
170 }else {
171 $keep=0;
172 };
173 };
174};
175close(SOCK);
176
177socket(SOCK,AF_INET,SOCK_STREAM,6) or print "Died";
178print "a post (foo)value with 10000000 bytes press (enter) to continue\n";
179<STDIN>;
180connect(SOCK,$saddr) or exit;
181print "Connected\n";
182$header="POST / HTTP/1.0\r\nConnection: Keep-Alive\r\nUser-Agent: Mozilla/4.73 [en] (X11; U; Linux 2.4.12 i686)\r\nHost: localhost:81\r\nAccept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*\r\nAccept-Encoding: gzip\r\nAccept-Language: en\r\nAccept-Charset: iso-8859-1,*,utf-8\r\n\r\ndev=teste".("\0"x1000000)."&teste=1\r\n\r\n"; #big values
183syswrite(SOCK,"$header");
184$keep=1;
185while($keep) {
186 if(newdata(SOCK)) {
187 if(($data=<SOCK>)) {
188 print "Read: ".$data;
189 }else {
190 $keep=0;
191 };
192 };
193};
194
195print "--------- END --------\n"
diff --git a/contrib/tools/myvc_install.bat b/contrib/tools/myvc_install.bat
new file mode 100644
index 00000000..9de7ccb3
--- /dev/null
+++ b/contrib/tools/myvc_install.bat
@@ -0,0 +1 @@
copy ..\bin\libwebserver.lib "C:\Programas\Microsoft Visual Studio\VC98\Lib\libwebserver.lib"
diff --git a/contrib/tools/win2unix.sh b/contrib/tools/win2unix.sh
new file mode 100755
index 00000000..177bd27b
--- /dev/null
+++ b/contrib/tools/win2unix.sh
@@ -0,0 +1,2 @@
1#!/bin/sh
2for i in `find . -name "*" -xtype f`; do echo "Messing with $i";cat $i |tr -d \\r >.1; mv .1 $i ; done
diff --git a/doc/examples.html b/doc/examples.html
new file mode 100644
index 00000000..5cd8bbfe
--- /dev/null
+++ b/doc/examples.html
@@ -0,0 +1,445 @@
1<center><H3><font color='007700'>libwebserver examples</font></H3></center><BR><BR>
2
3<!-- Johannes E. Schindelin -->
4<center><A name=helloworld><B><font color='000077'><a href=/hello><H3>Hello World</H3></a></font></B></center>
5<small> <B>used functions:</B><BR>
6<a href='/?help=functions#web_server_init'>web_server_init</a><BR>
7<a href='/?help=functions#web_server_addhandler'>web_server_addhandler</a><BR>
8<a href='/?help=functions#web_server_run'>web_server_run</a><BR>
9</small><BR>
10
11This example starts the server with one handler for all requests pointing to hello_world()
12that prints the content-type with the end of the header "\r\n\r\n" and one simple printf with Hello world<BR><BR>
13
14<TABLE width='100%' bgcolor='CFCFCF' border=0><TR><TD>
15<CODE><PRE>
16#include "web_server.h"
17#include &lt;stdio.h&gt;
18
19
20void hello_world() {
21 printf("Content-type: text/plain\r\n\r\n");
22 printf("Hello, World!\r\n");
23}
24
25int main(int argc,char** argv) {
26 struct web_server server; // server handler
27 if(!web_server_init(&server,80,"help.log",0)) { // initialize and start the server at port 80, logging to help.log
28 fprintf(stderr,"can't open listen socket\n");
29 return 1;
30 };
31
32 web_server_addhandler(&server,"* *",hello_world,0); // add handler for all requests
33 while(1) {
34 web_server_run(&server); // run server
35 };
36}
37</PRE></CODE>
38</TD></TR></TABLE>
39<HR><BR>
40
41<center><A name=logfile><B><font color='000077'><a href='/log'><H3>logfile</H3></a></font></B></center>
42<small> <B>used functions:</B><BR>
43<a href='/?help=functions#web_server_init'>web_server_init</a><BR>
44<a href='/?help=functions#web_server_addhandler'>web_server_addhandler</a><BR>
45<a href='/?help=functions#web_server_run'>web_server_run</a><BR>
46<a href='/?help=functions#web_client_addfile'>web_client_addfile</a><BR>
47</small><BR>
48
49This example uses the function <a href='/?help=functions#web_client_addfile'>web_client_addfile</a> to send a file to client
50<BR><BR>
51<TABLE width='100%' bgcolor='CFCFCF' border=0><TR><TD>
52<CODE><PRE>
53#include "web_server.h"
54#include &lt;stdio.h&gt;
55
56void logfile() {
57 printf("Content-type: text/plain\r\n\r\n");
58 web_client_addfile(server.logfile); // add help.log file to output
59 printf("End of log\n");
60};
61
62
63main() {
64 struct web_server server; // server handler
65 if(!web_server_init(&server,82,"help.log",0)) { // initializate
66 fprintf(stderr,"can't open listen socket\n");
67 };
68
69 web_server_addhandler(&server,"* /log",logfile,0); // add handler for http://host/log requests
70 while(1) {
71 web_server_run(&server); // run server
72 };
73};
74</PRE></CODE>
75</TD></TR></TABLE>
76<HR><BR>
77
78
79<center><A name=imageup><B><font color='000077'><a href='/image'><H3>Image Uploader</H3></a></font></B></center>
80<small> <B>used functions:</B><BR>
81<a href='/?help=functions#web_server_init'>web_server_init</a><BR>
82<a href='/?help=functions#web_server_addhandler'>web_server_addhandler</a><BR>
83<a href='/?help=functions#web_server_run'>web_server_run</a><BR>
84<a href='/?help=functions#clientinfo'>ClientInfo</a><BR>
85</small><BR>
86
87
88This example uses the struct <a href='/?help=functions#clientinfo'>ClientInfo</a> for fetching the input from the client
89using the Query("img") to send the image <BR>
90and multipart for fetching the uploaded file<BR>
91
92
93<BR><BR>
94<TABLE width='100%' bgcolor='CFCFCF' border=0><TR><TD>
95<CODE><PRE>
96#include "web_server.h"
97
98#include &lt;stdlib.h&gt;
99
100struct image {
101 char *data;
102 size_t size;
103} image={NULL,0};
104
105void imageout() {
106 if(strlen(ClientInfo->Query("img"))) {
107 if(image.data!=NULL) {
108 printf("Content-type: image/jpeg\r\n\r\n");
109 fwrite(image.data,image.size,1,stdout);
110 };
111 return;
112 };
113 printf("Content-type: text/html\r\n\r\n");
114 printf("&lt;HTML&gt;\n");
115 printf("&lt;BODY bgcolor='EFEFEF'&gt;\n");
116 printf("&lt;form action='/' enctype='multipart/form-data'&gt;\n");
117 printf("&lt;input type=file name=image&gt;&lt;BR&gt;\n");
118 printf("&lt;/form&gt;\n");
119 if(strlen(ClientInfo->MultiPart("image").data)) {
120 printf("%s&lt;BR&gt;&lt;img src='/?img=%s.jpg'&gt;\n",ClientInfo->MultiPart("image").filename,ClientInfo->MultiPart("image").filename);
121 free(image.data);
122 image.data=malloc(ClientInfo->MultiPart("image").size+1);
123 memcpy(image.data,ClientInfo->MultiPart("image").data,ClientInfo->MultiPart("image").size);
124 image.size=ClientInfo->MultiPart("image").size;
125 }else {
126 free(image.data);
127 image.data=NULL;
128 };
129 printf("&lt;/BODY&gt;\n");
130 printf("&lt;/HTML&gt;\n");
131};
132
133
134
135main() {
136 struct web_server server;
137 if(!web_server_init(&server,80,"teste.log",0)) {
138 fprintf(stderr,"can't open listen socket\n");
139 };
140 web_server_addhandler(&server,"* /",imageout,0);
141 while(1) {
142 web_server_run(&server);
143 };
144};
145</PRE></CODE>
146</TD></TR></TABLE>
147<HR><BR>
148
149
150<center><A name=auth><B><font color='000077'><a href='/auth'><H3>Authentication</H3></a> </font></B></center>
151<small> <B>used functions:</B><BR>
152<a href='/?help=functions#web_server_init'>web_server_init</a><BR>
153<a href='/?help=functions#web_server_addhandler'>web_server_addhandler</a><BR>
154<a href='/?help=functions#web_server_run'>web_server_run</a><BR>
155<a href='/?help=functions#web_client_HTTPdirective'>web_client_HTTPdirective</a><BR>
156</small><BR>
157
158Here we're using the <a href='/?help=functions#web_client_HTTPdirective'>web_client_HTTPdirective</a> to set up the server response
159
160<BR><BR>
161user: "username", pass: "password"
162<BR>
163<TABLE width='100%' bgcolor='CFCFCF' border=0><TR><TD>
164<CODE><PRE>
165#include "web_server.h"
166#include &lt;stdio.h&gt;
167#include &lt;string.h&gt;
168
169
170void urlauthenticate() {
171 if(!strlen(ClientInfo->user) || !strlen(ClientInfo->pass) &&
172 strcmp(ClientInfo->user,"username") || strcmp(ClientInfo->pass,"password")) { // you can read things from a auth file
173 web_client_HTTPdirective("HTTP/1.1 401 Authorization Required");
174 printf("WWW-Authenticate: Basic realm=\"This site info\"\r\n");
175 printf("Content-type: text/html\r\n\r\n");
176 printf("&lt;BODY&gt;\n");
177 printf("&lt;font color='FF0000'&gt;Access denied&lt;/font&gt;\n");
178 printf("&lt;/BODY&gt;\n");
179 return;
180 }
181 printf("Content-type: text/html\r\n\r\n");
182 printf("&lt;BODY bgcolor='EFEFEF'&gt;\n");
183 printf("You entered in your area\n");
184 printf("&lt;/BODY&gt;&lt;/HTML&gt;\n");
185};
186
187
188main() {
189 struct web_server server; // server handler
190 if(!web_server_init(&server,83,"help.log",0)) { // initialize
191 fprintf(stderr,"can't open listen socket\n");
192 };
193
194 web_server_addhandler(&server,"* /auth",urlauthenticate,0);
195 while(1) {
196 web_server_run(&server); // run server
197 };
198};
199</PRE></CODE>
200</TD></TR></TABLE>
201<HR><BR>
202
203
204<CENTER><A name=ssl><B><font color='000077'><H3>openssl for (https)</H3></font></B></CENTER>
205<small> <B>used functions:</B><BR>
206<a href='/?help=functions#web_server_HTTPdirective'>web_server_useSSLcert</a><BR>
207<a href='/?help=functions#web_server_init'>web_server_init</a><BR>
208<a href='/?help=functions#web_server_run'>web_server_run</a><BR>
209</small><BR>
210
211Here we setup a server and we use the <a href='/?help=functions#web_server_useSSLcert'>web_server_useSSLcert</a> to use specific certificate file
212and we start the server with the flag WS_USESSL for secure connections (libwebserver compiled w/ openssl)<BR><BR>
213
214See also the packetmounter example in the example directory.
215<BR>
216<TABLE width='100%' bgcolor='CFCFCF' border=0><TR><TD>
217<CODE><PRE>
218
219
220#include "web_server.h"
221
222int main()
223 struct web_server serverssl;
224 web_server_useSSLcert(&serverssl,"foo-cert.pem"); // Certificate file
225 if(!web_server_init(&serverssl,443,"help.log",WS_USESSL)) {
226 fprintf(stderr,"Cannot open port\n");
227 };
228 while(1) {
229 web_server_run(&serverssl);
230 };
231};
232</PRE></CODE>
233</TD></TR></TABLE>
234All the rest is the same as without SSL.
235<HR><BR>
236
237
238<center><A name=outgif><B><font color='000077'><a href='/gif'><H3>Gif generator</H3></a></font></B></center>
239<small> <B>used functions;</B><BR>
240<a href='/?help=functions#web_server_init'>web_server_init</a><BR>
241<a href='/?help=functions#web_server_addhandler'>web_server_addhandler</a><BR>
242<a href='/?help=functions#web_server_run'>web_server_run</a><BR>
243<a href='/?help=functions#web_client_gifsetpalette'>web_client_gifsetpalette</a><BR>
244<a href='/?help=functions#web_client_gifoutput'>web_client_gifoutput</a><BR>
245<a href='/?help=functions#clientinfo'>ClientInfo</a><BR>
246</small><BR>
247
248This example draws an circle at x,y requested by client, and outputs with function <a href='/?help=functions#web_client_gifoutput'>web_client_gifoutput</a>
249
250
251<BR><BR>
252<TABLE width='100%' bgcolor='CFCFCF' border=0><TR><TD>
253<CODE><PRE>
254#include "web_server.h"
255#include &lt;stdio.h&gt;
256#include &lt;math.h&gt;
257
258
259#define GIFSIDE 320
260char gifdata[GIFSIDE*GIFSIDE];
261void outgif() {
262 float i;
263 int x,y,xc,yc;
264 int color;
265 web_client_gifsetpalette("EGA");
266 if(*ClientInfo->Query("img")!=0) {
267 printf("Content-type: image/gif\r\n\r\n");
268 if(!strcmp(ClientInfo->Query("img"),"circle")) {
269 xc=atoi(ClientInfo->Query("x"))%GIFSIDE;
270 yc=atoi(ClientInfo->Query("y"))%GIFSIDE;
271 color=(rand()%15)+1;
272 for(i=0;i<6.28;i+=0.01) {
273 x=(int)(GIFSIDE+(xc+cos(i)*10))%GIFSIDE;
274 y=(int)(GIFSIDE+(yc+sin(i)*10))%GIFSIDE;
275 gifdata[x+(y*GIFSIDE)]=color;
276 };
277 };
278 web_client_gifoutput(gifdata,GIFSIDE,GIFSIDE);
279 };
280 printf("&lt;center&gt;Generated a circle (click inside the image)&lt;BR&gt;\n");
281 printf("Pressed x=%s,y=%s&lt;BR&gt;\n",ClientInfo->Query("x"),ClientInfo->Query("y"));
282 printf("&lt;form&gt;&lt;input type=image border=0 src='/gif?img=circle&x=%s&y=%s'&gt;&lt;/form&gt;&lt;/CENTER&gt;\n",ClientInfo->Query("x"),ClientInfo->Query("y"));
283};
284
285
286main() {
287 struct web_server server; // server handler
288 memset(gifdata,0,GIFSIDE*GIFSIDE);
289 if(!web_server_init(&server,83,"help.log",0)) { // initialize
290 fprintf(stderr,"can't open listen socket\n");
291 };
292
293 web_server_addhandler(&server,"* /gif",outgif,0);
294 while(1) {
295 web_server_run(&server); // run server
296 };
297};
298</PRE></CODE>
299</TD></TR></TABLE>
300<HR><BR>
301
302
303
304<CENTER><A name=cookie><B><font color='000077'><a href=/cookie><H3>Cookies</H3></a></font></B></CENTER>
305<small> <B>used functions;</B><BR>
306<a href='/?help=functions#web_server_init'>web_server_init</a><BR>
307<a href='/?help=functions#web_server_addhandler'>web_server_addhandler</a><BR>
308<a href='/?help=functions#web_server_run'>web_server_run</a><BR>
309<a href='/?help=functions#clientinfo'>ClientInfo</a><BR>
310<a href='/?help=functions#web_client_setcookie'>web_client_setcookie</a><BR>
311</small><BR>
312
313This example fetchs an client input and set's an cookie for 15 minutes "+15M" using function <a href='/?help=functions#web_client_setcookie'>web_client_setcookie</a>
314
315<BR><BR>
316<TABLE width='100%' bgcolor='CFCFCF' border=0><TR><TD>
317<CODE><PRE>
318#include "web_server.h"
319#include &lt;stdio.h&gt;
320
321
322void cookie() {
323 if(strlen(ClientInfo->Post("user")))
324 web_client_setcookie("username",ClientInfo->Post("user"),"+15M");
325 printf("Content-type: text/html\r\n\r\n");
326 printf("&lt;form method='POST'&gt;\r\n");
327 printf("&lt;input type='text' name='user' value='%s'&gt;\r\n&lt;BR&gt;",ClientInfo->Cookie("username"));
328 printf("&lt;input type='submit' name='send' value=' GO! '&gt;\r\n&lt;BR&gt;");
329 printf("&lt;/form&gt;\r\n");
330}
331
332int main(int argc,char** argv) {
333 struct web_server server; // server handler
334 if(!web_server_init(&server,80,"help.log",0)) { // initialize
335 fprintf(stderr,"can't open listen socket\n");
336 return 1;
337 };
338
339 web_server_addhandler(&server,"* /*",cookie,0); // add handler for all requests
340 while(1) {
341 web_server_run(&server); // run server
342 };
343}
344
345</PRE></CODE>
346</TD></TR></TABLE>
347<HR><BR>
348
349<center><A name=checkbox><B><font color='000077'><a href=/checkbox><H3>Checkbox</H3></a></font></B></center>
350<small> <B>used functions;</B><BR>
351<a href='/?help=functions#web_server_init'>web_server_init</a><BR>
352<a href='/?help=functions#web_server_addhandler'>web_server_addhandler</a><BR>
353<a href='/?help=functions#web_server_run'>web_server_run</a><BR>
354<a href='/?help=functions#clientinfo'>ClientInfo</a><BR>
355</small><BR>
356
357This example uses a especific case from <a href='/?help=functions#clientinfo'>ClientInfo</a> query and post, using the '#' as prefix of varname returning the number of occurences
358
359
360<BR><BR>
361<TABLE width='100%' bgcolor='CFCFCF' border=0><TR><TD>
362<CODE><PRE>
363
364#include "web_server.h"
365#include &lt;stdio.h&gt;
366
367
368void checkbox() {
369 int i=0;
370 char *txt[]={"one","two","three","four","five"};
371 printf("Content-type: text/html\r\n\r\n");
372 printf("&lt;form method='QUERY'&gt;\r\n");
373
374 for(i=0;i<5;i++) {
375 printf("&lt;input type='checkbox' name='number' value='%s'&gt;\r\n&lt;BR&gt;",txt[i]);
376 };
377 printf("&lt;input type='submit' name='send' value=' SEND '&gt;\r\n&lt;BR&gt;");
378 printf("&lt;/form&gt;\r\n");
379
380 printf("You have choosen &lt;font color='FF0000'&gt;%d&lt;/font&gt; numbers: \r\n",ClientInfo->Query("#number"));
381 for(i=0;i&lt;ClientInfo->Query("#number");i++) {
382 printf("&lt;b>%s&lt;/b&gt;,\r\n\r\n",ClientInfo->Query("number"));
383 };
384 printf("...&lt;BR&gt;\r\n\r\n");
385
386}
387int main(int argc,char** argv) {
388 struct web_server server; // server handler
389 if(!web_server_init(&server,80,"help.log",0)) { // initialize
390 fprintf(stderr,"can't open listen socket\n");
391 return 1;
392 };
393
394 web_server_addhandler(&server,"* /*",checkbox,0); // add handler for all requests
395 while(1) {
396 web_server_run(&server); // run server
397 };
398}
399
400</PRE></CODE>
401</TD></TR></TABLE>
402<HR><BR>
403
404<center><A name=confexample><B><font color='000077'><a href=/confexample><H3>Config example</H3></a></font></B></center>
405<small> <B>used functions;</B><BR>
406<a href='/?help=functions#web_server_init'>web_server_init</a><BR>
407<a href='/?help=functions#web_server_addhandler'>web_server_addhandler</a><BR>
408<a href='/?help=functions#web_server_run'>web_server_run</a><BR>
409<a href='/?help=functions#web_client_addfile'>web_client_addfile</a><BR>
410<a href='/?help=functions#clientinfo'>ClientInfo</a><BR>
411</small><BR>
412
413
414<BR><BR>
415<TABLE width='100%' bgcolor='CFCFCF' border=0><TR><TD>
416<CODE><PRE>
417#include "web_server.h"
418#include &lt;stdio.h&gt;
419
420
421void confexample() {
422 printf("Content-type: text/html\r\n\r\n");
423 printf("&lt;PRE&gt;");
424 web_client_addfile(server.conffile); // add help.cfg file to output
425 printf("&lt;/PRE&gt;");
426 printf("ClientInfo->Conf(\"PERSONAL_CONF\",\"PORT\")=%s&lt;BR&gt;\n",ClientInfo->Conf("PERSONAL_CONF","PORT"));
427 printf("ClientInfo->Conf(\"PERSONAL_CONF\",\"IP\")=%s&lt;BR&gt;\n",ClientInfo->Conf("PERSONAL_CONF","IP"));
428 printf("ClientInfo->Conf(\"LIBWEBSERVER\",\"PORT\")=%s&lt;BR&gt;\n",ClientInfo->Conf("LIBWEBSERVER","PORT"));
429
430}
431
432int main(int argc,char** argv) {
433 struct web_server server; // server handler
434 if(!web_server_init(&server,80,"help.cfg",WS_USEEXTCONF)) { // initialize
435 fprintf(stderr,"can't open listen socket\n");
436 return 1;
437 };
438
439 web_server_addhandler(&server,"* *",confexample,0); // add handler for all requests
440 while(1) {
441 web_server_run(&server); // run server
442 };
443}
444</PRE></CODE>
445</TD></TR></TABLE> \ No newline at end of file
diff --git a/doc/examples/SoundRecorder/include/debug.h b/doc/examples/SoundRecorder/include/debug.h
new file mode 100644
index 00000000..4863d578
--- /dev/null
+++ b/doc/examples/SoundRecorder/include/debug.h
@@ -0,0 +1,24 @@
1/* by Luis Figueiredo (stdio@netc.pt)
2 *
3 *
4 * date: Sat Mar 30 14:16:05 GMT 2002
5 *
6 * DEBUG macros
7 *
8 */
9
10#ifndef _DEBUG_H_
11#define _DEBUG_H_
12
13#ifdef HAVE_CONFIG_H
14#include "config.h"
15#endif
16
17#ifdef DEBUG
18 #define IFDEBUG(x) x
19#else
20 #define IFDEBUG(x)
21#endif
22
23
24#endif
diff --git a/doc/examples/SoundRecorder/include/soundbuffers.h b/doc/examples/SoundRecorder/include/soundbuffers.h
new file mode 100644
index 00000000..6624b21b
--- /dev/null
+++ b/doc/examples/SoundRecorder/include/soundbuffers.h
@@ -0,0 +1,39 @@
1/* by Luis Figueiredo (stdio@netc.pt)
2 *
3 * file: sound_buffers.h
4 *
5 * description: Holds sound data structures and functions
6 *
7 * date: 13:14,29-14-2002
8 */
9
10#ifndef _SOUND_BUFFERS_H_
11#define _SOUND_BUFFERS_H_
12
13#include <stdio.h>
14#include <fcntl.h>
15#include <stdlib.h>
16#include <string.h>
17
18struct sound_buf {
19 char *id;
20 unsigned char *data;
21 unsigned int data_i;
22 unsigned int play_i;
23 unsigned int startloop,endloop;
24 unsigned char volume;
25 unsigned char channels;
26 int mode;
27 struct sound_buf *next;
28};
29
30
31struct sound_buf *sbuf_init();
32struct sound_buf *sbuf_add(struct sound_buf *list,char *id);
33struct sound_buf *sbuf_select(struct sound_buf *list,char *id);
34int sbuf_delete(struct sound_buf *list,char *id);
35
36
37
38
39#endif
diff --git a/doc/examples/SoundRecorder/include/soundcard.h b/doc/examples/SoundRecorder/include/soundcard.h
new file mode 100644
index 00000000..272cf904
--- /dev/null
+++ b/doc/examples/SoundRecorder/include/soundcard.h
@@ -0,0 +1,31 @@
1/* by Luis Figueiredo (stdio@netc.pt)
2 *
3 * file: soundcard.h
4 *
5 * description: handlers soundcard setup
6 *
7 * date: 17:00,13-00-2002
8 */
9
10#ifndef _SOUNDCARD_H_
11#define _SOUNDCARD_H_
12
13#include <fcntl.h>
14#include <sys/soundcard.h>
15#include <stdio.h>
16#include <sys/ioctl.h>
17
18#include "debug.h"
19
20struct soundcard_setup {
21 int rate;
22 char channels;
23 int fmt;
24};
25
26int soundcard_init(const char *, struct soundcard_setup *);
27
28
29
30
31#endif
diff --git a/doc/examples/SoundRecorder/include/soundmixer.h b/doc/examples/SoundRecorder/include/soundmixer.h
new file mode 100644
index 00000000..f071a4e0
--- /dev/null
+++ b/doc/examples/SoundRecorder/include/soundmixer.h
@@ -0,0 +1,23 @@
1/* by Luis Figueiredo (stdio@netc.pt)
2 *
3 * file: soundmixer.h
4 *
5 * description: Sound mixer using (soundbuffers.c)
6 *
7 * date: 17:13,13-13-2002
8 */
9
10#ifndef _SOUNDMIXER_H_
11#define _SOUNDMIXER_H_
12
13#include <stdio.h>
14#include <unistd.h>
15
16
17#include "soundbuffers.h"
18
19#define _SDMAX 44100 // quarter second *2 *2
20
21void sound_process(int soundfd,struct sound_buf *list);
22
23#endif
diff --git a/doc/examples/SoundRecorder/src/main.c b/doc/examples/SoundRecorder/src/main.c
new file mode 100644
index 00000000..f1967da6
--- /dev/null
+++ b/doc/examples/SoundRecorder/src/main.c
@@ -0,0 +1,296 @@
1/* by Luis Figueiredo (stdio@netc.pt)
2 *
3 * file: main.c
4 *
5 * description: Programa main
6 *
7 * date: 16:47,13-47-2002
8 */
9
10
11#include "soundcard.h"
12#include "soundbuffers.h"
13#include "soundmixer.h"
14#include "web_server.h"
15#include <signal.h>
16
17#define ADJUST_VOLUME(s, v) (s = (s*v)/128)
18
19int PORT=80;
20struct sound_buf *SoundBuf;
21
22void outgif() {
23 char *nam;
24 struct sound_buf *sbuf=NULL;
25 char gif[640*40+1];
26 int x=0,y=0;
27 int i,h=20;
28 short d;
29 nam=malloc(strlen(ClientInfo->request)-3);
30 memcpy(nam,ClientInfo->request+1,strlen(ClientInfo->request)-4);
31 nam[strlen(ClientInfo->request)-5]=0;
32 sbuf=sbuf_select(SoundBuf,nam);
33 if(sbuf!=NULL) {
34 if(sbuf->data_i>_SDMAX) {
35 if(gif!=NULL) {
36 memset(gif,0,640*40);
37 for(i=0;i<1280;i++) {
38 x=i/2;
39 //y=(*((unsigned short *)sbuf->data+((i*4)%640))%20)+10;
40 d=((sbuf->data[((i*((sbuf->data_i-1280)/2560))*2)+1]<<8)|sbuf->data[((i*((sbuf->data_i-1280)/2560))*2)]);
41 y=d/(32767/20)+20;
42 //fprintf(stderr,"y=%d\n",y);
43 //gif[x+y*640]=10;
44 if(h>y) {
45 for(h=20;h>y;h--) gif[x+h*640]=10;
46 } else {
47 for(h=20;h<=y;h++) gif[x+h*640]=10;
48 };
49
50 };
51 printf("Cache-control: no-cache\r\n");
52 printf("Content-type: image/gif\r\n\r\n");
53 web_client_gifoutput(gif,640,40,0);
54 };
55 };
56 };
57 free(nam);
58 return;
59};
60void dlbuf() {
61 char *nam;
62 struct sound_buf *sbuf=NULL;
63 nam=malloc(strlen(ClientInfo->request)-3);
64 memcpy(nam,ClientInfo->request+1,strlen(ClientInfo->request)-4);
65 nam[strlen(ClientInfo->request)-5]=0;
66 sbuf=sbuf_select(SoundBuf,nam);
67 printf("Content-type: x-form/application\r\n\r\n");
68 if(sbuf!=NULL) {
69 fwrite(sbuf->data,sbuf->data_i,1,stdout);
70 };
71
72};
73
74void index_html() {
75 struct sound_buf *sbuf=NULL;
76 char *id;
77 char *tmp;
78 int i;
79 unsigned char *soundout=NULL;
80 short src1,src2;
81 int dst_sample;
82 const int max_audioval =((1<<(16-1))-1);
83 const int min_audioval =-(1<<(16-1));
84 int bigger=0;
85
86 printf("Cache-control: no-cache\r\n");
87 printf("Content-type: text/html\r\n\r\n");
88 printf("<HTML>\n");
89 printf("<BODY>\n");
90 printf("<center>Sound Recorder (webgui)</center>\n");
91 if(*ClientInfo->Post("sbufnew")!=0) {
92 if(*ClientInfo->Post("sbufname")!=0) {
93 if(!sbuf_select(SoundBuf,ClientInfo->Post("sbufname"))) {
94 sbuf=sbuf_add(SoundBuf,ClientInfo->Post("sbufname"));
95 if(ClientInfo->MultiPart("sbufdata").size>0) {
96 sbuf->data=malloc(ClientInfo->MultiPart("sbufdata").size);
97 memcpy(sbuf->data,ClientInfo->MultiPart("sbufdata").data,ClientInfo->MultiPart("sbufdata").size);
98 sbuf->data_i=ClientInfo->MultiPart("sbufdata").size;
99 };
100 } else {
101 printf("<FONT color='FF0000'>Sound buffer exists</font>\n");
102 };
103
104 }else {
105 printf("<FONT color='FF0000'>Sound buffer name is empty</font>\n");
106 };
107 };
108 if(*ClientInfo->Post("sbufvol")!=0) {
109 sbuf=SoundBuf->next;
110 while(sbuf!=NULL) {
111 tmp=malloc(strlen(sbuf->id)+5);
112 snprintf(tmp,strlen(sbuf->id)+5,"%s.vol",sbuf->id);
113 sbuf->volume=atoi(ClientInfo->Post(tmp))%129;
114 free(tmp);
115 sbuf=sbuf->next;
116 }
117 };
118 if(*ClientInfo->Post("sbufch")!=0) {
119 sbuf=SoundBuf->next;
120 while(sbuf!=NULL) {
121 tmp=malloc(strlen(sbuf->id)+4);
122 snprintf(tmp,strlen(sbuf->id)+4,"%s.ch",sbuf->id);
123 sbuf->channels=atoi(ClientInfo->Post(tmp))%3;
124 free(tmp);
125 sbuf=sbuf->next;
126 }
127 };
128
129 printf("<form method='POST' enctype='multipart/form-data'>\n");
130
131 printf("Sound Buffer:<BR>\n");
132 printf("Name:<input type=text name='sbufname' size=5 maxlength=10><BR>\n");
133 printf("Data:<input type=file name='sbufdata'><BR>\n");
134 printf("<input type=submit name='sbufnew' value=' New '><BR>\n");
135
136 printf("<table width=100%% cellpadding=2 cellspacing=0 bgcolor='AAAAAA'>\n");
137 printf("<TR><TD colspan=7 align=center><font face='Helvetica' size=6 color='FFFFFF'> Sound Buffers </font></TD></TR>\n");
138 sbuf=SoundBuf->next;
139 i=0;
140 while(sbuf!=NULL) {
141 if(*ClientInfo->Post("sbufprocess")!=0) {
142 if(atoi(ClientInfo->Post(sbuf->id))==5) {
143 sbuf->mode=0;
144 sbuf->play_i=0;
145 if(sbuf->data_i>bigger) {
146 bigger=sbuf->data_i;
147 soundout=realloc(soundout,bigger);
148 };
149 for(i=0;i<sbuf->data_i;i+=4) {
150 // LEFT
151 src1=((sbuf->data[i+1]<<8) | sbuf->data[i]);
152 ADJUST_VOLUME(src1,sbuf->volume);
153 src2=((soundout[i+1]<<8) | soundout[i]);
154 dst_sample=src1+src2;
155 if ( dst_sample > max_audioval ) {
156 dst_sample = max_audioval;
157 } else if ( dst_sample < min_audioval ) {
158 dst_sample = min_audioval;
159 }
160 soundout[i]=dst_sample &0xFF;
161 dst_sample>>=8;
162 soundout[i+1]=dst_sample & 0xFF;
163 // RIGHT
164 src1=((sbuf->data[i+1+2]<<8) | sbuf->data[i+2]);
165 ADJUST_VOLUME(src1,sbuf->volume);
166 if(sbuf->channels==2) {
167 src2=((soundout[i+1+2]<<8) | soundout[i+2]); // join left to right
168 } else {
169 src2=((soundout[i+1]<<8) | soundout[i]); // separate
170 };
171 dst_sample=src1+src2;
172 if ( dst_sample > max_audioval ) {
173 dst_sample = max_audioval;
174 } else if ( dst_sample < min_audioval ) {
175 dst_sample = min_audioval;
176 }
177 soundout[i+2]=dst_sample &0xFF;
178 dst_sample>>=8;
179 soundout[i+2+1]=dst_sample & 0xFF;
180 };
181
182 } else {
183 sbuf->mode=atoi(ClientInfo->Post(sbuf->id));
184 tmp=malloc(strlen(sbuf->id)+5);
185 snprintf(tmp,strlen(sbuf->id)+5,"%s.vol",sbuf->id);
186 sbuf->volume=atoi(ClientInfo->Post(tmp))%129;
187 free(tmp);
188 sbuf->play_i=0;
189 };
190 };
191 if(sbuf->mode!=4) {
192 printf("<TR><TD bgcolor='EFEFEF'><font face='Verdana'>%s</font></TD><TD>",sbuf->id);
193 printf("<select name='%s'>",sbuf->id);
194 printf("<option value='0' %s>none</option>\n",(atoi(ClientInfo->Post(sbuf->id))==0)?"selected":"");
195 printf("<option value='1' %s>play</option>\n",(atoi(ClientInfo->Post(sbuf->id))==1)?"selected":"");
196 printf("<option value='2' %s>record</option>\n",(atoi(ClientInfo->Post(sbuf->id))==2)?"selected":"");
197 printf("<option value='3'>reset</option>\n");
198 printf("<option value='4'>delete</option>\n");
199 printf("<option value='5'>mixfrom</option>\n");
200 printf("<option value='6'>mixto</option>\n");
201 printf("</select>\n");
202 printf("</TD><TD>%dm:%ds</TD>",(sbuf->data_i/44100/2/2)/60,(sbuf->data_i/44100/2/2%60));
203 printf("</TD><TD>\n");
204 printf("<select name='%s.ch'>\n",sbuf->id);
205 printf("<option value='1' %s>Mono</option>\n",(sbuf->channels==1)?"selected":"");
206 printf("<option value='2' %s>Stereo</option>\n",(sbuf->channels==2)?"selected":"");
207 printf("</select></TD>");
208
209 printf("</TD><TD>Volume:<BR>\n");
210 printf("<input type=text name=%s.vol size=3 maxlength=3 value='%d'></TD>",sbuf->id,sbuf->volume);
211 printf("<TD width=100%%> <input type=image width=100%% height=40 src='/%s.gif' border=0></TD>\n",sbuf->id);
212 printf("<TD><a href='/%s.raw'>Download</a></TD></TR>\n",sbuf->id);
213 }
214 if(sbuf->mode==3) {
215 sbuf->data_i=0;
216 sbuf->play_i=0;
217 free(sbuf->data);
218 sbuf->data=NULL;
219 sbuf->mode=0;
220 };
221
222 id=sbuf->id;
223 sbuf=sbuf->next;
224 if(atoi(ClientInfo->Post(id))==4) {
225 sbuf_delete(SoundBuf,id);
226 }
227 i++;
228 };
229 // mix to (6)
230 sbuf=SoundBuf->next;
231 while(sbuf!=NULL) {
232 if(atoi(ClientInfo->Post(sbuf->id))==6) {
233 free(sbuf->data); // free previous
234 sbuf->data=malloc(bigger+1);
235 memcpy(sbuf->data,soundout,bigger);
236 sbuf->data_i=bigger;
237 sbuf->mode=0;
238 sbuf->play_i=0;
239 sbuf->volume=128;
240 };
241 sbuf=sbuf->next;
242 };
243 if(i) printf("<TR><TD align=center valign=center>.</TD><TD><input type=submit name='sbufprocess' value=' Process '></TD><TD align=center valign=center>.</TD><TD><input type=submit name='sbufch' value='Set'></TD><TD><input type=submit name='sbufvol' value='Set'></TD><TD>.</TD><TD>.</TD></TR>\n");
244
245 printf("</TABLE>\n");
246 printf("</form>\n");
247
248
249
250
251
252
253};
254
255
256
257
258
259
260
261
262
263
264int main() {
265 struct web_server server;
266 int soundfd;
267 struct soundcard_setup SoundSetup;
268 signal(SIGPIPE,SIG_IGN);
269
270 SoundBuf=sbuf_init();
271
272
273 SoundSetup.rate=44100;
274 SoundSetup.channels=2;
275 SoundSetup.fmt=16;
276
277 soundfd=soundcard_init("/dev/dsp",&SoundSetup);
278 if(soundfd<1) {
279 return 0;
280 };
281
282
283 while(!web_server_init(&server,PORT,NULL,0))PORT++;
284 printf("http://localhost:%d\n",PORT);
285
286 web_server_addhandler(&server,"* /*.gif",outgif,WS_LOCAL);
287 web_server_addhandler(&server,"* /*.raw",dlbuf,WS_LOCAL);
288 web_server_addhandler(&server,"* /*",index_html,WS_LOCAL);
289
290 while(1) {
291 sound_process(soundfd,SoundBuf);
292 web_server_run(&server);
293 };
294
295
296};
diff --git a/doc/examples/SoundRecorder/src/soundbuffers.c b/doc/examples/SoundRecorder/src/soundbuffers.c
new file mode 100644
index 00000000..de021945
--- /dev/null
+++ b/doc/examples/SoundRecorder/src/soundbuffers.c
@@ -0,0 +1,86 @@
1/* by Luis Figueiredo (stdio@netc.pt)
2 *
3 * file: sound_buffers.c
4 *
5 * description: Sounddata procedures
6 *
7 * date: 13:23,29-23-2002
8 */
9
10#include "soundbuffers.h"
11
12
13/*
14 * init list
15 */
16struct sound_buf *sbuf_init() {
17 struct sound_buf *head;
18 head=malloc(sizeof(struct sound_buf));
19 head->next=NULL;
20 head->data_i=0;
21 head->data=NULL;
22 head->id=NULL;
23 return head;
24};
25
26struct sound_buf *sbuf_select(struct sound_buf *list,char *id) {
27 struct sound_buf *temp=list;
28 while(temp->next!=NULL) {
29 if(temp->next->id!=NULL) {
30 if(!strcmp(temp->next->id,id)) {
31 return temp->next;
32 };
33 };
34 temp=temp->next;
35 };
36 return NULL;
37};
38
39
40/*
41 * next prototipe go to select_buffer
42 */
43struct sound_buf *sbuf_add(struct sound_buf *list,char *id) {
44 struct sound_buf *temp=list;
45 while(temp->next!=NULL) {
46 if(temp->next->id!=NULL) {
47 if(!strcmp(temp->next->id,id)) {
48 return NULL;
49 };
50 temp=temp->next; // Next buffer
51 };
52 };
53 // id is new lets create this buffer
54 temp->next=malloc(sizeof(struct sound_buf));
55 // lets copy the new id
56 temp->next->id=malloc(strlen(id)+1);
57 strncpy(temp->next->id,id,strlen(id));
58 temp->next->id[strlen(id)]=0;
59 // zero the rest;
60 temp->next->data=NULL;
61 temp->next->data_i=0;
62 temp->next->play_i=0;
63 temp->next->mode=0;
64 temp->next->volume=128;
65 temp->next->next=NULL;
66 return temp->next;
67};
68
69int sbuf_delete(struct sound_buf *list,char *id) {
70 struct sound_buf *temp=list;
71 struct sound_buf *t;
72 while(temp->next!=NULL) {
73 if(temp->next->id!=NULL) {
74 if(!strcmp(temp->next->id,id)) {
75 t=temp->next;
76 temp->next=temp->next->next;
77 free(t->data);
78 free(t->id);
79 free(t);
80 return 1;
81 };
82 };
83 temp=temp->next;
84 };
85 return 0;
86};
diff --git a/doc/examples/SoundRecorder/src/soundcard.c b/doc/examples/SoundRecorder/src/soundcard.c
new file mode 100644
index 00000000..14b581b2
--- /dev/null
+++ b/doc/examples/SoundRecorder/src/soundcard.c
@@ -0,0 +1,49 @@
1/* by Luis Figueiredo (stdio@netc.pt)
2 *
3 * file: soundcard.c
4 *
5 * description: handlers soundcard setup
6 *
7 * date: 17:00,13-00-2002
8 */
9
10#include "soundcard.h"
11
12
13
14
15
16
17int soundcard_init(const char *dev, struct soundcard_setup *ss) {
18 int ret;
19 int soundfd;
20 soundfd=open(dev,O_RDWR|O_NONBLOCK);
21 if(soundfd <1) {
22 perror("open");
23 return -1;
24 }
25 IFDEBUG(fprintf(stderr,"soundcard.c: Setting soundcard:\n"));
26 IFDEBUG(fprintf(stderr,"soundcard.c: rate: %d\n",ss->rate));
27 ret=ioctl(soundfd,SNDCTL_DSP_SPEED,&ss->rate);
28 if(ret==-1) {
29 perror("ioctl");
30 return-1 ;
31 };
32 IFDEBUG(fprintf(stderr,"soundcard.c: channels: %d\n",ss->channels));
33 ret=ioctl(soundfd,SNDCTL_DSP_CHANNELS,&ss->channels);
34 if(ret==-1) {
35 perror("ioctl");
36 return -1;
37 };
38 IFDEBUG(fprintf(stderr,"soundcard.c: fmt %d\n",ss->fmt));
39 ret=ioctl(soundfd,SNDCTL_DSP_SETFMT,&ss->fmt);
40 if(ret==-1) {
41 perror("ioctl");
42 return -1;
43 };
44 IFDEBUG(fprintf(stderr,"Sound card setup sucessfull\n"));
45 return soundfd;
46};
47
48
49
diff --git a/doc/examples/SoundRecorder/src/soundmixer.c b/doc/examples/SoundRecorder/src/soundmixer.c
new file mode 100644
index 00000000..4532d06c
--- /dev/null
+++ b/doc/examples/SoundRecorder/src/soundmixer.c
@@ -0,0 +1,104 @@
1/* by Luis Figueiredo (stdio@netc.pt)
2 *
3 * file: soundmixer.c
4 *
5 * description: Sound mixer using (soundbuffers.c)
6 *
7 * date: 17:13,13-13-2002
8 */
9
10
11#include "soundmixer.h"
12
13
14int SDMAX=_SDMAX;
15#define ADJUST_VOLUME(s, v) (s = (s*v)/128)
16
17int soundout_i=-1;
18void sound_process(int soundfd,struct sound_buf *list) {
19 int soundin_i;
20 struct sound_buf *sbuf;
21 unsigned char soundin[_SDMAX+1];
22 unsigned char soundout[_SDMAX+1];
23 int playit=0;
24 int i;
25 short src1,src2;
26 int dst_sample;
27 const int max_audioval =((1<<(16-1))-1);
28 const int min_audioval =-(1<<(16-1));
29 soundin_i=read(soundfd,soundin,_SDMAX);
30 sbuf=list->next;
31 while(sbuf!=NULL) {
32 if(soundin_i>0) {
33 if(sbuf->mode==2) {
34 sbuf->data=realloc(sbuf->data,sbuf->data_i+soundin_i);
35 memcpy(sbuf->data+sbuf->data_i,soundin,soundin_i);
36 sbuf->data_i+=soundin_i;
37 };
38 };
39 if(sbuf->mode==1 && soundout_i==-1) {
40 for(i=0;i<SDMAX && (sbuf->play_i+i)<sbuf->data_i;i+=4) {
41 // LEFT
42 src1=((sbuf->data[sbuf->play_i+i+1]<<8) | sbuf->data[sbuf->play_i+i]);
43 ADJUST_VOLUME(src1,sbuf->volume);
44 src2=((soundout[i+1]<<8) | soundout[i]);
45 dst_sample=src1+src2;
46 if ( dst_sample > max_audioval ) {
47 dst_sample = max_audioval;
48 } else if ( dst_sample < min_audioval ) {
49 dst_sample = min_audioval;
50 }
51 soundout[i]=dst_sample &0xFF;
52 dst_sample>>=8;
53 soundout[i+1]=dst_sample & 0xFF;
54 // RIGHT
55 src1=((sbuf->data[sbuf->play_i+i+1+2]<<8) | sbuf->data[sbuf->play_i+i+2]);
56 ADJUST_VOLUME(src1,sbuf->volume);
57 if(sbuf->channels==2) {
58 src2=((soundout[i+1+2]<<8) | soundout[i+2]); // join left to right
59 } else {
60 src2=((soundout[i+1]<<8) | soundout[i]); // separate
61 };
62 dst_sample=src1+src2;
63 if ( dst_sample > max_audioval ) {
64 dst_sample = max_audioval;
65 } else if ( dst_sample < min_audioval ) {
66 dst_sample = min_audioval;
67 }
68 soundout[i+2]=dst_sample &0xFF;
69 dst_sample>>=8;
70 soundout[i+2+1]=dst_sample & 0xFF;
71
72 };
73 sbuf->play_i+=SDMAX;
74 if(sbuf->play_i>sbuf->data_i){
75 if(sbuf->mode==1) {
76 sbuf->mode=0; // end,stop it
77 }
78 if(sbuf->mode==3) {
79 sbuf->play_i=0;
80 };
81 }
82 playit=1;
83 };
84 sbuf=sbuf->next;// next buffer
85 };
86 if(playit) {
87 soundout_i=0;
88 playit=0;
89 };
90 if(soundout_i<SDMAX && soundout_i!=-1) {
91 i=write(soundfd,soundout+soundout_i,SDMAX-soundout_i);
92 if(i>0) {
93 soundout_i+=i;
94 };
95 } else {
96 memset(soundout,0,SDMAX);
97 soundout_i=-1;
98 };
99
100}
101
102
103
104
diff --git a/doc/examples/cgi-bin/index.cgi b/doc/examples/cgi-bin/index.cgi
new file mode 100644
index 00000000..4f23614b
--- /dev/null
+++ b/doc/examples/cgi-bin/index.cgi
@@ -0,0 +1,1137 @@
1#!/usr/bin/perl
2# Footnet software experimental de football para a net (cgi)... por Luis Figueiredo (stdio@netc.pt)
3#
4#
5#
6
7#use strict;
8my %POST;
9my %QUERY_STRING;
10my %COOKIE;
11my %img;
12my $stdindata;
13my $softversion="Foot ball net V0.5 (alpha)\n";
14
15
16## CONFIG DATABASE
17$dbname="footaid";
18$dbdriver="mysql";
19$dbuser="footaid";
20$dbpass="sqlpass";
21
22
23# convert images to hex strings 'unpack("h*",..);'
24$f1=shift;
25if($f1 eq "--conv") {
26 $file1 = shift;
27 open($ff,"< $file1") or die "Cannot find file $file1\n";
28 while(<$ff>) {
29 $data.=$_;
30 };
31 $newdata=unpack("h*",$data);
32 print $newdata;
33 exit;
34};
35if($f1 eq "--initdb") {
36 print "Will create on database $dbname\n";
37 $db=DBI->connect("dbi:$dbdriver:dbname=$dbname","$dbuser","$dbpass");
38 $db->do("create table userinfo (userid varchar(14) unique not null,password varchar(14),nome varchar(32),email varchar(160),phone varchar(13),lid integer,lldate integer default '0')");
39 $db->do("create table msg (id integer unique not null,useridto varchar(14) not null,useridfrom varchar(14) not null,data integer,subject varchar(40),mensagem text,lida varchar(1) default '0')");
40 $db->do("create table forum (id integer unique not null,useridfrom varchar(14) not null, subject varchar(40),message text,date integer,replyto integer default '-1')");
41 $db->do("create table noticia (id integer unique not null,useridto varchar(14) not null,noticia text,date integer,rdate integer,lida varchar(1) default '0')");
42 $db->do("create table equipa (equipaid varchar(60) unique not null,userid varchar(14) unique,jogdisp integer default '12')");
43 $db->do("create table jogador (nome varchar(32) unique not null,equipaid varchar(60) not null,vel integer default '0',forc integer default '0',agi integer default '0',efi integer default '0',exp integer default '0',golosm integer default '0',fel integer default '500',tipo integer default '2',doing integer default '0',ordenado integer default '10')");
44 $db->do("create table conta (id integer unique not null,userid varchar(14) unique not null,value integer)");
45 $db->do("create table treino (jogid varchar(160) unique not null,treino varchar(5),date integer,fdate integer)");
46 $db->do("create table pos (id integer unique not null,namepos varchar(60))");
47 $db->do("insert into pos values('0','Guarda Redes');");
48 $db->do("insert into pos values('1','Defesa');");
49 $db->do("insert into pos values('2','Médio');");
50 $db->do("insert into pos values('3','Avanēado');");
51 $db->do("create table doing (id integer not null,dowhat varchar(60))");
52 $db->do("insert into doing values('0','Nada');");
53 $db->do("insert into doing values('1','Treino');");
54 $db->do("insert into doing values('2','Jogar');");
55 $db->do("insert into doing values('3','Lesionado');");
56 exit;
57};
58
59
60
61while(<STDIN>) {
62 $stdindata.=$_;
63};
64#print STDERR "stdindata is $stdindata\n";
65if($ENV{QUERY_STRING}) {
66 my (@varsdata)=split(/&/,$ENV{QUERY_STRING});
67 foreach (@varsdata) {
68 my ($name,$value)=split(/=/,$_);
69 $value =~ s/\+/ /g;
70 $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
71 $QUERY_STRING{$name}=$value;
72 };
73
74};
75if($ENV{REQUEST_METHOD} =~ m/POST/ && $ENV{CONTENT_TYPE} =~ m/application\/x-www-form-urlencoded/i) {
76 my (@varsdata)=split(/&/,$stdindata);
77 foreach (@varsdata) {
78 my ($name,$value)=split(/=/,$_);
79 $value =~ s/\+/ /g;
80 $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
81 $POST{$name}=$value;
82 };
83
84};
85if($ENV{HTTP_COOKIE} || $ENV{COOKIE}) {
86 #print STDERR "$ENV{HTTP_COOKIE}\n";
87 my $cookie=$ENV{HTTP_COOKIE} || $ENV{COOKIE};
88 my(@cookiedata)=split(/; /,$cookie);
89 foreach(@cookiedata) {
90 $_ =~ /(.*?)=(.*)/;
91 $COOKIE{$1}=$2;
92 };
93};
94sub mydate {
95 my $format=shift;
96 my($time) = @_;
97 my(%mult) = ('s'=>1,
98 'm'=>60,
99 'h'=>60*60,
100 'd'=>60*60*24,
101 'M'=>60*60*24*30,
102 'y'=>60*60*24*365);
103 my($offset);
104 if (!$time || (lc($time) eq 'now')) {
105 $offset = 0;
106 } elsif ($time=~/^\d+/) {
107 $offset=($time-time);
108 } elsif ($time=~/^([+-]?(?:\d+|\d*\.\d*))([smhdMy]?)/) {
109 $offset = ($mult{$2} || 1)*$1;
110 } else {
111 $offset=($time-time);
112 }
113 my(@MON)=qw/Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec/;
114 my(@LMON)=qw/January February March April May June July August September October November December/;
115 my(@WDAY) = qw/Sun Mon Tue Wed Thu Fri Sat/;
116 my(@LWDAY) = qw/Sunday Monday Tuesday Wednesday Thursday Friday Saturdat/;
117 my($sec,$min,$hour,$mday,$mon,$year,$wday) = gmtime(time+$offset);
118 $year+=1900;
119 $format =~ s/\%Y/$year/eg;
120 $format =~ s/\%a/$WDAY[$wday]/eg;
121 $format =~ s/\%A/$LWDAY[$wday]/eg;
122 $format =~ s/\%m/sprintf("%02d",$mon+1)/eg;
123 $format =~ s/\%d/sprintf("%02d",$mday)/eg;
124 $format =~ s/\%H/sprintf("%02d",$hour)/eg;
125 $format =~ s/\%M/sprintf("%02d",$min)/eg;
126 $format =~ s/\%S/sprintf("%02d",$sec)/eg;
127 $format =~ s/\%b/$MON[$mon]/eg;
128 $format =~ s/\%B/$LMON[$mon]/eg;
129 $format =~ s/\%Z/GMT/g;
130 $format =~ s/\%g/time()+$offset/eg;
131 return $format;
132}
133sub cookie {
134 my $name=shift;
135 my $value=shift;
136 my $expire=shift;
137 if($value eq "") {
138 print "Set-Cookie: $name; path=$ENV{SCRIPT_NAME}; ";
139 } else {
140 print "Set-Cookie: $name=$value; path=$ENV{SCRIPT_NAME}; ";
141 };
142 if($expire) {
143 print "expires=".mydate("%a, %d-%b-%Y %H:%M:%S %Z",$expire);
144 };
145 #print " secure";
146 print "\n"; # end cookie
147};
148
149
150
151
152
153
154#Inside images ;)
155# packed imgs 'h*';
156$img{title}=<<'EOL';
1577494648393164f108c007e00002020401478c5789042788461ac80946c8492658cd58c82336c4644fa88119a7ae07e32b56ea0958c74478e96b2e896f1cd98238882724494649c7297cd7a33ac31244b7c718e94888e87148e7414aa54035e91d5ae83b4cd99337c77837b46f10680e18ab2a34b8e117a85d28e753835a2037a90032c48c59d7b03ac83775c7303ca89f06c75948c9197da8752ac60478e86d88d7ca3ababcb346aa6da7b41d356a41f48f38ca697be71298e72688e7398bea0e82f79539c87968e57a7a5be36aa65950f75aa7aa1549aa3a38e8524d553d07c75178893915faa237f5078f541127f76c88a84f47f91a89d82d77f94388d81158c84558d83247c49236d40a7ddddcd8d82746c4823265441ca87f47d7d138d93e76c4a12fd8806ea76068f95084f4b339d75347f62d89d81d77f93689b45d58881329d7065678ab27778120e79d57d76b3ab84e52e7a75ececcc2b8de04c8b027f77a49d74e73772018656128da6288f76e3abb5e5187c43ba80f58d74159d87c68d87336a83858fd0688dc0c7efefcf030313d87e33276972f37976158b85e9e9c96697d1d34725a77b730d5e62d395743655b1687571488d33d957631988720689a3292949478380194f43e55813264ac4515151e56745ac4c12fa5fb1578131ec8d4215a6e1282848856d16a3a3837a82d5a96b01b4a57155a7d3ba81267f7c739f6db3cc0f12d95444f853734f88960a8cb16780a1979401e986407982432554c1a99513fe79466f82858f74f38f73c48f7514776542f4b6653a88433a69c2c463e3ee6ac5e8aa426879f177c7e1d98d029970146fb1458f8727a96183d4a815269270d49a35e4b9f5fd7b056529c69b8582ab72d6a766808994819d9473ab90749b71148d856769d3c09b8076bb83866fa0858b77f0ab8765ab86e5d455354cc9923cc8233cca32e5d84306ca55a7a787997e82e59bd5db84b24b9273bc82357e76f59c83456db2f9bf8685c98673a484846bc6e1e5d1c1e9c793ecdc82f3e69524c7e40bbac0bb71078bb383bf95fa9993043b58743b69533fc8b34fcb538cc6048ec2a4acc194ffffff12efe0d41646560277964786027494d40500129f4010a000ff00c2000000004f108c000080ef00ff90c1840b0a1c388031a2c58c0b1a3c780132a4c9841b2a5cb88133a6cd8c1b3a7cf80234a8c1942b4a9c398235aac59c2b5abc790336acc9943b6adcb98337aecd9c3b7afcf90438a0d1a44b8a1d3a8439a2d5ac4b9a3d7a053aa4d9a45baa5dba853ba6ddac5bba7dfa063ca8d1b46bca9d3b863daad5bc6bdabd7b073eacd9b47beaddbb873faeddbc7bfafdfb0830b0e1c48b0b1e3c8831b2e5cc8b1b3e7c0932b4e9c49b2b5ebc8933b6edcc9b3b7efc0a34b8e1d4ab4b9e3d8a35bae5dcab5bbe7d0b36bce9d4bb6bdebd8b37beeddcbb7bfefd0c38b0f1e4cb8b1f3e8c39b2f5eccb9b3f7e0d3ab4f9e4dbab5fbe8d3bb6fdecdbbb7ffe0e3cefb8f1f4ebcb9f3f8e3dbaf5fcebdbbf7f0f3ebcf0beb441b2651c2898bdf288fbe7742840820a32e80e18742286c0296452470d1c806154c1321e133745811440aa0c270110f7c9136c603c8814b09191c5042ca1b704035814908e2e2cb395c32e5ca3e5031c44821a0d35dce8d2c409e4a3b5c50714016f8d3140c0424d173cd0ad871e5001c44f11a0c22c45966c58748b28bc141b4c2cb4c221489b8c89534c3888c31001248c8493881e6a81d40c9d40e0472e0b38d9b34e9b3421b7621e7ef9e7230c7230b3c9145c1af242a982a42e0082060840a1880e02388541d453c1a7802a8842a9882240501739f4b8f26c8336d8736e8b3653d3ef814e09ef54e1994e29d4e3915e495562485ceabb679f568921c89b8499766a948cc08c212104002f4e29bc82bd0611bc427cc54e66c9d4cc957ed9a76e9c720a0ea0ab301a6822aa8eb0bae246f1e7bf152a9052bf5cb2fa02490db5fa0229e4a96438f064821a5839068aacd3605b005c60b14b96b0914609044c9357c51dd073605e3ab0e303e3295ca3056f16d4925a4538e6bab5cba44ad3034aca4239e42319a8495c4592c891aa8a2308b2eac145249054490cbcfc0a8893c6c31f40052db984b8157e2d872e997af1e7c5305b4de7c8b3eef185b1aa8a8c72dcb5f2527f6eb815b06032ca033ce034c75814a04e3bbc5c91f6cd1f7c12f8ce369c24e9c923efc0b27dae23cc9b224398fb7ccecd3ffccb40d1ce0d547a9338a9bc4008983bc8c3839c5e37891a93549433dbd27ba7e4d2a75d482308577845c9b8e653b01b2f6403228622bb6222880fafbe8f5e7af50806fdbe8422af2fb85c4841a58110c2aac14e4831df4f3c07d2f4c713dce1b747180de2f6be2fec322367c1a48c974534fc40310ed24619642fdb4ed0958da2569213b035c0c281e0074c11909b3528efb372e14f63b804947e0e4930d613dee405b40a201a6972c10300707abf34ae415921dd983877063140184326e85e53fe97f4842d93412e63d586f8b7eebfe5532c73eb2fdbae208eb32dac8d79248f50e2127c0778e0578bfbd99fc041efffb1a1a969133846c23c815989c938071ea8bcd58cc01f331844cd483020a1079680c50e20b18f0c80e40546ba358cb1a673b311883ed0809bf4eece530248c0f478b903e568012b50d1c500a7f58f2c93c70c7051124650624ded6f6d1f73484a0c46542599290125c8c38cf866aa8bf540a2480101080490a40e16ff8d1ce849c5b8a8a4ba3d44ee4f78badf1e5031c541a44d8b6ced902832784e0cd13a7a74e3e24209fe814efd2413116f5bfcb71fb26434c294c4c42f0322470c5031de7740850c2a815c0318902a11d888082d37b3815a9ee499a447df18e1264236de812430a1cab2f3df975e246e0ee052cc163171a93e142304b4578f0c70d5ef8e28a1012a005006fc48f88578c2812278cb9d369082ba34d18123fb84aa2e98b9848013d296ccd9da42e4554a35e0449619802a292892150493fc9bbbe88e1e205fcd3ee1812ff4d54045617ba25854cb71a8c38327e7c0998ae459041964c008a191a270c24a14dcb4110ca9a15fc574528dd4a708331236c17634650dfc97882ce3ab378c626ba75a3e124ec17e0578a38818fce20508b0801f58f3f71adb57834a0a72b520fd619d09b7c3453720865424490a35a8ab38521a45a664cc502d39ca08aadfcba6eea3206522885981ba855ce395a09877ca3836f2bfe564241248a25134809cb58c62040b90eb2f5989611a68a6bc15e0128434a14088efd251022e93a3dd9432a8a61c73512220450442109083c255dc98f9788218ba660d0d146f809d55cc24d0d68630a00123f0f506f021f80880ca2d7a0de1044cc02080fa00412a34c4e96f29c21c1c51d6bc197106d8c69210e607f0b225bf4746d0e302643752b39d58cbde5a9a8b70e846aa19b922fa1251ac1697139711d0860240ca5f7450a204083381ae128d4e6d64eb9d20f7c40a91901fd2440b14269f226960119d486e220f55c04467613b8638234910f8380b2441ef4d58442804429b2c06f0730fe2444812ed88a0e6e041a3e6b269c9edd693da3246be15a484c5260e2557e1d1996c93c5cecde58c8b1259518ac2ee103bc3074a81352762ef346e039063329b24646b8093ae1a2830c10cf1058a0cf181076842834c6ba72c10f92b9c112fd78732cc8f0c70ad152e3ce4445cb933848512b3b8e5cc8360a58380d0caba3ed13af6ead38b1844400d5d48c5e037076dbea4670553f69e9c32d3a904b00529865433a1b1908d5ca02bc065a47f2c2dd01bc26650c5a0b967406135216e24a98d4c357b9332500a3ba0ca065048130eade09e657bcf40b62fd64a005006688b71d8b6a809adc070903c932e0ebe917d89d68d3a84f855614ec2c44a4d801c993bb248ee55f7bcb5c7af809de9a6210778bb006be273742c0ae667779591d09748c2461106c1532dcc7ce89134076c1f66f420ad0d092841efca0df0b2c206818388a534eb5c2fd311ab324f8e0b64450437514108c198e674542cb9ee968a32e0f2691f47b26d9e984ca4d71aec60542298fb388f4d7accc320b875de27d350c50ef20494dc5505f02748b71dd1982c43c1b047817b1a1289de302bb8d1ebf886c712d888bbcdb11ea8108640a10d0d3841830df0a5c9c781d486886bbaee70094cc532676b33dcbbecc0b8c87d02a7803836981638950f0820347e842219e950b73542516777afcdf7a7f369c0eb18129caf9421fa87ea78bb328e08684e7ca638550f0a1232845c01ed75ced1184e688099bf8e53216086460230c10e08d286122a0c334e4f927c1084c7f91990b43cf12d86db744aef0a70228d186f3b0a0050c32cdd5f563cb0f1970c30e51d8095432e91fc0a64a7fe4b4bc692562c316ceb2ebe10b7eeb7ff7e6b7d01a10bb7240240635c24d21ae7a08be7de7a11e004404400d35b0460b034b04b0d01c439d28d2c311b5d187d7676bd7ef77b0170170630d103e7d11e36a42d30fb49e7f00795fa0317320fc09e5b15a15260d62a41d18d185109d7700d117008e0250910440f50f37630d013401201a02d01e3b324f0026c21f00f80358ae7be0f28e086706707b07b00d36b0f40c03818554d62468e62c18b381b5510ef0e11148c109107b02655287b7d11234be3e42040f11cd3105795320320c40c21930188a30838930a30930a38ef868968b68c11ef0700227448fd7848c015e0fa51d0c24d24d21a78a98795a11428a58c587b0f405b0c10460d011887a8260a30c035a8b31d88ef02164161b5e11d88f887b0a588100a2d110303d0b23de3560d70f11bd3fe0e20be04c8cc0320c21a30ac8ac8ba8ca8841fa87760b8d18d11fa5650b77f68a58d012d0b245d01d0e45dc03109209989b44e8f804c8911630630e982657b0f507b0710e01bc8dc8c03f40c316e06e06506762d8e11316700df0c105b06b8670e00e11a05b42950770560c606d0f118f0d97d97ad0de0e508009c82f8242825a11158d217f89f8af8316745c112d0df87d86b8d014d4f205104f0ef0d147849113403114e89efb4f09e97711c30af09e8428ae0d854201f8710674242f401495f8811c091218e07498e05766765103b8a684d60096b87b0509b42e50ad0fb86d0cb4e118f0b599d09509d09d0800ad0c21242420719124f50911920549d218492488e0987c49c117763164270095b0d011b54f05104e3784b50270811a100c8211d97b59c598f0a47711af0c30b89739630810e30065324d01669710974699911c60221849150250248700650bd77009765795b05a9e11be3909b094f0406d11950789720f599d0cf0419b213d04207b9420f509b98697116d0c60560f21d69c99e990a9c112503d6876050ff8779c01603ef09206e0523e790f8611340c40f29389e0958ef9789889611a89b89c30010d50630b70810b25e018b99b99b9b40ae0b40811fb92211502f93f9500250f38d11910250dc3650ac96b0d777a9730e50b098594f0817d1172080a720e10d301a62a6b219420307e0b73e30ee9611c60fb9878e213f9b1a5f97f9b116c7af9527ac9c10d01d14e405235056224d9411c405607d9311ea9fa990add9411670630a89410d60d10d10a602e9011b7321a41ab40af571156004091a021c60150c20c20b1a8e0e114407c79c7dc33c055a7a9770d00c60dc04f07925d4e1190ad307204d3b70b05b21570013b749f59f561a64a7708e7e2171ab4ad4a3f9f4ac1101825ac77df03c0d01df0b50c10725469140cb9311efa10e2aa10cf72110b990a80ab70720511018b56810d50c30d10d60410b3a111b74030a6aba0af54c0511040e6ae50770221560560c4ac4aa70150500e11b58d585a9c773c07d0e11d00d006d0b5ad5a2d0f11c0ad50d3036a76ac21b70e30b704654c0d5019541171a5603aa909f21fb96aa8aa1500d0150d11f98faa009df0d015226227b9974b4051a1115f0c602e656078a3119d0c0a7209ea4d3411460710440a56c70d500107282e72117f4ba0e30195bfaf9a211560e6a909a095aa6aa7701daa70daa6da5a96b02bae116d0920d204165d05105e0b69c11aea36a3cae30030c219f4d1b7ca3b0195af5ae0974710460c10930b10360682f70d206efe03106d095a640cca64099907a0da50bc4a2f9d11e98eaaa0b399910bb9fda24ba84a05640640d000d93101d0f20ed87006d05f0ffaf10770cc0c6088a111c0aeba26ad50cea4b5b10df0a307253d08222fa350d10411d1bba07ca12b4c032bf5052b72b92bb2bd2bf2baca3aa6aa5bad0030b770b7b1dae11ae8a58f985b0b0be116e0d20400829dc06e08e04e0f1136a4d3e30570a1bc1ba6049b03669bd9ac6bae01a8c10a30b00b102147600503108e0920d00ffa77074b87bf21d2a7ab8aad4a5f9327050616c00b00df07c7e00810630c30840cbb060bf06a06a07a06a0bf0fb6639ae81706da6b0d01f50b4064824b34a7f47f4a053d02704ab58efb510f20400ef05e08e05f0c20770de0ad02e6376db4ebae8b2ca09b923801a43ed2360830bc3b50a703d026bd30c70611a60d50fc579b22bb40b9bd9bf9b4501ab3ab5ab6408ab8ab87b9202e8121c40040cc0b7b83b4dad11d89810e00f083a8718d117a4400d168e02f9c20f111db1db24bc2149b49b1d5db003689b32b420f4072be9bc00450f70e168e095a56064056087bb50a0cd21632d6ac7b37aa201bb2bbc003c0ff8c5863abbb840060ebb0cb7a02cbbf0840db06cbe8941c7b0910d01265fdae9a7f4b733fb270523e40ef0a1c4f0a8b2f98008009d0e10cf0f105604e0c8b211570b60a0546a22c24a9746f0149c03188372b30450b30360ef788d110d572c92c22bee8d2c930f2c13c33c53c63c93c920bc322163274acc00daf6cc11b3a01045cf080d09dad117605107f8d1cc20800cf0f11570b73fda030805c2193aac01d5fac03621185a93cb509e0e40f219a0632320d0c0dacaac11a3a010a9c010c70f08bcbccbdcbfda642211cf0750750a6cf10800e6c311cb821ac7392341ab01b15360d7cb30f700fb8e070b9111d523682c02b44a11184b5237bc360360221fc039c59cd6c11cc1179a99c4ccc070d0e11050e40cd7c07cf0e10b63e11923fcbaccc2107033690dd602bc4112d9bc32d7e219a00fcc403206aa3fcd112e77fc4ccb60d010d3149f50249349311a6c76cc20fbc1110fa6efb940d32ce01782d203601e85abb4a81190d1bc02bba0ae0d0dbc36382217f09a0abcc4058a4e053b5fcc50d10cd0010dd0c70c705c7bd7a702fbcf02fadd066be11ab9f508e31b2c21ac0990130130336d60a603b0611e4082bb15f2130304d14d34d79ca1182076574dd10b1dd01bc73f84602607113b9160d8721162265d77c6f038ad01fe53106e0920150d00fdb6ac511d5df5d82c89b6116b5e76121aa04d0f3dabc78a65bb11070ed0ed0cd0c503500108d0b604b9c11feab60c70922b3a45dd11f4008d699140149c21d5d3bdfac82c711b1597276d194f3d632e0699d911070070820c50cd0cd0350dd0e10d01b10727618260087ec76113ad16ef03117104f414928a75d140211d32a69d00b4a770ad0a8d3114bdac0fc5f8d611d722212037f0340ded5f0120e11b9ded0c504cd3507508d0f10e11b56922a602e764df1106812df40242c21c90a50a50c8d1d5df551105329dd211f4533ded3405f051b9119902fd4fd6cd20db017607d6b304537d0e0e1ddc1d211ba897c12d3114e303bfb94ace5043a01180ee5d1d53b0af0e3093d711940587121a267c39121200161fd1cdc9d4cddd07fde1129ac3069afac79af113f8bc8a30c21a80a8070e13082033e911cd6e21b557128c30b0f3e5e0d1171e24e91edd0d01c767d686e053911b6042e6d4322260dc8aa8411dc06d0eb9c60b7bcf0f5931113eeffac06d739e309110ddf11da0096ec40b05081fd4303f0b8e3f0c50b2064ed11c303b0840ac0bf08208406fae11e62f4eac89e0c218a035e80e336410b0e611a3ed21b46a939c578e88ec11610070a8ea8eb8ebb6c01cf9803bcdb00618a116fb2119d2843bc8e9e311a6971a77e0ebad0e20f2ed0135e55efac8fb4c017018e221b46da01e56606201d4e11fae430070b8eed0a00cd0900e11db0fbb6a0ac006079e840f11072830b159e0930f32f9ea8060e55e89e5ae5416949ae1e50d4254eaefaecdecdeed04beb016d86e0df0250a30c9b75cd21453554372e621ce31167effaad0ad0f59b5911170e0f079e79af7ec31a403de1e5552cfec115e45efe4c8ea00e8ee110cb0cbbf0d2f060828d114f7c43eecb218a08a060e0f013091da41ee002002f1e52d4d1143061062fc8e856c01150f4da77f4de03e21f72d04b43511b2e7abe2ede071f01183f55e06da9c299a31934b554de2000d498eb8e2be3f0a0020fb112cbb2fd2fd2ff11e7c78213c7a3f9e0aec90a1f65ebad741212ee006f2e5ac6b1152f1bec8ed01c200d0c20c077e0f03d5fb21e43d7c17ff70c6a31f51f9d0b5956ef012fe55ee6da60af08100deb315401126c3e5524f66f76fb8ea00e11e4cb6fc2fbf0f1101485317f78250ec904bf93fe6d97f6411b00af5c37123af08f28f64fd0176c800c6eb70cf06e9e21930eebcdc7a32bf51ef1fca559e2e49f8f09f085f67f8207bfd10810810c313a01b0bb27937f32f724fa0076f5ef55574fc11aafb6fbf00609eee119e0dec360ab5ab509fb21f600f067f77fc4e9411b0edf0ef00139e8c11a6ffc0e14489051e2cf7436edc350115223c48e18f870b8c7020405341d3e74098057c6947e42d5ab1392ff484f856ee863d69d462eb319f85a14e40f0e5624141a3040c081e6e052a0274d1564c8c59ba6430a828488215aecb7af1f4d5535bf09021e1c3aae7429723dd486146fb684f6ed816626bd6b76783b175e624908439e2d6a37116459a1134e510cdd02c4153d1828edaa274ec616c267c6c579f236663a98fc62b47bd3920f80a88d372efc15d9443d1a3ecc9d38fcff65ca66db262e7e35951cc6dea6325ff393d025cee4792624abbd603f5e3e2c01e0c1e98249bfc0e80394296e7071d1d1d5af4f7ec7a0a5bbe5112bb90e92cd8b150a0822af148bb07ada75cab777a88bc68d8b48933f447bb99c97afce0d9fcf3f3b6abe484934e01062d00625bc76795181cde25b814bae587855c68832e8bdc8896c8860a3ce01ebbdeebe6e23582d231db12f2db6ee938eec390619a160c34a2930314fc68360d1c5d2421f8b0e28c38349981ecbf7a03688f953018d07a1f0b109ba109fac0af62bc68523192041f7280c183fcf8b6ea90036425a29f660914e794d210537dc4085b4d4996387895a24cef0c7837e6bb1e60324f4e0b3cbd62b318221f6c3a0e74e245cbde93f3cf022b608111913bcc33f33639dcee042e2c4483058c4260872a3d8c8c58e48e16f0e72fcb1634324e2b6a5582d8061ee040262698281fc0df9c601aa9b54b988b019a1011978cc140d0432537129d77a2db4d3be54d053ab8a3fc937848bda70c63f43283401d33955b1e74b1a86a0279cde0ec544f3354b90f5fc3970858498536f3b46bed40471531d2f64936b0e1d24b86e6d8d343a9281ae0ee3253b5d35ea9062841ca9418d8828d061265402423712047732e3283f38dd164c88b4e9775e136eb9840d844219fcad9670b171e51b7318fcad086d60f1ce4212c0b635b92abef1c65b1e012efc2a882ac0b89120cea0808966a73abda9054f3622ff12484616f4e49956fcc5679d5867aed09e834ea3df751145e6b966d0e7a78e2a0e588b8638b127f4025118555ea61aca66e1ee09266124a6afa01c6320a67dfca75134c0a52e22420800c4e84221b445efc899f0037791b1891b9fc0ade26f8a3ec9968405ce63e6ceeb10f6dda914ccc9660d147c8e82822b8032e3ea0e327fe8f3367f9367546227687c3273662facf3bf0ee8f0a9f75e56fc14a3eaf5e483154eaffca10d3c8040ae0f0ea0a80e03135fe1e60d6c949be58dbdf968dc19db103a14ac887780432e25d567961138c0d12e2460997c91329159b59d5eac0cc066c80efa97f1879d7e247b702dd434f0b894d8738b1043d6cd1a100133b8edac26e8908ce0d1411400208d6c63e70f1c10bb34c0914c0d40f3421e36b8baadff887093ac9528b6881274918c13204026e818f19d45fbcf5ffaf71260d192047430065800e740a812a311fd503b1cf8b34de2d7f28f3cb00a0c737f9ce042cf0e78706d0a2cdd9300307fb9b4c07684b0d10702e2580a3223887190468e03118704c4d3cf84e004293037cc867c76ab01ab534d16a1a816c831e33c5892c90c3087b82853048d283b4719a045833ceda506e005234850160614903c0b6045ea1c10b689b091e90e2481621670d48e745def147c248d1508690074105f2f7ca740238ef8f10222a0093130f41213981796893ca98150ee1f3aa4b0111cb10e12eb846638296d89b862f50f28a0c81e386e8f8c92f499a4704a33d9271712e0268b38c14e064227c3b412c00608c5223608db4c30f15f28e0378a040a18c20020989a7986de1028be990e61250e844c0c1029750d60202a0d00086b0eb9f202a831c9031059cf1639768f3cf16c0ef068410a000d069681c5af2522011aa2b10138c3d59a30130e0469838c1044fc347cb76d13918c8e5ee05e200d270a3450f74042b089128af19274aa8c4aae09e925692b43ccf674b79054051f60b0844329cf0400b04c827909a8490052df2293922c2086c82f5ae2570011c107b8aa8e08c07ef10234e047ab30c1c204e9b50934d3d00f904c2d11c1b8d17422c71eb89b8f342bdc83049320aa20592438911839b08e447b6854ac1250b5866ae5c2061cc7c908ca15047c40cf1a15e2695822a8164236470521f8684fc0c94688514a0250474104a0b25692112c013d892b4810c00c1c60a901f4d18e0e20a30fb251810368c1c61aa66f44c60591bb233ae7542b3ed3049750aa2d20054ec54829aa276f124256823852dc4caeed620dc8bf6ba6e303168880440c983da519f1c206da93039179d24e67c052d33cb084a51082034e7b0d0510b41a17c5864c4f61448a5cd4630b108eee5570b00c1857170e48d2841a0b55107077f70f38ee61261b59beff5cf2021171204e8b20b36f7c10cc170051c07b004ac3b0c92a51aba3822373e0d1b095e0cf5973462860cd8b2c4290cdada0438d4ae156c0d67a1718964012cc71021401e2071093c477b0a30f8a3124ab01828f3cc1650a3ff6dec910924604fc5b8b54d2c616b850c608107602431a79bc08d0437bf1930e08477abb08d10516bcbdd3ceb8f31ed5e5e990d47612438377c518e1ff8fcb9e558c3d0d54e145b230501f583919f092a35463044b4ad474d7b50dc0ebd40ca1052af824c200f87340b1e035ee6859b0cef0e86c52abe1d508a467b32d59024ca0a20fdad9f7ba7ed33f9ffc18e1471ad0d88e6e6e00e8c1043f8832df70820a85e0a787aef4b87c159e713c8d003e0b4c022d096084042e11fa87545584ad0e3301020e016f7851e00fbd59681aa2d6068bdce400b632c297734f5a7c399826180ba501f1de040410ae10ac71072b50c562c2995cc140810ac16092f4979994076e9ee2bd90dc658094910050c9b510a047ee74f34a0df0e04608305b02a7d28614b81647b70db4fd0c81630285413706dde15196b5984feef44cb5ed0e8a7bdb1210c8d7bfbff0486a283850e40fa3b410a14aef78a2532a19371f0c03db0a04b1a30d68ab73cd1e2a3525e662ed4e2b45c9e1dc8664baca1bfd211d0860fbe7388f2f1dd8c6c6610aef8e2e916c0769b0ca979d93866f606ce58e380ec37eb00b200efd5a0c104d760a8e6474ab2dfc07d83380a7c018ee92366b0a70aa351252ee38fd352910e8b766dd2d3f6b44428640c870c30461328118d2ba21da32f30519117ed4339e1d142a0d00e0610a1071ab1758107414a06e8c23512dde40d14a994016e593c0c70eef59fbf75e82f02090e5e03f8e6ff012f78e6f9169e058d00c9b508e9be78f33b50f33f3be70143ff360c0040042dbd28e78e2b5c8138a0094b61811a8e04680eb87bb43a7b840c400604e3e7b9928281301dbc2b083243803828308a6b38835a512c08dd1b10800d70b14530e10869d1ce288e35825426211d2fd02b0c532c332c2cb9f8230f205802e84b85c38389789200f36182000828ef202003fbbcb3b8af3cf3d18e70728c18f03d2cf7824b5e21db50043ce93304404b5050c5a360cb9b704b2880cd209ab5c0ac3a28a086106224f17e3f3cf3404c04414c14424c24434c34444c44454c54464c64474c74484c84494c944a4ca44b4cb44c4cc44d4cd44e4ce44f4cf4405c05415c15425c25435c35445c45455c55465c65475c75485c85495c954a5ca54b5cb54c5cc54d5cd54e5ce54f5cf5406c06416c16426c26436c36446c46456c56466c66476c76486c86496c964a6ca64b6cb64c6c264048d64e6ce6ce6cc6407c07c554f6427c27427417447c47cc4437467c674f6457487c87c444774a7ca7cd64974c7cc7caa1b74e7ca74d7cf7ef40849b8e7c184f7c08438c384f80a74340678b40008b4067034028c284484a8c384774730050000d8cd8400005073098477ca84194d74a74738684e84e8cb48f8409c67c19479c47ca7cc8449449405069c09c794c9cb6ca7434899ce9c884b9467cc941a4964b74678e9c9946700ac69c1a46ac564e7c39c3acd8cb405ac5ac6a4ba426ce7c8ac994aacaacba4face5c1848a4dac9a4eac0acfac3bcc542843a4da4d8c4ac2b43b44bc8b4954984e946b4008f9c7b43749bcdbc75409499c8aca947749100508acb40050910284eb45c455469439c8a459477c0488ac0484cc5c4bc4254b94c8ce94f8c6747cc1bc594b7cbc41d4054aac58c68c784cb4ef6741b4dac18c1d47dcd4ccb4b749c4bb4d84acc67cb402b40487dcdd4b4c8dca74910ad4e844c4674d8cf64edc3e4844fd4a7cfbc0ec0c437c2e4e644e49ec64ce6ca206849a4678a288dc5d4bbccd427c5b47b4ddc9ec1fc34ce6cd688acd68cbc0e44942ecd843e42f48fc044e6c9dc9cc7bc5f4e8c6f48ecb7c8f4ef4f3cd64af4da4bd4aacbf47fc7ec20ddfcefc40d3f00480785fc070ea4205df4274cfc8e4505b0d0e0040205ea46e4ad4908cf40087fcb05115db860dbf4f40aa40ecbfc1ec274a0540d11d71d3b0005ad41050a491d00d67c6151f481dd1d7a880501580d0e477cc15e152252a0f1d2b4738ee40d430590d22572d09832d7b4bef1dd84a1df0d01d725c2d48882d7bc1c4a9c51512d30dc25135588d255e428c61d13d43538880da25335e7443553d43520d7057355bc6b471d83dc25d0da35984dfcc35935705e3de3df1df3553d0ec63514da74cd4c3d245c25ee449444d445e7c64d835e05e8c0f4945984a4d835bec2c4900decc4509cd4dc35ea4f4804874db4804831d7bc15df35b94940205940aac65d24509c74dee40a4a5d64528cb55ad4fec6d4d5dd5dca4f1d30506d065165b7ce55c5dacc365a4de7456d7c4d4d66d655e7485dbf495536d965a6de7435d9cc555665d65d5d05d77c075d6d17d27547df7844d4756753805ec67587d4805ac875a7d48c98ca75c7dc75d7dd7925e7de75f7df7508d08518d18528d28538d38548d48558d58568d68578d78588d88598d985a8d84c08000b3
158EOL
159$img{redball}=<<'EOL';
160749464839316020002007e0000dcf6572eb90a9e1b4bae8babbe9bdbbe9bcb9e3b6b6e7aaa0e39799da7f72df5567cf465bdd829fe9cbc2f4d6d2f3d5d1ffc1d0fbcdcfe5c8cdefb2c9e2b5b7ebafa6e4a8a3ed91a0e49995dc6179c94151f0d2d5fdded6fedfd5fadcd3f6d8d2f1d3dee4c6ccedb0cbe6b9b8efa2b6e7aba4e0a4a2e89c90e1959ed98d81dd5369da8e85fddfd6f1e2e7f5e6e8f6e7e5fcded0f8cacde1c3c7eaada5e2a6a3eb9e91e3979edb8f8cd38885da6f67c24a4adb8f88f8e9eafcedeafeefececbebae4b7b8ecafa3ec90a1e4989fdc819dd4898adc7185db6177c1484bc2767bf3f4fcf6f7f3f5d7d1fdcfcae5b8b8eda0b6e5a9a4ed91a1e5999fdd819dd58a8bdd7288d57a73d26760c3494ffffff1fec0dfe6c8cdeeb0cae6b9b8eea1b6e6a9a4ee91a1e59a9fdd8296dd637ec25851e69a96dd6274d56b69ce364beabcb8d47a76dc6274d46a6fc25857d87d7adb7088d37876db6173d36961db5168ca3141e79b9cd1868ad97e77d17773d26861da506ac24944e1a5afde829dd68b8bdf7489d77c77df6575d86d63d06660d85e5cc84f46e6aaaceabdb2e99d91e29692de5460d65c5dcb4256e8aba7e9acafde839dd78c8cd08589d97e75da6073d2696fc35a5ccb4254e2a6a5e3a7a2e79b9eda8e87de6474d76d62df566ec0575bc84f40e2969fdc8099d87d72dc526fc55b5dcd445ac44b4bd1868ada7f78d37974d66c60d85f5ec1585dca4159ce3545db6077df6475d86e6fc45b5bc64d47c83f3cc15859d57b77d07574d36962dd5360d65d5ec0565cc94055c53c3bc44c48ca3241d95f5fc3595dcd435cc64d4ac04746c43c3cc74e4ac14947c73f33ca405fbf3648c54b44d86e66ca3248c34a42dd5468c93046ce344dcc4357c63e38ce3541dc5269c14847c83046cd3541c24949cd354bc54d4dcb415bc74e48cb3342c44b41cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab2312ef4137474696f60457e63756365727964797e2f6277600129f4010a000ff00c200000000020002000080ef00ff90c1840b0a1c388031a2c58801040010308041030700142050b081a1460d0c1c30801142c482041a2858b08123860d82073078e0c1c3c700111248881142a48983182258a068b2854b071f2c54b081f1024c09142760d8a163e60e8c1a321ee0f0d2874f0f1d3874b0f0f0a6ef00214c28091244a88193284e062970c1c54f052b4494f071c1894319022c9c3182154ac41a255cac51c26034c78e0f2c7c29c2b4c7cb8e0f14bc61e2d5cbc7103164c016b2368c41c23d4894cd9b57fe6eddbd7ff60e1c58dcc9143403d44870855b275fa065c2953b865daa953c6adc04732326048f0036861d3a947963d7a1517cb183174ecc1a320be888011104efc70f0f236ecca97337eece967ee0e9c1974fce118c7a0c40901102c3062f189c7c093259472581d78f1f70021880238012588046800178c40124c011431a5431114c012c4078001e5c106202298845648a12b922b80322053242001508802348021c61214802388050001428324380125c3209442290e139052374526980479832e505032410f3880c5880f341032050e583289441990a0a90e064851b9072d9012e9c7220d0143c105109041001e4471e40014109051c1043441720821a051f788244ac13a0925a89220d92248906149033401f4871f44013349061890244620a011e74428a4a2668a2a0ca2ca4b2ea804fa84188c50620d061041f5041ef610d062c508884182482e78d1f68510b4c297cc12b4923b0d2205d2f842216c9053801150811580153c9016422f886245442f68d27b4e08b4e2abce2cbce1dbc0465cd0d70a063c012548125c01630a0d7cd0090e0f70a265cd2390b1a8012d6032ebcf240972838f192cd044c4126c4144cd0928f183442648829a0c2930b1a00031c8033c0135c41427cf1670e05405142711838d1f781129851878911b0e2a8003594926cc138c8149ccb277cb164451e3b11f6cd1088a187c62398a2974e2484035a412b70d1acc14bc033078a165c5da60c18740266c42c98c1a0cc1ab4b12c813b7cf2dc424ecc33b689136891b64c19380276052d9c82ba8c2bb0c4323cc130d443c094376c0ec68c197c02a8cc148092ca492cb8f24cc43c2df34d0325dc82378e148c22598725a4b23b8537d06339f049d863bd0735a492694737c8734bc735afce4b7de4050400b3
161EOL
162$img{yellowball}=<<'EOL';
163749464839316020002007e0000cccbf61e4da98eed1b9e2e8bae0e9bae1e9b8efd3b5ead6afd1d298d7c971ddbe56c1bf4adccd8ee8e9c1fce4d1fce2d0faefcfe8eacee6e5cce4efb6ecdba5ead4a2e6dd9fd2d494d1cb68c2b944f1fdd5f2fed4ffe9d2fde5d1fbe0dde6e4cbe3ecbae1e5b7eddea3e7d0a1e4d89fd1d09dd0d880dcbd58dac984f0fdd5f1f0e6f3f5e7f4f6e4ffebdfe8e8cce6e1c6ebd9a4e8d1a2e7db90e3d39ddeca8bdbc284d4c966cea149dbca87f4f8e9f7fce9f7feebe4ecb9e0e4b7eddca2e5db90e2d39edfcb8cdcc389d9cc76cfa14accb17af8f3fbfaf6f0faedc7ecdca5e9d4a3e6dc90e3d59ed0dd8cddc58adacd77d5c472d1c16fb9a24ffffffee7e5cce5edb9e0e6b5ebd6a3e8de95d2cc6dc7b253dfb468cfad3ae2e9b7d6c475d3cc6ec8b156d5c779d8ca77d5c275d2ca62dfb360dbbb57ceaa30e3d79bdbc089d8c876d4c172deb160dbb959c1b24adacf78d7c776d4cf64d3c762debf5fcab85bc4b84be2eab0e2d19fcab65cc5bb45ead8acddc784d1c96ec8b35bc4ba43e8d2a4e9d3a1e4d696d3cd63d0c66dc7b05ac3b74fd2d291dcbc5ec9b55cc6bd49c1b44adac18cc5b944d1c76ac2b546cda73bc5b058d7c573dfb264cba53ac2b34cc9bd4bc4b649c1b045cba43bc3b642cca94eb8af37c3b443d0c865cdaa37cfa247cea835c0be36cca537cfae38c0b145cdac30c9a14cc8bb41cba441cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab2312ef4137474696f60457e63756365727964797e2f6277600129f4010a000ff00c200000000020002000080ef00ff90c1840b0a1c388031a2c58801040010308041030700142050b081a1460d0c1c30801142c48202082450b07103460d82012868d0a183470f011e30880122e0c802152c4c906882258a851c2658a861d1028b87142164c09133864d0b173212e0e0a2278e8d1a3278a0e0f0a62f8e1e3a2cf0021448c01c044e061970a1658e03274c88e851a1a30219002a742152b48943172f40a4419260f3478d0c267c199274670b8d0a79a451b222ea0611c481a461d25099029e0177e6ddbb977f6fdfb187071ec2b58b01ce211e1065dac5db2851b46dc2a55be5ebc6103303ccb07101a34b81a54f862d5ad4f964da1266c0992366ec8044302e3440f0d183efcbc8933b6edcc9b3b76a153b6c60b963e640e8820314244080f0a38eff8127469c39c9db1074c127cc1474d120d10d38d131c70e244084448118b0f1c40674f08e19077845348710b920874e1209e1224f050080f2c702105121c70f208050068e4df028de196420b60f1c6891d78f120df10388020480500f002451020f0504802088003002b44025207805802388204701258804044c070050246f0d38512663941c1013c214281214831206e856c1288422a8804b8cf032450700c0e342122421e30c07045032cf0180b9e44a15d56175669c88c6ff060c409061c8013450a4c51a445013c8061090c4490d6a2a054c1d8ce8d7422e8c3220142d4cd1ef39ac0f3c2185c21f38c00aed1d40d098a81194c163842780e1484d1e6c42301414343152cc0040310d20133490bbee153cb12649ac7c618528197052add04484d0e489043401d44ab140d062831534a1340c13600bcd6b1d745269c528941456cb1964d02483120b01feeb13442005ca195432298206f62299c52ca614a9060a688134c31a1f01268a107871b6802c7c02c6c12474aa6ce91b9c14c947236871054cce5c81b64c195c8c56820660e106452998b17687290d7278c7195c1df5091638c1b50b1a089cd7012974eb0a482c05e1b546db5491c6cc1a33d188012984d149c522a0b4ffc829789178891d60d18744d98032e8092f849286f046a05171e8c9298422e741279c91f80a297f1e8872e4050400b3
164EOL
165$img{greenball}=<<'EOL';
166749464839316020002007e0000574c95699de76afd29aa0e99ea1ea9ca1ea97afd49e9cd98f87d67d71d0696ac74e5dbc3c82d378b4e9a0c7e2beb7e0bcb6eda9b5eaa6b5e4a0b3ee92aedd8d9dd6879adf7197d8727cc35b5eb936caebb6cbeab5cae7b1c8e3bdb7eea4b4e3afa2ed99a1e694aedf899ad38499dc7e87d47685de6869c64880df68caebb9caedbdcbe2cdcde2c7cae9b7b6e7a0b3e0a1addc8a9bd4849adf7098d77a85d07483d86f6dc25856b73980d17fcce5c3dfe8c5deebcda2ed98a0e59a86df6584d96f71d2627dc25757b63471cc59deefcddee3dbb7ecad9cd7869adf7298d97b86d17684db6f73d26970db586bca485daa37e7e7e5b5e4ada3ec9aa0e793aedf8c9dd8869bd0837ec35067cc3e6ccd4657b43ba1ea9068cb3c7ecf5e72d16870d9517ec15d6ccb4669c44455b23398db7283d66d72df577fc85b6bca4569c2485cb53183d46c71de557fc65d6dc05a6bc84b53c63e9dd88da2eb9f88d57369c04b54c730acdb81aedb8784dd6168cd3b52c73b9bd48c9cd58399da747fc45f6ccf4f57ca3a50c7376ac54268cf3c55c8395db63382d7607dc0595fb63353b23e54cb3a71dc5c6ccb4151b0385eb53955c83a52c5375bb43152bf2a51c63b55bc375ca9365ab7317cc15452b33858b73354b53253b0375ab53552b5375ea93658b33854c73454b33951ba31cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab231cab2312ef4137474696f60457e63756365727964797e2f6277600129f4010a000ff00c200000000020002000080ef00ff90c1840b0a1c388031a2c58801040010308041030700142050b081a1460d0c1c30801142c48202082450b07103460d82012868d0a183470f011e30880122e0c802152c4c906882258a851c2658a861d1028b87142164c09133864d0b173212e0e0a2278e8d1a3278a0e0f0a62f8e162d2cc0f1f308401127078c30d0b247019224447ca0d0d1c88400146f802942a46903962e4e981cf0d1630b8d1540a419d1c26342d82256a059a26500b0e62750b41c4264a30c59b47de2e5dbc7928f5dc38fa461d2407b44870855b275fa065c29d39763d27ec2c56067971e2024786134b8e1d4ab4b9e3d8a53cbc7103164cc81184604c7880e1a3078791376ef6dcb993776fc2366ec8d043964d80c1150628488001e1478bff134e8c297253fa163d68b1f64a107804174f027c40f18b01181101811118b0f1c40274f0458e442cc125101fb920474d1209d1224f050080f2c702144121c70f2080504f022cd113850081e1564207640186881978e120de17705120480500f002841020f05048020051770f1844f152c68d48f1f78209600218804334c07005022800d34f035c892088041c101302142020e3c21ff5e81680238012588046885032450700c04105045cf903c1051c80614f1e6e215684775c59952c10bdf314421428e91345074451744501381a4242152cb9b8631d6c12b36e14802298804a88213705aef23850848518485023c7a378214382ae5c22d68d0c880247002a78a1d8c04d40d0a449033cc094c3bdc690ab2e153ca1e509a1446185271578327dd04084d0b4890438f0a4c9be30d062c2153491040b1f5cfaad6a197c32094422941416ca1564d0f3c2100ff0deea104420d4c9175c12c80698ae4219caa5015214891e5001c4c5c04871660b170bf114cf1868024f212078a1364527095279c71d44bcd2f71764b175c7c16820260d1c5c323989c89424998027540d14381638b1950a1a088c9700257cdb98862c05d195c4d9548186cb1637a138002488e1e8442b90b4ff8615788128881964a147c2d42322c9422d988d30972f90220a012d5b3c1a4a0222a8cde7ffd0831410100b3
167EOL
168$img{blackball}=<<'EOL';
169749464839316020002006c0000747474545454646464848484b4b4b4d4d4d4c4c4c4a4a4a4e4e4e4f4f4f4050505151515252525353535454545555555656565757575858585949494959595a5a5a5b5b5b5c5c5c5d5d5d5e5e5e5f5f5f5060606161616444444262626363636464646666666565656868686969696a6a6a6b6b6b6c6c6c6767676e6e6e6f6f6f6070707171717272727373737474747676767777777d6d6d6575757979797a7a7a7c7c7c7d7d7d7b7b7b7f7f7f7080808181818282828383838484848585858686868787878989898d8d8d8ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff12ef4137474696f60457e63756365727964797e2f6277600129f4010a000f700c200000000020002000070ef08f72838485868788898a8b8880132b2e219c2722271d040c868f143636353431333e2b292724212118999f753a3ea9373830af2d2a272523202e1c0c8c1a3b3c3d3c3b30bf9033a92627af1b1113098c193b3e3f304f3e34c633bc25abcb181ec780163a3c3f3142414f3c3a3735313f2cd6a12f1c19161e020681373a3d304246880102d3addb3a56b699d3b0210141a0153af99347ae8d9b3872f41ed390f00001271c94a153b68d27863c8dd8ed7368f0c1a02b00386444961c68513a17c849235981a244870b04fdf141f2260d0c173278b2d10b461cba57b27970d0718244070b06280a21e26681da163e6885f40a4419a975f2345580d0618aa31efc2e5875a123b6c7a2b1fc61e211cc030bc60a0c080291a2858b87103268265c03e58b061a229924aa651b6205562258a851d2e0fb8fce8b5ca88cac05088ebc09de2040aa2489831a9750b061d266f8e25ac640f5b755f72305050e0802d042a4c908d924372f257b840a8dda1a7a405dcad3ef980126441f7d7cf8b982142644883dc12ab50a001c270f0028a0c70119d948cf9f1e340fda76edae38fdca724781461c70f10801241860e8720270b1460e79e7d612060c102490280c60c18702066820a70a064771450e0e209041040c00ff112f0460a1c6061270a0e60a103871c973dd30d6d88522b758c4011c508106091409f3e5033250214409e130602229831800a3ee80145061c49352886422963e20a0020c4a3998c00c084026a8911069e0430a4620016e83162260c30072c9766b5a527940c1030c39c800060c20a4e20a5aa9422e9104b9ba80000c106041042698e4a57ba44a29e4aa8402000b3
170EOL
171$img{msg}=<<'EOL';
172749464839316410041005a0000000000ffffffcfcfcf6f6f6f0f0f0fdfdfdf7f7f7faeaeae4e4e4eefefef1f1f1fbebebeededed8d8d8d8f8f8f2f2f2fcecece5e5e5efdfdfd9d9d9d2d2d2dcccccc9f9f9f3f3f3f6e6e6e0e0e0e3d3d3ddcdcdc6c6c6ccbcbcbafafafdedede7e7e7eadadad4d4d4d7c7c7cdbdbdbababab9999994f4f4feeeeee1e1e1ebdbdbdececec8c8c8cbbbbbbbfbfbf5f5f5f8e8e8e2e2e2e5d5d5dfcfcfc9e9e9ecdcdcd6d6d6d9c9c9cdddddd0d0d0dacacacffffffffffffffffffffffffffffff12ef4137474696f60457e63756365727964797e2f6277600129f4010a000f300c2000000004100410000609a0cf907834000888c4a010180c159a466350f4861b9101c080558a43050301e088e22fb903826180643ccb4c60c1f08444231a45ccfd085e201819131a1b1c1d155d7e171f102911222b132425264b462d4e172820292a222b2c252d289f4c462e2f2820313a22333c2d2d189e417106262431353633373d13b856a2762836393a3d1424bd43c4c8b0d275bf3d7cc856dec7b2d7d2c6b6dbd4b3cfdbdad553e4e7b4464becede69f31400b3
173EOL
174$img{sair}=<<'EOL';
175749464839316410041005a000093590253c8d163d8e12348b1f2a7a1b21781e1f4013358c1f2c7a1c22781829661420641127521e1e40103d7a1c2378192a661521641228521c194f022b531a164e071d3c04143b0545b624153b011d29024da42e04270e33a22d04270a0b150b3b912a0c150703130e29791b0d15070414040b0202328b1a2e671b0e16080514040c020b20771727651b0e15042f541026521d1c4012113a0f08280b0f160a154e061b3c03113a0f09280c0026080714000000000000000000000000000000012ef4137474696f60457e63756365727964797e2f6277600129f4010a000f300c200000000410041000060660cf90784c2a1f88c4a2796404089641c08050304587044241b06430ae87042221b247241163a275265c2712260a91d017305d0788d16a6c3f14402c4e112225432b44252625472829492a2b274c2d274e2c894f203132423334339c45363738393a3d6bad61400b3
176EOL
177$img{forum}=<<'EOL';
178749464839316410041003e0000ffffff000000efefef4c4c4cdfdfdf151515dbabdbffafff0000ffb70000ff0000b797b70000b7ffffffffffffffffff12ef4137474696f60457e63756365727964797e2f6277600129f4010a000f000c200000000410041000040370f9c94bad702beb55bfdc160404699582e7027a5914624979a0f0e2b0b0441e6f4d9f23c8a7739c9e1f20c1882b90042104462060303f74d3c100653c1ca54a404bbd8a7d759ce2baf5039e25a5e7fb161763b7e73cdb784490cc110a090d7e787b01890a8a887c0e8820580c060c08069c01100b3
179EOL
180$img{home}=<<'EOL';
181749464839316410041006c0000000000acacac989898cececededede8e8e8e4e4e4e9e9e9e0e0e0ecdcdcdeeeeee5e5e5e1e1e1e8d8d8d4d4d4daeaeae6e6e6edddddd0d0d0dbcbcbcfefefe2e2e2e9d9d9d5d5d5dcccccc8c8c8c3c3c3cbebebe7e7e7eedededadadad1d1d1d4c4c4cfbfbfbbbbbbb0f0f0f3e3e3e6d6d6ddcdcdc9c9c9c0c0c0c7b7b7bfdfdfdbdbdbd5c5c5ccbcbcb8b8b8b3b3b3b7d7d7d9b9b9b2b2b2bdbdbdb4b4b4bfafafa3d3d3d0b0b0bcacacafcfcfc7f7f7f5b5b5b1b1b1b8a8a8adadada4a4a4a9a9a9a5a5a5a0a0a0a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012ef4137474696f60457e63756365727964797e2f6277600129f4010a000f700c2000000004100410000708c08f7283848586878f7000038a8b88828001010e819e88859599839f859203089b978d9405060591a583a706080908968d9a070b0c090d0e099481bf001c0117b21319ba9002041cb51116171218191a199d941b1c151d1e171f1ec021222895c3230c1427d52f1627202822292d809305042a2b2d800c282d2e2f269985a80b203004c0915c668b0a1538f1006590068d000d0489088143e60e0585be65e000a3a141bd1c3074f058fbc14038821978f8e1f341e2b66914021410e30840112a0be9ecd9f8a7e0a0400b3
182EOL
183$img{equipa}=<<'EOL';
184749464839316410041002c0000000000dbabdbffafff0000ff0000b7ffffffffffffffffff12ef4137474696f60457e63756365727964797e2f6277600129f401046007000c2000000004100410000300687abcdef0d18941c9a4b1e977bb02409d10a8c5330836a2c8b0016bc1cae9c4932e6fb51fe230001168a80a068407c0801818351bc6e318e9d858a89e46b1abb67595bb2be779856862bbed24936fea8d3839b8242e5ae94413d9308ee7a709000b3
185EOL
186$img{conta}=<<'EOL';
187749464839316410041003e0000656565750a30867a3074893097fa20a86b20b9eb10ba5c10cbcc10dc4d00edbd00fe2e0074994074994074994074994012ef4137474696f60457e63756365727964797e2f6277600129f40104600f000c200000000410041000040a70f9c94100a83b5014ceb9d40c03474416c1808a196d961290b59bf008e50824b85ae9205f423ae8e453ca89a01b958a27a49c87697215a905c24198595f63dd67f0684a8c2c5409b0403b8ab616b743515fb4018e10c9442b50f30a7c32260c4c11881b3b5f1c6788898b7a658400855f4f10087b1f551b9911100b3
188EOL
189$img{jog}=<<'EOL';
190749464839316410041002c0000000000dbabdbffafff0000ff37573700003774994074994012ef4137474696f60457e63756365727964797e2f6277600129f401046007000c200000000410041000030e487abcdef032894964553bccc1cbecd70401083933196a7f50280568fd04a0d1a3ab0ba51e5fe13bc767b3d4be5abe14648c7927941ed561924216a78cdea0cd2c54b4aea77930e608b384797190000b3
191EOL
192$img{bg}=<<'EOL';
193749464839316410041003e0000935902651902c4290237e802243902d7d80219b81296f80268c802934902f50902a3490264390200000000000000000012ef4137474696f60457e63756365727964797e2f6277600c20000000041004100004066018c94badb83bedc17802c51a51c0400241320581385702490640211e654f15512b493ac0c0b29c0d6080e40160bc0f59c7526268665e9049e4a5e43822b089a4e04cba1e41da0101c3a8238b8901a0860820a823cf4da8f40eb31703030c0d168788898711100b3
194EOL
195$img{logo}=<<'EOL';
196749464839316091005007e0000ffffffffffccffff99ffff66ffff33ffff00ffccffffccccffcc99ffcc66ffcc33ffcc00ff99ffff99ccff9999ff9966ff9933ff9900ff66ffff66ccff6699ff6666ff6633ff6600ff33ffff33ccff3399ff3366ff3333ff3300ff00ffff00ccff0099ff0066ff0033ff0000ccffffccffccccff99ccff66ccff33ccff00ccccffcccccccccc99cccc66cccc33cccc00cc99ffcc99cccc9999cc9966cc9933cc9900cc66ffcc66cccc6699cc6666cc6633cc6600cc33ffcc33cccc3399cc3366cc3333cc3300cc00ffcc00cccc0099cc0066cc0033cc000099ffff99ffcc99ff9999ff6699ff3399ff0099ccff99cccc99cc9999cc6699cc3399cc009999ff9999cc9999999999669999339999009966ff9966cc9966999966669966339966009933ff9933cc9933999933669933339933009900ff9900cc99009999006699003399000066ffff66ffcc66ff9966ff6666ff3366ff0066ccff66cccc66cc9966cc6666cc3366cc006699ff6699cc6699996699666699336699006666ff6666cc6666996666666666336666006633ff6633cc6633996633666633336633006600ff6600cc66009966006666003366000033ffff33ffcc33ff9933ff6633ff3333ff0033ccff33cccc33cc9933cc6633cc3333cc003399ff3399cc3399993399663399333399003366ff3366cc3366993366663366333366003333ff3333cc3333993333663333333333003300ff3300cc33009933006633003333000000ffff00ffcc00ff9900ff6600ff3300ff0000ccff00cccc00cc9900cc6600cc3300cc000099ff0099cc0099990099660099330099000066ff0066cc0066990066660066330066000033ff0033cc0033990033660033330033000000ff0000cc000099000066000033000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff12ffb0e45445353414055423e203301000000012ef4137474696f60457e63756365727964797e2f6277600129f4010a000ff00c200000000091005000080ef0059d2318ac80e04385070e1458909022c78c012a3c884172a5c5871b126cd8a1b3a44e8f1d365409325466c0982b46ac39a2b52bc794216a9c894376adc595317adc564c4021b18f35951b283497af40a3078a05f974595055a54b72f44ab479a1d9ae4392156a85f9e6dba14dba559a165be8d6a263a2a53ba6bb2b5ea56ba6bd8b051e25dab06fee752ba7fcab59b673b20ecb281f2fd2cb77de0e3c96307362cf891fb58c395277468891166edca9b337efce93438e1d2ab439e3d6a353ae5daab53be7dea363ce9d2bb63d60d5c4befcddb478ee63a34d7f4de91c3b2fe2efb98f2d4edbd830f5e3cb93374e1d9af178e7d587677eac5bf37fedd9befb4fae8dfbb87be6e7a79f0fae1cf8fdedefcfaf7f9e9cbb74fcedebcfbf3f1f3dfcf25514a3d08e25e450ed4702182392860e2890e38e0648d0e4880a4851258c0e58a166841975a5d78655885498840d88626988228872aa892298c2eb8e26c8b2ac8d2ec8636d8832c873ae8932d8c3ef8e3609b3a09d3e09646198420933265f7954126057555585d39a0508a4d49322496562414159c5949d5669552a8d497915e5916214a529985aa936a95d62557627970989f52a957ab9772d9f59063769967ef917af9b520aa7a0a96ac958e0ab62c99821ac6e3ad8289976e9805e6e1e6801268b9a6a616680a67a1ae7a2a69a4ae9ac92aae96aa93d8855e14efa9978e5545a51da361655c1ea7beda3b6359bacaabadafbe78fb5371cafa745fa7caea3c5da8ca0b9ca3bbc20bac65b4ce4b2d25b9de6bcb27b3c67b6ca5b0ee7b4e64b1ea7b6e69bea637f01f681141784026a40218c123fe122849218802788eb284025a0224fa921f2dbcaeaae9eb405c8a7033cd0da0b283c21b9ad035c80f4caaea4752d905a145ce2318c5322f8c188515585162b51234ac2885332fbc008e697d57db69708527841f5ee6faf1b23ca4ec49d57fc997761570d9dce51371d502c28377373b6c54b4694d089a52c51de4f5d83b0683f4d4ba27cbe1d5c9dc57d6db374733f371ea8dc497774b9d15aeae13550158cf2bc05650864defa0650b2f2b5179534d956481d0ec151e4a9b965c5391b5cc03007d85188b446870e48b0e99d5ea9f1e8935e9937eb9b5e0af8e2a79e59f9e995798950837b3db2cbc7dc31b957c4050067ffca5ef80ce9be2eeea575a659a0223980de5bbb69b6c34b5cfeabc8fd2b3feb2afe7c7a82df2f5cb8b1d72f3db6f8d6feadb5f8c67f9df4f6ba1f891391ba230bbc0e717c0be2e7d0c978aede9e6cc9fcefa214528fd1fb49911deb92af928644801bb551e37c7205110b35004909001246f3d49aee35b04b0530d04d041b8e92e2bc08d10ee250190b4fd2266eb6849026697bb6927812e6b510d56b2619f9000661323f852bc052c951041ca08240a1df496ef14951490ad6efb1f8ddea1d4b6e8da6c3bb2026e9ea668167989ec688926da96c63791ad69ca8f618227ccf292c3c0313a885473151f13c5a01164a81d1bccc05c3857123dab602013721d17f0cfbb60ff85118851454248401ebd119f73b804c2c0f718486cbccf4799a2c51622d738dd53af8029a0e23650188d3ee1bf8da368062f560582942ee636b925292f496ac452a237563465211b880b3212b9c125c916d35650b7495a232000f36584e4a7301bdd8c00757aa24b2446b78899a1f7274c19dfba41650f3213650ffa54e05af6eb4b24c0401a8429d011a6c4221ce1989201c5a8c851e24b4d230a097c372dbc09079d357dcc8d71dfc51303ffef1411a13e373cfb4d72d41549990dc96261b7e892b8b517fc49a254fbbf12bc38d4921ad130974c7e1afe00dd465090449ac08fd42bc7501bbdc2e9755984a42f562802849206730911e24d3a7d0b6400e324c0918331d2501f8602eb9201004b3f4ac83ec4407d8821b4634228809b0620742f04a5eb409ac015a69989a54d7aad44aa5113a2162c78018dd2ce05d09cd51dc001d8191bf2a4659008bc4468739993540142b812340ea22b040b0b120b32c5b3591cec885207507cc37a9be72558191b2037a51f82a334420966e7050a02a14db98a8022006a0919392686bf405a72f264a632a3b9ae3a4e8389e395618689d9ce0d8a717b95a35792be34eff183f72e7dcc89354629be4a08e57323b8a14609775019fcc99a7b0a4e5df9dcc30c5322637418416789c1182cbca40dc2af5e156a92a66682b1a283c3526643b5a21a05374d6cecce8acbe642f296ecbbe55f6966941ba58674ea69e2dc0ce84a34d480621d6d390cae111359a184b376a75966e0191b592896e69587cd4a28ce56188d38d09944c8c3e1699409b8ba97d7203d3ce44a99138cf56aa04f2c09086513d0a08a38a4c90248ae40d8831bc452fb458bf6d0ece8cb18dd107e67818c9d553303d346853aac39e033423c57d880847020bbd82be06730d70fbc66abe2929369a2dec51c6ca18074ba433ba0a5ddb8a05431ad4b586eb6a24cd4efd71c9b168a1a9fccb6ee95a7ddc6e2cf92ba5911dd0384798c018d53d2cc6582b602eb4ac0ff605bcb55ebfa24c1bc8c580f5a99f36ca438922dc4f03a67eaf2390b2487b7eccf1a6b8109ef0ffd4ccb2cd90674d85a122abba37393a95c4c94ad14077e6229f995f4e26db1b98a3a103abe3c4d81689b6743865750b3650f19e5ffad712b15a37b7ea8c25a82ad2b65ad98b35fdbc2f7ca4680c4fa140628438d85dccd3ccea921a63a45ada0058810ab360058595514609e639e8c894dc461020f85564ec4f35868e5e1bf032bb1ee5d29d226b46611ea855b4a1be99a62b501af353232e8fa1b21a629263db8f8ba014ca2a99175a7ffd8e6e9628ce1ef06713be03be88a651e43e63950569fa238ea22ba28ca13203fb604b70268e36ffbce5fecc71eb09d30b14335a6e23fbadba932d8a90ebade49fdc803db2772626d5e68d8263572a49a993bad4db85b07cb40e2dbdc188aeb591550bb5a49a2e55983854021308824a38b5e5f634813239627fbccf84178a14ab824288529e47d409b274b71322e735beac799244b895138a62cf2eb5b273fe2a92d760fc4550565d9d38346f8ac4c398da457cd5584ad7de1c94a8100a1737f94c2f5978326c6b71653f14325fb50bbf1715e8b5eda973e92df2b34c146bdc97ddec9b1b77f9a3da5dcda57a27ecbe45ffc9fa90edbec3faee27ccfee25f7aa01fe0db5c3eff08f1f5be55b35b1d34d591bfde85dd1bd12ad630ea99eb53a77ea6f36a607c5a99e89f0533fce53dcbadfa366815723abc8633a95694a33445ba52c6743b14d070e28e7dc5973e075a60772b59438833181813e5d61ca50349c7257645e910b3126ba6008877651ba7818fb6c20be3f27f23d50ef3a713c15b7d55f23df6ab7af6b015e6c75d06363097c97a515372464a1c57a468a6ba35385a6d66e91ba6418593ee73c78478659a32a42766261532f54487918e5b24cd54f4763d310153b4c24021e55827025ec6223113f67cc31835b7e51c250c61257d61646f7825141568bc5707c07d11c86b61995387157c14ac1258197b58558e87af1f01df7ef444a38da3f78d978e73d31772572182725a5067c760572e7587202cf5dc3f23704df6a722d57d6ac07382c64542672775343742563c39a6ba8394522e14265514e13244d01537f76221d13992115d45e05182512682538183ed5f745214c8ea1314a31bc32752043b7d72076708a619674f5891dc5301dc47655538a6868a27925bb8511a27df3ac1d68b67ea8ce2481ea81963c5423e278e7b866503222876c3976e47e065d21927c72e2416248571b440f5807cc31e5964a57152cf77348e1544248c66796576e456d1e09f57928118d315f7a27216057461dc42b4ef5f33e071e2035180f31d76b84383438c72bb61b7fb5f23696009ad72c35b5a28defb5a078e3866314098758748393ac79d76c78d73984318587f6c39398da8878ec73e51f5d331a1d11b336d6db5f39901249be87d0da0108d05b29851035e75ed5a91dc4335822af7bb24f7172d137f75511000b31008045053a8d19a41ad54a5a72c212b88c2bc4a821e3bb8818bb3326c88288865a79cd30a7a09265607024e95a54b88a39ea2c143486017a8ba5408e12a272b40c33221a8668801ef5180556d42016436fd6891369358929c01dc4080ad89e5869499139c655f8fa2f24a390a39f5c15446d39a899a1b481a3131b13c992812b63928b9687d94d64727682163e774b35415c89640c52d7034974b99034a27f599d6741a85bf7e493c340ef9dc4481643f67353306383ee7ca0ed8851e85533488508d53af1591a447a63e38f15d5692a571f94795d59f49f3253957cb8658333c55ec2a079b6ea42491e89b58a65a69075527444e4608ac0828575183a85788c51420434a74424ba60b3706cb75342493011b79915202b03230d0e28611a175733a6a21409a476b93e72317471b1f2a1b9ca66c74043b8b55f74647db86d76d8743c66ca5243c17716c38d225b9b86323066d933417b56b7709ec68f73216732b0c35ba3de4e4a2967774431526690221000d9d127412e415a651035559dd963ab72687954d294925f7f130a7908c444896f9b53679fc8be2489497258918f66fb6b18f080b2421799ef0a4436639e489016250838186e4eb4358f5a01aa71100ba019a482a01bd632879a5c6939520294420fa53a8685cc5046193721d9a377211fb24869f9cb9f21e193329b9976dc5076cb8a133b47c84c9fa9ec9ee8b264f8c0853a607322bd6016406ca3b89b09102194ca01a44155759e48815624e7123eb4c35c73e73b856725517b5ed40413ca394335314341a20f35459a56da32c4ee49e6b34123180b152541875c681a08a448d2ab050c45c9711b53b381737810d23e7afa714c3a2d20cae68cc8095fc7f44d28ee34586d7941c73ce6ad4b34ce62305508772c583a9ba501100567ac69c6f85848572891650d37717c346c8922723ff2550944bc0bef1bde6f40650c20723823d22201de6923c73923ac4111901f40fe4880af2523358b9632b523050f59319ba5d78609eaa1899aaaf4398d04ea9dfa211005d72aaa3b80d21881179a15d7aa58b983a3159952895ba7c816acf11244214199669fafb66b64196090b273a316229739f5b5182835793935f4275c36fc2b49b6af572c7d29ba6593a7ae051a1c5bbf9148c38264628279db9174698f97cd2cfa1c5eb90e5e05fd78065faf48346d28a87607bc02c9be237b435e961a7d6bbb7c556d8236a0b2e91535d9397ef97088a3ff1df945be57fb360b80b9f82f3a09c975abb0bd475521c6ab9486a5545be6ae54595c45ee85c55897754f437969bdf4c8ef45393f38e7cf6376fd8c9b4493d7fbae5b024df672bbf6cb3804a8808bf58787b9378b7c7317c69f3a493539f48be9353f076fa2152c855b0c3a43a072c7019daaae9053e19466e9370c5499c8ad7e6a949d07d2ad91962ff3ab2bb3ca1a6a9fa163273e8837489737b451ddb466884117531e1ab497ca331e087d30070e531ad6249854a6980d70621c87a54220d3c53fa983c6336837d10842cb064127fd2f02128fd5265444b386265c9395ffac15f7b81c8f4ad7e083f8757933ee90c34e1bfaaeba95f717ca85774816b5764ebc2c1cbb4a6a60587cbe65307e82df995ceba9648f6e433161a3d89fd3c4400a345e53976009d5c7b6e116363e5b64ef0076bb9dab2ab81df133aa183cbe683bb85321805bd8137b114ef8f7b0b99f806c70c65870abb6fb387b88832cf874d206c3916b6758a6616cbbab4be8762cdb95911570171acd6cf22a494b96f855c91b6cb42c88b055087a2cd866a32c8e63cfbf7b563da7e190a15497f929561243a90bb76a18acb77541ccb616648ce7874c93c0eb31a4e65a09c6b7008075062308a579a381026acb0cf08ee949b0b94790f9ecc599cd13d29973b9ff956ce4c2c5bf8acbdf75fa5ba49146387930b3363a4b95836aebc6a75cf5412cd429721eadbc7016c6ca004b4f2d50b70823823ce3009e3ac326c9ea496c3acaeb80c3dcfebf77f7c4ac2e1389779e9b3eb9ef0b3396c75bb02d8a127c18b9c9fa42ebb5c56b0e234b6e24a5a9b117b1c971180da0e0d9174f2080523823050b2bba9e1cf0796bd72dc7d7b73285bee9bd336c795c0565cd49daaf8b368a97689d09f2de63f09bf83db207405ccc988de32cbe2de6cafcd4bc72d81e39ec9533ee7da3fc89917dae0d1802034f2650d50823ce60133aa95cc54d89aaa705ffb9ccc6c718c2ddf6c59f91d4543daf936cbc9c9ce2cb7b819b2112116ba9b57d5f5907514907d6abc3a661c8f8728bc69b0c5712231d06d0e0d7c64f231d51d1d408d997bb25a1c8b74a3f507da5c582f09114b79a9cdbcbd34c9ec9b9cb7b8fabc879b0244c375bfd514ac32dab91c7fb75ef7315836fbbf57c3a709b2dd1cfeb80565825bc01e733b06d004dca040314bc5054d650f40f7db20100fcabb9417c89f3cf7b45709d8e360c7fdc113ba5d926bc91afc1d877af9891cc555ccb399e5abcb72e452bc64a6a141c16c29788c1b686335bab57bd9b833763c7aa7d01d02b0dadcdcd50a7064d13008d520600f6cabc6cc80496bdb887cf9de6cc0ddd2b82177ac3c8590a2ecd6c339d2e5f8cbb811fd8088389d0900c5f7ee3566c2efeb34c32de1a5185bb9fdf3c2bc67a68361aa74a74f0d5a0503edcc5041db20f40013600520039afdbfcbdb454d9c76d7a39d647a45c69d8f8d4ec4dd7bb47cab7acec295db3cefd0a1d5cde3cf94bae9cef907ef628b2dc9db897bf938213299dbaaeac753d77b29e1efe49eda2308d700eea88726c88b92ef2e65814c60e83d92c98b37ed4d43213ed0217ca0c8a63ec3f97dbe6a366d07dcbfa586efcb81e298d4469e4cba3d7dd12719dafc6988917d5da00d087d14ba70d7d823b2b51b01334484bccd4527f416306d50cbc9a827ae064ec931af8b8fd0653e7b9800684ea7e90937c47d9f969eafad0bf4bae457ec0bdde9e39f65c5879d0c89b8936488845d994126d294d1e6c6ba0a7dddcfdc623c2008d600e742fac2d27e28b50852de0e5a41fcc84cebf47ab58c200923a66c488b4654e827abaa63cfd6665bc06529b27e1ab15628bbacc729f5507e19cef89fb6d52f2e5c0f233b00d04ed4e9d8ec5012e823b5e013100f9ad6249b54488867267a10d01ce61f3e48bb6e81826c38714e8eb1fdfc128ed0444f68748c7221b116cfce50ea3af9e3170bb67cebb018eac9e9f9b0f5a54bae1770b3c2fdadb171162ce51d08d5b869ee4dc7caf6c2a76d3cc20fdb6032cdb65df21073d8998dd3a42ddaa35d457191f3987c1092ac9dd2fe8085a82ba02f53a7ebe6d62a47f1d76fad410b30d03b06c63f29c6180a70bfef40230efefd42dd5bc5a804a30e8bcfe5c559b3efb0cbae1deb86c90c26d9631e1298f8df7ecac89d61faebafcc6d68d2173ba9fb1bb3c9bc9c1d94b88fddbbb6248294dadca0503d509ed74efd09e55ae1dd4e0cd3c67958e945b00dfabc188deceee2d4ecffc0926af5eb2bb0cf4cb19947630c55ce8c64ff5f5a5a3d46bf6f90442f9dc643b3d058776cc3f233edcad6c600334d750001c5ca85191f485ca851a22082b564ca123478ac4951388bc81a44a8617265cb8b192674b812f2a6419915229456e055e840911732a419a2d2a9cc8e216264e81132ec40971f3a84f90138a54d9f0d42b4292319e8c2ab395e350a62156f4e922dae2dd8c1f52352a04b467cf8251be5d69f0b1295d8413c6a4fac6dded48a24fadc5abcacead514184f60a1830ba0244852491497a263d285aab5976dccaa6b1f9ca8a41523e3b833464c5bd6d624ea955796cefc9c24ba26ee962d9ed47cf27332eea17b866dac4177ac42d6af0fc6e9aa9cad67bc2b63764a4c632de1dc1d07e4fcf958b3eba9bb33e469ca8ee53653bee60a34a75f471d33095cf54800658231c59f2f0ffa793738efc17fbab77ade5d7263b7a947afb8b2b3b356e097a6afdc872cdcf3aae7b3caba10b931e0eaffcfb3d89a4c8b25c69aefad23b45b1b02b6f03cb96eb7e8247be8b1a0d32f6abb60a9bb859db4faeb850b200b512086be726986c3ac9b6944b50704a94438d03c4d25bafeca5038b2da7b6dad26d2fb1d61342d14898fb7c48c321d27a84b707f3f0d7462fda8c40c60784bfebc90b345c8834f20430b84b0d52a139af2d5a235999ef56ea864694130135854eecfa380123065021c320e6dbf152390b9bc13cc0a4b24b4e3207d2cd8d4e86e3223936090cfae343fe4a225ebd1d3bbf69c82b238ae145fe1cf159bb49252553cbda83b190c6f6d27f8da5ec743f64564db2d9650ab2a1aeeeace6faebca00fa488138b3fc2d903236d245445bcc5515ac805d1d4d3e41d42375d5b055ac1317d3d1beacd5b8b42965dc4b53e434ac633df225bc47b0116d1ae5b6d4bcb5b9de298ce7b031a6bd64b1c53b53c65429e661b6ee244a49cb209deafa284604845830aeda27ed8d4edc47ebe9c7bac20cdaa258217294b5b8f8bd055d56974ccc21cd7b255aee3e57f545315d4925e6b04e731bb9b6ef43953624d0615b9cc936590f9333176035919e68dbe65c36f900ca4891d15b9e35475735ae7cd8d3be0bb60b93c89fa2d73330a9edf906eb5bbc79d8269f1d3511c477d29da9d403edbb375ad6443a5c2bbfb5b29e329f153a72cbbbc5c17860e6929e2fc554f2e26f098f9881012bc05ddca7435d24971ad8ac3572f64fa57ec69ed15f3eba0f52c97b1abfee4b3e6491bdbf25c556755d372a3e684392dddb6b71e6245aa28172c2fb6d418f437c654bbcda89b040a665e1661702910a0484941ed9d9b1bd023974eb147bd1480317fc792a91cccd983f6b9ffd3f5231ded9dccd2d6713355bf3d79974c7c20624ddcbd1dbc07e52645bde04b3a9d568ef096af3325b5c41ca868de5001758ee02b850deae419ccb7133011d8e84fc1115ef8559baad110977172af127e97f695947ece500b4c1f60e67129ddab4571126791c406febd0dfd4477a3df9ef8473fb22d7fcd7c912d4954e41885505f001d58715101c65d2a5d37488043d75beae5d6a3018fc843e25b5266d6ffa0d9482e23e2bdd01bf592b0a0cee5353bb718e4460aa6a1bbe57ef3f0afee583049b1ef0187da7354ba556a2c26592b66593ed4be8694cd95f48d81a3f75029d3a4300ea7e5326150ecb4a454b612ffeb69b3f91edea65f1306da208dbbd0afbe24d0c76dcfe57b9241ab178470be12888e583c194ab636cc227d11507e5af22ea8bac62a47bcdc6290cce5da03e25691edcbe82a64fcdd804971a79da0fa629c44df6ef766adf08ea698f331e69e13bac0d04a807abb61a4b0e73d45168c2a4264d8949ca925aef42177873422af8af304b4366ea041fb195a09f7fea625111465d238e11f037d25f5ddcb8cbc74682944064501ace7794b32198466832a8e7334933b8dd39ce7de44c091d48974f2e6dcd9c1a6a4994b681c31e139f8005ea13de683733dde6e4786bc4eae2437f31a1cded610550ef1907fb9e8283b2ac52de50d2b5d490f9ab6568cb080000129f4010a000ff00c2e0000000281005000080ef00ff90c1840b0a1c388031a2c58c0b1a3c780132a4c9841b2a5cb88133a6cd8c1b3a7cf80234a8c1942b4a9c398235aac59c2b5abc790336acc9943b6adcb98337aecd9c3b7afcf90438a0d1a44b8a1d3a8439a2d5ac4b9a3d7a053aa4d9a45baa5dba853ba6ddac5bba7dfa063ca8d1b46bca9d3b863daad5bc6bdabd7b073eacd9b47beaddbb873faeddbc7bfafdfb0830b0e1c48b0b1e3c8831b2e5cc8b1b3e7c0932b4e9c49b2b5ebc8933b6edcc9b3b7efc0a34b8e1d4ab4b9e3d8a35bae5dcab5bbe7d0b36bce9d4bb6bdebd8b37beeddcbb7bfefd0c38b0788ca401ba048cda402b26568fc6650d7512f4ebc997377edadad538e0d50d47becc75ef859518d55f5b65cdf8b4ffe1e7cfa02f5ed4f5b9f9ef8357be2efdfbf8f4a7ef53b68e517ba8777f587558e70f1f70adc7dacf79ed479c957c28e700428a0676efd67f0ad7ac957550b070eb751e58e95684f1770165765c78af9a01000042276626d718ca7d12e7af500a2c881366662a68cd118180027508780eb8036f889dc8a1a02be502750028f9b7b2ce8b2429a4a56f36d724249ded19000699525633a5382ad8252e822ee826e8929df8102b2302480e159226b9e6246566776f14944237c2a88f2aa09729933e384720a45aa07560058e46916b2002a8c1aa8026e865e3a09af72922ace9a9b2cb8a9e6a3fd4a0d148f768779e59c8e8a4a20905822279a60afe93aeaeb9ff57a7ae471528712e5961edaf89f7c524854a51c28d92c299ca4c953aca654a94be2b599381d9097ca2a1c25b291f98ae1b0227ba99c9d5a572ee9b8e6abaeeabce6bbb650400129f4010a000ff00c2d1000000371005000080ef00ff90c1840b0a1c388031a2c58c0b1a3c780132a4c9841b2a5cb88133a6cd8c1b3a7cf80234a8c1942b4a9c398235aac59c2b5abc790336acc9943b6adcb98337aecd9c3b7afcf90438a0d1a44b8a1d3a8439a2d5ac4b9a3d7a053aa4d9a45baa5dba853ba6ddac5bba7dfa063ca8d1b46bca9d3b863daad5bc6bdabd7b073eacd9b47beaddbb873faeddbc7bfafdfb0830b0e1c48b0b1e3c8831b2e5cc8b1b3e7c0932b4e9c49b2b5ebc8933b6edcc9b3b7efc0a34b8e1d4ab4b9e3d8a35bae5dcab5bbe7d0b36bce9d4bb6bdebd8b37beeddcbb7bfe99ca401ba044cda402b265e73a665cc7511f2e7c197275e2adad536ecc50d379e8c75859514df3eff5b658d78b3fdeddfbfa00f1e73f5b7f5e783479eed7dfaf6f99fdf53b64e38fa2de3f577558d7ce1e759db7dace75ed375c947c28d70041860a46afd57b0ac76c947550b030ea711e48395580f167c064765c686f9a01000002646226c718c97912d76f500a2c78d2a3622a588d108180027507740ea8c26e8d8db861a027e502750024f9a7b2cd8b241964e26b36c7e32399ed090005955626f2a5342ac8e42d8e1ed8e5e7978de8df1b2ff138cd149e16a9a6616166672f1390422782a78b2aa057289f2e28072f905aa03560018226516b2cf19881a98c16d825e2ac8ae7e821a8e999b2ca869e5afed3acc138b767739e4988e7a0a2f8422175a6f9b4be92aaaea9bf56a3ae37d4277d1e4921eca489e78523814a51c28c9eb289ca4b913aba654990be1ba8928dc9f83ca1adb24b781e94ae0bc126bf89b995a47ede8b4e69b6ee9b8e6ab0450400129f4010a000ff00c2c2000000461005000080ef00ff90c1840b0a1c388031a2c58c0b1a3c780132a4c9841b2a5cb88133a6cd8c1b3a7cf80234a8c1942b4a9c398235aac59c2b5abc790336acc9943b6adcb98337aecd9c3b7afcf90438a0d1a44b8a1d3a8439a2d5ac4b9a3d7a053aa4d9a45baa5dba853ba6ddac5bba7dfa063ca8d1b46bca9d3b863daad5bc6bdabd7b073eacd9b47beaddbb873faeddbc7bfafdfb0830b0e1c48b0b1e3c8831b2e5cc8b1b3e7c0932b4e9c49b2b5ebc8933b6edcc9b3b7efc0a34b8e1d4ab4b9e3d8a35bae5dcab5bbe7d0b36bce9d4bb6bdebd8b37be63aca401ba040cda402b26567776658c7510f0e3c987173e79dad534e8c50d277e4c75859510d92f5b654df7efb2fbe9d7bfa0eedd12f5b5f1ef73377eadfcf9f4fe87df53b60eb7fa2befe3b7519f8e1d7a8da7dacd71ed271c937c28c70040820e166fd4770ab72c937550b0ffd97d0e3888548ce1578063765c582f9a010000c1a16e16b718c87512c72f500a2c6892e06e1a484d1f7180027506700e98826d828da821a023e502750020f997b2cc8b240924206736b7a32295edf80004915af5b2a5302ab8a42c8a1ec8a5e69c7dd89f1b2bf1288d139a169966ae5d5657ee129c321742a6872aa017279b2e18c62e9c4aa0f4600d76f5116b28f18841a88816c8e4e1a88ad7a820a4e989b2c9829e4abed2a8c12877667f8e3948e6ac92e8022071a6e97e91a6ae99647f55af9e279426791e39e0eba979d745228d3a51c28b9ab279ca4a9d2aaa65489cae0bf79189c9e8fba0a9b23bc71d90aefa8125b489a955a37ade7b0e68b2ee8b4e69b5150400129f4010a000ff00c2b3000000551005000080ef00ff90c1840b0a1c388031a2c58c0b1a3c780132a4c9841b2a5cb88133a6cd8c1b3a7cf80234a8c1942b4a9c398235aac59c2b5abc790336acc9943b6adcb98337aecd9c3b7afcf90438a0d1a44b8a1d3a8439a2d5ac4b9a3d7a053aa4d9a45baa5dba853ba6ddac5bba7dfa063ca8d1b46bca9d3b863daad5bc6bdabd7b073eacd9b47beaddbb873faeddbc7bfafdfb0830b0e1c48b0b1e3c8831b2e5cc8b1b3e7c0932b4e9c49b2b5ebc8933b6edcc9b3b7efc0a34b8e1d4ab4b9e3d8a35bae5dcab5bbe7d0b36bce9d4bb6bde4aca401ba04cbda402b265e6b46654c751feedfb187071ec8dad532e4c50d175e0c7585951cc31f5b650d77b1f9e5dfaeffa0ce9db0f5b3fdd773275e6d7cf8f2f38fcf53b6cd37fa29ebeba7517f4e1effd3fdacc7ddd17db927c28b7004f7ef1f52fd3730aa7eb927550b0bfd8790e28d75388e1474062765c48ee9a01000081ee5a16a718c77112b7ee500a2c58522e5a1a380d1e71800275057cfd88426c877d98e0a02fd50275002ce987b2cb8b24f8e36d5336a7632191ede800039d4ec572a53c1aa8642b861eb865e5917dc85f1b27f1184d1296168926eb595647ae1198320702a5832aa0d626972e08862d984aa0b460097ac5d06b24f17801a78416b8a4e0a48ac7682f90e979b2c88e8e3a7ed1a4c11837657b8e2908e5a892d8c12f6d96d93e90a2ae893f54ab9e17045425751e29a0eaae69c70521893a51c28a96b269ca49992a9a654798aefa479085c9d8bbaf95b22b171c9c9eea4124b9799915a276de6bcd67bede7b0eaf810100129f4010a000ff00c294000000741005000080ef00ff90c1840b0a1c388031a2c58c0b1a3c780132a4c9841b2a5cb88133a6cd8c1b3a7cf80234a8c1942b4a9c398235aac59c2b5abc790336acc9943b6adcb98337aecd9c3b7afcf90438a0d1a44b8a1d3a8439a2d5ac4b9a3d7a053aa4d9a45baa5dba853ba6ddac5bba7dfa063ca8d1b46bca9d3b863daad5bc6bdabd7b073eacd9b47beaddbb873faeddbc7bfafdfb0830b0e1c48b0b1e3c8831b2e5cc8b1b3e7c0932b4e9c49b2b5ebc8933b6edcc9b3b7efc0a34b8e1d4ab4b9e3d8a35bae5dcab5bbe7d0b36bce6bca401ba048bda402b26566326650c751eecdbb977f6fd28dad530e0c50d073ecb75859518cffe5b65ccf6b0f7e1d7afa0ae5d7fefe5b1f9df63173e2dfbf7f0f977cf53b68db6fa27e7e3a7515f0e9d7dd1fdaed76f1e9b917c28a7004e7af9c5eed27ff997ab917550b07fd7750e18375284e1370061765c38ae9a010000416c56169718c67d02a7ae500a2c4812ab561a28cc1d718002750478fd78026b8d6d88a0a02bd502750028e977b2ca8b24e8a3ea5f269723209dddd800029946a532a5381a98242a821ea825e4976db81f1b23f1080d11921679e5695556376e109432f6c1a48f1aa09625932ef7462c944aa074600572a5906b20f168c0a68016a864ef908ab7282e9cd969b2c78a8e2a3ed0a0c108f664778e19c7e4a492c8812e6996c9fd9f9e9e79fe53a79e071424711e19b360e9a469b7c420853a51c28992b259ca48952a8a654694aeeaa69f71c9c87bae91b21b761b989eda0123bf6989d4a172de5b8d66bade6bcd26610100129f4010a000ff00c245000000c31005000080ef00ff90c1840b0a1c388031a2c58c0b1a3c780132a4c9841b2a5cb88133a6cd8c1b3a7cf80234a8c1942b4a9c398235aac59c2b5abc790336acc9943b6adcb98337aecd9c3b7afcf90438a0d1a44b8a1d3a8439a2d5ac4b9a3d7a053aa4d9a45baa5dba853ba6ddac5bba7dfa063ca8d1b46bca9d3b863daad5bc6bdabd7b073eacd9b47beaddbb873faeddbc7bfafdfb0830b0e1c48b0b1e3c8831b2e5cc8b1b3e7c0932b4e9c49b2b5ebc8933b6edcc9b3b7efc0a34b8e1d4ab4b9e3d8a35bae5dcab5bbe7d56959026518a6b590465ca0c60ccaa7faaad6b177e6ddbb5fa5bb6dbb7b020e3c37fa0b2b2a8fddb6da293defdccd934f511d5afcdb60edaef3de0e3cf9377eeed3e28fb66daabce55bc9cb3fa27ebb7af6b0eb51b7be0cd6f07617e1006fdd7a6da78c1f73edd63c551c20d7cd90840ea5606879c5f72c951c0e97a24000044896d482e5028d9285ed97108a001a7866d48706271f50208c51dc5d7c1678a269502e182806718c5108497bdda082ea063ed8361b82edb8d3a674320054a19161886d45832ef852e3882e3905e75c2ab7ca0c7df53714e38a5e69d5949acd87d36c89b568f0278a289915288cf589d6609a2019108c906918da4b7516287163862e09c76f9bedf95766775ea0c1e1a88287086f6df1b9ec11a446e90964ad26585b95ae6277b7e6ac52b7a825a0c9f8dc93844e084a27573be529df9c8650b036eba152b2e5a88f9a516568a8ba85bf9f6f22da77aba1ce759665a4b6389ce95f5a293cd3b4d65b6de5b8d66b6750400129f4010a000ff00c246000000c21005000080ef00ff90c1840b0a1c388031a2c58c0b1a3c780132a4c9841b2a5cb88133a6cd8c1b3a7cf80234a8c1942b4a9c398235aac59c2b5abc790336acc9943b6adcb98337aecd9c3b7afcf90438a0d1a44b8a1d3a8439a2d5ac4b9a3d7a053aa4d9a45baa5dba853ba6ddac5bba7dfa063ca8d1b46bca9d3b863daad5bc6bdabd7b073eacd9b47beaddbb873faeddbc7bfafdfb0830b0e1c48b0b1e3c8831b2e5cc8b1b3e7c0932b4e9c49b2b5ebc8933b6edcc9b3b7efc0a34b8e1d4ab4b9e3d8a35bae5db095902651826b590465ca0b6abca27faa8d2b967d6bd7bdda5bb69b37b02edfbb6fa0b2b228fadb6daa83cedd8c5933f51dcd9f9db6cd5a3ceedfb79ef367ceadbc27fb66d2abbe557c1cb2fa23e3b79f0bcdb51a79ecb56ff6613e108cf9fe5d974c1e7fddc6fb551c20c78d9f700e75206775c5e7eb95180e87a240000438d5d38ed5024d9181ed87108a0c0a68a5d3830617de50208c519c5c78166862665c1e082805718c51084877dda042ea023ec8751a8edda893a570320014a09551786d448f1ee812e2842e29c4e4582aa7ca0b79f527d3e2865e59159396cd77936b85b558b0268a2889d42788f579966f8a2009108b945908da4a7116183162822ef8876e97ede91765735ea081e0a48277c76e69f1a9ac10a046d9c863a926481b94aa626777e5a852a76824acb9e89c92804ef70a2457e5199f9b823650b0f5eaad42b2a5a78b9a512567a4ba557f9e6b22ca37aaadbe455664a0b6285ce65b5a19fbd2b0d64b2de4b4d65b2450400129f4010a000ff00c267000000a11005000080ef00ff90c1840b0a1c388031a2c58c0b1a3c780132a4c9841b2a5cb88133a6cd8c1b3a7cf80234a8c1942b4a9c398235aac59c2b5abc790336acc9943b6adcb98337aecd9c3b7afcf90438a0d1a44b8a1d3a8439a2d5ac4b9a3d7a053aa4d9a45baa5dba853ba6ddac5bba7dfa063ca8d1b46bca9d3b863daad5bc6bdabd7b073eacd9b47beaddbb873faeddbc7bfafdfb0830b0e1c48b0b1e3c8831b2e5cc8b1b3e7c0932b4e9c49b2b5ebc8933b6edcc9b3b7efc0a34b8e1d4ab433665288550a5d6520951b26a1d2ba9dba653b67dfa167c61b6deadce9d28c67ee7db2caca8ddf5fa5bafdaab6b072e6c75c174eb5fa9576eaaf67ee2e2d5a35fca6dfaef95b5e8a75507de4cba47f9efdbaa5f652e99bd66d9b9547700cebdb4d0feb5e76f6d9b551c28a72d1e7afd45cfd57fbdc78b95120677a240000c18155288d502ec108bd577108a060258e4528dfdf67e50208c513cda721e4802635616f72883718c5108c671dda0e1ea0c26b8b49888d59833247a2200b32f8949586dc28916d8b1618e161964e1522297ca8973fd077361805649541290c56733e98fad3850a48a207974a582fd5936ed8a28e8100a9841f7dac87b0ef7d0e08c16e827ec91e5d9b6e37d4ea0216f9e7a5767ec63f9894c9e9a3eb968e1a32e28ba13a46a471764a25a8708a2a6b1d83c118a36e7a92151edf83f1a8650b09569a742b2b24526859a51c4e5aeaa251f1d652aaad629a7be15f5e2aaae08fbe35552099b51bace2bcc63bece3b21504000129f4010a000ff00c2880000008010f4000080ef00ff90c1840b0a1c388031a2c58c0b1a3c780132a4c9841b2a5cb88133a6cd8c1b3a7cf80234a8c1942b4a9c398235aac59c2b5abc790336acc9943b6adcb98337aecd9c3b7afcf90438a0d1a44b8a1d3a8439a2d5ac4b9a3d7a053aa4d9a45baa5dba853ba6ddac5bba7dfa063ca8d1b46bca9d3b863daad5bc6bdabd7b073eacd9b47beaddbb873faeddbc7bfafdfb0830b0e1c48b0b1e3c8831b2e5cc8b1b3e7c0932b4e9c49b2b5ebc8933b6edcc9b3b760cca8550a1d18ca496b2f9bb686652844396b20b167a6ca7d653ba55faf4b59a2c2654599d45fa95badca759022dab16fa85e0c3ae5bb6dac6bbe0408ea4c6fddb9973f6afcf9b53bd8c57ef3b8a2bcbcf676add9554f0d18c5f59ae7d3b308517e5967f7e2d9430a4e4ebcfcfaf845776d4b2fd5177cd86650020bd87efda00000864dd78f1873ad512e9515e938ff14834948ca0172a1e680a57bb567b2400a2000f0278249480268670ee7a02c6dfd98a2400b22b80497850a02222281b16881ea073aa8a3605e2ea70322714668a286874ee8dd1180e988fe198816f782a1915af4e2618ce9e714a98822e8d5a797f9a7ba50270a581b1f691aa84fd99c39b82d9886adb934af7932d9a35a9062b9fa198c0e2727af9d3948a4ed68cdc8c2ce9e0ec988ee49e5f8d826907af73962a9e9d6702094366829e6af7218a4ef8976c76e19ac9289ca13932f6eaaca6f4a62b787a8707eca14158fadb9ab2152a9b7332a6fb61b6ce1b8c62b0060400129f4010a000ff00c2b90000005f00f4000080ef00ff90c1840b0a1c388031a2c58c0b1a3c780132a4c9841b2a5cb88133a6cd8c1b3a7cf80234a8c1942b4a9c398235aac59c2b5abc790336acc9943b6adcb98337aecd9c3b7afcf90438a0d1a44b8a1d3a8439a2d5ac4b9a3d7a053aa4d9a45baa5dba853ba6ddac5bba7dfa063ca8d1b46bca9d3b863daad5bc6bdabd7b073eacd9b47beaddbb873faeddbc7bfafdfb0830b0e1c48b0b1e3c8831b2e5cc8b1b3e7c0932b4e9c49b2b5ebc89b23b26518a3702b2f9da4668ab995902ece9da8a65d3a79e5b2dca655ae0d65aa0b85155a5f1db66de5b9e5528c33d65db2a8be62a7dea5b28d8a3010ab2ba17fd63e7c1862f4e6d06b07adc2aa41ffe5df7efe5765bc737024d75e974f9e006548fe97d39337fc0868b7ffedefdfecbe6da556ffd1c57665002aa5778fda0008e7935c72f967d9d51cd951fd1289f92863138ca8f6c99c6202475bd47b2400a200090a5853138a1e66106d740aa67f588a240052a9833168ff902c1a08ba94821ea013298432d482697a2a07b3e48a2058146d87d9f7ad1789e97821ed722209b46c482ef76e1d7b328822ac8752691f1975a50210248ba9d631298ee589f21a8cc1780a5a9d32e733ab9d2d89a5a999a97860617c62e903138446c62c5b8c24d9806b928ab43edd878a49a62e7d8e0a3e1c610ae8e2e48c865a97af7446e837ea70e97a69a696a9199669a6a2c446a97c127277a66ba439389a5a94bed4c91a7d2a869befa0c60b2ce0bc6504000129f4010a000ff00c2fa0000001e00a4000080ef00ff90c1840b0a1c388031a2c58c0b1a3c780132a4c9841b2a5cb88133a6cd8c1b3a7cf80234a8c1942b4a9c398235aac59c2b5abc790336acc9943b6adcb98337aecd9c3b7afcf90438a0d1a44b8a1d3a8439a2d5ac4b9a3d7a053aa4d9a45baa5dba853ba6ddac5bba7dfa063ca8d1b46bca9d3b863daad5bc6bdabd7b073eacd9b47beaddbb873faeddbc7bfafdfb0830b0e1c48b0b1e3c8831b2e2bca401ba0409da402b26561b2565897514e8c3992756bc44dad53cc8950d66fc4975859510a38e5b654af1b6e3d9a75fa06ddab7e5bdd1bf1376fcaaf6fdecdb377f53b60bb1fa23dfb357511e8b98fdcdddae87cedc19d33b01e002ab47a96c74eff57fd29d375161fcf677ffe533c3f62d8db3b593f2c5540000ce76abfed18667970e2c500a2ca79f1c4ee9874a13718002750a60ddd78f518f2de72e9023b502750020c9d6b2c08b2448216b4706f6a02685bd380008812ea4bf9530f9f7a1208aed08a2ea892d189c1b2bc1678a178ae5d863e94d2696eb168c02564f9a77f9a0142b8bfd57c3229c1aa0f1600d4aa41e5b28c1c74e9c78e508e1e5985a17a52494b9c8b2cd726e89bbd6989167746a6f5e7845ea9c62280f146176297b95967ed87c599f6e66912a69ed78eddf96291742267d0a51c28f8a82b8ca4e8df9e9654c8c7e4ac295799928f8a499827a9211907e3a8e19a139e852a76aaeba800b6ca2becad5504000129f4010a000ff00c2fb0000001d0024000080ef00ff90c1840b0a1c388031a2c58c0b1a3c780132a4c9841b2a5cb88133a6cd8c1b3a7cf80234a8c1942b4a9c398235aac59c2b5abc790336acc9943b6adcb98337aecd9c3b7afcf90438a0d1a44b8a1d3a8439a2d5ac4b9a3d7a053aa4d9a45baa5dba853ba6ddac5bba7dfa063ca8d1b46bca9d3b863daad5bc6bdabd7b073eacd9b47beaddbb87192b214ca209f5b218ca859cbc49591e55e7ff6061c3890b15b67dc0b16149891b0e51656583e1a7da594eeb88b2f5eccb243f6ef97d25f7eeba89136e2d5af47fc4d7dca97edbba827bebc5506b969d93357baadf931ff56cc206308fd0cd62de8c5c953066c55854fe2dbcb9fdc7eaa52b1f5c65aafe3c651100086fa9cd7570a0d3dd53ce00a22bf9799cd1ab46dd1800d51bcebbcb9f9f135a70d9021a50275002ea196b24c7b2cf700eb45fda68f9183a5f700838f06b49e953ed1b780ab78d5c781668b25d77b1b29b917699288dd88426a4b1e46ca918af9062e1675e9a0f2a689e517a2ad8a0aa0d0600b32b4fc5b26b9772d1876ddb7c0619642d684af82a188b2497056499a5296891753e56d463824669a5ad7ed9f5f5ed85a119466985bd49d562670a567d538cc5b9821d621a17bf951c20b887a68cac98be1a965c78a660ae2117781e7d720977a2ab29c8e56f96d94a331a8312368967ae9e7a0a68a9750400129f4010a000ff00c28c0000008c0003000080ef00ff90c1840b0a1c388031a2c58c0b1a3c780132a4c9841b2a5cb88133a6cd8c1b3a7cf80234a8c1942b4a9c398235aac59c2b5abc790336acc9943b6adcb98337aecd9c3b7afcf90438a0d1a44b8a1d3a8439a2d5ac4b9a3d7a053aa4578ca401ba0485da402b2656aa7da8ca2cea2ca957b27deaf53d234b67d2c6851446fc27d5165658adbb60fa5b27b757c6cd9b57758d5cb87fa916eb75bce95ab28503165b68fa95bdb55751c55c37ba43e1cf87aa1e65299f29dca769543600c9b334d8cd654726da76ba0b0dc2815bae8acaf0bbd1d66da8ce6ca220008bdf43732e04e716f2e6c10458d62ec4377b67b793010ab22773b0f1e0d79a1f6d28cf6c60ab2086170e51ec7507fee945a32eae3e10b6700be9df153e6d6772f2fbcb6b3faf6f5152d156ca8563a9c57e5d600608341e7f65263ed57c5df65b907a20387f9172ad1831e97a28a710068641b6dac46bbdb6dbdc6cc5a722e8819598b1ef5dfda02c5b8e2a16626853a948379a8aed7863ed83dde6851f841a061260920a4603ae846197271d6ae5a6a4a0519db73a167650b0906597f1b24022754a51cfd19e52251a9855d969d125976615f0ee8a5ec6f6635502c7765d9a7ee9c76f9e7ef9086c410100129f4010a000ff00c29c0000007c00d1000080ef00ff90c184070e5365809590a5518a1a5978f0758595150b2a5cb88133a6cd8c1b3a7cf80234a8c387011ea214d0d124ca2b2a5a8c790336acc994376e5bb9909550249e0fac346121b525ca944b8a1d3a8490ed4c99335602040172a057994baa5dba85592ec29a39163cb205f12bc69006866d3b863d68c5ac4312f4b218022b09a46dcaadbb873f2b5656d01e247a15ba00dab002fa1e3c959dedc65e6dbe751b47750082b88b2b562aa89f62c39d01018df936754005139f2b9e3db633bf5d9e03eef4ab10447164d4bb6f546bdaca13639c33eab61c2494796bd4c98b2eb6d7dfa3e8a652439d9d5c3af9eccbb9517e491575c0600a2200479e0e11e9f1f4ea0db2cd0c2474f0f0fce5fe25ddd4b7f76b2c2c93081dde3ffdd1f93dba766e1c946108e7402a5b45e65dde492585311c6cd51801265aa927f5502e35383515611e6894d25a91f6d9951c0e452917862e158bda6e49b60119872eb889d144ed5706d5814905036e8435b55e1060a1e8a3609135e6905026e1b83110524e29135e4db1295503925639e497616d4985669a5e69c5679e5e7906a4910100129f4010a000ff00c2fe0000007900f0000080ef00ff90c1840b0a1c388031a2c58c0b1a3c7801b1e53187d6264cb8813361c985153a2ce8a1b2a541941d2a7c398211a9c49a2f428cf7f2f2ea4692391ec469b2f664c791390a9429e3f6e8438325720dd84173ae45a70f763d189336ec41a057aefc2a559966dda523b20de9253a27d48065ce8d0be3166058aa5bbab5e9569b6f48954da215cab6dde7c6bb57e2cdcb089fef5ab365fe0ecb745f6f5ba877f60e29c1582844bc7bde0e3c27fae749c779ee255cd2baa15193a5179e5ca9fd6a60c89b37562c98d5b368cd4947d63d7b903be4dda57bfe9bf8d7b750e58f960729e7727ecbd9c33b16ecfc73bce5c2d71ad5dadcd437e2bba59717cc4c58b2386dd1e5cb1ffed8d97165e15bb7dd1fda987c6ee9655e7efef8dc64f5ebefdf87497f564102d4402a410100129f4010a000ff00c2fe0000007900f0000080ef00ff90c1840b0a1c388031a2c58c0b1a3c7801b1e53187d6264cb8813361c985153a2ce8a1b2a541941d2a7c398211a9c49a2f428cf7f2f2ea4692391ec469b2f664c791390a9429e3f6e8438325720dd84173ae45a70f763d189336ec41a057aefc2a559966dda523b20de9253a27d48065ce8d0be3166058aa5bbab5e9569b6f48954da215cab6dde7c6bb57e2cdcb089fef5ab365fe0ecb745f6f5ba877f60e29c1582844bc7bde0e3c27fae749c779ee255cd2baa15193a5179e5ca9fd6a60c89b37562c98d5b368cd4947d63d7b903be4dda57bfe9bf8d7b750e58f960729e7727ecbd9c33b16ecfc73bce5c2d71ad5dadcd437e2bba59717cc4c58b2386dd1e5cb1ffed8d97165e15bb7dd1fda987c6ee9655e7efef8dc64f5ebefdf87497f564102d4402a410100129f4010a000ff00c2fe0000007900f0000080ef00ff90c1840b0a1c388031a2c58c0b1a3c7801b1e53187d6264cb8813361c985153a2ce8a1b2a541941d2a7c398211a9c49a2f428cf7f2f2ea4692391ec469b2f664c791390a9429e3f6e8438325720dd84173ae45a70f763d189336ec41a057aefc2a559966dda523b20de9253a27d48065ce8d0be3166058aa5bbab5e9569b6f48954da215cab6dde7c6bb57e2cdcb089fef5ab365fe0ecb745f6f5ba877f60e29c1582844bc7bde0e3c27fae749c779ee255cd2baa15193a5179e5ca9fd6a60c89b37562c98d5b368cd4947d63d7b903be4dda57bfe9bf8d7b750e58f960729e7727ecbd9c33b16ecfc73bce5c2d71ad5dadcd437e2bba59717cc4c58b2386dd1e5cb1ffed8d97165e15bb7dd1fda987c6ee9655e7efef8dc64f5ebefdf87497f564102d4402a410100129f4010a000ff00c2fe0000007900f0000080ef00ff90c1840b0a1c388031a2c58c0b1a3c7801b1e53187d6264cb8813361c985153a2ce8a1b2a541941d2a7c398211a9c49a2f428cf7f2f2ea4692391ec469b2f664c791390a9429e3f6e8438325720dd84173ae45a70f763d189336ec41a057aefc2a559966dda523b20de9253a27d48065ce8d0be3166058aa5bbab5e9569b6f48954da215cab6dde7c6bb57e2cdcb089fef5ab365fe0ecb745f6f5ba877f60e29c1582844bc7bde0e3c27fae749c779ee255cd2baa15193a5179e5ca9fd6a60c89b37562c98d5b368cd4947d63d7b903be4dda57bfe9bf8d7b750e58f960729e7727ecbd9c33b16ecfc73bce5c2d71ad5dadcd437e2bba59717cc4c58b2386dd1e5cb1ffed8d97165e15bb7dd1fda987c6ee9655e7efef8dc64f5ebefdf87497f564102d4402a410100129f4010a000ff00c2000000009100f4000080ef0059d2318ac80e04385070e1458209853c184c6061b283179934b8017122468c17363456317264c1902b4e84b8525322c59c095a44285135e7c79813125c4871566d43872d3e2c886315a6c9892d121d7913516ec69a4b369c3aac846540a913a235aae379e349903f622c8940fb60df813b7e4df9433ca3d1aa6172dcb87218edc0936d7605d8a4f9aed2a86576b569c5f069568765eaedebb399a042c521031d3b50bd26c8bb6142dda987dd6f4b9167070ebb04d3b6c0db552775ccf712f66e84a1cea59a361f256bbf8b47b5aa0710b54cd97b3e461ae6732c6bbc9546661a07b7b0f4beb39396598c18ffd7b595163d6cc655b0e6b471aa7c26551afc6f53e68b324d4aabd423e695b313fcf9e7957de3da61829ccc061231f4c27faf5eef73d5785946d3555e451640e676f926ce5c6fddc400a677f97402108ab1c6eadc6af138bf5d720e1427d45c7508fed767c536eadc5b591757d57eb9d4589b7b0a1508d7585537539761c1e66a1a6bc8c652e485a146eeda71c566fc5e479508a5178416e5226d44a16773a38f2a47132d84e1758ed396713435266cb955505592621400207395f826d67d6e28655a9545a72b147469e5b128493a79fe59703e1907ea447d09f0619f4627cd504000129f4010a000ff00c2000000003400f4000080ef0059d2318ac80e04385070e1458909022c78c012a3c884179113184c60664565ca0674b88153e0ce8c11368456b194e7cb8615469c2902b56346843116dcb963372ecd9f0b3af449d2f2efcc844b46742a02786053a04b8a257a03b1a4c5831ba25dba333be45daa091e7c8af53c2141b327ca9d2b863aac49942f5abc8ab136abdd807512bc9b70fb6c50a313eee5cab530354baa5fbe95f876736a4eba2d4ea489c2b8acc5cb834ef59a8597a66d9c973794abf338e2d5aa4f37954ac8b96c49c0ad6e5caa48507ce1c0832aed4b569ce2e4bb21de2eed06f4e7da993dca442923563063c6bd1f94ab9c727957d94d4a476d97d4316ca5c61e56a9243befe6e1fbb32b8e2872ba7360f67992a66a097b217a94b5c347eb5bfef5d0f5d1aa474cb61a6da134e7dd4fb5a7d9166361557f9e4b71371edc6d0556c6956709a5095e6259161a5262c168806d77a1e466dd693d77a0ea6ed957a85661e15872ab4dedf41add5e552832567c91276e14479d67addc8d4545a65464d5f57e9571cd86409e75cd23675d474537ccd16c325560d3891208d065840ec730a8788d0790579729340c16946ee644e36b653994649871199ddb97e1d682688331a6995160b9c586e8956a84fed49766b7ff596526198b109d7ac947e39805136622707e69d26c7d85e4db587e62d59897723a893e93727dc735199d8ac9352b6c263aef95a290c107889b5aa1f529298572a81d175791994ddd5f85ba77e0af2eeaae50ab42c8789ea1a29ac99c6481dae299808a8af160999e69d926867e0a2be696b217aaed52fdb46921b262e8c71b9be1790f5f969ed8a22b8f16d72157620e9ae7de81d26bbe12530a0b902f8076489d145966ea78ada8ea295aaaa1b5ba1f10a46a4c956db3c60acb108ce67579a96207d6266fb3ae79fc55b8e94c9f9684b659452e78b2aaf9608576065e21a87a49c41ccb1e1699ebb5d1e426995b7d177fa3a13af8a423a9599c0a254cf5b8147ca5c6a5d624c63adbfd29cac29b5717c39a782f226bf2a6ab5eb27a093e1d80d69a73ecad79b66fa1a55d7a9e54841fef9ae3eb93faeb0ee3ab5b769ce8d32aede172753e8ab9e6c75b17f8efb8a2ddece06373bae1797762ad0f9e6e56f8e6f47bc92de3f4e8529cd27fc1ae1b8edf7c4d7eebd975916c8f2cd66e9ec59eba33cb77e6be6668e9aaea9e3c9a7ebf7777be2cdc037b68bbb7665c99ac5dadbb1a316747def1fc9dbae8dc9b7f5e8cf0bddf455eb524aa9df88d384b437e7d78bd9edc1eebec6eb5c35ca6826f57518bc355f314fbdfba4c3e5124aa62e22f1db816bf933ddf4937199e14f615a931dc6dcb56e919946236f725bdfb03854306d66c250c35196e8851db4159941872c8e4e905519b10658cb565a329c9648fa2a0dcf8352cb6e85c6669dbbb9f0f16f191c1a52f23664ad89cd8f74a27e9b0546b2261a90194a52e31294f44ea080000129f4010a000ff00c2000000000a0005000080ef0059d2318ac80e04385070e1458909022c78c012a3c884172a5c5871b126cd8a1b3a44e8f1d3654e8bc88904263015a2b26509569c3992702bc597216a235933d5a9c2913962dc79c3f6acc6953382e42a0455e1df9b359e056a6379aec8af47aa15298091a6dcac57ba7dea06fba8d0b467ca9d2b86fc61b1a82bd2d469d6f52b48bc3d4ec51ae6fe6c5bb437feb5cb27bf6ddfbe75fe063c9750726abb8103f56c1891b3c094974a8cc85913b5ecc0273b76dc0ab3764a87478a9ef98ad56a628aab53be7d7ad57c68dba76bdead8b567e6adaa38e5d68e055ba40ae3382ae1eb3b8bac3ea039fc43e2cb9fb6b9ccb8a2f381ddaf3f5e9d98f67ce1cb3efead2d7954b9f2f8e937affc7e5dbbfdcdb9a76d2d7457e05bfc438ed5df9f3f7d7b9bf1d7cf1e710a9617df53020803df79023477dc75c586be948fe158ced48ded5851e3790d1880146c754684d3624906a85f402e28a2a55d8df54855572206e81559850622ab86026465958c3668d326804658e3e09bc965bc9148c5373b1180b90880297c463805a2825ad6e46185bd59df15531d230d1143c5786e52734634c16994d968119a62469886af6846d49ede8939f41d9b5fb146e629805d16ad9c825998fd588d45c48727728e886318776a045251a236b929aa9f3e4a59aa9e1a298729585ad7e46d50a629f9ee50ae2893a9a4aa9adf58a5a69a8f1baef702b90367568e9676975162ea665ea3fdeaeb685cba19fbe954bd65b4944672e59ca980628761935d45876d53bac217acd3b68e4bbd16b5d6277da88b0138a11138f50b86d186cdd75612a60eaba4615cb6fab8297065293a1ab0c9ab70175e411513a563858b0f285d554b6d2651e6bb81954f12cbb5129f41741be74576c707e3c072d52fe75513d83697a822a6c518cef5db9063cb365431b84b41f7d764812b47685eba919a462dcf01268133c5bab9c27a9017982ba99cf165f1ddc1f63ab5d3833f0d823aa04396ef51dd192c1660d54acbbf51480dac85a38ba1a69e24a7bee9113a5ea98d3a539037fa7538da1b9bc5e2c6956a7f60dc05fbfd9ef9d3e6f4cea372ed88eca2d30f38233e850b3c183baf26870ea9909bad9075da827c53f9da3a6db824495f64886bd207ab7953c361286d18d6ab28f679867f451f97cefa3dc8225d4ebb71f47b570d2b589b7327cf2cd49bda18b5ce872e4cb1df575d7335b31d4cf170e6153a17ebbcb74f59f98d97f72aa9e4df9ab53967a287913decd6d919f0a99fba157484ed9739748c59449db864d6bc8d67e94f6e4219beeeae2eb8954ab9dcee94ffb8f418af54c9ba4166553232a85c635aa2c88dc446e22e053f654004fc57f8c24b90a1fc847afb0e5fd8f24032cd0d817c1cdf15dc866cad95e9ea7fb9ef0b8ed713b21dbce96572575486742f2e2159827effa2475884172d31b800906f0363d1fce506b3b5a07a32ca3d18e697fb1cf56e2a8abafb8462d6e92ce17f2c4981809770480daf12b5ef789b12efb4e5ce2139d052347311eece98904375e03e76329c9cf218d5b13e90398a2a2dd90b061ebfc57c47316372677ca797c5859b4f5c6c2d9bc63771124d96af4eb30810e429b94ad5f6ea6772722aee5736a5f9201851e94e5c1f87b72d2afcaf8b9225a8ca22cdb090e7069aea0017ea45e6bc6d4e6592830360c6d68bc75a474f508be897ec369d35f1e1947babd212c4227bcab5548465d332ade866003ca573b65454c42eea295c28c51d6939aa4811a0483dc1b5fc0a84f955190596e71e366ead7d0efb7a9705362b337e4fcc5d4470e0ccd9e113cd315f87aa216935287645014c6e7e83b9deba72b6a7d04070908c7711f2e69411e50a237353736747698c215ac0f9971152257c480dc4655faf80abac8ff486493f06c1bd5c4af4a0f25920d48e73ba3eb4e4d9f819782f31af4f8eab3dd4cc28f91926d4aa9d0c4f162fb486c186bfe88b3df9a76688adc0ed25988ff47124aca8c5bfa46445a294ad50c2084521662a8e51894698fc06b63bc5b0564691d81c435547adb2ca868dcb6a2641c2cacaa6643a58890ca9b814204c7d7077648bf0eed288b6d885c3ba897b68ed924a66d5a1cfc99321bfda4ec9ebcc45a33b9fccb9e14bb933542e055e976d2eff1d4709385e4686b38c43789dba8a42acdaafe0841dbc2a45739d49bd4ee48dfaa119d08a1854f0065bafcc6d2ae09740464e4be89e4a6eec48e8ccbf2d5516596afae9d4b48dda124d8798ba0fe34dd79a357656d59bdcd95433b80cce06c136a0e37d625ad6a3d5cd150289bc9c0b01839d982df9a1a37db62f4fe2604f2e72b6780d791a5d89155caaeea7a425a52543195cb66996b3b6fdbb99434611e9718f6e962b73213349e89b897b64971ecfa3b6657b94956092c0e140ee210a1b3f994702c015d0bef47c7c4a6637137b2dee248b2c2c3d4d35da766cc998de5c32c2de605f888b8be6d6b65d36a65273cb4eb924a41a36c266ee2a8c0eabaefa5f77a6c651a4526866eca26f4caea7b527b9cfbb296fb48a32559a9f63abb46dd296373fdb0a33978f51bf95eeda99d80fb489519dff9e79c43663bac2546c4a21b8e274bcd62681d5849c25d6ac3b8a21e571bb8d860e9d81f991e84ec21f5d99599a0ff344553b9f48c3d3537c7bd626c93f34364b369a19696660e8de9936cdc431f9675356472fbb0ebf4e56ad6de655db799432ab1ea822a7c512c1464554cd0963e199d6d05cdc51d76423dba645a9c93a6976345c0bb576210c435713e93d603af516a9639947e219dd6c0cce4cb45887c07ab95569e5aaa35b3a47da86f480b18cf7f0ec7c0db447fc0aa54546fd39a6275cc4f7569e9688f6b5fb49b2c2e91478d96d264163b79adeb1c49468462fabc74d09b4a23e43c46b713db32aab5e6d8a33e0471d5119b584ef0a36d8412c697c888787ba93bbdc2ca42c11bc0a023ea2abb4d0bea7f26199a0fcba0e2ac3b6fbd3545510cc61aade821a3315912bb6e0f0dc5ccfce995949bdd3bcad3313ac36098e27088f6922b80a883c41b07f79db46c693f2c966959e8b3ef922634c129727cbde91ec5bc483b5789aad3ce52febb5d773bca094265de83b5da9294f5115ce9796ff75ce01580bbce6e28618a2af1b6e417924b360240d6cf4dd72d2b9a3395fab1a93da0b287fe1e7f6c9666b3f1179826047cabeeea2e0ed19c310100129f4010a000ff00c200000000fe0005000080ef0059d2318ac80e04385070e1458909022c78c012a3c884172a5c5871b126cd8a1b3a44e8f1d365409325466c0982b46ac3911b890426f27021b18e2599bc560317ac4a950f66ec99ac086d4f913382f4b9f2b8a0de99457a154a8417a2d3a44d9e2d8af37724daa04fa275da34b9675aa261c2359a659c2ad1bb5bc245e8c03e6749b529e664bb07116d5db779f6e5bbe79f6069b38342ed9b18b0fe50c4851ecc7ca316ab47909b2325ac1933b464a5932f563ad9f1f7e0d2572386dc5a933aedc89943be3d69d4bbe4dda53f8e5d4b16b769d8bf5fc61d8195a164c97507363e3c19f1fdbac39f2feb5cf9ff54cdc7a75f68e718a354bf6186777c405bef7ec8af49bb8f3853d929f4fed9d387dacdf669f1f7e9961d5f90bd7ef7f3f90ac71f1e9368ede776d776fd674fd085417780ed71f9f7012f421ec7cf9c76164860aa771e48b1258d41e7c1248b0ae712698e1e3862e5832e08922685f12820e285e118b89942dda46dd1683e07a25d858de8532940d1178d13764a5480967816b5b6165b31b5b4d8595d96f458565e95b9da5f4e695567985d79f5d49152f4e513995d99351b575e76e46999a56606e45c6e58a4a047850777ef897e47246e998509c3a07e723634ed82192663a3712146c4956e4996a5a86449f407e89c8e5a0725afad766bd3aab159d95791a24ab9a6ae955a8aaa6c829a99625da9baef0b685f916637268cf1f978e19a86f8d75ea18eea2825751d57d72292422a08e0a7f55543a4ad8a485fd7513d258225b86a7a5415ad658503a39d5a6bee5791924bc2e496ae794ea99a5a180ee3bd69c99e916c2219b1d876c9778729734a442f5ebf7e356cafa31efa819293cafb3120a311eb982c5c03343966b50d2c0e585c8248cd2ebb496b3b269c319a10eaa96a7af1b7bb1339d1fab3a68c42f9cc17d6fea96ad67a56a968f9dc1d9f774d67585fb919c74ca0c4422b5460d7c2faac6fa68a2b9fee99295b3d2772894b71f5960bb9c6dd655b7b476a6af96bf5baa81b4cb568aaa98bd133a9a1aba5f77a6248ec2b766efbd47b95c22a0c90bb42efd5576071f2fdb79fca7d879fafc41d3c80dfdf091e983db8834cf7a1c387a54a97b54f9b113ac1793a22bb85f69cc378b60d8933eb81027a48728d8faddfe87a8fa9dabda3230ca1e2e3da387d934ca60b0817cfc988dd23c015d7c6706f2e49f79be1121e3530f75d164cbcabc1986971bc65a5c9a74027bc07afdc2b6e3428d9ca9c48e4e823273abc993ac929f472d6ecbc39b29fb5d7d5fa7329bb3386c34b0b6069976e0298897ae17e13371978324ab39def04546a4e54deb58eb5802f8c74bb3d1f64467322b83a0155b16e947a274ca8b92a2a6a63d396d89696b5ad3b6562710a1e58a5bfa602ab2b48c98816a61549329dd52b4c9b8c97a677eff110e83b4d3d81c4160b86f046160ca17c0be0aeb404af11b40aac5b7b6e44b268702bf50c8f303cd2a3f4b2ec100111fe7b1220e0f26449b5d1e8ce5dda22e39aa7232ea4cfe3445cad57b6479e2d1ab05c52645edae06808c61a4c8c670487950f475848cd08068eb39114e46647b771c7cc79d1746346f887c44222932333b803e2641f2532f58b537163267849783341eca123fb9469c47770a2219e895a8ccf0b926452c7f4ed42628b629fc4353a46a482508a112d5cfc382aadc18e8264522bc9b6c628b99df4c399d143e0d699903a6a442f608bb79627e5719dc8ffae7c33146948653296fde7af60bc80e733b7b7252d605e92348951c414d1efab29c5ca53028953e05659bdc9c92586b3086e6c678d2fa1fce095e4126633a821492ee6626303eb542dc20d3e399e2853222a9401c9a3aa5a2e2744c37ad78a79dfbeddf3bc97d926c849d62daff411f639e3b99cd81222396eda057035a1ddee4526c915ba47a47c3bdd0bd842c176909e7a841163922abac6e4623737ec0a5b25b71ecab9a117a48aa527579811da79907c806ce62a395903aca1ea474deae81da493525e1a60579cf322602768b3b7a4f19c66f22566c2f8ed2cedf59045f188a844d99ec90dbdceae4bcb8e43572b3f8e53faa74af4efb467beb4f9f8cd8c1c93ef2dd507475e5e0da0a11bdec897c451ae52746acb0d4ac4fa5238ef424213ab911124a8b672cd0a8fe5371c690ca8b978a55a7575b5854d8f4fe47cb8362921ae5c79e4119880b7ee1ca865ca3e8457f914217201beabecc62cfe370b591516a98cfa85d9e2644e92ee7a247bc33f288c340c499222ffa74c4e241f4b5eba5a82359d6a936a6fbac359edf4f189cbfa6b8e742f51daa42c536c6e52c01b3a503aa8a221e2c02b13456697260350a513b468f8f288bbba2750666bd3e4270bd9c6a9e6bcb22241f533399b4a7562d22cec47d5f6a93f2fe59113aaa5ce164a57a025bc3fe49363e9156b89c7da428e02bfb312ba50ba2eb2ded6bd866bf173cce4504fd2fa0e6afbbf218cc78c5b6294ae4bd30e653b04579ba1ef7f4d902e4751a01a33acaed27e663b4da1b87b1a5e23b33c53c41b9b0bf8234b66fce48ba53429793adbd81b5972abe2c1612778125cf8dd02c066466067c9e0431357f3422b3ae165f73c17f849a1d48a1535ad7bcaa6fdb66d557de2a3d2a84cc30af1f3a3dc55ac7d67afc12739fcb5364d17f42bbc22013ee47e233905312c7fc71f23ad56f3bc2a7b14e6e9e9ce25c47bcb5b5b34ebe441d8dc3a516465198a3ddeed9ccac53b24eba0b5b96303c65da404372c0dd8e14135e66f81a4241a450bab19c93b9522cb02f111f4f8be5f2032d09c15f97f76ff493a2e069a04d5e8095dcfc331e3b8a12575b11767cb4f55ace0d1fadd9d498bcfbbd676ef79cc9eea2e15ea144bbcc6d4774a077b9d1a502a66dde58703e7a6878bcf10b20fcb833693abc509b17a8f27b9948d9e2980a670d67d0071cc0d0bd059a4c754a11bb3c02a17fbb58d8bdf236717bd84c510ad1cf035e5e7f2a6c61922ae2b5c1c467816613e3bb57bf973f8076c7bc5e2ce16815b0acd6fb7fd45c689b17b38a8de074a2e48b5e635c08b732b9f9b937bc4dcebd43d7c664bba9ce9b11ed0b39d47f0626193a25ff0a79d2a57f0fefcfdcfce1b2551996f67bc6ded9f859f969dfe00a792ce79cecc2cfc2fc6521ae19538910597b96997113895d4242906c1b91599ccc8bb71dbcb043731d5bc75ebbd1dcd28e4ddf0150e1653a1d09eefe4c8b22c705fd2ee8d1238d4bd756dbbcd4819dbb93c4bda3465ee6b7fe1f69a9ac20d762a2de39fc72a92b29f17e5deb5fbf37746374864877236781695d712a6677c52c54dd37257c58550d7047c25bc0d45b47721913895eb7f73e05d07de7cc2cc4c02217de7ae2003fe3562243c812671e4821918dd21b37a25053c73d5a644d68e5765366943bb71c4227837a733a71040965574334183b6157624a774168663a3876a344f37271773f69d37634b2eb3775b760b2093172f344246616581866b4e27197e84ce4ce3da22e64843171f7007f84545406a17ed5982db4293db6146848268985911ed6ed7ab6446273d389b39f57571c52c44f3808bb7ef3b78b39b6138c08314f170465b5934d182877d25282425f65a4cc79661b54126045c6ed38d3fe4d08863187d661c6b075837d17c70e78b23553655c4e369940949123b33d7975d97447b166c4bf6306f95f869e77481f2616ec7ca6e12693516265df7723107c88a82ae43b8445058c589a5bb57012485b2ac77b8c560f4f66a67383ff5232b158458d45676e38982346b7f55a960a7376532be8711e37c321171e7ec5e58fb7812cb1d365c33781783977543b8253408237eb2ce40862e4c94dd56c70367a79969172d5ba55c8337c26a273066b2352b03676a74236712e332e81989b4029cf6bb7f25c167d56c74075043b30978f6475cd8cd54d40383ef93a66057a26527dc3fc82a8358f62d35d68da4328498287f96256a432c1d580e80a6783f122b84885f41d7956a94b75083836de4109019386cc13b58f3176b35c98381bc8ea7796e03dc89f8f94b45d49933d596386b38c65c30c89d4316819b39aa29360b8757cd51a8907168449967be4a490545345a57f46641359193683442d81980b80e30934d36f47640762a3a482a5c83d12286489717599b162493257570237888464b7343d576e8e59f64627a583a9cf85479e5cf5123459736418e499c6d847e1883808429c23604822d11fe32373148199f8ab88755148c7a428a4c66ac4a13871d278f79d67b5388077515306ec2557e61b659550e7847bdef44e8d83028829a05fd8b57b84934a898f68523731b99b2478e08511679e67248315b586a4206e039d6cf51a8b866a66945f75798a6ff24a4cf6295b63c29d799493e2238dd16848d8bb7ee36949a6fb8586043f253a9e045b32d86b4b29d780779598b50526e4f89265627887ea80c6127458b488b7a73d658c7779058a47877c69499925b49a94867a464663761691176651b4ba19e8ca8db2c834a3c0a3845659627d50b409890af1acb7859ba91472c5a79f93d73bb4de9975494a555732d3f595a3394b252528079776a80456c59d75b44d9fb6535c63ad87e8276d53984719f79638ea51a9c589f3b375a9f74ad8259253a96e757f3b8612884a574605e5683ed110100129f4010a000ff00c2000000000910f4000080ef0059d2318ac80e04385070e1458909022c78c012a3c884172a5c5871b126cd8a1b3a44e8f1d365409325466c0982b46ac39a2b52bc794216a9c894376adc595317adc564c4021b18f35951b283497af40a3078a05f974595055a54b72f44ab479a1d9ae4392156a85f9e6dba14dba559a165be8d6a263a2a53ba6bb2b5ea56ba6bd8b051e25dab06fee752ba7fcab59b673b20ecb281f2fd2cb77de0e3c96307362cf891fb58c395277468891166edca9b337efce93438e1d2ab439e3d6a353ae5daab53be7dea363ce9d2bb63d60d5c4befcddb478ee63a34d7f4de91c3b2fe2efb98f2d4edbd830f5e3cb93374e1d9af178e7d587677eac5bf37fedd9befb4fae8dfbb87be6e7a79f0fae1cf8fdedefcfaf7f9e9cbb74fcedebcfbf3f1f3dfcf25514a3d08e25e450ed4702182392860e2890e38e0648d0e4880a4851258c0e58a166841975a5d78655885498840d88626988228872aa892298c2eb8e26c8b2ac8d2ec8636d8832c873ae8932d8c3ef8e3609b3a09d3e09646198420933265f7954126057555585d39a0508a4d49322496562414159c5949d5669552a8d497915e5916214a529985aa936a95d62557627970989f52a957ab9772d9f59063769967ef917af9b520aa7a0a96ac958e0ab62c99821ac6e3ad8289976e9805e6e1e6801268b9a6a616680a67a1ae7a2a69a4ae9ac92aae96aa93d8855e14efa9978e5545a51da361655c1ea7beda3b6359bacaabadafbe78fb5371cafa745fa7caea3c5da8ca0b9ca3bbc20bac65b4ce4b2d25b9de6bcb27b3c67b6ca5b0ee7b4e64b1ea7b6e69bea6371ba49aae8acaeaa2f2cb3fa9a1f2db8fadb5febbaf6ebf2d5947679c01f76ed954d1475e126cc5474e5e51e1bb707d5ed9372e9b57dd3750ba511b2cf79b7c0f5cc7d3c5cd8708d4c5ce2c5618c60f2642b0790b7582b3ce7d670132c2135c72f7c849aca179cd09da926087f6fb443fb64f0d74feb84f2da473def23d0fa0c6057935fba8c2ab7deea5e66d0d24bc5f3b75b6d0633b2636be220b7ee9df5b7d56b8bb22adb57bd85bcd96fbdb678de5bbd14fefdd467edcda26b0d23c86784390de920cc9a4d81e8891249baa1ea022ea9a2eb123ed9a3ec024e01a4e4025e30a5e6126ef0a3ef66f4735b5e3359cb57c83f8932fc581f6993bfc2653c29dae96abc685dcb3356f2bbec2bde82ece737dea2b5c485bc98dbee62eea7dce91bd5acdc94cf65ab70c337fe7892f9db3432366c3dde0571d3e72df4b3d4e3af6e7af7e7bfce73ba1d2c5ad6d5cadadc627fa2ad7f3cf0fbdf8f71bdfb6acef0085f310eff89450440e003f795b50a69895f0c306abc08b0c90a2052810cb0eefc2811cd0660b388f3e0230348f1c11660f76b51fc4fe2443b12d5ca643e24cc4c0ba62a991a5de3363410a76278c4ad12c0f78ef534022e0588e3c02a1178874c22221798a4c62e66878619571344c22110cc57ca881943954256f5203d61776d5443d71d83164e2d81177ed3336611c8152f2ea19c8d6413eb11d869a632558e8924b3a060f8e6c680713e8a64f32b1304d74d31f15e8284832121196840b4a11e26c2e35ea2e76b28227680881994221fc66a970606a42a0c0b586c3946bcc0e82c6b9c7b572f68781052923353a465288c49c224561193924c649b0f5841c015c2578f241d1a0917d998b061779234b3295eb44bc679321321a9ba1121a9c118d5519a97810d53312915a66ac09b9d0986240d944dc0a9e0bc9319c6664a22cd43c182bd94ecec8433e9911b6e84e720aef892da13f90b458cdc29980935082241c72ddc311736db5b4e0965471f566681a7d2776a1b488c44696b243ffc491241e7dba57a75af035892c20a00500e3473f1201507dd3d0aa2dec464992254e3084f50d703792be233ea465c2db21a0e3c412b0508504d4f340a00920558a9e43b044c879493a2259d4a72755e72c9d29ffd53d328e95943f036835e8c57489c110e9bcc1465567685138ac80583538ab0850c4d8462ec7be1ca622651cca3f58c78710b538ad70fc5442bae29daaf9a121a871c84f0b508a9605a0bd6d0a2f570b275066548f0e8d504a0e4abb49cd3496702aa767b6b74bc9e5805b93ccda4205e9a33c32768977db27ea0b83871aefaa91d0b35056892af042d924f0ba9b74e8655d16fc4f822fc893092c656d4ab550de25f3bd9d59a0807bd851a2431abe8d1aed4fb886be3447b0082a311b0506dac4d013e4140d62196cbb25ceaaadeea99cdb5c5da6bb24d405a6a6fb2dca7d8bf206ac92e500a87b63015b93ac12f2b49011354979d5ad57c2143db303235a713a1da5d905e020dd196f7b7890e192143e9bc8afab614168d0aeb0cca79241ef531339156c4109bcbc44d2ac1c682a45cf095436d3eee25c25b0ed06c7232ee8813df7ce4dbe2047be090582a8d95715c83457c0430d506492358e34859f078d7a6c9e5c591b417e833601ace165aca72f27b51cc0d2f1b3bad202e500eff7944fdb28226ee982535c2061cbb2a1a440570d4603a879a16da17413425fd217987918b5fb80a19cd4905436b6b35298c96f685c483df9f420bd0982abfb67ac072639a621c37835a817174ada43dc707862838a5ae666e602bd7eb4ea4d179953719d4fa8cd73eab25ade5ef924b22d3b58864b3292ddb903b7d6865608264a7053cd57912e4dade15695ec4cc11bd7db24ba96239a171db299dd47ce3c2f1ead8b631362dd52963b67b9fa97a1a47b74aa853fc640d619992eb9cfb0350075354af4d70f941bd13108503d59a29633f2d1dafc09cba6fb32d48e0ad3bad11960598c0b2ed29bddcffef5694ef8a91c77aabf44dd9337a9fce752766aefcf6ac8a0710e2c801cda28ded317bf25bd08ccc5c6f12419f44ccac49174d4cacb329fc9eb2fa7fc0e1edaeaabb559054f168a3332a300502fd6962b1d8d24e204b75576e548447f50db2f4f5ba6e214e476ac8247661a0a1ac5dddd69c7fa8c5c312c6ae594da48286e1319847c5ac171dea7b10aa491e95c21664fa9374e8ed49e3816bda78d92c181421a078b5879c36209636f5024e82f1e5dbd78c24dc79202d204e773230da9214e4135012f1635095035079733e3d3c24ef1ed7049b762dcc651b3d579cac8aca3bdb9c79bde418da24e71449f3d055c883e54c58f6dbc94330a0c770515e579c03255120a8c244d5dcb2e95e34ede09f6be41a6ef012d19afe9f9af92932673ec01397bb7a9241b4a04a8a1aff2f1529fa879a7144bbf2099af47af358354203fa1d55376124a477451287325697b014564084760b57f77772016a02a7c864c0335b86e310459506f71f7985ec3577197797bc07085009505e5171a87325500cd7b26476cf34c58f4747ec7435747c70405f57501bb7366311cf7028e774a39c13089856a07529c7ed7228081d38aa71258500663017c65d5501585f20b16bc01d7595847ad1527387500850977fc5aa7847b917e62d58030a0358e257643475c5126c08401868145241287454a96f206a7485126b75595907801a87d58cb1978611a65595500b06266f85a488f7201350850ef7d7b65950607538fc7922978243838556f78c86396d06a01f78885556397db15165b5b47bc0e07435984601b48c68c916770288c7b68df7e85b51a964052874e7401c85425cf5991a86226a38283a419b83255983b22888275e78853480a3334676276867394b68ac0975058801026e85b97936428e97924341a87ec6c93868350893ac07588459a8ed7e72b48ad70e8ed80f33f7885108261a872505922020e8587463a988d4682d344535011d55988d8e01ac7df8064837e85017806487f20af7081401f187b80931f7e97991ec7da7e17c25501868f48d72ed76a7fd8416c65b00770277ce8a713e85b6103f277362019d8b989644287a05002781b5eef181d5e372041f7625ba6c01a87b97ee55c05565b55413413770e8a97de7d582016b7ad5e95a268856a0711a398f8eb1e390c7b75e65096131e83ba6341b759504c1705f496d7a51dd8d914d5f291344619371787346d8533a962876d5f24e08aa7c294199053523d72381116273b8c47b756d5f37ce5ee2937b00625e83289f352153223d70c7309ee7824d175374a5c898a61172889977d8965ce27577b84340d7cf89f3f18479dc4f09d34f78e52d53676c016b7de5752850885af75922431181d50295473689f3d91b758570d4f09911f58097093be2f09e83287d72005377b24eb8fc75c2eb8b96ee51167c7035cb9b33ca8a47972ac7245b381e890ef8501e29f87236c38885cd5839456c65da95b6ad44c03984d83728988853116a04254e8fc1b47ec7cd5811a980898255a5301b59ee25a8df9f11484f787a06011e8317cf3b694b21e8099271627b00bb8964341a86556c51305ef5ee4f585985e7e850884552b9c651671852f68934285293017d9f204a5939885950296639234950c2a562ce4556845b851e9d2ad525b35b7556847e42a414590a05c113ac657b7776bf8358e51bd5eb52238a9281885d36fd244ace6363d41b65f396c68850171a6924d172f7ff83e7c914e9d85726e46f78967824d26301a986722668d902236a5259562942b7601e20d85d1a2031f7b88422e831f764a0563394552a7ef028d70235d2878a68a337a9634652236a778a01b95bc01e9c0a5a4678d58920cf8038b9ac9a647459a1ac3a785c27fd41f8de91452501f49e9595d27e82d17f0a72a556b17801e240f9ce8122b69992d17f98ec50ba587c995c6552df75c97a6e88b01249834006571141d88e88a41b65458336341e45d8a1c9d79dc16e8f07f35788125350250cdaf20edabd7cda019767587a61c5aac053ab56924bd58478dab00250ff7adaddacda950e20bdaf202fa8c51415a96815a3096946e195983a6595be96378915baf56cf91d50e7b476b21e89f55512d9a6491a4340033f5398dd48e72d2c3ae85b37be627a781f58439558a5633a9175285ca241250556eef77d22701478d8a59242839762711b721e012f85623e8c7aea6f31678fc9222a980e763b0b2f01e116267491d56172b5a95d1b4dad917d90aa8779014982e7baaf799941f7b00891b682283036e770a0b6c8aa38522647ba739896bcd5792d17397c31f89da66f6504b49d85e371021f7db51f3dba226d34b49e85bfa0bacb7ab6b915417988dad70fb22679ea409702398c26428ab9507283863462398905b38ec26e4b0b226d8429923b51396adf75b5078422553d527d9b6b18ac65c26c83f8a529e23d341a045962a527e20849c26b6ab75ae817a489152a7937a4642078113d7e2b301868c5b367601d88aa8f52b68649b6864ab3671bfd5ec72ba29efa1aa0282b3f6179aa6823a11ae41016eb66f87113d379149339ae85b886a45c07d9de6f760035c065bec70c87b9b113d72f7a01c2b528649f31486368bea5515f9eeb5f96976e404bb11219e1190caa68446b2289e97322ac7cd50a8924689e9452a451428018b95f2b675e187c5347a67aa9054dea14175a0699722160225a94a4b717c799bb75bba5c2a26b597267db2ab95a5950652864282f7bcae19d474c48da96ae1617ae88bcb8cb5211e9347cc994865178b2a5d86382e55deb379c6556a9e41e80aa6885c88788f93f6f2b89b2e7785e6b21155611bf61571678bfa428b001b97823ba7253eb29b2b5f47601aa98350dba34f82a4b9eb48653aef53633cb7bd65e5cb27553f7ce1b57aeb2f8ab965c028931cad3de948715417a896a11e56145706f21ab4c03e7b325dbb40187be4635209ba09debba3c8c385394253f31529d4cef8bb232c607f4b27ac7992b7468f8401e798dbe6cfdb015e246b276cd9b35ad8ad326613985358daf5a0f51f8538f075c2b69d64ec86daa710a32bbea995a339c5604a5282e91225165ca81bee7014d02801ecb6117cb2c6891b7ad913d7649cc94199367984016f9d3116b7a1df9fa5d41df770631a46c7553326f955b556dc527be86cf8a8b5c08da446c938830fca68b757e4df4dea1e47ecfa23015dbbd4ea2da911d1a8f786a0b3aa019c95591e44ca4f5f332885ef29154427e0c04cec2289a93462f7a99b7ac6611e88bb49ba514c9a01f8a72d6d1551a5a7a7d0176a989d791b3a7489760b1e9468b67adb12287c5f59ec1957b90a985a289d188e7a6176c65355cc8321ac2aac13279515889ea91bc96a410a9257e1202b5b61027dcf85d573bc954e0799c4551f75d6683a5c2b51f7d18d6850ba8c99bbc0918abcc1ad7d1a1595e20ca34b2a98019f1a2f9544c83b96b01e195fc70a7e4468edb9765ea57d0a6311e1dd855a880d25532189c389dd4eccfaad72b9da6624d4b8cfcd7c2aadf4e7dee9f75a27a1601117a56c17cae11948f6ce6723b65c966928ad9f57223dabbc619595706817d5655925126848786a29ef614125942670145988be017cb1a0bc4d7ba3de6532392b8fb436672b620037571e63f8f07b374c284a408003f59675fd287b462fca386288faad0532217ad3647bea89c4d527cbb6b352d3dbb242963c2c49a18ad649bc077a1b7483e7a48750030b90113b4ea5418dab39705b412bb649d69c998592ad1e2bfcb75cc796505a2f4a942684eac3121eecd7025aadb12591d6cc902dced6014d586c05286843942631a57d2347ec2930fcaeb0162a7b6681d8dde1c1ad7cb88388cf9cf776dab47e31fa40e4c8da721f7596c9604554ae366fd2933e8ab515cfe95f7653abaef90f550b17b4fcd3a0d4e6a85ab46f31e08bbccf952e9b671507c5babeddddef80136a15a764aa7fa91e40b7479722aab6ad803efdac9661916eb7918f13abc229cb1b68a1e9d69972aaa61a8edbbcb1f0cd06e05f82f0527606d8016785cbf9ea5ccc25ad42dd61298a2d4c2e69d544cca3e6e54ab774cc276a60e1576493a63a8f277cbb882cbe95b375f9307c3deba2b6c5ca6662e3226c5aceeb692702a1a1eaa4ebac7b882d7d49f4493edf58015b8fbdc11125ec88dcd5b595029b1199af7b69d2832212f3e0ab99149a98a3eb07998d7dbc0ac85281095a8dd8f5b9016a01a7cdd6aba98d1aba59cd3b9c27deec91179ad728e601dfe81928c75bbfba7b7c3d1c7fb8cd5966cbf07e2517931e1a50b244a809b3875be0f152141aefcc85a3f5acde4104572d7517083467a0b376b581cf41dfe54ecf8dd18fd819d2fae92784e1e2c86e2415ad3d8b16e0af07706365f3e757cf4db17d9a6692824348e15698a097d3b986da8638b361a8bd5366504a41c8af07716781dce31e78a23545f6eb941e0849d9501cede59b3d4ff859cad488f6da7c1e975a97d49c37462a65a7550894da975a63069cef8740a81d7579fe435df576bed7bde26c158c5ea66a8aeb7b1981fd85aeb6a0f8ced7345258b5f920c0ecc483554160668ad35d354afac07a01386f76476f7f91aafda7a8a68a03f93bd35008138f173017b5250728748ffed952050bf5452cf6c7f845af235545baf57c1188cf6af545e4efca456a0e35cbfdda8798eac3d025a8a30641cc017cf4af6f7337a33b45c70ff7728ff7967a9d5ab501ce72eaf357bf4aa462965e356180776c66cf6c7e837b5ff7afa19a2b6893d356ef001d74911b56ac49513565031624280aaf834e3f0bf444057a49582e3817268a98f0f4114388051224280294e84385055e2c2822712bc18827911389b2916dc79f2d523c6993d02c448b0d5ea42a70d8adc2a44d46a4c9a0362d458bc68efc4a03b4eccc9b2796140982f824d6af317a1d3a039a66ddaa358ad41bb211e050bd35567d0bb0796b53a06f564d8b1656aedaa37baa9d99157c65d0a68b03355a2891f36e973fd236ab27b62147b0499ed519027fe5ef52b857173e89497951d4c96db60d9ad3b85160c097ae168a43f53845d67d5fd48d84d86be09c371fc679725733dfacbb272cecc2783fcac52327f6dc3adaadc6e283a3f59b5bb13e6de97513472f393079de9475af2efd92bfec6fdd9d03b4ab297fa0d2b5a183df9e7990f95ae4e3cf2044feeb8fa04fbe8b4c4da207e3eaa7a0ba8bcf20bade13cac043dafa3e0f340d835f29a8d2abbf6c20e6c3da2db3fc7bf091ccca8affe4c3e04b9caa30f283be0abb1da3ee2934d8cb9beb27c6031d02b9f4041d6dbdc67302b4bccafbee07cafe746d093815e34255a709eaceee24a04bf1d7b60f838052c1d09c6f66c91f8c8caba5e8fb5c6b20d2f33f8742efbca452d5a5ec44fc2543d24b42bca396fc7cc83c07142daec7aebb707943c2f4dfe5c0ecd4947ac3ccd3bc0446fc5c1f62b823ccfc673ce8eb7eefabc63522f4da458cd0745d01c47c223847cb85b9283973f1d6b8c805c474c3072b6d83b10b6c405c3c013511574449ab02985fd4a404d0ca0335c1315fc67a61bad0ec7d26d64629ac907a5cfc05fe69485dc30deaacdc051556c53b5c67b6c5a0d45e2bc54dfaeb43d259adfbc23b6feba11f5957b4b7bcb7acfc12f0508bb538bdb15fe3c35ade2be5c7f16b5d4c8059b033e5dcaf5ae44dab8f5c012594fd488dbd66bb5e3d2e39d36471dba17a453555d43e2e2bd4a7395c511b4471e48dab693befcc59b5f21659571d29773d6b742051b51504a478cb83c4ca4dd8399e053058afa5cf8d4a33bee31dd9ad74503bd6f6940b79cdf24d95dfb4d6cc74d866a82e93314763de06704445c4b0765713dc5a8d580946457f5e57c6cbffbf47ade4fbcb7395b45ceaaf3eb77b3a5515e935d3c1fd16b8efc6ab365a3d67ec0c7fe1c44fa47acf9bd489ff5cb3f4ac3ceddecd32f46dc556a39c4f67579c1540b71fbee7ebe876d29e6f35856c56a7cb6e3f4044b9c682d869df151f047729947475e56396c5184147d3feea79d6f6a5d65f877a93be3bb14cb53cd9616ec7bc267f54ae93ed676fd9f463dfeef2325241e23654e291bd2831521416ea95ebb3f02eefcd7d828d0ed614b0af812e6958f20650dee4fe2c903f0975ca5c1c90e6bba80e2aea4124ee909c386b2b99a5ac4c0c4b0ede25e1ba813c2e6dc3dec374a66320b859a97e8b1b50ac28c821069c253c124a9b78b7234b6dcf8e6504ad9582278cb0254f2c6014d398034513b1a5f8e56fcbff06bc55fc2a71be646d9aef4c03d5cf1a220036859a9719e4c76bbcf520588263b818fc23a2c9590a4d56896e89e6b4cb31c19a0e21a96558ca88ab22c020b37184cc9a52d238ced031765c9281d6c6d5a49e2eefea5bfac953d6766a305d8bce456bcec8d6156c1da938417e33291af072ff214db0bd6e7a44ed09f40ebd3278ef823455642b18544bfd9cefef6fb4635fca179837f960dc221a1a1d2f794c2e89427474b1932bc0b7583cc1101f75a90e92359644ac9df03a8aca076fb4b55db6f87fc498342a12aa442f370a405d8829edd53738e89b2d9d095fa2ee4e0328502afdcc207cead35da2352c2fbd23f972ac4e86fc13d63e21bf656202d3a83755ce4ec14aa58cfc179dbca612b8325b8161b4f2ebda486f105259e19564a4660db50fb0bd52df3e6bee83ba6afd3e3d6e838f1d5654e6b5a3de5ac3f0646b69a9a4d5262a9d1d06953549dc0dd580342592759dd4532bf4d8dfa81a5c07744c4c5fd0565c473e43919c4b64a5c4d2492375b1de79c4fc557ac7773971857a4bb4b317da98714dc8a68666ef9c1aa7d4b877417d70369e4c5e19e29a61520945d845e2bf8d5f677f3be9757744d1d850d8fa5156454f63a60458adea07e51819bb6985f397acfa16fda2a8d1d58a0b3e9537b7295ea20d6c956326abc054da3035a1ba8e03f89cc84b1a5db8239e724d7bee43391657da9d6a876d28d2d4fae2341e045696f99ed2dc4a98cd158ec192b5c3e929448c57a9e6cf950a51995dba58adb9e3f8863405911b5b41d05ae2d5af75c820e4a8d72cad005740e94d11faca42c11117887964b5a121d9bbc67aa2fd97b582238cf7fa5236ac034e94a1e0fa49d7cfe6059ba3daf0a9cc0938d7a59645bf542be339f632bfcac7767e523e17d47894b061d3dbb991e36e917c84c055175ecaa77c729f595c95d403361673e2f0661d152fc08a7876961c726481b554625a09b170c9ac6879eaa36901a5da7e9b8d5fcef4e6908000129f4010a000ff00c2000000000910f4000080ef0059d2318ac80e04385070e1458909022c78c012a3c884172a5c5871b126cd8a1b3a44e8f1d365409325466c0982b46ac39a2b52bc794216a9c894376adc595317adc564c4021b18f35951b283497af40a3078a05f974595055a54b72f44ab479a1d9ae4392156a85f9e6dba14dba559a165be8d6a263a2a53ba6bb2b5ea56ba6bd8b051e25dab06fee752ba7fcab59b673b20ecb281f2fd2cb77de0e3c96307362cf891fb58c395277468891166edca9b337efce93438e1d2ab439e3d6a353ae5daab53be7dea363ce9d2bb63d60d5c4befcddb478ee63a34d7f4de91c3b2fe2efb98f2d4edbd830f5e3cb93374e1d9af178e7d587677eac5bf37fedd9befb4fae8dfbb87be6e7a79f0fae1cf8fdedefcfaf7f9e9cbb74fcedebcfbf3f1f3dfcf25514a3d08e25e450ed4702182392860e2890e38e0648d0e4880a4851258c0e58a166841975a5d78655885498840d88626988228872aa892298c2eb8e26c8b2ac8d2ec8636d8832c873ae8932d8c3ef8e3609b3a09d3e09646198420933265f7954126057555585d39a0508a4d49322496562414159c5949d5669552a8d497915e5916214a529985aa936a95d62557627970989f52a957ab9772d9f59063769967ef917af9b520aa7a0a96ac958e0ab62c99821ac6e3ad8289976e9805e6e1e6801268b9a6a616680a67a1ae7a2a69a4ae9ac92aae96aa93d8855e14efa9978e5545a51da361655c1ea7beda3b6359bacaabadafbe78fb5371cafa745fa7caea3c5da8ca0b9ca3bbc20bac65b4ce4b2d25b9de6bcb27b3c67b6ca5b0ee7b4e64b1ea7b6e69bea6371ba49aae8acaeaa2f2cb3fa9a1f2db8fadb5febbaf6ebf2d5947679c01f76ed954d1475e126cc5474e5e51e1bb707d5ed9372e9b57dd3750ba511b2cf79b7c0f5cc7d3c5cd8708d4c5ce2c5618c60f2642b0790b7582b3ce7d670132c2135c72f7c849aca179cd09da926087f6fb443fb64f0d74feb84f2da473def23d0fa0c6057935fba8c2ab7deea5e66d0d24bc5f3b75b6d0633b2636be220b7ee9df5b7d56b8bb22adb57bd85bcd96fbdb678de5bbd14fefdd467edcda26b0d23c86784390de920cc9a4d81e8891249baa1ea022ea9a2eb123ed9a3ec024e01a4e4025e30a5e6126ef0a3ef66f4735b5e3359cb57c83f8932fc581f6993bfc2653c29dae96abc685dcb3356f2bbec2bde82ece737dea2b5c485bc98dbee62eea7dce91bd5acdc94cf65ab70c337fe7892f9db3432366c3dde0571d3e72df4b3d4e3af6e7af7e7bfce73ba1d2c5ad6d5cadadc627fa2ad7f3cf0fbdf8f71bdfb6acef0085f310eff89450440e003f795b50a69895f0c306abc08b0c90a2052810cb0eefc2811cd0660b388f3e0230348f1c11660f76b51fc4fe2443b12d5ca643e24cc4c0ba62a991a5de3363410a76278c4ad12c0f78ef534022e0588e3c02a1178874c22221798a4c62e66878619571344c22110cc57ca881943954256f5203d61776d5443d71d83164e2d81177ed3336611c8152f2ea19c8d6413eb11d869a632558e8924b3a060f8e6c680713e8a64f32b1304d74d31f15e8284832121196840b4a11e26c2e35ea2e76b28227680881994221fc66a970606a42a0c0b586c3946bcc0e82c6b9c7b572f68781052923353a465288c49c224561193924c649b0f5841c015c2578f241d1a0917d998b061779234b3295eb44bc679321321a9ba1121a9c118d5519a97810d53312915a66ac09b9d0986240d944dc0a9e0bc9319c6664a22cd43c182bd94ecec8433e9911b6e84e720aef892da13f90b458cdc29980935082241c72ddc311736db5b4e0965471f566681a7d2776a1b488c44696b243ffc491241e7dba57a75af035892c20a00500e3473f1201507dd3d0aa2dec464992254e3084f50d703792be233ea465c2db21a0e3c412b0508504d4f340a00920558a9e43b044c879493a2259d4a72755e72c9d29ffd53d328e95943f036835e8c57489c110e9bcc1465567685138ac80583538ab0850c4d8462ec7be1ca622651cca3f58c78710b538ad70fc5442bae29daaf9a121a871c84f0b508a9605a0bd6d0a2f570b275066548f0e8d504a0e4abb49cd3496702aa767b6b74bc9e5805b93ccda4205e9a33c32768977db27ea0b83871aefaa91d0b35056892af042d924f0ba9b74e8655d16fc4f822fc893092c656d4ab550de25f3bd9d59a0807bd851a2431abe8d1aed4fb886be3447b0082a311b0506dac4d013e4140d62196cbb25ceaaadeea99cdb5c5da6bb24d405a6a6fb2dca7d8bf206ac92e500a87b63015b93ac12f2b49011354979d5ad57c2143db303235a713a1da5d905e020dd196f7b7890e192143e9bc8afab614168d0aeb0cca79241ef531339156c4109bcbc44d2ac1c682a45cf095436d3eee25c25b0ed06c7232ee8813df7ce4dbe2047be090582a8d95715c83457c0430d506492358e34859f078d7a6c9e5c591b417e833601ace165aca72f27b51cc0d2f1b3bad202e500eff7944fdb28226ee982535c2061cbb2a1a440570d4603a879a16da17413425fd217987918b5fb80a19cd4905436b6b35298c96f685c483df9f420bd0982abfb67ac072639a621c37835a817174ada43dc707862838a5ae666e602bd7eb4ea4d179953719d4fa8cd73eab25ade5ef924b22d3b58864b3292ddb903b7d6865608264a7053cd57912e4dade15695ec4cc11bd7db24ba96239a171db299dd47ce3c2f1ead8b631362dd52963b67b9fa97a1a47b74aa853fc640d619992eb9cfb0350075354af4d70f941bd13108503d59a29633f2d1dafc09cba6fb32d48e0ad3bad11960598c0b2ed29bddcffef5694ef8a91c77aabf44dd9337a9fce752766aefcf6ac8a0710e2c801cda28ded317bf25bd08ccc5c6f12419f44ccac49174d4cacb329fc9eb2fa7fc0e1edaeaabb559054f168a3332a300502fd6962b1d8d24e204b75576e548447f50db2f4f5ba6e214e476ac8247661a0a1ac5dddd69c7fa8c5c312c6ae594da48286e1319847c5ac171dea7b10aa491e95c21664fa9374e8ed49e3816bda78d92c181421a078b5879c36209636f5024e82f1e5dbd78c24dc79202d204e773230da9214e4135012f1635095035079733e3d3c24ef1ed7049b762dcc651b3d579cac8aca3bdb9c79bde418da24e71449f3d055c883e54c58f6dbc94330a0c770515e579c03255120a8c244d5dcb2e95e34ede09f6be41a6ef012d19afe9f9af92932673ec01397bb7a9241b4a04a8a1aff2f1529fa879a7144bbf2099af47af358354203fa1d55376124a477451287325697b014564084760b57f77772016a02a7c864c0335b86e310459506f71f7985ec3577197797bc07085009505e5171a87325500cd7b26476cf34c58f4747ec7435747c70405f57501bb7366311cf7028e774a39c13089856a07529c7ed7228081d38aa71258500663017c65d5501585f20b16bc01d7595847ad1527387500850977fc5aa7847b917e62d58030a0358e257643475c5126c08401868145241287454a96f206a7485126b75595907801a87d58cb1978611a65595500b06266f85a488f7201350850ef7d7b65950607538fc7922978243838556f78c86396d06a01f78885556397db15165b5b47bc0e07435984601b48c68c916770288c7b68df7e85b51a964052874e7401c85425cf5991a86226a38283a419b83255983b22888275e78853480a3334676276867394b68ac0975058801026e85b97936428e97924341a87ec6c93868350893ac07588459a8ed7e72b48ad70e8ed80f33f7885108261a872505922020e8587463a988d4682d344535011d55988d8e01ac7df8064837e85017806487f20af7081401f187b80931f7e97991ec7da7e17c25501868f48d72ed76a7fd8416c65b00770277ce8a713e85b6103f277362019d8b989644287a05002781b5eef181d5e372041f7625ba6c01a87b97ee55c05565b55413413770e8a97de7d582016b7ad5e95a268856a0711a398f8eb1e390c7b75e65096131e83ba6341b759504c1705f496d7a51dd8d914d5f291344619371787346d8533a962876d5f24e08aa7c294199053523d72381116273b8c47b756d5f37ce5ee2937b00625e83289f352153223d70c7309ee7824d175374a5c898a61172889977d8965ce27577b84340d7cf89f3f18479dc4f09d34f78e52d53676c016b7de5752850885af75922431181d50295473689f3d91b758570d4f09911f58097093be2f09e83287d72005377b24eb8fc75c2eb8b96ee51167c7035cb9b33ca8a47972ac7245b381e890ef8501e29f87236c38885cd5839456c65da95b6ad44c03984d83728988853116a04254e8fc1b47ec7cd5811a980898255a5301b59ee25a8df9f11484f787a06011e8317cf3b694b21e8099271627b00bb8964341a86556c51305ef5ee4f585985e7e850884552b9c651671852f68934285293017d9f204a5939885950296639234950c2a562ce4556845b851e9d2ad525b35b7556847e42a414590a05c113ac657b7776bf8358e51bd5eb52238a9281885d36fd244ace6363d41b65f396c68850171a6924d172f7ff83e7c914e9d85726e46f78967824d26301a986722668d902236a5259562942b7601e20d85d1a2031f7b88422e831f764a0563394552a7ef028d70235d2878a68a337a9634652236a778a01b95bc01e9c0a5a4678d58920cf8038b9ac9a647459a1ac3a785c27fd41f8de91452501f49e9595d27e82d17f0a72a556b17801e240f9ce8122b69992d17f98ec50ba587c995c6552df75c97a6e88b01249834006571141d88e88a41b65458336341e45d8a1c9d79dc16e8f07f35788125350250cdaf20edabd7cda019767587a61c5aac053ab56924bd58478dab00250ff7adaddacda950e20bdaf202fa8c51415a96815a3096946e195983a6595be96378915baf56cf91d50e7b476b21e89f55512d9a6491a4340033f5398dd48e72d2c3ae85b37be627a781f58439558a5633a9175285ca241250556eef77d22701478d8a59242839762711b721e012f85623e8c7aea6f31678fc9222a980e763b0b2f01e116267491d56172b5a95d1b4dad917d90aa8779014982e7baaf799941f7b00891b682283036e770a0b6c8aa38522647ba739896bcd5792d17397c31f89da66f6504b49d85e371021f7db51f3dba226d34b49e85bfa0bacb7ab6b915417988dad70fb22679ea409702398c26428ab9507283863462398905b38ec26e4b0b226d8429923b51396adf75b5078422553d527d9b6b18ac65c26c83f8a529e23d341a045962a527e20849c26b6ab75ae817a489152a7937a4642078113d7e2b301868c5b367601d88aa8f52b68649b6864ab3671bfd5ec72ba29efa1aa0282b3f6179aa6823a11ae41016eb66f87113d379149339ae85b886a45c07d9de6f760035c065bec70c87b9b113d72f7a01c2b528649f31486368bea5515f9eeb5f96976e404bb11219e1190caa68446b2289e97322ac7cd50a8924689e9452a451428018b95f2b675e187c5347a67aa9054dea14175a0699722160225a94a4b717c799bb75bba5c2a26b597267db2ab95a5950652864282f7bcae19d474c48da96ae1617ae88bcb8cb5211e9347cc994865178b2a5d86382e55deb379c6556a9e41e80aa6885c88788f93f6f2b89b2e7785e6b21155611bf61571678bfa428b001b97823ba7253eb29b2b5f47601aa98350dba34f82a4b9eb48653aef53633cb7bd65e5cb27553f7ce1b57aeb2f8ab965c028931cad3de948715417a896a11e56145706f21ab4c03e7b325dbb40187be4635209ba09debba3c8c385394253f31529d4cef8bb232c607f4b27ac7992b7468f8401e798dbe6cfdb015e246b276cd9b35ad8ad326613985358daf5a0f51f8538f075c2b69d64ec86daa710a32bbea995a339c5604a5282e91225165ca81bee7014d02801ecb6117cb2c6891b7ad913d7649cc94199367984016f9d3116b7a1df9fa5d41df770631a46c7553326f955b556dc527be86cf8a8b5c08da446c938830fca68b757e4df4dea1e47ecfa23015dbbd4ea2da911d1a8f786a0b3aa019c95591e44ca4f5f332885ef29154427e0c04cec2289a93462f7a99b7ac6611e88bb49ba514c9a01f8a72d6d1551a5a7a7d0176a989d791b3a7489760b1e9468b67adb12287c5f59ec1957b90a985a289d188e7a6176c65355cc8321ac2aac13279515889ea91bc96a410a9257e1202b5b61027dcf85d573bc954e0799c4551f75d6683a5c2b51f7d18d6850ba8c99bbc0918abcc1ad7d1a1595e20ca34b2a98019f1a2f9544c83b96b01e195fc70a7e4468edb9765ea57d0a6311e1dd855a880d25532189c389dd4eccfaad72b9da6624d4b8cfcd7c2aadf4e7dee9f75a27a1601117a56c17cae11948f6ce6723b65c966928ad9f57223dabbc619595706817d5655925126848786a29ef614125942670145988be017cb1a0bc4d7ba3de6532392b8fb436672b620037571e63f8f07b374c284a408003f59675fd287b462fca386288faad0532217ad3647bea89c4d527cbb6b352d3dbb242963c2c49a18ad649bc077a1b7483e7a48750030b90113b4ea5418dab39705b412bb649d69c998592ad1e2bfcb75cc796505a2f4a942684eac3121eecd7025aadb12591d6cc902dced6014d586c05286843942631a57d2347ec2930fcaeb0162a7b6681d8dde1c1ad7cb88388cf9cf776dab47e31fa40e4c8da721f7596c9604554ae366fd2933e8ab515cfe95f7653abaef90f550b17b4fcd3a0d4e6a85ab46f31e08bbccf952e9b671507c5babeddddef80136a15a764aa7fa91e40b7479722aab6ad803efdac9661916eb7918f13abc229cb1b68a1e9d69972aaa61a8edbbcb1f0cd06e05f82f0527606d8016785cbf9ea5ccc25ad42dd61298a2d4c2e69d544cca3e6e54ab774cc276a60e1576493a63a8f277cbb882cbe95b375f9307c3deba2b6c5ca6662e3226c5aceeb692702a1a1eaa4ebac7b882d7d49f4493edf58015b8fbdc11125ec88dcd5b595029b1199af7b69d2832212f3e0ab99149a98a3eb07998d7dbc0ac85281095a8dd8f5b9016a01a7cdd6aba98d1aba59cd3b9c27deec91179ad728e601dfe81928c75bbfba7b7c3d1c7fb8cd5966cbf07e2517931e1a50b244a809b3875be0f152141aefcc85a3f5acde4104572d7517083467a0b376b581cf41dfe54ecf8dd18fd819d2fae92784e1e2c86e2415ad3d8b16e0af07706365f3e757cf4db17d9a6692824348e15698a097d3b986da8638b361a8bd5366504a41c8af07716781dce31e78a23545f6eb941e0849d9501cede59b3d4ff859cad488f6da7c1e975a97d49c37462a65a7550894da975a63069cef8740a81d7579fe435df576bed7bde26c158c5ea66a8aeb7b1981fd85aeb6a0f8ced7345258b5f920c0ecc483554160668ad35d354afac07a01386f76476f7f91aafda7a8a68a03f93bd35008138f173017b5250728748ffed952050bf5452cf6c7f845af235545baf57c1188cf6af545e4efca456a0e35cbfdda8798eac3d025a8a30641cc017cf4af6f7337a33b45c70ff7728ff7967a9d5ab501ce72eaf357bf4aa462965e356180776c66cf6c7e837b5ff7afa19a2b6893d356ef001d74911b56ac49513565031624280aaf834e3f0bf444057a49582e3817268a98f0f4114388051224280294e84385055e2c2822712bc18827911389b2916dc79f2d523c6993d02c448b0d5ea42a70d8adc2a44d46a4c9a0362d458bc68efc4a03b4eccc9b2796140982f824d6af317a1d3a039a66ddaa358ad41bb211e050bd35567d0bb0796b53a06f564d8b1656aedaa37baa9d99157c65d0a68b03355a2891f36e973fd236ab27b62147b0499ed519027fe5ef52b857173e89497951d4c96db60d9ad3b85160c097ae168a43f53845d67d5fd48d84d86be09c371fc679725733dfacbb272cecc2783fcac52327f6dc3adaadc6e283a3f59b5bb13e6de97513472f393079de9475af2efd92bfec6fdd9d03b4ab297fa0d2b5a183df9e7990f95ae4e3cf2044feeb8fa04fbe8b4c4da207e3eaa7a0ba8bcf20bade13cac043dafa3e0f340d835f29a8d2abbf6c20e6c3da2db3fc7bf091ccca8affe4c3e04b9caa30f283be0abb1da3ee2934d8cb9beb27c6031d02b9f4041d6dbdc67302b4bccafbee07cafe746d093815e34255a709eaceee24a04bf1d7b60f838052c1d09c6f66c91f8c8caba5e8fb5c6b20d2f33f8742efbca452d5a5ec44fc2543d24b42bca396fc7cc83c07142daec7aebb707943c2f4dfe5c0ecd4947ac3ccd3bc0446fc5c1f62b823ccfc673ce8eb7eefabc63522f4da458cd0745d01c47c223847cb85b9283973f1d6b8c805c474c3072b6d83b10b6c405c3c013511574449ab02985fd4a404d0ca0335c1315fc67a61bad0ec7d26d64629ac907a5cfc05fe69485dc30deaacdc051556c53b5c67b6c5a0d45e2bc54dfaeb43d259adfbc23b6feba11f5957b4b7bcb7acfc12f0508bb538bdb15fe3c35ade2be5c7f16b5d4c8059b033e5dcaf5ae44dab8f5c012594fd488dbd66bb5e3d2e39d36471dba17a453555d43e2e2bd4a7395c511b4471e48dab693befcc59b5f21659571d29773d6b742051b51504a478cb83c4ca4dd8399e053058afa5cf8d4a33bee31dd9ad74503bd6f6940b79cdf24d95dfb4d6cc74d866a82e93314763de06704445c4b0765713dc5a8d580946457f5e57c6cbffbf47ade4fbcb7395b45ceaaf3eb77b3a5515e935d3c1fd16b8efc6ab365a3d67ec0c7fe1c44fa47acf9bd489ff5cb3f4ac3ceddecd32f46dc556a39c4f67579c1540b71fbee7ebe876d29e6f35856c56a7cb6e3f4044b9c682d869df151f047729947475e56396c5184147d3feea79d6f6a5d65f877a93be3bb14cb53cd9616ec7bc267f54ae93ed676fd9f463dfeef2325241e23654e291bd2831521416ea95ebb3f02eefcd7d828d0ed614b0af812e6958f20650dee4fe2c903f0975ca5c1c90e6bba80e2aea4124ee909c386b2b99a5ac4c0c4b0ede25e1ba813c2e6dc3dec374a66320b859a97e8b1b50ac28c821069c253c124a9b78b7234b6dcf8e6504ad9582278cb0254f2c6014d398034513b1a5f8e56fcbff06bc55fc2a71be646d9aef4c03d5cf1a220036859a9719e4c76bbcf520588263b818fc23a2c9590a4d56896e89e6b4cb31c19a0e21a96558ca88ab22c020b37184cc9a52d238ced031765c9281d6c6d5a49e2eefea5bfac953d6766a305d8bce456bcec8d6156c1da938417e33291af072ff214db0bd6e7a44ed09f40ebd3278ef823455642b18544bfd9cefef6fb4635fca179837f960dc221a1a1d2f794c2e89427474b1932bc0b7583cc1101f75a90e92359644ac9df03a8aca076fb4b55db6f87fc498342a12aa442f370a405d8829edd53738e89b2d9d095fa2ee4e0328502afdcc207cead35da2352c2fbd23f972ac4e86fc13d63e21bf656202d3a83755ce4ec14aa58cfc179dbca612b8325b8161b4f2ebda486f105259e19564a4660db50fb0bd52df3e6bee83ba6afd3e3d6e838f1d5654e6b5a3de5ac3f0646b69a9a4d5262a9d1d06953549dc0dd580342592759dd4532bf4d8dfa81a5c07744c4c5fd0565c473e43919c4b64a5c4d2492375b1de79c4fc557ac7773971857a4bb4b317da98714dc8a68666ef9c1aa7d4b877417d70369e4c5e19e29a61520945d845e2bf8d5f677f3be9757744d1d850d8fa5156454f63a60458adea07e51819bb6985f397acfa16fda2a8d1d58a0b3e9537b7295ea20d6c956326abc054da3035a1ba8e03f89cc84b1a5db8239e724d7bee43391657da9d6a876d28d2d4fae2341e045696f99ed2dc4a98cd158ec192b5c3e929448c57a9e6cf950a51995dba58adb9e3f8863405911b5b41d05ae2d5af75c820e4a8d72cad005740e94d11faca42c11117887964b5a121d9bbc67aa2fd97b582238cf7fa5236ac034e94a1e0fa49d7cfe6059ba3daf0a9cc0938d7a59645bf542be339f632bfcac7767e523e17d47894b061d3dbb991e36e917c84c055175ecaa77c729f595c95d403361673e2f0661d152fc08a7876961c726481b554625a09b170c9ac6879eaa36901a5da7e9b8d5fcef4e6908000129f4010a000ff00c2000000000910f4000080ef0059d2318ac80e04385070e1458909022c78c012a3c884172a5c5871b126cd8a1b3a44e8f1d365409325466c0982b46ac39a2b52bc794216a9c894376adc595317adc564c4021b18f35951b283497af40a3078a05f974595055a54b72f44ab479a1d9ae4392156a85f9e6dba14dba559a165be8d6a263a2a53ba6bb2b5ea56ba6bd8b051e25dab06fee752ba7fcab59b673b20ecb281f2fd2cb77de0e3c96307362cf891fb58c395277468891166edca9b337efce93438e1d2ab439e3d6a353ae5daab53be7dea363ce9d2bb63d60d5c4befcddb478ee63a34d7f4de91c3b2fe2efb98f2d4edbd830f5e3cb93374e1d9af178e7d587677eac5bf37fedd9befb4fae8dfbb87be6e7a79f0fae1cf8fdedefcfaf7f9e9cbb74fcedebcfbf3f1f3dfcf25514a3d08e25e450ed4702182392860e2890e38e0648d0e4880a4851258c0e58a166841975a5d78655885498840d88626988228872aa892298c2eb8e26c8b2ac8d2ec8636d8832c873ae8932d8c3ef8e3609b3a09d3e09646198420933265f7954126057555585d39a0508a4d49322496562414159c5949d5669552a8d497915e5916214a529985aa936a95d62557627970989f52a957ab9772d9f59063769967ef917af9b520aa7a0a96ac958e0ab62c99821ac6e3ad8289976e9805e6e1e6801268b9a6a616680a67a1ae7a2a69a4ae9ac92aae96aa93d8855e14efa9978e5545a51da361655c1ea7beda3b6359bacaabadafbe78fb5371cafa745fa7caea3c5da8ca0b9ca3bbc20bac65b4ce4b2d25b9de6bcb27b3c67b6ca5b0ee7b4e64b1ea7b6e69bea6371ba49aae8acaeaa2f2cb3fa9a1f2db8fadb5febbaf6ebf2d5947679c01f76ed954d1475e126cc5474e5e51e1bb707d5ed9372e9b57dd3750ba511b2cf79b7c0f5cc7d3c5cd8708d4c5ce2c5618c60f2642b0790b7582b3ce7d670132c2135c72f7c849aca179cd09da926087f6fb443fb64f0d74feb84f2da473def23d0fa0c6057935fba8c2ab7deea5e66d0d24bc5f3b75b6d0633b2636be220b7ee9df5b7d56b8bb22adb57bd85bcd96fbdb678de5bbd14fefdd467edcda26b0d23c86784390de920cc9a4d81e8891249baa1ea022ea9a2eb123ed9a3ec024e01a4e4025e30a5e6126ef0a3ef66f4735b5e3359cb57c83f8932fc581f6993bfc2653c29dae96abc685dcb3356f2bbec2bde82ece737dea2b5c485bc98dbee62eea7dce91bd5acdc94cf65ab70c337fe7892f9db3432366c3dde0571d3e72df4b3d4e3af6e7af7e7bfce73ba1d2c5ad6d5cadadc627fa2ad7f3cf0fbdf8f71bdfb6acef0085f310eff89450440e003f795b50a69895f0c306abc08b0c90a2052810cb0eefc2811cd0660b388f3e0230348f1c11660f76b51fc4fe2443b12d5ca643e24cc4c0ba62a991a5de3363410a76278c4ad12c0f78ef534022e0588e3c02a1178874c22221798a4c62e66878619571344c22110cc57ca881943954256f5203d61776d5443d71d83164e2d81177ed3336611c8152f2ea19c8d6413eb11d869a632558e8924b3a060f8e6c680713e8a64f32b1304d74d31f15e8284832121196840b4a11e26c2e35ea2e76b28227680881994221fc66a970606a42a0c0b586c3946bcc0e82c6b9c7b572f68781052923353a465288c49c224561193924c649b0f5841c015c2578f241d1a0917d998b061779234b3295eb44bc679321321a9ba1121a9c118d5519a97810d53312915a66ac09b9d0986240d944dc0a9e0bc9319c6664a22cd43c182bd94ecec8433e9911b6e84e720aef892da13f90b458cdc29980935082241c72ddc311736db5b4e0965471f566681a7d2776a1b488c44696b243ffc491241e7dba57a75af035892c20a00500e3473f1201507dd3d0aa2dec464992254e3084f50d703792be233ea465c2db21a0e3c412b0508504d4f340a00920558a9e43b044c879493a2259d4a72755e72c9d29ffd53d328e95943f036835e8c57489c110e9bcc1465567685138ac80583538ab0850c4d8462ec7be1ca622651cca3f58c78710b538ad70fc5442bae29daaf9a121a871c84f0b508a9605a0bd6d0a2f570b275066548f0e8d504a0e4abb49cd3496702aa767b6b74bc9e5805b93ccda4205e9a33c32768977db27ea0b83871aefaa91d0b35056892af042d924f0ba9b74e8655d16fc4f822fc893092c656d4ab550de25f3bd9d59a0807bd851a2431abe8d1aed4fb886be3447b0082a311b0506dac4d013e4140d62196cbb25ceaaadeea99cdb5c5da6bb24d405a6a6fb2dca7d8bf206ac92e500a87b63015b93ac12f2b49011354979d5ad57c2143db303235a713a1da5d905e020dd196f7b7890e192143e9bc8afab614168d0aeb0cca79241ef531339156c4109bcbc44d2ac1c682a45cf095436d3eee25c25b0ed06c7232ee8813df7ce4dbe2047be090582a8d95715c83457c0430d506492358e34859f078d7a6c9e5c591b417e833601ace165aca72f27b51cc0d2f1b3bad202e500eff7944fdb28226ee982535c2061cbb2a1a440570d4603a879a16da17413425fd217987918b5fb80a19cd4905436b6b35298c96f685c483df9f420bd0982abfb67ac072639a621c37835a817174ada43dc707862838a5ae666e602bd7eb4ea4d179953719d4fa8cd73eab25ade5ef924b22d3b58864b3292ddb903b7d6865608264a7053cd57912e4dade15695ec4cc11bd7db24ba96239a171db299dd47ce3c2f1ead8b631362dd52963b67b9fa97a1a47b74aa853fc640d619992eb9cfb0350075354af4d70f941bd13108503d59a29633f2d1dafc09cba6fb32d48e0ad3bad11960598c0b2ed29bddcffef5694ef8a91c77aabf44dd9337a9fce752766aefcf6ac8a0710e2c801cda28ded317bf25bd08ccc5c6f12419f44ccac49174d4cacb329fc9eb2fa7fc0e1edaeaabb559054f168a3332a300502fd6962b1d8d24e204b75576e548447f50db2f4f5ba6e214e476ac8247661a0a1ac5dddd69c7fa8c5c312c6ae594da48286e1319847c5ac171dea7b10aa491e95c21664fa9374e8ed49e3816bda78d92c181421a078b5879c36209636f5024e82f1e5dbd78c24dc79202d204e773230da9214e4135012f1635095035079733e3d3c24ef1ed7049b762dcc651b3d579cac8aca3bdb9c79bde418da24e71449f3d055c883e54c58f6dbc94330a0c770515e579c03255120a8c244d5dcb2e95e34ede09f6be41a6ef012d19afe9f9af92932673ec01397bb7a9241b4a04a8a1aff2f1529fa879a7144bbf2099af47af358354203fa1d55376124a477451287325697b014564084760b57f77772016a02a7c864c0335b86e310459506f71f7985ec3577197797bc07085009505e5171a87325500cd7b26476cf34c58f4747ec7435747c70405f57501bb7366311cf7028e774a39c13089856a07529c7ed7228081d38aa71258500663017c65d5501585f20b16bc01d7595847ad1527387500850977fc5aa7847b917e62d58030a0358e257643475c5126c08401868145241287454a96f206a7485126b75595907801a87d58cb1978611a65595500b06266f85a488f7201350850ef7d7b65950607538fc7922978243838556f78c86396d06a01f78885556397db15165b5b47bc0e07435984601b48c68c916770288c7b68df7e85b51a964052874e7401c85425cf5991a86226a38283a419b83255983b22888275e78853480a3334676276867394b68ac0975058801026e85b97936428e97924341a87ec6c93868350893ac07588459a8ed7e72b48ad70e8ed80f33f7885108261a872505922020e8587463a988d4682d344535011d55988d8e01ac7df8064837e85017806487f20af7081401f187b80931f7e97991ec7da7e17c25501868f48d72ed76a7fd8416c65b00770277ce8a713e85b6103f277362019d8b989644287a05002781b5eef181d5e372041f7625ba6c01a87b97ee55c05565b55413413770e8a97de7d582016b7ad5e95a268856a0711a398f8eb1e390c7b75e65096131e83ba6341b759504c1705f496d7a51dd8d914d5f291344619371787346d8533a962876d5f24e08aa7c294199053523d72381116273b8c47b756d5f37ce5ee2937b00625e83289f352153223d70c7309ee7824d175374a5c898a61172889977d8965ce27577b84340d7cf89f3f18479dc4f09d34f78e52d53676c016b7de5752850885af75922431181d50295473689f3d91b758570d4f09911f58097093be2f09e83287d72005377b24eb8fc75c2eb8b96ee51167c7035cb9b33ca8a47972ac7245b381e890ef8501e29f87236c38885cd5839456c65da95b6ad44c03984d83728988853116a04254e8fc1b47ec7cd5811a980898255a5301b59ee25a8df9f11484f787a06011e8317cf3b694b21e8099271627b00bb8964341a86556c51305ef5ee4f585985e7e850884552b9c651671852f68934285293017d9f204a5939885950296639234950c2a562ce4556845b851e9d2ad525b35b7556847e42a414590a05c113ac657b7776bf8358e51bd5eb52238a9281885d36fd244ace6363d41b65f396c68850171a6924d172f7ff83e7c914e9d85726e46f78967824d26301a986722668d902236a5259562942b7601e20d85d1a2031f7b88422e831f764a0563394552a7ef028d70235d2878a68a337a9634652236a778a01b95bc01e9c0a5a4678d58920cf8038b9ac9a647459a1ac3a785c27fd41f8de91452501f49e9595d27e82d17f0a72a556b17801e240f9ce8122b69992d17f98ec50ba587c995c6552df75c97a6e88b01249834006571141d88e88a41b65458336341e45d8a1c9d79dc16e8f07f35788125350250cdaf20edabd7cda019767587a61c5aac053ab56924bd58478dab00250ff7adaddacda950e20bdaf202fa8c51415a96815a3096946e195983a6595be96378915baf56cf91d50e7b476b21e89f55512d9a6491a4340033f5398dd48e72d2c3ae85b37be627a781f58439558a5633a9175285ca241250556eef77d22701478d8a59242839762711b721e012f85623e8c7aea6f31678fc9222a980e763b0b2f01e116267491d56172b5a95d1b4dad917d90aa8779014982e7baaf799941f7b00891b682283036e770a0b6c8aa38522647ba739896bcd5792d17397c31f89da66f6504b49d85e371021f7db51f3dba226d34b49e85bfa0bacb7ab6b915417988dad70fb22679ea409702398c26428ab9507283863462398905b38ec26e4b0b226d8429923b51396adf75b5078422553d527d9b6b18ac65c26c83f8a529e23d341a045962a527e20849c26b6ab75ae817a489152a7937a4642078113d7e2b301868c5b367601d88aa8f52b68649b6864ab3671bfd5ec72ba29efa1aa0282b3f6179aa6823a11ae41016eb66f87113d379149339ae85b886a45c07d9de6f760035c065bec70c87b9b113d72f7a01c2b528649f31486368bea5515f9eeb5f96976e404bb11219e1190caa68446b2289e97322ac7cd50a8924689e9452a451428018b95f2b675e187c5347a67aa9054dea14175a0699722160225a94a4b717c799bb75bba5c2a26b597267db2ab95a5950652864282f7bcae19d474c48da96ae1617ae88bcb8cb5211e9347cc994865178b2a5d86382e55deb379c6556a9e41e80aa6885c88788f93f6f2b89b2e7785e6b21155611bf61571678bfa428b001b97823ba7253eb29b2b5f47601aa98350dba34f82a4b9eb48653aef53633cb7bd65e5cb27553f7ce1b57aeb2f8ab965c028931cad3de948715417a896a11e56145706f21ab4c03e7b325dbb40187be4635209ba09debba3c8c385394253f31529d4cef8bb232c607f4b27ac7992b7468f8401e798dbe6cfdb015e246b276cd9b35ad8ad326613985358daf5a0f51f8538f075c2b69d64ec86daa710a32bbea995a339c5604a5282e91225165ca81bee7014d02801ecb6117cb2c6891b7ad913d7649cc94199367984016f9d3116b7a1df9fa5d41df770631a46c7553326f955b556dc527be86cf8a8b5c08da446c938830fca68b757e4df4dea1e47ecfa23015dbbd4ea2da911d1a8f786a0b3aa019c95591e44ca4f5f332885ef29154427e0c04cec2289a93462f7a99b7ac6611e88bb49ba514c9a01f8a72d6d1551a5a7a7d0176a989d791b3a7489760b1e9468b67adb12287c5f59ec1957b90a985a289d188e7a6176c65355cc8321ac2aac13279515889ea91bc96a410a9257e1202b5b61027dcf85d573bc954e0799c4551f75d6683a5c2b51f7d18d6850ba8c99bbc0918abcc1ad7d1a1595e20ca34b2a98019f1a2f9544c83b96b01e195fc70a7e4468edb9765ea57d0a6311e1dd855a880d25532189c389dd4eccfaad72b9da6624d4b8cfcd7c2aadf4e7dee9f75a27a1601117a56c17cae11948f6ce6723b65c966928ad9f57223dabbc619595706817d5655925126848786a29ef614125942670145988be017cb1a0bc4d7ba3de6532392b8fb436672b620037571e63f8f07b374c284a408003f59675fd287b462fca386288faad0532217ad3647bea89c4d527cbb6b352d3dbb242963c2c49a18ad649bc077a1b7483e7a48750030b90113b4ea5418dab39705b412bb649d69c998592ad1e2bfcb75cc796505a2f4a942684eac3121eecd7025aadb12591d6cc902dced6014d586c05286843942631a57d2347ec2930fcaeb0162a7b6681d8dde1c1ad7cb88388cf9cf776dab47e31fa40e4c8da721f7596c9604554ae366fd2933e8ab515cfe95f7653abaef90f550b17b4fcd3a0d4e6a85ab46f31e08bbccf952e9b671507c5babeddddef80136a15a764aa7fa91e40b7479722aab6ad803efdac9661916eb7918f13abc229cb1b68a1e9d69972aaa61a8edbbcb1f0cd06e05f82f0527606d8016785cbf9ea5ccc25ad42dd61298a2d4c2e69d544cca3e6e54ab774cc276a60e1576493a63a8f277cbb882cbe95b375f9307c3deba2b6c5ca6662e3226c5aceeb692702a1a1eaa4ebac7b882d7d49f4493edf58015b8fbdc11125ec88dcd5b595029b1199af7b69d2832212f3e0ab99149a98a3eb07998d7dbc0ac85281095a8dd8f5b9016a01a7cdd6aba98d1aba59cd3b9c27deec91179ad728e601dfe81928c75bbfba7b7c3d1c7fb8cd5966cbf07e2517931e1a50b244a809b3875be0f152141aefcc85a3f5acde4104572d7517083467a0b376b581cf41dfe54ecf8dd18fd819d2fae92784e1e2c86e2415ad3d8b16e0af07706365f3e757cf4db17d9a6692824348e15698a097d3b986da8638b361a8bd5366504a41c8af07716781dce31e78a23545f6eb941e0849d9501cede59b3d4ff859cad488f6da7c1e975a97d49c37462a65a7550894da975a63069cef8740a81d7579fe435df576bed7bde26c158c5ea66a8aeb7b1981fd85aeb6a0f8ced7345258b5f920c0ecc483554160668ad35d354afac07a01386f76476f7f91aafda7a8a68a03f93bd35008138f173017b5250728748ffed952050bf5452cf6c7f845af235545baf57c1188cf6af545e4efca456a0e35cbfdda8798eac3d025a8a30641cc017cf4af6f7337a33b45c70ff7728ff7967a9d5ab501ce72eaf357bf4aa462965e356180776c66cf6c7e837b5ff7afa19a2b6893d356ef001d74911b56ac49513565031624280aaf834e3f0bf444057a49582e3817268a98f0f4114388051224280294e84385055e2c2822712bc18827911389b2916dc79f2d523c6993d02c448b0d5ea42a70d8adc2a44d46a4c9a0362d458bc68efc4a03b4eccc9b2796140982f824d6af317a1d3a039a66ddaa358ad41bb211e050bd35567d0bb0796b53a06f564d8b1656aedaa37baa9d99157c65d0a68b03355a2891f36e973fd236ab27b62147b0499ed519027fe5ef52b857173e89497951d4c96db60d9ad3b85160c097ae168a43f53845d67d5fd48d84d86be09c371fc679725733dfacbb272cecc2783fcac52327f6dc3adaadc6e283a3f59b5bb13e6de97513472f393079de9475af2efd92bfec6fdd9d03b4ab297fa0d2b5a183df9e7990f95ae4e3cf2044feeb8fa04fbe8b4c4da207e3eaa7a0ba8bcf20bade13cac043dafa3e0f340d835f29a8d2abbf6c20e6c3da2db3fc7bf091ccca8affe4c3e04b9caa30f283be0abb1da3ee2934d8cb9beb27c6031d02b9f4041d6dbdc67302b4bccafbee07cafe746d093815e34255a709eaceee24a04bf1d7b60f838052c1d09c6f66c91f8c8caba5e8fb5c6b20d2f33f8742efbca452d5a5ec44fc2543d24b42bca396fc7cc83c07142daec7aebb707943c2f4dfe5c0ecd4947ac3ccd3bc0446fc5c1f62b823ccfc673ce8eb7eefabc63522f4da458cd0745d01c47c223847cb85b9283973f1d6b8c805c474c3072b6d83b10b6c405c3c013511574449ab02985fd4a404d0ca0335c1315fc67a61bad0ec7d26d64629ac907a5cfc05fe69485dc30deaacdc051556c53b5c67b6c5a0d45e2bc54dfaeb43d259adfbc23b6feba11f5957b4b7bcb7acfc12f0508bb538bdb15fe3c35ade2be5c7f16b5d4c8059b033e5dcaf5ae44dab8f5c012594fd488dbd66bb5e3d2e39d36471dba17a453555d43e2e2bd4a7395c511b4471e48dab693befcc59b5f21659571d29773d6b742051b51504a478cb83c4ca4dd8399e053058afa5cf8d4a33bee31dd9ad74503bd6f6940b79cdf24d95dfb4d6cc74d866a82e93314763de06704445c4b0765713dc5a8d580946457f5e57c6cbffbf47ade4fbcb7395b45ceaaf3eb77b3a5515e935d3c1fd16b8efc6ab365a3d67ec0c7fe1c44fa47acf9bd489ff5cb3f4ac3ceddecd32f46dc556a39c4f67579c1540b71fbee7ebe876d29e6f35856c56a7cb6e3f4044b9c682d869df151f047729947475e56396c5184147d3feea79d6f6a5d65f877a93be3bb14cb53cd9616ec7bc267f54ae93ed676fd9f463dfeef2325241e23654e291bd2831521416ea95ebb3f02eefcd7d828d0ed614b0af812e6958f20650dee4fe2c903f0975ca5c1c90e6bba80e2aea4124ee909c386b2b99a5ac4c0c4b0ede25e1ba813c2e6dc3dec374a66320b859a97e8b1b50ac28c821069c253c124a9b78b7234b6dcf8e6504ad9582278cb0254f2c6014d398034513b1a5f8e56fcbff06bc55fc2a71be646d9aef4c03d5cf1a220036859a9719e4c76bbcf520588263b818fc23a2c9590a4d56896e89e6b4cb31c19a0e21a96558ca88ab22c020b37184cc9a52d238ced031765c9281d6c6d5a49e2eefea5bfac953d6766a305d8bce456bcec8d6156c1da938417e33291af072ff214db0bd6e7a44ed09f40ebd3278ef823455642b18544bfd9cefef6fb4635fca179837f960dc221a1a1d2f794c2e89427474b1932bc0b7583cc1101f75a90e92359644ac9df03a8aca076fb4b55db6f87fc498342a12aa442f370a405d8829edd53738e89b2d9d095fa2ee4e0328502afdcc207cead35da2352c2fbd23f972ac4e86fc13d63e21bf656202d3a83755ce4ec14aa58cfc179dbca612b8325b8161b4f2ebda486f105259e19564a4660db50fb0bd52df3e6bee83ba6afd3e3d6e838f1d5654e6b5a3de5ac3f0646b69a9a4d5262a9d1d06953549dc0dd580342592759dd4532bf4d8dfa81a5c07744c4c5fd0565c473e43919c4b64a5c4d2492375b1de79c4fc557ac7773971857a4bb4b317da98714dc8a68666ef9c1aa7d4b877417d70369e4c5e19e29a61520945d845e2bf8d5f677f3be9757744d1d850d8fa5156454f63a60458adea07e51819bb6985f397acfa16fda2a8d1d58a0b3e9537b7295ea20d6c956326abc054da3035a1ba8e03f89cc84b1a5db8239e724d7bee43391657da9d6a876d28d2d4fae2341e045696f99ed2dc4a98cd158ec192b5c3e929448c57a9e6cf950a51995dba58adb9e3f8863405911b5b41d05ae2d5af75c820e4a8d72cad005740e94d11faca42c11117887964b5a121d9bbc67aa2fd97b582238cf7fa5236ac034e94a1e0fa49d7cfe6059ba3daf0a9cc0938d7a59645bf542be339f632bfcac7767e523e17d47894b061d3dbb991e36e917c84c055175ecaa77c729f595c95d403361673e2f0661d152fc08a7876961c726481b554625a09b170c9ac6879eaa36901a5da7e9b8d5fcef4e6908000129f4010a000ff00c2000000000910f4000080ef0059d2318ac80e04385070e1458909022c78c012a3c884172a5c5871b126cd8a1b3a44e8f1d365409325466c0982b46ac39a2b52bc794216a9c894376adc595317adc564c4021b18f35951b283497af40a3078a05f974595055a54b72f44ab479a1d9ae4392156a85f9e6dba14dba559a165be8d6a263a2a53ba6bb2b5ea56ba6bd8b051e25dab06fee752ba7fcab59b673b20ecb281f2fd2cb77de0e3c96307362cf891fb58c395277468891166edca9b337efce93438e1d2ab439e3d6a353ae5daab53be7dea363ce9d2bb63d60d5c4befcddb478ee63a34d7f4de91c3b2fe2efb98f2d4edbd830f5e3cb93374e1d9af178e7d587677eac5bf37fedd9befb4fae8dfbb87be6e7a79f0fae1cf8fdedefcfaf7f9e9cbb74fcedebcfbf3f1f3dfcf25514a3d08e25e450ed4702182392860e2890e38e0648d0e4880a4851258c0e58a166841975a5d78655885498840d88626988228872aa892298c2eb8e26c8b2ac8d2ec8636d8832c873ae8932d8c3ef8e3609b3a09d3e09646198420933265f7954126057555585d39a0508a4d49322496562414159c5949d5669552a8d497915e5916214a529985aa936a95d62557627970989f52a957ab9772d9f59063769967ef917af9b520aa7a0a96ac958e0ab62c99821ac6e3ad8289976e9805e6e1e6801268b9a6a616680a67a1ae7a2a69a4ae9ac92aae96aa93d8855e14efa9978e5545a51da361655c1ea7beda3b6359bacaabadafbe78fb5371cafa745fa7caea3c5da8ca0b9ca3bbc20bac65b4ce4b2d25b9de6bcb27b3c67b6ca5b0ee7b4e64b1ea7b6e69bea6371ba49aae8acaeaa2f2cb3fa9a1f2db8fadb5febbaf6ebf2d5947679c01f76ed954d1475e126cc5474e5e51e1bb707d5ed9372e9b57dd3750ba511b2cf79b7c0f5cc7d3c5cd8708d4c5ce2c5618c60f2642b0790b7582b3ce7d670132c2135c72f7c849aca179cd09da926087f6fb443fb64f0d74feb84f2da473def23d0fa0c6057935fba8c2ab7deea5e66d0d24bc5f3b75b6d0633b2636be220b7ee9df5b7d56b8bb22adb57bd85bcd96fbdb678de5bbd14fefdd467edcda26b0d23c86784390de920cc9a4d81e8891249baa1ea022ea9a2eb123ed9a3ec024e01a4e4025e30a5e6126ef0a3ef66f4735b5e3359cb57c83f8932fc581f6993bfc2653c29dae96abc685dcb3356f2bbec2bde82ece737dea2b5c485bc98dbee62eea7dce91bd5acdc94cf65ab70c337fe7892f9db3432366c3dde0571d3e72df4b3d4e3af6e7af7e7bfce73ba1d2c5ad6d5cadadc627fa2ad7f3cf0fbdf8f71bdfb6acef0085f310eff89450440e003f795b50a69895f0c306abc08b0c90a2052810cb0eefc2811cd0660b388f3e0230348f1c11660f76b51fc4fe2443b12d5ca643e24cc4c0ba62a991a5de3363410a76278c4ad12c0f78ef534022e0588e3c02a1178874c22221798a4c62e66878619571344c22110cc57ca881943954256f5203d61776d5443d71d83164e2d81177ed3336611c8152f2ea19c8d6413eb11d869a632558e8924b3a060f8e6c680713e8a64f32b1304d74d31f15e8284832121196840b4a11e26c2e35ea2e76b28227680881994221fc66a970606a42a0c0b586c3946bcc0e82c6b9c7b572f68781052923353a465288c49c224561193924c649b0f5841c015c2578f241d1a0917d998b061779234b3295eb44bc679321321a9ba1121a9c118d5519a97810d53312915a66ac09b9d0986240d944dc0a9e0bc9319c6664a22cd43c182bd94ecec8433e9911b6e84e720aef892da13f90b458cdc29980935082241c72ddc311736db5b4e0965471f566681a7d2776a1b488c44696b243ffc491241e7dba57a75af035892c20a00500e3473f1201507dd3d0aa2dec464992254e3084f50d703792be233ea465c2db21a0e3c412b0508504d4f340a00920558a9e43b044c879493a2259d4a72755e72c9d29ffd53d328e95943f036835e8c57489c110e9bcc1465567685138ac80583538ab0850c4d8462ec7be1ca622651cca3f58c78710b538ad70fc5442bae29daaf9a121a871c84f0b508a9605a0bd6d0a2f570b275066548f0e8d504a0e4abb49cd3496702aa767b6b74bc9e5805b93ccda4205e9a33c32768977db27ea0b83871aefaa91d0b35056892af042d924f0ba9b74e8655d16fc4f822fc893092c656d4ab550de25f3bd9d59a0807bd851a2431abe8d1aed4fb886be3447b0082a311b0506dac4d013e4140d62196cbb25ceaaadeea99cdb5c5da6bb24d405a6a6fb2dca7d8bf206ac92e500a87b63015b93ac12f2b49011354979d5ad57c2143db303235a713a1da5d905e020dd196f7b7890e192143e9bc8afab614168d0aeb0cca79241ef531339156c4109bcbc44d2ac1c682a45cf095436d3eee25c25b0ed06c7232ee8813df7ce4dbe2047be090582a8d95715c83457c0430d506492358e34859f078d7a6c9e5c591b417e833601ace165aca72f27b51cc0d2f1b3bad202e500eff7944fdb28226ee982535c2061cbb2a1a440570d4603a879a16da17413425fd217987918b5fb80a19cd4905436b6b35298c96f685c483df9f420bd0982abfb67ac072639a621c37835a817174ada43dc707862838a5ae666e602bd7eb4ea4d179953719d4fa8cd73eab25ade5ef924b22d3b58864b3292ddb903b7d6865608264a7053cd57912e4dade15695ec4cc11bd7db24ba96239a171db299dd47ce3c2f1ead8b631362dd52963b67b9fa97a1a47b74aa853fc640d619992eb9cfb0350075354af4d70f941bd13108503d59a29633f2d1dafc09cba6fb32d48e0ad3bad11960598c0b2ed29bddcffef5694ef8a91c77aabf44dd9337a9fce752766aefcf6ac8a0710e2c801cda28ded317bf25bd08ccc5c6f12419f44ccac49174d4cacb329fc9eb2fa7fc0e1edaeaabb559054f168a3332a300502fd6962b1d8d24e204b75576e548447f50db2f4f5ba6e214e476ac8247661a0a1ac5dddd69c7fa8c5c312c6ae594da48286e1319847c5ac171dea7b10aa491e95c21664fa9374e8ed49e3816bda78d92c181421a078b5879c36209636f5024e82f1e5dbd78c24dc79202d204e773230da9214e4135012f1635095035079733e3d3c24ef1ed7049b762dcc651b3d579cac8aca3bdb9c79bde418da24e71449f3d055c883e54c58f6dbc94330a0c770515e579c03255120a8c244d5dcb2e95e34ede09f6be41a6ef012d19afe9f9af92932673ec01397bb7a9241b4a04a8a1aff2f1529fa879a7144bbf2099af47af358354203fa1d55376124a477451287325697b014564084760b57f77772016a02a7c864c0335b86e310459506f71f7985ec3577197797bc07085009505e5171a87325500cd7b26476cf34c58f4747ec7435747c70405f57501bb7366311cf7028e774a39c13089856a07529c7ed7228081d38aa71258500663017c65d5501585f20b16bc01d7595847ad1527387500850977fc5aa7847b917e62d58030a0358e257643475c5126c08401868145241287454a96f206a7485126b75595907801a87d58cb1978611a65595500b06266f85a488f7201350850ef7d7b65950607538fc7922978243838556f78c86396d06a01f78885556397db15165b5b47bc0e07435984601b48c68c916770288c7b68df7e85b51a964052874e7401c85425cf5991a86226a38283a419b83255983b22888275e78853480a3334676276867394b68ac0975058801026e85b97936428e97924341a87ec6c93868350893ac07588459a8ed7e72b48ad70e8ed80f33f7885108261a872505922020e8587463a988d4682d344535011d55988d8e01ac7df8064837e85017806487f20af7081401f187b80931f7e97991ec7da7e17c25501868f48d72ed76a7fd8416c65b00770277ce8a713e85b6103f277362019d8b989644287a05002781b5eef181d5e372041f7625ba6c01a87b97ee55c05565b55413413770e8a97de7d582016b7ad5e95a268856a0711a398f8eb1e390c7b75e65096131e83ba6341b759504c1705f496d7a51dd8d914d5f291344619371787346d8533a962876d5f24e08aa7c294199053523d72381116273b8c47b756d5f37ce5ee2937b00625e83289f352153223d70c7309ee7824d175374a5c898a61172889977d8965ce27577b84340d7cf89f3f18479dc4f09d34f78e52d53676c016b7de5752850885af75922431181d50295473689f3d91b758570d4f09911f58097093be2f09e83287d72005377b24eb8fc75c2eb8b96ee51167c7035cb9b33ca8a47972ac7245b381e890ef8501e29f87236c38885cd5839456c65da95b6ad44c03984d83728988853116a04254e8fc1b47ec7cd5811a980898255a5301b59ee25a8df9f11484f787a06011e8317cf3b694b21e8099271627b00bb8964341a86556c51305ef5ee4f585985e7e850884552b9c651671852f68934285293017d9f204a5939885950296639234950c2a562ce4556845b851e9d2ad525b35b7556847e42a414590a05c113ac657b7776bf8358e51bd5eb52238a9281885d36fd244ace6363d41b65f396c68850171a6924d172f7ff83e7c914e9d85726e46f78967824d26301a986722668d902236a5259562942b7601e20d85d1a2031f7b88422e831f764a0563394552a7ef028d70235d2878a68a337a9634652236a778a01b95bc01e9c0a5a4678d58920cf8038b9ac9a647459a1ac3a785c27fd41f8de91452501f49e9595d27e82d17f0a72a556b17801e240f9ce8122b69992d17f98ec50ba587c995c6552df75c97a6e88b01249834006571141d88e88a41b65458336341e45d8a1c9d79dc16e8f07f35788125350250cdaf20edabd7cda019767587a61c5aac053ab56924bd58478dab00250ff7adaddacda950e20bdaf202fa8c51415a96815a3096946e195983a6595be96378915baf56cf91d50e7b476b21e89f55512d9a6491a4340033f5398dd48e72d2c3ae85b37be627a781f58439558a5633a9175285ca241250556eef77d22701478d8a59242839762711b721e012f85623e8c7aea6f31678fc9222a980e763b0b2f01e116267491d56172b5a95d1b4dad917d90aa8779014982e7baaf799941f7b00891b682283036e770a0b6c8aa38522647ba739896bcd5792d17397c31f89da66f6504b49d85e371021f7db51f3dba226d34b49e85bfa0bacb7ab6b915417988dad70fb22679ea409702398c26428ab9507283863462398905b38ec26e4b0b226d8429923b51396adf75b5078422553d527d9b6b18ac65c26c83f8a529e23d341a045962a527e20849c26b6ab75ae817a489152a7937a4642078113d7e2b301868c5b367601d88aa8f52b68649b6864ab3671bfd5ec72ba29efa1aa0282b3f6179aa6823a11ae41016eb66f87113d379149339ae85b886a45c07d9de6f760035c065bec70c87b9b113d72f7a01c2b528649f31486368bea5515f9eeb5f96976e404bb11219e1190caa68446b2289e97322ac7cd50a8924689e9452a451428018b95f2b675e187c5347a67aa9054dea14175a0699722160225a94a4b717c799bb75bba5c2a26b597267db2ab95a5950652864282f7bcae19d474c48da96ae1617ae88bcb8cb5211e9347cc994865178b2a5d86382e55deb379c6556a9e41e80aa6885c88788f93f6f2b89b2e7785e6b21155611bf61571678bfa428b001b97823ba7253eb29b2b5f47601aa98350dba34f82a4b9eb48653aef53633cb7bd65e5cb27553f7ce1b57aeb2f8ab965c028931cad3de948715417a896a11e56145706f21ab4c03e7b325dbb40187be4635209ba09debba3c8c385394253f31529d4cef8bb232c607f4b27ac7992b7468f8401e798dbe6cfdb015e246b276cd9b35ad8ad326613985358daf5a0f51f8538f075c2b69d64ec86daa710a32bbea995a339c5604a5282e91225165ca81bee7014d02801ecb6117cb2c6891b7ad913d7649cc94199367984016f9d3116b7a1df9fa5d41df770631a46c7553326f955b556dc527be86cf8a8b5c08da446c938830fca68b757e4df4dea1e47ecfa23015dbbd4ea2da911d1a8f786a0b3aa019c95591e44ca4f5f332885ef29154427e0c04cec2289a93462f7a99b7ac6611e88bb49ba514c9a01f8a72d6d1551a5a7a7d0176a989d791b3a7489760b1e9468b67adb12287c5f59ec1957b90a985a289d188e7a6176c65355cc8321ac2aac13279515889ea91bc96a410a9257e1202b5b61027dcf85d573bc954e0799c4551f75d6683a5c2b51f7d18d6850ba8c99bbc0918abcc1ad7d1a1595e20ca34b2a98019f1a2f9544c83b96b01e195fc70a7e4468edb9765ea57d0a6311e1dd855a880d25532189c389dd4eccfaad72b9da6624d4b8cfcd7c2aadf4e7dee9f75a27a1601117a56c17cae11948f6ce6723b65c966928ad9f57223dabbc619595706817d5655925126848786a29ef614125942670145988be017cb1a0bc4d7ba3de6532392b8fb436672b620037571e63f8f07b374c284a408003f59675fd287b462fca386288faad0532217ad3647bea89c4d527cbb6b352d3dbb242963c2c49a18ad649bc077a1b7483e7a48750030b90113b4ea5418dab39705b412bb649d69c998592ad1e2bfcb75cc796505a2f4a942684eac3121eecd7025aadb12591d6cc902dced6014d586c05286843942631a57d2347ec2930fcaeb0162a7b6681d8dde1c1ad7cb88388cf9cf776dab47e31fa40e4c8da721f7596c9604554ae366fd2933e8ab515cfe95f7653abaef90f550b17b4fcd3a0d4e6a85ab46f31e08bbccf952e9b671507c5babeddddef80136a15a764aa7fa91e40b7479722aab6ad803efdac9661916eb7918f13abc229cb1b68a1e9d69972aaa61a8edbbcb1f0cd06e05f82f0527606d8016785cbf9ea5ccc25ad42dd61298a2d4c2e69d544cca3e6e54ab774cc276a60e1576493a63a8f277cbb882cbe95b375f9307c3deba2b6c5ca6662e3226c5aceeb692702a1a1eaa4ebac7b882d7d49f4493edf58015b8fbdc11125ec88dcd5b595029b1199af7b69d2832212f3e0ab99149a98a3eb07998d7dbc0ac85281095a8dd8f5b9016a01a7cdd6aba98d1aba59cd3b9c27deec91179ad728e601dfe81928c75bbfba7b7c3d1c7fb8cd5966cbf07e2517931e1a50b244a809b3875be0f152141aefcc85a3f5acde4104572d7517083467a0b376b581cf41dfe54ecf8dd18fd819d2fae92784e1e2c86e2415ad3d8b16e0af07706365f3e757cf4db17d9a6692824348e15698a097d3b986da8638b361a8bd5366504a41c8af07716781dce31e78a23545f6eb941e0849d9501cede59b3d4ff859cad488f6da7c1e975a97d49c37462a65a7550894da975a63069cef8740a81d7579fe435df576bed7bde26c158c5ea66a8aeb7b1981fd85aeb6a0f8ced7345258b5f920c0ecc483554160668ad35d354afac07a01386f76476f7f91aafda7a8a68a03f93bd35008138f173017b5250728748ffed952050bf5452cf6c7f845af235545baf57c1188cf6af545e4efca456a0e35cbfdda8798eac3d025a8a30641cc017cf4af6f7337a33b45c70ff7728ff7967a9d5ab501ce72eaf357bf4aa462965e356180776c66cf6c7e837b5ff7afa19a2b6893d356ef001d74911b56ac49513565031624280aaf834e3f0bf444057a49582e3817268a98f0f4114388051224280294e84385055e2c2822712bc18827911389b2916dc79f2d523c6993d02c448b0d5ea42a70d8adc2a44d46a4c9a0362d458bc68efc4a03b4eccc9b2796140982f824d6af317a1d3a039a66ddaa358ad41bb211e050bd35567d0bb0796b53a06f564d8b1656aedaa37baa9d99157c65d0a68b03355a2891f36e973fd236ab27b62147b0499ed519027fe5ef52b857173e89497951d4c96db60d9ad3b85160c097ae168a43f53845d67d5fd48d84d86be09c371fc679725733dfacbb272cecc2783fcac52327f6dc3adaadc6e283a3f59b5bb13e6de97513472f393079de9475af2efd92bfec6fdd9d03b4ab297fa0d2b5a183df9e7990f95ae4e3cf2044feeb8fa04fbe8b4c4da207e3eaa7a0ba8bcf20bade13cac043dafa3e0f340d835f29a8d2abbf6c20e6c3da2db3fc7bf091ccca8affe4c3e04b9caa30f283be0abb1da3ee2934d8cb9beb27c6031d02b9f4041d6dbdc67302b4bccafbee07cafe746d093815e34255a709eaceee24a04bf1d7b60f838052c1d09c6f66c91f8c8caba5e8fb5c6b20d2f33f8742efbca452d5a5ec44fc2543d24b42bca396fc7cc83c07142daec7aebb707943c2f4dfe5c0ecd4947ac3ccd3bc0446fc5c1f62b823ccfc673ce8eb7eefabc63522f4da458cd0745d01c47c223847cb85b9283973f1d6b8c805c474c3072b6d83b10b6c405c3c013511574449ab02985fd4a404d0ca0335c1315fc67a61bad0ec7d26d64629ac907a5cfc05fe69485dc30deaacdc051556c53b5c67b6c5a0d45e2bc54dfaeb43d259adfbc23b6feba11f5957b4b7bcb7acfc12f0508bb538bdb15fe3c35ade2be5c7f16b5d4c8059b033e5dcaf5ae44dab8f5c012594fd488dbd66bb5e3d2e39d36471dba17a453555d43e2e2bd4a7395c511b4471e48dab693befcc59b5f21659571d29773d6b742051b51504a478cb83c4ca4dd8399e053058afa5cf8d4a33bee31dd9ad74503bd6f6940b79cdf24d95dfb4d6cc74d866a82e93314763de06704445c4b0765713dc5a8d580946457f5e57c6cbffbf47ade4fbcb7395b45ceaaf3eb77b3a5515e935d3c1fd16b8efc6ab365a3d67ec0c7fe1c44fa47acf9bd489ff5cb3f4ac3ceddecd32f46dc556a39c4f67579c1540b71fbee7ebe876d29e6f35856c56a7cb6e3f4044b9c682d869df151f047729947475e56396c5184147d3feea79d6f6a5d65f877a93be3bb14cb53cd9616ec7bc267f54ae93ed676fd9f463dfeef2325241e23654e291bd2831521416ea95ebb3f02eefcd7d828d0ed614b0af812e6958f20650dee4fe2c903f0975ca5c1c90e6bba80e2aea4124ee909c386b2b99a5ac4c0c4b0ede25e1ba813c2e6dc3dec374a66320b859a97e8b1b50ac28c821069c253c124a9b78b7234b6dcf8e6504ad9582278cb0254f2c6014d398034513b1a5f8e56fcbff06bc55fc2a71be646d9aef4c03d5cf1a220036859a9719e4c76bbcf520588263b818fc23a2c9590a4d56896e89e6b4cb31c19a0e21a96558ca88ab22c020b37184cc9a52d238ced031765c9281d6c6d5a49e2eefea5bfac953d6766a305d8bce456bcec8d6156c1da938417e33291af072ff214db0bd6e7a44ed09f40ebd3278ef823455642b18544bfd9cefef6fb4635fca179837f960dc221a1a1d2f794c2e89427474b1932bc0b7583cc1101f75a90e92359644ac9df03a8aca076fb4b55db6f87fc498342a12aa442f370a405d8829edd53738e89b2d9d095fa2ee4e0328502afdcc207cead35da2352c2fbd23f972ac4e86fc13d63e21bf656202d3a83755ce4ec14aa58cfc179dbca612b8325b8161b4f2ebda486f105259e19564a4660db50fb0bd52df3e6bee83ba6afd3e3d6e838f1d5654e6b5a3de5ac3f0646b69a9a4d5262a9d1d06953549dc0dd580342592759dd4532bf4d8dfa81a5c07744c4c5fd0565c473e43919c4b64a5c4d2492375b1de79c4fc557ac7773971857a4bb4b317da98714dc8a68666ef9c1aa7d4b877417d70369e4c5e19e29a61520945d845e2bf8d5f677f3be9757744d1d850d8fa5156454f63a60458adea07e51819bb6985f397acfa16fda2a8d1d58a0b3e9537b7295ea20d6c956326abc054da3035a1ba8e03f89cc84b1a5db8239e724d7bee43391657da9d6a876d28d2d4fae2341e045696f99ed2dc4a98cd158ec192b5c3e929448c57a9e6cf950a51995dba58adb9e3f8863405911b5b41d05ae2d5af75c820e4a8d72cad005740e94d11faca42c11117887964b5a121d9bbc67aa2fd97b582238cf7fa5236ac034e94a1e0fa49d7cfe6059ba3daf0a9cc0938d7a59645bf542be339f632bfcac7767e523e17d47894b061d3dbb991e36e917c84c055175ecaa77c729f595c95d403361673e2f0661d152fc08a7876961c726481b554625a09b170c9ac6879eaa36901a5da7e9b8d5fcef4e6908000129f4010a000ff00c2000000000910f4000080ef0059d2318ac80e04385070e1458909022c78c012a3c884172a5c5871b126cd8a1b3a44e8f1d365409325466c0982b46ac39a2b52bc794216a9c894376adc595317adc564c4021b18f35951b283497af40a3078a05f974595055a54b72f44ab479a1d9ae4392156a85f9e6dba14dba559a165be8d6a263a2a53ba6bb2b5ea56ba6bd8b051e25dab06fee752ba7fcab59b673b20ecb281f2fd2cb77de0e3c96307362cf891fb58c395277468891166edca9b337efce93438e1d2ab439e3d6a353ae5daab53be7dea363ce9d2bb63d60d5c4befcddb478ee63a34d7f4de91c3b2fe2efb98f2d4edbd830f5e3cb93374e1d9af178e7d587677eac5bf37fedd9befb4fae8dfbb87be6e7a79f0fae1cf8fdedefcfaf7f9e9cbb74fcedebcfbf3f1f3dfcf25514a3d08e25e450ed4702182392860e2890e38e0648d0e4880a4851258c0e58a166841975a5d78655885498840d88626988228872aa892298c2eb8e26c8b2ac8d2ec8636d8832c873ae8932d8c3ef8e3609b3a09d3e09646198420933265f7954126057555585d39a0508a4d49322496562414159c5949d5669552a8d497915e5916214a529985aa936a95d62557627970989f52a957ab9772d9f59063769967ef917af9b520aa7a0a96ac958e0ab62c99821ac6e3ad8289976e9805e6e1e6801268b9a6a616680a67a1ae7a2a69a4ae9ac92aae96aa93d8855e14efa9978e5545a51da361655c1ea7beda3b6359bacaabadafbe78fb5371cafa745fa7caea3c5da8ca0b9ca3bbc20bac65b4ce4b2d25b9de6bcb27b3c67b6ca5b0ee7b4e64b1ea7b6e69bea6371ba49aae8acaeaa2f2cb3fa9a1f2db8fadb5febbaf6ebf2d5947679c01f76ed954d1475e126cc5474e5e51e1bb707d5ed9372e9b57dd3750ba511b2cf79b7c0f5cc7d3c5cd8708d4c5ce2c5618c60f2642b0790b7582b3ce7d670132c2135c72f7c849aca179cd09da926087f6fb443fb64f0d74feb84f2da473def23d0fa0c6057935fba8c2ab7deea5e66d0d24bc5f3b75b6d0633b2636be220b7ee9df5b7d56b8bb22adb57bd85bcd96fbdb678de5bbd14fefdd467edcda26b0d23c86784390de920cc9a4d81e8891249baa1ea022ea9a2eb123ed9a3ec024e01a4e4025e30a5e6126ef0a3ef66f4735b5e3359cb57c83f8932fc581f6993bfc2653c29dae96abc685dcb3356f2bbec2bde82ece737dea2b5c485bc98dbee62eea7dce91bd5acdc94cf65ab70c337fe7892f9db3432366c3dde0571d3e72df4b3d4e3af6e7af7e7bfce73ba1d2c5ad6d5cadadc627fa2ad7f3cf0fbdf8f71bdfb6acef0085f310eff89450440e003f795b50a69895f0c306abc08b0c90a2052810cb0eefc2811cd0660b388f3e0230348f1c11660f76b51fc4fe2443b12d5ca643e24cc4c0ba62a991a5de3363410a76278c4ad12c0f78ef534022e0588e3c02a1178874c22221798a4c62e66878619571344c22110cc57ca881943954256f5203d61776d5443d71d83164e2d81177ed3336611c8152f2ea19c8d6413eb11d869a632558e8924b3a060f8e6c680713e8a64f32b1304d74d31f15e8284832121196840b4a11e26c2e35ea2e76b28227680881994221fc66a970606a42a0c0b586c3946bcc0e82c6b9c7b572f68781052923353a465288c49c224561193924c649b0f5841c015c2578f241d1a0917d998b061779234b3295eb44bc679321321a9ba1121a9c118d5519a97810d53312915a66ac09b9d0986240d944dc0a9e0bc9319c6664a22cd43c182bd94ecec8433e9911b6e84e720aef892da13f90b458cdc29980935082241c72ddc311736db5b4e0965471f566681a7d2776a1b488c44696b243ffc491241e7dba57a75af035892c20a00500e3473f1201507dd3d0aa2dec464992254e3084f50d703792be233ea465c2db21a0e3c412b0508504d4f340a00920558a9e43b044c879493a2259d4a72755e72c9d29ffd53d328e95943f036835e8c57489c110e9bcc1465567685138ac80583538ab0850c4d8462ec7be1ca622651cca3f58c78710b538ad70fc5442bae29daaf9a121a871c84f0b508a9605a0bd6d0a2f570b275066548f0e8d504a0e4abb49cd3496702aa767b6b74bc9e5805b93ccda4205e9a33c32768977db27ea0b83871aefaa91d0b35056892af042d924f0ba9b74e8655d16fc4f822fc893092c656d4ab550de25f3bd9d59a0807bd851a2431abe8d1aed4fb886be3447b0082a311b0506dac4d013e4140d62196cbb25ceaaadeea99cdb5c5da6bb24d405a6a6fb2dca7d8bf206ac92e500a87b63015b93ac12f2b49011354979d5ad57c2143db303235a713a1da5d905e020dd196f7b7890e192143e9bc8afab614168d0aeb0cca79241ef531339156c4109bcbc44d2ac1c682a45cf095436d3eee25c25b0ed06c7232ee8813df7ce4dbe2047be090582a8d95715c83457c0430d506492358e34859f078d7a6c9e5c591b417e833601ace165aca72f27b51cc0d2f1b3bad202e500eff7944fdb28226ee982535c2061cbb2a1a440570d4603a879a16da17413425fd217987918b5fb80a19cd4905436b6b35298c96f685c483df9f420bd0982abfb67ac072639a621c37835a817174ada43dc707862838a5ae666e602bd7eb4ea4d179953719d4fa8cd73eab25ade5ef924b22d3b58864b3292ddb903b7d6865608264a7053cd57912e4dade15695ec4cc11bd7db24ba96239a171db299dd47ce3c2f1ead8b631362dd52963b67b9fa97a1a47b74aa853fc640d619992eb9cfb0350075354af4d70f941bd13108503d59a29633f2d1dafc09cba6fb32d48e0ad3bad11960598c0b2ed29bddcffef5694ef8a91c77aabf44dd9337a9fce752766aefcf6ac8a0710e2c801cda28ded317bf25bd08ccc5c6f12419f44ccac49174d4cacb329fc9eb2fa7fc0e1edaeaabb559054f168a3332a300502fd6962b1d8d24e204b75576e548447f50db2f4f5ba6e214e476ac8247661a0a1ac5dddd69c7fa8c5c312c6ae594da48286e1319847c5ac171dea7b10aa491e95c21664fa9374e8ed49e3816bda78d92c181421a078b5879c36209636f5024e82f1e5dbd78c24dc79202d204e773230da9214e4135012f1635095035079733e3d3c24ef1ed7049b762dcc651b3d579cac8aca3bdb9c79bde418da24e71449f3d055c883e54c58f6dbc94330a0c770515e579c03255120a8c244d5dcb2e95e34ede09f6be41a6ef012d19afe9f9af92932673ec01397bb7a9241b4a04a8a1aff2f1529fa879a7144bbf2099af47af358354203fa1d55376124a477451287325697b014564084760b57f77772016a02a7c864c0335b86e310459506f71f7985ec3577197797bc07085009505e5171a87325500cd7b26476cf34c58f4747ec7435747c70405f57501bb7366311cf7028e774a39c13089856a07529c7ed7228081d38aa71258500663017c65d5501585f20b16bc01d7595847ad1527387500850977fc5aa7847b917e62d58030a0358e257643475c5126c08401868145241287454a96f206a7485126b75595907801a87d58cb1978611a65595500b06266f85a488f7201350850ef7d7b65950607538fc7922978243838556f78c86396d06a01f78885556397db15165b5b47bc0e07435984601b48c68c916770288c7b68df7e85b51a964052874e7401c85425cf5991a86226a38283a419b83255983b22888275e78853480a3334676276867394b68ac0975058801026e85b97936428e97924341a87ec6c93868350893ac07588459a8ed7e72b48ad70e8ed80f33f7885108261a872505922020e8587463a988d4682d344535011d55988d8e01ac7df8064837e85017806487f20af7081401f187b80931f7e97991ec7da7e17c25501868f48d72ed76a7fd8416c65b00770277ce8a713e85b6103f277362019d8b989644287a05002781b5eef181d5e372041f7625ba6c01a87b97ee55c05565b55413413770e8a97de7d582016b7ad5e95a268856a0711a398f8eb1e390c7b75e65096131e83ba6341b759504c1705f496d7a51dd8d914d5f291344619371787346d8533a962876d5f24e08aa7c294199053523d72381116273b8c47b756d5f37ce5ee2937b00625e83289f352153223d70c7309ee7824d175374a5c898a61172889977d8965ce27577b84340d7cf89f3f18479dc4f09d34f78e52d53676c016b7de5752850885af75922431181d50295473689f3d91b758570d4f09911f58097093be2f09e83287d72005377b24eb8fc75c2eb8b96ee51167c7035cb9b33ca8a47972ac7245b381e890ef8501e29f87236c38885cd5839456c65da95b6ad44c03984d83728988853116a04254e8fc1b47ec7cd5811a980898255a5301b59ee25a8df9f11484f787a06011e8317cf3b694b21e8099271627b00bb8964341a86556c51305ef5ee4f585985e7e850884552b9c651671852f68934285293017d9f204a5939885950296639234950c2a562ce4556845b851e9d2ad525b35b7556847e42a414590a05c113ac657b7776bf8358e51bd5eb52238a9281885d36fd244ace6363d41b65f396c68850171a6924d172f7ff83e7c914e9d85726e46f78967824d26301a986722668d902236a5259562942b7601e20d85d1a2031f7b88422e831f764a0563394552a7ef028d70235d2878a68a337a9634652236a778a01b95bc01e9c0a5a4678d58920cf8038b9ac9a647459a1ac3a785c27fd41f8de91452501f49e9595d27e82d17f0a72a556b17801e240f9ce8122b69992d17f98ec50ba587c995c6552df75c97a6e88b01249834006571141d88e88a41b65458336341e45d8a1c9d79dc16e8f07f35788125350250cdaf20edabd7cda019767587a61c5aac053ab56924bd58478dab00250ff7adaddacda950e20bdaf202fa8c51415a96815a3096946e195983a6595be96378915baf56cf91d50e7b476b21e89f55512d9a6491a4340033f5398dd48e72d2c3ae85b37be627a781f58439558a5633a9175285ca241250556eef77d22701478d8a59242839762711b721e012f85623e8c7aea6f31678fc9222a980e763b0b2f01e116267491d56172b5a95d1b4dad917d90aa8779014982e7baaf799941f7b00891b682283036e770a0b6c8aa38522647ba739896bcd5792d17397c31f89da66f6504b49d85e371021f7db51f3dba226d34b49e85bfa0bacb7ab6b915417988dad70fb22679ea409702398c26428ab9507283863462398905b38ec26e4b0b226d8429923b51396adf75b5078422553d527d9b6b18ac65c26c83f8a529e23d341a045962a527e20849c26b6ab75ae817a489152a7937a4642078113d7e2b301868c5b367601d88aa8f52b68649b6864ab3671bfd5ec72ba29efa1aa0282b3f6179aa6823a11ae41016eb66f87113d379149339ae85b886a45c07d9de6f760035c065bec70c87b9b113d72f7a01c2b528649f31486368bea5515f9eeb5f96976e404bb11219e1190caa68446b2289e97322ac7cd50a8924689e9452a451428018b95f2b675e187c5347a67aa9054dea14175a0699722160225a94a4b717c799bb75bba5c2a26b597267db2ab95a5950652864282f7bcae19d474c48da96ae1617ae88bcb8cb5211e9347cc994865178b2a5d86382e55deb379c6556a9e41e80aa6885c88788f93f6f2b89b2e7785e6b21155611bf61571678bfa428b001b97823ba7253eb29b2b5f47601aa98350dba34f82a4b9eb48653aef53633cb7bd65e5cb27553f7ce1b57aeb2f8ab965c028931cad3de948715417a896a11e56145706f21ab4c03e7b325dbb40187be4635209ba09debba3c8c385394253f31529d4cef8bb232c607f4b27ac7992b7468f8401e798dbe6cfdb015e246b276cd9b35ad8ad326613985358daf5a0f51f8538f075c2b69d64ec86daa710a32bbea995a339c5604a5282e91225165ca81bee7014d02801ecb6117cb2c6891b7ad913d7649cc94199367984016f9d3116b7a1df9fa5d41df770631a46c7553326f955b556dc527be86cf8a8b5c08da446c938830fca68b757e4df4dea1e47ecfa23015dbbd4ea2da911d1a8f786a0b3aa019c95591e44ca4f5f332885ef29154427e0c04cec2289a93462f7a99b7ac6611e88bb49ba514c9a01f8a72d6d1551a5a7a7d0176a989d791b3a7489760b1e9468b67adb12287c5f59ec1957b90a985a289d188e7a6176c65355cc8321ac2aac13279515889ea91bc96a410a9257e1202b5b61027dcf85d573bc954e0799c4551f75d6683a5c2b51f7d18d6850ba8c99bbc0918abcc1ad7d1a1595e20ca34b2a98019f1a2f9544c83b96b01e195fc70a7e4468edb9765ea57d0a6311e1dd855a880d25532189c389dd4eccfaad72b9da6624d4b8cfcd7c2aadf4e7dee9f75a27a1601117a56c17cae11948f6ce6723b65c966928ad9f57223dabbc619595706817d5655925126848786a29ef614125942670145988be017cb1a0bc4d7ba3de6532392b8fb436672b620037571e63f8f07b374c284a408003f59675fd287b462fca386288faad0532217ad3647bea89c4d527cbb6b352d3dbb242963c2c49a18ad649bc077a1b7483e7a48750030b90113b4ea5418dab39705b412bb649d69c998592ad1e2bfcb75cc796505a2f4a942684eac3121eecd7025aadb12591d6cc902dced6014d586c05286843942631a57d2347ec2930fcaeb0162a7b6681d8dde1c1ad7cb88388cf9cf776dab47e31fa40e4c8da721f7596c9604554ae366fd2933e8ab515cfe95f7653abaef90f550b17b4fcd3a0d4e6a85ab46f31e08bbccf952e9b671507c5babeddddef80136a15a764aa7fa91e40b7479722aab6ad803efdac9661916eb7918f13abc229cb1b68a1e9d69972aaa61a8edbbcb1f0cd06e05f82f0527606d8016785cbf9ea5ccc25ad42dd61298a2d4c2e69d544cca3e6e54ab774cc276a60e1576493a63a8f277cbb882cbe95b375f9307c3deba2b6c5ca6662e3226c5aceeb692702a1a1eaa4ebac7b882d7d49f4493edf58015b8fbdc11125ec88dcd5b595029b1199af7b69d2832212f3e0ab99149a98a3eb07998d7dbc0ac85281095a8dd8f5b9016a01a7cdd6aba98d1aba59cd3b9c27deec91179ad728e601dfe81928c75bbfba7b7c3d1c7fb8cd5966cbf07e2517931e1a50b244a809b3875be0f152141aefcc85a3f5acde4104572d7517083467a0b376b581cf41dfe54ecf8dd18fd819d2fae92784e1e2c86e2415ad3d8b16e0af07706365f3e757cf4db17d9a6692824348e15698a097d3b986da8638b361a8bd5366504a41c8af07716781dce31e78a23545f6eb941e0849d9501cede59b3d4ff859cad488f6da7c1e975a97d49c37462a65a7550894da975a63069cef8740a81d7579fe435df576bed7bde26c158c5ea66a8aeb7b1981fd85aeb6a0f8ced7345258b5f920c0ecc483554160668ad35d354afac07a01386f76476f7f91aafda7a8a68a03f93bd35008138f173017b5250728748ffed952050bf5452cf6c7f845af235545baf57c1188cf6af545e4efca456a0e35cbfdda8798eac3d025a8a30641cc017cf4af6f7337a33b45c70ff7728ff7967a9d5ab501ce72eaf357bf4aa462965e356180776c66cf6c7e837b5ff7afa19a2b6893d356ef001d74911b56ac49513565031624280aaf834e3f0bf444057a49582e3817268a98f0f4114388051224280294e84385055e2c2822712bc18827911389b2916dc79f2d523c6993d02c448b0d5ea42a70d8adc2a44d46a4c9a0362d458bc68efc4a03b4eccc9b2796140982f824d6af317a1d3a039a66ddaa358ad41bb211e050bd35567d0bb0796b53a06f564d8b1656aedaa37baa9d99157c65d0a68b03355a2891f36e973fd236ab27b62147b0499ed519027fe5ef52b857173e89497951d4c96db60d9ad3b85160c097ae168a43f53845d67d5fd48d84d86be09c371fc679725733dfacbb272cecc2783fcac52327f6dc3adaadc6e283a3f59b5bb13e6de97513472f393079de9475af2efd92bfec6fdd9d03b4ab297fa0d2b5a183df9e7990f95ae4e3cf2044feeb8fa04fbe8b4c4da207e3eaa7a0ba8bcf20bade13cac043dafa3e0f340d835f29a8d2abbf6c20e6c3da2db3fc7bf091ccca8affe4c3e04b9caa30f283be0abb1da3ee2934d8cb9beb27c6031d02b9f4041d6dbdc67302b4bccafbee07cafe746d093815e34255a709eaceee24a04bf1d7b60f838052c1d09c6f66c91f8c8caba5e8fb5c6b20d2f33f8742efbca452d5a5ec44fc2543d24b42bca396fc7cc83c07142daec7aebb707943c2f4dfe5c0ecd4947ac3ccd3bc0446fc5c1f62b823ccfc673ce8eb7eefabc63522f4da458cd0745d01c47c223847cb85b9283973f1d6b8c805c474c3072b6d83b10b6c405c3c013511574449ab02985fd4a404d0ca0335c1315fc67a61bad0ec7d26d64629ac907a5cfc05fe69485dc30deaacdc051556c53b5c67b6c5a0d45e2bc54dfaeb43d259adfbc23b6feba11f5957b4b7bcb7acfc12f0508bb538bdb15fe3c35ade2be5c7f16b5d4c8059b033e5dcaf5ae44dab8f5c012594fd488dbd66bb5e3d2e39d36471dba17a453555d43e2e2bd4a7395c511b4471e48dab693befcc59b5f21659571d29773d6b742051b51504a478cb83c4ca4dd8399e053058afa5cf8d4a33bee31dd9ad74503bd6f6940b79cdf24d95dfb4d6cc74d866a82e93314763de06704445c4b0765713dc5a8d580946457f5e57c6cbffbf47ade4fbcb7395b45ceaaf3eb77b3a5515e935d3c1fd16b8efc6ab365a3d67ec0c7fe1c44fa47acf9bd489ff5cb3f4ac3ceddecd32f46dc556a39c4f67579c1540b71fbee7ebe876d29e6f35856c56a7cb6e3f4044b9c682d869df151f047729947475e56396c5184147d3feea79d6f6a5d65f877a93be3bb14cb53cd9616ec7bc267f54ae93ed676fd9f463dfeef2325241e23654e291bd2831521416ea95ebb3f02eefcd7d828d0ed614b0af812e6958f20650dee4fe2c903f0975ca5c1c90e6bba80e2aea4124ee909c386b2b99a5ac4c0c4b0ede25e1ba813c2e6dc3dec374a66320b859a97e8b1b50ac28c821069c253c124a9b78b7234b6dcf8e6504ad9582278cb0254f2c6014d398034513b1a5f8e56fcbff06bc55fc2a71be646d9aef4c03d5cf1a220036859a9719e4c76bbcf520588263b818fc23a2c9590a4d56896e89e6b4cb31c19a0e21a96558ca88ab22c020b37184cc9a52d238ced031765c9281d6c6d5a49e2eefea5bfac953d6766a305d8bce456bcec8d6156c1da938417e33291af072ff214db0bd6e7a44ed09f40ebd3278ef823455642b18544bfd9cefef6fb4635fca179837f960dc221a1a1d2f794c2e89427474b1932bc0b7583cc1101f75a90e92359644ac9df03a8aca076fb4b55db6f87fc498342a12aa442f370a405d8829edd53738e89b2d9d095fa2ee4e0328502afdcc207cead35da2352c2fbd23f972ac4e86fc13d63e21bf656202d3a83755ce4ec14aa58cfc179dbca612b8325b8161b4f2ebda486f105259e19564a4660db50fb0bd52df3e6bee83ba6afd3e3d6e838f1d5654e6b5a3de5ac3f0646b69a9a4d5262a9d1d06953549dc0dd580342592759dd4532bf4d8dfa81a5c07744c4c5fd0565c473e43919c4b64a5c4d2492375b1de79c4fc557ac7773971857a4bb4b317da98714dc8a68666ef9c1aa7d4b877417d70369e4c5e19e29a61520945d845e2bf8d5f677f3be9757744d1d850d8fa5156454f63a60458adea07e51819bb6985f397acfa16fda2a8d1d58a0b3e9537b7295ea20d6c956326abc054da3035a1ba8e03f89cc84b1a5db8239e724d7bee43391657da9d6a876d28d2d4fae2341e045696f99ed2dc4a98cd158ec192b5c3e929448c57a9e6cf950a51995dba58adb9e3f8863405911b5b41d05ae2d5af75c820e4a8d72cad005740e94d11faca42c11117887964b5a121d9bbc67aa2fd97b582238cf7fa5236ac034e94a1e0fa49d7cfe6059ba3daf0a9cc0938d7a59645bf542be339f632bfcac7767e523e17d47894b061d3dbb991e36e917c84c055175ecaa77c729f595c95d403361673e2f0661d152fc08a7876961c726481b554625a09b170c9ac6879eaa36901a5da7e9b8d5fcef4e6908000129f4010a000ff00c2000000000910f4000080ef0059d2318ac80e04385070e1458909022c78c012a3c884172a5c5871b126cd8a1b3a44e8f1d365409325466c0982b46ac39a2b52bc794216a9c894376adc595317adc564c4021b18f35951b283497af40a3078a05f974595055a54b72f44ab479a1d9ae4392156a85f9e6dba14dba559a165be8d6a263a2a53ba6bb2b5ea56ba6bd8b051e25dab06fee752ba7fcab59b673b20ecb281f2fd2cb77de0e3c96307362cf891fb58c395277468891166edca9b337efce93438e1d2ab439e3d6a353ae5daab53be7dea363ce9d2bb63d60d5c4befcddb478ee63a34d7f4de91c3b2fe2efb98f2d4edbd830f5e3cb93374e1d9af178e7d587677eac5bf37fedd9befb4fae8dfbb87be6e7a79f0fae1cf8fdedefcfaf7f9e9cbb74fcedebcfbf3f1f3dfcf25514a3d08e25e450ed4702182392860e2890e38e0648d0e4880a4851258c0e58a166841975a5d78655885498840d88626988228872aa892298c2eb8e26c8b2ac8d2ec8636d8832c873ae8932d8c3ef8e3609b3a09d3e09646198420933265f7954126057555585d39a0508a4d49322496562414159c5949d5669552a8d497915e5916214a529985aa936a95d62557627970989f52a957ab9772d9f59063769967ef917af9b520aa7a0a96ac958e0ab62c99821ac6e3ad8289976e9805e6e1e6801268b9a6a616680a67a1ae7a2a69a4ae9ac92aae96aa93d8855e14efa9978e5545a51da361655c1ea7beda3b6359bacaabadafbe78fb5371cafa745fa7caea3c5da8ca0b9ca3bbc20bac65b4ce4b2d25b9de6bcb27b3c67b6ca5b0ee7b4e64b1ea7b6e69bea6371ba49aae8acaeaa2f2cb3fa9a1f2db8fadb5febbaf6ebf2d5947679c01f76ed954d1475e126cc5474e5e51e1bb707d5ed9372e9b57dd3750ba511b2cf79b7c0f5cc7d3c5cd8708d4c5ce2c5618c60f2642b0790b7582b3ce7d670132c2135c72f7c849aca179cd09da926087f6fb443fb64f0d74feb84f2da473def23d0fa0c6057935fba8c2ab7deea5e66d0d24bc5f3b75b6d0633b2636be220b7ee9df5b7d56b8bb22adb57bd85bcd96fbdb678de5bbd14fefdd467edcda26b0d23c86784390de920cc9a4d81e8891249baa1ea022ea9a2eb123ed9a3ec024e01a4e4025e30a5e6126ef0a3ef66f4735b5e3359cb57c83f8932fc581f6993bfc2653c29dae96abc685dcb3356f2bbec2bde82ece737dea2b5c485bc98dbee62eea7dce91bd5acdc94cf65ab70c337fe7892f9db3432366c3dde0571d3e72df4b3d4e3af6e7af7e7bfce73ba1d2c5ad6d5cadadc627fa2ad7f3cf0fbdf8f71bdfb6acef0085f310eff89450440e003f795b50a69895f0c306abc08b0c90a2052810cb0eefc2811cd0660b388f3e0230348f1c11660f76b51fc4fe2443b12d5ca643e24cc4c0ba62a991a5de3363410a76278c4ad12c0f78ef534022e0588e3c02a1178874c22221798a4c62e66878619571344c22110cc57ca881943954256f5203d61776d5443d71d83164e2d81177ed3336611c8152f2ea19c8d6413eb11d869a632558e8924b3a060f8e6c680713e8a64f32b1304d74d31f15e8284832121196840b4a11e26c2e35ea2e76b28227680881994221fc66a970606a42a0c0b586c3946bcc0e82c6b9c7b572f68781052923353a465288c49c224561193924c649b0f5841c015c2578f241d1a0917d998b061779234b3295eb44bc679321321a9ba1121a9c118d5519a97810d53312915a66ac09b9d0986240d944dc0a9e0bc9319c6664a22cd43c182bd94ecec8433e9911b6e84e720aef892da13f90b458cdc29980935082241c72ddc311736db5b4e0965471f566681a7d2776a1b488c44696b243ffc491241e7dba57a75af035892c20a00500e3473f1201507dd3d0aa2dec464992254e3084f50d703792be233ea465c2db21a0e3c412b0508504d4f340a00920558a9e43b044c879493a2259d4a72755e72c9d29ffd53d328e95943f036835e8c57489c110e9bcc1465567685138ac80583538ab0850c4d8462ec7be1ca622651cca3f58c78710b538ad70fc5442bae29daaf9a121a871c84f0b508a9605a0bd6d0a2f570b275066548f0e8d504a0e4abb49cd3496702aa767b6b74bc9e5805b93ccda4205e9a33c32768977db27ea0b83871aefaa91d0b35056892af042d924f0ba9b74e8655d16fc4f822fc893092c656d4ab550de25f3bd9d59a0807bd851a2431abe8d1aed4fb886be3447b0082a311b0506dac4d013e4140d62196cbb25ceaaadeea99cdb5c5da6bb24d405a6a6fb2dca7d8bf206ac92e500a87b63015b93ac12f2b49011354979d5ad57c2143db303235a713a1da5d905e020dd196f7b7890e192143e9bc8afab614168d0aeb0cca79241ef531339156c4109bcbc44d2ac1c682a45cf095436d3eee25c25b0ed06c7232ee8813df7ce4dbe2047be090582a8d95715c83457c0430d506492358e34859f078d7a6c9e5c591b417e833601ace165aca72f27b51cc0d2f1b3bad202e500eff7944fdb28226ee982535c2061cbb2a1a440570d4603a879a16da17413425fd217987918b5fb80a19cd4905436b6b35298c96f685c483df9f420bd0982abfb67ac072639a621c37835a817174ada43dc707862838a5ae666e602bd7eb4ea4d179953719d4fa8cd73eab25ade5ef924b22d3b58864b3292ddb903b7d6865608264a7053cd57912e4dade15695ec4cc11bd7db24ba96239a171db299dd47ce3c2f1ead8b631362dd52963b67b9fa97a1a47b74aa853fc640d619992eb9cfb0350075354af4d70f941bd13108503d59a29633f2d1dafc09cba6fb32d48e0ad3bad11960598c0b2ed29bddcffef5694ef8a91c77aabf44dd9337a9fce752766aefcf6ac8a0710e2c801cda28ded317bf25bd08ccc5c6f12419f44ccac49174d4cacb329fc9eb2fa7fc0e1edaeaabb559054f168a3332a300502fd6962b1d8d24e204b75576e548447f50db2f4f5ba6e214e476ac8247661a0a1ac5dddd69c7fa8c5c312c6ae594da48286e1319847c5ac171dea7b10aa491e95c21664fa9374e8ed49e3816bda78d92c181421a078b5879c36209636f5024e82f1e5dbd78c24dc79202d204e773230da9214e4135012f1635095035079733e3d3c24ef1ed7049b762dcc651b3d579cac8aca3bdb9c79bde418da24e71449f3d055c883e54c58f6dbc94330a0c770515e579c03255120a8c244d5dcb2e95e34ede09f6be41a6ef012d19afe9f9af92932673ec01397bb7a9241b4a04a8a1aff2f1529fa879a7144bbf2099af47af358354203fa1d55376124a477451287325697b014564084760b57f77772016a02a7c864c0335b86e310459506f71f7985ec3577197797bc07085009505e5171a87325500cd7b26476cf34c58f4747ec7435747c70405f57501bb7366311cf7028e774a39c13089856a07529c7ed7228081d38aa71258500663017c65d5501585f20b16bc01d7595847ad1527387500850977fc5aa7847b917e62d58030a0358e257643475c5126c08401868145241287454a96f206a7485126b75595907801a87d58cb1978611a65595500b06266f85a488f7201350850ef7d7b65950607538fc7922978243838556f78c86396d06a01f78885556397db15165b5b47bc0e07435984601b48c68c916770288c7b68df7e85b51a964052874e7401c85425cf5991a86226a38283a419b83255983b22888275e78853480a3334676276867394b68ac0975058801026e85b97936428e97924341a87ec6c93868350893ac07588459a8ed7e72b48ad70e8ed80f33f7885108261a872505922020e8587463a988d4682d344535011d55988d8e01ac7df8064837e85017806487f20af7081401f187b80931f7e97991ec7da7e17c25501868f48d72ed76a7fd8416c65b00770277ce8a713e85b6103f277362019d8b989644287a05002781b5eef181d5e372041f7625ba6c01a87b97ee55c05565b55413413770e8a97de7d582016b7ad5e95a268856a0711a398f8eb1e390c7b75e65096131e83ba6341b759504c1705f496d7a51dd8d914d5f291344619371787346d8533a962876d5f24e08aa7c294199053523d72381116273b8c47b756d5f37ce5ee2937b00625e83289f352153223d70c7309ee7824d175374a5c898a61172889977d8965ce27577b84340d7cf89f3f18479dc4f09d34f78e52d53676c016b7de5752850885af75922431181d50295473689f3d91b758570d4f09911f58097093be2f09e83287d72005377b24eb8fc75c2eb8b96ee51167c7035cb9b33ca8a47972ac7245b381e890ef8501e29f87236c38885cd5839456c65da95b6ad44c03984d83728988853116a04254e8fc1b47ec7cd5811a980898255a5301b59ee25a8df9f11484f787a06011e8317cf3b694b21e8099271627b00bb8964341a86556c51305ef5ee4f585985e7e850884552b9c651671852f68934285293017d9f204a5939885950296639234950c2a562ce4556845b851e9d2ad525b35b7556847e42a414590a05c113ac657b7776bf8358e51bd5eb52238a9281885d36fd244ace6363d41b65f396c68850171a6924d172f7ff83e7c914e9d85726e46f78967824d26301a986722668d902236a5259562942b7601e20d85d1a2031f7b88422e831f764a0563394552a7ef028d70235d2878a68a337a9634652236a778a01b95bc01e9c0a5a4678d58920cf8038b9ac9a647459a1ac3a785c27fd41f8de91452501f49e9595d27e82d17f0a72a556b17801e240f9ce8122b69992d17f98ec50ba587c995c6552df75c97a6e88b01249834006571141d88e88a41b65458336341e45d8a1c9d79dc16e8f07f35788125350250cdaf20edabd7cda019767587a61c5aac053ab56924bd58478dab00250ff7adaddacda950e20bdaf202fa8c51415a96815a3096946e195983a6595be96378915baf56cf91d50e7b476b21e89f55512d9a6491a4340033f5398dd48e72d2c3ae85b37be627a781f58439558a5633a9175285ca241250556eef77d22701478d8a59242839762711b721e012f85623e8c7aea6f31678fc9222a980e763b0b2f01e116267491d56172b5a95d1b4dad917d90aa8779014982e7baaf799941f7b00891b682283036e770a0b6c8aa38522647ba739896bcd5792d17397c31f89da66f6504b49d85e371021f7db51f3dba226d34b49e85bfa0bacb7ab6b915417988dad70fb22679ea409702398c26428ab9507283863462398905b38ec26e4b0b226d8429923b51396adf75b5078422553d527d9b6b18ac65c26c83f8a529e23d341a045962a527e20849c26b6ab75ae817a489152a7937a4642078113d7e2b301868c5b367601d88aa8f52b68649b6864ab3671bfd5ec72ba29efa1aa0282b3f6179aa6823a11ae41016eb66f87113d379149339ae85b886a45c07d9de6f760035c065bec70c87b9b113d72f7a01c2b528649f31486368bea5515f9eeb5f96976e404bb11219e1190caa68446b2289e97322ac7cd50a8924689e9452a451428018b95f2b675e187c5347a67aa9054dea14175a0699722160225a94a4b717c799bb75bba5c2a26b597267db2ab95a5950652864282f7bcae19d474c48da96ae1617ae88bcb8cb5211e9347cc994865178b2a5d86382e55deb379c6556a9e41e80aa6885c88788f93f6f2b89b2e7785e6b21155611bf61571678bfa428b001b97823ba7253eb29b2b5f47601aa98350dba34f82a4b9eb48653aef53633cb7bd65e5cb27553f7ce1b57aeb2f8ab965c028931cad3de948715417a896a11e56145706f21ab4c03e7b325dbb40187be4635209ba09debba3c8c385394253f31529d4cef8bb232c607f4b27ac7992b7468f8401e798dbe6cfdb015e246b276cd9b35ad8ad326613985358daf5a0f51f8538f075c2b69d64ec86daa710a32bbea995a339c5604a5282e91225165ca81bee7014d02801ecb6117cb2c6891b7ad913d7649cc94199367984016f9d3116b7a1df9fa5d41df770631a46c7553326f955b556dc527be86cf8a8b5c08da446c938830fca68b757e4df4dea1e47ecfa23015dbbd4ea2da911d1a8f786a0b3aa019c95591e44ca4f5f332885ef29154427e0c04cec2289a93462f7a99b7ac6611e88bb49ba514c9a01f8a72d6d1551a5a7a7d0176a989d791b3a7489760b1e9468b67adb12287c5f59ec1957b90a985a289d188e7a6176c65355cc8321ac2aac13279515889ea91bc96a410a9257e1202b5b61027dcf85d573bc954e0799c4551f75d6683a5c2b51f7d18d6850ba8c99bbc0918abcc1ad7d1a1595e20ca34b2a98019f1a2f9544c83b96b01e195fc70a7e4468edb9765ea57d0a6311e1dd855a880d25532189c389dd4eccfaad72b9da6624d4b8cfcd7c2aadf4e7dee9f75a27a1601117a56c17cae11948f6ce6723b65c966928ad9f57223dabbc619595706817d5655925126848786a29ef614125942670145988be017cb1a0bc4d7ba3de6532392b8fb436672b620037571e63f8f07b374c284a408003f59675fd287b462fca386288faad0532217ad3647bea89c4d527cbb6b352d3dbb242963c2c49a18ad649bc077a1b7483e7a48750030b90113b4ea5418dab39705b412bb649d69c998592ad1e2bfcb75cc796505a2f4a942684eac3121eecd7025aadb12591d6cc902dced6014d586c05286843942631a57d2347ec2930fcaeb0162a7b6681d8dde1c1ad7cb88388cf9cf776dab47e31fa40e4c8da721f7596c9604554ae366fd2933e8ab515cfe95f7653abaef90f550b17b4fcd3a0d4e6a85ab46f31e08bbccf952e9b671507c5babeddddef80136a15a764aa7fa91e40b7479722aab6ad803efdac9661916eb7918f13abc229cb1b68a1e9d69972aaa61a8edbbcb1f0cd06e05f82f0527606d8016785cbf9ea5ccc25ad42dd61298a2d4c2e69d544cca3e6e54ab774cc276a60e1576493a63a8f277cbb882cbe95b375f9307c3deba2b6c5ca6662e3226c5aceeb692702a1a1eaa4ebac7b882d7d49f4493edf58015b8fbdc11125ec88dcd5b595029b1199af7b69d2832212f3e0ab99149a98a3eb07998d7dbc0ac85281095a8dd8f5b9016a01a7cdd6aba98d1aba59cd3b9c27deec91179ad728e601dfe81928c75bbfba7b7c3d1c7fb8cd5966cbf07e2517931e1a50b244a809b3875be0f152141aefcc85a3f5acde4104572d7517083467a0b376b581cf41dfe54ecf8dd18fd819d2fae92784e1e2c86e2415ad3d8b16e0af07706365f3e757cf4db17d9a6692824348e15698a097d3b986da8638b361a8bd5366504a41c8af07716781dce31e78a23545f6eb941e0849d9501cede59b3d4ff859cad488f6da7c1e975a97d49c37462a65a7550894da975a63069cef8740a81d7579fe435df576bed7bde26c158c5ea66a8aeb7b1981fd85aeb6a0f8ced7345258b5f920c0ecc483554160668ad35d354afac07a01386f76476f7f91aafda7a8a68a03f93bd35008138f173017b5250728748ffed952050bf5452cf6c7f845af235545baf57c1188cf6af545e4efca456a0e35cbfdda8798eac3d025a8a30641cc017cf4af6f7337a33b45c70ff7728ff7967a9d5ab501ce72eaf357bf4aa462965e356180776c66cf6c7e837b5ff7afa19a2b6893d356ef001d74911b56ac49513565031624280aaf834e3f0bf444057a49582e3817268a98f0f4114388051224280294e84385055e2c2822712bc18827911389b2916dc79f2d523c6993d02c448b0d5ea42a70d8adc2a44d46a4c9a0362d458bc68efc4a03b4eccc9b2796140982f824d6af317a1d3a039a66ddaa358ad41bb211e050bd35567d0bb0796b53a06f564d8b1656aedaa37baa9d99157c65d0a68b03355a2891f36e973fd236ab27b62147b0499ed519027fe5ef52b857173e89497951d4c96db60d9ad3b85160c097ae168a43f53845d67d5fd48d84d86be09c371fc679725733dfacbb272cecc2783fcac52327f6dc3adaadc6e283a3f59b5bb13e6de97513472f393079de9475af2efd92bfec6fdd9d03b4ab297fa0d2b5a183df9e7990f95ae4e3cf2044feeb8fa04fbe8b4c4da207e3eaa7a0ba8bcf20bade13cac043dafa3e0f340d835f29a8d2abbf6c20e6c3da2db3fc7bf091ccca8affe4c3e04b9caa30f283be0abb1da3ee2934d8cb9beb27c6031d02b9f4041d6dbdc67302b4bccafbee07cafe746d093815e34255a709eaceee24a04bf1d7b60f838052c1d09c6f66c91f8c8caba5e8fb5c6b20d2f33f8742efbca452d5a5ec44fc2543d24b42bca396fc7cc83c07142daec7aebb707943c2f4dfe5c0ecd4947ac3ccd3bc0446fc5c1f62b823ccfc673ce8eb7eefabc63522f4da458cd0745d01c47c223847cb85b9283973f1d6b8c805c474c3072b6d83b10b6c405c3c013511574449ab02985fd4a404d0ca0335c1315fc67a61bad0ec7d26d64629ac907a5cfc05fe69485dc30deaacdc051556c53b5c67b6c5a0d45e2bc54dfaeb43d259adfbc23b6feba11f5957b4b7bcb7acfc12f0508bb538bdb15fe3c35ade2be5c7f16b5d4c8059b033e5dcaf5ae44dab8f5c012594fd488dbd66bb5e3d2e39d36471dba17a453555d43e2e2bd4a7395c511b4471e48dab693befcc59b5f21659571d29773d6b742051b51504a478cb83c4ca4dd8399e053058afa5cf8d4a33bee31dd9ad74503bd6f6940b79cdf24d95dfb4d6cc74d866a82e93314763de06704445c4b0765713dc5a8d580946457f5e57c6cbffbf47ade4fbcb7395b45ceaaf3eb77b3a5515e935d3c1fd16b8efc6ab365a3d67ec0c7fe1c44fa47acf9bd489ff5cb3f4ac3ceddecd32f46dc556a39c4f67579c1540b71fbee7ebe876d29e6f35856c56a7cb6e3f4044b9c682d869df151f047729947475e56396c5184147d3feea79d6f6a5d65f877a93be3bb14cb53cd9616ec7bc267f54ae93ed676fd9f463dfeef2325241e23654e291bd2831521416ea95ebb3f02eefcd7d828d0ed614b0af812e6958f20650dee4fe2c903f0975ca5c1c90e6bba80e2aea4124ee909c386b2b99a5ac4c0c4b0ede25e1ba813c2e6dc3dec374a66320b859a97e8b1b50ac28c821069c253c124a9b78b7234b6dcf8e6504ad9582278cb0254f2c6014d398034513b1a5f8e56fcbff06bc55fc2a71be646d9aef4c03d5cf1a220036859a9719e4c76bbcf520588263b818fc23a2c9590a4d56896e89e6b4cb31c19a0e21a96558ca88ab22c020b37184cc9a52d238ced031765c9281d6c6d5a49e2eefea5bfac953d6766a305d8bce456bcec8d6156c1da938417e33291af072ff214db0bd6e7a44ed09f40ebd3278ef823455642b18544bfd9cefef6fb4635fca179837f960dc221a1a1d2f794c2e89427474b1932bc0b7583cc1101f75a90e92359644ac9df03a8aca076fb4b55db6f87fc498342a12aa442f370a405d8829edd53738e89b2d9d095fa2ee4e0328502afdcc207cead35da2352c2fbd23f972ac4e86fc13d63e21bf656202d3a83755ce4ec14aa58cfc179dbca612b8325b8161b4f2ebda486f105259e19564a4660db50fb0bd52df3e6bee83ba6afd3e3d6e838f1d5654e6b5a3de5ac3f0646b69a9a4d5262a9d1d06953549dc0dd580342592759dd4532bf4d8dfa81a5c07744c4c5fd0565c473e43919c4b64a5c4d2492375b1de79c4fc557ac7773971857a4bb4b317da98714dc8a68666ef9c1aa7d4b877417d70369e4c5e19e29a61520945d845e2bf8d5f677f3be9757744d1d850d8fa5156454f63a60458adea07e51819bb6985f397acfa16fda2a8d1d58a0b3e9537b7295ea20d6c956326abc054da3035a1ba8e03f89cc84b1a5db8239e724d7bee43391657da9d6a876d28d2d4fae2341e045696f99ed2dc4a98cd158ec192b5c3e929448c57a9e6cf950a51995dba58adb9e3f8863405911b5b41d05ae2d5af75c820e4a8d72cad005740e94d11faca42c11117887964b5a121d9bbc67aa2fd97b582238cf7fa5236ac034e94a1e0fa49d7cfe6059ba3daf0a9cc0938d7a59645bf542be339f632bfcac7767e523e17d47894b061d3dbb991e36e917c84c055175ecaa77c729f595c95d403361673e2f0661d152fc08a7876961c726481b554625a09b170c9ac6879eaa36901a5da7e9b8d5fcef4e6908000b3
197EOL
198
199
200
201use DBI;
202
203
204
205
206
207
208
209
210
211
212$way="";
213#######
214## se houver cookie login entćo verifica se o cookie lid( login id) consta na base de dados e se o tempo de login
215## é inferior ao tempo-300s (caso tenham passado 5 minutos o login deixa de ser valido
216## se tudo estiver correcto entćo actualiza a data do ultimo acesso na table de utilizadores e activa a variavel $way
217## para logged
218if($COOKIE{login}) {
219 $db=DBI->connect("dbi:$dbdriver:dbname=$dbname","$dbuser","$dbpass");
220 $sth=$db->prepare("select * from userinfo where userid='\Q$COOKIE{login}\E' and lid='$COOKIE{lid}'");
221 $sth->execute;
222 if($sth->rows>0) {
223 $db->do("update userinfo set lldate='".time."' where userid='\Q$COOKIE{login}\E'");
224 if($QUERY_STRING{sair} eq $COOKIE{lid}) {
225 $db->do("update userinfo set lid='0' where userid='\Q$COOKIE{login}\E'");
226 cookie("login",$POST{username},"now");
227 cookie("lid","$lid","now");
228 } else {
229 $way="logged";
230 cookie("login",$COOKIE{username},"+5m");
231 cookie("lid","$COOKIE{lid}","+5m");
232 };
233
234 };
235 $sth->finish;
236 $db->disconnect;
237};
238if($QUERY_STRING{adduser}) {
239 $way="adduser";
240};
241
242
243
244########
245## metodo login se for enviado o pedido de login entćo vai verificar se a entrada username & password consta na
246## base de dados se constar entćo actualiza a base de dados com o novo login id (lid) e activa o cookie login e loginid
247## Se o login tiver activo manda uma resposta ao utilizador indicando que nćo pode refazer o login até estar
248## desactivo, excepto se o login id for diferente (problema do refresh)
249##
250if($POST{login} and $way ne "logged") {
251 $lid=int(rand()*100)+1;
252 $db=DBI->connect("dbi:$dbdriver:dbname=$dbname","$dbuser","$dbpass");
253 $sth=$db->prepare("select * from userinfo where userid='\Q$POST{username}\E' and password='\Q$POST{passwd}\E'");
254 $sth->execute;
255 if($sth->rows>0) {
256 $res=$sth->fetchrow_hashref;
257 if(time>($res->{lldate}+300) or $res->{lid} eq "0") {
258 cookie("login",$POST{username},"+5m");
259 cookie("lid","$lid","+5m");
260 $db->do("update userinfo set lid='$lid', lldate='".time."' where userid='\Q$POST{username}\E'");
261 $COOKIE{login}=$POST{username};
262 $COOKIE{lid}=$lid;
263 $way="logged";
264 } else {
265 $errorway="norelogin";
266 };
267
268 }else {
269 $errorway="invalidlog";
270 };
271 $sth->finish;
272 $db->disconnect;
273
274};
275cookie("teste1",$POST{username},"+5m");
276cookie("teste4","conas","+10m");
277if($POST{adduser}) {
278 $way="adduser";
279 if($POST{passwd} ne $POST{repasswd}) {
280 $errorway="nomatch";
281 } else {
282 if($POST{username} eq "") {
283 $errorway="emptylogin";
284 } else {
285 $db=DBI->connect("dbi:$dbdriver:dbname=$dbname","$dbuser","$dbpass");
286 $sth=$db->prepare("select * from userinfo where userid='\Q$POST{username}\E'");
287 $sth->execute;
288 if($sth->rows>0) {
289 $errorway="exists";
290 } else {
291 $db->do("insert into userinfo (userid,password,nome,email,phone) values('\Q$POST{username}\E','\Q$POST{passwd}\E','\Q$POST{name}\E','\Q$POST{email}\E','\Q$POST{phone}\E')");
292 enviarnoticia("Bem vindo ao $softversion, Estį a iniciar como novo utilizador e provavelmente precisa de ajuda, o sistema irį mandar dicas através das noticias, por agora tente criar a sua equipe pelo menu equipe e depois escolha os jogadores..., foram debitados 2000cts na sua conta principal(nota: AS NOTICIAS SERAO AUTO-REMOVIDAS DEPOIS DE 10Minutos DA SUA DATA DE LEITURA)",$POST{username});
293 do {
294 $id=int(rand()*200000);
295 $sth=$db->prepare("select * from conta where id='$id'");
296 $sth->execute;
297 }while($sth->rows);
298 $db->do("insert into conta (id,userid,value) values('\Q$id\E','\Q$POST{username}\E','2000')");
299 $way="";
300 };
301 };
302 };
303};
304
305
306
307
308#COOKIES
309#print "Date: ".mydate("%a, %d %b %Y %H:%M:%S %Z",0)."\n";
310#print "Cona: ".mydate("%a, %d %b %Y %H:%M:%S %Z",0)."\n";
311
312## este metedo apenas indica para o carregamento de imagens se o parametro img tiver ligado entćo uploada
313## a imagem escolhida
314##
315if($QUERY_STRING{img}) {
316 #print "Accept-ranges: bytes\n";
317 #print "Content-length: ".length($img{$QUERY_STRING{img}})."\n";
318 print "Content-type: image/gif\r\n\r\n";
319 print pack("h*",$img{$QUERY_STRING{img}});
320 exit;
321};
322
323
324
325## ---------------------------------------------- FUNCOES ----------------------------------------##
326## funcoes especificas
327## imprime a pįgina do login
328##
329sub printlogin {
330 print "<HTML>\n<HEAD>\n<TITLE> footaid login</title>\n</HEAD>\n";
331 print "<BODY background='$ENV{SCRIPT_NAME}?img=bg'>\n";
332 print "<FORM METHOD='POST' ACTION='$ENV{SCRIPT_NAME}'>\n";
333 print "<TABLE width=100% cellspacing=0 height='100%' border=0>\n";
334 print "<TR><TD bgcolor='bb8800' height=90 align=center valign='center'>\n";
335 print "<table width=400 height=80 border=0 bgcolor='efefef'><TR><TD><img src='$ENV{SCRIPT_NAME}?img=logo'></TD></TR></TABLE>\n";
336 print "</TD></TR>\n";
337 print "<TR><TD valign='center' align='center' height=100% bgcolor='008800'>\n";
338 print "<font color='FF0000'>Terį de terminar a outra sessćo ou esperar 5 minutos</font><BR><BR>" if ($errorway eq "norelogin");
339 print "<font color='FF0000'>Login invįlido</font><BR><BR>" if ($errorway eq "invalidlog");
340 print "<TABLE bgcolor='000000' cellspacing=2 cellpadding=0><TR><TD>\n";
341 print "<TABLE border=0 cellspacing=0 cellpadding=3 bgcolor='EFEFEF'>\n";
342 print "<TR><TD> Login:</TD><TD><input type=text name='username' size=14 maxlength=14 value='$COOKIE{username}'></TD></TR>\n";
343 print "<TR><TD> Password:</TD><TD><input type=password name='passwd' size=14 maxlength=14></TD></TR>\n";
344 print "<TR><TD colspan=2 align=left><table border=0 cellpadding=0 cellspacing=0><TR><TD><input type=submit name='login' value='Entrar'></TD><TD><input type=button onclick='parent.location=\"$ENV{SCRIPT_NAME}?adduser=1\"' value='Adicionar utilizador'></TD></TR></TABLE></TD></TR>\n";
345 print "</TABLE>\n";
346 print "</TD></TR></TABLE>\n";
347 print "</TD></TR>\n";
348 print "</TABLE>\n";
349 print "</FORM>\n";
350 print "</BODY>\n</HTML>";
351};
352## pagina adicionar utilizador
353##
354##
355sub printadduser {
356 print "<HTML>\n<HEAD>\n<TITLE> footaid login</title>\n</HEAD>\n";
357 print "<BODY background='$ENV{SCRIPT_NAME}?img=bg'>\n";
358 print "<TABLE width=100% cellspacing=0 height='100%' border=0>\n";
359 print "<TR><TD bgcolor='bb8800' height=90 align=center valign='center'>\n";
360 print "<table width=400 height=80 border=0 bgcolor='efefef'><TR><TD><img src='$ENV{SCRIPT_NAME}?img=logo'></TD></TR></TABLE>\n";
361 print "</TD></TR>\n";
362 print "<TR><TD valign='center' align='center' height=100% bgcolor='008800'>\n";
363 print "<FORM METHOD='POST' ACTION='$ENV{SCRIPT_NAME}'>\n";
364 print "<font color='ff0000'>Login jį existente por favor escolha outro</font>" if ($errorway eq "exists");
365 print "<font color='ff0000'>Password nćo é igual</font>" if ($errorway eq "nomatch");
366 print "<font color='ff0000'>O campo login nćo pode estar vazio</font>" if ($errorway eq "emptylogin");
367 print "<TABLE bgcolor='000000' cellspacing=2 cellpadding=0><TR><TD>\n";
368 print "<TABLE border=0 cellspacing=0 cellpadding=3 bgcolor='EFEFEF'>\n";
369 print "<TR><TD> ";
370 print ."<font color='FF0000'>*</font>" if ($errorway eq "exists");
371 print "Login: </TD><TD><input type=text name='username' size=14 maxlength=13 value='$POST{username}'></TD></TR>\n";
372 print "<TR><TD> Nome de utilizador:</TD><TD><input type=text name='name' value='$POST{name}'></TD></TR>\n";
373 print "<TR><TD> E-mail:</TD><TD><input type=text name='email' maxlength=160 value='$POST{email}'></TD></TR>\n";
374 print "<TR><TD> Telefone:</TD><TD><input type=text name='phone' maxlenght=13 value='$POST{phone}'></TD></TR>\n";
375 print "<TR><TD> Password:</TD><TD><input type=password name='passwd' size=14 maxlength=14></TD></TR>\n";
376 print "<TR><TD> Re-Password:</TD><TD><input type=password name='repasswd' size=14 maxlength=14></TD></TR>\n";
377 print "<TR><TD colspan=2 align=left><table border=0 cellspacing=0 cellpadding=0><TR><TD><input type=button onclick='parent.location=\"$ENV{SCRIPT_NAME}?\&rid=".int(rand()*100)."\"' value='<- Voltar'></TD><TD><input type=submit name='adduser' value='adicionar'></TD></TR></TABLE></TD></TR>\n";
378 print "</TABLE>\n";
379 print "</TD></TR></TABLE>\n";
380 print "</FORM>\n";
381 print "</TD></TR>\n";
382 print "</TABLE>\n";
383
384};
385
386
387## enviar noticia
388## funcēćo enviar noticia;
389sub enviarnoticia {
390 $noticia=shift;
391 $useridto=shift;
392 if(!$useridto) {
393 $sth=$db->prepare("select * from userinfo");
394 $sth->execute;
395 while($res=$sth->fetchrow_hashref) {
396 $useridto=$res->{userid};
397 do {
398 $id=int(rand()*200000);
399 $sth1=$db->prepare("select * from noticia where id='$id'");
400 $sth1->execute;
401 }while($sth1->rows);
402 $db->do("insert into noticia (id,useridto,noticia,date) values('\Q$id\E','\Q$useridto\E','\Q$noticia\E','".time()."')");
403 };
404 }else {
405 do {
406 $id=int(rand()*200000);
407 $sth1=$db->prepare("select * from noticia where id='$id'");
408 $sth1->execute;
409 }while($sth1->rows);
410 $db->do("insert into noticia (id,useridto,noticia,date) values('\Q$id\E','\Q$useridto\E','\Q$noticia\E','".time()."')");
411 };
412
413};
414
415## subfuncēćo game (pagina inicial)
416## é aqui que decorre a 'acēćo' do jogo
417##
418sub game {
419## Menu de cima com os icons
420##
421 $db=DBI->connect("dbi:$dbdriver:dbname=$dbname","$dbuser","$dbpass");
422 $sth=$db->prepare("select * from userinfo where userid='\Q$COOKIE{login}\E'");
423 $sth->execute;
424 $res=$sth->fetchrow_hashref;
425 print "<HTML><HEAD><TITLE>$softversion\n</TITLE></HEAD>\n";
426 print "<BODY background='$ENV{SCRIPT_NAME}?img=bg' bgcolor=111111>\n";
427 print "<font face='Verdana' color='FFFF00'>\n";
428 print "<TABLE width=100% border=0 bgcolor='008800'>\n";
429 print "<TR><TD bgcolor='bb8800' height=90 align=center valign='center'>\n";
430 print "<table width=400 height=80 border=0 bgcolor='efefef'><TR><TD><img src='$ENV{SCRIPT_NAME}?img=logo'></TD></TR></TABLE>\n";
431 print "</TD></TR>\n";
432 print "<TR><TD height='20px' bgcolor='EFEFEF' valign='center'>\n";
433 print "<TABLE border=0 height='20px' cellspacing=1 cellpadding=0><TR>";
434 print "<TD>Football menu:\&nbsp;\&nbsp;</TD>\n";
435 print "<TD>[</TD>\n";
436 print "<TD bgcolor='CFCFDF'><a href='$ENV{SCRIPT_NAME}?rid=".int(rand()*100)."'><img width=20 height=20 border=0 alt='Inicio' src='$ENV{SCRIPT_NAME}?img=home'></a></TD>\n";
437 print "<TD bgcolor='CFCFDF'><a href='$ENV{SCRIPT_NAME}?subway=msg'><img width=20 height=20 border=0 alt='mensagens' src='$ENV{SCRIPT_NAME}?img=msg'></a></TD>\n";
438 print "<TD bgcolor='CFCFDF'><a href='$ENV{SCRIPT_NAME}?subway=forum'><img width=20 height=20 border=0 alt='forum' src='$ENV{SCRIPT_NAME}?img=forum'></a></TD>\n";
439 print "<TD bgcolor='CFCFDF'><a href='$ENV{SCRIPT_NAME}?sair=$COOKIE{lid}'><img width=20 height=20 border=0 alt='sair' src='$ENV{SCRIPT_NAME}?img=sair'></a></TD>\n";
440 print "<TD>][</TD>\n";
441 print "<TD bgcolor='CFCFDF'><a href='$ENV{SCRIPT_NAME}?subway=conta'><img width=20 height=20 border=0 alt='conta' src='$ENV{SCRIPT_NAME}?img=conta'></a></TD>\n";
442 print "<TD bgcolor='CFCFDF'><a href='$ENV{SCRIPT_NAME}?subway=team'><img width=20 height=20 border=0 alt='equipa' src='$ENV{SCRIPT_NAME}?img=equipa'></a></TD>\n";
443 print "<TD bgcolor='CFCFDF'><a href='$ENV{SCRIPT_NAME}?subway=jogador'><img width=20 height=20 border=0 alt='jogadores' src='$ENV{SCRIPT_NAME}?img=jog'></a></TD>\n";
444 print "<TD>]</TD>\n";
445 print "<TD>\&nbsp;\&nbsp;".mydate("%a, %d %b %Y %H:%M").", <font color='444444'>$COOKIE{login}</font>";
446 print "</TR></table>\n";
447 print "</TD></TR><TR><TD valign='top'><font face='Verdana' color='FFFF00'>\n";
448 $sth->finish;
449## conforme a escolha
450##
451
452### ecran conta
453##
454#
455 if($QUERY_STRING{subway} eq "conta") {
456 print "<CENTER><font size=6 face='Verdana'><B>Conta</B></font><hr></CENTER><BR><BR>\n";
457 $sth=$db->prepare("select * from conta where userid='$COOKIE{login}'");
458 $sth->execute;
459 if($sth->rows) {
460 $res=$sth->fetchrow_hashref;
461 print "Conta id: <B>$res->{id}</B> Contem um saldo de <B>$res->{value}cts</B><BR><BR>\n";
462 };
463 };
464 if($QUERY_STRING{subway} eq "jogador") {
465 if($POST{treino}) {
466 print "Treino<BR>\n";
467 $sth=$db->prepare("select * from treino where jogid='\Q$POST{nome}\E'");
468 $sth->execute;
469 if($sth->rows) {
470 print "Jogador jį se encontra em treino\n";
471 } else {
472 $db->do("insert into treino (jogid,treino,fdate,date) values('\Q$POST{nome}\E','\Q$POST{what}\E','".mydate("%g","+$POST{days}d")."','".time()."')");
473 $db->do("update jogador set doing='1' where nome='\Q$POST{nome}\E'");
474 };
475
476 };
477 print "<CENTER><font size=6 face='Verdana'><B>Jogadores</B></font><hr></CENTER><BR><BR>\n";
478 if($QUERY_STRING{mostrar}) {
479 $sth=$db->prepare("select * from jogador where nome='$QUERY_STRING{mostrar}'");
480 $sth->execute;
481 if($sth->rows) {
482 $res1=$sth->fetchrow_hashref;
483 print "<FORM method='POST'>\n";
484 print "Equipa: <B>$res1->{equipaid}</B>\n";
485 print "<TABLE border=0 bgcolor='000000' cellspacing=0 cellpadding=1><TR><TD>\n";
486 print "<TABLE border=0 bgcolor='FFFFEE' cellspacing=0 cellpadding=0>\n";
487 print "<TR bgcolor='EEEEFF'><TD>Nome:</TD><TD><B>$res1->{nome}</B></TD></TR>\n";
488 print "<TR><TD>Velocidade:</TD><TD>\n";
489 for $i (0 .. 10) {
490 if($i<($res1->{vel}/100)) {
491 print "<img width=15 height=15 src='$ENV{SCRIPT_NAME}?img=redball'>\n";
492 } else {
493 print "<img width=15 height=15 src='$ENV{SCRIPT_NAME}?img=blackball'>\n";
494 };
495 };
496 print "</TD></TR>\n";
497 print "<TR><TD>Forēa:</TD><TD>\n";
498 for $i (0 .. 10) {
499 if($i<($res1->{forc}/100)) {
500 print "<img width=15 height=15 src='$ENV{SCRIPT_NAME}?img=redball'>\n";
501 } else {
502 print "<img width=15 height=15 src='$ENV{SCRIPT_NAME}?img=blackball'>\n";
503 };
504 };
505 print "</TD></TR>\n";
506 print "<TR><TD>Agilidade:</TD><TD>\n";
507 for $i (0 .. 10) {
508 if($i<($res1->{agi}/100)) {
509 print "<img width=15 height=15 src='$ENV{SCRIPT_NAME}?img=redball'>\n";
510 } else {
511 print "<img width=15 height=15 src='$ENV{SCRIPT_NAME}?img=blackball'>\n";
512 };
513 };
514 print "</TD></TR>\n";
515 print "<TR><TD>Eficacia:</TD><TD>\n";
516 for $i (0 .. 10) {
517 if($i<($res1->{efi}/100)) {
518 print "<img width=15 height=15 src='$ENV{SCRIPT_NAME}?img=redball'>\n";
519 } else {
520 print "<img width=15 height=15 src='$ENV{SCRIPT_NAME}?img=blackball'>\n";
521 };
522 };
523 print "</TD></TR>\n";
524 print "<TR><TD>Expriencia:</TD><TD>\n";
525 for $i (0 .. 10) {
526 if($i<($res1->{exp}/100)) {
527 print "<img width=15 height=15 src='$ENV{SCRIPT_NAME}?img=redball'>\n";
528 } else {
529 print "<img width=15 height=15 src='$ENV{SCRIPT_NAME}?img=blackball'>\n";
530 };
531 };
532 print "</TD></TR>\n";
533 print "<TR><TD>Adaptaēćo:</TD><TD>\n";
534 for $i (0 .. 10) {
535 if($i<($res1->{fel}/100)) {
536 print "<img width=15 height=15 src='$ENV{SCRIPT_NAME}?img=redball'>\n";
537 } else {
538 print "<img width=15 height=15 src='$ENV{SCRIPT_NAME}?img=blackball'>\n";
539 };
540 };
541 print "</TD></TR>\n";
542 print "<TR><TD>Posiēćo</TD><TD>\n";
543 $sth1=$db->prepare("select * from pos where id='$res1->{tipo}'");
544 $sth1->execute;
545 $res2=$sth1->fetchrow_hashref;
546 print "<B>$res2->{namepos}</B>\n";
547 print "</TD></TR>\n";
548 print "<TR><TD>Fazer:</TD><TD>\n";
549 $sth1->finish;
550 $sth1=$db->prepare("select * from doing where id='$res1->{doing}'");
551 $sth1->execute;
552 $res2=$sth1->fetchrow_hashref;
553 print "<B>$res2->{dowhat}</B>\n";
554 print "</TD></TR>\n";
555 $sth1->finish;
556 $sth1=$db->prepare("select * from equipa where userid='$COOKIE{login}'");
557 $sth1->execute;
558 $res=$sth1->fetchrow_hashref;
559 $sth1->finish;
560 print "<TR><TD>Ordenado:</TD><TD><B>$res1->{ordenado}cts/mźs</B></TD></TR>\n";
561 print "<input type=hidden name='nome' value='$res1->{nome}'>\n";
562 if(($res1->{equipaid} eq $res->{equipaid}) and ($res1->{doing} ne "1")) {
563 print "<TR><TD colspan=2>\n";
564 print "<select name=what>\n";
565 print "<option value='vel'>Velocidade\n";
566 print "<option value='forc'>Forēa\n";
567 print "<option value='agi'>Agilidade\n";
568 print "<option value='efi'>Eficacia\n";
569 print "</select>\n";
570 print "Dias: <input type=text size=2 maxlength=2 name='days' value='01'>\n";
571 print "<input type=submit name='treino' value='Treinar'></TD></TR>\n";
572 }
573 if($res1->{equipaid} ne $res->{equipaid}){
574 print "<TR><TD colspan=2>Valor: <input type=text size=4 maxlength=4 name=valor value='0000'>cts <input type=submit name='comprar' value='comprar'>\n";
575 };
576 print "</TABLE>\n";
577 print "</TD></TR></TABLE><BR>\n";
578 };
579 }else {
580 print "<BR>\n";
581 $sth=$db->prepare("select * from jogador");
582 $sth->execute;
583 while($res=$sth->fetchrow_hashref) {
584 $urlname=$res->{nome};
585 $urlname =~ s/ /%20/g;
586 print "Nome: <a href='$ENV{SCRIPT_NAME}?subway=jogador\&mostrar=$urlname'><B>$res->{nome}</B></a> equipa: <B>$res->{equipaid}</B><BR>\n";
587 };
588 print "<BR>\n";
589 };
590 };
591
592### ecran equipa
593##
594#
595 if($QUERY_STRING{subway} eq "team") {
596 print "<CENTER><font size=6 face='Verdana'><B>Equipa</B></font><hr></CENTER><BR><BR>\n";
597 if($POST{criar}) {
598 $sth=$db->prepare("select * from equipa where lower(equipaid)=lower('\Q$POST{equipa}\E')");
599 $sth->execute;
600 if($sth->rows) {
601 print "<font color='FF0000'>Nome de equipa existente</font><BR>\n";
602 } else {
603 $db->do("insert into equipa (equipaid,userid) values('\Q$POST{equipa}\E','\Q$COOKIE{login}\E')");
604 };
605 };
606 if($POST{simcria}) {
607 $sth=$db->prepare("select * from jogador where lower(nome)=lower('$POST{nome}')");
608 $sth->execute;
609 if($sth->rows) {
610 print "<font color='FF0000'>Nome de jogador existente</font><BR>";
611 }else {
612 $sth=$db->prepare("select * from conta where userid='$COOKIE{login}'");
613 $sth->execute;
614 if($sth->rows) {
615 $res=$sth->fetchrow_hashref;
616 $contaval=$res->{value};
617 };
618 $val=100;
619 $val+=($POST{vel}*150);
620 $val+=($POST{for}*150);
621 $val+=($POST{agi}*150);
622 $val+=($POST{efi}*150);
623 $contaval-=$val;
624 if($contaval>0) {
625 $sth=$db->prepare("select * from equipa where userid='$COOKIE{login}'");
626 $sth->execute;
627 $res=$sth->fetchrow_hashref;
628 $db->do("insert into jogador (nome,equipaid,vel,forc,agi,efi,tipo) values('\Q$POST{nome}\E','\Q$res->{equipaid}\E','".($POST{vel}*100)."','".($POST{for}*100)."','".($POST{agi}*100)."','".($POST{efi}*100)."','$POST{pos}')");
629 $db->do("update conta set value='$contaval' where userid='$COOKIE{login}'");
630 $db->do("update equipa set jogdisp='".($res->{jogdisp}-1)."' where userid='$COOKIE{login}'");
631 enviarnoticia("$COOKIE{login} Criou o jogador $POST{nome}");
632 } else {
633 print "<font color='FF0000'>Nćo contem fundos suficientes para criar este jogador</font><BR>\n";
634 };
635 };
636
637 };
638 if($POST{criarjog}) {
639 if($POST{nome} ne "") {
640 $sth=$db->prepare("select * from jogador where lower(nome)=lower('$POST{nome}')");
641 $sth->execute;
642 if($sth->rows) {
643 print "<font color='FF0000'>Nome de jogador existente</font><BR>";
644 print "<form><input type=button onclick='parent.location=\"javascript:history.go(-1)\"' value='<- Voltar'><HR>\n";
645 }else {
646 $val=100;
647 $val+=($POST{vel}*150);
648 $val+=($POST{for}*150);
649 $val+=($POST{agi}*150);
650 $val+=($POST{efi}*150);
651 print "Vai gastar $val cts ao criar o jogador <B>$POST{nome}</B> deseja continuar?<BR>";
652 print "Velocidade:<B>$POST{vel}</B> Forēa: <B>$POST{for}</B> Agilidade: <B>$POST{agi}</B> Eficacia: <B>$POST{efi}</B><BR>\n";
653 print "<form method='POST'>\n";
654 print "<input type=hidden name=nome value='$POST{nome}'>\n";
655 print "<input type=hidden name=vel value='$POST{vel}'>\n";
656 print "<input type=hidden name=for value='$POST{for}'>\n";
657 print "<input type=hidden name=agi value='$POST{agi}'>\n";
658 print "<input type=hidden name=efi value='$POST{efi}'>\n";
659 print "<input type=hidden name=pos value='$POST{pos}'>\n";
660 print "<input type=submit name='simcria' value='sim'>";
661 print "<input type=button onclick='parent.location=\"$ENV{SCRIPT_NAME}?subway=team\&rid=".int(rand()*100)."\"' value='nao'>";
662 print "</form><HR>\n";
663 };
664 $sth->finish;
665 } else {
666 print "<font color='FF0000'>Tem que dar nome ao jogador</font><BR>";
667 print "<form><input type=button onclick='parent.location=\"javascript:history.go(-1)\"' value='<- Voltar'><HR>\n";
668 };
669 };
670 $sth=$db->prepare("select * from equipa where userid='$COOKIE{login}'");
671 $sth->execute;
672 if($sth->rows) {
673 $res=$sth->fetchrow_hashref;
674 $sth->finish;
675 print "<B>Equipa $res->{equipaid}</B><BR>\n";
676 $sth=$db->prepare("select * from jogador where equipaid='$res->{equipaid}' order by tipo ASC");
677 $sth->execute;
678 ## Mostrar jogador
679 if($sth->rows) {
680 while($res1=$sth->fetchrow_hashref) {
681 $sth1=$db->prepare("select * from pos where id='$res1->{tipo}'");
682 $sth1->execute;
683 $res2=$sth1->fetchrow_hashref;
684 $urlname=$res1->{nome};
685 $urlname=~s/ /%20/g;
686 print "\&nbsp;\&nbsp;Nome: <a href='$ENV{SCRIPT_NAME}?subway=jogador\&mostrar=$urlname'><B>$res1->{nome}</B></a> ($res2->{namepos})<BR>\n";
687 $sth1->finish;
688 };
689 $sth->finish;
690 print "<HR>\n";
691 } else {
692 print "Nćo se encontram jogadores na sua equipa<BR><BR>\n";
693 };
694 if($res->{jogdisp}>0) {
695 if($QUERY_STRING{criarjog}) {
696 print "<HR><B>Criar jogador</B><BR>\n";
697 print "<FORM method=post action='$ENV{SCRIPT_NAME}?subway=team'>\n";
698 print "<table bgcolor=000000 cellspacing=0 cellpadding=1><TR><TD>\n";
699 print "<TABLE bgcolor='EFEFEF' cellspacing=0 cellpadding=0>\n";
700 print "<TR><TD>Nome:</TD><TD><input type=text name='nome'></TD></TR>\n";
701 print "<TR><TD>Velocidade</TD><TD>\n";
702 for $i (0 .. 10) {
703 print "<input type=radio name='vel' value='$i'>\n";
704 };
705 print "</TD></TR>\n";
706 print "<TR><TD>Forēa</TD><TD>\n";
707 for $i (0 .. 10) {
708 print "<input type=radio name='for' value='$i'>\n";
709 };
710 print "</TD></TR>\n";
711 print "<TR><TD>Agilidade</TD><TD>\n";
712 for $i (0 .. 10) {
713 print "<input type=radio name='agi' value='$i'>\n";
714 };
715 print "</TD></TR>\n";
716 print "<TR><TD>Eficacia</TD><TD>\n";
717 for $i (0 .. 10) {
718 print "<input type=radio name='efi' value='$i'>\n";
719 };
720 print "</TD></TR>\n";
721 print "<TR><TD>Posiēćo</TD><TD>\n";
722 $sth=$db->prepare("select * from pos");
723 $sth->execute;
724 print "<select name=pos>\n";
725 while($res=$sth->fetchrow_hashref) {
726 print "<option value='$res->{id}'>$res->{namepos}</option>\n";
727 };
728 print "</select>\n";
729 print "</TD></TR>\n";
730 print "<TR><TD colspan=2 align='left'><input type=button onclick='parent.location=\"$ENV{SCRIPT_NAME}?subway=team\&rid=".int(rand()*100)."\"' value='<- Voltar'><input type=submit name=criarjog value='Criar'></TD></TR>\n";
731 print "</TABLE>\n";
732 print "</TD></TR></TABLE>\n";
733 print "</form>\n";
734 print "<HR>";
735 } else {
736 print "<form><input type=button onclick='parent.location=\"$ENV{SCRIPT_NAME}?subway=team\&criarjog=1\&rid=".int(rand()*100)."\"' value='Criar jogador'></form>\n";
737 };
738 };
739 } else {
740 print "Ainda nćo tem ainda uma equipa, escreva os dados para cria-la<BR>\n";
741 print "<FORM method='POST' action='$ENV{SCRIPT_NAME}?subway=team'>\n";
742 print "<table border=0 cellspacing=0 cellpading=1 bgcolor='000000'><TR><TD>";
743 print "<table bgcolor='EFEFEF' cellspacing=0 cellpadding=0 border=0>\n";
744 print "<TR><TD> Nome de equipa: </TD><TD><input type=text name=equipa></TD></TR>\n";
745 print "<TR><TD colspan=2><input type=submit value='Criar' name='criar'></TD></TR>\n";
746 print "</TABLE>\n";
747 print "</TD></TR></TABLE>\n";
748 print "</FORM>\n";
749
750 };
751 };
752
753
754### ecran que especifica os utilizadores online
755##
756#
757 if($QUERY_STRING{subway} eq "who") {
758 print "<CENTER><font size=6 face='Verdana'><B>Quem estį online</B></font><hr></CENTER>\n";
759 print "Encontram-se os seguintes utilizadores online:<BR>\n";
760 $sth=$db->prepare("select * from userinfo where lldate>'".(time-300)."' and lid!='0'");
761 $sth->execute;
762 while($res=$sth->fetchrow_hashref) {
763 print "<font color='FFEE00'><B>$res->{userid}($res->{nome})</B></font><BR>\n";
764 };
765 print "<HR>\n";
766 $sth->finish;
767 };
768### submenu das mensagens
769##
770#
771 if($QUERY_STRING{subway} eq "msg") {
772 print "<CENTER><font size=6 face='Verdana'><B>Caixa de correio</B></font><hr></CENTER>\n";
773 if($POST{apagar}) {
774 $sth=$db->prepare("select * from msg where useridto='\Q$COOKIE{login}\E'");
775 $sth->execute;
776 while($res=$sth->fetchrow_hashref) {
777 if($POST{'del'.$res->{id}}) {
778 $db->do("delete from msg where id='$res->{id}'");
779 print "Mensagem Apagada<BR>\n";
780 };
781 };
782 };
783 if($POST{msg}) {
784 do {
785 $id=int(rand()*200000);
786 $sth=$db->prepare("select * from msg where id='$id'");
787 $sth->execute;
788 } while($sth->rows);
789 if($POST{to} eq "") {
790 print "<font color='ff0000'>Terį de especificar um utilizador a quem enviar</font><BR>\n";
791 } else {
792 $db->do("insert into msg (id,useridfrom,useridto,data,subject,mensagem) values('$id','\Q$COOKIE{login}\E','\Q$POST{to}\E','".time()."','\Q$POST{Assunto}\E','\Q$POST{message}\E')");
793 print "Mensagem Enviada<BR>\n";
794 };
795 }
796 if($QUERY_STRING{ler}) {
797 $sth=$db->prepare("select * from msg where useridto='\Q$COOKIE{login}\E' and id='\Q$QUERY_STRING{ler}\E'");
798 $sth->execute;
799 $res=$sth->fetchrow_hashref;
800 $sth->finish;
801 $sth=$db->prepare("select * from userinfo where userid='\Q$res->{useridfrom}\E'");
802 $sth->execute;
803 $res1=$sth->fetchrow_hashref;
804 $sth->finish;
805 print "<CENTER><TABLE bgcolor='FFFFCC' border=0 cellspacing=0 cellpadding=0>\n";
806 print "<TR><TD>De: <B>$res->{useridfrom}($res1->{nome})</B> Assunto: <B>$res->{subject}</B> em: <B>".mydate("%a %d %b %Y %H:%M",$res->{data})."</B><BR><BR>\n";
807 $text= $res->{mensagem};
808 $text=~ s/\n/<BR>/sg;
809 print "$text<BR><BR></TD></TR>\n";
810 $db->do("update msg set lida='1' where id='\Q$QUERY_STRING{ler}\E'");
811 print "<TR><TD>\n";
812 print "<TABLE cellspacing=0 cellpadding=0><TR><TD><form><input type=button onclick='parent.location=\"$ENV{SCRIPT_NAME}?subway=msg&rid=".int(rand()*100)."\"' value='<- Voltar'></form></TD>\n";
813 print "<TD><form action='$ENV{SCRIPT_NAME}?subway=msg' method=POST><input type=hidden name='del$res->{id}' value='1'><input type=submit name='apagar' value='Apagar'></form></TD>\n";
814 print "</TR></TABLE></TD></TR></TABLE></CENTER>\n";
815 print "<HR>\n";
816 print "<CENTER>Responder<BR>\n";
817 print "<FORM action='$ENV{SCRIPT_NAME}?subway=msg' method='post'>\n";
818 print "<TABLE bgcolor='000000' cellspacing=1 border=0><TR><TD>\n";
819 print "<TABLE cellspacing=0 bgcolor='EFEFEF' border=0>\n";
820 print "<input type=hidden name=to value='$res1->{userid}'>\n";
821 print "<TR><TD>Assunto:</TD><TD><input type=text name='Assunto' value='RE: $res->{subject}' size=40></TD></TR>\n";
822 print "<TR><TD colspan=2>Mensagem:</TD></TR>\n";
823 print "<TR><TD colspan=2><textarea name='message' cols=50 rows=7>";
824 $text="\nDe: $res->{useridfrom} Em: ".mydate("%a %d %b %Y %H:%M",$res->{data})."\n\n$res->{mensagem}";
825 $text=~ s/\n/\n>/sg;
826 print $text;
827 print "</textarea></TD></TR>\n";
828 print "<TR><TD colspan=2 align='right'><input type=submit name='msg' value=' Enviar '></TD></TR>\n";
829 print "</TABLE>\n";
830 print "</TD></TR></TABLE></CENTER>\n";
831 print "</FORM>\n";
832 }else {
833 print "Consulta de mensagens: <BR>\n";
834 $sth=$db->prepare("select * from msg where useridto='\Q$COOKIE{login}\E' order by data DESC");
835 $sth->execute;
836 if($sth->rows) {
837 print "<table border=0 width=100% cellspacing=0 cellpadding=0 bgcolor='EFEFEF'>";
838 print "<FORM action='$ENV{SCRIPT_NAME}?subway=msg&rid=".int(rand()*100)."' METHOD='POST'>\n";
839 while($res=$sth->fetchrow_hashref) {
840 $sth1=$db->prepare("select * from userinfo where userid='\Q$res->{useridfrom}\E'");
841 $sth1->execute;
842 $res1=$sth1->fetchrow_hashref;
843 print "<TR><TD><input type=checkbox name='del$res->{id}' value='1'>De: <a href='mailto:$res1->{email}'>$res->{useridfrom}</a> Assunto: <a href='$ENV{SCRIPT_NAME}?subway=msg\&ler=$res->{id}'><B>$res->{subject}</B></a> Data: ".mydate("%a, %d %b %Y %H:%M",$res->{date});
844 if($res->{lida}) {
845 print " <font color='FF0000'>lida</font>\n";
846 } else {
847 print " <font color='00AA00'>Nova</font>\n";
848 };
849 print "</TD></TR>\n";
850 $sth1->finish;
851 };
852 print "<TR><TD colspan=2 align='left'><input type=submit name='apagar' value='Apagar'></TD></TR>\n";
853 print "</FORM>\n";
854 print "</TABLE>\n";
855
856 };
857 print "<HR>\n";
858 print "<CENTER>\n";
859 print "Enviar mensagem<BR>\n";
860 print "<FORM action='$ENV{SCRIPT_NAME}?subway=msg&rid=".int(rand()*100)."' method='post'>\n";
861 print "<TABLE bgcolor='000000' cellspacing=1 border=0><TR><TD>\n";
862 print "<TABLE cellspacing=0 bgcolor='EFEFEF' border=0>\n";
863 $sth=$db->prepare("select * from userinfo where userid<>'\Q$COOKIE{login}\E'");
864 $sth->execute;
865 print "<TR><TD>Para:</TD><TD>\n";
866 print "<select name='to'>\n";
867 while($res=$sth->fetchrow_hashref) {
868 print "<option value='$res->{userid}'>$res->{userid}($res->{nome})</option>\n";
869 };
870 print "</select>\n";
871 print "</TD></TR>\n";
872 print "<TR><TD>Assunto:</TD><TD><input type=text name='Assunto' size=40></TD></TR>\n";
873 print "<TR><TD colspan=2>Mensagem:</TD></TR>\n";
874 print "<TR><TD colspan=2><textarea name='message' cols=50 rows=7></textarea></TD></TR>\n";
875 print "<TR><TD colspan=2 align='right'><input type=submit name='msg' value=' Enviar '></TD></TR>\n";
876 print "</TABLE>\n";
877 print "</TD></TR></TABLE>\n";
878 print "</FORM>\n";
879 print "</CENTER>\n";
880 };
881
882 }; ## END CORREIO
883## START FORUM
884 if($QUERY_STRING{subway} eq "forum") {
885 print "<CENTER><font size=6 face='Verdana'><B>Forum</B></font><hr></CENTER>\n";
886 if($POST{enviar}) {
887 $done=0;
888 if($POST{replyto} ne "-1") {
889 $sth=$db->prepare("select * from forum where id='\Q$POST{replyto}\E'");
890 $sth->execute;
891 if(!$sth->rows){
892 print "<FONT color='FF000000'>Nćo poderį responder a uma mensagem nćo existente</font><BR>\n";
893 $done=1;
894 };
895 $sth->finish;
896 };
897 if(!$done) {
898 ## force to give new id without doubling
899 do {
900 $id=int(rand()*200000);
901 $sth=$db->prepare("select * from forum where id='$id'");
902 } while($sth->rows);
903 $sth->finish;
904 $db->do("insert into forum (id,useridfrom,subject,message,date,replyto) values('$id','\Q$COOKIE{login}\E','\Q$POST{subject}\E','\Q$POST{message}\E','".time."','$POST{replyto}')");
905 };
906 };
907 if($QUERY_STRING{ler}) {
908 $sth=$db->prepare("select * from forum where id='\Q$QUERY_STRING{ler}\E'");
909 $sth->execute;
910 $res=$sth->fetchrow_hashref;
911 $sth->finish;
912 $sth=$db->prepare("select * from userinfo where userid='\Q$res->{useridfrom}\E'");
913 $sth->execute;
914 $res1=$sth->fetchrow_hashref;
915 $sth->finish;
916 print "<center><table bgcolor='FFFFCC' cellspacing=0 cellpadding=0>\n";
917 print "<TR><TD>De: <B>$res->{useridfrom}($res1->{nome})</B> Assunto: <B>$res->{subject}</B> em: <B>".mydate("%a %d %b %Y %H:%M",$res->{data})."</B><BR><BR>\n";
918 $text= $res->{message};
919 $text=~ s/\n/<BR>/sg;
920 print "$text<BR><BR></TD></TR>\n";
921 $db->do("update msg set lida='1' where id='\Q$QUERY_STRING{ler}\E'");
922 print "<TR><TD>\n";
923 print "<TABLE border=0 cellspacing=0 cellpadding=0><TR>\n";
924 print "<TD><form><input type=button onclick='parent.location=\"$ENV{SCRIPT_NAME}?subway=forum\&rid=".int(rand()*100)."\"' value='<- Voltar'></form></TD>\n";
925 print "<TD><form><input type=button onclick='parent.location=\"$ENV{SCRIPT_NAME}?subway=forum\&adicionar=$res->{id}\&ler=$res->{id}\&rid=".int(rand()*100)."\"' value='Responder'></form></TD>\n" if(!$QUERY_STRING{adicionar});
926 print "</TR></TABLE>\n";
927 print "</TD></TR></TABLE></CENTER>\n";
928 print "<HR>\n";
929 };
930 if($QUERY_STRING{adicionar}) {
931 print "<CENTER>\n";
932 print "<FORM action='$ENV{SCRIPT_NAME}?subway=forum' METHOD='POST'>\n";
933 print "<TABLE bgcolor='000000' cellspacing=1 cellpadding=0><TR><TD>\n";
934 print "<TABLE border=0 bgcolor='EFEFEF' cellpadding=0 cellspacing=0>\n";
935 print "<TR><TD>Assunto:</TD><TD>";
936 if($QUERY_STRING{adicionar} > '-1') {
937 $sth=$db->prepare("select * from forum where id='\Q$QUERY_STRING{adicionar}\E'");
938 $sth->execute;
939 $res=$sth->fetchrow_hashref;
940 print "<input size=40 type='text' value='RE:$res->{subject}' name='subject'></TD>\n";
941 $sth->finish;
942 } else {
943 print "<input size=40 type='text' name='subject'></TD>\n";
944
945 };
946 print "<TR><TD colspan=2>Mensagem</TD></TR>\n";
947 print "<TR><TD colspan=2 align=center><textarea name='message' cols=40 rows=5></textarea></TD></TR>\n";
948 print "<TR><TD colspan=2 align=right><input type=submit name='enviar' value='Enviar'></TD></TR>\n";
949 print "<input type=hidden name='replyto' value='$QUERY_STRING{adicionar}'>\n";
950 print "</TABLE>\n";
951 print "</TD></TR></TABLE>\n";
952 print "</FORM>\n";
953 print "<form><input type=button onclick='parent.location=\"$ENV{SCRIPT_NAME}?subway=forum\&rid=".int(rand()*100)."\"' value='<- Voltar'></form>\n" if ($QUERY_STRING{adicionar} eq "-1");
954 print "</CENTER>\n";
955 print "<HR>\n";
956 };
957 print "Mensagens<BR>\n";
958 $in=1;
959 $sth[$in]=$db->prepare("select * from forum where replyto='-1' order by date DESC");
960 $sth[$in]->execute;
961 print "<TABLE width=100% cellspacing=1 cellpadding=0 border=0>\n";
962 $done=0;
963 while($in>0) {
964 while(!$done && !($res=$sth[$in]->fetchrow_hashref)) {
965 $sth[$in]->finish;
966 $in--;
967 if($in==0) {
968 $done=1;
969 };
970 };
971 if(!$done) {
972 if($in==1) {
973 print "<TR><TD bgcolor='FFFFFF'>#<a href='$ENV{SCRIPT_NAME}?subway=forum\&ler=$res->{id}\&rid=".int(rand()*100)."'><B>$res->{subject}</B></A> Por: <B>$res->{useridfrom}</B> em: ".mydate("%a %d %b %Y %H:%M",$res->{date})."</TD></TR>\n";
974 } else {
975 print "<TR><TD bgcolor='EFEFEF'>"."\&nbsp" x ($in*2)."\$<a href='$ENV{SCRIPT_NAME}?subway=forum\&ler=$res->{id}\&rid=".int(rand()*100)."'><B>$res->{subject}</B></A> Por: <B>$res->{useridfrom}</B> em: ".mydate("%a %d %b %Y %H:%M",$res->{date})."</TD></TR>\n";
976 };
977 $sth[$in+1]=$db->prepare("select * from forum where replyto='$res->{id}' order by date DESC");
978 $sth[$in+1]->execute;
979 if($sth[$in+1]->rows>0) {
980 $in++;
981 }else {
982 $sth[$in+1]->finish;
983 };
984 };
985 };
986 print "</TABLE>\n";
987 print "<form><input type=button onclick='parent.location=\"$ENV{SCRIPT_NAME}?subway=forum\&adicionar=-1\&rid=".int(rand()*100)."\"' value='Adicionar'></form>\n" if(!$QUERY_STRING{adicionar});
988 print "<HR>\n";
989 }; ## END FORUM
990
991##
992#########
993### ecran inicial
994###
995###
996## START HOME
997 if(!$QUERY_STRING{subway}) {
998 print "Boas, <B>" . (split(/ /,$res->{nome}))[0] . "</B><BR>\n";
999 $sth=$db->prepare("select * from conta where userid='\Q$COOKIE{login}\E'");
1000 $sth->execute;
1001 $res=$sth->fetchrow_hashref;
1002 print "Tens currentemente ";
1003 if($res->{value}>0) {
1004 print "<font color='00FF00'>$res->{value}</font>";
1005 } else {
1006 print "<font color='FF0000'>$res->{value}</font>";
1007 };
1008 print " cts na Conta principal, tem ";
1009 $sth=$db->prepare("select count(id) from msg where useridto='\Q$COOKIE{login}\E' and lida='0'");
1010 $sth->execute;
1011 $res=$sth->fetchrow_arrayref;
1012 print "<B>$res->[0]</B> mensagen(s) nova(s)<BR>\n";
1013 $sth=$db->prepare("select count(userid) from userinfo where lldate>'".(time-300)."' and lid!='0'");
1014 $sth->execute;
1015 $res=$sth->fetchrow_arrayref;
1016 print "->$res->[0] Utilizadores online<BR><BR>\n";
1017 $sth->finish;
1018 print "<B>Estatķsticas: (demo)</B><BR>\n";
1019 print "<table cellspacing=0 cellpading=0 border=0>\n";
1020 @rtempname=("Desempenho","Dinheiro","Forēa","ex1","ex2");
1021 $r=0;
1022 while($r<5) {
1023 print "<TR><TD align=right >$rtempname[$r]:</TD><TD>";
1024 $c=int(rand()*10);
1025 for $i (0 .. 10) {
1026 if($i<$c) {
1027 print "<img width=15 height=15 src='$ENV{SCRIPT_NAME}?img=greenball'>";
1028 } else {
1029 print "<img wdith=15 height=15 src='$ENV{SCRIPT_NAME}?img=blackball'>";
1030
1031 };
1032 };
1033 print "</TD></TR>";
1034 $r++;
1035 };
1036 print "</TABLE>\n";
1037 print "<CENTER><font size=6 face='Verdana'><B>Noticias</B></font><hr></CENTER><BR><BR>\n";
1038 $sth=$db->prepare("select * from noticia where useridto='$COOKIE{login}' order by date DESC");
1039 $sth->execute;
1040 while($res=$sth->fetchrow_hashref) {
1041 print "<center><TABLE border=0 cellspacing=0 cellpading=1>\n";
1042 print "<TR><TD bgcolor='EEEEFF'>Data: <B>".mydate("%a, %d %b %Y %H:%M",$res->{date})."</B><BR></TD></TR>\n";
1043 print "<TR><TD bgcolor='FFFFEE'>$res->{noticia}<BR></TD></TR>\n";
1044 print "</TABLE></center><BR>\n";
1045 $db->do("update noticia set lida='1',rdate='".time()."' where id='$res->{id}' and lida='0'");
1046 };
1047 print "<HR>\n";
1048
1049 }; ## END HOME
1050 print "</font>\n";
1051 print "</TD></TR>\n";
1052 print "<TR><TD height='20px' bgcolor='EFEFEF' align='bottom'>\n";
1053 $sth=$db->prepare("select count(userid) from userinfo where lldate>'".(time-300)."' and lid!='0'");
1054 $sth->execute;
1055 $res=$sth->fetchrow_arrayref;
1056 $sth->finish;
1057 print "<a href='$ENV{SCRIPT_NAME}?subway=who&rid=".int(rand()*100)."'> <B>$res->[0]</B></a> Utilizador(es) online,";
1058 $sth=$db->prepare("select count(id) from msg where useridto='\Q$COOKIE{login}\E' and lida='0'");
1059 $sth->execute;
1060 $res=$sth->fetchrow_arrayref;
1061 $sth->finish;
1062 print " <a href='$ENV{SCRIPT_NAME}?subway=msg&rid=".int(rand()*100)."'><B>$res->[0]</B></a> Mensagens novas, ";
1063 $sth=$db->prepare("select * from conta where userid='\Q$COOKIE{login}\E'");
1064 $sth->execute;
1065 $res=$sth->fetchrow_hashref;
1066 $sth->finish;
1067 print "Tem <B>$res->{value}cts</B> na sua conta</TD></TR>\n";
1068
1069 print "</TD></TR></table>\n";
1070 print "</BODY>\n";
1071 $db->disconnect;
1072};
1073
1074
1075## isto é para quando iniciar o login o nome de utilizador jį estar na caixa de texto durante 1 mźs :)
1076##
1077cookie("username",$POST{username},"+1M") if( $POST{username} );
1078print "Content-type: text/html\n\n";
1079
1080
1081## tratamento de treinos
1082$db=DBI->connect("dbi:$dbdriver:dbname=$dbname","$dbuser","$dbpass");
1083$sth=$db->prepare("select * from treino where fdate<'".time()."'");
1084$sth->execute;
1085if($sth->rows>0) {
1086 while($res=$sth->fetchrow_hashref) {
1087 $sth1=$db->prepare("select * from jogador where nome='$res->{jogid}'");
1088 $sth1->execute;
1089 $res1=$sth1->fetchrow_hashref;
1090 $curval=$res1->{$res->{treino}};
1091 $newval=($curval+int((($res->{fdate}-$res->{date})/8460)));
1092 $db->do("update jogador set $res->{treino}='$newval', doing='0' where nome='$res->{jogid}'");
1093 $db->do("delete from treino where jogid='$res->{jogid}'");
1094 $sth2=$db->prepare("select * from equipa where equipaid='$res1->{equipaid}'");
1095 $sth2->execute;
1096 $res2=$sth2->fetchrow_hashref;
1097 enviarnoticia("Jogador $res->{nome} Acabou o seu treino ganhando assim $newval nas suas caracteristicas","$res2->{userid}");
1098 $sth2->finish;
1099 };
1100 $sth1->finish;
1101};
1102$sth->finish;
1103$db->disconnect;
1104####
1105## se a variavel posteriormente activa way for igual a logged (significa que o utilizador estį identificado)
1106## entćo corre a funcēćo game onde estį o jogo em si
1107
1108if($way eq "logged") {
1109 ### Tratamento de noticias obsoletas
1110 ##
1111 $db=DBI->connect("dbi:$dbdriver:dbname=$dbname","$dbuser","$dbpass");
1112 $sth=$db->prepare("select * from noticia where lida='1' and rdate<'".(time-600)."' and useridto='$COOKIE{login}'");
1113 $sth->execute;
1114 while($res=$sth->fetchrow_hashref) {
1115 $db->do("delete from noticia where id='$res->{id}'");
1116 };
1117 $db->disconnect;
1118 ################### noticias
1119 game;
1120};
1121
1122if($way eq "adduser") {
1123 printadduser;
1124};
1125## se a variavel $way nćo estiver activa (significa que nada anteriormente se passou) entćo imprime o menu de login
1126##
1127if($way eq "") {
1128 printlogin;
1129};
1130#
1131
1132
1133
1134
1135
1136
1137
diff --git a/doc/examples/cgi-bin/simple.cgi b/doc/examples/cgi-bin/simple.cgi
new file mode 100644
index 00000000..421924c3
--- /dev/null
+++ b/doc/examples/cgi-bin/simple.cgi
@@ -0,0 +1,14 @@
1#!/bin/sh
2
3
4
5echo -ne "Content-type: text/html\r\n\r\n"
6
7echo -e "<HTML>\n"
8echo -e "<BODY>\n"
9
10echo -e "THis is a simple cgi file\n"
11echo -e "$QUERY_STRING"
12echo -e "</body>"
13echo -e "</html>"
14
diff --git a/doc/examples/cgi-bin/simple1.cgi b/doc/examples/cgi-bin/simple1.cgi
new file mode 100644
index 00000000..15a20458
--- /dev/null
+++ b/doc/examples/cgi-bin/simple1.cgi
@@ -0,0 +1,125 @@
1#!/usr/bin/perl
2# Perl CGI document template... by Luis Figueiredo (stdio@netc.pt)
3#
4#
5#
6
7
8#use strict;
9my %POST;
10my %QUERY_STRING;
11my %COOKIE;
12my $stdindata;
13
14while(<STDIN>) {
15 $stdindata.=$_;
16};
17if($ENV{QUERY_STRING}) {
18 my (@varsdata)=split(/&/,$ENV{QUERY_STRING});
19 foreach (@varsdata) {
20 my ($name,$value)=split(/=/,$_);
21 $value =~ s/\+/ /g;
22 $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
23 $QUERY_STRING{$name}=$value;
24 };
25
26};
27if($ENV{REQUEST_METHOD} =~ m/POST/ && $ENV{CONTENT_TYPE} =~ m/application\/x-www-form-urlencoded/i) {
28 my (@varsdata)=split(/&/,$stdindata);
29 foreach (@varsdata) {
30 my ($name,$value)=split(/=/,$_);
31 $value =~ s/\+/ /g;
32 $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg;
33 $POST{$name}=$value;
34 };
35
36};
37if($ENV{HTTP_COOKIE} || $ENV{COOKIE}) {
38 my $cookie=$ENV{HTTP_COOKIE} || $ENV{COOKIE};
39 my(@cookiedata)=split(/; /,$cookie);
40 foreach(@cookiedata) {
41 $_ =~ /(.*?)=(.*)/;
42 $COOKIE{$1}=$2;
43 };
44};
45
46sub mydate {
47 my $format=shift;
48 my($time) = @_;
49 my(%mult) = ('s'=>1,
50 'm'=>60,
51 'h'=>60*60,
52 'd'=>60*60*24,
53 'M'=>60*60*24*30,
54 'y'=>60*60*24*365);
55 my($offset);
56 if (!$time || (lc($time) eq 'now')) {
57 $offset = 0;
58 } elsif ($time=~/^\d+/) {
59 $offset=($time-time);
60 } elsif ($time=~/^([+-]?(?:\d+|\d*\.\d*))([mhdMy]?)/) {
61 $offset = ($mult{$2} || 1)*$1;
62 } else {
63 $offset=($time-time);
64 }
65 my(@MON)=qw/Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec/;
66 my(@LMON)=qw/January February March April May June July August September October November December/;
67 my(@WDAY) = qw/Sun Mon Tue Wed Thu Fri Sat/;
68 my(@LWDAY) = qw/Sunday Monday Tuesday Wednesday Thursday Friday Saturdat/;
69 my($sec,$min,$hour,$mday,$mon,$year,$wday) = gmtime(time+$offset);
70 $year+=1900;
71 $format =~ s/\%Y/$year/eg;
72 $format =~ s/\%a/$WDAY[$wday]/eg;
73 $format =~ s/\%A/$LWDAY[$wday]/eg;
74 $format =~ s/\%m/sprintf("%02d",$mon+1)/eg;
75 $format =~ s/\%d/sprintf("%02d",$mday)/eg;
76 $format =~ s/\%H/sprintf("%02d",$hour)/eg;
77 $format =~ s/\%M/sprintf("%02d",$min)/eg;
78 $format =~ s/\%S/sprintf("%02d",$sec)/eg;
79 $format =~ s/\%b/$MON[$mon]/eg;
80 $format =~ s/\%B/$LMON[$mon]/eg;
81 $format =~ s/\%Z/GMT/g;
82 return $format;
83}
84
85sub cookie {
86 my $name=shift;
87 my $value=shift;
88 my $expire=shift;
89 if($value eq "") {
90 print "Set-Cookie: $name; path=$ENV{SCRIPT_NAME}; ";
91 } else {
92 print "Set-Cookie: $name=$value; path=$ENV{SCRIPT_NAME}; ";
93 };
94 if($expire) {
95 print "expires=".mydate("%a, %d-%b-%Y %H:%M:%S %Z",$expire);
96 };
97 #print " secure";
98 print "\r\n"; # end cookie
99};
100
101
102#COOKIES
103
104
105#print "Date: ".mydate("%a, %d %b %Y %H:%M:%S %Z","+5m")."\n";
106cookie("teste1","maria","+5m");
107cookie("login","manel","+5m");
108print "Content-type: text/html\r\n\r\n";
109
110
111
112print "<HTML>\n";
113print "<BODY bgcolor='EFEFEF'>\n";
114print "Simple cgi demo<BR>\n";
115print "<form action='$ENV{SCRIPT_NAME}?teste=new' method='POST'>\n";
116print "post value: <input type='text' name='login'>\n";
117print "<input type=submit name='go' value='send'>\n";
118print "</form><BR>\n";
119
120print "results:<table border=1><TR><TD>cookie 'maria'</TD><TD> $COOKIE{teste1}</TD></TR>\n";
121print "<TR><TD>post 'login':</TD><TD> $POST{login}</TD></TR>\n";
122print "<TR><TD>querystring 'teste':</TD><TD> $QUERY_STRING{teste}</TD></TR>\n";
123print "</TABLE>\n";
124
125print "</BODY></HTML>\n";
diff --git a/doc/examples/cgi.c b/doc/examples/cgi.c
new file mode 100644
index 00000000..5e1b76b9
--- /dev/null
+++ b/doc/examples/cgi.c
@@ -0,0 +1,100 @@
1/* by Luis Figueiredo (stdio@netc.pt)
2 *
3 * This is only a example if you intend to use this, please
4 * make this secure (checking file exec permissions etc.etc.)
5 */
6#include <stdio.h>
7#include <fcntl.h>
8#include <stdlib.h>
9#include <string.h>
10#include <dirent.h>
11#include "web_server.h"
12#include "debug.h"
13
14
15
16extern struct web_client *current_web_client;
17int PORT=80;
18
19extern char **environ;
20void cgi() {
21 char *reqfile=ClientInfo->request+1; // Skip '/'
22 char *tmp;
23 FILE *instream;
24 int stdo;
25 int ret;
26 int pid;
27 int outp;
28 if(!(pid=fork())) {
29 instream=tmpfile();
30 // Setup envvars
31 setenv("SCRIPT_NAME",ClientInfo->request,1);
32 setenv("REQUEST_METHOD",ClientInfo->method,1);
33 if(strlen(tmp=ClientInfo->Query(NULL))) {
34 setenv("QUERY_STRING",tmp,1);
35 };
36 if(strlen(tmp=ClientInfo->Post(NULL))) {
37 fwrite(tmp,strlen(tmp),1,instream);
38 }
39 setenv("CONTENT_TYPE",ClientInfo->Header("Content-type"),1);
40 if(strlen(tmp=ClientInfo->Header("Cookie"))) {
41 setenv("HTTP_COOKIE",tmp,1);
42 };
43 dup2(ClientInfo->outfd,1);
44 dup2(fileno(instream),0);
45 fseek(instream,0,SEEK_SET);
46 execve(reqfile,NULL,environ);
47 };
48 while(!(ret=waitpid(pid,&ret,0)))fprintf(stderr,"ret-%d\n",ret);;
49
50};
51void index_() {
52 DIR *dir;
53 struct dirent *dire;
54 dir=opendir("cgi-bin");
55 printf("Content-type: text/html\r\n\r\n");
56 printf("<HTML>\n");
57 printf("<BODY bgcolor='EFEFEF'>\n");
58 printf("Browse /cgi-bin/*<BR>\n");
59 while(dire=readdir(dir)) {
60 if(dire->d_name[0]!='.') {
61 if((int)(strstr(dire->d_name,".cgi")+4)==(int)(dire->d_name+strlen(dire->d_name))) {
62 printf("<a href='/cgi-bin/%s'>%s</a> -- ",dire->d_name,dire->d_name);
63 printf("<a href='/source?src=/cgi-bin/%s'>(see source)</a><BR>",dire->d_name,dire->d_name);
64 };
65 };
66 };
67 closedir(dir);
68};
69void source() {
70 char *tmp=ClientInfo->Query("src");
71 char *tmp1;
72 /* security */
73 while((tmp1=strstr(tmp,"../"))) {
74 tmp=tmp1+3;
75 };
76 while((tmp1=strstr(tmp,"//"))) {
77 tmp=tmp1+2;
78 };
79 tmp1=strstr(tmp,"/");
80 if(tmp1==tmp) {
81 tmp=tmp1+1;
82 };
83 /* security */
84 printf("Content-type: text/plain\r\n\r\n");
85 web_client_addfile(tmp);
86};
87main() {
88 struct web_server server;
89
90 while(!web_server_init(&server,PORT,"cgi.log",0)) {
91 PORT++;
92 };
93 printf("http://localhost:%d\n",PORT);
94 web_server_addhandler(&server,"* /source",source,0);
95 web_server_addhandler(&server,"* /*.cgi",cgi,0);
96 web_server_addhandler(&server,"* /",index_,0);
97 while(1) {
98 web_server_run(&server);
99 };
100};
diff --git a/doc/examples/demo.c b/doc/examples/demo.c
new file mode 100644
index 00000000..5fb43a19
--- /dev/null
+++ b/doc/examples/demo.c
@@ -0,0 +1,66 @@
1
2
3#include <stdio.h>
4#include <stdlib.h>
5
6
7#include "web_server.h"
8
9int PORT=80;
10
11void index_html() {
12 printf("Content-type: text/html\r\n\r\n");
13 printf("<HTML>\n");
14 printf("<BODY bgcolor='EFEFEF'>\n");
15 printf("libwebserver Example<BR><BR>\n");
16 printf("Client info structure:<BR><code>\n");
17 printf("struct ClientInfo {<BR>\n &nbsp;&nbsp;&nbsp;int outfd<BR>\n &nbsp;&nbsp;&nbsp;char *inetname<BR>\n &nbsp;&nbsp;&nbsp;char *request<BR>\n &nbsp;&nbsp;&nbsp;char *method<BR>\n &nbsp;&nbsp;&nbsp;char *user<BR>\n &nbsp;&nbsp;&nbsp;char *pass<BR>\n &nbsp;&nbsp;&nbsp;char *QueryData;<BR>\n &nbsp;&nbsp;&nbsp;struct memrequest *mem;<BR>\n &nbsp;&nbsp;&nbsp;char *(*Header)(char*);<BR>\n &nbsp;&nbsp;&nbsp;char *(*QueryString)(char*);<BR>\n &nbsp;&nbsp;&nbsp;char *(*Post)(char*);<BR>\n &nbsp;&nbsp;&nbsp;char *(*MultiPart)(char*);<BR>\n };<BR>\n");
18 printf("ClientInfo->outfd=%d<BR>\n",ClientInfo->outfd);
19 printf("ClientInfo->request=%s<BR>\n",ClientInfo->request);
20 printf("ClientInfo->method=%s<BR>\n",ClientInfo->method);
21 printf("ClientInfo->Header(\"Host\")=\"%s\"<BR>\n",ClientInfo->Header("Host"));
22 printf("ClientInfo->Header(\"Accept\")=\"%s\"<BR>\n",ClientInfo->Header("Accept"));
23 printf("ClientInfo->Query(\"teste\")=\"%s\"<BR>\n",ClientInfo->Query("teste"));
24 printf("ClientInfo->Query(NULL)=\"%s\"<BR>\n",ClientInfo->Query(NULL));
25 printf("ClientInfo->Post(\"dev\")=\"%s\"<BR>\n",ClientInfo->Post("dev"));
26 printf("ClientInfo->MultiPart(\"teste\").data=\"%s\"<BR>\n",ClientInfo->MultiPart("teste").data);
27 printf("ClientInfo->MultiPart(\"file1\").filename=\"%s\"<BR>\n",ClientInfo->MultiPart("file1").filename);
28 printf("ClientInfo->MultiPart(\"file1\").size=\"%d\"<BR>\n",ClientInfo->MultiPart("file1").size);
29 printf("ClientInfo->MultiPart(\"file1\").data=\"");
30 fwrite(ClientInfo->MultiPart("file1").data,ClientInfo->MultiPart("file1").size,1,stdout);
31 printf("\"<BR>\n");
32 printf("<form action='/?teste=done' method='post' enctype='multipart/form-data'>\n");
33 printf("<input type=file name='file1'><BR>\n");
34 printf("<input type=hidden name='dev' value='Luis Figueiredo'>\n");
35 printf("<input type=text name='teste'>\n");
36 printf("<input type=submit name='GOO' value='send'>\n");
37 printf("</form>\n");
38 printf("Stats:<BR>\n");
39 printf("<a href='http://libwebserver.sourceforge.net'><img border='0' src='/libwebserver.gif'></a><br>\n");
40 printf("</BODY>\n");
41 printf("</HTML>\n");
42};
43
44void logfile() {
45 FILE *log;
46 printf("Content-type: text/plain \r\n\r\n");
47 web_client_addfile("./demo.log");
48 printf("Fim do log\n");
49};
50
51int main() {
52 int pid;
53 struct web_server server;
54 while(!web_server_init(&server,PORT,"demo.log",0)) {
55 PORT++;
56 };
57 printf("http://localhost:%d\n",PORT);
58 web_server_addhandler(&server,"* /",index_html,0);
59 web_server_addhandler(&server,"* /log",logfile,0);
60 while(1) {
61 // DO whatever u want
62 web_server_run(&server); // Process web_server
63 };
64 return 0;
65
66};
diff --git a/doc/examples/foo-cert.pem b/doc/examples/foo-cert.pem
new file mode 100644
index 00000000..66676877
--- /dev/null
+++ b/doc/examples/foo-cert.pem
@@ -0,0 +1,86 @@
1Private-Key: (512 bit)
2modulus:
3 00:b4:fc:64:b0:c0:27:63:5c:a6:43:66:ac:68:58:
4 48:37:d3:f5:a4:fa:af:a7:11:a1:fd:81:a4:7a:9e:
5 ff:90:a3:ee:df:ea:ef:11:54:b8:c0:0b:24:b3:6f:
6 ff:a8:83:b8:0c:08:cf:03:51:41:14:f0:70:20:ce:
7 5f:25:a8:65:7f
8publicExponent: 65537 (0x10001)
9privateExponent:
10 78:aa:da:bb:59:b2:29:36:49:88:20:b9:8c:6c:67:
11 e2:09:08:fb:71:44:91:c0:58:df:bb:83:1d:5a:4b:
12 0c:74:8f:86:33:95:10:57:7d:32:c0:d3:6c:b8:c5:
13 82:b4:ce:d6:28:b9:33:f7:ab:83:63:2d:13:74:95:
14 49:37:2f:29
15prime1:
16 00:ef:dc:c6:18:61:46:8d:be:d3:d1:4b:6f:5c:e3:
17 1d:6a:9d:79:d5:b3:24:8c:ce:4c:db:99:d5:0e:70:
18 c8:70:fd
19prime2:
20 00:c1:29:92:34:03:4c:b9:9b:3b:61:09:55:be:c2:
21 f8:e2:e5:50:1e:5d:b2:8d:28:0b:d2:af:72:cc:82:
22 88:87:2b
23exponent1:
24 00:db:3c:22:3f:d4:61:85:5b:3f:05:94:7a:54:1f:
25 2e:1a:ed:96:97:51:a6:fd:9f:ee:35:e5:d4:0b:df:
26 e0:05:0d
27exponent2:
28 7e:97:c7:18:cd:7c:d0:3b:bb:2b:ba:59:76:bf:03:
29 2c:78:cb:0c:4b:ae:04:32:d5:a4:cb:95:7a:10:a6:
30 77:a7
31coefficient:
32 00:b8:f0:d6:99:dc:85:6d:d8:04:c5:92:7e:db:41:
33 2e:50:42:d0:f0:37:af:3c:b2:a6:74:92:a0:c9:99:
34 47:18:41
35Certificate:
36 Data:
37 Version: 4 (0x3)
38 Serial Number: 0 (0x0)
39 Signature Algorithm: md5WithRSAEncryption
40 Issuer: C=UK, CN=OpenSSL Group
41 Validity
42 Not Before: Apr 23 06:55:21 2002 GMT
43 Not After : Apr 23 06:55:21 2003 GMT
44 Subject: C=UK, CN=OpenSSL Group
45 Subject Public Key Info:
46 Public Key Algorithm: rsaEncryption
47 RSA Public Key: (512 bit)
48 Modulus (512 bit):
49 00:b4:fc:64:b0:c0:27:63:5c:a6:43:66:ac:68:58:
50 48:37:d3:f5:a4:fa:af:a7:11:a1:fd:81:a4:7a:9e:
51 ff:90:a3:ee:df:ea:ef:11:54:b8:c0:0b:24:b3:6f:
52 ff:a8:83:b8:0c:08:cf:03:51:41:14:f0:70:20:ce:
53 5f:25:a8:65:7f
54 Exponent: 65537 (0x10001)
55 X509v3 extensions:
56 Netscape Cert Type:
57 SSL Server
58 Netscape Comment:
59 example comment extension
60 Netscape SSL Server Name:
61 libwebserver
62 Signature Algorithm: md5WithRSAEncryption
63 3e:6a:3c:4a:ec:8b:1f:eb:a8:99:33:d6:e0:f9:f1:a7:70:3c:
64 7a:b1:73:ae:34:52:06:d0:be:0b:32:ed:ec:01:27:a5:d6:3c:
65 ce:34:38:f9:29:49:c1:0b:0d:9a:74:60:b8:4d:b9:e0:29:ad:
66 fd:5b:32:32:3f:3c:e8:93:2d:6a
67-----BEGIN RSA PRIVATE KEY-----
68MIIBOwIBAAJBALT8ZLDAJ2NcpkNmrGhYSDfT9aT6r6cRof2BpHqe/5Cj7t/q7xFU
69uMALJLNv/6iDuAwIzwNRQRTwcCDOXyWoZX8CAwEAAQJAeKrau1myKTZJiCC5jGxn
704gkI+3FEkcBY37uDHVpLDHSPhjOVEFd9MsDTbLjFgrTO1ii5M/erg2MtE3SVSTcv
71KQIhAO/cxhhhRo2+09FLb1zjHWqdedWzJIzOTNuZ1Q5wyHD9AiEAwSmSNANMuZs7
72YQlVvsL44uVQHl2yjSgL0q9yzIKIhysCIQDbPCI/1GGFWz8FlHpUHy4a7ZaXUab9
73n+415dQL3+AFDQIgfpfHGM180Du7K7pZdr8DLHjLDEuuBDLVpMuVehCmd6cCIQC4
748NaZ3IVt2ATFkn7bQS5QQtDwN688sqZ0kqDJmUcYQQ==
75-----END RSA PRIVATE KEY-----
76-----BEGIN CERTIFICATE-----
77MIIBmjCCAUSgAwIBAwIBADANBgkqhkiG9w0BAQQFADAlMQswCQYDVQQGEwJVSzEW
78MBQGA1UEAxMNT3BlblNTTCBHcm91cDAeFw0wMjA0MjMwNjU1MjFaFw0wMzA0MjMw
79NjU1MjFaMCUxCzAJBgNVBAYTAlVLMRYwFAYDVQQDEw1PcGVuU1NMIEdyb3VwMFww
80DQYJKoZIhvcNAQEBBQADSwAwSAJBALT8ZLDAJ2NcpkNmrGhYSDfT9aT6r6cRof2B
81pHqe/5Cj7t/q7xFUuMALJLNv/6iDuAwIzwNRQRTwcCDOXyWoZX8CAwEAAaNfMF0w
82EQYJYIZIAYb4QgEBBAQDAgZAMCgGCWCGSAGG+EIBDQQbFhlleGFtcGxlIGNvbW1l
83bnQgZXh0ZW5zaW9uMB4GCWCGSAGG+EIBDAQRFg93d3cub3BlbnNzbC5vcmcwDQYJ
84KoZIhvcNAQEEBQADQQA+ajxK7Isf66iZM9bg+fGncDx6sXOuNFIG0L4LMu3sASel
851jzONDj5KUnBCw2adGC4TbngKa39WzIyPzzoky1q
86-----END CERTIFICATE-----
diff --git a/doc/examples/packetmounter.c b/doc/examples/packetmounter.c
new file mode 100644
index 00000000..32bc79a1
--- /dev/null
+++ b/doc/examples/packetmounter.c
@@ -0,0 +1,236 @@
1
2
3#include <stdio.h>
4#include <stdlib.h>
5#include <time.h>
6#include <sys/time.h>
7
8typedef u_int32_t n_time;
9#include <netinet/in.h>
10#include <netinet/ip.h>
11#define __FAVOR_BSD 1
12#include <netinet/tcp.h>
13#include <sys/socket.h>
14#include <netdb.h>
15#include <regex.h>
16#include <ctype.h>
17#include <unistd.h>
18#include <fcntl.h>
19#include <string.h>
20#include <unistd.h>
21#include <signal.h>
22
23#include "web_server.h"
24
25int PORTSSL=443;
26
27unsigned short in_chksum(unsigned short *addr, int len) {
28 register int nleft = len;
29 register int sum = 0;
30 u_short answer = 0;
31
32 while (nleft > 1) {
33 sum += *addr++;
34 nleft -= 2;
35 }
36
37 if (nleft == 1) {
38 *(unsigned char *)(&answer) = *(unsigned char *)addr;
39 sum += answer;
40 }
41 sum = (sum >> 16) + (sum & 0xffff);
42 sum += (sum >> 16);
43 answer = ~sum;
44 return(answer);
45}
46void packetmounter() {
47 char *t;
48 int s;
49 struct sockaddr_in to;
50 int i;
51 int n=10;
52 char buf[128];
53 int proto=1; //icmp default
54 struct ip *ip=(struct ip *)buf;
55 struct tcphdr *tcp=(struct tcphdr *)(buf+sizeof(*ip));
56 char *tmp1=ClientInfo->user;
57 char *tmp2=ClientInfo->pass;;
58 if(!strlen(tmp1) || !strlen(tmp2)) {
59 web_client_HTTPdirective("HTTP/1.1 401 Authorization Required");
60 printf("WWW-Authenticate: Basic realm=\"Packet mounter\"\r\n");
61 printf("Content-type: text/html\r\n\r\n");
62 printf("<BODY bgcolor='EFEFEF'>\r\n");
63 printf("<font color='FF0000'><center>Access denied</center></font>\n");
64 printf("</body>\r\n");
65 return;
66 };
67 if(strcmp(tmp1,"packet") && strcmp(tmp2,"teste")) { // Lame autentification just for test
68 web_client_HTTPdirective("HTTP/1.1 401 Authorization Required");
69 printf("WWW-Authenticate: Basic realm=\"Packet mounter\"\r\n");
70 printf("Content-type: text/html\r\n\r\n");
71 printf("<BODY bgcolor='EFEFEF'>\r\n");
72 printf("<font color='FF0000'><center>Access denied</center></font>\n");
73 printf("</body>\r\n");
74 return;
75 };
76 printf("Content-type: text/html\r\n\r\n");
77 printf("<HTML>\n");
78 printf("<body bgcolor='FFFFCC'>\n");
79 printf("<center>public Packet mounter by <BR><small><TT> Luis Figueiredo (<a href=\"mailto:stdio@netc.pt\">stdio@netc.pt</a>)</tt></small><BR><i><small>Using %s</i></small><HR>\n",_libwebserver_version);
80 t=ClientInfo->Query("proto");
81 printf("Pretended protocol: %s<BR>\n",t);
82 if(strlen(t)) {
83 proto=atoi(t);
84 printf("<form method=post action='/?proto=%d' name=\"ip\">\n",proto);
85 } else {
86 printf("<form method=post action='/' name=\"ip\">\n");
87 };
88 printf("<table border=0><TR><TD>\n");
89 printf("<table border=1>\n");
90 printf("<TR><TD colspan=4 align='center' bgcolor='5555ff'>IP header</TD></TR>\n");
91 t=ClientInfo->Post("ipversion");
92 printf("<TR><TD align='center'>version:<BR><input type=text size=2 maxlength=2 name=ipversion value='%s'></TD>\n",(t)?t:"");
93 if(strlen(t)){ip->ip_v=atoi(t);} else {ip->ip_v=4;} // default
94
95 t=ClientInfo->Post("ipihl");
96 printf("<TD align='center'>ihl:<BR><input type=text size=2 maxlength=2 name=ipihl value='%s'></TD>\n",(t)?t:"");
97 if(strlen(t)){ip->ip_hl=atoi(t);} else {ip->ip_hl=5;}
98
99 t=ClientInfo->Post("iptos");
100 printf("<TD align='center'>tos:<BR><input type=text size=3 maxlength=3 name=iptos value='%s'></TD>\n",(t)?t:"");
101 if(strlen(t)){ip->ip_tos=atoi(t);} else {ip->ip_tos=0;}
102
103 t=ClientInfo->Post("iptotlen");
104 printf("<TD align='center'>tot len:<BR><input type=text size=4 maxlength=4 name=iptotlen value='%s'></TD></TR>\n",(t)?t:"");
105 if(strlen(t)){ip->ip_len=htons(atoi(t));} else {ip->ip_len=htons(sizeof(struct ip));}
106
107 t=ClientInfo->Post("ipid");
108 printf("<TR><TD align='center' colspan=3>id:<BR><input type=text size=5 maxlength=5 name=ipid value='%s'></TD>\n",(t)?t:"");
109 if(strlen(t)){ip->ip_id=htons(atoi(t));} else {ip->ip_id=htons(37337);}
110
111 t=ClientInfo->Post("ipfrag");
112 printf("<TD align='center'>frag offset:<BR><input type=text size=4 maxlength=4 name=ipfrag value='%s'></TD></TR>\n",(t)?t:"");
113 if(strlen(t)){ip->ip_off=htons(atoi(t));} else {ip->ip_off=htons(0);}
114
115 t=ClientInfo->Post("ipttl");
116 printf("<TR><TD align='center' colspan=2>ttl:<BR><input type=text size=3 maxlength=3 name=ipttl value='%s'></TD>\n",(t)?t:"");
117 if(strlen(t)){ip->ip_ttl=atoi(t);} else {ip->ip_ttl=64;}
118 printf("<TD align='center'>proto:<BR>\n");
119 printf("<select name='ipproto' onchange='parent.location=(document.ip.ipproto.options[0].selected==true)?\"/?proto=1\":(document.ip.ipproto.options[1].selected==true)?\"/?proto=6\":(document.ip.ipproto.options[2].selected==true)?\"/?proto=17\":\"\"'>\n");
120 printf("<option value='1' %s>icmp\n",(proto==1)?"selected":"");
121 printf("<option value='6' %s>tcp\n",(proto==6)?"selected":"");
122 printf("<option value='17' %s>udp\n",(proto==17)?"selected":"");
123 printf("</select></TD>\n");
124 ip->ip_p=proto;
125
126 printf("<TD align='center'>checksum:<BR>automatic</TD></TR>\n");
127
128 t=ClientInfo->Post("ipsrc");
129 printf("<TR><TD align='center' colspan=4>src ip:<BR><input type=text size=15 maxlength=15 name=ipsrc value='%s'></TD></TR>\n",(t)?t:"");
130 if(strlen(t)){ip->ip_src.s_addr=inet_addr(t);} else {ip->ip_src.s_addr=0;}
131
132 t=ClientInfo->Post("ipdst");
133 printf("<TR><TD align='center' colspan=4>dst ip:<BR><input type=text size=15 maxlength=15 name=ipdst value='%s'></TD></TR></TABLE>\n",(t)?t:"");
134 if(strlen(t)){ip->ip_dst.s_addr=inet_addr(t);} else {ip->ip_dst.s_addr=0;}
135
136 printf("</TD><TD>\n");
137
138 if(proto==6) { // print tcp header input
139 printf("<TABLE border=1>\n");
140 printf("<TR><TD colspan=4 align='center' bgcolor='5555FF'>tcp header</TD></TR>\n");
141 t=ClientInfo->Post("tcpsrcport");
142 printf("<TR><TD colspan=2 align='center'>src port:<BR><input type=text size=5 maxlength=5 name=tcpsrcport value='%s'></TD>\n",(t)?t:"");
143 if(strlen(t)){tcp->th_sport=htons(atoi(t));}
144 t=ClientInfo->Post("tcpdstport");
145 printf("<TD colspan=2 align='center'>dst port:<BR><input type=text size=5 maxlength=5 name=tcpdstport value='%s'></TD></TR>\n",(t)?t:"");
146 if(strlen(t)){tcp->th_dport=htons(atoi(t)); }
147 t=ClientInfo->Post("tcpseq");
148 printf("<TR><TD colspan=4 align='center'>Seq number:<BR><input type=text size=10 maxlength=10 name=tcpseq value='%s'></TD></TR>\n",(t)?t:"");
149 if(strlen(t)){tcp->th_seq=htonl(strtoul(t,NULL,10));}
150 t=ClientInfo->Post("tcpack");
151 printf("<TR><TD colspan=4 align='center'>ack:<BR><input type=text size=10 maxlength=10 name=tcpack value='%s'></TD></TR>\n",(t)?t:"");
152 if(strlen(t)){tcp->th_ack=htonl(strtoul(t,NULL,10)); }else {tcp->th_ack=0;}
153
154 printf("<TR><TD align='center'><small><small>data offset:<BR>(computed)</small></small></TD>\n");
155 printf("<TD align='center'><small><small>reserved:<BR>(computed)</small></small></TD>\n");
156 printf("<TD align='center'>flags:<BR>\n");
157 printf("<TABLE border=0 cellspacing=0 cellpadding=0><TR>\n");
158 printf("<TD><small><small>URG </small></small></TD>\n");
159 printf("<TD><small><small>ACK </small></small></TD>\n");
160 printf("<TD><small><small>PSH </small></small></TD>\n");
161 printf("<TD><small><small>RST </small></small></TD>\n");
162 printf("<TD><small><small>SYN </small></small></TD>\n");
163 printf("<TD><small><small>FIN</small></small></TD></TR>\n");
164 t=ClientInfo->Post("tcpfURG");
165 if(strlen(t)){tcp->th_flags |= TH_URG;}else {tcp->th_flags &= ~TH_URG;}
166 t=ClientInfo->Post("tcpfACK");
167 if(strlen(t)){tcp->th_flags |= TH_ACK;}else {tcp->th_flags &= ~TH_ACK;}
168 t=ClientInfo->Post("tcpfPSH");
169 if(strlen(t)){tcp->th_flags |= TH_PUSH;}else {tcp->th_flags &= ~TH_PUSH;}
170 t=ClientInfo->Post("tcpfRST");
171 if(strlen(t)){tcp->th_flags |= TH_RST;}else {tcp->th_flags &= ~TH_RST;}
172 t=ClientInfo->Post("tcpfSYN");
173 if(strlen(t)){tcp->th_flags |= TH_SYN;}else {tcp->th_flags &= ~TH_SYN;}
174 t=ClientInfo->Post("tcpfFIN");
175 if(strlen(t)){tcp->th_flags |= TH_FIN;}else {tcp->th_flags &= ~TH_FIN;}
176 printf("<TD><input type=checkbox name=tcpfURG %s></TD>\n",((tcp->th_flags & TH_URG)==TH_URG)?"checked":"");
177 printf("<TD><input type=checkbox name=tcpfACK %s></TD>\n",((tcp->th_flags & TH_ACK)==TH_ACK)?"checked":"");
178 printf("<TD><input type=checkbox name=tcpfPSH %s></TD>\n",((tcp->th_flags & TH_PUSH)==TH_PUSH)?"checked":"");
179 printf("<TD><input type=checkbox name=tcpfRST %s></TD>\n",((tcp->th_flags & TH_RST)==TH_RST)?"checked":"");
180 printf("<TD><input type=checkbox name=tcpfSYN %s></TD>\n",((tcp->th_flags & TH_SYN)==TH_SYN)?"checked":"");
181 printf("<TD><input type=checkbox name=tcpfFIN %s></TD>\n",((tcp->th_flags & TH_FIN)==TH_FIN)?"checked":"");
182 printf("</TR></TABLE></TD>\n");
183 t=ClientInfo->Post("tcpwin");
184 printf("<TD align='center'>window:<BR><input type=text size=7 maxlength=7 name=tcpwin value='%s'></TD></TR>\n",(t)?t:"");
185 if(strlen(t)) {tcp->th_win=htons(atoi(t)); } else {tcp->th_win=htons(1500);}
186 printf("<TR><TD colspan=2 align='center'>checksum:<BR>automatic</TD>\n");
187 t=ClientInfo->Post("tcpurg");
188 printf("<TD colspan=2 align='center'>urgent:<BR><input type=text size=7 maxlength=7 name=tcpurg value='%s'></TD></TR>\n",(t)?t:"");
189 printf("<TR><TD align='center' colspan=4>Tcp data<BR><textarea name=data cols='30' rows='4'>%s</textarea></TD></TR>\n",ClientInfo->Post("data"));
190 if(strlen(t)) {tcp->th_urp=htons(atoi(t)); } else {tcp->th_urp=0;}
191 printf("</TABLE>\n");
192 printf("</TABLE>\n");
193 tcp->th_x2=0;
194 };
195 printf("</TD></TR></TABLE>\n");
196 t=ClientInfo->Post("n_packets");
197 printf("<input type=text size=4 maxlength=4 value='10' name=n_packets value='%s'>\n",(t)?t:"");
198 if(strlen(t)){n=atoi(t); }
199 printf("<input type=submit value='send packet' name=ipsend>\n");
200 t=ClientInfo->Post("data");
201 memcpy(buf+sizeof(*ip)+sizeof(*tcp),t,(strlen(t)>128)?128:strlen(t));
202
203 t=ClientInfo->Post("ipsend");
204 if(strlen(t)) {
205 s=socket(AF_INET,SOCK_RAW,IPPROTO_RAW);
206 to.sin_family=AF_INET;
207 to.sin_addr.s_addr=ip->ip_dst.s_addr;
208 to.sin_port=htons(tcp->th_dport);
209 ip->ip_sum=in_chksum((void *)&ip,sizeof(*ip));
210 tcp->th_sum=in_chksum((void *)&ip,sizeof(*ip)+sizeof(*tcp));
211 for(i=0;i<n;i++) {
212 sendto(s,&buf,128,0,(struct sockaddr *)&to,sizeof(to));
213 };
214 };
215 printf("<br><a href='http://libwebserver.sourceforge.net'><img src='/libwebserver.gif' border='0'></a><BR>\n");
216 printf("</body>\n");
217 printf("</HTML>\n");
218
219};
220
221int main() {
222 int pid;
223 struct web_server serverSSL;
224 web_server_useSSLcert(&serverSSL,"./foo-cert.pem"); // Must be here couse of initalization of openssl
225 while(!web_server_init(&serverSSL,PORTSSL,"packetmounter.log",WS_USESSL)) {
226 PORTSSL++;
227 };
228 printf("https://localhost:%d\n",PORTSSL);
229 web_server_addhandler(&serverSSL,"* /*",packetmounter,0);
230 while(1) {
231 // DO whatever u want
232 web_server_run(&serverSSL); // Process web_server w/ SSL
233 };
234 return 0;
235
236};
diff --git a/doc/functions.html b/doc/functions.html
new file mode 100644
index 00000000..e28329ca
--- /dev/null
+++ b/doc/functions.html
@@ -0,0 +1,355 @@
1<center><H3><font color='007700'>libwebserver Functions</font></H3></center><BR><BR>
2<font face='Verdana'>
3
4<A name=web_server_init><B><font color='000077'>web_server_init()</font></B><BR><BR>
5<B>NAME</B>
6<UL>web_server_init - Initialize webserver</UL>
7<B>SYNOPSIS</B>
8<UL>#include "web_server.h"<BR><BR>int web_server_init(struct web_server *<U>server</U>, int <U>port</U>, const char *<U>logfile</U>, int <U>flags</U>);</UL>
9<B>DESCRIPTION</B>
10<UL>The web_server_init() function initializes the server handler <U>server</U>, start a listen socket at port <U>port</U>, with the logfile <U>logfile</U> to produce the webserver log<BR> if WS_USEEXTCONF flag is used, the <U>logfile</U> will be the config file <BR>
11<U>flags</U> <BR>
12WS_USESSL for openssl connections (https support)<BR>
13WS_USEEXTCONF for using a external config file<BR>
14WS_LOCAL only accepts 127.0.0.1 (local) connections
15</UL>
16
17<B>RETURN VALUE</B>
18<UL>On success, 1 is returned, On error, 0 is returned</UL>
19<HR><BR>
20
21
22<A name=web_server_addhandler><B><font color='000077'>web_server_addhandler()</font></B><BR><BR>
23<B>NAME</B>
24<UL>web_server_addhandler - adds a request handler</UL>
25<B>SYNOPSIS</B>
26<UL>#include "web_server.h"<BR><BR>int web_server_addhandler(struct web_server *<U>server</U>, const char *<U>mstr</U>, void (*<U>func</U>)(), int <U>flags</U>);</UL>
27<B>DESCRIPTION</B>
28<UL>The web_server_addhandler() function adds a request handler <U>mstr</U> to the server handler <U>server</U> through the function <U>func</U>.<BR>
29<U>mstr</U> is a string containing expressions (as matching files) to match with the client request (GET /<B>blah.html</B>?id=1 HTTP/1.0, will be matched by <U>mstr</U>="* /blah.html")<BR>
30<U>flags:</U> <BR>
31WS_LOCAL - only local connections are handled<BR>
32WS_DYNVAR - treat dynamic variables on output (Atention: this disables "Content-range" and "Content-length" header, responding "501 not implemented")<BR>
33WS_USELEN - With this flag, library calculate the header "Content-length" and "Content-range" it self, useful for resuming, content-length can be miscalculated if the file added by (web_client_addfile) changes the size of contents, between calculating and output<BR>
34</UL>
35<B>RETURN VALUE</B>
36<UL>On success, 1 is returned, On error, 0 is returned</UL>
37<HR><BR>
38
39<A name=web_server_aliasdir><B><font color='000077'>web_server_aliasdir()</font></B><BR><BR>
40<B>NAME</B>
41<UL>web_server_aliasdir - Generates a directory list, and use file based server</UL>
42<B>SYNOPSIS</B>
43<UL>#include "web_server.h"<BR><BR>int web_server_aliasdir(struct web_server *<U>server</U>, const char *<U>alias</U>, char *<U>path</U>, int <U>flags</U>);</UL>
44<B>DESCRIPTION</B>
45<UL>The web_server_aliasdir() function adds an alias <U>alias</U> to the server handler <U>server</U> and use files from <U>path</U>.<BR>
46<U>flags:</U> <BR>
47WS_LOCAL - only local connections are handled<BR>
48WS_DYNVAR - treat dynamic variables on output (Atention: this disables "Content-range" and "Content-length" header, responding "501 not implemented")<BR>
49WS_USELEN - With this flag, library calculate the header "Content-length" and "Content-range" it self, useful for resuming, content-length can be miscalculated if the file added by (web_client_addfile) changes the size of contents, between calculating and output<BR>
50</UL>
51<B>RETURN VALUE</B>
52<UL>On success, 1 is returned, On error, 0 is returned</UL>
53<HR><BR>
54
55<A name=web_server_run><B><font color='000077'>web_server_run()</font></B><BR><BR>
56<B>NAME</B>
57<UL>web_server_run - run the server</UL>
58<B>SYNOPSIS</B>
59<UL>#include "web_server.h"<BR><BR>int web_server_run(struct web_server *<U>server</U>);</UL>
60<B>DESCRIPTION</B>
61<UL>The web_server_run() function processes requests to the server <U>server</U>. This function must be called from the main application loop (the functions doesn't loop it self)</UL>
62<B>RETURN VALUE</B>
63<UL>On success, greater than 0, is returned (2 if there wasn't client, 1 if some request was processed), On error, 0 is returned</UL>
64<HR><BR>
65
66<A name=web_server_getconf><B><font color='000077'>web_server_getconf()</font></B><BR><BR>
67<B>NAME</B>
68<UL>web_server_getconf - get data from config filer</UL>
69<B>SYNOPSIS</B>
70<UL>#include "web_server.h"<BR><BR>char *web_server_getconf(struct web_server *<U>server</U>,char *<U>topic</U>,char *<U>key</U>);</UL>
71<B>DESCRIPTION</B>
72<UL>The web_server_getconf() function allocates and return a string from config file related to <U>topic</U> and <U>key</U> (see <a href="/?help=functions#configfile">config file help</a>) This function must be called after the init of the var <U>server</U></UL>
73<B>RETURN VALUE</B>
74<UL>returns allocated string, (you should free after use) or null if nothing related to arguments found</UL>
75<HR><BR>
76
77<A name=web_server_useSSLcert><B><font color='000077'>web_server_useSSLcert()</font></B><BR><BR>
78<B>NAME</B>
79<UL>web_server_useSSLcert - use certificate</UL>
80<B>SYNOPSIS</B>
81<UL>#include "web_server.h"<BR><BR>void web_server_useSSLcert(struct web_server *<U>server</U>, const char *<U>file</U>);</UL>
82<B>DESCRIPTION</B>
83<UL>The web_server_useSSLcert() function tells server <U>server</U> to use certificate file <U>file</U> on ssl connections (initializated w/ flag WS_USESSL)</UL>
84<HR><BR>
85
86<A name=web_server_useMIMEfile><B><font color='000077'>web_server_useMIMEfile()</font></B><BR><BR>
87<B>NAME</B>
88<UL>web_server_useMIMEfile - use mime types file</UL>
89<B>SYNOPSIS</B>
90<UL>#include "web_server.h"<BR><BR>void web_server_useMIMEfile(struct web_server *<U>server</U>, const char *<U>file</U>);</UL>
91<B>DESCRIPTION</B>
92<UL>The web_server_useMIMEfile() function tells server <U>server</U> to use mimes type file <U>file</U> for determining mime type by extension used by function <a href="/?help=functions#web_client_contenttype">web_client_contenttype()</a></UL>
93<HR><BR>
94
95
96<A name=web_client_addstream><B><font color='000077'>web_client_addstream()</font></B><BR><BR>
97<B>NAME</B>
98<UL>web_client_addstream - add an output stream to the client struct on webserver</UL>
99<B>SYNOPSIS</B>
100<UL>#include "web_server.h"<BR><BR>int web_client_addstream(FILE *<U>stream</U>);</UL>
101<B>DESCRIPTION</B>
102<UL>The web_client_addstream() function adds the stream <U>stream</U> to the output stream list in the current client node</UL>
103 <B>NOTE</B>
104<UL>The web_client_addstream() function can <B>only</B> be called from functions called by gethandlers registered by <a href='/?help=functions#web_server_addhandler'>web_server_addhandler()</a>.</UL>
105<UL>The web_client_addstream() function is obsolete and no longer in use on 0.3.4 versions, use web_client_addfile instead</ul>
106<B>RETURN VALUE</B>
107<UL>On success, 1 is returned, On error, 0 is returned</UL>
108<HR><BR>
109
110<A name=web_client_addfile><B><font color='000077'>web_client_addfile()</font></B><BR><BR>
111<B>NAME</B>
112<UL>web_client_addfile - add a file to the output stream of the client struct on the webserver</UL>
113<B>SYNOPSIS</B>
114<UL>#include "web_server.h"<BR><BR>int web_client_addfile(const char *<U>file</U>);</UL>
115<B>DESCRIPTION</B>
116<UL>The web_client_addfile() function opens the file <U>file</U> and adds it as stream to the output stream list in the current client node</UL>
117 <B>NOTE</B>
118<UL>The web_client_addfile() function can be called <B>only</B> from functions called by gethandlers registered via <a href='/?help=functions#web_server_addhandler'>web_server_addhandler()</a>.</UL>
119<B>RETURN VALUE</B>
120<UL>On Success, 1 is returned, On error, 0 is returned</UL>
121<HR><BR>
122
123<A name=web_client_gifoutput><B><font color='000077'>web_client_gifoutput()</font></B><BR><BR>
124<B>NAME</B>
125<UL>web_client_gifoutput - export data as gif</UL>
126<B>SYNOPSIS</B>
127<UL>#include "web_server.h"<BR><BR>int web_client_gifoutput(char *<U>data</U>,int <U>w</U>,int <U>h</u>);</UL>
128<B>DESCRIPTION</B>
129<UL>The web_client_gifoutput() function prints to stdout a gif header (with width <U>w</U> and height <U>h</U>) and the image pointed by <U>data</U>.<BR>
130The allocated memory <U>data</U> points to mustn't be smaller than <U>w</U>*<U>h</U>.<BR>
131The gif palette is described by <a href='/?help=functions#web_client_gifsetpalette'>web_client_gifsetpalette</a>
132</UL>
133<B>NOTE</B>
134<UL>The web_client_gifoutput() function can be called <B>only</B> from functions called by gethandlers registered via <a href='/?help=functions#web_server_addhandler'>web_server_addhandler()</a>.</UL>
135<B>RETURN VALUE</B>
136<UL>On Success, 0 is returned, On error, non zero is returned.</UL>
137<HR><BR>
138
139<A name=web_client_gifsetpalette><B><font color='000077'>web_client_gifsetpalette()</font></B><BR><BR>
140<B>NAME</B>
141<UL>web_client_gifsetpalette - Setup the gif palette</UL>
142<B>SYNOPSIS</B>
143<UL>#include "web_server.h"<BR><BR>void web_client_gifsetpalette(char *<U>file</U>);</UL>
144<B>DESCRIPTION</B>
145<UL>The web_client_gifsetpalette() function loads raw palette (.act) from <U>file</U> or if <U>file</U> is "EGA" then this function setups the palette to EGA mode<BR>
146</UL>
147<HR><BR>
148
149
150<A name=web_client_setcookie><B><font color='000077'>web_client_setcookie()</font></B><BR><BR>
151<B>NAME</B>
152<UL>web_client_setcookie - set a cookie</UL>
153<B>SYNOPSIS</B>
154<UL>#include "web_server.h"<BR><BR>void web_client_setcookie(char *<U>key</U>, char *<U>value</U>, char *<U>timeoffset</U>, char *<U>path</U>,char *<U>domain</U>,int <U>secure</U>);</UL>
155<B>DESCRIPTION</B>
156<UL>The web_client_setcookie() function sets a cookie on client browser with key <U>key</U>, value <U>value</U> and expires at <U>timeoffset</U>.<BR>
157timeoffset format is one like <U>sign</U>, <U>number offset</U> and <U>directive</U> <small> (i.e +10m, 10 months)</small>
158 <UL><U>sign</U> is on like '-' or '+'</UL>
159 <UL><U>number offset</U> is like +<U>5</U>M means expires at next 5 minutes </UL>
160 <UL><U>directive</U> is:
161 <UL>S - seconds</UL>
162 <UL>M - minutes</UL>
163 <UL>H - hours</UL>
164 <UL>d - days</UL>
165 <UL>m - months</UL>
166 <UL>y - years</UL>
167 </UL>
168 path - Subset of URLs in a domain for which the cookie is valid
169 (If the path is not specified (path == NULL), it as assumed to be
170 the same path as the document being described by the header which
171 contains the cookie.)<BR>
172 domain = Domain the cookie is valid for
173 (If the domain is not set (domain == NULL), the default value of
174 domain is the host name of the server which generated the cookie
175 response.)<BR>
176 secure = If a cookie is marked secure (secure == 1), it will only be
177 transmitted if the communications channel with the host is a
178 secure one. Currently this means that secure cookies will only be
179 sent to HTTPS (HTTP over SSL) servers.
180 (If secure is not specified (secure == 0), a cookie is considered
181 safe to be sent in the clear over unsecured channels. )<BR>
182
183</UL>
184<B>NOTE</B>
185<UL> The web_client_setcookie() function should be called <B>only</B> from functions called by gethandlers registered via <a href='/?help=functions#web_server_addhandler'>web_server_addhandler()</a><BR></UL>
186<HR><BR>
187
188
189<A name=web_client_deletecookie><B><font color='000077'>web_client_deletecookie()</font></B><BR><BR>
190<B>NAME</B>
191<UL>web_client_deletecookie - delete a cookie</UL>
192<B>SYNOPSIS</B>
193<UL>#include "web_server.h"<BR><BR>void web_client_deletecookie(char *<U>key</U>);</UL>
194<B>DESCRIPTION</B>
195<UL>The web_client_deletecookie() function delete a cookie on client browser with key <U>key</U><BR>
196
197</UL>
198<B>NOTE</B>
199<UL> The web_client_deletecookie() function should be called <B>only</B> from functions called by gethandlers registered via <a href='/?help=functions#web_server_addhandler'>web_server_addhandler()</a><BR></UL>
200<HR><BR>
201
202<A name=web_client_setvar><B><font color='000077'>web_client_setvar()</font></B><BR><BR>
203<B>NAME</B>
204<UL>web_client_setvar - sets a variable</UL>
205<B>SYNOPSIS</B>
206<UL>#include "web_server.h"<BR><BR>int web_client_setvar(char *<U>name</U>, char *<U>value</U>);</UL>
207<B>DESCRIPTION</B>
208<UL>The web_client_setvar() function sets an variable named <U>name</U> with value <U>value</U> in a connection, to be used in output (only available if WS_DYNVAR flag used)<BR>
209 web_client_setvar("bgc","#ff00dd");<BR>
210 printf("&lt;BODY bgcolor='$bgc;'&gt;"); - will exchange the string $bgc; to #ff00dd on output</UL>
211
212<B>NOTE</B>
213<UL>The web_client_setvar() function <B>should</B> be called <B>only</B> from functions called by gethandlers registered via <a href='/?help=functions#web_server_addhandler'>web_server_addhandler()</a>.</UL>
214<HR><BR>
215
216<A name=web_client_getvar><B><font color='000077'>web_client_getvar()</font></B><BR><BR>
217<B>NAME</B>
218<UL>web_client_getvar - gets a variable value</UL>
219<B>SYNOPSIS</B>
220<UL>#include "web_server.h"<BR><BR>int web_client_getvar(char *<U>name</U>);</UL>
221<B>DESCRIPTION</B>
222<UL>The web_client_getvar() function gets the value of variable <U>name</U>, (see also <a href=/?help=functions#web_client_setvar>web_client_setvar()</a>)<BR></UL>
223<B>NOTE</B>
224<UL>The web_client_getvar() function <B>should</B> be called <B>only</B> from functions called by gethandlers registered via <a href='/?help=functions#web_server_addhandler'>web_server_addhandler()</a>.</UL>
225<HR><BR>
226
227<A name=web_client_delvar><B><font color='000077'>web_client_delvar()</font></B><BR><BR>
228<B>NAME</B>
229<UL>web_client_delvar - delete a variable</UL>
230<B>SYNOPSIS</B>
231<UL>#include "web_server.h"<BR><BR>int web_client_delvar(char *<U>name</U>);</UL>
232<B>DESCRIPTION</B>
233<UL>The web_client_delvar() function deletes a variable with name <U>name</U><BR></UL>
234<B>NOTE</B>
235<UL>The web_client_delvar() function <B>should</B> be called <B>only</B> from functions called by gethandlers registered via <a href='/?help=functions#web_server_addhandler'>web_server_addhandler()</a>.</UL>
236<HR><BR>
237
238
239<A name=web_client_HTTPdirective><B><font color='000077'>web_client_HTTPdirective()</font></B><BR><BR>
240<B>NAME</B>
241<UL>web_client_HTTPdirective - Change the HTTP header status</UL>
242<B>SYNOPSIS</B>
243<UL>#include "web_server.h"<BR><BR>void web_client_HTTPdirective(char *<U>directive</U>);</UL>
244<B>DESCRIPTION</B>
245<UL>The web_client_HTTPdirective() function changes the HTTP header status (i.e. "HTTP/1.1 200 OK") to the string <U>directive</U><BR>
246<small><i>useful for "HTTP/1.1 401 Authorization Required" (to require a password), redirection or similar actions on the client side</i></small>.</UL>
247 <B>NOTE</B>
248<UL>The web_client_HTTPdirective() function can be called <B>only</B> from functions called by gethandlers registered via <a href='/?help=functions#web_server_addhandler'>web_server_addhandler()</a>.</UL>
249<HR><BR>
250
251<A name=web_client_contenttype><B><font color='000077'>web_client_contenttype()</font></B><BR><BR>
252<B>NAME</B>
253<UL>web_client_contenttype - prints to stdout the header "Content-type: */*"</UL>
254<B>SYNOPSIS</B>
255<UL>#include "web_server.h"<BR><BR>void web_client_contenttype(char *<U>extension</U>);</UL>
256<B>DESCRIPTION</B>
257<UL>The web_client_contenttype() prints to stdout the header "Content-type: */*", where '*/*' is determined by <U>extension</U> (i.e. "html" based on mimefile produces "Content-type: text/html\r\n\r\n" and "jpg" produces "Content-type: image/jpeg\r\n\r\n")<BR>
258<small>this function is used on <a href="/?help=functions#web_server_aliasdir">web_server_aliasdir()</a></small></UL>
259 <B>NOTE</B>
260<UL>This function uses mime types loaded at <a href="/?help=functions#web_server_useMIMEfile">web_server_useMIMEfile()</a> else it will print only "Content-type: text/plain\r\n\r\n"</UL>
261<HR><BR>
262
263<A name=web_log><B><font color='000077'>web_log()</font></B><BR><BR>
264<B>NAME</B>
265<UL>web_log - write to logfile</UL>
266<B>SYNOPSIS</B>
267<UL>#include "web_server.h"<BR><BR>void web_log(const char *<U>format</U>,<U>...</U>);</UL>
268<B>DESCRIPTION</B>
269<UL>The web_log() is similar to printf, but writes to a logfile (specified in <a href=/?help=functions#web_server_init>web_server_init()</a>). Just as printf, it doesn't add a newline at the end.</UL>
270 <B>NOTE</B>
271<UL>The web_log() function <B>should</B> be called <B>only</B> from functions called by gethandlers registered via <a href='/?help=functions#web_server_addhandler'>web_server_addhandler()</a>.</UL>
272<HR><BR>
273
274<A name=ClientInfo><B><font color='000077'>ClientInfo</font></B><BR><BR>
275<B>NAME</B>
276<UL>ClientInfo - a struct to control client Header</UL>
277<B>SYNOPSIS</B>
278<UL> Declared in web_server.h <BR><BR>
279extern struct ClientInfo {<BR>
280<UL>
281 int <U>outfd</U>;<BR>
282 char *<U>inetname</U>;<BR>
283 char *<U>request</U>;<BR>
284 char *<U>method</U>;<BR>
285 char *<U>user</U>;<BR>
286 char *<U>pass</U>;<BR>
287 char *(*<U>Header</U>)(char *handle);<BR>
288 char *(*<U>Query</U>)(char *handle);<BR>
289 char *(*<U>Post</U>)(char *handle);<BR>
290 char *(*<U>Cookie</U>)(char *handle);<BR>
291 char *(*<U>Conf</U>)(char *handle);<BR>
292 struct _MultiPart (*<U>MultiPart</U>)(char *handle);<BR>
293 void *__pad[5];<BR>
294</UL>
295} *<U>ClientInfo</U>;
296</UL>
297<B>DESCRIPTION</B>
298<UL>
299<B>ClientInfo-&gt;<U>outfd</U></B> <UL>is the filedescriptor of the current output stream (useful for cgi handlers and friends).</UL><BR>
300<B>ClientInfo-&gt;<U>inetname</U></B> <UL>a string to inetname (i.e. "127.0.0.1")</UL> <BR>
301<B>ClientInfo-&gt;<U>request</U></B> <UL>is the requested 'file' (i.e. for "GET /index.html HTTP/1.0\r\n" the ClientInfo-&gt;request is "/index.html")</UL><BR>
302<B>ClientInfo-&gt;<U>method</U></B> <UL>is the request method ("GET" or "POST" etc..)</UL><BR>
303<B>ClientInfo-&gt;<U>user</U></B> <UL>AuthRealm username</UL><BR>
304<B>ClientInfo-&gt;<U>pass</U></B> <UL>AuthRealm password</UL><BR>
305<B>ClientInfo-&gt;<U>Header(</U>char *<U>handle</U>)</B> <UL>Function to parse the header, and returns Header information (i.e. for "Host: http://127.0.0.1:81" the result of ClientInfo-&gt;Header("Host") is "http://127.0.0.1:81") if argument <U>handle</U> is NULL then this function returns whole Header from client</UL><BR>
306<B>ClientInfo-&gt;<U>Query(</U>char *<U>handle</U>)</B> <UL>A function that returns the query value from the browser (i.e for the request "http://somehost.net/req.html?id=5&f=1", ClientInfo-&gt;Query("id") is "5".if argument <U>handle</U> is NULL then this function returns whole Query string from client<BR>if the handle have the char # first (like "#handle") it returns the number of variables (usefull for checkboxes and etc...) Check <a href='/?help=examples#checkbox'>checkbox example</a></UL><BR>
307<B>ClientInfo-&gt;<U>Post(</U>char *<U>handle</U>)</B> <UL>A function that returns the Post data from the forms with method 'POST'. <U>handle</U> is the name of some &lt;input&gt; tag.if argument <U>handle</U> is NULL then this function returns whole Post data from client<BR>if the handle have the char # first (like "#handle") it returns the number of variables (usefull for checkboxes and etc...) Check <a href='/?help=examples#checkbox'>checkbox example</a></UL><BR>
308<B>ClientInfo-&gt;<U>Cookie(</U>char *<U>handle</U>)</B> <UL>A function that returns the Cookie data from browser. if argument <U>handle</U> is NULL then this function returns whole Cookiestring from client</UL><BR>
309<B>ClientInfo-&gt;<U>Conf(</U>char * <U>topic</U>,char *<U>handle</U>)</B> <UL>A function that returns an value from a <U>key</U> in <U>topic</U> in the config file if used</UL><BR>
310<B>ClientInfo-&gt;<U>MultiPart(</U>char *<U>handle</U>)</B> <UL>A function that returns a data structure from the forms with method 'POST' and enctype='multipart/form-data' (useful for uploading files). <U>handle</U> is the name of some &lt;input&gt; tag.<BR><BR>
311the structure is<BR>
312struct _MultiPart {
313<UL>
314char *<U>id</u>;<BR>
315char *<U>data</U>;<BR>
316unsigned int <U>size</U>;<BR>
317char *<U>filename</U>;<BR>
318void *<U>pad</U>;<BR>
319</UL>
320};<BR>
321to be used as ClientInfo-&gt;<U>MultiPart</U>("file1").<U>data</U>; ClientInfo-&gt;<U>MultiPart</U>("file1").<U>size</U>; ClientInfo-&gt;<U>MultiPart</U>("file1").<U>filename</U>;
322</UL>
323
324</UL>
325<HR><BR>
326<A name=configfile><B><font color='000077'>The config file</font></B><BR><BR>
327<UL>the config file is used as<BR><BR>
328<PRE>
329[TOPIC]
330KEY=VALUE
331
332libwebserver configurations must be in topic LIBWEBSERVER as:
333[LIBWEBSERVER]
334LOG=help.log
335PORT=80
336USESSL=1
337CERTFILE=foocert.pm
338MIMEFILE=/etc/mime.types
339LOCAL=1
340
341LOG -> the log file
342PORT -> the listen port that will be used for tcp connections
343
344USESSL -> the ssl flag if you want to use openssl for secure server (https)
345CERTFILE -> the file that contains certificate for ssl connections
346MIMEFILE -> the file that contains mime.types similer to apache mimefile
347LOCAL -> only accept connections from 127.0.0.1
348
349</PRE>
350</UL>
351
352</font>
353
354
355
diff --git a/doc/info.html b/doc/info.html
new file mode 100644
index 00000000..05883540
--- /dev/null
+++ b/doc/info.html
@@ -0,0 +1,25 @@
1<center><H3><font color='007700'>libwebserver Info</font></H3></center><BR><BR>
2<A name=what><B><font color='000077'>What's libwebserver for?</font></B><BR>
3<UL>This lib is intended to add webserver functionality to programs instead of using an external webserver.<BR>
4 Two examples for embedded webservers that i know of are simple (shoutcast (i guess), and webTV (teletext as a webpage (from pinnacle)); and many others probably do the same.
5</UL>
6<HR>
7<A name=who><B><font color='000077'>Who's supposed to use libwebserver?</font></B>
8<UL>This is mainly developed for developers to make it easier to write a web interface to their software, (note a webbrowser is commonly available in most operating
9 systems) so it is like a portable "terminal" that can be accessed from any computer (with a browser of course...).</UL>
10<HR>
11<A name=when><B><font color='000077'>When am i supposed to use libwebserver?</font></B>
12<UL>For example, imagine that you are developing a daemon and want to check stats or re-configure at run-time;
13 with this library you can add a listen port for runtime, and connect with whatever browser (via HTML interface)
14 without dependencies of an external webserver.<BR>
15 You can even do a webserver (of course), just use your imagination.<BR>
16 Another quite simple example, a sound recorder (using only local connections for security reasons) uses a web interface to control
17 /dev/dsp reading/writing (via HTML interface).
18 there are many other things you can do ...</UL>
19
20<HR>
21<A name=server_scripts><B><font color='000077'>Is there support for server scripts such as .php .cgi .asp?</font></B>
22<UL> Well, this library only provides web server functions that make a server running, server scripts can be supported if you want to do it:
23 you can develop a handler for type ".something" or whatever, this package provides a .cgi handler as an example, (use at your own risk or make it better).</UL>
24
25
diff --git a/doc/security.html b/doc/security.html
new file mode 100644
index 00000000..cdcc2d79
--- /dev/null
+++ b/doc/security.html
@@ -0,0 +1,67 @@
1<center><H3><font color='007700'>libwebserver Security</font></H3></center><BR><BR>
2
3<A name=what><B><font color='000077'>Is it safe to use?</font></B><BR>
4<UL>Well, I can't promise that it's a secure software since that not only depends on the software,
5 but all i can say is that wasn't found any security bug yet, this was developed intended to be secure,
6 you can use openssl (encrypted streams) to protect information that passes from webserver(lib) to client</UL>
7
8<A name=certificate><B><font color='000077'>How do I create my own certificate?</font></B><BR>
9<UL>You can either buy one from one of the big vendors (see your browser's stored certificates
10 for their addresses) or self-sign a self-created one. The upside of the bought
11 certificates is, that the webbrowser doesn't ask if the user wants to
12 accept that certificate, but instead checks with the certification authority
13 you bought your certificate from.<br>
14 The downside is that it costs quite a lot of money.<br>
15 To create your own certificate use openssl like that:
16 <ul><li>create a key and request:<br>
17 <pre><b>openssl req -new > foo-cert.csr</b></pre><br>
18 As "Common Name" you have to type in the name part of
19 your URL, i.e. if your web site will be
20 "https://www.libwebserver.rules:443/" the Common Name is
21 "www.libwebserver.rules".
22 <li> remove the passphrase from the key:<br>
23 <pre><b>openssl rsa -in privkey.pem -out foo-cert.key</b></pre><br>
24 <li>convert request into a signed certificate:<br>
25 <pre><b>openssl x509 -in foo-cert.csr -out foo-cert.cert -req -signkey foo-cert.key -days 356</b></pre><br>
26 <li>create .pem file:<br>
27 <pre><b>cat foo-cert.cert foo-cert.key >foo-cert.pem</b></pre><br>
28 </ul>
29</ul>
30
31
32<A name=tips><B><font size=4 color='770077'>Security tips</font></B><BR><HR>
33
34<A name=racecondition><B><font color='000077'>Avoid race condition problems</font></B><BR>
35<UL>
36 <B> What is race condition?</B>
37 <UL>A race condition occurs when two or more operations occur in an
38 undefined manner (McKusick et al. 1996). Specifically in file
39 system races the attacker attempts to change the state of the
40 file system in between two file system operations on the part
41 of the program.</UL><BR>
42 <B> How the lib determine temporary file name?</B>
43 <UL>
44 <li>generate file name (note: keep generating until it doesn't exists)<BR></li>
45 <li>check if file exists<BR>
46 -<small>attacker can create the file now, if he knows the right filename</small><BR></li>
47 <li>check if symlink exists<BR>
48 -<small>attacker can create the symlink now, if he knows the right filename</small><BR></li>
49 <li>create the file and redirect stdout to it <BR>
50 -<small>attacker can open the file and write to it</small><BR></li>
51 <li>places a lock into file (note: not in win98)<BR> </li>
52 <li>users operations, write, flush, read<BR></li>
53 <li>unlink the filename from the OS<BR></li>
54 </UL><BR>
55
56
57 libwebserver uses temporary filenames to hold and process data before send it to client, it uses the ambient variables to
58 determine temporary directory by following order "$TEMP,$TMP,$TMPDIR and the stdio.h P_tmpdir", libwebserver have several checks
59 and it locks file for avoid attackers from messing with temporary files, meanwhile is safely to change the tempdir (setting the ambient variable)
60 to an directory that is not writable for everyone and writable to lib (setenv("TEMP","/safedir"); you can do it before the web_server_run function
61
62
63
64</UL>
65
66
67
diff --git a/include/Makefile.am b/include/Makefile.am
new file mode 100644
index 00000000..040efa45
--- /dev/null
+++ b/include/Makefile.am
@@ -0,0 +1,7 @@
1SUBDIRS = .
2
3webserverincludedir = $(includedir)/GNUnet
4
5webserverinclude_HEADERS = \
6 webserver_gnunet.h
7
diff --git a/include/webserver_gnunet.h b/include/webserver_gnunet.h
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/include/webserver_gnunet.h
diff --git a/ltmain.sh b/ltmain.sh
new file mode 100755
index 00000000..c715b594
--- /dev/null
+++ b/ltmain.sh
@@ -0,0 +1,6871 @@
1# ltmain.sh - Provide generalized library-building support services.
2# NOTE: Changing this file will not affect anything until you rerun configure.
3#
4# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
5# Free Software Foundation, Inc.
6# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7#
8# This program is free software; you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation; either version 2 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful, but
14# WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16# General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program; if not, write to the Free Software
20# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21#
22# As a special exception to the GNU General Public License, if you
23# distribute this file as part of a program that contains a
24# configuration script generated by Autoconf, you may include it under
25# the same distribution terms that you use for the rest of that program.
26
27basename="s,^.*/,,g"
28
29# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
30# is ksh but when the shell is invoked as "sh" and the current value of
31# the _XPG environment variable is not equal to 1 (one), the special
32# positional parameter $0, within a function call, is the name of the
33# function.
34progpath="$0"
35
36# The name of this program:
37progname=`echo "$progpath" | $SED $basename`
38modename="$progname"
39
40# Global variables:
41EXIT_SUCCESS=0
42EXIT_FAILURE=1
43
44PROGRAM=ltmain.sh
45PACKAGE=libtool
46VERSION="1.5.22 Debian 1.5.22-4"
47TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
48
49# See if we are running on zsh, and set the options which allow our
50# commands through without removal of \ escapes.
51if test -n "${ZSH_VERSION+set}" ; then
52 setopt NO_GLOB_SUBST
53fi
54
55# Check that we have a working $echo.
56if test "X$1" = X--no-reexec; then
57 # Discard the --no-reexec flag, and continue.
58 shift
59elif test "X$1" = X--fallback-echo; then
60 # Avoid inline document here, it may be left over
61 :
62elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
63 # Yippee, $echo works!
64 :
65else
66 # Restart under the correct shell, and then maybe $echo will work.
67 exec $SHELL "$progpath" --no-reexec ${1+"$@"}
68fi
69
70if test "X$1" = X--fallback-echo; then
71 # used as fallback echo
72 shift
73 cat <<EOF
74$*
75EOF
76 exit $EXIT_SUCCESS
77fi
78
79default_mode=
80help="Try \`$progname --help' for more information."
81magic="%%%MAGIC variable%%%"
82mkdir="mkdir"
83mv="mv -f"
84rm="rm -f"
85
86# Sed substitution that helps us do robust quoting. It backslashifies
87# metacharacters that are still active within double-quoted strings.
88Xsed="${SED}"' -e 1s/^X//'
89sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
90# test EBCDIC or ASCII
91case `echo X|tr X '\101'` in
92 A) # ASCII based system
93 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
94 SP2NL='tr \040 \012'
95 NL2SP='tr \015\012 \040\040'
96 ;;
97 *) # EBCDIC based system
98 SP2NL='tr \100 \n'
99 NL2SP='tr \r\n \100\100'
100 ;;
101esac
102
103# NLS nuisances.
104# Only set LANG and LC_ALL to C if already set.
105# These must not be set unconditionally because not all systems understand
106# e.g. LANG=C (notably SCO).
107# We save the old values to restore during execute mode.
108if test "${LC_ALL+set}" = set; then
109 save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
110fi
111if test "${LANG+set}" = set; then
112 save_LANG="$LANG"; LANG=C; export LANG
113fi
114
115# Make sure IFS has a sensible default
116lt_nl='
117'
118IFS=" $lt_nl"
119
120if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
121 $echo "$modename: not configured to build any kind of library" 1>&2
122 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
123 exit $EXIT_FAILURE
124fi
125
126# Global variables.
127mode=$default_mode
128nonopt=
129prev=
130prevopt=
131run=
132show="$echo"
133show_help=
134execute_dlfiles=
135duplicate_deps=no
136preserve_args=
137lo2o="s/\\.lo\$/.${objext}/"
138o2lo="s/\\.${objext}\$/.lo/"
139
140#####################################
141# Shell function definitions:
142# This seems to be the best place for them
143
144# func_mktempdir [string]
145# Make a temporary directory that won't clash with other running
146# libtool processes, and avoids race conditions if possible. If
147# given, STRING is the basename for that directory.
148func_mktempdir ()
149{
150 my_template="${TMPDIR-/tmp}/${1-$progname}"
151
152 if test "$run" = ":"; then
153 # Return a directory name, but don't create it in dry-run mode
154 my_tmpdir="${my_template}-$$"
155 else
156
157 # If mktemp works, use that first and foremost
158 my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
159
160 if test ! -d "$my_tmpdir"; then
161 # Failing that, at least try and use $RANDOM to avoid a race
162 my_tmpdir="${my_template}-${RANDOM-0}$$"
163
164 save_mktempdir_umask=`umask`
165 umask 0077
166 $mkdir "$my_tmpdir"
167 umask $save_mktempdir_umask
168 fi
169
170 # If we're not in dry-run mode, bomb out on failure
171 test -d "$my_tmpdir" || {
172 $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
173 exit $EXIT_FAILURE
174 }
175 fi
176
177 $echo "X$my_tmpdir" | $Xsed
178}
179
180
181# func_win32_libid arg
182# return the library type of file 'arg'
183#
184# Need a lot of goo to handle *both* DLLs and import libs
185# Has to be a shell function in order to 'eat' the argument
186# that is supplied when $file_magic_command is called.
187func_win32_libid ()
188{
189 win32_libid_type="unknown"
190 win32_fileres=`file -L $1 2>/dev/null`
191 case $win32_fileres in
192 *ar\ archive\ import\ library*) # definitely import
193 win32_libid_type="x86 archive import"
194 ;;
195 *ar\ archive*) # could be an import, or static
196 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
197 $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
198 win32_nmres=`eval $NM -f posix -A $1 | \
199 $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
200 case $win32_nmres in
201 import*) win32_libid_type="x86 archive import";;
202 *) win32_libid_type="x86 archive static";;
203 esac
204 fi
205 ;;
206 *DLL*)
207 win32_libid_type="x86 DLL"
208 ;;
209 *executable*) # but shell scripts are "executable" too...
210 case $win32_fileres in
211 *MS\ Windows\ PE\ Intel*)
212 win32_libid_type="x86 DLL"
213 ;;
214 esac
215 ;;
216 esac
217 $echo $win32_libid_type
218}
219
220
221# func_infer_tag arg
222# Infer tagged configuration to use if any are available and
223# if one wasn't chosen via the "--tag" command line option.
224# Only attempt this if the compiler in the base compile
225# command doesn't match the default compiler.
226# arg is usually of the form 'gcc ...'
227func_infer_tag ()
228{
229 if test -n "$available_tags" && test -z "$tagname"; then
230 CC_quoted=
231 for arg in $CC; do
232 case $arg in
233 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
234 arg="\"$arg\""
235 ;;
236 esac
237 CC_quoted="$CC_quoted $arg"
238 done
239 case $@ in
240 # Blanks in the command may have been stripped by the calling shell,
241 # but not from the CC environment variable when configure was run.
242 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
243 # Blanks at the start of $base_compile will cause this to fail
244 # if we don't check for them as well.
245 *)
246 for z in $available_tags; do
247 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
248 # Evaluate the configuration.
249 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
250 CC_quoted=
251 for arg in $CC; do
252 # Double-quote args containing other shell metacharacters.
253 case $arg in
254 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
255 arg="\"$arg\""
256 ;;
257 esac
258 CC_quoted="$CC_quoted $arg"
259 done
260 case "$@ " in
261 " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
262 # The compiler in the base compile command matches
263 # the one in the tagged configuration.
264 # Assume this is the tagged configuration we want.
265 tagname=$z
266 break
267 ;;
268 esac
269 fi
270 done
271 # If $tagname still isn't set, then no tagged configuration
272 # was found and let the user know that the "--tag" command
273 # line option must be used.
274 if test -z "$tagname"; then
275 $echo "$modename: unable to infer tagged configuration"
276 $echo "$modename: specify a tag with \`--tag'" 1>&2
277 exit $EXIT_FAILURE
278# else
279# $echo "$modename: using $tagname tagged configuration"
280 fi
281 ;;
282 esac
283 fi
284}
285
286
287# func_extract_an_archive dir oldlib
288func_extract_an_archive ()
289{
290 f_ex_an_ar_dir="$1"; shift
291 f_ex_an_ar_oldlib="$1"
292
293 $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
294 $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
295 if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
296 :
297 else
298 $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
299 exit $EXIT_FAILURE
300 fi
301}
302
303# func_extract_archives gentop oldlib ...
304func_extract_archives ()
305{
306 my_gentop="$1"; shift
307 my_oldlibs=${1+"$@"}
308 my_oldobjs=""
309 my_xlib=""
310 my_xabs=""
311 my_xdir=""
312 my_status=""
313
314 $show "${rm}r $my_gentop"
315 $run ${rm}r "$my_gentop"
316 $show "$mkdir $my_gentop"
317 $run $mkdir "$my_gentop"
318 my_status=$?
319 if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
320 exit $my_status
321 fi
322
323 for my_xlib in $my_oldlibs; do
324 # Extract the objects.
325 case $my_xlib in
326 [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
327 *) my_xabs=`pwd`"/$my_xlib" ;;
328 esac
329 my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
330 my_xdir="$my_gentop/$my_xlib"
331
332 $show "${rm}r $my_xdir"
333 $run ${rm}r "$my_xdir"
334 $show "$mkdir $my_xdir"
335 $run $mkdir "$my_xdir"
336 exit_status=$?
337 if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
338 exit $exit_status
339 fi
340 case $host in
341 *-darwin*)
342 $show "Extracting $my_xabs"
343 # Do not bother doing anything if just a dry run
344 if test -z "$run"; then
345 darwin_orig_dir=`pwd`
346 cd $my_xdir || exit $?
347 darwin_archive=$my_xabs
348 darwin_curdir=`pwd`
349 darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
350 darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
351 if test -n "$darwin_arches"; then
352 darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
353 darwin_arch=
354 $show "$darwin_base_archive has multiple architectures $darwin_arches"
355 for darwin_arch in $darwin_arches ; do
356 mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
357 lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
358 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
359 func_extract_an_archive "`pwd`" "${darwin_base_archive}"
360 cd "$darwin_curdir"
361 $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
362 done # $darwin_arches
363 ## Okay now we have a bunch of thin objects, gotta fatten them up :)
364 darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
365 darwin_file=
366 darwin_files=
367 for darwin_file in $darwin_filelist; do
368 darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
369 lipo -create -output "$darwin_file" $darwin_files
370 done # $darwin_filelist
371 ${rm}r unfat-$$
372 cd "$darwin_orig_dir"
373 else
374 cd "$darwin_orig_dir"
375 func_extract_an_archive "$my_xdir" "$my_xabs"
376 fi # $darwin_arches
377 fi # $run
378 ;;
379 *)
380 func_extract_an_archive "$my_xdir" "$my_xabs"
381 ;;
382 esac
383 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
384 done
385 func_extract_archives_result="$my_oldobjs"
386}
387# End of Shell function definitions
388#####################################
389
390# Darwin sucks
391eval std_shrext=\"$shrext_cmds\"
392
393disable_libs=no
394
395# Parse our command line options once, thoroughly.
396while test "$#" -gt 0
397do
398 arg="$1"
399 shift
400
401 case $arg in
402 -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
403 *) optarg= ;;
404 esac
405
406 # If the previous option needs an argument, assign it.
407 if test -n "$prev"; then
408 case $prev in
409 execute_dlfiles)
410 execute_dlfiles="$execute_dlfiles $arg"
411 ;;
412 tag)
413 tagname="$arg"
414 preserve_args="${preserve_args}=$arg"
415
416 # Check whether tagname contains only valid characters
417 case $tagname in
418 *[!-_A-Za-z0-9,/]*)
419 $echo "$progname: invalid tag name: $tagname" 1>&2
420 exit $EXIT_FAILURE
421 ;;
422 esac
423
424 case $tagname in
425 CC)
426 # Don't test for the "default" C tag, as we know, it's there, but
427 # not specially marked.
428 ;;
429 *)
430 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
431 taglist="$taglist $tagname"
432 # Evaluate the configuration.
433 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
434 else
435 $echo "$progname: ignoring unknown tag $tagname" 1>&2
436 fi
437 ;;
438 esac
439 ;;
440 *)
441 eval "$prev=\$arg"
442 ;;
443 esac
444
445 prev=
446 prevopt=
447 continue
448 fi
449
450 # Have we seen a non-optional argument yet?
451 case $arg in
452 --help)
453 show_help=yes
454 ;;
455
456 --version)
457 $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
458 $echo
459 $echo "Copyright (C) 2005 Free Software Foundation, Inc."
460 $echo "This is free software; see the source for copying conditions. There is NO"
461 $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
462 exit $?
463 ;;
464
465 --config)
466 ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
467 # Now print the configurations for the tags.
468 for tagname in $taglist; do
469 ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
470 done
471 exit $?
472 ;;
473
474 --debug)
475 $echo "$progname: enabling shell trace mode"
476 set -x
477 preserve_args="$preserve_args $arg"
478 ;;
479
480 --dry-run | -n)
481 run=:
482 ;;
483
484 --features)
485 $echo "host: $host"
486 if test "$build_libtool_libs" = yes; then
487 $echo "enable shared libraries"
488 else
489 $echo "disable shared libraries"
490 fi
491 if test "$build_old_libs" = yes; then
492 $echo "enable static libraries"
493 else
494 $echo "disable static libraries"
495 fi
496 exit $?
497 ;;
498
499 --finish) mode="finish" ;;
500
501 --mode) prevopt="--mode" prev=mode ;;
502 --mode=*) mode="$optarg" ;;
503
504 --preserve-dup-deps) duplicate_deps="yes" ;;
505
506 --quiet | --silent)
507 show=:
508 preserve_args="$preserve_args $arg"
509 ;;
510
511 --tag)
512 prevopt="--tag"
513 prev=tag
514 preserve_args="$preserve_args --tag"
515 ;;
516 --tag=*)
517 set tag "$optarg" ${1+"$@"}
518 shift
519 prev=tag
520 preserve_args="$preserve_args --tag"
521 ;;
522
523 -dlopen)
524 prevopt="-dlopen"
525 prev=execute_dlfiles
526 ;;
527
528 -*)
529 $echo "$modename: unrecognized option \`$arg'" 1>&2
530 $echo "$help" 1>&2
531 exit $EXIT_FAILURE
532 ;;
533
534 *)
535 nonopt="$arg"
536 break
537 ;;
538 esac
539done
540
541if test -n "$prevopt"; then
542 $echo "$modename: option \`$prevopt' requires an argument" 1>&2
543 $echo "$help" 1>&2
544 exit $EXIT_FAILURE
545fi
546
547case $disable_libs in
548no)
549 ;;
550shared)
551 build_libtool_libs=no
552 build_old_libs=yes
553 ;;
554static)
555 build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
556 ;;
557esac
558
559# If this variable is set in any of the actions, the command in it
560# will be execed at the end. This prevents here-documents from being
561# left over by shells.
562exec_cmd=
563
564if test -z "$show_help"; then
565
566 # Infer the operation mode.
567 if test -z "$mode"; then
568 $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
569 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
570 case $nonopt in
571 *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
572 mode=link
573 for arg
574 do
575 case $arg in
576 -c)
577 mode=compile
578 break
579 ;;
580 esac
581 done
582 ;;
583 *db | *dbx | *strace | *truss)
584 mode=execute
585 ;;
586 *install*|cp|mv)
587 mode=install
588 ;;
589 *rm)
590 mode=uninstall
591 ;;
592 *)
593 # If we have no mode, but dlfiles were specified, then do execute mode.
594 test -n "$execute_dlfiles" && mode=execute
595
596 # Just use the default operation mode.
597 if test -z "$mode"; then
598 if test -n "$nonopt"; then
599 $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
600 else
601 $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
602 fi
603 fi
604 ;;
605 esac
606 fi
607
608 # Only execute mode is allowed to have -dlopen flags.
609 if test -n "$execute_dlfiles" && test "$mode" != execute; then
610 $echo "$modename: unrecognized option \`-dlopen'" 1>&2
611 $echo "$help" 1>&2
612 exit $EXIT_FAILURE
613 fi
614
615 # Change the help message to a mode-specific one.
616 generic_help="$help"
617 help="Try \`$modename --help --mode=$mode' for more information."
618
619 # These modes are in order of execution frequency so that they run quickly.
620 case $mode in
621 # libtool compile mode
622 compile)
623 modename="$modename: compile"
624 # Get the compilation command and the source file.
625 base_compile=
626 srcfile="$nonopt" # always keep a non-empty value in "srcfile"
627 suppress_opt=yes
628 suppress_output=
629 arg_mode=normal
630 libobj=
631 later=
632
633 for arg
634 do
635 case $arg_mode in
636 arg )
637 # do not "continue". Instead, add this to base_compile
638 lastarg="$arg"
639 arg_mode=normal
640 ;;
641
642 target )
643 libobj="$arg"
644 arg_mode=normal
645 continue
646 ;;
647
648 normal )
649 # Accept any command-line options.
650 case $arg in
651 -o)
652 if test -n "$libobj" ; then
653 $echo "$modename: you cannot specify \`-o' more than once" 1>&2
654 exit $EXIT_FAILURE
655 fi
656 arg_mode=target
657 continue
658 ;;
659
660 -static | -prefer-pic | -prefer-non-pic)
661 later="$later $arg"
662 continue
663 ;;
664
665 -no-suppress)
666 suppress_opt=no
667 continue
668 ;;
669
670 -Xcompiler)
671 arg_mode=arg # the next one goes into the "base_compile" arg list
672 continue # The current "srcfile" will either be retained or
673 ;; # replaced later. I would guess that would be a bug.
674
675 -Wc,*)
676 args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
677 lastarg=
678 save_ifs="$IFS"; IFS=','
679 for arg in $args; do
680 IFS="$save_ifs"
681
682 # Double-quote args containing other shell metacharacters.
683 # Many Bourne shells cannot handle close brackets correctly
684 # in scan sets, so we specify it separately.
685 case $arg in
686 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
687 arg="\"$arg\""
688 ;;
689 esac
690 lastarg="$lastarg $arg"
691 done
692 IFS="$save_ifs"
693 lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
694
695 # Add the arguments to base_compile.
696 base_compile="$base_compile $lastarg"
697 continue
698 ;;
699
700 * )
701 # Accept the current argument as the source file.
702 # The previous "srcfile" becomes the current argument.
703 #
704 lastarg="$srcfile"
705 srcfile="$arg"
706 ;;
707 esac # case $arg
708 ;;
709 esac # case $arg_mode
710
711 # Aesthetically quote the previous argument.
712 lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
713
714 case $lastarg in
715 # Double-quote args containing other shell metacharacters.
716 # Many Bourne shells cannot handle close brackets correctly
717 # in scan sets, and some SunOS ksh mistreat backslash-escaping
718 # in scan sets (worked around with variable expansion),
719 # and furthermore cannot handle '|' '&' '(' ')' in scan sets
720 # at all, so we specify them separately.
721 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
722 lastarg="\"$lastarg\""
723 ;;
724 esac
725
726 base_compile="$base_compile $lastarg"
727 done # for arg
728
729 case $arg_mode in
730 arg)
731 $echo "$modename: you must specify an argument for -Xcompile"
732 exit $EXIT_FAILURE
733 ;;
734 target)
735 $echo "$modename: you must specify a target with \`-o'" 1>&2
736 exit $EXIT_FAILURE
737 ;;
738 *)
739 # Get the name of the library object.
740 [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
741 ;;
742 esac
743
744 # Recognize several different file suffixes.
745 # If the user specifies -o file.o, it is replaced with file.lo
746 xform='[cCFSifmso]'
747 case $libobj in
748 *.ada) xform=ada ;;
749 *.adb) xform=adb ;;
750 *.ads) xform=ads ;;
751 *.asm) xform=asm ;;
752 *.c++) xform=c++ ;;
753 *.cc) xform=cc ;;
754 *.ii) xform=ii ;;
755 *.class) xform=class ;;
756 *.cpp) xform=cpp ;;
757 *.cxx) xform=cxx ;;
758 *.f90) xform=f90 ;;
759 *.for) xform=for ;;
760 *.java) xform=java ;;
761 esac
762
763 libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
764
765 case $libobj in
766 *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
767 *)
768 $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
769 exit $EXIT_FAILURE
770 ;;
771 esac
772
773 func_infer_tag $base_compile
774
775 for arg in $later; do
776 case $arg in
777 -static)
778 build_old_libs=yes
779 continue
780 ;;
781
782 -prefer-pic)
783 pic_mode=yes
784 continue
785 ;;
786
787 -prefer-non-pic)
788 pic_mode=no
789 continue
790 ;;
791 esac
792 done
793
794 qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
795 case $qlibobj in
796 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
797 qlibobj="\"$qlibobj\"" ;;
798 esac
799 test "X$libobj" != "X$qlibobj" \
800 && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \
801 && $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
802 objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
803 xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
804 if test "X$xdir" = "X$obj"; then
805 xdir=
806 else
807 xdir=$xdir/
808 fi
809 lobj=${xdir}$objdir/$objname
810
811 if test -z "$base_compile"; then
812 $echo "$modename: you must specify a compilation command" 1>&2
813 $echo "$help" 1>&2
814 exit $EXIT_FAILURE
815 fi
816
817 # Delete any leftover library objects.
818 if test "$build_old_libs" = yes; then
819 removelist="$obj $lobj $libobj ${libobj}T"
820 else
821 removelist="$lobj $libobj ${libobj}T"
822 fi
823
824 $run $rm $removelist
825 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
826
827 # On Cygwin there's no "real" PIC flag so we must build both object types
828 case $host_os in
829 cygwin* | mingw* | pw32* | os2*)
830 pic_mode=default
831 ;;
832 esac
833 if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
834 # non-PIC code in shared libraries is not supported
835 pic_mode=default
836 fi
837
838 # Calculate the filename of the output object if compiler does
839 # not support -o with -c
840 if test "$compiler_c_o" = no; then
841 output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
842 lockfile="$output_obj.lock"
843 removelist="$removelist $output_obj $lockfile"
844 trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
845 else
846 output_obj=
847 need_locks=no
848 lockfile=
849 fi
850
851 # Lock this critical section if it is needed
852 # We use this script file to make the link, it avoids creating a new file
853 if test "$need_locks" = yes; then
854 until $run ln "$progpath" "$lockfile" 2>/dev/null; do
855 $show "Waiting for $lockfile to be removed"
856 sleep 2
857 done
858 elif test "$need_locks" = warn; then
859 if test -f "$lockfile"; then
860 $echo "\
861*** ERROR, $lockfile exists and contains:
862`cat $lockfile 2>/dev/null`
863
864This indicates that another process is trying to use the same
865temporary object file, and libtool could not work around it because
866your compiler does not support \`-c' and \`-o' together. If you
867repeat this compilation, it may succeed, by chance, but you had better
868avoid parallel builds (make -j) in this platform, or get a better
869compiler."
870
871 $run $rm $removelist
872 exit $EXIT_FAILURE
873 fi
874 $echo "$srcfile" > "$lockfile"
875 fi
876
877 if test -n "$fix_srcfile_path"; then
878 eval srcfile=\"$fix_srcfile_path\"
879 fi
880 qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
881 case $qsrcfile in
882 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
883 qsrcfile="\"$qsrcfile\"" ;;
884 esac
885
886 $run $rm "$libobj" "${libobj}T"
887
888 # Create a libtool object file (analogous to a ".la" file),
889 # but don't create it if we're doing a dry run.
890 test -z "$run" && cat > ${libobj}T <<EOF
891# $libobj - a libtool object file
892# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
893#
894# Please DO NOT delete this file!
895# It is necessary for linking the library.
896
897# Name of the PIC object.
898EOF
899
900 # Only build a PIC object if we are building libtool libraries.
901 if test "$build_libtool_libs" = yes; then
902 # Without this assignment, base_compile gets emptied.
903 fbsd_hideous_sh_bug=$base_compile
904
905 if test "$pic_mode" != no; then
906 command="$base_compile $qsrcfile $pic_flag"
907 else
908 # Don't build PIC code
909 command="$base_compile $qsrcfile"
910 fi
911
912 if test ! -d "${xdir}$objdir"; then
913 $show "$mkdir ${xdir}$objdir"
914 $run $mkdir ${xdir}$objdir
915 exit_status=$?
916 if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
917 exit $exit_status
918 fi
919 fi
920
921 if test -z "$output_obj"; then
922 # Place PIC objects in $objdir
923 command="$command -o $lobj"
924 fi
925
926 $run $rm "$lobj" "$output_obj"
927
928 $show "$command"
929 if $run eval "$command"; then :
930 else
931 test -n "$output_obj" && $run $rm $removelist
932 exit $EXIT_FAILURE
933 fi
934
935 if test "$need_locks" = warn &&
936 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
937 $echo "\
938*** ERROR, $lockfile contains:
939`cat $lockfile 2>/dev/null`
940
941but it should contain:
942$srcfile
943
944This indicates that another process is trying to use the same
945temporary object file, and libtool could not work around it because
946your compiler does not support \`-c' and \`-o' together. If you
947repeat this compilation, it may succeed, by chance, but you had better
948avoid parallel builds (make -j) in this platform, or get a better
949compiler."
950
951 $run $rm $removelist
952 exit $EXIT_FAILURE
953 fi
954
955 # Just move the object if needed, then go on to compile the next one
956 if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
957 $show "$mv $output_obj $lobj"
958 if $run $mv $output_obj $lobj; then :
959 else
960 error=$?
961 $run $rm $removelist
962 exit $error
963 fi
964 fi
965
966 # Append the name of the PIC object to the libtool object file.
967 test -z "$run" && cat >> ${libobj}T <<EOF
968pic_object='$objdir/$objname'
969
970EOF
971
972 # Allow error messages only from the first compilation.
973 if test "$suppress_opt" = yes; then
974 suppress_output=' >/dev/null 2>&1'
975 fi
976 else
977 # No PIC object so indicate it doesn't exist in the libtool
978 # object file.
979 test -z "$run" && cat >> ${libobj}T <<EOF
980pic_object=none
981
982EOF
983 fi
984
985 # Only build a position-dependent object if we build old libraries.
986 if test "$build_old_libs" = yes; then
987 if test "$pic_mode" != yes; then
988 # Don't build PIC code
989 command="$base_compile $qsrcfile"
990 else
991 command="$base_compile $qsrcfile $pic_flag"
992 fi
993 if test "$compiler_c_o" = yes; then
994 command="$command -o $obj"
995 fi
996
997 # Suppress compiler output if we already did a PIC compilation.
998 command="$command$suppress_output"
999 $run $rm "$obj" "$output_obj"
1000 $show "$command"
1001 if $run eval "$command"; then :
1002 else
1003 $run $rm $removelist
1004 exit $EXIT_FAILURE
1005 fi
1006
1007 if test "$need_locks" = warn &&
1008 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1009 $echo "\
1010*** ERROR, $lockfile contains:
1011`cat $lockfile 2>/dev/null`
1012
1013but it should contain:
1014$srcfile
1015
1016This indicates that another process is trying to use the same
1017temporary object file, and libtool could not work around it because
1018your compiler does not support \`-c' and \`-o' together. If you
1019repeat this compilation, it may succeed, by chance, but you had better
1020avoid parallel builds (make -j) in this platform, or get a better
1021compiler."
1022
1023 $run $rm $removelist
1024 exit $EXIT_FAILURE
1025 fi
1026
1027 # Just move the object if needed
1028 if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
1029 $show "$mv $output_obj $obj"
1030 if $run $mv $output_obj $obj; then :
1031 else
1032 error=$?
1033 $run $rm $removelist
1034 exit $error
1035 fi
1036 fi
1037
1038 # Append the name of the non-PIC object the libtool object file.
1039 # Only append if the libtool object file exists.
1040 test -z "$run" && cat >> ${libobj}T <<EOF
1041# Name of the non-PIC object.
1042non_pic_object='$objname'
1043
1044EOF
1045 else
1046 # Append the name of the non-PIC object the libtool object file.
1047 # Only append if the libtool object file exists.
1048 test -z "$run" && cat >> ${libobj}T <<EOF
1049# Name of the non-PIC object.
1050non_pic_object=none
1051
1052EOF
1053 fi
1054
1055 $run $mv "${libobj}T" "${libobj}"
1056
1057 # Unlock the critical section if it was locked
1058 if test "$need_locks" != no; then
1059 $run $rm "$lockfile"
1060 fi
1061
1062 exit $EXIT_SUCCESS
1063 ;;
1064
1065 # libtool link mode
1066 link | relink)
1067 modename="$modename: link"
1068 case $host in
1069 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1070 # It is impossible to link a dll without this setting, and
1071 # we shouldn't force the makefile maintainer to figure out
1072 # which system we are compiling for in order to pass an extra
1073 # flag for every libtool invocation.
1074 # allow_undefined=no
1075
1076 # FIXME: Unfortunately, there are problems with the above when trying
1077 # to make a dll which has undefined symbols, in which case not
1078 # even a static library is built. For now, we need to specify
1079 # -no-undefined on the libtool link line when we can be certain
1080 # that all symbols are satisfied, otherwise we get a static library.
1081 allow_undefined=yes
1082 ;;
1083 *)
1084 allow_undefined=yes
1085 ;;
1086 esac
1087 libtool_args="$nonopt"
1088 base_compile="$nonopt $@"
1089 compile_command="$nonopt"
1090 finalize_command="$nonopt"
1091
1092 compile_rpath=
1093 finalize_rpath=
1094 compile_shlibpath=
1095 finalize_shlibpath=
1096 convenience=
1097 old_convenience=
1098 deplibs=
1099 old_deplibs=
1100 compiler_flags=
1101 linker_flags=
1102 dllsearchpath=
1103 lib_search_path=`pwd`
1104 inst_prefix_dir=
1105
1106 avoid_version=no
1107 dlfiles=
1108 dlprefiles=
1109 dlself=no
1110 export_dynamic=no
1111 export_symbols=
1112 export_symbols_regex=
1113 generated=
1114 libobjs=
1115 ltlibs=
1116 module=no
1117 no_install=no
1118 objs=
1119 non_pic_objects=
1120 notinst_path= # paths that contain not-installed libtool libraries
1121 precious_files_regex=
1122 prefer_static_libs=no
1123 preload=no
1124 prev=
1125 prevarg=
1126 release=
1127 rpath=
1128 xrpath=
1129 perm_rpath=
1130 temp_rpath=
1131 thread_safe=no
1132 vinfo=
1133 vinfo_number=no
1134
1135 func_infer_tag $base_compile
1136
1137 # We need to know -static, to get the right output filenames.
1138 for arg
1139 do
1140 case $arg in
1141 -all-static | -static)
1142 if test "X$arg" = "X-all-static"; then
1143 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1144 $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1145 fi
1146 if test -n "$link_static_flag"; then
1147 dlopen_self=$dlopen_self_static
1148 fi
1149 prefer_static_libs=yes
1150 else
1151 if test -z "$pic_flag" && test -n "$link_static_flag"; then
1152 dlopen_self=$dlopen_self_static
1153 fi
1154 prefer_static_libs=built
1155 fi
1156 build_libtool_libs=no
1157 build_old_libs=yes
1158 break
1159 ;;
1160 esac
1161 done
1162
1163 # See if our shared archives depend on static archives.
1164 test -n "$old_archive_from_new_cmds" && build_old_libs=yes
1165
1166 # Go through the arguments, transforming them on the way.
1167 while test "$#" -gt 0; do
1168 arg="$1"
1169 shift
1170 case $arg in
1171 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1172 qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
1173 ;;
1174 *) qarg=$arg ;;
1175 esac
1176 libtool_args="$libtool_args $qarg"
1177
1178 # If the previous option needs an argument, assign it.
1179 if test -n "$prev"; then
1180 case $prev in
1181 output)
1182 compile_command="$compile_command @OUTPUT@"
1183 finalize_command="$finalize_command @OUTPUT@"
1184 ;;
1185 esac
1186
1187 case $prev in
1188 dlfiles|dlprefiles)
1189 if test "$preload" = no; then
1190 # Add the symbol object into the linking commands.
1191 compile_command="$compile_command @SYMFILE@"
1192 finalize_command="$finalize_command @SYMFILE@"
1193 preload=yes
1194 fi
1195 case $arg in
1196 *.la | *.lo) ;; # We handle these cases below.
1197 force)
1198 if test "$dlself" = no; then
1199 dlself=needless
1200 export_dynamic=yes
1201 fi
1202 prev=
1203 continue
1204 ;;
1205 self)
1206 if test "$prev" = dlprefiles; then
1207 dlself=yes
1208 elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
1209 dlself=yes
1210 else
1211 dlself=needless
1212 export_dynamic=yes
1213 fi
1214 prev=
1215 continue
1216 ;;
1217 *)
1218 if test "$prev" = dlfiles; then
1219 dlfiles="$dlfiles $arg"
1220 else
1221 dlprefiles="$dlprefiles $arg"
1222 fi
1223 prev=
1224 continue
1225 ;;
1226 esac
1227 ;;
1228 expsyms)
1229 export_symbols="$arg"
1230 if test ! -f "$arg"; then
1231 $echo "$modename: symbol file \`$arg' does not exist"
1232 exit $EXIT_FAILURE
1233 fi
1234 prev=
1235 continue
1236 ;;
1237 expsyms_regex)
1238 export_symbols_regex="$arg"
1239 prev=
1240 continue
1241 ;;
1242 inst_prefix)
1243 inst_prefix_dir="$arg"
1244 prev=
1245 continue
1246 ;;
1247 precious_regex)
1248 precious_files_regex="$arg"
1249 prev=
1250 continue
1251 ;;
1252 release)
1253 release="-$arg"
1254 prev=
1255 continue
1256 ;;
1257 objectlist)
1258 if test -f "$arg"; then
1259 save_arg=$arg
1260 moreargs=
1261 for fil in `cat $save_arg`
1262 do
1263# moreargs="$moreargs $fil"
1264 arg=$fil
1265 # A libtool-controlled object.
1266
1267 # Check to see that this really is a libtool object.
1268 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
1269 pic_object=
1270 non_pic_object=
1271
1272 # Read the .lo file
1273 # If there is no directory component, then add one.
1274 case $arg in
1275 */* | *\\*) . $arg ;;
1276 *) . ./$arg ;;
1277 esac
1278
1279 if test -z "$pic_object" || \
1280 test -z "$non_pic_object" ||
1281 test "$pic_object" = none && \
1282 test "$non_pic_object" = none; then
1283 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1284 exit $EXIT_FAILURE
1285 fi
1286
1287 # Extract subdirectory from the argument.
1288 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1289 if test "X$xdir" = "X$arg"; then
1290 xdir=
1291 else
1292 xdir="$xdir/"
1293 fi
1294
1295 if test "$pic_object" != none; then
1296 # Prepend the subdirectory the object is found in.
1297 pic_object="$xdir$pic_object"
1298
1299 if test "$prev" = dlfiles; then
1300 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1301 dlfiles="$dlfiles $pic_object"
1302 prev=
1303 continue
1304 else
1305 # If libtool objects are unsupported, then we need to preload.
1306 prev=dlprefiles
1307 fi
1308 fi
1309
1310 # CHECK ME: I think I busted this. -Ossama
1311 if test "$prev" = dlprefiles; then
1312 # Preload the old-style object.
1313 dlprefiles="$dlprefiles $pic_object"
1314 prev=
1315 fi
1316
1317 # A PIC object.
1318 libobjs="$libobjs $pic_object"
1319 arg="$pic_object"
1320 fi
1321
1322 # Non-PIC object.
1323 if test "$non_pic_object" != none; then
1324 # Prepend the subdirectory the object is found in.
1325 non_pic_object="$xdir$non_pic_object"
1326
1327 # A standard non-PIC object
1328 non_pic_objects="$non_pic_objects $non_pic_object"
1329 if test -z "$pic_object" || test "$pic_object" = none ; then
1330 arg="$non_pic_object"
1331 fi
1332 else
1333 # If the PIC object exists, use it instead.
1334 # $xdir was prepended to $pic_object above.
1335 non_pic_object="$pic_object"
1336 non_pic_objects="$non_pic_objects $non_pic_object"
1337 fi
1338 else
1339 # Only an error if not doing a dry-run.
1340 if test -z "$run"; then
1341 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1342 exit $EXIT_FAILURE
1343 else
1344 # Dry-run case.
1345
1346 # Extract subdirectory from the argument.
1347 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1348 if test "X$xdir" = "X$arg"; then
1349 xdir=
1350 else
1351 xdir="$xdir/"
1352 fi
1353
1354 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1355 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1356 libobjs="$libobjs $pic_object"
1357 non_pic_objects="$non_pic_objects $non_pic_object"
1358 fi
1359 fi
1360 done
1361 else
1362 $echo "$modename: link input file \`$save_arg' does not exist"
1363 exit $EXIT_FAILURE
1364 fi
1365 arg=$save_arg
1366 prev=
1367 continue
1368 ;;
1369 rpath | xrpath)
1370 # We need an absolute path.
1371 case $arg in
1372 [\\/]* | [A-Za-z]:[\\/]*) ;;
1373 *)
1374 $echo "$modename: only absolute run-paths are allowed" 1>&2
1375 exit $EXIT_FAILURE
1376 ;;
1377 esac
1378 if test "$prev" = rpath; then
1379 case "$rpath " in
1380 *" $arg "*) ;;
1381 *) rpath="$rpath $arg" ;;
1382 esac
1383 else
1384 case "$xrpath " in
1385 *" $arg "*) ;;
1386 *) xrpath="$xrpath $arg" ;;
1387 esac
1388 fi
1389 prev=
1390 continue
1391 ;;
1392 xcompiler)
1393 compiler_flags="$compiler_flags $qarg"
1394 prev=
1395 compile_command="$compile_command $qarg"
1396 finalize_command="$finalize_command $qarg"
1397 continue
1398 ;;
1399 xlinker)
1400 linker_flags="$linker_flags $qarg"
1401 compiler_flags="$compiler_flags $wl$qarg"
1402 prev=
1403 compile_command="$compile_command $wl$qarg"
1404 finalize_command="$finalize_command $wl$qarg"
1405 continue
1406 ;;
1407 xcclinker)
1408 linker_flags="$linker_flags $qarg"
1409 compiler_flags="$compiler_flags $qarg"
1410 prev=
1411 compile_command="$compile_command $qarg"
1412 finalize_command="$finalize_command $qarg"
1413 continue
1414 ;;
1415 shrext)
1416 shrext_cmds="$arg"
1417 prev=
1418 continue
1419 ;;
1420 darwin_framework|darwin_framework_skip)
1421 test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
1422 compile_command="$compile_command $arg"
1423 finalize_command="$finalize_command $arg"
1424 prev=
1425 continue
1426 ;;
1427 *)
1428 eval "$prev=\"\$arg\""
1429 prev=
1430 continue
1431 ;;
1432 esac
1433 fi # test -n "$prev"
1434
1435 prevarg="$arg"
1436
1437 case $arg in
1438 -all-static)
1439 if test -n "$link_static_flag"; then
1440 compile_command="$compile_command $link_static_flag"
1441 finalize_command="$finalize_command $link_static_flag"
1442 fi
1443 continue
1444 ;;
1445
1446 -allow-undefined)
1447 # FIXME: remove this flag sometime in the future.
1448 $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1449 continue
1450 ;;
1451
1452 -avoid-version)
1453 avoid_version=yes
1454 continue
1455 ;;
1456
1457 -dlopen)
1458 prev=dlfiles
1459 continue
1460 ;;
1461
1462 -dlpreopen)
1463 prev=dlprefiles
1464 continue
1465 ;;
1466
1467 -export-dynamic)
1468 export_dynamic=yes
1469 continue
1470 ;;
1471
1472 -export-symbols | -export-symbols-regex)
1473 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
1474 $echo "$modename: more than one -exported-symbols argument is not allowed"
1475 exit $EXIT_FAILURE
1476 fi
1477 if test "X$arg" = "X-export-symbols"; then
1478 prev=expsyms
1479 else
1480 prev=expsyms_regex
1481 fi
1482 continue
1483 ;;
1484
1485 -framework|-arch|-isysroot)
1486 case " $CC " in
1487 *" ${arg} ${1} "* | *" ${arg} ${1} "*)
1488 prev=darwin_framework_skip ;;
1489 *) compiler_flags="$compiler_flags $arg"
1490 prev=darwin_framework ;;
1491 esac
1492 compile_command="$compile_command $arg"
1493 finalize_command="$finalize_command $arg"
1494 continue
1495 ;;
1496
1497 -inst-prefix-dir)
1498 prev=inst_prefix
1499 continue
1500 ;;
1501
1502 # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1503 # so, if we see these flags be careful not to treat them like -L
1504 -L[A-Z][A-Z]*:*)
1505 case $with_gcc/$host in
1506 no/*-*-irix* | /*-*-irix*)
1507 compile_command="$compile_command $arg"
1508 finalize_command="$finalize_command $arg"
1509 ;;
1510 esac
1511 continue
1512 ;;
1513
1514 -L*)
1515 dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1516 # We need an absolute path.
1517 case $dir in
1518 [\\/]* | [A-Za-z]:[\\/]*) ;;
1519 *)
1520 absdir=`cd "$dir" && pwd`
1521 if test -z "$absdir"; then
1522 $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1523 absdir="$dir"
1524 notinst_path="$notinst_path $dir"
1525 fi
1526 dir="$absdir"
1527 ;;
1528 esac
1529 case "$deplibs " in
1530 *" -L$dir "*) ;;
1531 *)
1532 deplibs="$deplibs -L$dir"
1533 lib_search_path="$lib_search_path $dir"
1534 ;;
1535 esac
1536 case $host in
1537 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1538 testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
1539 case :$dllsearchpath: in
1540 *":$dir:"*) ;;
1541 *) dllsearchpath="$dllsearchpath:$dir";;
1542 esac
1543 case :$dllsearchpath: in
1544 *":$testbindir:"*) ;;
1545 *) dllsearchpath="$dllsearchpath:$testbindir";;
1546 esac
1547 ;;
1548 esac
1549 continue
1550 ;;
1551
1552 -l*)
1553 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
1554 case $host in
1555 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
1556 # These systems don't actually have a C or math library (as such)
1557 continue
1558 ;;
1559 *-*-os2*)
1560 # These systems don't actually have a C library (as such)
1561 test "X$arg" = "X-lc" && continue
1562 ;;
1563 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1564 # Do not include libc due to us having libc/libc_r.
1565 test "X$arg" = "X-lc" && continue
1566 ;;
1567 *-*-rhapsody* | *-*-darwin1.[012])
1568 # Rhapsody C and math libraries are in the System framework
1569 deplibs="$deplibs -framework System"
1570 continue
1571 ;;
1572 *-*-sco3.2v5* | *-*-sco5v6*)
1573 # Causes problems with __ctype
1574 test "X$arg" = "X-lc" && continue
1575 ;;
1576 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
1577 # Compiler inserts libc in the correct place for threads to work
1578 test "X$arg" = "X-lc" && continue
1579 ;;
1580 esac
1581 elif test "X$arg" = "X-lc_r"; then
1582 case $host in
1583 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1584 # Do not include libc_r directly, use -pthread flag.
1585 continue
1586 ;;
1587 esac
1588 fi
1589 deplibs="$deplibs $arg"
1590 continue
1591 ;;
1592
1593 # Tru64 UNIX uses -model [arg] to determine the layout of C++
1594 # classes, name mangling, and exception handling.
1595 -model)
1596 compile_command="$compile_command $arg"
1597 compiler_flags="$compiler_flags $arg"
1598 finalize_command="$finalize_command $arg"
1599 prev=xcompiler
1600 continue
1601 ;;
1602
1603 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
1604 compiler_flags="$compiler_flags $arg"
1605 compile_command="$compile_command $arg"
1606 finalize_command="$finalize_command $arg"
1607 continue
1608 ;;
1609
1610 -module)
1611 module=yes
1612 continue
1613 ;;
1614
1615 # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
1616 # -r[0-9][0-9]* specifies the processor on the SGI compiler
1617 # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
1618 # +DA*, +DD* enable 64-bit mode on the HP compiler
1619 # -q* pass through compiler args for the IBM compiler
1620 # -m* pass through architecture-specific compiler args for GCC
1621 # -m*, -t[45]*, -txscale* pass through architecture-specific
1622 # compiler args for GCC
1623 # -pg pass through profiling flag for GCC
1624 # @file GCC response files
1625 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
1626 -t[45]*|-txscale*|@*)
1627
1628 # Unknown arguments in both finalize_command and compile_command need
1629 # to be aesthetically quoted because they are evaled later.
1630 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1631 case $arg in
1632 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1633 arg="\"$arg\""
1634 ;;
1635 esac
1636 compile_command="$compile_command $arg"
1637 finalize_command="$finalize_command $arg"
1638 compiler_flags="$compiler_flags $arg"
1639 continue
1640 ;;
1641
1642 -shrext)
1643 prev=shrext
1644 continue
1645 ;;
1646
1647 -no-fast-install)
1648 fast_install=no
1649 continue
1650 ;;
1651
1652 -no-install)
1653 case $host in
1654 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1655 # The PATH hackery in wrapper scripts is required on Windows
1656 # in order for the loader to find any dlls it needs.
1657 $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
1658 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
1659 fast_install=no
1660 ;;
1661 *) no_install=yes ;;
1662 esac
1663 continue
1664 ;;
1665
1666 -no-undefined)
1667 allow_undefined=no
1668 continue
1669 ;;
1670
1671 -objectlist)
1672 prev=objectlist
1673 continue
1674 ;;
1675
1676 -o) prev=output ;;
1677
1678 -precious-files-regex)
1679 prev=precious_regex
1680 continue
1681 ;;
1682
1683 -release)
1684 prev=release
1685 continue
1686 ;;
1687
1688 -rpath)
1689 prev=rpath
1690 continue
1691 ;;
1692
1693 -R)
1694 prev=xrpath
1695 continue
1696 ;;
1697
1698 -R*)
1699 dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
1700 # We need an absolute path.
1701 case $dir in
1702 [\\/]* | [A-Za-z]:[\\/]*) ;;
1703 *)
1704 $echo "$modename: only absolute run-paths are allowed" 1>&2
1705 exit $EXIT_FAILURE
1706 ;;
1707 esac
1708 case "$xrpath " in
1709 *" $dir "*) ;;
1710 *) xrpath="$xrpath $dir" ;;
1711 esac
1712 continue
1713 ;;
1714
1715 -static)
1716 # The effects of -static are defined in a previous loop.
1717 # We used to do the same as -all-static on platforms that
1718 # didn't have a PIC flag, but the assumption that the effects
1719 # would be equivalent was wrong. It would break on at least
1720 # Digital Unix and AIX.
1721 continue
1722 ;;
1723
1724 -thread-safe)
1725 thread_safe=yes
1726 continue
1727 ;;
1728
1729 -version-info)
1730 prev=vinfo
1731 continue
1732 ;;
1733 -version-number)
1734 prev=vinfo
1735 vinfo_number=yes
1736 continue
1737 ;;
1738
1739 -Wc,*)
1740 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
1741 arg=
1742 save_ifs="$IFS"; IFS=','
1743 for flag in $args; do
1744 IFS="$save_ifs"
1745 case $flag in
1746 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1747 flag="\"$flag\""
1748 ;;
1749 esac
1750 arg="$arg $wl$flag"
1751 compiler_flags="$compiler_flags $flag"
1752 done
1753 IFS="$save_ifs"
1754 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1755 ;;
1756
1757 -Wl,*)
1758 args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
1759 arg=
1760 save_ifs="$IFS"; IFS=','
1761 for flag in $args; do
1762 IFS="$save_ifs"
1763 case $flag in
1764 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1765 flag="\"$flag\""
1766 ;;
1767 esac
1768 arg="$arg $wl$flag"
1769 compiler_flags="$compiler_flags $wl$flag"
1770 linker_flags="$linker_flags $flag"
1771 done
1772 IFS="$save_ifs"
1773 arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1774 ;;
1775
1776 -Xcompiler)
1777 prev=xcompiler
1778 continue
1779 ;;
1780
1781 -Xlinker)
1782 prev=xlinker
1783 continue
1784 ;;
1785
1786 -XCClinker)
1787 prev=xcclinker
1788 continue
1789 ;;
1790
1791 # Some other compiler flag.
1792 -* | +*)
1793 # Unknown arguments in both finalize_command and compile_command need
1794 # to be aesthetically quoted because they are evaled later.
1795 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1796 case $arg in
1797 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1798 arg="\"$arg\""
1799 ;;
1800 esac
1801 ;;
1802
1803 *.$objext)
1804 # A standard object.
1805 objs="$objs $arg"
1806 ;;
1807
1808 *.lo)
1809 # A libtool-controlled object.
1810
1811 # Check to see that this really is a libtool object.
1812 if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
1813 pic_object=
1814 non_pic_object=
1815
1816 # Read the .lo file
1817 # If there is no directory component, then add one.
1818 case $arg in
1819 */* | *\\*) . $arg ;;
1820 *) . ./$arg ;;
1821 esac
1822
1823 if test -z "$pic_object" || \
1824 test -z "$non_pic_object" ||
1825 test "$pic_object" = none && \
1826 test "$non_pic_object" = none; then
1827 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1828 exit $EXIT_FAILURE
1829 fi
1830
1831 # Extract subdirectory from the argument.
1832 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1833 if test "X$xdir" = "X$arg"; then
1834 xdir=
1835 else
1836 xdir="$xdir/"
1837 fi
1838
1839 if test "$pic_object" != none; then
1840 # Prepend the subdirectory the object is found in.
1841 pic_object="$xdir$pic_object"
1842
1843 if test "$prev" = dlfiles; then
1844 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1845 dlfiles="$dlfiles $pic_object"
1846 prev=
1847 continue
1848 else
1849 # If libtool objects are unsupported, then we need to preload.
1850 prev=dlprefiles
1851 fi
1852 fi
1853
1854 # CHECK ME: I think I busted this. -Ossama
1855 if test "$prev" = dlprefiles; then
1856 # Preload the old-style object.
1857 dlprefiles="$dlprefiles $pic_object"
1858 prev=
1859 fi
1860
1861 # A PIC object.
1862 libobjs="$libobjs $pic_object"
1863 arg="$pic_object"
1864 fi
1865
1866 # Non-PIC object.
1867 if test "$non_pic_object" != none; then
1868 # Prepend the subdirectory the object is found in.
1869 non_pic_object="$xdir$non_pic_object"
1870
1871 # A standard non-PIC object
1872 non_pic_objects="$non_pic_objects $non_pic_object"
1873 if test -z "$pic_object" || test "$pic_object" = none ; then
1874 arg="$non_pic_object"
1875 fi
1876 else
1877 # If the PIC object exists, use it instead.
1878 # $xdir was prepended to $pic_object above.
1879 non_pic_object="$pic_object"
1880 non_pic_objects="$non_pic_objects $non_pic_object"
1881 fi
1882 else
1883 # Only an error if not doing a dry-run.
1884 if test -z "$run"; then
1885 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1886 exit $EXIT_FAILURE
1887 else
1888 # Dry-run case.
1889
1890 # Extract subdirectory from the argument.
1891 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1892 if test "X$xdir" = "X$arg"; then
1893 xdir=
1894 else
1895 xdir="$xdir/"
1896 fi
1897
1898 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1899 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1900 libobjs="$libobjs $pic_object"
1901 non_pic_objects="$non_pic_objects $non_pic_object"
1902 fi
1903 fi
1904 ;;
1905
1906 *.$libext)
1907 # An archive.
1908 deplibs="$deplibs $arg"
1909 old_deplibs="$old_deplibs $arg"
1910 continue
1911 ;;
1912
1913 *.la)
1914 # A libtool-controlled library.
1915
1916 if test "$prev" = dlfiles; then
1917 # This library was specified with -dlopen.
1918 dlfiles="$dlfiles $arg"
1919 prev=
1920 elif test "$prev" = dlprefiles; then
1921 # The library was specified with -dlpreopen.
1922 dlprefiles="$dlprefiles $arg"
1923 prev=
1924 else
1925 deplibs="$deplibs $arg"
1926 fi
1927 continue
1928 ;;
1929
1930 # Some other compiler argument.
1931 *)
1932 # Unknown arguments in both finalize_command and compile_command need
1933 # to be aesthetically quoted because they are evaled later.
1934 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1935 case $arg in
1936 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1937 arg="\"$arg\""
1938 ;;
1939 esac
1940 ;;
1941 esac # arg
1942
1943 # Now actually substitute the argument into the commands.
1944 if test -n "$arg"; then
1945 compile_command="$compile_command $arg"
1946 finalize_command="$finalize_command $arg"
1947 fi
1948 done # argument parsing loop
1949
1950 if test -n "$prev"; then
1951 $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
1952 $echo "$help" 1>&2
1953 exit $EXIT_FAILURE
1954 fi
1955
1956 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
1957 eval arg=\"$export_dynamic_flag_spec\"
1958 compile_command="$compile_command $arg"
1959 finalize_command="$finalize_command $arg"
1960 fi
1961
1962 oldlibs=
1963 # calculate the name of the file, without its directory
1964 outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
1965 libobjs_save="$libobjs"
1966
1967 if test -n "$shlibpath_var"; then
1968 # get the directories listed in $shlibpath_var
1969 eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
1970 else
1971 shlib_search_path=
1972 fi
1973 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
1974 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
1975
1976 output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
1977 if test "X$output_objdir" = "X$output"; then
1978 output_objdir="$objdir"
1979 else
1980 output_objdir="$output_objdir/$objdir"
1981 fi
1982 # Create the object directory.
1983 if test ! -d "$output_objdir"; then
1984 $show "$mkdir $output_objdir"
1985 $run $mkdir $output_objdir
1986 exit_status=$?
1987 if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
1988 exit $exit_status
1989 fi
1990 fi
1991
1992 # Determine the type of output
1993 case $output in
1994 "")
1995 $echo "$modename: you must specify an output file" 1>&2
1996 $echo "$help" 1>&2
1997 exit $EXIT_FAILURE
1998 ;;
1999 *.$libext) linkmode=oldlib ;;
2000 *.lo | *.$objext) linkmode=obj ;;
2001 *.la) linkmode=lib ;;
2002 *) linkmode=prog ;; # Anything else should be a program.
2003 esac
2004
2005 case $host in
2006 *cygwin* | *mingw* | *pw32*)
2007 # don't eliminate duplications in $postdeps and $predeps
2008 duplicate_compiler_generated_deps=yes
2009 ;;
2010 *)
2011 duplicate_compiler_generated_deps=$duplicate_deps
2012 ;;
2013 esac
2014 specialdeplibs=
2015
2016 libs=
2017 # Find all interdependent deplibs by searching for libraries
2018 # that are linked more than once (e.g. -la -lb -la)
2019 for deplib in $deplibs; do
2020 if test "X$duplicate_deps" = "Xyes" ; then
2021 case "$libs " in
2022 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2023 esac
2024 fi
2025 libs="$libs $deplib"
2026 done
2027
2028 if test "$linkmode" = lib; then
2029 libs="$predeps $libs $compiler_lib_search_path $postdeps"
2030
2031 # Compute libraries that are listed more than once in $predeps
2032 # $postdeps and mark them as special (i.e., whose duplicates are
2033 # not to be eliminated).
2034 pre_post_deps=
2035 if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
2036 for pre_post_dep in $predeps $postdeps; do
2037 case "$pre_post_deps " in
2038 *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
2039 esac
2040 pre_post_deps="$pre_post_deps $pre_post_dep"
2041 done
2042 fi
2043 pre_post_deps=
2044 fi
2045
2046 deplibs=
2047 newdependency_libs=
2048 newlib_search_path=
2049 need_relink=no # whether we're linking any uninstalled libtool libraries
2050 notinst_deplibs= # not-installed libtool libraries
2051 case $linkmode in
2052 lib)
2053 passes="conv link"
2054 for file in $dlfiles $dlprefiles; do
2055 case $file in
2056 *.la) ;;
2057 *)
2058 $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
2059 exit $EXIT_FAILURE
2060 ;;
2061 esac
2062 done
2063 ;;
2064 prog)
2065 compile_deplibs=
2066 finalize_deplibs=
2067 alldeplibs=no
2068 newdlfiles=
2069 newdlprefiles=
2070 passes="conv scan dlopen dlpreopen link"
2071 ;;
2072 *) passes="conv"
2073 ;;
2074 esac
2075 for pass in $passes; do
2076 if test "$linkmode,$pass" = "lib,link" ||
2077 test "$linkmode,$pass" = "prog,scan"; then
2078 libs="$deplibs"
2079 deplibs=
2080 fi
2081 if test "$linkmode" = prog; then
2082 case $pass in
2083 dlopen) libs="$dlfiles" ;;
2084 dlpreopen) libs="$dlprefiles" ;;
2085 link)
2086 libs="$deplibs %DEPLIBS%"
2087 test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
2088 ;;
2089 esac
2090 fi
2091 if test "$pass" = dlopen; then
2092 # Collect dlpreopened libraries
2093 save_deplibs="$deplibs"
2094 deplibs=
2095 fi
2096 for deplib in $libs; do
2097 lib=
2098 found=no
2099 case $deplib in
2100 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
2101 if test "$linkmode,$pass" = "prog,link"; then
2102 compile_deplibs="$deplib $compile_deplibs"
2103 finalize_deplibs="$deplib $finalize_deplibs"
2104 else
2105 compiler_flags="$compiler_flags $deplib"
2106 fi
2107 continue
2108 ;;
2109 -l*)
2110 if test "$linkmode" != lib && test "$linkmode" != prog; then
2111 $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
2112 continue
2113 fi
2114 name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
2115 for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
2116 for search_ext in .la $std_shrext .so .a; do
2117 # Search the libtool library
2118 lib="$searchdir/lib${name}${search_ext}"
2119 if test -f "$lib"; then
2120 if test "$search_ext" = ".la"; then
2121 found=yes
2122 else
2123 found=no
2124 fi
2125 break 2
2126 fi
2127 done
2128 done
2129 if test "$found" != yes; then
2130 # deplib doesn't seem to be a libtool library
2131 if test "$linkmode,$pass" = "prog,link"; then
2132 compile_deplibs="$deplib $compile_deplibs"
2133 finalize_deplibs="$deplib $finalize_deplibs"
2134 else
2135 deplibs="$deplib $deplibs"
2136 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
2137 fi
2138 continue
2139 else # deplib is a libtool library
2140 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
2141 # We need to do some special things here, and not later.
2142 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
2143 case " $predeps $postdeps " in
2144 *" $deplib "*)
2145 if (${SED} -e '2q' $lib |
2146 grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
2147 library_names=
2148 old_library=
2149 case $lib in
2150 */* | *\\*) . $lib ;;
2151 *) . ./$lib ;;
2152 esac
2153 for l in $old_library $library_names; do
2154 ll="$l"
2155 done
2156 if test "X$ll" = "X$old_library" ; then # only static version available
2157 found=no
2158 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2159 test "X$ladir" = "X$lib" && ladir="."
2160 lib=$ladir/$old_library
2161 if test "$linkmode,$pass" = "prog,link"; then
2162 compile_deplibs="$deplib $compile_deplibs"
2163 finalize_deplibs="$deplib $finalize_deplibs"
2164 else
2165 deplibs="$deplib $deplibs"
2166 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
2167 fi
2168 continue
2169 fi
2170 fi
2171 ;;
2172 *) ;;
2173 esac
2174 fi
2175 fi
2176 ;; # -l
2177 -L*)
2178 case $linkmode in
2179 lib)
2180 deplibs="$deplib $deplibs"
2181 test "$pass" = conv && continue
2182 newdependency_libs="$deplib $newdependency_libs"
2183 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2184 ;;
2185 prog)
2186 if test "$pass" = conv; then
2187 deplibs="$deplib $deplibs"
2188 continue
2189 fi
2190 if test "$pass" = scan; then
2191 deplibs="$deplib $deplibs"
2192 else
2193 compile_deplibs="$deplib $compile_deplibs"
2194 finalize_deplibs="$deplib $finalize_deplibs"
2195 fi
2196 newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2197 ;;
2198 *)
2199 $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
2200 ;;
2201 esac # linkmode
2202 continue
2203 ;; # -L
2204 -R*)
2205 if test "$pass" = link; then
2206 dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
2207 # Make sure the xrpath contains only unique directories.
2208 case "$xrpath " in
2209 *" $dir "*) ;;
2210 *) xrpath="$xrpath $dir" ;;
2211 esac
2212 fi
2213 deplibs="$deplib $deplibs"
2214 continue
2215 ;;
2216 *.la) lib="$deplib" ;;
2217 *.$libext)
2218 if test "$pass" = conv; then
2219 deplibs="$deplib $deplibs"
2220 continue
2221 fi
2222 case $linkmode in
2223 lib)
2224 valid_a_lib=no
2225 case $deplibs_check_method in
2226 match_pattern*)
2227 set dummy $deplibs_check_method
2228 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2229 if eval $echo \"$deplib\" 2>/dev/null \
2230 | $SED 10q \
2231 | $EGREP "$match_pattern_regex" > /dev/null; then
2232 valid_a_lib=yes
2233 fi
2234 ;;
2235 pass_all)
2236 valid_a_lib=yes
2237 ;;
2238 esac
2239 if test "$valid_a_lib" != yes; then
2240 $echo
2241 $echo "*** Warning: Trying to link with static lib archive $deplib."
2242 $echo "*** I have the capability to make that library automatically link in when"
2243 $echo "*** you link to this library. But I can only do this if you have a"
2244 $echo "*** shared version of the library, which you do not appear to have"
2245 $echo "*** because the file extensions .$libext of this argument makes me believe"
2246 $echo "*** that it is just a static archive that I should not used here."
2247 else
2248 $echo
2249 $echo "*** Warning: Linking the shared library $output against the"
2250 $echo "*** static library $deplib is not portable!"
2251 deplibs="$deplib $deplibs"
2252 fi
2253 continue
2254 ;;
2255 prog)
2256 if test "$pass" != link; then
2257 deplibs="$deplib $deplibs"
2258 else
2259 compile_deplibs="$deplib $compile_deplibs"
2260 finalize_deplibs="$deplib $finalize_deplibs"
2261 fi
2262 continue
2263 ;;
2264 esac # linkmode
2265 ;; # *.$libext
2266 *.lo | *.$objext)
2267 if test "$pass" = conv; then
2268 deplibs="$deplib $deplibs"
2269 elif test "$linkmode" = prog; then
2270 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
2271 # If there is no dlopen support or we're linking statically,
2272 # we need to preload.
2273 newdlprefiles="$newdlprefiles $deplib"
2274 compile_deplibs="$deplib $compile_deplibs"
2275 finalize_deplibs="$deplib $finalize_deplibs"
2276 else
2277 newdlfiles="$newdlfiles $deplib"
2278 fi
2279 fi
2280 continue
2281 ;;
2282 %DEPLIBS%)
2283 alldeplibs=yes
2284 continue
2285 ;;
2286 esac # case $deplib
2287 if test "$found" = yes || test -f "$lib"; then :
2288 else
2289 $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
2290 exit $EXIT_FAILURE
2291 fi
2292
2293 # Check to see that this really is a libtool archive.
2294 if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
2295 else
2296 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
2297 exit $EXIT_FAILURE
2298 fi
2299
2300 ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2301 test "X$ladir" = "X$lib" && ladir="."
2302
2303 dlname=
2304 dlopen=
2305 dlpreopen=
2306 libdir=
2307 library_names=
2308 old_library=
2309 # If the library was installed with an old release of libtool,
2310 # it will not redefine variables installed, or shouldnotlink
2311 installed=yes
2312 shouldnotlink=no
2313 avoidtemprpath=
2314
2315
2316 # Read the .la file
2317 case $lib in
2318 */* | *\\*) . $lib ;;
2319 *) . ./$lib ;;
2320 esac
2321
2322 if test "$linkmode,$pass" = "lib,link" ||
2323 test "$linkmode,$pass" = "prog,scan" ||
2324 { test "$linkmode" != prog && test "$linkmode" != lib; }; then
2325 test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
2326 test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
2327 fi
2328
2329 if test "$pass" = conv; then
2330 # Only check for convenience libraries
2331 deplibs="$lib $deplibs"
2332 if test -z "$libdir"; then
2333 if test -z "$old_library"; then
2334 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2335 exit $EXIT_FAILURE
2336 fi
2337 # It is a libtool convenience library, so add in its objects.
2338 convenience="$convenience $ladir/$objdir/$old_library"
2339 old_convenience="$old_convenience $ladir/$objdir/$old_library"
2340 tmp_libs=
2341 for deplib in $dependency_libs; do
2342 deplibs="$deplib $deplibs"
2343 if test "X$duplicate_deps" = "Xyes" ; then
2344 case "$tmp_libs " in
2345 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2346 esac
2347 fi
2348 tmp_libs="$tmp_libs $deplib"
2349 done
2350 elif test "$linkmode" != prog && test "$linkmode" != lib; then
2351 $echo "$modename: \`$lib' is not a convenience library" 1>&2
2352 exit $EXIT_FAILURE
2353 fi
2354 continue
2355 fi # $pass = conv
2356
2357
2358 # Get the name of the library we link against.
2359 linklib=
2360 for l in $old_library $library_names; do
2361 linklib="$l"
2362 done
2363 if test -z "$linklib"; then
2364 $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2365 exit $EXIT_FAILURE
2366 fi
2367
2368 # This library was specified with -dlopen.
2369 if test "$pass" = dlopen; then
2370 if test -z "$libdir"; then
2371 $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
2372 exit $EXIT_FAILURE
2373 fi
2374 if test -z "$dlname" ||
2375 test "$dlopen_support" != yes ||
2376 test "$build_libtool_libs" = no; then
2377 # If there is no dlname, no dlopen support or we're linking
2378 # statically, we need to preload. We also need to preload any
2379 # dependent libraries so libltdl's deplib preloader doesn't
2380 # bomb out in the load deplibs phase.
2381 dlprefiles="$dlprefiles $lib $dependency_libs"
2382 else
2383 newdlfiles="$newdlfiles $lib"
2384 fi
2385 continue
2386 fi # $pass = dlopen
2387
2388 # We need an absolute path.
2389 case $ladir in
2390 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
2391 *)
2392 abs_ladir=`cd "$ladir" && pwd`
2393 if test -z "$abs_ladir"; then
2394 $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
2395 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
2396 abs_ladir="$ladir"
2397 fi
2398 ;;
2399 esac
2400 laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
2401
2402 # Find the relevant object directory and library name.
2403 if test "X$installed" = Xyes; then
2404 if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2405 $echo "$modename: warning: library \`$lib' was moved." 1>&2
2406 dir="$ladir"
2407 absdir="$abs_ladir"
2408 libdir="$abs_ladir"
2409 else
2410 dir="$libdir"
2411 absdir="$libdir"
2412 fi
2413 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
2414 else
2415 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2416 dir="$ladir"
2417 absdir="$abs_ladir"
2418 # Remove this search path later
2419 notinst_path="$notinst_path $abs_ladir"
2420 else
2421 dir="$ladir/$objdir"
2422 absdir="$abs_ladir/$objdir"
2423 # Remove this search path later
2424 notinst_path="$notinst_path $abs_ladir"
2425 fi
2426 fi # $installed = yes
2427 name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2428
2429 # This library was specified with -dlpreopen.
2430 if test "$pass" = dlpreopen; then
2431 if test -z "$libdir"; then
2432 $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
2433 exit $EXIT_FAILURE
2434 fi
2435 # Prefer using a static library (so that no silly _DYNAMIC symbols
2436 # are required to link).
2437 if test -n "$old_library"; then
2438 newdlprefiles="$newdlprefiles $dir/$old_library"
2439 # Otherwise, use the dlname, so that lt_dlopen finds it.
2440 elif test -n "$dlname"; then
2441 newdlprefiles="$newdlprefiles $dir/$dlname"
2442 else
2443 newdlprefiles="$newdlprefiles $dir/$linklib"
2444 fi
2445 fi # $pass = dlpreopen
2446
2447 if test -z "$libdir"; then
2448 # Link the convenience library
2449 if test "$linkmode" = lib; then
2450 deplibs="$dir/$old_library $deplibs"
2451 elif test "$linkmode,$pass" = "prog,link"; then
2452 compile_deplibs="$dir/$old_library $compile_deplibs"
2453 finalize_deplibs="$dir/$old_library $finalize_deplibs"
2454 else
2455 deplibs="$lib $deplibs" # used for prog,scan pass
2456 fi
2457 continue
2458 fi
2459
2460
2461 if test "$linkmode" = prog && test "$pass" != link; then
2462 newlib_search_path="$newlib_search_path $ladir"
2463 deplibs="$lib $deplibs"
2464
2465 linkalldeplibs=no
2466 if test "$link_all_deplibs" != no || test -z "$library_names" ||
2467 test "$build_libtool_libs" = no; then
2468 linkalldeplibs=yes
2469 fi
2470
2471 tmp_libs=
2472 for deplib in $dependency_libs; do
2473 case $deplib in
2474 -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
2475 esac
2476 # Need to link against all dependency_libs?
2477 if test "$linkalldeplibs" = yes; then
2478 deplibs="$deplib $deplibs"
2479 else
2480 # Need to hardcode shared library paths
2481 # or/and link against static libraries
2482 newdependency_libs="$deplib $newdependency_libs"
2483 fi
2484 if test "X$duplicate_deps" = "Xyes" ; then
2485 case "$tmp_libs " in
2486 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2487 esac
2488 fi
2489 tmp_libs="$tmp_libs $deplib"
2490 done # for deplib
2491 continue
2492 fi # $linkmode = prog...
2493
2494 if test "$linkmode,$pass" = "prog,link"; then
2495 if test -n "$library_names" &&
2496 { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
2497 # We need to hardcode the library path
2498 if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
2499 # Make sure the rpath contains only unique directories.
2500 case "$temp_rpath " in
2501 *" $dir "*) ;;
2502 *" $absdir "*) ;;
2503 *) temp_rpath="$temp_rpath $absdir" ;;
2504 esac
2505 fi
2506
2507 # Hardcode the library path.
2508 # Skip directories that are in the system default run-time
2509 # search path.
2510 case " $sys_lib_dlsearch_path " in
2511 *" $absdir "*) ;;
2512 *)
2513 case "$compile_rpath " in
2514 *" $absdir "*) ;;
2515 *) compile_rpath="$compile_rpath $absdir"
2516 esac
2517 ;;
2518 esac
2519 case " $sys_lib_dlsearch_path " in
2520 *" $libdir "*) ;;
2521 *)
2522 case "$finalize_rpath " in
2523 *" $libdir "*) ;;
2524 *) finalize_rpath="$finalize_rpath $libdir"
2525 esac
2526 ;;
2527 esac
2528 fi # $linkmode,$pass = prog,link...
2529
2530 if test "$alldeplibs" = yes &&
2531 { test "$deplibs_check_method" = pass_all ||
2532 { test "$build_libtool_libs" = yes &&
2533 test -n "$library_names"; }; }; then
2534 # We only need to search for static libraries
2535 continue
2536 fi
2537 fi
2538
2539 link_static=no # Whether the deplib will be linked statically
2540 use_static_libs=$prefer_static_libs
2541 if test "$use_static_libs" = built && test "$installed" = yes ; then
2542 use_static_libs=no
2543 fi
2544 if test -n "$library_names" &&
2545 { test "$use_static_libs" = no || test -z "$old_library"; }; then
2546 if test "$installed" = no; then
2547 notinst_deplibs="$notinst_deplibs $lib"
2548 need_relink=yes
2549 fi
2550 # This is a shared library
2551
2552 # Warn about portability, can't link against -module's on
2553 # some systems (darwin)
2554 if test "$shouldnotlink" = yes && test "$pass" = link ; then
2555 $echo
2556 if test "$linkmode" = prog; then
2557 $echo "*** Warning: Linking the executable $output against the loadable module"
2558 else
2559 $echo "*** Warning: Linking the shared library $output against the loadable module"
2560 fi
2561 $echo "*** $linklib is not portable!"
2562 fi
2563 if test "$linkmode" = lib &&
2564 test "$hardcode_into_libs" = yes; then
2565 # Hardcode the library path.
2566 # Skip directories that are in the system default run-time
2567 # search path.
2568 case " $sys_lib_dlsearch_path " in
2569 *" $absdir "*) ;;
2570 *)
2571 case "$compile_rpath " in
2572 *" $absdir "*) ;;
2573 *) compile_rpath="$compile_rpath $absdir"
2574 esac
2575 ;;
2576 esac
2577 case " $sys_lib_dlsearch_path " in
2578 *" $libdir "*) ;;
2579 *)
2580 case "$finalize_rpath " in
2581 *" $libdir "*) ;;
2582 *) finalize_rpath="$finalize_rpath $libdir"
2583 esac
2584 ;;
2585 esac
2586 fi
2587
2588 if test -n "$old_archive_from_expsyms_cmds"; then
2589 # figure out the soname
2590 set dummy $library_names
2591 realname="$2"
2592 shift; shift
2593 libname=`eval \\$echo \"$libname_spec\"`
2594 # use dlname if we got it. it's perfectly good, no?
2595 if test -n "$dlname"; then
2596 soname="$dlname"
2597 elif test -n "$soname_spec"; then
2598 # bleh windows
2599 case $host in
2600 *cygwin* | mingw*)
2601 major=`expr $current - $age`
2602 versuffix="-$major"
2603 ;;
2604 esac
2605 eval soname=\"$soname_spec\"
2606 else
2607 soname="$realname"
2608 fi
2609
2610 # Make a new name for the extract_expsyms_cmds to use
2611 soroot="$soname"
2612 soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
2613 newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
2614
2615 # If the library has no export list, then create one now
2616 if test -f "$output_objdir/$soname-def"; then :
2617 else
2618 $show "extracting exported symbol list from \`$soname'"
2619 save_ifs="$IFS"; IFS='~'
2620 cmds=$extract_expsyms_cmds
2621 for cmd in $cmds; do
2622 IFS="$save_ifs"
2623 eval cmd=\"$cmd\"
2624 $show "$cmd"
2625 $run eval "$cmd" || exit $?
2626 done
2627 IFS="$save_ifs"
2628 fi
2629
2630 # Create $newlib
2631 if test -f "$output_objdir/$newlib"; then :; else
2632 $show "generating import library for \`$soname'"
2633 save_ifs="$IFS"; IFS='~'
2634 cmds=$old_archive_from_expsyms_cmds
2635 for cmd in $cmds; do
2636 IFS="$save_ifs"
2637 eval cmd=\"$cmd\"
2638 $show "$cmd"
2639 $run eval "$cmd" || exit $?
2640 done
2641 IFS="$save_ifs"
2642 fi
2643 # make sure the library variables are pointing to the new library
2644 dir=$output_objdir
2645 linklib=$newlib
2646 fi # test -n "$old_archive_from_expsyms_cmds"
2647
2648 if test "$linkmode" = prog || test "$mode" != relink; then
2649 add_shlibpath=
2650 add_dir=
2651 add=
2652 lib_linked=yes
2653 case $hardcode_action in
2654 immediate | unsupported)
2655 if test "$hardcode_direct" = no; then
2656 add="$dir/$linklib"
2657 case $host in
2658 *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
2659 *-*-sysv4*uw2*) add_dir="-L$dir" ;;
2660 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
2661 *-*-unixware7*) add_dir="-L$dir" ;;
2662 *-*-darwin* )
2663 # if the lib is a module then we can not link against
2664 # it, someone is ignoring the new warnings I added
2665 if /usr/bin/file -L $add 2> /dev/null |
2666 $EGREP ": [^:]* bundle" >/dev/null ; then
2667 $echo "** Warning, lib $linklib is a module, not a shared library"
2668 if test -z "$old_library" ; then
2669 $echo
2670 $echo "** And there doesn't seem to be a static archive available"
2671 $echo "** The link will probably fail, sorry"
2672 else
2673 add="$dir/$old_library"
2674 fi
2675 fi
2676 esac
2677 elif test "$hardcode_minus_L" = no; then
2678 case $host in
2679 *-*-sunos*) add_shlibpath="$dir" ;;
2680 esac
2681 add_dir="-L$dir"
2682 add="-l$name"
2683 elif test "$hardcode_shlibpath_var" = no; then
2684 add_shlibpath="$dir"
2685 add="-l$name"
2686 else
2687 lib_linked=no
2688 fi
2689 ;;
2690 relink)
2691 if test "$hardcode_direct" = yes; then
2692 add="$dir/$linklib"
2693 elif test "$hardcode_minus_L" = yes; then
2694 add_dir="-L$dir"
2695 # Try looking first in the location we're being installed to.
2696 if test -n "$inst_prefix_dir"; then
2697 case $libdir in
2698 [\\/]*)
2699 add_dir="$add_dir -L$inst_prefix_dir$libdir"
2700 ;;
2701 esac
2702 fi
2703 add="-l$name"
2704 elif test "$hardcode_shlibpath_var" = yes; then
2705 add_shlibpath="$dir"
2706 add="-l$name"
2707 else
2708 lib_linked=no
2709 fi
2710 ;;
2711 *) lib_linked=no ;;
2712 esac
2713
2714 if test "$lib_linked" != yes; then
2715 $echo "$modename: configuration error: unsupported hardcode properties"
2716 exit $EXIT_FAILURE
2717 fi
2718
2719 if test -n "$add_shlibpath"; then
2720 case :$compile_shlibpath: in
2721 *":$add_shlibpath:"*) ;;
2722 *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
2723 esac
2724 fi
2725 if test "$linkmode" = prog; then
2726 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
2727 test -n "$add" && compile_deplibs="$add $compile_deplibs"
2728 else
2729 test -n "$add_dir" && deplibs="$add_dir $deplibs"
2730 test -n "$add" && deplibs="$add $deplibs"
2731 if test "$hardcode_direct" != yes && \
2732 test "$hardcode_minus_L" != yes && \
2733 test "$hardcode_shlibpath_var" = yes; then
2734 case :$finalize_shlibpath: in
2735 *":$libdir:"*) ;;
2736 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
2737 esac
2738 fi
2739 fi
2740 fi
2741
2742 if test "$linkmode" = prog || test "$mode" = relink; then
2743 add_shlibpath=
2744 add_dir=
2745 add=
2746 # Finalize command for both is simple: just hardcode it.
2747 if test "$hardcode_direct" = yes; then
2748 add="$libdir/$linklib"
2749 elif test "$hardcode_minus_L" = yes; then
2750 add_dir="-L$libdir"
2751 add="-l$name"
2752 elif test "$hardcode_shlibpath_var" = yes; then
2753 case :$finalize_shlibpath: in
2754 *":$libdir:"*) ;;
2755 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
2756 esac
2757 add="-l$name"
2758 elif test "$hardcode_automatic" = yes; then
2759 if test -n "$inst_prefix_dir" &&
2760 test -f "$inst_prefix_dir$libdir/$linklib" ; then
2761 add="$inst_prefix_dir$libdir/$linklib"
2762 else
2763 add="$libdir/$linklib"
2764 fi
2765 else
2766 # We cannot seem to hardcode it, guess we'll fake it.
2767 add_dir="-L$libdir"
2768 # Try looking first in the location we're being installed to.
2769 if test -n "$inst_prefix_dir"; then
2770 case $libdir in
2771 [\\/]*)
2772 add_dir="$add_dir -L$inst_prefix_dir$libdir"
2773 ;;
2774 esac
2775 fi
2776 add="-l$name"
2777 fi
2778
2779 if test "$linkmode" = prog; then
2780 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
2781 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
2782 else
2783 test -n "$add_dir" && deplibs="$add_dir $deplibs"
2784 test -n "$add" && deplibs="$add $deplibs"
2785 fi
2786 fi
2787 elif test "$linkmode" = prog; then
2788 # Here we assume that one of hardcode_direct or hardcode_minus_L
2789 # is not unsupported. This is valid on all known static and
2790 # shared platforms.
2791 if test "$hardcode_direct" != unsupported; then
2792 test -n "$old_library" && linklib="$old_library"
2793 compile_deplibs="$dir/$linklib $compile_deplibs"
2794 finalize_deplibs="$dir/$linklib $finalize_deplibs"
2795 else
2796 compile_deplibs="-l$name -L$dir $compile_deplibs"
2797 finalize_deplibs="-l$name -L$dir $finalize_deplibs"
2798 fi
2799 elif test "$build_libtool_libs" = yes; then
2800 # Not a shared library
2801 if test "$deplibs_check_method" != pass_all; then
2802 # We're trying link a shared library against a static one
2803 # but the system doesn't support it.
2804
2805 # Just print a warning and add the library to dependency_libs so
2806 # that the program can be linked against the static library.
2807 $echo
2808 $echo "*** Warning: This system can not link to static lib archive $lib."
2809 $echo "*** I have the capability to make that library automatically link in when"
2810 $echo "*** you link to this library. But I can only do this if you have a"
2811 $echo "*** shared version of the library, which you do not appear to have."
2812 if test "$module" = yes; then
2813 $echo "*** But as you try to build a module library, libtool will still create "
2814 $echo "*** a static module, that should work as long as the dlopening application"
2815 $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
2816 if test -z "$global_symbol_pipe"; then
2817 $echo
2818 $echo "*** However, this would only work if libtool was able to extract symbol"
2819 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
2820 $echo "*** not find such a program. So, this module is probably useless."
2821 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
2822 fi
2823 if test "$build_old_libs" = no; then
2824 build_libtool_libs=module
2825 build_old_libs=yes
2826 else
2827 build_libtool_libs=no
2828 fi
2829 fi
2830 else
2831 deplibs="$dir/$old_library $deplibs"
2832 link_static=yes
2833 fi
2834 fi # link shared/static library?
2835
2836 if test "$linkmode" = lib; then
2837 if test -n "$dependency_libs" &&
2838 { test "$hardcode_into_libs" != yes ||
2839 test "$build_old_libs" = yes ||
2840 test "$link_static" = yes; }; then
2841 # Extract -R from dependency_libs
2842 temp_deplibs=
2843 for libdir in $dependency_libs; do
2844 case $libdir in
2845 -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
2846 case " $xrpath " in
2847 *" $temp_xrpath "*) ;;
2848 *) xrpath="$xrpath $temp_xrpath";;
2849 esac;;
2850 *) temp_deplibs="$temp_deplibs $libdir";;
2851 esac
2852 done
2853 dependency_libs="$temp_deplibs"
2854 fi
2855
2856 newlib_search_path="$newlib_search_path $absdir"
2857 # Link against this library
2858 test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
2859 # ... and its dependency_libs
2860 tmp_libs=
2861 for deplib in $dependency_libs; do
2862 newdependency_libs="$deplib $newdependency_libs"
2863 if test "X$duplicate_deps" = "Xyes" ; then
2864 case "$tmp_libs " in
2865 *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2866 esac
2867 fi
2868 tmp_libs="$tmp_libs $deplib"
2869 done
2870
2871 if test "$link_all_deplibs" != no; then
2872 # Add the search paths of all dependency libraries
2873 for deplib in $dependency_libs; do
2874 case $deplib in
2875 -L*) path="$deplib" ;;
2876 *.la)
2877 dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
2878 test "X$dir" = "X$deplib" && dir="."
2879 # We need an absolute path.
2880 case $dir in
2881 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
2882 *)
2883 absdir=`cd "$dir" && pwd`
2884 if test -z "$absdir"; then
2885 $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
2886 absdir="$dir"
2887 fi
2888 ;;
2889 esac
2890 if grep "^installed=no" $deplib > /dev/null; then
2891 path="$absdir/$objdir"
2892 else
2893 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
2894 if test -z "$libdir"; then
2895 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
2896 exit $EXIT_FAILURE
2897 fi
2898 if test "$absdir" != "$libdir"; then
2899 $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
2900 fi
2901 path="$absdir"
2902 fi
2903 depdepl=
2904 case $host in
2905 *-*-darwin*)
2906 # we do not want to link against static libs,
2907 # but need to link against shared
2908 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
2909 if test -n "$deplibrary_names" ; then
2910 for tmp in $deplibrary_names ; do
2911 depdepl=$tmp
2912 done
2913 if test -f "$path/$depdepl" ; then
2914 depdepl="$path/$depdepl"
2915 fi
2916 # do not add paths which are already there
2917 case " $newlib_search_path " in
2918 *" $path "*) ;;
2919 *) newlib_search_path="$newlib_search_path $path";;
2920 esac
2921 fi
2922 path=""
2923 ;;
2924 *)
2925 path="-L$path"
2926 ;;
2927 esac
2928 ;;
2929 -l*)
2930 case $host in
2931 *-*-darwin*)
2932 # Again, we only want to link against shared libraries
2933 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
2934 for tmp in $newlib_search_path ; do
2935 if test -f "$tmp/lib$tmp_libs.dylib" ; then
2936 eval depdepl="$tmp/lib$tmp_libs.dylib"
2937 break
2938 fi
2939 done
2940 path=""
2941 ;;
2942 *) continue ;;
2943 esac
2944 ;;
2945 *) continue ;;
2946 esac
2947 case " $deplibs " in
2948 *" $path "*) ;;
2949 *) deplibs="$path $deplibs" ;;
2950 esac
2951 case " $deplibs " in
2952 *" $depdepl "*) ;;
2953 *) deplibs="$depdepl $deplibs" ;;
2954 esac
2955 done
2956 fi # link_all_deplibs != no
2957 fi # linkmode = lib
2958 done # for deplib in $libs
2959 dependency_libs="$newdependency_libs"
2960 if test "$pass" = dlpreopen; then
2961 # Link the dlpreopened libraries before other libraries
2962 for deplib in $save_deplibs; do
2963 deplibs="$deplib $deplibs"
2964 done
2965 fi
2966 if test "$pass" != dlopen; then
2967 if test "$pass" != conv; then
2968 # Make sure lib_search_path contains only unique directories.
2969 lib_search_path=
2970 for dir in $newlib_search_path; do
2971 case "$lib_search_path " in
2972 *" $dir "*) ;;
2973 *) lib_search_path="$lib_search_path $dir" ;;
2974 esac
2975 done
2976 newlib_search_path=
2977 fi
2978
2979 if test "$linkmode,$pass" != "prog,link"; then
2980 vars="deplibs"
2981 else
2982 vars="compile_deplibs finalize_deplibs"
2983 fi
2984 for var in $vars dependency_libs; do
2985 # Add libraries to $var in reverse order
2986 eval tmp_libs=\"\$$var\"
2987 new_libs=
2988 for deplib in $tmp_libs; do
2989 # FIXME: Pedantically, this is the right thing to do, so
2990 # that some nasty dependency loop isn't accidentally
2991 # broken:
2992 #new_libs="$deplib $new_libs"
2993 # Pragmatically, this seems to cause very few problems in
2994 # practice:
2995 case $deplib in
2996 -L*) new_libs="$deplib $new_libs" ;;
2997 -R*) ;;
2998 *)
2999 # And here is the reason: when a library appears more
3000 # than once as an explicit dependence of a library, or
3001 # is implicitly linked in more than once by the
3002 # compiler, it is considered special, and multiple
3003 # occurrences thereof are not removed. Compare this
3004 # with having the same library being listed as a
3005 # dependency of multiple other libraries: in this case,
3006 # we know (pedantically, we assume) the library does not
3007 # need to be listed more than once, so we keep only the
3008 # last copy. This is not always right, but it is rare
3009 # enough that we require users that really mean to play
3010 # such unportable linking tricks to link the library
3011 # using -Wl,-lname, so that libtool does not consider it
3012 # for duplicate removal.
3013 case " $specialdeplibs " in
3014 *" $deplib "*) new_libs="$deplib $new_libs" ;;
3015 *)
3016 case " $new_libs " in
3017 *" $deplib "*) ;;
3018 *) new_libs="$deplib $new_libs" ;;
3019 esac
3020 ;;
3021 esac
3022 ;;
3023 esac
3024 done
3025 tmp_libs=
3026 for deplib in $new_libs; do
3027 case $deplib in
3028 -L*)
3029 case " $tmp_libs " in
3030 *" $deplib "*) ;;
3031 *) tmp_libs="$tmp_libs $deplib" ;;
3032 esac
3033 ;;
3034 *) tmp_libs="$tmp_libs $deplib" ;;
3035 esac
3036 done
3037 eval $var=\"$tmp_libs\"
3038 done # for var
3039 fi
3040 # Last step: remove runtime libs from dependency_libs
3041 # (they stay in deplibs)
3042 tmp_libs=
3043 for i in $dependency_libs ; do
3044 case " $predeps $postdeps $compiler_lib_search_path " in
3045 *" $i "*)
3046 i=""
3047 ;;
3048 esac
3049 if test -n "$i" ; then
3050 tmp_libs="$tmp_libs $i"
3051 fi
3052 done
3053 dependency_libs=$tmp_libs
3054 done # for pass
3055 if test "$linkmode" = prog; then
3056 dlfiles="$newdlfiles"
3057 dlprefiles="$newdlprefiles"
3058 fi
3059
3060 case $linkmode in
3061 oldlib)
3062 if test -n "$deplibs"; then
3063 $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
3064 fi
3065
3066 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3067 $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
3068 fi
3069
3070 if test -n "$rpath"; then
3071 $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
3072 fi
3073
3074 if test -n "$xrpath"; then
3075 $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
3076 fi
3077
3078 if test -n "$vinfo"; then
3079 $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
3080 fi
3081
3082 if test -n "$release"; then
3083 $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
3084 fi
3085
3086 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
3087 $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
3088 fi
3089
3090 # Now set the variables for building old libraries.
3091 build_libtool_libs=no
3092 oldlibs="$output"
3093 objs="$objs$old_deplibs"
3094 ;;
3095
3096 lib)
3097 # Make sure we only generate libraries of the form `libNAME.la'.
3098 case $outputname in
3099 lib*)
3100 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
3101 eval shared_ext=\"$shrext_cmds\"
3102 eval libname=\"$libname_spec\"
3103 ;;
3104 *)
3105 if test "$module" = no; then
3106 $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
3107 $echo "$help" 1>&2
3108 exit $EXIT_FAILURE
3109 fi
3110 if test "$need_lib_prefix" != no; then
3111 # Add the "lib" prefix for modules if required
3112 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3113 eval shared_ext=\"$shrext_cmds\"
3114 eval libname=\"$libname_spec\"
3115 else
3116 libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3117 fi
3118 ;;
3119 esac
3120
3121 if test -n "$objs"; then
3122 if test "$deplibs_check_method" != pass_all; then
3123 $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
3124 exit $EXIT_FAILURE
3125 else
3126 $echo
3127 $echo "*** Warning: Linking the shared library $output against the non-libtool"
3128 $echo "*** objects $objs is not portable!"
3129 libobjs="$libobjs $objs"
3130 fi
3131 fi
3132
3133 if test "$dlself" != no; then
3134 $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
3135 fi
3136
3137 set dummy $rpath
3138 if test "$#" -gt 2; then
3139 $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
3140 fi
3141 install_libdir="$2"
3142
3143 oldlibs=
3144 if test -z "$rpath"; then
3145 if test "$build_libtool_libs" = yes; then
3146 # Building a libtool convenience library.
3147 # Some compilers have problems with a `.al' extension so
3148 # convenience libraries should have the same extension an
3149 # archive normally would.
3150 oldlibs="$output_objdir/$libname.$libext $oldlibs"
3151 build_libtool_libs=convenience
3152 build_old_libs=yes
3153 fi
3154
3155 if test -n "$vinfo"; then
3156 $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
3157 fi
3158
3159 if test -n "$release"; then
3160 $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
3161 fi
3162 else
3163
3164 # Parse the version information argument.
3165 save_ifs="$IFS"; IFS=':'
3166 set dummy $vinfo 0 0 0
3167 IFS="$save_ifs"
3168
3169 if test -n "$8"; then
3170 $echo "$modename: too many parameters to \`-version-info'" 1>&2
3171 $echo "$help" 1>&2
3172 exit $EXIT_FAILURE
3173 fi
3174
3175 # convert absolute version numbers to libtool ages
3176 # this retains compatibility with .la files and attempts
3177 # to make the code below a bit more comprehensible
3178
3179 case $vinfo_number in
3180 yes)
3181 number_major="$2"
3182 number_minor="$3"
3183 number_revision="$4"
3184 #
3185 # There are really only two kinds -- those that
3186 # use the current revision as the major version
3187 # and those that subtract age and use age as
3188 # a minor version. But, then there is irix
3189 # which has an extra 1 added just for fun
3190 #
3191 case $version_type in
3192 darwin|linux|osf|windows)
3193 current=`expr $number_major + $number_minor`
3194 age="$number_minor"
3195 revision="$number_revision"
3196 ;;
3197 freebsd-aout|freebsd-elf|sunos)
3198 current="$number_major"
3199 revision="$number_minor"
3200 age="0"
3201 ;;
3202 irix|nonstopux)
3203 current=`expr $number_major + $number_minor - 1`
3204 age="$number_minor"
3205 revision="$number_minor"
3206 ;;
3207 *)
3208 $echo "$modename: unknown library version type \`$version_type'" 1>&2
3209 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
3210 exit $EXIT_FAILURE
3211 ;;
3212 esac
3213 ;;
3214 no)
3215 current="$2"
3216 revision="$3"
3217 age="$4"
3218 ;;
3219 esac
3220
3221 # Check that each of the things are valid numbers.
3222 case $current in
3223 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
3224 *)
3225 $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
3226 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3227 exit $EXIT_FAILURE
3228 ;;
3229 esac
3230
3231 case $revision in
3232 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
3233 *)
3234 $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
3235 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3236 exit $EXIT_FAILURE
3237 ;;
3238 esac
3239
3240 case $age in
3241 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
3242 *)
3243 $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
3244 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3245 exit $EXIT_FAILURE
3246 ;;
3247 esac
3248
3249 if test "$age" -gt "$current"; then
3250 $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
3251 $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3252 exit $EXIT_FAILURE
3253 fi
3254
3255 # Calculate the version variables.
3256 major=
3257 versuffix=
3258 verstring=
3259 case $version_type in
3260 none) ;;
3261
3262 darwin)
3263 # Like Linux, but with the current version available in
3264 # verstring for coding it into the library header
3265 major=.`expr $current - $age`
3266 versuffix="$major.$age.$revision"
3267 # Darwin ld doesn't like 0 for these options...
3268 minor_current=`expr $current + 1`
3269 verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
3270 ;;
3271
3272 freebsd-aout)
3273 major=".$current"
3274 versuffix=".$current.$revision";
3275 ;;
3276
3277 freebsd-elf)
3278 major=".$current"
3279 versuffix=".$current";
3280 ;;
3281
3282 irix | nonstopux)
3283 major=`expr $current - $age + 1`
3284
3285 case $version_type in
3286 nonstopux) verstring_prefix=nonstopux ;;
3287 *) verstring_prefix=sgi ;;
3288 esac
3289 verstring="$verstring_prefix$major.$revision"
3290
3291 # Add in all the interfaces that we are compatible with.
3292 loop=$revision
3293 while test "$loop" -ne 0; do
3294 iface=`expr $revision - $loop`
3295 loop=`expr $loop - 1`
3296 verstring="$verstring_prefix$major.$iface:$verstring"
3297 done
3298
3299 # Before this point, $major must not contain `.'.
3300 major=.$major
3301 versuffix="$major.$revision"
3302 ;;
3303
3304 linux)
3305 major=.`expr $current - $age`
3306 versuffix="$major.$age.$revision"
3307 ;;
3308
3309 osf)
3310 major=.`expr $current - $age`
3311 versuffix=".$current.$age.$revision"
3312 verstring="$current.$age.$revision"
3313
3314 # Add in all the interfaces that we are compatible with.
3315 loop=$age
3316 while test "$loop" -ne 0; do
3317 iface=`expr $current - $loop`
3318 loop=`expr $loop - 1`
3319 verstring="$verstring:${iface}.0"
3320 done
3321
3322 # Make executables depend on our current version.
3323 verstring="$verstring:${current}.0"
3324 ;;
3325
3326 sunos)
3327 major=".$current"
3328 versuffix=".$current.$revision"
3329 ;;
3330
3331 windows)
3332 # Use '-' rather than '.', since we only want one
3333 # extension on DOS 8.3 filesystems.
3334 major=`expr $current - $age`
3335 versuffix="-$major"
3336 ;;
3337
3338 *)
3339 $echo "$modename: unknown library version type \`$version_type'" 1>&2
3340 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
3341 exit $EXIT_FAILURE
3342 ;;
3343 esac
3344
3345 # Clear the version info if we defaulted, and they specified a release.
3346 if test -z "$vinfo" && test -n "$release"; then
3347 major=
3348 case $version_type in
3349 darwin)
3350 # we can't check for "0.0" in archive_cmds due to quoting
3351 # problems, so we reset it completely
3352 verstring=
3353 ;;
3354 *)
3355 verstring="0.0"
3356 ;;
3357 esac
3358 if test "$need_version" = no; then
3359 versuffix=
3360 else
3361 versuffix=".0.0"
3362 fi
3363 fi
3364
3365 # Remove version info from name if versioning should be avoided
3366 if test "$avoid_version" = yes && test "$need_version" = no; then
3367 major=
3368 versuffix=
3369 verstring=""
3370 fi
3371
3372 # Check to see if the archive will have undefined symbols.
3373 if test "$allow_undefined" = yes; then
3374 if test "$allow_undefined_flag" = unsupported; then
3375 $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
3376 build_libtool_libs=no
3377 build_old_libs=yes
3378 fi
3379 else
3380 # Don't allow undefined symbols.
3381 allow_undefined_flag="$no_undefined_flag"
3382 fi
3383 fi
3384
3385 if test "$mode" != relink; then
3386 # Remove our outputs, but don't remove object files since they
3387 # may have been created when compiling PIC objects.
3388 removelist=
3389 tempremovelist=`$echo "$output_objdir/*"`
3390 for p in $tempremovelist; do
3391 case $p in
3392 *.$objext)
3393 ;;
3394 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
3395 if test "X$precious_files_regex" != "X"; then
3396 if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
3397 then
3398 continue
3399 fi
3400 fi
3401 removelist="$removelist $p"
3402 ;;
3403 *) ;;
3404 esac
3405 done
3406 if test -n "$removelist"; then
3407 $show "${rm}r $removelist"
3408 $run ${rm}r $removelist
3409 fi
3410 fi
3411
3412 # Now set the variables for building old libraries.
3413 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
3414 oldlibs="$oldlibs $output_objdir/$libname.$libext"
3415
3416 # Transform .lo files to .o files.
3417 oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
3418 fi
3419
3420 # Eliminate all temporary directories.
3421 for path in $notinst_path; do
3422 lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
3423 deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
3424 dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
3425 done
3426
3427 if test -n "$xrpath"; then
3428 # If the user specified any rpath flags, then add them.
3429 temp_xrpath=
3430 for libdir in $xrpath; do
3431 temp_xrpath="$temp_xrpath -R$libdir"
3432 case "$finalize_rpath " in
3433 *" $libdir "*) ;;
3434 *) finalize_rpath="$finalize_rpath $libdir" ;;
3435 esac
3436 done
3437 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
3438 dependency_libs="$temp_xrpath $dependency_libs"
3439 fi
3440 fi
3441
3442 # Make sure dlfiles contains only unique files that won't be dlpreopened
3443 old_dlfiles="$dlfiles"
3444 dlfiles=
3445 for lib in $old_dlfiles; do
3446 case " $dlprefiles $dlfiles " in
3447 *" $lib "*) ;;
3448 *) dlfiles="$dlfiles $lib" ;;
3449 esac
3450 done
3451
3452 # Make sure dlprefiles contains only unique files
3453 old_dlprefiles="$dlprefiles"
3454 dlprefiles=
3455 for lib in $old_dlprefiles; do
3456 case "$dlprefiles " in
3457 *" $lib "*) ;;
3458 *) dlprefiles="$dlprefiles $lib" ;;
3459 esac
3460 done
3461
3462 if test "$build_libtool_libs" = yes; then
3463 if test -n "$rpath"; then
3464 case $host in
3465 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
3466 # these systems don't actually have a c library (as such)!
3467 ;;
3468 *-*-rhapsody* | *-*-darwin1.[012])
3469 # Rhapsody C library is in the System framework
3470 deplibs="$deplibs -framework System"
3471 ;;
3472 *-*-netbsd*)
3473 # Don't link with libc until the a.out ld.so is fixed.
3474 ;;
3475 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
3476 # Do not include libc due to us having libc/libc_r.
3477 ;;
3478 *-*-sco3.2v5* | *-*-sco5v6*)
3479 # Causes problems with __ctype
3480 ;;
3481 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
3482 # Compiler inserts libc in the correct place for threads to work
3483 ;;
3484 *)
3485 # Add libc to deplibs on all other systems if necessary.
3486 if test "$build_libtool_need_lc" = "yes"; then
3487 deplibs="$deplibs -lc"
3488 fi
3489 ;;
3490 esac
3491 fi
3492
3493 # Transform deplibs into only deplibs that can be linked in shared.
3494 name_save=$name
3495 libname_save=$libname
3496 release_save=$release
3497 versuffix_save=$versuffix
3498 major_save=$major
3499 # I'm not sure if I'm treating the release correctly. I think
3500 # release should show up in the -l (ie -lgmp5) so we don't want to
3501 # add it in twice. Is that correct?
3502 release=""
3503 versuffix=""
3504 major=""
3505 newdeplibs=
3506 droppeddeps=no
3507 case $deplibs_check_method in
3508 pass_all)
3509 # Don't check for shared/static. Everything works.
3510 # This might be a little naive. We might want to check
3511 # whether the library exists or not. But this is on
3512 # osf3 & osf4 and I'm not really sure... Just
3513 # implementing what was already the behavior.
3514 newdeplibs=$deplibs
3515 ;;
3516 test_compile)
3517 # This code stresses the "libraries are programs" paradigm to its
3518 # limits. Maybe even breaks it. We compile a program, linking it
3519 # against the deplibs as a proxy for the library. Then we can check
3520 # whether they linked in statically or dynamically with ldd.
3521 $rm conftest.c
3522 cat > conftest.c <<EOF
3523 int main() { return 0; }
3524EOF
3525 $rm conftest
3526 $LTCC $LTCFLAGS -o conftest conftest.c $deplibs
3527 if test "$?" -eq 0 ; then
3528 ldd_output=`ldd conftest`
3529 for i in $deplibs; do
3530 name=`expr $i : '-l\(.*\)'`
3531 # If $name is empty we are operating on a -L argument.
3532 if test "$name" != "" && test "$name" -ne "0"; then
3533 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3534 case " $predeps $postdeps " in
3535 *" $i "*)
3536 newdeplibs="$newdeplibs $i"
3537 i=""
3538 ;;
3539 esac
3540 fi
3541 if test -n "$i" ; then
3542 libname=`eval \\$echo \"$libname_spec\"`
3543 deplib_matches=`eval \\$echo \"$library_names_spec\"`
3544 set dummy $deplib_matches
3545 deplib_match=$2
3546 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3547 newdeplibs="$newdeplibs $i"
3548 else
3549 droppeddeps=yes
3550 $echo
3551 $echo "*** Warning: dynamic linker does not accept needed library $i."
3552 $echo "*** I have the capability to make that library automatically link in when"
3553 $echo "*** you link to this library. But I can only do this if you have a"
3554 $echo "*** shared version of the library, which I believe you do not have"
3555 $echo "*** because a test_compile did reveal that the linker did not use it for"
3556 $echo "*** its dynamic dependency list that programs get resolved with at runtime."
3557 fi
3558 fi
3559 else
3560 newdeplibs="$newdeplibs $i"
3561 fi
3562 done
3563 else
3564 # Error occurred in the first compile. Let's try to salvage
3565 # the situation: Compile a separate program for each library.
3566 for i in $deplibs; do
3567 name=`expr $i : '-l\(.*\)'`
3568 # If $name is empty we are operating on a -L argument.
3569 if test "$name" != "" && test "$name" != "0"; then
3570 $rm conftest
3571 $LTCC $LTCFLAGS -o conftest conftest.c $i
3572 # Did it work?
3573 if test "$?" -eq 0 ; then
3574 ldd_output=`ldd conftest`
3575 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3576 case " $predeps $postdeps " in
3577 *" $i "*)
3578 newdeplibs="$newdeplibs $i"
3579 i=""
3580 ;;
3581 esac
3582 fi
3583 if test -n "$i" ; then
3584 libname=`eval \\$echo \"$libname_spec\"`
3585 deplib_matches=`eval \\$echo \"$library_names_spec\"`
3586 set dummy $deplib_matches
3587 deplib_match=$2
3588 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3589 newdeplibs="$newdeplibs $i"
3590 else
3591 droppeddeps=yes
3592 $echo
3593 $echo "*** Warning: dynamic linker does not accept needed library $i."
3594 $echo "*** I have the capability to make that library automatically link in when"
3595 $echo "*** you link to this library. But I can only do this if you have a"
3596 $echo "*** shared version of the library, which you do not appear to have"
3597 $echo "*** because a test_compile did reveal that the linker did not use this one"
3598 $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
3599 fi
3600 fi
3601 else
3602 droppeddeps=yes
3603 $echo
3604 $echo "*** Warning! Library $i is needed by this library but I was not able to"
3605 $echo "*** make it link in! You will probably need to install it or some"
3606 $echo "*** library that it depends on before this library will be fully"
3607 $echo "*** functional. Installing it before continuing would be even better."
3608 fi
3609 else
3610 newdeplibs="$newdeplibs $i"
3611 fi
3612 done
3613 fi
3614 ;;
3615 file_magic*)
3616 set dummy $deplibs_check_method
3617 file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3618 for a_deplib in $deplibs; do
3619 name=`expr $a_deplib : '-l\(.*\)'`
3620 # If $name is empty we are operating on a -L argument.
3621 if test "$name" != "" && test "$name" != "0"; then
3622 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3623 case " $predeps $postdeps " in
3624 *" $a_deplib "*)
3625 newdeplibs="$newdeplibs $a_deplib"
3626 a_deplib=""
3627 ;;
3628 esac
3629 fi
3630 if test -n "$a_deplib" ; then
3631 libname=`eval \\$echo \"$libname_spec\"`
3632 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3633 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
3634 for potent_lib in $potential_libs; do
3635 # Follow soft links.
3636 if ls -lLd "$potent_lib" 2>/dev/null \
3637 | grep " -> " >/dev/null; then
3638 continue
3639 fi
3640 # The statement above tries to avoid entering an
3641 # endless loop below, in case of cyclic links.
3642 # We might still enter an endless loop, since a link
3643 # loop can be closed while we follow links,
3644 # but so what?
3645 potlib="$potent_lib"
3646 while test -h "$potlib" 2>/dev/null; do
3647 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
3648 case $potliblink in
3649 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
3650 *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
3651 esac
3652 done
3653 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
3654 | ${SED} 10q \
3655 | $EGREP "$file_magic_regex" > /dev/null; then
3656 newdeplibs="$newdeplibs $a_deplib"
3657 a_deplib=""
3658 break 2
3659 fi
3660 done
3661 done
3662 fi
3663 if test -n "$a_deplib" ; then
3664 droppeddeps=yes
3665 $echo
3666 $echo "*** Warning: linker path does not have real file for library $a_deplib."
3667 $echo "*** I have the capability to make that library automatically link in when"
3668 $echo "*** you link to this library. But I can only do this if you have a"
3669 $echo "*** shared version of the library, which you do not appear to have"
3670 $echo "*** because I did check the linker path looking for a file starting"
3671 if test -z "$potlib" ; then
3672 $echo "*** with $libname but no candidates were found. (...for file magic test)"
3673 else
3674 $echo "*** with $libname and none of the candidates passed a file format test"
3675 $echo "*** using a file magic. Last file checked: $potlib"
3676 fi
3677 fi
3678 else
3679 # Add a -L argument.
3680 newdeplibs="$newdeplibs $a_deplib"
3681 fi
3682 done # Gone through all deplibs.
3683 ;;
3684 match_pattern*)
3685 set dummy $deplibs_check_method
3686 match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3687 for a_deplib in $deplibs; do
3688 name=`expr $a_deplib : '-l\(.*\)'`
3689 # If $name is empty we are operating on a -L argument.
3690 if test -n "$name" && test "$name" != "0"; then
3691 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3692 case " $predeps $postdeps " in
3693 *" $a_deplib "*)
3694 newdeplibs="$newdeplibs $a_deplib"
3695 a_deplib=""
3696 ;;
3697 esac
3698 fi
3699 if test -n "$a_deplib" ; then
3700 libname=`eval \\$echo \"$libname_spec\"`
3701 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3702 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
3703 for potent_lib in $potential_libs; do
3704 potlib="$potent_lib" # see symlink-check above in file_magic test
3705 if eval $echo \"$potent_lib\" 2>/dev/null \
3706 | ${SED} 10q \
3707 | $EGREP "$match_pattern_regex" > /dev/null; then
3708 newdeplibs="$newdeplibs $a_deplib"
3709 a_deplib=""
3710 break 2
3711 fi
3712 done
3713 done
3714 fi
3715 if test -n "$a_deplib" ; then
3716 droppeddeps=yes
3717 $echo
3718 $echo "*** Warning: linker path does not have real file for library $a_deplib."
3719 $echo "*** I have the capability to make that library automatically link in when"
3720 $echo "*** you link to this library. But I can only do this if you have a"
3721 $echo "*** shared version of the library, which you do not appear to have"
3722 $echo "*** because I did check the linker path looking for a file starting"
3723 if test -z "$potlib" ; then
3724 $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
3725 else
3726 $echo "*** with $libname and none of the candidates passed a file format test"
3727 $echo "*** using a regex pattern. Last file checked: $potlib"
3728 fi
3729 fi
3730 else
3731 # Add a -L argument.
3732 newdeplibs="$newdeplibs $a_deplib"
3733 fi
3734 done # Gone through all deplibs.
3735 ;;
3736 none | unknown | *)
3737 newdeplibs=""
3738 tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
3739 -e 's/ -[LR][^ ]*//g'`
3740 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3741 for i in $predeps $postdeps ; do
3742 # can't use Xsed below, because $i might contain '/'
3743 tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
3744 done
3745 fi
3746 if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \
3747 | grep . >/dev/null; then
3748 $echo
3749 if test "X$deplibs_check_method" = "Xnone"; then
3750 $echo "*** Warning: inter-library dependencies are not supported in this platform."
3751 else
3752 $echo "*** Warning: inter-library dependencies are not known to be supported."
3753 fi
3754 $echo "*** All declared inter-library dependencies are being dropped."
3755 droppeddeps=yes
3756 fi
3757 ;;
3758 esac
3759 versuffix=$versuffix_save
3760 major=$major_save
3761 release=$release_save
3762 libname=$libname_save
3763 name=$name_save
3764
3765 case $host in
3766 *-*-rhapsody* | *-*-darwin1.[012])
3767 # On Rhapsody replace the C library is the System framework
3768 newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
3769 ;;
3770 esac
3771
3772 if test "$droppeddeps" = yes; then
3773 if test "$module" = yes; then
3774 $echo
3775 $echo "*** Warning: libtool could not satisfy all declared inter-library"
3776 $echo "*** dependencies of module $libname. Therefore, libtool will create"
3777 $echo "*** a static module, that should work as long as the dlopening"
3778 $echo "*** application is linked with the -dlopen flag."
3779 if test -z "$global_symbol_pipe"; then
3780 $echo
3781 $echo "*** However, this would only work if libtool was able to extract symbol"
3782 $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
3783 $echo "*** not find such a program. So, this module is probably useless."
3784 $echo "*** \`nm' from GNU binutils and a full rebuild may help."
3785 fi
3786 if test "$build_old_libs" = no; then
3787 oldlibs="$output_objdir/$libname.$libext"
3788 build_libtool_libs=module
3789 build_old_libs=yes
3790 else
3791 build_libtool_libs=no
3792 fi
3793 else
3794 $echo "*** The inter-library dependencies that have been dropped here will be"
3795 $echo "*** automatically added whenever a program is linked with this library"
3796 $echo "*** or is declared to -dlopen it."
3797
3798 if test "$allow_undefined" = no; then
3799 $echo
3800 $echo "*** Since this library must not contain undefined symbols,"
3801 $echo "*** because either the platform does not support them or"
3802 $echo "*** it was explicitly requested with -no-undefined,"
3803 $echo "*** libtool will only create a static version of it."
3804 if test "$build_old_libs" = no; then
3805 oldlibs="$output_objdir/$libname.$libext"
3806 build_libtool_libs=module
3807 build_old_libs=yes
3808 else
3809 build_libtool_libs=no
3810 fi
3811 fi
3812 fi
3813 fi
3814 # Done checking deplibs!
3815 deplibs=$newdeplibs
3816 fi
3817
3818
3819 # move library search paths that coincide with paths to not yet
3820 # installed libraries to the beginning of the library search list
3821 new_libs=
3822 for path in $notinst_path; do
3823 case " $new_libs " in
3824 *" -L$path/$objdir "*) ;;
3825 *)
3826 case " $deplibs " in
3827 *" -L$path/$objdir "*)
3828 new_libs="$new_libs -L$path/$objdir" ;;
3829 esac
3830 ;;
3831 esac
3832 done
3833 for deplib in $deplibs; do
3834 case $deplib in
3835 -L*)
3836 case " $new_libs " in
3837 *" $deplib "*) ;;
3838 *) new_libs="$new_libs $deplib" ;;
3839 esac
3840 ;;
3841 *) new_libs="$new_libs $deplib" ;;
3842 esac
3843 done
3844 deplibs="$new_libs"
3845
3846
3847 # All the library-specific variables (install_libdir is set above).
3848 library_names=
3849 old_library=
3850 dlname=
3851
3852 # Test again, we may have decided not to build it any more
3853 if test "$build_libtool_libs" = yes; then
3854 if test "$hardcode_into_libs" = yes; then
3855 # Hardcode the library paths
3856 hardcode_libdirs=
3857 dep_rpath=
3858 rpath="$finalize_rpath"
3859 test "$mode" != relink && rpath="$compile_rpath$rpath"
3860 for libdir in $rpath; do
3861 if test -n "$hardcode_libdir_flag_spec"; then
3862 if test -n "$hardcode_libdir_separator"; then
3863 if test -z "$hardcode_libdirs"; then
3864 hardcode_libdirs="$libdir"
3865 else
3866 # Just accumulate the unique libdirs.
3867 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
3868 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3869 ;;
3870 *)
3871 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3872 ;;
3873 esac
3874 fi
3875 else
3876 eval flag=\"$hardcode_libdir_flag_spec\"
3877 dep_rpath="$dep_rpath $flag"
3878 fi
3879 elif test -n "$runpath_var"; then
3880 case "$perm_rpath " in
3881 *" $libdir "*) ;;
3882 *) perm_rpath="$perm_rpath $libdir" ;;
3883 esac
3884 fi
3885 done
3886 # Substitute the hardcoded libdirs into the rpath.
3887 if test -n "$hardcode_libdir_separator" &&
3888 test -n "$hardcode_libdirs"; then
3889 libdir="$hardcode_libdirs"
3890 if test -n "$hardcode_libdir_flag_spec_ld"; then
3891 eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
3892 else
3893 eval dep_rpath=\"$hardcode_libdir_flag_spec\"
3894 fi
3895 fi
3896 if test -n "$runpath_var" && test -n "$perm_rpath"; then
3897 # We should set the runpath_var.
3898 rpath=
3899 for dir in $perm_rpath; do
3900 rpath="$rpath$dir:"
3901 done
3902 eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
3903 fi
3904 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
3905 fi
3906
3907 shlibpath="$finalize_shlibpath"
3908 test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
3909 if test -n "$shlibpath"; then
3910 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
3911 fi
3912
3913 # Get the real and link names of the library.
3914 eval shared_ext=\"$shrext_cmds\"
3915 eval library_names=\"$library_names_spec\"
3916 set dummy $library_names
3917 realname="$2"
3918 shift; shift
3919
3920 if test -n "$soname_spec"; then
3921 eval soname=\"$soname_spec\"
3922 else
3923 soname="$realname"
3924 fi
3925 if test -z "$dlname"; then
3926 dlname=$soname
3927 fi
3928
3929 lib="$output_objdir/$realname"
3930 linknames=
3931 for link
3932 do
3933 linknames="$linknames $link"
3934 done
3935
3936 # Use standard objects if they are pic
3937 test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3938
3939 # Prepare the list of exported symbols
3940 if test -z "$export_symbols"; then
3941 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
3942 $show "generating symbol list for \`$libname.la'"
3943 export_symbols="$output_objdir/$libname.exp"
3944 $run $rm $export_symbols
3945 cmds=$export_symbols_cmds
3946 save_ifs="$IFS"; IFS='~'
3947 for cmd in $cmds; do
3948 IFS="$save_ifs"
3949 eval cmd=\"$cmd\"
3950 if len=`expr "X$cmd" : ".*"` &&
3951 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
3952 $show "$cmd"
3953 $run eval "$cmd" || exit $?
3954 skipped_export=false
3955 else
3956 # The command line is too long to execute in one step.
3957 $show "using reloadable object file for export list..."
3958 skipped_export=:
3959 # Break out early, otherwise skipped_export may be
3960 # set to false by a later but shorter cmd.
3961 break
3962 fi
3963 done
3964 IFS="$save_ifs"
3965 if test -n "$export_symbols_regex"; then
3966 $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
3967 $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
3968 $show "$mv \"${export_symbols}T\" \"$export_symbols\""
3969 $run eval '$mv "${export_symbols}T" "$export_symbols"'
3970 fi
3971 fi
3972 fi
3973
3974 if test -n "$export_symbols" && test -n "$include_expsyms"; then
3975 $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
3976 fi
3977
3978 tmp_deplibs=
3979 for test_deplib in $deplibs; do
3980 case " $convenience " in
3981 *" $test_deplib "*) ;;
3982 *)
3983 tmp_deplibs="$tmp_deplibs $test_deplib"
3984 ;;
3985 esac
3986 done
3987 deplibs="$tmp_deplibs"
3988
3989 if test -n "$convenience"; then
3990 if test -n "$whole_archive_flag_spec"; then
3991 save_libobjs=$libobjs
3992 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
3993 else
3994 gentop="$output_objdir/${outputname}x"
3995 generated="$generated $gentop"
3996
3997 func_extract_archives $gentop $convenience
3998 libobjs="$libobjs $func_extract_archives_result"
3999 fi
4000 fi
4001
4002 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
4003 eval flag=\"$thread_safe_flag_spec\"
4004 linker_flags="$linker_flags $flag"
4005 fi
4006
4007 # Make a backup of the uninstalled library when relinking
4008 if test "$mode" = relink; then
4009 $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
4010 fi
4011
4012 # Do each of the archive commands.
4013 if test "$module" = yes && test -n "$module_cmds" ; then
4014 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4015 eval test_cmds=\"$module_expsym_cmds\"
4016 cmds=$module_expsym_cmds
4017 else
4018 eval test_cmds=\"$module_cmds\"
4019 cmds=$module_cmds
4020 fi
4021 else
4022 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4023 eval test_cmds=\"$archive_expsym_cmds\"
4024 cmds=$archive_expsym_cmds
4025 else
4026 eval test_cmds=\"$archive_cmds\"
4027 cmds=$archive_cmds
4028 fi
4029 fi
4030
4031 if test "X$skipped_export" != "X:" &&
4032 len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4033 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
4034 :
4035 else
4036 # The command line is too long to link in one step, link piecewise.
4037 $echo "creating reloadable object files..."
4038
4039 # Save the value of $output and $libobjs because we want to
4040 # use them later. If we have whole_archive_flag_spec, we
4041 # want to use save_libobjs as it was before
4042 # whole_archive_flag_spec was expanded, because we can't
4043 # assume the linker understands whole_archive_flag_spec.
4044 # This may have to be revisited, in case too many
4045 # convenience libraries get linked in and end up exceeding
4046 # the spec.
4047 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
4048 save_libobjs=$libobjs
4049 fi
4050 save_output=$output
4051 output_la=`$echo "X$output" | $Xsed -e "$basename"`
4052
4053 # Clear the reloadable object creation command queue and
4054 # initialize k to one.
4055 test_cmds=
4056 concat_cmds=
4057 objlist=
4058 delfiles=
4059 last_robj=
4060 k=1
4061 output=$output_objdir/$output_la-${k}.$objext
4062 # Loop over the list of objects to be linked.
4063 for obj in $save_libobjs
4064 do
4065 eval test_cmds=\"$reload_cmds $objlist $last_robj\"
4066 if test "X$objlist" = X ||
4067 { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4068 test "$len" -le "$max_cmd_len"; }; then
4069 objlist="$objlist $obj"
4070 else
4071 # The command $test_cmds is almost too long, add a
4072 # command to the queue.
4073 if test "$k" -eq 1 ; then
4074 # The first file doesn't have a previous command to add.
4075 eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
4076 else
4077 # All subsequent reloadable object files will link in
4078 # the last one created.
4079 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
4080 fi
4081 last_robj=$output_objdir/$output_la-${k}.$objext
4082 k=`expr $k + 1`
4083 output=$output_objdir/$output_la-${k}.$objext
4084 objlist=$obj
4085 len=1
4086 fi
4087 done
4088 # Handle the remaining objects by creating one last
4089 # reloadable object file. All subsequent reloadable object
4090 # files will link in the last one created.
4091 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
4092 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
4093
4094 if ${skipped_export-false}; then
4095 $show "generating symbol list for \`$libname.la'"
4096 export_symbols="$output_objdir/$libname.exp"
4097 $run $rm $export_symbols
4098 libobjs=$output
4099 # Append the command to create the export file.
4100 eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
4101 fi
4102
4103 # Set up a command to remove the reloadable object files
4104 # after they are used.
4105 i=0
4106 while test "$i" -lt "$k"
4107 do
4108 i=`expr $i + 1`
4109 delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
4110 done
4111
4112 $echo "creating a temporary reloadable object file: $output"
4113
4114 # Loop through the commands generated above and execute them.
4115 save_ifs="$IFS"; IFS='~'
4116 for cmd in $concat_cmds; do
4117 IFS="$save_ifs"
4118 $show "$cmd"
4119 $run eval "$cmd" || exit $?
4120 done
4121 IFS="$save_ifs"
4122
4123 libobjs=$output
4124 # Restore the value of output.
4125 output=$save_output
4126
4127 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
4128 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
4129 fi
4130 # Expand the library linking commands again to reset the
4131 # value of $libobjs for piecewise linking.
4132
4133 # Do each of the archive commands.
4134 if test "$module" = yes && test -n "$module_cmds" ; then
4135 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4136 cmds=$module_expsym_cmds
4137 else
4138 cmds=$module_cmds
4139 fi
4140 else
4141 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4142 cmds=$archive_expsym_cmds
4143 else
4144 cmds=$archive_cmds
4145 fi
4146 fi
4147
4148 # Append the command to remove the reloadable object files
4149 # to the just-reset $cmds.
4150 eval cmds=\"\$cmds~\$rm $delfiles\"
4151 fi
4152 save_ifs="$IFS"; IFS='~'
4153 for cmd in $cmds; do
4154 IFS="$save_ifs"
4155 eval cmd=\"$cmd\"
4156 $show "$cmd"
4157 $run eval "$cmd" || {
4158 lt_exit=$?
4159
4160 # Restore the uninstalled library and exit
4161 if test "$mode" = relink; then
4162 $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
4163 fi
4164
4165 exit $lt_exit
4166 }
4167 done
4168 IFS="$save_ifs"
4169
4170 # Restore the uninstalled library and exit
4171 if test "$mode" = relink; then
4172 $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
4173
4174 if test -n "$convenience"; then
4175 if test -z "$whole_archive_flag_spec"; then
4176 $show "${rm}r $gentop"
4177 $run ${rm}r "$gentop"
4178 fi
4179 fi
4180
4181 exit $EXIT_SUCCESS
4182 fi
4183
4184 # Create links to the real library.
4185 for linkname in $linknames; do
4186 if test "$realname" != "$linkname"; then
4187 $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
4188 $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
4189 fi
4190 done
4191
4192 # If -module or -export-dynamic was specified, set the dlname.
4193 if test "$module" = yes || test "$export_dynamic" = yes; then
4194 # On all known operating systems, these are identical.
4195 dlname="$soname"
4196 fi
4197 fi
4198 ;;
4199
4200 obj)
4201 if test -n "$deplibs"; then
4202 $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
4203 fi
4204
4205 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4206 $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
4207 fi
4208
4209 if test -n "$rpath"; then
4210 $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
4211 fi
4212
4213 if test -n "$xrpath"; then
4214 $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
4215 fi
4216
4217 if test -n "$vinfo"; then
4218 $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
4219 fi
4220
4221 if test -n "$release"; then
4222 $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
4223 fi
4224
4225 case $output in
4226 *.lo)
4227 if test -n "$objs$old_deplibs"; then
4228 $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
4229 exit $EXIT_FAILURE
4230 fi
4231 libobj="$output"
4232 obj=`$echo "X$output" | $Xsed -e "$lo2o"`
4233 ;;
4234 *)
4235 libobj=
4236 obj="$output"
4237 ;;
4238 esac
4239
4240 # Delete the old objects.
4241 $run $rm $obj $libobj
4242
4243 # Objects from convenience libraries. This assumes
4244 # single-version convenience libraries. Whenever we create
4245 # different ones for PIC/non-PIC, this we'll have to duplicate
4246 # the extraction.
4247 reload_conv_objs=
4248 gentop=
4249 # reload_cmds runs $LD directly, so let us get rid of
4250 # -Wl from whole_archive_flag_spec
4251 wl=
4252
4253 if test -n "$convenience"; then
4254 if test -n "$whole_archive_flag_spec"; then
4255 eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
4256 else
4257 gentop="$output_objdir/${obj}x"
4258 generated="$generated $gentop"
4259
4260 func_extract_archives $gentop $convenience
4261 reload_conv_objs="$reload_objs $func_extract_archives_result"
4262 fi
4263 fi
4264
4265 # Create the old-style object.
4266 reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
4267
4268 output="$obj"
4269 cmds=$reload_cmds
4270 save_ifs="$IFS"; IFS='~'
4271 for cmd in $cmds; do
4272 IFS="$save_ifs"
4273 eval cmd=\"$cmd\"
4274 $show "$cmd"
4275 $run eval "$cmd" || exit $?
4276 done
4277 IFS="$save_ifs"
4278
4279 # Exit if we aren't doing a library object file.
4280 if test -z "$libobj"; then
4281 if test -n "$gentop"; then
4282 $show "${rm}r $gentop"
4283 $run ${rm}r $gentop
4284 fi
4285
4286 exit $EXIT_SUCCESS
4287 fi
4288
4289 if test "$build_libtool_libs" != yes; then
4290 if test -n "$gentop"; then
4291 $show "${rm}r $gentop"
4292 $run ${rm}r $gentop
4293 fi
4294
4295 # Create an invalid libtool object if no PIC, so that we don't
4296 # accidentally link it into a program.
4297 # $show "echo timestamp > $libobj"
4298 # $run eval "echo timestamp > $libobj" || exit $?
4299 exit $EXIT_SUCCESS
4300 fi
4301
4302 if test -n "$pic_flag" || test "$pic_mode" != default; then
4303 # Only do commands if we really have different PIC objects.
4304 reload_objs="$libobjs $reload_conv_objs"
4305 output="$libobj"
4306 cmds=$reload_cmds
4307 save_ifs="$IFS"; IFS='~'
4308 for cmd in $cmds; do
4309 IFS="$save_ifs"
4310 eval cmd=\"$cmd\"
4311 $show "$cmd"
4312 $run eval "$cmd" || exit $?
4313 done
4314 IFS="$save_ifs"
4315 fi
4316
4317 if test -n "$gentop"; then
4318 $show "${rm}r $gentop"
4319 $run ${rm}r $gentop
4320 fi
4321
4322 exit $EXIT_SUCCESS
4323 ;;
4324
4325 prog)
4326 case $host in
4327 *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
4328 esac
4329 if test -n "$vinfo"; then
4330 $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
4331 fi
4332
4333 if test -n "$release"; then
4334 $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
4335 fi
4336
4337 if test "$preload" = yes; then
4338 if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
4339 test "$dlopen_self_static" = unknown; then
4340 $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
4341 fi
4342 fi
4343
4344 case $host in
4345 *-*-rhapsody* | *-*-darwin1.[012])
4346 # On Rhapsody replace the C library is the System framework
4347 compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4348 finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4349 ;;
4350 esac
4351
4352 case $host in
4353 *darwin*)
4354 # Don't allow lazy linking, it breaks C++ global constructors
4355 if test "$tagname" = CXX ; then
4356 compile_command="$compile_command ${wl}-bind_at_load"
4357 finalize_command="$finalize_command ${wl}-bind_at_load"
4358 fi
4359 ;;
4360 esac
4361
4362
4363 # move library search paths that coincide with paths to not yet
4364 # installed libraries to the beginning of the library search list
4365 new_libs=
4366 for path in $notinst_path; do
4367 case " $new_libs " in
4368 *" -L$path/$objdir "*) ;;
4369 *)
4370 case " $compile_deplibs " in
4371 *" -L$path/$objdir "*)
4372 new_libs="$new_libs -L$path/$objdir" ;;
4373 esac
4374 ;;
4375 esac
4376 done
4377 for deplib in $compile_deplibs; do
4378 case $deplib in
4379 -L*)
4380 case " $new_libs " in
4381 *" $deplib "*) ;;
4382 *) new_libs="$new_libs $deplib" ;;
4383 esac
4384 ;;
4385 *) new_libs="$new_libs $deplib" ;;
4386 esac
4387 done
4388 compile_deplibs="$new_libs"
4389
4390
4391 compile_command="$compile_command $compile_deplibs"
4392 finalize_command="$finalize_command $finalize_deplibs"
4393
4394 if test -n "$rpath$xrpath"; then
4395 # If the user specified any rpath flags, then add them.
4396 for libdir in $rpath $xrpath; do
4397 # This is the magic to use -rpath.
4398 case "$finalize_rpath " in
4399 *" $libdir "*) ;;
4400 *) finalize_rpath="$finalize_rpath $libdir" ;;
4401 esac
4402 done
4403 fi
4404
4405 # Now hardcode the library paths
4406 rpath=
4407 hardcode_libdirs=
4408 for libdir in $compile_rpath $finalize_rpath; do
4409 if test -n "$hardcode_libdir_flag_spec"; then
4410 if test -n "$hardcode_libdir_separator"; then
4411 if test -z "$hardcode_libdirs"; then
4412 hardcode_libdirs="$libdir"
4413 else
4414 # Just accumulate the unique libdirs.
4415 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4416 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4417 ;;
4418 *)
4419 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4420 ;;
4421 esac
4422 fi
4423 else
4424 eval flag=\"$hardcode_libdir_flag_spec\"
4425 rpath="$rpath $flag"
4426 fi
4427 elif test -n "$runpath_var"; then
4428 case "$perm_rpath " in
4429 *" $libdir "*) ;;
4430 *) perm_rpath="$perm_rpath $libdir" ;;
4431 esac
4432 fi
4433 case $host in
4434 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
4435 testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
4436 case :$dllsearchpath: in
4437 *":$libdir:"*) ;;
4438 *) dllsearchpath="$dllsearchpath:$libdir";;
4439 esac
4440 case :$dllsearchpath: in
4441 *":$testbindir:"*) ;;
4442 *) dllsearchpath="$dllsearchpath:$testbindir";;
4443 esac
4444 ;;
4445 esac
4446 done
4447 # Substitute the hardcoded libdirs into the rpath.
4448 if test -n "$hardcode_libdir_separator" &&
4449 test -n "$hardcode_libdirs"; then
4450 libdir="$hardcode_libdirs"
4451 eval rpath=\" $hardcode_libdir_flag_spec\"
4452 fi
4453 compile_rpath="$rpath"
4454
4455 rpath=
4456 hardcode_libdirs=
4457 for libdir in $finalize_rpath; do
4458 if test -n "$hardcode_libdir_flag_spec"; then
4459 if test -n "$hardcode_libdir_separator"; then
4460 if test -z "$hardcode_libdirs"; then
4461 hardcode_libdirs="$libdir"
4462 else
4463 # Just accumulate the unique libdirs.
4464 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4465 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4466 ;;
4467 *)
4468 hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4469 ;;
4470 esac
4471 fi
4472 else
4473 eval flag=\"$hardcode_libdir_flag_spec\"
4474 rpath="$rpath $flag"
4475 fi
4476 elif test -n "$runpath_var"; then
4477 case "$finalize_perm_rpath " in
4478 *" $libdir "*) ;;
4479 *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
4480 esac
4481 fi
4482 done
4483 # Substitute the hardcoded libdirs into the rpath.
4484 if test -n "$hardcode_libdir_separator" &&
4485 test -n "$hardcode_libdirs"; then
4486 libdir="$hardcode_libdirs"
4487 eval rpath=\" $hardcode_libdir_flag_spec\"
4488 fi
4489 finalize_rpath="$rpath"
4490
4491 if test -n "$libobjs" && test "$build_old_libs" = yes; then
4492 # Transform all the library objects into standard objects.
4493 compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4494 finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4495 fi
4496
4497 dlsyms=
4498 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4499 if test -n "$NM" && test -n "$global_symbol_pipe"; then
4500 dlsyms="${outputname}S.c"
4501 else
4502 $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
4503 fi
4504 fi
4505
4506 if test -n "$dlsyms"; then
4507 case $dlsyms in
4508 "") ;;
4509 *.c)
4510 # Discover the nlist of each of the dlfiles.
4511 nlist="$output_objdir/${outputname}.nm"
4512
4513 $show "$rm $nlist ${nlist}S ${nlist}T"
4514 $run $rm "$nlist" "${nlist}S" "${nlist}T"
4515
4516 # Parse the name list into a source file.
4517 $show "creating $output_objdir/$dlsyms"
4518
4519 test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
4520/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
4521/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
4522
4523#ifdef __cplusplus
4524extern \"C\" {
4525#endif
4526
4527/* Prevent the only kind of declaration conflicts we can make. */
4528#define lt_preloaded_symbols some_other_symbol
4529
4530/* External symbol declarations for the compiler. */\
4531"
4532
4533 if test "$dlself" = yes; then
4534 $show "generating symbol list for \`$output'"
4535
4536 test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
4537
4538 # Add our own program objects to the symbol list.
4539 progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4540 for arg in $progfiles; do
4541 $show "extracting global C symbols from \`$arg'"
4542 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4543 done
4544
4545 if test -n "$exclude_expsyms"; then
4546 $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
4547 $run eval '$mv "$nlist"T "$nlist"'
4548 fi
4549
4550 if test -n "$export_symbols_regex"; then
4551 $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4552 $run eval '$mv "$nlist"T "$nlist"'
4553 fi
4554
4555 # Prepare the list of exported symbols
4556 if test -z "$export_symbols"; then
4557 export_symbols="$output_objdir/$outputname.exp"
4558 $run $rm $export_symbols
4559 $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4560 case $host in
4561 *cygwin* | *mingw* )
4562 $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4563 $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
4564 ;;
4565 esac
4566 else
4567 $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
4568 $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
4569 $run eval 'mv "$nlist"T "$nlist"'
4570 case $host in
4571 *cygwin* | *mingw* )
4572 $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4573 $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
4574 ;;
4575 esac
4576 fi
4577 fi
4578
4579 for arg in $dlprefiles; do
4580 $show "extracting global C symbols from \`$arg'"
4581 name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
4582 $run eval '$echo ": $name " >> "$nlist"'
4583 $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4584 done
4585
4586 if test -z "$run"; then
4587 # Make sure we have at least an empty file.
4588 test -f "$nlist" || : > "$nlist"
4589
4590 if test -n "$exclude_expsyms"; then
4591 $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
4592 $mv "$nlist"T "$nlist"
4593 fi
4594
4595 # Try sorting and uniquifying the output.
4596 if grep -v "^: " < "$nlist" |
4597 if sort -k 3 </dev/null >/dev/null 2>&1; then
4598 sort -k 3
4599 else
4600 sort +2
4601 fi |
4602 uniq > "$nlist"S; then
4603 :
4604 else
4605 grep -v "^: " < "$nlist" > "$nlist"S
4606 fi
4607
4608 if test -f "$nlist"S; then
4609 eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
4610 else
4611 $echo '/* NONE */' >> "$output_objdir/$dlsyms"
4612 fi
4613
4614 $echo >> "$output_objdir/$dlsyms" "\
4615
4616#undef lt_preloaded_symbols
4617
4618#if defined (__STDC__) && __STDC__
4619# define lt_ptr void *
4620#else
4621# define lt_ptr char *
4622# define const
4623#endif
4624
4625/* The mapping between symbol names and symbols. */
4626"
4627
4628 case $host in
4629 *cygwin* | *mingw* )
4630 $echo >> "$output_objdir/$dlsyms" "\
4631/* DATA imports from DLLs on WIN32 can't be const, because
4632 runtime relocations are performed -- see ld's documentation
4633 on pseudo-relocs */
4634struct {
4635"
4636 ;;
4637 * )
4638 $echo >> "$output_objdir/$dlsyms" "\
4639const struct {
4640"
4641 ;;
4642 esac
4643
4644
4645 $echo >> "$output_objdir/$dlsyms" "\
4646 const char *name;
4647 lt_ptr address;
4648}
4649lt_preloaded_symbols[] =
4650{\
4651"
4652
4653 eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
4654
4655 $echo >> "$output_objdir/$dlsyms" "\
4656 {0, (lt_ptr) 0}
4657};
4658
4659/* This works around a problem in FreeBSD linker */
4660#ifdef FREEBSD_WORKAROUND
4661static const void *lt_preloaded_setup() {
4662 return lt_preloaded_symbols;
4663}
4664#endif
4665
4666#ifdef __cplusplus
4667}
4668#endif\
4669"
4670 fi
4671
4672 pic_flag_for_symtable=
4673 case $host in
4674 # compiling the symbol table file with pic_flag works around
4675 # a FreeBSD bug that causes programs to crash when -lm is
4676 # linked before any other PIC object. But we must not use
4677 # pic_flag when linking with -static. The problem exists in
4678 # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
4679 *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
4680 case "$compile_command " in
4681 *" -static "*) ;;
4682 *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
4683 esac;;
4684 *-*-hpux*)
4685 case "$compile_command " in
4686 *" -static "*) ;;
4687 *) pic_flag_for_symtable=" $pic_flag";;
4688 esac
4689 esac
4690
4691 # Now compile the dynamic symbol file.
4692 $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
4693 $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
4694
4695 # Clean up the generated files.
4696 $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
4697 $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
4698
4699 # Transform the symbol file into the correct name.
4700 case $host in
4701 *cygwin* | *mingw* )
4702 if test -f "$output_objdir/${outputname}.def" ; then
4703 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
4704 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"`
4705 else
4706 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4707 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4708 fi
4709 ;;
4710 * )
4711 compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4712 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4713 ;;
4714 esac
4715 ;;
4716 *)
4717 $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
4718 exit $EXIT_FAILURE
4719 ;;
4720 esac
4721 else
4722 # We keep going just in case the user didn't refer to
4723 # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
4724 # really was required.
4725
4726 # Nullify the symbol file.
4727 compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
4728 finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
4729 fi
4730
4731 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
4732 # Replace the output file specification.
4733 compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4734 link_command="$compile_command$compile_rpath"
4735
4736 # We have no uninstalled library dependencies, so finalize right now.
4737 $show "$link_command"
4738 $run eval "$link_command"
4739 exit_status=$?
4740
4741 # Delete the generated files.
4742 if test -n "$dlsyms"; then
4743 $show "$rm $output_objdir/${outputname}S.${objext}"
4744 $run $rm "$output_objdir/${outputname}S.${objext}"
4745 fi
4746
4747 exit $exit_status
4748 fi
4749
4750 if test -n "$shlibpath_var"; then
4751 # We should set the shlibpath_var
4752 rpath=
4753 for dir in $temp_rpath; do
4754 case $dir in
4755 [\\/]* | [A-Za-z]:[\\/]*)
4756 # Absolute path.
4757 rpath="$rpath$dir:"
4758 ;;
4759 *)
4760 # Relative path: add a thisdir entry.
4761 rpath="$rpath\$thisdir/$dir:"
4762 ;;
4763 esac
4764 done
4765 temp_rpath="$rpath"
4766 fi
4767
4768 if test -n "$compile_shlibpath$finalize_shlibpath"; then
4769 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
4770 fi
4771 if test -n "$finalize_shlibpath"; then
4772 finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
4773 fi
4774
4775 compile_var=
4776 finalize_var=
4777 if test -n "$runpath_var"; then
4778 if test -n "$perm_rpath"; then
4779 # We should set the runpath_var.
4780 rpath=
4781 for dir in $perm_rpath; do
4782 rpath="$rpath$dir:"
4783 done
4784 compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
4785 fi
4786 if test -n "$finalize_perm_rpath"; then
4787 # We should set the runpath_var.
4788 rpath=
4789 for dir in $finalize_perm_rpath; do
4790 rpath="$rpath$dir:"
4791 done
4792 finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
4793 fi
4794 fi
4795
4796 if test "$no_install" = yes; then
4797 # We don't need to create a wrapper script.
4798 link_command="$compile_var$compile_command$compile_rpath"
4799 # Replace the output file specification.
4800 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4801 # Delete the old output file.
4802 $run $rm $output
4803 # Link the executable and exit
4804 $show "$link_command"
4805 $run eval "$link_command" || exit $?
4806 exit $EXIT_SUCCESS
4807 fi
4808
4809 if test "$hardcode_action" = relink; then
4810 # Fast installation is not supported
4811 link_command="$compile_var$compile_command$compile_rpath"
4812 relink_command="$finalize_var$finalize_command$finalize_rpath"
4813
4814 $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
4815 $echo "$modename: \`$output' will be relinked during installation" 1>&2
4816 else
4817 if test "$fast_install" != no; then
4818 link_command="$finalize_var$compile_command$finalize_rpath"
4819 if test "$fast_install" = yes; then
4820 relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
4821 else
4822 # fast_install is set to needless
4823 relink_command=
4824 fi
4825 else
4826 link_command="$compile_var$compile_command$compile_rpath"
4827 relink_command="$finalize_var$finalize_command$finalize_rpath"
4828 fi
4829 fi
4830
4831 # Replace the output file specification.
4832 link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
4833
4834 # Delete the old output files.
4835 $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
4836
4837 $show "$link_command"
4838 $run eval "$link_command" || exit $?
4839
4840 # Now create the wrapper script.
4841 $show "creating $output"
4842
4843 # Quote the relink command for shipping.
4844 if test -n "$relink_command"; then
4845 # Preserve any variables that may affect compiler behavior
4846 for var in $variables_saved_for_relink; do
4847 if eval test -z \"\${$var+set}\"; then
4848 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
4849 elif eval var_value=\$$var; test -z "$var_value"; then
4850 relink_command="$var=; export $var; $relink_command"
4851 else
4852 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
4853 relink_command="$var=\"$var_value\"; export $var; $relink_command"
4854 fi
4855 done
4856 relink_command="(cd `pwd`; $relink_command)"
4857 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
4858 fi
4859
4860 # Quote $echo for shipping.
4861 if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
4862 case $progpath in
4863 [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
4864 *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
4865 esac
4866 qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
4867 else
4868 qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
4869 fi
4870
4871 # Only actually do things if our run command is non-null.
4872 if test -z "$run"; then
4873 # win32 will think the script is a binary if it has
4874 # a .exe suffix, so we strip it off here.
4875 case $output in
4876 *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
4877 esac
4878 # test for cygwin because mv fails w/o .exe extensions
4879 case $host in
4880 *cygwin*)
4881 exeext=.exe
4882 outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
4883 *) exeext= ;;
4884 esac
4885 case $host in
4886 *cygwin* | *mingw* )
4887 output_name=`basename $output`
4888 output_path=`dirname $output`
4889 cwrappersource="$output_path/$objdir/lt-$output_name.c"
4890 cwrapper="$output_path/$output_name.exe"
4891 $rm $cwrappersource $cwrapper
4892 trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
4893
4894 cat > $cwrappersource <<EOF
4895
4896/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
4897 Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
4898
4899 The $output program cannot be directly executed until all the libtool
4900 libraries that it depends on are installed.
4901
4902 This wrapper executable should never be moved out of the build directory.
4903 If it is, it will not operate correctly.
4904
4905 Currently, it simply execs the wrapper *script* "/bin/sh $output",
4906 but could eventually absorb all of the scripts functionality and
4907 exec $objdir/$outputname directly.
4908*/
4909EOF
4910 cat >> $cwrappersource<<"EOF"
4911#include <stdio.h>
4912#include <stdlib.h>
4913#include <unistd.h>
4914#include <malloc.h>
4915#include <stdarg.h>
4916#include <assert.h>
4917#include <string.h>
4918#include <ctype.h>
4919#include <sys/stat.h>
4920
4921#if defined(PATH_MAX)
4922# define LT_PATHMAX PATH_MAX
4923#elif defined(MAXPATHLEN)
4924# define LT_PATHMAX MAXPATHLEN
4925#else
4926# define LT_PATHMAX 1024
4927#endif
4928
4929#ifndef DIR_SEPARATOR
4930# define DIR_SEPARATOR '/'
4931# define PATH_SEPARATOR ':'
4932#endif
4933
4934#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
4935 defined (__OS2__)
4936# define HAVE_DOS_BASED_FILE_SYSTEM
4937# ifndef DIR_SEPARATOR_2
4938# define DIR_SEPARATOR_2 '\\'
4939# endif
4940# ifndef PATH_SEPARATOR_2
4941# define PATH_SEPARATOR_2 ';'
4942# endif
4943#endif
4944
4945#ifndef DIR_SEPARATOR_2
4946# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
4947#else /* DIR_SEPARATOR_2 */
4948# define IS_DIR_SEPARATOR(ch) \
4949 (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
4950#endif /* DIR_SEPARATOR_2 */
4951
4952#ifndef PATH_SEPARATOR_2
4953# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
4954#else /* PATH_SEPARATOR_2 */
4955# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
4956#endif /* PATH_SEPARATOR_2 */
4957
4958#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
4959#define XFREE(stale) do { \
4960 if (stale) { free ((void *) stale); stale = 0; } \
4961} while (0)
4962
4963/* -DDEBUG is fairly common in CFLAGS. */
4964#undef DEBUG
4965#if defined DEBUGWRAPPER
4966# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
4967#else
4968# define DEBUG(format, ...)
4969#endif
4970
4971const char *program_name = NULL;
4972
4973void * xmalloc (size_t num);
4974char * xstrdup (const char *string);
4975const char * base_name (const char *name);
4976char * find_executable(const char *wrapper);
4977int check_executable(const char *path);
4978char * strendzap(char *str, const char *pat);
4979void lt_fatal (const char *message, ...);
4980
4981int
4982main (int argc, char *argv[])
4983{
4984 char **newargz;
4985 int i;
4986
4987 program_name = (char *) xstrdup (base_name (argv[0]));
4988 DEBUG("(main) argv[0] : %s\n",argv[0]);
4989 DEBUG("(main) program_name : %s\n",program_name);
4990 newargz = XMALLOC(char *, argc+2);
4991EOF
4992
4993 cat >> $cwrappersource <<EOF
4994 newargz[0] = (char *) xstrdup("$SHELL");
4995EOF
4996
4997 cat >> $cwrappersource <<"EOF"
4998 newargz[1] = find_executable(argv[0]);
4999 if (newargz[1] == NULL)
5000 lt_fatal("Couldn't find %s", argv[0]);
5001 DEBUG("(main) found exe at : %s\n",newargz[1]);
5002 /* we know the script has the same name, without the .exe */
5003 /* so make sure newargz[1] doesn't end in .exe */
5004 strendzap(newargz[1],".exe");
5005 for (i = 1; i < argc; i++)
5006 newargz[i+1] = xstrdup(argv[i]);
5007 newargz[argc+1] = NULL;
5008
5009 for (i=0; i<argc+1; i++)
5010 {
5011 DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]);
5012 ;
5013 }
5014
5015EOF
5016
5017 case $host_os in
5018 mingw*)
5019 cat >> $cwrappersource <<EOF
5020 execv("$SHELL",(char const **)newargz);
5021EOF
5022 ;;
5023 *)
5024 cat >> $cwrappersource <<EOF
5025 execv("$SHELL",newargz);
5026EOF
5027 ;;
5028 esac
5029
5030 cat >> $cwrappersource <<"EOF"
5031 return 127;
5032}
5033
5034void *
5035xmalloc (size_t num)
5036{
5037 void * p = (void *) malloc (num);
5038 if (!p)
5039 lt_fatal ("Memory exhausted");
5040
5041 return p;
5042}
5043
5044char *
5045xstrdup (const char *string)
5046{
5047 return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
5048;
5049}
5050
5051const char *
5052base_name (const char *name)
5053{
5054 const char *base;
5055
5056#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5057 /* Skip over the disk name in MSDOS pathnames. */
5058 if (isalpha ((unsigned char)name[0]) && name[1] == ':')
5059 name += 2;
5060#endif
5061
5062 for (base = name; *name; name++)
5063 if (IS_DIR_SEPARATOR (*name))
5064 base = name + 1;
5065 return base;
5066}
5067
5068int
5069check_executable(const char * path)
5070{
5071 struct stat st;
5072
5073 DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
5074 if ((!path) || (!*path))
5075 return 0;
5076
5077 if ((stat (path, &st) >= 0) &&
5078 (
5079 /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
5080#if defined (S_IXOTH)
5081 ((st.st_mode & S_IXOTH) == S_IXOTH) ||
5082#endif
5083#if defined (S_IXGRP)
5084 ((st.st_mode & S_IXGRP) == S_IXGRP) ||
5085#endif
5086 ((st.st_mode & S_IXUSR) == S_IXUSR))
5087 )
5088 return 1;
5089 else
5090 return 0;
5091}
5092
5093/* Searches for the full path of the wrapper. Returns
5094 newly allocated full path name if found, NULL otherwise */
5095char *
5096find_executable (const char* wrapper)
5097{
5098 int has_slash = 0;
5099 const char* p;
5100 const char* p_next;
5101 /* static buffer for getcwd */
5102 char tmp[LT_PATHMAX + 1];
5103 int tmp_len;
5104 char* concat_name;
5105
5106 DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
5107
5108 if ((wrapper == NULL) || (*wrapper == '\0'))
5109 return NULL;
5110
5111 /* Absolute path? */
5112#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5113 if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
5114 {
5115 concat_name = xstrdup (wrapper);
5116 if (check_executable(concat_name))
5117 return concat_name;
5118 XFREE(concat_name);
5119 }
5120 else
5121 {
5122#endif
5123 if (IS_DIR_SEPARATOR (wrapper[0]))
5124 {
5125 concat_name = xstrdup (wrapper);
5126 if (check_executable(concat_name))
5127 return concat_name;
5128 XFREE(concat_name);
5129 }
5130#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5131 }
5132#endif
5133
5134 for (p = wrapper; *p; p++)
5135 if (*p == '/')
5136 {
5137 has_slash = 1;
5138 break;
5139 }
5140 if (!has_slash)
5141 {
5142 /* no slashes; search PATH */
5143 const char* path = getenv ("PATH");
5144 if (path != NULL)
5145 {
5146 for (p = path; *p; p = p_next)
5147 {
5148 const char* q;
5149 size_t p_len;
5150 for (q = p; *q; q++)
5151 if (IS_PATH_SEPARATOR(*q))
5152 break;
5153 p_len = q - p;
5154 p_next = (*q == '\0' ? q : q + 1);
5155 if (p_len == 0)
5156 {
5157 /* empty path: current directory */
5158 if (getcwd (tmp, LT_PATHMAX) == NULL)
5159 lt_fatal ("getcwd failed");
5160 tmp_len = strlen(tmp);
5161 concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5162 memcpy (concat_name, tmp, tmp_len);
5163 concat_name[tmp_len] = '/';
5164 strcpy (concat_name + tmp_len + 1, wrapper);
5165 }
5166 else
5167 {
5168 concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
5169 memcpy (concat_name, p, p_len);
5170 concat_name[p_len] = '/';
5171 strcpy (concat_name + p_len + 1, wrapper);
5172 }
5173 if (check_executable(concat_name))
5174 return concat_name;
5175 XFREE(concat_name);
5176 }
5177 }
5178 /* not found in PATH; assume curdir */
5179 }
5180 /* Relative path | not found in path: prepend cwd */
5181 if (getcwd (tmp, LT_PATHMAX) == NULL)
5182 lt_fatal ("getcwd failed");
5183 tmp_len = strlen(tmp);
5184 concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5185 memcpy (concat_name, tmp, tmp_len);
5186 concat_name[tmp_len] = '/';
5187 strcpy (concat_name + tmp_len + 1, wrapper);
5188
5189 if (check_executable(concat_name))
5190 return concat_name;
5191 XFREE(concat_name);
5192 return NULL;
5193}
5194
5195char *
5196strendzap(char *str, const char *pat)
5197{
5198 size_t len, patlen;
5199
5200 assert(str != NULL);
5201 assert(pat != NULL);
5202
5203 len = strlen(str);
5204 patlen = strlen(pat);
5205
5206 if (patlen <= len)
5207 {
5208 str += len - patlen;
5209 if (strcmp(str, pat) == 0)
5210 *str = '\0';
5211 }
5212 return str;
5213}
5214
5215static void
5216lt_error_core (int exit_status, const char * mode,
5217 const char * message, va_list ap)
5218{
5219 fprintf (stderr, "%s: %s: ", program_name, mode);
5220 vfprintf (stderr, message, ap);
5221 fprintf (stderr, ".\n");
5222
5223 if (exit_status >= 0)
5224 exit (exit_status);
5225}
5226
5227void
5228lt_fatal (const char *message, ...)
5229{
5230 va_list ap;
5231 va_start (ap, message);
5232 lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
5233 va_end (ap);
5234}
5235EOF
5236 # we should really use a build-platform specific compiler
5237 # here, but OTOH, the wrappers (shell script and this C one)
5238 # are only useful if you want to execute the "real" binary.
5239 # Since the "real" binary is built for $host, then this
5240 # wrapper might as well be built for $host, too.
5241 $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
5242 ;;
5243 esac
5244 $rm $output
5245 trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
5246
5247 $echo > $output "\
5248#! $SHELL
5249
5250# $output - temporary wrapper script for $objdir/$outputname
5251# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5252#
5253# The $output program cannot be directly executed until all the libtool
5254# libraries that it depends on are installed.
5255#
5256# This wrapper script should never be moved out of the build directory.
5257# If it is, it will not operate correctly.
5258
5259# Sed substitution that helps us do robust quoting. It backslashifies
5260# metacharacters that are still active within double-quoted strings.
5261Xsed='${SED} -e 1s/^X//'
5262sed_quote_subst='$sed_quote_subst'
5263
5264# The HP-UX ksh and POSIX shell print the target directory to stdout
5265# if CDPATH is set.
5266(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5267
5268relink_command=\"$relink_command\"
5269
5270# This environment variable determines our operation mode.
5271if test \"\$libtool_install_magic\" = \"$magic\"; then
5272 # install mode needs the following variable:
5273 notinst_deplibs='$notinst_deplibs'
5274else
5275 # When we are sourced in execute mode, \$file and \$echo are already set.
5276 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5277 echo=\"$qecho\"
5278 file=\"\$0\"
5279 # Make sure echo works.
5280 if test \"X\$1\" = X--no-reexec; then
5281 # Discard the --no-reexec flag, and continue.
5282 shift
5283 elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
5284 # Yippee, \$echo works!
5285 :
5286 else
5287 # Restart under the correct shell, and then maybe \$echo will work.
5288 exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
5289 fi
5290 fi\
5291"
5292 $echo >> $output "\
5293
5294 # Find the directory that this script lives in.
5295 thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
5296 test \"x\$thisdir\" = \"x\$file\" && thisdir=.
5297
5298 # Follow symbolic links until we get to the real thisdir.
5299 file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
5300 while test -n \"\$file\"; do
5301 destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
5302
5303 # If there was a directory component, then change thisdir.
5304 if test \"x\$destdir\" != \"x\$file\"; then
5305 case \"\$destdir\" in
5306 [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
5307 *) thisdir=\"\$thisdir/\$destdir\" ;;
5308 esac
5309 fi
5310
5311 file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
5312 file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
5313 done
5314
5315 # Try to get the absolute directory name.
5316 absdir=\`cd \"\$thisdir\" && pwd\`
5317 test -n \"\$absdir\" && thisdir=\"\$absdir\"
5318"
5319
5320 if test "$fast_install" = yes; then
5321 $echo >> $output "\
5322 program=lt-'$outputname'$exeext
5323 progdir=\"\$thisdir/$objdir\"
5324
5325 if test ! -f \"\$progdir/\$program\" || \\
5326 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
5327 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
5328
5329 file=\"\$\$-\$program\"
5330
5331 if test ! -d \"\$progdir\"; then
5332 $mkdir \"\$progdir\"
5333 else
5334 $rm \"\$progdir/\$file\"
5335 fi"
5336
5337 $echo >> $output "\
5338
5339 # relink executable if necessary
5340 if test -n \"\$relink_command\"; then
5341 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
5342 else
5343 $echo \"\$relink_command_output\" >&2
5344 $rm \"\$progdir/\$file\"
5345 exit $EXIT_FAILURE
5346 fi
5347 fi
5348
5349 $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
5350 { $rm \"\$progdir/\$program\";
5351 $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
5352 $rm \"\$progdir/\$file\"
5353 fi"
5354 else
5355 $echo >> $output "\
5356 program='$outputname'
5357 progdir=\"\$thisdir/$objdir\"
5358"
5359 fi
5360
5361 $echo >> $output "\
5362
5363 if test -f \"\$progdir/\$program\"; then"
5364
5365 # Export our shlibpath_var if we have one.
5366 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5367 $echo >> $output "\
5368 # Add our own library path to $shlibpath_var
5369 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
5370
5371 # Some systems cannot cope with colon-terminated $shlibpath_var
5372 # The second colon is a workaround for a bug in BeOS R4 sed
5373 $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
5374
5375 export $shlibpath_var
5376"
5377 fi
5378
5379 # fixup the dll searchpath if we need to.
5380 if test -n "$dllsearchpath"; then
5381 $echo >> $output "\
5382 # Add the dll search path components to the executable PATH
5383 PATH=$dllsearchpath:\$PATH
5384"
5385 fi
5386
5387 $echo >> $output "\
5388 if test \"\$libtool_execute_magic\" != \"$magic\"; then
5389 # Run the actual program with our arguments.
5390"
5391 case $host in
5392 # Backslashes separate directories on plain windows
5393 *-*-mingw | *-*-os2*)
5394 $echo >> $output "\
5395 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
5396"
5397 ;;
5398
5399 *)
5400 $echo >> $output "\
5401 exec \"\$progdir/\$program\" \${1+\"\$@\"}
5402"
5403 ;;
5404 esac
5405 $echo >> $output "\
5406 \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
5407 exit $EXIT_FAILURE
5408 fi
5409 else
5410 # The program doesn't exist.
5411 \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
5412 \$echo \"This script is just a wrapper for \$program.\" 1>&2
5413 $echo \"See the $PACKAGE documentation for more information.\" 1>&2
5414 exit $EXIT_FAILURE
5415 fi
5416fi\
5417"
5418 chmod +x $output
5419 fi
5420 exit $EXIT_SUCCESS
5421 ;;
5422 esac
5423
5424 # See if we need to build an old-fashioned archive.
5425 for oldlib in $oldlibs; do
5426
5427 if test "$build_libtool_libs" = convenience; then
5428 oldobjs="$libobjs_save"
5429 addlibs="$convenience"
5430 build_libtool_libs=no
5431 else
5432 if test "$build_libtool_libs" = module; then
5433 oldobjs="$libobjs_save"
5434 build_libtool_libs=no
5435 else
5436 oldobjs="$old_deplibs $non_pic_objects"
5437 fi
5438 addlibs="$old_convenience"
5439 fi
5440
5441 if test -n "$addlibs"; then
5442 gentop="$output_objdir/${outputname}x"
5443 generated="$generated $gentop"
5444
5445 func_extract_archives $gentop $addlibs
5446 oldobjs="$oldobjs $func_extract_archives_result"
5447 fi
5448
5449 # Do each command in the archive commands.
5450 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5451 cmds=$old_archive_from_new_cmds
5452 else
5453 # POSIX demands no paths to be encoded in archives. We have
5454 # to avoid creating archives with duplicate basenames if we
5455 # might have to extract them afterwards, e.g., when creating a
5456 # static archive out of a convenience library, or when linking
5457 # the entirety of a libtool archive into another (currently
5458 # not supported by libtool).
5459 if (for obj in $oldobjs
5460 do
5461 $echo "X$obj" | $Xsed -e 's%^.*/%%'
5462 done | sort | sort -uc >/dev/null 2>&1); then
5463 :
5464 else
5465 $echo "copying selected object files to avoid basename conflicts..."
5466
5467 if test -z "$gentop"; then
5468 gentop="$output_objdir/${outputname}x"
5469 generated="$generated $gentop"
5470
5471 $show "${rm}r $gentop"
5472 $run ${rm}r "$gentop"
5473 $show "$mkdir $gentop"
5474 $run $mkdir "$gentop"
5475 exit_status=$?
5476 if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
5477 exit $exit_status
5478 fi
5479 fi
5480
5481 save_oldobjs=$oldobjs
5482 oldobjs=
5483 counter=1
5484 for obj in $save_oldobjs
5485 do
5486 objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
5487 case " $oldobjs " in
5488 " ") oldobjs=$obj ;;
5489 *[\ /]"$objbase "*)
5490 while :; do
5491 # Make sure we don't pick an alternate name that also
5492 # overlaps.
5493 newobj=lt$counter-$objbase
5494 counter=`expr $counter + 1`
5495 case " $oldobjs " in
5496 *[\ /]"$newobj "*) ;;
5497 *) if test ! -f "$gentop/$newobj"; then break; fi ;;
5498 esac
5499 done
5500 $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
5501 $run ln "$obj" "$gentop/$newobj" ||
5502 $run cp "$obj" "$gentop/$newobj"
5503 oldobjs="$oldobjs $gentop/$newobj"
5504 ;;
5505 *) oldobjs="$oldobjs $obj" ;;
5506 esac
5507 done
5508 fi
5509
5510 eval cmds=\"$old_archive_cmds\"
5511
5512 if len=`expr "X$cmds" : ".*"` &&
5513 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
5514 cmds=$old_archive_cmds
5515 else
5516 # the command line is too long to link in one step, link in parts
5517 $echo "using piecewise archive linking..."
5518 save_RANLIB=$RANLIB
5519 RANLIB=:
5520 objlist=
5521 concat_cmds=
5522 save_oldobjs=$oldobjs
5523
5524 # Is there a better way of finding the last object in the list?
5525 for obj in $save_oldobjs
5526 do
5527 last_oldobj=$obj
5528 done
5529 for obj in $save_oldobjs
5530 do
5531 oldobjs="$objlist $obj"
5532 objlist="$objlist $obj"
5533 eval test_cmds=\"$old_archive_cmds\"
5534 if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
5535 test "$len" -le "$max_cmd_len"; then
5536 :
5537 else
5538 # the above command should be used before it gets too long
5539 oldobjs=$objlist
5540 if test "$obj" = "$last_oldobj" ; then
5541 RANLIB=$save_RANLIB
5542 fi
5543 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
5544 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
5545 objlist=
5546 fi
5547 done
5548 RANLIB=$save_RANLIB
5549 oldobjs=$objlist
5550 if test "X$oldobjs" = "X" ; then
5551 eval cmds=\"\$concat_cmds\"
5552 else
5553 eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
5554 fi
5555 fi
5556 fi
5557 save_ifs="$IFS"; IFS='~'
5558 for cmd in $cmds; do
5559 eval cmd=\"$cmd\"
5560 IFS="$save_ifs"
5561 $show "$cmd"
5562 $run eval "$cmd" || exit $?
5563 done
5564 IFS="$save_ifs"
5565 done
5566
5567 if test -n "$generated"; then
5568 $show "${rm}r$generated"
5569 $run ${rm}r$generated
5570 fi
5571
5572 # Now create the libtool archive.
5573 case $output in
5574 *.la)
5575 old_library=
5576 test "$build_old_libs" = yes && old_library="$libname.$libext"
5577 $show "creating $output"
5578
5579 # Preserve any variables that may affect compiler behavior
5580 for var in $variables_saved_for_relink; do
5581 if eval test -z \"\${$var+set}\"; then
5582 relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
5583 elif eval var_value=\$$var; test -z "$var_value"; then
5584 relink_command="$var=; export $var; $relink_command"
5585 else
5586 var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
5587 relink_command="$var=\"$var_value\"; export $var; $relink_command"
5588 fi
5589 done
5590 # Quote the link command for shipping.
5591 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
5592 relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
5593 if test "$hardcode_automatic" = yes ; then
5594 relink_command=
5595 fi
5596
5597
5598 # Only create the output if not a dry run.
5599 if test -z "$run"; then
5600 for installed in no yes; do
5601 if test "$installed" = yes; then
5602 if test -z "$install_libdir"; then
5603 break
5604 fi
5605 output="$output_objdir/$outputname"i
5606 # Replace all uninstalled libtool libraries with the installed ones
5607 newdependency_libs=
5608 for deplib in $dependency_libs; do
5609 case $deplib in
5610 *.la)
5611 name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
5612 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
5613 if test -z "$libdir"; then
5614 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
5615 exit $EXIT_FAILURE
5616 fi
5617 newdependency_libs="$newdependency_libs $libdir/$name"
5618 ;;
5619 *) newdependency_libs="$newdependency_libs $deplib" ;;
5620 esac
5621 done
5622 dependency_libs="$newdependency_libs"
5623 newdlfiles=
5624 for lib in $dlfiles; do
5625 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5626 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5627 if test -z "$libdir"; then
5628 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5629 exit $EXIT_FAILURE
5630 fi
5631 newdlfiles="$newdlfiles $libdir/$name"
5632 done
5633 dlfiles="$newdlfiles"
5634 newdlprefiles=
5635 for lib in $dlprefiles; do
5636 name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5637 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5638 if test -z "$libdir"; then
5639 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5640 exit $EXIT_FAILURE
5641 fi
5642 newdlprefiles="$newdlprefiles $libdir/$name"
5643 done
5644 dlprefiles="$newdlprefiles"
5645 else
5646 newdlfiles=
5647 for lib in $dlfiles; do
5648 case $lib in
5649 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
5650 *) abs=`pwd`"/$lib" ;;
5651 esac
5652 newdlfiles="$newdlfiles $abs"
5653 done
5654 dlfiles="$newdlfiles"
5655 newdlprefiles=
5656 for lib in $dlprefiles; do
5657 case $lib in
5658 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
5659 *) abs=`pwd`"/$lib" ;;
5660 esac
5661 newdlprefiles="$newdlprefiles $abs"
5662 done
5663 dlprefiles="$newdlprefiles"
5664 fi
5665 $rm $output
5666 # place dlname in correct position for cygwin
5667 tdlname=$dlname
5668 case $host,$output,$installed,$module,$dlname in
5669 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
5670 esac
5671 $echo > $output "\
5672# $outputname - a libtool library file
5673# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5674#
5675# Please DO NOT delete this file!
5676# It is necessary for linking the library.
5677
5678# The name that we can dlopen(3).
5679dlname='$tdlname'
5680
5681# Names of this library.
5682library_names='$library_names'
5683
5684# The name of the static archive.
5685old_library='$old_library'
5686
5687# Libraries that this one depends upon.
5688dependency_libs='$dependency_libs'
5689
5690# Version information for $libname.
5691current=$current
5692age=$age
5693revision=$revision
5694
5695# Is this an already installed library?
5696installed=$installed
5697
5698# Should we warn about portability when linking against -modules?
5699shouldnotlink=$module
5700
5701# Files to dlopen/dlpreopen
5702dlopen='$dlfiles'
5703dlpreopen='$dlprefiles'
5704
5705# Directory that this library needs to be installed in:
5706libdir='$install_libdir'"
5707 if test "$installed" = no && test "$need_relink" = yes; then
5708 $echo >> $output "\
5709relink_command=\"$relink_command\""
5710 fi
5711 done
5712 fi
5713
5714 # Do a symbolic link so that the libtool archive can be found in
5715 # LD_LIBRARY_PATH before the program is installed.
5716 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
5717 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
5718 ;;
5719 esac
5720 exit $EXIT_SUCCESS
5721 ;;
5722
5723 # libtool install mode
5724 install)
5725 modename="$modename: install"
5726
5727 # There may be an optional sh(1) argument at the beginning of
5728 # install_prog (especially on Windows NT).
5729 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
5730 # Allow the use of GNU shtool's install command.
5731 $echo "X$nonopt" | grep shtool > /dev/null; then
5732 # Aesthetically quote it.
5733 arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
5734 case $arg in
5735 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
5736 arg="\"$arg\""
5737 ;;
5738 esac
5739 install_prog="$arg "
5740 arg="$1"
5741 shift
5742 else
5743 install_prog=
5744 arg=$nonopt
5745 fi
5746
5747 # The real first argument should be the name of the installation program.
5748 # Aesthetically quote it.
5749 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5750 case $arg in
5751 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
5752 arg="\"$arg\""
5753 ;;
5754 esac
5755 install_prog="$install_prog$arg"
5756
5757 # We need to accept at least all the BSD install flags.
5758 dest=
5759 files=
5760 opts=
5761 prev=
5762 install_type=
5763 isdir=no
5764 stripme=
5765 for arg
5766 do
5767 if test -n "$dest"; then
5768 files="$files $dest"
5769 dest=$arg
5770 continue
5771 fi
5772
5773 case $arg in
5774 -d) isdir=yes ;;
5775 -f)
5776 case " $install_prog " in
5777 *[\\\ /]cp\ *) ;;
5778 *) prev=$arg ;;
5779 esac
5780 ;;
5781 -g | -m | -o) prev=$arg ;;
5782 -s)
5783 stripme=" -s"
5784 continue
5785 ;;
5786 -*)
5787 ;;
5788 *)
5789 # If the previous option needed an argument, then skip it.
5790 if test -n "$prev"; then
5791 prev=
5792 else
5793 dest=$arg
5794 continue
5795 fi
5796 ;;
5797 esac
5798
5799 # Aesthetically quote the argument.
5800 arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5801 case $arg in
5802 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
5803 arg="\"$arg\""
5804 ;;
5805 esac
5806 install_prog="$install_prog $arg"
5807 done
5808
5809 if test -z "$install_prog"; then
5810 $echo "$modename: you must specify an install program" 1>&2
5811 $echo "$help" 1>&2
5812 exit $EXIT_FAILURE
5813 fi
5814
5815 if test -n "$prev"; then
5816 $echo "$modename: the \`$prev' option requires an argument" 1>&2
5817 $echo "$help" 1>&2
5818 exit $EXIT_FAILURE
5819 fi
5820
5821 if test -z "$files"; then
5822 if test -z "$dest"; then
5823 $echo "$modename: no file or destination specified" 1>&2
5824 else
5825 $echo "$modename: you must specify a destination" 1>&2
5826 fi
5827 $echo "$help" 1>&2
5828 exit $EXIT_FAILURE
5829 fi
5830
5831 # Strip any trailing slash from the destination.
5832 dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
5833
5834 # Check to see that the destination is a directory.
5835 test -d "$dest" && isdir=yes
5836 if test "$isdir" = yes; then
5837 destdir="$dest"
5838 destname=
5839 else
5840 destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
5841 test "X$destdir" = "X$dest" && destdir=.
5842 destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
5843
5844 # Not a directory, so check to see that there is only one file specified.
5845 set dummy $files
5846 if test "$#" -gt 2; then
5847 $echo "$modename: \`$dest' is not a directory" 1>&2
5848 $echo "$help" 1>&2
5849 exit $EXIT_FAILURE
5850 fi
5851 fi
5852 case $destdir in
5853 [\\/]* | [A-Za-z]:[\\/]*) ;;
5854 *)
5855 for file in $files; do
5856 case $file in
5857 *.lo) ;;
5858 *)
5859 $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
5860 $echo "$help" 1>&2
5861 exit $EXIT_FAILURE
5862 ;;
5863 esac
5864 done
5865 ;;
5866 esac
5867
5868 # This variable tells wrapper scripts just to set variables rather
5869 # than running their programs.
5870 libtool_install_magic="$magic"
5871
5872 staticlibs=
5873 future_libdirs=
5874 current_libdirs=
5875 for file in $files; do
5876
5877 # Do each installation.
5878 case $file in
5879 *.$libext)
5880 # Do the static libraries later.
5881 staticlibs="$staticlibs $file"
5882 ;;
5883
5884 *.la)
5885 # Check to see that this really is a libtool archive.
5886 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
5887 else
5888 $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
5889 $echo "$help" 1>&2
5890 exit $EXIT_FAILURE
5891 fi
5892
5893 library_names=
5894 old_library=
5895 relink_command=
5896 # If there is no directory component, then add one.
5897 case $file in
5898 */* | *\\*) . $file ;;
5899 *) . ./$file ;;
5900 esac
5901
5902 # Add the libdir to current_libdirs if it is the destination.
5903 if test "X$destdir" = "X$libdir"; then
5904 case "$current_libdirs " in
5905 *" $libdir "*) ;;
5906 *) current_libdirs="$current_libdirs $libdir" ;;
5907 esac
5908 else
5909 # Note the libdir as a future libdir.
5910 case "$future_libdirs " in
5911 *" $libdir "*) ;;
5912 *) future_libdirs="$future_libdirs $libdir" ;;
5913 esac
5914 fi
5915
5916 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
5917 test "X$dir" = "X$file/" && dir=
5918 dir="$dir$objdir"
5919
5920 if test -n "$relink_command"; then
5921 # Determine the prefix the user has applied to our future dir.
5922 inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
5923
5924 # Don't allow the user to place us outside of our expected
5925 # location b/c this prevents finding dependent libraries that
5926 # are installed to the same prefix.
5927 # At present, this check doesn't affect windows .dll's that
5928 # are installed into $libdir/../bin (currently, that works fine)
5929 # but it's something to keep an eye on.
5930 if test "$inst_prefix_dir" = "$destdir"; then
5931 $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
5932 exit $EXIT_FAILURE
5933 fi
5934
5935 if test -n "$inst_prefix_dir"; then
5936 # Stick the inst_prefix_dir data into the link command.
5937 relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
5938 else
5939 relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
5940 fi
5941
5942 $echo "$modename: warning: relinking \`$file'" 1>&2
5943 $show "$relink_command"
5944 if $run eval "$relink_command"; then :
5945 else
5946 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
5947 exit $EXIT_FAILURE
5948 fi
5949 fi
5950
5951 # See the names of the shared library.
5952 set dummy $library_names
5953 if test -n "$2"; then
5954 realname="$2"
5955 shift
5956 shift
5957
5958 srcname="$realname"
5959 test -n "$relink_command" && srcname="$realname"T
5960
5961 # Install the shared library and build the symlinks.
5962 $show "$install_prog $dir/$srcname $destdir/$realname"
5963 $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
5964 if test -n "$stripme" && test -n "$striplib"; then
5965 $show "$striplib $destdir/$realname"
5966 $run eval "$striplib $destdir/$realname" || exit $?
5967 fi
5968
5969 if test "$#" -gt 0; then
5970 # Delete the old symlinks, and create new ones.
5971 # Try `ln -sf' first, because the `ln' binary might depend on
5972 # the symlink we replace! Solaris /bin/ln does not understand -f,
5973 # so we also need to try rm && ln -s.
5974 for linkname
5975 do
5976 if test "$linkname" != "$realname"; then
5977 $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
5978 $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
5979 fi
5980 done
5981 fi
5982
5983 # Do each command in the postinstall commands.
5984 lib="$destdir/$realname"
5985 cmds=$postinstall_cmds
5986 save_ifs="$IFS"; IFS='~'
5987 for cmd in $cmds; do
5988 IFS="$save_ifs"
5989 eval cmd=\"$cmd\"
5990 $show "$cmd"
5991 $run eval "$cmd" || {
5992 lt_exit=$?
5993
5994 # Restore the uninstalled library and exit
5995 if test "$mode" = relink; then
5996 $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
5997 fi
5998
5999 exit $lt_exit
6000 }
6001 done
6002 IFS="$save_ifs"
6003 fi
6004
6005 # Install the pseudo-library for information purposes.
6006 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6007 instname="$dir/$name"i
6008 $show "$install_prog $instname $destdir/$name"
6009 $run eval "$install_prog $instname $destdir/$name" || exit $?
6010
6011 # Maybe install the static library, too.
6012 test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
6013 ;;
6014
6015 *.lo)
6016 # Install (i.e. copy) a libtool object.
6017
6018 # Figure out destination file name, if it wasn't already specified.
6019 if test -n "$destname"; then
6020 destfile="$destdir/$destname"
6021 else
6022 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6023 destfile="$destdir/$destfile"
6024 fi
6025
6026 # Deduce the name of the destination old-style object file.
6027 case $destfile in
6028 *.lo)
6029 staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
6030 ;;
6031 *.$objext)
6032 staticdest="$destfile"
6033 destfile=
6034 ;;
6035 *)
6036 $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
6037 $echo "$help" 1>&2
6038 exit $EXIT_FAILURE
6039 ;;
6040 esac
6041
6042 # Install the libtool object if requested.
6043 if test -n "$destfile"; then
6044 $show "$install_prog $file $destfile"
6045 $run eval "$install_prog $file $destfile" || exit $?
6046 fi
6047
6048 # Install the old object if enabled.
6049 if test "$build_old_libs" = yes; then
6050 # Deduce the name of the old-style object file.
6051 staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
6052
6053 $show "$install_prog $staticobj $staticdest"
6054 $run eval "$install_prog \$staticobj \$staticdest" || exit $?
6055 fi
6056 exit $EXIT_SUCCESS
6057 ;;
6058
6059 *)
6060 # Figure out destination file name, if it wasn't already specified.
6061 if test -n "$destname"; then
6062 destfile="$destdir/$destname"
6063 else
6064 destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6065 destfile="$destdir/$destfile"
6066 fi
6067
6068 # If the file is missing, and there is a .exe on the end, strip it
6069 # because it is most likely a libtool script we actually want to
6070 # install
6071 stripped_ext=""
6072 case $file in
6073 *.exe)
6074 if test ! -f "$file"; then
6075 file=`$echo $file|${SED} 's,.exe$,,'`
6076 stripped_ext=".exe"
6077 fi
6078 ;;
6079 esac
6080
6081 # Do a test to see if this is really a libtool program.
6082 case $host in
6083 *cygwin*|*mingw*)
6084 wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
6085 ;;
6086 *)
6087 wrapper=$file
6088 ;;
6089 esac
6090 if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
6091 notinst_deplibs=
6092 relink_command=
6093
6094 # Note that it is not necessary on cygwin/mingw to append a dot to
6095 # foo even if both foo and FILE.exe exist: automatic-append-.exe
6096 # behavior happens only for exec(3), not for open(2)! Also, sourcing
6097 # `FILE.' does not work on cygwin managed mounts.
6098 #
6099 # If there is no directory component, then add one.
6100 case $wrapper in
6101 */* | *\\*) . ${wrapper} ;;
6102 *) . ./${wrapper} ;;
6103 esac
6104
6105 # Check the variables that should have been set.
6106 if test -z "$notinst_deplibs"; then
6107 $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
6108 exit $EXIT_FAILURE
6109 fi
6110
6111 finalize=yes
6112 for lib in $notinst_deplibs; do
6113 # Check to see that each library is installed.
6114 libdir=
6115 if test -f "$lib"; then
6116 # If there is no directory component, then add one.
6117 case $lib in
6118 */* | *\\*) . $lib ;;
6119 *) . ./$lib ;;
6120 esac
6121 fi
6122 libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
6123 if test -n "$libdir" && test ! -f "$libfile"; then
6124 $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
6125 finalize=no
6126 fi
6127 done
6128
6129 relink_command=
6130 # Note that it is not necessary on cygwin/mingw to append a dot to
6131 # foo even if both foo and FILE.exe exist: automatic-append-.exe
6132 # behavior happens only for exec(3), not for open(2)! Also, sourcing
6133 # `FILE.' does not work on cygwin managed mounts.
6134 #
6135 # If there is no directory component, then add one.
6136 case $wrapper in
6137 */* | *\\*) . ${wrapper} ;;
6138 *) . ./${wrapper} ;;
6139 esac
6140
6141 outputname=
6142 if test "$fast_install" = no && test -n "$relink_command"; then
6143 if test "$finalize" = yes && test -z "$run"; then
6144 tmpdir=`func_mktempdir`
6145 file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
6146 outputname="$tmpdir/$file"
6147 # Replace the output file specification.
6148 relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
6149
6150 $show "$relink_command"
6151 if $run eval "$relink_command"; then :
6152 else
6153 $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6154 ${rm}r "$tmpdir"
6155 continue
6156 fi
6157 file="$outputname"
6158 else
6159 $echo "$modename: warning: cannot relink \`$file'" 1>&2
6160 fi
6161 else
6162 # Install the binary that we compiled earlier.
6163 file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
6164 fi
6165 fi
6166
6167 # remove .exe since cygwin /usr/bin/install will append another
6168 # one anyway
6169 case $install_prog,$host in
6170 */usr/bin/install*,*cygwin*)
6171 case $file:$destfile in
6172 *.exe:*.exe)
6173 # this is ok
6174 ;;
6175 *.exe:*)
6176 destfile=$destfile.exe
6177 ;;
6178 *:*.exe)
6179 destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
6180 ;;
6181 esac
6182 ;;
6183 esac
6184 $show "$install_prog$stripme $file $destfile"
6185 $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
6186 test -n "$outputname" && ${rm}r "$tmpdir"
6187 ;;
6188 esac
6189 done
6190
6191 for file in $staticlibs; do
6192 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6193
6194 # Set up the ranlib parameters.
6195 oldlib="$destdir/$name"
6196
6197 $show "$install_prog $file $oldlib"
6198 $run eval "$install_prog \$file \$oldlib" || exit $?
6199
6200 if test -n "$stripme" && test -n "$old_striplib"; then
6201 $show "$old_striplib $oldlib"
6202 $run eval "$old_striplib $oldlib" || exit $?
6203 fi
6204
6205 # Do each command in the postinstall commands.
6206 cmds=$old_postinstall_cmds
6207 save_ifs="$IFS"; IFS='~'
6208 for cmd in $cmds; do
6209 IFS="$save_ifs"
6210 eval cmd=\"$cmd\"
6211 $show "$cmd"
6212 $run eval "$cmd" || exit $?
6213 done
6214 IFS="$save_ifs"
6215 done
6216
6217 if test -n "$future_libdirs"; then
6218 $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
6219 fi
6220
6221 if test -n "$current_libdirs"; then
6222 # Maybe just do a dry run.
6223 test -n "$run" && current_libdirs=" -n$current_libdirs"
6224 exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
6225 else
6226 exit $EXIT_SUCCESS
6227 fi
6228 ;;
6229
6230 # libtool finish mode
6231 finish)
6232 modename="$modename: finish"
6233 libdirs="$nonopt"
6234 admincmds=
6235
6236 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
6237 for dir
6238 do
6239 libdirs="$libdirs $dir"
6240 done
6241
6242 for libdir in $libdirs; do
6243 if test -n "$finish_cmds"; then
6244 # Do each command in the finish commands.
6245 cmds=$finish_cmds
6246 save_ifs="$IFS"; IFS='~'
6247 for cmd in $cmds; do
6248 IFS="$save_ifs"
6249 eval cmd=\"$cmd\"
6250 $show "$cmd"
6251 $run eval "$cmd" || admincmds="$admincmds
6252 $cmd"
6253 done
6254 IFS="$save_ifs"
6255 fi
6256 if test -n "$finish_eval"; then
6257 # Do the single finish_eval.
6258 eval cmds=\"$finish_eval\"
6259 $run eval "$cmds" || admincmds="$admincmds
6260 $cmds"
6261 fi
6262 done
6263 fi
6264
6265 # Exit here if they wanted silent mode.
6266 test "$show" = : && exit $EXIT_SUCCESS
6267
6268 $echo "X----------------------------------------------------------------------" | $Xsed
6269 $echo "Libraries have been installed in:"
6270 for libdir in $libdirs; do
6271 $echo " $libdir"
6272 done
6273 $echo
6274 $echo "If you ever happen to want to link against installed libraries"
6275 $echo "in a given directory, LIBDIR, you must either use libtool, and"
6276 $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
6277 $echo "flag during linking and do at least one of the following:"
6278 if test -n "$shlibpath_var"; then
6279 $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
6280 $echo " during execution"
6281 fi
6282 if test -n "$runpath_var"; then
6283 $echo " - add LIBDIR to the \`$runpath_var' environment variable"
6284 $echo " during linking"
6285 fi
6286 if test -n "$hardcode_libdir_flag_spec"; then
6287 libdir=LIBDIR
6288 eval flag=\"$hardcode_libdir_flag_spec\"
6289
6290 $echo " - use the \`$flag' linker flag"
6291 fi
6292 if test -n "$admincmds"; then
6293 $echo " - have your system administrator run these commands:$admincmds"
6294 fi
6295 if test -f /etc/ld.so.conf; then
6296 $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
6297 fi
6298 $echo
6299 $echo "See any operating system documentation about shared libraries for"
6300 $echo "more information, such as the ld(1) and ld.so(8) manual pages."
6301 $echo "X----------------------------------------------------------------------" | $Xsed
6302 exit $EXIT_SUCCESS
6303 ;;
6304
6305 # libtool execute mode
6306 execute)
6307 modename="$modename: execute"
6308
6309 # The first argument is the command name.
6310 cmd="$nonopt"
6311 if test -z "$cmd"; then
6312 $echo "$modename: you must specify a COMMAND" 1>&2
6313 $echo "$help"
6314 exit $EXIT_FAILURE
6315 fi
6316
6317 # Handle -dlopen flags immediately.
6318 for file in $execute_dlfiles; do
6319 if test ! -f "$file"; then
6320 $echo "$modename: \`$file' is not a file" 1>&2
6321 $echo "$help" 1>&2
6322 exit $EXIT_FAILURE
6323 fi
6324
6325 dir=
6326 case $file in
6327 *.la)
6328 # Check to see that this really is a libtool archive.
6329 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
6330 else
6331 $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6332 $echo "$help" 1>&2
6333 exit $EXIT_FAILURE
6334 fi
6335
6336 # Read the libtool library.
6337 dlname=
6338 library_names=
6339
6340 # If there is no directory component, then add one.
6341 case $file in
6342 */* | *\\*) . $file ;;
6343 *) . ./$file ;;
6344 esac
6345
6346 # Skip this library if it cannot be dlopened.
6347 if test -z "$dlname"; then
6348 # Warn if it was a shared library.
6349 test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
6350 continue
6351 fi
6352
6353 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6354 test "X$dir" = "X$file" && dir=.
6355
6356 if test -f "$dir/$objdir/$dlname"; then
6357 dir="$dir/$objdir"
6358 else
6359 $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
6360 exit $EXIT_FAILURE
6361 fi
6362 ;;
6363
6364 *.lo)
6365 # Just add the directory containing the .lo file.
6366 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6367 test "X$dir" = "X$file" && dir=.
6368 ;;
6369
6370 *)
6371 $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
6372 continue
6373 ;;
6374 esac
6375
6376 # Get the absolute pathname.
6377 absdir=`cd "$dir" && pwd`
6378 test -n "$absdir" && dir="$absdir"
6379
6380 # Now add the directory to shlibpath_var.
6381 if eval "test -z \"\$$shlibpath_var\""; then
6382 eval "$shlibpath_var=\"\$dir\""
6383 else
6384 eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
6385 fi
6386 done
6387
6388 # This variable tells wrapper scripts just to set shlibpath_var
6389 # rather than running their programs.
6390 libtool_execute_magic="$magic"
6391
6392 # Check if any of the arguments is a wrapper script.
6393 args=
6394 for file
6395 do
6396 case $file in
6397 -*) ;;
6398 *)
6399 # Do a test to see if this is really a libtool program.
6400 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6401 # If there is no directory component, then add one.
6402 case $file in
6403 */* | *\\*) . $file ;;
6404 *) . ./$file ;;
6405 esac
6406
6407 # Transform arg to wrapped name.
6408 file="$progdir/$program"
6409 fi
6410 ;;
6411 esac
6412 # Quote arguments (to preserve shell metacharacters).
6413 file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
6414 args="$args \"$file\""
6415 done
6416
6417 if test -z "$run"; then
6418 if test -n "$shlibpath_var"; then
6419 # Export the shlibpath_var.
6420 eval "export $shlibpath_var"
6421 fi
6422
6423 # Restore saved environment variables
6424 if test "${save_LC_ALL+set}" = set; then
6425 LC_ALL="$save_LC_ALL"; export LC_ALL
6426 fi
6427 if test "${save_LANG+set}" = set; then
6428 LANG="$save_LANG"; export LANG
6429 fi
6430
6431 # Now prepare to actually exec the command.
6432 exec_cmd="\$cmd$args"
6433 else
6434 # Display what would be done.
6435 if test -n "$shlibpath_var"; then
6436 eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
6437 $echo "export $shlibpath_var"
6438 fi
6439 $echo "$cmd$args"
6440 exit $EXIT_SUCCESS
6441 fi
6442 ;;
6443
6444 # libtool clean and uninstall mode
6445 clean | uninstall)
6446 modename="$modename: $mode"
6447 rm="$nonopt"
6448 files=
6449 rmforce=
6450 exit_status=0
6451
6452 # This variable tells wrapper scripts just to set variables rather
6453 # than running their programs.
6454 libtool_install_magic="$magic"
6455
6456 for arg
6457 do
6458 case $arg in
6459 -f) rm="$rm $arg"; rmforce=yes ;;
6460 -*) rm="$rm $arg" ;;
6461 *) files="$files $arg" ;;
6462 esac
6463 done
6464
6465 if test -z "$rm"; then
6466 $echo "$modename: you must specify an RM program" 1>&2
6467 $echo "$help" 1>&2
6468 exit $EXIT_FAILURE
6469 fi
6470
6471 rmdirs=
6472
6473 origobjdir="$objdir"
6474 for file in $files; do
6475 dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6476 if test "X$dir" = "X$file"; then
6477 dir=.
6478 objdir="$origobjdir"
6479 else
6480 objdir="$dir/$origobjdir"
6481 fi
6482 name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6483 test "$mode" = uninstall && objdir="$dir"
6484
6485 # Remember objdir for removal later, being careful to avoid duplicates
6486 if test "$mode" = clean; then
6487 case " $rmdirs " in
6488 *" $objdir "*) ;;
6489 *) rmdirs="$rmdirs $objdir" ;;
6490 esac
6491 fi
6492
6493 # Don't error if the file doesn't exist and rm -f was used.
6494 if (test -L "$file") >/dev/null 2>&1 \
6495 || (test -h "$file") >/dev/null 2>&1 \
6496 || test -f "$file"; then
6497 :
6498 elif test -d "$file"; then
6499 exit_status=1
6500 continue
6501 elif test "$rmforce" = yes; then
6502 continue
6503 fi
6504
6505 rmfiles="$file"
6506
6507 case $name in
6508 *.la)
6509 # Possibly a libtool archive, so verify it.
6510 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6511 . $dir/$name
6512
6513 # Delete the libtool libraries and symlinks.
6514 for n in $library_names; do
6515 rmfiles="$rmfiles $objdir/$n"
6516 done
6517 test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
6518
6519 case "$mode" in
6520 clean)
6521 case " $library_names " in
6522 # " " in the beginning catches empty $dlname
6523 *" $dlname "*) ;;
6524 *) rmfiles="$rmfiles $objdir/$dlname" ;;
6525 esac
6526 test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
6527 ;;
6528 uninstall)
6529 if test -n "$library_names"; then
6530 # Do each command in the postuninstall commands.
6531 cmds=$postuninstall_cmds
6532 save_ifs="$IFS"; IFS='~'
6533 for cmd in $cmds; do
6534 IFS="$save_ifs"
6535 eval cmd=\"$cmd\"
6536 $show "$cmd"
6537 $run eval "$cmd"
6538 if test "$?" -ne 0 && test "$rmforce" != yes; then
6539 exit_status=1
6540 fi
6541 done
6542 IFS="$save_ifs"
6543 fi
6544
6545 if test -n "$old_library"; then
6546 # Do each command in the old_postuninstall commands.
6547 cmds=$old_postuninstall_cmds
6548 save_ifs="$IFS"; IFS='~'
6549 for cmd in $cmds; do
6550 IFS="$save_ifs"
6551 eval cmd=\"$cmd\"
6552 $show "$cmd"
6553 $run eval "$cmd"
6554 if test "$?" -ne 0 && test "$rmforce" != yes; then
6555 exit_status=1
6556 fi
6557 done
6558 IFS="$save_ifs"
6559 fi
6560 # FIXME: should reinstall the best remaining shared library.
6561 ;;
6562 esac
6563 fi
6564 ;;
6565
6566 *.lo)
6567 # Possibly a libtool object, so verify it.
6568 if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6569
6570 # Read the .lo file
6571 . $dir/$name
6572
6573 # Add PIC object to the list of files to remove.
6574 if test -n "$pic_object" \
6575 && test "$pic_object" != none; then
6576 rmfiles="$rmfiles $dir/$pic_object"
6577 fi
6578
6579 # Add non-PIC object to the list of files to remove.
6580 if test -n "$non_pic_object" \
6581 && test "$non_pic_object" != none; then
6582 rmfiles="$rmfiles $dir/$non_pic_object"
6583 fi
6584 fi
6585 ;;
6586
6587 *)
6588 if test "$mode" = clean ; then
6589 noexename=$name
6590 case $file in
6591 *.exe)
6592 file=`$echo $file|${SED} 's,.exe$,,'`
6593 noexename=`$echo $name|${SED} 's,.exe$,,'`
6594 # $file with .exe has already been added to rmfiles,
6595 # add $file without .exe
6596 rmfiles="$rmfiles $file"
6597 ;;
6598 esac
6599 # Do a test to see if this is a libtool program.
6600 if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6601 relink_command=
6602 . $dir/$noexename
6603
6604 # note $name still contains .exe if it was in $file originally
6605 # as does the version of $file that was added into $rmfiles
6606 rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
6607 if test "$fast_install" = yes && test -n "$relink_command"; then
6608 rmfiles="$rmfiles $objdir/lt-$name"
6609 fi
6610 if test "X$noexename" != "X$name" ; then
6611 rmfiles="$rmfiles $objdir/lt-${noexename}.c"
6612 fi
6613 fi
6614 fi
6615 ;;
6616 esac
6617 $show "$rm $rmfiles"
6618 $run $rm $rmfiles || exit_status=1
6619 done
6620 objdir="$origobjdir"
6621
6622 # Try to remove the ${objdir}s in the directories where we deleted files
6623 for dir in $rmdirs; do
6624 if test -d "$dir"; then
6625 $show "rmdir $dir"
6626 $run rmdir $dir >/dev/null 2>&1
6627 fi
6628 done
6629
6630 exit $exit_status
6631 ;;
6632
6633 "")
6634 $echo "$modename: you must specify a MODE" 1>&2
6635 $echo "$generic_help" 1>&2
6636 exit $EXIT_FAILURE
6637 ;;
6638 esac
6639
6640 if test -z "$exec_cmd"; then
6641 $echo "$modename: invalid operation mode \`$mode'" 1>&2
6642 $echo "$generic_help" 1>&2
6643 exit $EXIT_FAILURE
6644 fi
6645fi # test -z "$show_help"
6646
6647if test -n "$exec_cmd"; then
6648 eval exec $exec_cmd
6649 exit $EXIT_FAILURE
6650fi
6651
6652# We need to display help for each of the modes.
6653case $mode in
6654"") $echo \
6655"Usage: $modename [OPTION]... [MODE-ARG]...
6656
6657Provide generalized library-building support services.
6658
6659 --config show all configuration variables
6660 --debug enable verbose shell tracing
6661-n, --dry-run display commands without modifying any files
6662 --features display basic configuration information and exit
6663 --finish same as \`--mode=finish'
6664 --help display this help message and exit
6665 --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
6666 --quiet same as \`--silent'
6667 --silent don't print informational messages
6668 --tag=TAG use configuration variables from tag TAG
6669 --version print version information
6670
6671MODE must be one of the following:
6672
6673 clean remove files from the build directory
6674 compile compile a source file into a libtool object
6675 execute automatically set library path, then run a program
6676 finish complete the installation of libtool libraries
6677 install install libraries or executables
6678 link create a library or an executable
6679 uninstall remove libraries from an installed directory
6680
6681MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
6682a more detailed description of MODE.
6683
6684Report bugs to <bug-libtool@gnu.org>."
6685 exit $EXIT_SUCCESS
6686 ;;
6687
6688clean)
6689 $echo \
6690"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
6691
6692Remove files from the build directory.
6693
6694RM is the name of the program to use to delete files associated with each FILE
6695(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
6696to RM.
6697
6698If FILE is a libtool library, object or program, all the files associated
6699with it are deleted. Otherwise, only FILE itself is deleted using RM."
6700 ;;
6701
6702compile)
6703 $echo \
6704"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
6705
6706Compile a source file into a libtool library object.
6707
6708This mode accepts the following additional options:
6709
6710 -o OUTPUT-FILE set the output file name to OUTPUT-FILE
6711 -prefer-pic try to building PIC objects only
6712 -prefer-non-pic try to building non-PIC objects only
6713 -static always build a \`.o' file suitable for static linking
6714
6715COMPILE-COMMAND is a command to be used in creating a \`standard' object file
6716from the given SOURCEFILE.
6717
6718The output file name is determined by removing the directory component from
6719SOURCEFILE, then substituting the C source code suffix \`.c' with the
6720library object suffix, \`.lo'."
6721 ;;
6722
6723execute)
6724 $echo \
6725"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
6726
6727Automatically set library path, then run a program.
6728
6729This mode accepts the following additional options:
6730
6731 -dlopen FILE add the directory containing FILE to the library path
6732
6733This mode sets the library path environment variable according to \`-dlopen'
6734flags.
6735
6736If any of the ARGS are libtool executable wrappers, then they are translated
6737into their corresponding uninstalled binary, and any of their required library
6738directories are added to the library path.
6739
6740Then, COMMAND is executed, with ARGS as arguments."
6741 ;;
6742
6743finish)
6744 $echo \
6745"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
6746
6747Complete the installation of libtool libraries.
6748
6749Each LIBDIR is a directory that contains libtool libraries.
6750
6751The commands that this mode executes may require superuser privileges. Use
6752the \`--dry-run' option if you just want to see what would be executed."
6753 ;;
6754
6755install)
6756 $echo \
6757"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
6758
6759Install executables or libraries.
6760
6761INSTALL-COMMAND is the installation command. The first component should be
6762either the \`install' or \`cp' program.
6763
6764The rest of the components are interpreted as arguments to that command (only
6765BSD-compatible install options are recognized)."
6766 ;;
6767
6768link)
6769 $echo \
6770"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
6771
6772Link object files or libraries together to form another library, or to
6773create an executable program.
6774
6775LINK-COMMAND is a command using the C compiler that you would use to create
6776a program from several object files.
6777
6778The following components of LINK-COMMAND are treated specially:
6779
6780 -all-static do not do any dynamic linking at all
6781 -avoid-version do not add a version suffix if possible
6782 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
6783 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
6784 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
6785 -export-symbols SYMFILE
6786 try to export only the symbols listed in SYMFILE
6787 -export-symbols-regex REGEX
6788 try to export only the symbols matching REGEX
6789 -LLIBDIR search LIBDIR for required installed libraries
6790 -lNAME OUTPUT-FILE requires the installed library libNAME
6791 -module build a library that can dlopened
6792 -no-fast-install disable the fast-install mode
6793 -no-install link a not-installable executable
6794 -no-undefined declare that a library does not refer to external symbols
6795 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
6796 -objectlist FILE Use a list of object files found in FILE to specify objects
6797 -precious-files-regex REGEX
6798 don't remove output files matching REGEX
6799 -release RELEASE specify package release information
6800 -rpath LIBDIR the created library will eventually be installed in LIBDIR
6801 -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
6802 -static do not do any dynamic linking of libtool libraries
6803 -version-info CURRENT[:REVISION[:AGE]]
6804 specify library version info [each variable defaults to 0]
6805
6806All other options (arguments beginning with \`-') are ignored.
6807
6808Every other argument is treated as a filename. Files ending in \`.la' are
6809treated as uninstalled libtool libraries, other files are standard or library
6810object files.
6811
6812If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
6813only library objects (\`.lo' files) may be specified, and \`-rpath' is
6814required, except when creating a convenience library.
6815
6816If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
6817using \`ar' and \`ranlib', or on Windows using \`lib'.
6818
6819If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
6820is created, otherwise an executable program is created."
6821 ;;
6822
6823uninstall)
6824 $echo \
6825"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
6826
6827Remove libraries from an installation directory.
6828
6829RM is the name of the program to use to delete files associated with each FILE
6830(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
6831to RM.
6832
6833If FILE is a libtool library, all the files associated with it are deleted.
6834Otherwise, only FILE itself is deleted using RM."
6835 ;;
6836
6837*)
6838 $echo "$modename: invalid operation mode \`$mode'" 1>&2
6839 $echo "$help" 1>&2
6840 exit $EXIT_FAILURE
6841 ;;
6842esac
6843
6844$echo
6845$echo "Try \`$modename --help' for more information about other modes."
6846
6847exit $?
6848
6849# The TAGs below are defined such that we never get into a situation
6850# in which we disable both kinds of libraries. Given conflicting
6851# choices, we go for a static library, that is the most portable,
6852# since we can't tell whether shared libraries were disabled because
6853# the user asked for that or because the platform doesn't support
6854# them. This is particularly important on AIX, because we don't
6855# support having both static and shared libraries enabled at the same
6856# time on that platform, so we default to a shared-only configuration.
6857# If a disable-shared tag is given, we'll fallback to a static-only
6858# configuration. But we'll never go from static-only to shared-only.
6859
6860# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
6861disable_libs=shared
6862# ### END LIBTOOL TAG CONFIG: disable-shared
6863
6864# ### BEGIN LIBTOOL TAG CONFIG: disable-static
6865disable_libs=static
6866# ### END LIBTOOL TAG CONFIG: disable-static
6867
6868# Local Variables:
6869# mode:shell-script
6870# sh-indentation:2
6871# End:
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 00000000..5670792b
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,26 @@
1SUBDIRS = .
2
3INCLUDES = -I$(top_srcdir)/src/include
4
5lib_LTLIBRARIES = libwebserver_gnunet.la
6
7AM_CFLAGS = \
8 -D_SERVER_VERSION="\"0.6.3-GNUnet\""
9
10libwebserver_gnunet_la_SOURCES = \
11 clientinfo.c \
12 server.c \
13 client.c \
14 gethandler.c \
15 socket.c \
16 memory.c \
17 outstream.c \
18 weblog.c \
19 utils.c \
20 fnmatch.c \
21 outgif.c \
22 error.c
23
24libwebserver_gnunet_la_LDFLAGS = \
25 -version-info 0:0:0
26
diff --git a/src/client.c b/src/client.c
new file mode 100644
index 00000000..25ad55b8
--- /dev/null
+++ b/src/client.c
@@ -0,0 +1,1190 @@
1/* Copyrights 2002 Luis Figueiredo (stdio@netc.pt) All rights reserved.
2 *
3 * See the LICENSE file
4 *
5 * The origin of this software must not be misrepresented, either by
6 * explicit claim or by omission. Since few users ever read sources,
7 * credits must appear in the documentation.
8 *
9 * date: Sat Mar 30 14:44:42 GMT 2002
10 *
11 * -- client handler functions
12 *
13 */
14
15
16#include "client.h"
17
18
19extern char *_libwebserver_version; // Defined in server.c
20
21
22struct web_client *current_web_client;
23int WEBTIMEOUT=10000;
24
25/*********************************************************************************************************/
26/*
27 * initializate (allocate) client list
28 */
29struct web_client *__ILWS_init_client_list() {
30 struct web_client *ret;
31 ret=__ILWS_malloc(sizeof(struct web_client));
32 if(ret==NULL) {
33 LWSERR(LE_MEMORY);
34 return NULL;
35 };
36#ifdef HAVE_OPENSSL
37 ret->ssl=NULL; // ssl handler for this client
38#endif
39 ret->next=NULL;
40 return ret;
41}
42
43
44/*********************************************************************************************************/
45/*
46 * Add a client node to client list
47 */
48int __ILWS_add_client(struct web_client *list, struct web_client *node) {
49 struct web_client *temp=list;
50
51#ifdef WIN32
52 unsigned long t=IOC_INOUT;
53#endif
54 while(temp->next!=NULL)temp=temp->next; // run to last client
55 temp->next=node;
56 temp->next->rbuf=NULL;
57 temp->next->rbufsize=0;
58
59 if(!(temp->next->outstream=__ILWS_init_outstream_list())) {
60 return 0;
61 };
62 if(!(temp->next->varlist=__ILWS_init_var_list())) {
63 return 0;
64 };
65
66 temp->next->contentlength=0;
67 temp->next->headersize=0;
68
69 temp->next->wheadersize=0;
70 temp->next->writelength=0;
71 temp->next->readsize=0;
72 temp->next->range=0;
73 temp->next->skipped=0;
74 temp->next->cookies=NULL;
75 //temp->next->oldcl=clock();
76
77
78 temp->next->newdata_try=0;
79#ifdef WIN32
80 // should be optional
81 ioctlsocket(temp->next->socket,FIONBIO,&t); //non blocking sockets for win32
82#else
83 fcntl(temp->next->socket,F_SETFL,O_NONBLOCK);
84#endif
85 temp->next->next=NULL;
86 temp->next->HTTPdirective=NULL;
87 temp->next->stat=1; // Add a connected client
88
89 return 1;
90}
91/*********************************************************************************************************/
92
93
94
95/*********************************************************************************************************/
96/*
97 * Delete client node
98 */
99void __ILWS_delete_client(struct web_client *node) {
100 int rt;
101 rt=shutdown(node->socket,SHUT_RDWR);
102#ifdef WIN32
103 rt=closesocket(node->socket);
104#else
105 rt=close(node->socket);
106#endif
107 __ILWS_free(node->cookies); // (0.5.1)
108 __ILWS_delete_outstream_list(node->outstream);
109 __ILWS_delete_var_list(node->varlist);
110#ifdef HAVE_OPENSSL
111 SSL_free (node->ssl);
112#endif
113 __ILWS_free(node->rbuf); // free's
114 __ILWS_free(node); // free's
115
116}
117
118
119/*********************************************************************************************************/
120/*
121 * Delete next client node
122 */
123void __ILWS_delete_next_client(struct web_client *node) {
124 struct web_client *temp=node->next;
125 node->next=node->next->next;
126 __ILWS_delete_client(temp);
127}
128
129/*********************************************************************************************************/
130/*
131 * Delete entire client list
132 */
133void __ILWS_delete_client_list(struct web_client *node) {
134 struct web_client *next;
135
136 while(node) {
137 next = node->next;
138 __ILWS_free(node);
139 node = next;
140 }
141}
142
143/*********************************************************************************************************/
144/*
145 * Read what client have to say
146 */
147void __ILWS_read_client(struct web_client *node) {
148 int tmp,tmp1;
149 char *tmp2,*tmp3=NULL;
150 char readtemp[READMAX+1];
151 unsigned long datasize=0;
152
153#ifdef HAVE_OPENSSL
154 if(node->ssl!=NULL) {
155 tmp=SSL_read(node->ssl,readtemp,READMAX);
156 } else {
157 tmp=__ILWS_read(node->socket,readtemp,READMAX);
158 };
159#else
160 tmp=__ILWS_read(node->socket,readtemp,READMAX);
161#endif
162 //fprintf(stderr,"readed %d bytes\n",tmp);
163 if(tmp<1) {
164
165#ifdef WIN32
166 if(WSAGetLastError()!=WSAEWOULDBLOCK) {
167#else
168 if(errno!=EAGAIN) {
169#endif
170 node->stat=5;return;
171
172 };
173 //fprintf(stderr,"try: %d (%s)\n",node->newdata_try,node->rbuf);
174 // check if it is over
175 node->newdata_try++;
176 //fprintf(stderr,"node->newdata_try:%d\n",node->newdata_try);
177 if(node->rbufsize >0) { //&& node->newdata_try>5) {
178 if(node->headersize==0) { // always reachs "\r\n\r\n"
179 if((tmp3=strstr(node->rbuf,"\r\n\r\n"))) {
180 node->headersize=(tmp3-node->rbuf);
181 };
182 } else {
183 datasize=node->rbufsize-node->headersize;
184 if(node->contentlength==0) { // well if it 0 read all at once
185 __ILWS_init_clientinfo(); // always call this?
186 node->contentlength=atol(ClientInfo->Header("Content-Length"));
187 // range for resuming
188 if((tmp3=strstr(ClientInfo->Header("Range"),"bytes="))) { // if it is in bytes (i hope, always)
189 tmp3+=6; // go to end of "bytes="
190 node->range=atol(tmp3);
191 //printf("Range is %d - %s - %s\n",node->range,ClientInfo->Header("Range"),tmp3);
192 };
193 // end range
194 __ILWS_free_clientinfo();
195 };
196 if(node->contentlength==datasize-4) {
197 //fprintf(stderr,"client (%d) all readed (%d) (try's)-%d\n",node->socket,node->curcl-node->oldcl,node->newdata_try);
198 node->newdata_try=WEBTIMEOUT; // assume done reading
199 //fprintf(stderr,"Ended naturaly\n");
200
201 }
202 };
203 if((node->newdata_try>=WEBTIMEOUT)) { // All readed
204 node->rbuf[node->rbufsize]='\0';
205 node->stat=2; // Next state
206 //fprintf(stderr,"%s\n",node->rbuf);
207 //fprintf(stderr,"%d\n",node->rbufsize);
208 }
209 };
210 }else {
211 tmp1=node->rbufsize;
212 node->rbufsize+=tmp;
213 tmp2=__ILWS_realloc(node->rbuf,node->rbufsize+1);
214 if(tmp2==NULL) {
215 LWSERR(LE_MEMORY);
216 node->stat=5;
217
218 return;
219 }else {
220 node->rbuf=tmp2;
221 };
222 memcpy(node->rbuf+tmp1,readtemp,tmp);
223 node->newdata_try=0;
224 };
225}
226
227
228/*********************************************************************************************************/
229/*
230 * Process headers w/ get handlers
231 */
232void __ILWS_process_client(struct web_client *node,struct gethandler *list) {
233 struct gethandler *gettemp=list;
234 long secs=time(NULL);
235// for determining content length
236#define RTMPMAX 400
237 struct outstream *tmpstream; // new on 0.5.1
238 char rtmp[RTMPMAX+1];
239 int rtmps=0;
240 char *thead=NULL;
241 char *tmpl;
242///
243 int tmp=0;
244 int oumask=0; // old usermask
245 char *tmp1=__ILWS_web_client_getreq();
246 char matchbuf[MATCHMAX];
247 FILE *nfile; // new file
248 char *fname; // new file name
249
250
251 while(gettemp->next!=NULL && tmp==0) {
252 gettemp=gettemp->next;
253 snprintf(matchbuf,MATCHMAX,"%s",gettemp->str);
254 if(!tmp1) {
255 __ILWS_web_client_writef(node,"HTTP/1.1 400 Invalid request\r\n");
256 __ILWS_web_client_writef(node,"Server: %s\r\n",_libwebserver_version);
257 __ILWS_web_client_writef(node,"Date: %s\r\n",__ILWS_date(mktime(gmtime(&secs)),"%a, %d %b %Y %H:%M:%S GMT")); // Date header
258 __ILWS_web_client_writef(node,"Content-type: text/html\r\n\r\n<HTML><title>Invalid request</title><body bgcolor=FFFFFF><font size=6>400 Invalid request</font><BR><BR><small>Yout request doesn't match the requesits to be processed</small><BR><HR><small><i>%s</i></small></body></html>\n\r",_libwebserver_version);
259 tmpl=__ILWS_web_client_getreqline();
260 web_log("%s - - [%s] \"%s\" 400 (invalid request)\n",inet_ntoa(node->sa.sin_addr),__ILWS_date(time(NULL),"%d/%b/%Y:%H:%M:%S %z"),tmpl);
261 __ILWS_free(tmpl);
262 node->stat=5;
263 return;
264 };
265 if(strlen(tmp1)>MAXURLSIZE) {
266 __ILWS_web_client_writef(node,"HTTP/1.1 414 URL to large\r\n");
267 __ILWS_web_client_writef(node,"Server: %s\r\n",_libwebserver_version);
268 __ILWS_web_client_writef(node,"Date: %s\r\n",__ILWS_date(mktime(gmtime(&secs)),"%a, %d %b %Y %H:%M:%S GMT")); // Date header
269 __ILWS_web_client_writef(node,"Content-type: text/html\r\n\r\n<HTML><title>URL to large</title><body bgcolor=FFFFFF><font size=6>414 Requested url to large</font><BR><BR><small>Wonder this... why is that so large?</small><BR><HR><small><i>%s</i></small></body></html>\n\r",_libwebserver_version);
270 tmpl=__ILWS_web_client_getreqline();
271 web_log("%s - - [%s] \"%s\" 414 (url to large)\n",inet_ntoa(node->sa.sin_addr),__ILWS_date(time(NULL),"%d/%b/%Y:%H:%M:%S %z"),tmpl);
272 __ILWS_free(tmpl);
273 node->stat=5;
274 __ILWS_free(tmp1);
275 return;
276 };
277 if(!fnmatch(matchbuf,tmp1,5)) {
278 if((gettemp->flag & WS_LOCAL) == WS_LOCAL) {
279 if(node->sa.sin_addr.s_addr!=0x0100007F) {
280 __ILWS_web_client_writef(node,"HTTP/1.1 403 Forbidden\r\n");
281 __ILWS_web_client_writef(node,"Server: %s\r\n",_libwebserver_version);
282 __ILWS_web_client_writef(node,"Date: %s\r\n",__ILWS_date(mktime(gmtime(&secs)),"%a, %d %b %Y %H:%M:%S GMT")); // Date header
283 __ILWS_web_client_writef(node,"Content-type: text/html\r\n\r\n<HTML><title>Forbidden</title><body bgcolor=FFFFFF><font size=6>403 Forbidden</font><BR><BR><small>only local host accepted</small><BR><HR><small><i>%s</i></small></body></html>\n\r",_libwebserver_version);
284 tmpl=__ILWS_web_client_getreqline();
285 web_log("%s - - [%s] \"%s\" 403 (Forbidden)\n",inet_ntoa(node->sa.sin_addr),__ILWS_date(time(NULL),"%d/%b/%Y:%H:%M:%S %z"),tmpl);
286 __ILWS_free(tmpl);
287 node->stat=5;
288 __ILWS_free(tmp1);
289 return;
290 };
291 };
292 tmp=1; // Was found
293 node->outstream->flags=(gettemp->flag & WS_DYNVAR); // pass to outstreams
294 };
295 };
296 __ILWS_free(tmp1);
297 if(!tmp) { // Nothing found
298 __ILWS_web_client_writef(node,"HTTP/1.1 404 Not Found\r\n");
299 __ILWS_web_client_writef(node,"Server: %s\r\n",_libwebserver_version);
300 __ILWS_web_client_writef(node,"Date: %s\r\n",__ILWS_date(mktime(gmtime(&secs)),"%a, %d %b %Y %H:%M:%S GMT")); // Date header
301 __ILWS_web_client_writef(node,"Content-type: text/html\r\n\r\n<HTML><title>not found</title><body bgcolor=FFFFFF><font size=6>404 NOT FOUND</font><BR><BR><small>The requested content wasn't found</small><BR><HR><small><i>%s</i></small></body></html>\n\r",_libwebserver_version);
302 tmpl=__ILWS_web_client_getreqline();
303 web_log("%s - - [%s] \"%s\" 404 (Not Found)\n",inet_ntoa(node->sa.sin_addr),__ILWS_date(time(NULL),"%d/%b/%Y:%H:%M:%S %z"),tmpl);
304 __ILWS_free(tmpl);
305 node->stat=5;
306 }else {
307
308 // if cgi do something else, present headers
309 oumask=umask(077);
310 if(!(fname=__ILWS_tmpfname())) {
311 libws_error(LE_FILESYS,": Error giving a temp filename\n");
312 node->stat=5;
313 return;
314 };
315 if((nfile=freopen(fname,"wb+",stdout))!=NULL) {
316 flock(fileno(stdout),LOCK_EX);
317 tmp=dup(fileno(stdout));
318 nfile=fdopen(tmp,"wb+");
319 if(!__ILWS_add_outstream(node->outstream,fname,nfile,1)) {
320 node->stat=5; // (delete client)
321 return; // ERROR reported by add_outstream
322
323 };
324// THE PROCESS
325
326 // Setup Clientinfo before running function
327 if(gettemp->type==GH_FUNCTION) {
328 __ILWS_init_clientinfo();
329 gettemp->hdl.func(); // changed (0.5.3) Access by named union (Hilobok Andrew (han@km.if.ua) said that wasn't compile on freeBSD)
330 __ILWS_free_clientinfo();
331 };
332 // new on 0.5.2
333 if(gettemp->type==GH_DIRECTORY) { // as builtin function for directory listing
334 __ILWS_init_clientinfo();
335 if(strcmp(gettemp->str,"* /*"))ClientInfo->request+=1; // skip '/' if not equal to "* /*" (used by default)
336 __ILWS_lws_list(gettemp->hdl.path); // changed (0.5.3) Access by named union (Hilobok Andrew (han@km.if.ua) said that wasn't compile on freeBSD)
337 __ILWS_free_clientinfo();
338 };
339
340 fflush(stdout);
341 fclose(stdout); // it is a tempfile freopened
342 __ILWS_free(fname); // doesn't need anymore
343#ifdef WIN32
344 freopen("con","w",stdout);
345#else
346 freopen("/dev/tty","w",stdout);
347#endif
348 if((gettemp->flag & WS_USELEN) == WS_USELEN) {
349// determine writelength (for content-length: header) (new on 0.5.1)
350 tmpstream=node->outstream;
351 tmp=0;
352 while(tmpstream->next!=NULL) { // end of header probably in the firsts outstream nodes check for that
353 if(tmpstream->next->fname!=NULL) {
354 if(tmpstream->next->fstream==NULL) {
355 nfile=fopen(tmpstream->next->fname,"rb");
356 tmpstream->next->fstream=nfile; // here (corrected on 0.5.3);
357 } else {
358 fflush(tmpstream->next->fstream); // <- flush tha thing
359 nfile=tmpstream->next->fstream;
360 fseek(nfile,0,SEEK_SET);
361 };
362 if(nfile!=NULL) {
363 rtmps=0;
364 while((!node->wheadersize) && (!feof(nfile))) { // wheadersize is 0, suposed to be fast, at least if is not malformed
365 if(rtmps>0) {tmp-=4;fseek(nfile,rtmps-4,SEEK_SET);}
366 if((rtmps=fread(rtmp,1,RTMPMAX,nfile))>0) {
367 rtmp[rtmps]=0;
368 if((tmp1=strstr(rtmp,"\r\n\r\n"))) {
369 node->wheadersize=(tmp+((tmp1+4)-rtmp));
370 rtmps=((tmp1+4)-rtmp);
371
372 };
373 if(node->range>0) {
374 tmp1=realloc(thead,tmp+rtmps+1);
375 thead=tmp1;
376 memcpy(thead+tmp,rtmp,rtmps);
377 thead[tmp+rtmps]=0;
378 };
379 tmp+=rtmps;
380 };
381 };
382 fseek(nfile,SEEK_END,SEEK_END);
383 node->writelength+=(ftell(nfile)-2);
384 //fclose(nfile); // <- don't worry they close the file later
385 };
386 };
387 tmpstream=tmpstream->next;
388
389 };
390// end writelength
391 } else {
392 node->range=0; // no content-range
393 };
394
395 if(node->range>node->writelength-node->wheadersize && node->range>0) {
396 __ILWS_web_client_writef(node,"HTTP/1.1 416 Requested Range Not Satisfiable\r\n");
397 __ILWS_web_client_writef(node,"Server: %s\r\n",_libwebserver_version);
398 __ILWS_web_client_writef(node,"Date: %s\r\n",__ILWS_date(mktime(gmtime(&secs)),"%a, %d %b %Y %H:%M:%S GMT")); // Date header
399 __ILWS_web_client_writef(node,"Content-range: bytes */%d\r\n",node->writelength-node->wheadersize);
400 __ILWS_web_client_writef(node,"Content-type: text/html\r\n\r\n<HTML><title>Requested Range Not Satisfiable</title><body bgcolor=FFFFFF><font size=6>416 Requested Range Not Satisfiable</font><BR><BR><small>You're trying to resume an content that is smaller than the requested range</small><BR><HR><small><i>%s</i></small></body></html>\n\r",_libwebserver_version);
401 tmpl=__ILWS_web_client_getreqline();
402 web_log("%s - - [%s] \"%s\" 416 (Requested Range Not Satisfiable)\n",inet_ntoa(node->sa.sin_addr),__ILWS_date(time(NULL),"%d/%b/%Y:%H:%M:%S %z"),tmpl);
403 __ILWS_free(tmpl);
404 node->stat=5;
405 __ILWS_free(thead);
406 umask(oumask);
407 return;
408 };
409 if(node->range>0 && ((node->outstream->flags & WS_DYNVAR)==WS_DYNVAR)) { // if request range interval and dynvar on than produces not implemented
410 __ILWS_web_client_writef(node,"HTTP/1.1 501 Not Implemented\r\n");
411 __ILWS_web_client_writef(node,"Server: %s\r\n",_libwebserver_version);
412 __ILWS_web_client_writef(node,"Date: %s\r\n",__ILWS_date(mktime(gmtime(&secs)),"%a, %d %b %Y %H:%M:%S GMT")); // Date header
413 __ILWS_web_client_writef(node,"Content-type: text/html\r\n\r\n<HTML><title>Not implemented</title><body bgcolor=FFFFFF><font size=6>501 Not implemented</font><BR><BR><small>Your trying to resume an content that is not possible to resume(WS_DYNVAR fault)</small><BR><HR><small><i>%s</i></small></body></html>\n\r",_libwebserver_version);
414 tmpl=__ILWS_web_client_getreqline();
415 web_log("%s - - [%s] \"%s\" 501 (Not Implemented)\n",inet_ntoa(node->sa.sin_addr),__ILWS_date(time(NULL),"%d/%b/%Y:%H:%M:%S %z"),tmpl);
416 __ILWS_free(tmpl);
417 node->stat=5;
418 __ILWS_free(thead);
419 umask(oumask);
420 return;
421 };
422
423 }else {
424 LWSERR(LE_FILESYS);
425
426 };
427 node->stat=4;
428 if(node->HTTPdirective==NULL) {
429 if(node->range>0) {
430 __ILWS_web_client_writef(node,"HTTP/1.1 206 Partial Content\r\n");
431 tmpl=__ILWS_web_client_getreqline();
432 web_log("%s - - [%s] \"%s\" 206 (Partial Content)\n",inet_ntoa(node->sa.sin_addr),__ILWS_date(time(NULL),"%d/%b/%Y:%H:%M:%S %z"),tmpl);
433 __ILWS_free(tmpl);
434 } else {
435 __ILWS_web_client_writef(node,"HTTP/1.1 200 OK\r\n");
436 tmpl=__ILWS_web_client_getreqline();
437 web_log("%s - - [%s] \"%s\" 200 (OK)\n",inet_ntoa(node->sa.sin_addr),__ILWS_date(time(NULL),"%d/%b/%Y:%H:%M:%S %z"),tmpl);
438 __ILWS_free(tmpl);
439 };
440
441 } else {
442 __ILWS_web_client_writef(node,"%s\r\n",node->HTTPdirective);
443 tmpl=__ILWS_web_client_getreqline();
444 web_log("%s - - [%s] \"%s\" XXX (User defined)\n",inet_ntoa(node->sa.sin_addr),__ILWS_date(time(NULL),"%d/%b/%Y:%H:%M:%S %z"),tmpl);
445 __ILWS_free(tmpl);
446 };
447 __ILWS_web_client_writef(node,"Server: %s\r\n",_libwebserver_version);
448 __ILWS_web_client_writef(node,"Date: %s\r\n",__ILWS_date(mktime(gmtime(&secs)),"%a, %d %b %Y %H:%M:%S GMT")); // Date header
449 __ILWS_web_client_writef(node,"Accept-Ranges: bytes\r\n");
450 if((((node->writelength-node->wheadersize)-node->range)>0) && !((node->outstream->flags & WS_DYNVAR)==WS_DYNVAR))__ILWS_web_client_writef(node,"Content-length: %d\r\n",(node->writelength-node->wheadersize)-node->range);
451 if(node->cookies!=NULL)__ILWS_web_client_writef(node,"%s",node->cookies); // new (0.5.1)
452 if(node->range>0) {
453 __ILWS_web_client_writef(node,"Content-range: bytes %d-%d/%d\r\n",node->range,(node->writelength-node->wheadersize)-1,node->writelength-node->wheadersize);
454 __ILWS_web_client_writef(node,"%s",thead); // the rest of header
455 __ILWS_free(thead);
456 };
457 umask(oumask);
458
459 };
460
461}
462/*********************************************************************************************************/
463/*
464 * Process stream output
465 */
466void __ILWS_output_client(struct web_client *node) {
467 struct outstream *tstream=node->outstream;
468 char *tmp1,*tmp2,*tmp3;
469 char writetemp[WRITEMAX+1];
470 int beginsize=0;
471 int endsize=0;
472 int varsize=0;
473 int namesize=0;
474 if(tstream->next!=NULL) {
475 if(tstream->next->fname!=NULL) {
476 if(tstream->next->fstream==NULL) {
477 if((tstream->next->fstream=fopen(tstream->next->fname,"rb"))==NULL) {
478 LWSERR(LE_FILESYS);
479 __ILWS_delete_next_outstream(tstream);
480 //node->outstream->next=tstream->next;
481 return;
482 }
483 };
484
485 // read part (must always read)
486 if(tstream->next->rsize==0) { // start from 0
487 fseek(tstream->next->fstream,0,SEEK_SET);
488 };
489 memset(writetemp,0,WRITEMAX);
490 tstream->next->rsize=fread(writetemp,1,WRITEMAX,tstream->next->fstream);
491 writetemp[tstream->next->rsize]=0;
492 // if read make var changes on writetemp;
493 // new on 0.5.1 -- UNDERDEV // FIX -
494 if((node->outstream->flags & WS_DYNVAR) == WS_DYNVAR) {
495
496 tmp1=writetemp;
497 while(((tmp1=strstr(tmp1,"$")+1)!=(char*)1) && beginsize==0) { // check var found
498 for(namesize=0;namesize<50;namesize++) {
499 if(tmp1[namesize]==';') {namesize++;break;}
500 if((tmp1[namesize]<'a' || tmp1[namesize]>'z') &&
501 (tmp1[namesize]<'A' || tmp1[namesize]>'Z') &&
502 (tmp1[namesize]<'1' || tmp1[namesize]>'0') &&
503 tmp1[namesize]!='_') {namesize=0;break;};
504
505 };
506 if(namesize>0) {
507 if(namesize==1) { // this is $; for sure
508 if(!(tmp3=__ILWS_malloc(2))) {
509 LWSERR(LE_MEMORY);
510 node->stat=5;
511 return;
512 };
513 memcpy(tmp3,"$",namesize);
514 tmp3[namesize]=0;
515 } else {
516 if(!(tmp3=__ILWS_malloc(namesize))) {
517 LWSERR(LE_MEMORY);
518 node->stat=5;
519 return;
520 };
521 memcpy(tmp3,tmp1,namesize-1);
522 tmp3[namesize-1]=0;
523 };
524
525 tmp1-=1;
526
527 beginsize=tmp1-writetemp;
528 tmp1+=namesize; // get var from whateverwhere (client node probably)
529
530 endsize=strlen(tmp1);
531
532 //varsize=2;
533
534 if((tmp2=__ILWS_malloc(beginsize+1))) {
535 memcpy(tmp2,writetemp,beginsize);
536 tmp2[beginsize]=0;
537 if(namesize==1) {
538 varsize=strlen(tmp3);
539 snprintf(writetemp,WRITEMAX,"%s%s",tmp2,tmp3);
540 } else {
541 varsize=strlen(__ILWS_get_var(node->varlist,tmp3));
542 snprintf(writetemp,WRITEMAX,"%s%s",tmp2,__ILWS_get_var(node->varlist,tmp3));
543 };
544 writetemp[strlen(tmp2)+varsize]=0;
545 __ILWS_free(tmp2);
546 __ILWS_free(tmp3);
547 tstream->next->rsize=(beginsize+varsize);
548 tstream->next->varsize+=(varsize-namesize)-1;
549 } else {
550 LWSERR(LE_MEMORY);
551 __ILWS_free(tmp3);
552 node->stat=5;
553 return;
554 };
555 };
556 };
557 }; // dynvar
558
559 /* there is nothing more to read here */
560 if(tstream->next->rsize<1){ // i guess rsize < 1 is eof (make sure that server writed last time)
561 //only change if everything written
562 if(feof(tstream->next->fstream) && (ftell(tstream->next->fstream)==tstream->next->wrotesize)) {
563 //fclose(tstream->next->fstream);
564
565 __ILWS_delete_next_outstream(tstream);
566 //node->outstream->next=tstream->next;
567 }
568 return;
569 }
570 node->readsize+=tstream->next->rsize;
571 if(!node->skipped && node->range>0) {
572 tstream->next->wsize=tstream->next->rsize;
573 tstream->next->wrotesize+=tstream->next->wsize;
574 if((node->readsize-node->wheadersize)<node->range) { // skip range bytes
575 return; // do nothing
576 }else {
577 node->skipped=1;
578 tstream->next->wrotesize-=(node->readsize-node->wheadersize)-node->range; // the right offset
579 fseek(tstream->next->fstream,tstream->next->wrotesize,SEEK_SET);
580 tstream->next->wsize=tstream->next->rsize;
581 return;
582 };
583 };
584 // write part
585
586#ifdef HAVE_OPENSSL
587 if(node->ssl!=NULL) {
588 tstream->next->wsize=SSL_write(node->ssl,writetemp,tstream->next->rsize);
589 } else {
590 tstream->next->wsize=send(node->socket,writetemp,tstream->next->rsize,0);
591 };
592#else
593 tstream->next->wsize=send(node->socket,writetemp,tstream->next->rsize,0);
594#endif
595 if(tstream->next->wsize>0) {
596 tstream->next->wrotesize+=tstream->next->wsize;
597 if(tstream->next->rsize!=tstream->next->wsize || beginsize>0) { // FIX
598 fseek(tstream->next->fstream,tstream->next->wrotesize-(tstream->next->varsize),SEEK_SET); // FIX
599 };
600 };
601#ifdef WIN32
602 if((tstream->next->wsize<=0) && (WSAGetLastError()!=WSAEWOULDBLOCK)) { // WIN32 only
603#else
604 if(tstream->next->wsize<=0 && errno!=EAGAIN) { // linux only // *nix i guess
605#endif
606 //fclose(tstream->next->fstream);
607
608 __ILWS_delete_next_outstream(tstream);
609 //node->outstream->next=tstream->next;
610 return;
611 }else { // broken pipe
612 if(tstream->next->wsize<0) {
613 fseek(tstream->next->fstream,tstream->next->wrotesize-(tstream->next->varsize),SEEK_SET); //didn't read must back to where it was
614 };
615 };
616
617 }else { // filename is null
618
619 __ILWS_delete_next_outstream(tstream);
620 return;
621 };
622 }else { // End of streams
623
624 current_web_client->stat=5; // done
625
626 };
627}
628
629/*********************************************************************************************************/
630/*
631 * Set http directive
632 */
633void web_client_HTTPdirective(char *str) {
634 current_web_client->HTTPdirective=str;
635}
636
637
638/*********************************************************************************************************/
639/*
640 * GET request name
641 */
642char *__ILWS_web_client_getreq() {
643 char *ret;
644 char *tmp1=strstr(current_web_client->rbuf,"?");
645 char *tmp2=strstr(current_web_client->rbuf," HTTP");
646 char *tmp3=strstr(current_web_client->rbuf,"\r\n");
647 int size;
648 if(tmp1==NULL || tmp1>tmp2) {
649 tmp1=tmp2;
650 };
651 if(tmp2>tmp3) {
652 return NULL;
653 };
654 size=tmp1-current_web_client->rbuf;
655 if(size<1) return NULL;
656
657 if(!(ret=__ILWS_malloc(size+1))) {
658 LWSERR(LE_MEMORY);
659 return NULL;
660 };
661 memcpy(ret,current_web_client->rbuf,size);
662 ret[size]=0;
663 return ret;
664
665};
666
667/*********************************************************************************************************/
668/*
669 * GET request line
670 */
671char *__ILWS_web_client_getreqline() {
672 char *ret;
673 char *tmp1=strstr(current_web_client->rbuf,"\r\n");
674 int size=0;
675 if(tmp1==NULL) return NULL;
676 size=tmp1-current_web_client->rbuf;
677 if(size<1) return NULL;
678
679 if(!(ret=__ILWS_malloc(size+1))) {
680 LWSERR(LE_MEMORY);
681 return NULL;
682 };
683 memcpy(ret,current_web_client->rbuf,size);
684 ret[size]=0;
685 return ret;
686}
687
688
689/*********************************************************************************************************/
690/*
691 * Add a FILE stream type to client output
692 */
693int web_client_addfile(char *in) {
694 int ret=__ILWS_add_outstream(current_web_client->outstream,in,NULL,0);
695 int nfd=0;
696 char *fname;
697 FILE *nfile=NULL;
698 fname=__ILWS_tmpfname();
699 fflush(stdout);
700 fclose(stdout); // oldstdout close it?
701
702 if((nfile=freopen(fname,"w+b",stdout))!=NULL){ // redirect
703 flock(fileno(stdout),LOCK_EX); // <- yah
704 nfd=dup(fileno(stdout));
705 nfile=fdopen(nfd,"wb+");
706 if(!__ILWS_add_outstream(current_web_client->outstream,fname,nfile,1)) {
707 LWSERR(LE_MEMORY);
708 return 0;
709 };
710 };
711 __ILWS_free(fname);
712 ClientInfo->outfd=fileno(nfile);
713 return ret;
714}
715
716
717/*********************************************************************************************************/
718/*
719 * Output data as gif (with width w and height h)
720 */
721unsigned char __ILWS_GLOBALGIFPAL[256][3];
722
723
724void web_client_gifsetpalette(const char *fname) {
725 int j;
726 FILE *palfile;
727 if(strcmp(fname,"EGA")==0) {
728 static int EGApalette[16][3] = {
729 {0,0,0}, {0,0,128}, {0,128,0}, {0,128,128},
730 {128,0,0}, {128,0,128}, {128,128,0}, {200,200,200},
731 {100,100,100}, {100,100,255}, {100,255,100}, {100,255,255},
732 {255,100,100}, {255,100,255}, {255,255,100}, {255,255,255} };
733 for (j=0; j<256; j++) {
734 __ILWS_GLOBALGIFPAL[j][0] = (unsigned char)EGApalette[j&15][0];
735 __ILWS_GLOBALGIFPAL[j][1] = (unsigned char)EGApalette[j&15][1];
736 __ILWS_GLOBALGIFPAL[j][2] = (unsigned char)EGApalette[j&15][2];
737 }
738 } else {
739 if(!(palfile=fopen(fname,"rb"))) {
740 return;
741 };
742 fread(__ILWS_GLOBALGIFPAL,sizeof(__ILWS_GLOBALGIFPAL),1,palfile);
743 fclose(palfile);
744 };
745};
746
747int web_client_gifoutput(char *data,int w,int h,int transparencyindex) {
748 int i;
749 unsigned char rm[256],gm[256],bm[256];
750 for(i=0;i<256;i++) {
751 rm[i]=__ILWS_GLOBALGIFPAL[i][0];
752 gm[i]=__ILWS_GLOBALGIFPAL[i][1];
753 bm[i]=__ILWS_GLOBALGIFPAL[i][2];
754 };
755
756 i=__ILWS_WriteGIF(stdout,data,w,h,rm,gm,bm,256,0,transparencyindex,"libwebserver export gif (xvgifwr.c)");
757
758 return i;
759};
760
761
762/*********************************************************************************************************/
763/*
764 * an util to write with format on client_nodes
765 */
766void __ILWS_web_client_writef(struct web_client *node,const char *fmt,...) {
767 va_list args;
768 char buf[WRITEMAX];
769 va_start(args,fmt);
770 vsnprintf(buf,512,fmt,args);
771 va_end(args);
772
773#ifdef HAVE_OPENSSL
774 if(node->ssl!=NULL) {
775 SSL_write(node->ssl,buf,strlen(buf));
776 } else {
777 send(node->socket,buf,strlen(buf),0);
778 };
779#else
780 send(node->socket,buf,strlen(buf),0);
781#endif
782}
783
784
785/*********************************************************************************************************/
786/*
787 * function "web_client_setcookie" (improved on 0.5.1) to be called what ever were over handler function
788 *
789 * name = Name of the cookie
790 * value = Value of the cookie
791 * timeout = Timeout in second from current time on
792 * (0 = Until end of session)
793 * (-1 = Delete cookie)
794 * path = Subset of URLs in a domain for which the cookie is valid
795 * (If the path is not specified (path == NULL), it as assumed to be
796 * the same path as the document being described by the header which
797 * contains the cookie.)
798 * domain = Domain the cookie is valid for
799 * (If the domain is not set (domain == NULL), the default value of
800 * domain is the host name of the server which generated the cookie
801 * response.)
802 * secure = If a cookie is marked secure (secure == 1), it will only be
803 * transmitted if the communications channel with the host is a
804 * secure one. Currently this means that secure cookies will only be
805 * sent to HTTPS (HTTP over SSL) servers.
806 * (If secure is not specified (secure == 0), a cookie is considered
807 * safe to be sent in the clear over unsecured channels. )
808 */
809void web_client_setcookie(char *name, char *value, char *timeoutf, char *path, char *domain, int secure) {
810 char *tmp1=timeoutf;
811 long toffset=0;
812 time_t secs; // to time offset
813 int timeout;
814 int offset=(current_web_client->cookies!=NULL)?strlen(current_web_client->cookies):0;
815 if(timeoutf==NULL) {
816 timeout=0;
817 } else if (!strcmp(timeoutf,"DEL")){
818 timeout=-1;
819 } else {
820 while(*tmp1) {
821 if(*tmp1=='S')toffset=1; // seconds
822 if(*tmp1=='M')toffset=60; // minutes
823 if(*tmp1=='H')toffset=60*60; // hours
824 if(*tmp1=='d')toffset=60*60*24; // days
825 if(*tmp1=='m')toffset=60*60*24*30; // Month
826 if(*tmp1=='y')toffset=60*60*24*365; // years
827 tmp1++;
828 };
829 timeout=atoi(timeoutf)*toffset;
830 };
831
832 if (timeout < 0){
833 current_web_client->cookies=__ILWS_realloc(current_web_client->cookies,offset+59+strlen(name));
834 snprintf(current_web_client->cookies+offset,59+strlen(name),"Set-Cookie: %s=deleted; expires=%s", name, __ILWS_date(time(NULL)-31536001,"%a, %d-%b-%Y %H:%M:%S GMT"));
835 offset+=59+strlen(name);
836 }else{
837 current_web_client->cookies=__ILWS_realloc(current_web_client->cookies,offset+14+strlen(name)+strlen(value));
838 snprintf(current_web_client->cookies+offset,14+strlen(name)+strlen(value),"Set-Cookie: %s=%s", name, value);
839 offset+=13+strlen(name)+strlen(value);
840
841 if (timeout != 0){
842 //timeout += timezone; Hilobok Andrew (han@km.if.ua) removed this and use gmtime (thanks)
843 // exchanged by mktime(gmtime(&secs))
844 current_web_client->cookies=__ILWS_realloc(current_web_client->cookies,offset+40);
845 secs=time(NULL);
846 snprintf(current_web_client->cookies+offset,40,"; expires=%s", __ILWS_date(mktime(gmtime(&secs))+timeout,"%a, %d-%b-%Y %H:%M:%S GMT"));
847 offset+=39;
848 }
849 if (path != NULL && *path!=0) {
850 current_web_client->cookies=__ILWS_realloc(current_web_client->cookies,offset+8+strlen(path));
851 snprintf(current_web_client->cookies+offset,8+strlen(path),"; path=%s", path);
852 offset+=7+strlen(path);
853 }
854 if (domain != NULL && *domain!=0){
855 current_web_client->cookies=__ILWS_realloc(current_web_client->cookies,offset+10+strlen(domain));
856 snprintf(current_web_client->cookies+offset,10+strlen(domain),"; domain=%s", domain);
857 offset+=9+strlen(domain);
858 };
859 if (secure == 1) {
860 current_web_client->cookies=__ILWS_realloc(current_web_client->cookies,offset+9);
861 snprintf(current_web_client->cookies+offset,9,"; secure");
862 offset+=8;
863 };
864 }
865
866 current_web_client->cookies=__ILWS_realloc(current_web_client->cookies,offset+3);
867 snprintf(current_web_client->cookies+offset,3,"\r\n"); // '\0' included
868 offset+=2;
869 // fprintf(stderr,"current_web_client->cookies=\"%s\"\n",current_web_client->cookies); // DEBUG TO REMOVE
870
871
872}
873
874
875
876
877/*
878 * function "web_client_deletecookie"
879 *
880 * name = Name of the cookie to delete
881 */
882
883void web_client_deletecookie(char *name){
884 web_client_setcookie(name, NULL, "DEL", NULL, NULL, 0);
885}
886
887
888
889
890
891
892
893
894int web_client_setvar(char *name,char *value) {
895 return __ILWS_add_var(current_web_client->varlist,name,value);
896};
897char *web_client_getvar(char *name) {
898 return __ILWS_get_var(current_web_client->varlist,name);
899
900};
901int web_client_delvar(char *name) {
902 return __ILWS_del_var(current_web_client->varlist,name);
903
904};
905
906
907/***************
908 * variables
909 ***************/
910
911
912// prepare this to work in another file var.c
913struct web_var *__ILWS_init_var_list() {
914 struct web_var *ret;
915 if(!(ret=__ILWS_malloc(sizeof(struct web_var)))) {
916 LWSERR(LE_MEMORY);
917 return NULL;
918 };
919 ret->name=NULL;
920 ret->value=NULL;
921 ret->next=NULL;
922 return ret;
923};
924
925int __ILWS_add_var(struct web_var *list, char *name, char *value) {
926 struct web_var *node=list;
927 int namesize=strlen(name);
928 int valuesize=strlen(value);
929 while(node->next!=NULL) {
930 if(!strcmp(node->next->name,name)) {
931 return 0;
932 };
933 node=node->next;
934 };
935
936 if(!(node->next=__ILWS_malloc(sizeof(struct web_var)))) {
937 LWSERR(LE_MEMORY);
938 return 0;
939 };
940
941 if(!(node->next->name=__ILWS_malloc(namesize+1))) {
942 LWSERR(LE_MEMORY);
943 return 0;
944 };
945 memcpy(node->next->name,name,namesize);
946 node->next->name[namesize]=0;
947
948 if(!(node->next->value=__ILWS_malloc(valuesize+1))) {
949 LWSERR(LE_MEMORY);
950 return 0;
951 };
952 memcpy(node->next->value,value,valuesize);
953 node->next->value[valuesize]=0;
954 node->next->next=NULL;
955 return 1;
956};
957
958int __ILWS_del_var(struct web_var *list, char *name) {
959 struct web_var *node=list;
960 struct web_var *tmp;
961 while(node->next!=NULL) {
962 if(!strcmp(node->next->name,name)) {
963 tmp=node->next;
964 node->next=node->next->next;
965 __ILWS_free(tmp->name);
966 __ILWS_free(tmp->value);
967 __ILWS_free(tmp);
968 return 1;
969 };
970 };
971 return 0;
972};
973void __ILWS_delete_var_list(struct web_var *list) {
974 struct web_var *node=list;
975 struct web_var *tmp;
976
977 while(node->next!=NULL) {
978 tmp=node->next;
979 node->next=node->next->next;
980 __ILWS_free(tmp->name);
981 __ILWS_free(tmp->value);
982
983 __ILWS_free(tmp);
984 };
985 __ILWS_free(node);
986};
987
988
989char *__ILWS_get_var(struct web_var *list , char *name) {
990 struct web_var *node=list;
991 while(node->next!=NULL) {
992 if(!strcmp(node->next->name,name)) {
993 return node->next->value;
994 };
995 node=node->next;
996 };
997 return "";
998};
999
1000
1001/****************************
1002 * give mime by ext (mime file declared on server)
1003 */
1004
1005void web_client_contenttype(char *ext) {
1006 FILE *mimefileh;
1007 char *mimedata;
1008 char *mimeline;
1009 size_t extsize;
1010 size_t mimesize;
1011 char *tmp;
1012 /* -- mime */
1013 int isok=0;
1014 size_t i;
1015
1016 if(ext==NULL || current_web_server->mimefile==NULL) {
1017 printf("Content-type: text/plain\r\n\r\n"); // <- mime type, change this calculating mime with extension
1018 } else {
1019 extsize=strlen(ext);
1020 if((mimefileh=fopen(current_web_server->mimefile,"r"))) {
1021 // retrieve file size
1022 fseek(mimefileh,SEEK_END,SEEK_END);
1023 mimesize=ftell(mimefileh);
1024 fseek(mimefileh,0,SEEK_SET);
1025 //
1026 // malloc and read data
1027 mimedata=__ILWS_malloc(mimesize+1);
1028 fread(mimedata,1,mimesize,mimefileh);
1029 fclose(mimefileh); // close file
1030 //
1031 for(i=0;i<mimesize;i++)if(mimedata[i]=='\t')mimedata[i]=' '; // translate \t to 1 space
1032 mimedata[mimesize]=0;
1033
1034 isok=0;
1035 mimeline=strtok(mimedata,"\n");
1036 while((mimeline=strtok(NULL,"\n")) && !isok) {
1037 if(mimeline[0]!='#') { // is not a comment
1038 tmp=mimeline;
1039 while((tmp=strstr(tmp,ext)) && !isok) {
1040 //fprintf(stderr,"extsize(%d),found in %s (%s) %x\n",extsize,mimeline,tmp,tmp[extsize]);
1041 if(tmp[-1]==' ' && (tmp[extsize]==' ' || tmp[extsize]=='\0') ) {
1042 if((tmp=strchr(mimeline,' '))) { // the first space?
1043 tmp[0]='\0';
1044 //fprintf(stderr,"content is: %s\n",mimeline);
1045 printf("Content-type: %s\r\n\r\n",mimeline);
1046 isok=1;
1047 };
1048 };
1049 tmp+=extsize;
1050 };
1051
1052 };
1053 };
1054 if(!isok) {
1055 printf("Content-type: text/plain\r\n\r\n");
1056 };
1057 //printf("%s\n",tmp);
1058 __ILWS_free(mimedata);
1059
1060 };
1061 };
1062};
1063
1064
1065/**********************************
1066 * internal directory generator
1067 */
1068
1069int __ILWS_lws_list(char *inpath) {
1070 /* for type directory */
1071 /* mime*/
1072 char *ext;
1073 struct dirent *dire;
1074 DIR *cd;
1075 struct stat cfstat;
1076 char *dirpath=NULL;
1077 char *filepath;
1078 char *tmp;
1079 char *readfile;
1080 float filesize;
1081 char filesizeu;
1082 ////
1083
1084
1085 //printf("ClientInfo->request=<B>%s</B><BR>\n",ClientInfo->request);
1086 //readfile=__ILWS_malloc(strlen(ClientInfo->request)+1);
1087 readfile=ClientInfo->request;
1088 while((tmp=strstr(readfile,"./"))) { // this skip ../ also
1089 readfile=tmp+1;
1090 };
1091 while((tmp=strstr(readfile,"//"))) {
1092 readfile=tmp+1;
1093 };
1094
1095 tmp=strstr(readfile,"/");
1096 if(tmp!=NULL) {
1097 readfile=tmp+1; // must be in the first
1098 };
1099 // skip beind dir
1100 if(strlen(readfile)) {
1101 filepath=__ILWS_malloc(strlen(inpath)+strlen(readfile)+3);
1102 snprintf(filepath,strlen(inpath)+strlen(readfile)+2,"%s%s%s",inpath,(inpath[strlen(inpath)-1]=='/')?"":"/",readfile);
1103 //printf("pum ->%s<BR>\n",filepath);
1104 if(readfile[strlen(readfile)-1]=='/') {
1105 dirpath=__ILWS_malloc(strlen(filepath)+1);
1106 memcpy(dirpath,filepath,strlen(filepath)+1); // the 0 included
1107 } else {
1108 if(!stat(filepath,&cfstat)) { // file must exist
1109 if((cfstat.st_mode & S_IFDIR) != S_IFDIR) {
1110 // search for mime
1111 ext=strrchr(filepath,'.');
1112 tmp=strrchr(filepath,'/');
1113 ext+=1;
1114 if(ext<=tmp) { // is not a extension
1115 ext=NULL;
1116 };
1117
1118 //Wed, 22 Oct 2003 16:04:04 GMT
1119 printf("Last-Modified: %s\r\n",__ILWS_date(mktime(gmtime(&cfstat.st_mtime)),"%a, %d %b %Y %H:%M:%S GMT")); // new on 0.5.3
1120 web_client_contenttype(ext);
1121 web_client_addfile(filepath); // fopen and write, maybe?
1122 __ILWS_free(filepath);
1123 return 1;
1124 } else {
1125 web_client_HTTPdirective("HTTP/1.1 404 File Not Found");
1126 printf("Content-type: text/html\r\n\r\n<HTML><title>file not found</title><body bgcolor=FFFFFF><font size=6>404 FILE NOT FOUND</font><BR><BR><small>The request \"%s\" wasn't found, try this <a href='%s/'>link</a></small><BR><HR><small><i>%s</i></small></body></html>\n\r",filepath,ClientInfo->request,_libwebserver_version);
1127 __ILWS_free(filepath);
1128 return 0;
1129 };
1130 }else {
1131 web_client_HTTPdirective("HTTP/1.1 404 File Not Found");
1132 printf("Content-type: text/html\r\n\r\n<HTML><title>file not found</title><body bgcolor=FFFFFF><font size=6>404 FILE NOT FOUND</font><BR><BR><small>The request \"%s\" wasn't found</small><BR><HR><small><i>%s</i></small></body></html>\n\r",filepath,_libwebserver_version);
1133 __ILWS_free(filepath);
1134 return 0;
1135 };
1136 };
1137 __ILWS_free(filepath);
1138 };
1139 //printf("Content-type: text/html\r\n\r\n");
1140 //fprintf(stderr,"dirpath=%s inpath=%s\n",dirpath,inpath);
1141 if(dirpath==NULL) {
1142 dirpath=__ILWS_malloc(strlen(inpath)+1);
1143 memcpy(dirpath,inpath,strlen(inpath)+1);
1144 };
1145 cd=opendir(dirpath);
1146 if(cd!=NULL) {
1147 printf("Content-type: text/html\r\n\r\n");
1148 printf("<HTML><HEAD><TITLE>Contents of %s</TITLE></HEAD><BODY>\n",dirpath);
1149 printf("<h1>Contents of directory %s</h1><HR>\n",dirpath);
1150 printf("<form><input type=text name=match value=\"%s\"><input type=submit name='send' value='wildcard'></form>\n",strlen(ClientInfo->Query("match"))?ClientInfo->Query("match"):"*");
1151 printf("<PRE>\n");
1152 while((dire=readdir(cd))) {
1153 if( ((dire->d_name[0]!='.') || (strcmp(dirpath,inpath) && !strcmp(dire->d_name,".."))) && (!fnmatch(ClientInfo->Query("match"),dire->d_name,0) || !strlen(ClientInfo->Query("match"))) ) {
1154 filepath=__ILWS_malloc(strlen(dirpath)+strlen(dire->d_name)+2);
1155 snprintf(filepath,strlen(dirpath)+strlen(dire->d_name)+2,"%s%s%s",dirpath,(dirpath[strlen(dirpath)-1]=='/')?"":"/",dire->d_name);
1156 //fprintf(stderr,"filename=%s\n",filepath);
1157 if(!stat(filepath,&cfstat)) {
1158 if((cfstat.st_mode & S_IFDIR) == S_IFDIR) {
1159 printf("%s &lt;DIR&gt; <a href=\"%s/\">%s</a>\n",__ILWS_date(cfstat.st_mtime,"%a, %d %b %Y %H:%M"),dire->d_name,dire->d_name);
1160 }else {
1161 filesize=(float)cfstat.st_size;
1162 filesizeu=0;
1163 while(filesize>1024) {
1164 filesize/=1024;
1165 filesizeu++;
1166 };
1167 printf("%s %.1f%c <a href=\"%s\">%s</a>\n",__ILWS_date(cfstat.st_mtime,"%a, %d %b %Y %H:%M"),filesize,(filesizeu==2)?'M':(filesizeu==1)?'K':'b',dire->d_name,dire->d_name);
1168 };
1169 };
1170 __ILWS_free(filepath);
1171 };
1172
1173 };
1174 printf("</PRE>\n");
1175 printf("<HR>\n");
1176 printf("<address>%s</address>\n",_libwebserver_version);
1177 printf("</BODY></HTML>\r\n");
1178 __ILWS_free(dirpath);
1179 closedir(cd);
1180 } else {
1181 web_client_HTTPdirective("HTTP/1.1 404 File Not Found");
1182 printf("Content-type: text/html\r\n\r\n<HTML><title>file not found</title><body bgcolor=FFFFFF><font size=6>404 FILE NOT FOUND</font><BR><BR><small>The request \"%s\" wasn't found</small><BR><HR><small><i>%s</i></small></body></html>\n\r",dirpath,_libwebserver_version);
1183 return 0;
1184 };
1185 return 1;
1186};
1187
1188
1189
1190
diff --git a/src/client.h b/src/client.h
new file mode 100644
index 00000000..32ec65b5
--- /dev/null
+++ b/src/client.h
@@ -0,0 +1,159 @@
1/* Copyrights 2002 Luis Figueiredo (stdio@netc.pt) All rights reserved.
2 *
3 * See the LICENSE file
4 *
5 * The origin of this software must not be misrepresented, either by
6 * explicit claim or by omission. Since few users ever read sources,
7 * credits must appear in the documentation.
8 *
9 * date: Sat Mar 30 14:44:42 GMT 2002
10 *
11 *
12 * --
13 *
14 */
15
16#ifndef _CLIENT_H_
17#define _CLIENT_H_
18
19#ifdef HAVE_CONFIG_H
20#include "config.h"
21#endif
22
23#include <stdio.h>
24#include <fcntl.h>
25#include <string.h>
26#include <errno.h>
27
28
29
30#ifdef HAVE_OPENSSL
31
32#include <openssl/rsa.h> /* SSLeay stuff */
33#include <openssl/crypto.h>
34#include <openssl/x509.h>
35#include <openssl/pem.h>
36#include <openssl/ssl.h>
37#include <openssl/err.h>
38
39#endif
40
41
42#include "socket.h"
43
44#include "memory.h"
45#include "outstream.h"
46
47
48#include "gethandler.h"
49
50
51
52#include "weblog.h"
53#include "utils.h"
54#include "fnmatch.h"
55#include "outgif.h"
56#include "error.h"
57#include "debug.h"
58
59
60#include "clientinfo.h"
61
62
63#ifdef WIN32
64#include "flock.h" // my flock
65#include "dirent.h"
66#else
67#include <sys/file.h> // for flock
68#include <dirent.h>
69#endif
70
71#define READMAX 100000 // 1Mb upload
72#define WRITEMAX 100000 // 1Mb download 1mb per client? // smaller is better for multi read bigger is better for big downloads
73#define MAXURLSIZE 2000 //
74
75extern int WEBTIMEOUT; //to be changed externaly
76//#define WEBTIMEOUT 10000 // TIMEOUT WITHOUT RECEIVING DATA (not in seconds but in read tries)
77
78
79struct web_var {
80 char *name;
81 char *value;
82 struct web_var *next;
83};
84
85struct web_client {
86
87 int socket;
88 struct sockaddr_in sa;
89 unsigned int salen;
90 char *HTTPdirective;
91 unsigned char stat; /* 0001b idle,0010b down streaming, 0011 done down streaming, 0100b out streaming,0101 done out streaming */
92 // Read control
93 char *rbuf;
94 unsigned long rbufsize;
95 int newdata_try;
96 unsigned long contentlength; // for read propose (optimize speed 0.5.1)
97 unsigned long headersize;
98
99 // Write control
100 struct outstream *outstream;
101 struct web_var *varlist;
102 char *cookies; // cookie header (0.5.1)
103 long writelength;
104 long readsize;
105 long range;
106 int skipped;
107 long wheadersize;
108// clock_t oldcl,curcl;
109
110#ifdef HAVE_OPENSSL
111 SSL *ssl;
112 X509* cert;
113#else
114 void *pad[2];
115#endif
116 struct web_client *next;
117};
118extern struct web_client *current_web_client;
119
120struct web_client *__ILWS_init_client_list();
121int __ILWS_add_client(struct web_client *,struct web_client *);
122void __ILWS_delete_next_client(struct web_client *);
123void __ILWS_delete_client_list(struct web_client *);
124
125void __ILWS_read_client(struct web_client *);
126void __ILWS_process_client(struct web_client *,struct gethandler *);
127void __ILWS_output_client(struct web_client *);
128
129void __ILWS_web_client_writef(struct web_client *,const char *,...);
130
131int web_client_addfile(char *);
132void web_client_contenttype(char *); // new on 0.5.2
133
134void web_client_gifsetpalette(const char *);
135
136extern unsigned char __ILWS_GLOBALGIFPAL[256][3];
137
138int web_client_gifoutput(char *,int,int,int);
139
140void web_client_HTTPdirective(char *);
141
142char *__ILWS_web_client_getreqline();
143char *__ILWS_web_client_getreq();
144// new (0.5.1)
145int web_client_setvar(char *,char *);
146char *web_client_getvar(char *);
147int web_client_delvar(char *);
148
149// put in var.h
150struct web_var *__ILWS_init_var_list();
151int __ILWS_add_var(struct web_var *, char *, char *);
152int __ILWS_del_var(struct web_var *, char *);
153void __ILWS_delete_var_list(struct web_var *);
154char *__ILWS_get_var(struct web_var *list , char *name);
155
156int __ILWS_lws_list(char *); // new on 0.5.2
157
158#endif
159
diff --git a/src/clientinfo.c b/src/clientinfo.c
new file mode 100644
index 00000000..c640973c
--- /dev/null
+++ b/src/clientinfo.c
@@ -0,0 +1,1124 @@
1/* Copyrights 2002 Luis Figueiredo (stdio@netc.pt) All rights reserved.
2 *
3 * See the LICENSE file
4 *
5 * The origin of this software must not be misrepresented, either by
6 * explicit claim or by omission. Since few users ever read sources,
7 * credits must appear in the documentation.
8 *
9 * date: Wed Oct 9 19:56:22 GMT 2002
10 *
11 * -- parse http header into "ClientInfo"
12 *
13 */
14
15#include "clientinfo.h"
16
17
18struct ClientInfo *ClientInfo; // tochange
19
20/*********************************************************************************************************/
21/*
22 * Initialize ClientInfo structure
23 */
24void __ILWS_init_clientinfo() {
25 char *t;
26 struct outstream *tstream=current_web_client->outstream;
27
28 ClientInfo=__ILWS_malloc(sizeof(struct ClientInfo));
29 if(ClientInfo==NULL) {
30 LWSERR(LE_MEMORY);
31 return;
32 };
33
34 while(tstream->next!=NULL) {
35 tstream=tstream->next;
36 };
37
38 if(tstream->fstream!=NULL) ClientInfo->outfd=fileno(tstream->fstream); //take it off?
39
40 ClientInfo->mem=__ILWS_init_buffer_list(); // First thing, other fuctions use this to allocate
41
42
43 ClientInfo->request=__ILWS_clientinfo_getreqname();
44
45 ClientInfo->inetname=NULL;
46 t=inet_ntoa(current_web_client->sa.sin_addr);
47 if((ClientInfo->inetname=__ILWS_add_buffer(ClientInfo->mem,strlen(t)+1))) {
48 memcpy(ClientInfo->inetname,t,strlen(t));
49 ClientInfo->inetname[strlen(t)]='\0';
50 };
51
52 ClientInfo->method=__ILWS_clientinfo_getmethod();
53 ClientInfo->user=__ILWS_clientinfo_getauthuser();
54 ClientInfo->pass=__ILWS_clientinfo_getauthpass();
55
56
57
58 /* Initialize List's */
59 ClientInfo->HeaderList=NULL;
60 ClientInfo->QueryList=NULL;
61 ClientInfo->PostList=NULL;
62 ClientInfo->MultiPartList=NULL;
63 ClientInfo->CookieList=NULL;
64
65 ClientInfo->Header=__ILWS_Header;
66 ClientInfo->Query=__ILWS_Query;
67 ClientInfo->QueryString=__ILWS_clientinfo_getquerystring();
68 ClientInfo->Post=__ILWS_Post;
69 ClientInfo->PostData=__ILWS_clientinfo_getpostdata();
70 ClientInfo->MultiPart=__ILWS_MultiPart;
71 ClientInfo->Cookie=__ILWS_Cookie;
72 ClientInfo->Conf=__ILWS_Conf;
73 ClientInfo->CookieString=__ILWS_Header("Cookie");
74
75}
76
77/*********************************************************************************************************/
78/*
79 * Free ClientInfo structure
80 */
81void __ILWS_free_clientinfo() {
82 if(ClientInfo==NULL) {
83 return;
84 };
85 __ILWS_delete_buffer_list(ClientInfo->mem);
86
87 __ILWS_free(ClientInfo);
88 ClientInfo=NULL;
89}
90
91
92/*********************************************************************************************************/
93/*
94 * Header function for ClientInfo->Header("x")
95 */
96char *__ILWS_Header(char *str) {
97 char *tmp1,*tmp2,*tmp3,*ret;
98 struct _Header *hl=ClientInfo->HeaderList;
99 char *defret="";
100 size_t size;
101 size_t strsize;
102 if(str==NULL) { // request is null return whole header
103 return current_web_client->rbuf;
104 };
105 if(ClientInfo->HeaderList==NULL) {
106
107 ClientInfo->HeaderList=__ILWS_add_buffer(ClientInfo->mem,sizeof(struct _Header));
108 if(ClientInfo->HeaderList==NULL) {
109 LWSERR(LE_MEMORY);
110 return defret;
111 };
112 ClientInfo->HeaderList->next=NULL;
113 ClientInfo->HeaderList->data=NULL;
114 ClientInfo->HeaderList->id=NULL;
115 hl=ClientInfo->HeaderList;
116 };
117 // First search if exists
118
119 while(hl->next!=NULL) {
120 if(hl->next->id!=NULL) {
121 if(!strcmp(hl->next->id,str)) {
122
123 return hl->next->data;
124 };
125 };
126 hl=hl->next;
127 };
128
129 /* Doesn't exists */
130 strsize=strlen(str);
131 if(!(hl->next=__ILWS_add_buffer(ClientInfo->mem,sizeof(struct _Header)))) {
132 LWSERR(LE_MEMORY);
133 return defret;
134 };
135 if(!(hl->next->id=__ILWS_add_buffer(ClientInfo->mem,strsize+1))) {
136 LWSERR(LE_MEMORY);
137 return defret;
138 };
139
140 memcpy(hl->next->id,str,strsize);
141 hl->next->id[strsize]=0;
142 hl->next->data=defret;
143 hl->next->next=NULL;
144
145 if(!(tmp3=__ILWS_malloc(strsize+3))) {
146 LWSERR(LE_MEMORY);
147 return defret;
148 };
149 snprintf(tmp3,strsize+3,"%s: ",str);
150 tmp1=__ILWS_stristr(current_web_client->rbuf,tmp3);
151 __ILWS_free(tmp3);
152 if(tmp1==NULL) {
153 return defret;
154 };
155
156 tmp1+=strsize+2;
157 if(!(tmp2=strstr(tmp1,"\r\n"))) { // Unexpected (security anyway)
158 return defret;
159 };
160 if((size=(unsigned int)(tmp2-tmp1))<0) {
161 return defret;
162 };
163 if(!(ret=__ILWS_add_buffer(ClientInfo->mem,size+1))) { //malloc & register
164 return defret;
165 };
166 memcpy(ret,tmp1,size);
167 ret[size]=0;
168 hl->next->data=ret;
169 return ret;
170}
171
172
173
174/*********************************************************************************************************/
175/*
176 * Function for Querydata
177 */
178char *__ILWS_Query(char *handle) {
179 char *tmp1,*tmp2,*tmp3,*tmp4,*ret;
180 char *defret="";
181 size_t strsize;
182 size_t size;
183 int j=0,ch;
184 int seek=1;
185 unsigned int i;
186 unsigned int *iddb=NULL;
187 unsigned int *iddb2=NULL;
188 unsigned int idf=0;
189 int rw=0; // 0 data 1 number of vars; (return what?)
190 struct _Query *ql=ClientInfo->QueryList;
191
192
193 if(handle==NULL) {
194 return ClientInfo->QueryString;
195 };
196 if(handle[0]=='#') rw=1;
197 // allocate first node from the list
198 if(ClientInfo->QueryList==NULL) {
199 ClientInfo->QueryList=__ILWS_add_buffer(ClientInfo->mem,sizeof(struct _Query));
200 if(ClientInfo->QueryList==NULL) {
201 LWSERR(LE_MEMORY);
202 if(rw) return 0;
203 return defret;
204 };
205 ClientInfo->QueryList->next=NULL;
206 ClientInfo->QueryList->data=NULL;
207 ClientInfo->QueryList->id=NULL;
208 ql=ClientInfo->QueryList;
209 };
210 // done allocating
211
212
213 // First search if exists and fetch values;
214
215 idf=1;
216 iddb=&idf;
217 seek=1;
218
219 while(ql->next!=NULL) {
220 if(ql->next->id!=NULL) {
221 if(!strcmp(ql->next->id,handle+rw) && *iddb >= 0) {
222 if(seek==1) {
223 iddb=&ql->next->index; // atribute iddb to first node
224 iddb2=&ql->next->idf; // atribute iddb2 to counting
225 if(rw) return (char *)*iddb2;
226 if(ql->next->idf==1) {
227 return ql->next->data;
228 };
229 j=*iddb;
230 seek++;
231 };
232 *iddb=*iddb-1;
233
234 if(*iddb<=0) {
235 *iddb=j-1;
236 if(j<=1) {
237 *iddb=*iddb2; // go to start if any
238 //return defret; // to be null
239 };
240 return ql->next->data; // Return existent
241 };
242
243 };
244 };
245 ql=ql->next;
246 };
247
248
249
250 /* Doesn't exists */
251 strsize=strlen(handle+rw);
252 tmp1=strstr(current_web_client->rbuf,"?");
253 tmp3=strstr(current_web_client->rbuf," HTTP"); // End of GET header
254 if(tmp1!=NULL && tmp1<tmp3) {
255 tmp1+=1;
256 } else {
257 if(rw)return 0;
258 return defret;
259 }
260
261 // Working here
262 idf=0;
263 ret=defret;
264 seek=1;
265 tmp4=tmp1;
266 while(seek==1) {
267 tmp1=tmp4;
268 do {
269 tmp2=strstr(tmp1,handle+rw);
270 if(tmp2==NULL) { // must be nonnull
271 if(iddb!=NULL && iddb2!=NULL) { // if iddb2 is null then is just one value;
272 *iddb2=*iddb;
273 if(!rw)*iddb=*iddb-1;
274 };
275 if(rw) {
276 if(ret==defret) return 0;
277 return (char *)*iddb2;
278 }
279 return ret; // if first null return defret (ret=defret);
280
281 };
282 tmp1=tmp2+strsize;
283 } while ((tmp2[-1]!='?' && tmp2[-1]!='&') || tmp2[strsize]!='='); // Johannes E. Schindelin Fix
284
285 if(tmp3<tmp2) {
286 if(iddb!=NULL && iddb2!=NULL) {
287 *iddb2=*iddb;
288 if(!rw)*iddb=*iddb-1;
289 };
290 if(rw) {
291 if(ret==defret) return 0;
292 return (char *)*iddb2;
293 }
294
295 return ret;
296 };
297
298 tmp4=tmp1;
299 // if not null, so add an node;
300
301 // Working here ^
302 ql->next=__ILWS_add_buffer(ClientInfo->mem,sizeof(struct _Query));
303 if(ql->next==NULL) {
304 LWSERR(LE_MEMORY);
305 if(handle[0]=='#') rw=1;
306 return defret;
307 };
308 ql->next->id=__ILWS_add_buffer(ClientInfo->mem,strsize+1);
309 if(ql->next->id==NULL) {
310 LWSERR(LE_MEMORY);
311 if(handle[0]=='#') rw=1;
312 return defret;
313 };
314 memcpy(ql->next->id,handle+rw,strsize);
315 ql->next->id[strsize]=0;
316 if(idf==0) {
317 ql->next->index=0;
318 iddb=&ql->next->index;
319 iddb2=&ql->next->idf; // second holds information about number of fetchs;
320
321 };
322 ql->next->data=defret;
323 ql->next->next=NULL;
324
325
326 tmp1=strstr(tmp2,"&"); // tmp1 goes to next '&'
327 tmp2+=strsize+1; // tmp2 goes to start of data
328 tmp3=strstr(tmp2," HTTP"); // tmp3 goes to the end of Get header
329 if(tmp1==NULL || ((unsigned int)tmp1>(unsigned int)tmp3)) {
330 size=tmp3-tmp2; // MUST HAVE (" HTTP") else, server don't let in
331 } else {
332 size=tmp1-tmp2;
333 };
334 if(size<1) {
335 if(handle[0]=='#') rw=1;
336 return defret;
337 };
338
339
340 ql->next->data=__ILWS_add_buffer(ClientInfo->mem,size+1);
341 if(ql->next->data==NULL) {
342 LWSERR(LE_MEMORY);
343 if(handle[0]=='#') rw=1;
344 return defret;
345 };
346 j=0;
347 for(i=0;i<size;i++) { // Hex translation here
348 switch (ch=tmp2[j]) {
349 case '+':
350 ch=' ';
351 break;
352 case '%':
353
354 tmp1=__ILWS_malloc(3);
355 if(tmp1==NULL) {
356 LWSERR(LE_MEMORY);
357 if(rw) return 0;
358 return defret;
359 };
360 strncpy(tmp1,&tmp2[j+1],2);
361 tmp1[2]=0;
362 ch=strtol(tmp1,NULL,16);
363 j+=2;
364 size-=2;
365
366 __ILWS_free(tmp1);
367 break;
368 };
369 ql->next->data[i]=ch;
370 j++;
371 };
372 ql->next->data[size]='\0';
373 ret=ql->next->data; // to the last
374 ql=ql->next;
375 *iddb=*iddb+1;
376 idf++;
377 };
378 return ret;
379}
380
381
382
383/*********************************************************************************************************/
384/*
385 * Function for Postdata
386 */
387char *__ILWS_Post(char *handle) {
388 char *tmp1,*tmp2,*tmp3,*ret;
389 struct _Post *pl=ClientInfo->PostList;
390 char *defret="";
391 int *iddb=NULL,*iddb2=NULL;
392 int idf;
393 int seek=1;
394 size_t strsize;
395 size_t size;
396 int j=0,ch;
397 unsigned int i;
398 int rw=0; //return what;
399
400 tmp1=strstr(current_web_client->rbuf,"Content-type: multipart/form-data"); // multipart this post doesn't work
401 if(tmp1!=NULL) {
402 return ClientInfo->MultiPart(handle).data;
403 };
404 if(handle==NULL) {
405 return ClientInfo->PostData;
406 };
407 if(handle[0]=='#')rw=1;
408 /* Allocate the list */
409 if(ClientInfo->PostList==NULL) {
410 if(!(ClientInfo->PostList=__ILWS_add_buffer(ClientInfo->mem,sizeof(struct _Post)))) {
411 LWSERR(LE_MEMORY);
412 if(rw) return 0;
413 return defret;
414 };
415 ClientInfo->PostList->next=NULL;
416 ClientInfo->PostList->data=NULL;
417 ClientInfo->PostList->id=NULL;
418 pl=ClientInfo->PostList;
419 };
420
421 // First search if exists
422 idf=1;
423 iddb=&idf;
424 seek=1;
425 while(pl->next!=NULL) {
426 if(pl->next->id!=NULL) {
427 if(!strcmp(pl->next->id,handle+rw) && iddb>=0) {
428 if(seek==1) {
429 iddb=&pl->next->index;
430 iddb2=&pl->next->idf;
431 if(rw) return (char *)(*iddb2);
432 if(pl->next->idf==1) {
433 return pl->next->data;
434 };
435 j=*iddb;
436 seek++;
437 };
438 *iddb=*iddb-1;
439
440 if(*iddb<=0) {
441 *iddb=j-1;
442 if(j<=1) {
443 *iddb=*iddb2;
444
445 //return defret;
446 };
447 return pl->next->data;
448 };
449 };
450 };
451 pl=pl->next;
452 };
453
454
455
456
457
458 /* Doesn't exists */
459 strsize=strlen(handle+rw);
460 tmp1=strstr(current_web_client->rbuf,"\r\n\r\n");
461 if(tmp1!=NULL)
462 tmp1+=4;
463 else {
464 if(rw) return 0;
465 return defret;
466 };
467 idf=0;
468 ret=defret;
469 seek=1;
470 tmp3=tmp1;
471 while(seek==1) {
472 tmp1=tmp3;
473 do {
474 tmp2=strstr(tmp1,handle+rw);
475 if(tmp2==NULL) { // mustn't be null
476 if(iddb!=NULL && iddb2!=NULL) { // if iddb2 is null then is just one value;
477 *iddb2=*iddb;
478 if(!rw)*iddb=*iddb-1;
479 };
480 if(rw) {
481 if(ret==defret) return 0;
482 return (char *)*iddb2;
483 }
484 return ret; // if first null return defret (ret=defret);
485
486 };
487 tmp1=tmp2+strsize;
488 } while ((tmp2[-1]!='\n' && tmp2[-1]!='&') || tmp2[strsize]!='='); // Johannes E. Schindelin Fix
489 tmp3=tmp1;
490
491
492 pl->next=__ILWS_add_buffer(ClientInfo->mem,sizeof(struct _Post));
493 if(pl->next==NULL) {
494 LWSERR(LE_MEMORY);
495 if(rw) return 0;
496 return defret;
497 };
498 pl->next->id=__ILWS_add_buffer(ClientInfo->mem,strsize+1);
499 if(pl->next->id==NULL) {
500 LWSERR(LE_MEMORY);
501 if(rw) return 0;
502 return defret;
503 };
504 memcpy(pl->next->id,handle+rw,strsize);
505 pl->next->id[strsize]=0;
506 if(idf==0) {
507 pl->next->index=0;
508 iddb=&pl->next->index;
509 iddb2=&pl->next->idf;
510 };
511
512 pl->next->data=defret;
513 pl->next->next=NULL;
514
515 tmp1=strstr(tmp2,"&"); // goes to the next & (end of data)
516 tmp2+=strsize+1; // tmp2 goes to start of data
517 if(tmp1==NULL) {
518 size=strlen(tmp2);
519 } else {
520 size=tmp1-tmp2;
521 };
522 if(size==0) {
523 if(rw) return 0;
524 return defret;
525 };
526
527 pl->next->data=__ILWS_add_buffer(ClientInfo->mem,size+1);
528 if(pl->next->data==NULL) {
529 LWSERR(LE_MEMORY);
530 return defret;
531 };
532 j=0;
533 for(i=0;i<size;i++) { // hex translation here
534 switch (ch=tmp2[j]) {
535 case '+':
536 ch=' ';
537 break;
538 case '%':
539
540 tmp1=__ILWS_malloc(3);
541 if(tmp1==NULL) {
542 LWSERR(LE_MEMORY);
543 if(rw) return 0;
544 return defret;
545 };
546 strncpy(tmp1,&tmp2[j+1],2);
547 tmp1[2]=0;
548
549 ch=strtol(tmp1,NULL,16);
550 j+=2;
551 size-=2;
552
553 __ILWS_free(tmp1);
554 break;
555 };
556 pl->next->data[i]=ch;
557 j++;
558 };
559 pl->next->data[size]='\0';
560 ret=pl->next->data; // to the last
561 *iddb=*iddb+1;
562 idf++;
563 pl=pl->next;
564 //pl->next->data=ret;
565 };
566 return ret;
567}
568
569
570
571/*********************************************************************************************************/
572/*
573 * Function for MultiPart formdata
574 */
575struct _MultiPart __ILWS_MultiPart(char *handle) {
576 char *tmp1,*tmp2,*tmp3;
577 int i;
578 char *name;
579 size_t namesize;
580 struct _MultiPart *ml=ClientInfo->MultiPartList;
581 struct _MultiPart defret={"","",0,""};
582 size_t strsize;
583 char *boundary; size_t boundarysize;
584 // IE C43o6Fn6Et74e65n6Et74-2DT54y79p70e65:3A 20m6Du75l6Ct74i69p70a61r72t74/2Ff66o6Fr72m6D-2Dd64a61t74a61
585 // NS C43o6Fn6Et74e65n6Et74-2Dt74y79p70e65:3A 20m6Du75l6Ct74i69p70a61r72t74/2Ff66o6Fr72m6D-2Dd64a61t74a61
586 tmp1=__ILWS_stristr(current_web_client->rbuf,"Content-type: multipart/form-data");
587 if(tmp1==NULL) return defret;
588 if(ClientInfo->MultiPartList==NULL) {
589 ClientInfo->MultiPartList=__ILWS_add_buffer(ClientInfo->mem,sizeof(struct _MultiPart));
590 if(ClientInfo->MultiPartList==NULL) {
591 LWSERR(LE_MEMORY);
592 return defret;
593 };
594 ClientInfo->MultiPartList->next=NULL;
595 ClientInfo->MultiPartList->id=NULL;
596 ClientInfo->MultiPartList->data=NULL;
597 ClientInfo->MultiPartList->filename=NULL;
598 ClientInfo->MultiPartList->size=0;
599 ml=ClientInfo->MultiPartList;
600 };
601 // Check if handle exists
602 while(ml->next!=NULL) {
603 if(ml->next->id!=NULL) {
604 if(!strcmp(ml->next->id,handle)) {
605
606 return *ml->next;
607 };
608 };
609 ml=ml->next;
610 };
611
612
613 strsize=strlen(handle);
614 ml->next=__ILWS_add_buffer(ClientInfo->mem,sizeof(struct _MultiPart));
615 if(ml->next==NULL) {
616 LWSERR(LE_MEMORY);
617 return defret;
618 };
619 ml->next->id=__ILWS_add_buffer(ClientInfo->mem,strsize+1);
620 if(ml->next->id==NULL) {
621 LWSERR(LE_MEMORY);
622 return defret;
623 };
624 memcpy(ml->next->id,handle,strsize);
625 ml->next->id[strsize]=0;
626 ml->next->data="";
627 ml->next->filename="";
628 ml->next->size=0;
629 ml->next->next=NULL;
630
631 tmp1=strstr(tmp1,"boundary=");
632 if(tmp1==NULL) return defret;
633 tmp1+=9;
634 tmp2=strstr(tmp1,"\r\n");
635 if(tmp2<tmp1 || tmp2==NULL) return defret;
636 /* boundary */
637 boundarysize=tmp2-tmp1;
638 boundary=__ILWS_add_buffer(ClientInfo->mem,boundarysize+3);
639 if(boundary==NULL) {
640 LWSERR(LE_MEMORY);
641 return defret;
642 };
643 memcpy(boundary,tmp1,boundarysize);
644 boundary[boundarysize]=0;
645
646
647 /* handle */
648 namesize=boundarysize+41+strlen(handle);
649 name=__ILWS_add_buffer(ClientInfo->mem,namesize+1);
650 if(name==NULL) {
651 LWSERR(LE_MEMORY);
652 return defret;
653 };
654 snprintf(name,namesize,"%s\r\nContent-Disposition: form-data; name=",boundary);
655 namesize=strlen(name);
656
657 tmp1=strstr(tmp1,"\r\n\r\n"); // go to data
658 if(tmp1==NULL) return defret;
659
660 do {
661 i=memcmp(tmp1,name,namesize);
662 if(i==0) {
663 tmp1+=namesize;
664 if(tmp1[0]=='\"')tmp1+=1;
665 if(strncmp(tmp1,handle,strlen(handle))){
666 i=1;
667 }else {
668 if((tmp1[strsize]!=' ') && (tmp1[strsize]!='\"') && (tmp1[strsize]!='\r') && (tmp1[strsize]!=';') ) i=1;
669 };
670
671 }else {
672 tmp1+=1;
673 };
674 } while(i!=0 && (tmp1+namesize<current_web_client->rbuf+current_web_client->rbufsize)); // Search init of data
675 if(i!=0) return defret;
676 //tmp1+=namesize;
677 tmp2=strstr(tmp1,"filename="); // get filename
678 if(tmp2!=NULL) {
679 tmp2+=9;
680 if(tmp2[0]=='\"')tmp2+=1;
681 tmp3=strstr(tmp2,"\r\n");
682 ml->next->filename=__ILWS_add_buffer(ClientInfo->mem,(tmp3-tmp2)+1);
683 if(ml->next->filename==NULL) {
684 LWSERR(LE_MEMORY);
685 return defret;
686 };
687 memcpy(ml->next->filename,tmp2,tmp3-tmp2);
688 ml->next->filename[tmp3-tmp2]='\0';
689 if(ml->next->filename[tmp3-tmp2-1]=='\"')
690 ml->next->filename[tmp3-tmp2-1]='\0';
691
692 };
693 tmp2=strstr(tmp1,"\r\n\r\n"); // data init
694 if(tmp2==NULL)return defret;
695 tmp2+=4;
696 tmp3=tmp2;
697 do {
698
699 i=memcmp(tmp3,boundary,boundarysize);
700 if(i!=0)tmp3+=1;
701 } while(i!=0 && (tmp3+boundarysize<current_web_client->rbuf+current_web_client->rbufsize)); // End of data
702 if(i!=0) return defret;
703 tmp3-=4; // back "\r\n\r\n"
704
705 // copy data to node
706 if(!(ml->next->data=__ILWS_add_buffer(ClientInfo->mem,(tmp3-tmp2)+1))) {
707 LWSERR(LE_MEMORY);
708 return defret;
709 };
710 memcpy(ml->next->data,tmp2,tmp3-tmp2);
711 ml->next->data[tmp3-tmp2]='\0';
712 ml->next->size=tmp3-tmp2;
713
714
715
716
717 return *ml->next;
718
719};
720
721/*********************************************************************************************************/
722/*
723 * Function for CookieData
724 */
725char *__ILWS_Cookie(char *handle) {
726 char *defret="";
727 char *tmp1,*tmp2,*ret;
728 int size;
729 int strsize;
730 struct _Cookie *cl=ClientInfo->CookieList;
731
732
733 tmp1=strstr(current_web_client->rbuf,"\nCookie: "); // start of cookie string
734 if(tmp1==NULL) { // no cookies
735 return defret;
736 };
737 tmp1+=8;
738 if(handle==NULL) {
739 return ClientInfo->CookieString;
740 };
741
742 if(ClientInfo->CookieList==NULL) {
743
744 ClientInfo->CookieList=__ILWS_add_buffer(ClientInfo->mem,sizeof(struct _Cookie));
745 if(ClientInfo->CookieList==NULL) {
746 LWSERR(LE_MEMORY);
747 return defret;
748 };
749 ClientInfo->CookieList->next=NULL;
750 ClientInfo->CookieList->data=NULL;
751 ClientInfo->CookieList->id=NULL;
752 cl=ClientInfo->CookieList;
753 }
754 // First search if exists
755 while(cl->next!=NULL) {
756 if(cl->next->id!=NULL) {
757 if(!strcmp(cl->next->id,handle)) {
758
759 return cl->next->data;
760 };
761 };
762 cl=cl->next;
763 };
764
765 strsize=strlen(handle);
766 if(!(cl->next=__ILWS_add_buffer(ClientInfo->mem,sizeof(struct _Cookie)))) {
767 LWSERR(LE_MEMORY);
768 return defret;
769 };
770 if(!(cl->next->id=__ILWS_add_buffer(ClientInfo->mem,strsize+1))) {
771 LWSERR(LE_MEMORY);
772 return defret;
773 };
774 memcpy(cl->next->id,handle,strsize);
775 cl->next->id[strsize]=0;
776 cl->next->data=defret;
777 cl->next->next=NULL;
778 do {
779 tmp2=strstr(tmp1,handle);
780 if(tmp2==NULL) {
781 return defret;
782 }else if(tmp2[strsize]==';' && tmp2[-1]==' ') {
783 cl->next->data=__ILWS_add_buffer(ClientInfo->mem,6);
784 snprintf(cl->next->data,5,"True");
785 return cl->next->data;
786 };
787 tmp1=tmp2+strsize;
788 }while(tmp2[-1]!=' ' || tmp2[strsize]!='=');
789
790 tmp1=strstr(tmp2,";"); // end of data
791 tmp2+=strsize+1; // start of data
792 if(tmp1==NULL) {
793 size=strstr(tmp2,"\r")-tmp2;
794
795 } else {
796 size=tmp1-tmp2;
797 };
798 if(size<1) {
799 return defret;
800 };
801
802 ret=__ILWS_add_buffer(ClientInfo->mem,size+1);
803 if(ret==NULL) {
804 LWSERR(LE_MEMORY);
805 return defret;
806 };
807
808 memcpy(ret,tmp2,size);
809 ret[size]='\0';
810 cl->next->data=ret;
811 return cl->next->data;
812};
813
814
815
816/*********************************************************************************************************/
817/*
818 * get whole query string
819 */
820char *__ILWS_clientinfo_getquerystring() {
821 char *tmp1,*tmp2,*ret;
822 char *defret="";
823 size_t size;
824 tmp1=strstr(current_web_client->rbuf,"?");
825 tmp2=strstr(current_web_client->rbuf,"HTTP");
826 if(tmp1!=NULL && tmp1<tmp2)
827 tmp1+=1;
828 else
829 return defret;
830 size=(tmp2-tmp1)-1;
831 ret=__ILWS_add_buffer(ClientInfo->mem,size+1);
832 if(ret==NULL) {
833 LWSERR(LE_MEMORY);
834 return defret;
835 };
836 memcpy(ret,tmp1,size);
837 ret[size]=0;
838 return ret;
839};
840
841
842/*********************************************************************************************************/
843/*
844 * get whole post data
845 */
846char *__ILWS_clientinfo_getpostdata() {
847 char *tmp1,*ret;
848 char *defret="";
849 size_t size;
850 tmp1=strstr(current_web_client->rbuf,"\r\n\r\n");
851 if(tmp1!=NULL && (tmp1+4)<(char*)(current_web_client->rbuf+current_web_client->rbufsize))
852 tmp1+=4;
853 else
854 return defret;
855 size=(current_web_client->rbuf+current_web_client->rbufsize)-tmp1;
856 ret=__ILWS_add_buffer(ClientInfo->mem,size+1);
857 if(ret==NULL) {
858 LWSERR(LE_MEMORY);
859 return defret;
860 };
861 memcpy(ret,tmp1,size);
862 ret[size]='\0';
863 return ret;
864}
865
866
867/*********************************************************************************************************/
868/*
869 * Get authorization username
870 */
871char *__ILWS_clientinfo_getauthuser() {
872 char *tmp1,*tmp2,*ret, *out=NULL;
873 char *defret="";
874 size_t size;
875
876 tmp1=strstr(current_web_client->rbuf,"Authorization: Basic");
877 if(tmp1==NULL) {
878
879 return defret;
880 };
881
882 tmp1+=21;
883 tmp2=strstr(tmp1,"\r\n");
884 if(tmp2==NULL) return defret;
885 size=(int)(tmp2-tmp1);
886
887 ret=__ILWS_malloc(size+1);
888 if(ret==NULL) {
889 LWSERR(LE_MEMORY);
890 return defret;
891 };
892 memcpy(ret,tmp1,size);
893 ret[size]=0;
894
895 out=__ILWS_malloc(size+1);
896 if(out==NULL) {
897 LWSERR(LE_MEMORY);
898 __ILWS_free(ret);
899 return defret;
900 };
901
902 size=__ILWS_base64decode(out,ret);
903 out[size]='\0';
904
905
906 __ILWS_free(ret);
907 tmp2=strstr(out,":");
908 if(tmp2==NULL) return defret;
909
910 ret=__ILWS_add_buffer(ClientInfo->mem,(tmp2-out)+1);
911 if(ret==NULL) {
912 LWSERR(LE_MEMORY);
913 __ILWS_free(out);
914 return defret;
915 };
916 memcpy(ret,out,tmp2-out);
917 ret[tmp2-out]=0;
918
919 __ILWS_free(out);
920 return ret;
921}
922
923
924/*********************************************************************************************************/
925/*
926 * get authorization password
927 */
928char *__ILWS_clientinfo_getauthpass() {
929 char *tmp1,*tmp2,*ret, *out=NULL;
930 char *defret="";
931 size_t size;
932
933 tmp1=strstr(current_web_client->rbuf,"Authorization: Basic");
934 if(tmp1==NULL) {
935
936 return defret;
937 };
938
939 tmp1+=21;
940 tmp2=strstr(tmp1,"\r\n");
941 if(tmp2==NULL) return defret;
942 size=(int)(tmp2-tmp1);
943
944 ret=__ILWS_malloc(size+1);
945 if(ret==NULL) {
946 LWSERR(LE_MEMORY);
947 return defret;
948 };
949 memcpy(ret,tmp1,size);
950 ret[size]=0;
951
952 out=__ILWS_malloc(size+1);
953 if(out==NULL) {
954 LWSERR(LE_MEMORY);
955 __ILWS_free(ret);
956 return defret;
957 };
958
959 size=__ILWS_base64decode(out,ret);
960 out[size]='\0';
961
962
963 __ILWS_free(ret);
964 tmp1=strstr(out,":")+1;
965 tmp2=out+strlen(out);
966
967 ret=__ILWS_add_buffer(ClientInfo->mem,(tmp2-tmp1)+1);
968 if(ret==NULL) {
969 LWSERR(LE_MEMORY);
970 __ILWS_free(out);
971 return defret;
972 };
973 memcpy(ret,tmp1,tmp2-tmp1);
974 ret[tmp2-tmp1]=0;
975
976 __ILWS_free(out);
977 return ret;
978}
979
980
981/*********************************************************************************************************/
982/*
983 * get method (GET POST HEAD etc)
984 */
985char *__ILWS_clientinfo_getmethod() {
986 char *tmp1,*ret;
987 char *defret="";
988 size_t size;
989 tmp1=strstr(current_web_client->rbuf," "); // first space
990 if(tmp1==NULL) {
991 return defret;
992 };
993 size=tmp1-current_web_client->rbuf;
994 ret=__ILWS_add_buffer(ClientInfo->mem,size+1);
995 if(ret==NULL) {
996 LWSERR(LE_MEMORY);
997 return defret;
998 };
999 memcpy(ret,current_web_client->rbuf,size);
1000 ret[size]=0;
1001 return ret;
1002}
1003
1004
1005/*********************************************************************************************************/
1006/*
1007 * get request name (GET /taltal HTTP/1.0) returning /taltal
1008 */
1009char *__ILWS_clientinfo_getreqname() {
1010 char *ret;
1011 char *tmp1=strstr(current_web_client->rbuf,"/"); // Must have /
1012 char *tmp2=strstr(tmp1,"?");
1013 char *tmp3=strstr(tmp1," HTTP");
1014 char *defret="";
1015 size_t i,j;
1016 int ch;
1017 size_t size=0;
1018 if(tmp1==NULL || tmp3==NULL) return defret;
1019 if(tmp2==NULL || tmp2>tmp3) {
1020 tmp2=tmp3;
1021 };
1022 //tmp1+=1;
1023 size=tmp2-tmp1;
1024 if(size<1)
1025 return defret;
1026 ret=__ILWS_add_buffer(ClientInfo->mem,size+1);
1027 if(ret==NULL) {
1028 LWSERR(LE_MEMORY);
1029 return defret;
1030 };
1031 j=0;
1032 for(i=0;i<size;i++) { // hex translation here
1033 switch (ch=tmp1[j]) {
1034 case '+':
1035 ch=' ';
1036 break;
1037 case '%':
1038
1039 tmp2=__ILWS_malloc(3);
1040 if(tmp2==NULL) {
1041 LWSERR(LE_MEMORY);
1042 return defret;
1043 };
1044 strncpy(tmp2,&tmp1[j+1],2);
1045 tmp2[2]=0;
1046
1047 ch=strtol(tmp2,NULL,16);
1048 j+=2;
1049 size-=2;
1050 __ILWS_free(tmp2);
1051 break;
1052 };
1053 ret[i]=ch;
1054 j++;
1055 };
1056 //pl->next->data[size]='\0';
1057 //memcpy(ret,tmp1,size);
1058 ret[size]=0;
1059 return ret;
1060}
1061/*********************************************************************************************************/
1062/*
1063 * Get config entry (new on 0.5.0)
1064 */
1065char *__ILWS_Conf(const char *topic,const char *key) {
1066 struct web_server *server=current_web_server;
1067 FILE *tmpf;
1068 struct stat statf; // tested only on WIN
1069 char *defret="";
1070 char *dataconf;
1071 char *tmp1,*tmp2,*tmp3;
1072 long tmpsize=0;
1073 int sizec;
1074 // Config revive tested only on WIN
1075 if(server->conffile!=NULL) {
1076 stat(server->conffile,&statf);
1077 if(statf.st_mtime>server->conffiletime) {
1078 tmpf=fopen(server->conffile,"r");
1079 if(tmpf!=NULL) {
1080 free(server->dataconf);
1081 fseek(tmpf,SEEK_SET,SEEK_END);
1082 sizec=ftell(tmpf);
1083 fseek(tmpf,0,SEEK_SET);
1084 server->dataconf=malloc(sizec+1);
1085 fread(server->dataconf,sizec,1,tmpf);
1086 server->dataconf[sizec-9]=0; // 9 is temporary
1087 server->conffiletime=statf.st_mtime;
1088 fclose(tmpf);
1089 };
1090 };
1091 };
1092
1093 dataconf=__ILWS_stristr(server->dataconf,topic);
1094 if(dataconf==NULL) {
1095 return defret;
1096 };
1097 dataconf+=strlen(topic);
1098
1099 do {
1100 tmp1=__ILWS_stristr(dataconf,key);
1101 dataconf+=1;
1102 if(dataconf[0]==0) {
1103 return defret;
1104 };
1105 if(dataconf[0]=='[' && dataconf[-1]=='\n') {
1106 return defret;
1107 };
1108 }while(!(tmp1!=NULL && tmp1[-1]=='\n' && tmp1[strlen(key)]=='='));
1109
1110
1111 tmp1+=strlen(key)+1;
1112 tmp2=__ILWS_stristr(tmp1,"\n");
1113 if(tmp2==NULL) {
1114 tmp2=tmp1+strlen(tmp1);
1115 };
1116 tmpsize=tmp2-tmp1;
1117 tmp3=__ILWS_add_buffer(ClientInfo->mem,tmpsize+1);
1118 memcpy(tmp3,tmp1,tmpsize);
1119 tmp3[tmpsize]=0;
1120 return tmp3;
1121
1122
1123
1124};
diff --git a/src/clientinfo.h b/src/clientinfo.h
new file mode 100644
index 00000000..6712f5ba
--- /dev/null
+++ b/src/clientinfo.h
@@ -0,0 +1,118 @@
1/* Copyrights 2002 Luis Figueiredo (stdio@netc.pt) All rights reserved.
2 *
3 * See the LICENSE file
4 *
5 * The origin of this software must not be misrepresented, either by
6 * explicit claim or by omission. Since few users ever read sources,
7 * credits must appear in the documentation.
8 *
9 * date: Wed Oct 9 19:05:48 GMT 2002
10 *
11 *
12 * --
13 *
14 */
15
16#ifndef _CLIENTINFO_H_
17#define _CLIENTINFO_H_
18
19#ifdef HAVE_CONFIG_H
20#include "config.h"
21#endif
22
23#include <stdio.h>
24#include <fcntl.h>
25#include <string.h>
26
27#include "outstream.h"
28#include "client.h"
29#include "utils.h"
30#include "memory.h"
31#include "server.h"
32#include "error.h"
33
34
35
36/*
37 * Next's structs are redudant but it is an case of logic (spell)
38 */
39struct _Header {
40 char *id;
41 char *data;
42 struct _Header *next;
43};
44struct _Query {
45 unsigned int index;
46 unsigned int idf;
47 char *id;
48 char *data;
49 struct _Query *next;
50};
51struct _Post {
52 unsigned int index;
53 unsigned int idf;
54 char *id;
55 char *data;
56 struct _Post *next;
57};
58
59struct _MultiPart {
60 char *id;
61 char *data;
62 unsigned int size;
63 char *filename;
64 struct _MultiPart *next;
65};
66
67struct _Cookie {
68 char *id;
69 char *data;
70 struct _Cookie *next;
71};
72
73
74extern struct ClientInfo {
75 int outfd;
76 char *inetname;
77 char *request;
78 char *method;
79 char *user;
80 char *pass;
81
82 char *(*Header)(char *);
83 char *(*Query)(char *);
84 char *(*Post)(char *);
85 char *(*Cookie)(char *); // TODO
86 char *(*Conf)(const char *,const char *); // new on 0.5.0
87 struct _MultiPart (*MultiPart)(char *);
88 // not necessary for web_server.h
89 char *QueryString;
90 char *CookieString;
91 char *PostData;
92 struct memrequest *mem;
93 struct _Header *HeaderList; // Not necessary for web_server.h
94 struct _Query *QueryList; // Not necessary for web_server.h
95 struct _Post *PostList; // Not necessary for web_server.h
96 struct _MultiPart *MultiPartList; // Not necessary for web_server.h
97 struct _Cookie *CookieList; // Not necessary for web_server.h
98} *ClientInfo; //tochange
99
100
101void __ILWS_init_clientinfo();
102void __ILWS_free_clientinfo();
103char *__ILWS_clientinfo_getauthuser();
104char *__ILWS_clientinfo_getauthpass();
105char *__ILWS_clientinfo_getquerystring();
106char *__ILWS_clientinfo_getpostdata();
107char *__ILWS_clientinfo_getcookiestring();
108char *__ILWS_clientinfo_getmethod();
109char *__ILWS_clientinfo_getreqname();
110char *__ILWS_Header(char *);
111char *__ILWS_Query(char *);
112char *__ILWS_Post(char *);
113struct _MultiPart __ILWS_MultiPart(char *);
114char *__ILWS_Cookie(char *);
115char *__ILWS_Conf(const char *,const char *);
116
117#endif
118
diff --git a/src/config.h b/src/config.h
new file mode 100644
index 00000000..36b68449
--- /dev/null
+++ b/src/config.h
@@ -0,0 +1,133 @@
1/* include/config.h. Generated from config.h.in by configure. */
2/* include/config.h.in. Generated from configure.ac by autoheader. */
3
4/* Define to 1 if you have the <arpa/inet.h> header file. */
5#define HAVE_ARPA_INET_H 1
6
7/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
8/* #undef HAVE_DOPRNT */
9
10/* Define to 1 if you have the <fcntl.h> header file. */
11#define HAVE_FCNTL_H 1
12
13/* Define to 1 if you have the `inet_ntoa' function. */
14#define HAVE_INET_NTOA 1
15
16/* Define to 1 if you have the <inttypes.h> header file. */
17#define HAVE_INTTYPES_H 1
18
19/* Define to 1 if you have the <limits.h> header file. */
20#define HAVE_LIMITS_H 1
21
22/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
23 to 0 otherwise. */
24#define HAVE_MALLOC 1
25
26/* Define to 1 if you have the <memory.h> header file. */
27#define HAVE_MEMORY_H 1
28
29/* Define to 1 if you have the `memset' function. */
30#define HAVE_MEMSET 1
31
32/* Define to 1 if you have the <netinet/in.h> header file. */
33#define HAVE_NETINET_IN_H 1
34
35/* Define to 1 if your system has a GNU libc compatible `realloc' function,
36 and to 0 otherwise. */
37#define HAVE_REALLOC 1
38
39/* Define to 1 if you have the `select' function. */
40#define HAVE_SELECT 1
41
42/* Define to 1 if you have the `socket' function. */
43#define HAVE_SOCKET 1
44
45/* Define to 1 if you have the <stddef.h> header file. */
46#define HAVE_STDDEF_H 1
47
48/* Define to 1 if you have the <stdint.h> header file. */
49#define HAVE_STDINT_H 1
50
51/* Define to 1 if you have the <stdlib.h> header file. */
52#define HAVE_STDLIB_H 1
53
54/* Define to 1 if you have the `strchr' function. */
55#define HAVE_STRCHR 1
56
57/* Define to 1 if you have the `strerror' function. */
58#define HAVE_STRERROR 1
59
60/* Define to 1 if you have the `strftime' function. */
61#define HAVE_STRFTIME 1
62
63/* Define to 1 if you have the <strings.h> header file. */
64#define HAVE_STRINGS_H 1
65
66/* Define to 1 if you have the <string.h> header file. */
67#define HAVE_STRING_H 1
68
69/* Define to 1 if you have the `strncasecmp' function. */
70#define HAVE_STRNCASECMP 1
71
72/* Define to 1 if you have the `strstr' function. */
73#define HAVE_STRSTR 1
74
75/* Define to 1 if you have the `strtol' function. */
76#define HAVE_STRTOL 1
77
78/* Define to 1 if you have the <sys/socket.h> header file. */
79#define HAVE_SYS_SOCKET_H 1
80
81/* Define to 1 if you have the <sys/stat.h> header file. */
82#define HAVE_SYS_STAT_H 1
83
84/* Define to 1 if you have the <sys/time.h> header file. */
85#define HAVE_SYS_TIME_H 1
86
87/* Define to 1 if you have the <sys/types.h> header file. */
88#define HAVE_SYS_TYPES_H 1
89
90/* Define to 1 if you have the <unistd.h> header file. */
91#define HAVE_UNISTD_H 1
92
93/* Define to 1 if you have the `vprintf' function. */
94#define HAVE_VPRINTF 1
95
96/* Define to the address where bug reports for this package should be sent. */
97#define PACKAGE_BUGREPORT "bug-gnunet@gnu.org"
98
99/* Define to the full name of this package. */
100#define PACKAGE_NAME "libwebserver"
101
102/* Define to the full name and version of this package. */
103#define PACKAGE_STRING "libwebserver 0.5.3-GNUnet"
104
105/* Define to the one symbol short name of this package. */
106#define PACKAGE_TARNAME "libwebserver"
107
108/* Define to the version of this package. */
109#define PACKAGE_VERSION "0.5.3-GNUnet"
110
111/* Define as the return type of signal handlers (`int' or `void'). */
112#define RETSIGTYPE void
113
114/* Define to 1 if you have the ANSI C header files. */
115#define STDC_HEADERS 1
116
117/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
118#define TIME_WITH_SYS_TIME 1
119
120/* Define to 1 if your <sys/time.h> declares `struct tm'. */
121/* #undef TM_IN_SYS_TIME */
122
123/* Define to empty if `const' does not conform to ANSI C. */
124/* #undef const */
125
126/* Define to rpl_malloc if the replacement function should be used. */
127/* #undef malloc */
128
129/* Define to rpl_realloc if the replacement function should be used. */
130/* #undef realloc */
131
132/* Define to `unsigned int' if <sys/types.h> does not define. */
133/* #undef size_t */
diff --git a/src/debug.h b/src/debug.h
new file mode 100644
index 00000000..d128ab7a
--- /dev/null
+++ b/src/debug.h
@@ -0,0 +1,29 @@
1/* Copyrights 2002 Luis Figueiredo (stdio@netc.pt) All rights reserved.
2 *
3 * See the LICENSE file
4 *
5 * The origin of this software must not be misrepresented, either by
6 * explicit claim or by omission. Since few users ever read sources,
7 * credits must appear in the documentation.
8 *
9 * date: Sat Mar 30 14:16:05 GMT 2002
10 *
11 * DEBUG macros
12 *
13 */
14
15#ifndef _DEBUG_H_
16#define _DEBUG_H_
17
18#ifdef HAVE_CONFIG_H
19#include "config.h"
20#endif
21
22#ifdef DEBUG
23 #define IFDEBUG(x) x
24#else
25 #define IFDEBUG(x)
26#endif
27
28
29#endif
diff --git a/src/error.c b/src/error.c
new file mode 100644
index 00000000..43df1c30
--- /dev/null
+++ b/src/error.c
@@ -0,0 +1,34 @@
1/* Copyrights 2002 Luis Figueiredo (stdio@netc.pt) All rights reserved.
2 *
3 * See the LICENSE file
4 *
5 * The origin of this software must not be misrepresented, either by
6 * explicit claim or by omission. Since few users ever read sources,
7 * credits must appear in the documentation.
8 *
9 * date: Wed Oct 9 19:56:22 GMT 2002
10 *
11 * -- Error functions
12 *
13 */
14
15
16#include "error.h"
17
18
19const char *libws_error_table[]={
20 "Memory error",
21 "Filesystem error",
22 "Network error"
23};
24
25
26void libws_error(unsigned int code, const char *fmt, ...) {
27 va_list args;
28
29 va_start(args,fmt);
30 fprintf(stderr,"%s: ",libws_error_table[code]);
31 vfprintf(stderr,fmt,args);
32 va_end(args);
33 fflush(stderr);
34};
diff --git a/src/error.h b/src/error.h
new file mode 100644
index 00000000..facac79d
--- /dev/null
+++ b/src/error.h
@@ -0,0 +1,33 @@
1/* Copyrights 2002 Luis Figueiredo (stdio@netc.pt) All rights reserved.
2 *
3 * See the LICENSE file
4 *
5 * The origin of this software must not be misrepresented, either by
6 * explicit claim or by omission. Since few users ever read sources,
7 * credits must appear in the documentation.
8 *
9 * date: Tue 9 Sep 06:45:13 2003 GMT
10 *
11 * libwebserver error codes
12 *
13 */
14
15
16#ifndef _ERROR_H_
17#define _ERROR_H_
18
19#include <stdio.h>
20#include <stdlib.h>
21#include <stdarg.h>
22
23
24#define LE_MEMORY 0 // memory error
25#define LE_FILESYS 1 // file error
26#define LE_NET 2 // net error
27
28#define LWSERR(x) libws_error(x,"file: %s - line: %d\n",__FILE__, __LINE__);
29
30void libws_error(unsigned int, const char *,...);
31
32
33#endif
diff --git a/src/fnmatch.c b/src/fnmatch.c
new file mode 100644
index 00000000..f2b6f6d4
--- /dev/null
+++ b/src/fnmatch.c
@@ -0,0 +1,195 @@
1/*
2 * Luis Figueiredo - why remake the wheel, this functions feets perfectly
3 * and the credits still here :)
4 */
5
6/*
7 * Copyright (c) 1989, 1993, 1994
8 * The Regents of the University of California. All rights reserved.
9 *
10 * This code is derived from software contributed to Berkeley by
11 * Guido van Rossum.
12 *
13 * Redistribution and use in source and binary forms, with or without
14 * modification, are permitted provided that the following conditions
15 * are met:
16 * 1. Redistributions of source code must retain the above copyright
17 * notice, this list of conditions and the following disclaimer.
18 * 2. Redistributions in binary form must reproduce the above copyright
19 * notice, this list of conditions and the following disclaimer in the
20 * documentation and/or other materials provided with the distribution.
21 * 3. All advertising materials mentioning features or use of this software
22 * must display the following acknowledgement:
23 * This product includes software developed by the University of
24 * California, Berkeley and its contributors.
25 * 4. Neither the name of the University nor the names of its contributors
26 * may be used to endorse or promote products derived from this software
27 * without specific prior written permission.
28 *
29 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
30 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
33 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
34 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
35 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
36 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
37 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
38 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39 * SUCH DAMAGE.
40 */
41
42#if defined(LIBC_SCCS) && !defined(lint)
43static char sccsid[] = "@(#)fnmatch.c 8.2 (Berkeley) 4/16/94";
44#endif /* LIBC_SCCS and not lint */
45
46/*
47 * Function fnmatch() as specified in POSIX 1003.2-1992, section B.6.
48 * Compares a filename or pathname to a pattern.
49 */
50
51#include "fnmatch.h"
52#include <string.h>
53
54#define EOS '\0'
55
56static const char *rangematch(const char *, int, int);
57
58int fnmatch(const char *pattern, const char *string, int flags) {
59 const char *stringstart;
60 char c, test;
61
62 for (stringstart = string;;) {
63 switch (c = *pattern++) {
64 case EOS:
65 return (*string == EOS ? 0 : FNM_NOMATCH);
66 case '?':
67 if (*string == EOS) {
68 return (FNM_NOMATCH);
69 }
70 if (*string == '/' && (flags & FNM_PATHNAME)) {
71 return (FNM_NOMATCH);
72 }
73 if (*string == '.' && (flags & FNM_PERIOD) &&
74 (string == stringstart ||
75 ((flags & FNM_PATHNAME) && *(string - 1) == '/'))) {
76 return (FNM_NOMATCH);
77 }
78 ++string;
79 break;
80 case '*':
81 c = *pattern;
82 /* Collapse multiple stars. */
83 while (c == '*') {
84 c = *++pattern;
85 }
86
87 if (*string == '.' && (flags & FNM_PERIOD) &&
88 (string == stringstart ||
89 ((flags & FNM_PATHNAME) && *(string - 1) == '/'))) {
90 return (FNM_NOMATCH);
91 }
92
93 /* Optimize for pattern with * at end or before /. */
94 if (c == EOS) {
95 if (flags & FNM_PATHNAME) {
96 return (strchr(string, '/') == NULL ? 0 : FNM_NOMATCH);
97 }
98 else {
99 return (0);
100 }
101 }
102 else if (c == '/' && flags & FNM_PATHNAME) {
103 if ((string = strchr(string, '/')) == NULL) {
104 return (FNM_NOMATCH);
105 }
106 break;
107 }
108
109 /* General case, use recursion. */
110 while ((test = *string) != EOS) {
111 if (!fnmatch(pattern, string, flags & ~FNM_PERIOD)) {
112 return (0);
113 }
114 if (test == '/' && flags & FNM_PATHNAME) {
115 break;
116 }
117 ++string;
118 }
119 return (FNM_NOMATCH);
120 case '[':
121 if (*string == EOS) {
122 return (FNM_NOMATCH);
123 }
124 if (*string == '/' && flags & FNM_PATHNAME) {
125 return (FNM_NOMATCH);
126 }
127 if (*string == '.' && (flags & FNM_PERIOD) &&
128 (string == stringstart ||
129 ((flags & FNM_PATHNAME) && *(string - 1) == '/'))) {
130 return (FNM_NOMATCH);
131 }
132 if ((pattern = rangematch(pattern, *string, flags)) == NULL) {
133 return (FNM_NOMATCH);
134 }
135 ++string;
136 break;
137 case '\\':
138 if (!(flags & FNM_NOESCAPE)) {
139 if ((c = *pattern++) == EOS) {
140 c = '\\';
141 --pattern;
142 }
143 }
144 /* FALLTHROUGH */
145 default:
146 if (c != *string) {
147 return (FNM_NOMATCH);
148 }
149 string++;
150 break;
151 }
152 /* NOTREACHED */
153 }
154}
155
156static const char *rangematch(const char *pattern, int test, int flags) {
157 int negate, ok;
158 char c, c2;
159
160 /*
161 * A bracket expression starting with an unquoted circumflex
162 * character produces unspecified results (IEEE 1003.2-1992,
163 * 3.13.2). This implementation treats it like '!', for
164 * consistency with the regular expression syntax.
165 * J.T. Conklin (conklin@ngai.kaleida.com)
166 */
167 if ((negate = (*pattern == '!' || *pattern == '^'))) {
168 ++pattern;
169 }
170
171 for (ok = 0; (c = *pattern++) != ']';) {
172 if (c == '\\' && !(flags & FNM_NOESCAPE)) {
173 c = *pattern++;
174 }
175 if (c == EOS) {
176 return (NULL);
177 }
178 if (*pattern == '-' && (c2 = *(pattern + 1)) != EOS && c2 != ']') {
179 pattern += 2;
180 if (c2 == '\\' && !(flags & FNM_NOESCAPE)) {
181 c2 = *pattern++;
182 }
183 if (c2 == EOS) {
184 return (NULL);
185 }
186 if ((c <= test && test <= c2)) {
187 ok = 1;
188 }
189 }
190 else if ((c == test)) {
191 ok = 1;
192 }
193 }
194 return (ok == negate ? NULL : pattern);
195}
diff --git a/src/fnmatch.h b/src/fnmatch.h
new file mode 100644
index 00000000..1b0f3fc9
--- /dev/null
+++ b/src/fnmatch.h
@@ -0,0 +1,59 @@
1/*-
2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by the University of
16 * California, Berkeley and its contributors.
17 * 4. Neither the name of the University nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)fnmatch.h 8.1 (Berkeley) 6/2/93
34 */
35
36/* This file has been modified by the Apache Group. */
37
38#ifndef _FNMATCH_H_
39#define _FNMATCH_H_
40
41#ifdef __cplusplus
42extern "C" {
43#endif
44
45#define FNM_NOMATCH 1 /* Match failed. */
46
47#define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */
48#define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */
49#define FNM_PERIOD 0x04 /* Period must be matched by period. */
50/* This flag is an Apache addition */
51#define FNM_CASE_BLIND 0x08 /* Compare characters case-insensitively. */
52
53int fnmatch(const char *, const char *, int);
54
55#ifdef __cplusplus
56}
57#endif
58
59#endif /* !_FNMATCH_H_ */
diff --git a/src/gethandler.c b/src/gethandler.c
new file mode 100644
index 00000000..297d53a6
--- /dev/null
+++ b/src/gethandler.c
@@ -0,0 +1,96 @@
1/* Copyrights 2002 Luis Figueiredo (stdio@netc.pt) All rights reserved.
2 *
3 * See the LICENSE file
4 *
5 * The origin of this software must not be misrepresented, either by
6 * explicit claim or by omission. Since few users ever read sources,
7 * credits must appear in the documentation.
8 *
9 * date: Sat Mar 30 14:44:42 GMT 2002
10 *
11 * -- handlers functions
12 *
13 */
14
15
16
17#include "gethandler.h"
18
19
20/*********************************************************************************************************/
21/*
22 * initializate (allocate) handler list
23 */
24struct gethandler *__ILWS_init_handler_list() {
25 struct gethandler *ret;
26
27 ret=__ILWS_malloc(sizeof(struct gethandler));
28 if(ret==NULL) {
29 LWSERR(LE_MEMORY);
30 return NULL;
31 };
32 ret->next=NULL;
33 ret->hdl.func=NULL; // or path
34 ret->flag=0;
35 ret->str=NULL;
36 return ret;
37}
38
39/*********************************************************************************************************/
40/*
41 * add an handler to list
42 */
43int __ILWS_add_handler(struct gethandler *handler, const char *mstr, void (*func)(), char *path, int flag, int type) {
44 struct gethandler *temp=handler;
45 while(temp->next!=NULL)temp=temp->next;
46
47 temp->next=__ILWS_malloc(sizeof(struct gethandler));
48 if(temp->next==NULL) {
49 LWSERR(LE_MEMORY);
50 return 0;
51 };
52
53 temp->next->str=__ILWS_malloc(strlen(mstr)+1);
54 if(temp->next->str==NULL) {
55 __ILWS_free(temp->next); // free last malloced
56 LWSERR(LE_MEMORY);
57 return 0;
58 };
59 memcpy(temp->next->str,mstr,strlen(mstr));
60 temp->next->str[strlen(mstr)]='\0';
61
62 temp->next->type=type;
63 switch (temp->next->type) {
64 case 0:
65 temp->next->hdl.func=func; // for function
66 break;
67 case 1: // new on 0.5.2 // directory or cgi
68 case 2:
69 if(!(temp->next->hdl.path=strdup(path))) {
70 __ILWS_free(temp->next->str);
71 __ILWS_free(temp->next);
72 LWSERR(LE_MEMORY);
73 return 0;
74 };
75
76 break;
77 };
78
79 temp->next->flag=flag;
80 temp->next->next=NULL;
81 return 1;
82}
83
84/*********************************************************************************************************/
85/*
86 * Deletes the entire handler list
87 */
88void __ILWS_delete_handler_list(struct gethandler *handler) {
89 struct gethandler *next;
90
91 while(handler) {
92 next = handler->next;
93 __ILWS_free(handler);
94 handler = next;
95 }
96}
diff --git a/src/gethandler.h b/src/gethandler.h
new file mode 100644
index 00000000..dc0b66cb
--- /dev/null
+++ b/src/gethandler.h
@@ -0,0 +1,60 @@
1/* Copyrights 2002 Luis Figueiredo (stdio@netc.pt) All rights reserved.
2 *
3 * See the LICENSE file
4 *
5 * The origin of this software must not be misrepresented, either by
6 * explicit claim or by omission. Since few users ever read sources,
7 * credits must appear in the documentation.
8 *
9 * date: Sat Mar 30 14:44:42 GMT 2002
10 *
11 *
12 * --
13 *
14 */
15
16
17#ifndef _GETHANDLER_H_
18#define _GETHANDLER_H_
19
20#ifdef HAVE_CONFIG_H
21#include "config.h"
22#endif
23#include <stdio.h>
24
25
26#include "memory.h"
27#include "error.h"
28
29
30#define MATCHMAX 200
31
32//#define WS_LOCAL 0x1
33#define WS_DYNVAR 0x8
34#define WS_USELEN 0x10
35
36
37/*********************
38 * get handler types *
39 *********************/
40#define GH_FUNCTION 0 // new on 0.5.2
41#define GH_DIRECTORY 1 // new on 0.5.2
42#define GH_CGI 2 // new on 0.5.2 (just the flag)
43
44
45struct gethandler {
46 char *str;
47 int type; // new on 0.5.2 types
48 union hdl_u{ // changed on 0.5.3 named union (Hilobok Andrew (han@km.if.ua) said that wasn't compiling on FreeBSD)
49 void (*func)(); // it is a function
50 char *path; // it is a path (dir or cgi)
51 }hdl;
52 int flag;
53 struct gethandler *next;
54};
55
56struct gethandler *__ILWS_init_handler_list();
57int __ILWS_add_handler(struct gethandler *,const char *,void (*func)(),char *, int,int);
58void __ILWS_delete_handler_list(struct gethandler *);
59
60#endif
diff --git a/src/logo.h b/src/logo.h
new file mode 100644
index 00000000..3fa5e31c
--- /dev/null
+++ b/src/logo.h
@@ -0,0 +1,396 @@
1/*
2 * by data2header by Luis Figueiredo (stdio@netc.pt)
3 */
4#ifndef __LOGO_H_
5#define __LOGO_H_
6
7char _logo[]="\x47\x49\x46\x38\x39\x61\x5\x1\x45\x0\xE7\x0\x0\x2\x2\x2\xFE\xFE\xFD\xF0\xF2\xF5\xE8\xED\xF0"
8"\xDC\xE8\xEE\xBD\xC1\xC6\x68\x71\x7C\x60\x16\x7\x7A\x1C\xA\xA9\xC8\xDD\x9E\xC3\xDA\x94\xBD\xD8\x8C\xBB"
9"\xD6\x86\xB6\xD6\x15\x26\x3F\x1B\x2C\x49\x1F\x32\x4D\x24\x38\x54\x30\x4A\x66\x4E\x5C\x68\x6E\x7E\x85\xAB"
10"\xAE\xB2\xF6\xF6\xF7\xD6\xE1\xE8\xC8\xDA\xE6\xC5\xC7\xC0\xB0\xBC\xC6\x97\xAA\xB5\x8E\x96\x9B\x5F\x60\x62"
11"\x39\x45\x48\x1F\x26\x23\x7\xA\xD\x4A\x10\x6\x34\xB\x3\x3D\xE\x6\x70\x1C\xB\x9F\x24\xE\xE7\x5C"
12"\x45\x3B\x5C\x78\xD3\xD4\xD4\x7C\x89\x90\xF\x12\x10\x54\x13\x6\xCA\x36\x1C\xB0\xD1\xE5\x5D\x94\xB3\x3D"
13"\x62\x7F\x1F\x22\x19\xD6\x4C\x35\x70\xB0\xD0\xA\x22\x43\x2C\x44\x60\x2E\x2F\x1F\xE9\x69\x4F\xBB\xD4\xE6"
14"\x80\xCA\xEB\x7D\xC6\xE8\x79\xC0\xE1\x73\xB8\xDA\x69\xAA\xCA\x66\xA4\xC6\x58\x9B\xC4\x4D\x8D\xB5\x51\x82"
15"\xA1\x4A\x76\x94\x33\x4E\x68\x28\x3E\x5A\x4D\x4D\x4F\x78\x80\x87\x3D\x3E\x3D\xF\x16\x1B\x8C\x20\xC\xFC"
16"\x7F\x64\x83\xD0\xF1\x41\x68\x85\x2A\x38\x3E\x3F\x45\x2F\x13\x1A\x23\x35\x54\x71\x62\x9C\xBD\x12\x1E\x2B"
17"\x49\x72\x8F\x4E\x7C\x9B\xD0\x41\x27\x58\x88\xA6\x28\x68\x93\x38\x53\x5E\x17\x22\x26\xDA\x56\x3B\x5B\x8E"
18"\xAB\xF6\x72\x5C\x6F\x6F\x42\xFC\xFC\xD1\xFD\xFE\xC6\x66\x4A\xC\x99\xEE\xFE\x45\x6E\x8C\xE0\xE1\x8C\xEE"
19"\xE9\x8B\x21\x6\x2\xA3\xFC\xFE\xC8\xFE\xFD\xFD\xFE\xDF\xFA\xFB\xB8\xFD\xFC\xA4\x86\xA6\x7A\xB0\xA8\x2E"
20"\xF4\xF0\x88\x9A\xA4\x72\x58\x3B\x1E\x18\x16\x2\xB3\xB0\x5D\xD0\xCF\x64\xFD\xFD\x71\xFE\xFD\x89\xFE\xFC"
21"\x5C\xFE\xFD\x49\xFE\xFD\x20\x70\x6B\x15\x3C\x39\x13\x89\x81\x1E\x4B\x4A\x2B\xB9\x2B\x10\xBC\xC0\x7E\x28"
22"\x26\xB\x9C\x98\x40\xF2\xEC\x69\xC7\xB8\x3E\x90\x8C\x3F\x7B\x7B\x32\x31\x2F\xB\x1A\x6\x2\x1C\x1A\x7"
23"\x7D\x98\x9F\xEC\xE2\x6A\x1F\x2E\x35\x90\xDD\xF9\x46\x56\x60\x88\xDF\xFE\x61\x5A\x13\x7C\x7E\x3E\x50\x49"
24"\xF\xFE\xFB\x32\xCC\xC5\x49\x7E\x71\x2E\xBC\xB5\x2C\x9A\x91\x17\xD2\xC5\x21\x97\xA8\x84\xFD\xEE\x1D\x6E"
25"\x7E\x4A\xDF\xD6\x3D\xF3\xE7\x41\x71\x6E\x2C\xB4\xD4\xAE\xFE\xD0\x5E\x82\x5C\x28\x20\x1E\x5\x51\x54\x2A"
26"\xD0\x98\x34\xFB\xF0\x4B\xD5\xA7\x2F\xFA\xC6\x5E\xB9\x9A\x1F\xFE\xBD\x3F\xFE\xD9\x37\x92\x91\x78\xF6\xAA"
27"\x3D\x8E\x5A\x1D\x38\x82\xB0\x5A\x6B\x69\xB5\x5E\x23\x42\x26\x1A\x51\x55\x44\xCE\xB7\x21\x25\x22\x7\xE5"
28"\xD9\x18\x7C\x32\x19\xAA\x5B\x2A\x8A\x38\x1C\x9E\x4A\x20\xA8\x3E\x26\xB6\x72\x26\xDC\x91\x26\xAE\x5A\x22"
29"\xCE\xC3\x67\xB7\x80\x28\x98\x6E\x22\x68\x30\x17\x56\x2A\xE\x4E\x26\xE\x96\x56\x1C\xAE\x70\x20\x2B\xB"
30"\x3\x36\x39\x2B\x16\x22\x3D\x17\x22\x2A\x9\xE\x11\x7E\xB0\xCF\x7A\xAF\xD1\x71\xA9\xCA\x31\x7B\xAB\x2E"
31"\x75\xA6\x1A\x48\x68\xD\x2E\x47\x42\x89\xB6\x84\xAF\xCA\x80\xB7\xD6\x73\x98\xB0\x4E\x98\xC5\x86\xA7\xAE"
32"\x63\x7E\x8C\x50\x6A\x7B\x65\x86\x7E\x75\x8B\x9A\xAA\xAA\x78\xCD\xD3\xC8\x5D\xB0\xE4\x8A\xA2\x66\xFE\xFE"
33"\xE6\xD9\xFE\xEF\xEA\xEA\xA8\xD8\xE2\xA4\x8A\xAA\x62\xD5\xD4\x87\x82\x80\x50\xCC\xC5\x84\x6C\x6F\x5E\xDC"
34"\xDB\x9F\x5B\x5B\x34\x28\x74\xA4\x23\x6E\xA0\x1B\x68\x9B\x19\x60\x8F\xF\x5F\x94\x1B\x54\x79\x22\x5F\x87"
35"\x9C\xD4\xF3\xC2\xE8\xF4\xC4\xF6\xFE\xA8\xE2\xFE\xA8\xE6\xF8\x54\xA8\xDD\xE2\xFC\xFE\x5E\x5E\x4B\xDE\xDD"
36"\xB6\xB8\xBF\xA8\xBB\xBF\x95\xFE\x42\x1E\xD9\xDA\xC0\x13\x39\x53\x34\x8C\xC5\xFE\xAE\x9A\xFF\xFF\xFF\xFF"
37"\xFF\xFF\x21\xFE\x12\x62\x79\x20\x4C\x75\x69\x73\x20\x46\x69\x67\x75\x65\x69\x72\x65\x64\x6F\x0\x21\xF9"
38"\x4\x1\xA\x0\xFF\x0\x2C\x0\x0\x0\x0\x5\x1\x45\x0\x0\x8\xFE\x0\xFF\x9\x1C\xF8\xF\x0\x80"
39"\x0\x6\x1\x8\x48\x38\x20\x21\x81\x84\x5\x12\x1A\x48\x78\x20\x21\x82\x84\x9\x12\x2A\xD0\x98\x70\x41"
40"\x42\x6\x9\x1B\x24\x3C\x96\x10\x59\x42\x19\x9\x93\x25\xEC\xB1\x32\xA1\x8B\x84\x53\x12\x3E\x49\x58\x2C"
41"\x61\x88\x84\x24\x12\xDA\x48\xA8\x8C\xA7\x4F\x83\x3D\xD\x2E\x4B\x38\x54\x28\xD1\x84\xE7\x90\x2A\x35\x98"
42"\xD4\x20\xBA\x84\x4F\x9D\x26\x4C\x37\x35\xA1\xBA\x84\xCC\x12\xEE\x4B\x38\x23\xA1\x57\x11\x38\x75\x26\x5C"
43"\x37\xB6\xAC\x41\xB2\x67\xCD\x2\x40\xBB\x36\x21\xC1\xB7\x70\x5\x3A\x78\x0\x21\x82\x84\x9\x14\x2A\x4"
44"\xB0\x20\xA0\xEF\x80\xBF\x4\x8\x5C\xC0\x90\x41\xC3\x6\xE\x14\x3A\x78\xF8\x0\x22\x84\x88\x11\x24\x4A"
45"\x98\x30\x91\xA0\xB2\x82\x4\xA\x32\x6B\x5E\xA0\x60\x81\xE7\x5\xC\x42\x33\x68\x40\x9A\xC1\xB1\xD3\xA7"
46"\x91\x21\x3B\x86\x2C\x99\xEB\xD7\xC9\x7A\xC8\x9E\xD\x5\x8A\xF\x17\x3F\x7E\x4C\x59\xB6\xE4\xC5\x13\x66"
47"\x11\x9A\x45\x1\x71\x60\xC5\x88\xC7\x2B\x10\xEC\x89\x91\x24\x8B\xB2\xE7\xD0\xA3\x3F\x5F\xA6\x6C\x99\x75"
48"\xEA\xD7\xAB\x5F\xB7\x7E\x6E\xD9\xB9\xEF\xE0\xC1\xFE\xA3\x3B\x37\x1E\x9D\xF9\xF3\xE4\xCF\xAB\x4F\x87\x8E"
49"\x7D\xBA\xF7\xEF\xD5\xC9\x5F\xC7\xAE\x3E\xB3\xFB\xFB\xF6\x35\x6B\x36\x63\xC6\x11\x63\x6\xAD\x10\xC2\x71"
50"\x8F\x85\x40\x2\x12\x7B\x50\x61\xC3\x16\x59\xB0\xB0\xCE\x83\x10\x46\x28\xE1\x84\x12\xB2\x33\x61\x5C\x70"
51"\x19\x74\x42\x42\xE\x24\xE4\x41\x42\x8\x19\xB4\x90\x41\x28\x24\x94\x42\x42\x2A\x24\xB4\x42\x42\x2C\x24"
52"\xD4\x2\x47\x6\x6D\x64\x90\x47\x33\x76\x14\xD2\x48\x25\xE5\x68\x90\x4A\x6\xB1\x64\x90\x16\x9\x2D\x91"
53"\x10\x4\x2A\xDA\x94\x90\x9\x9\xA9\xF2\x13\x0\x41\x31\xB9\x64\x93\x45\x1\x10\x65\x53\x0\x50\x69\xE5"
54"\x52\x0\x44\x55\x25\x96\x54\x19\xD4\x8E\x5A\x59\x19\xD4\x4C\x42\x0\x1A\x74\x93\x99\x9\xED\x91\x50\x16"
55"\x56\xA9\xC5\xD6\x9B\x6E\xAA\x85\xA1\x40\x2E\x25\xF4\x2\x87\x9\x49\x90\x90\x5\x9\x5D\x90\x10\x7\x9"
56"\xC1\x60\xA4\x41\x31\xB8\x68\xA8\x41\x19\xC5\x8\x23\x0\x34\x2\x0\x92\x41\x22\x19\x44\x92\x41\x26\xED"
57"\xD8\x92\x41\x2F\x19\x14\x44\x42\x34\x78\x95\x10\x58\x84\x26\xE4\x4C\x92\x4F\x96\xA\xD4\x51\x46\x31\x85"
58"\xE5\x95\xAA\x4A\xE5\x6A\x96\xFE\x55\x19\xC4\xE\x56\x9\x8D\x69\xD0\x11\x45\x1A\x4\x2A\x0\x48\x24\xB4"
59"\x45\xAC\x0\x5C\x95\xD6\xB0\x6D\x11\xB\xE7\x59\x73\x9E\x54\xA7\x41\x77\x1A\xD4\x95\x41\x9D\x1A\xD4\x90"
60"\x41\x15\x24\x54\xC3\xA7\x62\x19\x74\xC3\xA1\x0\x24\xDA\xED\xA2\x8D\x36\xFA\x28\x0\x91\x2\x30\x29\x0"
61"\x95\x2\xC0\x23\x0\x50\xC0\x94\x67\x42\x20\x60\x6B\x90\x9A\x6\xFD\x20\x2A\xA9\xA7\xE6\xEB\xA4\xBE\x51"
62"\xF6\xBB\xEA\xBF\xAF\x6A\xA9\x65\x97\xC1\xD2\x6A\xD0\x56\xCE\x52\x24\x2F\x0\x39\x19\xB4\x93\xB1\x71\x42"
63"\x2C\xF1\x5A\x18\xE2\x90\xC3\xC5\x3A\xE8\xB0\xC3\xE\x32\xF0\xD0\xC3\x6D\x3F\x0\x11\xC4\xB\x42\xF4\x37"
64"\xC3\x5C\x11\xC\x41\xC4\x4\x6\x54\xC0\x41\x11\x1D\x18\x71\xC4\x1\xC7\x85\x80\x4\xB\x49\xB0\x70\xC1"
65"\xCE\x18\xF4\x7C\xC3\xCF\x2D\x4\x9D\x40\xB\x95\x61\x86\x99\x66\x9D\x75\xF6\x19\x68\xA2\x91\xD6\x0\x3"
66"\xCF\x40\x83\x1A\x6B\xAC\xB9\x16\xD\x14\x2E\x54\x1\xC4\x14\x61\xF8\x46\x3\x13\xE\xE0\x2A\xA0\x8\x22"
67"\x18\x58\x2\xB\x5B\x98\xC0\x42\x6E\xB9\x39\xE3\xB6\xDB\xAA\x38\xA3\x8A\x2A\xD2\xD5\x4D\xDD\x74\xD6\x69"
68"\xB7\xDD\xFE\x75\xDD\x85\x27\x9E\xDF\xE9\xA5\xA7\x1E\x3A\x56\x58\xF1\x5E\x3B\xF2\xD5\xC7\xE\x7E\xFA\xF1"
69"\xE7\x1F\x80\xC5\xD\x48\xF6\x8\x2B\x1C\xB8\xDC\x82\xD\xA6\xB3\x8E\x3A\x9A\x6F\xDE\xF9\xE6\x14\x86\x7E"
70"\x21\x5C\x4A\x24\x84\x43\x42\x3A\x28\x6B\x90\xF\x41\x72\x95\x10\x13\x9\x35\xB1\xF0\xC3\x0\x3C\x64\x90"
71"\x9F\x6\x61\xC0\xED\x8B\x88\x2E\x2A\x23\xA3\x36\x42\x8A\xA3\xA5\x6\x55\x61\x27\x4D\x9\x8D\x60\xD1\x9A"
72"\x9\x49\x93\x90\xBD\x6\x8D\x6A\x90\x92\xFA\x36\x69\xFD\x92\xFE\xB6\xBA\xA5\xF6\xAC\xC2\x6A\x10\xC1\xC2"
73"\x2\x10\x26\x0\xB6\x2\x50\x26\x0\x67\xA2\x9F\x26\xF3\xDF\x3\x1B\xFE\xB1\xC5\xC6\x4F\x56\x86\xA5\x1B"
74"\x54\x3F\x0\xA7\x1B\x94\xBA\x41\x28\xAD\xDE\xBA\x41\x4E\x48\x8\xAE\xC\xA2\xBC\x50\x49\xCB\x21\x7D\x4A"
75"\x88\xEE\xC\xC2\xBB\x6F\xF5\x4E\x51\x10\x4\x9E\x41\xC6\x35\xAE\x73\x45\xE3\x7F\x0\x40\xC4\xA0\x18\x96"
76"\x2D\x0\x64\xA\x0\xD0\x3\xE1\xBD\xA2\x87\xAF\x7D\x99\xF0\x7A\xA9\x92\x12\xC0\xB6\xC7\x42\x2D\x59\xA1"
77"\x4D\x6\x19\x5F\xF9\x6\x8\x80\x15\xE9\x2A\x21\xBD\x32\xC8\xAF\xDA\x67\x90\xF0\x11\xC\x7C\xFE\x11\x2B"
78"\xD6\x5B\x0\x90\x83\x84\xDC\xEF\x7E\xF9\x3\xC0\xFE\x0\xD0\x3F\xF\xCA\x4\x5E\x1B\x6C\x91\x88\x18\x92"
79"\xC0\xDC\x25\x64\x5B\xC\xC4\x88\x16\x23\x18\xAE\x8F\x24\xE4\x19\x9\x69\x97\x41\xA4\x90\x90\x8\xE4\xAA"
80"\x86\xBE\x4A\x8\xEB\xFC\x57\xAF\xE7\x8D\x10\x0\xD4\x3B\xA1\xA9\x54\x98\xC2\x29\xAD\x90\x4A\x2F\xF4\x52"
81"\x42\x66\x75\x30\xD7\x19\xA4\x22\x37\x34\xC8\x45\x1C\x6\x2C\x82\xC1\xEF\x90\x72\x1A\x48\xC6\x32\x76\x31"
82"\x1C\x38\x12\x7\x4A\x88\xA4\x24\x1F\x99\x83\x45\x6E\x4C\x6\x3D\x80\x42\xC8\x96\x70\x2\x1A\x40\x60\x38"
83"\xE8\x7B\xCC\x1\x24\x63\x82\xBC\x58\x80\x2F\x7E\x1\x4C\x60\x4\xB3\xB3\xC1\xF4\xC\x3\x40\xBB\x81\xD0"
84"\x8A\x66\x19\xA4\x25\x6D\x69\xC\x58\xC0\xD3\x9E\xF1\x8C\x64\x4C\x23\x1A\x2E\xA0\x6\x35\xAA\x71\x2\x21"
85"\xD0\x0\x11\xC3\x39\x80\x63\x44\x89\x20\x13\x6C\x81\xA\xB3\xF1\xC1\xC7\x7C\x40\x4D\x1F\x48\x43\x1A\x3F"
86"\xC0\x26\xDB\xDE\x6\x37\xB8\xD1\xAD\x6E\xE0\xCC\xCE\xDE\xC6\x9\x38\xF2\xFC\xAD\x70\xE9\xB0\x82\x3A\xDA"
87"\xA1\xB8\xFB\x30\xA3\x71\xFD\xF9\xF\x0\x22\x47\x36\xE4\x44\xE6\x72\x5B\xFE\x88\xC1\x1E\xE0\xC3\xCF\x74"
88"\x70\x8E\x73\x9A\x8B\x8F\xE7\x20\xA4\x8E\x9\x19\x64\x20\x4A\x44\x5D\x42\x8A\x68\x3F\x23\x9A\x6E\xA1\x61"
89"\x7C\xD7\x1F\x71\x98\x90\x21\x24\x64\x3\x7B\xA2\xA2\x41\x6C\x7\x0\xDC\x1\x60\x81\x0\x68\x60\x3\xBD"
90"\xF5\xBB\xDF\x35\x6A\x1A\x9\xB1\x46\x42\x84\xE0\xA9\x40\x2\x80\xA\x97\x2\x80\x8F\xD8\xA5\xC6\xE6\xB9"
91"\x91\x84\x38\x95\x63\xF5\xB0\x87\x2A\x16\x76\x2F\x8F\x0\xE0\xA3\xF8\x6A\x45\xA6\xD\xA6\x8F\x5E\x0\x28"
92"\x14\xF\x1\xF0\xC3\x42\xBA\xCF\x53\x74\xDA\x81\x42\xF5\x7\xD1\x86\x5A\x15\x7F\x9\xE1\xC1\xF1\x26\x2A"
93"\x48\x3F\x2\xC0\x8C\x6\xC1\xA8\x41\xF8\x74\xC0\x8D\x56\xF1\xA3\xBB\xDB\x22\x0\x4A\xFA\xC5\x84\x5C\x23"
94"\x21\x8A\x40\xD1\xC2\x90\xBA\xAE\x99\xCE\x74\x8D\x0\xC0\xAB\xF3\xDA\x98\x53\xE9\xE9\xF4\xAF\x28\xA4\xA3"
95"\x4F\x13\x2\xD4\x2F\xC5\x90\xA8\xB7\x3A\xE3\xAE\x4A\x90\xC6\xA5\x36\x75\xA9\xE1\xF3\x21\x54\xB\xD2\xC4"
96"\x26\x4A\x95\xAA\x6\x61\x28\x56\xAF\x7A\x59\x0\x90\xB1\xA5\x80\xF4\xAC\x57\xC1\xA\x0\x40\x4D\xB1\xAC"
97"\xB5\x3B\x2B\x48\x47\xAA\xD6\xDF\x95\xEB\x82\x6\x99\xFE\x40\x42\x2\xE8\x52\xC6\x1A\x44\x8A\xEA\x8A\xE9"
98"\x4C\xC5\x8\x80\xBD\x8A\x90\xAF\x0\xF0\x6B\x1C\x3\x1B\xD8\xEC\x9\x96\x4A\x5A\x32\x6C\x50\xB5\xE2\xD5"
99"\xD0\xEE\x6A\x90\x0\xD8\x21\x53\x9D\xEA\x58\x18\xC6\xCF\x2D\x3D\xE0\x81\x76\x65\xC0\x5D\x19\x6C\xEC\xBB"
100"\x1A\x5B\x24\x23\x2D\xF6\x48\x25\x58\x4C\x7\x98\x74\xC1\x14\x96\x20\x4\x8\xCC\xAC\x66\x8\xC0\x19\x15"
101"\xB2\x6\x4\x29\x58\xA1\x64\xFD\x41\x19\xD\xAE\x60\x0\xE\x9C\x12\x95\x7F\x51\x25\x2B\x79\xF6\xCA\x9F"
102"\x1\x8D\x68\xB4\xB4\xCC\x2\x34\x0\xB5\x69\x18\x22\x1A\xD6\x18\xE6\x4\x3C\xC0\x4\x44\xA4\xC8\x38\x5"
103"\x42\x40\x9\x98\x93\x5\xD5\xB4\x6\x36\x3D\x88\xCD\x6C\x68\x53\x9B\x6A\xDE\xE6\x9A\xDA\xDC\x26\x37\xBD"
104"\xF9\x4D\x70\x56\x7\x3A\x77\x13\xE7\x76\xBE\xB3\xC\xC2\x11\xAE\x1D\x38\xB6\xF\x7E\xF6\x13\x4F\xC8\x85"
105"\x60\x99\x65\x4B\x4E\x9\xF0\xA9\xCF\x7E\x1A\xF9\xC8\xEF\x59\x87\x3F\xE3\xE3\x95\x82\xCC\x54\xAB\xFC\x4B"
106"\x48\x67\x97\xB8\x44\xCD\x2E\xD1\x78\x6\xC1\xC2\x6\xD9\x64\x10\xDE\x6E\x2A\x61\x6\x21\x6D\xA\xE2\xA5"
107"\x90\x84\x8C\x28\xB5\xB7\x53\xE0\xFE\x15\x5B\x9B\x10\x94\x1A\x84\x1A\xAF\xDB\x60\x68\xA5\x7B\xAE\x74\xD5"
108"\x55\xB7\x35\x35\x88\x6F\x43\xE8\x57\xBF\x12\x77\x8E\xC6\x4D\xAE\xC1\xC8\x57\x54\x34\x19\x1A\x0\x48\x55"
109"\xAA\xF7\xA6\x5B\xDD\x46\x37\x59\xA6\x31\x85\x32\x13\xA5\x3C\xD5\x84\x62\x16\x0\x40\x32\x88\x45\x9\xD8"
110"\x58\x22\x56\xFA\xCB\x0\x78\xD6\x57\x4D\x64\x66\x8D\xA2\xB9\xA3\x6A\xD6\x96\x5A\xC5\xA\x0\xA\x24\xE4"
111"\xA\xA\xB\x50\xA7\xA1\x31\x3C\x74\xA5\x4\xCF\x3D\xCA\x73\x6F\x6F\x1A\xDC\x37\xFE\x79\xA7\x29\x14\xF4"
112"\x61\xC5\x24\x40\xC5\x26\xC4\xB6\xD1\x5\xD6\xC0\xA8\xCB\xE8\x47\x7F\x90\xB7\x4F\x56\x1D\x0\x3A\x4B\xED"
113"\x84\x64\x1A\x0\x12\xE0\x42\x17\xBC\xF0\x85\x4E\x83\x21\x21\xDF\xCE\xB5\x41\x62\x2\x66\x0\x10\xC9\x20"
114"\x45\x28\x35\x6A\x39\xEA\xD1\xD5\x6\xF\x0\x6F\x35\x48\x35\x62\xD\x80\x2\x2\x80\xCB\xE4\xAA\xB5\x9D"
115"\x6F\x2D\x6E\x48\x77\x59\xD7\x21\xE4\x73\x9\x7F\x6D\x42\x3B\x1A\x4\xA8\x42\x45\x58\xA8\xE9\xFD\xDC\x4E"
116"\x2F\xDB\xD1\x8F\xF5\x94\x16\x5C\x40\x71\x17\x60\xAD\x36\x50\xE8\xC1\xE\x1A\xE9\x48\x49\x46\x12\xBD\xDE"
117"\xFD\x2E\x77\xFE\x33\xE9\x2\x20\x74\x4D\x8\x62\xF0\xC2\x18\xB8\x40\x86\x15\x90\x32\x92\x65\x30\xC3\x19"
118"\xBC\x80\x86\x34\xA8\x1\xA\xDC\xF5\x58\xF\x28\xBE\xB5\x30\xFC\xC6\x64\xCD\x88\x80\x5D\x26\x50\x84\xA"
119"\xFC\x37\x95\x3\x58\xE5\x80\x5D\x9\x4B\xA2\x69\x60\x1\x1B\x70\xF0\x35\xAE\x81\x8D\x33\x58\xDD\xB\x83"
120"\xF8\x31\xD9\x42\x30\x4A\x16\xD8\xC0\x6\x2C\x0\xCD\xD3\x46\xD3\x80\x63\x48\xD\x35\x1E\xFE\xB0\x6B\x42"
121"\x3C\x62\xD9\x64\xBC\xC4\xD4\x84\x2\x8A\x53\xDC\xB6\x1F\xAC\x78\x6E\xCA\x68\xB1\x8B\xF1\x66\x1D\xF3\x14"
122"\xE\xC7\xEC\x74\x67\x7E\x1C\x27\x4F\x65\x2\x99\xEB\x1A\xDE\x43\x16\xB6\x60\x83\x18\xA8\x87\x3C\xEC\x39"
123"\x7\x7C\xDA\xE3\x1E\x23\xB7\x14\xCB\x4E\xFC\xF7\x55\x8F\x28\xED\x26\x7E\x50\x8\x6B\x60\x43\x1B\xDC\x90"
124"\x10\x98\xDA\xEF\xD\x70\x10\x43\x1A\xE2\xF0\x81\x49\x1B\xA4\xB3\x33\x25\xF7\xC2\xC3\x9C\x10\x57\x9F\x16"
125"\x0\xD3\x3A\xB5\x47\x33\xF0\x27\x83\xA0\x5E\xF5\x71\xB8\x96\x4B\x91\x2A\x2E\x2F\x4A\xAA\xD6\xE7\x5A\x97"
126"\xA4\x77\xAB\xEB\x3D\xBF\xD1\xCF\x80\x86\x4A\x42\x94\x2B\x43\x28\x1E\xFA\xA8\x9\x51\xB4\xC0\xA4\xFE\xFF"
127"\x2A\x82\x79\xA\xF3\xD7\xCE\x94\x1C\xE6\x20\x87\xF2\xD3\xA1\xE\x76\x48\xFF\x1D\xC\x22\x69\xCF\xE7\x9"
128"\xF\x79\xD0\xC3\x1B\xD6\x77\xE9\x34\xF0\xA1\xF\xD3\x7E\xE8\xEB\x63\xA\x4\xAF\x3E\xA0\xF6\x19\xB5\x6E"
129"\xA9\x6\x0\xD5\x62\x10\x44\x0\x0\x73\xC0\x7\xC2\x57\x6F\x14\x65\x10\xA6\x27\x41\x8E\x62\x7C\x0\x40"
130"\x6B\xC7\x47\x29\xFC\x6\x0\xCB\x17\x53\x7A\xC5\x6B\x7D\x36\x70\x3C\xA5\x47\xB2\xC2\x5C\x89\x25\x6B\xB5"
131"\xD5\x41\x5A\x82\x5C\xCA\xD6\x52\xE3\x96\x10\x98\x87\x65\x70\xE0\x7\x6B\xF0\x7\x74\x0\x8\x81\x90\x7"
132"\x82\x70\x7\x83\xD0\x6F\x33\xF5\x79\x9\x41\x8\xC7\x56\x69\xAB\x57\x8\xF9\x67\x10\x49\xA4\x59\xB0\xE7"
133"\x2E\xE5\xF6\x7F\x6\x31\x11\x63\x5\x22\x67\xA5\x1\x0\x38\x7\xBA\x80\x7F\x9C\xD6\x55\x6\x81\x24\x11"
134"\xE4\xE\xE0\xA2\x6F\x55\x35\x81\xB8\x46\x53\x6C\x94\x57\x36\xD5\x57\xD1\x77\x70\x7B\x34\x68\xA2\x66\x43"
135"\x0\xD0\x70\x3A\xB4\x24\xDB\xD7\x7D\x2A\x38\x5\x72\x38\x87\x40\x50\x87\x5A\x23\x5\x12\x0\x1\x42\x60"
136"\x8\x87\x20\x8\x58\x10\x5\x51\x80\x5\x88\xF0\x4\x55\x80\x71\x24\x56\x1B\xFE\x25\x27\x5\x57\x0\x1"
137"\x2A\x20\x39\x36\x23\x5F\x19\x93\x8\x89\xB0\x7A\x8A\x0\x4\x8B\x50\x6\x98\x58\x6\x60\x90\x8\x91\x84"
138"\x3\x8B\x0\x6\xA0\x8\x6\x8B\xB0\x8\x4A\xB0\x3\x1E\x83\x35\x2E\xE0\x3\x5A\xA0\xC\x2F\xC0\x1F\xE"
139"\xD0\xC\xF\x10\x1\x34\x70\x2\x45\xA0\x1\x1\x70\x8B\xB8\x18\x0\x3\x80\x1\xD9\x50\x0\x1A\xE0\x32"
140"\x1C\x90\x2\x72\x0\x9\x78\xE0\x4\x2A\x40\x2\xCA\x34\x2\x5C\x87\x20\x8B\x17\x3\x97\xA1\x0\x2D\xF0"
141"\xE\xF0\xD0\xD\xF0\x50\x8D\xF1\x10\xF\xF2\xF0\xE\xF1\xC0\x34\x64\xD7\x0\xD0\xC0\x0\xEE\x80\x8D\xD7"
142"\x98\x8\xEE\x80\x3\x1A\xF3\x61\xB3\xB1\x71\xE7\xA5\x3\x3C\x0\x5\xDA\xB0\x71\x17\xB3\x3\xDA\x80\x4D"
143"\x3E\x30\xF\xF3\xA0\xD\xF6\x38\xF\xD8\xE4\xC\xFC\x30\x77\xD7\xC4\xF\x74\x53\x63\x85\x53\x38\x37\xD6"
144"\xE\xF7\xC1\x63\x47\x10\x2F\x86\x37\x2\xCA\x78\x0\x1A\x76\x36\x36\x90\x4\x49\x60\x3\xFC\x0\x90\xDF"
145"\x61\x1E\x82\x23\x38\xE5\xA1\x25\x9\x1\x6A\xB2\xD7\x7F\x6\x21\x24\x8C\x20\x7\x82\xB0\x55\x60\x78\x92"
146"\x4D\x24\x7B\x5E\xD1\x30\x43\x88\x80\x71\x90\x83\x65\x90\xFE\x10\x31\x79\x55\x33\x9\x0\x35\xB9\x44\x8B"
147"\x90\x10\xDA\xE0\x55\x16\x5\xB\x77\xC0\x7\x77\xC0\x8\x9E\x10\x22\x0\x90\xD\x9\x51\x2D\x74\x0\x9"
148"\x7A\xB0\x3C\x24\x8\x0\xB4\x13\xF\x9\x41\xF\x5C\x40\xE\x77\x80\x6\x9\xD1\xD\xEF\xA6\x85\x6\x61"
149"\x6\x77\xD0\x95\xF0\x0\xB\x16\x48\x3C\x0\x90\x93\xFB\x67\x10\x8B\xD0\x4\x9A\x50\xF\x5A\x9\x0\xF7"
150"\xD3\x59\x7E\xB5\x93\x6\x31\xF\x3D\xA5\x24\x3E\x9\xE\x41\x9\xB\xE5\x43\x66\xF3\x44\x6F\xF9\x60\x80"
151"\xFD\x60\x0\x1F\xD2\x3D\x6F\xD8\x52\x9F\x5\x0\x1E\x69\x6D\x0\x30\x92\x8D\xC0\x82\xCB\x92\x79\x4C\xE4"
152"\x8\xE9\xF7\x8\x75\x30\x99\x39\xD8\x94\x48\x35\x7\x7F\xB0\x94\x67\x30\x7E\x69\x30\x7\x90\xC0\x8\x0"
153"\x90\x8\x6\x1\x99\x93\x39\x7E\x73\x20\x3B\x4B\x64\x6\xE4\x37\x99\x76\x60\x9\x7D\x0\x6A\xDB\x50\x7"
154"\x74\x70\x7E\x93\x59\x7\xA1\x80\x7\x69\x66\x10\x11\x61\x7\x99\x50\x92\x93\x10\xA\xA6\x9\x9\xA9\xC0"
155"\x3E\x0\x40\xF\x0\xE0\x8\x73\xB0\x9A\x73\xC0\xD\x69\x10\xA\x75\x90\x6\xB8\x9\x81\x66\x0\x0\x77"
156"\x50\x7\x68\x10\x0\x69\x80\x7E\x69\xFE\x50\xE\xC3\x50\x67\x6\x61\xF\xB9\xB8\x9\x6\xA1\x9\x68\x20"
157"\x7\x76\x50\x7\x72\xE0\x7\x6\x1\x6\x5E\x90\x6\x72\x40\x7\x76\x40\x7\x9A\x10\x6\x6\x91\x8B\xB7"
158"\x78\x1\xD7\xD2\x24\xEE\x70\x6\x1\xC0\xD\xED\x39\x7\x75\x90\x9\xD1\x49\x43\x7\x80\x9\x5E\x80\x8B"
159"\xA7\x0\x0\x2C\x40\x1\xF6\xC9\x1\xCA\x25\x98\x2A\x8\x0\xF4\x39\x46\x1D\xC9\x98\x8C\x30\x7\x91\xC0"
160"\x98\xC5\xD3\x98\x5A\x30\x8\x92\x30\x9\x93\x40\x9\x76\x40\x9\x95\xA9\x3E\xE\x98\x10\xE5\x77\x7\xE5"
161"\xC7\x7\x7E\xE0\x7\x80\xC0\x6\x9E\xC9\x50\x78\x90\x9\xE9\x47\x9\x7E\xA0\x9\xF8\xB7\x44\xB\xA0\xB"
162"\xBA\x40\x7\xA1\xB0\x6\x77\xF0\x6\x58\x16\xB\x72\x90\x9\x7E\xF0\x9\x4D\x80\x7\x8C\x0\x8\xCE\x59"
163"\x92\x71\x65\x10\x46\x99\x7E\x6B\x60\x9\x8F\x0\x8\x20\xA\x8\x74\x30\x8C\xF3\x87\x5B\x1\xD0\x4\xED"
164"\xE9\x7\x7A\x80\x7\x4D\x90\x7\x90\x90\x6\x69\x0\x8\x54\xF8\x3B\x66\x30\x6\x5E\xC0\x6\x93\xF0\x9"
165"\x62\xCA\x5\x80\x60\x9\x73\xC0\x7B\x15\x58\x0\x15\x90\x1\xDC\x10\x0\xBA\x23\x6\xFE\x19\x7\x7C\x10"
166"\x7\x94\xB0\x6\xFE\x39\x38\xD\xE5\xE0\xD\x6D\xBA\x6\x82\x30\x8\x61\x32\xE\xF6\xC0\xD\xDC\x50\x0"
167"\xA7\x40\xE\x29\x22\x3D\x3\x10\x0\x2\xC0\x1\xE6\x40\x4\x4D\x50\xF\x7C\xD0\x99\x25\x19\x5\x14\x1"
168"\x8\x6B\xF0\xA\x72\x90\x6\x6D\x0\x0\xDE\x70\x8B\x28\x50\x0\x28\x80\x2\x15\xF0\xA4\x83\xA5\x3D\x5E"
169"\xB1\x4\x61\x60\xAB\x61\x90\xAB\x61\x20\x5\xBC\xCA\xAB\x53\xA0\x5\x95\x30\x7\x82\xF0\x0\x27\x20\x87"
170"\x75\x8\x4\x55\x90\xAC\xC9\xAA\x5\xC9\x1A\x4\x27\xE0\x5E\xE\xC0\x4\x96\x20\x9\xD7\xE2\x18\x23\x30"
171"\x4A\x93\xC1\x3\x19\xF3\x9E\x7C\x30\x9\x7A\xF0\x1\x51\x0\x1\x57\x70\x9\x98\x40\x7\x87\x90\x5D\x1F"
172"\x3\x9\x99\xA0\x9\x4D\x20\xAE\x3C\x80\x89\xA4\xE8\x3\x41\xA0\x5\x9\x0\x9\x9F\x80\x8\x42\x80\x3"
173"\x60\x0\xA0\x4A\x9\x88\x58\x80\x5\xD1\xEA\x7\x1\xEA\xA\xC4\x40\x17\x43\xA0\x8\xAB\x80\x7E\x1F\xEA"
174"\x8\xB4\xE5\x9\x5F\x10\x7\x74\x80\x9\x7\x42\x5\x8C\x17\x0\x5E\xE0\x5\xE2\x50\x3\x35\xC0\x4\xC3"
175"\x20\x4\x97\xB0\x6\x71\x10\x8\x13\xB0\xA\xCF\x0\x8D\xD3\x78\x8B\xE1\x40\x4\x1F\x0\x3\x4C\xC0\xFE"
176"\x4\x34\x50\xD\x70\x40\x7\x96\xB0\xD\xD1\x60\x76\xC7\x10\xD\x2F\xE0\x1\x52\x80\x1\xDC\x80\x1\x3"
177"\x20\x0\xA7\x40\x4\x1A\xDB\x4\x70\x8A\x8\x27\xD0\x1B\xD6\x20\x6\xE1\x70\x5\xE\x30\x88\x40\xA0\xA"
178"\x61\x60\xD\x1B\x30\xE\xF5\x50\xC\xE1\xFA\x2\xF7\x78\x8B\xD9\x40\x4\x4E\x60\xC\x47\xE0\x4\xE1\xDA"
179"\x6\x69\x80\x6\x9F\x30\x3\x51\x20\x4F\xC2\x40\x6\x64\xB0\x6\x75\x40\xA\xAF\xC0\x6\xA7\xE0\x6\xB0"
180"\xD0\xA\x6E\x40\x4\x46\xE0\x0\xCC\x60\x5\xE5\x64\x4E\xE3\xD1\x52\x42\x62\x10\x13\x2A\xA1\xEE\x72\xA1"
181"\x19\xBA\x82\x86\xB\x0\x98\x7\x92\x0\xB0\x21\x8F\x40\x9\x54\xB8\x86\x9D\x46\x7\xEB\x3A\x8\x1D\x12"
182"\x92\x0\x80\x7\x6C\x10\xA\x85\xAB\x3\x77\x10\xA\x7E\x0\x6B\x5B\xA9\x9\x42\xB8\x3F\x7C\x0\x9\xC2"
183"\x57\x6\x90\xF9\x8\x25\x89\x29\x30\x71\x8\x75\x0\x8\x9B\x6\x0\x1D\x12\xA0\x77\x0\x96\x0\x40\x43"
184"\x5F\x90\x9\xBD\x19\x5A\x26\x20\x7\x7F\xD0\x7\x4C\x8\x0\x50\xA8\x2\x6B\x10\x9\x9E\x90\x45\xC7\xB9"
185"\x6D\x1D\x0\x0\xF3\x66\x10\x6E\xE6\xD\x68\x0\x8\xB8\xF2\x5A\x0\x70\xF\x1\xFE\x70\xF\xA7\xE0\xA"
186"\x20\x50\xB9\xA3\xB6\xA1\x0\x0\x9\x87\xC0\x5\xC0\xA5\xD\xA1\x0\x7\xB0\xA0\x84\x0\xA0\xD\x44\x70"
187"\x8B\xC1\x4B\x7D\x3\x70\x6\xF8\xA0\x41\x6\xA1\x97\xBA\x70\x6\x34\xF8\x9\x64\xA6\x86\x6A\x68\x70\x82"
188"\xE5\x29\x7F\xB\x0\xFF\x1B\xB8\x31\xC1\x8\x6C\x50\xB8\x86\xA9\xA1\x0\xA0\xB8\x8A\x4B\x46\xAF\xFB\xB8"
189"\xBB\x22\x5D\x76\x10\x7\x8E\x80\x6D\x11\x5\x0\x70\x10\xA\x92\x0\x20\x3A\x30\x8\x75\x40\x9\xAB\x90"
190"\x10\xE4\x17\x7\x9E\x6\x0\xDC\x0\x7\x65\x52\x6\x22\x1A\xB\x2A\xB5\x9E\x9\xB1\x8\x8C\x90\x94\x1F"
191"\xC\x2D\x0\xD0\xC1\x13\x3C\x82\xF5\x36\xA5\x92\xF0\xB\xBE\xE2\xBB\x8E\x80\x45\x7\xE1\x7B\x5C\x40\x66"
192"\xBC\x13\x7\x76\x80\x9\x60\xE9\xC3\xD3\x99\x98\x72\x30\xE\xB2\xE3\x66\x0\xA0\x85\xF8\xC0\xD\xE4\x20"
193"\x7C\xCD\xB\x0\xB2\xD7\x3F\x8C\x10\xA\x80\x20\x28\x33\x25\xF\x75\x90\x7\x14\xFC\x7A\xD9\x10\x0\xF6"
194"\xF0\xBF\x21\x14\x6\x1D\x10\x0\x19\x20\x5B\x36\xFC\xA\x73\xC0\x5\xAD\xE0\x15\xD0\x95\xB\x3D\x65\x5C"
195"\x9E\xD2\x2C\x0\x80\xC7\xFF\x4B\x46\x8C\xF0\x7\x6\x5C\x98\xFE\x1F\x24\x7B\xB2\x47\x46\x33\xB8\x80\xBB"
196"\x82\x6F\x8D\x9B\x83\x81\xEB\x23\x78\x10\xB1\xB8\x29\x55\x87\x90\x9\x97\x90\x10\x92\x49\x8C\xA9\xC3\x5"
197"\xDC\x90\xA0\x6\x51\x6\x72\xD0\xC1\xA\xC0\x8\x5D\xD9\xD\x5D\x79\x7\xDD\xA0\x9\x72\x20\x9\xE2\x6B"
198"\x10\xFD\x97\x94\xD1\x9\x0\x7A\x19\x2\x83\x30\xA2\xDD\x66\x10\x49\xF0\x9B\x74\x30\x7\x79\x0\xCA\xDC"
199"\xB0\x7E\x4\xB8\x66\x8\x18\x0\x12\xCC\x8\x5D\xD0\x95\x1D\x70\x6\x9A\xA0\x9\x2A\x2A\x9\x13\xC\x5B"
200"\x4F\xC\x0\xF8\x60\x1\xF5\x70\x81\xDE\x69\x10\x45\xFA\x9\x98\x96\x10\xDC\xC0\x6\xD6\xFC\xBF\x3B\xD0"
201"\x5\x1\x80\x2\xD3\x50\xF\x1D\x40\xE\xEE\x40\xE\xE4\x60\x0\xE5\x7C\xBD\xD1\x6C\x10\xA2\x6A\x10\xA3"
202"\xC0\x6\x13\xEC\x83\x6\x91\x43\x0\x90\x4\x75\xDC\x53\x5E\x71\x2\xFA\xAC\xCF\x2F\xD0\xCF\x2F\xD0\x1B"
203"\x4B\xB0\x4\xBC\xDA\x6\x87\x10\x9\xE\x20\x4\xBA\x1A\x6\x40\xE0\x2\x9B\xF0\x7\x29\xF0\x2\x52\x10"
204"\x4\x12\xCD\xAB\x2\xBD\x4\x33\xD8\x7\x2A\x40\x1C\x8E\xF1\x88\x49\x10\x3\x3C\x30\xA2\x4D\x20\x1\x40"
205"\x50\x1B\x6E\xC7\x3\x32\x20\xB9\x5C\x70\xFE\x2\x1A\xB7\x9\x9E\x5B\x5\x60\xD0\xD\x35\x5A\x9\x39\x50"
206"\x6\x5D\x90\x6\xAE\x40\x3\x2E\x30\x8A\x73\x40\x7\x94\x80\x9\xE9\x77\x9E\x59\x5A\x7E\x72\xA0\xB\x82"
207"\x10\xD2\x55\x90\x5D\x50\x30\x8C\x35\x80\x5\x10\xF0\x0\x4E\x40\x66\xC5\xC1\x9B\x5F\x20\x2\xF1\x95\x5"
208"\xAC\xF0\xA\xB1\x20\x9B\x41\x6D\x9A\xDF\xA0\x1\x9\x30\x18\xF4\x40\xF\xE6\x9\x9\xE5\xE0\x9E\x76\x70"
209"\xAA\x17\xDB\x9E\xE3\x20\x8\x7A\xA0\x8\x86\xC0\x19\xB\x10\x34\x73\x80\x6\x37\x4D\xD\xD3\xD0\x8D\x65"
210"\x37\x35\x52\x83\xF\x73\x0\x7\xD5\xA0\x5\x3A\x90\x8\xF2\xE0\x5\xD8\x80\x8\x43\x0\x4\xB2\xB1\x31"
211"\x73\x90\x6\x8E\xBA\xA7\xF6\xC9\xAA\x6\x60\x4\x51\xF0\x0\xFB\xE0\x0\xFE\x1\x2\xF8\x80\x6\x6E\x40"
212"\x8\x64\x80\x1C\x7\x80\x4\x67\x63\x2\x49\x60\x2\x54\xA0\x37\x7A\x73\x1D\x2D\xB5\x21\x1A\x62\x92\xF4"
213"\xF9\x5\x9C\xD0\x9\x9\x11\xB8\x55\x0\x8\x72\xC0\x8\xD1\x72\xC0\x14\x3A\x83\xAD\x77\x68\x48\x35\xA2"
214"\xC7\xAB\xB8\xBC\x55\x7\x98\x30\xC1\xC6\x83\x7\xC2\x3D\x7F\x98\x50\x7\x77\x10\xB\x94\x50\x44\x72\xC0"
215"\x7\xC3\xD0\xC2\x69\xFE\x30\x6\x77\xF0\x9\x83\x80\x7\x83\xD0\x4\xD7\x2D\xA6\x83\x50\x3\x7D\x20\xBF"
216"\x9\x25\x7\x71\xF0\x21\xB4\xE7\x15\x8F\x10\xB\x35\x9C\x54\x0\xF0\x6\x9F\x10\x9\x79\x10\x8\x93\xE0"
217"\x7\x92\x10\x7\xA1\xF0\x7\xBC\x8C\x3B\x98\x79\x7\x78\x80\x7\x7A\x30\xC\xD8\x1D\xA6\xC3\x50\x3\x4D"
218"\xC0\x18\x0\xC0\x6A\x50\x29\x9\x96\x60\xE\xEF\x36\x2E\x14\x8\x0\xCF\x90\x6\x62\xA0\x7\x70\x6\x0"
219"\x6C\xAB\xE0\x8E\xB9\x3\x1\xAA\x9\x44\x80\x7\xC3\x30\xC\x46\x10\xE0\x1E\x5E\x3\xC3\xF0\x1\xB4\x65"
220"\x6E\x10\xC1\xD\x46\x0\xB9\x87\x86\x5B\xF\x18\x58\x9E\xA2\xDA\x8B\x9B\x10\x30\x4E\x9F\x9F\xF0\xDA\x18"
221"\x34\x5\xA0\xC0\x9\x8E\x70\x6E\xA2\x45\xA1\xA1\x20\xA\xB\xA8\x86\xC8\x36\xA2\xF8\x27\x7B\x62\x4\xB"
222"\x75\x20\x9\xB8\x9\x92\x93\x69\xCD\x75\x10\xB\x0\x40\x9\x96\x80\x3\x9E\x50\x7\x81\x0\x3B\xF6\xE3"
223"\xD\xDA\x4C\x5A\x58\xE\x0\xB1\xFB\xBF\xA5\x33\x7\x98\x20\xAB\xA0\xEB\xCA\x55\xAE\xE4\x9\xD1\x97\x0"
224"\xA4\x2\x6F\xF0\x6\x4D\xF0\x6\x78\xE0\x7\x99\x20\x9\x29\x62\x3B\x87\x70\x8\x4B\x9\x0\x29\x6E\x10"
225"\xFE\xD1\x6D\x10\xB2\xFA\x3B\xBA\x83\xF\x6C\x60\xE1\x6B\xF5\x6E\xE5\xF2\xC\x6D\x80\x6\x6D\x80\x65\x73"
226"\x0\x8\x42\x68\x6B\xAF\x17\xC9\x3B\x9E\x10\xE8\xCB\xBD\x3C\x1E\xBB\x19\xD0\xA5\xC\x58\x85\x88\x76\x24"
227"\x1F\xD8\x52\x33\x61\x10\xA1\x1E\xE3\x96\xFB\x5\xA3\x0\xDB\xCC\x2\x13\xA4\x50\xA\x78\x0\xDE\x81\x4B"
228"\x9F\x7F\x20\xA\xBB\xBD\x97\x56\x38\xC3\xA6\xB0\x7E\xA0\x26\x46\x93\x60\x7\x81\x90\x22\xE4\xB6\x6\x76"
229"\xA0\xE4\xA1\xB0\x98\x77\xF0\x8\xDF\x10\x9\xB1\xF0\x9\x5D\xAE\x3\x6D\x20\x0\xD8\x80\xC7\xD7\x46\x65"
230"\x9\x21\x9A\x9D\x19\x8\x32\x4E\x13\x81\x40\x7\x81\x30\x7F\xB7\xF5\x8\x93\x0\x0\xC8\xD6\xCE\x6F\xF0"
231"\x8\x6B\x80\x7F\xFA\x60\x10\x7E\x10\xA\xA9\x5A\xE0\xBD\x67\x10\xC6\x89\xBC\x0\xF0\xE\x0\x40\xDB\xEB"
232"\x5C\xE8\x35\x72\xEF\xE\xDE\xA\x68\x10\xE\x28\xE5\x7\x69\xB0\xBA\x90\x3E\x6D\x6D\x20\x7A\x65\x5E\x98"
233"\x8A\x8B\xC7\x7A\x62\x10\x99\x9E\xE2\xE9\xC3\x86\xF5\x3C\x47\x5E\x21\x4\x42\xF0\x4\x13\xFF\x4\x16\x7F"
234"\xF1\xFF\xBC\xAB\xA7\x80\xA\xA9\x40\xAC\x11\xED\xAB\xAA\x80\xA\xA8\xE0\x6\xF\xF0\xFE\x4\x2\x3D\x87"
235"\x53\x50\x5F\x99\x0\xA\x78\xE0\x0\xE\x10\x40\x2B\x20\x4A\x7B\xB0\x5\x5B\x10\xA0\xA2\xB0\xA\x41\x60"
236"\x71\x3D\xE0\x5D\x4A\x60\x7\xB1\xC0\x8\xF\x70\x5\x55\x40\x71\xE0\xF0\x8\x8F\xC0\x7\x6B\xA0\x7\x27"
237"\xA0\x6\x76\xF0\x7\x98\x30\x9\x46\xDD\x5D\xCF\x80\x6\x62\x60\x8\x3D\x10\x49\x8B\x90\x8\x97\x88\x89"
238"\x66\xD0\xD\x39\xB0\x3\x3A\xF0\x89\x60\xD0\x99\x7C\x60\xD\xC8\x6A\x72\x24\x73\x5\xD5\xCC\xD9\x90\x91"
239"\x4\x3E\x7A\xB\x31\xC0\xC\xFD\xD1\xC\x10\x30\x4\x34\x60\x7\x50\xDF\x1\x28\x60\x1\x3\x60\xF\x99"
240"\x80\x9\xD8\x30\xC6\x8F\x8D\x8B\xD9\xA0\x1\x37\xF0\xE\x4\x0\xF\xF4\xD0\xD\x73\x10\xA\x5C\x60\x0"
241"\x9\xF0\xE\x92\xDF\x2\x9B\xA1\x34\xA0\xA1\x4B\x4\xC0\xD\xDF\x20\xF\xDC\x10\xE\x4C\x60\x4\x55\x30"
242"\x35\xAD\xB1\x1\x54\x6F\x8\x2E\x0\xD\x3B\x80\xFA\x60\x5F\x49\x39\x90\x0\x40\xE0\xCF\x2F\x70\x2\xBF"
243"\xB1\xF7\xDA\x3B\x4F\x2\x72\x1C\xCA\x78\x20\x25\x40\x5\xA2\xAD\x36\xE0\xD4\x52\x9\xF\x0\xA3\x3E\xEA"
244"\x9B\xE2\x6\x49\xC0\xA\x48\x88\xB8\xA0\x80\xA\xAD\xC0\xBD\x1F\xFE\xD4\x7F\x99\x80\xA\xAE\x60\x7D\xB4"
245"\x6E\xEB\xAF\x20\xA\xD7\xB6\x3\xB0\x10\xB\x76\x90\x7\xDC\x7E\x6D\x46\x2F\x9\x9A\x80\xE5\x8F\x30\xA2"
246"\x77\x60\xC\x65\xCE\x12\xD8\x80\x6\xDE\x30\xFD\x0\x10\x6E\x0\x0\xD3\x76\xF0\x8\xEA\xB9\xC9\x0\xD0"
247"\x9E\xE1\xA0\xB\xC7\x2B\x46\x7D\xC0\x6\x72\xD0\xEB\x0\x41\x6\xC0\xC0\x60\x75\xEA\x40\x4A\x32\x10\xC0"
248"\x94\x81\xB1\xEC\x44\x2\x1\xC0\x88\x42\x4C\x7F\x32\x39\xA\xA0\x30\xA3\xA3\x47\x76\xE8\x70\x1\x70\x43"
249"\x23\x80\x38\x73\xB6\x29\xEC\xA6\x30\x81\x42\x5\xA\x17\x0\xD0\xD3\x85\x5B\x3D\x34\xE2\x10\x29\x6C\xA0"
250"\x30\x19\x80\x35\x6C\xD8\xB8\x1A\xE8\x4E\xE1\x3B\x39\x5E\xD2\x9C\x52\x8\x44\xE1\x80\x0\xE4\x0\x18\x53"
251"\x18\x22\xAA\x42\x2A\xA\x59\x28\x54\xA6\x50\x2B\x0\x9\xA\xBB\xE\x7C\x32\x50\xD6\x2C\x5A\xB5\xA8\xD8"
252"\x92\x55\xAB\xD6\xAD\x59\x6D\x71\x6D\xC9\xD5\xEA\xE6\x40\x5D\xB8\xEC\x8E\x42\x65\xAA\x14\x28\xBE\xA0\x44"
253"\xED\x7A\x3\xE0\x0\x0\x52\xA8\x32\x89\xE2\xF5\xCA\x94\x28\x46\x8C\xE\x59\x32\x95\x67\x90\xC2\x2A\xA"
254"\x21\xC5\x92\xC4\x68\xAE\xA4\x4C\x7E\x1C\x1\xFE\x78\xA1\xB0\x7\x80\x37\xD8\xC4\x74\xF1\x26\xCE\x8C\xA6"
255"\x40\x74\xE8\xD8\x59\xC3\x88\x89\xC2\x33\x62\xD2\x84\x6B\x63\x7B\xDC\x26\x4D\x70\xD2\xCC\xF1\xD3\x7\x80"
256"\x30\x85\xBC\x5C\x87\xA2\x13\x2B\xF\xA3\x77\x81\x3A\x92\xF2\x34\x70\x86\x42\xF\xA4\x30\xD5\x91\xB3\xFC"
257"\xCE\x99\x50\x72\xE8\xC4\x56\x1\xE0\x2\x80\x3E\xB1\xD2\x60\x9A\x33\x27\x9C\x24\x48\x25\x21\x89\x3\xD0"
258"\x72\xE0\xCA\x81\xF2\xC3\x75\xF9\xC6\xE1\x83\x7\x85\xC\x70\x2\x50\x61\x8D\x43\xE6\x18\x23\x5\x33\xC8"
259"\x9\xC4\x20\xD8\x34\xD3\xC9\x1E\x7D\xEC\x9\x20\x80\xC\x34\xB0\x27\x1B\x14\x32\x40\x6A\x20\xA9\x6\xDA"
260"\x43\x21\x13\x14\x52\x65\x2B\x85\x68\xF0\xAA\x44\x0\x7A\x71\xA3\x17\x5F\x7E\xF9\xC5\x97\x5E\x64\x81\x31"
261"\xC6\x5E\x56\x50\xE1\x3\x85\x58\x61\x25\x97\x5C\xDA\x2\xA6\x96\x54\x82\xB9\x65\x97\x5D\x6E\xF9\x2\x80"
262"\x11\xBE\x28\xE5\xAF\x2F\x3C\xF1\x65\x17\x51\x4C\xE1\xA4\x94\x5D\x1C\x51\xE1\x88\xA4\x14\xDA\xE6\x95\x49"
263"\x6\x99\x8B\x11\x4A\xF2\x10\x2E\x8\x85\xA0\x18\x48\x5\x72\xB0\x29\xA7\x8B\x2E\xBC\x98\x23\x8E\x40\x3E"
264"\x29\x4\x80\x21\x6\x62\xFE\x44\xE\x31\xE0\xE0\x62\x98\x26\xE0\xB0\x2D\xD\x36\xB0\x31\x27\x3C\x0\x36"
265"\x4\xC0\xD\x5D\x26\x69\x64\x8D\x38\xE8\xA8\xE3\x11\x4B\x0\x11\xA4\x6\x85\x42\x1B\xC8\x9\x63\x1C\x21"
266"\x85\x12\x4B\x1E\xA9\x23\x13\x48\x2\x71\x64\x98\xA5\x0\x0\xC4\xB\x31\x28\x91\xC4\xF\x3F\xE0\x88\x3"
267"\x12\x48\x0\xC9\x3\x80\x69\x54\xA2\x15\x0\x57\xF0\x69\xC3\x15\x10\x14\x71\xE9\xBF\xA7\x4\xF1\x3\x13"
268"\x3A\xD2\xF0\x2\x8D\x70\xDE\xF4\x4\x84\xB9\x0\xF8\x6\x8D\x6F\xB2\xC1\xF5\x94\x7B\xB2\xA1\x16\x9F\xC"
269"\x1\x10\x41\x21\x24\x14\x4A\x68\x20\x67\x44\x4\x80\x6\x71\xC7\x1D\x57\x2\x9\x68\x80\x0\x86\x23\xD6"
270"\x3D\xA2\xCA\x76\xDF\x3D\xE2\xD\x27\x9C\x78\x40\x82\x13\x84\x30\xE2\x3\x27\xDE\x88\x37\xDE\x37\xFE\x15"
271"\x46\x5\x15\xC8\x20\x78\x84\x15\x5B\x19\x21\xA\x44\x86\xC1\xA3\xE1\x3E\xA\x39\x2\xB\x1A\x5E\x98\xA2"
272"\x62\x8B\x97\xC8\xC3\x11\x2C\x86\x90\x2\x8\x29\x4\xD1\x98\x86\x29\x5C\x20\x19\xA\x17\xB4\xA8\xE6\x4"
273"\x9\x5C\x71\x85\x88\x26\x8C\x40\xE4\x3\x2C\x98\xB8\x22\x8\x28\x7A\xD0\x62\x95\x26\x10\xA9\x1\x91\x21"
274"\x3C\xFE\xB8\xC2\xE5\x1A\x9C\x10\xD8\x9\x2B\x57\x8\x41\x4\x11\x18\x19\x44\x98\x56\x7C\x71\xC4\x8D\x26"
275"\xF0\x60\x2\xB\x44\xAE\xA8\xC2\x7\x17\x7E\x0\x22\x8C\x13\xF6\x31\xC6\x9\x3C\xA6\xC6\x63\x10\x4F\xDE"
276"\x80\x81\x8\x3\x2A\x40\x61\x80\xB\x2A\x21\x47\xF\x23\x86\xA1\xBB\x6E\x3D\x87\x71\x65\x83\x1B\xF6\x6E"
277"\xA1\x85\x4\xFE\x56\xA0\x81\x14\x8A\x70\xA5\xF\x26\x28\x60\x60\x1\x5\x16\x60\x9C\xF1\x6\xA6\xB1\xA6"
278"\x1A\x45\x3E\xF9\x44\x8F\x97\x63\xB6\x5A\x82\x6A\x80\xA8\x62\x8A\x17\xF4\xA8\x1\x6\xD1\x61\x28\xA4\xF4"
279"\x7D\x7\x16\x61\x4\xA5\x47\x8\x81\x4\x4\xF6\xA0\xC2\x84\x2D\x4C\x60\xE1\x7\x67\xBE\xDD\x6A\xCE\x81"
280"\x48\xDC\x5D\x21\x62\x14\x2A\xC6\x77\x85\x1C\x50\x48\x77\x39\x87\x57\xC8\x9\x85\x22\x1A\x28\xDB\x81\x7A"
281"\x19\x51\x21\x2C\x14\x5A\x42\x21\x86\x6\xAA\x7E\xA0\x2B\x8A\xA7\x4C\x21\x17\xAC\x57\x68\x59\xDE\x1\x18"
282"\x6D\x20\x29\x14\xA\x6B\xA0\x65\x21\x50\x8\xAA\x81\x88\x1B\x68\xB0\x81\x8C\xBF\x1E\x0\x19\xBC\x57\x88"
283"\xFD\x81\x98\x7\x40\x7F\x0\x50\x50\x88\x53\x6\xD2\x1\x85\x10\x70\x20\x5\x50\x8\x6\xFE\x14\xD2\x2"
284"\x85\x18\x40\x21\x1B\x60\x49\x4\x7\x12\xD\x85\xCC\x66\x20\x42\x50\x8\x5\x7\x52\xD\xE4\xD\xC4\x4A"
285"\xFB\x53\xC8\x8\x14\xB2\x2\xAA\x58\x5\x5C\xC7\xEB\x5D\xA\x51\x8\x80\x8\x70\x4F\x85\x18\x4\x4B\xF4"
286"\xE6\xA7\x90\x28\x84\x50\x21\xB6\x98\x14\xFA\x14\x72\x3E\xF3\x29\x24\xC\x3B\xA4\x5E\xF7\x6\xF2\xBD\x21"
287"\x2\x71\x20\x95\x19\x48\xF9\x0\x40\xA6\x22\xE\xE4\x87\x3\x39\x1\xD\x15\xE2\x3C\x0\x6C\x6B\x20\x56"
288"\x4\x80\xE\x14\xA2\xC5\x81\xDC\x6F\x20\xF5\x83\x21\x0\xA6\x33\xC3\x81\x40\x70\x20\x19\x50\x8\x2\x7"
289"\x42\x0\x85\x8C\x67\x20\xA\x1C\xC8\x4B\x6\xC2\xC0\xF9\x48\x10\x0\x72\x4\xC0\x35\x14\x62\x8\x9D\x8"
290"\x11\x34\x2E\x4\xC0\x7\x7\x35\x15\xE\x79\xE8\x84\x2D\x1C\x8\x22\x57\x38\x3E\x46\x9A\x8\x0\x61\x4C"
291"\x1F\x0\x22\x39\x3E\xE2\x69\xC8\x84\xD8\xB\xA2\x13\x7D\x68\x44\x0\x88\xE9\x8B\x57\x3A\xA2\x42\xB4\x80"
292"\xBF\x81\x30\x71\x89\xA2\x41\xE5\x40\x46\x89\xC9\x81\x54\xD2\x48\xA\x41\x80\x42\xB2\xA0\x10\x25\x28\x4"
293"\x7\x5B\x54\x88\x17\x1\x40\x44\x0\x64\x4F\x8C\x80\xD4\x80\x42\x4\xFE\x30\xAA\x81\xB8\x51\x3C\xA\x11"
294"\xC9\x1C\x6B\x5\x0\xFA\xC4\xA7\x57\x71\x54\xC8\x33\x32\xA8\x10\x6A\x28\x64\x7B\x3\xB1\xD1\x40\x48\xD8"
295"\x3C\x6D\x29\x64\xB\xE0\x82\x40\x4\xC2\x19\x1\x72\x92\x73\x8\x11\x18\x42\x3A\xD3\x49\x2E\x1A\x9C\x4B"
296"\x5C\xE6\x32\x97\x10\x24\x20\x4\x7A\xD2\xF3\x9\x4F\xA0\xA7\xB9\xCE\x9\x1\x7\x58\x6A\x50\xA9\x3B\x40"
297"\x9\x4C\x60\x82\x17\x14\xF4\x5\x4B\x40\x68\x42\x11\x1A\x6\x86\x32\x54\xA\xF\x95\x42\x10\x22\x1A\x4"
298"\x8A\x5A\xAC\x62\x40\xC0\x28\xE7\xAA\xB0\xD1\x2A\x68\xC1\xA3\x24\x3\x29\x14\x44\x2A\xD2\x1E\xDC\x6C\xA4"
299"\x24\xEB\x5C\x10\x96\x70\x82\x2B\xC\x1\x11\x35\x3C\x40\xD2\x44\x10\x82\x3\x20\x81\x5\x26\xB0\x1\x15"
300"\x70\xB0\x53\x25\xF4\xB4\xA7\x38\x50\xC2\x4E\x73\x90\x3\x1D\xE8\x60\x7\x47\x95\x41\x49\xB5\x6\x84\x29"
301"\x78\x6D\x8\x33\x80\xEA\x3\x20\x30\x4\x9\x4C\x80\x2\x15\xB0\x80\x5\x4\xB0\xD5\x1\x74\x95\x0\x5F"
302"\x25\xC0\x5\xC4\x7A\x1\xC\x94\x15\x3\x7C\xBB\x41\xDF\xFE\xB6\xD6\x4\x28\xC0\xAD\x6F\x5D\x1C\xE3\x18"
303"\xC0\x80\x67\x3C\x63\x1A\xD3\x88\x46\x34\xAE\x51\xFE\x5\x6A\x48\xA1\x1A\x2F\x50\x84\x4\x86\x0\x1\x7D"
304"\x81\xE0\x0\x48\x53\x5D\xEA\x56\x40\x2\x24\xC0\xCE\x6\x5B\x98\xE5\x56\xFC\xA7\x48\x45\x1A\xCF\x78\x8D"
305"\x1C\xC8\x57\x1E\xA9\xC3\xCC\x86\x4F\x21\xF2\xAB\x62\xE\x7\x42\xA9\x5E\x66\x12\x0\x4F\x4\x0\xF\x3B"
306"\x9\xBE\x4F\x86\xD2\xB5\x0\x58\xE5\x2E\xC7\x34\x5B\x55\x6E\x32\x91\x23\xC4\xED\x40\xBE\x39\x90\x1C\xD0"
307"\xD2\xB7\x3\xB9\xE5\x40\xB8\x68\x3F\x85\xF8\x80\x93\x63\x5C\xA1\x19\x1\x60\x1\x62\x2\x80\x8D\xC5\x4C"
308"\xE0\x2\xA5\x5B\xC7\xFA\x3C\x13\x0\xC8\x50\x88\x1E\x37\x28\x43\x0\xF0\x4F\x84\xDA\x54\x48\xC\x4E\xF8"
309"\x80\xFC\x29\x84\xB2\xE6\x5\x24\x66\xB9\xE2\xC8\xF1\x91\x37\x7E\xB0\x54\x48\x14\x47\x6B\x5A\x5F\xFA\x12"
310"\xB5\xA8\x55\x6D\xFD\xEA\x87\x44\x0\xF0\x37\xB6\xBC\xE4\x65\x6C\x55\x6B\x3C\xD0\x12\xEA\x43\xC2\x55\x48"
311"\x6F\x7\x52\xCB\x5\xFF\x16\x0\xA\x26\x6E\x29\x8F\x8B\xDE\x32\x2A\x84\xB9\x3\x19\x80\x42\x9E\x7B\xCC"
312"\x37\x4E\x17\x0\x74\x64\xA6\x1D\x73\x32\x41\x6A\x52\x27\x79\x84\x1C\x64\x21\xC1\xE5\x5E\x0\xB0\xD8\x7F"
313"\x93\xA5\xF0\x22\xB9\xAB\x5E\xFE\x16\x6B\x5\xB4\xF2\x5\x0\x8E\x71\x4C\xDA\xFA\xDA\xF6\xB4\x9C\xF4\xE4"
314"\x42\x40\xD9\x5F\x51\x92\x92\xC8\x3D\x54\xA1\x56\xA8\x58\x95\x81\xEC\x0\x97\xBC\xB5\xA5\x83\x83\x9B\xC5"
315"\x5C\xD2\x36\xB5\xA\x41\xAE\x22\x39\x20\xCC\xE6\x6E\xD8\x98\x70\xFC\xF0\x32\xE5\x73\x47\x85\xCC\x6A\x20"
316"\xD5\x84\xA2\x42\xB2\x9\x80\x6D\x62\xAB\x9B\x22\x72\x40\x9C\x1D\xF0\x0\x3A\xD7\xB9\xCE\x10\xC0\xB3\x38"
317"\xF5\x5C\x4E\x3E\xAB\x73\x9D\xEC\x1C\xD7\x3E\x11\xE1\x80\x28\x84\xE7\x0\xAA\xB\x81\x4D\x93\xC0\x82\x7B"
318"\x3E\xE1\x4\x8E\x3E\x41\xA4\x23\xFD\x82\x13\x18\xB4\xA0\xA\xC5\x74\x43\xC3\x0\x51\x88\x52\xD4\xD3\x16"
319"\x9D\x42\x46\x39\xDA\x51\x8F\x72\x94\xA9\x53\x90\xC2\x12\x28\x2D\x4\x97\x16\x3A\xA6\xAA\x1B\xC1\xA\x5E"
320"\x17\x83\x24\x64\xE1\xA8\x47\x35\x6A\x51\x75\x9D\x3\x1C\xF0\x9A\xA7\x3E\x5\x76\xAF\x87\x5A\x54\xA4\xF2"
321"\xA0\xA4\x2E\xA8\x82\xC7\xAC\x20\x4\xA8\xCE\x60\xCE\x11\xA0\xC1\x15\xC\xC0\x81\xAC\x6A\x55\x0\x5D\xF5"
322"\xEA\x57\xC7\x4A\x56\xB3\xEE\x8D\x6F\x7E\xF3\x9B\x5B\x35\xB0\x0\x6\x6C\xC0\xAE\x86\xC8\x2B\x35\xA8\xB1"
323"\xA\xC9\xFE\x9\xC1\x3\x4C\x28\xEC\x61\x43\x90\xD8\x10\xC8\xBA\xB1\x70\xEE\x60\x8B\x15\xC2\x62\x16\x9F"
324"\xF7\xB6\x64\xC\x17\x20\x97\xE5\x5D\x43\xA6\xD9\xE0\x39\x16\xED\x1F\x59\x59\xDA\x85\xAB\x36\xC8\x41\xAE"
325"\x9F\x52\x5E\xCB\xDF\x20\x5F\x33\x90\x53\x54\x48\x9\x2E\x9\x0\x27\x23\xD8\xE3\xF\x8E\x72\x83\x81\xFB"
326"\x64\x8E\x5B\x39\xC8\x59\x56\x48\xA\x98\x37\xCC\x81\xB0\xDC\xB9\x6D\x8C\xEE\x40\x92\x19\xE2\x81\x8C\x18"
327"\x0\x7C\x1C\x88\x3\x55\x48\xF0\xF7\x82\xEB\x77\x3\xF9\xB9\xBE\x7\xE2\xE2\x7D\xC7\xD8\xDF\x2B\x34\x9E"
328"\xFF\xDC\xE7\x66\xDD\x72\x56\x92\xF1\x85\xFA\xC1\x7B\xAC\x49\xAA\xFF\x78\x20\xF\x67\x2D\x0\x24\xAE\x75"
329"\x4E\x46\x32\x78\x96\x1C\x48\x2C\x7\x72\xE0\x8\x97\xFC\xE3\xC3\x9D\x32\x83\x1\xA0\x76\xB5\x43\xB8\xE3"
330"\xE4\x53\xC8\xC9\x63\x9C\x2\x2E\x63\x58\xC3\x30\xEF\xB0\x32\x7\x12\xCC\x81\x98\x19\x0\x68\x6\x0\x11"
331"\x4E\xC\xF6\x14\x8B\x28\xE8\x87\xCF\x37\xBF\x8B\x3E\x10\x18\xFF\x9B\x85\x8B\x7\x10\xC6\x9B\x7E\x41\xA7"
332"\x47\x32\x92\x3A\x4E\xF8\xD4\x19\x6E\xF5\x2B\x5F\x3D\xEB\xF5\x53\x6D\x24\x5D\x49\x28\xD0\xEE\xFE\x16\x0"
333"\x3C\xA8\x72\x93\x15\xF2\xF6\xE1\x42\x38\xED\x21\xA7\xB2\xEA\x25\xDC\xDA\x5F\x32\x5E\x21\x45\xA8\x3B\x0"
334"\x32\xBC\x46\xBC\x87\x64\x99\x7E\xD7\x2E\x0\x78\x85\xCD\xDC\x32\x7D\x2B\x51\x20\x46\xF2\x95\xBF\x7C\xE6"
335"\xCB\x79\xCE\x76\x86\x0\x9D\xF1\x9C\xE7\xE9\xF3\x99\xCF\x10\x40\xC4\x3\x88\x51\xE8\x88\x24\x6D\x4\x1"
336"\x1D\x28\x3C\xE1\x59\x4F\x21\x34\xDA\xD1\x8D\x7E\xB4\xA4\x25\x4D\x69\xF6\x1B\x54\xA1\x61\x48\xA8\xA6\xA5"
337"\xB0\x69\x4E\x7B\xBA\xA2\x14\x7D\x28\x42\x23\x2D\x4\x1A\x30\x1\x2\xC5\x8\xF\xA4\x51\x9A\xD6\x29\x1"
338"\x2A\x98\x9D\x3D\xE8\x81\x4\x4C\x40\x1E\x60\x40\x1E\x90\x81\x7\x94\x81\x5B\xC3\xB5\x1D\xD0\xB5\xA2\xEA"
339"\xB5\x9D\xFA\x35\x60\xB\xAA\x5E\xD3\xB5\x62\x4B\x40\x92\x61\xAA\x30\x78\x2\x66\x68\xB6\x66\x20\xA7\xAA"
340"\x2A\x2\xAC\xCA\x2A\xAE\xCA\x36\x6D\x13\xAB\xB2\xBA\x81\x6C\xF8\x1B\xD\xD0\x80\xD\xD8\x0\x43\x30\x84"
341"\x6B\xA0\x6\x3\x58\x85\x9\x50\x84\x77\x8B\x37\x1\x1C\x40\xC3\x13\x1E\xA0\x2B\x42\x0\x70\x25\x57\x52"
342"\x3C\xDB\x63\xC2\xC7\x1B\x3A\x85\x10\x24\x42\x61\xB2\xF5\xA2\xBC\x2A\x7C\xFE\xBA\x18\x3A\xB8\x1D\xCB\x3C"
343"\xD3\xC2\xAF\xB8\xF3\xC2\xAA\xC3\x31\xFF\x1\xAD\xEF\x2\x80\xC8\x3A\xA5\x24\x52\x8\xD4\xEB\xA2\xD4\x8B"
344"\xBD\x36\x74\x3D\x7\x6B\xBB\xD5\x4B\x25\x21\x93\x8E\x18\xA3\x80\xDC\xDB\xBD\x97\xCB\x3B\x9A\x93\x95\x12"
345"\x1B\x8\xFE\x0\xA1\x81\x20\xC3\xAD\x40\x3C\x23\x34\x44\x0\x28\x44\x24\x84\x3C\xA2\x6B\x42\x16\x53\x1E"
346"\xC2\xEB\x10\x15\x1A\x1F\xCD\x82\x24\xA7\xC3\xBC\x83\xE3\x31\xFA\xF2\x31\xD5\x42\xAD\x48\x52\x24\x25\xDB"
347"\x38\x53\x32\x25\x25\x52\xC3\xB2\xD3\xA5\xE1\x6A\x3D\xD8\x63\x3B\xD8\x7B\x3B\x25\xDA\x3A\xE4\x62\xB1\x3B"
348"\x1C\x88\xB\xD3\xBD\xDE\xCB\x6\x85\xA8\x80\x94\x53\x88\xE1\x3\x80\x47\x2C\x3C\x42\x3C\xC2\x44\x14\xC6"
349"\xC4\x5B\x44\xC8\x13\xA4\x36\xD3\x38\x80\x53\x2F\x4A\xAC\x3C\x4B\x8C\x3A\x85\xDB\x3C\xCD\x43\x2D\x5F\xC2"
350"\x31\xB\x7A\xA\xC9\x3\x80\x48\x94\xAD\x26\x3A\x43\xB8\x43\xC3\x35\x4\x47\xB3\x73\x43\x55\x84\x3D\xB7"
351"\x9B\xC3\xFA\x81\xC5\x6\xB2\xB0\xE6\x2\x33\xBE\xBB\xB9\x2\x52\xB3\xE2\xD3\xA\xE4\x4B\x3E\x7A\xDC\x3E"
352"\xE5\xB3\x47\x7B\x64\xBE\x7D\x24\x6\xE7\x7B\x3E\x3B\xFE\xAB\x33\x7\xD8\x3E\xA2\x89\x88\x43\x9B\x29\x45"
353"\x63\x1\x3F\xA3\x81\x21\x0\xB4\x73\x11\xBF\x78\xAA\x27\xF3\x43\xBF\xF3\x53\x3F\xF5\xB3\x34\x4C\x7B\x3F"
354"\x4C\xA3\xB4\x47\x93\xA7\x73\x72\x80\x62\xB0\x92\x98\x5A\x9D\x9A\xDA\x3\xD9\xA1\x82\x8F\x2\x29\x17\x30"
355"\x99\x91\x22\x29\x5\x34\x36\x6\x4C\x6\x8\x8C\x40\x9\xC4\xB5\xA\x1C\x2A\x5F\x3\x2A\xD\xDC\xC0\x61"
356"\x23\xB6\x1D\x90\x1\x63\x33\x19\xAE\x91\x82\x65\x6B\xB6\x67\xA3\x1\x45\x98\xB6\x6A\xBB\xB6\x1\x20\x0"
357"\x7D\xC0\x80\x6C\xC8\x80\x2\xA8\x0\x1B\xE4\x80\xC1\x31\x80\xE\xF8\xC1\x61\x88\xB7\x10\x20\x94\x60\xF4"
358"\xCA\x43\x1C\xC6\x43\x54\xC2\x7C\xF3\x45\xAD\x20\x81\x18\xBB\x2C\xEE\xD2\x2C\x66\xC4\xC2\x2B\x44\xB8\x2C"
359"\x7C\x46\xCD\xA3\x46\x40\xAA\x21\xC2\x13\x3B\x0\x20\x3B\xFE\xE2\x25\x51\x9C\x43\x25\xD2\xA5\xB7\x63\xBD"
360"\x4\x23\x47\x91\x3\x39\xD9\xF3\x46\xAE\xAB\xC3\x27\x1C\x88\x55\xC8\x3D\x30\xCB\xC5\x81\xA0\xBB\x81\x10"
361"\xBC\x40\x24\x42\xB0\xFC\x4A\x44\xBC\xCC\x44\x4C\xC2\xC1\xDB\x8A\x36\xD3\xC6\xCA\x9A\x31\x47\x62\x4B\xB7"
362"\xBC\xBC\x67\x24\xAD\x4C\x5C\x38\xFE\x1C\xD3\xAC\xAF\x2B\x3C\xD0\xEA\x96\x23\x83\xCD\xBD\xB4\x32\x25\xF2"
363"\x4B\x39\x34\xCC\x54\x1C\x39\xC2\x54\xBB\x29\x1B\x2E\x57\x2C\x2F\xC5\x4\x0\xE\xE2\xBD\x3\x52\x88\x2D"
364"\x1B\x88\x9\x50\x88\x38\xF1\xB9\xCC\x64\x4E\xCB\x1C\x88\xBA\xC4\xCC\x43\x2C\x4B\x14\x9B\xC2\xA3\xB3\xAC"
365"\xD0\xEC\x2C\x2B\xB4\x3C\x67\xC4\xC4\x84\xC3\x31\x4A\x2A\x3E\x42\xB1\x81\xAC\xE3\x2F\xFF\x32\xB2\x51\x9C"
366"\x43\x5D\xFA\x4B\x92\x43\x3B\x38\x14\x4C\xC3\x54\x22\xDC\x1\x80\x7D\x80\x3C\xE4\x1C\x88\x5B\x1C\x88\x36"
367"\x50\x8\xC6\x54\x1F\x70\xF9\x7\x7C\x4\xD0\x7A\xC\xD0\x7B\x14\xD0\x2\x25\xD0\xE5\xCB\x47\x7C\x8C\x82"
368"\x75\x31\x6\x10\xE8\x3E\x80\x12\x28\x13\x90\xAA\xE9\x1B\x27\xEB\x33\x27\x3F\x63\x48\x76\x72\xA7\x87\x24"
369"\x3F\x7C\x92\xC8\x7B\x4A\xBF\x8A\xAC\xB4\x11\x95\xB4\x7B\x92\x27\x1A\x88\x80\xEC\x5B\x50\xC3\x9A\x37\xC5"
370"\x9A\xB5\x5A\xB\x2\x50\x13\x35\x8E\xD2\x2\x52\x4B\xC9\x92\x61\xC9\x9B\x51\xC0\x1E\x60\x40\x99\x8C\xC0"
371"\x99\xBC\xB5\xA\xD4\x81\x9B\xC4\xC0\x9C\xC\x36\xC\xAC\x40\x9F\x4C\x6\xA5\xD2\x82\x1F\x68\xAA\xAF\x29"
372"\x4A\xA9\x1A\xFE\x2\x45\x58\x85\x14\x90\xCA\xA\xA8\xCA\x22\x20\x87\xE\x20\x2\x23\x90\x94\xAD\xF8\x7"
373"\xE8\xC\xCB\xE8\x24\xD3\x31\x4D\x44\xE8\xF4\x45\xFE\xA1\xA2\xD7\x7C\x31\xA3\x4B\x2F\xEC\xA4\xC2\xCD\x6A"
374"\xCB\xED\xEC\xCE\x83\xD3\xAC\x81\xC3\xC6\xAB\xF0\x3C\xDA\xDB\x2F\x3F\x92\xCD\xD9\x3B\xCC\xDA\x34\xCC\xC0"
375"\x84\xB2\xDC\x5C\x3B\x7\x83\xB0\xDE\xF4\xA3\xF1\x9\x3A\x40\x4\x80\x6B\x99\x4C\xAD\xF8\x87\x49\x6D\xCE"
376"\x32\xAD\xD4\x31\x15\x24\x35\xF5\xA6\x62\x74\xBC\xA3\x53\x24\xF5\x1A\x9F\x30\xAA\xC4\xB6\xBC\x44\xB7\xD4"
377"\x2C\x45\xD2\xD4\x81\x48\xC6\x6C\xFC\x42\x3A\x44\x4C\xD8\x34\x4F\x6E\x44\xCF\x6F\x2C\x3B\xC0\x24\x39\x8"
378"\x5B\x45\xC2\x4C\xD4\x34\x1C\x32\x46\xAD\x20\x78\x4\x53\x4A\x75\x4E\x4B\x1D\x56\x33\x3D\xC2\x34\xC5\x46"
379"\x33\x1C\x4B\xE0\x6C\x3C\x27\x74\xD6\xB4\x54\xA1\xB5\x54\x88\x51\x25\x4D\x47\xF2\x1F\x41\x79\xA5\x2B\xA"
380"\x2F\x20\xFB\xBC\x21\x8B\xD5\x6D\xEC\x46\xDA\x64\xC3\xF5\x3C\xBB\xC1\x3C\xD4\x42\x15\x47\xDF\x4\x38\x5F"
381"\x5C\x16\x85\x98\xD4\x49\x3D\xD0\x4\x35\x50\x79\x8D\xD7\x1\xCD\xC7\x19\x88\x82\x19\x98\x17\x6\xFE\x75"
382"\x50\x36\x4B\x9A\x44\x63\x81\x45\xEB\x47\x39\x7B\x80\x7F\x84\xBE\x9\xCD\xB3\x3E\xBB\xD0\x75\x52\x27\x40"
383"\x7B\xA7\xF1\xEB\xD0\xF2\xFB\x50\x7C\x3A\xD1\x74\x4A\x51\x81\x3C\x2\xA8\x10\x42\x9A\x2A\x1\x16\x98\x1D"
384"\x16\x58\x2\xF9\xAB\xBF\x4F\xB3\x18\xA6\xC2\xA8\x51\xAB\x51\x94\xBC\xD1\x1C\xDD\xD1\x5\x74\x40\x1F\xA5"
385"\x49\xA\xB4\xC9\xA1\xC2\x40\x9D\xDC\x40\xE\x24\xB6\x9F\x14\x29\xAE\x51\x29\x95\xD9\x87\x8C\x5D\x3A\x49"
386"\x7D\x57\x78\xBD\xD4\xA2\x1D\x56\x64\x85\xC4\x23\x5C\x56\xA1\xEB\x9F\xDF\x74\x56\xD0\x54\x46\xB5\x9C\xD6"
387"\x66\xB4\x42\x45\xF2\xC5\x36\x6B\xB3\xD7\xBC\x2F\x6E\xE5\x53\x3F\xD2\xCB\xF3\xEC\x4B\x36\xB4\xD5\x8F\x7B"
388"\x43\xDD\x7C\x4F\x71\x34\xAE\x85\x13\x91\xA1\x65\xDB\x62\x35\x5A\x62\x25\x53\xE8\x5C\x3A\x64\xBC\xCC\xCD"
389"\x4\x4E\x46\x7C\xDA\x37\x95\x44\x47\x12\x55\x47\x32\x1E\xD6\x6C\x33\x3\xE3\xC2\x4D\x6C\x55\xFD\xF2\x5A"
390"\x23\xFB\xD3\x40\xED\xA3\x70\x24\xD4\x36\x7C\x3D\xC2\x1C\x2E\x5D\x3A\xA1\x81\x60\xDB\xB6\x9D\xDC\xCB\xC5"
391"\xDC\xCC\xD5\xDC\xCD\xE5\xDC\xCE\xF5\xDC\xCF\x5\xDD\xD0\x15\xDD\xD1\x25\xDD\x3E\xC9\xAD\xDC\xCA\x2D\xDD"
392"\xD4\x55\xDD\xD5\x65\xDD\xD6\x75\xDD\xD7\x65\xDD\xD3\x3D\x5D\xD8\xA5\xDD\xDA\xB5\xDD\xDB\xC5\xDD\xDC\x5"
393"\x0\xD9\xE5\x5D\xDD\xF5\xDD\xDF\x5\xDE\xE0\xC5\x5D\xDE\x25\xDE\xA1\x15\xDE\xE3\x45\xDE\xE4\x55\x5E\xA1"
394"\xE5\xDD\x80\x0\x0\x3B";
395
396#endif
diff --git a/src/memory.c b/src/memory.c
new file mode 100644
index 00000000..37ec1cba
--- /dev/null
+++ b/src/memory.c
@@ -0,0 +1,155 @@
1/* Copyrights 2002 Luis Figueiredo (stdio@netc.pt) All rights reserved.
2 *
3 * See the LICENSE file
4 *
5 * The origin of this software must not be misrepresented, either by
6 * explicit claim or by omission. Since few users ever read sources,
7 * credits must appear in the documentation.
8 *
9 * date: Sat Mar 30 14:25:25 GMT 2002
10 *
11 * -- memory functions
12 */
13#include "memory.h"
14
15IFDEBUG(int _t=0;)
16
17/*********************************************************************************************************/
18/*
19 * same as malloc with error reporting and libwebserver debug
20 */
21void * __ILWS_malloc(size_t s) {
22 void *ret;
23
24 ret=malloc(s);
25 if(ret==NULL) {
26 IFDEBUG(fprintf(stderr,"memory.c: malloc: %s (size %d)\n",strerror(errno),s);fflush(stderr));
27 return NULL;
28 };
29 IFDEBUG(_t++;);
30
31 IFDEBUG(fprintf(stderr,"memory.c (%d): Allocated %d bytes to %p\n",_t,s,ret);fflush(stderr));
32 return ret;
33}
34
35/*********************************************************************************************************/
36/*
37 * same as calloc with error reporting and libwebserver debug
38 */
39void * __ILWS_calloc(size_t nmemb,size_t s) {
40 void *ret;
41 ret=calloc(nmemb,s);
42 if(ret==NULL) {
43 IFDEBUG(fprintf(stderr,"memory.c: calloc %s\n",strerror(errno));fflush(stderr));
44 return NULL;
45 };
46 IFDEBUG(_t++;);
47 IFDEBUG(fprintf(stderr,"memory.c (%d): Allocated %d bytes to %p\n",_t,s*nmemb,ret);fflush(stderr));
48 return ret;
49}
50
51/*********************************************************************************************************/
52/*
53 * same as realloc with error reporting and libwebserver debug
54 */
55void * __ILWS_realloc(void *buf,size_t s) {
56 void *ret;
57 ret=realloc(buf,s);
58#ifdef DEBUG
59 if(buf==NULL) {
60 _t++;
61 IFDEBUG(fprintf(stderr,"memory.c (%d): Allocated %d bytes to %p\n",_t,s,ret);fflush(stderr));
62 };
63#endif
64 if(ret==NULL) {
65 IFDEBUG(fprintf(stderr,"memory.c: realloc: %s\n",strerror(errno));fflush(stderr));
66 return NULL;
67 };
68 IFDEBUG(fprintf(stderr,"memory.c: Realloc buffer %p to %d\n",buf,s);fflush(stderr));
69 return ret;
70}
71
72
73/*********************************************************************************************************/
74/*
75 * same as free with error report and libwebserver debug
76 */
77void __ILWS_free(void *ptr) {
78 if(ptr!=NULL) {
79 free(ptr);
80 IFDEBUG(fprintf(stderr,"memory.c (%d): Buffer %p freed\n",_t,ptr);fflush(stderr));
81 IFDEBUG(_t--;);
82 };
83}
84
85
86/*********************************************************************************************************/
87/*
88 * Add a buffer to memrequest list
89 */
90void *__ILWS_add_buffer(struct memrequest *list,unsigned int size) {
91 struct memrequest *tmem;
92 if(size==0) {
93 return NULL;
94 };
95 if(list!=NULL) {
96 tmem=list;
97 }else {
98 return NULL;
99 };
100 while(tmem->next!=NULL)tmem=tmem->next;
101 tmem->next=__ILWS_malloc(sizeof(struct memrequest));
102 if(tmem->next==NULL) return NULL; // ERROR
103 tmem->next->ptr=__ILWS_malloc(size);
104 tmem->next->next=NULL;
105 return tmem->next->ptr;
106}
107
108/*********************************************************************************************************/
109/*
110 * Initialize memrequest list of buffers
111 */
112struct memrequest *__ILWS_init_buffer_list() {
113 struct memrequest *newlist;
114 newlist=__ILWS_malloc(sizeof(struct memrequest));
115 if(newlist==NULL) return NULL;
116
117 newlist->next=NULL;
118 newlist->ptr=NULL;
119 return newlist;
120}
121
122/*********************************************************************************************************/
123/*
124 * Delete memrequest buffer node (free)
125 */
126void __ILWS_delete_buffer(struct memrequest *mem) {
127 __ILWS_free(mem->ptr);
128 __ILWS_free(mem);
129}
130
131/*********************************************************************************************************/
132/*
133 * Delete memrequest next buffer
134 */
135void __ILWS_delete_next_buffer(struct memrequest *mem) {
136 struct memrequest *tmem;
137 tmem=mem->next;
138 mem->next=mem->next->next;
139 __ILWS_delete_buffer(tmem);
140}
141
142/*********************************************************************************************************/
143/*
144 * Delete whole memrequest buffer list
145 */
146void __ILWS_delete_buffer_list(struct memrequest *list) {
147 struct memrequest *tmem=list;
148 if(tmem==NULL) return;
149
150 while(tmem->next!=NULL) {
151 __ILWS_delete_next_buffer(tmem);
152 };
153 __ILWS_delete_buffer(tmem);
154}
155
diff --git a/src/memory.h b/src/memory.h
new file mode 100644
index 00000000..8c759f3d
--- /dev/null
+++ b/src/memory.h
@@ -0,0 +1,46 @@
1/* Copyrights 2002 Luis Figueiredo (stdio@netc.pt) All rights reserved.
2 *
3 * See the LICENSE file
4 *
5 * The origin of this software must not be misrepresented, either by
6 * explicit claim or by omission. Since few users ever read sources,
7 * credits must appear in the documentation.
8 *
9 * date: Sat Mar 30 14:25:25 GMT 2002
10 *
11 * memory functions
12 */
13
14#ifndef _MEMORY_H_
15#define _MEMORY_H_
16
17#ifdef HAVE_CONFIG_H
18#include "config.h"
19#endif
20
21
22#include <stdio.h>
23#include <stdlib.h>
24#include <string.h>
25#include <errno.h> // Johannes E. Schindelin
26
27#include "debug.h"
28
29extern int errno;
30
31void *__ILWS_malloc(size_t);
32void *__ILWS_calloc(size_t,size_t);
33void *__ILWS_realloc(void *,size_t);
34void __ILWS_free(void *);
35
36struct memrequest {
37 char *ptr;
38 struct memrequest *next;
39};
40struct memrequest *__ILWS_init_buffer_list();
41void *__ILWS_add_buffer(struct memrequest *,unsigned int);
42void __ILWS_delete_buffer(struct memrequest *);
43void __ILWS_delete_next_buffer(struct memrequest *);
44void __ILWS_delete_buffer_list(struct memrequest *);
45
46#endif
diff --git a/src/module.c b/src/module.c
new file mode 100644
index 00000000..b809456f
--- /dev/null
+++ b/src/module.c
@@ -0,0 +1,22 @@
1/* Copyrights 2002 Luis Figueiredo (stdio@netc.pt) All rights reserved.
2 *
3 * See the LICENSE file
4 *
5 * The origin of this software must not be misrepresented, either by
6 * explicit claim or by omission. Since few users ever read sources,
7 * credits must appear in the documentation.
8 *
9 * date: Wen Jul 30 06:57:42 GMT 2003
10 *
11 * -- module function
12 *
13 * Tested on WIN32 only
14 */
15#include "module.h"
16
17
18
19
20
21
22
diff --git a/src/module.h b/src/module.h
new file mode 100644
index 00000000..05b14d59
--- /dev/null
+++ b/src/module.h
@@ -0,0 +1,25 @@
1
2
3
4
5
6
7
8
9
10
11
12
13#ifndef _MODULE_H_
14#define _MODULE_H_
15
16struct module {
17 const char *handle;
18 void (func)();
19
20};
21
22
23
24
25#endif \ No newline at end of file
diff --git a/src/outgif.c b/src/outgif.c
new file mode 100644
index 00000000..4a8e9a62
--- /dev/null
+++ b/src/outgif.c
@@ -0,0 +1,587 @@
1/*
2 * Luis Figueiredo - why remake the wheel, this functions feets perfectly
3 * and the credits still here :)
4 */
5
6
7/*
8 * xvgifwr.c - handles writing of GIF files. based on flgife.c and
9 * flgifc.c from the FBM Library, by Michael Maudlin
10 *
11 * Contains:
12 * WriteGIF(fp, pic, ptype, w, h, rmap, gmap, bmap, numcols, colorstyle,
13 * comment)
14 *
15 * Note: slightly brain-damaged, in that it'll only write non-interlaced
16 * GIF files (in the interests of speed, or something)
17 *
18 */
19
20
21
22/*****************************************************************
23 * Portions of this code Copyright (C) 1989 by Michael Mauldin.
24 * Permission is granted to use this file in whole or in
25 * part for any purpose, educational, recreational or commercial,
26 * provided that this copyright notice is retained unchanged.
27 * This software is available to all free of charge by anonymous
28 * FTP and in the UUNET archives.
29 *
30 *
31 * Authors: Michael Mauldin (mlm@cs.cmu.edu)
32 * David Rowley (mgardi@watdcsu.waterloo.edu)
33 *
34 * Based on: compress.c - File compression ala IEEE Computer, June 1984.
35 *
36 * Spencer W. Thomas (decvax!harpo!utah-cs!utah-gr!thomas)
37 * Jim McKie (decvax!mcvax!jim)
38 * Steve Davies (decvax!vax135!petsd!peora!srd)
39 * Ken Turkowski (decvax!decwrl!turtlevax!ken)
40 * James A. Woods (decvax!ihnp4!ames!jaw)
41 * Joe Orost (decvax!vax135!petsd!joe)
42 *****************************************************************/
43
44
45#include "outgif.h"
46
47static int __ILWS_Width, __ILWS_Height;
48static int __ILWS_curx, __ILWS_cury;
49static long __ILWS_CountDown;
50static int __ILWS_Interlace;
51//static unsigned char bw[2] = {0, 0xff};
52
53static void __ILWS_putword PARM((int, FILE *));
54static void __ILWS_compress PARM((int, FILE *, unsigned char *, int));
55static void __ILWS_output PARM((int));
56static void __ILWS_cl_block PARM((void));
57static void __ILWS_cl_hash PARM((count_int));
58static void __ILWS_char_init PARM((void));
59static void __ILWS_char_out PARM((int));
60static void __ILWS_flush_char PARM((void));
61
62
63static unsigned char pc2nc[256],r1[256],g1[256],b1[256];
64
65
66/*************************************************************/
67int __ILWS_WriteGIF(FILE *fp, unsigned char *pic, int w, int h, unsigned char *rmap, unsigned char *gmap, unsigned char *bmap, int numcols, int colorstyle,int transparency,
68 char *comment)
69{
70 int RWidth, RHeight;
71 int LeftOfs, TopOfs;
72 int ColorMapSize, InitCodeSize, Background, BitsPerPixel;
73 int i,j,nc;
74 unsigned char *pic8;
75 //unsigned char rtemp[256],gtemp[256],btemp[256];
76
77 pic8 = pic;
78
79
80
81 __ILWS_Interlace = 0;
82 Background = 0;
83
84
85 for (i=0; i<256; i++) { pc2nc[i] = r1[i] = g1[i] = b1[i] = 0; }
86
87 /* compute number of unique colors */
88 nc = 0;
89
90 for (i=0; i<numcols; i++) {
91 /* see if color #i is already used */
92 for (j=0; j<i; j++) {
93 if (rmap[i] == rmap[j] && gmap[i] == gmap[j] &&
94 bmap[i] == bmap[j]) break;
95 }
96
97 if (j==i) { /* wasn't found */
98 pc2nc[i] = nc;
99 r1[nc] = rmap[i];
100 g1[nc] = gmap[i];
101 b1[nc] = bmap[i];
102 nc++;
103 }
104 else pc2nc[i] = pc2nc[j];
105 }
106
107
108 /* figure out 'BitsPerPixel' */
109 for (i=1; i<8; i++)
110 if ( (1<<i) >= nc) break;
111
112 BitsPerPixel = i;
113
114 ColorMapSize = 1 << BitsPerPixel;
115
116 RWidth = __ILWS_Width = w;
117 RHeight = __ILWS_Height = h;
118 LeftOfs = TopOfs = 0;
119
120 __ILWS_CountDown = w * h; /* # of pixels we'll be doing */
121
122 if (BitsPerPixel <= 1) InitCodeSize = 2;
123 else InitCodeSize = BitsPerPixel;
124
125 __ILWS_curx = __ILWS_cury = 0;
126
127 if (!fp) {
128 fprintf(stderr, "WriteGIF: file not open for writing\n" );
129 return (1);
130 }
131
132
133 if (comment && strlen(comment) > (size_t) 0)
134 fwrite("GIF89a", (size_t) 1, (size_t) 6, fp); /* the GIF magic number */
135 else
136 fwrite("GIF87a", (size_t) 1, (size_t) 6, fp); /* the GIF magic number */
137
138 __ILWS_putword(RWidth, fp); /* screen descriptor */
139 __ILWS_putword(RHeight, fp);
140
141 i = 0x80; /* Yes, there is a color map */
142 i |= (8-1)<<4; /* OR in the color resolution (hardwired 8) */
143 i |= (BitsPerPixel - 1); /* OR in the # of bits per pixel */
144 fputc(i,fp);
145
146 fputc(Background, fp); /* background color */
147
148 fputc(0, fp); /* future expansion unsigned char */
149
150
151 if (colorstyle == 1) { /* greyscale */
152 for (i=0; i<ColorMapSize; i++) {
153 j = MONO(r1[i], g1[i], b1[i]);
154 fputc(j, fp);
155 fputc(j, fp);
156 fputc(j, fp);
157 }
158 }
159 else {
160 for (i=0; i<ColorMapSize; i++) { /* write out Global colormap */
161 fputc(r1[i], fp);
162 fputc(g1[i], fp);
163 fputc(b1[i], fp);
164 }
165 }
166
167 if (comment && strlen(comment) > (size_t) 0) { /* write comment blocks */
168 char *sp;
169 int i, blen;
170
171 fputc(0x21, fp); /* EXTENSION block */
172 fputc(0xF9,fp); // graphic control extension// Luis Figueiredo
173 fputc(4,fp); // blocksize
174 fputc(0x1,fp); // transparency flag
175 fputc(100,fp);// delay (unsigned?)
176 fputc(100,fp);// delay (unsigned?)
177 fputc(transparency,fp); // Luis figueiredo
178 fputc(0, fp); /* zero-length data subblock to end extension */
179 fputc(0x21, fp); /* EXTENSION block */
180 fputc(0xFE, fp); /* comment extension */
181 sp = comment;
182 while ( (blen=strlen(sp)) > 0) {
183 if (blen>255) blen = 255;
184 fputc(blen, fp);
185 for (i=0; i<blen; i++, sp++) fputc(*sp, fp);
186 }
187 fputc(0, fp); /* zero-length data subblock to end extension */
188 }
189
190
191 fputc( ',', fp ); /* image separator */
192
193 /* Write the Image header */
194 __ILWS_putword(LeftOfs, fp);
195 __ILWS_putword(TopOfs, fp);
196 __ILWS_putword(__ILWS_Width, fp);
197 __ILWS_putword(__ILWS_Height, fp);
198 if (__ILWS_Interlace) fputc(0x40, fp); /* Use Global Colormap, maybe Interlace */
199 else fputc(0x00, fp);
200
201 fputc(InitCodeSize, fp);
202 __ILWS_compress(InitCodeSize+1, fp, pic8, w*h);
203
204 fputc(0,fp); /* Write out a Zero-length packet (EOF) */
205 fputc(';',fp); /* Write GIF file terminator */
206
207
208 if (ferror(fp)) return -1;
209 return (0);
210}
211
212
213
214
215/******************************/
216static void __ILWS_putword(int w, FILE *fp)
217{
218 /* writes a 16-bit integer in GIF order (LSB first) */
219 fputc(w & 0xff, fp);
220 fputc((w>>8)&0xff, fp);
221}
222
223
224
225
226/***********************************************************************/
227
228
229static unsigned long __ILWS_cur_accum = 0;
230static int __ILWS_cur_bits = 0;
231
232
233
234
235#define min(a,b) ((a>b) ? b : a)
236
237#define XV_BITS 12 /* BITS was already defined on some systems */
238#define MSDOS 1
239
240#define HSIZE 5003 /* 80% occupancy */
241
242typedef unsigned char char_type;
243
244
245static int __ILWS_n_bits; /* number of bits/code */
246static int __ILWS_maxbits = XV_BITS; /* user settable max # bits/code */
247static int __ILWS_maxcode; /* maximum code, given n_bits */
248static int __ILWS_maxmaxcode = 1 << XV_BITS; /* NEVER generate this */
249
250#define MAXCODE(n_bits) ( (1 << (n_bits)) - 1)
251
252static count_int __ILWS_htab [HSIZE];
253static unsigned short __ILWS_codetab [HSIZE];
254#define HashTabOf(i) __ILWS_htab[i]
255#define CodeTabOf(i) __ILWS_codetab[i]
256
257static int __ILWS_hsize = HSIZE; /* for dynamic table sizing */
258
259/*
260 * To save much memory, we overlay the table used by compress() with those
261 * used by decompress(). The tab_prefix table is the same size and type
262 * as the codetab. The tab_suffix table needs 2**BITS characters. We
263 * get this from the beginning of htab. The output stack uses the rest
264 * of htab, and contains characters. There is plenty of room for any
265 * possible stack (stack used to be 8000 characters).
266 */
267
268#define tab_prefixof(i) CodeTabOf(i)
269#define tab_suffixof(i) ((char_type *)(htab))[i]
270#define de_stack ((char_type *)&tab_suffixof(1<<XV_BITS))
271
272static int __ILWS_free_ent = 0; /* first unused entry */
273
274/*
275 * block compression parameters -- after all codes are used up,
276 * and compression rate changes, start over.
277 */
278static int __ILWS_clear_flg = 0;
279
280static long int __ILWS_in_count = 1; /* length of input */
281static long int __ILWS_out_count = 0; /* # of codes output (for debugging) */
282
283/*
284 * compress stdin to stdout
285 *
286 * Algorithm: use open addressing double hashing (no chaining) on the
287 * prefix code / next character combination. We do a variant of Knuth's
288 * algorithm D (vol. 3, sec. 6.4) along with G. Knott's relatively-prime
289 * secondary probe. Here, the modular division first probe is gives way
290 * to a faster exclusive-or manipulation. Also do block compression with
291 * an adaptive reset, whereby the code table is cleared when the compression
292 * ratio decreases, but after the table fills. The variable-length output
293 * codes are re-sized at this point, and a special CLEAR code is generated
294 * for the decompressor. Late addition: construct the table according to
295 * file size for noticeable speed improvement on small files. Please direct
296 * questions about this implementation to ames!jaw.
297 */
298
299static int __ILWS_g_init_bits;
300static FILE *__ILWS_g_outfile;
301
302static int __ILWS_ClearCode;
303static int __ILWS_EOFCode;
304
305
306/********************************************************/
307static void __ILWS_compress(int init_bits, FILE *outfile, unsigned char *data, int len)
308
309{
310 register long fcode;
311 register int i = 0;
312 register int c;
313 register int ent;
314 register int disp;
315 register int hsize_reg;
316 register int hshift;
317
318 /*
319 * Set up the globals: g_init_bits - initial number of bits
320 * g_outfile - pointer to output file
321 */
322 __ILWS_g_init_bits = init_bits;
323 __ILWS_g_outfile = outfile;
324
325 /* initialize 'compress' globals */
326 __ILWS_maxbits = XV_BITS;
327 __ILWS_maxmaxcode = 1<<XV_BITS;
328 memset((char *) __ILWS_htab,0, sizeof(__ILWS_htab));
329 memset((char *) __ILWS_codetab,0, sizeof(__ILWS_codetab));
330 __ILWS_hsize = HSIZE;
331 __ILWS_free_ent = 0;
332 __ILWS_clear_flg = 0;
333 __ILWS_in_count = 1;
334 __ILWS_out_count = 0;
335 __ILWS_cur_accum = 0;
336 __ILWS_cur_bits = 0;
337
338
339 /*
340 * Set up the necessary values
341 */
342 __ILWS_out_count = 0;
343 __ILWS_clear_flg = 0;
344 __ILWS_in_count = 1;
345 __ILWS_maxcode = MAXCODE(__ILWS_n_bits = __ILWS_g_init_bits);
346
347 __ILWS_ClearCode = (1 << (init_bits - 1));
348 __ILWS_EOFCode = __ILWS_ClearCode + 1;
349 __ILWS_free_ent = __ILWS_ClearCode + 2;
350
351 __ILWS_char_init();
352 ent = pc2nc[*data++];
353 len--;
354
355 hshift = 0;
356 for ( fcode = (long) __ILWS_hsize; fcode < 65536L; fcode *= 2L )
357 hshift++;
358 hshift = 8 - hshift; /* set hash code range bound */
359
360 hsize_reg = __ILWS_hsize;
361 __ILWS_cl_hash( (count_int) hsize_reg); /* clear hash table */
362
363 __ILWS_output(__ILWS_ClearCode);
364
365 while (len) {
366 c = pc2nc[*data++]; len--;
367 __ILWS_in_count++;
368
369 fcode = (long) ( ( (long) c << __ILWS_maxbits) + ent);
370 i = (((int) c << hshift) ^ ent); /* xor hashing */
371
372 if ( HashTabOf (i) == fcode ) {
373 ent = CodeTabOf (i);
374 continue;
375 }
376
377 else if ( (long)HashTabOf (i) < 0 ) /* empty slot */
378 goto nomatch;
379
380 disp = hsize_reg - i; /* secondary hash (after G. Knott) */
381 if ( i == 0 )
382 disp = 1;
383
384probe:
385 if ( (i -= disp) < 0 )
386 i += hsize_reg;
387
388 if ( HashTabOf (i) == fcode ) {
389 ent = CodeTabOf (i);
390 continue;
391 }
392
393 if ( (long)HashTabOf (i) >= 0 )
394 goto probe;
395
396nomatch:
397 __ILWS_output(ent);
398 __ILWS_out_count++;
399 ent = c;
400
401 if ( __ILWS_free_ent < __ILWS_maxmaxcode ) {
402 CodeTabOf (i) = __ILWS_free_ent++; /* code -> hashtable */
403 HashTabOf (i) = fcode;
404 }
405 else
406 __ILWS_cl_block();
407 }
408
409 /* Put out the final code */
410 __ILWS_output(ent);
411 __ILWS_out_count++;
412 __ILWS_output(__ILWS_EOFCode);
413}
414
415
416/*****************************************************************
417 * TAG( output )
418 *
419 * Output the given code.
420 * Inputs:
421 * code: A n_bits-bit integer. If == -1, then EOF. This assumes
422 * that n_bits =< (long)wordsize - 1.
423 * Outputs:
424 * Outputs code to the file.
425 * Assumptions:
426 * Chars are 8 bits long.
427 * Algorithm:
428 * Maintain a BITS character long buffer (so that 8 codes will
429 * fit in it exactly). Use the VAX insv instruction to insert each
430 * code in turn. When the buffer fills up empty it and start over.
431 */
432
433static
434unsigned long __ILWS_masks[] = { 0x0000, 0x0001, 0x0003, 0x0007, 0x000F,
435 0x001F, 0x003F, 0x007F, 0x00FF,
436 0x01FF, 0x03FF, 0x07FF, 0x0FFF,
437 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF };
438
439static void __ILWS_output(int code)
440{
441 __ILWS_cur_accum &= __ILWS_masks[__ILWS_cur_bits];
442
443 if (__ILWS_cur_bits > 0)
444 __ILWS_cur_accum |= ((long)code << __ILWS_cur_bits);
445 else
446 __ILWS_cur_accum = code;
447
448 __ILWS_cur_bits += __ILWS_n_bits;
449
450 while( __ILWS_cur_bits >= 8 ) {
451 __ILWS_char_out( (int) (__ILWS_cur_accum & 0xff) );
452 __ILWS_cur_accum >>= 8;
453 __ILWS_cur_bits -= 8;
454 }
455
456 /*
457 * If the next entry is going to be too big for the code size,
458 * then increase it, if possible.
459 */
460
461 if (__ILWS_free_ent > __ILWS_maxcode || __ILWS_clear_flg) {
462
463 if( __ILWS_clear_flg ) {
464 __ILWS_maxcode = MAXCODE (__ILWS_n_bits = __ILWS_g_init_bits);
465 __ILWS_clear_flg = 0;
466 }
467 else {
468 __ILWS_n_bits++;
469 if ( __ILWS_n_bits == __ILWS_maxbits )
470 __ILWS_maxcode = __ILWS_maxmaxcode;
471 else
472 __ILWS_maxcode = MAXCODE(__ILWS_n_bits);
473 }
474 }
475
476 if( code == __ILWS_EOFCode ) {
477 /* At EOF, write the rest of the buffer */
478 while( __ILWS_cur_bits > 0 ) {
479 __ILWS_char_out( (int)(__ILWS_cur_accum & 0xff) );
480 __ILWS_cur_accum >>= 8;
481 __ILWS_cur_bits -= 8;
482 }
483
484 __ILWS_flush_char();
485
486 fflush( __ILWS_g_outfile );
487
488#ifdef FOO
489 if( ferror( g_outfile ) )
490 FatalError("unable to write GIF file");
491#endif
492 }
493}
494
495
496/********************************/
497static void __ILWS_cl_block () /* table clear for block compress */
498{
499 /* Clear out the hash table */
500
501 __ILWS_cl_hash ( (count_int) __ILWS_hsize );
502 __ILWS_free_ent = __ILWS_ClearCode + 2;
503 __ILWS_clear_flg = 1;
504
505 __ILWS_output(__ILWS_ClearCode);
506}
507
508
509/********************************/
510static void __ILWS_cl_hash(register count_int hsize) /* reset code table */
511{
512 register count_int *htab_p = __ILWS_htab+hsize;
513 register long i;
514 register long m1 = -1;
515
516 i = hsize - 16;
517 do { /* might use Sys V memset(3) here */
518 *(htab_p-16) = m1;
519 *(htab_p-15) = m1;
520 *(htab_p-14) = m1;
521 *(htab_p-13) = m1;
522 *(htab_p-12) = m1;
523 *(htab_p-11) = m1;
524 *(htab_p-10) = m1;
525 *(htab_p-9) = m1;
526 *(htab_p-8) = m1;
527 *(htab_p-7) = m1;
528 *(htab_p-6) = m1;
529 *(htab_p-5) = m1;
530 *(htab_p-4) = m1;
531 *(htab_p-3) = m1;
532 *(htab_p-2) = m1;
533 *(htab_p-1) = m1;
534 htab_p -= 16;
535 } while ((i -= 16) >= 0);
536
537 for ( i += 16; i > 0; i-- )
538 *--htab_p = m1;
539}
540
541
542/******************************************************************************
543 *
544 * GIF Specific routines
545 *
546 ******************************************************************************/
547
548/*
549 * Number of characters so far in this 'packet'
550 */
551static int __ILWS_a_count;
552
553/*
554 * Set up the 'unsigned char output' routine
555 */
556static void __ILWS_char_init()
557{
558 __ILWS_a_count = 0;
559}
560
561/*
562 * Define the storage for the packet accumulator
563 */
564static char __ILWS_accum[ 256 ];
565
566/*
567 * Add a character to the end of the current packet, and if it is 254
568 * characters, flush the packet to disk.
569 */
570static void __ILWS_char_out(int c)
571{
572 __ILWS_accum[ __ILWS_a_count++ ] = c;
573 if( __ILWS_a_count >= 254 )
574 __ILWS_flush_char();
575}
576
577/*
578 * Flush the packet to disk, and reset the accumulator
579 */
580static void __ILWS_flush_char()
581{
582 if( __ILWS_a_count > 0 ) {
583 fputc(__ILWS_a_count, __ILWS_g_outfile );
584 fwrite(__ILWS_accum, (size_t) 1, (size_t) __ILWS_a_count, __ILWS_g_outfile );
585 __ILWS_a_count = 0;
586 }
587}
diff --git a/src/outgif.h b/src/outgif.h
new file mode 100644
index 00000000..c904fa01
--- /dev/null
+++ b/src/outgif.h
@@ -0,0 +1,63 @@
1/* Copyrights 2002 Luis Figueiredo (stdio@netc.pt) All rights reserved.
2 *
3 * See the LICENSE file
4 *
5 * The origin of this software must not be misrepresented, either by
6 * explicit claim or by omission. Since few users ever read sources,
7 * credits must appear in the documentation.
8 *
9 * file: web_outgif.h
10 *
11 * description: output gif outgif.c is copyrighted by
12 */
13 /*****************************************************************
14 * Portions of this code Copyright (C) 1989 by Michael Mauldin.
15 * Permission is granted to use this file in whole or in
16 * part for any purpose, educational, recreational or commercial,
17 * provided that this copyright notice is retained unchanged.
18 * This software is available to all free of charge by anonymous
19 * FTP and in the UUNET archives.
20 *
21 *
22 * Authors: Michael Mauldin (mlm@cs.cmu.edu)
23 * David Rowley (mgardi@watdcsu.waterloo.edu)
24 *
25 * Based on: compress.c - File compression ala IEEE Computer, June 1984.
26 *
27 * Spencer W. Thomas (decvax!harpo!utah-cs!utah-gr!thomas)
28 * Jim McKie (decvax!mcvax!jim)
29 * Steve Davies (decvax!vax135!petsd!peora!srd)
30 * Ken Turkowski (decvax!decwrl!turtlevax!ken)
31 * James A. Woods (decvax!ihnp4!ames!jaw)
32 * Joe Orost (decvax!vax135!petsd!joe)
33 *****************************************************************/
34/*
35 *
36 * date: 20:57,13-57-2002
37 */
38
39#ifndef _WEB_OUTGIF_H_
40#define _WEB_OUTGIF_H_
41
42#include <stdio.h>
43#include <string.h>
44
45#include "debug.h"
46
47#undef PARM
48#ifdef __STDC__
49# define PARM(a) a
50#else
51# define PARM(a) ()
52# define const
53#endif
54
55/* MONO returns total intensity of r,g,b triple (i = .33R + .5G + .17B) */
56#define MONO(rd,gn,bl) ( ((int)(rd)*11 + (int)(gn)*16 + (int)(bl)*5) >> 5)
57
58typedef long int count_int;
59
60
61int __ILWS_WriteGIF(FILE *, unsigned char *, int, int, unsigned char *, unsigned char *, unsigned char *, int, int, int, char *);
62
63#endif
diff --git a/src/outstream.c b/src/outstream.c
new file mode 100644
index 00000000..10b5f981
--- /dev/null
+++ b/src/outstream.c
@@ -0,0 +1,122 @@
1/* Copyrights 2002 Luis Figueiredo (stdio@netc.pt) All rights reserved.
2 *
3 * See the LICENSE file
4 *
5 * The origin of this software must not be misrepresented, either by
6 * explicit claim or by omission. Since few users ever read sources,
7 * credits must appear in the documentation.
8 *
9 * date: Sat Mar 30 14:25:25 GMT 2002
10 *
11 * -- stream list functions
12 */
13
14
15#include "outstream.h"
16
17/*********************************************************************************************************/
18/*
19 * add_outstream, add a file to output (client) stream
20 */
21int __ILWS_add_outstream(struct outstream *list,char *fname,FILE* stream,int istmp){
22 struct outstream *temp=list;
23 FILE *tmp;
24 while(temp->next!=NULL)temp=temp->next;
25
26 if(!(temp->next=__ILWS_malloc(sizeof(struct outstream)))) {
27 LWSERR(LE_MEMORY);
28 return 0;
29 };
30 // file check (0.5.3);
31 tmp=fopen(fname,"rb");
32 if(tmp==NULL) {
33 __ILWS_free(temp->next);
34 temp->next=NULL;
35 return 0;
36 };
37 fclose(tmp);
38 // --
39 temp->next->fname=NULL;
40 if(fname!=NULL) {
41 if(!(temp->next->fname=__ILWS_malloc(strlen(fname)+1))) {
42 __ILWS_free(temp->next);
43 temp->next=NULL;
44 LWSERR(LE_MEMORY);
45 return 0;
46 };
47 memcpy(temp->next->fname,fname,strlen(fname));
48 temp->next->fname[strlen(fname)]='\0';
49 };
50 temp->next->todelete=istmp;
51 temp->next->fstream=stream;
52 temp->next->wsize=1;
53 temp->next->rsize=0;
54 temp->next->wrotesize=0;
55 temp->next->varsize=0;
56 temp->next->next=NULL;
57 return 1;
58}
59
60/*********************************************************************************************************/
61/*
62 * Initializate (allocate) outstream list
63 */
64struct outstream *__ILWS_init_outstream_list() {
65 struct outstream *ret;
66
67
68 if(!(ret=__ILWS_malloc(sizeof(struct outstream)))) {
69 LWSERR(LE_MEMORY);
70 return NULL;
71 };
72 ret->todelete=0;
73 ret->fname=NULL;
74 ret->flags=0;
75 ret->fstream=NULL;
76 ret->next=NULL;
77 return ret;
78}
79
80/*********************************************************************************************************/
81/*
82 * Delete a especific node
83 */
84void __ILWS_delete_outstream(struct outstream *node) { // Changed
85 int rt;
86 if(node->fstream!=NULL)fclose(node->fstream); // better here;
87 if(node->todelete) { // is temporary file
88 rt=unlink(node->fname);
89 if(rt==-1) {
90 LWSERR(LE_FILESYS);
91 };
92
93 };
94 if(node->fname!=NULL)__ILWS_free(node->fname);
95 __ILWS_free(node);
96}
97
98/*********************************************************************************************************/
99/*
100 * delete next node
101 */
102void __ILWS_delete_next_outstream(struct outstream *node) {
103 struct outstream *temp=node->next;
104 node->next=node->next->next;
105 __ILWS_delete_outstream(temp);
106}
107
108/*********************************************************************************************************/
109/*
110 * delete all nodes on the list (reset list)
111 */
112void __ILWS_delete_outstream_list(struct outstream *list) {
113 struct outstream *temp=list;
114 while(temp->next!=NULL) {
115
116 __ILWS_delete_next_outstream(temp);
117 };
118
119 __ILWS_delete_outstream(temp);
120
121}
122
diff --git a/src/outstream.h b/src/outstream.h
new file mode 100644
index 00000000..c6d25f50
--- /dev/null
+++ b/src/outstream.h
@@ -0,0 +1,53 @@
1/* Copyrights 2002 Luis Figueiredo (stdio@netc.pt) All rights reserved.
2 *
3 * See the LICENSE file
4 *
5 * The origin of this software must not be misrepresented, either by
6 * explicit claim or by omission. Since few users ever read sources,
7 * credits must appear in the documentation.
8 *
9 * date: Sat Mar 30 14:25:25 GMT 2002
10 *
11 * stream functions
12 */
13
14#ifndef _OUTSTREAM_H_
15#define _OUTSTREAM_H_
16
17#ifdef HAVE_CONFIG_H
18#include "config.h"
19#endif
20
21#include <stdio.h>
22#include <stdlib.h>
23#include <string.h>
24
25#ifndef WIN32
26#include <unistd.h>
27#endif
28
29#include "debug.h"
30#include "memory.h"
31#include "error.h"
32
33
34
35
36
37struct outstream {
38 FILE *fstream;
39 char *fname;
40 int todelete;
41 int wsize,rsize;
42 long wrotesize;
43 long varsize;
44 int flags;
45 struct outstream *next;
46};
47
48int __ILWS_add_outstream(struct outstream *, char *,FILE *,int);
49struct outstream *__ILWS_init_outstream_list();
50void __ILWS_delete_next_outstream(struct outstream *);
51void __ILWS_delete_outstream_list(struct outstream *);
52void __ILWS_delete_outstream(struct outstream *);
53#endif
diff --git a/src/server.c b/src/server.c
new file mode 100644
index 00000000..f21e9697
--- /dev/null
+++ b/src/server.c
@@ -0,0 +1,448 @@
1/* Copyrights 2002 Luis Figueiredo (stdio@netc.pt) All rights reserved.
2 *
3 * See the LICENSE file
4 *
5 * The origin of this software must not be misrepresented, either by
6 * explicit claim or by omission. Since few users ever read sources,
7 * credits must appear in the documentation.
8 *
9 * date: Sat Mar 30 14:44:42 GMT 2002
10 *
11 * -- core server functions
12 *
13 */
14
15#include "server.h"
16#include "logo.h"
17
18#ifdef WIN32
19 #define _SERVER_VERSION "libwebserver/0.5.3(win32)" // update allways when changing version (damn win)
20#endif
21
22#ifndef _SERVER_VERSION
23 #define _SERVER_VERSION "libwebserver/(unknow)"
24#endif
25
26#ifdef DEBUG
27 char *_libwebserver_version= _SERVER_VERSION "(debug)";
28#else
29 char *_libwebserver_version= _SERVER_VERSION;
30#endif
31
32struct web_server *current_web_server;
33
34
35/*********************************************************************************************************/
36/*
37 * Define certificate file (open_ssl)
38 */
39void web_server_useSSLcert(struct web_server *server,const char *file) {
40#ifdef HAVE_OPENSSL
41 if(!(server->cert_file=__ILWS_malloc(strlen(file)+1))) {
42 LWSERR(LE_MEMORY);
43 return;
44 };
45 memcpy(server->cert_file,file,strlen(file));
46 server->cert_file[strlen(file)]=0;
47#else
48 printf("OpenSSL not supported in this compilation\n");
49#endif
50}
51
52void web_server_useMIMEfile(struct web_server *server,const char *file) {
53 if(!(server->mimefile=__ILWS_malloc(strlen(file)+1))) {
54 LWSERR(LE_MEMORY);
55 return;
56 };
57 memcpy(server->mimefile,file,strlen(file));
58 server->mimefile[strlen(file)]=0;
59};
60/*********************************************************************************************************/
61/*
62 * Handler for libwebserver logotipe
63 */
64void _web_server_logo() {
65 printf("Content-type: image/gif\r\n\r\n");
66 fwrite((char *)_logo,sizeof(_logo),1,stdout);
67}
68
69
70/*********************************************************************************************************/
71/*
72 * Add an handler to request data
73 */
74int web_server_addhandler(struct web_server *server,const char *mstr,void (*func)(),int flag) {
75 _logfile=server->weblog;
76 // xor?
77 flag ^= (server->flags & WS_LOCAL); // global flag to handler flag
78 flag ^= (server->flags & WS_DYNVAR); // global flag to handler flag
79 flag ^= (server->flags & WS_USELEN); // global flag to handler flag
80 web_log("[%s] Adding handler %s <--%s%s%s\n",__ILWS_date(time(NULL),"%d/%b/%Y:%H:%M:%S %z"),mstr, ((flag & WS_LOCAL) == WS_LOCAL && !((server->flags & WS_LOCAL) == WS_LOCAL))?"[LOCAL] ":"", ((flag & WS_DYNVAR) == WS_DYNVAR)?"[DYNVAR]":"", ((flag & WS_USELEN) == WS_USELEN)?"[USELEN]":"");
81 return __ILWS_add_handler((struct gethandler *)server->gethandler,mstr,func,NULL,flag,GH_FUNCTION);
82}
83
84/*********************************************************************************************************/
85/*
86 * Add an alias dir (new on 0.5.2)
87 */
88int web_server_aliasdir(struct web_server *server, const char *str, char *path,int flag) {
89 char *mstr;
90 int ret;
91 mstr=__ILWS_malloc(strlen(str)+7);
92 if(!strlen(str)) {
93 snprintf(mstr,strlen(str)+7,"* /*");
94 } else {
95 snprintf(mstr,strlen(str)+7,"* /%s/*",str);
96 };
97 _logfile=server->weblog;
98 flag ^= (server->flags & WS_LOCAL); // global flag to handler flag
99 flag ^= (server->flags & WS_DYNVAR); // global flag to handler flag
100 flag ^= (server->flags & WS_USELEN); // global flag to handler flag
101 web_log("[%s] Adding directory %s <--%s%s%s\n",__ILWS_date(time(NULL),"%d/%b/%Y:%H:%M:%S %z"),mstr, ((flag & WS_LOCAL) == WS_LOCAL && !((server->flags & WS_LOCAL) == WS_LOCAL))?"[LOCAL] ":"", ((flag & WS_DYNVAR) == WS_DYNVAR)?"[DYNVAR]":"", ((flag & WS_USELEN) == WS_USELEN)?"[USELEN]":"");
102 ret=__ILWS_add_handler((struct gethandler *)server->gethandler,mstr,NULL,path,flag,GH_DIRECTORY);
103 __ILWS_free(mstr);
104 return ret;
105};
106
107
108/*********************************************************************************************************/
109/*
110 * Personal config (new on 0.5.0)
111 */
112char *web_server_getconf(struct web_server *server, const char *topic,const char *key) {
113 char *dataconf;
114 char *tmp1,*tmp2,*tmp3;
115 long tmpsize=0;
116
117 dataconf=__ILWS_stristr(server->dataconf,topic);
118 if(dataconf==NULL) {
119 return NULL;
120 };
121 dataconf+=strlen(topic);
122 tmp1=__ILWS_stristr(dataconf,key);
123 do {
124 tmp1=__ILWS_stristr(dataconf,key);
125 dataconf+=1;
126 if(dataconf[0]==0) {
127 return NULL;
128 };
129 if(dataconf[0]=='[' && dataconf[-1]=='\n') {
130 return NULL;
131 };
132 }while(!(tmp1!=NULL && tmp1[-1]=='\n' && tmp1[strlen(key)]=='='));
133
134 tmp1+=strlen(key)+1;
135 tmp2=__ILWS_stristr(tmp1,"\n");
136 if(tmp2==NULL) {
137 tmp2=tmp1+strlen(tmp1);
138 };
139 tmpsize=tmp2-tmp1;
140 if(!(tmp3=__ILWS_malloc(tmpsize+1))) {
141 LWSERR(LE_MEMORY);
142 return NULL;
143 };
144 memcpy(tmp3,tmp1,tmpsize);
145 tmp3[tmpsize]=0;
146 return tmp3;
147};
148
149/*********************************************************************************************************/
150/*
151 * Define config file to setup server (new on 0.5.0)
152 */
153int web_server_setup(struct web_server *server,const char *conffile) {
154 FILE *tmpf;
155 char *tmp3;
156 //long tmpsize=0;
157 long sizec;
158 struct stat statf; // tested only on win
159
160 if(!(server->conffile=__ILWS_malloc(strlen(conffile)+1))) {
161 LWSERR(LE_MEMORY);
162 return 0;
163 };
164
165 memcpy(server->conffile,conffile,strlen(conffile));
166 server->conffile[strlen(conffile)]=0;
167
168 tmpf=fopen(server->conffile,"r");
169 if(tmpf==NULL) {
170 printf("no config file found\r\n");
171 server->dataconf="";
172 return(0);
173 };
174 fseek(tmpf,SEEK_SET,SEEK_END);
175 sizec=ftell(tmpf);
176 fseek(tmpf,0,SEEK_SET);
177 if(!(server->dataconf=__ILWS_malloc(sizec+1))) {
178 LWSERR(LE_MEMORY);
179 return 0;
180 };
181 fread(server->dataconf,sizec,1,tmpf);
182 server->dataconf[sizec]=0; // Hilobok Andrew (han@km.if.ua) said to remove the -9 :)
183 fclose(tmpf);
184
185 stat(server->conffile,&statf); // tested only on win
186 server->conffiletime=statf.st_mtime; // tested only on win
187
188 if((server->logfile=web_server_getconf(server,"LIBWEBSERVER","LOG"))) {
189 web_log("\nUsing logfile [%s]\n",server->logfile);
190 server->weblog=open_weblog(server->logfile);
191 } else {
192 web_log("\nLOG entry not found\r\n");
193 server->weblog=NULL;
194 };
195 if((tmp3=web_server_getconf(server,"LIBWEBSERVER","PORT"))) {
196 web_log("\nListen port [%s]\n",tmp3);
197 server->port=atoi(tmp3);
198 __ILWS_free(tmp3);
199 } else {
200 web_log("PORT entry not found\r\n");
201 server->port=0;
202 };
203#ifdef HAVE_OPENSSL
204 // Fetch SSL
205 if((tmp3=web_server_getconf(server,"LIBWEBSERVER","USESSL"))) {
206 if(tmp3[0]=='1') {
207 server->flags = server->flags | WS_USESSL;
208 }else if(tmp3[0]=='0') {
209 server->flags = server->flags & ~WS_USESSL;
210 } else {
211 fprintf(stderr,"[USESSL=] argument invalid\n");
212 };
213 __ILWS_free(tmp3);
214 }
215 // Fetch CERTFILE
216 server->cert_file=web_server_getconf(server,"LIBWEBSERVER","CERTFILE");
217 server->mimefile=web_server_getconf(server,"LIBWEBSERVER","MIMEFILE");
218#endif
219 // Fetch LOCAL
220 if((tmp3=web_server_getconf(server,"LIBWEBSERVER","LOCAL"))) {
221 if(tmp3[0]=='1') {
222 server->flags = server->flags | WS_LOCAL;
223 } else if(tmp3[0]=='0') {
224 server->flags=server->flags & ~WS_LOCAL;
225 }else {
226 fprintf(stderr,"[LOCAL=] argument invalid\n");
227 };
228 __ILWS_free(tmp3);
229 }
230
231 return 1;
232};
233
234/*********************************************************************************************************/
235/*
236 * This function initialize one web_server handler
237 */
238int web_server_init(struct web_server *server,int port,const char *logfile,int flags) {
239#ifdef WIN32
240 unsigned long t=IOC_INOUT;
241 WSADATA WSAinfo;
242 WSAStartup(2,&WSAinfo); // Damn w32 sockets
243#endif
244
245 current_web_server=server;
246 server->port=port;
247 server->conffile=NULL;
248 server->mimefile=NULL;
249 server->weblog=NULL;
250 server->usessl=0;
251 server->flags=flags;
252 server->dataconf="";
253 if((flags & WS_USEEXTCONF) == WS_USEEXTCONF) {
254 if(!(web_server_setup(server,logfile))) {
255#ifdef WIN32
256 WSACleanup();
257#endif
258 return 0;
259 };
260 _logfile=server->weblog; // Set current log stream
261 web_log("%s using config file %s\n",_libwebserver_version,logfile);
262 };
263 // Create a listen socket port 'port' and listen addr (0) (all interfaces)
264 server->socket=__ILWS_listensocket((short)server->port,0);
265 if(server->socket==-1) {
266 LWSERR(LE_NET);
267#ifdef WIN32
268 WSACleanup();
269#endif
270 return 0;
271 };
272#ifdef WIN32
273 ioctlsocket(server->socket,FIONBIO,&t); //non blocking sockets for win32
274#else
275 fcntl(server->socket,F_SETFL,O_NONBLOCK);
276#endif
277 // Setup FILE structure of logfile
278 if(logfile!=NULL && !((flags & WS_USEEXTCONF) == WS_USEEXTCONF)) {
279 server->logfile=__ILWS_malloc(strlen(logfile)+1);
280 memcpy(server->logfile,logfile,strlen(logfile));
281 server->logfile[strlen(logfile)]=0;
282 server->weblog=open_weblog(logfile); // Create File stream for log
283 };
284
285 web_log("\n[%s] Server started at port %d (%s)\n",__ILWS_date(time(NULL),"%d/%b/%Y:%H:%M:%S %z"),server->port,_libwebserver_version);
286
287 // Setup Flags
288
289 // openssl
290#ifdef HAVE_OPENSSL
291 if((server->flags & WS_USESSL) == WS_USESSL) {
292 web_log("[%s] (FLAG) Using SSL in connections\n",__ILWS_date(time(NULL),"%d/%b/%Y:%H:%M:%S %z"));
293 web_log(" +-- %s certificate file\n",server->cert_file);
294 SSL_load_error_strings();
295 SSLeay_add_ssl_algorithms();
296 server->ctx=SSL_CTX_new (SSLv23_server_method());
297 if (SSL_CTX_use_certificate_file(server->ctx, server->cert_file, SSL_FILETYPE_PEM) <= 0) {
298 ERR_print_errors_fp(stderr);
299 exit(3);
300 }
301 if (SSL_CTX_use_PrivateKey_file(server->ctx, server->cert_file, SSL_FILETYPE_PEM) <= 0) {
302 ERR_print_errors_fp(stderr);
303 exit(4);
304 }
305 if (SSL_CTX_check_private_key(server->ctx)<= 0) {
306 ERR_print_errors_fp(stderr);
307 exit(4);
308 };
309 server->usessl=1;
310 };
311#endif
312 if((server->flags & WS_LOCAL) == WS_LOCAL) {
313 web_log("[%s] (FLAG) Accepting only local connections\n",__ILWS_date(time(NULL),"%d/%b/%Y:%H:%M:%S %z"));
314 };
315 server->client=__ILWS_init_client_list(); // Initializate client list
316 server->gethandler=__ILWS_init_handler_list(); // Initializate handlers list
317 web_server_addhandler(server,"* /libwebserver.gif",_web_server_logo,0); // Add logo default handler
318
319#ifndef WIN32
320 signal(SIGPIPE,SIG_IGN);
321#endif
322 return 1;
323}
324
325
326/*********************************************************************************************************/
327/*
328 * This function shuts down a running web server, frees its allocated memory,
329 * and closes its socket. If called on a struct web_server that has already
330 * been shut down, this is a noop.
331 */
332void web_server_shutdown(struct web_server *server) {
333 // free and close things in opposite order of web_server_init
334
335 __ILWS_delete_handler_list(server->gethandler);
336 server->gethandler = NULL;
337 __ILWS_delete_client_list(server->client);
338 server->client = NULL;
339
340 if(server->socket > 0) {
341#ifdef WIN32
342 closesocket(server->socket);
343#else
344 close(server->socket);
345#endif
346 server->socket = -1;
347 }
348
349 if(server->weblog) {
350 fclose(server->weblog);
351 server->weblog = NULL;
352 __ILWS_free(server->logfile);
353 server->logfile = NULL;
354 }
355
356#ifdef WIN32
357 WSACleanup();
358#endif
359}
360
361/*********************************************************************************************************/
362/*
363 * Core function, return 2 if no client to process, 1 if some client processed, 0 if error
364 */
365int web_server_run(struct web_server *server) {
366 struct web_client *client;
367 int rt;
368 int tsalen=0;
369 int tsocket=0;
370 struct sockaddr_in tsa;
371 _logfile=server->weblog;
372 current_web_server=server;
373 if(server->client->next==NULL) {
374 //if(__ILWS_newdata(server->socket)); // does nothing but act like usleep
375 };
376// search for client
377 tsalen=sizeof(client->sa);
378 tsocket=accept(server->socket,(struct sockaddr *)&tsa,&tsalen);
379 if(tsocket==-1) {
380#ifdef WIN32
381 if(WSAGetLastError()!=WSAEWOULDBLOCK) {
382#else
383 if(errno!=EAGAIN) {
384#endif
385 fprintf(stderr,"What kind of error is this?\n"); // REMOVE
386 // client fucked up? warn somebody? (error or log or something?)
387 return 0; // don't process nothing
388 };
389 } else {
390 client=__ILWS_malloc(sizeof(struct web_client));
391 if(client==NULL) {
392 rt=shutdown(tsocket,SHUT_RDWR);
393#ifdef WIN32
394 rt=closesocket(tsocket);
395#else
396 rt=close(tsocket);
397#endif
398 LWSERR(LE_MEMORY);
399 return 0;
400 };
401 client->salen=tsalen;
402 client->socket=tsocket;
403 client->sa=tsa;
404#ifdef HAVE_OPENSSL
405 if((server->flags & WS_USESSL) == WS_USESSL) {
406 client->ssl = SSL_new(server->ctx);
407 SSL_set_fd(client->ssl,client->socket);
408 SSL_accept(client->ssl);
409 //client->cert = SSL_get_peer_certificate (client->ssl);
410 } else {
411 client->ssl=NULL;
412 };
413#endif
414 if(!__ILWS_add_client(server->client,client)) {
415 fprintf(stderr,"No client?\n"); // REMOVE
416 return 0;
417 }else {
418 web_log("%s - - [%s] Connected\n",inet_ntoa(client->sa.sin_addr),__ILWS_date(time(NULL),"%d/%b/%Y:%H:%M:%S %z")); //REMOBE
419 };
420 };
421 // end search for client
422 client=server->client; // init list
423 if(!client->next) { // think of Rocco Carbone (rocco@tecsiel.it)
424 return 2; // i don't need to process the list (nothing next) returns 2 if there is no client to process
425 };
426 while(client->next!=NULL) { // Process the client and swap to next;
427 current_web_client=client->next;
428 switch(client->next->stat) {
429 case 1: {
430 __ILWS_read_client(current_web_client);
431 };break;
432 case 2: {
433 __ILWS_process_client(current_web_client,server->gethandler);
434 };break;
435 case 4: {
436 __ILWS_output_client(current_web_client);
437 };break;
438 case 5: {
439 __ILWS_delete_next_client(client);
440 continue;
441 };break;
442 };
443 client=client->next;
444
445 };
446 return 1; // return 1 if something processed
447}
448
diff --git a/src/server.h b/src/server.h
new file mode 100644
index 00000000..be1abf8d
--- /dev/null
+++ b/src/server.h
@@ -0,0 +1,86 @@
1/* Copyrights 2002 Luis Figueiredo (stdio@netc.pt) All rights reserved.
2 *
3 * See the LICENSE file
4 *
5 * The origin of this software must not be misrepresented, either by
6 * explicit claim or by omission. Since few users ever read sources,
7 * credits must appear in the documentation.
8 *
9 * date: Sat Mar 30 14:44:42 GMT 2002
10 *
11 *
12 * --
13 *
14 */
15
16#ifndef _SERVER_H_
17#define _SERVER_H_
18
19#ifdef HAVE_CONFIG_H
20#include "config.h"
21#endif
22
23#include <stdio.h>
24#include <signal.h>
25#include <time.h>
26
27
28#include "memory.h"
29#include "client.h"
30#include "gethandler.h"
31#include "socket.h"
32#include "error.h"
33
34#include "debug.h"
35
36#ifdef WIN32
37
38#define SHUT_RDWR SD_BOTH
39#endif
40
41
42
43
44extern char *_libwebserver_version;
45extern struct web_server *current_web_server;
46struct web_server {
47 int socket;
48 unsigned int port;
49 char *logfile;
50 char *conffile;
51 time_t conffiletime; // tested only on win
52 char *mimefile;
53 char *dataconf;
54 FILE *weblog;
55 int flags;
56 struct gethandler *gethandler;
57 struct web_client *client;
58 int usessl;
59#ifdef HAVE_OPENSSL
60 char *cert_file;
61 SSL_CTX *ctx;
62#else
63 void *pad[2];
64#endif
65
66};
67#define WS_LOCAL 1 // Can be only accessed by localhost
68#define WS_USESSL 2 // Use ssl conections (openssl lib required)
69#define WS_USEEXTCONF 4 // Use external config file (new 0.5.0)
70
71
72void web_server_useSSLcert(struct web_server *,const char *); // Mandatory if WS_USESSL set
73void web_server_useMIMEfile(struct web_server*,const char *); // new on 0.5.2
74int web_server_init(struct web_server *,int,const char *,int);
75void web_server_shutdown(struct web_server *);
76int web_server_addhandler(struct web_server *,const char *,void (*)(),int);
77int web_server_aliasdir(struct web_server *, const char *, char *,int );
78int web_server_run(struct web_server *);
79int web_server_setup(struct web_server *server,const char *conffile); // (new on 0.5.0)
80char *web_server_getconf(struct web_server *, const char *,const char *); // (new on 0.5.0)
81
82
83#include "weblog.h"
84
85#endif
86
diff --git a/src/socket.c b/src/socket.c
new file mode 100644
index 00000000..16e90f2f
--- /dev/null
+++ b/src/socket.c
@@ -0,0 +1,74 @@
1/* Copyrights 2002 Luis Figueiredo (stdio@netc.pt) All rights reserved.
2 *
3 * See the LICENSE file
4 *
5 * The origin of this software must not be misrepresented, either by
6 * explicit claim or by omission. Since few users ever read sources,
7 * credits must appear in the documentation.
8 *
9 * date: Sat Mar 30 14:44:42 GMT 2002
10 *
11 * -- Basic socket operations
12 *
13 */
14
15
16#include "socket.h"
17
18
19/*********************************************************************************************************/
20/*
21 * socket operations
22 */
23int __ILWS_newdata(int sock) {
24 int ret;
25 struct timeval tv;
26 fd_set rfds;
27 FD_ZERO(&rfds);
28 FD_SET((unsigned)sock,&rfds);
29 tv.tv_usec=2;
30 tv.tv_sec=0;
31 ret=select(sock+1,&rfds,NULL,NULL,&tv);
32 FD_CLR((unsigned)sock,&rfds);
33 return ret;
34}
35
36/*********************************************************************************************************/
37/*
38 * to add a listen socket
39 */
40int __ILWS_listensocket(short port, int saddr) {
41 struct sockaddr_in sa;
42 int ret;
43 int sockopt=1; /* Rocco Was Here */
44 sa.sin_addr.s_addr=saddr;
45 sa.sin_port=htons((short)port);
46 sa.sin_family=AF_INET;
47 ret=socket(AF_INET,SOCK_STREAM,6); // tcp
48 if(ret==-1) {
49 return -1;
50 };
51 /* Rocco Was Here */
52 setsockopt(ret,SOL_SOCKET,SO_REUSEADDR,(char *)&sockopt,sizeof(sockopt)); // why? Rocco
53
54 if(bind(ret,(struct sockaddr *)&sa,sizeof(sa))==-1) {
55 close(ret); /* Rocco Was Here */
56 return -1;
57 };
58
59 if(listen(ret,512)==-1) { // 512 backlog
60 close(ret); /* Rocco Was Here */
61 return -1;
62 };
63 IFDEBUG(fprintf(stderr,"socket.c: Listen on port %d\n",port));
64 return ret;
65}
66
67/*********************************************************************************************************/
68/*
69 * as the read function
70 */
71int __ILWS_read(int sock,void *buf,size_t s) {
72 return recv(sock,buf,s,0);
73}
74
diff --git a/src/socket.h b/src/socket.h
new file mode 100644
index 00000000..81030fc7
--- /dev/null
+++ b/src/socket.h
@@ -0,0 +1,51 @@
1/* Copyrights 2002 Luis Figueiredo (stdio@netc.pt) All rights reserved.
2 *
3 * See the LICENSE file
4 *
5 * The origin of this software must not be misrepresented, either by
6 * explicit claim or by omission. Since few users ever read sources,
7 * credits must appear in the documentation.
8 *
9 * date: Sat Mar 30 14:44:42 GMT 2002
10 *
11 *
12 * --
13 *
14 */
15
16#ifndef _SOCKET_H_
17#define _SOCKET_H_
18
19#ifdef HAVE_CONFIG_H
20#include "config.h"
21#endif
22
23#include <stdio.h>
24#include <stdarg.h>
25
26#ifdef WIN32
27#include <winsock2.h>
28#include <io.h>
29#else
30#include <sys/socket.h>
31#include <netinet/in.h>
32#include <arpa/inet.h>
33#include <unistd.h>
34#include <sys/time.h> // struct tv
35#include <sys/types.h> // freebsd need it i gues that is no problem if other system includes it
36#endif
37
38
39
40
41
42#include "debug.h"
43
44extern int errno;
45
46int __ILWS_newdata(int);
47int __ILWS_listensocket(short, int);
48int __ILWS_read(int,void *,size_t);
49
50#endif
51
diff --git a/src/utils.c b/src/utils.c
new file mode 100644
index 00000000..1ca797f7
--- /dev/null
+++ b/src/utils.c
@@ -0,0 +1,155 @@
1/* Copyrights 2002 Luis Figueiredo (stdio@netc.pt) All rights reserved.
2 *
3 * See the LICENSE file
4 *
5 * The origin of this software must not be misrepresented, either by
6 * explicit claim or by omission. Since few users ever read sources,
7 * credits must appear in the documentation.
8 *
9 * date: 19:49,07-49-2002
10 *
11 * -- description: utilitys
12 *
13 */
14
15#include "utils.h"
16
17/*********************************************************************************************************/
18/*
19 * search a string in a string ignoring case
20 */
21char *__ILWS_stristr(char *str, const char *nedle) {
22 char *tmp1=str;
23 int ret=1;
24 int snedle=strlen(nedle),sstr=strlen(str);
25 if(strlen(str)<strlen(nedle))return NULL;
26 while((ret=strncasecmp(tmp1,nedle,snedle) && (unsigned int)(tmp1+snedle)<=(unsigned int) (str+sstr))) {
27 tmp1++;
28 };
29 if(strncasecmp(tmp1,nedle,snedle))
30 return NULL;
31 return tmp1;
32};
33
34/*********************************************************************************************************/
35/*
36 * gives a new temporary path(file) name that doesn't exists
37 */
38char *_tmpnameprefix="";
39
40char *__ILWS_tmpfname() {
41 char *ret=NULL;
42 char *tmpdir=NULL;
43 char nam[TMPNAMESIZE+1];
44 int i;
45 struct stat foostat;
46 if(tmpdir==NULL) {
47 tmpdir=getenv("TEMP");
48 };
49 if(tmpdir==NULL) {
50 tmpdir=getenv("TMP");
51 };
52 if(tmpdir==NULL) {
53 tmpdir=getenv("TMPDIR");
54 };
55 if(tmpdir==NULL) {
56 tmpdir=P_tmpdir; // defined in stdio.h
57 };
58 IFDEBUG(fprintf(stderr,"utils.c: Allocating temporary file name: "));
59 if(!(ret=__ILWS_malloc(strlen(tmpdir)+strlen(_tmpnameprefix)+TMPNAMESIZE+2))) {
60 LWSERR(LE_MEMORY);
61 return NULL;
62 };
63 srand(time(NULL)); // seed
64 do {
65 for(i=0;i<TMPNAMESIZE;i++) {
66
67 nam[i]=(rand()%2)?(rand()%26)+'A':(rand()%26)+'a';
68 }
69 nam[i]=0;
70 snprintf(ret,strlen(tmpdir)+strlen(_tmpnameprefix)+TMPNAMESIZE+2,"%s/%s%s",tmpdir,_tmpnameprefix,nam); // include '0'
71 IFDEBUG(fprintf(stderr,"Temporary filename is: %s, stat:%d\n",ret,stat(ret,&foostat)));
72 }while((stat(ret,&foostat)!=-1) && (lstat(ret,&foostat)!=-1)); // redundancy if win32 // <- race condition?
73 return ret;
74};
75
76
77
78/*********************************************************************************************************/
79/*
80 * an date function
81 */
82#define DATE_MAX 100
83char __ILWS_datem[DATE_MAX];
84
85char *__ILWS_date(time_t t,const char *format) {
86 struct tm *tm;
87 tm=localtime(&t);
88 strftime(__ILWS_datem,DATE_MAX,format,tm);
89 return __ILWS_datem;
90}
91
92/*********************************************************************************************************/
93/*
94 * wasn't me, base64decode
95 */
96static const unsigned char __ILWS_chtb[256] = {
97 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
98 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
99 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 62, 64, 64, 64, 63,
100 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 64, 64, 64, 64, 64, 64,
101 64, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
102 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 64, 64, 64, 64, 64,
103 64, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
104 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 64, 64, 64, 64, 64,
105 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
106 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
107 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
108 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
109 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
110 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
111 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
112 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64};
113
114
115int __ILWS_base64decode(char *bufplain, const char *bufcoded){
116 int nb;
117 const unsigned char *in;
118 unsigned char *out;
119 int nprbytes;
120
121 in = (const unsigned char *) bufcoded;
122 while (__ILWS_chtb[*(in++)] <= 63);
123 nprbytes = (in - (const unsigned char *) bufcoded) - 1;
124 nb = ((nprbytes + 3) / 4) * 3;
125
126 out = (unsigned char *) bufplain;
127 in = (const unsigned char *) bufcoded;
128
129 while (nprbytes > 4) {
130 *(out++) =
131 (unsigned char) (__ILWS_chtb[*in] << 2 | __ILWS_chtb[in[1]] >> 4);
132 *(out++) =
133 (unsigned char) (__ILWS_chtb[in[1]] << 4 | __ILWS_chtb[in[2]] >> 2);
134 *(out++) =
135 (unsigned char) (__ILWS_chtb[in[2]] << 6 | __ILWS_chtb[in[3]]);
136 in += 4;
137 nprbytes -= 4;
138 }
139 if (nprbytes > 1) {
140 *(out++) =
141 (unsigned char) (__ILWS_chtb[*in] << 2 | __ILWS_chtb[in[1]] >> 4);
142 }
143 if (nprbytes > 2) {
144 *(out++) =
145 (unsigned char) (__ILWS_chtb[in[1]] << 4 | __ILWS_chtb[in[2]] >> 2);
146 }
147 if (nprbytes > 3) {
148 *(out++) =
149 (unsigned char) (__ILWS_chtb[in[2]] << 6 | __ILWS_chtb[in[3]]);
150 }
151
152 nb -= (4 - nprbytes) & 3;
153 return nb;
154}
155
diff --git a/src/utils.h b/src/utils.h
new file mode 100644
index 00000000..7f8a8348
--- /dev/null
+++ b/src/utils.h
@@ -0,0 +1,59 @@
1/* Copyrights 2002 Luis Figueiredo (stdio@netc.pt) All rights reserved.
2 *
3 * See the LICENSE file
4 *
5 * The origin of this software must not be misrepresented, either by
6 * explicit claim or by omission. Since few users ever read sources,
7 * credits must appear in the documentation.
8 *
9 * file: utils.h
10 *
11 * description: Header
12 *
13 * date: 19:50,07-50-2002
14 */
15
16#ifndef _UTILS_H_
17#define _UTILS_H_
18
19#ifdef HAVE_CONFIG_H
20#include "config.h"
21#endif
22
23#include <stdio.h>
24#include <stdlib.h>
25#include <string.h>
26#include <sys/stat.h>
27#include <ctype.h>
28
29#ifdef TM_IN_SYS_TIME
30#include <sys/time.h>
31#else
32#include <time.h>
33#endif
34
35#include "debug.h"
36#include "error.h"
37#include "memory.h"
38
39#ifdef WIN32
40
41#define strncasecmp strnicmp
42#define snprintf _snprintf
43#define lstat stat
44#define vsnprintf _vsnprintf
45
46#endif
47
48
49#define TMPNAMESIZE 8
50extern char *_tmpnameprefix;
51
52
53char *__ILWS_stristr(char *, const char *);
54char *__ILWS_tmpfname();
55int __ILWS_base64decode(char *, const char *);
56char *__ILWS_date(time_t,const char *);
57
58
59#endif
diff --git a/src/web_server.h b/src/web_server.h
new file mode 100644
index 00000000..d34036b5
--- /dev/null
+++ b/src/web_server.h
@@ -0,0 +1,129 @@
1/* Copyrights 2002 Luis Figueiredo (stdio@netc.pt) All rights reserved.
2 *
3 * See the LICENSE file
4 *
5 * The origin of this software must not be misrepresented, either by
6 * explicit claim or by omission. Since few users ever read sources,
7 * credits must appear in the documentation.
8 *
9 * Fri Dec 28 12:51:11 GMT 2001
10 * Luis Figueiredo -- I Corrected the input to handle only data when \n\r(twice) is arrived
11 *
12 * Mon Feb 25 06:27:58 GMT 2002
13 * Luis Figueiredo -- Many corrections and new functions were added, until today
14 *
15 * Mon Mar 25 14:46:13 GMT 2002
16 * Luis Figueiredo -- wow, one month later..., discard web_server_addstr, and now process the stdout to server
17 * using a tmpfile for streaming (not so good, but :o))
18 * Wed Mar 27 18:59:10 GMT 2002
19 * Luis Figueiredo -- using regex instead of fnmatch(fnmatch only appears becouse of apache, i didn't knew it)
20 * Mon Apr 8 15:04:31 GMT 2002
21 * Luis Figueiredo -- Oh my.. kurt cobain is dead :o), restructured the code, separated into various files
22 * Wed Apr 10 20:02:55 GMT 2002
23 * Luis Figueiredo -- Make use of autoconf , removed open_memstream (doesn't work well w/ stdout structure on netbsd portability)
24 * linux slack 7.1 uses "extern FILE *stdout", netbsd uses "extern FILE __sF[]" so i cannot make use of pointers
25 * Mon Oct 7 16:56:15 GMT 2002
26 * Luis Figueiredo -- Repaired some safe bugs, Added vars to stats proposes, inserted an liblogo, added debug instructions
27 *
28 * VERSION 0.5.3
29 */
30
31#ifndef _WEB_SERVER_H_
32#define _WEB_SERVER_H_
33
34#include <stdio.h> // for struct FILE
35#include <time.h> // for time_t
36
37#ifdef __cplusplus
38extern "C"{
39#endif
40
41extern char *_libwebserver_version;
42extern char *_tmpnameprefix;
43extern int WEBTIMEOUT;
44
45struct _MultiPart {
46 char *id;
47 char *data;
48 unsigned int size;
49 char *filename;
50 void *pad;
51};
52char *__Header(char *);
53char *__Query(char *);
54char *__Post(char *);
55struct _MultiPart __MultiPart(char *);
56char *__Cookie(char *);
57
58extern struct ClientInfo {
59 int outfd;
60 char *inetname;
61 char *request;
62 char *method;
63 char *user;
64 char *pass;
65 char *(*Header)(char *);
66 char *(*Query)(char *);
67 char *(*Post)(char *);
68 char *(*Cookie)(char *);
69 char *(*Conf)(char *,char *); // new on 0.5.0
70 struct _MultiPart (*MultiPart)(char *);
71 void *__pad[9];
72
73} *ClientInfo; // PROTOTYPE
74
75struct web_server {
76 int socket;
77 unsigned int port;
78 char *logfile;
79 char *conffile;
80 time_t conffiletime; // tested only on win
81 char *mimefile;
82 char *dataconf;
83 FILE *weblog;
84 int flags;
85 struct gethandler *gethandler;
86 struct web_client *client;
87 int usessl;
88 void *pad[2]; // SSL pad
89};
90
91#define WS_LOCAL 1 // Can be only accessed by localhost (usefull for local programs gui's)
92#define WS_USESSL 2 // Use ssl conections (openssl lib required) (security transation) (there is no sense using WS_LOCAL & WS_USESSL together)
93#define WS_USEEXTCONF 4 // Use external config file (new 0.5.0)
94#define WS_DYNVAR 8 // Use dynamic variables on output (new 0.5.1)
95#define WS_USELEN 16 //Use Content-length calculator(new 0.5.1)
96
97
98void web_server_useSSLcert(struct web_server *,const char *); // useless if not using openssl
99void web_server_useMIMEfile(struct web_server *,const char *); // new on 0.5.2
100int web_server_init(struct web_server *,int,const char *,int);
101void web_server_shutdown(struct web_server *);
102char *web_server_getconf(struct web_server *,char *,char *);
103int web_server_addhandler(struct web_server *,const char *,void (*)(),int);
104int web_server_aliasdir(struct web_server *, const char *,char *,int); // new on 0.5.2
105int web_server_run(struct web_server *);
106
107
108int web_client_addfile(char *);
109extern unsigned char GLOBALGIFPAL[256][3];
110void web_client_gifsetpalette(const char *);
111int web_client_gifoutput(char *,int,int,int);
112
113void web_client_setcookie(char *,char *,char *,char *, char *,int); // improved on 0.5.1
114void web_client_deletecookie(char *); // improved on 0.5.1
115int web_client_setvar(char *,char *); //(new (0.5.1)
116char *web_client_getvar(char *); //(new (0.5.1)
117int web_client_delvar(char *); //(new (0.5.1)
118
119void web_client_HTTPdirective(char *);
120void web_client_contenttype(char *); // 0.5.2
121void web_log(const char *,...);
122
123
124#ifdef __cplusplus
125}
126#endif
127
128#endif
129
diff --git a/src/weblog.c b/src/weblog.c
new file mode 100644
index 00000000..2d892179
--- /dev/null
+++ b/src/weblog.c
@@ -0,0 +1,43 @@
1/* Copyrights 2002 Luis Figueiredo (stdio@netc.pt) All rights reserved.
2 *
3 * See the LICENSE file
4 *
5 * The origin of this software must not be misrepresented, either by
6 * explicit claim or by omission. Since few users ever read sources,
7 * credits must appear in the documentation.
8 *
9 * date: Sat Mar 30 14:44:42 GMT 2002
10 *
11 * -- web_log operations
12 *
13 */
14
15
16
17#include "weblog.h"
18
19FILE *_logfile=NULL;
20/*********************************************************************************************************/
21/*
22 * Open weblog file
23 */
24FILE *open_weblog(const char *logfile) {
25 FILE *ret;
26 ret=fopen(logfile,"a+");
27 _logfile=ret;
28 return ret;
29}
30
31/*********************************************************************************************************/
32/*
33 * Log to _logfile;
34 */
35void web_log(const char *fmt,...) {
36 va_list args;
37 if(_logfile) {
38 va_start(args,fmt);
39 vfprintf(_logfile,fmt,args);
40 va_end(args);
41 fflush(_logfile);
42 }
43}
diff --git a/src/weblog.h b/src/weblog.h
new file mode 100644
index 00000000..503c14f0
--- /dev/null
+++ b/src/weblog.h
@@ -0,0 +1,40 @@
1/* Copyrights 2002 Luis Figueiredo (stdio@netc.pt) All rights reserved.
2 *
3 * See the LICENSE file
4 *
5 * The origin of this software must not be misrepresented, either by
6 * explicit claim or by omission. Since few users ever read sources,
7 * credits must appear in the documentation.
8 *
9 * date: Sat Mar 30 14:25:25 GMT 2002
10 *
11 * memory functions
12 */
13
14#ifndef _WEBLOG_H_
15#define _WEBLOG_H_
16
17
18
19#ifdef HAVE_CONFIG_H
20#include "config.h"
21#endif
22
23#include <stdio.h>
24#include <stdlib.h>
25#include <stdarg.h>
26
27#ifdef WIN32
28#define snprintf _snprintf
29#endif
30
31
32
33#include "debug.h"
34
35extern FILE *_logfile;
36
37void web_log(const char *,...);
38FILE *open_weblog(const char *);
39char *mydate();
40#endif