|
From: Carlo W. <li...@us...> - 2001-11-14 03:01:19
|
CVSROOT : /cvsroot/libcw
Module : src
Branch tags: branch-threading
Commit time: 2001-10-14 03:01:18 UTC
Modified files:
Tag: branch-threading
libcwd/INSTALL libcwd/Makefile.am libcwd/acinclude.m4
libcwd/bfd.cc libcwd/configure.in libcwd/debug.cc
libcwd/debugmalloc.cc libcwd/maintMakefile.in
libcwd/documentation/doxygen.config
libcwd/documentation/html.footer
libcwd/documentation/scripts/load_style_sheets.js
libcwd/documentation/styles/main.css
libcwd/example-project/.cvsignore libcwd/example-project/debug.cc
libcwd/example-project/sys.h libcwd/include/libcw/class_channel.h
libcwd/include/libcw/class_debug.h
libcwd/include/libcw/control_flag.h
libcwd/include/libcw/cwprint.h libcwd/include/libcw/debug.h
libcwd/include/libcw/debug_config.ho.in
libcwd/include/libcw/debugmalloc.h
libcwd/include/libcw/macro_ForAllDebugChannels.h
libcwd/include/libcw/macro_ForAllDebugObjects.h
Added files:
Tag: branch-threading
libcwd/nodebug.h libcwd/documentation/Makefile
libcwd/documentation/custom-debug.h.dox
libcwd/documentation/custom_do.dox
libcwd/documentation/downloading.dox
libcwd/documentation/mainpage.dox
libcwd/documentation/namespaces.dox
libcwd/documentation/nested.dox
libcwd/documentation/preparation.dox
libcwd/documentation/reference.dox
libcwd/documentation/external/.cvsignore
libcwd/documentation/styles/ns4/main.css
libcwd/documentation/styles/ns4/linux/main.css
libcwd/documentation/styles/ns5/main.css
Removed files:
Tag: branch-threading
libcwd/README.nodebug.h libcwd/documentation/custom-debug.h.doc
libcwd/documentation/mainpage.doc
libcwd/documentation/namespaces.doc
Log message:
Work in progress. Moving documentation into the source tree and
using doxygen. Synchronizing source tree with Eric.
---------------------- diff included ----------------------
Index: src/libcwd/INSTALL
diff -u src/libcwd/INSTALL:1.20.2.1 src/libcwd/INSTALL:1.20.2.2
--- src/libcwd/INSTALL:1.20.2.1 Sun Sep 23 10:07:45 2001
+++ src/libcwd/INSTALL Tue Nov 13 19:01:06 2001
@@ -26,7 +26,7 @@
i) The GNU compiler, version 2.95.1 or higher.
Location: gnu/gcc/
- Current version: 3.0
+ Current version: 3.0.2
Alternatively you can install only
ia) gnu/gcc/gcc-core-<version>.tar.gz and
@@ -54,8 +54,8 @@
Don't delete those libraries if you have them though
since existing binaries might need to link with them.
- libcwd-0.99.15 was tested with gcc-2.95.x, gcc-2.96-97 (RedHat),
- gcc-3.0 and gcc-3.0.1.
+ libcwd-0.99.16 was tested with gcc-2.95.x, gcc-2.96-97 (RedHat)
+ and gcc-3.0.x.
Packages needed to run the testsuite
------------------------------------
@@ -91,6 +91,13 @@
Each of those can be downloaded from your local GNU site.
+ Moreover, in order to generate the documentation, you need to
+ have the following installed:
+
+ ix) GNU grep version 2.4.2 is known to work.
+ x) doxygen http://www.doxygen.org/
+ xi) graphviz http://www.research.att.com/sw/tools/graphviz/
+
Hackers info
============
@@ -102,13 +109,13 @@
There is no reason to use libcwd's feature options (--disable-libcwd-alloc,
--disable-libcwd-magic, --disable-libcwd-marker and --disable-libcwd-location).
-Actually, I forgot why they are there :). You can read more about what
-they do in Chapter 4 "Debugging compile options" here:
-http://libcw.sourceforge.net/templates/index.html?debugging
+Actually, I forgot why they are there :). You can read more about the
+configuration options and what they do in include/libcw/debug_config.h.
+
If you want to change Makefile.am files and the-like then you'll need to
use --enable-maintainer-mode. If you enable maintainer-mode then you
-will need GNU make, other make won't work (you also need a lot of other
-extra tools installed on your system).
+will need GNU make, other make won't work (you also need a LOT of other
+extra tools installed on your system, only for the brave thus).
-=ii=-
@@ -124,7 +131,7 @@
-=iii=-
If you don't have an ELF32 system and therefore need to link with libbfd, then you
-can configure using --enable-libcwd-bfd. If libiberty.a or libbfd.so are in an
+can configure using --enable-libcwd-libbfd. If libiberty.a or libbfd.so are in an
unusual directory, then you will have to set LDFLAGS prior to running ./configure:
LDFLAGS="-L/usr/gnu/lib" CPPFLAGS="-I/usr/gnu/include" ./configure
@@ -150,22 +157,29 @@
make clean
make distclean
-If you feel brave you might even want to try
+If you configured with --enable-maintainer-mode then the following
+targets exist as well:
-make dist
-make maintainer-clean
+make dist // Create tar ball
+make maintainer-clean // Erase everything that was generated somehow
+make check // Run test suite
+make tar // Create tar ball
+make rpm // Create rpms
+make ChangeLog // Generate ChangeLog from cvs database
+make CC="gcc-3.0.2" CXX="g++-3.0.2" reconfig // Switch compilers keeping the same configuration
+make full-check // Iterate over all configurations and all compiler versions
-well, ... heh. Look in the Makefile for more targets ;)
+It is not garanteed that these work on another machine then mine however.
-=v=-
Finally, you can also build libcwd in a different directory than the source
tree is in:
-tar xzf libcwd-0.99.15.tar.gz
+tar xzf libcwd-0.99.16.tar.gz
mkdir libcwd-objdir
cd libcwd-objdir
-../libcwd-0.99.15/configure --prefix=/usr
+../libcwd-0.99.16/configure --prefix=/usr
make
su
make install
Index: src/libcwd/Makefile.am
diff -u src/libcwd/Makefile.am:1.30.2.11 src/libcwd/Makefile.am:1.30.2.12
--- src/libcwd/Makefile.am:1.30.2.11 Tue Oct 23 07:17:08 2001
+++ src/libcwd/Makefile.am Tue Nov 13 19:01:06 2001
@@ -4,8 +4,8 @@
SUBDIRS = include utils . tests testsuite
-BUILT_SOURCES =@MAINTAINER_MODE_TRUE@ libcwd.lsm libcwd.spec nodebug.h
-EXTRA_DIST = LICENSE.QPL README.FreeBSD README.openbsd README.nodebug.h $(BUILT_SOURCES)
+BUILT_SOURCES =@MAINTAINER_MODE_TRUE@ libcwd.lsm libcwd.spec
+EXTRA_DIST = LICENSE.QPL README.FreeBSD README.openbsd nodebug.h $(BUILT_SOURCES)
DISTCLEANFILES = libcwd-@VERSION@.tar.gz
VERSIONINFO=@VERSIONINFO@
@@ -39,6 +39,8 @@
for i in `grep '^/' $(srcdir)/example-project/CVS/Entries | cut -d/ -f2`; do \
cp -p $(srcdir)/example-project/$$i $(distdir)/example-project; \
done
+ rm $(distdir)/example-project/debug.h.maintainer
+ cp -p $(srcdir)/example-project/debug.h $(distdir)/example-project
chmod +x $(distdir)/install-sh
mkdir $(distdir)/debian
for i in `grep '^/' $(srcdir)/debian/CVS/Entries | cut -d/ -f2`; do \
Index: src/libcwd/README.nodebug.h
diff -u src/libcwd/README.nodebug.h:1.1 src/libcwd/README.nodebug.h:removed
--- src/libcwd/README.nodebug.h:1.1 Wed Jul 25 19:10:39 2001
+++ src/libcwd/README.nodebug.h Tue Nov 13 19:01:18 2001
@@ -1,7 +0,0 @@
-In order to make it possible that others compile your application without
-having libcwd installed, the file nodebug.h must be part of the distribution
-of your application and should be included instead of <libcw/debug.h>
-when CWDEBUG is not defined.
-
-For an example of how to do this, see the example-project directory.
-
Index: src/libcwd/acinclude.m4
diff -u src/libcwd/acinclude.m4:1.41.2.7 src/libcwd/acinclude.m4:1.41.2.8
--- src/libcwd/acinclude.m4:1.41.2.7 Sat Oct 27 16:21:05 2001
+++ src/libcwd/acinclude.m4 Tue Nov 13 19:01:06 2001
@@ -161,12 +161,11 @@
dnl CW_DEFINE_TYPE(NEWTYPE, OLDTYPE)
dnl
-dnl Add `typedef OLDTYPE NEWTYPE' to the output variable CW_TYPEDEFS
+dnl Add `typedef OLDTYPE NEWTYPE;' to the output variable CW_TYPEDEFS
dnl
AC_DEFUN(CW_DEFINE_TYPE,
[AC_REQUIRE([CW_DEFINE_TYPE_INITIALIZATION])
-CW_TYPEDEFS="$CW_TYPEDEFS\\
-typedef $2 $1;"
+CW_TYPEDEFS="typedef $2 $1; $CW_TYPEDEFS"
])
dnl CW_TYPE_EXTRACT_FROM(FUNCTION, INIT, ARGUMENTS, ARGUMENT)
Index: src/libcwd/bfd.cc
diff -u src/libcwd/bfd.cc:1.85.2.27 src/libcwd/bfd.cc:1.85.2.28
--- src/libcwd/bfd.cc:1.85.2.27 Sun Oct 21 09:02:48 2001
+++ src/libcwd/bfd.cc Tue Nov 13 19:01:06 2001
@@ -1,4 +1,4 @@
-// $Header: /cvsroot/l/li/libcw/src/libcwd/bfd.cc,v 1.85.2.27 2001/10/21 16:02:48 libcw Exp $
+// $Header: /cvsroot/l/li/libcw/src/libcwd/bfd.cc,v 1.85.2.28 2001/11/14 03:01:06 libcw Exp $
//
// Copyright (C) 2000 - 2001, by
//
@@ -96,7 +96,13 @@
// New debug channel
namespace channels {
namespace dc {
+ /** /addtogroup default_dc */
+ /* \{ */
+
+ /** The BFD channel. */
channel_ct bfd("BFD");
+
+ /** \} */
}
}
Index: src/libcwd/configure.in
diff -u src/libcwd/configure.in:1.81.2.11 src/libcwd/configure.in:1.81.2.12
--- src/libcwd/configure.in:1.81.2.11 Sun Oct 21 16:29:28 2001
+++ src/libcwd/configure.in Tue Nov 13 19:01:06 2001
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
-AC_REVISION($Revision: 1.81.2.11 $)dnl
+AC_REVISION($Revision: 1.81.2.12 $)dnl
dnl General intialization of `autoconf' varaibles.
dnl Ensure that the directory specified with --srcdir was correct
@@ -35,6 +35,11 @@
dnl Libtool version info
VERSIONINFO="$INTERFACE_VERSION:$INTERFACE_VERSION_REVISION:$INTERFACE_AGE"
AC_SUBST(VERSIONINFO)
+
+dnl For version code used in check_configuration().
+AC_SUBST(VERSION_MAJOR)
+AC_SUBST(VERSION_MINOR)
+AC_SUBST(VERSION_REVISION)
dnl Set a decent default value in case we don't have the right libraries
case "$host" in
Index: src/libcwd/debug.cc
diff -u src/libcwd/debug.cc:1.46.2.36 src/libcwd/debug.cc:1.46.2.37
--- src/libcwd/debug.cc:1.46.2.36 Fri Oct 26 15:58:03 2001
+++ src/libcwd/debug.cc Tue Nov 13 19:01:06 2001
@@ -1,4 +1,4 @@
-// $Header: /cvsroot/l/li/libcw/src/libcwd/debug.cc,v 1.46.2.36 2001/10/26 22:58:03 libcw Exp $
+// $Header: /cvsroot/l/li/libcw/src/libcwd/debug.cc,v 1.46.2.37 2001/11/14 03:01:06 libcw Exp $
//
// Copyright (C) 2000 - 2001, by
//
@@ -140,14 +140,19 @@
DoutFatal(dc::fatal, "check_configuration: This version of libcwd was compiled with a different configuration than is currently used in libcw/debug_config.h!");
}
+ void version_check_failed(void)
+ {
+ DoutFatal(dc::fatal, "check_configuration: This version of libcwd does not match the version of libcw/debug_config.h! Are your paths correct?");
+ }
+
/**
* \brief The default %debug stream object.
*
- * Detailed description here.
+ * The %debug object that is used by default by Dout and DoutFatal, the only %debug object used by libcwd itself.
+ * \sa \ref custom_do
*/
- debug_ct libcw_do; // The Debug Object that is used by default by Dout(), the only debug object used
- // by libcw itself.
+ debug_ct libcw_do;
namespace {
unsigned short int WST_max_len = 8; // The length of the longest label. Is adjusted automatically
@@ -156,17 +161,96 @@
namespace channels {
namespace dc {
- channel_ct debug("DEBUG");
- channel_ct notice("NOTICE");
- channel_ct warning("WARNING");
- channel_ct system("SYSTEM");
- channel_ct malloc("MALLOC");
- continued_channel_ct continued(continued_maskbit);
- continued_channel_ct finish(finish_maskbit);
+ /** \defgroup default_dc Pre-defined debug channels
+ *
+ * These are the default %debug %channels pre-defined in libcwd.
+ */
+
+ /** \{ */
+
+ /** The DEBUG channel. */
+ channel_ct debug
+#ifndef HIDE_FROM_DOXYGEN
+ ("DEBUG")
+#endif
+ ;
+
+ /** The NOTICE channel. */
+ channel_ct notice
+#ifndef HIDE_FROM_DOXYGEN
+ ("NOTICE")
+#endif
+ ;
+
+ /** The SYSTEM channel. */
+ channel_ct system
+#ifndef HIDE_FROM_DOXYGEN
+ ("SYSTEM")
+#endif
+ ;
+
+ /** The MALLOC channel. */
+ channel_ct malloc
+#ifndef HIDE_FROM_DOXYGEN
+ ("MALLOC")
+#endif
+ ;
+
+ /** The WARNING channel.
+ *
+ * This is the only channel that
+ * is turned on by default.
+ */
+ channel_ct warning
+#ifndef HIDE_FROM_DOXYGEN
+ ("WARNING")
+#endif
+ ;
+
+ /** A special channel to continue to
+ * write a previous %debug channel.
+ *
+ * \sa \ref using_continued
+ */
+ continued_channel_ct continued
+#ifndef HIDE_FROM_DOXYGEN
+ (continued_maskbit)
+#endif
+ ;
+
+ /** A special channel to finish writing
+ * <EM>%continued</EM> %debug output.
+ *
+ * \sa \ref using_continued
+ */
+ continued_channel_ct finish
+#ifndef HIDE_FROM_DOXYGEN
+ (finish_maskbit)
+#endif
+ ;
+
+ /** The special FATAL channel.
+ *
+ * \sa DoutFatal
+ */
+ fatal_channel_ct fatal
+#ifndef HIDE_FROM_DOXYGEN
+ ("FATAL", fatal_maskbit)
+#endif
+ ;
+
+ /** The special COREDUMP channel.
+ *
+ * \sa DoutFatal
+ */
+ fatal_channel_ct core
+#ifndef HIDE_FROM_DOXYGEN
+ ("COREDUMP", coredump_maskbit)
+#endif
+ ;
- fatal_channel_ct fatal("FATAL", fatal_maskbit);
- fatal_channel_ct core("COREDUMP", coredump_maskbit);
+ /** \} */
}
}
@@ -888,8 +972,8 @@
* \brief Find %debug channel with label \a label.
*
* \return A pointer to the %debug channel object whose name starts with \a label.
- * If there is more than one such %debug %channel, the object with the lexicographically
- * largest name is returned. When no %debug channel could be found, NULL is returned.
+ * If there is more than one such %debug %channel, the object with the lexicographically
+ * largest name is returned. When no %debug channel could be found, NULL is returned.
*/
channel_ct* find_channel(char const* label)
{
@@ -906,15 +990,33 @@
return tmp;
}
- /**
- * \brief Write a list of all %debug %channels to the %debug object \a debug_object.
+ /** \interface list_channels_on debug.h libcw/debug.h
+ *
+ * \brief List all %debug %channels to a given %debug stream object.
*
* \par Example:
* \n
*
* \code
- * Dout( list_channels_on(libcw_do) ); // libcw_do is the (default) debug object of libcwd.
+ * Dout( list_channels_on(libcw_do) ); // libcw_do is the (default) debug stream object of libcwd.
* \endcode
+ *
+ * Example of output:
+ *
+ * \exampleoutput <PRE>
+ * DEBUG : Disabled
+ * NOTICE : Enabled
+ * WARNING : Enabled
+ * SYSTEM : Enabled
+ * MALLOC : Disabled
+ * LLISTS : Disabled
+ * KERNEL : Disabled
+ * IO : Disabled
+ * FOO : Enabled
+ * BAR : Enabled</PRE>
+ * \endexampleoutput
+ *
+ * Where FOO and BAR are \link preparation user defined channels \endlink in this example.
*/
void list_channels_on(debug_ct const& debug_object)
{
@@ -1155,20 +1257,24 @@
" : Use dc::core or dc::fatal together with DoutFatal.");
}
- void _private_::assert_fail(char const* expr, char const* file, int line, char const* function)
- {
-#ifdef DEBUGDEBUGMALLOC
- LIBCWD_TSD_DECLARATION
- if (__libcwd_tsd.recursive)
+ namespace _private_ {
+
+ void assert_fail(char const* expr, char const* file, int line, char const* function)
{
- set_alloc_checking_off(LIBCWD_TSD);
- FATALDEBUGDEBUG_CERR(file << ':' << line << ": " << function << ": Assertion `" << expr << "' failed.\n");
- set_alloc_checking_on(LIBCWD_TSD);
- core_dump();
- }
+#ifdef DEBUGDEBUGMALLOC
+ LIBCWD_TSD_DECLARATION
+ if (__libcwd_tsd.recursive)
+ {
+ set_alloc_checking_off(LIBCWD_TSD);
+ FATALDEBUGDEBUG_CERR(file << ':' << line << ": " << function << ": Assertion `" << expr << "' failed.\n");
+ set_alloc_checking_on(LIBCWD_TSD);
+ core_dump();
+ }
#endif
- DoutFatal(dc::core, file << ':' << line << ": " << function << ": Assertion `" << expr << "' failed.\n");
- }
+ DoutFatal(dc::core, file << ':' << line << ": " << function << ": Assertion `" << expr << "' failed.\n");
+ }
+
+ } // namespace _private_
} // namespace debug
} // namespace libcw
Index: src/libcwd/debugmalloc.cc
diff -u src/libcwd/debugmalloc.cc:1.61.2.41 src/libcwd/debugmalloc.cc:1.61.2.42
--- src/libcwd/debugmalloc.cc:1.61.2.41 Sat Oct 27 17:18:00 2001
+++ src/libcwd/debugmalloc.cc Tue Nov 13 19:01:06 2001
@@ -1,4 +1,4 @@
-// $Header: /cvsroot/l/li/libcw/src/libcwd/debugmalloc.cc,v 1.61.2.41 2001/10/28 00:18:00 libcw Exp $
+// $Header: /cvsroot/l/li/libcw/src/libcwd/debugmalloc.cc,v 1.61.2.42 2001/11/14 03:01:06 libcw Exp $
//
// Copyright (C) 2000 - 2001, by
//
@@ -129,7 +129,7 @@
#undef private
#endif // LIBCWD_THREAD_SAFE
-#ifdef DEBUGMALLOC
+#if defined(DEBUGMALLOC) || defined(LIBCW_DOXYGEN)
#include <cstring>
#include <string>
@@ -1544,6 +1544,20 @@
return o;
}
+/** \interface list_allocations_on debug.h libcw/debug.h
+ *
+ * \brief List all current allocations to a given %debug stream object.
+ *
+ * \par Example:
+ * \n
+ *
+ * \code
+ * Debug( list_allocations_on(libcw_do) ); // libcw_do is the (default) debug stream object of libcwd.
+ * \endcode
+ *
+ * output example here...
+ *
+ */
void list_allocations_on(debug_ct& debug_object)
{
#ifdef DEBUGDEBUGMALLOC
@@ -1605,6 +1619,24 @@
__libcwd_tsd.internal = 0;
}
+/** \interface make_all_allocations_invisible_except debug.h libcw/debug.h
+ *
+ * \brief Make all current allocations invisible except the given pointer.
+ *
+ * All allocations, except the given pointer, are made invisible; they won't show up
+ * anymore in the \link list_allocations_on Memory Allocation Overview \endlink.
+ *
+ * If you want to make \em all allocations invisible, just pass \c NULL as parameter.
+ *
+ * \par Example:
+ * \n
+ *
+ * \code
+ * Debug( make_all_allocations_invisible_except(NULL) );
+ * \endcode
+ *
+ * \sa list_allocations_on
+ */
void make_all_allocations_invisible_except(void const* ptr)
{
LIBCWD_TSD_DECLARATION
Index: src/libcwd/documentation/Makefile
diff -u /dev/null src/libcwd/documentation/Makefile:1.1.2.1
--- /dev/null Tue Nov 13 19:01:18 2001
+++ src/libcwd/documentation/Makefile Tue Nov 13 19:01:07 2001
@@ -0,0 +1,22 @@
+include doxygen.config
+INPUT_FILES=$(shell for i in $(INPUT); do if test -f $$i; then echo $$i; else for j in $(FILE_PATTERNS); do ls $$i/$$j; done; fi done)
+EXAMPLE_FILES=$(shell find doxygen-examples -mindepth 1 -maxdepth 1 -type f -print)
+
+.PHONY: html external
+
+html: external
+ doxygen doxygen.config
+
+external: external/INSTALL external/sys.h external/debug.h external/debug.cc
+
+external/INSTALL: ../INSTALL
+ cp ../INSTALL external/INSTALL
+
+external/sys.h: ../example-project/sys.h
+ cp ../example-project/sys.h external/sys.h
+
+external/debug.h: ../example-project/debug.h
+ cp ../example-project/debug.h external/debug.h
+
+external/debug.cc: ../example-project/debug.cc
+ cp ../example-project/debug.cc external/debug.cc
Index: src/libcwd/documentation/custom-debug.h.doc
diff -u src/libcwd/documentation/custom-debug.h.doc:1.1.2.1 src/libcwd/documentation/custom-debug.h.doc:removed
--- src/libcwd/documentation/custom-debug.h.doc:1.1.2.1 Fri Oct 26 15:58:03 2001
+++ src/libcwd/documentation/custom-debug.h.doc Tue Nov 13 19:01:18 2001
@@ -1,171 +0,0 @@
-// Work around for bug in doxygen.
-#define debug somethingelse
-
-/** \page custom_debug_h The Custom debug.h file
- *
- * This page describes how you can use custom debug channels in a safe and flexible way.
- * It involves: creating a new header file for your application "%debug.h" and including
- * that header file in all your source files. New channels are declared in this custom
- * header file.
- *
- * \section debug_channels_and_namespace Debug channels and namespace
- *
- * \subsection applications Applications
- *
- * User applications have less strict requirements than libraries, because nobody else will link with it.
- * The developer of an application directly controls and checks and resolves name collisions when needed.
- * If you are writing an end-application then you are still urged to create a header file
- * called %debug.h and use \em that in your source files, instead of including <libcw/debug.h> directly.
- * You will benefit greatly from this in terms on flexibility (trust me).
- *
- * Here is a template %debug.h to get you started:
- *
- * \code
- * #ifndef MY_DEBUG_H
- * #define MY_DEBUG_H
- *
- * #ifndef CWDEBUG
- * #include "nodebug.h"
- * #else // CWDEBUG
- *
- * // Define the namespace where you will put your debug channels.
- * // This can be any arbitrary namespace.
- * #define DEBUGCHANNELS debug_channels
- * #include <libcw/debug.h>
- *
- * namespace debug_channels { // This is namespace DEBUGCHANNELS
- * namespace dc {
- * using namespace libcw::debug::channels::dc;
- *
- * // Add custom debug channels here.
- * extern libcw::debug::channel_ct my_own_channel;
- *
- * }
- * }
- *
- * #endif // CWDEBUG
- * #endif // MY_DEBUG_H
- * \endcode
- *
- * In the above you can replace <CODE>##include "nodebug.h" </CODE> by the contents of
- * the nodebug.h file that is distributed with libcwd. It just defines all macros as empty
- * so that your code will still compile on hosts that do not have libcwd installed.
- *
- * \subsection libraries Libraries
- *
- * Libraries that use libcwd should not put their debug channels in libcw::debug::channels::dc. The correct way to declare
- * new debug channels is by putting them in a namespace of the library and providing new macros for writing debug output. Also end
- * applications will benefit by using this method (in terms of flexibility).
- *
- * The following code would define a debug channel \c warp in the namespace \c libexample:
- *
- * \code
- * namespace libexample {
- * namespace channels {
- * namespace dc {
- * ::libcw::debug::channel_ct warp("WARP");
- * }
- * }
- * }
- * \endcode
- *
- * Then provide a debug header file (%debug.h) with the following:
- *
- * \code
- * #ifndef LIBEXAMPLE_DEBUG_H
- * #define LIBEXAMPLE_DEBUG_H
- *
- * #ifndef DEBUGCHANNELS
- * #define DEBUGCHANNELS ::libexample::channels
- * #endif
- * #include <libcw/debug.h>
- *
- * namespace libexample {
- * namespace channels {
- * namespace dc {
- * using namespace libcw::debug::channels::dc;
- * extern libcw::debug::channel_ct warp;
- * }
- * }
- * }
- *
- * // Define private debug output macros for use in header files of the library,
- * // there is no reason to do this for normal applications.
- * #ifdef CWDEBUG
- * #define LibExampleDout(cntrl, data) \
- * LibcwDout(libexample::channels, libcw::debug::libcw_do, cntrl, data)
- * #define LibExampleDoutFatal(cntrl, data) \
- * LibcwDoutFatal(libexample::channels, libcw::debug::libcw_do, cntrl, data)
- * #else
- * #define LibExampleDout(cntrl, data)
- * #define LibExampleDoutFatal(cntrl, data) LibcwDoutFatal(::std, , cntrl, data)
- * #endif
- *
- * #endif // LIBEXAMPLE_DEBUG_H
- * \endcode
- *
- * This will make your debug channels available in the usual way (by using Dout and friends. LibExampleDout and friends are only
- * for use in the header files of `libexample' itself) avoiding any linker name collisions.
- *
- * \subsection header_files_of_libraries Header files of libraries
- *
- * Don't use Dout etc. in header files of libraries, instead use (for example) LibExampleDout etc., as shown above. It is advisable not
- * to include any %debug.h in your headerfiles. Instead, add the following lines to each header file that needs debugging:
- *
- * \code
- * #ifndef LIBEXAMPLE_DEBUG_H
- * #error "You need to include the appropriate debug.h in the source file, before including this header file."
- * #endif
- * \endcode
- *
- * Don't use "libexample/%debug.h" in this error message because someone else might write a library that is using your library and needs
- * a different %debug.h to be included in end applications.
- *
- * \subsection debug_channel_name_collisions Debug channel name collisions
- *
- * The reason that libcwd uses the convention to put debug channels in the namespace dc is to avoid collisions between debug channel
- * names of libraries. There are two types of name collisions possible: you upgrade or start to use a library which uses a debug channel
- * that you had already defined, in that case you might need to change the name of your own channel, or you link with two or more
- * libraries that both use libcwd and that defined the same debug channel, in that case you will have to make your own debug
- * namespace as shown above and choose a new name for one of the channels.
- *
- * For example, suppose you link with two libraries: lib1 and lib2 who use the above convention and defined their own namespaces called
- * lib1 and lib2, but both defined a debug channel called foobar. Then you can rename these channels as follows. Make a debug
- * header file that contains:
- *
- * \code
- * #ifndef DEBUGCHANNELS
- * #define DEBUGCHANNELS ::application::channels
- * #endif
- * #include <lib1/debug.h>
- * #include <lib2/debug.h>
- * namespace application {
- * namespace channels {
- * namespace dc {
- * using namespace ::lib1::channels::dc;
- * using namespace ::lib2::channels::dc;
- * static libcw::debug::channel_ct& foobar1(::lib1::channels::dc::foobar) __attribute__ ((unused));
- * static libcw::debug::channel_ct& foobar2(::lib2::channels::dc::foobar) __attribute__ ((unused));
- * }
- * }
- * }
- * \endcode
- *
- * \htmlonly
- * <DIV class="normal">
- * \endhtmlonly
- * The hiding mechanism of the above `cascading' of debug channel declarations of libraries works as follows. The debug macros use a
- * using-directive to include the scope DEBUGCHANNELS. Because all debug channels are specified as <CODE>dc::channelname</CODE> (and
- * there is no <CODE>using namespace someother::dc</CODE> in name space DEBUGCHANNELS!), the namespace \c dc is uniquely defined. For
- * instance, in the case of the above example, when writing <CODE>dc::notice</CODE> the \c dc will be unambiguously resolved to
- * <CODE>application::debug::channels::dc</CODE>, because it is the only \c dc name space in DEBUGCHANNELS
- * (<CODE>application::debug::channels</CODE>). The C++ standard states: "During the lookup of a name qualified by a namespace name,
- * declarations that would otherwise be made visible by a using-directive can be hidden by declarations with the same name in the
- * namespace containing the using-directive;". This allows us to put a list of using-directives in
- * <CODE>application::debug::channels::dc</CODE> and then hide any collision by redefining it in
- * <CODE>application::debug::channels::dc</CODE> itself, either as new debug channel, or as reference to one of the debug channels
- * of the library of choice.
- * \htmlonly
- * </DIV>
- * \endhtmlonly
- */
Index: src/libcwd/documentation/custom-debug.h.dox
diff -u /dev/null src/libcwd/documentation/custom-debug.h.dox:1.1.2.1
--- /dev/null Tue Nov 13 19:01:18 2001
+++ src/libcwd/documentation/custom-debug.h.dox Tue Nov 13 19:01:07 2001
@@ -0,0 +1,140 @@
+// Work around for bug in doxygen.
+#define debug somethingelse
+
+/** \page custom_debug_h The Custom debug.h file
+ *
+ * \section debug_channels_and_namespace Debug channels and namespace
+ *
+ * \subsection applications Applications
+ *
+ * User applications have less strict requirements than libraries, because nobody else will link with it.
+ * The developer of an application directly controls and checks and resolves name collisions when needed.
+ * If you are writing an end-application then you are still urged to create a header file
+ * called %debug.h and use \em that in your source files, instead of including <libcw/debug.h> directly.
+ * You will benefit greatly from this in terms on flexibility (trust me).
+ *
+ * \sa \ref preparation
+ *
+ * \subsection libraries Libraries
+ *
+ * Libraries that use libcwd should not put their debug channels in libcw::debug::channels::dc.
+ * The correct way to declare new debug channels is by putting them in a namespace of the library and
+ * providing new macros for writing debug output.
+ * Also end applications will benefit by using this method (in terms of flexibility).
+ *
+ * The following code would define a debug channel \c warp in the namespace \c libexample:
+ *
+ * \code
+ * namespace libexample {
+ * namespace channels {
+ * namespace dc {
+ * ::libcw::debug::channel_ct warp("WARP");
+ * }
+ * }
+ * }
+ * \endcode
+ *
+ * Then provide a debug header file (%debug.h) with the following:
+ *
+ * \code
+ * #ifndef LIBEXAMPLE_DEBUG_H
+ * #define LIBEXAMPLE_DEBUG_H
+ *
+ * #ifndef DEBUGCHANNELS
+ * #define DEBUGCHANNELS ::libexample::channels
+ * #endif
+ * #include <libcw/debug.h>
+ *
+ * namespace libexample {
+ * namespace channels {
+ * namespace dc {
+ * using namespace libcw::debug::channels::dc;
+ * extern libcw::debug::channel_ct warp;
+ * }
+ * }
+ * }
+ *
+ * // Define private debug output macros for use in header files of the library,
+ * // there is no reason to do this for normal applications.
+ * #ifdef CWDEBUG
+ * #define LibExampleDout(cntrl, data) \
+ * LibcwDout(libexample::channels, libcw::debug::libcw_do, cntrl, data)
+ * #define LibExampleDoutFatal(cntrl, data) \
+ * LibcwDoutFatal(libexample::channels, libcw::debug::libcw_do, cntrl, data)
+ * #else
+ * #define LibExampleDout(cntrl, data)
+ * #define LibExampleDoutFatal(cntrl, data) LibcwDoutFatal(::std, , cntrl, data)
+ * #endif
+ *
+ * #endif // LIBEXAMPLE_DEBUG_H
+ * \endcode
+ *
+ * This will make your debug channels available in the usual way (by using Dout and friends.
+ * LibExampleDout and friends are only for use in the header files of `libexample' itself) avoiding any linker name collisions.
+ *
+ * \subsection header_files_of_libraries Header files of libraries
+ *
+ * Don't use Dout etc. in header files of libraries, instead use (for example) LibExampleDout etc., as shown above.
+ * It is advisable not to include any %debug.h in your headerfiles.
+ * Instead, add the following lines to each header file that needs debugging:
+ *
+ * \code
+ * #ifndef LIBEXAMPLE_DEBUG_H
+ * #error "You need to include the appropriate debug.h in the source file, before including this header file."
+ * #endif
+ * \endcode
+ *
+ * Don't use "libexample/%debug.h" in this error message because someone else might write a library that is using your library and needs
+ * a different %debug.h to be included in end applications.
+ *
+ * \subsection debug_channel_name_collisions Debug channel name collisions
+ *
+ * The reason that libcwd uses the convention to put debug channels in the namespace dc is to avoid collisions between debug channel
+ * names of libraries.
+ * There are two types of name collisions possible: you upgrade or start to use a library which uses a debug channel
+ * that you had already defined, in that case you might need to change the name of your own channel, or you link with two or more
+ * libraries that both use libcwd and that defined the same debug channel, in that case you will have to make your own debug
+ * namespace as shown above and choose a new name for one of the channels.
+ *
+ * For example, suppose you link with two libraries: lib1 and lib2 who use the above convention and defined their own namespaces called
+ * lib1 and lib2, but both defined a debug channel called foobar.
+ * Then you can rename these channels as follows.
+ * Make a debug header file that contains:
+ *
+ * \code
+ * #ifndef DEBUGCHANNELS
+ * #define DEBUGCHANNELS ::application::channels
+ * #endif
+ * #include <lib1/debug.h>
+ * #include <lib2/debug.h>
+ * namespace application {
+ * namespace channels {
+ * namespace dc {
+ * using namespace ::lib1::channels::dc;
+ * using namespace ::lib2::channels::dc;
+ * static libcw::debug::channel_ct& foobar1(::lib1::channels::dc::foobar) __attribute__ ((unused));
+ * static libcw::debug::channel_ct& foobar2(::lib2::channels::dc::foobar) __attribute__ ((unused));
+ * }
+ * }
+ * }
+ * \endcode
+ *
+ * \htmlonly
+ * <DIV class="normal">
+ * \endhtmlonly
+ * The hiding mechanism of the above `cascading' of debug channel declarations of libraries works as follows.
+ * The debug macros use a using-directive to include the scope DEBUGCHANNELS.
+ * Because all debug channels are specified as <CODE>dc::channelname</CODE>
+ * (and there is no <CODE>using namespace someother::dc</CODE> in name space DEBUGCHANNELS!), the namespace \c dc is uniquely defined.
+ * For instance, in the case of the above example, when writing <CODE>dc::%notice</CODE> the \c dc will be unambiguously resolved to
+ * <CODE>application::debug::channels::dc</CODE>, because it is the only \c dc name space in DEBUGCHANNELS
+ * (<CODE>application::debug::channels</CODE>).
+ * The C++ standard states: "During the lookup of a name qualified by a namespace name, declarations that would otherwise be made
+ * visible by a using-directive can be hidden by declarations with the same name in the namespace containing the using-directive;".
+ * This allows us to put a list of using-directives in <CODE>application::debug::channels::dc</CODE> and then hide any collision by
+ * redefining it in <CODE>application::debug::channels::dc</CODE> itself, either as new debug channel, or as reference to one of the
+ * %debug %channels of the library of choice.
+ * \htmlonly
+ * </DIV>
+ * \endhtmlonly
+ */
Index: src/libcwd/documentation/custom_do.dox
diff -u /dev/null src/libcwd/documentation/custom_do.dox:1.1.2.1
--- /dev/null Tue Nov 13 19:01:18 2001
+++ src/libcwd/documentation/custom_do.dox Tue Nov 13 19:01:07 2001
@@ -0,0 +1,23 @@
+/*!
+
+\page custom_do Custom Debug Objects
+
+Each %debug object is associated with one ostream.
+The default %debug output macros Dout and DoutFatal use the \em default debug object libcw::debug::libcw_do.
+Other %debug objects may be created as global objects;
+it is convenient to define new macros for each (custom) %debug object using the generic macros LibcwDout and LibcwDoutFatal.
+
+For example, add something like the following to your own \link custom_debug_h "debug.h" \endlink file:
+
+\code
+#ifdef CWDEBUG
+extern libcw::debug::debug_ct my_debug_object;
+#define MyDout(cntrl, data) LibcwDout(DEBUGCHANNELS, my_debug_object, cntrl, data)
+#define MyDoutFatal(cntrl, data) LibcwDoutFatal(DEBUGCHANNELS, my_debug_object, cntrl, data)
+#else // !CWDEBUG
+#define MyDout(a, b)
+#define MyDoutFatal(a, b) LibcwDoutFatal(::std,, a, b)
+#endif // !CWDEBUG
+\endcode
+
+*/
Index: src/libcwd/documentation/downloading.dox
diff -u /dev/null src/libcwd/documentation/downloading.dox:1.1.2.1
--- /dev/null Tue Nov 13 19:01:18 2001
+++ src/libcwd/documentation/downloading.dox Tue Nov 13 19:01:07 2001
@@ -0,0 +1,4 @@
+/** \page downloading Downloading
+ *
+ * For now, download libcwd from sourceforge at http://sourceforge.net/project/showfiles.php?group_id=354
+ */
Index: src/libcwd/documentation/doxygen.config
diff -u src/libcwd/documentation/doxygen.config:1.1.2.2 src/libcwd/documentation/doxygen.config:1.1.2.3
--- src/libcwd/documentation/doxygen.config:1.1.2.2 Fri Oct 26 15:58:03 2001
+++ src/libcwd/documentation/doxygen.config Tue Nov 13 19:01:07 2001
@@ -8,10 +8,10 @@
OUTPUT_DIRECTORY =
OUTPUT_LANGUAGE = English
EXTRACT_ALL = NO
-EXTRACT_PRIVATE = YES
+EXTRACT_PRIVATE = NO
EXTRACT_STATIC = NO
HIDE_UNDOC_MEMBERS = YES
-HIDE_UNDOC_CLASSES = NO
+HIDE_UNDOC_CLASSES = YES
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ALWAYS_DETAILED_SEC = NO
@@ -35,17 +35,20 @@
DISTRIBUTE_GROUP_DOC = NO
TAB_SIZE = 8
GENERATE_TODOLIST = NO
-GENERATE_TESTLIST = NO
+GENERATE_TESTLIST = YES
GENERATE_BUGLIST = NO
-ALIASES =
+ALIASES = exampleoutput=\htmlonly\n<DIV\nclass=example-output>\n\endhtmlonly\n \
+ endexampleoutput=\htmlonly\n</DIV>\n\endhtmlonly \
+ shellcommand=\htmlonly\n<SPAN\nclass=shell-command>\n\endhtmlonly\n \
+ endshellcommand=\htmlonly\n</SPAN>\n\endhtmlonly
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
OPTIMIZE_OUTPUT_FOR_C = NO
-SHOW_USED_FILES = NO
+SHOW_USED_FILES = YES
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
-QUIET = NO
+QUIET = YES
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_FORMAT =
@@ -57,13 +60,26 @@
../include/libcw/char2str.h \
../include/libcw/cwprint.h \
../include/libcw/debug.h \
- . \
- ../debug.cc
-FILE_PATTERNS = *.doc
+ ../debug.cc \
+ ../include/libcw/class_debug.h \
+ ../include/libcw/control_flag.h \
+ ../include/libcw/class_channel.h \
+ ../include/libcw/debug_config.h \
+ ../debugmalloc.cc \
+ ../include/libcw/macro_ForAllDebugChannels.h \
+ ../include/libcw/macro_ForAllDebugObjects.h \
+ ../bfd.cc \
+ ../include/libcw/class_debug_string.h \
+ ../include/libcw/class_fatal_channel.h \
+ ../include/libcw/class_continued_channel.h \
+ ../include/libcw/class_channel_set.h \
+ .
+FILE_PATTERNS = *.dox
RECURSIVE = NO
EXCLUDE =
EXCLUDE_PATTERNS =
-EXAMPLE_PATH = doxygen-examples
+EXAMPLE_PATH = external \
+ doxygen-examples
EXAMPLE_PATTERNS =
IMAGE_PATH =
INPUT_FILTER =
Index: src/libcwd/documentation/external/.cvsignore
diff -u /dev/null src/libcwd/documentation/external/.cvsignore:1.1.2.1
--- /dev/null Tue Nov 13 19:01:18 2001
+++ src/libcwd/documentation/external/.cvsignore Tue Nov 13 19:01:07 2001
@@ -0,0 +1,5 @@
+INSTALL
+sys.h
+debug.h
+debug.cc
+
Index: src/libcwd/documentation/html.footer
diff -u src/libcwd/documentation/html.footer:1.1.2.1 src/libcwd/documentation/html.footer:1.1.2.2
--- src/libcwd/documentation/html.footer:1.1.2.1 Fri Oct 26 15:58:03 2001
+++ src/libcwd/documentation/html.footer Tue Nov 13 19:01:07 2001
@@ -1,6 +1,5 @@
-<BR>
-<HR SIZE=1 NOSHADE>
-<ADDRESS>Copyright © 2001 Carlo Wood. All rights reserved.</ADDRESS>
+<ADDRESS>Copyright © 2001 Carlo Wood. All rights reserved.</ADDRESS>
+
</DIV>
</BODY>
</HTML>
Index: src/libcwd/documentation/mainpage.doc
diff -u src/libcwd/documentation/mainpage.doc:1.1.2.1 src/libcwd/documentation/mainpage.doc:removed
--- src/libcwd/documentation/mainpage.doc:1.1.2.1 Fri Oct 26 15:58:03 2001
+++ src/libcwd/documentation/mainpage.doc Tue Nov 13 19:01:18 2001
@@ -1,46 +0,0 @@
-/*! \mainpage An Object Oriented Debugging library
- *
- * \section intro Introduction
- *
- * Libcwd is a full-featured debugging
- * support library for C++ developers.
- * It includes ostream-based debug
- * output with custom debug channels
- * and devices, powerful memory
- * allocation debugging support, as
- * well as run-time support for printing
- * source-%file:line-number information
- * and demangled type names.
- *
- * \section output_example Example output
- *
- * \htmlonly
- * <CODE>
- * <PRE>
- * MALLOC : malloc(72) = <unfinished>
- * BFD : address 0x402ad017 corresponds to dl-open.c:114
- * MALLOC : <continued> 0x81c1330
- * BFD : Loading debug info from ./module.so (0x4031f000) ... done (206 symbols)
- * MALLOC : malloc(310) = <unfinished>
- * BFD : address 0x40325943 corresponds to module.cc:16
- * MALLOC : <continued> 0x81bfb68
- * MALLOC : malloc(300) = <unfinished>
- * BFD : address 0x40325490 corresponds to module.cc:7
- * MALLOC : <continued> 0x817c490
- * MALLOC : Allocated memory: 1518 bytes in 10 blocks.
- * malloc 0x817c490 module.cc:7 void*; (sz = 300) Allocated inside static_test_symbol
- * malloc 0x81bfb68 module.cc:16 void*; (sz = 310) Allocated inside global_test_symbol
- * malloc 0x81c1330 dl-open.c:114 <unknown type>; (sz = 72)
- * malloc 0x81f52a8 dl-version.c:287 <unknown type>; (sz = 96)
- * malloc 0x804f410 dl-deps.c:495 <unknown type>; (sz = 52)
- * malloc 0x81c1290 dl-object.c:107 <unknown type>; (sz = 140)
- * malloc 0x81c0d30 dl-object.c:41 <unknown type>; (sz = 24)
- * malloc 0x81c05f8 dl-object.c:40 <unknown type>; (sz = 496)
- * malloc 0x81f5288 dl-load.c:164 <unknown type>; (sz = 12)
- * malloc 0x81c00a0 dlerror.c:108 <unknown type>; (sz = 16)
- * NOTICE : Finished
- * </PRE>
- * </CODE>
- * \endhtmlonly
- *
- */
Index: src/libcwd/documentation/mainpage.dox
diff -u /dev/null src/libcwd/documentation/mainpage.dox:1.1.2.1
--- /dev/null Tue Nov 13 19:01:18 2001
+++ src/libcwd/documentation/mainpage.dox Tue Nov 13 19:01:07 2001
@@ -0,0 +1,48 @@
+/*! \mainpage An Object Oriented Debugging library
+ *
+ * \section intro Introduction
+ *
+ * Libcwd is a full-featured debugging support library for C++ developers.
+ * It includes ostream-based debug output with custom debug channels
+ * and devices, powerful memory allocation debugging support, as
+ * well as run-time support for printing source-%file:line-number information
+ * and demangled type names.
+ *
+ * \section mainpage_links Links
+ *
+ * \li \ref downloading
+ * \li \ref preparation
+ * \li \ref reference
+ *
+ * \section output_example Example output
+ *
+ * \htmlonly
+ * <CODE>
+ * <PRE>
+ * MALLOC : malloc(72) = <unfinished>
+ * BFD : address 0x402ad017 corresponds to dl-open.c:114
+ * MALLOC : <continued> 0x81c1330
+ * BFD : Loading debug info from ./module.so (0x4031f000) ... done (206 symbols)
+ * MALLOC : malloc(310) = <unfinished>
+ * BFD : address 0x40325943 corresponds to module.cc:16
+ * MALLOC : <continued> 0x81bfb68
+ * MALLOC : malloc(300) = <unfinished>
+ * BFD : address 0x40325490 corresponds to module.cc:7
+ * MALLOC : <continued> 0x817c490
+ * MALLOC : Allocated memory: 1518 bytes in 10 blocks.
+ * malloc 0x817c490 module.cc:7 void*; (sz = 300) Allocated inside static_test_symbol
+ * malloc 0x81bfb68 module.cc:16 void*; (sz = 310) Allocated inside global_test_symbol
+ * malloc 0x81c1330 dl-open.c:114 <unknown type>; (sz = 72)
+ * malloc 0x81f52a8 dl-version.c:287 <unknown type>; (sz = 96)
+ * malloc 0x804f410 dl-deps.c:495 <unknown type>; (sz = 52)
+ * malloc 0x81c1290 dl-object.c:107 <unknown type>; (sz = 140)
+ * malloc 0x81c0d30 dl-object.c:41 <unknown type>; (sz = 24)
+ * malloc 0x81c05f8 dl-object.c:40 <unknown type>; (sz = 496)
+ * malloc 0x81f5288 dl-load.c:164 <unknown type>; (sz = 12)
+ * malloc 0x81c00a0 dlerror.c:108 <unknown type>; (sz = 16)
+ * NOTICE : Finished
+ * </PRE>
+ * </CODE>
+ * \endhtmlonly
+ *
+ */
Index: src/libcwd/documentation/namespaces.doc
diff -u src/libcwd/documentation/namespaces.doc:1.1.2.1 src/libcwd/documentation/namespaces.doc:removed
--- src/libcwd/documentation/namespaces.doc:1.1.2.1 Fri Oct 26 15:58:03 2001
+++ src/libcwd/documentation/namespaces.doc Tue Nov 13 19:01:18 2001
@@ -1,41 +0,0 @@
-/** \namespace libcw
- *
- * \brief namespace for libcw.
- *
- * The library libcwd is a spin-off of the larger libcw project.
- * The header files of both are put in the same directory, called libcw (for example, /usr/include/libcw).
- *
- * The d in libcwd stands for Debugging. The cw in libcw stand for the initials of the designer/developer of
- * this life-span project.
- *
- * For historical reasons, the namespace of libcwd is called libcw::debug rather than \c libcwd.
- * libcwd itself does not declare anything else in namespace libcw than its own '%debug' namespace.
- *
- * \sa libcw::debug
- */
-namespace libcw {
-
- /** \namespace libcw::debug
- *
- * \brief namespace for libcwd.
- *
- * This namespace contains all user accessible classes, functions and variables.\n
- * Things defined in this namespace belong to the libcwd API and will be supported through-out version 1.x.
- */
- namespace debug {
-
- /** \namespace libcw::debug::channels
- *
- * \brief The default DEBUGCHANNELS namespace.
- *
- * This macro should contain the namespace where your application defines the \link namespace_dc dc \endlink namespace;
- * If you want to define additional %debug %channels, next to the ones already \link libcw::debug::channels::dc provided \endlink
- * by libcwd, then the macro DEBUGCHANNELS must be defined in the custom \link custom_debug_h debug.h \endlink
- * header file of your application (or library) prior to including <libcw/debug.h>.
- *
- * \sa \link custom_debug_h Custom debug channels \endlink
- */
- namespace channels {
- }
- }
-}
Index: src/libcwd/documentation/namespaces.dox
diff -u /dev/null src/libcwd/documentation/namespaces.dox:1.1.2.1
--- /dev/null Tue Nov 13 19:01:18 2001
+++ src/libcwd/documentation/namespaces.dox Tue Nov 13 19:01:07 2001
@@ -0,0 +1,41 @@
+/** \namespace libcw
+ *
+ * \brief namespace for libcw.
+ *
+ * The library libcwd is a spin-off of the larger libcw project.
+ * The header files of both are put in the same directory, called libcw (for example, /usr/include/libcw).
+ *
+ * The d in libcwd stands for Debugging. The cw in libcw stand for the initials of the designer/developer of
+ * this life-span project.
+ *
+ * For historical reasons, the namespace of libcwd is called libcw::debug rather than \c libcwd.
+ * libcwd itself does not declare anything else in namespace libcw than its own '%debug' namespace.
+ *
+ * \sa libcw::debug
+ */
+namespace libcw {
+
+ /** \namespace libcw::debug
+ *
+ * \brief namespace for libcwd.
+ *
+ * This namespace contains all user accessible classes, functions and variables.\n
+ * Things defined in this namespace belong to the libcwd API and will be supported through-out version 1.x.
+ */
+ namespace debug {
+
+ /** \namespace libcw::debug::channels
+ *
+ * \brief The default DEBUGCHANNELS namespace.
+ *
+ * This macro should contain the namespace where your application defines the \link preparation dc \endlink namespace;
+ * If you want to define additional %debug %channels, next to the ones already \link libcw::debug::channels::dc provided \endlink
+ * by libcwd, then the macro DEBUGCHANNELS must be defined in the custom \link preparation debug.h \endlink
+ * header file of your application (or library) prior to including <libcw/debug.h>.
+ *
+ * \sa \ref preparation
+ */
+ namespace channels {
+ }
+ }
+}
Index: src/libcwd/documentation/nested.dox
diff -u /dev/null src/libcwd/documentation/nested.dox:1.1.2.1
--- /dev/null Tue Nov 13 19:01:18 2001
+++ src/libcwd/documentation/nested.dox Tue Nov 13 19:01:07 2001
@@ -0,0 +1,89 @@
+/** \page nested_debug_calls Nested debug calls
+ *
+ * \section inside Calling functions inside Dout
+ *
+ * Consider the following code:
+ *
+ * \code
+ * int foobar(void) __attribute__ ((const));
+ *
+ * int foobar(void)
+ * {
+ * Dout( dc::notice, "Entering foobar()" );
+ * Dout( dc::notice, "Leaving foobar()" );
+ * return 1;
+ * }
+ *
+ * int main(void)
+ * {
+ * Dout( dc::kernel, "The value of foobar() = " << foobar()
+ * << ", aint that nice?" );
+ * return foobar();
+ * }
+ * \endcode
+ *
+ * This code would start a new debug message before the previous debug message is finished.
+ * Libcwd detects this and will output:
+ *
+ * \exampleoutput <PRE>
+ * NOTICE: Entering foobar()
+ * NOTICE: Leaving foobar()
+ * KERNEL: The value of foobar() = 2, aint that nice?</PRE>
+ * \endexampleoutput
+ *
+ * Note the indentation and the fact that the printing of the label KERNEL was delayed.
+ *
+ * \section using_continued Using continued_cf, dc::continued and dc::finish
+ *
+ * In the previous section <CODE>foobar()</CODE> was a const function: it didn't matter
+ * whether or not it was called for the functionality of the application. But when
+ * it does matter, then one might want to do something like this:
+ *
+ * \code
+ * Dout( dc::kernel|flush_cf|continued_cf, "Generating tables... " );
+ * generate_tables();
+ * Dout( dc::finish, "done" );
+ * \endcode
+ *
+ * If generate_tables() would not print debug messages, then the output will look like:
+ *
+ * \exampleoutput <PRE>
+ * KERNEL: Generating tables... done</PRE>
+ * \endexampleoutput
+ *
+ * When it does generated debug output, then the <unfinished> and <continued> labels are printed also:
+ *
+ * \exampleoutput <PRE>
+ * KERNEL: Generating tables... <unfinished>
+ * NOTICE: Inside generate_tables()
+ * KERNEL: <continued> done</PRE>
+ * \endexampleoutput
+ *
+ * Finally, it is also possible to split a debug line into more then two parts by using the special dc::continued debug channel.
+ *
+ * \code
+ * Dout( dc::notice|flush_cf|continued_cf, "Generating tables." );
+ * for(int i = 0; i < 8; ++i)
+ * {
+ * generate_table(i);
+ * Dout( dc::continued, '.' );
+ * }
+ * Dout( dc::finish, " done" );
+ * \endcode
+ *
+ * When generate_table(i) doesn't print debug messages, then the output will look like:
+ *
+ * \exampleoutput <PRE>
+ * NOTICE: Generating tables......... done</PRE>
+ * \endexampleoutput
+ *
+ * When it does generate debug output, then each dot would be surrounded by a <continued> .<unfinished> :
+ *
+ * \exampleoutput <PRE>
+ * NOTICE: Generating tables.<unfinished>
+ * TABLE : Inside generate_table(0)
+ * NOTICE: <continued> .<unfinished></PRE>
+ * \endexampleoutput
+ *
+ * etc.
+ */
Index: src/libcwd/documentation/preparation.dox
diff -u /dev/null src/libcwd/documentation/preparation.dox:1.1.2.1
--- /dev/null Tue Nov 13 19:01:18 2001
+++ src/libcwd/documentation/preparation.dox Tue Nov 13 19:01:07 2001
@@ -0,0 +1,45 @@
+/** \page preparation Preparation
+ *
+ * This page describes the preparations that you need to perform
+ * before starting to use libcwd in your applications source code.
+ *
+ * \subsection installation Step 1: Installing libcwd
+ *
+ * Binairy distributions should be installed the usual way.
+ *
+ * If you are installing libcwd from source then please read the
+ * \htmlonly<A HREF="../external/INSTALL">\endhtmlonly
+ * INSTALL\htmlonly</A>\endhtmlonly
+ * file that is included in the source distribution.<BR>
+ * See also: \ref configuration
+ *
+ * \subsection header_files Step 2: Creating the custom header files
+ *
+ * You need to add two custom header files to your application.<BR>
+ * The recommended names are "%debug.h" and "sys.h".
+ *
+ * You can use the following templates for a quick start:
+ *
+ * \par sys.h example template
+ * \include sys.h
+ * \htmlonly «<A HREF="../external/sys.h">download</A>»\endhtmlonly
+ *
+ * \par debug.h example template
+ * \include debug.h
+ * \htmlonly «<A HREF="../external/debug.h">download</A>»\endhtmlonly
+ *
+ * This %debug.h file is for applications, for more detailed information and for information
+ * for library developers who want to use libbcwd, please also read \ref custom_debug_h.
+ *
+ * \subsection custom_debug_cc Step 3: Creating the custom source file
+ *
+ * If you added one or more custom %debug %channels to your namespace
+ * <CODE>DEBUGCHANNELS</CODE> in your custom "%debug.h", then of course you
+ * also need to add the definition somewhere.
+ * You can do that anywhere, or you could add a special source file for it.
+ *
+ * \par debug.cc example template
+ * \include debug.cc
+ * \htmlonly «<A HREF="../external/debug.cc">download</A>»\endhtmlonly
+ */
+
Index: src/libcwd/documentation/reference.dox
diff -u /dev/null src/libcwd/documentation/reference.dox:1.1.2.1
--- /dev/null Tue Nov 13 19:01:18 2001
+++ src/libcwd/documentation/reference.dox Tue Nov 13 19:01:07 2001
@@ -0,0 +1,56 @@
+/*! \page reference Reference Manual
+
+\section Writing_debug_output Writing debug output
+
+\subsection The_Debug_Object The Debug Object
+<ul>
+ <li> Class: \ref libcw::debug::debug_ct
+ <li> Default debug object: \link libcw::debug::libcw_do libcw_do \endlink
+ <li> Writing debug output to libcw_do: \ref Dout
+ <li> Custom debug objects: \ref custom_do
+</ul>
+
+\subsection Debug_Channel_objects Debug Channel objects
+<ul>
+ <li> Class: \ref libcw::debug::channel_ct
+ <li> Pre-defined channels: \ref default_dc
+ <li> Custom channels: \ref preparation
+</ul>
+
+\subsection Format_of_the_debug_output Format of the debug output
+<ul>
+ <li> \ref debug_ct_formatting
+</ul>
+
+\subsection Debug_output_Control_Flags Debug output Control Flags
+<ul>
+ <li> Overview: \ref control_flags
+</ul>
+
+\subsection Fatal_debug_output Fatal debug output
+<ul>
+ <li> Macro: \ref DoutFatal
+ <li> Pre-defined channels: \ref dc::fatal, \ref dc::core
+</ul>
+
+\subsection Nested_debug_calls Nested debug calls
+<ul>
+ <li> \ref nested_debug_calls
+</ul>
+
+\subsection Special_functions Special functions
+<ul>
+ <li> \ref ForAllDebugObjects ( )
+ <li> \ref ForAllDebugChannels ( )
+ <li> \ref Debug ( \link libcw::debug::check_configuration list_channels_on() \endlink )
+ <li> \ref Debug ( \link libcw::debug::list_channels_on list_channels_on \endlink (\link libcw::debug::libcw_do libcw_do \endlink) )
+ <li> \ref Debug ( \link libcw::debug::list_allocations_on list_allocations_on \endlink (\link libcw::debug::libcw_do libcw_do \endlink) )
+ <li> \ref Debug ( \link libcw::debug::make_all_allocations_invisible_except make_all_allocations_invisible_except(ptr) \endlink )
+</ul>
+
+\section Memory_allocation_debugging_support Memory allocation debug support
+
+\section Runtime_debug_symbols_handling Runtime debug symbols handling
+
+*/
+
Index: src/libcwd/documentation/scripts/load_style_sheets.js
diff -u src/libcwd/documentation/scripts/load_style_sheets.js:1.1.2.1 src/libcwd/documentation/scripts/load_style_sheets.js:1.1.2.2
--- src/libcwd/documentation/scripts/load_style_sheets.js:1.1.2.1 Fri Oct 26 15:58:03 2001
+++ src/libcwd/documentation/scripts/load_style_sheets.js Tue Nov 13 19:01:07 2001
@@ -16,8 +16,13 @@
write("<LINK REL=StyleSheet HREF=\"" + rootpath + "styles/tag-cw.css\" TYPE=\"text/css\">");
if (is_nav)
{
- write("<LINK REL=StyleSheet HREF=\"" + rootpath + "styles/ns/main.css\" TYPE=\"text/css\">");
- if (is_unix)
- write("<LINK REL=StyleSheet HREF=\"" + rootpath + "styles/ns/linux/main.css\" TYPE=\"text/css\">");
+ if (is_nav5up)
+ write("<LINK REL=StyleSheet HREF=\"" + rootpath + "styles/ns5/main.css\" TYPE=\"text/css\">");
+ else
+ {
+ write("<LINK REL=StyleSheet HREF=\"" + rootpath + "styles/ns4/main.css\" TYPE=\"text/css\">");
+ if (is_unix)
+ write("<LINK REL=StyleSheet HREF=\"" + rootpath + "styles/ns4/linux/main.css\" TYPE=\"text/css\">");
+ }
}
}
Index: src/libcwd/documentation/styles/main.css
diff -u src/libcwd/documentation/styles/main.css:1.1.2.1 src/libcwd/documentation/styles/main.css:1.1.2.2
--- src/libcwd/documentation/styles/main.css:1.1.2.1 Fri Oct 26 15:58:03 2001
+++ src/libcwd/documentation/styles/main.css Tue Nov 13 19:01:07 2001
@@ -31,43 +31,43 @@
* Style Sheet for the libcw documentation
*/
-BODY { background: rgb(247, 252, 248); margin-top: 10; }
-BODY, .normal { color: black; }
+BODY { color: black; background-color: rgb(247, 252, 248); margin-top: 10px; }
+BODY, .normal { color: black; background-color: rgb(247, 252, 248); }
BODY, .normal, TD, TH {
font-family: verdana;
font-size: 10pt;
}
-A:link, A:visited, A:active { text-decoration: underline; font-weight: normal; }
-A:link { color: blue; }
-A:visited, A:active { color: #2727b2; }
+/* Images and links */
+a:link img, a:visited img {
+ border-style : none;
+}
+a img {
+ color: transparent; background: transparent; text-decoration: none;
+}
+address img {
+ float: right;
+}
+address {
+ padding-top: 0.5em;
+ padding-right: 1em;
+ padding-left: 1em;
+ padding-bottom: 0.5em;
+ margin-top: 3em;
+ border-top: 2px solid black;
+ background-color: #eee;
+ clear: both;
+}
+
+.image-link:link { text-decoration: none; }
+.image-link:visited { text-decoration: none; }
+.image-link:active { text-decoration: none; }
+
/* Heading fonts and sizes */
H1, H2, H3, H4, H5 { font-family: helvetica; }
-H1 { font-size: 26pt; text-align: center; }
-H2 { font-size: 20pt }
-H3 { font-size: 16pt }
-H4 { font-size: 14pt }
-H5 { font-size: 13pt }
-
-H1.function, H2.function, H3.function, H4.function, H5.function, H6.function { font-family: courier }
-
-H1.function { font-size: 12pt }
-H2.function { font-size: 12pt }
-H3.function { font-size: 12pt }
-H4.function { font-size: 12pt }
-H5.function { font-size: 12pt }
-H6.function { font-size: 12pt }
-
-.H1code { font-size: 24pt }
-.H2code { font-size: 18pt }
-.H3code { font-size: 15pt }
-.H4code { font-size: 13pt }
-.H5code { font-size: 12pt }
-.H6code { font-size: 10pt }
-
/* Special classes */
.table {
@@ -77,8 +77,6 @@
margin-top: 3px;
margin-bottom: 3px
}
-
-A.image-link:link, A.image-link:visited, A.image-link:active { text-decoration: none }
.code, .example-code, .nld, .output, .example-output {
font-family: courier;
Index: src/libcwd/documentation/styles/ns4/linux/main.css
diff -u /dev/null src/libcwd/documentation/styles/ns4/linux/main.css:1.1.2.1
--- /dev/null Tue Nov 13 19:01:18 2001
+++ src/libcwd/documentation/styles/ns4/linux/main.css Tue Nov 13 19:01:07 2001
@@ -0,0 +1,20 @@
+/* Incremental style sheet for netscape navigator on linux */
+
+/* Netscape table bug workaround. Also use <BODY><DIV class="normal"> ... </DIV><TABLE></TABLE><DIV class="normal"> ... </DIV></BODY> */
+BODY, .normal, TD, TH {
+ font-family: helvetica;
+ font-size: 14pt;
+}
+/* Same for doxygen code fragments: */
+DIV.fragment { font-size: 14pt }
+CODE { font-size: 14pt }
+
+/* At least try to make it look the same as on IE */
+HR {
+ line-height: 1.86ex; /* 2 times font-size 13/font-size 14 */
+}
+
+.code, .example-code, .nld, .output, .example-output {
+ font-family: courier;
+ font-size: 14pt;
+}
Index: src/libcwd/documentation/styles/ns4/main.css
diff -u /dev/null src/libcwd/documentation/styles/ns4/main.css:1.1.2.1
--- /dev/null Tue Nov 13 19:01:18 2001
+++ src/libcwd/documentation/styles/ns4/main.css Tue Nov 13 19:01:07 2001
@@ -0,0 +1,9 @@
+/* Incremental style sheet for netscape navigator */
+
+/* At least try to make it look the same as on IE */
+HR {
+ line-height: 2ex; /* 2 times font-size IE/font-size our */
+ vertical-align: middle;
+}
+
+DIV.fragment { padding-top: 0.7em; padding-bottom: 0em }
Index: src/libcwd/documentation/styles/ns5/main.css
diff -u /dev/null src/libcwd/documentation/styles/ns5/main.css:1.1.2.1
--- /dev/null Tue Nov 13 19:01:18 2001
+++ src/libcwd/documentation/styles/ns5/main.css Tue Nov 13 19:01:07 2001
@@ -0,0 +1,30 @@
+/* Incremental style sheet for mozilla */
+
+/* At least try to make it look the same as on IE */
+HR {
+ line-height: 2ex; /* 2 times font-size IE/font-size our */
+ vertical-align: middle;
+}
+
+DIV.fragment { padding-top: 0em; padding-bottom: 0em }
+
+/* Incremental style sheet for mozilla on linux */
+
+/* Netscape table bug workaround. Also use <BODY><DIV class="normal"> ... </DIV><TABLE></TABLE><DIV class="normal"> ... </DIV></BODY> */
+BODY, .normal, TD, TH {
+ font-family: helvetica;
+ font-size: 14pt;
+}
+/* Same for doxygen code fragments: */
+DIV.fragment { font-size: 14pt }
+CODE { font-size: 14pt }
+
+/* At least try to make it look the same as on IE */
+HR {
+ line-height: 1.86ex; /* 2 times font-size 13/font-size 14 */
+}
+
+.code, .example-code, .nld, .output, .example-output {
+ font-family: courier;
+ font-size: 14pt;
+}
Index: src/libcwd/example-project/.cvsignore
diff -u src/libcwd/example-project/.cvsi...
[truncated message content] |