Author: Alastair McKinstry <mckinstry@debian.org>
Description: Move nested functions out, as clang does not support this feature (yet)
Last-Updated: 2013-05-19
Forwarded: no

Index: libsx-2.05/src/popups.c
===================================================================
--- libsx-2.05.orig/src/popups.c	2013-05-19 03:19:57.000000000 +0100
+++ libsx-2.05/src/popups.c	2013-05-19 03:42:40.000000000 +0100
@@ -19,6 +19,29 @@
 
 extern XtAppContext  lsx_app_con;
 
+/* Clang does not support nested functions. */
+
+  void GetTextCancel(Widget ww, void* data)
+  {
+     string = NULL;
+     SetCurrentWindow(ww);
+     CloseWindow();
+  }
+
+  void GetTextOkay(Widget ww, void* data)
+  {
+  char *ptr;
+
+     ptr = GetStringEntry(wid_gettext[1]);
+     if (ptr!=NULL)
+        {
+        string = (char *)malloc((strlen(ptr)+1)*sizeof(char));
+        strcpy(string, ptr);
+        }
+     SetCurrentWindow(ww);
+     CloseWindow();
+  }
+
 
 /*
  * User input routines that take place through Dialog boxes (getting
@@ -67,27 +90,6 @@
 char *string;
 int i;
 
-  void GetTextCancel(Widget ww, void* data)
-  {
-     string = NULL;
-     SetCurrentWindow(ww);
-     CloseWindow();
-  }
-
-  void GetTextOkay(Widget ww, void* data)
-  {
-  char *ptr;
-
-     ptr = GetStringEntry(wid_gettext[1]);
-     if (ptr!=NULL)
-        {
-        string = (char *)malloc((strlen(ptr)+1)*sizeof(char));
-        strcpy(string, ptr);
-        }
-     SetCurrentWindow(ww);
-     CloseWindow();
-  }
-
    MakeWindow("GetText",SAME_DISPLAY, EXCLUSIVE_WINDOW);
    
    string = NULL;
