[gtkmm] demos: Use getc() if HAVE_GETC_UNLOCKED is not defined



commit 8b9d0145fc66d453f549d11a086023f85927d3ea
Author: Mikhail Titov <mlt gmx us>
Date:   Wed May 6 19:19:08 2015 +0200

    demos: Use getc() if HAVE_GETC_UNLOCKED is not defined
    
    demos/gtk-demo/demowindow.cc: Calls to getc() were removed by mistake by commit
    6ed01325449fec47457bee741f9c7ec04887c04e. Reinsert them. Bug #748657.

 demos/gtk-demo/demowindow.cc |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/demos/gtk-demo/demowindow.cc b/demos/gtk-demo/demowindow.cc
index f270fed..4e90ef8 100644
--- a/demos/gtk-demo/demowindow.cc
+++ b/demos/gtk-demo/demowindow.cc
@@ -252,7 +252,9 @@ bool DemoWindow::read_line (FILE *stream, GString *str)
 
 #ifdef HAVE_GETC_UNLOCKED
       c = getc_unlocked (stream);
-#endif //GLIBMM_PROPERTIES_ENABLED
+#else
+      c = getc (stream);
+#endif
       if (c == EOF)
        goto done;
       else
@@ -264,8 +266,10 @@ bool DemoWindow::read_line (FILE *stream, GString *str)
        case '\n':
          {
 #ifdef HAVE_GETC_UNLOCKED
-           int next_c = getc_unlocked (stream);
-#endif //GLIBMM_PROPERTIES_ENABLED
+      int next_c = getc_unlocked (stream);
+#else
+      int next_c = getc (stream);
+#endif
            if (!(next_c == EOF ||
                  (c == '\r' && next_c == '\n') ||
                  (c == '\n' && next_c == '\r')))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]