diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..b85fe943
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,28 @@
+/*~
+/COPYING
+/Makefile
+/Makefile.in
+/aclocal.m4
+/autom4te.cache
+/compile
+/config.guess
+/config.h
+/config.h.in
+/config.log
+/config.rpath
+/config.status
+/config.sub
+/configure
+/depcomp
+/install-sh
+/libcdio++.pc
+/libcdio.pc
+/libcdio_cdda.pc
+/libcdio_paranoia.pc
+/libiso9660++.pc
+/libiso9660.pc
+/libtool
+/libudf.pc
+/ltmain.sh
+/missing
+/stamp-h1
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 00000000..d3c5b40a
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,237 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007 Free Software Foundation, Inc.
+
+This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package. The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+ It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring. Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'. You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system.
+
+ Running `configure' might take a while. While running, it prints
+ some messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation.
+
+ 5. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+ 6. Often, you can also type `make uninstall' to remove the installed
+ files again.
+
+Compilers and Options
+=====================
+
+Some systems require unusual options for compilation or linking that the
+`configure' script does not know about. Run `./configure --help' for
+details on some of the pertinent environment variables.
+
+ You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here
+is an example:
+
+ ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you can use GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory. After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+Installation Names
+==================
+
+By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc. You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+There may be some features `configure' cannot figure out automatically,
+but needs to determine by the type of machine the package will run on.
+Usually, assuming the package is built to be run on the _same_
+architectures, `configure' can figure that out, but if it prints a
+message saying it cannot guess the machine type, give it the
+`--build=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS KERNEL-OS
+
+ See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+If you want to set default values for `configure' scripts to share, you
+can create a site shell script called `config.site' that gives default
+values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+Variables not defined in a site shell script can be set in the
+environment passed to `configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug. Until the bug is fixed you can use this workaround:
+
+ CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+`configure' recognizes the following options to control how it operates.
+
+`--help'
+`-h'
+ Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally `config.cache'. FILE defaults to `/dev/null' to
+ disable caching.
+
+`--config-cache'
+`-C'
+ Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options. Run
+`configure --help' for more details.
+
diff --git a/MSVC/README b/MSVC/README
new file mode 100644
index 00000000..42884a96
--- /dev/null
+++ b/MSVC/README
@@ -0,0 +1,4 @@
+Files in this directory are for compiling with Microsoft Visual C.
+They are courtesy of John Oseman (mog).
+
+$Id: README,v 1.1 2004/10/30 14:18:17 rocky Exp $
diff --git a/MSVC/cd-info.vcproj b/MSVC/cd-info.vcproj
new file mode 100644
index 00000000..e3581358
--- /dev/null
+++ b/MSVC/cd-info.vcproj
@@ -0,0 +1,365 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/MSVC/config.h b/MSVC/config.h
new file mode 100644
index 00000000..5a06eb08
--- /dev/null
+++ b/MSVC/config.h
@@ -0,0 +1,188 @@
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* compiler does lsbf in struct bitfields */
+#undef BITFIELD_LSBF
+
+/* Define 1 if you are compiling using cygwin */
+#undef CYGWIN
+
+/* what to put between the brackets for empty arrays */
+#define EMPTY_ARRAY_SIZE
+
+/* Define 1 if you have BSDI-type CD-ROM support */
+#undef HAVE_BSDI_CDROM
+
+/* Define to 1 if you have the `bzero' function. */
+#undef HAVE_BZERO
+
+/* Define this if you have libcddb installed */
+#undef HAVE_CDDB
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_COREFOUNDATION_CFBASE_H
+
+/* Define 1 if you have Darwin OS X-type CD-ROM support */
+#undef HAVE_DARWIN_CDROM
+
+/* Define if time.h defines extern long timezone and int daylight vars. */
+#undef HAVE_DAYLIGHT
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_DVD_H
+
+/* Define to 1 if you have the header file. */
+#define HAVE_ERRNO_H 1
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_FCNTL_H
+
+/* Define 1 if you have FreeBSD CD-ROM support */
+#undef HAVE_FREEBSD_CDROM
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_GLOB_H
+
+/* Define if you have the iconv() function. */
+#undef HAVE_ICONV
+
+/* Define to 1 if you have the header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_IOKIT_IOKITLIB_H
+
+/* Supports ISO _Pragma() macro */
+#undef HAVE_ISOC99_PRAGMA
+
+/* Define 1 if you want ISO-9660 Joliet extension support. You must have also
+ libiconv installed to get Joliet extension support. */
+#undef HAVE_JOLIET
+
+/* Define if you have and nl_langinfo(CODESET). */
+#undef HAVE_LANGINFO_CODESET
+
+/* Define to 1 if you have the `nsl' library (-lnsl). */
+#undef HAVE_LIBNSL
+
+/* Define to 1 if you have the `socket' library (-lsocket). */
+#undef HAVE_LIBSOCKET
+
+/* Define 1 if you have Linux-type CD-ROM support */
+#undef HAVE_LINUX_CDROM
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_LINUX_CDROM_H
+
+/* Define 1 if timeout is in cdrom_generic_command struct */
+#undef HAVE_LINUX_CDROM_TIMEOUT
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_LINUX_VERSION_H
+
+/* Define to 1 if you have the `memcpy' function. */
+#define HAVE_MEMCPY 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `memset' function. */
+#define HAVE_MEMSET 1
+
+/* Define to 1 if you have the `snprintf' function. */
+#undef HAVE_SNPRINTF
+
+/* Define 1 if you have Solaris CD-ROM support */
+#undef HAVE_SOLARIS_CDROM
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_STDBOOL_H
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the header file. */
+#define HAVE_STDIO_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_SYS_CDIO_H
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define if struct tm has the tm_gmtoff member. */
+#undef HAVE_TM_GMTOFF
+
+/* Define if time.h defines extern extern char *tzname[2] variable */
+#undef HAVE_TZNAME
+
+/* Define to 1 if you have the `tzset' function. */
+#undef HAVE_TZSET
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_UNISTD_H
+
+/* Define this if you have libvcdinfo installed */
+#undef HAVE_VCDINFO
+
+/* Define to 1 if you have the `vsnprintf' function. */
+#undef HAVE_VSNPRINTF
+
+/* Define 1 if you have MinGW CD-ROM support */
+#define HAVE_WIN32_CDROM 1
+
+/* Define as const if the declaration of iconv() needs const. */
+#undef ICONV_CONST
+
+/* Define 1 if you are compiling using MinGW */
+#undef MINGW32
+
+/* Name of package */
+#define PACKAGE "libcdio"
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "libcdio"
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION 1
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Version number of package */
+#define VERSION "1"
+
+/* Define to 1 if your processor stores words with the most significant byte
+ first (like Motorola and SPARC, unlike Intel and VAX). */
+#undef WORDS_BIGENDIAN
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#define inline
+
diff --git a/MSVC/libcdio.sln b/MSVC/libcdio.sln
new file mode 100644
index 00000000..fe8a64af
--- /dev/null
+++ b/MSVC/libcdio.sln
@@ -0,0 +1,39 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcdio", "libcdio.vcproj", "{E465056A-C6F3-45EE-B791-CAF8E0CE629D}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cd-info", "cd-info.vcproj", "{8E55CFDB-5E38-4A07-84F8-36939C825735}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ Debug = Debug
+ Release = Release
+ XBOX_Debug = XBOX_Debug
+ XBOX_Release = XBOX_Release
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {E465056A-C6F3-45EE-B791-CAF8E0CE629D}.Debug.ActiveCfg = Debug|Win32
+ {E465056A-C6F3-45EE-B791-CAF8E0CE629D}.Debug.Build.0 = Debug|Win32
+ {E465056A-C6F3-45EE-B791-CAF8E0CE629D}.Release.ActiveCfg = Release|Win32
+ {E465056A-C6F3-45EE-B791-CAF8E0CE629D}.Release.Build.0 = Release|Win32
+ {E465056A-C6F3-45EE-B791-CAF8E0CE629D}.XBOX_Debug.ActiveCfg = XBOX_Debug|Xbox
+ {E465056A-C6F3-45EE-B791-CAF8E0CE629D}.XBOX_Debug.Build.0 = XBOX_Debug|Xbox
+ {E465056A-C6F3-45EE-B791-CAF8E0CE629D}.XBOX_Release.ActiveCfg = XBOX_Release|Xbox
+ {E465056A-C6F3-45EE-B791-CAF8E0CE629D}.XBOX_Release.Build.0 = XBOX_Release|Xbox
+ {8E55CFDB-5E38-4A07-84F8-36939C825735}.Debug.ActiveCfg = Debug|Win32
+ {8E55CFDB-5E38-4A07-84F8-36939C825735}.Debug.Build.0 = Debug|Win32
+ {8E55CFDB-5E38-4A07-84F8-36939C825735}.Release.ActiveCfg = Release|Win32
+ {8E55CFDB-5E38-4A07-84F8-36939C825735}.Release.Build.0 = Release|Win32
+ {8E55CFDB-5E38-4A07-84F8-36939C825735}.XBOX_Debug.ActiveCfg = XBOX_Debug|Xbox
+ {8E55CFDB-5E38-4A07-84F8-36939C825735}.XBOX_Debug.Build.0 = XBOX_Debug|Xbox
+ {8E55CFDB-5E38-4A07-84F8-36939C825735}.XBOX_Release.ActiveCfg = XBOX_Release|Xbox
+ {8E55CFDB-5E38-4A07-84F8-36939C825735}.XBOX_Release.Build.0 = XBOX_Release|Xbox
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/MSVC/libcdio.vcproj b/MSVC/libcdio.vcproj
new file mode 100644
index 00000000..43f0cfbd
--- /dev/null
+++ b/MSVC/libcdio.vcproj
@@ -0,0 +1,547 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 00000000..cb555edd
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,137 @@
+# $Id: Makefile.am,v 1.50 2008/10/25 13:56:15 rocky Exp $
+#
+# Copyright (C) 2003, 2004, 2006, 2008 Rocky Bernstein
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# 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 the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+#
+## Process this file with automake to produce Makefile.in
+## which configure then turns into a Makefile ...
+## which make can then use to produce stuff. Isn't configuration simple?
+
+AUTOMAKE_OPTIONS = dist-bzip2
+
+EXTRA_DIST = \
+ MSVC/README MSVC/cd-info.vcproj \
+ MSVC/config.h \
+ MSVC/libcdio.sln \
+ MSVC/libcdio.vcproj \
+ README.libcdio \
+ THANKS \
+ example/README \
+ libcdio.pc.in \
+ libcdio++.pc.in \
+ libcdio_cdda.pc.in \
+ libiso9660.pc.in \
+ libiso9660++.pc.in \
+ libudf.pc.in \
+ package/libcdio.spec.in
+
+SUBDIRS = doc include lib src test example
+
+if BUILD_CD_PARANOIA
+paranoiapcs = libcdio_paranoia.pc libcdio_cdda.pc
+endif
+
+# pkg-config(1) related rules
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libcdio.pc \
+ libiso9660.pc \
+ libudf.pc \
+ $(paranoiapcs)
+
+if ENABLE_CPP
+pkgconfig_DATA += \
+ libcdio++.pc \
+ libiso9660++.pc
+endif
+
+
+$(pkgconfig_DATA): config.status
+
+# List of additional files for expanded regression tests
+DISTFILES_REGRESSION = tests/monvoisin.nrg tests/monvoisin.right \
+ tests/svcdgs.nrg tests/svcdgs.nrg \
+ tests/svcd_ogt_test_ntsc.bin \
+ tests/svcd_ogt_test_ntsc.cue \
+ tests/svcd_ogt_test_ntsc.right \
+ tests/vcd_demo.bin tests/vcd_demo.cue \
+ tests/vcd_demo.right
+
+REGRESSION_VERSION = 1.1
+
+distdir_regression = ../$(PACKAGE)-$(REGRESSION_VERSION)-tests
+
+test: check
+
+doxygen:
+ -( cd ${top_srcdir}/doc/doxygen && /bin/sh ${srcdir}/run_doxygen )
+
+dist-regression: distdir-regression
+ cd $(distdir) && $(AMTAR) chof - tests | GZIP=$(GZIP_ENV) gzip -c >$(distdir_regression).tar.gz
+ $(am__remove_distdir)
+
+distdir-regression: $(DISTFILES_REGRESSION)
+ $(am__remove_distdir)
+ mkdir $(distdir)
+ @list='$(DISTFILES_REGRESSION)'; for file in $$list; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir_regressoin)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r $(distdir)
+
+check_nrg.sh: $(top_builddir)/config.status check_nrg.sh.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+ chmod +x config_nrg.sh
+check_cue.sh: $(top_builddir)/config.status check_cue.sh.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+ chmod +x config_cue.sh
+
+check_iso.sh: $(top_builddir)/config.status check_iso.sh.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+ chmod +x config_iso.sh
+
+make-executable:
+
+# cvs2cl
+MAINTAINERCLEANFILES = ChangeLog
+
+if MAINTAINER_MODE
+
+.PHONY: ChangeLog
+ChangeLog:
+ ( cd $(srcdir); $(CVS2CL) -W 450 --header cvs2cl_header --utc -w -I ChangeLog --usermap cvs2cl_usermap -P --stdout ) > ChangeLog
+
+ACLOCAL_AMFLAGS=-I m4
+
+endif
diff --git a/README b/README
new file mode 100644
index 00000000..a066a3bd
--- /dev/null
+++ b/README
@@ -0,0 +1,61 @@
+See README.libcdio for installation instructions.
+
+The libcdio package contains a library for CD-ROM and CD image
+access. Applications wishing to be oblivious of the OS- and
+device-dependent properties of a CD-ROM or of the specific details of
+various CD-image formats may benefit from using this library.
+
+A library for working with ISO-9660 filesystems libiso9660 is
+included. A generic interface for issuing MMC (multimedia commands) is
+also part of the libcdio library.
+
+Also included is a library for working with ISO-9660 filesystems as is
+also the CD-DA error/jitter correction library from cdparanoia
+(http://www.xiph.org/paranoia).
+
+Some support for disk image types like CDRWin's BIN/CUE format,
+cdrdao's TOC format, and Nero's NRG format are available. Therefore,
+applications that use this library also have the ability to read disc
+images as though they were CD's.
+
+The library is written in C, however there are OO C++, Perl, Python
+and Ruby wrappers to interface to the library. However C++ is the only
+one that is bundled with this package, and the interfaces provide only
+a subset of the full features of the library.
+
+Also included in the libcdio package are a number of utility programs:
+
+* cd-info - displays CD information: number of tracks, CD-format and
+ if possible basic information about the format. If libcddb
+ (http://libcddb.sourceforge.net) is available, the cd-info
+ program will display CDDB matches on CD-DA discs. And if a
+ new enough version of libvcdinfo is available (from the
+ vcdimager project), then cd-info shows basic VCD information.
+
+* cd-read - performs low-level block reading of a CD or CD image,
+
+* iso-info - displays ISO-9660 information from an ISO-9660 image,
+
+* iso-read - extracting files from an ISO-9660 image, a version of the
+ CD-DA extraction tool cdparanoia which corrects for
+ CD-ROM jitter, and a simple curses-based CD player,
+ cdda-player using the analog CD-ROM output.
+
+* cd-paranoia - port of cdparanoia (CD-DA jitter and error correction)
+ using libcdio back-end CD-reading.
+
+At present, there is no support for writing CD's, nor is there any
+support for reading or writing DVDs. For some of these, there are
+other libraries (e.g. libdi, libscg, or libdvdread) may be helpful.
+
+Some of the projects using libcdio are the Video CD authoring and
+ripping tools VCDImager (http://vcdimager.org), a navigation-capable
+Video CD plugin and CD-DA plugins for the media players xine
+(http://xinehq.de), videolan's vlc (http://videolan.org), media
+players mplayerxp (http://mplayerxp.sourceforge.net/) and gmerlin
+(http://gmerlin.sourceforge.net), kiso, a KDE GUI for creating,
+extracting and editing ISO-9600 images (http://kiso.sourceforge.net),
+and a Samba vfs module that allows exporting a CD without mounting it
+(http://ontologistics.net/OpenSource/Samba/index.php).
+
+$Id: README,v 1.13 2006/03/28 14:48:44 rocky Exp $
diff --git a/README.libcdio b/README.libcdio
new file mode 100644
index 00000000..8e166401
--- /dev/null
+++ b/README.libcdio
@@ -0,0 +1,104 @@
+If you check out the source from CVS run
+ ./autogen.sh then follow as below, except you don't need to run
+ ./configure.
+
+To compile the source:
+
+ ./configure MAKE=gmake
+ make
+ make check
+ make install # may have to do this as root
+
+
+If you have problems linking libcdio or libiso9660, see the BSD
+section. You might also try the option --without-versioned-libs. However
+this option does help with the situtation described below so it is
+preferred all other things being equal.
+
+If you are debugging libcdio, the libtool and the dynamic libraries
+can make things harder. I suggest setting CFLAGS to include
+'-fno-inline -g' and using --disable-shared on configure.
+
+
+VCD dependency:
+---------------
+One thing that confuses people is the "dependency" on libvcdinfo from
+vcdimager, while vcdimager has a dependency on libcdio. This libcdio
+dependency on vcdimager is an optional (i.e. not mandatory) dependency,
+while the vcdimager dependency right now is mandatory. libvcdinfo is
+used only by the utility program cd-info. If you want cd-info to use
+the VCD reporting portion and you don't already have vcdimager
+installed, build and install libcdio, then vcdimager, then configure
+libcdio again and it should find libvcdinfo.
+
+People who make packages might consider making two packages, a libcdio
+package with just the libraries (and no dependency on libvcdinfo) and
+a libcdio-utils which contains cd-info and iso-info, cd-read,
+iso-read. Should you want cd-info with VCD support then you'd add a
+dependency in that package to libvcdinfo.
+
+Another thing one can do is "make install" inside the library, or run
+"configure --without-vcd-info --without-cddb" (since libcddb also has
+an optional dependency on libcdio).
+
+Microsoft Windows
+-------
+
+The building under Microsoft Windows the thing to do is to install
+cygwin (http://www.cygwin.com). It has been reported that MinGW
+(http://www.mingw.org/) also works, but it is possible you may
+encounter more problems there.
+
+Folks may have used Microsoft compilers (e.g. Visual C), but you may
+find you need to make your own "project" files. Don't undertake this
+unless you are willing to spend time hacking. xboxmediacenter team
+folks I believe go this route, so you may be able to use their project
+files as a starting point.
+
+XBOX
+-------
+
+Consult the xboxmediacenter team (www.xboxmediacenter.de)
+
+
+BSD
+---
+
+Unless you use --without-versioned-libs (not recommended), you need to
+use GNU make which usually can be found under the name "gmake".
+
+If you use another make you are likely to get problems linking libcdio
+and libiso9660.
+
+
+Solaris
+-------
+
+You may need to use --without-versioned-libs if you get a problem
+building libcdio or libiso9660.
+
+If you get a message like:
+ libcdio.so: attempted multiple inclusion of file
+
+because you have enable vcd-info and it is installed, then the only
+way I know how to get around is to use configure with --disable-shared.
+
+OS Support
+---------------
+
+Support for Operating Systems's is really based on the desire, ability
+and willingness of others to help out. I use GNU/Linux so that
+probably works best. Before a release I'll test on servers I have
+available. I also announce a pending release on libcdio-devel@gnu.org
+and ask others to test out.
+
+Steve Schultz has done a great job making BSDI CD support look like
+GNU/Linux and usually he let's me know where I've blown things on BSDI
+and Darwin. Usage on Darwin has been picking up although Darwin is in
+a world of its own so support for that (e.g. issuing MMC commnads)
+seems to lag behind.
+
+Of late FreeBSD folks have been pretty good about testing new releases
+and reporting problems.
+
+$Id: README.libcdio,v 1.12 2008/03/22 22:51:30 rocky Exp $
diff --git a/THANKS b/THANKS
new file mode 100644
index 00000000..3d96c569
--- /dev/null
+++ b/THANKS
@@ -0,0 +1,64 @@
+Burkhard Plaum
+ some GNU/Linux and CD-Text patches
+
+Carlo Bramini
+ fixes for Mingw+MSYS and DLL support
+
+Diego 'Flameeyes' Pettenò
+ patches to FreeBSD and making Gentoo-friendly
+
+Frantisek Dvorak :
+ bug reports and miscellaneous fixes
+
+Heiner
+ FreeBSD CAM support and FreeBSD debugging & testing
+
+Ian MacIntosh
+ Sun-related things.
+
+Justin B. Ruggles
+ SCSI MMC discmode determination via Read TOC.
+
+Justin F. Hallett
+ Fink packaging and matters OSX
+
+Kris Verbeeck :
+ CDDB library support from libcddb http://libcddb.sourceforge.net
+ Gentoo ebuild-file
+
+Manfred Tremmel :
+ RPM spec file and inclusion of libcdio into
+ http://packman.links2linux.de/
+
+Michael Kukat ,
+ for the hints in extractnrg.pl
+
+Nicolas Boullis
+ Build issues, library symbol versioning, Debian packaging and issues
+
+Patrick Guimond
+ CD-Extra audio data boundaries
+
+Peter Hartley
+ Cross-compiling to mingw32
+
+Peter J. Creath
+ removal of libpopt, paranoia documentation, some bug fixes to
+ cd-* programs and the paranoia lib
+
+Steven M. Schultz
+ All things BSDI and the use of a really fabulous Darwin G5 box.
+
+Svend S. Sorensen
+ cdrdao TOC-reading and CDRWin CUE parsing code based on cuetools
+ http://cuetools.sourceforge.net/
+
+xboxmediacenter team (www.xboxmediacenter.de)
+ X-Box detection and XDF filesystem things
+
+Daniel Schwarz
+ log-summary option in cd-paranoia.
+
+Robert William Fuller
+ get_track_pregap_lba, get_track_pregap_lsn. Section on "CD-DA pregap"
+ in libcdio manual.
diff --git a/TODO b/TODO
new file mode 100644
index 00000000..bc289328
--- /dev/null
+++ b/TODO
@@ -0,0 +1,95 @@
+It isn't look hard to find a gap in libcdio or libiso9660 or think of
+something you'd like added. Here are some of the many known problems
+and feature requests.
+
+* UDF support.
+
+* API overhaul. hvr has expressed interest but it's unlikely he'll ever
+ have the time to do. It could be done in conjunction with a wrappers
+ for C++, Perl, Python, ... The idea is that those interfaces would not
+ show the ugliness of the current C interface. For example instead of
+ read_mode2, read_mode1, read_audio, there might be a read(mode, ...).
+
+ - Address static loglevel variable (nboullis at debian.org)
+
+* All of the API should be finished on all OS's (or the API adjusted).
+
+* Fix the current gaps:
+
+ - SCSI-MMC on OSX,
+ - CD-Text support working more often? wide character support
+ (Burkhard Plaum has indicated he might do)
+ - more accurate drive capabilities
+ - wxwindows interface to cd-drive
+ - more accurate CD track classification (Form 1/2, Mode 1/2)
+ - complete the image readers, e.g. "silence" and ability to use
+ more than one file in cdrdao.
+ - multi-session CDs
+
+* mmc_read_cd often doesn't work when request reading a large number of blocks.
+
+* Is paranoia correct? Get a better handle on it. Ensure more of the
+ drive and OS-specific features that work on GNU/Linux work
+ elsewhere. Regression tests over more kinds of failures.
+
+* Exclusive access of CD-ROM versus non-exclusive?
+
+* Adjusting operations based on known models. Via MMC, We often have
+ the ability to find out what drive is in use. That could be used (as
+ it was in cdparanoia) to customize the method used for various
+ operations. Alternatively it could be read from a configuration
+ file, but right now there's no internal structure for holding all of
+ the capabilities.
+
+* Combine iso-read and iso-info into an "iso-tar" for listing or
+ extracting files". Ideally something matching the relevant command
+ set of "tar" would be nice, as that is widely used and probably
+ fairly complete in thing that might be desired for listing/extracting.
+
+* Add something to show what kind of CD media is in a drive. Ideally: CD
+ (purchased), CD Write Once, CD Read/Write, but what is there is
+ probably something like Cyanine, PhthaloCyanine, Metallized Azo,
+ Advanced PhthaloCyanine, Formazan. See
+ http://www.cdmediaworld.com/hardware/cdrom/cd_dye.shtml or
+ http://www.cd-info.com/CDIC/History/Commentary/Parker/stcroix.html
+
+ The discmode type can be used to classify DVD media and it also
+ classifies for CD track formats (in addition to CD *content*
+ classification). Note there is nothing for DVD content; see the below
+ list of things which probably won't get added.
+
+ Given the mismatch between DVD and CD meanings in discmode, the
+ discmode type probably needs to be redone.
+
+* Write a real cue parser and TOC parser using bison.
+ A pcct grammar is given in cdrdao's trackdb TocParser.g and CueParser.g
+ The parsing is pretty much done, need to fold in semantic routines and
+ improve error reporting.
+
+* conversion tools. Assuming parser done, it should be simple to use
+ write simple conversion routines:
+ - CD images's to iso9660 .iso's
+ - TOC <=> CUE
+
+* Test more disc image types in regression testing, like CD-I.
+
+* Convert to use glib, removing ds.h
+ (Revise vcdimager too)
+
+* Delete and rename files in an iso9660 image (mephisto75 at web.de)
+
+* Some things where libcdio will probably not expand in:
+
+ - DVD things, especially DVD-ROM (use libdvdread)
+ - writing applications (use cdrdao or cdrtools)
+ - more proprietary undocumented image format (unless someone else is willing
+ to do the work). But the fuzzy ISO 9660 detection may help here.
+
+
+If there is something you really want done on the above list or have
+something else you want done, it will go a lot faster if you attempt
+to undertake doing it. Patches are always welcome (and CVS write
+access is available for those who have demonstrated reasonable ability
+through contributions.)
+
+$Id: TODO,v 1.11 2005/07/11 11:51:07 rocky Exp $
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 00000000..5158e8eb
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+# Additional options go to configure.
+
+echo "Rebuilding ./configure with autoreconf..."
+autoreconf -f -i
+if [ $? -ne 0 ]; then
+ echo "autoreconf failed"
+ exit $?
+fi
+
+./configure --enable-maintainer-mode "$@"
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 00000000..ea73489c
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,688 @@
+dnl Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
+dnl Rocky Bernstein
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2, or (at your option)
+dnl any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+dnl 02110-1301 USA.
+
+define(RELEASE_NUM, 82cvs)
+define(CDIO_VERSION_STR, 0.$1)
+
+AC_PREREQ(2.52)
+AC_REVISION([$Id: configure.ac,v 1.238 2008/11/27 21:09:51 rocky Exp $])dnl
+AC_INIT(libcdio, CDIO_VERSION_STR(RELEASE_NUM))
+AC_CONFIG_SRCDIR(src/cd-info.c)
+
+dnl For multilanguage manual pages (e.g. japanese cdparanoia) we use
+dnl $make_p and according to Steve Schultz this is a make_p is a 1.8
+dnl feature.
+
+AM_INIT_AUTOMAKE([1.7])
+
+AC_CANONICAL_HOST
+AM_CONFIG_HEADER(config.h)
+AC_CONFIG_MACRO_DIR([m4])
+
+LIBCDIO_VERSION_NUM=`echo RELEASE_NUM | cut -d . -f 1 | tr -d a-z`
+AC_SUBST(LIBCDIO_VERSION_NUM)
+
+AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
+AM_MISSING_PROG(CVS2CL, cvs2cl, $missing_dir)
+AM_MAINTAINER_MODE
+
+AM_SANITY_CHECK
+
+AC_ARG_WITH(cd-drive,
+[ --without-cd-drive don't build program cd-drive (default with)],
+enable_cd_drive="${withval}", enable_cd_drive=yes)
+
+AC_ARG_WITH(cd-info,
+[ --without-cd-info don't build program cd-info (default with)],
+enable_cd_info="${withval}", enable_cd_info=yes)
+
+AC_ARG_WITH(cd-paranoia,
+[ --without-cd-paranoia don't build program cd-paranoia and paranoia libraries (default with)],
+enable_cd_paranoia="${withval}", enable_cd_paranoia=yes)
+
+AC_ARG_WITH(cdda-player,
+[ --without-cdda-player don't build program cdda-player (default with)],
+enable_cdda_player="${withval}", enable_cdda_player=yes)
+
+AC_ARG_WITH(cd-paranoia-name,
+[ --with-cd-paranoia-name name to use as the cd-paranoia program name (default cd-paranoia)],
+cd_paranoia_name="${withval}", cd_paranoia_name="cd-paranoia")
+CDPARANOIA_NAME="$cd_paranoia_name"
+AC_SUBST(CDPARANOIA_NAME)
+
+AC_ARG_WITH(cd-read,
+[ --without-cd-read don't build program cd-read (default with)],
+enable_cd_read="${withval}", enable_cd_read=yes)
+
+AC_ARG_WITH(iso-info,
+[ --without-iso-info don't build program iso-info (default with)],
+enable_iso_info="${withval}", enable_iso_info=yes)
+
+AC_ARG_WITH(iso-read,
+[ --without-iso-read don't build program iso-read (default with)],
+enable_iso_read="${withval}", enable_iso_read=yes)
+
+AC_ARG_WITH(versioned-libs,
+[ --without-versioned-libs build versioned library symbols (default enabled if you have GNU ld)],
+enable_versioned_libs="${withval}", enable_versioned_libs=yes)
+
+AC_ARG_ENABLE([cxx],
+ AC_HELP_STRING([--disable-cxx], [Disable C++ bindings (default enabled)]))
+AM_CONDITIONAL([ENABLE_CXX_BINDINGS], [test "x$enable_cxx" != "xno"])
+
+AC_ARG_ENABLE(cpp-progs,
+ [ --enable-cpp-progs make C++ example programs (default enabled)])
+AM_CONDITIONAL(ENABLE_CPP, test x"$enable_cpp_progs" = "xyes")
+
+AC_ARG_ENABLE(example-progs,
+ AC_HELP_STRING([--disable-example-progs], [Don't build libcdio sample programs]))
+
+AM_CONDITIONAL(BUILD_EXAMPLES, test "x$enable_example_progs" != "xno")
+
+dnl We use C
+AC_PROG_CC
+AM_PROG_CC_C_O
+dnl We also use C++ in example programs and for CXX bindings
+AC_PROG_CXX
+
+dnl Checks for programs.
+AC_AIX
+
+cd_drivers='cdrdao, BIN/CUE, NRG'
+
+if test "x$GCC" != "xyes"
+then
+ echo "*** non GNU CC compiler detected."
+ echo "*** This package has not been tested very well with non GNU compilers"
+ echo "*** you should try to use 'gcc' for compiling this package."
+else
+ WARN_CFLAGS="-Wall -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations -Wunused -Wpointer-arith -Wwrite-strings -Wnested-externs -Wno-sign-compare"
+
+ for WOPT in $WARN_CFLAGS; do
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $WOPT"
+ AC_MSG_CHECKING([whether $CC understands $WOPT])
+ AC_TRY_COMPILE([], [], has_option=yes, has_option=no,)
+ CFLAGS="$SAVE_CFLAGS"
+ AC_MSG_RESULT($has_option)
+ if test $has_option = yes; then
+ warning_flags="$warning_flags $option"
+ fi
+ unset has_option
+ unset SAVE_CFLAGS
+ done
+ WARNING_FLAGS="$warning_flags"
+ unset warning_flags
+fi
+
+# We use Perl for documentation and regression tests
+AC_PATH_PROG(PERL, perl, false)
+AC_SUBST(PERL)
+AM_CONDITIONAL(HAVE_PERL, test "$PERL" != "false")
+
+# We use a diff in regression testing
+AC_PATH_PROG(DIFF, diff, no)
+DIFF_OPTS=
+
+if test "$DIFF" = no ; then
+ AC_PATH_PROG(DIFF, cmp, no)
+else
+ # Try for GNU diff options.
+ # MSDOG output uses \r\n rather than \n in tests
+ for diff_opt in -w --unified ; do
+ if $DIFF $diff_opt ./configure ./configure > /dev/null 2>&1; then
+ AC_MSG_RESULT([adding $diff_opt to diff in regression tests])
+ DIFF_OPTS="$DIFF_OPTS $diff_opt"
+ fi
+ done
+fi
+AC_SUBST(DIFF)
+AC_SUBST(DIFF_OPTS)
+
+dnl check for large file support
+AC_SYS_LARGEFILE
+
+dnl we need to define _FILE_OFFSET_BITS or _LARGE_FILES on the compiler command
+dnl line because otherwise the system headers risk being included before
+dnl problems
+if test "x$ac_cv_sys_largefiles" = "xyes"; then
+ if test "x$ac_cv_sys_file_offset_bits" = "x64"; then
+ LIBCDIO_LARGEFILE_FLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES"
+ else
+ LIBCDIO_LARGEFILE_FLAGS="-D_LARGE_FILES"
+ fi
+ dnl AC_FUNC_FSEEKO sets HAVE_FSEEKO and $ac_cv_sys_largefile_source
+ AC_FUNC_FSEEKO
+ if test "$ac_cv_sys_largefile_source" != no; then
+ LIBCDIO_LARGEFILE_FLAGS="$LIBDDIO_LARGEFILE_FLAGS -D_LARGEFILE_SOURCE=$ac_cv_sys_largefile_source"
+ fi
+ CPPFLAGS="$CPPFLAGS $LIBCDIO_LARGEFILE_FLAGS"
+fi
+
+# We use cmp and cdparanoia in cd-paranoia regression testing
+AC_PATH_PROG(CMP, cmp, no)
+AC_SUBST(CMP)
+
+AC_PATH_PROG(OLD_CDPARANOIA, cdparanoia, no)
+AC_SUBST(OLD_CDPARANOIA)
+
+AC_DEFINE(LIBCDIO_CONFIG_H, 1,
+ [Is set when libcdio's config.h has been included. Applications wishing to sue their own config.h values (such as set by the application's configure script can define this before including any of libcdio's headers.])
+
+dnl headers
+
+AC_HEADER_STDC
+AC_CHECK_HEADERS(errno.h fcntl.h glob.h limits.h pwd.h)
+AC_CHECK_HEADERS(stdarg.h stdbool.h stdio.h sys/cdio.h sys/param.h)
+AC_CHECK_HEADERS(sys/time.h sys/timeb.h)
+AC_CHECK_HEADERS(ncurses.h curses.h, break, [enable_cdda_player='no'])
+
+dnl FreeBSD 4 has getopt in unistd.h. So we include that before
+dnl getopt.h
+AC_CHECK_HEADERS(unistd.h getopt.h)
+
+AC_SUBST(SBPCD_H)
+AC_SUBST(UCDROM_H)
+AC_SUBST(TYPESIZES)
+
+dnl compiler
+AC_C_BIGENDIAN
+AC_C_CONST
+AC_C_INLINE
+
+dnl ISOC99_PRAGMA
+AC_MSG_CHECKING([whether $CC supports ISOC99 _Pragma()])
+AC_TRY_COMPILE([],[_Pragma("pack(1)")], [
+ ISOC99_PRAGMA=yes
+ AC_DEFINE(HAVE_ISOC99_PRAGMA, [], [Supports ISO _Pragma() macro])
+],ISOC99_PRAGMA=no)
+AC_MSG_RESULT($ISOC99_PRAGMA)
+
+##
+## Check for S_ISSOCK() and S_ISLNK() macros
+##
+AC_MSG_CHECKING(for S_ISLNK() macro)
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+#ifdef HAVE_SYS_STAT_H
+# include
+#endif
+],[return S_ISLNK(0);])],
+[ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_S_ISLNK, [], [Define this defines S_ISLNK()]) ],
+[ AC_MSG_RESULT(no) ])
+
+AC_MSG_CHECKING([for S_ISSOCK() macro])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+#ifdef HAVE_SYS_STAT_H
+# include
+#endif
+],[return S_ISSOCK(0);])],
+[ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_S_ISSOCK, [], [Define this defines S_ISSOCK()]) ],
+[ AC_MSG_RESULT(no) ])
+
+AC_MSG_CHECKING([for struct timespec])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+#ifdef HAVE_SYS_TIME_H
+#include
+#endif
+],[struct timespec ts;])],
+[ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_STRUCT_TIMESPEC, [], [Define this if you have struct timespec]) ],
+[ AC_MSG_RESULT(no) ])
+
+dnl empty_array_size
+AC_MSG_CHECKING([how to create empty arrays])
+
+empty_array_size="xxxx"
+AC_TRY_COMPILE([],[struct { int foo; int bar[]; } doo;], empty_array_size="")
+
+if test "x$empty_array_size" = "xxxx";then
+ AC_TRY_COMPILE([],[struct { int foo; int bar[0]; } doo;], empty_array_size="0")
+fi
+
+if test "x$empty_array_size" = "xxxx"
+then
+ AC_MSG_ERROR([compiler is unable to creaty empty arrays])
+else
+ AC_DEFINE_UNQUOTED(EMPTY_ARRAY_SIZE, $empty_array_size,
+ [what to put between the brackets for empty arrays])
+ changequote(`,')
+ msg="[${empty_array_size}]"
+ changequote([,])
+ AC_MSG_RESULT($msg)
+fi
+
+dnl Enable the creation of shared libraries under Win32.
+AC_LIBTOOL_WIN32_DLL
+
+dnl AM_PROG_LIBTOOL tests whether we have GNU ld
+dnl this must come before checking --with-versioned-libs
+dnl which requires GNU ld.
+AM_PROG_LIBTOOL
+
+dnl system
+
+# FIXME:
+# I believe some OS's require -lm, but I don't recall for what function
+# When we find it, put it in below instead of "cos".
+AC_CHECK_LIB(m, cos, [LIBS="$LIBS -lm"; COS_LIB="-lm"])
+CFLAGS="$CFLAGS $WARN_CFLAGS"
+AC_SUBST(COS_LIB)
+
+# Do we have GNU ld? If we don't, we can't build versioned symbols.
+if test "$with_gnu_ld" != yes; then
+ AC_MSG_WARN([I don't see GNU ld. I'm going to assume --without-versioned-libs])
+ enable_versioned_libs='no'
+fi
+# We also need GNU make to build versioned symbols.
+if test "x$enable_versioned_libs" = "xyes" ; then
+ if test -n "$MAKE" ; then
+ $MAKE --version 2>/dev/null >/dev/null
+ if test "$?" -ne 0 ; then
+ AC_MSG_ERROR(Either set MAKE variable to GNU make or use
+ --without-versioned-libs option)
+ fi
+ else
+ make --version 2>/dev/null >/dev/null
+ if test "$?" -ne 0 ; then
+ AC_MSG_ERROR(Either set MAKE variable to GNU make or use
+ --without-versioned-libs option)
+ fi
+ fi
+fi
+
+AM_CONDITIONAL(CYGWIN, test "x$CYGWIN" = "xyes")
+AM_CONDITIONAL(BUILD_CD_DRIVE, test "x$enable_cd_drive" = "xyes")
+AM_CONDITIONAL(BUILD_CDINFO, test "x$enable_cd_info" = "xyes")
+AM_CONDITIONAL(BUILD_CD_READ, test "x$enable_cd_read" = "xyes")
+AM_CONDITIONAL(BUILD_CD_PARANOIA, test "x$enable_cd_paranoia" = "xyes")
+AM_CONDITIONAL(BUILD_ISO_INFO, test "x$enable_iso_info" = "xyes")
+AM_CONDITIONAL(BUILD_ISO_READ, test "x$enable_iso_read" = "xyes")
+AM_CONDITIONAL(BUILD_CDINFO_LINUX, test "x$enable_cd_info_linux" = "xyes")
+AM_CONDITIONAL(BUILD_CDIOTEST, test "x$enable_cdiotest" = "xyes")
+AM_CONDITIONAL(BUILD_VERSIONED_LIBS, test "x$enable_versioned_libs" = "xyes")
+AM_CONDITIONAL(DISABLE_CPP, test "x$disable_cpp" = "xyes")
+
+dnl Checks for header files.
+
+LIBCDIO_CDDA_LIBS='$(top_builddir)/lib/cdda_interface/libcdio_cdda.la'
+LIBCDIO_CFLAGS='-I$(top_srcdir)/lib/driver -I$(top_builddir)/include -I$(top_srcdir)/include/'
+LIBCDIO_LIBS='$(top_builddir)/lib/driver/libcdio.la'
+LIBCDIO_DEPS="$LIBCDIO_LIBS"
+LIBCDIOPP_LIBS='$(top_builddir)/lib/cdio++/libcdio++.la'
+LIBISO9660PP_LIBS='$(top_builddir)/lib/cdio++/libiso9660++.la'
+LIBCDIO_PARANOIA_LIBS='$(top_builddir)/lib/paranoia/libcdio_paranoia.la'
+LIBISO9660_CFLAGS='-I$(top_srcdir)/lib/iso9660/'
+LIBISO9660_LIBS='$(top_builddir)/lib/iso9660/libiso9660.la'
+LIBUDF_CFLAGS='-I$(top_srcdir)/lib/udf/'
+LIBUDF_LIBS='$(top_builddir)/lib/udf/libudf.la'
+AC_SUBST(LIBCDIO_CDDA_LIBS)
+AC_SUBST(LIBCDIO_CFLAGS)
+AC_SUBST(LIBISO9660_CFLAGS)
+AC_SUBST(LIBISO9660PP_LIBS)
+AC_SUBST(LIBCDIO_LIBS)
+AC_SUBST(LIBCDIOPP_LIBS)
+AC_SUBST(LIBCDIO_DEPS)
+AC_SUBST(LIBCDIO_PARANOIA_LIBS)
+AC_SUBST(LIBISO9660_LIBS)
+AC_SUBST(LIBUDF_LIBS)
+
+dnl Libtool flag for strict linkage
+LT_NO_UNDEFINED=
+
+case $host_os in
+ aix*)
+ ## Don't use AIX driver until starts to really work
+ ## cd_drivers="${cd_drivers}, AIX"
+ ## AC_DEFINE([HAVE_AIX_CDROM], [1],
+ ## [Define 1 if you have AIX CD-ROM support])
+ ;;
+ darwin6*|darwin7*|darwin8*|darwin9*)
+ AC_CHECK_HEADERS(IOKit/IOKitLib.h CoreFoundation/CFBase.h,
+ [have_iokit_h="yes"])
+ if test "x$have_iokit_h" = "xyes" ; then
+ AC_DEFINE([HAVE_DARWIN_CDROM], [1],
+ [Define 1 if you have Darwin OS X-type CD-ROM support])
+ DARWIN_PKG_LIB_HACK="-Wl,-framework,CoreFoundation -Wl,-framework,IOKit"
+
+ dnl Prior to Mac OS X 10.4 (Tiger), DiskArbitration was a private framework.
+ dnl It's now public, and it's needed to do cd/dvd unmount/eject.
+ AC_MSG_CHECKING([for DiskArbitration framework])
+ ac_save_LIBS="$LIBS" LIBS="$LIBS -framework CoreFoundation -framework DiskArbitration"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[]])],
+ [have_diskarbitration_framework=yes], [have_diskarbitration_framework=no])
+ LIBS="$ac_save_LIBS"
+ AC_MSG_RESULT([$have_diskarbitration_framework])
+ if test x"$have_diskarbitration_framework" = x"yes"; then
+ AC_DEFINE([HAVE_DISKARBITRATION], 1, [Define to 1 if you have the Apple DiskArbitration framework])
+ DARWIN_PKG_LIB_HACK="$DARWIN_PKG_LIB_HACK -Wl,-framework,DiskArbitration"
+ fi
+
+ AC_SUBST(DARWIN_PKG_LIB_HACK)
+ LIBCDIO_LIBS="$LIBCDIO_LIBS $DARWIN_PKG_LIB_HACK"
+ cd_drivers="${cd_drivers}, Darwin"
+ fi
+ ;;
+ linux*|uclinux)
+ AC_CHECK_HEADERS(linux/version.h linux/major.h)
+ AC_CHECK_HEADERS(linux/cdrom.h, [have_linux_cdrom_h="yes"])
+ if test "x$have_linux_cdrom_h" = "xyes" ; then
+ AC_TRY_COMPILE(,[
+#include
+struct cdrom_generic_command test;
+int has_timeout=sizeof(test.timeout);],
+ [AC_DEFINE([HAVE_LINUX_CDROM_TIMEOUT], [1],
+ [Define 1 if timeout is in cdrom_generic_command struct])])
+ AC_DEFINE([HAVE_LINUX_CDROM], [1],
+ [Define 1 if you have Linux-type CD-ROM support])
+ cd_drivers="${cd_drivers}, GNU/Linux"
+ fi
+ ;;
+ bsdi*)
+ AC_CHECK_HEADERS(dvd.h, [have_bsdi_dvd_h="yes"])
+ if test "x$have_bsdi_dvd_h" = "xyes" ; then
+ AC_DEFINE([HAVE_BSDI_CDROM], [1],
+ [Define 1 if you have BSDI-type CD-ROM support])
+ LIBS="$LIBS -ldvd -lcdrom"
+ LIBCDIO_LIBS="$LIBCDIO_LIBS -lcdrom"
+ cd_drivers="${cd_drivers}, BSDI"
+ fi
+ ;;
+ sunos*|sun*|solaris*)
+ AC_DEFINE([HAVE_SOLARIS_CDROM], [1],
+ [Define 1 if you have Solaris CD-ROM support])
+ cd_drivers="${cd_drivers}, Solaris"
+ ;;
+ cygwin*)
+ AC_DEFINE([CYGWIN], [1],
+ [Define 1 if you are compiling using cygwin])
+ AC_DEFINE([HAVE_WIN32_CDROM], [1],
+ [Define 1 if you have MinGW CD-ROM support])
+ LIBS="$LIBS -lwinmm"
+ cd_drivers="${cd_drivers}, MinGW"
+ AC_DEFINE([NEED_TIMEZONEVAR], [1],
+ [Define 1 if you need timezone defined to get timzone
+ defined as a variable. In cygwin it is a function too])
+ ;;
+ mingw*)
+ AC_CHECK_HEADERS(windows.h)
+ AC_DEFINE([MINGW32], [1],
+ [Define 1 if you are compiling using MinGW])
+ AC_DEFINE([HAVE_WIN32_CDROM], [1],
+ [Define 1 if you have MinGW CD-ROM support])
+ LIBS="$LIBS -lwinmm -mwindows"
+ LT_NO_UNDEFINED="-no-undefined"
+ cd_drivers="${cd_drivers}, MinGW "
+ ;;
+ freebsd4.*|freebsd5.*|freebsd6*|freebsd7*|dragonfly*|kfreebsd*)
+ AC_DEFINE([HAVE_FREEBSD_CDROM], [1],
+ [Define 1 if you have FreeBSD CD-ROM support])
+ LIBS="$LIBS -lcam"
+ cd_drivers="${cd_drivers}, FreeBSD "
+ ;;
+ netbsd*)
+ AC_DEFINE([HAVE_NETBSD_CDROM], [1],
+ [Define 1 if you have NetBSD CD-ROM support])
+ # LIBS="$LIBS -lcam"
+ cd_drivers="${cd_drivers}, NetBSD "
+ ;;
+ *)
+ AC_MSG_WARN([Don't have OS CD-reading support for ${host_os}...])
+ AC_MSG_WARN([Will use generic support.])
+ ;;
+esac
+
+AC_SUBST(LT_NO_UNDEFINED)
+
+AC_MSG_CHECKING(extern long timezone variable)
+AC_LINK_IFELSE([
+#ifdef NEED_TIMEZONEVAR
+#define timezonevar 1
+#endif
+
+#include
+extern long timezone;
+int main(int argc, char **argv) {
+ long test_timezone = timezone;
+ return 0;
+}
+], [AC_MSG_RESULT(yes);
+ AC_DEFINE([HAVE_TIMEZONE_VAR], 1,
+ [Define if you have an extern long timenzone variable.])],
+ [AC_MSG_RESULT(no)])
+dnl
+
+AC_SUBST(LINUX_CDROM_TIMEOUT)
+AC_SUBST(DARWIN_PKG_LIB_HACK)
+AC_SUBST(HAVE_BSDI_CDROM)
+AC_SUBST(HAVE_DARWIN_CDROM)
+AC_SUBST(HAVE_FREEBSD_CDROM)
+AC_SUBST(HAVE_LINUX_CDROM)
+AC_SUBST(HAVE_SOLARIS_CDROM)
+AC_SUBST(HAVE_WIN32_CDROM)
+
+LIBCDIO_SOURCE_PATH="`pwd`"
+AC_DEFINE_UNQUOTED(LIBCDIO_SOURCE_PATH, "$LIBCDIO_SOURCE_PATH",
+ [Full path to libcdio top_sourcedir.])
+AC_SUBST(LIBCDIO_SOURCE_PATH)
+
+AC_CHECK_FUNCS( [bzero drand48 ftruncate geteuid getgid \
+ getuid getpwuid gettimeofday lstat memcpy memset \
+ rand seteuid setegid snprintf setenv unsetenv tzset \
+ sleep vsnprintf readlink gmtime_r localtime_r] )
+
+# check for timegm() support
+AC_CHECK_FUNC(timegm, AC_DEFINE(HAVE_TIMEGM,1,
+ [Define to 1 if timegm is available]))
+
+AC_CHECK_MEMBER([struct tm.tm_gmtoff],
+ [AC_DEFINE(HAVE_TM_GMTOFF, 1,
+ [Define if struct tm has the tm_gmtoff member.])],
+ ,
+ [#include ])
+
+if test $ac_cv_member_struct_tm_tm_gmtoff = yes ; then
+ AC_MSG_CHECKING([whether time.h defines daylight and timezone variables])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+#include
+],[return (timezone != 0) + daylight;])],
+ [AC_DEFINE(HAVE_DAYLIGHT, 1,
+ [Define if time.h defines extern long timezone and int daylight vars.])
+ has_daylight=yes
+ ],[has_daylight=no])
+ AC_MSG_RESULT($has_daylight)
+
+ AC_MSG_CHECKING([whether time.h defines tzname variable])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+#include
+],[return (tzname != NULL);])],
+ [AC_DEFINE(HAVE_TZNAME, 1,
+ [Define if time.h defines extern extern char *tzname[2] variable])
+ has_tzname=yes
+ ],[has_tzname=no])
+ AC_MSG_RESULT($has_tzname)
+fi
+
+AC_ARG_ENABLE(joliet,
+ AS_HELP_STRING([--disable-joliet], [don't include Joliet extension support (default enabled)]),
+ [enable_joliet=$enableval],
+ [enable_joliet=yes])
+if test "${enable_joliet}" != "no" ; then
+ AM_ICONV
+ AM_LANGINFO_CODESET
+ if test "$am_cv_func_iconv" = yes ; then
+ AC_DEFINE(HAVE_JOLIET, [1],
+ [Define 1 if you want ISO-9660 Joliet extension support.
+ You must have also libiconv installed to get Joliet extension support.])
+ HAVE_JOLIET=1
+ else
+ AC_MSG_ERROR([You must have iconv installed.])
+ fi
+fi
+AC_SUBST(HAVE_JOLIET)
+
+if test x$enable_rock = x; then
+ enable_rock=yes
+ AC_ARG_ENABLE(rock,
+ [ --enable-rock include Rock-Ridge extension support (default enabled)],
+ enable_rock=yes, enable_rock=no)
+fi
+
+if test "${enable_rock}" != "no" ; then
+ AC_DEFINE(HAVE_ROCK, [1],
+ [Define 1 if you want ISO-9660 Rock-Ridge extension support.])
+ HAVE_ROCK=1
+fi
+AC_SUBST(HAVE_ROCK)
+AM_CONDITIONAL(ENABLE_ROCK, test x"$enable_rock" = "xyes")
+
+if test x$enable_cddb = x; then
+ enable_cddb=yes
+ AC_ARG_ENABLE(cddb,
+ [ --enable-cddb include CDDB lookups in cd_info (default enabled)],
+ enable_cddb=yes, enable_cddb=no)
+fi
+if test x$enable_cddb != "no" ; then
+ PKG_CHECK_MODULES(CDDB, libcddb >= 1.0.1, [
+ HAVE_CDDB=yes
+ AC_DEFINE(HAVE_CDDB, [], [Define this if you have libcddb installed])
+ ],
+ [AC_MSG_WARN([new enough libcddb not found. CDDB access disabled. Get libcddb from http://libcddb.sourceforge.net])
+ HAVE_CDDB=no])
+ AC_CHECK_LIB(socket, connect)
+ AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname))
+fi
+
+
+AC_SUBST(CDDB_LIBS)
+
+AC_DEFINE(HAVE_KEYPAD, [], [Define this if your libcurses has keypad])
+if test x$enable_cdda_player = xyes; then
+ AC_CHECK_LIB(ncurses, mvprintw,
+ [LIBCURSES=ncurses; CDDA_PLAYER_LIBS="$CDDA_PLAYER_LIBS -lncurses"],
+ AC_CHECK_LIB(curses, mvprintw,
+ [LIBCURSES=curses; CDDA_PLAYER_LIBS="$CDDA_PLAYER_LIBS -lcurses"],
+ [AC_MSG_WARN([Will not build cdda-player - did not find libcurses or libncurses])
+ enable_cdda_player=no]))
+ if test x$enable_cdda_player = xyes; then
+ AC_CHECK_LIB($LIBCURSES, keypad, [HAVE_KEYPAD=yes])
+ fi
+fi
+
+AM_CONDITIONAL(BUILD_CDDA_PLAYER, test "x$enable_cdda_player" = "xyes")
+AC_SUBST(CDDA_PLAYER_LIBS)
+
+if test x$enable_vcd_info = x; then
+AC_ARG_ENABLE(vcd_info,
+ [ --enable-vcd-info include Video CD Info from libvcd],
+ enable_vcd_info=yes,
+ enable_vcd_info=no)
+fi
+if test x$enable_vcd_info = xyes; then
+ PKG_CHECK_MODULES(VCDINFO, libvcdinfo >= 0.7.21,
+ [AC_DEFINE([HAVE_VCDINFO],1,
+ [Define this if you have libvcdinfo installed])],
+ [AC_MSG_WARN(a new enough libvcdinfo not found.
+VCD info display in cd-info disabled.
+libvcdinfo is part of vcdimager. Get it from http://vcdimager.org)
+ enable_vcd_info=no])
+fi
+
+AC_SUBST(VCDINFO_LIBS)
+AC_SUBST(VCDINFO_CFLAGS)
+
+dnl
+dnl Newest automake workaround - needed for multi-language manual pages
+dnl
+AC_SUBST(mkdir_p)
+
+AC_CONFIG_COMMANDS([checks],
+ [chmod +x test/check_cue.sh; chmod +x test/check_nrg.sh
+ ])
+
+dnl
+dnl Output configuration files
+dnl
+## AC_CONFIG_FILES([ po/Makefile.in\
+AC_CONFIG_FILES([
+ Makefile \
+ example/C++/Makefile \
+ example/C++/OO/Makefile \
+ example/Makefile \
+ include/Makefile \
+ include/cdio/Makefile \
+ include/cdio++/Makefile \
+ include/cdio/version.h \
+ doc/doxygen/Doxyfile \
+ doc/Makefile \
+ lib/Makefile \
+ lib/cdda_interface/Makefile \
+ lib/cdio++/Makefile \
+ lib/driver/Makefile \
+ lib/iso9660/Makefile \
+ lib/paranoia/Makefile \
+ lib/udf/Makefile \
+ libcdio.pc \
+ libcdio++.pc \
+ libcdio_cdda.pc \
+ libcdio_paranoia.pc \
+ libiso9660.pc \
+ libiso9660++.pc \
+ libudf.pc \
+ package/libcdio.spec \
+ src/cd-paranoia/Makefile \
+ src/cd-paranoia/usage.txt \
+ src/cd-paranoia/doc/Makefile \
+ src/cd-paranoia/doc/en/cd-paranoia.1 \
+ src/cd-paranoia/doc/en/Makefile \
+ src/cd-paranoia/doc/ja/cd-paranoia.1 \
+ src/cd-paranoia/doc/ja/Makefile \
+ src/Makefile \
+ test/testbincue.c \
+ test/testisocd2.c \
+ test/testpregap.c \
+ test/testnrg.c \
+ test/check_common_fn \
+ test/Makefile \
+ ])
+
+# AC_CONFIG_FILES([po/Makefile])
+AC_CONFIG_FILES([test/check_cue.sh], [chmod +x test/check_cue.sh])
+AC_CONFIG_FILES([test/check_iso.sh], [chmod +x test/check_iso.sh])
+AC_CONFIG_FILES([test/check_nrg.sh], [chmod +x test/check_nrg.sh])
+AC_CONFIG_FILES([test/check_paranoia.sh], [chmod +x test/check_paranoia.sh])
+
+AC_CONFIG_COMMANDS([default],[[
+# Make sure scripts are executable
+# This is a big hack, but I don't know any other way around it.
+cat > include/cdio/cdio_config.h << EOF
+/** \file cdio_config.h
+ * \brief configuration-time settings useful in compilation; a run-time
+ version of config.h
+*/
+EOF
+head -n 233 config.h >> include/cdio/cdio_config.h
+]],[[]])
+
+AC_OUTPUT
+
+echo "Using CD-ROM drivers: $cd_drivers"
+echo "Building cd-paranoia: $(test "x$enable_cd_paranoia" = "xyes" && echo yes || echo no)"
+echo "Building cd-info : $(test "x$enable_cd_info" = "xyes" && echo yes || echo no)"
+echo "Building cd-read : $(test "x$enable_cd_read" = "xyes" && echo yes || echo no)"
+echo "Building cdda-player: $(test "x$enable_cdda_player" = "xyes" && echo yes || echo no)"
+echo "Building iso-info : $(test "x$enable_iso_info" = "xyes" && echo yes || echo no)"
+echo "Building iso-read : $(test "x$enable_iso_read" = "xyes" && echo yes || echo no)"
diff --git a/cvs2cl_header b/cvs2cl_header
new file mode 100644
index 00000000..93cdd64a
--- /dev/null
+++ b/cvs2cl_header
@@ -0,0 +1,4 @@
+##
+## autogenerated ChangeLog -- don't edit
+##
+
diff --git a/cvs2cl_usermap b/cvs2cl_usermap
new file mode 100644
index 00000000..1afc0ae1
--- /dev/null
+++ b/cvs2cl_usermap
@@ -0,0 +1,7 @@
+edsdead:Robert William Fuller
+flameeyes:Diego 'Flameeyes' Pettenò
+hvr:Herbert Valerio Riedel
+karl:Karl Berry
+nboullis:Nicolas Boullis
+rocky:Rocky Bernstein
+thesin:Justin F. Hallett
diff --git a/doc/.gitignore b/doc/.gitignore
new file mode 100644
index 00000000..a07183bf
--- /dev/null
+++ b/doc/.gitignore
@@ -0,0 +1,7 @@
+/Makefile
+/Makefile.in
+/libcdio.info
+/mdate-sh
+/stamp-vti
+/texinfo.tex
+/version.texi
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 00000000..f8e72e86
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,46 @@
+# $Id: Makefile.am,v 1.9 2008/04/17 17:39:47 karl Exp $
+#
+# Copyright (C) 2003, 2004, 2008 Rocky Bernstein
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# 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 the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+EXTRA_DIST = doxygen/Doxyfile.in doxygen/run_doxygen
+info_TEXINFOS = libcdio.texi
+libcdio_TEXINFOS = fdl.texi glossary.texi
+
+reference:
+ -( cd ${top_srcdir} && $(MAKE) doxygen )
+
+pdf: libcdio.pdf
+
+txt: libcdio.txt
+
+ps: libcdio.ps
+
+html: libcdio.html
+
+%.ps.gz: %.ps
+ gzip -9c $< > $@
+
+.texi.pdf:
+ texi2pdf $<
+
+.texi.html:
+ texi2html $<
+
+.texi.txt:
+ makeinfo --no-headers $< > $@
+
+all-formats: pdf dvi txt ps html
+
+MOSTLYCLEANFILES = libcdio.html libcdio.pdf libcdio.ps.gz
diff --git a/doc/doxygen/.gitignore b/doc/doxygen/.gitignore
new file mode 100644
index 00000000..eeb3b95d
--- /dev/null
+++ b/doc/doxygen/.gitignore
@@ -0,0 +1 @@
+/Doxyfile
diff --git a/doc/doxygen/Doxyfile.in b/doc/doxygen/Doxyfile.in
new file mode 100644
index 00000000..868137ee
--- /dev/null
+++ b/doc/doxygen/Doxyfile.in
@@ -0,0 +1,1302 @@
+# Doxyfile 1.5.3
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+# TAG = value [value, ...]
+# For lists items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file that
+# follow. The default is UTF-8 which is also the encoding used for all text before
+# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into
+# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of
+# possible encodings.
+
+DOXYFILE_ENCODING = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
+PROJECT_NAME = @PACKAGE@
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER = @VERSION@
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY =
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian,
+# Italian, Japanese, Japanese-en (Japanese with English messages), Korean,
+# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian,
+# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
+
+OUTPUT_LANGUAGE = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is
+# used as the annotated text. Otherwise, the brief description is used as-is.
+# If left blank, the following values are used ("$name" is automatically
+# replaced with the name of the entity): "The $name class" "The $name widget"
+# "The $name file" "is" "provides" "specifies" "contains"
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF = "The $name class " \
+ "The $name widget " \
+ "The $name file " \
+ is \
+ provides \
+ specifies \
+ contains \
+ represents \
+ a \
+ an \
+ the
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip.
+
+STRIP_FROM_PATH = @LIBCDIO_SOURCE_PATH@
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
+# are normally passed to the compiler using the -I flag.
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like regular Qt-style comments
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
+# interpret the first line (until the first dot) of a Qt-style
+# comment as the brief description. If set to NO, the comments
+# will behave just like regular Qt-style comments (thus requiring
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the DETAILS_AT_TOP tag is set to YES then Doxygen
+# will output the detailed description near the top, like JavaDoc.
+# If set to NO, the detailed description appears after the member
+# documentation.
+
+DETAILS_AT_TOP = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# re-implements.
+
+INHERIT_DOCS = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+# a new page for each member. If set to NO, the documentation of a member will
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE = 8
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
+# sources only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
+# sources only. Doxygen will then generate output that is more tailored for Java.
+# For instance, namespaces will be presented as packages, qualified scopes
+# will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to
+# include (a tag file for) the STL sources as input, then you should
+# set this tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
+# func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+
+CPP_CLI_SUPPORT = NO
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
+# the \nosubgrouping command.
+
+SUBGROUPING = YES
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE = YES
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be extracted
+# and appear in the documentation as a namespace called 'anonymous_namespace{file}',
+# where file will be replaced with the base name of the file that contains the anonymous
+# namespace. By default anonymous namespace are hidden.
+
+EXTRACT_ANON_NSPACES = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES = YES
+
+# If the sources in your project are distributed over multiple directories
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES = NO
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from the
+# version control system). Doxygen will invoke the program by executing (via
+# popen()) the command , where is the value of
+# the FILE_VERSION_FILTER tag, and is the name of an input file
+# provided by doxygen. Whatever the program writes to standard output
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER =
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for
+# functions that are documented, but have no documentation for their parameters
+# or return value. If set to NO (the default) doxygen will only warn about
+# wrong or incomplete parameter documentation, but not about the absence of
+# documentation.
+
+WARN_NO_PARAMDOC = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text. Optionally the format may contain
+# $version, which will be replaced by the version of the file (if it could
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT = "$file:$line: $text "
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT = ../../include/cdio/
+
+# This tag can be used to specify the character encoding of the source files that
+# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default
+# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding.
+# See http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+INPUT_ENCODING = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py
+
+FILE_PATTERNS = *.h
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE =
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
+# directories that are symbolic links (a Unix filesystem feature) are excluded
+# from the input.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories. Note that the wildcards are matched
+# against the file with absolute path, so to exclude all test directories
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the output.
+# The symbol name can be a fully qualified name, a word, or if the wildcard * is used,
+# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH = ../../example
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command , where
+# is the value of the INPUT_FILTER tag, and is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output. If FILTER_PATTERNS is specified, this tag will be
+# ignored.
+
+INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
+# is applied to all files.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO. If you have enabled CALL_GRAPH or CALLER_GRAPH
+# then you must also enable this option. If you don't then doxygen will produce
+# a warning and turn it on anyway
+
+SOURCE_BROWSER = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default)
+# then for each documented function all documented
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default)
+# then for each documented function all documented entities
+# called/used by that function will be listed.
+
+REFERENCES_RELATION = YES
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code. Otherwise they will link to the documentstion.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code
+# will point to the HTML generated by the htags(1) tool instead of doxygen
+# built-in source browser. The htags tool is part of GNU's global source
+# tagging system (see http://www.gnu.org/software/global/global.html). You
+# will need version 4.8.6 or higher.
+
+USE_HTAGS = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET =
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP = NO
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded. For this to work a browser that supports
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
+# written to the html output directory.
+
+CHM_FILE =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
+DISABLE_INDEX = NO
+
+# This tag can be used to set the number of enum values (range [1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
+# probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX = YES
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
+# default command name.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE = letter
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS = NO
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX = NO
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
+# in the output.
+
+LATEX_HIDE_INDICES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation.
+
+GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_SCHEMA =
+
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_DTD =
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
+# moment.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader. This is useful
+# if you want to understand what is going on. On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
+# instead of the = operator.
+
+PREDEFINED =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE = libcdio.xml
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
+# be listed.
+
+EXTERNAL_GROUPS = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+# or super classes. Setting the tag to NO turns the diagrams off. Note that
+# this option is superseded by the HAVE_DOT option below. This is only a
+# fallback. It is recommended to install and use dot, since it yields more
+# powerful graphs.
+
+CLASS_DIAGRAMS = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to
+# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to
+# specify the directory where the mscgen tool resides. If left empty the tool is assumed to
+# be found in the default search path.
+
+MSCGEN_PATH =
+
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT = NO
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+
+UML_LOOK = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
+# other documented files.
+
+INCLUDE_GRAPH = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will
+# generate a call dependency graph for every global function or class method.
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command.
+
+CALL_GRAPH = NO
+
+# If the CALLER_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will
+# generate a caller dependency graph for every global function or class method.
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable caller graphs for selected
+# functions only using the \callergraph command.
+
+CALLER_GRAPH = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
+# then doxygen will show the dependencies a directory has on other directories
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
+# \dotfile command).
+
+DOTFILE_DIRS =
+
+# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
+# nodes that will be shown in the graph. If the number of nodes in a graph
+# becomes larger than this value, doxygen will truncate the graph, which is
+# visualized by representing a node as a red box. Note that doxygen if the number
+# of direct children of the root node in a graph is already larger than
+# MAX_DOT_GRAPH_NOTES then the graph will not be shown at all. Also note
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes
+# that lay further from the root node will be omitted. Note that setting this
+# option to 1 or 2 may greatly reduce the computation time needed for large
+# code bases. Also note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, which results in a white background.
+# Warning: Depending on the platform used, enabling this option may lead to
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
+# read).
+
+DOT_TRANSPARENT = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10)
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
+# the various graphs.
+
+DOT_CLEANUP = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE = NO
diff --git a/doc/doxygen/run_doxygen b/doc/doxygen/run_doxygen
new file mode 100755
index 00000000..1765ed59
--- /dev/null
+++ b/doc/doxygen/run_doxygen
@@ -0,0 +1,107 @@
+#!/bin/sh
+# $Id: run_doxygen,v 1.1 2003/11/09 14:11:02 rocky Exp $
+
+# Runs doxygen and massages the output files.
+# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+#
+# Synopsis: run_doxygen --mode=[user|maint|man] v3srcdir v3builddir
+#
+# Originally hacked together by Phil Edwards
+
+
+# We can check now that the version of doxygen is >= this variable.
+DOXYVER=1.2.15
+doxygen=
+
+find_doxygen() {
+ v_required=`echo $DOXYVER | \
+ awk -F. '{if(NF<3)$3=0;print ($1*100+$2)*100+$3}'`
+ testing_version=
+ # thank you goat book
+ set `IFS=:; X="$PATH:/usr/local/bin:/bin:/usr/bin"; echo $X`
+ for dir
+ do
+ # AC_EXEEXT could come in useful here
+ maybedoxy="$dir/doxygen"
+ test -f "$maybedoxy" && testing_version=`$maybedoxy --version`
+ if test -n "$testing_version"; then
+ v_found=`echo $testing_version | \
+ awk -F. '{if(NF<3)$3=0;print ($1*100+$2)*100+$3}'`
+ if test $v_found -ge $v_required; then
+ doxygen="$maybedoxy"
+ break
+ fi
+ fi
+ done
+ if test -z "$doxygen"; then
+ echo run_doxygen error: Could not find Doxygen $DOXYVER in path. 1>&2
+ print_usage
+ fi
+}
+
+print_usage() {
+ cat 1>&2 <]
+ MODE is one of:
+ user Generate user-level HTML library documentation.
+ maint Generate maintainers' HTML documentation (lots more;
+ exposes non-public members, etc).
+ man Generate user-level man pages.
+
+ more options when i think of them
+
+Note: Requires Doxygen ${DOXYVER} or later; get it at
+ ftp://ftp.stack.nl/pub/users/dimitri/doxygen-${DOXYVER}.src.tar.gz
+
+EOF
+ exit 1
+}
+
+parse_options() {
+ for o
+ do
+ # Blatantly ripped from autoconf, er, I mean, "gratefully standing
+ # on the shoulders of those giants who have gone before us."
+ case "$o" in
+ -*=*) arg=`echo "$o" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) arg= ;;
+ esac
+
+ case "$o" in
+ --mode=*)
+ mode=$arg ;;
+ --mode | --help | -h)
+ print_usage ;;
+ *)
+ # this turned out to be a mess, maybe change to --srcdir=, etc
+ if test $srcdir = unset; then
+ srcdir=$o
+ elif test $outdir = unset; then
+ builddir=${o}
+ outdir=${o}/doc/doxygen
+ else
+ echo run_doxygen error: Too many arguments 1>&2
+ exit 1
+ fi
+ ;;
+ esac
+ done
+}
+
+
+# script begins here
+mode=unset
+srcdir=unset
+outdir=unset
+do_html=no
+do_man=no
+enabled_sections=
+DATEtext=`date '+%Y-%m-%d'`
+
+parse_options $*
+find_doxygen
+$doxygen ./Doxyfile
+
+exit 0
+
+# vim:ts=4:et:
diff --git a/doc/fdl.texi b/doc/fdl.texi
new file mode 100644
index 00000000..96ce74ea
--- /dev/null
+++ b/doc/fdl.texi
@@ -0,0 +1,451 @@
+@c The GNU Free Documentation License.
+@center Version 1.2, November 2002
+
+@c This file is intended to be included within another document,
+@c hence no sectioning command or @node.
+
+@display
+Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc.
+51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+@end display
+
+@enumerate 0
+@item
+PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+functional and useful document @dfn{free} in the sense of freedom: to
+assure everyone the effective freedom to copy and redistribute it,
+with or without modifying it, either commercially or noncommercially.
+Secondarily, this License preserves for the author and publisher a way
+to get credit for their work, while not being considered responsible
+for modifications made by others.
+
+This License is a kind of ``copyleft'', which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+@item
+APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work, in any medium, that
+contains a notice placed by the copyright holder saying it can be
+distributed under the terms of this License. Such a notice grants a
+world-wide, royalty-free license, unlimited in duration, to use that
+work under the conditions stated herein. The ``Document'', below,
+refers to any such manual or work. Any member of the public is a
+licensee, and is addressed as ``you''. You accept the license if you
+copy, modify or distribute the work in a way requiring permission
+under copyright law.
+
+A ``Modified Version'' of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A ``Secondary Section'' is a named appendix or a front-matter section
+of the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall
+subject (or to related matters) and contains nothing that could fall
+directly within that overall subject. (Thus, if the Document is in
+part a textbook of mathematics, a Secondary Section may not explain
+any mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The ``Invariant Sections'' are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License. If a
+section does not fit the above definition of Secondary then it is not
+allowed to be designated as Invariant. The Document may contain zero
+Invariant Sections. If the Document does not identify any Invariant
+Sections then there are none.
+
+The ``Cover Texts'' are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License. A Front-Cover Text may
+be at most 5 words, and a Back-Cover Text may be at most 25 words.
+
+A ``Transparent'' copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, that is suitable for revising the document
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup, or absence of markup, has been arranged to thwart
+or discourage subsequent modification by readers is not Transparent.
+An image format is not Transparent if used for any substantial amount
+of text. A copy that is not ``Transparent'' is called ``Opaque''.
+
+Examples of suitable formats for Transparent copies include plain
+@sc{ascii} without markup, Texinfo input format, La@TeX{} input
+format, @acronym{SGML} or @acronym{XML} using a publicly available
+@acronym{DTD}, and standard-conforming simple @acronym{HTML},
+PostScript or @acronym{PDF} designed for human modification. Examples
+of transparent image formats include @acronym{PNG}, @acronym{XCF} and
+@acronym{JPG}. Opaque formats include proprietary formats that can be
+read and edited only by proprietary word processors, @acronym{SGML} or
+@acronym{XML} for which the @acronym{DTD} and/or processing tools are
+not generally available, and the machine-generated @acronym{HTML},
+PostScript or @acronym{PDF} produced by some word processors for
+output purposes only.
+
+The ``Title Page'' means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, ``Title Page'' means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+A section ``Entitled XYZ'' means a named subunit of the Document whose
+title either is precisely XYZ or contains XYZ in parentheses following
+text that translates XYZ in another language. (Here XYZ stands for a
+specific section name mentioned below, such as ``Acknowledgements'',
+``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title''
+of such a section when you modify the Document means that it remains a
+section ``Entitled XYZ'' according to this definition.
+
+The Document may include Warranty Disclaimers next to the notice which
+states that this License applies to the Document. These Warranty
+Disclaimers are considered to be included by reference in this
+License, but only as regards disclaiming warranties: any other
+implication that these Warranty Disclaimers may have is void and has
+no effect on the meaning of this License.
+
+@item
+VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no other
+conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+@item
+COPYING IN QUANTITY
+
+If you publish printed copies (or copies in media that commonly have
+printed covers) of the Document, numbering more than 100, and the
+Document's license notice requires Cover Texts, you must enclose the
+copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a computer-network location from which the general network-using
+public has access to download using public-standard network protocols
+a complete Transparent copy of the Document, free of added material.
+If you use the latter option, you must take reasonably prudent steps,
+when you begin distribution of Opaque copies in quantity, to ensure
+that this Transparent copy will remain thus accessible at the stated
+location until at least one year after the last time you distribute an
+Opaque copy (directly or through your agents or retailers) of that
+edition to the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to give
+them a chance to provide you with an updated version of the Document.
+
+@item
+MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+@enumerate A
+@item
+Use in the Title Page (and on the covers, if any) a title distinct
+from that of the Document, and from those of previous versions
+(which should, if there were any, be listed in the History section
+of the Document). You may use the same title as a previous version
+if the original publisher of that version gives permission.
+
+@item
+List on the Title Page, as authors, one or more persons or entities
+responsible for authorship of the modifications in the Modified
+Version, together with at least five of the principal authors of the
+Document (all of its principal authors, if it has fewer than five),
+unless they release you from this requirement.
+
+@item
+State on the Title page the name of the publisher of the
+Modified Version, as the publisher.
+
+@item
+Preserve all the copyright notices of the Document.
+
+@item
+Add an appropriate copyright notice for your modifications
+adjacent to the other copyright notices.
+
+@item
+Include, immediately after the copyright notices, a license notice
+giving the public permission to use the Modified Version under the
+terms of this License, in the form shown in the Addendum below.
+
+@item
+Preserve in that license notice the full lists of Invariant Sections
+and required Cover Texts given in the Document's license notice.
+
+@item
+Include an unaltered copy of this License.
+
+@item
+Preserve the section Entitled ``History'', Preserve its Title, and add
+to it an item stating at least the title, year, new authors, and
+publisher of the Modified Version as given on the Title Page. If
+there is no section Entitled ``History'' in the Document, create one
+stating the title, year, authors, and publisher of the Document as
+given on its Title Page, then add an item describing the Modified
+Version as stated in the previous sentence.
+
+@item
+Preserve the network location, if any, given in the Document for
+public access to a Transparent copy of the Document, and likewise
+the network locations given in the Document for previous versions
+it was based on. These may be placed in the ``History'' section.
+You may omit a network location for a work that was published at
+least four years before the Document itself, or if the original
+publisher of the version it refers to gives permission.
+
+@item
+For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve
+the Title of the section, and preserve in the section all the
+substance and tone of each of the contributor acknowledgements and/or
+dedications given therein.
+
+@item
+Preserve all the Invariant Sections of the Document,
+unaltered in their text and in their titles. Section numbers
+or the equivalent are not considered part of the section titles.
+
+@item
+Delete any section Entitled ``Endorsements''. Such a section
+may not be included in the Modified Version.
+
+@item
+Do not retitle any existing section to be Entitled ``Endorsements'' or
+to conflict in title with any Invariant Section.
+
+@item
+Preserve any Warranty Disclaimers.
+@end enumerate
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section Entitled ``Endorsements'', provided it contains
+nothing but endorsements of your Modified Version by various
+parties---for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+@item
+COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice, and that you preserve all their Warranty Disclaimers.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections Entitled ``History''
+in the various original documents, forming one section Entitled
+``History''; likewise combine any sections Entitled ``Acknowledgements'',
+and any sections Entitled ``Dedications''. You must delete all
+sections Entitled ``Endorsements.''
+
+@item
+COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other documents
+released under this License, and replace the individual copies of this
+License in the various documents with a single copy that is included in
+the collection, provided that you follow the rules of this License for
+verbatim copying of each of the documents in all other respects.
+
+You may extract a single document from such a collection, and distribute
+it individually under this License, provided you insert a copy of this
+License into the extracted document, and follow this License in all
+other respects regarding verbatim copying of that document.
+
+@item
+AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, is called an ``aggregate'' if the copyright
+resulting from the compilation is not used to limit the legal rights
+of the compilation's users beyond what the individual works permit.
+When the Document is included in an aggregate, this License does not
+apply to the other works in the aggregate which are not themselves
+derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one half of
+the entire aggregate, the Document's Cover Texts may be placed on
+covers that bracket the Document within the aggregate, or the
+electronic equivalent of covers if the Document is in electronic form.
+Otherwise they must appear on printed covers that bracket the whole
+aggregate.
+
+@item
+TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License, and all the license notices in the
+Document, and any Warranty Disclaimers, provided that you also include
+the original English version of this License and the original versions
+of those notices and disclaimers. In case of a disagreement between
+the translation and the original version of this License or a notice
+or disclaimer, the original version will prevail.
+
+If a section in the Document is Entitled ``Acknowledgements'',
+``Dedications'', or ``History'', the requirement (section 4) to Preserve
+its Title (section 1) will typically require changing the actual
+title.
+
+@item
+TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document except
+as expressly provided for under this License. Any other attempt to
+copy, modify, sublicense or distribute the Document is void, and will
+automatically terminate your rights under this License. However,
+parties who have received copies, or rights, from you under this
+License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+@item
+FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions
+of the GNU Free Documentation License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns. See
+@uref{http://www.gnu.org/copyleft/}.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License ``or any later version'' applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation.
+@end enumerate
+
+@page
+@heading ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+@smallexample
+@group
+ Copyright (C) @var{year} @var{your name}.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.2
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
+ Texts. A copy of the license is included in the section entitled ``GNU
+ Free Documentation License''.
+@end group
+@end smallexample
+
+If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
+replace the ``with@dots{}Texts.'' line with this:
+
+@smallexample
+@group
+ with the Invariant Sections being @var{list their titles}, with
+ the Front-Cover Texts being @var{list}, and with the Back-Cover Texts
+ being @var{list}.
+@end group
+@end smallexample
+
+If you have Invariant Sections without Cover Texts, or some other
+combination of the three, merge those two alternatives to suit the
+situation.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
+
+@c Local Variables:
+@c ispell-local-pdict: "ispell-dict"
+@c End:
+
diff --git a/doc/glossary.texi b/doc/glossary.texi
new file mode 100644
index 00000000..c7d2c2f5
--- /dev/null
+++ b/doc/glossary.texi
@@ -0,0 +1,360 @@
+See also @uref{http://www.dvdrhelp.com/glossary}.
+
+@table @dfn
+
+@item ASPI
+@cindex ASPI
+See @acronym{Win32 ASPI}
+
+@item ATA
+
+Advanced Technology Attachment (ATA). The same things as IDE.
+
+@item ATAPI
+
+Advanced Technology Attachment (ATA) Packet Interface. The interface
+provides a mechanism for transferring and executing SCSI CDBs on IDE
+CD Drives and DVD Drives.
+
+IDE (also called ATA) was originally designed for hard drives only,
+but with help of ATAPI it is possible to connect other devices, in
+particular CD-ROMS to the IDE/EIDE connections.
+
+The ATAPI CD-ROM drives understand a subset of MMC commands. In
+particular multi-initiator commands are neither needed nor deviced for
+ATAPI devices.
+
+@item BIN/CUE
+
+A CD-image format developed by Jeff Arnold for CDRWIN software on
+Microsoft Windows. Many other programs subsequently support using this
+format. The @code{.CUE} file is a text file which contains CD format
+and track layout information, while the @code{.BIN} file holds the
+actual data of each track.
+
+@item CD
+Compact Disc
+
+@item CD-DA
+@cindex CD-DA
+Compact Disc Digital Audio, described in the ``Red Book'' or IEC 60908
+(formerly IEC 908). This commonly referred to as an audio @acronym{CD}
+and what most people think of when you play a @acronym{CD} as it was
+the first to use the @acronym{CD} medium.
+
+See @url{http://en.wikipedia.org/wiki/Red_Book_(audio_CD_standard)}
+
+@item CD+G
+@cindex CD+G
+
+Compact Disc + Graphics. An extension of the CD audio format contains
+a limited amount of graphics in subcode channels. This disc works in
+all audio players but the graphics portion is only available in a
+special CD+G or Karaoke player.
+
+@item CD-i
+@cindex CD-i
+
+Compact Disc Interactive. An extension of the CD format designed
+around a set-top computer that connects to a TV to provide interactive
+home entertainment, including digital audio and video, video games,
+and software applications. Defined by the ``Green Book'' standard.
+@uref{http://www.icdia.org/}. CD-i for video and video music has
+largely (if not totally) been superceded by VCDs.
+
+@item CD-i Bridge
+@cindex CD-i Bridge
+
+A standard allowing CD-ROM XA discs to play on CD-i. Kodak PhotoCDs
+are CD-XA Bridge discs.
+
+@item CD-ROM
+@cindex CD-ROM
+
+Compact Disc Read Only Memory or ``Yellow Book'' describe in Standards
+ISO/IEC 10149. The data stored on it can be either in the form of
+audio, computer or video files.
+
+@item CD-ROM Mode 1 and Mode2
+
+The Yellow Book specifies two types of tracks, Mode 1 and Mode 2. Mode
+1 is used for computer data and text and has an extra error correction
+layer. Mode 2 is for audio and video data and has no extra correction
+layer. CD-ROM/XA An expansion of the CD-ROM Mode 2 format that allows
+both computer and audio/video to be mixed in the same track.
+
+@item CD Text
+@cindex CD Text
+
+CD Text is a technology developed by Sony Corporation and Philips
+Electronics in 1996 that allows storing in an audio CD and its tracks
+information such as artist name, title, songwriter, composer, or
+arranger. Commercially available audio CDs sometimes contain CD Text
+information.
+
+@item CD XA
+@cindex CD XA
+
+CD-ROM EXtended Architecture. A modification to the CD-ROM
+specification that defines two new types of sectors. CD-ROM XA was
+developed jointly by Sony, Philips, and Microsoft, and announced in
+August 1988. Its specifications were published in an extension to the
+Yellow Book. CD-i, Photo CD, Video CD and CD-EXTRA have all
+subsequently been based on CD-ROM XA.
+
+CD-XA defines another way of formatting sectors on a CD-ROM, including
+headers in the sectors that describe the type (audio, video, data) and
+some additional info (markers, resolution in case of a video or audio
+sector, file numbers, etc).
+
+The data written on a CD-XA is consistent with and can be in ISO-9660
+file system format and therefore be readable by ISO-9660 file system
+translators. But also a CD-I player can also read CD-XA discs even if
+its own `Green Book' file system only resembles ISO 9660 and isn't
+fully compatible.
+
+@item Command Packet
+@cindex Command Packet
+
+The data structure that is used to issue an ATAPI command. The same
+thing as a SCSI Command Descriptor Block (CDB).
+
+@item FSF
+@cindex FSF
+
+Free Software Foundation, @uref{http://www.fsf.org/}
+
+@item GNU
+@cindex GNU
+
+@acronym{GNU} is not @acronym{UNIX}, @uref{http://www.gnu.org/}
+
+@item IDE
+
+Integrated Drive Electronics. This is a commonly used interface for
+hard disk drives and CD-ROM drives. It is less expensive than SCSI,
+but offers slightly less in terms of performance.
+
+@item ISO
+@cindex ISO
+
+International Standards Organization.
+
+@item ISO 9660
+@cindex ISO 9660
+
+The ISO 9660 is an operating-system independent filesystem format for
+CD-ROM media and DVD-ROMs. It was standardized in 1988 and replaced the
+High Sierra standard for the logical format on CD-ROM media (ISO 9660
+and High Sierra are identical in content, but the exact format is
+different).
+
+There are several specification levels. In Level 1, file names must be
+in the 8.3 format (no more than eight characters in the name, no more
+than three characters in the suffix) and in capital letters. Directory
+names can be no longer than eight characters. There can be no more
+than eight nested directory levels. Level 2 and 3 specifications allow
+file names up to 32 characters long.
+
+ECMA-119
+(@uref{http://www.ecma-international.org/publications/standards/Ecma-119.htm}
+is the European specification which is identical to ISO 9660.
+ISO 13490 is basically ISO 9660 with multisession support.
+
+@item Joliet extensions
+@cindex Joliet extensions
+
+This ISO-9660 upward-compatible standard was developed for Windows 95
+and Windows NT by Microsoft as an extension of ISO 9600 which allows
+the use of Unicode characters and supports file names up to 64
+characters.
+
+See @uref{http://bmrc.berkeley.edu/people/chaffee/jolspec.html} for
+the Joliet Specification.
+
+The name Joliet comes from the city in Illinois (U.S) that the
+standard was defined.
+
+@item LBA
+@cindex LBA
+
+Logical Block Addressing. Mapped integer numbers from CD Red Book
+Addressing MSF. The starting sector is -150 and ending sector is
+449849, which correlates directly to MSF: 00:00:00 to 99:59:74.
+Because an LBA is a single number it is often easier to work with in
+programming than an MSF.
+
+@item Lead in
+@cindex lead in
+
+The area of a CD where the Table Of Contents (TOC) and CD Text are
+stored. I think it is supposed to be around 4500 (1 min) or more
+sectors in length. On a CDR(W) the lead-in length is variable,
+because each manufacturer will have a different starting position
+indicated by the ATIP start of lead-in position that is recorded in
+the ATIP groove on the disk.
+
+@item LSN
+@cindex LSN
+
+Logical Sector Number. Mapped integer numbers from CD Red Book
+Addressing MSF. The starting sector is 0 and ending sector is 449699,
+which correlates to MSF: 00:00:00 to 99:59:74. Because an LSN is a
+single number it is often easier to work with in programming than an
+MSF. Because it starts at 0 rather than -150 as is the case of an LBA
+it can be represented as an unsigned value.
+
+@item MCN
+@cindex MCN
+
+Media Catalog Number. A identification number on an audio CD. Also
+called a UPC. Another identification number is ISRC.
+
+@item MMC
+@cindex MMC (Multimedia Commands)
+
+MMC (Multimedia Commands). A SCSI programming specification made by
+the SCSI committee T10 organization @url{http://www.t10.org/}. MMC
+are raw commands for communicating with CDROM drives, CD-Rewriters,
+DVD-Rewriters, etc.
+
+Many manufacturers have adopted this standard and it also applies to
+ATAPI versions of their drives.
+
+@item Mixed Mode CD
+@cindex Mixed Mode CD
+
+A Mixed Mode is a CD that contains tracks of differing CD-ROM Mode
+formats. In particular the first track may contain both computer data
+(Yellow Book) CD ROM data while the remaining tracks are audio or
+video data. Video CD's can be Mixed Mode CDs.
+
+@item Multisession
+@cindex Multisession
+
+A way of writing to a CD that allows more data to be
+added to readable discs at a later time.
+
+@item Nero NRG format file
+@cindex Nero NRG, CD-Image format
+
+A proprietary CD image file format use by a popular program for
+Microsoft Windows, Ahead Nero. The specification of this format is
+not to our knowlege published.
+
+@item Rock Ridge Extensions
+@cindex Rock Ridge extensions
+
+An extension to the ISO-9660 standard which adds POSIX information to files.
+
+@item SCSI
+@cindex SCSI
+
+Small Computer System Interface. A set of ANSI standard electronic
+interfaces (originally developed at Apple Computer) that allow
+personal computers to communicate with peripheral hardware such as
+CD-ROM drives, disk drives, printers, etc.
+
+@item SCSI CDB
+@cindex SCSI CDB
+
+SCSI Command Descriptor Block. The data structure that is used to
+issue a SCSI command.
+
+@item SCSI Pass Through Interface.
+@cindex SCSI Pass Through Interface.
+
+Yet another way of issuing MMC commands for accessing a CD-ROM. As
+with MMC or ASPI, the CD-ROM doesn't necessarily have to be a
+SCSI-attached drive. See also @acronym{MMC} and @acronym{ASPI}.
+
+@item Session
+
+A fully readable complete recording that contains one or more tracks
+of computer data or audio on a CD.
+
+@item SVCD
+@cindex Super VCD (SVCD)
+
+Super @acronym{VCD}
+
+An improvement of Video CD 2.0 specification which includes most
+notably a switch from @acronym{MPEG}-1 (constant bit rate encoding) to
+@acronym{MPEG}-2 (variable bit rate encoding) for the video stream.
+
+Also added was higher video-stream resolution, up to 4 overlay
+graphics and text (@dfn{OGT}) sub-channels for user switchable
+subtitle displaying, closed caption text, and command lists for
+controlling the @acronym{SVCD} virtual machine.
+
+See @uref{http://www.dvdrhelp.com/svcd}
+
+@item TOC
+@cindex TOC (CD Table of Contents)
+
+(Compact Disc) Table of Contents. The TOC contains the starting track
+number, last track number individual track starting time, and some
+track flags (copy protection, linear audio preemphasis, track format:
+CDDA or data). Every CD must have at least 1 TOC, the first TOC is
+always recorded at the start of the CD (lead-in area). A
+multi-session CD may have several TOCs.
+
+@item Track
+@cindex track
+
+A unit of data of a CD. The size of a track can vary; it can occupy
+the entire contents of the CD. Most CD standards however require that
+tracks have a 150 frame (or ``2 second'') lead-in gap.
+
+@item VCD
+@cindex Video CD (VCD)
+
+The Video Compact Disc (@dfn{Video CD} or @dfn{VCD}) is a standardized
+digital video storage format. It is based on the commonly available
+Compact Disc technology, which allows for low-cost video authoring.
+Video CD's can be played in most @acronym{DVD} standalone player,
+dedicated VCD players and finally, modern Personal Computers with
+multimedia support.
+
+A Video CD is made up of @acronym{CD-ROM XA} sectors,
+i.e. @acronym{CD-ROM} mode 2 form 1 & 2 sectors. Non-@acronym{MPEG} data
+is stored in mode 2 form 1 sectors with a user data area of 2048 byte,
+which have a similiar L2 error correction and detection
+(@acronym{ECC}/@acronym{EDC}) to @acronym{CD-ROM} mode 1 sectors. While
+realtime @acronym{MPEG} streams is stored in @acronym{CD-ROM} mode 2
+form 2 sectors, which by have no L2 @acronym{ECC}, yield a ~14% greater
+user data area consisting of 2324 bytes@footnote{actually raw mode 2
+sectors have a 2336 byte user data area, but parts of it are used for
+error codes and headers when using the mode 2 form 1 or form 2
+configurations.}
+
+@uref{http://www.dvdrhelp.com/vcd}
+
+@item Win32 ASPI
+@cindex ASPI
+
+The ASPI interface specification was developed by Adaptec for
+sending commands to a SCSI host adapter (such as those controlling CD
+and DVD drives) and used on Window 9x/NT and later. Emulation for
+ATAPI drives was added so that the same sets of commands worked those
+even though the drives might not be SCSI nor might there even be a
+SCSI controller attached.
+
+However in Windows NT/2K/XP, Microsoft provides their Win32 ioctl
+interface, and has take steps to make using ASPI more inaccessible
+(e.g. requiring adminstrative access to use ASPI).
+
+See also @acronym{MMC}
+
+@item Win32 ioctl driver
+
+Ioctl (Input Output ConTroLs). A Win32 function, implemented in all
+Microsoft Windows. It is used for sending commands to devices using
+defined codes and structures.
+
+@item XA
+@cindex XA
+
+See @acronym{CD-ROM XA}
+
+@end table
diff --git a/doc/libcdio.texi b/doc/libcdio.texi
new file mode 100644
index 00000000..8f83414f
--- /dev/null
+++ b/doc/libcdio.texi
@@ -0,0 +1,2421 @@
+\input texinfo @c -*-texinfo-*-
+@c %**start of header
+@setfilename libcdio.info
+@include version.texi
+@settitle GNU @code{libcdio}: Compact Disc Input and Control Library
+@c %**end of header
+
+@c Karl Berry informs me that this will add straight quotes in
+@c typewriter text.
+@c See the "Inserting Quote Characters" node in the Texinfo manual
+@set txicodequoteundirected
+@set txicodequotebacktick
+
+@copying
+This manual documents @code{libcdio}, the GNU CD Input and Control
+Library.
+
+Copyright @copyright{} 2003, 2004, 2005, 2006, 2007, 2008 Rocky
+Bernstein and Herbert Valerio Riedel.
+
+@quotation
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+Texts. A copy of the license is included in the section entitled
+``GNU Free Documentation License''.
+@end quotation
+@end copying
+
+@paragraphindent 0
+@exampleindent 0
+
+@set libcdio @code{libcdio}
+@set program @kbd{libcdio}
+
+@c A macro for defining terms variables.
+@macro term{varname}
+@c @cindex{\varname\}
+@emph{\varname\}
+@end macro
+
+@dircategory Software libraries
+@direntry
+* libcdio: (libcdio). GNU Compact Disc Input and Control Library.
+@end direntry
+
+@titlepage
+@title GNU @code{libcdio}
+@subtitle GNU Compact Disc Input and Control Library
+@subtitle for version @value{VERSION}, @value{UPDATED}
+@author Rocky Bernstein et al. (@email{bug-libcdio@@gnu.org})
+@page
+@vskip 0pt plus 1filll
+@insertcopying
+@end titlepage
+
+@contents
+
+@ifnottex
+@node Top
+@top GNU @value{libcdio}
+
+This manual documents @value{libcdio}, the GNU CD Input and Control
+Library.
+
+@menu
+* History:: How this came about
+* Previous Work:: The problem and previous work
+* Purpose:: What is in this package (and what's not)
+* CD Formats:: A tour through the CD-specification spectrum
+* CD Image Formats:: A tour through various CD-image formats
+* CD Units:: The units that make up a CD
+* How to use:: Okay enough babble, lemme at the library!
+* Utility Programs:: Diagnostic programs that come with this library
+* CD-ROM Access and Drivers:: CD-ROM access and drivers
+* Internal Program Organization:: Looking under the hood
+
+Appendices
+* ISO-9660 Character Sets::
+* Glossary::
+* GNU Free Documentation License::
+
+Indices
+* General Index:: Overall index
+@end menu
+@end ifnottex
+
+@node History
+@chapter History
+
+As a result of the repressive Digital Millennium Copyright Act (DMCA)
+I became aware of Video CD's (VCD's). Video CD's are not subject to
+the DMCA and therefore enjoy the protection afforded by copyright but
+no more. But in order for VCD's to be competitive with DVD's, good
+tools (including GPL tools) are needed for authoring and playing
+them. And so through VCD's I became aware of the excellent Video CD
+tools by Herbert Valerio Riedel which form the @kbd{vcdimager} package.
+
+Although vcdimager is great for authoring, examining and extracting
+parts of a Video CD, it is not a VCD player. And when I looked at the
+state of Video CD handling in existing VCD players: @code{xine},
+@code{MPlayer}, and @code{vlc}, I was a bit disappointed. None handled
+playback control, menu selections, or playing still frames and
+segments from track 1.
+
+Version 0.7.12 of vcdimager was very impressive, however it lacked
+exportable libraries that could be used in other projects. So with the
+blessing and encouragement of Herbert Valerio Riedel, I took to
+extract and create libraries from this code base. The result was two
+libraries: one to extract information from a VCD which I called
+libvcdinfo, and another to do the reading and control of a VCD. Well,
+actually, at this point I should say that a Video CD is really just
+Video put on a existing well-established Compact Disc or CD format. So
+the library for this is called @value{libcdio} rather than
+@kbd{libvcdio}.
+
+While on the topic of the name @value{libcdio}, I should also explain that
+the library really doesn't handle writing or output (the final "o" in
+the name). However it was felt that if I put @code{libcdi} that might be
+confused with a particular CD format called CD-I.
+
+Later on, the ISO-9660 filesystem handling component from
+@kbd{vcdimager} was extracted, expanded and made a separate
+library. Next the ability to add MMC commands was added, and then
+CD paranoia support. And from there, the rest is history.
+
+@node Previous Work
+@chapter The problem and previous work
+
+If around the year 2002 you were to look at the code for a number of
+free software CD or media players that work on several platforms such as
+vlc, MPlayer, xine, or xmms to name but a few, you'd find the code to
+read a CD sprinkled with conditional compilation for this or that
+platform. That is there was @emph{no} OS-independent programmer
+library for CD reading and control even though the technology was over
+10 years old; yet there are media players which strive for OS
+independence.
+
+One early CD player, @kbd{xmcd} by Ti Kan, was I think a bit better
+than most in that it tried to @emph{encapsulate} the kinds of CD
+control mechanisms (SCSI, Linux ioctl, Toshiba, etc.) in a "CD Audio
+Device Interface Library" called @code{libdi}. However this library is for
+Audio CD's only and I don't believe this library has been used outside
+of xmcd.
+
+Another project, Simple DirectMedia Layer also encapsulates CD
+reading.
+
+@quotation
+SDL is a library that allows you portable low-level access to a video
+framebuffer, audio output, mouse, and keyboard. With SDL, it is easy
+to write portable games which run on ...
+@end quotation
+
+Many of the media players mentioned above do in fact can make use of
+the SDL library but for @emph{video} output only. Because the encapsulation
+is over @emph{many} kinds of I/O (video, joysticks, mice, as well as CD's),
+I believe that the level of control provided for CD a little bit
+limited. (However to be fair, it may have only been intended for games
+and may be suitable for that). Applications that just want the CD
+reading and control portion I think will find quite a bit overhead.
+
+Another related project is J@"org Schilling's SCSI library. You can
+use that to make a non-SCSI CD-ROM act like one that understands SCSI
+MMC commands which is a neat thing to do. However it is a little weird
+to have to install drivers just so you can run a particular user-level
+program. Installing drivers often requires special privileges and
+permissions and it is pervasive on a system. It is a little sad that
+along the way to creating such a SCSI library a library similar to
+@value{libcdio} wasn't created which could be used. Were that the
+case, this library certainly never would have been written.
+
+At the OS level there is the ``A Linux CD-ROM Standard'' by David van
+Leeuwen from around 1999. This defines a set of definitions and
+ioctl's that mask hardware differences of various Compact Disc
+hardware. It is a great idea, however this ``standard'' lacked
+adoption on OS's other than GNU/Linux. Or maybe it's the case that the
+standard on other OS's lacked adoption on GNU/Linux. For example on
+FreeBSD there is a ``Common Access Method'' (CAM) used for all SCSI
+access which seems not to be adopted in GNU/Linux.@footnote{And I'm
+thankful for that since, at least for MMC commands, it is
+inordinately complicated and in some places arcane.}
+
+Finally at the hardware level where a similar chaos exists, there has
+been an attempt to do something similar with the MMC (multimedia
+commands). This attempts to provide a uniform command set for CD
+devices like PostScript does for printer commands.@footnote{I wrote
+``attempts'' because over time the command set has changed and now
+there are several different commands to do a particular function like
+read a CD table of contents and some hardware understands some of the
+version of the commands set but might not others} In contrast to
+PostScript where there one in theory can write a PostScript program in
+a uniform ASCII representation and send that to a printer, for MMC
+although there are common internal structures defined, there is no
+common syntax for representing the structures or an OS-independent
+library or API for issuing MMC-commands which a programmer would need
+to use. Instead each Operating System has its own interface. For
+example Adaptec's ASPI or Microsoft's DeviceIoControl on Microsoft
+Windows, or IOKit for Apple's OS/X, or FreeBSD's CAM. I've been
+positively awed at how many different variations and differing levels
+of complexity there are for doing basically the same thing. How easy
+it is to issue an MMC command from a program varies from easy to very
+difficult. And mastering the boilerplate code to issue an MMC command
+on one OS really doesn't help much in figuring out how to do it on
+another OS. So in @value{libcdio} we provide a common (and hopefully
+simple) API to issue MMC commands.
+
+@node Purpose
+@chapter What is in this package (and what's not)
+
+The library, @command{libcdio}, encapsulates CD-ROM reading and
+control. Applications wishing to be oblivious of the OS- and
+device-dependent properties of a CD-ROM can use this library.
+
+Also included is a library, @command{libiso9660}, for working with
+ISO-9660 filesystems, @command{libcdio_paranoia}, and
+@command{libcdio_cdda} libraries for applications which want to use
+cdparanoia's error-correction and jitter detection.
+
+Some support for disk-image types like cdrdao's TOC, CDRWIN's BIN/CUE
+and Ahead Nero's NRG format is available, so applications that use this
+library also have the ability to read disc images as though they were
+CDs.
+
+@command{libcdio} also provides a way to issue SCSI ``MultiMedia
+Commands'' (MMC). MMC is supported by many hardware CD-ROM
+manufacturers; and in some cases where a CD-ROM doesn't understand MMC
+directly, some Operating Systems (such as GNU/Linux, Solaris, or
+FreeBSD or Microsoft Windows ASPI to name a few) provide the MMC
+emulation.@footnote{This concept of software emulation of a common
+hardware command language is common for printers such as using
+ghostscript to private postscript emulation for a non-postscript
+printer.}
+
+The first use of the library in this package are the Video CD
+authoring and ripping tools, VCDImager
+(@url{http://vcdimager.org}). See
+@url{http://www.gnu.org/software/libcdio/projects.html} for a list of
+projects using @command{libcdio}.
+
+A version of the CD-DA extraction tool cdparanoia
+(@url{http://www.xiph.org/paranoia} and its library which corrects
+for CD-ROM jitter are part of the distribution.
+
+Also included in the libcdio package is a utility program
+@command{cd-info} which displays CD information: number of tracks,
+CD-format and if possible basic information about the format. If
+libcddb (@url{http://libcddb.sourceforge.net}) is available, the
+@command{cd-info} program will display CDDB matches on CD-DA
+discs. And if a new enough version of libvcdinfo is available (from
+the vcdimager project), then @command{cd-info} shows basic VCD
+information.
+
+Other utility programs in the libcdio package are:
+
+@table @code
+
+@item @code{cdda-player}
+
+shows off @value{libcdio} audio and CD-ROM control commands. It can
+play a track, eject or load media and show the the status of a CD-DA
+that is might be currently played via the audio control commands. It
+can be run in batch mode or has a simple curses-based interface.
+
+If libcddb is available or a CD has CD-Text and your CD-ROM drive
+supports CD-Text, track/album information about the CD can be shown.
+
+@item @code{cd-drive}
+
+shows what drivers are available and some basic properties of
+cd-drives attached to the system. (But media may have to be inserted
+in order to get this info.) lists out drive capabilities
+
+@item cd-read
+performs low-level block reading of a CD or CD image,
+
+@item @code{iso-info}
+
+displays ISO-9660 information from an ISO-9660 image. Below is some
+sample output
+
+@smallexample
+iso-info version 0.72
+Copyright (c) 2003, 2004, 2005 R. Bernstein
+This is free software; see the source for copying conditions.
+There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE.
+__________________________________
+ISO 9660 image: ../test/joliet.iso
+Application: K3B THE CD KREATOR VERSION 0.11.12 (C) 2003 SEBASTIAN TRUEG AND THE K3B TEAM
+Preparer : K3b - Version 0.11.12
+Publisher : Rocky Bernstein
+System : LINUX
+Volume : K3b data project
+Volume Set : K3b data project
+__________________________________
+ISO-9660 Information
+/:
+ Oct 22 2004 19:44 .
+ Oct 22 2004 19:44 ..
+ Oct 22 2004 19:44 libcdio
+
+/libcdio/:
+ Oct 22 2004 19:44 .
+ Oct 22 2004 19:44 ..
+ Mar 12 2004 02:18 COPYING
+ Jun 26 2004 07:01 README
+ Aug 12 2004 06:22 README.libcdio
+ Oct 22 2004 19:44 test
+
+/libcdio/test/:
+ Oct 22 2004 19:44 .
+ Oct 22 2004 19:44 ..
+ Jul 25 2004 06:52 isofs-m1.cue
+@end smallexample
+
+@item @code{iso-read}
+
+extracts files from an ISO-9660 image.
+
+@end table
+
+At present, there is no support for writing CD's. Nor is there any
+support for reading or writing DVDs. For some of these, there are
+other libraries (e.g. @code{libdi}, @code{libscg}, or @code{libdvdread}) may be helpful.
+
+I'm not theoretically opposed to putting support like this into
+libcdio. However at present there are already many gaps in this
+package, so narrowing its scope in order to focus on these things I
+think is a good idea.
+
+@node CD Formats
+@chapter CD Formats
+
+Much of what I write in this section can be found elsewhere. See for
+example @url{http://www.pctechguide.com/08cd-rom.htm} or
+@url{http://www.pcguide.com/ref/cd/format.htm}
+
+We give just enough background here to cover Compact Discs and Compact
+Disc formats that are handled by this library.
+
+The Sony and Philips Corporations invented and Compact Disc (CD) in
+the early 1980s. The specifications for the layout is often referred
+to by the color of the cover on the specification.
+
+@menu
+* Red Book:: Red Book (CD-DA) CD Text, CDDB
+* Yellow Book:: Yellow Book (CD-ROM Digital Data)
+* Green Book:: Green Book (CD-i)
+* White Book:: White Book (DV, Video CD)
+@end menu
+
+@node Red Book
+@section Red Book (CD-DA)
+@cindex Red Book
+
+@menu
+* CD Text:: CD Text and CD+G
+* CDDB:: Internet CD Database (CDDB)
+@end menu
+
+The first type of CD that was produced was the Compact Disc Digital
+Audio (CD-DA) or just plain ``audio CD''. The specification, ICE 60908
+(formerly IEC 908) is commonly called the ``Red Book'',
+@cite{@url{http://en.wikipedia.org/wiki/Red_Book_(audio_CD_standard)}}. Music
+CD's are recorded in this format which basically allows for around 74
+minutes of audio per disc and for that information to be split up into
+tracks. Tracks are broken up into "sectors" and each sector contains
+up to 2,352 bytes. To play one 44.1 kHz CD-DA sampled audio second, 75
+sectors are used.
+
+The minute/second/frame numbering of sectors or MSF format is based on
+the fact that 75 sectors are used in a second of playing of
+sound. (And for almost every other CD format and application the MSF
+format doesn't make that much sense).
+
+In @value{libcdio} when you you want to read an audio sector, you call
+@code{cdio_read_audio_sector()} or @code{cdio_read_audio_sectors()}.
+
+@cindex subchannel
+In addition the the audio data ``channel'' a provision for other
+information or @term{subchannel} information) can be stored in a
+sector. Other subchannels include a Media Catalog Number (also
+abbreviated as MCN and sometimes a UPC), or album meta data (also
+called CD-Text). Karioke graphics can also be stored in a format
+called @term{CD+G}.
+
+@node CD Text
+@subsection CD Text, CD+G
+@cindex CD Text
+@cindex CD+G
+
+CD Text is an extension to the CD-DA standard that adds the ability to
+album and track meta data (titles, artist/performer names, song
+titles) and and graphical (e.g. Karaoke) information. For an
+alternative way to get album and track meta-data see @xref{CDDB}.
+
+Information is stored in such a way that it doesn't interfere with the
+normal operation of any CD players or CDROM drives. There are two
+different parts of the CD where the data can be stored.
+
+The first place the information can be recorded is in the R-W sub
+codes in the lead in area of the CD giving a data capacity of about
+5,000 ASCII characters (or 2,500 Kanji or Unicode characters). This
+information is stored as a single block of data and is the format used
+in virtually all of the CD Text CDs shipping today. The method for
+reading this data from a CDROM drive is covered under the Sony
+proposal to the MMC specification. The format of the data is partially
+covered in the MMC specification.
+
+The second place the information can be recorded is in the R-W sub
+codes in the program area of the CD giving a data capacity of roughly
+31MB. This information is stored in a format that follows the
+Interactive Text Transmission System (ITTS) which is the same data
+transmission standard used by such things as Digital Audio
+Broadcasting (DAB), and virtually the same as the data standard for
+the MiniDisc. Traditionally the R-W sub codes have been used for text
+and graphics in applications such as CD+G (CD w/graphics) or in the
+case of most audio CDs, not at all. The methods for reading this data
+from a CD-ROM drive is covered by the programming specs from the
+individual drive manufacturers. In the case of ATAPI drives, the
+SFF8020 spec covers the reading of the RW subcodes.
+
+Not all drives support reading the RW subcodes from the program
+area. However for those that do, @value{libcdio} provides a way to get
+at this information via @code{cdtext_get()} and its friends.
+
+@node CDDB
+@subsection Internet CD Database (CDDB)
+@cindex CDDB
+
+CDDB is an database on the Internet of of CD album/track, artist, and
+genre information similar to CD Text information. Using track
+information (number of tracks and length of the tracks), devices that
+have access to the Internet can query for meta information and
+contribute information for CD's where there is no existing
+information. When storage is available (such as you'd expect for any
+program using @value{libcdio}, the information is often saved for
+later use when the Internet is not available; people tend request the
+same information since they via programs play the same music.
+
+Obtaining CD meta information when none is encoded in an audio CD is
+useful in media players or making ones own compilations from audio
+CDs.
+
+There are currently two popular CDDB services on the Internet. The
+original database has been renamed Gracenote and is a profit making
+entity. FreeDB (@url{http://freedb.org} is an open source CD
+information resource that is free for developers and the public to
+use.
+
+As there already is an excellent library for handling CDDB libcddb
+(@url{http://libcddb.sourceforge.net} we suggest using that. Our
+utility program @command{cd-info} will make use it if it is available
+and it's what we use in our applications that need it.
+
+@node Yellow Book
+@section Yellow Book (CD-ROM Digital Data)
+The CD-ROM specification or the ``Yellow Book'' followed a few years
+later (Standards ISO/IEC 10149), and describes the extension of CD's
+to store computer data, i.e. CD-ROM (Compact Disk Read Only Memory).
+
+The specification in the Yellow Book defines two modes: Mode 1 and
+Mode 2.
+
+@menu
+* ISO 9660::
+* Mode 1:: Mode 1 Format
+* Mode 2:: Mode 2 Format
+@end menu
+
+@node ISO 9660
+@subsection ISO 9660
+@cindex ISO 9660
+
+@menu
+* ISO 9660 Level 1::
+* ISO 9660 Level 2::
+* ISO 9660 Level 3::
+* Joliet Extensions::
+* Rock Ridge Extensions::
+@end menu
+
+The Yellow Book doesn't specify how data is to be stored on a CD-ROM.
+It was feared that different companies would implement proprietary
+data storage formats using this specification, resulting in
+incompatible data CDs. To prevent this, representatives of major
+manufacturers met at the High Sierra Hotel and Casino in Lake Tahoe,
+NV, in 1985, to define a standard for storing data on CDs. This format
+was nicknamed High Sierra Format. In a slightly modified form it was
+later adopted as ISO the ISO 9660 standard. This standard is further
+broken down into 3 "levels", the higher the level, the more
+permissive.
+
+@node ISO 9660 Level 1
+@subsubsection ISO 9660 Level 1
+Level 1 ISO 9660 defines names in the 8+3 convention so familiar to
+MS-DOS: eight characters for the filename, a period, and then three
+characters for the file type, all in upper case. The allowed
+characters are A-Z, 0-9, ".", and "_".Level 1 ISO 9660 requires that
+files occupy a contiguous range of sectors. This allows a file to be
+specified with a start block and a count. The maximum directory depth
+is 8. For a table of the characters, see @xref{ISO-9660 Character
+Sets}.
+
+@node ISO 9660 Level 2
+@subsubsection ISO 9660 Level 2
+Level 2 ISO 9660 allows far more flexibility in filenames, but isn't
+usable on some systems, notably MS-DOS.
+
+@node ISO 9660 Level 3
+@subsubsection ISO 9660 Level 3
+Level 3 ISO-9660 allows non-contiguous files, useful if the file was
+written in multiple packets with packet-writing software.
+
+There have been a number of extensions to the ISO 9660 CD-ROM file
+format. One extension is Microsoft's Joliet specification, designed to
+resolve a number of deficiencies in the original ISO 9660 Level 1 file
+system, and in particular to support the long file names used in
+Windows 95 and subsequent versions of Windows.
+
+Another extension is the Rock Ridge Interchange Protocol (RRIP), which
+enables the recording of sufficient information to support POSIX File
+System semantics.
+
+@node Joliet Extensions
+@subsubsection Joliet Extensions
+@cindex Joliet extensions
+
+Joliet extensions were an upward-compatible extension to the ISO 9660
+specification that removes the limitation initially put in to deal
+with the limited filename conventions found in Microsoft DOS OS. In
+particular, the Joliet specification allows for long filenames and
+allows for UCS-BE (BigEndian Unicode) encoding of filenames which
+include mixed case letter, accented characters spaces and various
+symbols.
+
+The way all of this is encoded is by adding a second directory and
+filesystem structure in addition to or in parallels to original ISO
+9600 filesystem. The root node of the ISO 9660 filesystem is found via
+the @term{Primary Volume Descriptor} or @term{PVD}. The root of the
+Joliet-encode filesystem is found in a Supplementary Volume
+Descriptor or @term{SVD} defined in the ISO 9660 specification. The
+SVD structure is almost identical to a PVD with a couple of unused
+fields getting used and with the filename encoding changed to UCS-BE.
+
+@node Rock Ridge Extensions
+@subsubsection Rock Ridge Extensions
+@cindex Rock Ridge extensions
+
+Using the Joliet Extension one overcome the limitedness of the
+original ISO-9660 naming scheme. But another and probably better
+method is to use the Rock Ridge Extension. Not only can one store a
+filename as one does in a POSIX OS, but the other file attributes,
+such as the various timestamps (creation, modification, access), file
+attributes (user, group, file mode permissions, device type, symbolic
+links) can be stored. This is much as one would do in XA attributes;
+however the two are not completely interchangeable in the information
+they store: XA does @emph{not} address filename limitations, and the
+Rock Ridge extensions don't indicate if a sector is in Mode 1 or Mode
+2 format.
+
+The Rock Ridge extension makes use of a hook that was defined as part
+of the ISO 9660 standard.
+
+@node Mode 1
+@subsection Mode 1 (2048 data bytes per sector)
+@cindex Mode 1
+Mode 1 is the data storage mode used by to store computer data. There
+are 3 layers of error correction. A Compact Disc using only this format can
+hold at most 650 MB. The data is laid out in basically the same way as
+in and audio CD format, except that the 2,352 bytes of data in each
+block are broken down further. 2,048 of these bytes are for ``real''
+data. The other 304 bytes are used for an additional level of error
+detecting and correcting code. This is necessary because data CDs
+cannot tolerate the loss of a handful of bits now and then, the way
+audio CDs can.
+
+In @value{libcdio} when you you want to read a mode1
+sector you call the @code{cdio_read_mode1_sector()} or
+@code{cdio_read_mode1_sectors()}.
+
+@node Mode 2
+@subsection Mode 2 (2336 data bytes per sector)
+@cindex Mode 2
+Mode 2 data CDs are the same as mode 1 CDs except that the error
+detecting and correcting codes are omitted. So still there are 2
+layers of error correction. A Compact Disc using only this mode can
+thus hold at most 742 MB. Similar to audio CDs, the mode 2 format
+provides a more flexible vehicle for storing types of data that do not
+require high data integrity: for example, graphics and video can use
+this format. But in contrast to the Red Book standard, different modes
+can be mixed together; this is the basis for the extensions to the
+original data CD standards known as CD-ROM Extended Architecture, or
+CD-ROM XA. CD-ROM XA formats currently in use are CD-I Bridge
+formats, Photo CD and Video CD plus Sony's Playstation.
+
+In @value{libcdio} when you you want to read a mode1
+sector you call the @code{cdio_read_mode2_sector()} or
+@code{cdio_read_mode2_sectors()}.
+
+@node Green Book
+@section Green Book (CD-i)
+@cindex Green Book
+
+This was a CD-ROM format developed by Philips for CD-i (an obsolete
+embedded CD-ROM application allowing limited user user interaction
+with films, games and educational applications). The format is ISO
+9660 compliant and introduced mode 2 form 2 addressing. It also
+contains XA (Extended Architecture) attributes.
+
+Although some Green Book discs contain CD-i applications which can
+only be played on a CD-i player, others have films or music
+videos. Video CDs in Green-Book format are labeled "Digital Video on
+CD." The Green Book for video is largely superseded by White book
+CD-ROM which draws on this specification.
+
+
+@node White Book
+@section White Book (DV, Video CD)
+@cindex Green Book
+
+The White Book was released by Sony, Philips, Matsushita, and JVC in
+1993, defines the Video CD specification. The White Book is also known
+as Digital Video (DV).
+
+A Video CD contains one data track recorded in CD-ROM XA Mode 2 Form
+2. It is always the first track on the disc (Track 1). The ISO-9660
+file structure and a CD-i application program are recorded in this
+track, as well as the Video CD Information Area which gives general
+information about the Video Compact Disc. After the data track, video
+is written in one or more subsequent tracks within the same
+session. These tracks are also recorded in Mode 2 Form 2.
+
+In @value{libcdio} when you you want to read a mode2 format 2 audio
+sector you call the @code{cdio_read_mode2_sector()} or
+@code{cdio_read_mode2_sectors()} setting @code{b_form2} to @code{true}.
+
+@node CD Image Formats
+@chapter CD Image Formats
+
+@menu
+* CDRDAO TOC Format::
+* CDRWIN BIN/CUE Format::
+* NRG Format::
+@end menu
+
+In both the @command{cdrdao} and bin/cue formats there is one meta-file with
+extensions @code{.toc} or @code{.cue} respectively and one or more
+files (often with the extension @code{.bin}) which contains the
+content of tracks. The format of the track data is often
+interchangeable between the two formats. For example, in
+@value{libcdio}'s regression tests we make use of this to reduce the
+size of the test data and just provide alternate meta-data files
+(@code{.toc} or @code{.cue}).
+
+In contrast to the first two formats, the NRG format consists of a
+single file. This has the advantage of being a self-contained
+unit: in the other two formats it is possible for the meta file to
+refer to a file that can't be found. A disadvantage of the NRG format
+is that the meta data can't be easily viewed or modified say in a text
+file as it can be with the first two formats. In conjunction with this
+disadvantage is another disadvantage that the format is not
+documented, so how @value{libcdio} interprets an NRG image is based on
+inference. It is recommended that one of the other forms be used
+instead of NRG where possible.
+
+@node CDRDAO TOC Format
+@section CDRDAO TOC Format
+
+This is @command{cdrdao}'s CD-image description format. Since this
+program is GPL and everything about it is in the open, it is the
+preferred format to use. (Alas, at present it isn't as well supported
+in @value{libcdio} as the BIN/CUE format.)
+
+The @emph{toc}-file describes what data is written to the media in the
+@acronym{CD-ROM}; it allows control over track/index positions,
+pre-gaps and sub-channel information. It is a text file, so a text
+editor can be used to create, view or modify it.
+
+The @cite{cdrdao(1) manual page}, contains more information about this
+format.
+
+@subsection CDRDAO Grammar
+
+Below are the lexical tokens and grammar for a cdrdao TOC. It was
+taken from the cdrdao's pacct grammar; the token and nonterminal names
+are the same.
+
+@example
+#lexclass START
+#token Eof "@@"
+#token "[\t\r\ ]+"
+#token Comment "//~[\n@@]*"
+#token "\n"
+#token BeginString "\""
+#token Integer "[0-9]+"
+#tokclass AudioFile @{ "AUDIOFILE" "FILE" @}
+
+#lexclass STRING
+#token EndString "\""
+#token StringQuote "\\\""
+#token StringOctal "\\[0-9][0-9][0-9]"
+#token String "\\"
+#token String "[ ]+"
+#token String "~[\\\n\"\t ]*"
+@end example
+
+@example
+
+ ::= ( "CATALOG" | )* @{ @}
+ (