]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/HelpGen/src/docripper.cpp
fixed mouse input handling in wxUniv: the static boxes ust be transparent
[wxWidgets.git] / utils / HelpGen / src / docripper.cpp
index cdaff810e1fc22f14de94e906a1b2a87774a1f7b..3b50e47cbcab2d4d705e7e237d1fb79512744317 100644 (file)
 
 #include "docripper.h"
 
-#include <iostream.h>
+#if wxUSE_IOSTREAMH
+    #include <iostream.h>
+#else
+    #include <iostream>
+#endif
 
 // script templates
 
@@ -178,12 +182,14 @@ void RipperDocGen::AppendComments( spContext& fromContext, string& str )
                        if ( lst[i]->StartsParagraph() )
                        {
                                str += mTags[TAG_PARAGRAPH].start;
+
                        }
        
                str += lst[i]->mText;
        }
 
        // remove new lines, and insert paragraph breaks
+
        // if empty lines found
 
        size_t len = str.length();
@@ -192,22 +198,38 @@ void RipperDocGen::AppendComments( spContext& fromContext, string& str )
        
                if ( str[n] == 10 || 
                     str[n] == 13  ) 
+
                {
+
                        if ( n + 2 < len )
+
                        {
+
                                if ( ( str[n] == 13 && str[n+1] == 10 &&  // FIXME:: quick-hack
+
                                           str[n+2] == 13 ) ||
+
                                         ( str[n] == 10 && str[n+1] == 10 )
+
                            )
+
                                {
+
                                        str.insert( n + 1, "<p>" ); // FIXME:: quick-hack
+
                                        len += 3;
+
                                }
+
                        }
 
+
+
                        str[n] = ' ';
+
                }
 
+
        str += mTags[TAG_PARAGRAPH].end;
 }
 
@@ -224,7 +246,7 @@ void RipperDocGen::AppendHighlightedSource( string& st, string source )
        char buf[1024*32];
 
        // DBG:::
-       ASSERT( source.length() + 1 < sizeof(buf) );
+//     ASSERT( source.length() + 1 < sizeof(buf) );
 
        strcpy( buf, source.c_str() );
                                                
@@ -423,9 +445,12 @@ void RipperDocGen::VisitTypeDef( spTypeDef& td )
 void RipperDocGen::VisitPreprocessorLine( spPreprocessorLine& pd )
 {
        if ( pd.mDefType != SP_PREP_DEF_REDEFINE_SYMBOL )
+
        
+
                return;
 
+
        if ( CheckIfUncommented( pd, *mpMacroIdx ) )
                return;