OSDN Git Service

trivial change
authortnishi <tnishi@git.osdn.net>
Fri, 25 Nov 2016 09:46:11 +0000 (18:46 +0900)
committertnishi <tnishi@git.osdn.net>
Fri, 25 Nov 2016 09:46:11 +0000 (18:46 +0900)
DCHookTest/StringLib.cpp
DCHookTest/StringLib.h

index f630822..1531eff 100644 (file)
 // about   : \82¢\82¢\89Á\8c¸\82È\82Æ\82±\82ë\82ð\83N\83\8a\83b\83N\82µ\82Ä\82à\92P\8cê\82³\82¦\82 \82ê\82Î\95K\82¸get\82·\82é
 // alnum   : \89p\90\94\8e\9a\88È\8aO\82Í\96³\8e\8b
 
-BOOL GetWord( const tchar *str, int pos, int &start, int &end, int &prevstart, bool fLongest, int wordcount, bool about, bool alnum )
+bool GetWord( const tchar *str, int pos, int &start, int &end, int &prevstart, bool fLongest, int wordcount, bool about, bool alnum )
 {
        if ( !about )
                if ( !IsWordChar( *(str+pos) ) )
-                       return FALSE;
+                       return false;
 //     while ( *(str+pos) == ' ' || *(str+pos) == '\t' ){
 //             pos++;
 //     }
@@ -61,7 +61,7 @@ rescan:
                wordtop = p; 
        const tchar *wordtail = NULL;
        const tchar *wordprev = NULL;
-       BOOL fSpc = FALSE;
+       bool fSpc = false;
        // pos\82É\82 \82é\92P\8cê\82Ìstart\82Æend\82ð\8b\81\82ß\82é
        while ( *p ){
                if ( !IsWordChar( *p ) || (alnum && !isalphanum(*p)) ){
@@ -79,7 +79,7 @@ rescan:
                                        }
                                }
                        }
-                       fSpc = TRUE;
+                       fSpc = true;
                } else {
                        // \92P\8cê\95\8e\9a
                        if ( fSpc ){
@@ -99,7 +99,7 @@ rescan:
        if ( (unsigned)wordtop - (about ? 3 : 0) > (unsigned)(orgp + pos) ){
                // \92P\8cê\82Ì\8bæ\90Ø\82è\82¾\82Á\82½\81A\92P\8cê\82Ì\8dÅ\8f\89\82ªpos\82æ\82è\8cã\82ë\82É\82 \82Á\82½
                // about = true\82Ì\8fê\8d\87\82Í\81A\82R\95\8e\9a\95ª\82Ù\82Ç\82¢\82¢\82©\82°\82ñ\8d·\82ð\91«\82µ\82Ä\82¨\82­
-               return FALSE;
+               return false;
        }
 
        if ( fLongest ){
@@ -109,7 +109,7 @@ rescan:
                                if ( !fSpc ){
                                        if ( --wordcount == 0 )
                                                break;
-                                       fSpc = TRUE;
+                                       fSpc = true;
                                }
                        } else {
                                fSpc = FALSE;
@@ -134,7 +134,7 @@ rescan:
        } else {
                prevstart = start;
        }
-       return TRUE;
+       return true;
 }
 #if 0
 bool mbGetWord( const tchar *str, int pos, int &start, int &end, bool fLongest, int wordcount )
@@ -149,7 +149,7 @@ bool mbGetWord( const tchar *str, int pos, int &start, int &end, bool fLongest,
        const tchar *p = orgp;
        const tchar *wordtop = p;
        const tchar *wordtail = NULL;
-       BOOL fSpc = FALSE;
+       bool fSpc = false;
        while ( 1 ){
                sp = p;
                LD_CHAR( c, p );
@@ -160,11 +160,11 @@ bool mbGetWord( const tchar *str, int pos, int &start, int &end, bool fLongest,
                                wordtail = sp;
                                break;
                        }
-                       fSpc = TRUE;
+                       fSpc = true;
                } else {
                        if ( fSpc ){
                                wordtop = sp;
-                               fSpc = FALSE;
+                               fSpc = false;
                        }
                }
        }
@@ -187,10 +187,10 @@ bool mbGetWord( const tchar *str, int pos, int &start, int &end, bool fLongest,
                                if ( !fSpc ){
                                        if ( --wordcount == 0 )
                                                break;
-                                       fSpc = TRUE;
+                                       fSpc = true;
                                }
                        } else {
-                               fSpc = FALSE;
+                               fSpc = false;
                        }
                }
                wordtail = sp;
@@ -200,7 +200,7 @@ bool mbGetWord( const tchar *str, int pos, int &start, int &end, bool fLongest,
                wordtail = sp;
        start = STR_DIFF( wordtop, orgp );
        end = STR_DIFF( wordtail, orgp );
-       return TRUE;
+       return true;
 }
 bool mbIsWordChar( unsigned short c )
 {
index 4c3c371..79ceb92 100644 (file)
@@ -43,7 +43,7 @@ typedef unsigned short ushort;
 // prototypes //
 int isalphanum( tuchar c );
 bool mbIsWordChar( unsigned short c );
-BOOL GetWord( const tchar *str, int pos, int &start, int &end, int &prevstart, bool fLongest, int wordcount, bool about, bool alnum );
+bool GetWord( const tchar *str, int pos, int &start, int &end, int &prevstart, bool fLongest, int wordcount, bool about, bool alnum, int numPrev );
 bool mbGetWord( const tchar *str, int pos, int &start, int &end, bool fLongest, int wordcount );
 
 // inlines //