|
From: Carlo W. <li...@us...> - 2002-02-14 23:32:25
|
CVSROOT : /cvsroot/libcw
Module : src
Commit time: 2002-01-14 23:32:23 UTC
Modified files:
libcwd/documentation/tutorial/faq.m4
libcwd/documentation/tutorial/tut1.m4
libcwd/documentation/tutorial/tut2.m4
libcwd/documentation/tutorial/tut5.in
Log message:
Errors (using '<' instead of <) in tutorial.
---------------------- diff included ----------------------
Index: src/libcwd/documentation/tutorial/faq.m4
diff -u src/libcwd/documentation/tutorial/faq.m4:1.4 src/libcwd/documentation/tutorial/faq.m4:1.5
--- src/libcwd/documentation/tutorial/faq.m4:1.4 Thu Feb 7 20:03:47 2002
+++ src/libcwd/documentation/tutorial/faq.m4 Thu Feb 14 15:32:12 2002
@@ -295,7 +295,7 @@
Dout(dc::notice, "An error occured");
exit(0);
- cerr << "We should never reach this\n";
+ cerr << "We should never reach this\n";
</PRE>
<P>If the complete line <SPAN class="code">Dout(dc::notice, "An error occured");</SPAN>,
@@ -309,7 +309,7 @@
if (error)
Dout(dc::notice, "An error occured");
else
- cout << "Everything is ok\n";
+ cout << "Everything is ok\n";
</PRE>
<P>because after macro expansion that would become:</P>
@@ -318,8 +318,8 @@
if (error)
;
;
- else // <-- syntax error
- cout << "Everything is ok\n";
+ else // <-- syntax error
+ cout << "Everything is ok\n";
</PRE>
<A name="LibcwDout"></A>
@@ -341,7 +341,7 @@
<PRE class="code">
if (debug object and any of the debug channels are turned on)
- the_ostream << your message;
+ the_ostream << your message;
</PRE>
<P>and so, "your message" is <EM>not</EM> evaluated when it isn't also
Index: src/libcwd/documentation/tutorial/tut1.m4
diff -u src/libcwd/documentation/tutorial/tut1.m4:1.4 src/libcwd/documentation/tutorial/tut1.m4:1.5
--- src/libcwd/documentation/tutorial/tut1.m4:1.4 Fri Feb 8 13:32:13 2002
+++ src/libcwd/documentation/tutorial/tut1.m4 Thu Feb 14 15:32:12 2002
@@ -114,7 +114,7 @@
<CODE>dc::notice</CODE> is turned on.</P>
<P>Output is written as if everything in the second field of the macro <CODE>Dout</CODE> is
-written to an ostream; It is "equivalent" with: <CODE>cerr << "Hello World" << '\n';</CODE></P>
+written to an ostream; It is "equivalent" with: <CODE>cerr << "Hello World" << '\n';</CODE></P>
<DIV class="faq-frame"><H4>FAQ</H4><UL class="faq">
<LI><A HREF="faq.html#macros">Why is <CODE>Dout</CODE> a macro and not a template?</A></LI>
Index: src/libcwd/documentation/tutorial/tut2.m4
diff -u src/libcwd/documentation/tutorial/tut2.m4:1.3 src/libcwd/documentation/tutorial/tut2.m4:1.4
--- src/libcwd/documentation/tutorial/tut2.m4:1.3 Thu Feb 7 20:03:47 2002
+++ src/libcwd/documentation/tutorial/tut2.m4 Thu Feb 14 15:32:12 2002
@@ -41,19 +41,19 @@
#define ForAllDebugObjects(STATEMENT)
#define LibcwDebug(dc_namespace, x)
#define LibcwDout(a, b, c, d)
-#define LibcwDoutFatal(a, b, c, d) do { ::std::cerr << d << ::std::endl; ::std::exit(254); } while(1)
+#define LibcwDoutFatal(a, b, c, d) do { ::std::cerr << d << ::std::endl; ::std::exit(254); } while(1)
#define NEW(x) new x
#else // CWDEBUG
#ifndef DEBUGCHANNELS
-// This must be defined before <libcw/debug.h> is included and must be the
+// This must be defined before <libcw/debug.h> is included and must be the
// name of the namespace containing your `dc' namespace (see below).
// You can use any namespace(s) you like, except existing namespaces
// (like ::, ::std and ::libcw).
#define DEBUGCHANNELS ::myproject::debug::channels
#endif
-#include <libcw/debug.h>
+#include <libcw/debug.h>
namespace myproject {
namespace debug {
Index: src/libcwd/documentation/tutorial/tut5.in
diff -u src/libcwd/documentation/tutorial/tut5.in:1.2 src/libcwd/documentation/tutorial/tut5.in:1.3
--- src/libcwd/documentation/tutorial/tut5.in:1.2 Sat Dec 29 20:17:49 2001
+++ src/libcwd/documentation/tutorial/tut5.in Thu Feb 14 15:32:13 2002
@@ -552,12 +552,12 @@
Debug( libcw_do.on() );
ForAllDebugChannels( if (!debugChannel.is_on()) debugChannel.on() );
- Debug( libcw_do.<SPAN class="highlight">set_margin</SPAN>("<-- margin -->") );
- Debug( libcw_do.<SPAN class="highlight">set_marker</SPAN>("<-- marker -->") );
+ Debug( libcw_do.<SPAN class="highlight">set_margin</SPAN>("<-- margin -->") );
+ Debug( libcw_do.<SPAN class="highlight">set_marker</SPAN>("<-- marker -->") );
Dout( dc::cat|dc::mouse, "The cat chases the mouse." );
Dout( dc::mouse|dc::elephant, "The mouse chases the elephant." );
Dout( dc::notice|<SPAN class="highlight">nolabel_cf</SPAN>, "Setting indentation to 8 spaces:" );
- Dout( dc::notice|<SPAN class="highlight">blank_label_cf</SPAN>, "<------>" );
+ Dout( dc::notice|<SPAN class="highlight">blank_label_cf</SPAN>, "<------>" );
Debug( libcw_do.<SPAN class="highlight">set_indent(8)</SPAN> );
Dout( dc::cat, "The cat sleeps." );
Dout( dc::elephant, "The elephant looks around:" );
----------------------- End of diff -----------------------
|