Boost logo

Boost-Commit :

From: john.groups_at_[hidden]
Date: 2007-10-31 11:09:32


Author: jtorjo
Date: 2007-10-31 11:09:30 EDT (Wed, 31 Oct 2007)
New Revision: 40624
URL: http://svn.boost.org/trac/boost/changeset/40624

Log:
[logging]
v0.9.11, 31 oct 2007
- no more stdafx.* files

Removed:
   sandbox/logging/lib/logging/samples/basic_usage/stdafx.cpp
   sandbox/logging/lib/logging/samples/basic_usage/stdafx.h
   sandbox/logging/lib/logging/samples/vc8/loggingvc8/stdafx.cpp
   sandbox/logging/lib/logging/samples/vc8/loggingvc8/stdafx.h
Text files modified:
   sandbox/logging/boost/logging/changelog.hpp | 3 ++
   sandbox/logging/boost/logging/defaults.hpp | 13 ++++++++-
   sandbox/logging/boost/logging/format.hpp | 2
   sandbox/logging/boost/logging/format/destination/defaults.hpp | 12 +++++---
   sandbox/logging/boost/logging/format/formatter/time.hpp | 4 +-
   sandbox/logging/lib/logging/samples/basic_usage/basic_usage.vcproj | 8 ------
   sandbox/logging/lib/logging/samples/basic_usage/main.cpp | 2 -
   sandbox/logging/lib/logging/samples/gcc/main.cpp | 2
   sandbox/logging/lib/logging/samples/scenarios/fastest_use_ostr_like.cpp | 2
   sandbox/logging/lib/logging/samples/vc8/loggingvc8/ReadMe.txt | 34 -------------------------
   sandbox/logging/lib/logging/samples/vc8/loggingvc8/loggingvc8.cpp | 1
   sandbox/logging/lib/logging/samples/vc8/loggingvc8/loggingvc8.vcproj | 51 +--------------------------------------
   12 files changed, 29 insertions(+), 105 deletions(-)

Modified: sandbox/logging/boost/logging/changelog.hpp
==============================================================================
--- sandbox/logging/boost/logging/changelog.hpp (original)
+++ sandbox/logging/boost/logging/changelog.hpp 2007-10-31 11:09:30 EDT (Wed, 31 Oct 2007)
@@ -1,6 +1,9 @@
 /**
 @page page_changelog Changelog
 
+v0.9.11, 31 oct 2007
+- no more stdafx.* files
+
 v0.9.10, 31 oct 2007
 - destination::file - on linux don't add ios_base::in when not original overwrite. Many thanks to Martin Baeker!
 

Modified: sandbox/logging/boost/logging/defaults.hpp
==============================================================================
--- sandbox/logging/boost/logging/defaults.hpp (original)
+++ sandbox/logging/boost/logging/defaults.hpp 2007-10-31 11:09:30 EDT (Wed, 31 Oct 2007)
@@ -24,7 +24,7 @@
 #include <boost/logging/ts/ts_resource.hpp>
 
 #include <string>
-
+#include <boost/config.hpp>
 
 namespace boost { namespace logging {
 
@@ -64,6 +64,15 @@
 
 */
 
+// define this if you want your char type to be 'wchar_t'
+#undef BOOST_LOG_USE_WCHAR_T
+
+#ifdef BOOST_WINDOWS
+#if defined( UNICODE) || defined(_UNICODE)
+#define BOOST_LOG_USE_WCHAR_T
+#endif
+#endif
+
 
 
     struct override {};
@@ -83,7 +92,7 @@
 
 
     struct default_types {
-#ifdef UNICODE
+#ifdef BOOST_LOG_USE_WCHAR_T
         typedef wchar_t char_type;
 #else
         typedef char char_type;

Modified: sandbox/logging/boost/logging/format.hpp
==============================================================================
--- sandbox/logging/boost/logging/format.hpp (original)
+++ sandbox/logging/boost/logging/format.hpp 2007-10-31 11:09:30 EDT (Wed, 31 Oct 2007)
@@ -390,7 +390,7 @@
                 is_fmt, is_dest, is_clear
             };
             struct item {
- item() : m_type(is_clear), m_fmt(0), m_dest(0) {}
+ item() : m_fmt(0), m_dest(0), m_type(is_clear) {}
                 item& fmt(formatter_ptr f) { m_fmt = f; m_type = is_fmt; return *this; }
                 item &dest(destination_ptr d) { m_dest = d; m_type = is_dest; return *this; }
                 formatter_ptr m_fmt;

Modified: sandbox/logging/boost/logging/format/destination/defaults.hpp
==============================================================================
--- sandbox/logging/boost/logging/format/destination/defaults.hpp (original)
+++ sandbox/logging/boost/logging/format/destination/defaults.hpp 2007-10-31 11:09:30 EDT (Wed, 31 Oct 2007)
@@ -36,7 +36,7 @@
 template<class convert_dest = do_convert_destination > struct cout_t : is_generic, boost::logging::op_equal::always_equal {
 
     template<class msg_type> void operator()(const msg_type & msg) const {
-#ifndef UNICODE
+#ifndef BOOST_LOG_USE_WCHAR_T
         convert_dest::write(msg, std::cout);
 #else
         convert_dest::write(msg, std::wcout);
@@ -46,20 +46,22 @@
 
 
 /**
- @brief Writes the string to console
+ @brief Writes the string to output debug window
+
+ For non-Windows systems, this is the console.
 */
 template<class convert_dest = do_convert_destination > struct dbg_window_t : is_generic, boost::logging::op_equal::always_equal {
 
     template<class msg_type> void operator()(const msg_type & msg) const {
 #ifdef BOOST_WINDOWS
-#ifndef UNICODE
+#ifndef BOOST_LOG_USE_WCHAR_T
     ::OutputDebugStringA( convert_dest::do_convert(msg, into<const char*>() ) );
 #else
     ::OutputDebugStringW( convert_dest::do_convert(msg, into<const wchar_t*>() ) );
 #endif
 #else
- // non windows
- msg; // so that there's no warning
+ // non windows - dump to console
+ std::cout << msg;
 #endif
     }
 };

Modified: sandbox/logging/boost/logging/format/formatter/time.hpp
==============================================================================
--- sandbox/logging/boost/logging/format/formatter/time.hpp (original)
+++ sandbox/logging/boost/logging/format/formatter/time.hpp 2007-10-31 11:09:30 EDT (Wed, 31 Oct 2007)
@@ -137,7 +137,7 @@
         vals[m_sec + 1] = details.tm_sec;
       
         // ignore value at index 0 - it's there so that I don't have to test for an index being -1
- #ifdef UNICODE
+ #ifdef BOOST_LOG_USE_WCHAR_T
         swprintf( buffer, m_format.c_str(), vals[1], vals[2], vals[3], vals[4], vals[5], vals[6], vals[7] );
     #else
         sprintf( buffer, m_format.c_str(), vals[1], vals[2], vals[3], vals[4], vals[5], vals[6], vals[7] );
@@ -181,7 +181,7 @@
         char_type buffer[64];
         ::time_t t = ::time (0);
         ::tm t_details = m_localtime ? *localtime( &t) : *gmtime( &t);
- #ifdef UNICODE
+ #ifdef BOOST_LOG_USE_WCHAR_T
         if (0 != wcsftime (buffer, sizeof (buffer), m_format.c_str (), &t_details))
     #else
         if (0 != strftime (buffer, sizeof (buffer), m_format.c_str (), &t_details))

Modified: sandbox/logging/lib/logging/samples/basic_usage/basic_usage.vcproj
==============================================================================
--- sandbox/logging/lib/logging/samples/basic_usage/basic_usage.vcproj (original)
+++ sandbox/logging/lib/logging/samples/basic_usage/basic_usage.vcproj 2007-10-31 11:09:30 EDT (Wed, 31 Oct 2007)
@@ -274,10 +274,6 @@
>
                         </File>
                         <File
- RelativePath=".\stdafx.cpp"
- >
- </File>
- <File
                                 RelativePath=".\util.cpp"
>
                         </File>
@@ -308,10 +304,6 @@
>
                         </File>
                         <File
- RelativePath=".\stdafx.h"
- >
- </File>
- <File
                                 RelativePath=".\util.h"
>
                         </File>

Modified: sandbox/logging/lib/logging/samples/basic_usage/main.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/basic_usage/main.cpp (original)
+++ sandbox/logging/lib/logging/samples/basic_usage/main.cpp 2007-10-31 11:09:30 EDT (Wed, 31 Oct 2007)
@@ -60,8 +60,6 @@
 
 */
 
-#include "stdafx.h"
-
 // Wherever you use logs, include this ;)
 #include "log.h"
 

Deleted: sandbox/logging/lib/logging/samples/basic_usage/stdafx.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/basic_usage/stdafx.cpp 2007-10-31 11:09:30 EDT (Wed, 31 Oct 2007)
+++ (empty file)
@@ -1,8 +0,0 @@
-// stdafx.cpp : source file that includes just the standard includes
-// basic_usage.pch will be the pre-compiled header
-// stdafx.obj will contain the pre-compiled type information
-
-#include "stdafx.h"
-
-// TODO: reference any additional headers you need in STDAFX.H
-// and not in this file

Deleted: sandbox/logging/lib/logging/samples/basic_usage/stdafx.h
==============================================================================
--- sandbox/logging/lib/logging/samples/basic_usage/stdafx.h 2007-10-31 11:09:30 EDT (Wed, 31 Oct 2007)
+++ (empty file)
@@ -1,10 +0,0 @@
-// stdafx.h : include file for standard system include files,
-// or project specific include files that are used frequently, but
-// are changed infrequently
-//
-
-#include <stdio.h>
-
-
-
-// TODO: reference additional headers your program requires here

Modified: sandbox/logging/lib/logging/samples/gcc/main.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/gcc/main.cpp (original)
+++ sandbox/logging/lib/logging/samples/gcc/main.cpp 2007-10-31 11:09:30 EDT (Wed, 31 Oct 2007)
@@ -5,7 +5,7 @@
 using namespace std;
 void custom_fmt_dest_example() ;
 
-int main(int argc, char *argv[])
+int main()
 {
         custom_fmt_dest_example();
 

Modified: sandbox/logging/lib/logging/samples/scenarios/fastest_use_ostr_like.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/scenarios/fastest_use_ostr_like.cpp (original)
+++ sandbox/logging/lib/logging/samples/scenarios/fastest_use_ostr_like.cpp 2007-10-31 11:09:30 EDT (Wed, 31 Oct 2007)
@@ -68,7 +68,7 @@
 BOOST_DEFINE_LOG_FILTER(g_log_filter, filter::no_ts )
 
 // Step 3: declare which loggers you'll use
-BOOST_DEFINE_LOG(g_log_app, app_log_type );
+BOOST_DEFINE_LOG(g_log_app, app_log_type )
 BOOST_DEFINE_LOG_WITH_ARGS( g_log_err, err_log_type, ("err.txt") )
 
 // Step 4: define the macros through which you'll log

Modified: sandbox/logging/lib/logging/samples/vc8/loggingvc8/ReadMe.txt
==============================================================================
--- sandbox/logging/lib/logging/samples/vc8/loggingvc8/ReadMe.txt (original)
+++ sandbox/logging/lib/logging/samples/vc8/loggingvc8/ReadMe.txt 2007-10-31 11:09:30 EDT (Wed, 31 Oct 2007)
@@ -1,33 +1 @@
-========================================================================
- CONSOLE APPLICATION : loggingvc8 Project Overview
-========================================================================
-
-AppWizard has created this loggingvc8 application for you.
-
-This file contains a summary of what you will find in each of the files that
-make up your loggingvc8 application.
-
-
-loggingvc8.vcproj
- This is the main project file for VC++ projects generated using an Application Wizard.
- It contains information about the version of Visual C++ that generated the file, and
- information about the platforms, configurations, and project features selected with the
- Application Wizard.
-
-loggingvc8.cpp
- This is the main application source file.
-
-/////////////////////////////////////////////////////////////////////////////
-Other standard files:
-
-StdAfx.h, StdAfx.cpp
- These files are used to build a precompiled header (PCH) file
- named loggingvc8.pch and a precompiled types file named StdAfx.obj.
-
-/////////////////////////////////////////////////////////////////////////////
-Other notes:
-
-AppWizard uses "TODO:" comments to indicate parts of the source code you
-should add to or customize.
-
-/////////////////////////////////////////////////////////////////////////////
+Sample application

Modified: sandbox/logging/lib/logging/samples/vc8/loggingvc8/loggingvc8.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/vc8/loggingvc8/loggingvc8.cpp (original)
+++ sandbox/logging/lib/logging/samples/vc8/loggingvc8/loggingvc8.cpp 2007-10-31 11:09:30 EDT (Wed, 31 Oct 2007)
@@ -1,7 +1,6 @@
 // loggingvc8.cpp : Defines the entry point for the console application.
 //
 
-#include "stdafx.h"
 
 #if 0
 int main()

Modified: sandbox/logging/lib/logging/samples/vc8/loggingvc8/loggingvc8.vcproj
==============================================================================
--- sandbox/logging/lib/logging/samples/vc8/loggingvc8/loggingvc8.vcproj (original)
+++ sandbox/logging/lib/logging/samples/vc8/loggingvc8/loggingvc8.vcproj 2007-10-31 11:09:30 EDT (Wed, 31 Oct 2007)
@@ -44,7 +44,7 @@
                                 MinimalRebuild="true"
                                 BasicRuntimeChecks="3"
                                 RuntimeLibrary="3"
- UsePrecompiledHeader="2"
+ UsePrecompiledHeader="0"
                                 WarningLevel="3"
                                 Detect64BitPortabilityProblems="true"
                                 DebugInformationFormat="4"
@@ -117,7 +117,7 @@
                                 Name="VCCLCompilerTool"
                                 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
                                 RuntimeLibrary="2"
- UsePrecompiledHeader="2"
+ UsePrecompiledHeader="0"
                                 WarningLevel="3"
                                 Detect64BitPortabilityProblems="true"
                                 DebugInformationFormat="3"
@@ -536,46 +536,6 @@
                                 RelativePath=".\ReadMe.txt"
>
                         </File>
- <File
- RelativePath=".\stdafx.cpp"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Test|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="TestAll|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\stdafx.h"
- >
- </File>
                 </Filter>
                 <Filter
                         Name="templates"
@@ -911,13 +871,6 @@
                         <File
                                 RelativePath="..\..\scenarios\fastest_no_ostr_like.cpp"
>
- <FileConfiguration
- Name="Test|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
                         </File>
                         <File
                                 RelativePath="..\..\scenarios\fastest_use_ostr_like.cpp"

Deleted: sandbox/logging/lib/logging/samples/vc8/loggingvc8/stdafx.cpp
==============================================================================
--- sandbox/logging/lib/logging/samples/vc8/loggingvc8/stdafx.cpp 2007-10-31 11:09:30 EDT (Wed, 31 Oct 2007)
+++ (empty file)
@@ -1,8 +0,0 @@
-// stdafx.cpp : source file that includes just the standard includes
-// loggingvc8.pch will be the pre-compiled header
-// stdafx.obj will contain the pre-compiled type information
-
-#include "stdafx.h"
-
-// TODO: reference any additional headers you need in STDAFX.H
-// and not in this file

Deleted: sandbox/logging/lib/logging/samples/vc8/loggingvc8/stdafx.h
==============================================================================
--- sandbox/logging/lib/logging/samples/vc8/loggingvc8/stdafx.h 2007-10-31 11:09:30 EDT (Wed, 31 Oct 2007)
+++ (empty file)
@@ -1,11 +0,0 @@
-// stdafx.h : include file for standard system include files,
-// or project specific include files that are used frequently, but
-// are changed infrequently
-//
-
-
-#include <stdio.h>
-
-
-
-// TODO: reference additional headers your program requires here


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk