From 44377ba3fb22827c98f29773d59ca466072d01eb Mon Sep 17 00:00:00 2001 From: jules Date: Wed, 17 Dec 2008 15:08:39 +0000 Subject: [PATCH] whitespace clean-ups --- .../juce_mac_MessageManager.mm | 2 +- .../juce_mac_NSViewComponentPeer.mm | 2 +- .../juce_win32_Windowing.cpp | 2 +- extras/juce demo/src/BinaryData.cpp | 408 +++--- extras/juce demo/src/BinaryData.h | 2 +- .../juce_AudioThumbnail.cpp | 2 +- .../events/juce_MessageManager.h | 4 +- src/juce_core/basics/juce_PlatformDefs.h | 738 +++++----- src/juce_core/basics/juce_StandardHeader.h | 306 ++-- src/juce_core/io/network/juce_Socket.cpp | 1268 ++++++++--------- 10 files changed, 1367 insertions(+), 1367 deletions(-) diff --git a/build/macosx/platform_specific_code/juce_mac_MessageManager.mm b/build/macosx/platform_specific_code/juce_mac_MessageManager.mm index 224b329237..649798c405 100644 --- a/build/macosx/platform_specific_code/juce_mac_MessageManager.mm +++ b/build/macosx/platform_specific_code/juce_mac_MessageManager.mm @@ -320,7 +320,7 @@ void MessageManager::doPlatformSpecificShutdown() } jassert (numPendingMessages == 0); // failed to get all the pending messages cleared before quitting.. - + [juceAppDelegate release]; juceAppDelegate = 0; } diff --git a/build/macosx/platform_specific_code/juce_mac_NSViewComponentPeer.mm b/build/macosx/platform_specific_code/juce_mac_NSViewComponentPeer.mm index 692badc08b..00eebe7778 100644 --- a/build/macosx/platform_specific_code/juce_mac_NSViewComponentPeer.mm +++ b/build/macosx/platform_specific_code/juce_mac_NSViewComponentPeer.mm @@ -727,7 +727,7 @@ NSViewComponentPeer::NSViewComponentPeer (Component* const component, [window setExcludedFromWindowsMenu: (windowStyleFlags & windowIsTemporary) != 0]; [window setIgnoresMouseEvents: (windowStyleFlags & windowIgnoresMouseClicks) != 0]; } - + setTitle (component->getName()); } diff --git a/build/win32/platform_specific_code/juce_win32_Windowing.cpp b/build/win32/platform_specific_code/juce_win32_Windowing.cpp index 2a612af9ea..bc2f7f1d18 100644 --- a/build/win32/platform_specific_code/juce_win32_Windowing.cpp +++ b/build/win32/platform_specific_code/juce_win32_Windowing.cpp @@ -2133,7 +2133,7 @@ private: break; case SC_KEYMENU: - // (NB mustn't call sendInputAttemptWhenModalMessage() here because of very + // (NB mustn't call sendInputAttemptWhenModalMessage() here because of very // obscure situations that can arise if a modal loop is started from an alt-key // keypress). diff --git a/extras/juce demo/src/BinaryData.cpp b/extras/juce demo/src/BinaryData.cpp index 7c30e81412..ea2472e13b 100644 --- a/extras/juce demo/src/BinaryData.cpp +++ b/extras/juce demo/src/BinaryData.cpp @@ -6201,215 +6201,215 @@ static const unsigned char temp14[] = {47,42,13,10,32,32,61,61,61,61,61,61,61,61 100,120,44,32,100,121,44,32,119,44,32,104,44,32,112,97,114,101,110,116,87,105,100,116,104,44,32,112,97,114,101,110,116,72,101,105,103,104,116,59, 13,10,32,32,32,32,102,108,111,97,116,32,105,110,110,101,114,88,44,32,105,110,110,101,114,89,59,13,10,32,32,32,32,67,111,108,111,117,114,32, 99,111,108,111,117,114,59,13,10,32,32,32,32,67,114,105,116,105,99,97,108,83,101,99,116,105,111,110,32,108,111,99,107,59,13,10,32,32,32,32, - 105,110,116,54,52,32,116,104,114,101,97,100,73,100,59,13,10,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,66,111,117,110,99,105,110,103, - 66,97,108,108,67,111,109,112,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,120,32,61,32,82,97,110,100,111,109,58,58,103, - 101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,70,108,111,97,116,40,41,32,42,32,50,48,48,46,48,102,59,13,10, - 32,32,32,32,32,32,32,32,121,32,61,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101, - 120,116,70,108,111,97,116,40,41,32,42,32,50,48,48,46,48,102,59,13,10,32,32,32,32,32,32,32,32,112,97,114,101,110,116,87,105,100,116,104, - 32,61,32,53,48,59,13,10,32,32,32,32,32,32,32,32,112,97,114,101,110,116,72,101,105,103,104,116,32,61,32,53,48,59,13,10,32,32,32,32, - 32,32,32,32,105,110,110,101,114,88,32,61,32,48,59,13,10,32,32,32,32,32,32,32,32,105,110,110,101,114,89,32,61,32,48,59,13,10,32,32, - 32,32,32,32,32,32,116,104,114,101,97,100,73,100,32,61,32,48,59,13,10,13,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,102,108,111, - 97,116,32,115,112,101,101,100,32,61,32,53,46,48,102,59,32,47,47,32,103,105,118,101,32,101,97,99,104,32,98,97,108,108,32,97,32,102,105,120, - 101,100,32,115,112,101,101,100,32,115,111,32,119,101,32,99,97,110,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,115,101,101,32,116,104,101,32,101,102,102,101,99,116,115,32,111,102,32,116,104,114,101, - 97,100,32,112,114,105,111,114,105,116,121,32,111,110,32,104,111,119,32,102,97,115,116,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,116,104,101,121,32,97,99,116,117,97,108,108,121,32,103,111,46,13, - 10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,102,108,111,97,116,32,97,110,103,108,101,32,61,32,82,97,110,100,111,109,58,58,103,101,116, - 83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,70,108,111,97,116,40,41,32,42,32,102,108,111,97,116,95,80,105,32,42,32, - 50,46,48,102,59,13,10,13,10,32,32,32,32,32,32,32,32,100,120,32,61,32,115,105,110,102,32,40,97,110,103,108,101,41,32,42,32,115,112,101, - 101,100,59,13,10,32,32,32,32,32,32,32,32,100,121,32,61,32,99,111,115,102,32,40,97,110,103,108,101,41,32,42,32,115,112,101,101,100,59,13, - 10,13,10,32,32,32,32,32,32,32,32,115,105,122,101,32,61,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111, - 109,40,41,46,110,101,120,116,70,108,111,97,116,40,41,32,42,32,51,48,46,48,102,32,43,32,51,48,46,48,102,59,13,10,13,10,32,32,32,32, - 32,32,32,32,99,111,108,111,117,114,32,61,32,67,111,108,111,117,114,32,40,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97, - 110,100,111,109,40,41,46,110,101,120,116,73,110,116,40,41,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,46, - 119,105,116,104,65,108,112,104,97,32,40,48,46,53,102,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,46,119, - 105,116,104,66,114,105,103,104,116,110,101,115,115,32,40,48,46,55,102,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,66,111,117, - 110,99,105,110,103,66,97,108,108,67,111,109,112,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105, - 100,32,112,97,105,110,116,32,40,71,114,97,112,104,105,99,115,38,32,103,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,103,46, - 115,101,116,67,111,108,111,117,114,32,40,99,111,108,111,117,114,41,59,13,10,32,32,32,32,32,32,32,32,103,46,102,105,108,108,69,108,108,105,112, - 115,101,32,40,105,110,110,101,114,88,44,32,105,110,110,101,114,89,44,32,115,105,122,101,44,32,115,105,122,101,41,59,13,10,13,10,32,32,32,32, - 32,32,32,32,103,46,115,101,116,67,111,108,111,117,114,32,40,67,111,108,111,117,114,115,58,58,98,108,97,99,107,41,59,13,10,32,32,32,32,32, - 32,32,32,103,46,115,101,116,70,111,110,116,32,40,49,48,46,48,102,41,59,13,10,32,32,32,32,32,32,32,32,103,46,100,114,97,119,84,101,120, - 116,32,40,83,116,114,105,110,103,58,58,116,111,72,101,120,83,116,114,105,110,103,32,40,116,104,114,101,97,100,73,100,41,44,32,48,44,32,48,44, - 32,103,101,116,87,105,100,116,104,40,41,44,32,103,101,116,72,101,105,103,104,116,40,41,44,32,74,117,115,116,105,102,105,99,97,116,105,111,110,58, - 58,99,101,110,116,114,101,100,44,32,102,97,108,115,101,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,112,97,114, - 101,110,116,83,105,122,101,67,104,97,110,103,101,100,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,112,97,114,101,110,116,87, - 105,100,116,104,32,61,32,103,101,116,80,97,114,101,110,116,87,105,100,116,104,40,41,32,45,32,115,105,122,101,59,13,10,32,32,32,32,32,32,32, - 32,112,97,114,101,110,116,72,101,105,103,104,116,32,61,32,103,101,116,80,97,114,101,110,116,72,101,105,103,104,116,40,41,32,45,32,115,105,122,101, - 59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,104,97,110,100,108,101,65,115,121,110,99,85,112,100,97,116,101,40,41, - 13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,83,99,111,112,101,100,76,111,99,107,32,115,108,32,40,108,111, - 99,107,41,59,13,10,13,10,32,32,32,32,32,32,32,32,115,101,116,66,111,117,110,100,115,32,40,40,40,105,110,116,41,32,120,41,32,45,32,50, - 44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,105,110,116,41,32,121,41,32,45,32,50,44,13,10,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,105,110,116,41,32,115,105,122,101,41,32,43,32,52,44,13,10,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,105,110,116,41,32,115,105,122,101,41,32,43,32,52,41,59,13,10,13,10,32,32,32, - 32,32,32,32,32,105,110,110,101,114,88,32,61,32,120,32,45,32,103,101,116,88,40,41,59,13,10,32,32,32,32,32,32,32,32,105,110,110,101,114, - 89,32,61,32,121,32,45,32,103,101,116,89,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,114,101,112,97,105,110,116,40,41,59,13,10,32, - 32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,109,111,118,101,66,97,108,108,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32, - 32,32,32,32,99,111,110,115,116,32,83,99,111,112,101,100,76,111,99,107,32,115,108,32,40,108,111,99,107,41,59,13,10,13,10,32,32,32,32,32, - 32,32,32,116,104,114,101,97,100,73,100,32,61,32,84,104,114,101,97,100,58,58,103,101,116,67,117,114,114,101,110,116,84,104,114,101,97,100,73,100, - 40,41,59,32,47,47,32,116,104,105,115,32,105,115,32,115,111,32,116,104,101,32,99,111,109,112,111,110,101,110,116,32,99,97,110,32,112,114,105,110, - 116,32,116,104,101,32,116,104,114,101,97,100,32,73,68,32,105,110,115,105,100,101,32,116,104,101,32,98,97,108,108,13,10,13,10,32,32,32,32,32, - 32,32,32,120,32,43,61,32,100,120,59,13,10,32,32,32,32,32,32,32,32,121,32,43,61,32,100,121,59,13,10,13,10,32,32,32,32,32,32,32, - 32,105,102,32,40,120,32,60,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,120,32,61,32,102,97,98,115,102,32,40,100,120,41, - 59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,120,32,62,32,112,97,114,101,110,116,87,105,100,116,104,41,13,10,32,32,32,32,32, - 32,32,32,32,32,32,32,100,120,32,61,32,45,102,97,98,115,102,32,40,100,120,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40, - 121,32,60,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,121,32,61,32,102,97,98,115,102,32,40,100,121,41,59,13,10,13,10, - 32,32,32,32,32,32,32,32,105,102,32,40,121,32,62,32,112,97,114,101,110,116,72,101,105,103,104,116,41,13,10,32,32,32,32,32,32,32,32,32, - 32,32,32,100,121,32,61,32,45,102,97,98,115,102,32,40,100,121,41,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,116,104,105,115,32, - 105,115,32,99,97,108,108,101,100,32,111,110,32,97,32,98,97,99,107,103,114,111,117,110,100,32,116,104,114,101,97,100,44,32,115,111,32,119,101,32, - 100,111,110,39,116,32,119,97,110,116,32,116,111,32,99,97,108,108,13,10,32,32,32,32,32,32,32,32,47,47,32,97,110,121,32,85,73,32,99,111, - 100,101,32,102,114,111,109,32,104,101,114,101,32,45,32,105,110,115,116,101,97,100,32,119,101,39,108,108,32,116,114,105,103,103,101,114,32,97,110,32, - 101,118,101,110,116,32,116,104,97,116,32,119,105,108,108,32,117,112,100,97,116,101,13,10,32,32,32,32,32,32,32,32,47,47,32,116,104,101,32,99, - 111,109,112,111,110,101,110,116,39,115,32,112,111,115,105,116,105,111,110,32,108,97,116,101,114,46,32,84,104,105,115,32,105,115,32,97,32,115,97,102, - 101,32,119,97,121,32,116,111,32,97,118,111,105,100,32,100,101,97,100,108,111,99,107,115,13,10,32,32,32,32,32,32,32,32,116,114,105,103,103,101, - 114,65,115,121,110,99,85,112,100,97,116,101,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,106,117,99,101,95,85,115,101,68,101, - 98,117,103,103,105,110,103,78,101,119,79,112,101,114,97,116,111,114,13,10,125,59,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61, + 84,104,114,101,97,100,58,58,84,104,114,101,97,100,73,68,32,116,104,114,101,97,100,73,100,59,13,10,13,10,112,117,98,108,105,99,58,13,10,32, + 32,32,32,66,111,117,110,99,105,110,103,66,97,108,108,67,111,109,112,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,120,32, + 61,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,70,108,111,97,116,40,41,32, + 42,32,50,48,48,46,48,102,59,13,10,32,32,32,32,32,32,32,32,121,32,61,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109, + 82,97,110,100,111,109,40,41,46,110,101,120,116,70,108,111,97,116,40,41,32,42,32,50,48,48,46,48,102,59,13,10,32,32,32,32,32,32,32,32, + 112,97,114,101,110,116,87,105,100,116,104,32,61,32,53,48,59,13,10,32,32,32,32,32,32,32,32,112,97,114,101,110,116,72,101,105,103,104,116,32, + 61,32,53,48,59,13,10,32,32,32,32,32,32,32,32,105,110,110,101,114,88,32,61,32,48,59,13,10,32,32,32,32,32,32,32,32,105,110,110,101, + 114,89,32,61,32,48,59,13,10,32,32,32,32,32,32,32,32,116,104,114,101,97,100,73,100,32,61,32,48,59,13,10,13,10,32,32,32,32,32,32, + 32,32,99,111,110,115,116,32,102,108,111,97,116,32,115,112,101,101,100,32,61,32,53,46,48,102,59,32,47,47,32,103,105,118,101,32,101,97,99,104, + 32,98,97,108,108,32,97,32,102,105,120,101,100,32,115,112,101,101,100,32,115,111,32,119,101,32,99,97,110,13,10,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,115,101,101,32,116,104,101,32,101,102,102,101, + 99,116,115,32,111,102,32,116,104,114,101,97,100,32,112,114,105,111,114,105,116,121,32,111,110,32,104,111,119,32,102,97,115,116,13,10,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,116,104,101,121,32,97,99, + 116,117,97,108,108,121,32,103,111,46,13,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,102,108,111,97,116,32,97,110,103,108,101,32,61,32, + 82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,70,108,111,97,116,40,41,32,42,32, + 102,108,111,97,116,95,80,105,32,42,32,50,46,48,102,59,13,10,13,10,32,32,32,32,32,32,32,32,100,120,32,61,32,115,105,110,102,32,40,97, + 110,103,108,101,41,32,42,32,115,112,101,101,100,59,13,10,32,32,32,32,32,32,32,32,100,121,32,61,32,99,111,115,102,32,40,97,110,103,108,101, + 41,32,42,32,115,112,101,101,100,59,13,10,13,10,32,32,32,32,32,32,32,32,115,105,122,101,32,61,32,82,97,110,100,111,109,58,58,103,101,116, + 83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,70,108,111,97,116,40,41,32,42,32,51,48,46,48,102,32,43,32,51,48,46, + 48,102,59,13,10,13,10,32,32,32,32,32,32,32,32,99,111,108,111,117,114,32,61,32,67,111,108,111,117,114,32,40,82,97,110,100,111,109,58,58, + 103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,73,110,116,40,41,41,13,10,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,46,119,105,116,104,65,108,112,104,97,32,40,48,46,53,102,41,13,10,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,46,119,105,116,104,66,114,105,103,104,116,110,101,115,115,32,40,48,46,55,102,41,59,13,10,32,32,32,32,125,13, + 10,13,10,32,32,32,32,126,66,111,117,110,99,105,110,103,66,97,108,108,67,111,109,112,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,125, + 13,10,13,10,32,32,32,32,118,111,105,100,32,112,97,105,110,116,32,40,71,114,97,112,104,105,99,115,38,32,103,41,13,10,32,32,32,32,123,13, + 10,32,32,32,32,32,32,32,32,103,46,115,101,116,67,111,108,111,117,114,32,40,99,111,108,111,117,114,41,59,13,10,32,32,32,32,32,32,32,32, + 103,46,102,105,108,108,69,108,108,105,112,115,101,32,40,105,110,110,101,114,88,44,32,105,110,110,101,114,89,44,32,115,105,122,101,44,32,115,105,122, + 101,41,59,13,10,13,10,32,32,32,32,32,32,32,32,103,46,115,101,116,67,111,108,111,117,114,32,40,67,111,108,111,117,114,115,58,58,98,108,97, + 99,107,41,59,13,10,32,32,32,32,32,32,32,32,103,46,115,101,116,70,111,110,116,32,40,49,48,46,48,102,41,59,13,10,32,32,32,32,32,32, + 32,32,103,46,100,114,97,119,84,101,120,116,32,40,83,116,114,105,110,103,58,58,116,111,72,101,120,83,116,114,105,110,103,32,40,40,105,110,116,54, + 52,41,32,116,104,114,101,97,100,73,100,41,44,32,48,44,32,48,44,32,103,101,116,87,105,100,116,104,40,41,44,32,103,101,116,72,101,105,103,104, + 116,40,41,44,32,74,117,115,116,105,102,105,99,97,116,105,111,110,58,58,99,101,110,116,114,101,100,44,32,102,97,108,115,101,41,59,13,10,32,32, + 32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,112,97,114,101,110,116,83,105,122,101,67,104,97,110,103,101,100,40,41,13,10,32,32,32, + 32,123,13,10,32,32,32,32,32,32,32,32,112,97,114,101,110,116,87,105,100,116,104,32,61,32,103,101,116,80,97,114,101,110,116,87,105,100,116,104, + 40,41,32,45,32,115,105,122,101,59,13,10,32,32,32,32,32,32,32,32,112,97,114,101,110,116,72,101,105,103,104,116,32,61,32,103,101,116,80,97, + 114,101,110,116,72,101,105,103,104,116,40,41,32,45,32,115,105,122,101,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32, + 104,97,110,100,108,101,65,115,121,110,99,85,112,100,97,116,101,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,99,111,110,115, + 116,32,83,99,111,112,101,100,76,111,99,107,32,115,108,32,40,108,111,99,107,41,59,13,10,13,10,32,32,32,32,32,32,32,32,115,101,116,66,111, + 117,110,100,115,32,40,40,40,105,110,116,41,32,120,41,32,45,32,50,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, + 32,40,40,105,110,116,41,32,121,41,32,45,32,50,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,105,110, + 116,41,32,115,105,122,101,41,32,43,32,52,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,105,110,116,41, + 32,115,105,122,101,41,32,43,32,52,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,110,110,101,114,88,32,61,32,120,32,45,32,103,101,116, + 88,40,41,59,13,10,32,32,32,32,32,32,32,32,105,110,110,101,114,89,32,61,32,121,32,45,32,103,101,116,89,40,41,59,13,10,13,10,32,32, + 32,32,32,32,32,32,114,101,112,97,105,110,116,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,109,111,118,101, + 66,97,108,108,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,83,99,111,112,101,100,76,111,99,107,32, + 115,108,32,40,108,111,99,107,41,59,13,10,13,10,32,32,32,32,32,32,32,32,116,104,114,101,97,100,73,100,32,61,32,84,104,114,101,97,100,58, + 58,103,101,116,67,117,114,114,101,110,116,84,104,114,101,97,100,73,100,40,41,59,32,47,47,32,116,104,105,115,32,105,115,32,115,111,32,116,104,101, + 32,99,111,109,112,111,110,101,110,116,32,99,97,110,32,112,114,105,110,116,32,116,104,101,32,116,104,114,101,97,100,32,73,68,32,105,110,115,105,100, + 101,32,116,104,101,32,98,97,108,108,13,10,13,10,32,32,32,32,32,32,32,32,120,32,43,61,32,100,120,59,13,10,32,32,32,32,32,32,32,32, + 121,32,43,61,32,100,121,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,120,32,60,32,48,41,13,10,32,32,32,32,32,32,32,32, + 32,32,32,32,100,120,32,61,32,102,97,98,115,102,32,40,100,120,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,120,32,62,32, + 112,97,114,101,110,116,87,105,100,116,104,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,120,32,61,32,45,102,97,98,115,102,32,40,100, + 120,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,121,32,60,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100, + 121,32,61,32,102,97,98,115,102,32,40,100,121,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,121,32,62,32,112,97,114,101,110, + 116,72,101,105,103,104,116,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,100,121,32,61,32,45,102,97,98,115,102,32,40,100,121,41,59,13, + 10,13,10,32,32,32,32,32,32,32,32,47,47,32,116,104,105,115,32,105,115,32,99,97,108,108,101,100,32,111,110,32,97,32,98,97,99,107,103,114, + 111,117,110,100,32,116,104,114,101,97,100,44,32,115,111,32,119,101,32,100,111,110,39,116,32,119,97,110,116,32,116,111,32,99,97,108,108,13,10,32, + 32,32,32,32,32,32,32,47,47,32,97,110,121,32,85,73,32,99,111,100,101,32,102,114,111,109,32,104,101,114,101,32,45,32,105,110,115,116,101,97, + 100,32,119,101,39,108,108,32,116,114,105,103,103,101,114,32,97,110,32,101,118,101,110,116,32,116,104,97,116,32,119,105,108,108,32,117,112,100,97,116, + 101,13,10,32,32,32,32,32,32,32,32,47,47,32,116,104,101,32,99,111,109,112,111,110,101,110,116,39,115,32,112,111,115,105,116,105,111,110,32,108, + 97,116,101,114,46,32,84,104,105,115,32,105,115,32,97,32,115,97,102,101,32,119,97,121,32,116,111,32,97,118,111,105,100,32,100,101,97,100,108,111, + 99,107,115,13,10,32,32,32,32,32,32,32,32,116,114,105,103,103,101,114,65,115,121,110,99,85,112,100,97,116,101,40,41,59,13,10,32,32,32,32, + 125,13,10,13,10,32,32,32,32,106,117,99,101,95,85,115,101,68,101,98,117,103,103,105,110,103,78,101,119,79,112,101,114,97,116,111,114,13,10,125, + 59,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99,108,97,115,115,32,68,101,109,111, - 84,104,114,101,97,100,32,32,32,32,58,32,112,117,98,108,105,99,32,66,111,117,110,99,105,110,103,66,97,108,108,67,111,109,112,44,13,10,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,84,104,114,101,97,100,13,10,123,13,10,32,32, - 32,32,105,110,116,32,105,110,116,101,114,118,97,108,59,13,10,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,68,101,109,111,84,104,114,101, - 97,100,40,41,13,10,32,32,32,32,32,32,32,32,58,32,84,104,114,101,97,100,32,40,84,40,34,74,117,99,101,32,68,101,109,111,32,84,104,114, - 101,97,100,34,41,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,110,116,101,114,118,97,108,32,61,32,82,97,110,100,111,109, - 58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,73,110,116,32,40,53,48,41,32,43,32,54,59,13,10,13, - 10,32,32,32,32,32,32,32,32,47,47,32,103,105,118,101,32,116,104,101,32,116,104,114,101,97,100,115,32,97,32,114,97,110,100,111,109,32,112,114, - 105,111,114,105,116,121,44,32,115,111,32,115,111,109,101,32,119,105,108,108,32,109,111,118,101,32,109,111,114,101,13,10,32,32,32,32,32,32,32,32, - 47,47,32,115,109,111,111,116,104,108,121,32,116,104,97,110,32,111,116,104,101,114,115,46,46,13,10,32,32,32,32,32,32,32,32,115,116,97,114,116, - 84,104,114,101,97,100,32,40,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,73,110, - 116,32,40,51,41,32,43,32,51,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,68,101,109,111,84,104,114,101,97,100,40,41,13, - 10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,97,108,108,111,119,32,116,104,101,32,116,104,114,101,97,100,32,50,32,115,101, - 99,111,110,100,115,32,116,111,32,115,116,111,112,32,99,108,101,97,110,108,121,32,45,32,115,104,111,117,108,100,32,98,101,32,112,108,101,110,116,121, - 32,111,102,32,116,105,109,101,46,13,10,32,32,32,32,32,32,32,32,115,116,111,112,84,104,114,101,97,100,32,40,50,48,48,48,41,59,13,10,32, - 32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,114,117,110,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47, - 47,32,116,104,105,115,32,105,115,32,116,104,101,32,99,111,100,101,32,116,104,97,116,32,114,117,110,115,32,116,104,105,115,32,116,104,114,101,97,100, - 32,45,32,119,101,39,108,108,32,108,111,111,112,32,99,111,110,116,105,110,117,111,117,115,108,121,44,13,10,32,32,32,32,32,32,32,32,47,47,32, - 117,112,100,97,116,105,110,103,32,116,104,101,32,99,111,45,111,114,100,105,110,97,116,101,115,32,111,102,32,111,117,114,32,98,108,111,98,46,13,10, - 13,10,32,32,32,32,32,32,32,32,47,47,32,116,104,114,101,97,100,83,104,111,117,108,100,69,120,105,116,40,41,32,114,101,116,117,114,110,115,32, - 116,114,117,101,32,119,104,101,110,32,116,104,101,32,115,116,111,112,84,104,114,101,97,100,40,41,32,109,101,116,104,111,100,32,104,97,115,32,98,101, - 101,110,13,10,32,32,32,32,32,32,32,32,47,47,32,99,97,108,108,101,100,44,32,115,111,32,119,101,32,115,104,111,117,108,100,32,99,104,101,99, - 107,32,105,116,32,111,102,116,101,110,44,32,97,110,100,32,101,120,105,116,32,97,115,32,115,111,111,110,32,97,115,32,105,116,32,103,101,116,115,32, - 102,108,97,103,103,101,100,46,13,10,32,32,32,32,32,32,32,32,119,104,105,108,101,32,40,33,32,116,104,114,101,97,100,83,104,111,117,108,100,69, - 120,105,116,40,41,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,109,111,118,101,66,97,108,108,40, - 41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32,115,108,101,101,112,32,97,32,98,105,116,32,115,111,32,116,104,101,32, - 116,104,114,101,97,100,115,32,100,111,110,39,116,32,97,108,108,32,103,114,105,110,100,32,116,104,101,32,67,80,85,32,116,111,32,97,32,104,97,108, - 116,46,46,13,10,32,32,32,32,32,32,32,32,32,32,32,32,119,97,105,116,32,40,105,110,116,101,114,118,97,108,41,59,13,10,32,32,32,32,32, - 32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,106,117,99,101,95,85,115,101,68,101,98,117,103,103,105,110,103,78,101,119,79, - 112,101,114,97,116,111,114,13,10,125,59,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,13,10,99,108,97,115,115,32,68,101,109,111,84,104,114,101,97,100,32,32,32,32,58,32,112,117,98,108,105,99,32,66,111, + 117,110,99,105,110,103,66,97,108,108,67,111,109,112,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112, + 117,98,108,105,99,32,84,104,114,101,97,100,13,10,123,13,10,32,32,32,32,105,110,116,32,105,110,116,101,114,118,97,108,59,13,10,13,10,112,117, + 98,108,105,99,58,13,10,32,32,32,32,68,101,109,111,84,104,114,101,97,100,40,41,13,10,32,32,32,32,32,32,32,32,58,32,84,104,114,101,97, + 100,32,40,84,40,34,74,117,99,101,32,68,101,109,111,32,84,104,114,101,97,100,34,41,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32, + 32,32,105,110,116,101,114,118,97,108,32,61,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110, + 101,120,116,73,110,116,32,40,53,48,41,32,43,32,54,59,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,103,105,118,101,32,116,104,101,32, + 116,104,114,101,97,100,115,32,97,32,114,97,110,100,111,109,32,112,114,105,111,114,105,116,121,44,32,115,111,32,115,111,109,101,32,119,105,108,108,32, + 109,111,118,101,32,109,111,114,101,13,10,32,32,32,32,32,32,32,32,47,47,32,115,109,111,111,116,104,108,121,32,116,104,97,110,32,111,116,104,101, + 114,115,46,46,13,10,32,32,32,32,32,32,32,32,115,116,97,114,116,84,104,114,101,97,100,32,40,82,97,110,100,111,109,58,58,103,101,116,83,121, + 115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,73,110,116,32,40,51,41,32,43,32,51,41,59,13,10,32,32,32,32,125,13,10,13, + 10,32,32,32,32,126,68,101,109,111,84,104,114,101,97,100,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,97,108, + 108,111,119,32,116,104,101,32,116,104,114,101,97,100,32,50,32,115,101,99,111,110,100,115,32,116,111,32,115,116,111,112,32,99,108,101,97,110,108,121, + 32,45,32,115,104,111,117,108,100,32,98,101,32,112,108,101,110,116,121,32,111,102,32,116,105,109,101,46,13,10,32,32,32,32,32,32,32,32,115,116, + 111,112,84,104,114,101,97,100,32,40,50,48,48,48,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,114,117,110,40, + 41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,116,104,105,115,32,105,115,32,116,104,101,32,99,111,100,101,32,116,104, + 97,116,32,114,117,110,115,32,116,104,105,115,32,116,104,114,101,97,100,32,45,32,119,101,39,108,108,32,108,111,111,112,32,99,111,110,116,105,110,117, + 111,117,115,108,121,44,13,10,32,32,32,32,32,32,32,32,47,47,32,117,112,100,97,116,105,110,103,32,116,104,101,32,99,111,45,111,114,100,105,110, + 97,116,101,115,32,111,102,32,111,117,114,32,98,108,111,98,46,13,10,13,10,32,32,32,32,32,32,32,32,47,47,32,116,104,114,101,97,100,83,104, + 111,117,108,100,69,120,105,116,40,41,32,114,101,116,117,114,110,115,32,116,114,117,101,32,119,104,101,110,32,116,104,101,32,115,116,111,112,84,104,114, + 101,97,100,40,41,32,109,101,116,104,111,100,32,104,97,115,32,98,101,101,110,13,10,32,32,32,32,32,32,32,32,47,47,32,99,97,108,108,101,100, + 44,32,115,111,32,119,101,32,115,104,111,117,108,100,32,99,104,101,99,107,32,105,116,32,111,102,116,101,110,44,32,97,110,100,32,101,120,105,116,32, + 97,115,32,115,111,111,110,32,97,115,32,105,116,32,103,101,116,115,32,102,108,97,103,103,101,100,46,13,10,32,32,32,32,32,32,32,32,119,104,105, + 108,101,32,40,33,32,116,104,114,101,97,100,83,104,111,117,108,100,69,120,105,116,40,41,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32, + 32,32,32,32,32,32,32,32,32,32,109,111,118,101,66,97,108,108,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,47,47,32, + 115,108,101,101,112,32,97,32,98,105,116,32,115,111,32,116,104,101,32,116,104,114,101,97,100,115,32,100,111,110,39,116,32,97,108,108,32,103,114,105, + 110,100,32,116,104,101,32,67,80,85,32,116,111,32,97,32,104,97,108,116,46,46,13,10,32,32,32,32,32,32,32,32,32,32,32,32,119,97,105,116, + 32,40,105,110,116,101,114,118,97,108,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,106,117, + 99,101,95,85,115,101,68,101,98,117,103,103,105,110,103,78,101,119,79,112,101,114,97,116,111,114,13,10,125,59,13,10,13,10,13,10,47,47,61,61, 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99,108,97,115,115,32,68,101,109,111,84,104,114,101,97,100,80,111,111,108,74, - 111,98,32,32,58,32,112,117,98,108,105,99,32,66,111,117,110,99,105,110,103,66,97,108,108,67,111,109,112,44,13,10,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,84,104,114,101,97,100,80,111,111,108,74,111,98,13, - 10,123,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,68,101,109,111,84,104,114,101,97,100,80,111,111,108,74,111,98,40,41,13,10,32,32, - 32,32,32,32,32,32,58,32,84,104,114,101,97,100,80,111,111,108,74,111,98,32,40,84,40,34,68,101,109,111,32,84,104,114,101,97,100,112,111,111, - 108,32,74,111,98,34,41,41,13,10,32,32,32,32,123,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,68,101,109,111,84,104,114,101,97, - 100,80,111,111,108,74,111,98,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,74,111,98,83,116,97,116,117, - 115,32,114,117,110,74,111,98,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,116,104,105,115,32,105,115,32,116,104, - 101,32,99,111,100,101,32,116,104,97,116,32,114,117,110,115,32,116,104,105,115,32,106,111,98,46,32,73,116,39,108,108,32,98,101,32,114,101,112,101, - 97,116,101,100,108,121,32,99,97,108,108,101,100,32,117,110,116,105,108,32,119,101,32,114,101,116,117,114,110,13,10,32,32,32,32,32,32,32,32,47, - 47,32,106,111,98,72,97,115,70,105,110,105,115,104,101,100,32,105,110,115,116,101,97,100,32,111,102,32,106,111,98,78,101,101,100,115,82,117,110,110, - 105,110,103,65,103,97,105,110,46,13,10,13,10,32,32,32,32,32,32,32,32,109,111,118,101,66,97,108,108,40,41,59,13,10,32,32,32,32,32,32, - 32,32,84,104,114,101,97,100,58,58,115,108,101,101,112,32,40,51,48,41,59,13,10,13,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32, - 106,111,98,78,101,101,100,115,82,117,110,110,105,110,103,65,103,97,105,110,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100, - 32,114,101,109,111,118,101,100,70,114,111,109,81,117,101,117,101,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,84, - 104,105,115,32,105,115,32,99,97,108,108,101,100,32,116,111,32,116,101,108,108,32,117,115,32,116,104,97,116,32,111,117,114,32,106,111,98,32,104,97, - 115,32,98,101,101,110,32,114,101,109,111,118,101,100,32,102,114,111,109,32,116,104,101,32,112,111,111,108,46,13,10,32,32,32,32,32,32,32,32,47, - 47,32,73,110,32,116,104,105,115,32,99,97,115,101,32,116,104,101,114,101,39,115,32,110,111,32,110,101,101,100,32,116,111,32,100,111,32,97,110,121, - 116,104,105,110,103,32,104,101,114,101,46,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,106,117,99,101,95,85,115,101,68,101,98,117,103,103, - 105,110,103,78,101,119,79,112,101,114,97,116,111,114,13,10,125,59,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99,108, + 97,115,115,32,68,101,109,111,84,104,114,101,97,100,80,111,111,108,74,111,98,32,32,58,32,112,117,98,108,105,99,32,66,111,117,110,99,105,110,103, + 66,97,108,108,67,111,109,112,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117, + 98,108,105,99,32,84,104,114,101,97,100,80,111,111,108,74,111,98,13,10,123,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,68,101,109,111, + 84,104,114,101,97,100,80,111,111,108,74,111,98,40,41,13,10,32,32,32,32,32,32,32,32,58,32,84,104,114,101,97,100,80,111,111,108,74,111,98, + 32,40,84,40,34,68,101,109,111,32,84,104,114,101,97,100,112,111,111,108,32,74,111,98,34,41,41,13,10,32,32,32,32,123,13,10,32,32,32,32, + 125,13,10,13,10,32,32,32,32,126,68,101,109,111,84,104,114,101,97,100,80,111,111,108,74,111,98,40,41,13,10,32,32,32,32,123,13,10,32,32, + 32,32,125,13,10,13,10,32,32,32,32,74,111,98,83,116,97,116,117,115,32,114,117,110,74,111,98,40,41,13,10,32,32,32,32,123,13,10,32,32, + 32,32,32,32,32,32,47,47,32,116,104,105,115,32,105,115,32,116,104,101,32,99,111,100,101,32,116,104,97,116,32,114,117,110,115,32,116,104,105,115, + 32,106,111,98,46,32,73,116,39,108,108,32,98,101,32,114,101,112,101,97,116,101,100,108,121,32,99,97,108,108,101,100,32,117,110,116,105,108,32,119, + 101,32,114,101,116,117,114,110,13,10,32,32,32,32,32,32,32,32,47,47,32,106,111,98,72,97,115,70,105,110,105,115,104,101,100,32,105,110,115,116, + 101,97,100,32,111,102,32,106,111,98,78,101,101,100,115,82,117,110,110,105,110,103,65,103,97,105,110,46,13,10,13,10,32,32,32,32,32,32,32,32, + 109,111,118,101,66,97,108,108,40,41,59,13,10,32,32,32,32,32,32,32,32,84,104,114,101,97,100,58,58,115,108,101,101,112,32,40,51,48,41,59, + 13,10,13,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,106,111,98,78,101,101,100,115,82,117,110,110,105,110,103,65,103,97,105,110,59, + 13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,114,101,109,111,118,101,100,70,114,111,109,81,117,101,117,101,40,41,13,10, + 32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,84,104,105,115,32,105,115,32,99,97,108,108,101,100,32,116,111,32,116,101,108,108, + 32,117,115,32,116,104,97,116,32,111,117,114,32,106,111,98,32,104,97,115,32,98,101,101,110,32,114,101,109,111,118,101,100,32,102,114,111,109,32,116, + 104,101,32,112,111,111,108,46,13,10,32,32,32,32,32,32,32,32,47,47,32,73,110,32,116,104,105,115,32,99,97,115,101,32,116,104,101,114,101,39, + 115,32,110,111,32,110,101,101,100,32,116,111,32,100,111,32,97,110,121,116,104,105,110,103,32,104,101,114,101,46,13,10,32,32,32,32,125,13,10,13, + 10,32,32,32,32,106,117,99,101,95,85,115,101,68,101,98,117,103,103,105,110,103,78,101,119,79,112,101,114,97,116,111,114,13,10,125,59,13,10,13, + 10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,99,108,97,115,115,32,84,104,114,101,97,100,105,110,103,68, - 101,109,111,32,32,58,32,112,117,98,108,105,99,32,67,111,109,112,111,110,101,110,116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,84,105,109,101,114,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,112,117,98,108,105,99,32,66,117,116,116,111,110,76,105,115,116,101,110,101,114,13,10,123,13,10,32,32,32,32,98,111,111, - 108,32,105,115,85,115,105,110,103,80,111,111,108,59,13,10,32,32,32,32,84,104,114,101,97,100,80,111,111,108,32,112,111,111,108,59,13,10,32,32, - 32,32,84,101,120,116,66,117,116,116,111,110,42,32,99,111,110,116,114,111,108,66,117,116,116,111,110,59,13,10,13,10,112,117,98,108,105,99,58,13, - 10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,13,10,99,108,97,115,115,32,84,104,114,101,97,100,105,110,103,68,101,109,111,32,32,58,32,112,117,98,108,105,99,32,67,111,109,112,111,110,101, + 110,116,44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,84,105,109,101,114, + 44,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,117,98,108,105,99,32,66,117,116,116,111,110,76, + 105,115,116,101,110,101,114,13,10,123,13,10,32,32,32,32,98,111,111,108,32,105,115,85,115,105,110,103,80,111,111,108,59,13,10,32,32,32,32,84, + 104,114,101,97,100,80,111,111,108,32,112,111,111,108,59,13,10,32,32,32,32,84,101,120,116,66,117,116,116,111,110,42,32,99,111,110,116,114,111,108, + 66,117,116,116,111,110,59,13,10,13,10,112,117,98,108,105,99,58,13,10,32,32,32,32,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61, 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,13,10,32,32,32,32,84,104,114,101,97,100,105,110,103,68,101,109,111,40,41,13,10,32,32,32,32,32,32,32,32,58,32,112,111, - 111,108,32,40,51,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,115,85,115,105,110,103,80,111,111,108,32,61,32,102,97,108, - 115,101,59,13,10,13,10,32,32,32,32,32,32,32,32,115,101,116,78,97,109,101,32,40,84,40,34,77,117,108,116,105,116,104,114,101,97,100,105,110, - 103,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,115,101,116,79,112,97,113,117,101,32,40,116,114,117,101,41,59,13,10,32,32,32,32, - 125,13,10,13,10,32,32,32,32,126,84,104,114,101,97,100,105,110,103,68,101,109,111,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32, - 32,32,112,111,111,108,46,114,101,109,111,118,101,65,108,108,74,111,98,115,32,40,116,114,117,101,44,32,50,48,48,48,41,59,13,10,13,10,32,32, - 32,32,32,32,32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114,101,110,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32, - 32,47,47,32,116,104,105,115,32,103,101,116,115,32,99,97,108,108,101,100,32,119,104,101,110,32,97,32,99,111,109,112,111,110,101,110,116,32,105,115, - 32,97,100,100,101,100,32,111,114,32,114,101,109,111,118,101,100,32,102,114,111,109,32,97,32,112,97,114,101,110,116,32,99,111,109,112,111,110,101,110, - 116,46,13,10,32,32,32,32,118,111,105,100,32,112,97,114,101,110,116,72,105,101,114,97,114,99,104,121,67,104,97,110,103,101,100,40,41,13,10,32, - 32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,119,101,39,108,108,32,117,115,101,32,116,104,105,115,32,97,115,32,97,110,32,111,112, - 112,111,114,116,117,110,105,116,121,32,116,111,32,115,116,97,114,116,32,97,110,100,32,115,116,111,112,32,116,104,101,32,116,104,114,101,97,100,115,44, - 32,115,111,32,116,104,97,116,13,10,32,32,32,32,32,32,32,32,47,47,32,119,101,32,100,111,110,39,116,32,108,101,97,118,101,32,116,104,101,109, - 32,103,111,105,110,103,32,119,104,101,110,32,116,104,101,32,99,111,109,112,111,110,101,110,116,39,115,32,110,111,116,32,97,99,116,117,97,108,108,121, - 32,118,105,115,105,98,108,101,46,13,10,32,32,32,32,32,32,32,32,115,116,111,112,84,105,109,101,114,40,41,59,13,10,13,10,32,32,32,32,32, - 32,32,32,112,111,111,108,46,114,101,109,111,118,101,65,108,108,74,111,98,115,32,40,116,114,117,101,44,32,52,48,48,48,41,59,13,10,32,32,32, - 32,32,32,32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114,101,110,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100, - 65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,99,111,110,116,114,111,108,66,117,116,116,111,110,32,61,32,110,101,119,32,84,101,120,116, - 66,117,116,116,111,110,32,40,84,40,34,84,104,114,101,97,100,32,116,121,112,101,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,99,111,110, - 116,114,111,108,66,117,116,116,111,110,45,62,99,104,97,110,103,101,87,105,100,116,104,84,111,70,105,116,84,101,120,116,32,40,50,48,41,59,13,10, - 32,32,32,32,32,32,32,32,99,111,110,116,114,111,108,66,117,116,116,111,110,45,62,115,101,116,84,111,112,76,101,102,116,80,111,115,105,116,105,111, - 110,32,40,50,48,44,32,50,48,41,59,13,10,32,32,32,32,32,32,32,32,99,111,110,116,114,111,108,66,117,116,116,111,110,45,62,115,101,116,84, - 114,105,103,103,101,114,101,100,79,110,77,111,117,115,101,68,111,119,110,32,40,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,99,111,110, - 116,114,111,108,66,117,116,116,111,110,45,62,115,101,116,65,108,119,97,121,115,79,110,84,111,112,32,40,116,114,117,101,41,59,13,10,32,32,32,32, - 32,32,32,32,99,111,110,116,114,111,108,66,117,116,116,111,110,45,62,97,100,100,66,117,116,116,111,110,76,105,115,116,101,110,101,114,32,40,116,104, - 105,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,105,115,83,104,111,119,105,110,103,40,41,41,13,10,32,32,32,32,32,32, - 32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,119,104,105,108,101,32,40,103,101,116,78,117,109,67,104,105,108,100,67,111,109,112,111, - 110,101,110,116,115,40,41,32,60,32,53,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,100,100,65,66,97,108,108,40,41, - 59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,116,97,114,116,84,105,109,101,114,32,40,50,48,48,48,41,59,13,10,32,32,32, - 32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,112,97,105,110,116,32,40,71,114,97,112,104,105,99, - 115,38,32,103,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,103,46,102,105,108,108,65,108,108,32,40,67,111,108,111,117,114,115, - 58,58,119,104,105,116,101,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,115,101,116,85,115,105,110,103,80,111,111, - 108,32,40,98,111,111,108,32,117,115,101,80,111,111,108,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,115,85,115,105,110,103, - 80,111,111,108,32,61,32,117,115,101,80,111,111,108,59,13,10,32,32,32,32,32,32,32,32,112,97,114,101,110,116,72,105,101,114,97,114,99,104,121, - 67,104,97,110,103,101,100,40,41,59,32,47,47,32,114,101,115,101,116,115,32,101,118,101,114,121,116,104,105,110,103,13,10,32,32,32,32,125,13,10, - 13,10,32,32,32,32,118,111,105,100,32,97,100,100,65,66,97,108,108,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,102, - 32,40,105,115,85,115,105,110,103,80,111,111,108,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,68, - 101,109,111,84,104,114,101,97,100,80,111,111,108,74,111,98,42,32,110,101,119,67,111,109,112,32,61,32,110,101,119,32,68,101,109,111,84,104,114,101, - 97,100,80,111,111,108,74,111,98,40,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105, - 98,108,101,32,40,110,101,119,67,111,109,112,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,110,101,119,67,111,109,112,45,62,112,97,114, - 101,110,116,83,105,122,101,67,104,97,110,103,101,100,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,112,111,111,108,46,97,100, - 100,74,111,98,32,40,110,101,119,67,111,109,112,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101, - 13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,68,101,109,111,84,104,114,101,97,100,42,32,110,101,119, - 67,111,109,112,32,61,32,110,101,119,32,68,101,109,111,84,104,114,101,97,100,40,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,97,100, - 100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,110,101,119,67,111,109,112,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32, - 110,101,119,67,111,109,112,45,62,112,97,114,101,110,116,83,105,122,101,67,104,97,110,103,101,100,40,41,59,13,10,32,32,32,32,32,32,32,32,125, - 13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,114,101,109,111,118,101,65,66,97,108,108,40,41,13,10,32,32,32,32,123, - 13,10,32,32,32,32,32,32,32,32,105,102,32,40,105,115,85,115,105,110,103,80,111,111,108,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,84,104,114,101,97,100,80,111,111,108,74,111,98,42,32,106,111,98,84,111,82,101,109,111,118,101,32,61,32, - 112,111,111,108,46,103,101,116,74,111,98,32,40,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110, - 101,120,116,73,110,116,32,40,112,111,111,108,46,103,101,116,78,117,109,74,111,98,115,40,41,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32, - 32,32,32,32,105,102,32,40,106,111,98,84,111,82,101,109,111,118,101,32,33,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123, - 13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,111,111,108,46,114,101,109,111,118,101,74,111,98,32,40,106,111,98,84,111,82, - 101,109,111,118,101,44,32,116,114,117,101,44,32,52,48,48,48,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,100,101,108, - 101,116,101,32,106,111,98,84,111,82,101,109,111,118,101,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32, - 32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32, - 32,105,102,32,40,103,101,116,78,117,109,67,104,105,108,100,67,111,109,112,111,110,101,110,116,115,40,41,32,62,32,49,41,13,10,32,32,32,32,32, - 32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,67,111,109,112,111,110,101,110,116,42,32,98,97,108, - 108,32,61,32,103,101,116,67,104,105,108,100,67,111,109,112,111,110,101,110,116,32,40,49,32,43,32,82,97,110,100,111,109,58,58,103,101,116,83,121, - 115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,73,110,116,32,40,103,101,116,78,117,109,67,104,105,108,100,67,111,109,112,111,110,101, - 110,116,115,40,41,32,45,32,49,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,100,121,110,97, - 109,105,99,95,99,97,115,116,32,60,66,117,116,116,111,110,42,62,32,40,98,97,108,108,41,32,61,61,32,48,41,32,47,47,32,100,111,110,39,116, - 32,100,101,108,101,116,101,32,111,117,114,32,98,117,116,116,111,110,33,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 32,100,101,108,101,116,101,32,98,97,108,108,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,125,13, - 10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,116,105,109,101,114,67,97,108,108,98,97,99,107,40,41,13,10,32,32,32,32, - 123,13,10,32,32,32,32,32,32,32,32,105,102,32,40,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41, - 46,110,101,120,116,66,111,111,108,40,41,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32, - 40,103,101,116,78,117,109,67,104,105,108,100,67,111,109,112,111,110,101,110,116,115,40,41,32,60,61,32,49,48,41,13,10,32,32,32,32,32,32,32, - 32,32,32,32,32,32,32,32,32,97,100,100,65,66,97,108,108,40,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32, - 32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,103,101,116,78,117,109, - 67,104,105,108,100,67,111,109,112,111,110,101,110,116,115,40,41,32,62,32,51,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, - 114,101,109,111,118,101,65,66,97,108,108,40,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32, - 118,111,105,100,32,98,117,116,116,111,110,67,108,105,99,107,101,100,32,40,66,117,116,116,111,110,42,32,98,117,116,116,111,110,41,13,10,32,32,32, - 32,123,13,10,32,32,32,32,32,32,32,32,80,111,112,117,112,77,101,110,117,32,109,59,13,10,32,32,32,32,32,32,32,32,109,46,97,100,100,73, - 116,101,109,32,40,49,44,32,84,40,34,85,115,101,32,111,110,101,32,116,104,114,101,97,100,32,112,101,114,32,98,97,108,108,34,41,44,32,116,114, - 117,101,44,32,33,32,105,115,85,115,105,110,103,80,111,111,108,41,59,13,10,32,32,32,32,32,32,32,32,109,46,97,100,100,73,116,101,109,32,40, - 50,44,32,84,40,34,85,115,101,32,97,32,116,104,114,101,97,100,32,112,111,111,108,34,41,44,32,116,114,117,101,44,32,105,115,85,115,105,110,103, - 80,111,111,108,41,59,13,10,13,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,105,110,116,32,114,101,115,32,61,32,109,46,115,104,111,119, - 65,116,32,40,98,117,116,116,111,110,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,114,101,115,32,33,61,32,48,41,13,10,32, - 32,32,32,32,32,32,32,32,32,32,32,115,101,116,85,115,105,110,103,80,111,111,108,32,40,114,101,115,32,61,61,32,50,41,59,13,10,32,32,32, - 32,125,13,10,125,59,13,10,13,10,13,10,13,10,47,47,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,32,32,32,32,84,104,114,101,97,100,105,110,103,68, + 101,109,111,40,41,13,10,32,32,32,32,32,32,32,32,58,32,112,111,111,108,32,40,51,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32, + 32,32,105,115,85,115,105,110,103,80,111,111,108,32,61,32,102,97,108,115,101,59,13,10,13,10,32,32,32,32,32,32,32,32,115,101,116,78,97,109, + 101,32,40,84,40,34,77,117,108,116,105,116,104,114,101,97,100,105,110,103,34,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,115,101,116,79, + 112,97,113,117,101,32,40,116,114,117,101,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,126,84,104,114,101,97,100,105,110,103,68,101, + 109,111,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,112,111,111,108,46,114,101,109,111,118,101,65,108,108,74,111,98,115,32, + 40,116,114,117,101,44,32,50,48,48,48,41,59,13,10,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114, + 101,110,40,41,59,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,47,47,32,116,104,105,115,32,103,101,116,115,32,99,97,108,108,101,100,32, + 119,104,101,110,32,97,32,99,111,109,112,111,110,101,110,116,32,105,115,32,97,100,100,101,100,32,111,114,32,114,101,109,111,118,101,100,32,102,114,111, + 109,32,97,32,112,97,114,101,110,116,32,99,111,109,112,111,110,101,110,116,46,13,10,32,32,32,32,118,111,105,100,32,112,97,114,101,110,116,72,105, + 101,114,97,114,99,104,121,67,104,97,110,103,101,100,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,47,47,32,119,101,39,108, + 108,32,117,115,101,32,116,104,105,115,32,97,115,32,97,110,32,111,112,112,111,114,116,117,110,105,116,121,32,116,111,32,115,116,97,114,116,32,97,110, + 100,32,115,116,111,112,32,116,104,101,32,116,104,114,101,97,100,115,44,32,115,111,32,116,104,97,116,13,10,32,32,32,32,32,32,32,32,47,47,32, + 119,101,32,100,111,110,39,116,32,108,101,97,118,101,32,116,104,101,109,32,103,111,105,110,103,32,119,104,101,110,32,116,104,101,32,99,111,109,112,111, + 110,101,110,116,39,115,32,110,111,116,32,97,99,116,117,97,108,108,121,32,118,105,115,105,98,108,101,46,13,10,32,32,32,32,32,32,32,32,115,116, + 111,112,84,105,109,101,114,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,112,111,111,108,46,114,101,109,111,118,101,65,108,108,74,111,98,115, + 32,40,116,114,117,101,44,32,52,48,48,48,41,59,13,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,65,108,108,67,104,105,108,100,114,101, + 110,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,99,111,110,116,114, + 111,108,66,117,116,116,111,110,32,61,32,110,101,119,32,84,101,120,116,66,117,116,116,111,110,32,40,84,40,34,84,104,114,101,97,100,32,116,121,112, + 101,34,41,41,41,59,13,10,32,32,32,32,32,32,32,32,99,111,110,116,114,111,108,66,117,116,116,111,110,45,62,99,104,97,110,103,101,87,105,100, + 116,104,84,111,70,105,116,84,101,120,116,32,40,50,48,41,59,13,10,32,32,32,32,32,32,32,32,99,111,110,116,114,111,108,66,117,116,116,111,110, + 45,62,115,101,116,84,111,112,76,101,102,116,80,111,115,105,116,105,111,110,32,40,50,48,44,32,50,48,41,59,13,10,32,32,32,32,32,32,32,32, + 99,111,110,116,114,111,108,66,117,116,116,111,110,45,62,115,101,116,84,114,105,103,103,101,114,101,100,79,110,77,111,117,115,101,68,111,119,110,32,40, + 116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,99,111,110,116,114,111,108,66,117,116,116,111,110,45,62,115,101,116,65,108,119,97,121,115, + 79,110,84,111,112,32,40,116,114,117,101,41,59,13,10,32,32,32,32,32,32,32,32,99,111,110,116,114,111,108,66,117,116,116,111,110,45,62,97,100, + 100,66,117,116,116,111,110,76,105,115,116,101,110,101,114,32,40,116,104,105,115,41,59,13,10,13,10,32,32,32,32,32,32,32,32,105,102,32,40,105, + 115,83,104,111,119,105,110,103,40,41,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,119,104,105,108, + 101,32,40,103,101,116,78,117,109,67,104,105,108,100,67,111,109,112,111,110,101,110,116,115,40,41,32,60,32,53,41,13,10,32,32,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,97,100,100,65,66,97,108,108,40,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,116,97,114, + 116,84,105,109,101,114,32,40,50,48,48,48,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32, + 118,111,105,100,32,112,97,105,110,116,32,40,71,114,97,112,104,105,99,115,38,32,103,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32, + 32,103,46,102,105,108,108,65,108,108,32,40,67,111,108,111,117,114,115,58,58,119,104,105,116,101,41,59,13,10,32,32,32,32,125,13,10,13,10,32, + 32,32,32,118,111,105,100,32,115,101,116,85,115,105,110,103,80,111,111,108,32,40,98,111,111,108,32,117,115,101,80,111,111,108,41,13,10,32,32,32, + 32,123,13,10,32,32,32,32,32,32,32,32,105,115,85,115,105,110,103,80,111,111,108,32,61,32,117,115,101,80,111,111,108,59,13,10,32,32,32,32, + 32,32,32,32,112,97,114,101,110,116,72,105,101,114,97,114,99,104,121,67,104,97,110,103,101,100,40,41,59,32,47,47,32,114,101,115,101,116,115,32, + 101,118,101,114,121,116,104,105,110,103,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,97,100,100,65,66,97,108,108,40,41, + 13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,102,32,40,105,115,85,115,105,110,103,80,111,111,108,41,13,10,32,32,32,32,32, + 32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,68,101,109,111,84,104,114,101,97,100,80,111,111,108,74,111,98,42,32,110,101,119, + 67,111,109,112,32,61,32,110,101,119,32,68,101,109,111,84,104,114,101,97,100,80,111,111,108,74,111,98,40,41,59,13,10,32,32,32,32,32,32,32, + 32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,110,101,119,67,111,109,112,41,59,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,110,101,119,67,111,109,112,45,62,112,97,114,101,110,116,83,105,122,101,67,104,97,110,103,101,100,40,41,59,13,10,13,10, + 32,32,32,32,32,32,32,32,32,32,32,32,112,111,111,108,46,97,100,100,74,111,98,32,40,110,101,119,67,111,109,112,41,59,13,10,32,32,32,32, + 32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32, + 32,32,32,32,68,101,109,111,84,104,114,101,97,100,42,32,110,101,119,67,111,109,112,32,61,32,110,101,119,32,68,101,109,111,84,104,114,101,97,100, + 40,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,97,100,100,65,110,100,77,97,107,101,86,105,115,105,98,108,101,32,40,110,101,119,67, + 111,109,112,41,59,13,10,32,32,32,32,32,32,32,32,32,32,32,32,110,101,119,67,111,109,112,45,62,112,97,114,101,110,116,83,105,122,101,67,104, + 97,110,103,101,100,40,41,59,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,114, + 101,109,111,118,101,65,66,97,108,108,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,102,32,40,105,115,85,115,105,110,103, + 80,111,111,108,41,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,84,104,114,101,97,100,80,111,111,108, + 74,111,98,42,32,106,111,98,84,111,82,101,109,111,118,101,32,61,32,112,111,111,108,46,103,101,116,74,111,98,32,40,82,97,110,100,111,109,58,58, + 103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,73,110,116,32,40,112,111,111,108,46,103,101,116,78,117,109,74,111, + 98,115,40,41,41,41,59,13,10,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,106,111,98,84,111,82,101,109,111,118,101,32,33, + 61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,112,111,111, + 108,46,114,101,109,111,118,101,74,111,98,32,40,106,111,98,84,111,82,101,109,111,118,101,44,32,116,114,117,101,44,32,52,48,48,48,41,59,13,10, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32,106,111,98,84,111,82,101,109,111,118,101,59,13,10,32,32,32, + 32,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32, + 32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,103,101,116,78,117,109,67,104,105,108,100,67,111,109,112,111, + 110,101,110,116,115,40,41,32,62,32,49,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,32,32,32, + 32,32,32,32,32,67,111,109,112,111,110,101,110,116,42,32,98,97,108,108,32,61,32,103,101,116,67,104,105,108,100,67,111,109,112,111,110,101,110,116, + 32,40,49,32,43,32,82,97,110,100,111,109,58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,73,110,116,32, + 40,103,101,116,78,117,109,67,104,105,108,100,67,111,109,112,111,110,101,110,116,115,40,41,32,45,32,49,41,41,59,13,10,13,10,32,32,32,32,32, + 32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,100,121,110,97,109,105,99,95,99,97,115,116,32,60,66,117,116,116,111,110,42,62,32,40,98, + 97,108,108,41,32,61,61,32,48,41,32,47,47,32,100,111,110,39,116,32,100,101,108,101,116,101,32,111,117,114,32,98,117,116,116,111,110,33,13,10, + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32,98,97,108,108,59,13,10,32,32,32,32,32,32, + 32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,116,105, + 109,101,114,67,97,108,108,98,97,99,107,40,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,105,102,32,40,82,97,110,100,111,109, + 58,58,103,101,116,83,121,115,116,101,109,82,97,110,100,111,109,40,41,46,110,101,120,116,66,111,111,108,40,41,41,13,10,32,32,32,32,32,32,32, + 32,123,13,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,103,101,116,78,117,109,67,104,105,108,100,67,111,109,112,111,110,101,110,116, + 115,40,41,32,60,61,32,49,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,100,100,65,66,97,108,108,40,41,59,13, + 10,32,32,32,32,32,32,32,32,125,13,10,32,32,32,32,32,32,32,32,101,108,115,101,13,10,32,32,32,32,32,32,32,32,123,13,10,32,32,32, + 32,32,32,32,32,32,32,32,32,105,102,32,40,103,101,116,78,117,109,67,104,105,108,100,67,111,109,112,111,110,101,110,116,115,40,41,32,62,32,51, + 41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,109,111,118,101,65,66,97,108,108,40,41,59,13,10,32,32,32,32,32, + 32,32,32,125,13,10,32,32,32,32,125,13,10,13,10,32,32,32,32,118,111,105,100,32,98,117,116,116,111,110,67,108,105,99,107,101,100,32,40,66, + 117,116,116,111,110,42,32,98,117,116,116,111,110,41,13,10,32,32,32,32,123,13,10,32,32,32,32,32,32,32,32,80,111,112,117,112,77,101,110,117, + 32,109,59,13,10,32,32,32,32,32,32,32,32,109,46,97,100,100,73,116,101,109,32,40,49,44,32,84,40,34,85,115,101,32,111,110,101,32,116,104, + 114,101,97,100,32,112,101,114,32,98,97,108,108,34,41,44,32,116,114,117,101,44,32,33,32,105,115,85,115,105,110,103,80,111,111,108,41,59,13,10, + 32,32,32,32,32,32,32,32,109,46,97,100,100,73,116,101,109,32,40,50,44,32,84,40,34,85,115,101,32,97,32,116,104,114,101,97,100,32,112,111, + 111,108,34,41,44,32,116,114,117,101,44,32,105,115,85,115,105,110,103,80,111,111,108,41,59,13,10,13,10,32,32,32,32,32,32,32,32,99,111,110, + 115,116,32,105,110,116,32,114,101,115,32,61,32,109,46,115,104,111,119,65,116,32,40,98,117,116,116,111,110,41,59,13,10,13,10,32,32,32,32,32, + 32,32,32,105,102,32,40,114,101,115,32,33,61,32,48,41,13,10,32,32,32,32,32,32,32,32,32,32,32,32,115,101,116,85,115,105,110,103,80,111, + 111,108,32,40,114,101,115,32,61,61,32,50,41,59,13,10,32,32,32,32,125,13,10,125,59,13,10,13,10,13,10,13,10,47,47,61,61,61,61,61, 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61, - 61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,67,111,109,112,111,110,101,110,116,42,32,99,114,101,97,116,101,84,104,114,101,97,100,105, - 110,103,68,101,109,111,40,41,13,10,123,13,10,32,32,32,32,114,101,116,117,114,110,32,110,101,119,32,84,104,114,101,97,100,105,110,103,68,101,109, - 111,40,41,59,13,10,125,13,10,0,0}; + 61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,13,10,67,111,109,112,111, + 110,101,110,116,42,32,99,114,101,97,116,101,84,104,114,101,97,100,105,110,103,68,101,109,111,40,41,13,10,123,13,10,32,32,32,32,114,101,116,117, + 114,110,32,110,101,119,32,84,104,114,101,97,100,105,110,103,68,101,109,111,40,41,59,13,10,125,13,10,0,0}; const char* BinaryData::threadingdemo_cpp = (const char*) temp14; static const unsigned char temp15[] = {60,116,114,101,101,62,13,10,32,32,32,32,60,105,116,101,109,49,62,13,10,32,32,32,32,32,32,32,32,60,115,117,98,110,111,100,101,32,99,111, diff --git a/extras/juce demo/src/BinaryData.h b/extras/juce demo/src/BinaryData.h index 5e0d32dd68..19dffe220b 100644 --- a/extras/juce demo/src/BinaryData.h +++ b/extras/juce demo/src/BinaryData.h @@ -45,7 +45,7 @@ namespace BinaryData const int tabledemo_cppSize = 12381; extern const char* threadingdemo_cpp; - const int threadingdemo_cppSize = 10049; + const int threadingdemo_cppSize = 10068; extern const char* treedemo_xml; const int treedemo_xmlSize = 1126; diff --git a/src/juce_appframework/audio/audio_file_formats/juce_AudioThumbnail.cpp b/src/juce_appframework/audio/audio_file_formats/juce_AudioThumbnail.cpp index 28d9bf5137..49f3417102 100644 --- a/src/juce_appframework/audio/audio_file_formats/juce_AudioThumbnail.cpp +++ b/src/juce_appframework/audio/audio_file_formats/juce_AudioThumbnail.cpp @@ -105,7 +105,7 @@ void AudioThumbnail::setSource (InputSource* const newSource) clear(); - if (newSource != 0 + if (newSource != 0 && ! (cache.loadThumb (*this, newSource->hashCode()) && isFullyLoaded())) { diff --git a/src/juce_appframework/events/juce_MessageManager.h b/src/juce_appframework/events/juce_MessageManager.h index 04defe80d0..ef3bf458bc 100644 --- a/src/juce_appframework/events/juce_MessageManager.h +++ b/src/juce_appframework/events/juce_MessageManager.h @@ -71,7 +71,7 @@ public: /** Sends a signal that the dispatch loop should terminate. - After this is called, the runDispatchLoop() or runDispatchLoopUntil() methods + After this is called, the runDispatchLoop() or runDispatchLoopUntil() methods will be interrupted and will return. @see runDispatchLoop @@ -84,7 +84,7 @@ public: /** Synchronously dispatches messages until a given time has elapsed. - Returns false if a quit message has been posted by a call to stopDispatchLoop(), + Returns false if a quit message has been posted by a call to stopDispatchLoop(), otherwise returns true. */ bool runDispatchLoopUntil (int millisecondsToRunFor); diff --git a/src/juce_core/basics/juce_PlatformDefs.h b/src/juce_core/basics/juce_PlatformDefs.h index 3406d9c5f8..aef3a6bfbf 100644 --- a/src/juce_core/basics/juce_PlatformDefs.h +++ b/src/juce_core/basics/juce_PlatformDefs.h @@ -1,369 +1,369 @@ -/* - ============================================================================== - - This file is part of the JUCE library - "Jules' Utility Class Extensions" - Copyright 2004-7 by Raw Material Software ltd. - - ------------------------------------------------------------------------------ - - JUCE can be redistributed and/or modified under the terms of the - GNU General Public License, as published by the Free Software Foundation; - either version 2 of the License, or (at your option) any later version. - - JUCE is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with JUCE; if not, visit www.gnu.org/licenses or write to the - Free Software Foundation, Inc., 59 Temple Place, Suite 330, - Boston, MA 02111-1307 USA - - ------------------------------------------------------------------------------ - - If you'd like to release a closed-source product which uses JUCE, commercial - licenses are also available: visit www.rawmaterialsoftware.com/juce for - more information. - - ============================================================================== -*/ - -#ifndef __JUCE_PLATFORMDEFS_JUCEHEADER__ -#define __JUCE_PLATFORMDEFS_JUCEHEADER__ - -//============================================================================== -/* This file figures out which platform is being built, and defines some macros - that the rest of the code can use for OS-specific compilation. - - Macros that will be set here are: - - - One of JUCE_WIN32, JUCE_MAC or JUCE_LINUX. - - Either JUCE_32BIT or JUCE_64BIT, depending on the architecture. - - Either JUCE_LITTLE_ENDIAN or JUCE_BIG_ENDIAN. - - Either JUCE_INTEL or JUCE_PPC - - Either JUCE_GCC or JUCE_MSVC - - On the Mac, it also defines MACOS_10_2_OR_EARLIER if the build is targeting OSX10.2, - and MACOS_10_3_OR_EARLIER if it is targeting either 10.2 or 10.3 - - It also includes a set of macros for debug console output and assertions. - -*/ - -//============================================================================== -#if (defined (_WIN32) || defined (_WIN64)) - #define JUCE_WIN32 1 -#else - #if defined (LINUX) || defined (__linux__) - #define JUCE_LINUX 1 - #else - #define JUCE_MAC 1 - #endif -#endif - -//============================================================================== -#if JUCE_WIN32 - #ifdef _MSC_VER - #ifdef _WIN64 - #define JUCE_64BIT 1 - #else - #define JUCE_32BIT 1 - #endif - #endif - - #ifdef _DEBUG - #define JUCE_DEBUG 1 - #endif - - /** If defined, this indicates that the processor is little-endian. */ - #define JUCE_LITTLE_ENDIAN 1 - - #define JUCE_INTEL 1 -#endif - -//============================================================================== -#if JUCE_MAC - - #include - - #ifndef NDEBUG - #define JUCE_DEBUG 1 - #endif - - #ifdef __LITTLE_ENDIAN__ - #define JUCE_LITTLE_ENDIAN 1 - #else - #define JUCE_BIG_ENDIAN 1 - #endif - - #if defined (__ppc__) || defined (__ppc64__) - #define JUCE_PPC 1 - #else - #define JUCE_INTEL 1 - #endif - - #ifdef __LP64__ - #define JUCE_64BIT 1 - #else - #define JUCE_32BIT 1 - #endif - - #if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_3) - #define MACOS_10_2_OR_EARLIER 1 - #endif - - #if (! defined (MAC_OS_X_VERSION_10_4)) || (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4) - #define MACOS_10_3_OR_EARLIER 1 - #endif - - #if (! defined (MAC_OS_X_VERSION_10_5)) || (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5) - #define MACOS_10_4_OR_EARLIER 1 - #endif -#endif - -//============================================================================== -#if JUCE_LINUX - - #ifdef _DEBUG - #define JUCE_DEBUG 1 - #endif - - // Allow override for big-endian Linux platforms - #ifndef JUCE_BIG_ENDIAN - #define JUCE_LITTLE_ENDIAN 1 - #endif - - #if defined (__LP64__) || defined (_LP64) - #define JUCE_64BIT 1 - #else - #define JUCE_32BIT 1 - #endif - - #define JUCE_INTEL 1 -#endif - -//============================================================================== -#ifdef JUCE_FORCE_DEBUG - #undef JUCE_DEBUG - - #if JUCE_FORCE_DEBUG - #define JUCE_DEBUG 1 - #endif -#endif - -//============================================================================== -// Compiler type macros. - -#ifdef __GNUC__ - #define JUCE_GCC 1 -#elif defined (_MSC_VER) - #define JUCE_MSVC 1 - - #if _MSC_VER >= 1400 - #define JUCE_USE_INTRINSICS 1 - #endif -#else - #error unknown compiler -#endif - -/** This macro defines the C calling convention used as the standard for Juce calls. */ -#if JUCE_MSVC - #define JUCE_CALLTYPE __stdcall -#else - #define JUCE_CALLTYPE -#endif - -//============================================================================== -// Debugging and assertion macros - -// (For info about JUCE_LOG_ASSERTIONS, have a look in juce_Config.h) -#if JUCE_LOG_ASSERTIONS - #define juce_LogCurrentAssertion juce_LogAssertion (__FILE__, __LINE__); -#elif defined (JUCE_DEBUG) - #define juce_LogCurrentAssertion fprintf (stderr, "JUCE Assertion failure in %s, line %d\n", __FILE__, __LINE__); -#else - #define juce_LogCurrentAssertion -#endif - -#ifdef JUCE_DEBUG - //============================================================================== - // If debugging is enabled.. - - /** Writes a string to the standard error stream. - - This is only compiled in a debug build. - - @see Logger::outputDebugString - */ - #define DBG(dbgtext) Logger::outputDebugString (dbgtext); - - /** Printf's a string to the standard error stream. - - This is only compiled in a debug build. - - @see Logger::outputDebugString - */ - #define DBG_PRINTF(dbgprintf) Logger::outputDebugPrintf dbgprintf; - - //============================================================================== - // Assertions.. - - #if JUCE_WIN32 || DOXYGEN - - #if JUCE_USE_INTRINSICS - #pragma intrinsic (__debugbreak) - - /** This will try to break the debugger if one is currently hosting this app. - @see jassert() - */ - #define juce_breakDebugger __debugbreak(); - - #elif JUCE_GCC - /** This will try to break the debugger if one is currently hosting this app. - @see jassert() - */ - #define juce_breakDebugger asm("int $3"); - #else - /** This will try to break the debugger if one is currently hosting this app. - @see jassert() - */ - #define juce_breakDebugger { __asm int 3 } - #endif - #elif JUCE_MAC - #define juce_breakDebugger Debugger(); - #elif JUCE_LINUX - #define juce_breakDebugger kill (0, SIGTRAP); - #endif - - //============================================================================== - /** This will always cause an assertion failure. - - It is only compiled in a debug build, (unless JUCE_LOG_ASSERTIONS is enabled - in juce_Config.h). - - @see jassert() - */ - #define jassertfalse { juce_LogCurrentAssertion; if (JUCE_NAMESPACE::juce_isRunningUnderDebugger()) juce_breakDebugger; } - - //============================================================================== - /** Platform-independent assertion macro. - - This gets optimised out when not being built with debugging turned on. - - Be careful not to call any functions within its arguments that are vital to - the behaviour of the program, because these won't get called in the release - build. - - @see jassertfalse - */ - #define jassert(expression) { if (! (expression)) jassertfalse } - -#else - //============================================================================== - // If debugging is disabled, these dummy debug and assertion macros are used.. - - #define DBG(dbgtext) - #define DBG_PRINTF(dbgprintf) - - #define jassertfalse { juce_LogCurrentAssertion } - - #if JUCE_LOG_ASSERTIONS - #define jassert(expression) { if (! (expression)) jassertfalse } - #else - #define jassert(a) { } - #endif - -#endif - -//============================================================================== -#ifndef DOXYGEN - template struct JuceStaticAssert; - template <> struct JuceStaticAssert { static void dummy() {} }; -#endif - -/** A compile-time assertion macro. - - If the expression parameter is false, the macro will cause a compile error. -*/ -#define static_jassert(expression) JuceStaticAssert::dummy(); - - -//============================================================================== -#if JUCE_CATCH_UNHANDLED_EXCEPTIONS - - #define JUCE_TRY try - - /** Used in try-catch blocks, this macro will send exceptions to the JUCEApplication - object so they can be logged by the application if it wants to. - */ - #define JUCE_CATCH_EXCEPTION \ - catch (const std::exception& e) \ - { \ - JUCEApplication::sendUnhandledException (&e, __FILE__, __LINE__); \ - } \ - catch (...) \ - { \ - JUCEApplication::sendUnhandledException (0, __FILE__, __LINE__); \ - } - - #define JUCE_CATCH_ALL catch (...) {} - #define JUCE_CATCH_ALL_ASSERT catch (...) { jassertfalse } - -#else - - #define JUCE_TRY - #define JUCE_CATCH_EXCEPTION - #define JUCE_CATCH_ALL - #define JUCE_CATCH_ALL_ASSERT - -#endif - -//============================================================================== -// Macros for inlining. - -#if JUCE_MSVC - /** A platform-independent way of forcing an inline function. - - Use the syntax: @code - forcedinline void myfunction (int x) - @endcode - */ - #ifdef JUCE_DEBUG - #define forcedinline __forceinline - #else - #define forcedinline inline - #endif - - /** A platform-independent way of stopping the compiler inlining a function. - - Use the syntax: @code - juce_noinline void myfunction (int x) - @endcode - */ - #define juce_noinline - -#else - /** A platform-independent way of forcing an inline function. - - Use the syntax: @code - forcedinline void myfunction (int x) - @endcode - */ - #ifndef JUCE_DEBUG - #define forcedinline inline __attribute__((always_inline)) - #else - #define forcedinline inline - #endif - - /** A platform-independent way of stopping the compiler inlining a function. - - Use the syntax: @code - juce_noinline void myfunction (int x) - @endcode - */ - #define juce_noinline __attribute__((noinline)) - -#endif - -#endif // __JUCE_PLATFORMDEFS_JUCEHEADER__ +/* + ============================================================================== + + This file is part of the JUCE library - "Jules' Utility Class Extensions" + Copyright 2004-7 by Raw Material Software ltd. + + ------------------------------------------------------------------------------ + + JUCE can be redistributed and/or modified under the terms of the + GNU General Public License, as published by the Free Software Foundation; + either version 2 of the License, or (at your option) any later version. + + JUCE is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with JUCE; if not, visit www.gnu.org/licenses or write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Boston, MA 02111-1307 USA + + ------------------------------------------------------------------------------ + + If you'd like to release a closed-source product which uses JUCE, commercial + licenses are also available: visit www.rawmaterialsoftware.com/juce for + more information. + + ============================================================================== +*/ + +#ifndef __JUCE_PLATFORMDEFS_JUCEHEADER__ +#define __JUCE_PLATFORMDEFS_JUCEHEADER__ + +//============================================================================== +/* This file figures out which platform is being built, and defines some macros + that the rest of the code can use for OS-specific compilation. + + Macros that will be set here are: + + - One of JUCE_WIN32, JUCE_MAC or JUCE_LINUX. + - Either JUCE_32BIT or JUCE_64BIT, depending on the architecture. + - Either JUCE_LITTLE_ENDIAN or JUCE_BIG_ENDIAN. + - Either JUCE_INTEL or JUCE_PPC + - Either JUCE_GCC or JUCE_MSVC + + On the Mac, it also defines MACOS_10_2_OR_EARLIER if the build is targeting OSX10.2, + and MACOS_10_3_OR_EARLIER if it is targeting either 10.2 or 10.3 + + It also includes a set of macros for debug console output and assertions. + +*/ + +//============================================================================== +#if (defined (_WIN32) || defined (_WIN64)) + #define JUCE_WIN32 1 +#else + #if defined (LINUX) || defined (__linux__) + #define JUCE_LINUX 1 + #else + #define JUCE_MAC 1 + #endif +#endif + +//============================================================================== +#if JUCE_WIN32 + #ifdef _MSC_VER + #ifdef _WIN64 + #define JUCE_64BIT 1 + #else + #define JUCE_32BIT 1 + #endif + #endif + + #ifdef _DEBUG + #define JUCE_DEBUG 1 + #endif + + /** If defined, this indicates that the processor is little-endian. */ + #define JUCE_LITTLE_ENDIAN 1 + + #define JUCE_INTEL 1 +#endif + +//============================================================================== +#if JUCE_MAC + + #include + + #ifndef NDEBUG + #define JUCE_DEBUG 1 + #endif + + #ifdef __LITTLE_ENDIAN__ + #define JUCE_LITTLE_ENDIAN 1 + #else + #define JUCE_BIG_ENDIAN 1 + #endif + + #if defined (__ppc__) || defined (__ppc64__) + #define JUCE_PPC 1 + #else + #define JUCE_INTEL 1 + #endif + + #ifdef __LP64__ + #define JUCE_64BIT 1 + #else + #define JUCE_32BIT 1 + #endif + + #if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_3) + #define MACOS_10_2_OR_EARLIER 1 + #endif + + #if (! defined (MAC_OS_X_VERSION_10_4)) || (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4) + #define MACOS_10_3_OR_EARLIER 1 + #endif + + #if (! defined (MAC_OS_X_VERSION_10_5)) || (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5) + #define MACOS_10_4_OR_EARLIER 1 + #endif +#endif + +//============================================================================== +#if JUCE_LINUX + + #ifdef _DEBUG + #define JUCE_DEBUG 1 + #endif + + // Allow override for big-endian Linux platforms + #ifndef JUCE_BIG_ENDIAN + #define JUCE_LITTLE_ENDIAN 1 + #endif + + #if defined (__LP64__) || defined (_LP64) + #define JUCE_64BIT 1 + #else + #define JUCE_32BIT 1 + #endif + + #define JUCE_INTEL 1 +#endif + +//============================================================================== +#ifdef JUCE_FORCE_DEBUG + #undef JUCE_DEBUG + + #if JUCE_FORCE_DEBUG + #define JUCE_DEBUG 1 + #endif +#endif + +//============================================================================== +// Compiler type macros. + +#ifdef __GNUC__ + #define JUCE_GCC 1 +#elif defined (_MSC_VER) + #define JUCE_MSVC 1 + + #if _MSC_VER >= 1400 + #define JUCE_USE_INTRINSICS 1 + #endif +#else + #error unknown compiler +#endif + +/** This macro defines the C calling convention used as the standard for Juce calls. */ +#if JUCE_MSVC + #define JUCE_CALLTYPE __stdcall +#else + #define JUCE_CALLTYPE +#endif + +//============================================================================== +// Debugging and assertion macros + +// (For info about JUCE_LOG_ASSERTIONS, have a look in juce_Config.h) +#if JUCE_LOG_ASSERTIONS + #define juce_LogCurrentAssertion juce_LogAssertion (__FILE__, __LINE__); +#elif defined (JUCE_DEBUG) + #define juce_LogCurrentAssertion fprintf (stderr, "JUCE Assertion failure in %s, line %d\n", __FILE__, __LINE__); +#else + #define juce_LogCurrentAssertion +#endif + +#ifdef JUCE_DEBUG + //============================================================================== + // If debugging is enabled.. + + /** Writes a string to the standard error stream. + + This is only compiled in a debug build. + + @see Logger::outputDebugString + */ + #define DBG(dbgtext) Logger::outputDebugString (dbgtext); + + /** Printf's a string to the standard error stream. + + This is only compiled in a debug build. + + @see Logger::outputDebugString + */ + #define DBG_PRINTF(dbgprintf) Logger::outputDebugPrintf dbgprintf; + + //============================================================================== + // Assertions.. + + #if JUCE_WIN32 || DOXYGEN + + #if JUCE_USE_INTRINSICS + #pragma intrinsic (__debugbreak) + + /** This will try to break the debugger if one is currently hosting this app. + @see jassert() + */ + #define juce_breakDebugger __debugbreak(); + + #elif JUCE_GCC + /** This will try to break the debugger if one is currently hosting this app. + @see jassert() + */ + #define juce_breakDebugger asm("int $3"); + #else + /** This will try to break the debugger if one is currently hosting this app. + @see jassert() + */ + #define juce_breakDebugger { __asm int 3 } + #endif + #elif JUCE_MAC + #define juce_breakDebugger Debugger(); + #elif JUCE_LINUX + #define juce_breakDebugger kill (0, SIGTRAP); + #endif + + //============================================================================== + /** This will always cause an assertion failure. + + It is only compiled in a debug build, (unless JUCE_LOG_ASSERTIONS is enabled + in juce_Config.h). + + @see jassert() + */ + #define jassertfalse { juce_LogCurrentAssertion; if (JUCE_NAMESPACE::juce_isRunningUnderDebugger()) juce_breakDebugger; } + + //============================================================================== + /** Platform-independent assertion macro. + + This gets optimised out when not being built with debugging turned on. + + Be careful not to call any functions within its arguments that are vital to + the behaviour of the program, because these won't get called in the release + build. + + @see jassertfalse + */ + #define jassert(expression) { if (! (expression)) jassertfalse } + +#else + //============================================================================== + // If debugging is disabled, these dummy debug and assertion macros are used.. + + #define DBG(dbgtext) + #define DBG_PRINTF(dbgprintf) + + #define jassertfalse { juce_LogCurrentAssertion } + + #if JUCE_LOG_ASSERTIONS + #define jassert(expression) { if (! (expression)) jassertfalse } + #else + #define jassert(a) { } + #endif + +#endif + +//============================================================================== +#ifndef DOXYGEN + template struct JuceStaticAssert; + template <> struct JuceStaticAssert { static void dummy() {} }; +#endif + +/** A compile-time assertion macro. + + If the expression parameter is false, the macro will cause a compile error. +*/ +#define static_jassert(expression) JuceStaticAssert::dummy(); + + +//============================================================================== +#if JUCE_CATCH_UNHANDLED_EXCEPTIONS + + #define JUCE_TRY try + + /** Used in try-catch blocks, this macro will send exceptions to the JUCEApplication + object so they can be logged by the application if it wants to. + */ + #define JUCE_CATCH_EXCEPTION \ + catch (const std::exception& e) \ + { \ + JUCEApplication::sendUnhandledException (&e, __FILE__, __LINE__); \ + } \ + catch (...) \ + { \ + JUCEApplication::sendUnhandledException (0, __FILE__, __LINE__); \ + } + + #define JUCE_CATCH_ALL catch (...) {} + #define JUCE_CATCH_ALL_ASSERT catch (...) { jassertfalse } + +#else + + #define JUCE_TRY + #define JUCE_CATCH_EXCEPTION + #define JUCE_CATCH_ALL + #define JUCE_CATCH_ALL_ASSERT + +#endif + +//============================================================================== +// Macros for inlining. + +#if JUCE_MSVC + /** A platform-independent way of forcing an inline function. + + Use the syntax: @code + forcedinline void myfunction (int x) + @endcode + */ + #ifdef JUCE_DEBUG + #define forcedinline __forceinline + #else + #define forcedinline inline + #endif + + /** A platform-independent way of stopping the compiler inlining a function. + + Use the syntax: @code + juce_noinline void myfunction (int x) + @endcode + */ + #define juce_noinline + +#else + /** A platform-independent way of forcing an inline function. + + Use the syntax: @code + forcedinline void myfunction (int x) + @endcode + */ + #ifndef JUCE_DEBUG + #define forcedinline inline __attribute__((always_inline)) + #else + #define forcedinline inline + #endif + + /** A platform-independent way of stopping the compiler inlining a function. + + Use the syntax: @code + juce_noinline void myfunction (int x) + @endcode + */ + #define juce_noinline __attribute__((noinline)) + +#endif + +#endif // __JUCE_PLATFORMDEFS_JUCEHEADER__ diff --git a/src/juce_core/basics/juce_StandardHeader.h b/src/juce_core/basics/juce_StandardHeader.h index bad91d8855..7316a905a7 100644 --- a/src/juce_core/basics/juce_StandardHeader.h +++ b/src/juce_core/basics/juce_StandardHeader.h @@ -1,153 +1,153 @@ -/* - ============================================================================== - - This file is part of the JUCE library - "Jules' Utility Class Extensions" - Copyright 2004-7 by Raw Material Software ltd. - - ------------------------------------------------------------------------------ - - JUCE can be redistributed and/or modified under the terms of the - GNU General Public License, as published by the Free Software Foundation; - either version 2 of the License, or (at your option) any later version. - - JUCE is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with JUCE; if not, visit www.gnu.org/licenses or write to the - Free Software Foundation, Inc., 59 Temple Place, Suite 330, - Boston, MA 02111-1307 USA - - ------------------------------------------------------------------------------ - - If you'd like to release a closed-source product which uses JUCE, commercial - licenses are also available: visit www.rawmaterialsoftware.com/juce for - more information. - - ============================================================================== -*/ - -#ifndef __JUCE_STANDARDHEADER_JUCEHEADER__ -#define __JUCE_STANDARDHEADER_JUCEHEADER__ - -//============================================================================== -/** Current Juce version number. - - See also SystemStats::getJUCEVersion() for a string version. -*/ -#define JUCE_MAJOR_VERSION 1 -#define JUCE_MINOR_VERSION 46 - -/** Current Juce version number. - - Bits 16 to 32 = major version. - Bits 8 to 16 = minor version. - Bits 0 to 8 = point release (not currently used). - - See also SystemStats::getJUCEVersion() for a string version. -*/ -#define JUCE_VERSION ((JUCE_MAJOR_VERSION << 16) + (JUCE_MINOR_VERSION << 8)) - - -//============================================================================== -#include "../../../juce_Config.h" - -//============================================================================== -#ifdef JUCE_NAMESPACE - #define BEGIN_JUCE_NAMESPACE namespace JUCE_NAMESPACE { - #define END_JUCE_NAMESPACE } -#else - #define BEGIN_JUCE_NAMESPACE - #define END_JUCE_NAMESPACE -#endif - -//============================================================================== -// This sets up the JUCE_WIN32, JUCE_MAC, or JUCE_LINUX macros -#include "juce_PlatformDefs.h" - -// Now we'll include any OS headers we need.. (at this point we are outside the Juce namespace). -#if JUCE_MSVC - #pragma warning (push) - #pragma warning (disable: 4514 4245 4100) -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if JUCE_MAC || JUCE_LINUX - #include -#endif - -#if JUCE_USE_INTRINSICS - #include -#endif - -#if JUCE_MAC - #if MACOS_10_3_OR_EARLIER - #include - #else - #include - #endif -#endif - -#if JUCE_LINUX - #include -#endif - -#if JUCE_MSVC && JUCE_DEBUG - #include -#endif - -#if JUCE_MSVC - #pragma warning (pop) -#endif - -//============================================================================== -// DLL building settings on Win32 -#if JUCE_MSVC - #ifdef JUCE_DLL_BUILD - #define JUCE_API __declspec (dllexport) - #pragma warning (disable: 4251) - #elif defined (JUCE_DLL) - #define JUCE_API __declspec (dllimport) - #pragma warning (disable: 4251) - #endif -#endif - -#ifndef JUCE_API - /** This macro is added to all juce public class declarations. */ - #define JUCE_API -#endif - -/** This macro is added to all juce public function declarations. */ -#define JUCE_PUBLIC_FUNCTION JUCE_API JUCE_CALLTYPE - - -//============================================================================== -// Now include some basics that are needed by most of the Juce classes... -BEGIN_JUCE_NAMESPACE - -extern bool JUCE_API JUCE_CALLTYPE juce_isRunningUnderDebugger() throw(); - -#if JUCE_LOG_ASSERTIONS - extern void JUCE_API juce_LogAssertion (const char* filename, const int lineNum) throw(); -#endif - -#include "juce_Memory.h" -#include "juce_MathsFunctions.h" -#include "juce_DataConversions.h" -#include "juce_Logger.h" - -END_JUCE_NAMESPACE - - -#endif // __JUCE_STANDARDHEADER_JUCEHEADER__ +/* + ============================================================================== + + This file is part of the JUCE library - "Jules' Utility Class Extensions" + Copyright 2004-7 by Raw Material Software ltd. + + ------------------------------------------------------------------------------ + + JUCE can be redistributed and/or modified under the terms of the + GNU General Public License, as published by the Free Software Foundation; + either version 2 of the License, or (at your option) any later version. + + JUCE is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with JUCE; if not, visit www.gnu.org/licenses or write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Boston, MA 02111-1307 USA + + ------------------------------------------------------------------------------ + + If you'd like to release a closed-source product which uses JUCE, commercial + licenses are also available: visit www.rawmaterialsoftware.com/juce for + more information. + + ============================================================================== +*/ + +#ifndef __JUCE_STANDARDHEADER_JUCEHEADER__ +#define __JUCE_STANDARDHEADER_JUCEHEADER__ + +//============================================================================== +/** Current Juce version number. + + See also SystemStats::getJUCEVersion() for a string version. +*/ +#define JUCE_MAJOR_VERSION 1 +#define JUCE_MINOR_VERSION 46 + +/** Current Juce version number. + + Bits 16 to 32 = major version. + Bits 8 to 16 = minor version. + Bits 0 to 8 = point release (not currently used). + + See also SystemStats::getJUCEVersion() for a string version. +*/ +#define JUCE_VERSION ((JUCE_MAJOR_VERSION << 16) + (JUCE_MINOR_VERSION << 8)) + + +//============================================================================== +#include "../../../juce_Config.h" + +//============================================================================== +#ifdef JUCE_NAMESPACE + #define BEGIN_JUCE_NAMESPACE namespace JUCE_NAMESPACE { + #define END_JUCE_NAMESPACE } +#else + #define BEGIN_JUCE_NAMESPACE + #define END_JUCE_NAMESPACE +#endif + +//============================================================================== +// This sets up the JUCE_WIN32, JUCE_MAC, or JUCE_LINUX macros +#include "juce_PlatformDefs.h" + +// Now we'll include any OS headers we need.. (at this point we are outside the Juce namespace). +#if JUCE_MSVC + #pragma warning (push) + #pragma warning (disable: 4514 4245 4100) +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if JUCE_MAC || JUCE_LINUX + #include +#endif + +#if JUCE_USE_INTRINSICS + #include +#endif + +#if JUCE_MAC + #if MACOS_10_3_OR_EARLIER + #include + #else + #include + #endif +#endif + +#if JUCE_LINUX + #include +#endif + +#if JUCE_MSVC && JUCE_DEBUG + #include +#endif + +#if JUCE_MSVC + #pragma warning (pop) +#endif + +//============================================================================== +// DLL building settings on Win32 +#if JUCE_MSVC + #ifdef JUCE_DLL_BUILD + #define JUCE_API __declspec (dllexport) + #pragma warning (disable: 4251) + #elif defined (JUCE_DLL) + #define JUCE_API __declspec (dllimport) + #pragma warning (disable: 4251) + #endif +#endif + +#ifndef JUCE_API + /** This macro is added to all juce public class declarations. */ + #define JUCE_API +#endif + +/** This macro is added to all juce public function declarations. */ +#define JUCE_PUBLIC_FUNCTION JUCE_API JUCE_CALLTYPE + + +//============================================================================== +// Now include some basics that are needed by most of the Juce classes... +BEGIN_JUCE_NAMESPACE + +extern bool JUCE_API JUCE_CALLTYPE juce_isRunningUnderDebugger() throw(); + +#if JUCE_LOG_ASSERTIONS + extern void JUCE_API juce_LogAssertion (const char* filename, const int lineNum) throw(); +#endif + +#include "juce_Memory.h" +#include "juce_MathsFunctions.h" +#include "juce_DataConversions.h" +#include "juce_Logger.h" + +END_JUCE_NAMESPACE + + +#endif // __JUCE_STANDARDHEADER_JUCEHEADER__ diff --git a/src/juce_core/io/network/juce_Socket.cpp b/src/juce_core/io/network/juce_Socket.cpp index b8e4a7ee17..4571d6a09d 100644 --- a/src/juce_core/io/network/juce_Socket.cpp +++ b/src/juce_core/io/network/juce_Socket.cpp @@ -1,634 +1,634 @@ -/* - ============================================================================== - - This file is part of the JUCE library - "Jules' Utility Class Extensions" - Copyright 2004-7 by Raw Material Software ltd. - - ------------------------------------------------------------------------------ - - JUCE can be redistributed and/or modified under the terms of the - GNU General Public License, as published by the Free Software Foundation; - either version 2 of the License, or (at your option) any later version. - - JUCE is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with JUCE; if not, visit www.gnu.org/licenses or write to the - Free Software Foundation, Inc., 59 Temple Place, Suite 330, - Boston, MA 02111-1307 USA - - ------------------------------------------------------------------------------ - - If you'd like to release a closed-source product which uses JUCE, commercial - licenses are also available: visit www.rawmaterialsoftware.com/juce for - more information. - - ============================================================================== -*/ - -#ifdef _WIN32 - #include - - #ifdef _MSC_VER - #pragma warning (disable : 4127 4389 4018) - #endif - -#else - #if defined (LINUX) || defined (__linux__) - #include - #include - #include - #include - #include - #endif - - #include - #include - #include - #include -#endif - -#include "../../basics/juce_StandardHeader.h" - -BEGIN_JUCE_NAMESPACE - -#include "juce_Socket.h" -#include "../../threads/juce_ScopedLock.h" -#include "../../threads/juce_Thread.h" - - -//============================================================================== -#if JUCE_WIN32 - -typedef int (__stdcall juce_CloseWin32SocketLibCall) (void); -juce_CloseWin32SocketLibCall* juce_CloseWin32SocketLib = 0; - -static void initWin32Sockets() -{ - static CriticalSection lock; - const ScopedLock sl (lock); - - if (juce_CloseWin32SocketLib == 0) - { - WSADATA wsaData; - const WORD wVersionRequested = MAKEWORD (1, 1); - WSAStartup (wVersionRequested, &wsaData); - - juce_CloseWin32SocketLib = &WSACleanup; - } -} - -#endif - -//============================================================================== -static bool resetSocketOptions (const int handle, const bool isDatagram) throw() -{ - if (handle <= 0) - return false; - - const int sndBufSize = 65536; - const int rcvBufSize = 65536; - const int one = 1; - - return setsockopt (handle, SOL_SOCKET, SO_RCVBUF, (const char*) &rcvBufSize, sizeof (int)) == 0 - && setsockopt (handle, SOL_SOCKET, SO_SNDBUF, (const char*) &sndBufSize, sizeof (int)) == 0 - && (isDatagram || (setsockopt (handle, IPPROTO_TCP, TCP_NODELAY, (const char*) &one, sizeof (int)) == 0)); -} - -static bool bindSocketToPort (const int handle, const int port) throw() -{ - if (handle == 0 || port <= 0) - return false; - - struct sockaddr_in servTmpAddr; - zerostruct (servTmpAddr); - servTmpAddr.sin_family = PF_INET; - servTmpAddr.sin_addr.s_addr = htonl (INADDR_ANY); - servTmpAddr.sin_port = htons ((uint16) port); - - return bind (handle, (struct sockaddr*) &servTmpAddr, sizeof (struct sockaddr_in)) >= 0; -} - -static int readSocket (const int handle, - void* const destBuffer, const int maxBytesToRead, - bool volatile& connected) throw() -{ - int bytesRead = 0; - - while (bytesRead < maxBytesToRead) - { - int bytesThisTime; - -#if JUCE_WIN32 - bytesThisTime = recv (handle, ((char*) destBuffer) + bytesRead, maxBytesToRead - bytesRead, 0); -#else - while ((bytesThisTime = ::read (handle, ((char*) destBuffer) + bytesRead, maxBytesToRead - bytesRead)) < 0 - && errno == EINTR - && connected) - { - } -#endif - - if (bytesThisTime <= 0 || ! connected) - { - if (bytesRead == 0) - bytesRead = -1; - - break; - } - - bytesRead += bytesThisTime; - } - - return bytesRead; -} - -static int waitForReadiness (const int handle, const bool forReading, - const int timeoutMsecs) throw() -{ - struct timeval timeout; - struct timeval* timeoutp; - - if (timeoutMsecs >= 0) - { - timeout.tv_sec = timeoutMsecs / 1000; - timeout.tv_usec = (timeoutMsecs % 1000) * 1000; - timeoutp = &timeout; - } - else - { - timeoutp = 0; - } - - fd_set rset, wset; - FD_ZERO (&rset); - FD_SET (handle, &rset); - FD_ZERO (&wset); - FD_SET (handle, &wset); - - fd_set* const prset = forReading ? &rset : 0; - fd_set* const pwset = forReading ? 0 : &wset; - -#if JUCE_WIN32 - if (select (handle + 1, prset, pwset, 0, timeoutp) < 0) - return -1; -#else - { - int result; - while ((result = select (handle + 1, prset, pwset, 0, timeoutp)) < 0 - && errno == EINTR) - { - } - - if (result < 0) - return -1; - } -#endif - - { - int opt; - -#if defined (JUCE_LINUX) || (defined (JUCE_MAC) && ! MACOS_10_2_OR_EARLIER) - socklen_t len = sizeof (opt); -#else - int len = sizeof (opt); -#endif - - if (getsockopt (handle, SOL_SOCKET, SO_ERROR, (char*) &opt, &len) < 0 - || opt != 0) - return -1; - } - - if ((forReading && FD_ISSET (handle, &rset)) - || ((! forReading) && FD_ISSET (handle, &wset))) - return 1; - - return 0; -} - -static bool setSocketBlockingState (const int handle, const bool shouldBlock) throw() -{ -#if JUCE_WIN32 - u_long nonBlocking = shouldBlock ? 0 : 1; - - if (ioctlsocket (handle, FIONBIO, &nonBlocking) != 0) - return false; -#else - int socketFlags = fcntl (handle, F_GETFL, 0); - - if (socketFlags == -1) - return false; - - if (shouldBlock) - socketFlags &= ~O_NONBLOCK; - else - socketFlags |= O_NONBLOCK; - - if (fcntl (handle, F_SETFL, socketFlags) != 0) - return false; -#endif - - return true; -} - -static bool connectSocket (int volatile& handle, - const bool isDatagram, - void** serverAddress, - const String& hostName, - const int portNumber, - const int timeOutMillisecs) throw() -{ - struct hostent* const hostEnt = gethostbyname (hostName); - - if (hostEnt == 0) - return false; - - struct in_addr targetAddress; - memcpy (&targetAddress.s_addr, - *(hostEnt->h_addr_list), - sizeof (targetAddress.s_addr)); - - struct sockaddr_in servTmpAddr; - zerostruct (servTmpAddr); - servTmpAddr.sin_family = PF_INET; - servTmpAddr.sin_addr = targetAddress; - servTmpAddr.sin_port = htons ((uint16) portNumber); - - if (handle < 0) - handle = (int) socket (AF_INET, isDatagram ? SOCK_DGRAM : SOCK_STREAM, 0); - - if (handle < 0) - return false; - - if (isDatagram) - { - *serverAddress = new struct sockaddr_in(); - *((struct sockaddr_in*) *serverAddress) = servTmpAddr; - - return true; - } - - setSocketBlockingState (handle, false); - - const int result = ::connect (handle, (struct sockaddr*) &servTmpAddr, sizeof (struct sockaddr_in)); - - if (result < 0) - { -#if JUCE_WIN32 - if (result == SOCKET_ERROR && WSAGetLastError() == WSAEWOULDBLOCK) -#else - if (errno == EINPROGRESS) -#endif - { - if (waitForReadiness (handle, false, timeOutMillisecs) != 1) - { - setSocketBlockingState (handle, true); - return false; - } - } - } - - setSocketBlockingState (handle, true); - resetSocketOptions (handle, false); - - return true; -} - -//============================================================================== -StreamingSocket::StreamingSocket() - : portNumber (0), - handle (-1), - connected (false), - isListener (false) -{ -#if JUCE_WIN32 - initWin32Sockets(); -#endif -} - -StreamingSocket::StreamingSocket (const String& hostName_, - const int portNumber_, - const int handle_) - : hostName (hostName_), - portNumber (portNumber_), - handle (handle_), - connected (true), - isListener (false) -{ -#if JUCE_WIN32 - initWin32Sockets(); -#endif - - resetSocketOptions (handle_, false); -} - -StreamingSocket::~StreamingSocket() -{ - close(); -} - -//============================================================================== -int StreamingSocket::read (void* destBuffer, const int maxBytesToRead) -{ - return (connected && ! isListener) ? readSocket (handle, destBuffer, maxBytesToRead, connected) - : -1; -} - -int StreamingSocket::write (const void* sourceBuffer, const int numBytesToWrite) -{ - if (isListener || ! connected) - return -1; - -#if JUCE_WIN32 - return send (handle, (const char*) sourceBuffer, numBytesToWrite, 0); -#else - int result; - - while ((result = ::write (handle, sourceBuffer, numBytesToWrite)) < 0 - && errno == EINTR) - { - } - - return result; -#endif -} - -//============================================================================== -int StreamingSocket::waitUntilReady (const bool readyForReading, - const int timeoutMsecs) const -{ - return connected ? waitForReadiness (handle, readyForReading, timeoutMsecs) - : -1; -} - -//============================================================================== -bool StreamingSocket::bindToPort (const int port) -{ - return bindSocketToPort (handle, port); -} - -bool StreamingSocket::connect (const String& remoteHostName, - const int remotePortNumber, - const int timeOutMillisecs) -{ - if (isListener) - { - jassertfalse // a listener socket can't connect to another one! - return false; - } - - if (connected) - close(); - - hostName = remoteHostName; - portNumber = remotePortNumber; - isListener = false; - - connected = connectSocket (handle, false, 0, remoteHostName, - remotePortNumber, timeOutMillisecs); - - if (! (connected && resetSocketOptions (handle, false))) - { - close(); - return false; - } - - return true; -} - -void StreamingSocket::close() -{ -#if JUCE_WIN32 - closesocket (handle); - connected = false; -#else - if (connected) - { - connected = false; - - if (isListener) - { - // need to do this to interrupt the accept() function.. - StreamingSocket temp; - temp.connect ("localhost", portNumber, 1000); - } - } - - ::close (handle); -#endif - - hostName = String::empty; - portNumber = 0; - handle = -1; - isListener = false; -} - -//============================================================================== -bool StreamingSocket::createListener (const int newPortNumber) -{ - if (connected) - close(); - - hostName = "listener"; - portNumber = newPortNumber; - isListener = true; - - struct sockaddr_in servTmpAddr; - zerostruct (servTmpAddr); - servTmpAddr.sin_family = PF_INET; - servTmpAddr.sin_addr.s_addr = htonl (INADDR_ANY); - servTmpAddr.sin_port = htons ((uint16) portNumber); - - handle = (int) socket (AF_INET, SOCK_STREAM, 0); - - if (handle < 0) - return false; - - const int reuse = 1; - setsockopt (handle, SOL_SOCKET, SO_REUSEADDR, (const char*) &reuse, sizeof (reuse)); - - if (bind (handle, (struct sockaddr*) &servTmpAddr, sizeof (struct sockaddr_in)) < 0 - || listen (handle, SOMAXCONN) < 0) - { - close(); - return false; - } - - connected = true; - return true; -} - -StreamingSocket* StreamingSocket::waitForNextConnection() const -{ - jassert (isListener || ! connected); // to call this method, you first have to use createListener() to - // prepare this socket as a listener. - - if (connected && isListener) - { - struct sockaddr address; - -#if defined (JUCE_LINUX) || (defined (JUCE_MAC) && ! MACOS_10_2_OR_EARLIER) - socklen_t len = sizeof (sockaddr); -#else - int len = sizeof (sockaddr); -#endif - const int newSocket = (int) accept (handle, &address, &len); - - if (newSocket >= 0 && connected) - return new StreamingSocket (inet_ntoa (((struct sockaddr_in*) &address)->sin_addr), - portNumber, newSocket); - } - - return 0; -} - -bool StreamingSocket::isLocal() const throw() -{ - return hostName == T("127.0.0.1"); -} - - -//============================================================================== -//============================================================================== -DatagramSocket::DatagramSocket (const int localPortNumber) - : portNumber (0), - handle (-1), - connected (false), - serverAddress (0) -{ -#if JUCE_WIN32 - initWin32Sockets(); -#endif - - handle = (int) socket (AF_INET, SOCK_DGRAM, 0); - bindToPort (localPortNumber); -} - -DatagramSocket::DatagramSocket (const String& hostName_, const int portNumber_, - const int handle_, const int localPortNumber) - : hostName (hostName_), - portNumber (portNumber_), - handle (handle_), - connected (true), - serverAddress (0) -{ -#if JUCE_WIN32 - initWin32Sockets(); -#endif - - resetSocketOptions (handle_, true); - bindToPort (localPortNumber); -} - -DatagramSocket::~DatagramSocket() -{ - close(); - - delete ((struct sockaddr_in*) serverAddress); - serverAddress = 0; -} - -void DatagramSocket::close() -{ -#if JUCE_WIN32 - closesocket (handle); - connected = false; -#else - connected = false; - ::close (handle); -#endif - - hostName = String::empty; - portNumber = 0; - handle = -1; -} - -bool DatagramSocket::bindToPort (const int port) -{ - return bindSocketToPort (handle, port); -} - -bool DatagramSocket::connect (const String& remoteHostName, - const int remotePortNumber, - const int timeOutMillisecs) -{ - if (connected) - close(); - - hostName = remoteHostName; - portNumber = remotePortNumber; - - connected = connectSocket (handle, true, &serverAddress, - remoteHostName, remotePortNumber, - timeOutMillisecs); - - if (! (connected && resetSocketOptions (handle, true))) - { - close(); - return false; - } - - return true; -} - -DatagramSocket* DatagramSocket::waitForNextConnection() const -{ - struct sockaddr address; - -#if defined (JUCE_LINUX) || (defined (JUCE_MAC) && ! MACOS_10_2_OR_EARLIER) - socklen_t len = sizeof (sockaddr); -#else - int len = sizeof (sockaddr); -#endif - - while (waitUntilReady (true, -1) == 1) - { - char buf[1]; - - if (recvfrom (handle, buf, 0, 0, &address, &len) > 0) - { - return new DatagramSocket (inet_ntoa (((struct sockaddr_in*) &address)->sin_addr), - ntohs (((struct sockaddr_in*) &address)->sin_port), - -1, -1); - } - } - - return 0; -} - -//============================================================================== -int DatagramSocket::waitUntilReady (const bool readyForReading, - const int timeoutMsecs) const -{ - return connected ? waitForReadiness (handle, readyForReading, timeoutMsecs) - : -1; -} - -int DatagramSocket::read (void* destBuffer, const int maxBytesToRead) -{ - return connected ? readSocket (handle, destBuffer, maxBytesToRead, connected) - : -1; -} - -int DatagramSocket::write (const void* sourceBuffer, const int numBytesToWrite) -{ - // You need to call connect() first to set the server address.. - jassert (serverAddress != 0 && connected); - - return connected ? sendto (handle, (const char*) sourceBuffer, - numBytesToWrite, 0, - (const struct sockaddr*) serverAddress, - sizeof (struct sockaddr_in)) - : -1; -} - -bool DatagramSocket::isLocal() const throw() -{ - return hostName == T("127.0.0.1"); -} - - -END_JUCE_NAMESPACE +/* + ============================================================================== + + This file is part of the JUCE library - "Jules' Utility Class Extensions" + Copyright 2004-7 by Raw Material Software ltd. + + ------------------------------------------------------------------------------ + + JUCE can be redistributed and/or modified under the terms of the + GNU General Public License, as published by the Free Software Foundation; + either version 2 of the License, or (at your option) any later version. + + JUCE is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with JUCE; if not, visit www.gnu.org/licenses or write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Boston, MA 02111-1307 USA + + ------------------------------------------------------------------------------ + + If you'd like to release a closed-source product which uses JUCE, commercial + licenses are also available: visit www.rawmaterialsoftware.com/juce for + more information. + + ============================================================================== +*/ + +#ifdef _WIN32 + #include + + #ifdef _MSC_VER + #pragma warning (disable : 4127 4389 4018) + #endif + +#else + #if defined (LINUX) || defined (__linux__) + #include + #include + #include + #include + #include + #endif + + #include + #include + #include + #include +#endif + +#include "../../basics/juce_StandardHeader.h" + +BEGIN_JUCE_NAMESPACE + +#include "juce_Socket.h" +#include "../../threads/juce_ScopedLock.h" +#include "../../threads/juce_Thread.h" + + +//============================================================================== +#if JUCE_WIN32 + +typedef int (__stdcall juce_CloseWin32SocketLibCall) (void); +juce_CloseWin32SocketLibCall* juce_CloseWin32SocketLib = 0; + +static void initWin32Sockets() +{ + static CriticalSection lock; + const ScopedLock sl (lock); + + if (juce_CloseWin32SocketLib == 0) + { + WSADATA wsaData; + const WORD wVersionRequested = MAKEWORD (1, 1); + WSAStartup (wVersionRequested, &wsaData); + + juce_CloseWin32SocketLib = &WSACleanup; + } +} + +#endif + +//============================================================================== +static bool resetSocketOptions (const int handle, const bool isDatagram) throw() +{ + if (handle <= 0) + return false; + + const int sndBufSize = 65536; + const int rcvBufSize = 65536; + const int one = 1; + + return setsockopt (handle, SOL_SOCKET, SO_RCVBUF, (const char*) &rcvBufSize, sizeof (int)) == 0 + && setsockopt (handle, SOL_SOCKET, SO_SNDBUF, (const char*) &sndBufSize, sizeof (int)) == 0 + && (isDatagram || (setsockopt (handle, IPPROTO_TCP, TCP_NODELAY, (const char*) &one, sizeof (int)) == 0)); +} + +static bool bindSocketToPort (const int handle, const int port) throw() +{ + if (handle == 0 || port <= 0) + return false; + + struct sockaddr_in servTmpAddr; + zerostruct (servTmpAddr); + servTmpAddr.sin_family = PF_INET; + servTmpAddr.sin_addr.s_addr = htonl (INADDR_ANY); + servTmpAddr.sin_port = htons ((uint16) port); + + return bind (handle, (struct sockaddr*) &servTmpAddr, sizeof (struct sockaddr_in)) >= 0; +} + +static int readSocket (const int handle, + void* const destBuffer, const int maxBytesToRead, + bool volatile& connected) throw() +{ + int bytesRead = 0; + + while (bytesRead < maxBytesToRead) + { + int bytesThisTime; + +#if JUCE_WIN32 + bytesThisTime = recv (handle, ((char*) destBuffer) + bytesRead, maxBytesToRead - bytesRead, 0); +#else + while ((bytesThisTime = ::read (handle, ((char*) destBuffer) + bytesRead, maxBytesToRead - bytesRead)) < 0 + && errno == EINTR + && connected) + { + } +#endif + + if (bytesThisTime <= 0 || ! connected) + { + if (bytesRead == 0) + bytesRead = -1; + + break; + } + + bytesRead += bytesThisTime; + } + + return bytesRead; +} + +static int waitForReadiness (const int handle, const bool forReading, + const int timeoutMsecs) throw() +{ + struct timeval timeout; + struct timeval* timeoutp; + + if (timeoutMsecs >= 0) + { + timeout.tv_sec = timeoutMsecs / 1000; + timeout.tv_usec = (timeoutMsecs % 1000) * 1000; + timeoutp = &timeout; + } + else + { + timeoutp = 0; + } + + fd_set rset, wset; + FD_ZERO (&rset); + FD_SET (handle, &rset); + FD_ZERO (&wset); + FD_SET (handle, &wset); + + fd_set* const prset = forReading ? &rset : 0; + fd_set* const pwset = forReading ? 0 : &wset; + +#if JUCE_WIN32 + if (select (handle + 1, prset, pwset, 0, timeoutp) < 0) + return -1; +#else + { + int result; + while ((result = select (handle + 1, prset, pwset, 0, timeoutp)) < 0 + && errno == EINTR) + { + } + + if (result < 0) + return -1; + } +#endif + + { + int opt; + +#if defined (JUCE_LINUX) || (defined (JUCE_MAC) && ! MACOS_10_2_OR_EARLIER) + socklen_t len = sizeof (opt); +#else + int len = sizeof (opt); +#endif + + if (getsockopt (handle, SOL_SOCKET, SO_ERROR, (char*) &opt, &len) < 0 + || opt != 0) + return -1; + } + + if ((forReading && FD_ISSET (handle, &rset)) + || ((! forReading) && FD_ISSET (handle, &wset))) + return 1; + + return 0; +} + +static bool setSocketBlockingState (const int handle, const bool shouldBlock) throw() +{ +#if JUCE_WIN32 + u_long nonBlocking = shouldBlock ? 0 : 1; + + if (ioctlsocket (handle, FIONBIO, &nonBlocking) != 0) + return false; +#else + int socketFlags = fcntl (handle, F_GETFL, 0); + + if (socketFlags == -1) + return false; + + if (shouldBlock) + socketFlags &= ~O_NONBLOCK; + else + socketFlags |= O_NONBLOCK; + + if (fcntl (handle, F_SETFL, socketFlags) != 0) + return false; +#endif + + return true; +} + +static bool connectSocket (int volatile& handle, + const bool isDatagram, + void** serverAddress, + const String& hostName, + const int portNumber, + const int timeOutMillisecs) throw() +{ + struct hostent* const hostEnt = gethostbyname (hostName); + + if (hostEnt == 0) + return false; + + struct in_addr targetAddress; + memcpy (&targetAddress.s_addr, + *(hostEnt->h_addr_list), + sizeof (targetAddress.s_addr)); + + struct sockaddr_in servTmpAddr; + zerostruct (servTmpAddr); + servTmpAddr.sin_family = PF_INET; + servTmpAddr.sin_addr = targetAddress; + servTmpAddr.sin_port = htons ((uint16) portNumber); + + if (handle < 0) + handle = (int) socket (AF_INET, isDatagram ? SOCK_DGRAM : SOCK_STREAM, 0); + + if (handle < 0) + return false; + + if (isDatagram) + { + *serverAddress = new struct sockaddr_in(); + *((struct sockaddr_in*) *serverAddress) = servTmpAddr; + + return true; + } + + setSocketBlockingState (handle, false); + + const int result = ::connect (handle, (struct sockaddr*) &servTmpAddr, sizeof (struct sockaddr_in)); + + if (result < 0) + { +#if JUCE_WIN32 + if (result == SOCKET_ERROR && WSAGetLastError() == WSAEWOULDBLOCK) +#else + if (errno == EINPROGRESS) +#endif + { + if (waitForReadiness (handle, false, timeOutMillisecs) != 1) + { + setSocketBlockingState (handle, true); + return false; + } + } + } + + setSocketBlockingState (handle, true); + resetSocketOptions (handle, false); + + return true; +} + +//============================================================================== +StreamingSocket::StreamingSocket() + : portNumber (0), + handle (-1), + connected (false), + isListener (false) +{ +#if JUCE_WIN32 + initWin32Sockets(); +#endif +} + +StreamingSocket::StreamingSocket (const String& hostName_, + const int portNumber_, + const int handle_) + : hostName (hostName_), + portNumber (portNumber_), + handle (handle_), + connected (true), + isListener (false) +{ +#if JUCE_WIN32 + initWin32Sockets(); +#endif + + resetSocketOptions (handle_, false); +} + +StreamingSocket::~StreamingSocket() +{ + close(); +} + +//============================================================================== +int StreamingSocket::read (void* destBuffer, const int maxBytesToRead) +{ + return (connected && ! isListener) ? readSocket (handle, destBuffer, maxBytesToRead, connected) + : -1; +} + +int StreamingSocket::write (const void* sourceBuffer, const int numBytesToWrite) +{ + if (isListener || ! connected) + return -1; + +#if JUCE_WIN32 + return send (handle, (const char*) sourceBuffer, numBytesToWrite, 0); +#else + int result; + + while ((result = ::write (handle, sourceBuffer, numBytesToWrite)) < 0 + && errno == EINTR) + { + } + + return result; +#endif +} + +//============================================================================== +int StreamingSocket::waitUntilReady (const bool readyForReading, + const int timeoutMsecs) const +{ + return connected ? waitForReadiness (handle, readyForReading, timeoutMsecs) + : -1; +} + +//============================================================================== +bool StreamingSocket::bindToPort (const int port) +{ + return bindSocketToPort (handle, port); +} + +bool StreamingSocket::connect (const String& remoteHostName, + const int remotePortNumber, + const int timeOutMillisecs) +{ + if (isListener) + { + jassertfalse // a listener socket can't connect to another one! + return false; + } + + if (connected) + close(); + + hostName = remoteHostName; + portNumber = remotePortNumber; + isListener = false; + + connected = connectSocket (handle, false, 0, remoteHostName, + remotePortNumber, timeOutMillisecs); + + if (! (connected && resetSocketOptions (handle, false))) + { + close(); + return false; + } + + return true; +} + +void StreamingSocket::close() +{ +#if JUCE_WIN32 + closesocket (handle); + connected = false; +#else + if (connected) + { + connected = false; + + if (isListener) + { + // need to do this to interrupt the accept() function.. + StreamingSocket temp; + temp.connect ("localhost", portNumber, 1000); + } + } + + ::close (handle); +#endif + + hostName = String::empty; + portNumber = 0; + handle = -1; + isListener = false; +} + +//============================================================================== +bool StreamingSocket::createListener (const int newPortNumber) +{ + if (connected) + close(); + + hostName = "listener"; + portNumber = newPortNumber; + isListener = true; + + struct sockaddr_in servTmpAddr; + zerostruct (servTmpAddr); + servTmpAddr.sin_family = PF_INET; + servTmpAddr.sin_addr.s_addr = htonl (INADDR_ANY); + servTmpAddr.sin_port = htons ((uint16) portNumber); + + handle = (int) socket (AF_INET, SOCK_STREAM, 0); + + if (handle < 0) + return false; + + const int reuse = 1; + setsockopt (handle, SOL_SOCKET, SO_REUSEADDR, (const char*) &reuse, sizeof (reuse)); + + if (bind (handle, (struct sockaddr*) &servTmpAddr, sizeof (struct sockaddr_in)) < 0 + || listen (handle, SOMAXCONN) < 0) + { + close(); + return false; + } + + connected = true; + return true; +} + +StreamingSocket* StreamingSocket::waitForNextConnection() const +{ + jassert (isListener || ! connected); // to call this method, you first have to use createListener() to + // prepare this socket as a listener. + + if (connected && isListener) + { + struct sockaddr address; + +#if defined (JUCE_LINUX) || (defined (JUCE_MAC) && ! MACOS_10_2_OR_EARLIER) + socklen_t len = sizeof (sockaddr); +#else + int len = sizeof (sockaddr); +#endif + const int newSocket = (int) accept (handle, &address, &len); + + if (newSocket >= 0 && connected) + return new StreamingSocket (inet_ntoa (((struct sockaddr_in*) &address)->sin_addr), + portNumber, newSocket); + } + + return 0; +} + +bool StreamingSocket::isLocal() const throw() +{ + return hostName == T("127.0.0.1"); +} + + +//============================================================================== +//============================================================================== +DatagramSocket::DatagramSocket (const int localPortNumber) + : portNumber (0), + handle (-1), + connected (false), + serverAddress (0) +{ +#if JUCE_WIN32 + initWin32Sockets(); +#endif + + handle = (int) socket (AF_INET, SOCK_DGRAM, 0); + bindToPort (localPortNumber); +} + +DatagramSocket::DatagramSocket (const String& hostName_, const int portNumber_, + const int handle_, const int localPortNumber) + : hostName (hostName_), + portNumber (portNumber_), + handle (handle_), + connected (true), + serverAddress (0) +{ +#if JUCE_WIN32 + initWin32Sockets(); +#endif + + resetSocketOptions (handle_, true); + bindToPort (localPortNumber); +} + +DatagramSocket::~DatagramSocket() +{ + close(); + + delete ((struct sockaddr_in*) serverAddress); + serverAddress = 0; +} + +void DatagramSocket::close() +{ +#if JUCE_WIN32 + closesocket (handle); + connected = false; +#else + connected = false; + ::close (handle); +#endif + + hostName = String::empty; + portNumber = 0; + handle = -1; +} + +bool DatagramSocket::bindToPort (const int port) +{ + return bindSocketToPort (handle, port); +} + +bool DatagramSocket::connect (const String& remoteHostName, + const int remotePortNumber, + const int timeOutMillisecs) +{ + if (connected) + close(); + + hostName = remoteHostName; + portNumber = remotePortNumber; + + connected = connectSocket (handle, true, &serverAddress, + remoteHostName, remotePortNumber, + timeOutMillisecs); + + if (! (connected && resetSocketOptions (handle, true))) + { + close(); + return false; + } + + return true; +} + +DatagramSocket* DatagramSocket::waitForNextConnection() const +{ + struct sockaddr address; + +#if defined (JUCE_LINUX) || (defined (JUCE_MAC) && ! MACOS_10_2_OR_EARLIER) + socklen_t len = sizeof (sockaddr); +#else + int len = sizeof (sockaddr); +#endif + + while (waitUntilReady (true, -1) == 1) + { + char buf[1]; + + if (recvfrom (handle, buf, 0, 0, &address, &len) > 0) + { + return new DatagramSocket (inet_ntoa (((struct sockaddr_in*) &address)->sin_addr), + ntohs (((struct sockaddr_in*) &address)->sin_port), + -1, -1); + } + } + + return 0; +} + +//============================================================================== +int DatagramSocket::waitUntilReady (const bool readyForReading, + const int timeoutMsecs) const +{ + return connected ? waitForReadiness (handle, readyForReading, timeoutMsecs) + : -1; +} + +int DatagramSocket::read (void* destBuffer, const int maxBytesToRead) +{ + return connected ? readSocket (handle, destBuffer, maxBytesToRead, connected) + : -1; +} + +int DatagramSocket::write (const void* sourceBuffer, const int numBytesToWrite) +{ + // You need to call connect() first to set the server address.. + jassert (serverAddress != 0 && connected); + + return connected ? sendto (handle, (const char*) sourceBuffer, + numBytesToWrite, 0, + (const struct sockaddr*) serverAddress, + sizeof (struct sockaddr_in)) + : -1; +} + +bool DatagramSocket::isLocal() const throw() +{ + return hostName == T("127.0.0.1"); +} + + +END_JUCE_NAMESPACE