- don't build ghost's event printer unless ghost debug is enabled.
authorCampbell Barton <ideasman42@gmail.com>
Wed, 13 Jul 2011 06:04:54 +0000 (06:04 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 13 Jul 2011 06:04:54 +0000 (06:04 +0000)
- use char rather then STR_String for the event printer.
- added option to build WITH_GHOST_DEBUG for cmake
- renamed WITH_SDL_GHOST --> WITH_GHOST_SDL

CMakeLists.txt
intern/ghost/CMakeLists.txt
intern/ghost/SConscript
intern/ghost/intern/GHOST_Debug.h
intern/ghost/intern/GHOST_EventPrinter.cpp
intern/ghost/intern/GHOST_EventPrinter.h
intern/ghost/intern/GHOST_ISystem.cpp
intern/ghost/intern/GHOST_NDOFManager.cpp
intern/ghost/intern/GHOST_SystemWin32.cpp

index 9b583a8..dc42a4a 100644 (file)
@@ -106,15 +106,21 @@ option(WITH_BULLET        "Enable Bullet (Physics Engine)" ON)
 option(WITH_GAMEENGINE    "Enable Game Engine" ON)
 option(WITH_PLAYER        "Build Player" OFF)
 
 option(WITH_GAMEENGINE    "Enable Game Engine" ON)
 option(WITH_PLAYER        "Build Player" OFF)
 
-option(WITH_AUDASPACE    "Build with blenders audio library" ON)
-mark_as_advanced(WITH_AUDASPACE)
+# GHOST Windowing Library Options
+option(WITH_GHOST_DEBUG   "Enable debugging output for the GHOST library" OFF)
+mark_as_advanced(WITH_GHOST_DEBUG)
 
 
-option(WITH_SDL_GHOST    "Enable building blender against SDL for windowing rather then the native APIs" OFF)
-mark_as_advanced(WITH_SDL_GHOST)
+option(WITH_GHOST_SDL    "Enable building blender against SDL for windowing rather then the native APIs" OFF)
+mark_as_advanced(WITH_GHOST_SDL)
 
 
+# Misc...
 option(WITH_HEADLESS      "Build without graphical support (renderfarm, server mode only)" OFF)
 mark_as_advanced(WITH_HEADLESS)
 
 option(WITH_HEADLESS      "Build without graphical support (renderfarm, server mode only)" OFF)
 mark_as_advanced(WITH_HEADLESS)
 
+option(WITH_AUDASPACE    "Build with blenders audio library (only disable if you know what you're doing!)" ON)
+mark_as_advanced(WITH_AUDASPACE)
+
+
 # (unix defaults to OpenMP On)
 if(UNIX AND NOT APPLE)
        option(WITH_OPENMP        "Enable OpenMP (has to be supported by the compiler)" ON)
 # (unix defaults to OpenMP On)
 if(UNIX AND NOT APPLE)
        option(WITH_OPENMP        "Enable OpenMP (has to be supported by the compiler)" ON)
@@ -212,8 +218,8 @@ if(NOT WITH_AUDASPACE AND (WITH_OPENAL OR WITH_SDL OR WITH_JACK))
        message(FATAL_ERROR "WITH_OPENAL/WITH_SDL/WITH_JACK/WITH_CODEC_FFMPEG require WITH_AUDASPACE")
 endif()
 
        message(FATAL_ERROR "WITH_OPENAL/WITH_SDL/WITH_JACK/WITH_CODEC_FFMPEG require WITH_AUDASPACE")
 endif()
 
-if(NOT WITH_SDL AND WITH_SDL_GHOST)
-       message(FATAL_ERROR "WITH_SDL_GHOST requires WITH_SDL to be ON")
+if(NOT WITH_SDL AND WITH_GHOST_SDL)
+       message(FATAL_ERROR "WITH_GHOST_SDL requires WITH_SDL to be ON")
 endif()
 
 if(NOT WITH_IMAGE_OPENJPEG AND WITH_IMAGE_REDCODE)
 endif()
 
 if(NOT WITH_IMAGE_OPENJPEG AND WITH_IMAGE_REDCODE)
@@ -440,7 +446,7 @@ if(UNIX AND NOT APPLE)
        # OpenSuse needs lutil, ArchLinux not, for now keep, can avoid by using --as-needed
        set(PLATFORM_LINKLIBS "-lutil -lc -lm -lpthread -lstdc++")
 
        # OpenSuse needs lutil, ArchLinux not, for now keep, can avoid by using --as-needed
        set(PLATFORM_LINKLIBS "-lutil -lc -lm -lpthread -lstdc++")
 
-       if((NOT WITH_HEADLESS) AND (NOT WITH_SDL_GHOST))
+       if((NOT WITH_HEADLESS) AND (NOT WITH_GHOST_SDL))
                find_package(X11 REQUIRED)
                find_path(X11_XF86keysym_INCLUDE_PATH X11/XF86keysym.h ${X11_INC_SEARCH_PATH})
                mark_as_advanced(X11_XF86keysym_INCLUDE_PATH)
                find_package(X11 REQUIRED)
                find_path(X11_XF86keysym_INCLUDE_PATH X11/XF86keysym.h ${X11_INC_SEARCH_PATH})
                mark_as_advanced(X11_XF86keysym_INCLUDE_PATH)
index 30f5b17..f887d02 100644 (file)
@@ -42,7 +42,6 @@ set(SRC
        intern/GHOST_Path-api.cpp
        intern/GHOST_DisplayManager.cpp
        intern/GHOST_EventManager.cpp
        intern/GHOST_Path-api.cpp
        intern/GHOST_DisplayManager.cpp
        intern/GHOST_EventManager.cpp
-       intern/GHOST_EventPrinter.cpp
        intern/GHOST_ISystem.cpp
        intern/GHOST_ISystemPaths.cpp
        intern/GHOST_ModifierKeys.cpp
        intern/GHOST_ISystem.cpp
        intern/GHOST_ISystemPaths.cpp
        intern/GHOST_ModifierKeys.cpp
@@ -89,7 +88,17 @@ set(SRC
        intern/GHOST_WindowManager.h
 )
 
        intern/GHOST_WindowManager.h
 )
 
-if(WITH_HEADLESS OR WITH_SDL_GHOST)
+if(WITH_GHOST_DEBUG)
+       list(APPEND SRC
+               intern/GHOST_EventPrinter.cpp
+
+               intern/GHOST_EventPrinter.h
+       )
+       add_definitions(-DWITH_GHOST_DEBUG)
+endif()
+
+
+if(WITH_HEADLESS OR WITH_GHOST_SDL)
        if(WITH_HEADLESS)
                list(APPEND SRC
                        intern/GHOST_DisplayManagerNULL.h
        if(WITH_HEADLESS)
                list(APPEND SRC
                        intern/GHOST_DisplayManagerNULL.h
@@ -107,7 +116,7 @@ if(WITH_HEADLESS OR WITH_SDL_GHOST)
                        intern/GHOST_SystemSDL.h
                        intern/GHOST_WindowSDL.h
                )
                        intern/GHOST_SystemSDL.h
                        intern/GHOST_WindowSDL.h
                )
-               add_definitions(-DWITH_SDL_GHOST)
+               add_definitions(-DWITH_GHOST_SDL)
        endif()
 
 
        endif()
 
 
index ccfaa48..c65ec58 100644 (file)
@@ -25,6 +25,7 @@ if env['WITH_GHOST_SDL']:
         except ValueError:
             pass
     incs += ' ' + env['BF_SDL_INC']
         except ValueError:
             pass
     incs += ' ' + env['BF_SDL_INC']
+    defs += ['WITH_GHOST_SDL']
 elif window_system in ('linux2', 'openbsd3', 'sunos5', 'freebsd7', 'freebsd8', 'freebsd9', 'irix6', 'aix4', 'aix5'):
     for f in pf:
         try:
 elif window_system in ('linux2', 'openbsd3', 'sunos5', 'freebsd7', 'freebsd8', 'freebsd9', 'irix6', 'aix4', 'aix5'):
     for f in pf:
         try:
@@ -73,7 +74,9 @@ else:
     Exit()
 
 if env['BF_GHOST_DEBUG']:
     Exit()
 
 if env['BF_GHOST_DEBUG']:
-    defs.append('BF_GHOST_DEBUG')
+    defs.append('WITH_GHOST_DEBUG')
+else:
+       sources.remove('intern' + os.sep + 'GHOST_EventPrinter.cpp')
 
 if window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'):
     incs = env['BF_WINTAB_INC'] + ' ' + incs
 
 if window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'):
     incs = env['BF_WINTAB_INC'] + ' ' + incs
index e77f3b9..ef1099b 100644 (file)
@@ -41,9 +41,9 @@
        #endif // DEBUG
 #endif // WIN32
 
        #endif // DEBUG
 #endif // WIN32
 
-#ifdef BF_GHOST_DEBUG 
+#ifdef WITH_GHOST_DEBUG 
        #define GHOST_DEBUG // spit ghost events to stdout
        #define GHOST_DEBUG // spit ghost events to stdout
-#endif // BF_GHOST_DEBUG 
+#endif // WITH_GHOST_DEBUG 
 
 #ifdef GHOST_DEBUG
        #include <iostream>
 
 #ifdef GHOST_DEBUG
        #include <iostream>
index 139c4be..9fa0b27 100644 (file)
@@ -37,6 +37,7 @@
 #include "GHOST_EventDragnDrop.h"
 #include "GHOST_Debug.h"
 
 #include "GHOST_EventDragnDrop.h"
 #include "GHOST_Debug.h"
 
+#include <stdio.h>
 
 bool GHOST_EventPrinter::processEvent(GHOST_IEvent* event)
 {
 
 bool GHOST_EventPrinter::processEvent(GHOST_IEvent* event)
 {
@@ -82,17 +83,17 @@ bool GHOST_EventPrinter::processEvent(GHOST_IEvent* event)
        case GHOST_kEventKeyUp:
                {
                GHOST_TEventKeyData* keyData = (GHOST_TEventKeyData*)((GHOST_IEvent*)event)->getData();
        case GHOST_kEventKeyUp:
                {
                GHOST_TEventKeyData* keyData = (GHOST_TEventKeyData*)((GHOST_IEvent*)event)->getData();
-               STR_String str;
+               char str[32]= {'\0'};
                getKeyString(keyData->key, str);
                getKeyString(keyData->key, str);
-               std::cout << "GHOST_kEventKeyUp, key: " << str.Ptr();
+               std::cout << "GHOST_kEventKeyUp, key: " << str;
                }
                break;
        case GHOST_kEventKeyDown:
                {
                GHOST_TEventKeyData* keyData = (GHOST_TEventKeyData*)((GHOST_IEvent*)event)->getData();
                }
                break;
        case GHOST_kEventKeyDown:
                {
                GHOST_TEventKeyData* keyData = (GHOST_TEventKeyData*)((GHOST_IEvent*)event)->getData();
-               STR_String str;
+               char str[32]= {'\0'};
                getKeyString(keyData->key, str);
                getKeyString(keyData->key, str);
-               std::cout << "GHOST_kEventKeyDown, key: " << str.Ptr();
+               std::cout << "GHOST_kEventKeyDown, key: " << str;
                }
                break;
                        
                }
                break;
                        
@@ -183,165 +184,161 @@ bool GHOST_EventPrinter::processEvent(GHOST_IEvent* event)
 }
 
 
 }
 
 
-void GHOST_EventPrinter::getKeyString(GHOST_TKey key, STR_String& str) const
+void GHOST_EventPrinter::getKeyString(GHOST_TKey key, char str[32]) const
 {
        if ((key >= GHOST_kKeyComma) && (key <= GHOST_kKeyRightBracket)) {
 {
        if ((key >= GHOST_kKeyComma) && (key <= GHOST_kKeyRightBracket)) {
-               str = ((char)key);
+               sprintf(str, "%c", (char)key);
        } else if ((key >= GHOST_kKeyNumpad0) && (key <= GHOST_kKeyNumpad9)) {
        } else if ((key >= GHOST_kKeyNumpad0) && (key <= GHOST_kKeyNumpad9)) {
-               int number = key - GHOST_kKeyNumpad0;
-               STR_String numberStr (number);
-               str = "Numpad";
-               str += numberStr;
+               sprintf(str, "Numpad %d", (key - GHOST_kKeyNumpad0));
 #if defined(__sun__) || defined(__sun)
        } else if (key == 268828432) { /* solaris keyboards are messed up */
                 /* This should really test XK_F11 but that doesn't work */
 #if defined(__sun__) || defined(__sun)
        } else if (key == 268828432) { /* solaris keyboards are messed up */
                 /* This should really test XK_F11 but that doesn't work */
-               str = "F11";
+               strcpy(str, "F11");
        } else if (key == 268828433) { /* solaris keyboards are messed up */
                 /* This should really test XK_F12 but that doesn't work */
        } else if (key == 268828433) { /* solaris keyboards are messed up */
                 /* This should really test XK_F12 but that doesn't work */
-               str = "F12";
+               strcpy(str, "F12");
 #endif
        } else if ((key >= GHOST_kKeyF1) && (key <= GHOST_kKeyF24)) {
 #endif
        } else if ((key >= GHOST_kKeyF1) && (key <= GHOST_kKeyF24)) {
-               int number = key - GHOST_kKeyF1 + 1;
-               STR_String numberStr (number);
-               str = "F";
-               str += numberStr;
+               sprintf(str, "F%d", key - GHOST_kKeyF1 + 1);
        } else {
        } else {
-               switch (key)
-               {
+               const char *tstr= NULL;
+               switch (key) {
                case GHOST_kKeyBackSpace:
                case GHOST_kKeyBackSpace:
-                       str = "BackSpace";
+                       tstr = "BackSpace";
                        break;
                case GHOST_kKeyTab:
                        break;
                case GHOST_kKeyTab:
-                       str = "Tab";
+                       tstr = "Tab";
                        break;
                case GHOST_kKeyLinefeed:
                        break;
                case GHOST_kKeyLinefeed:
-                       str = "Linefeed";
+                       tstr = "Linefeed";
                        break;
                case GHOST_kKeyClear:
                        break;
                case GHOST_kKeyClear:
-                       str = "Clear";
+                       tstr = "Clear";
                        break;
                case GHOST_kKeyEnter:
                        break;
                case GHOST_kKeyEnter:
-                       str = "Enter";
+                       tstr = "Enter";
                        break;
                case GHOST_kKeyEsc:
                        break;
                case GHOST_kKeyEsc:
-                       str = "Esc";
+                       tstr = "Esc";
                        break;
                case GHOST_kKeySpace:
                        break;
                case GHOST_kKeySpace:
-                       str = "Space";
+                       tstr = "Space";
                        break;
                case GHOST_kKeyQuote:
                        break;
                case GHOST_kKeyQuote:
-                       str = "Quote";
+                       tstr = "Quote";
                        break;
                case GHOST_kKeyBackslash:
                        break;
                case GHOST_kKeyBackslash:
-                       str = "\\";
+                       tstr = "\\";
                        break;
                case GHOST_kKeyAccentGrave:
                        break;
                case GHOST_kKeyAccentGrave:
-                       str = "`";
+                       tstr = "`";
                        break;
                case GHOST_kKeyLeftShift:
                        break;
                case GHOST_kKeyLeftShift:
-                       str = "LeftShift";
+                       tstr = "LeftShift";
                        break;
                case GHOST_kKeyRightShift:
                        break;
                case GHOST_kKeyRightShift:
-                       str = "RightShift";
+                       tstr = "RightShift";
                        break;
                case GHOST_kKeyLeftControl:
                        break;
                case GHOST_kKeyLeftControl:
-                       str = "LeftControl";
+                       tstr = "LeftControl";
                        break;
                case GHOST_kKeyRightControl:
                        break;
                case GHOST_kKeyRightControl:
-                       str = "RightControl";
+                       tstr = "RightControl";
                        break;
                case GHOST_kKeyLeftAlt:
                        break;
                case GHOST_kKeyLeftAlt:
-                       str = "LeftAlt";
+                       tstr = "LeftAlt";
                        break;
                case GHOST_kKeyRightAlt:
                        break;
                case GHOST_kKeyRightAlt:
-                       str = "RightAlt";
+                       tstr = "RightAlt";
                        break;
                case GHOST_kKeyOS:
                        break;
                case GHOST_kKeyOS:
-                       str = "OS";
+                       tstr = "OS";
                        break;
                case GHOST_kKeyGrLess:
             // PC german!
                        break;
                case GHOST_kKeyGrLess:
             // PC german!
-                       str = "GrLess";
+                       tstr = "GrLess";
                        break;
                case GHOST_kKeyCapsLock:
                        break;
                case GHOST_kKeyCapsLock:
-                       str = "CapsLock";
+                       tstr = "CapsLock";
                        break;
                case GHOST_kKeyNumLock:
                        break;
                case GHOST_kKeyNumLock:
-                       str = "NumLock";
+                       tstr = "NumLock";
                        break;
                case GHOST_kKeyScrollLock:
                        break;
                case GHOST_kKeyScrollLock:
-                       str = "ScrollLock";
+                       tstr = "ScrollLock";
                        break;
                case GHOST_kKeyLeftArrow:
                        break;
                case GHOST_kKeyLeftArrow:
-                       str = "LeftArrow";
+                       tstr = "LeftArrow";
                        break;
                case GHOST_kKeyRightArrow:
                        break;
                case GHOST_kKeyRightArrow:
-                       str = "RightArrow";
+                       tstr = "RightArrow";
                        break;
                case GHOST_kKeyUpArrow:
                        break;
                case GHOST_kKeyUpArrow:
-                       str = "UpArrow";
+                       tstr = "UpArrow";
                        break;
                case GHOST_kKeyDownArrow:
                        break;
                case GHOST_kKeyDownArrow:
-                       str = "DownArrow";
+                       tstr = "DownArrow";
                        break;
                case GHOST_kKeyPrintScreen:
                        break;
                case GHOST_kKeyPrintScreen:
-                       str = "PrintScreen";
+                       tstr = "PrintScreen";
                        break;
                case GHOST_kKeyPause:
                        break;
                case GHOST_kKeyPause:
-                       str = "Pause";
+                       tstr = "Pause";
                        break;
                case GHOST_kKeyInsert:
                        break;
                case GHOST_kKeyInsert:
-                       str = "Insert";
+                       tstr = "Insert";
                        break;
                case GHOST_kKeyDelete:
                        break;
                case GHOST_kKeyDelete:
-                       str = "Delete";
+                       tstr = "Delete";
                        break;
                case GHOST_kKeyHome:
                        break;
                case GHOST_kKeyHome:
-                       str = "Home";
+                       tstr = "Home";
                        break;
                case GHOST_kKeyEnd:
                        break;
                case GHOST_kKeyEnd:
-                       str = "End";
+                       tstr = "End";
                        break;
                case GHOST_kKeyUpPage:
                        break;
                case GHOST_kKeyUpPage:
-                       str = "UpPage";
+                       tstr = "UpPage";
                        break;
                case GHOST_kKeyDownPage:
                        break;
                case GHOST_kKeyDownPage:
-                       str = "DownPage";
+                       tstr = "DownPage";
                        break;
                case GHOST_kKeyNumpadPeriod:
                        break;
                case GHOST_kKeyNumpadPeriod:
-                       str = "NumpadPeriod";
+                       tstr = "NumpadPeriod";
                        break;
                case GHOST_kKeyNumpadEnter:
                        break;
                case GHOST_kKeyNumpadEnter:
-                       str = "NumpadEnter";
+                       tstr = "NumpadEnter";
                        break;
                case GHOST_kKeyNumpadPlus:
                        break;
                case GHOST_kKeyNumpadPlus:
-                       str = "NumpadPlus";
+                       tstr = "NumpadPlus";
                        break;
                case GHOST_kKeyNumpadMinus:
                        break;
                case GHOST_kKeyNumpadMinus:
-                       str = "NumpadMinus";
+                       tstr = "NumpadMinus";
                        break;
                case GHOST_kKeyNumpadAsterisk:
                        break;
                case GHOST_kKeyNumpadAsterisk:
-                       str = "NumpadAsterisk";
+                       tstr = "NumpadAsterisk";
                        break;
                case GHOST_kKeyNumpadSlash:
                        break;
                case GHOST_kKeyNumpadSlash:
-                       str = "NumpadSlash";
+                       tstr = "NumpadSlash";
                        break;
                case GHOST_kKeyMediaPlay:
                        break;
                case GHOST_kKeyMediaPlay:
-                       str = "MediaPlayPause";
+                       tstr = "MediaPlayPause";
                        break;
                case GHOST_kKeyMediaStop:
                        break;
                case GHOST_kKeyMediaStop:
-                       str = "MediaStop";
+                       tstr = "MediaStop";
                        break;
                case GHOST_kKeyMediaFirst:
                        break;
                case GHOST_kKeyMediaFirst:
-                       str = "MediaFirst";
+                       tstr = "MediaFirst";
                        break;
                case GHOST_kKeyMediaLast:
                        break;
                case GHOST_kKeyMediaLast:
-                       str = "MediaLast";
+                       tstr = "MediaLast";
                        break;
                default:
                        break;
                default:
-                       str = "unknown";
+                       tstr = "unknown";
                        break;
                }
                        break;
                }
+
+               sprintf(str, "%s", tstr);
        }
 }
 
        }
 }
 
index 74c379e..d9b7f86 100644 (file)
@@ -58,7 +58,7 @@ protected:
         * @param key The GHOST key code to convert.
         * @param str The GHOST key code converted to a readable string.
         */
         * @param key The GHOST key code to convert.
         * @param str The GHOST key code converted to a readable string.
         */
-       void    getKeyString(GHOST_TKey key, STR_String& str) const;
+       void    getKeyString(GHOST_TKey key, char str[32]) const;
 };
 
 #endif // _GHOST_EVENT_PRINTER_H_
 };
 
 #endif // _GHOST_EVENT_PRINTER_H_
index 2cb82ff..278c224 100644 (file)
@@ -43,7 +43,7 @@
 
 #ifdef WITH_HEADLESS
 #      include "GHOST_SystemNULL.h"
 
 #ifdef WITH_HEADLESS
 #      include "GHOST_SystemNULL.h"
-#elif defined(WITH_SDL_GHOST)
+#elif defined(WITH_GHOST_SDL)
 #      include "GHOST_SystemSDL.h"
 #elif defined(WIN32)
 #      include "GHOST_SystemWin32.h"
 #      include "GHOST_SystemSDL.h"
 #elif defined(WIN32)
 #      include "GHOST_SystemWin32.h"
@@ -69,7 +69,7 @@ GHOST_TSuccess GHOST_ISystem::createSystem()
        if (!m_system) {
 #ifdef WITH_HEADLESS
                m_system = new GHOST_SystemNULL();
        if (!m_system) {
 #ifdef WITH_HEADLESS
                m_system = new GHOST_SystemNULL();
-#elif defined(WITH_SDL_GHOST)
+#elif defined(WITH_GHOST_SDL)
                m_system = new GHOST_SystemSDL();
 #elif defined(WIN32)
                m_system = new GHOST_SystemWin32 ();
                m_system = new GHOST_SystemSDL();
 #elif defined(WIN32)
                m_system = new GHOST_SystemWin32 ();
index 30f0de1..dae6cb5 100644 (file)
@@ -85,7 +85,7 @@ GHOST_NDOFManager::deviceOpen(GHOST_IWindow* window,
                        /* do nothing */
                #elif defined(_WIN32) || defined(__APPLE__)
                        m_DeviceHandle = ndofDeviceOpen((void *)&currentNdofValues);    
                        /* do nothing */
                #elif defined(_WIN32) || defined(__APPLE__)
                        m_DeviceHandle = ndofDeviceOpen((void *)&currentNdofValues);    
-               #elif defined(WITH_SDL_GHOST)
+               #elif defined(WITH_GHOST_SDL)
                        /* do nothing */
                #else
                        GHOST_SystemX11 *sys;
                        /* do nothing */
                #else
                        GHOST_SystemX11 *sys;
index 143f7e9..ace6cc0 100644 (file)
@@ -763,7 +763,7 @@ GHOST_EventKey* GHOST_SystemWin32::processKeyEvent(GHOST_IWindow *window, WPARAM
 
                event = new GHOST_EventKey(system->getMilliSeconds(), keyDown ? GHOST_kEventKeyDown: GHOST_kEventKeyUp, window, key, ascii);
                
 
                event = new GHOST_EventKey(system->getMilliSeconds(), keyDown ? GHOST_kEventKeyDown: GHOST_kEventKeyUp, window, key, ascii);
                
-#ifdef BF_GHOST_DEBUG
+#ifdef GHOST_DEBUG
                std::cout << ascii << std::endl;
 #endif
        }
                std::cout << ascii << std::endl;
 #endif
        }