OSDN Git Service

正規表現の改修
authorqwerty2501 <riot313@gmail.com>
Sun, 5 Feb 2012 10:30:22 +0000 (19:30 +0900)
committerqwerty2501 <riot313@gmail.com>
Sun, 5 Feb 2012 10:30:22 +0000 (19:30 +0900)
nlib/nlib_nicoLive.cpp
nlite.suo
nlite/nlite.h
nlite/nlite_addTomylistWindow.cpp

index e918430..c49b4ad 100644 (file)
@@ -692,15 +692,18 @@ VOID NicoLiveStream_disConnect(NicoLiveStream_P self){
 
        if(self == NULL || self->isConnecting == FALSE)goto end;
 
-       while(WSAResetEvent(self->chatManager.startEvent) == FALSE);
-       while(WSASetEvent(self->chatManager.endEvent)== FALSE);
+       DWORD waitRslt = WSA_WAIT_TIMEOUT;
 
-       
+       do{
+               while(WSAResetEvent(self->chatManager.startEvent) == FALSE);
+               while(WSASetEvent(self->chatManager.endEvent)== FALSE);
 
+       
 
 
-       WSAWaitForMultipleEvents(sizeof(self->chatManager.resetEvents) / sizeof(self->chatManager.resetEvents[0]),self->chatManager.resetEvents,TRUE,WSA_INFINITE,FALSE);
 
+               waitRslt = WSAWaitForMultipleEvents(sizeof(self->chatManager.resetEvents) / sizeof(self->chatManager.resetEvents[0]),self->chatManager.resetEvents,TRUE,3000,FALSE);
+       } while(waitRslt == WSA_WAIT_TIMEOUT);
 
 
        //nicoLiveStream_Initialize(*self);
index 14ca9f8..bec29f2 100644 (file)
Binary files a/nlite.suo and b/nlite.suo differ
index 8fcd98a..ecc9cf8 100644 (file)
@@ -31,7 +31,7 @@ namespace nlite{
                typedef std::tr1::basic_regex<TCHAR> tregex;
                namespace text{
                        const static CString URL_TEXT = TEXT("(https?|ftp)(://[-_.!~*\'()a-zA-Z0-9;/?:@&=+$,%#]+)");
-                       const static CString TAG_TEXT = TEXT("<[\"#/a-zA-Z0-9= ]*>");
+                       const static CString TAG_TEXT = TEXT("<[\"_;!?,\\:.'$%#/a-zA-Z0-9= ]*>");
                        const static CString VIDEOID_TEXT = TEXT("(sm|nm)([0-9])+");
                        const static CString LIVEID_TEXT = TEXT("(lv)([0-9])+");
                        const static CString LINK_TEXT = TEXT("(") + URL_TEXT + TEXT(")|(") + VIDEOID_TEXT + TEXT(")|(") + LIVEID_TEXT + TEXT(")");
index 63b7991..199781a 100644 (file)
@@ -42,7 +42,7 @@ namespace nlite{
 
        VOID WINAPI CAddToMyListWindow::OnBeforeNavigate2(IDispatch** dispatch, VARIANT* url, VARIANT* flags,VARIANT* frameName, VARIANT* postData, VARIANT* headers, VARIANT_BOOL* cancel){
 
-               dumpln(TEXT("event:Set"));
+               
                return;
 
        }
@@ -51,12 +51,13 @@ namespace nlite{
                if(m_pWB2){
                        CComVariant v;
                        CNLiteString userSession(refAuth.GetUserSession());
+                       userSession += TEXT("\r\n");
                        CComVariant header(userSession);
                        
                        
                        //header.SetByRef((BSTR)userSession);
                        
-                       m_pWB2->Navigate(CNLiteString(lpszUrl), &v, &v, &v, &v);
+                       m_pWB2->Navigate(CNLiteString(lpszUrl), &v, &v, &v, &header);