git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48991
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
-#if wxUSE_UNICODE
- #error "HelpGen doesn't build in Unicode mode"
-#endif
-
#ifndef WX_PRECOMP
#include "wx/string.h"
#include "wx/log.h"
#ifndef WX_PRECOMP
#include "wx/string.h"
#include "wx/log.h"
// -----------------------------------------------------------------------------
// return the label for the given function name (i.e. argument of \label)
// -----------------------------------------------------------------------------
// return the label for the given function name (i.e. argument of \label)
-static wxString MakeLabel(const wxChar *classname, const wxChar *funcname = NULL);
+static wxString MakeLabel(const char *classname, const char *funcname = NULL);
// return the whole \helpref{arg}{arg_label} string
// return the whole \helpref{arg}{arg_label} string
-static wxString MakeHelpref(const wxChar *argument);
+static wxString MakeHelpref(const char *argument);
// [un]quote special TeX characters (in place)
static void TeXFilter(wxString* str);
// [un]quote special TeX characters (in place)
static void TeXFilter(wxString* str);
// returns the length of 'match' if the string 'str' starts with it or 0
// otherwise
// returns the length of 'match' if the string 'str' starts with it or 0
// otherwise
- static size_t TryMatch(const wxChar *str, const wxChar *match);
+ static size_t TryMatch(const char *str, const char *match);
// skip spaces: returns pointer to first non space character (also
// updates the value of m_line)
// skip spaces: returns pointer to first non space character (also
// updates the value of m_line)
baseHeaderName.erase(0, 3);
for ( index = 0; index < WXSIZEOF(headers); index++ ) {
baseHeaderName.erase(0, 3);
for ( index = 0; index < WXSIZEOF(headers); index++ ) {
- if ( Stricmp(baseHeaderName, headers[index]) == 0 )
+ if ( wxStricmp(baseHeaderName, headers[index]) == 0 )
// statics used by inline'ed C helper-functions
static char* _gSrcStart = 0;
static char* _gSrcEnd = 0;
// statics used by inline'ed C helper-functions
static char* _gSrcStart = 0;
static char* _gSrcEnd = 0;
-static wxChar* _gLastSuppresedComment = 0;
+static char* _gLastSuppresedComment = 0;
static int _gLineNo = 0;
// FOR NOW:: comments queue is static
static int _gLineNo = 0;
// FOR NOW:: comments queue is static
-static inline void skip_preprocessor_dir( wxChar*& cur )
+static inline void skip_preprocessor_dir( char*& cur )
- if ( *(cur-1) != _T('\\') )
+ if ( *(cur-1) != '\\' )
break;
if ( cur < _gSrcEnd )
break;
if ( cur < _gSrcEnd )
{
// TBD:: FIXME:: return value of operators !
{
// TBD:: FIXME:: return value of operators !
- while ( identifier[0u] == _T('*') ||
- identifier[0u] == _T('&')
+ while ( identifier[0u] == '*' ||
+ identifier[0u] == '&'
)
{
type += identifier[0u];
)
{
type += identifier[0u];
return i == __gMultiLangMap.end() ? false : true;
}
return i == __gMultiLangMap.end() ? false : true;
}
-static inline void get_string_between( wxChar* start, wxChar* end,
+static inline void get_string_between( char* start, char* end,
wxString* pStr )
{
char saved = *end;
wxString* pStr )
{
char saved = *end;
*pStr = start;
*end = saved;
}
*pStr = start;
*end = saved;
}
-static wxChar* set_comment_text( wxString& text, wxChar* start )
+static char* set_comment_text( wxString& text, char* start )
// to avoid poluting the queue with this comment
_gLastSuppresedComment = start;
skip_comments( end );
// to avoid poluting the queue with this comment
_gLastSuppresedComment = start;
skip_comments( end );
- if ( *(end-1) == _T('/') )
end -= 2;
start += 2;
// skip multiple leading '/''s or '*''s
end -= 2;
start += 2;
// skip multiple leading '/''s or '*''s
- while( *start == _T('/') && start < end ) ++start;
- while( *start == _T('*') && start < end ) ++start;
+ while( *start == '/' && start < end ) ++start;
+ while( *start == '*' && start < end ) ++start;
get_string_between( start, end, &text );
get_string_between( start, end, &text );
- if ( *m_cur >= _T('0') && *m_cur <= _T('9') )
+ if ( *m_cur >= '0' && *m_cur <= '9' )
{
skip_token( m_cur );
continue;
}
{
skip_token( m_cur );
continue;
}
- if ( *m_cur == _T('}') )
{
if ( mCurCtxType != SP_CTX_CLASS )
{
{
if ( mCurCtxType != SP_CTX_CLASS )
{
-void CJSourceParser::AttachComments( spContext& ctx, wxChar* cur )
+void CJSourceParser::AttachComments( spContext& ctx, char* cur )
{
if ( !mCommentsOn ) return;
MCommentListT& lst = ctx.GetCommentList();
{
if ( !mCommentsOn ) return;
MCommentListT& lst = ctx.GetCommentList();
- wxChar* prevComEnd = 0;
int tmpLnNo;
store_line_no( tmpLnNo );
int tmpLnNo;
store_line_no( tmpLnNo );
lst.push_back( pComment );
// find the end of comment
lst.push_back( pComment );
// find the end of comment
- wxChar* start = _gCommentsQueue[i];
+ char* start = _gCommentsQueue[i];
- pComment->mIsMultiline = ( *(start+1) == _T('*') );
+ pComment->mIsMultiline = ( *(start+1) == '*' );
// first comment in the queue and multiline
// comments are always treated as a begining
// first comment in the queue and multiline
// comments are always treated as a begining
// find out wheather there is a new-line
// between to adjecent comments
// find out wheather there is a new-line
// between to adjecent comments
- wxChar* prevLine = start;
+ char* prevLine = start;
skip_to_prev_line(prevLine);
if ( prevLine >= prevComEnd )
skip_to_prev_line(prevLine);
if ( prevLine >= prevComEnd )
set_comment_text( pComment->m_Text, cur );
pComment->mStartsPar = 1;
set_comment_text( pComment->m_Text, cur );
pComment->mStartsPar = 1;
- pComment->mIsMultiline = ( *(cur+1) == _T('*') );
+ pComment->mIsMultiline = ( *(cur+1) == '*' );
// mark this comment, so that it would not
// get in the comments list of the next context
// mark this comment, so that it would not
// get in the comments list of the next context
-void CJSourceParser::AddMacroNode( wxChar*& cur )
+void CJSourceParser::AddMacroNode( char*& cur )
int lineNo = get_line_no();
int lineNo = get_line_no();
// determine the type exactly and assign
// a name to the context
// determine the type exactly and assign
// a name to the context
- if ( *start == _T('d') )
- if ( cmp_tokens_fast( start, _T("define"), 6 ) )
+ if ( cmp_tokens_fast( start, "define", 6 ) )
pPL->mDefType = SP_PREP_DEF_REDEFINE_SYMBOL;
}
}
pPL->mDefType = SP_PREP_DEF_REDEFINE_SYMBOL;
}
}
- else if ( *start == _T('i') )
+ else if ( *start == 'i' )
- if ( cmp_tokens_fast( start, _T("include"), 7 ) )
+ if ( cmp_tokens_fast( start, "include", 7 ) )
{
pPL->mDefType = SP_PREP_DEF_INCLUDE_FILE;
}
{
pPL->mDefType = SP_PREP_DEF_INCLUDE_FILE;
}
- else if ( *++start == _T('f') )
+ else if ( *++start == 'f' )
{
// either "#if" or "#ifdef"
cur = start;
{
// either "#if" or "#ifdef"
cur = start;
wxString condition = get_token_str( cur );
// currently, everything except '0' is true
wxString condition = get_token_str( cur );
// currently, everything except '0' is true
- if ( condition == _T("0") ) {
+ if ( condition == "0" ) {
// skip until the following else or enif
while ( cur < _gSrcEnd ) {
skip_to_eol( cur );
skip_eol( cur );
get_next_token( cur );
// skip until the following else or enif
while ( cur < _gSrcEnd ) {
skip_to_eol( cur );
skip_eol( cur );
get_next_token( cur );
- if ( *cur++ == _T('#') && *cur == _T('e') )
+ if ( *cur++ == '#' && *cur == 'e' )
// TODO parse the condition...
}
}
// TODO parse the condition...
}
}
- else if ( cmp_tokens_fast( start, _T("else"), 4 ) )
+ else if ( cmp_tokens_fast( start, "else", 4 ) )
{
// skip until "#endif"
while ( cur < _gSrcEnd ) {
{
// skip until "#endif"
while ( cur < _gSrcEnd ) {
skip_eol( cur );
get_next_token( cur );
skip_eol( cur );
get_next_token( cur );
- if ( *cur++ == _T('#') && cmp_tokens_fast( cur, "endif", 5 ) )
+ if ( *cur++ == '#' && cmp_tokens_fast( cur, "endif", 5 ) )
// if comma, than variable list continues
// otherwise the variable type reached - stop
// if comma, than variable list continues
// otherwise the variable type reached - stop
{
// yes, we've mistaken, it was not a identifier,
// but it's default value
{
// yes, we've mistaken, it was not a identifier,
// but it's default value
-void CJSourceParser::AddEnumNode( wxChar*& cur )
+void CJSourceParser::AddEnumNode( char*& cur )
{
// now the cursor is at "enum" keyword
{
// now the cursor is at "enum" keyword
spEnumeration* pEnum = new spEnumeration();
mpCurCtx->AddMember( pEnum );
spEnumeration* pEnum = new spEnumeration();
mpCurCtx->AddMember( pEnum );
-void CJSourceParser::AddTypeDefNode( wxChar*& cur )
+void CJSourceParser::AddTypeDefNode( char*& cur )
{
// now the cursor at the token next to "typedef" keyword
if ( !get_next_token(cur) ) return;
{
// now the cursor at the token next to "typedef" keyword
if ( !get_next_token(cur) ) return;
spTypeDef* pTDef = new spTypeDef();
mpCurCtx->AddMember( pTDef );
spTypeDef* pTDef = new spTypeDef();
mpCurCtx->AddMember( pTDef );
int tmpLnNo;
store_line_no( tmpLnNo );
int tmpLnNo;
store_line_no( tmpLnNo );
skip_next_token_back( tok );
skip_next_token_back( tok );
- wxChar* nameStart = tok;
skip_next_token_back( tok );
skip_next_token_back( tok );
// check if it's function prototype
if ( *nameStart == ')' )
// check if it's function prototype
if ( *nameStart == ')' )
{
protected:
// begining of the full-text area of the source file
{
protected:
// begining of the full-text area of the source file
// points to first character after the end
// of teh full-text area
// points to first character after the end
// of teh full-text area
// current "privacy level"
int mCurVis;
// current parsing position int full-text area
// current "privacy level"
int mCurVis;
// current parsing position int full-text area
// about the current class
bool mIsVirtual;
// about the current class
bool mIsVirtual;
void RipperDocGen::AppendHighlightedSource( wxString& st, wxString source )
{
// FIXME:: below should not be fixed :)
void RipperDocGen::AppendHighlightedSource( wxString& st, wxString source )
{
// FIXME:: below should not be fixed :)
// DBG:::
// ASSERT( source.length() + 1 < sizeof(buf) );
// DBG:::
// ASSERT( source.length() + 1 < sizeof(buf) );