aboutsummaryrefslogtreecommitdiff
path: root/tools/lldb-mi/MIUtilDateTimeStd.cpp
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2015-02-06 21:38:51 +0000
committerEd Maste <emaste@FreeBSD.org>2015-02-06 21:38:51 +0000
commit205afe679855a4ce8149cdaa94d3f0868ce796dc (patch)
tree09bc83f73246ee3c7a779605cd0122093d2a8a19 /tools/lldb-mi/MIUtilDateTimeStd.cpp
parent0cac4ca3916ac24ab6139d03cbfd18db9e715bfe (diff)
downloadsrc-205afe679855a4ce8149cdaa94d3f0868ce796dc.tar.gz
src-205afe679855a4ce8149cdaa94d3f0868ce796dc.zip
Import LLDB as of upstream SVN r225923 (git 2b588ecd)vendor/lldb/lldb-r225923
This corresponds with the branchpoint for the 3.6 release. A number of files not required for the FreeBSD build have been removed. Sponsored by: DARPA, AFRL
Notes
Notes: svn path=/vendor/lldb/dist/; revision=278332 svn path=/vendor/lldb/lldb-r225923/; revision=278333; tag=vendor/lldb/lldb-r225923
Diffstat (limited to 'tools/lldb-mi/MIUtilDateTimeStd.cpp')
-rw-r--r--tools/lldb-mi/MIUtilDateTimeStd.cpp89
1 files changed, 45 insertions, 44 deletions
diff --git a/tools/lldb-mi/MIUtilDateTimeStd.cpp b/tools/lldb-mi/MIUtilDateTimeStd.cpp
index 9938deb131cc..bb9e238843e0 100644
--- a/tools/lldb-mi/MIUtilDateTimeStd.cpp
+++ b/tools/lldb-mi/MIUtilDateTimeStd.cpp
@@ -8,15 +8,15 @@
//===----------------------------------------------------------------------===//
//++
-// File: MIUtilDateTimeStd.cpp
+// File: MIUtilDateTimeStd.cpp
//
-// Overview: CMIUtilDateTimeStd implementation.
+// Overview: CMIUtilDateTimeStd implementation.
//
-// Environment: Compilers: Visual C++ 12.
-// gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
-// Libraries: See MIReadmetxt.
+// Environment: Compilers: Visual C++ 12.
+// gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
+// Libraries: See MIReadmetxt.
//
-// Copyright: None.
+// Copyright: None.
//--
// In-house headers:
@@ -24,61 +24,62 @@
#include "MICmnResources.h"
//++ ------------------------------------------------------------------------------------
-// Details: CMIUtilDateTimeStd constructor.
-// Type: Method.
-// Args: None.
-// Return: None.
-// Throws: None.
+// Details: CMIUtilDateTimeStd constructor.
+// Type: Method.
+// Args: None.
+// Return: None.
+// Throws: None.
//--
-CMIUtilDateTimeStd::CMIUtilDateTimeStd( void )
+CMIUtilDateTimeStd::CMIUtilDateTimeStd(void)
{
}
//++ ------------------------------------------------------------------------------------
-// Details: CMIUtilDateTimeStd destructor.
-// Type: Method.
-// Args: None.
-// Return: None.
-// Throws: None.
+// Details: CMIUtilDateTimeStd destructor.
+// Type: Method.
+// Args: None.
+// Return: None.
+// Throws: None.
//--
-CMIUtilDateTimeStd::~CMIUtilDateTimeStd( void )
+CMIUtilDateTimeStd::~CMIUtilDateTimeStd(void)
{
}
//++ ------------------------------------------------------------------------------------
-// Details: Retrieve system local current date. Format is MM/DD/YYYY.
-// Type: Method.
-// Args: None.
-// Return: CMIUtilString - Text description.
-// Throws: None.
+// Details: Retrieve system local current date. Format is MM/DD/YYYY.
+// Type: Method.
+// Args: None.
+// Return: CMIUtilString - Text description.
+// Throws: None.
//--
-CMIUtilString CMIUtilDateTimeStd::GetDate( void )
+CMIUtilString
+CMIUtilDateTimeStd::GetDate(void)
{
- CMIUtilString strDate( MIRSRC( IDS_WORD_INVALIDBRKTS ) );
-
- std::time( &m_rawTime );
- const std::tm * pTi = std::localtime( &m_rawTime );
- if( std::strftime( &m_pScratch[ 0 ], sizeof( m_pScratch ), "%d/%m/%y", pTi ) > 0 )
- strDate = m_pScratch;
+ CMIUtilString strDate(MIRSRC(IDS_WORD_INVALIDBRKTS));
- return strDate;
+ std::time(&m_rawTime);
+ const std::tm *pTi = std::localtime(&m_rawTime);
+ if (std::strftime(&m_pScratch[0], sizeof(m_pScratch), "%d/%m/%y", pTi) > 0)
+ strDate = m_pScratch;
+
+ return strDate;
}
//++ ------------------------------------------------------------------------------------
-// Details: Retrieve system local current time. Format is HH:MM:SS 24 hour clock.
-// Type: Method.
-// Args: None.
-// Return: CMIUtilString - Text description.
-// Throws: None.
+// Details: Retrieve system local current time. Format is HH:MM:SS 24 hour clock.
+// Type: Method.
+// Args: None.
+// Return: CMIUtilString - Text description.
+// Throws: None.
//--
-CMIUtilString CMIUtilDateTimeStd::GetTime( void )
+CMIUtilString
+CMIUtilDateTimeStd::GetTime(void)
{
- std::time( &m_rawTime );
- const std::tm * pTi = std::localtime( &m_rawTime );
- const CMIUtilString seconds( CMIUtilString::Format( "%d", pTi->tm_sec ) );
- const CMIUtilString zero( (seconds.length() == 1) ? "0" : "" );
- const CMIUtilString strTime( CMIUtilString::Format( "%d:%d:%s%s", pTi->tm_hour, pTi->tm_min, zero.c_str(), seconds.c_str() ) );
+ std::time(&m_rawTime);
+ const std::tm *pTi = std::localtime(&m_rawTime);
+ const CMIUtilString seconds(CMIUtilString::Format("%d", pTi->tm_sec));
+ const CMIUtilString zero((seconds.length() == 1) ? "0" : "");
+ const CMIUtilString strTime(CMIUtilString::Format("%d:%d:%s%s", pTi->tm_hour, pTi->tm_min, zero.c_str(), seconds.c_str()));
- return strTime;
+ return strTime;
}
-