File: clang.patch

package info (click to toggle)
libsx 2.08-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,732 kB
  • sloc: ansic: 8,713; sh: 8,603; makefile: 63
file content (67 lines) | stat: -rw-r--r-- 1,573 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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;