summaryrefslogtreecommitdiff
path: root/idl/source/cmptools
diff options
context:
space:
mode:
authorMichael Münch <michael@codingmicha.de>2011-02-13 18:06:10 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-02-13 18:06:10 +0100
commitab7324559877ca1fd18178e1a41f821d0dfe4be3 (patch)
tree6acd68306d56b68889b549fdd092df23435a4dbf /idl/source/cmptools
parent2dadfcaeaeb65ba4dd67c82f76db0fd3093207e9 (diff)
Easy hack: idl removed and translated comments
Diffstat (limited to 'idl/source/cmptools')
-rw-r--r--idl/source/cmptools/char.cxx2
-rw-r--r--idl/source/cmptools/hash.cxx111
-rw-r--r--idl/source/cmptools/lex.cxx110
3 files changed, 12 insertions, 211 deletions
diff --git a/idl/source/cmptools/char.cxx b/idl/source/cmptools/char.cxx
index 4f3a6f13faa0..95d0ae0ad389 100644
--- a/idl/source/cmptools/char.cxx
+++ b/idl/source/cmptools/char.cxx
@@ -29,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_idl.hxx"
-/****************** I N C L U D E S **************************************/
#include <ctype.h>
#include <string.h>
@@ -37,7 +36,6 @@
#include <char.hxx>
-/****************** D A T E N ********************************************/
static unsigned char EqualTab[ 256 ] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
diff --git a/idl/source/cmptools/hash.cxx b/idl/source/cmptools/hash.cxx
index b8a6d0464fa1..197999a95e7a 100644
--- a/idl/source/cmptools/hash.cxx
+++ b/idl/source/cmptools/hash.cxx
@@ -29,33 +29,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_idl.hxx"
-/****************** I N C L U D E S **************************************/
-// C and C++ Includes.
+// C and C++ includes
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
-// Programmabhngige Includes.
+// program-sensitive includes
#include <hash.hxx>
#include <tools/debug.hxx>
-/****************** C O D E **********************************************/
-/*************************************************************************
-|*
-|* SvStringHashEntry::~SvStringHashEntry()
-|*
-|* Beschreibung
-|*
-*************************************************************************/
SvStringHashEntry::~SvStringHashEntry() { };
-/*************************************************************************
-|*
-|* SvHashTable::SvHashTable()
-|*
-|* Beschreibung
-|*
-*************************************************************************/
SvHashTable::SvHashTable( UINT32 nMaxEntries )
{
nMax = nMaxEntries; // set max entries
@@ -64,13 +48,6 @@ SvHashTable::SvHashTable( UINT32 nMaxEntries )
lAsk = 0;
}
-/*************************************************************************
-|*
-|* SvHashTable::~SvHashTable()
-|*
-|* Beschreibung
-|*
-*************************************************************************/
SvHashTable::~SvHashTable()
{
#ifdef DOS_NIE
@@ -81,13 +58,6 @@ SvHashTable::~SvHashTable()
#endif
}
-/*************************************************************************
-|*
-|* SvHashTable::Test_Insert()
-|*
-|* Beschreibung
-|*
-*************************************************************************/
BOOL SvHashTable::Test_Insert( const void * pElement, BOOL bInsert,
UINT32 * pInsertPos )
{
@@ -128,14 +98,6 @@ BOOL SvHashTable::Test_Insert( const void * pElement, BOOL bInsert,
return( FALSE );
}
-/************************************************************************/
-/*************************************************************************
-|*
-|* SvStringHashTable::SvStringHashTable()
-|*
-|* Beschreibung
-|*
-*************************************************************************/
SvStringHashTable::SvStringHashTable( UINT32 nMaxEntries )
: SvHashTable( nMaxEntries )
{
@@ -145,7 +107,7 @@ SvStringHashTable::SvStringHashTable( UINT32 nMaxEntries )
#endif
pEntries = new SvStringHashEntry[ nMaxEntries ];
- // RefCount auf eins setzen
+ // set RefCount to one
SvStringHashEntry * pPos, *pEnd;
pPos = pEntries;
pEnd = pEntries + nMaxEntries;
@@ -156,17 +118,10 @@ SvStringHashTable::SvStringHashTable( UINT32 nMaxEntries )
}
}
-/*************************************************************************
-|*
-|* ~SvStringHashTable::SvStringHashTable()
-|*
-|* Beschreibung
-|*
-*************************************************************************/
SvStringHashTable::~SvStringHashTable()
{
#ifdef DBG_UTIL
- // RefCount auf eins setzen
+ // set RefCount to one
SvStringHashEntry * pPos, *pEnd;
pPos = pEntries;
pEnd = pEntries + GetMax();
@@ -180,13 +135,6 @@ SvStringHashTable::~SvStringHashTable()
delete [] pEntries;
}
-/*************************************************************************
-|*
-|* SvStringHashTable::HashFunc()
-|*
-|* Beschreibung
-|*
-*************************************************************************/
UINT32 SvStringHashTable::HashFunc( const void * pElement ) const
{
UINT32 nHash = 0; // hash value
@@ -208,13 +156,6 @@ UINT32 SvStringHashTable::HashFunc( const void * pElement ) const
return( nHash );
}
-/*************************************************************************
-|*
-|* SvStringHashTable::GetNearString()
-|*
-|* Beschreibung
-|*
-*************************************************************************/
ByteString SvStringHashTable::GetNearString( const ByteString & rName ) const
{
for( UINT32 i = 0; i < GetMax(); i++ )
@@ -229,13 +170,6 @@ ByteString SvStringHashTable::GetNearString( const ByteString & rName ) const
return ByteString();
}
-/*************************************************************************
-|*
-|* SvStringHashTable::IsEntry()
-|*
-|* Beschreibung
-|*
-*************************************************************************/
BOOL SvStringHashTable::IsEntry( UINT32 nIndex ) const
{
if( nIndex >= GetMax() )
@@ -243,13 +177,6 @@ BOOL SvStringHashTable::IsEntry( UINT32 nIndex ) const
return pEntries[ nIndex ].HasId();
}
-/*************************************************************************
-|*
-|* SvStringHashTable::Insert()
-|*
-|* Beschreibung
-|*
-*************************************************************************/
BOOL SvStringHashTable::Insert( const ByteString & rName, UINT32 * pIndex )
{
UINT32 nIndex;
@@ -264,26 +191,12 @@ BOOL SvStringHashTable::Insert( const ByteString & rName, UINT32 * pIndex )
return TRUE;
}
-/*************************************************************************
-|*
-|* SvStringHashTable::Test()
-|*
-|* Beschreibung
-|*
-*************************************************************************/
BOOL SvStringHashTable::Test( const ByteString & rName, UINT32 * pPos ) const
{
return ((SvStringHashTable *)this)->SvHashTable::
Test_Insert( &rName, FALSE, pPos );
}
-/*************************************************************************
-|*
-|* SvStringHashTable::Get()
-|*
-|* Beschreibung
-|*
-*************************************************************************/
SvStringHashEntry * SvStringHashTable::Get( UINT32 nIndex ) const
{
if( IsEntry( nIndex ) )
@@ -291,26 +204,12 @@ SvStringHashEntry * SvStringHashTable::Get( UINT32 nIndex ) const
return( NULL );
}
-/*************************************************************************
-|*
-|* SvStringHashTable::Get()
-|*
-|* Beschreibung
-|*
-*************************************************************************/
StringCompare SvStringHashTable::Compare( const void * pElement,
UINT32 nIndex ) const
{
return ((const ByteString *)pElement)->CompareTo( pEntries[ nIndex ].GetName() );
}
-/*************************************************************************
-|*
-|* SvStringHashTable::FillHashList()
-|*
-|* Beschreibung
-|*
-*************************************************************************/
void SvStringHashTable::FillHashList( SvStringHashList * pList ) const
{
for( UINT32 n = 0; n < GetMax(); n++ )
@@ -318,7 +217,7 @@ void SvStringHashTable::FillHashList( SvStringHashList * pList ) const
if( IsEntry( n ) )
pList->push_back( Get( n ) );
}
- // Hash Reihenfolge, jetzt sortieren
+ // hash order, sort now
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/idl/source/cmptools/lex.cxx b/idl/source/cmptools/lex.cxx
index 4a1cbc2446a8..494091cb6246 100644
--- a/idl/source/cmptools/lex.cxx
+++ b/idl/source/cmptools/lex.cxx
@@ -39,14 +39,6 @@
#include <globals.hxx>
#include <tools/bigint.hxx>
-/****************** SvToken **********************************************/
-/*************************************************************************
-|*
-|* SvToken::Print()
-|*
-|* Beschreibung
-|*
-*************************************************************************/
ByteString SvToken::GetTokenAsString() const
{
ByteString aStr;
@@ -73,7 +65,7 @@ ByteString SvToken::GetTokenAsString() const
aStr = cChar;
break;
case SVTOKEN_RTTIBASE:
- aStr = "RTTIBASE";//(ULONG)pComplexObj;
+ aStr = "RTTIBASE";
break;
case SVTOKEN_EOF:
case SVTOKEN_HASHID:
@@ -83,68 +75,28 @@ ByteString SvToken::GetTokenAsString() const
return aStr;
}
-/*************************************************************************
-|*
-|* SvToken::SvToken()
-|*
-|* Beschreibung
-|*
-*************************************************************************/
SvToken::SvToken( const SvToken & rObj )
{
nLine = rObj.nLine;
nColumn = rObj.nColumn;
nType = rObj.nType;
aString = rObj.aString;
-/*
- if( SVTOKEN_RTTIBASE = nType )
- {
- pComplexObj = rObj.pComplexObj;
- pComplexObj->AddRef();
- }
- else
-*/
- nLong = rObj.nLong;
+ nLong = rObj.nLong;
}
-/*************************************************************************
-|*
-|* SvToken::operator = ()
-|*
-|* Beschreibung
-|*
-*************************************************************************/
SvToken & SvToken::operator = ( const SvToken & rObj )
{
if( this != &rObj )
{
-/*
- if( SVTOKEN_RTTIBASE = nType )
- pComplexObj->ReleaseRef();
-*/
nLine = rObj.nLine;
nColumn = rObj.nColumn;
nType = rObj.nType;
aString = rObj.aString;
-/*
- if( SVTOKEN_RTTIBASE = nType )
- {
- pComplexObj = rObj.pComplexObj;
- pComplexObj->AddRef();
- }
- else
-*/
- nLong = rObj.nLong;
+ nLong = rObj.nLong;
}
return *this;
}
-/****************** SvTokenStream ****************************************/
-/*************************************************************************
-|* SvTokenStream::InitCtor()
-|*
-|* Beschreibung
-*************************************************************************/
void SvTokenStream::InitCtor()
{
#ifdef DOS
@@ -163,11 +115,6 @@ void SvTokenStream::InitCtor()
FillTokenList();
}
-/*************************************************************************
-|* SvTokenStream::SvTokenStream()
-|*
-|* Beschreibung
-*************************************************************************/
SvTokenStream::SvTokenStream( const String & rFileName )
: pInStream( new SvFileStream( rFileName, STREAM_STD_READ | STREAM_NOCREATE ) )
, rInStream( *pInStream )
@@ -177,11 +124,6 @@ SvTokenStream::SvTokenStream( const String & rFileName )
InitCtor();
}
-/*************************************************************************
-|* SvTokenStream::SvTokenStream()
-|*
-|* Beschreibung
-*************************************************************************/
SvTokenStream::SvTokenStream( SvStream & rStream, const String & rFileName )
: pInStream( NULL )
, rInStream( rStream )
@@ -191,11 +133,6 @@ SvTokenStream::SvTokenStream( SvStream & rStream, const String & rFileName )
InitCtor();
}
-/*************************************************************************
-|* SvTokenStream::~SvTokenStream()
-|*
-|* Beschreibung
-*************************************************************************/
SvTokenStream::~SvTokenStream()
{
delete pInStream;
@@ -207,11 +144,6 @@ SvTokenStream::~SvTokenStream()
}
}
-/*************************************************************************
-|* SvTokenStream::FillTokenList()
-|*
-|* Beschreibung
-*************************************************************************/
void SvTokenStream::FillTokenList()
{
SvToken * pToken = new SvToken();
@@ -243,11 +175,6 @@ void SvTokenStream::FillTokenList()
pCurToken = aTokList.First();
}
-/*************************************************************************
-|* SvTokenStrem::SetCharSet()
-|*
-|* Beschreibung
-*************************************************************************/
void SvTokenStream::SetCharSet( CharSet nSet )
{
nCharSet = nSet;
@@ -259,11 +186,6 @@ void SvTokenStream::SetCharSet( CharSet nSet )
#endif
}
-/*************************************************************************
-|* SvTokeStream::GetNextChar()
-|*
-|* Beschreibung
-*************************************************************************/
int SvTokenStream::GetNextChar()
{
int nChar;
@@ -288,11 +210,6 @@ int SvTokenStream::GetNextChar()
return nChar;
}
-/*************************************************************************
-|* SvTokenStrem::GetNumber()
-|*
-|* Beschreibung
-*************************************************************************/
ULONG SvTokenStream::GetNumber()
{
ULONG l = 0;
@@ -331,18 +248,13 @@ ULONG SvTokenStream::GetNumber()
return( l );
}
-/*************************************************************************
-|* SvTokenStream::MakeToken()
-|*
-|* Beschreibung
-*************************************************************************/
BOOL SvTokenStream::MakeToken( SvToken & rToken )
{
do
{
if( 0 == c )
c = GetNextChar();
- // Leerzeichen ueberlesen
+ // skip whitespace
while( isspace( c ) || 26 == c )
{
c = GetFastNextChar();
@@ -353,31 +265,26 @@ BOOL SvTokenStream::MakeToken( SvToken & rToken )
ULONG nLastLine = nLine;
ULONG nLastColumn = nColumn;
- // Kommentar
+ // comment
if( '/' == c )
{
- // Zeit Optimierung, keine Kommentare
- //ByteString aComment( (char)c );
+ // time optimization, no comments
int c1 = c;
c = GetFastNextChar();
if( '/' == c )
{
while( '\0' != c )
{
- //aComment += (char)c;
c = GetFastNextChar();
}
c = GetNextChar();
rToken.nType = SVTOKEN_COMMENT;
- //rToken.aString = aComment;
}
else if( '*' == c )
{
- //aComment += (char)c;
c = GetFastNextChar();
do
{
- //aComment += (char)c;
while( '*' != c )
{
if( '\0' == c )
@@ -388,17 +295,14 @@ BOOL SvTokenStream::MakeToken( SvToken & rToken )
}
else
c = GetFastNextChar();
- //aComment += (char)c;
}
c = GetFastNextChar();
}
while( '/' != c && !IsEof() && ( SVSTREAM_OK == rInStream.GetError() ) );
if( IsEof() || ( SVSTREAM_OK != rInStream.GetError() ) )
return FALSE;
- //aComment += (char)c;
c = GetNextChar();
rToken.nType = SVTOKEN_COMMENT;
- //rToken.aString = aComment;
CalcColumn();
}
else
@@ -416,7 +320,7 @@ BOOL SvTokenStream::MakeToken( SvToken & rToken )
c = GetFastNextChar();
if( '\0' == c )
{
- // Strings auch "uber das Zeilenende hinauslesen
+ // read strings beyond end of line
aStr += '\n';
c = GetNextChar();
if( IsEof() )