Browse Source

import from pmade cvs

git-svn-id: file:///home/pjones/src/tmp/b2-svn/clo++/trunk@67 637e2b85-2e0a-0410-84ac-bd785500051d
master
pjones 13 years ago
parent
commit
1cfa7c1b08
81 changed files with 13465 additions and 0 deletions
  1. 54
    0
      build/RPM/clo.spec
  2. 220
    0
      configure.pl
  3. 10
    0
      docs/VERSION
  4. 4
    0
      docs/install.spec
  5. 2
    0
      docs/manual/Makefile
  6. 191
    0
      docs/manual/changelog.xml
  7. 102
    0
      docs/manual/credits.xml
  8. 93
    0
      docs/manual/manual.xml
  9. 605
    0
      docs/manual/optypes.xml
  10. 68
    0
      docs/manual/quickstart.xml
  11. 241
    0
      docs/manual/readme.xml
  12. 90
    0
      docs/manual/requirements.xml
  13. 138
    0
      docs/manual/todo.xml
  14. 2
    0
      docs/project/Makefile
  15. 57
    0
      docs/project/download.xml
  16. 62
    0
      docs/project/news.xml
  17. 63
    0
      docs/project/project.xml
  18. 62
    0
      docs/project/resources.xml
  19. 50
    0
      dtd/clo++.dtd
  20. 22
    0
      examples/example-01/Makefile
  21. 29
    0
      examples/example-01/example.cxx
  22. 22
    0
      examples/example-01/options.xml
  23. 22
    0
      examples/example-02/Makefile
  24. 36
    0
      examples/example-02/example.cxx
  25. 26
    0
      examples/example-02/options.xml
  26. 52
    0
      src/cmdline/clo++.1
  27. 159
    0
      src/cmdline/main.cxx
  28. 267
    0
      src/cmdline/options.cxx
  29. 152
    0
      src/cmdline/options.h
  30. 132
    0
      src/cmdline/options.xml
  31. 118
    0
      src/include/cloxx/app.h
  32. 94
    0
      src/include/cloxx/command.h
  33. 114
    0
      src/include/cloxx/config.h
  34. 60
    0
      src/include/cloxx/generator.h
  35. 65
    0
      src/include/cloxx/genfactory.h
  36. 93
    0
      src/include/cloxx/group.h
  37. 132
    0
      src/include/cloxx/option.h
  38. 80
    0
      src/include/cxxtools/cvs.h
  39. 371
    0
      src/include/cxxtools/strutil.h
  40. 487
    0
      src/library/app.cxx
  41. 266
    0
      src/library/command.cxx
  42. 174
    0
      src/library/common.h
  43. 472
    0
      src/library/config.cxx
  44. 422
    0
      src/library/generator_cxx.cxx
  45. 60
    0
      src/library/generator_cxx.h
  46. 174
    0
      src/library/generator_man.cxx
  47. 61
    0
      src/library/generator_man.h
  48. 96
    0
      src/library/generator_template.cxx
  49. 61
    0
      src/library/generator_template.h
  50. 77
    0
      src/library/generator_xml.cxx
  51. 61
    0
      src/library/generator_xml.h
  52. 104
    0
      src/library/genfactory.cxx
  53. 292
    0
      src/library/group.cxx
  54. 614
    0
      src/library/option.cxx
  55. 269
    0
      src/library/template_cxx_header.h
  56. 711
    0
      src/library/template_cxx_source.h
  57. 94
    0
      src/library/template_man.h
  58. 6
    0
      src/library/templates/convert.sh
  59. 284
    0
      src/library/templates/cxx_header.tpt
  60. 769
    0
      src/library/templates/cxx_source.tpt
  61. 126
    0
      src/library/templates/manpage.tpt
  62. 3
    0
      src/library/templates/relink.sh
  63. 92
    0
      src/library/tpthelper.h
  64. 187
    0
      src/library/usage.cxx
  65. 76
    0
      src/library/usage.h
  66. 12
    0
      tests/cxxtests/runtests/Makefile
  67. 353
    0
      tests/cxxtests/runtests/test_groups.pl
  68. 305
    0
      tests/cxxtests/runtests/test_mandatory.pl
  69. 590
    0
      tests/cxxtests/runtests/test_values.pl
  70. 130
    0
      tests/cxxtests/utility/test_harness.pl
  71. 169
    0
      tests/xmlfiles/everthing.xml
  72. 44
    0
      tests/xmlfiles/nocommands.xml
  73. 48
    0
      tests/xmlfiles/nocommands_help.xml
  74. 85
    0
      tests/xmlfiles/rm.xml
  75. 25
    0
      tests/xmlfiles/with_commands.xml
  76. 4
    0
      tools/bootstrap.sh
  77. 395
    0
      tools/cxxflags
  78. 637
    0
      tools/mkmf
  79. 106
    0
      tools/mkrelease.sh
  80. 199
    0
      xsl/clo++2html.xsl
  81. 165
    0
      xsl/convert3.xsl

+ 54
- 0
build/RPM/clo.spec View File

@@ -0,0 +1,54 @@
Summary: Command line parsing code & man page generator
Name: clo++
Version: 0.6.2
Release: 1
URL: http://pmade.org/pjones/software/clo++/index.html
Source0: %{name}-%{version}.tar.gz
License: BSD
Group: Development/Tools
BuildRoot: %{_tmppath}/%{name}-root
Packager: whunter@oz.agile.tv
Requires: libxml2 >= 2.4.7
BuildRequires: libxml2-devel >= 2.4.7
Prefix: /usr

%description
clo++ is a command line option parser generator. Given an XML file
that contains a description of your program and its options, clo++
can generate code to parse its command line.

%prep
%setup -q

%build
rm -rf $RPM_BUILD_ROOT
GXX3=`whereis g++3 | wc -w | sed 's/ //g'`
if [ "x$GXX3" != "x1" ]; then
CXX=g++3
else
CXX=g++
fi
./configure.pl
make all

%install
rm -rf $RPM_BUILD_ROOT
install -D -m 755 src/cmdline/clo++ $RPM_BUILD_ROOT/usr/bin/clo++
install -D -m 644 src/cmdline/clo++.1 $RPM_BUILD_ROOT/usr/share/man/man1/clo++.1

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
/usr/bin/clo++
/usr/share/man/man1/clo++.1.gz
%doc examples

%changelog
* Fri Jan 10 2003 Peter Jones <cloxx@pmade.org>
- Updated for version 0.6.2
* Tue Sep 3 2002 Peter Jones <cloxx@pmade.org>
- Made changes for version 0.6.1
* Fri May 3 2002 Warwick Hunter <whunter@oz.agile.tv>
- Initial build.

+ 220
- 0
configure.pl View File

@@ -0,0 +1,220 @@
#! /usr/bin/perl
######################################################################
# Copyright (C) 2002-2006 Peter J Jones (pjones@pmade.org)
# All Rights Reserved
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name of the Author nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR
# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
################################################################################
#
# configure.pl (bootstrap clo++)
# Peter J Jones (pjones@pmade.org)
#
################################################################################
#
# Includes
#
################################################################################
use strict;
use Getopt::Long;
use Cwd qw(cwd chdir);
################################################################################
#
# Constants
#
################################################################################
use constant DATE => 'Tue Jan 15 08:56:06 2002';
use constant ID => '$Id: configure.pl,v 1.1.1.1 2003/08/04 04:28:10 pjones Exp $';
################################################################################
#
# Global Variables
#
################################################################################
my $cwd = cwd();
my %clo;
my $dirsep = "/";

my $mkmf = "${cwd}${dirsep}tools${dirsep}mkmf";
my $cxxflags = "${cwd}${dirsep}tools${dirsep}cxxflags";
my $mkmf_flags = "--cxxflags '$cxxflags' --quiet ";

my $libname = "cloxx";
my $contrib_dir = "${cwd}${dirsep}src${dirsep}contrib";
my $install_spec= "${cwd}${dirsep}docs${dirsep}install.spec";

my $includes = "--include '${cwd}${dirsep}src${dirsep}include' ";
my $libraries = "--slinkwith '${cwd}${dirsep}src${dirsep}library,$libname' ";

my @extra_compile = (
"${cwd}${dirsep}src${dirsep}library",
"${cwd}${dirsep}src${dirsep}cmdline",
);
################################################################################
#
# Code Start
#
################################################################################
$|++;

if (not defined $ENV{'CXX'}) {
print STDERR "**** your CXX environment variable is not set. clo++ needs this ****\n";
print STDERR "**** variable to find your C++ compiler. Please set it to the ****\n";
print STDERR "**** path to your compiler and re-run configure.pl. Thanks. ****\n";
exit 1;
}

GetOptions(
\%clo,
'help',
'developer',
'xml2-config=s',
'prefix=s',
'bindir=s',
'mandir=s',
) or usage();
$clo{'help'} && usage();

sub usage {
print "Usage: $0 [options]\n", <<EOT;
--developer Turn on developer mode

--prefix path Set the install prefix to path [/usr/local]
--bindir path Set the install bin dir to path [PREFIX/bin]
--mandir path Set the install man dir to path [PREFIX/man]

--xml2-config path Use the xml2-config script given by path.
EOT
exit;
}

$clo{'prefix'} ||= "/usr/local";
$clo{'bindir'} ||= "$clo{'prefix'}/bin";
$clo{'mandir'} ||= "$clo{'prefix'}/man";
if ($clo{'developer'}) {
$mkmf_flags .= "--developer ";
}

find_contrib_libs();

print "Generating clo++ Makefiles ";
generate_toplevel_makefile();
generate_library_makefile();
generate_cmdline_makefile();
print "\n";
print "+---------------------------------------------------------------+\n";
print "| Join the announcement mailing list for release annoucements |\n";
print "| http://pmade.org/mailman/listinfo/cloxx-announce |\n";
print "| |\n";
print "| Join the users mailing list for help with clo++ |\n";
print "| http://pmade.org/mailman/listinfo/cloxx-users |\n";
print "+---------------------------------------------------------------+\n";
################################################################################
sub find_contrib_libs {
my @files = glob("$contrib_dir${dirsep}*");
my ($xmlwrapp, $libtpt);

foreach my $file (@files) {
if ($file =~ /xmlwrapp/) {
$xmlwrapp = $file;
} elsif ($file =~ /libtpt/) {
$libtpt = $file;
}
}

if (not defined $xmlwrapp) {
print STDERR "$0: can't locate xmlwrapp, your package is incomplete\n";
exit 1;
}

my $xmlextra = ''; if ($clo{'xml2-config'}) {$xmlextra = "--xml2-config '$clo{'xml2-config'}'";}
system("cd $xmlwrapp ; $^X configure.pl --contrib --disable-xslt $xmlextra") and exit 1;

my $xmlwrapp_config = "$xmlwrapp${dirsep}xmlwrapp-config";
if (not -e $xmlwrapp_config) {
print STDERR "$0: failed to configure xmlwrapp\n";
exit 1;
}

my ($xmlwrapp_includes, $xmlwrapp_libraries);
chomp($xmlwrapp_includes = `$xmlwrapp_config --cxxflags`);
chomp($xmlwrapp_libraries = `$xmlwrapp_config --libs`);

if (not defined $libtpt) {
print STDERR "$0: can't locate libtpt, your package is incomplete\n";
exit 1;
}

print "Configuring libtpt ...\n";
system("cd $libtpt ; $^X configure.pl --bundle") and exit 1;

$ENV{'CXXFLAGS'} .= " $xmlwrapp_includes";
$ENV{'LDFLAGS'} .= " $xmlwrapp_libraries";
unshift(@extra_compile, $xmlwrapp);

$includes .= "--include '$libtpt${dirsep}inc' ";
$libraries .= "--slinkwith '$libtpt${dirsep}src${dirsep}lib,tpt' ";
unshift(@extra_compile, "$libtpt${dirsep}src${dirsep}lib");
}
################################################################################
sub generate_toplevel_makefile {
unless (open(SPEC, ">$install_spec")) {
print STDERR "\n$0: can't open $install_spec: $!\n";
exit 1;
}

print SPEC "bindir=$clo{'bindir'}\n";
print SPEC "mandir=$clo{'mandir'}\n";
print SPEC "binary src${dirsep}cmdline${dirsep}clo++\n";
print SPEC "man 1 src${dirsep}cmdline${dirsep}clo++.1\n";
close SPEC;

system("$^X $mkmf $mkmf_flags --with-test '$cwd${dirsep}tests' --install $install_spec --wrapper @extra_compile");
print ".";
}
################################################################################
sub generate_library_makefile {
if (not chdir("$cwd${dirsep}src${dirsep}library")) {
print STDERR "\n$0: can't chdir to src${dirsep}library: $!\n";
exit 1;
}

system("$^X $mkmf $mkmf_flags $includes --static-lib $libname *.cxx");
print ".";
chdir $cwd;
}
#################################################################################
sub generate_cmdline_makefile {
if (not chdir("$cwd${dirsep}src${dirsep}cmdline")) {
print STDERR "\n$0: can't chdir to src${dirsep}cmdline: $!\n";
exit 1;
}

system("$^X $mkmf $mkmf_flags $includes $libraries --one-exec clo++ *.cxx");
print ".";
chdir $cwd;
}

+ 10
- 0
docs/VERSION View File

@@ -0,0 +1,10 @@
0.6.4 REL-0_6_4 2003/06/21
0.6.3 REL-0_6_3 2003/04/09
0.6.2 REL-0_6_2 2003/01/12
0.6.1 REL-0_6_1 2002/09/04
0.6.0 REL-0_6_0 2002/04/30
0.5.0 REL-0_5_0 2002/04/11
0.4.0 --------- ----------
0.3.0 --------- 2001/01/28
0.2.0 --------- 2000/10/31
0.1.0 --------- 2000/10/27

+ 4
- 0
docs/install.spec View File

@@ -0,0 +1,4 @@
bindir=/usr/local/bin
mandir=/usr/local/man
binary src/cmdline/clo++
man 1 src/cmdline/clo++.1

+ 2
- 0
docs/manual/Makefile View File

@@ -0,0 +1,2 @@
PROJECT_NAME=clo++
.include "${HOME}/develop/project-xslt/docbook/docbook.mk"

+ 191
- 0
docs/manual/changelog.xml View File

@@ -0,0 +1,191 @@
<chapter id="changelog"><title>Revision History</title>
<!--################################################################-->
<section id="cl-064"><title>Version 0.6.4</title>
<itemizedlist>
<listitem>
<para>
Made a change to the generated code to surpress a
compiler warning about an unused variable.
</para>
</listitem>

<listitem>
<para>
Added the cxx_include variable so you can have the generated
C++ header file include other header files.
</para>
</listitem>

<listitem>
<para>
Added xsl/clo++2html.xsl to show how to convert the
clo++ XML file to HTML.
</para>
</listitem>

<listitem>
<para>
Added work around in build scripts for a bug in the Perl
5.8 regex parser thanks to Andy Chou.
</para>
</listitem>

<listitem>
<para>
Updated xmlwrapp to version 0.4.2 and libtpt to version
1.20.1a.
</para>
</listitem>
</itemizedlist>
</section>
<!--################################################################-->
<section id="cl-063"><title>version 0.6.3</title>
<para>
Version 0.6.3 is a bug fix release.
</para>

<itemizedlist>
<listitem>
<para>
Upgraded xmlwrapp to version 0.4.1. clo++ should compile
against libxml2 version >= 2.5 now.
</para>
</listitem>

<listitem>
<para>
Upgraded libtpt to version 1.20 with a custom patch to
fix a bug on 64bit platforms.
</para>
</listitem>

<listitem>
<para>
Fixed a few bugs that caused bad C++ code to be
generated for complex subcommands.
</para>
</listitem>
</itemizedlist>
</section>
<!--################################################################-->
<section id="cl-062"><title>version 0.6.2</title>
<para>
the following changes where made to clo++ for version 0.6.2.
</para>

<itemizedlist>
<listitem>
<para>
Added support for the Sun Forte compiler using STLport.
</para>
</listitem>

<listitem>
<para>
upgraded libtpt to version 1.10.5.
</para>
</listitem>
</itemizedlist>
</section>
<!--################################################################-->
<section id="cl-061"><title>version 0.6.1</title>
<para>
the following changes where made to clo++ for version 0.6.1.
</para>

<itemizedlist>
<listitem>
<para>
added missing include of the &lt;iterator&gt; header
file in two source files (thanks goes to doug henry).
</para>
</listitem>

<listitem>
<para>
changed the example makefiles so that gnumake would know
that the .cxx file extension is for c++ files. (thanks
goes to richard booth).
</para>
</listitem>

<listitem>
<para>
added rpm spec file in build/rpm. (thanks goes to
warwick hunter).
</para>
</listitem>

<listitem>
<para>
upgraded libtpt to version 1.0.1 and xmlwrapp to version
0.2.2.
</para>
</listitem>
</itemizedlist>
</section>
<!--################################################################-->
<section id="cl-060"><title>Version 0.6.0</title>
<para>
The following changes where made to clo++ for version 0.6.0.
</para>

<itemizedlist>
<listitem>
<para>
clo++ can now generate man pages.
</para>
</listitem>

<listitem>
<para>
Modified clo++.dtd. Added elements to the program
element for man page generation. Removed the
program/description element and replaced it with the new
program/heading element.
</para>
</listitem>

<listitem>
<para>
Added new XSLT file to convert old clo++ version 0.3.0
XML files to the new XML format.
</para>
</listitem>

<listitem>
<para>
Added another chapter to the documentation.
</para>
</listitem>

<listitem>
<para>
Upgraded libtpt to 0.9.5.
</para>
</listitem>
</itemizedlist>
</section>
<!--################################################################-->
<section id="cl-050"><title>Version 0.5.0</title>
<para>
Version 0.5.0 was a complete rewrite.
</para>
</section>
<!--################################################################-->
<section id="cl-040"><title>Version 0.4.0</title>
<para>
Version 0.4.0 was never released to the public.
</para>
</section>
<!--################################################################-->
<section id="cl-030"><title>Version 0.3.0</title>
<para>
First public version.
</para>
</section>
<!--################################################################-->
</chapter>
<!--
vim:ft=docbk
-->

+ 102
- 0
docs/manual/credits.xml View File

@@ -0,0 +1,102 @@
<appendix id="cedits"><title>Credits</title>
<!--################################################################-->
<para>
This section is dedicated to those people who contributed in some
way to clo++. If I have forgotten you, please forgive me and drop me
a note.
</para>
<!--################################################################-->
<section id="credits-all"><title>Continued Contributions</title>
<para>
The following people make on-going contributions to clo++
</para>

<itemizedlist>
<listitem>
<para>
<ulink url="http://pmade.org/cgi-bin/people.cgi?p=pj">Peter Jones</ulink>
</para>

<itemizedlist>
<listitem>
<para>
Project maintainer and lead developer.
</para>
</listitem>
</itemizedlist>
</listitem>

<listitem>
<para>
<ulink url="http://pmade.org/cgi-bin/people.cgi?p=if">Isaac Foraker</ulink>
</para>

<itemizedlist>
<listitem>
<para>
Author of the
<ulink url="http://tazthecat.net/~isaac/libtpt/">template system</ulink>
that clo++ uses.
</para>
</listitem>

<listitem>
<para>
Likes to report bugs.
</para>
</listitem>
</itemizedlist>
</listitem>

<listitem>
<para>
Warwick Hunter

<itemizedlist>
<listitem>
<para>
Contributed an RPM spec file.
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
</itemizedlist>
</section>
<!--################################################################-->
<section id="credits-030"><title>Contributions to Version 0.3.0</title>
<para>
The following people either contributed patches or suggestions to
clo++ version 0.3.0. Since version 0.3.0 was not supported, their
hard work was never applied to the source code.
</para>

<para>
Although their contributions where not used in clo++, these are the
people that inspired clo++ version 0.5.0.
</para>

<itemizedlist>
<listitem>
<para>
Matthias Berse
</para>
</listitem>

<listitem>
<para>
Christophe de Vienne
</para>
</listitem>

<listitem>
<para>
Diab Jerius
</para>
</listitem>
</itemizedlist>
</section>
</appendix>
<!--
vim:ft=docbk
-->

+ 93
- 0
docs/manual/manual.xml View File

@@ -0,0 +1,93 @@
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<book id="index" xmlns:xi="http://www.w3.org/2001/XInclude">
<bookinfo>
<title>clo++ Users Manual</title>

<authorgroup>
<author>
<firstname>Peter</firstname>
<surname>Jones</surname>
<affiliation>
<address>
<email>cloxx@pmade.org</email>
</address>
</affiliation>
</author>
</authorgroup>

<copyright>
<year>2001</year>
<year>2002</year>
<year>2003</year>
<holder>Peter Jones (http://pmade.org/pjones/)</holder>
</copyright>

<legalnotice>
<para>
Redistribution and use in source (SGML DocBook) and 'compiled'
forms (SGML, HTML, PDF, PostScript, RTF and so forth) with or
without modification, are permitted provided that the following
conditions are met:
</para>

<orderedlist>
<listitem>
<para>
Redistributions of source code (SGML DocBook) must retain
the above copyright notice, this list of conditions and the
following disclaimer as the first lines of this file
unmodified.
</para>
</listitem>

<listitem>
<para>
Redistributions in compiled form (transformed to other DTDs,
converted to PDF, PostScript, RTF and other formats) must
reproduce the above copyright notice, this list of
conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
</para>
</listitem>
</orderedlist>

<important>
<para>
THIS DOCUMENTATION IS PROVIDED BY THE AUTHORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
</para>
</important>
</legalnotice>
<abstract>
<para>
This is the manual for clo++. It describes how to use clo++
and the format of the XML input file.
</para>

<para>
The latest version of this manual can be found at
<ulink url="http://pmade.org/software/clo++/">http://pmade.org/software/clo++/</ulink>.
</para>
</abstract>
</bookinfo>

<xi:include href="readme.xml"/>
<xi:include href="quickstart.xml"/>
<xi:include href="optypes.xml"/>
<xi:include href="requirements.xml"/>
<xi:include href="changelog.xml"/>
<xi:include href="todo.xml"/>
<xi:include href="credits.xml"/>
</book>

+ 605
- 0
docs/manual/optypes.xml View File

@@ -0,0 +1,605 @@
<chapter id="optypes"><title>Option Types</title>
<para>
This chapter deals with the various option types. Options are
expressed in the XML file using <constant>&lt;option&gt;</constant>
elements.
</para>

<para>
Each option has optional and mandatory attributes. It also has some
optional and mandatory elements. Most options share the same
attributes and elements.
</para>

<table><title>Common Option Attributes</title>
<tgroup cols="5">
<thead>
<row>
<entry>Attribute Name</entry>
<entry>Optional or Mandatory</entry>
<entry>Description</entry>
<entry>Valid Values</entry>
<entry>Default Value</entry>
</row>
</thead>
<tbody>
<row>
<entry>type</entry>
<entry>Mandatory</entry>
<entry>The option type</entry>
<entry>flag, bool, enum, int, double or string</entry>
<entry>None, you must give an option type</entry>
</row>

<row>
<entry>id</entry>
<entry>Mandatory</entry>
<entry>Unique ID</entry>
<entry>An alpha-numeric value</entry>
<entry>None, you must give an option id</entry>
</row>

<row>
<entry>mandatory</entry>
<entry>Optional</entry>
<entry>Whether or not this option must be used</entry>
<entry>yes or no</entry>
<entry>no</entry>
</row>

<row>
<entry>strict</entry>
<entry>Optional</entry>
<entry>Strict options cannot be repeated</entry>
<entry>yes or no</entry>
<entry>no</entry>
</row>

<row>
<entry>location</entry>
<entry>Optional</entry>
<entry>Allowed locations where the option can be used</entry>
<entry>commandline, configfile or both</entry>
<entry>both</entry>
</row>

<row>
<entry>hidden</entry>
<entry>Optional</entry>
<entry>Whether or not this option should be hidden from help messages and man pages</entry>
<entry>yes or no</entry>
<entry>no</entry>
</row>
</tbody>
</tgroup>
</table>

<table><title>Common Option Child Elements</title>
<tgroup cols="2">
<thead>
<row>
<entry>Element Name</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>name</entry>
<entry><para>
Option name. This element may be repeated for each
name you want to give to an option.
</para><para>
Single character names make short options (ie,
-a) and multi-character names make long options
(ie, --alpha). The first
</para><para>
The first name given will be the master name.
The master name is the one presented to the user
in error and help messages.
</para></entry>
</row>

<row>
<entry>comment</entry>
<entry>Small description of the option that is used in help messages.</entry>
</row>

<row>
<entry>description</entry>
<entry><para>
Long description of the option.
</para><para>
The description is not given directly in the
<constant>&lt;description&gt;</constant> element but
rather in child elements called
<constant>&lt;para&gt;</constant> similar to
DocBook.
</para></entry>
</row>
</tbody>
</tgroup>
</table>
<!--################################################################-->
<section id="op-flag"><title>Flag Option Type</title>
<para>
The flag option does not take an argument, thus it is used only
to know if the option is on the command line. The first time it
appears on the command line it will negate the default value.
Each time it appears after that it will negate the last value.
</para>

<para>
To disable this negation behavior, make the option strict.
this will prevent the option from repeating.
</para>

<para>
Unlike other option types, flag options cannot use modifiers.
Flag options can, like all options, be mandatory, although it
does not make much sense.
</para>

<para>
Flag options can also be autothrow options.
</para>

<table><title>Flag Option Attributes</title>
<tgroup cols="5">
<thead>
<row>
<entry>Attribute Name</entry>
<entry>Optional or Mandatory</entry>
<entry>Description</entry>
<entry>Valid Values</entry>
<entry>Default Value</entry>
</row>
</thead>
<tbody>
<row>
<entry>default</entry>
<entry>Optional</entry>
<entry>The initial value of the option.</entry>
<entry>A valid boolean value</entry>
<entry>false</entry>
</row>

<row>
<entry>autothrow</entry>
<entry>Optional</entry>
<entry>Make this option an autothrow option.</entry>
<entry>Unique alpha-numeric ID</entry>
<entry>None, you must give an id</entry>
</row>
</tbody>
</tgroup>
</table>

<para>Example:
<screen>
<![CDATA[
<option id="flagid" type="flag">
<name>myflag</name>
<name>m</name>

<comment>my flag option</comment>
</option>
]]>
</screen>
</para>
</section>
<!--################################################################-->
<section id="op-bool"><title>Bool Option Type</title>
<para>
The bool type option is used to set a boolean value from a
string argument. The given argument will be tested against
allowed words for true and false. Words that are not recognized
as being true or false will not be allowed.
</para>

<para>
You can control which words are considered true or false by
using the <constant>&lt;true&gt;</constant> and
<constant>&lt;false&gt;</constant> elements inside the
<constant>&lt;config&gt;</constant> element.
</para>

<table><title>Bool Option Attributes</title>
<tgroup cols="5">
<thead>
<row>
<entry>Attribute Name</entry>
<entry>Optional or Mandatory</entry>
<entry>Description</entry>
<entry>Valid Values</entry>
<entry>Default Value</entry>
</row>
</thead>
<tbody>
<row>
<entry>default</entry>
<entry>Optional</entry>
<entry>The initial value of the option</entry>
<entry>A valid boolean value</entry>
<entry>false</entry>
</row>

<row>
<entry>modifier</entry>
<entry>Optional</entry>
<entry>The modifier to use, if any</entry>
<entry>none, vector or map</entry>
<entry>none</entry>
</row>

<row>
<entry>argname</entry>
<entry>Optional</entry>
<entry>The string to display for the name of the argument</entry>
<entry>A short string</entry>
<entry>bool</entry>
</row>
</tbody>
</tgroup>
</table>

<para>Example:
<screen>
<![CDATA[
<option id="boolid" type="bool">
<name>mybool</name>
<name>m</name>

<comment>my bool option</comment>
</option>
]]>
</screen>
</para>
</section>
<!--################################################################-->
<section id="op-enum"><title>Enum Option Type</title>
<para>
The enum type option takes a string argument that must match one
of the allowed strings for the given option. The string is then
translated into an enum member.
</para>

<table><title>Enum Option Attributes</title>
<tgroup cols="5">
<thead>
<row>
<entry>Attribute Name</entry>
<entry>Optional or Mandatory</entry>
<entry>Description</entry>
<entry>Valid Values</entry>
<entry>Default Value</entry>
</row>
</thead>
<tbody>
<row>
<entry>default</entry>
<entry>Optional</entry>
<entry>The initial value of the option</entry>
<entry>The name of one of the enum members</entry>
<entry>The first defined enum member</entry>
</row>

<row>
<entry>modifier</entry>
<entry>Optional</entry>
<entry>The modifier to use, if any</entry>
<entry>none, vector or map</entry>
<entry>none</entry>
</row>

<row>
<entry>argname</entry>
<entry>Optional</entry>
<entry>The string to display for the name of the argument</entry>
<entry>A short string</entry>
<entry>enum</entry>
</row>
</tbody>
</tgroup>
</table>

<table><title>Enum Option Child Elements</title>
<tgroup cols="2">
<thead>
<row>
<entry>Element Name</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>enum</entry>
<entry><para>
The enum element is used to add a member to the
enum. It has two attributes.
</para><para>
The <constant>id</constant> attribute will be
appended to the option id to create the enum
member name.
</para><para>
The <constant>name</constant> attribute is the
name the user will use on the command line for
this member.
</para></entry>
</row>
</tbody>
</tgroup>
</table>

<para>Example:
<screen>
<![CDATA[
<option id="fruit" type="enum" argname="fruit">
<name>fruit</name>
<name>f</name>

<enum id="apl" name="apple"/>
<enum id="org" name="orange"/>
<enum id="str" name="strawberry"/>

<comment>give a fruit you want me to eat</comment>
</option>
]]>
</screen>
</para>
</section>
<!--################################################################-->
<section id="op-int"><title>Int Option Type</title>
<para>
The int option takes a string argument that is converted to an
integer. The the entire string cannot be converted to an
integer, an error will occur.
</para>

<table><title>Int Option Attributes</title>
<tgroup cols="5">
<thead>
<row>
<entry>Attribute Name</entry>
<entry>Optional or Mandatory</entry>
<entry>Description</entry>
<entry>Valid Values</entry>
<entry>Default Value</entry>
</row>
</thead>
<tbody>
<row>
<entry>default</entry>
<entry>Optional</entry>
<entry>The initial value of the option</entry>
<entry>A valid integer value</entry>
<entry>0</entry>
</row>

<row>
<entry>modifier</entry>
<entry>Optional</entry>
<entry>The modifier to use, if any</entry>
<entry>none, vector or map</entry>
<entry>none</entry>
</row>

<row>
<entry>argname</entry>
<entry>Optional</entry>
<entry>The string to display for the name of the argument</entry>
<entry>A short string</entry>
<entry>int</entry>
</row>
</tbody>
</tgroup>
</table>

<table><title>Int Option Child Elements</title>
<tgroup cols="2">
<thead>
<row>
<entry>Element Name</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>range</entry>
<entry><para>
The range element allows you to restrict the
value of the given integer using either a
minimum value, maximum value or both.
</para><para>
The <constant>min</constant> attribute sets the
minimum value that will be accepted.
</para><para>
The <constant>max</constant> attribute sets the
maximum value that will be accepted.
</para></entry>
</row>
</tbody>
</tgroup>
</table>

<para>Example:
<screen>
<![CDATA[
<option id="age" type="int">
<name>age</name>
<name>a</name>

<range min="0" max="150"/>

<comment>give your age</comment>
</option>

<option id="count" type="int">
<name>count</name>
<name>c</name>

<range min="0"/>

<comment>give the number of times to repeat</comment>
</option>

<option id="number" type="int">
<name>number</name>
<name>n</name>

<comment>give a number</comment>
</option>
]]>
</screen>
</para>
</section>
<!--################################################################-->
<section id="op-double"><title>Double Option Type</title>
<para>
The double option is similar to the int option. It takes a
string argument that is converted into a real number. If the
entire string cannot be converted and error will occur.
</para>

<table><title>Double Option Attributes</title>
<tgroup cols="5">
<thead>
<row>
<entry>Attribute Name</entry>
<entry>Optional or Mandatory</entry>
<entry>Description</entry>
<entry>Valid Values</entry>
<entry>Default Value</entry>
</row>
</thead>
<tbody>
<row>
<entry>default</entry>
<entry>Optional</entry>
<entry>The initial value of the option</entry>
<entry>A valid real number</entry>
<entry>0.0</entry>
</row>

<row>
<entry>modifier</entry>
<entry>Optional</entry>
<entry>The modifier to use, if any</entry>
<entry>none, vector or map</entry>
<entry>none</entry>
</row>

<row>
<entry>argname</entry>
<entry>Optional</entry>
<entry>The string to display for the name of the argument</entry>
<entry>A short string</entry>
<entry>double</entry>
</row>
</tbody>
</tgroup>
</table>

<table><title>Double Option Child Elements</title>
<tgroup cols="2">
<thead>
<row>
<entry>Element Name</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>range</entry>
<entry><para>
The range element allows you to restrict the
value of the given double using either a
minimum value, maximum value or both.
</para><para>
The <constant>min</constant> attribute sets the
minimum value that will be accepted.
</para><para>
The <constant>max</constant> attribute sets the
maximum value that will be accepted.
</para></entry>
</row>
</tbody>
</tgroup>
</table>

<para>Example:
<screen>
<![CDATA[
<option id="mydouble" type="double">
<name>mydouble</name>
<name>m</name>

<comment>give me a double</comment>
</option>
]]>
</screen>
</para>
</section>
<!--################################################################-->
<section id="op-string"><title>String Option Type</title>
<para>
The string option takes a string argument that is not parsed in
any way.
</para>

<table><title>String Option Attributes</title>
<tgroup cols="5">
<thead>
<row>
<entry>Attribute Name</entry>
<entry>Optional or Mandatory</entry>
<entry>Description</entry>
<entry>Valid Values</entry>
<entry>Default Value</entry>
</row>
</thead>
<tbody>
<row>
<entry>default</entry>
<entry>Optional</entry>
<entry>The initial value of the option</entry>
<entry>A string value</entry>
<entry>An empty string</entry>
</row>

<row>
<entry>modifier</entry>
<entry>Optional</entry>
<entry>The modifier to use, if any</entry>
<entry>none, vector or map</entry>
<entry>none</entry>
</row>

<row>
<entry>argname</entry>
<entry>Optional</entry>
<entry>The string to display for the name of the argument</entry>
<entry>A short string</entry>
<entry>string</entry>
</row>
</tbody>
</tgroup>
</table>

<para>Example:
<screen>
<![CDATA[
<option id="first" type="string">
<name>first</name>
<name>f</name>

<comment>give your first name</comment>
</option>
]]>
</screen>
</para>
</section>
<!--################################################################-->
</chapter>
<!--
vim:ft=docbk
-->

+ 68
- 0
docs/manual/quickstart.xml View File

@@ -0,0 +1,68 @@
<chapter id="quickstart"><title>Quick Start</title>
<para>
We start off with a quick start guide. This is just a fast overview
to get you working with clo++ as soon as possible.
</para>

<!--##############################################################-->
<section id="qs-compile"><title>Building and Installing</title>
<para>
You build clo++ using the <filename>configure.pl</filename> perl
script that comes in the tarball. If you have the
<filename>xml2-config</filename> script that comes with
<ulink url="http://xmlsoft.org/">libxml2</ulink>

in your path you can just run <filename>configure.pl</filename>.
</para>

<para>
If <filename>xml2-config</filename> is not in your path, you can
use the <command>--xml2-config</command> option to
<filename>configure.pl</filename>.
</para>

<para>
After you run <filename>configure.pl</filename> you are ready to
run <command>make</command>. Then, after everything compiles, you
can run <command>make install</command>.
</para>
</section>
<!--##############################################################-->
<section id="qs-xml"><title>Writing Your First clo++ XML File</title>
<para>
Before you can run clo++, you should have an XML file ready. The
XML file should describe the command line options that you wish
to parse.
</para>

<para>
A good place to start is the <filename>examples</filename>
directory. There are some example XML files and C++ code that
uses the generated C++ code. You may also want to look at the
DTD, it is in the <filename>dtd</filename> directory.
</para>
</section>
<!--##############################################################-->
<section id="qs-run"><title>Running clo++</title>
<para>
After you have an XML file all ready to go, you can run clo++. I
assume that you want to generate C++ code, so we are going to
use the <command>-o c++</command> option to clo++.
</para>

<para>
If your XML file is called <filename>options.xml</filename> then
this is the command that you would run to generate the C++
header file and source file.<screen>clo++ -o c++ options.xml</screen>
</para>

<para>
To learn about the other command line options that clo++ can
take, try running <command>clo++ -h</command>.
</para>
</section>
</chapter>
<!--
vim:ft=docbk
-->

+ 241
- 0
docs/manual/readme.xml View File

@@ -0,0 +1,241 @@
<chapter id="intro"><title>Introduction</title>
<section id="readme"><title>What is clo++?</title>
<para>
clo++ is a command line option parser generator. Given an XML file
that contains a description of your program and its options, clo++
can generate code to parse its command line.
</para>

<para>
In addition to code generation, clo++ can also generate man pages.
Other languages and output formats can easily be added because clo++
generates its output using
<ulink url="http://tazthecat.net/~isaac/libtpt/">templates</ulink>.
</para>
</section>

<section id="intro-features"><title>Features</title>
<para>
clo++ tries to provide enough features to parse most forms of
command line options without going overboard. In most cases, if
clo++ does not support a specific feature you are looking for, you
can use an existing feature and customize it in your application.
</para>

<para>
The following list is just a quick overview of the feature list for
clo++.
</para>

<itemizedlist>
<listitem>
<para>
Option description is done using a simple XML dialect
instead of a complex proprietary language.
</para>
</listitem>

<listitem>
<para>
The users of your application do not have to have clo++
installed. Just include the output from clo++ with your
software packages. The clo++ output does not have any
license or restrictions.
</para>
</listitem>

<listitem>
<para>
Automatic generation of help messages.
</para>
</listitem>

<listitem>
<para>
Single character options start with a dash ('-') and
multi-character options start with a double dash ('--');
</para>
</listitem>

<listitem>
<para>
Support for multiple sub-commands that take their own
options. (Similar to cvs commit, cvs add, etc.)
</para>
</listitem>

<listitem>
<para>
Multi-character options and commands can be abbreviated
depending on a configuration setting in the XML file.
</para>
</listitem>

<listitem>
<para>
Single character options can be bundled. (-aeiou).
</para>
</listitem>
<listitem>
<para>
Multi-character options can include their argument in the
option name or it can be separate. (--option=one --option two).
</para>
</listitem>

<listitem>
<para>
Options can have default values. You can see if the value of
an option is the result of its default value or its presence
on the command line by checking its location value.
</para>
</listitem>

<listitem>
<para>
Options can be hidden. That is, they can be used on the
command line but will not be shown in the help message or
man page.
</para>
</listitem>

<listitem>
<para>
Options and Groups can be mandatory. This means that the
option/group is required to be used.
</para>
</listitem>

<listitem>
<para>
Options can be strict. This means that the option can not be
used on the command line more than once. If an option is not
strict, it will be allowed on the command line more than once
and the last time it is used it the final value of the
option.
</para>
</listitem>

<listitem>
<para>
The clo++ source code is released under a BSD license. There
are very few restrictions on its use.
</para>
</listitem>
</itemizedlist>
</section>

<section id="intro-option-types"><title>Supported Option Types</title>
<para>
clo++ supports the following option types.
</para>

<itemizedlist>
<listitem>
<para>
flag - This option takes no arguments and simply sets a
boolean value to indicate its presence on the command line.
</para>
</listitem>

<listitem>
<para>
bool - This option takes an argument that is parsed as a
boolean value. You can define words that you consider true
and false in your XML file.
</para>
</listitem>

<listitem>
<para>
enum - This option takes an argument that must be in a list
of allowed words. The parser then converts the argument into
an enum member for you.
</para>
</listitem>

<listitem>
<para>
int - This option takes an argument that must be completely
convertible to an integer. You may also specify a minimum
and/or a maximum value in your XML file.
</para>
</listitem>

<listitem>
<para>
double - This option takes an argument that must be
completely convertible to a real number. You may also specify
a minimum and/or a maximum value in your XML file.
</para>
</listitem>

<listitem>
<para>
string - This option takes an argument that is not parsed
and is just stored as a raw character string.
</para>
</listitem>
</itemizedlist>
</section>

<section id="intro-modifiers"><title>Option Modifiers</title>
<para>
All options except the flag option can have modifiers. Here is a
quick overview of the modifier types.
</para>

<itemizedlist>
<listitem>
<para>
vector - Each time the option is repeated on the command
line its value is pushed into a vector.
</para>
</listitem>

<listitem>
<para>
map - The option can take key=value pairs where the key is a
string and the value is the value type for the option. This
also implies that the option can be repeated.
</para>
</listitem>
</itemizedlist>
</section>

<section id="intro-groups"><title>Option Grouping</title>
<para>
clo++ also supports option grouping. There are three types of groups
that an option can be part of. Here is a quick description of them.
</para>

<itemizedlist>
<listitem>
<para>
and - This group allows you to enforce the presence of all
contained options if one of the options in the group is
used.
</para>
</listitem>

<listitem>
<para>
or - This group is used to say that at least one option in
the the group must be given, but more than one is
acceptable.
</para>
</listitem>

<listitem>
<para>
xor - This group is used when you want to ensure that a
group of options can not be used at the same time.
</para>
</listitem>
</itemizedlist>
</section>
</chapter>
<!--
vim:ft=docbk
-->

+ 90
- 0
docs/manual/requirements.xml View File

@@ -0,0 +1,90 @@
<appendix id="requirements"><title>Requirements</title>
<!--################################################################-->
<para>
clo++ should compile on any platform that has a working ISO
14882-1998 compliant compiler. Okay, so there is no such thing, but
your compiler should be pretty close.
</para>

<para>
No platform specific code is used anywhere in clo++, including the
code that it generates. All code is pure C++.
</para>

<warning>
<para>
clo++ will not compile if you are using any version of GCC prior
to version 3.0 unless you use the STLport. Furthermore, it will
not operate correctly if compiled under GCC versions between
3.0 and 3.0.3 (due to bugs with exceptions).
</para>
</warning>
<!--################################################################-->
<section id="req-packages"><title>Software Dependencies</title>
<para>
clo++ has dependencies on the following software.
</para>

<itemizedlist>
<listitem>
<para>
Perl 5 - Only needed to configure clo++. Perl is not
used any other time.
</para>
</listitem>

<listitem>
<para>
<ulink url="http://xmlsoft.org/">libxml2</ulink> -
The XML parser that clo++ uses. Other parsers will be
supported in the future.
</para>
</listitem>
</itemizedlist>
</section>
<!--################################################################-->
<section id="req-supported"><title>Supported Platforms</title>
<para>
clo++ is supported on the following platforms with the given
compilers. If you successfully compile clo++ on a platform that
is not listed here, please drop us a

<ulink url="mailto:clo++@pmade.org">note</ulink>.
</para>

<table><title>Platform List</title>
<tgroup cols="3">
<thead>
<row>
<entry>Platform</entry>
<entry>Operating System</entry>
<entry>Compiler</entry>
</row>
</thead>
<tbody>
<row>
<entry>IA32</entry>
<entry>FreeBSD versions 4.4 - 4.6</entry>
<entry>GCC versions 3.0.3 - 3.2</entry>
</row>

<row>
<entry>IA32</entry>
<entry>Linux (RH 7.3)</entry>
<entry>GCC version 3.2</entry>
</row>

<row>
<entry>SPARC</entry>
<entry>Solaris 2.7</entry>
<entry>GCC version 3.0.4</entry>
</row>
</tbody>
</tgroup>
</table>
</section>
<!--################################################################-->
</appendix>
<!--
vim:ft=docbk
-->

+ 138
- 0
docs/manual/todo.xml View File

@@ -0,0 +1,138 @@
<appendix><title>To Do List</title>
<section><title>Feature To Do List</title>
<itemizedlist>
<listitem>
<para>
Allow automap to automatically place non-options that look
like a key=value pair into the given map.
</para>
</listitem>

<listitem>
<para>
Allow autovector to place non-options into the given
vector instead of the default non-options vector.
</para>
</listitem>

<listitem>
<para>
Allow commands to be hidden similar to hiding options.
</para>
</listitem>

<listitem>
<para>
Add a new option type, count. This type is similar to
flag but gets incremented each time it is present on the
command line.
</para>
</listitem>

<listitem>
<para>
Add an option to allow a '+' to start a long option.
</para>
</listitem>

<listitem>
<para>
Find some way to skip unknown options in a safe way.
Stuff like '-display' for GTK+ programs.
</para>
</listitem>

<listitem>
<para>
Allow enum arguments to be abbreviated.
</para>
</listitem>

<listitem>
<para>
Add config flag to make things case-insensitive.
</para>
</listitem>

<listitem>
<para>
Don't allow C++ keywords to be used as option IDs when
generating C++ code. Also, make sure that autohelp names
are not used as names for other options.
</para>
</listitem>

<listitem>
<para>
Add member functions to the main parser class for
getting the help strings.
</para>
</listitem>
</itemizedlist>
</section>

<section><title>Milestone 0.7.0</title>
<itemizedlist>
<listitem>
<para>
Finish users manual (XML format and C++ API)
</para>
</listitem>

<listitem>
<para>
Fix any bugs.
</para>
</listitem>

<listitem>
<para>
Implement any requested features. Implement the items
from the "Features To Do List".
</para>
</listitem>
</itemizedlist>
</section>

<section><title>Milestone 0.8.0</title>
<itemizedlist>
<listitem>
<para>
Finish template manual so others can write templates.
</para>
</listitem>

<listitem>
<para>
Fix any bugs.
</para>
</listitem>

<listitem>
<para>
Implement any requested features.
</para>
</listitem>
</itemizedlist>
</section>

<section><title>Milestone 0.9.0</title>
<itemizedlist>
<listitem>
<para>
Code freeze. Make stable.
</para>
</listitem>
</itemizedlist>
</section>

<section><title>Milestone 1.0.0</title>
<itemizedlist>
<listitem>
<para>
First stable release.
</para>
</listitem>
</itemizedlist>
</section>
</appendix>

+ 2
- 0
docs/project/Makefile View File

@@ -0,0 +1,2 @@
PROJECT_NAME=clo++
.include "${HOME}/develop/project-xslt/etc/project.mk"

+ 57
- 0
docs/project/download.xml View File

@@ -0,0 +1,57 @@
<?xml version="1.0"?>
<download
xmlns="http://pmade.org/xmlns/project-download"
xmlns:l="http://pmade.org/xmlns/project-linking"
directory="somedir"
>
<requirements>
<list title="Build Requirements">
<item>Perl (at least version 5.5) to run configure.pl</item>
<item>libxml2 from <l:ulink href="http://xmlsoft.org/">xmlsoft.org</l:ulink></item>
<item>A compiler that supports most of ISO 14882-1998</item>
</list>
</requirements>

<ostable>
<os name="FreeBSD" hardware="IA32" version="3.0">
<compiler name="GCC 3.0.4" status="Supported"/>
<compiler name="GCC 3.1.1" status="Supported"/>
<compiler name="GCC 3.2.1" status="Supported"/>
</os>

<os name="Linux (RedHat, Debian)" hardware="IA32" version="N/A">
<compiler name="GCC 3.0.4" status="Supported"/>
<compiler name="GCC 3.1.1" status="Supported"/>
<compiler name="GCC 3.2.1" status="Supported"/>
</os>

<os name="Solaris" hardware="SPARC" version="2.7">
<compiler name="Sun Forte C++" status="Supported" notes="Use the STLport">
<notes>
If you use the <l:ulink href="http://stlport.org/">STLport</l:ulink> with this compiler everything will
work. This is due the fact that std::list&lt;&gt;::remove_if is not a member function template in the standard
library from Sun.
</notes>
</compiler>

<compiler name="GCC 3.0.4" status="Supported"/>
<compiler name="GCC 3.1.1" status="Supported"/>
<compiler name="GCC 3.2.1" status="Supported"/>
</os>

<os name="Win32" hardware="IA32" version="N/A">
<compiler name="MSVS 6.0" status="Not Supported" notes="Not tested">
<notes>
You may be able to use clo++ with this compiler if you download and install the free
<l:ulink href="http://stlport.org/">STLport</l:ulink> standard libary implementation.
This has not been tested though.
</notes>
</compiler>

<compiler name="MSVS .NET" status="Not Supported" notes="Not tested"/>
</os>
</ostable>
</download>
<!--
vim:tw=130
-->

+ 62
- 0
docs/project/news.xml View File

@@ -0,0 +1,62 @@
<?xml version="1.0"?>
<news xmlns="http://pmade.org/xmlns/project-news" xmlns:l="http://pmade.org/xmlns/project-linking" xmlns:f="http://pmade.org/xmlns/project-formating">
<entry title="Back From Drive Failure" year="2003" month="08" day="08">
<para>
<f:bold color="red">
This site had a major drive failure with data loss. Please
<l:ulink href="/disk-failure.html">read this notice</l:ulink> for
more information and instructions for users.
</f:bold>
</para>
</entry>

<entry title="Version 0.6.4 Released" year="2003" month="06" day="21">
<para>
Version 0.6.4 contains a few new features and some bug fixes.
</para>
</entry>

<entry title="Version 0.6.3 Released" year="2003" month="04" day="09">
<para>
Version 0.6.3 has been released. This is a bug fix release.
</para>
</entry>

<entry title="clo++ version 0.6.2 is out" year="2003" month="01" day="12">
<para>
Version 0.6.2 is out. It adds support for the Sun Forte compiler
when used with the <l:ulink href="http://stlport.org/">STLport</l:ulink>.
In addition, <l:ulink href="http://tazthecat.net/~isaac/libtpt/">LibTPT</l:ulink>
has been upgraded to version 1.10.5.
</para>
</entry>

<entry title="clo++ version 0.6.1 and mailing lists!" year="2002" month="09" day="04">
<para>
Version 0.6.1 is out. It is a bug fix release. Also, there are
two mailing lists for clo++ now.
</para>
</entry>

<entry title="clo++ version 0.6.0" year="2002" month="04" day="30">
<para>
The second release of clo++ since the rewrite is out.
The main focus of version 0.6.0 is the addition of man page
generation.
</para>
</entry>
<entry title="clo++ version 0.5.0 is out!" year="2002" month="04" day="11">
<para>
clo++ is back from a long sleep and is better than ever. Version
0.5.0 is a complete rewrite with lots of new features.
</para>
</entry>

<entry title="clo++ version 0.3.0 is out." year="2001" month="01" day="28">
<para>
clo++ 0.3.0 is out. Mostly bug fixes and a couple of new
features.
</para>
</entry>
</news>

+ 63
- 0
docs/project/project.xml View File

@@ -0,0 +1,63 @@
<?xml version="1.0"?>
<project
xmlns="http://pmade.org/xmlns/project-main"
xmlns:l="http://pmade.org/xmlns/project-linking"
name="clo++"
>
<variables>
<variable name="download-source" value="clo++-0.6.4.tar.gz"/>
<variable name="logo-image" value="cloxx-logo.jpg"/>
<variable name="email-address" value="cloxx@pmade.org"/>
<variable name="website" value="http://pmade.org/software/clo++/"/>
</variables>

<description>
<para>
clo++ is a command line option parser generator. Given an XML file
that contains a description of your program and its options, clo++
can generate code to parse its command line.
</para>
</description>

<features>
<feature>
Generates C++ source code and Unix manual pages.
</feature>

<feature>
Additional languages can be support by using
<l:ulink href="http://tazthecat.net/~isaac/libtpt/">LibTPT</l:ulink>
templates.
</feature>

<feature>
clo++ tries to provide enough features to parse most forms of
command line options without going overboard. In most cases, if
clo++ does not support a specific feature you are looking for, you
can use an existing feature and customize it in your application.
</feature>

<feature>
Option description is done using a simple XML dialect
instead of a complex proprietary language.
</feature>

<feature>
The users of your application do not have to have clo++
installed. Just include the output from clo++ with your software
packages. The clo++ output does not have any license or
restrictions.
</feature>

<feature>
The clo++ source code is released under a BSD license. There
are very few restrictions on its use.
</feature>
</features>

<section title="news" file="news.xml"/>
<section title="resources" file="resources.xml"/>
<section title="download" file="download.xml"/>
<section title="bugs" product="cloxx"/>
<section title="cvs" module="clo++"/>
</project>

+ 62
- 0
docs/project/resources.xml View File

@@ -0,0 +1,62 @@
<?xml version="1.0"?>
<resources
xmlns="http://pmade.org/xmlns/project-resources"
xmlns:format="http://pmade.org/xmlns/project-formating"
xmlns:l="http://pmade.org/xmlns/project-linking">

<section title="Mailing Lists">
<mlists>
<list title="Announcements" name="cloxx-announce">
Very quiet, mostly release announcements.
</list>

<list title="Users and Developers" name="cloxx-users">
Questions, comments, stories? This is the place.
</list>
</mlists>
</section>

<section title="Documentation">
<item title="Users Manual" link="download/documentation/manual/sep-html/">
Online HTML version of the Users Manual
</item>

<item title="Users Manual" link="download/documentation/manual/manual.html">
Online HTML version of the Users Manual (everything in one file)
</item>

<item title="Users Manual" link="download/documentation/manual/manual.pdf">
PDF version of the Users Manual
</item>
</section>

<section title="Examples">
<item title="Simple Example" link="CVS/clo++/examples/example-01/example.cxx">
Simple "Hello World" example.
</item>

<item title="Simple Example (XML Input)" link="CVS/clo++/examples/example-01/options.xml">
The clo++ XML input file that the C++ code above is using.
</item>
</section>

<section title="Anonymous CVS Access">
<anoncvs/>
</section>

<!--
<section title="Similar Projects">
<item title="GMetaDOM" link="http://gmetadom.sourceforge.net/">
A collection of librares, each library providing a DOM implementation
</item>

<item title="libxml++" link="http://sourceforge.net/projects/libxmlplusplus/">
Another C++ wrapper around libxml2, using a different interface style
</item>

<item title="Xerces-C++" link="http://xml.apache.org/xerces-c/">
A huge and complex XML parser from the Apache Software Foundation
</item>
</section>
-->
</resources>

+ 50
- 0