<!DOCTYPE html public '-//W3C//DTD HTML 4.0 Transitional//EN'>
<html>
<head> 
  <meta name="robots" content="index,follow">
  <title>Libwww - the W3C Sample Code Library - a RISC OS port</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<h1>Libwww - the W3C Protocol Library - version 5.4.0 - a RISC OS port</h1>
<h2><a href="http://www.w3.org/Library/">http://www.w3.org/Library/</a></h2>

<p>This is a test RISC OS port of the <a href="http://www.w3.org/Library/">W3C libwww library</a>. According (roughly) to the website (not a direct quote, though!):</p>

<dl><dd>
<p>Libwww is a highly modular, general-purpose client side Web API written in C for <a href="http://www.w3.org/Library/User/Platform/">Unix and Windows (Win32)</a>. It's well suited for both small and large <a href="http://www.w3.org/Library/User/Applications.html">applications,</a> like <a href="http://www.w3.org/Amaya/">browser/editors</a>, <a href="http://www.w3.org/Robot/">robots</a>, <a href="http://www.w3.org/ComLine/">batch tools</a>, etc. Pluggable <a href="http://www.w3.org/Library/User/Guide/">modules provided with libwww</a> include complete <a href=http://www.w3.org/Library/"User/Guide/#HTTP">HTTP/1.1</a> (with caching, pipelining, PUT, POST, Digest Authentication, deflate, etc), <a href="http://www.w3.org/Library/User/Guide/#Interface1">MySQL logging</a>, <a href="http://www.w3.org/Library/User/Guide/#Access">FTP</a>, <a href="http://www.w3.org/Library/User/Guide/#HTML">HTML/4</a>, <a href="http://www.w3.org/Library/User/Guide/#Expat">XML</a> (expat), <a href="http://www.w3.org/Library/User/Guide/#Expat">RDF</a> (SiRPAC), WebDAV, and much more. The purpose of libwww is to serve as a testbed for protocol experiments.</p>
</dd></dl>

<p>(the MySQL functionality has not been included in this version).</p>

<p>Libwww can be used as a library to link other applications to. A number of
examples are included in the !libwww.Library.Example directory. Before using
libwww please take a look at the copyright and license documents in the
!libwww.Docs directory (transcribed <a href="#copyright">below</a>).</p>

<p>There are two versions of the library: a source distribution and a binary distribution. If you download both, you can safey copy one over the top of the other. The binary distribution can be used to link your own programs against and to build the example applications. The source can be used to build the binary distribution.</p>

<h2>Changes to the original source</h2>

<p>A source version of the library should be available from the same as the RISC
OS binary version. At any rate, it should be available from <a href="http://www.flypig.co.uk/">my website</a>. However, this version has been tailored for
use on RISC OS. The source files are all identical to the original W3C
version available from the <a href="http://www.w3.org/Library/">W3C website</a>,
apart from wwwconf.c, which has been tailored for use on RISC OS using gcc
and UnixLib. The arrangement of the files in directories has been changed to
suit RISC OS, but I've made an attempt to respect the layout of the original
as much as possible.</p>

<h2>Usage</h2>

<p>To link your own programs or the example programs with the library, you will only need the binary distribution.</p>

<p>If you want to use compile some code and link it to the library using gcc, you could try something like this:</p>

<p><code>gcc -mthrowback -Werror -Ilibwww: libwww:libwww.o -DHAVE_CONFIG_H <filein.c> -o <fileout></code></p>

<p>The important points to know are:</p>

<ul>
<li> <code>&lt;libwww$Dir&gt;</code> points to the application directory</li>
<li> <code>libwww:</code> or <code>&lt;libwww$path&gt;</code> points to all of the header include directories (and source directories if you have the full source version).</li>
<li><code>libwww:libwww.o</code> can be used to link against.</li>
</ul>

<p>If you are using the libwww header files, you *must* <code>#define HAVE_CONFIG_H</code>. Either add the following line:</p>

<p><code>#define HAVE_CONFIG_H 1</code></p>

<p>to the top of the wwwsys.c file, or add the <code>-DHAVE_CONFIG_H</code> switch to your gcc command line (as I've done in the example above).</p>

<h2>Building from the source</h2>

<p>To build the library from the sources, you will need a copy of the source distribution, as well as <a href="http://gccsdk.riscos.info/">gcc and UnixLib</a>.</p>

<p>It should then simply be a case of executing the BuildAll obey file that you'll find inside the application directory (!libwww.BuildAll).</p>

<p>It's likely to take quite a long time, so be prepared, and ideally run it from a TaskWindow.</p>

<h2>Credits</h2>
<p>All credit for libwww goes to those involved in creating the original code. See the <a href="http://www.w3.org/Library/#Authors">libwww website</a> for full details (I've included this as a link since the details might change, and the details do not seem to be included explicitly in the original version).</p>
<p>However, any bugs caused by porting it to RISC OS are entirely my fault.</p>

<h2>Contact</h2>
<p>I don't know a great deal about libwww, I just compiled it to run under RISC OS. However, if you want to contact me about it, I can be emailed at <a href="mailto:david-web01@flypig.co.uk">david-web01@flypig.co.uk</a>. For further information about contacting me, please see my website at <a href="http://www.flypig.co.uk">http://www.flypig.co.uk</a>.</p>

<a name="copyright">
<h2>libwww Copyright Notice</h2>

<p>[This notice should be placed within redistributed or derivative software code when
appropriate. This particular formulation of W3C's notice for inclusion in libwww code
became active on August 14 1998.]</p>

<p><a href="http://www.w3.org/Library/"><strong>libwww</strong></a>: W3C's implementation
of HTTP can be found at: <a href="http://www.w3.org/Library/">http://www.w3.org/Library/</a>

<dl>
  <dd><a href="http://www.w3.org/Consortium/Legal/">Copyright</a>  1995-2001 <a
    HREF="http://www.w3.org/">World Wide Web Consortium</a>, (<a
    HREF="http://www.lcs.mit.edu/">Massachusetts Institute of Technology</a>, <a
    HREF="http://www.inria.fr/">Institut National de Recherche en Informatique et en
    Automatique</a>, <a HREF="http://www.keio.ac.jp/">Keio University</a>). All Rights
    Reserved. This program is distributed under the <a
    href="http://www.w3.org/Consortium/Legal/">W3C's Intellectual Property License</a>. This
    program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
    without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    See W3C License <a href="http://www.w3.org/Consortium/Legal/">http://www.w3.org/Consortium/Legal/</a>
    for more details.</dd>
</dl>

<dl>
  <dd><a href="http://www.w3.org/CERN.html">Copyright  1995 CERN</a>. &quot;This product
    includes computer software created and made available by CERN. This acknowledgment shall
    be mentioned in full in any product which includes the CERN computer software included
    herein or parts thereof.&quot; </dd>
</dl>

<h2>W3C IPR SOFTWARE NOTICE</h2>

<h3>Copyright  1995-2002 <a href="http://www.w3.org/">World Wide Web
Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts Institute of
Technology</a>, <a href="http://www.inria.fr/">Institut National de Recherche
en Informatique et en Automatique</a>, <a href="http://www.keio.ac.jp/">Keio
University</a>). All Rights Reserved. http://www.w3.org/Consortium/Legal/</h3>

<p>This W3C work (including software, documents, or other related items) is
being provided by the copyright holders under the following license. By
obtaining, using and/or copying this work, you (the licensee) agree that you
have read, understood, and will comply with the following terms and
conditions:</p>

<p>Permission to use, copy, and modify this software and its documentation,
with or without modification,&nbsp; for any purpose and without fee or
royalty is hereby granted, provided that you include the following on ALL
copies of the software and documentation or portions thereof, including
modifications, that you make:   </p>
<ol>
  <li>The full text of this NOTICE in a location viewable to users of the
    redistributed or derivative work.</li>
  <li>Any pre-existing intellectual property disclaimers, notices, or terms
    and conditions. If none exist, a short notice of the following form
    (hypertext is preferred, text is permitted) should be used within the
    body of any redistributed or derivative code: "Copyright  <a
    href="http://www.w3.org/">World Wide Web Consortium</a>, (<a
    href="http://www.lcs.mit.edu/">Massachusetts Institute of Technology</a>,
    <a href="http://www.inria.fr/">Institut National de Recherche en
    Informatique et en Automatique</a>, <a href="http://www.keio.ac.jp/">Keio
    University</a>). All Rights Reserved.
  http://www.w3.org/Consortium/Legal/"</li>
  <li>Notice of any changes or modifications to the W3C files, including the
    date changes were made. (We recommend you provide URIs to the location
    from which the code is derived).</li>
</ol>
<p><font color="#ff0000"></font></p>
In addition, creators of derivitive works must include the full text of this
NOTICE in a location viewable to users of the derivitive work.

<p>THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS
MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE
ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.</p>

<p>COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
DOCUMENTATION.</p>

<p>The name and trademarks of copyright holders may NOT be used in
advertising or publicity pertaining to the software without specific, written
prior permission. Title to copyright in this software and any associated
documentation will at all times remain with copyright holders.</p>

<p>____________________________________</p>

<p>This formulation of W3C's notice and license became active on August 14
1998. See the <a
href="http://www.w3.org/Consortium/Legal/copyright-software-19980519.html">older
formulation</a> for the policy prior to this date. Please see our <a
href="http://www.w3.org/Consortium/Legal/IPR-FAQ.html">Copyright FAQ</a> for
common questions about using materials from our site, including specific
terms and conditions for packages like libwww, Amaya, and Jigsaw. Other
questions about this notice can be directed to <a
href="mailto:site-policy@w3.org">site-policy@w3.org</a> . <br>
&nbsp; </p>


<H2>expat Version 1.2 - XML Parser Toolkit - License</H2>

<p>Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd</p>

<p>Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:</p>

<ul>
<li>The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.</li>
</ul>

<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>

</body>
</html>
