|
From: Carlo W. <li...@us...> - 2002-02-11 03:00:36
|
CVSROOT : /cvsroot/libcw
Module : src
Commit time: 2002-01-11 03:00:35 UTC
Modified files:
libcwd/NEWS libcwd/acconfig.h
libcwd/include/libcw/macro_AllocTag.h
libcwd/include/libcw/macro_Libcwd_macros.h
Log message:
make full-test now runs without errors.
Update of NEWS
---------------------- diff included ----------------------
Index: src/libcwd/NEWS
diff -u src/libcwd/NEWS:1.67 src/libcwd/NEWS:1.68
--- src/libcwd/NEWS:1.67 Fri Feb 8 14:29:29 2002
+++ src/libcwd/NEWS Sun Feb 10 19:00:24 2002
@@ -27,33 +27,31 @@
IMPORTANT: 'channel_ct const' -> 'channel_ct'.
Debug channels should no longer be declared constant.
- Declarations like
- libcw::debug::channel_ct const my_channel("FOO");
- will have to be changed to
- libcw::debug::selector_ct my_channel("FOO");
- removing the `const'.
+ [ "libcw::debug::channel_ct const my_channel("FOO");" -->
+ "libcw::debug::selector_ct my_channel("FOO");" ]
`long memblks()' has been renamed to `unsigned long mem_blocks()'.
+ [ "memblks()" --> "mem_blocks()" ]
- In debug_ct, set_margin, get_margin, set_marker and get_marker are
- a bit slow for heavy swapping of the margin and marker (std::string
- is 'slow'); therefore (using internal allocations, which is not
- possible with std::string (see bug fixes below)) public access
- to members debug_ct::margin and debug_ct::marker is now granted,
- providing the following methods of the returned object: size(),
- c_str() (the terminating zero is already there, this just returns
- an internal pointer), reserve(), capacity(), append(), prepend()
- and assign() - all with meanings borrowed from std::string.
- For example, when capacity() returns a value larger or equal to
- the length of a string that would result from a call to append(),
- then calling append is garanteed not to invalidate the pointer
- returned by c_str(). The default capacity can be set with `reserve'.
- append/prepend/assign accept both a std::string reference or a
- char*/size_t pair.
- Finally, the following methods are added to debug_ct directly:
- `push_margin', `pop_margin', `push_marker' and `pop_marker'.
+ The margin and marker are no longer using std::string, which is
+ a bit slow. Access to the margin and marker is now granted through
+ debug_ct::margin() and debug_ct::marker(). The returned objects
+ provide the following methods: size(), c_str() (this just returns
+ an internal pointer, the termination zero is already there),
+ reserve(), capacity(), append(), prepend() and assign() - all with
+ their meanings borrowed from std::string. For example, when
+ capacity() returns a value larger or equal to the length of a string
+ that would result from a call to append(), then calling append is
+ garanteed not to invalidate the pointer returned by c_str(). The
+ default capacity can be set with `reserve'. append/prepend/assign
+ accept both a std::string reference or a char*/size_t pair.
+ Finally, the following methods are added to debug_ct:
+ `push_margin()', `pop_margin()', `push_marker()' and `pop_marker()'.
These functions can be used to quickly store and restore the
respective formatting strings.
+ [ "Debug( libcw_do.set_margin(std::string(buf, len)) );" -->
+ "Debug( libcw_do.margin().assign(buf, len) );" ]
+
A debug function for internal use (by the maintainers):
`debugdebugcheckpoint()' has been removed. If you need a user
@@ -63,6 +61,7 @@
CWASSERT was renamed to LIBCWD_ASSERT; Note that all macros that start
with LIBCWD_ should NOT be used by the user, they are for internal use
by libcwd.
+ [ "CWASSERT( i == 1 );" --> "assert( i == 1);" ]
debug_ct::get_os() has been removed. Use cwprint or cwprint_using.
Reason: the temporary stringstream that was returned was only valid
Index: src/libcwd/acconfig.h
diff -u src/libcwd/acconfig.h:1.10 src/libcwd/acconfig.h:1.11
--- src/libcwd/acconfig.h:1.10 Fri Jan 25 18:06:32 2002
+++ src/libcwd/acconfig.h Sun Feb 10 19:00:24 2002
@@ -7,9 +7,6 @@
#ifndef LIBCW_CONFIG_H
#define LIBCW_CONFIG_H
@TOP@
-// Defined when RETSIGTYPE is `int'.
-#undef CW_RETSIGTYPE_IS_INT
-
// Full path to the `ps' executable.
#undef CW_PATH_PROG_PS
Index: src/libcwd/include/libcw/macro_AllocTag.h
diff -u src/libcwd/include/libcw/macro_AllocTag.h:1.6 src/libcwd/include/libcw/macro_AllocTag.h:1.7
--- src/libcwd/include/libcw/macro_AllocTag.h:1.6 Wed Jan 30 20:42:08 2002
+++ src/libcwd/include/libcw/macro_AllocTag.h Sun Feb 10 19:00:24 2002
@@ -1,4 +1,4 @@
-// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/macro_AllocTag.h,v 1.6 2002/01/31 04:42:08 libcw Exp $
+// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/macro_AllocTag.h,v 1.7 2002/02/11 03:00:24 libcw Exp $
//
// Copyright (C) 2000 - 2001, by
//
@@ -185,7 +185,7 @@
desc = new char [size]; \
buf.rdbuf()->sgetn(desc, size); \
} \
- ::libcw::debug::_private:::set_alloc_checking_on(LIBCWD_TSD); \
+ ::libcw::debug::_private_::set_alloc_checking_on(LIBCWD_TSD); \
::libcw::debug::set_alloc_label(p, ::libcw::debug::type_info_of(p), \
::libcw::lockable_auto_ptr<char, true>(desc)); \
} while(0)
Index: src/libcwd/include/libcw/macro_Libcwd_macros.h
diff -u src/libcwd/include/libcw/macro_Libcwd_macros.h:1.5 src/libcwd/include/libcw/macro_Libcwd_macros.h:1.6
--- src/libcwd/include/libcw/macro_Libcwd_macros.h:1.5 Tue Feb 5 16:46:08 2002
+++ src/libcwd/include/libcw/macro_Libcwd_macros.h Sun Feb 10 19:00:24 2002
@@ -1,4 +1,4 @@
-// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/macro_Libcwd_macros.h,v 1.5 2002/02/06 00:46:08 libcw Exp $
+// $Header: /cvsroot/l/li/libcw/src/libcwd/include/libcw/macro_Libcwd_macros.h,v 1.6 2002/02/11 03:00:24 libcw Exp $
//
// Copyright (C) 2000 - 2002, by
//
@@ -58,7 +58,7 @@
#define LIBCWD_STR1(x) #x
#define LIBCWD_STR2(x) LIBCWD_STR1(x)
#define LIBCWD_STR3 "LibcwDout at " __FILE__ ":" LIBCWD_STR2(__LINE__) "\n"
-#define DEBUGDEBUGLIBCWDOUTMARKER ::write(2, LIBCWD_STR3, sizeof(LIBCWD_STR3) - 1);
+#define DEBUGDEBUGLIBCWDOUTMARKER LibcwDebugThreads( ++__libcwd_tsd.internal_debugging_code ); ::write(2, LIBCWD_STR3, sizeof(LIBCWD_STR3) - 1); LibcwDebugThreads( --__libcwd_tsd.internal_debugging_code );
#else // !DEBUGDEBUGOUTPUT
#define DEBUGDEBUGLIBCWDOUTMARKER
#endif // !DEBUGDEBUGOUTPUT
@@ -80,8 +80,8 @@
#define LibcwDoutScopeBegin( dc_namespace, debug_obj, cntrl ) \
do \
{ \
- DEBUGDEBUGLIBCWDOUTMARKER \
LIBCWD_TSD_DECLARATION \
+ DEBUGDEBUGLIBCWDOUTMARKER \
if (LIBCWD_DO_TSD_MEMBER_OFF(debug_obj) < 0) \
{ \
using namespace ::libcw::debug; \
@@ -114,7 +114,7 @@
#ifndef DEBUGDEBUGLIBCWDOUTFATALMARKER
#ifdef DEBUGDEBUGOUTPUT
#define LIBCWD_STR4 "LibcwDoutFatal at " __FILE__ ":" LIBCWD_STR2(__LINE__) "\n"
-#define DEBUGDEBUGLIBCWDOUTFATALMARKER ::write(2, LIBCWD_STR4, sizeof(LIBCWD_STR4) - 1);
+#define DEBUGDEBUGLIBCWDOUTFATALMARKER LibcwDebugThreads( ++__libcwd_tsd.internal_debugging_code ); ::write(2, LIBCWD_STR4, sizeof(LIBCWD_STR4) - 1); LibcwDebugThreads( --__libcwd_tsd.internal_debugging_code );
#else
#define DEBUGDEBUGLIBCWDOUTFATALMARKER
#endif
@@ -136,8 +136,8 @@
#define LibcwDoutFatalScopeBegin( dc_namespace, debug_obj, cntrl ) \
do \
{ \
- DEBUGDEBUGLIBCWDOUTFATALMARKER \
LIBCWD_TSD_DECLARATION \
+ DEBUGDEBUGLIBCWDOUTFATALMARKER \
using namespace ::libcw::debug; \
::libcw::debug::channel_set_bootstrap_st __libcwd_channel_set(LIBCWD_DO_TSD(debug_obj) LIBCWD_COMMA_TSD); \
{ \
----------------------- End of diff -----------------------
|