|
From: Carlo W. <li...@us...> - 2001-12-27 05:13:32
|
CVSROOT : /cvsroot/libcw
Module : src
Branch tags: branch-threading
Commit time: 2001-11-27 05:13:32 UTC
Modified files:
Tag: branch-threading
libcwd/documentation/Makefile libcwd/documentation/custom_do.dox
libcwd/documentation/deallocation_pointer_validation.dox
libcwd/documentation/debug_channels.dox
libcwd/documentation/html.header
libcwd/documentation/location.dox libcwd/documentation/magic.dox
libcwd/documentation/mainpage.dox libcwd/documentation/nested.dox
libcwd/documentation/why_macro.dox
libcwd/documentation/scripts/detect_browser.js
libcwd/documentation/scripts/load_style_sheets.js
Added files:
Tag: branch-threading
libcwd/documentation/definitions.m4
libcwd/documentation/images/libcwd_logo.png
Log message:
Bug fixes and improvements, work in progress.
---------------------- diff included ----------------------
Index: src/libcwd/documentation/Makefile
diff -u src/libcwd/documentation/Makefile:1.1.2.2 src/libcwd/documentation/Makefile:1.1.2.3
--- src/libcwd/documentation/Makefile:1.1.2.2 Fri Dec 7 18:06:23 2001
+++ src/libcwd/documentation/Makefile Wed Dec 26 21:13:21 2001
@@ -2,9 +2,9 @@
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
+.PHONY: html external styles tutorial
-html: external
+html: external styles tutorial
rm -rf html
doxygen doxygen.config
mv html/preparation.html html/preparation.tmp
@@ -28,3 +28,10 @@
external/debug.cc: ../example-project/debug.cc
cp ../example-project/debug.cc external/debug.cc
+
+styles:
+ $(MAKE) -C styles
+
+tutorial:
+ $(MAKE) -C tutorial
+
Index: src/libcwd/documentation/custom_do.dox
diff -u src/libcwd/documentation/custom_do.dox:1.1.2.4 src/libcwd/documentation/custom_do.dox:1.1.2.5
--- src/libcwd/documentation/custom_do.dox:1.1.2.4 Fri Dec 7 18:06:23 2001
+++ src/libcwd/documentation/custom_do.dox Wed Dec 26 21:13:21 2001
@@ -6,8 +6,8 @@
\page page_custom_do
\ingroup chapter_custom_do
-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.
+Each %debug object is associated with one <code>ostream</code>.
+The default %debug output macros \ref Dout and \ref 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
\ref LibcwDout and \ref LibcwDoutFatal.
Index: src/libcwd/documentation/deallocation_pointer_validation.dox
diff -u src/libcwd/documentation/deallocation_pointer_validation.dox:1.1.2.3 src/libcwd/documentation/deallocation_pointer_validation.dox:1.1.2.4
--- src/libcwd/documentation/deallocation_pointer_validation.dox:1.1.2.3 Wed Dec 5 22:01:16 2001
+++ src/libcwd/documentation/deallocation_pointer_validation.dox Wed Dec 26 21:13:21 2001
@@ -20,20 +20,20 @@
<td BGCOLOR="#a98061"><font COLOR="#ffffff">Allocation function</font></td>
</tr>
<tr>
-<td><span class="code">delete</span></td>
-<td><span class="code">new</span></td>
+<td><CODE>delete</CODE></td>
+<td><CODE>new</CODE></td>
</tr>
<tr>
-<td><span class="code">delete []</span></td>
-<td><span class="code">new []</span></td>
+<td><CODE>delete []</CODE></td>
+<td><CODE>new []</CODE></td>
</tr>
<tr>
-<td><span class="code">free()</span></td>
-<td><span class="code">malloc()</span>, <span class="code">calloc()</span> or <span class="code">realloc()</span></td>
+<td><CODE>free()</CODE></td>
+<td><CODE>malloc()</CODE>, <CODE>calloc()</CODE> or <CODE>realloc()</CODE></td>
</tr>
<tr>
-<td><span class="code">realloc()</span></td>
-<td><span class="code">malloc()</span>, <span class="code">calloc()</span> or <span class="code">realloc()</span></td>
+<td><CODE>realloc()</CODE></td>
+<td><CODE>malloc()</CODE>, <CODE>calloc()</CODE> or <CODE>realloc()</CODE></td>
</tr>
</table>
</center>
Index: src/libcwd/documentation/debug_channels.dox
diff -u src/libcwd/documentation/debug_channels.dox:1.1.2.3 src/libcwd/documentation/debug_channels.dox:1.1.2.4
--- src/libcwd/documentation/debug_channels.dox:1.1.2.3 Fri Dec 7 18:06:23 2001
+++ src/libcwd/documentation/debug_channels.dox Wed Dec 26 21:13:21 2001
@@ -45,7 +45,7 @@
gives as result
-\exampleoutput <PRE>
+\exampleoutput <PRE class="example-output">
NOTICE: Libcw is a great library</PRE>
\endexampleoutput
@@ -67,13 +67,13 @@
#endif
Dout(dc::hello, "Hello World!");
-Dout(dc::kernel|dc::io, "This is written when either the <i>kernel</i>"
-"or <i>io</i> channel is turned on.");
+Dout(dc::kernel|dc::io, "This is written when either the dc::kernel "
+ "or dc::io channel is turned on.");
\endcode
gives as result
-\exampleoutput <PRE>
+\exampleoutput <PRE class="example-output">
HELLO : Hello World!
KERNEL: This is written when either the kernel or io channel is turned on.</PRE>
\endexampleoutput
Index: src/libcwd/documentation/definitions.m4
diff -u /dev/null src/libcwd/documentation/definitions.m4:1.1.2.1
--- /dev/null Wed Dec 26 21:13:32 2001
+++ src/libcwd/documentation/definitions.m4 Wed Dec 26 21:13:21 2001
@@ -0,0 +1,49 @@
+changequote([[,]])dnl
+define(__HTMLHEADER, [[<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML LANG="en-us">
+<HEAD>
+<META name="Author" content="Carlo Wood">
+<META http-equiv="content-type" content="text/html; charset=iso-8859-1">
+<META http-equiv="content-script-type" content="text/javascript">
+<TITLE>libcwd: The C++ Debugging Support Library</TITLE>
+<SCRIPT SRC="../scripts/detect_browser.js"></SCRIPT>
+ifdef([[__DOXYGEN]], [[<SCRIPT>need_style_doxygen=1</SCRIPT>
+]])dnl
+ifdef([[__TUTORIAL]], [[<SCRIPT>need_style_tutorial=1</SCRIPT>
+]])dnl
+ifdef([[__CWTAG]], [[<SCRIPT>need_style_tag_cw=1</SCRIPT>
+]])dnl
+<SCRIPT SRC="../scripts/load_style_sheets.js"></SCRIPT>
+</HEAD>
+<BODY>]])dnl
+dnl
+define(__HTMLFOOTER, [[
+</BODY>
+</HTML>]])
+dnl
+define(__PAGEHEADER, [[
+<TABLE class="header" height=64 width="100%" cellpadding=0 cellspacing=0 border=0>
+ <TR>
+ <TD width=237 valign=top>
+ <IMG valign=top src="../images/libcwd_logo.png" alt="" align=left border=0>
+ </TD>
+ <TD width="100%" align=center>
+ <DIV class="header-title">
+ The C++ Debugging Support Library
+ </DIV>
+ <DIV class="header-copyright">
+ By Carlo Wood, ©1999 - 2001.
+ </DIV>
+ </TD>
+ </TR>
+ <SCRIPT>if (is_mozilla4) document.write("<TR><TD colspan=2 height=19 valign=bottom><HR SIZE=2 NOSHADE></TD></TR>");</SCRIPT>
+</TABLE>]])dnl
+dnl
+define(__PAGEFOOTER, [[
+<ADDRESS>Copyright © 2001 Carlo Wood. All rights reserved.</ADDRESS>]])dnl
+dnl
+define(__PAGESTART, [[
+<DIV class="body">]])dnl
+dnl
+define(__PAGEEND, [[
+</DIV>]])dnl
Index: src/libcwd/documentation/html.header
diff -u src/libcwd/documentation/html.header:1.1.2.2 src/libcwd/documentation/html.header:1.1.2.3
--- src/libcwd/documentation/html.header:1.1.2.2 Wed Dec 5 22:01:16 2001
+++ src/libcwd/documentation/html.header Wed Dec 26 21:13:21 2001
@@ -3,12 +3,14 @@
<HEAD>
<META name="Author" content="Carlo Wood">
-<META name="description" content="Object Oriented Debug Output Facility in C++">
-<META name="keywords" content="libcwd, debug output, debug facility, debug channel, object orientation, OO, C++, nested debug output">
+<META name="description" content="C++ debugging support library with ostream debug output">
+<META name="keywords" content="libcwd, debug output, debug facility, debug channel, object orientation, OO, C++, nested debug output, ostream, memory allocation, debugging, source file and line number">
<META http-equiv="content-type" content="text/html; charset=iso-8859-1">
-<TITLE>libcwd: An Object Oriented C++ debugging library</TITLE>
-<SCRIPT TYPE="text/javascript" SRC="../scripts/detect_browser.js"></SCRIPT>
-<SCRIPT TYPE="text/javascript" SRC="../scripts/load_style_sheets.js"></SCRIPT>
+<META http-equiv="content-script-type" content="text/javascript">
+<TITLE>libcwd: The C++ Debugging Library - Reference Manual</TITLE>
+<SCRIPT src="../scripts/detect_browser.js"></SCRIPT>
+<SCRIPT>need_style_doxygen=1</SCRIPT>
+<SCRIPT src="../scripts/load_style_sheets.js"></SCRIPT>
</HEAD>
<BODY>
Index: src/libcwd/documentation/images/libcwd_logo.png
Index: src/libcwd/documentation/location.dox
diff -u src/libcwd/documentation/location.dox:1.1.2.4 src/libcwd/documentation/location.dox:1.1.2.5
--- src/libcwd/documentation/location.dox:1.1.2.4 Fri Dec 7 18:06:23 2001
+++ src/libcwd/documentation/location.dox Wed Dec 26 21:13:21 2001
@@ -27,7 +27,7 @@
For example,
-\exampleoutput <PRE>
+\exampleoutput <PRE class="example-output">
MALLOC : operator new (size = 4) = <unfinished>
BFD : 0x804bc9b is at (deb.cc:179)
MALLOC : <continued> 0x8137220</PRE>
Index: src/libcwd/documentation/magic.dox
diff -u src/libcwd/documentation/magic.dox:1.1.2.2 src/libcwd/documentation/magic.dox:1.1.2.3
--- src/libcwd/documentation/magic.dox:1.1.2.2 Wed Dec 5 22:01:16 2001
+++ src/libcwd/documentation/magic.dox Wed Dec 26 21:13:21 2001
@@ -50,7 +50,7 @@
results in output like
-\exampleoutput <PRE>
+\exampleoutput <PRE class="example-output">
MALLOC : operator new[] (size = 16) = 0x8116460
MALLOC : Allocated memory: 16 bytes in 1 blocks.
Index: src/libcwd/documentation/mainpage.dox
diff -u src/libcwd/documentation/mainpage.dox:1.1.2.5 src/libcwd/documentation/mainpage.dox:1.1.2.6
--- src/libcwd/documentation/mainpage.dox:1.1.2.5 Wed Dec 5 22:01:16 2001
+++ src/libcwd/documentation/mainpage.dox Wed Dec 26 21:13:21 2001
@@ -14,13 +14,15 @@
\li \ref downloading
\li \ref preparation
+\htmlonly
+<li> <a href="../tutorial/index.html">Tutorial</a>
+\endhtmlonly
\li \ref reference
\section output_example Example output
\htmlonly
-<CODE>
-<PRE>
+<PRE class="example-output">
MALLOC : malloc(72) = <unfinished>
BFD : address 0x402ad017 corresponds to dl-open.c:114
MALLOC : <continued> 0x81c1330
@@ -44,7 +46,6 @@
malloc 0x81c00a0 dlerror.c:108 <unknown type>; (sz = 16)
NOTICE : Finished
</PRE>
-</CODE>
\endhtmlonly
*/
Index: src/libcwd/documentation/nested.dox
diff -u src/libcwd/documentation/nested.dox:1.1.2.4 src/libcwd/documentation/nested.dox:1.1.2.5
--- src/libcwd/documentation/nested.dox:1.1.2.4 Wed Dec 5 22:01:16 2001
+++ src/libcwd/documentation/nested.dox Wed Dec 26 21:13:21 2001
@@ -31,7 +31,7 @@
This code would start a new debug message before the previous debug message is finished.
Libcwd detects this and will output:
-\exampleoutput <PRE>
+\exampleoutput <PRE class="example-output">
NOTICE: Entering foobar()
NOTICE: Leaving foobar()
KERNEL: The value of foobar() = 2, aint that nice?</PRE>
@@ -53,13 +53,13 @@
If generate_tables() would not print debug messages, then the output will look like:
-\exampleoutput <PRE>
+\exampleoutput <PRE class="example-output">
KERNEL: Generating tables... done</PRE>
\endexampleoutput
When it does generated debug output, then the <unfinished> and <continued> labels are printed also:
-\exampleoutput <PRE>
+\exampleoutput <PRE class="example-output">
KERNEL: Generating tables... <unfinished>
NOTICE: Inside generate_tables()
KERNEL: <continued> done</PRE>
@@ -79,13 +79,13 @@
When generate_table(i) doesn't print debug messages, then the output will look like:
-\exampleoutput <PRE>
+\exampleoutput <PRE class="example-output">
NOTICE: Generating tables......... done</PRE>
\endexampleoutput
When it does generate debug output, then each dot would be surrounded by a <continued> .<unfinished> :
-\exampleoutput <PRE>
+\exampleoutput <PRE class="example-output">
NOTICE: Generating tables.<unfinished>
TABLE : Inside generate_table(0)
NOTICE: <continued> .<unfinished></PRE>
Index: src/libcwd/documentation/scripts/detect_browser.js
diff -u src/libcwd/documentation/scripts/detect_browser.js:1.1.2.1 src/libcwd/documentation/scripts/detect_browser.js:1.1.2.2
--- src/libcwd/documentation/scripts/detect_browser.js:1.1.2.1 Fri Oct 26 15:58:03 2001
+++ src/libcwd/documentation/scripts/detect_browser.js Wed Dec 26 21:13:22 2001
@@ -1,70 +1,65 @@
// From http://developer.netscape.com/docs/examples/javascript/browser_type.html
-var a=navigator.userAgent.toLowerCase();
-var j=parseInt(navigator.appVersion);
-var n=parseFloat(navigator.appVersion);
-var is_nav=a.indexOf('mozilla')!=-1&&a.indexOf('spoofer')==-1&&a.indexOf('compatible')==-1&&a.indexOf('opera')==-1&&a.indexOf('webtv')==-1;
-var is_nav2=is_nav&&j==2;
-var is_nav3=is_nav&&j==3;
-var is_nav4=is_nav&&j==4;
-var is_nav4up=is_nav&&j>=4;
-var is_navonly=is_nav&&(a.indexOf(";nav")!=-1||a.indexOf("; nav")!=-1);
-var is_nav5=is_nav&&j==5;
-var is_nav5up=is_nav&&j>=5;
-var is_ie=a.indexOf("msie")!=-1;
-var is_ie3=is_ie&&(j<4);
-var is_ie4=is_ie&&j==4&&a.indexOf("msie 5.0")==-1;
-var is_ie4up=is_ie&&j>=4;
-var is_ie5=is_ie&&j==4&&a.indexOf("msie 5.0")!=-1;
-var is_ie5up=is_ie&&!is_ie3&&!is_ie4;
-var is_aol=a.indexOf("aol")!=-1;
-var is_aol3=is_aol&&is_ie3;
-var is_aol4=is_aol&&is_ie4;
-var is_opera=a.indexOf("opera")!=-1;
-var is_webtv=a.indexOf("webtv")!=-1;
-var is_js;
-if(is_nav2||is_ie3)is_js=1.0
-else if(is_nav3||is_opera)is_js=1.1
-else if((is_nav4&&n<=4.05)||is_ie4)is_js=1.2
-else if((is_nav4&&n>4.05)||is_ie5)is_js=1.3
-else if(is_nav5)is_js=1.4
-else if(is_nav&&j>5)is_js=1.4
-else if(is_ie&&j>5)is_js=1.3
-else is_js=0.0;
-var is_win=a.indexOf("win")!=-1||a.indexOf("16bit")!=-1;
-var is_win95=a.indexOf("win95")!=-1||a.indexOf("windows 95")!=-1;
-var is_win16=a.indexOf("win16")!=-1||a.indexOf("16bit")!=-1||a.indexOf("windows 3.1")!=-1||a.indexOf("windows 16-bit")!=-1;
-var is_win31=a.indexOf("windows 3.1")!=-1||a.indexOf("win16")!=-1||a.indexOf("windows 16-bit")!=-1;
-var is_win98=a.indexOf("win98")!=-1||a.indexOf("windows 98")!=-1;
-var is_winnt=a.indexOf("winnt")!=-1||a.indexOf("windows nt")!=-1;
-var is_win32=is_win95||is_winnt||is_win98||(j>=4&&navigator.platform=="Win32")||a.indexOf("win32")!=-1||a.indexOf("32bit")!=-1;
-var is_os2=a.indexOf("os/2")!=-1||navigator.appVersion.indexOf("OS/2")!=-1||a.indexOf("ibm-webexplorer")!=-1;
-var is_mac=a.indexOf("mac")!=-1;
-var is_mac68k=is_mac&&(a.indexOf("68k")!=-1||a.indexOf("68000")!=-1);
-var is_macppc=is_mac&&(a.indexOf("ppc")!=-1||a.indexOf("powerpc")!=-1);
-var is_sun=a.indexOf("sunos")!=-1;
-var is_sun4=a.indexOf("sunos 4")!=-1;
-var is_sun5=a.indexOf("sunos 5")!=-1;
-var is_suni86=is_sun&&a.indexOf("i86")!=-1;
-var is_irix=a.indexOf("irix")!=-1;
-var is_irix5=a.indexOf("irix 5")!=-1;
-var is_irix6=a.indexOf("irix 6")!=-1||a.indexOf("irix6")!=-1;
-var is_hpux=a.indexOf("hp-ux")!=-1;
-var is_hpux9=is_hpux&&a.indexOf("09.")!=-1;
-var is_hpux10=is_hpux&&a.indexOf("10.")!=-1;
-var is_aix=a.indexOf("aix")!=-1;
-var is_aix1=a.indexOf("aix 1")!=-1;
-var is_aix2=a.indexOf("aix 2")!=-1;
-var is_aix3=a.indexOf("aix 3")!=-1;
-var is_aix4=a.indexOf("aix 4")!=-1;
-var is_linux=a.indexOf("inux")!=-1;
-var is_sco=a.indexOf("sco")!=-1||a.indexOf("unix_sv")!=-1;
-var is_unixware=a.indexOf("unix_system_v")!=-1;
-var is_mpras=a.indexOf("ncr")!=-1;
-var is_reliant=a.indexOf("reliantunix")!=-1;
-var is_dec=a.indexOf("dec")!=-1||a.indexOf("osf1")!=-1||a.indexOf("dec_alpha")!=-1||a.indexOf("alphaserver")!=-1||a.indexOf("ultrix")!=-1||a.indexOf("alphastation")!=-1;
-var is_sinix=a.indexOf("sinix")!=-1;
-var is_freebsd=a.indexOf("freebsd")!=-1;
-var is_bsd=a.indexOf("bsd")!=-1;
-var is_unix=a.indexOf("x11")!=-1||is_sun||is_irix||is_hpux||is_sco||is_unixware||is_mpras||is_reliant||is_dec||is_sinix||is_aix||is_linux||is_bsd||is_freebsd;
-var is_vms=a.indexOf("vax")!=-1||a.indexOf("openvms")!=-1;
+
+// convert all characters to lowercase to simplify testing
+var agt=navigator.userAgent.toLowerCase();
+
+// *** BROWSER VERSION ***
+// Note: On IE5, these return 4, so use is_ie5up to detect IE5.
+var is_major = parseInt(navigator.appVersion);
+var is_minor = parseFloat(navigator.appVersion);
+
+// Note: Opera and WebTV spoof Mozilla. We do strict client detection.
+var is_mozilla = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
+ && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
+ && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
+var is_mozilla2 = (is_mozilla && (is_major == 2));
+var is_mozilla3 = (is_mozilla && (is_major == 3));
+var is_mozilla4 = (is_mozilla && (is_major == 4));
+var is_mozilla4up = (is_mozilla && (is_major >= 4));
+var is_mozilla5 = (is_mozilla && (is_major == 5));
+var is_mozilla5up = (is_mozilla && (is_major >= 5));
+var is_gecko = (agt.indexOf('gecko') != -1);
+var is_netscape6 = (is_mozilla5 && (agt.indexOf('netscape6')!=-1));
+
+var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
+var is_ie3 = (is_ie && (is_major < 4));
+var is_ie4 = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
+var is_ie4up = (is_ie && (is_major >= 4));
+var is_ie5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
+var is_ie5_5 = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
+var is_ie5up = (is_ie && !is_ie3 && !is_ie4);
+var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
+var is_ie6 = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
+var is_ie6up = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);
+
+// KNOWN BUG: On AOL4, returns false if IE3 is embedded browser
+// or if this is the first browser window opened. Thus the
+// variables is_aol, is_aol3, and is_aol4 aren't 100% reliable.
+var is_aol = (agt.indexOf("aol") != -1);
+var is_aol3 = (is_aol && is_ie3);
+var is_aol4 = (is_aol && is_ie4);
+var is_aol5 = (agt.indexOf("aol 5") != -1);
+var is_aol6 = (agt.indexOf("aol 6") != -1);
+
+var is_opera = (agt.indexOf("opera") != -1);
+var is_opera2 = (agt.indexOf("opera 2") != -1 || agt.indexOf("opera/2") != -1);
+var is_opera3 = (agt.indexOf("opera 3") != -1 || agt.indexOf("opera/3") != -1);
+var is_opera4 = (agt.indexOf("opera 4") != -1 || agt.indexOf("opera/4") != -1);
+var is_opera5 = (agt.indexOf("opera 5") != -1 || agt.indexOf("opera/5") != -1);
+var is_opera5up = (is_opera && !is_opera2 && !is_opera3 && !is_opera4);
+
+var is_webtv = (agt.indexOf("webtv") != -1);
+
+var is_TVNavigator = ((agt.indexOf("navio") != -1) || (agt.indexOf("navio_aoltv") != -1));
+var is_AOLTV = is_TVNavigator;
+
+var is_hotjava = (agt.indexOf("hotjava") != -1);
+var is_hotjava3 = (is_hotjava && (is_major == 3));
+var is_hotjava3up = (is_hotjava && (is_major >= 3));
+
+var is_konqueror = (navigator.appName.indexOf("Konqueror") != -1);
+
var need_style_tag_cw = 0;
+var need_style_tutorial = 0;
+var need_style_doxygen = 0;
+
Index: src/libcwd/documentation/scripts/load_style_sheets.js
diff -u src/libcwd/documentation/scripts/load_style_sheets.js:1.1.2.3 src/libcwd/documentation/scripts/load_style_sheets.js:1.1.2.4
--- src/libcwd/documentation/scripts/load_style_sheets.js:1.1.2.3 Sun Dec 9 11:29:55 2001
+++ src/libcwd/documentation/scripts/load_style_sheets.js Wed Dec 26 21:13:22 2001
@@ -1,5 +1,7 @@
with (document)
{
+ var styles_path;
+ var rootpath;
var rootpos = location.href.lastIndexOf("libcw.sourceforge.net");
if (rootpos != -1)
rootpath = location.href.substring(0,rootpos) + "libcw.sourceforge.net/";
@@ -8,19 +10,52 @@
rootpos = location.pathname.lastIndexOf("/html/");
if (rootpos != -1)
rootpath = location.pathname.substring(0,rootpos) + "/";
+ else
+ {
+ rootpos = location.pathname.lastIndexOf("/tutorial/");
+ if (rootpos != -1)
+ rootpath = location.pathname.substring(0,rootpos) + "/";
+ else
+ {
+ rootpos = location.pathname.lastIndexOf("/documentation/");
+ if (rootpos != -1)
+ rootpath = location.pathname.substring(0,rootpos) + "/documentation/";
+ }
+ }
}
- write("<LINK REL=StyleSheet HREF=\"" + rootpath + "styles/main.css\" TYPE=\"text/css\">");
- if (need_style_tag_cw == 1)
- write("<LINK REL=StyleSheet HREF=\"" + rootpath + "styles/tag-cw.css\" TYPE=\"text/css\">");
- if (is_nav)
+
+ if (is_opera)
+ styles_path = rootpath + "styles/opera/";
+ else
{
- if (is_nav5up)
- write("<LINK REL=StyleSheet HREF=\"" + rootpath + "styles/ns5/main.css\" TYPE=\"text/css\">");
+ if (is_mozilla4)
+ styles_path = rootpath + "styles/netscape4/";
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\">");
+ if (is_netscape6)
+ styles_path = rootpath + "styles/netscape6/";
+ else
+ {
+ if (is_konqueror)
+ styles_path = rootpath + "styles/konqueror/";
+ else
+ {
+ if (is_ie)
+ styles_path = rootpath + "styles/ie/";
+ else if (is_mozilla5up || is_gecko)
+ styles_path = rootpath + "styles/mozilla/";
+ else
+ styles_path = rootpath + "styles/ie/";
+ }
+ }
}
}
+
+ write("<LINK REL=StyleSheet HREF=\"" + styles_path + "main.css\" TYPE=\"text/css\">");
+ if (need_style_tutorial == 1)
+ write("<LINK REL=StyleSheet HREF=\"" + styles_path + "tutorial.css\" TYPE=\"text/css\">");
+ if (need_style_doxygen == 1)
+ write("<LINK REL=StyleSheet HREF=\"" + styles_path + "doxygen.css\" TYPE=\"text/css\">");
+ if (need_style_tag_cw == 1)
+ write("<LINK REL=StyleSheet HREF=\"" + styles_path + "tag-cw.css\" TYPE=\"text/css\">");
}
Index: src/libcwd/documentation/why_macro.dox
diff -u src/libcwd/documentation/why_macro.dox:1.1.2.2 src/libcwd/documentation/why_macro.dox:1.1.2.3
--- src/libcwd/documentation/why_macro.dox:1.1.2.2 Fri Dec 7 18:06:23 2001
+++ src/libcwd/documentation/why_macro.dox Wed Dec 26 21:13:21 2001
@@ -20,12 +20,12 @@
</OL>
Points 1, 2 and 3 are the most important reasons that lead to the decision to use a macro.
-Please note that the author of %libcw used the alternative for <B>two years</B> before finally deciding to
+Please note that the author of %libcw used the alternative for <B>two years</B> before finally deciding
to <B>rewrite</B> the debug facility, being convinced that it was better to do it the way it is done now.
While points 4 and 5 are trivial, the first three advantages might need some explanation:
1. Usually a developer won't use compiler optimization because that makes debugging harder.
-In most cases the debug code will be compiled and used <em>without</em> compiler optimization; including
+In most cases the debug code will be compiled and used <em>without</em> compiler optimization; implying
the fact that no inlining is done.
Moreover, we expect to use a lot of inserter operators and without
optimization, each of these will be called.
@@ -50,7 +50,7 @@
on or off <B>before</B> calling the <CODE>%operator<<()</CODE>'s.
After all, such an operator call can use a lot of CPU time for arbitrary objects.
-We can not pass <CODE>"i = " << i << "; j = " << j << "; s = " << s << std::endl</CODE>
+We cannot pass <CODE>"i = " << i << "; j = " << j << "; s = " << s << std::endl</CODE>
to an inline function without causing all <CODE>%operator<<</CODE>
functions to be called.
The only way, not using a macro, to achieve that no <CODE>%operator<<</CODE> is called is by not calling them
@@ -69,7 +69,7 @@
}
\endcode
-Nevertheless, even with inlining (needing often the maximium optimization), most compilers would turn that into:
+Nevertheless, even with inlining (often requiring the highest level of optimization), most compilers would turn that into:
\code
if (on)
@@ -120,3 +120,4 @@
\endcode
*/
+
----------------------- End of diff -----------------------
|