~ubuntu-branches/ubuntu/dapper/newt/dapper

« back to all changes in this revision

Viewing changes to debian/patches/991_wstrlen_private.patch

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2005-03-22 12:44:37 UTC
  • mfrom: (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050322124437-nuhl0pqjcijjno9z
Tags: 0.51.6-20ubuntu3
Add Xhosa translation (thanks, Adi Attar).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
diff -ruN newt-0.51.6-old/Makefile.in newt-0.51.6/Makefile.in
 
2
--- newt-0.51.6-old/Makefile.in 2004-08-14 22:13:51.000000000 +0100
 
3
+++ newt-0.51.6/Makefile.in     2004-08-14 23:04:27.000000000 +0100
 
4
@@ -71,15 +71,15 @@
 
5
            if [ ! -f "$$ver/_snackmodule.so" -o $(LIBNEWTSH) -nt "$$ver/_snackmodule.so" ]; then \
 
6
                mkdir -p $$ver ;\
 
7
                $(CC) $(CFLAGS) -I/usr/include/$$ver -fPIC -c -o $$ver/snackmodule.o snackmodule.c ;\
 
8
-               $(CC) --shared $(SHCFLAGS) -o $$ver/_snackmodule.so $$ver/snackmodule.o -L . $(LIBNEWTSH) ;\
 
9
+               $(CC) --shared $(SHCFLAGS) -o $$ver/_snackmodule.so $$ver/snackmodule.o -L .  -lnewt -lslang ;\
 
10
            fi ; \
 
11
        done
 
12
 
 
13
 whiptail: $(NDIALOGOBJS) $(LIBNEWTSH)
 
14
-       $(CC) -g -o whiptail $(NDIALOGOBJS) -L . $(LIBNEWTSH) $(LIBS) -lpopt
 
15
+       $(CC) -g -o whiptail $(NDIALOGOBJS) -L . -lnewt $(LIBS) -lpopt
 
16
 
 
17
 whiptcl.so: $(WHIPTCLOBJS) $(LIBNEWTSH)
 
18
-       $(CC) -shared $(SHCFLAGS) -o whiptcl.so $(WHIPTCLOBJS) -L . $(LIBNEWTSH) $(LIBTCL) -lslang -lpopt -lm
 
19
+       $(CC) -shared $(SHCFLAGS) -o whiptcl.so $(WHIPTCLOBJS) -L . -lnewt  $(LIBTCL) -lslang -lpopt -lm
 
20
 
 
21
 # Ensure dialogboxes is compiled -fPIC
 
22
 dialogboxes.o: dialogboxes.c
 
23
@@ -112,6 +112,7 @@
 
24
 
 
25
 $(LIBNEWTSH): $(SHAREDDIR) $(SHAREDOBJS)
 
26
        $(CC) -shared -o $(LIBNEWTSH) $(SHLIBFLAGS) -Wl,-soname,$(LIBNEWTSONAME) $(SHAREDOBJS) $(SHLIBS)
 
27
+       ln -s $(LIBNEWTSH) libnewt.so
 
28
 
 
29
 $(SHAREDDIR)/%.o : %.c
 
30
        $(CC) $(SHCFLAGS) -c $(CFLAGS) -o $@ $<
 
31
diff -ruN newt-0.51.6-old/newt.0.51.ver newt-0.51.6/newt.0.51.ver
 
32
--- newt-0.51.6-old/newt.0.51.ver       2004-08-14 22:13:51.000000000 +0100
 
33
+++ newt-0.51.6/newt.0.51.ver   2004-08-14 23:04:36.000000000 +0100
 
34
@@ -1,5 +1,6 @@
 
35
 NEWT_0.51 {
 
36
        global: newt*;
 
37
+               _newt_wstrlen;
 
38
        local: *;
 
39
 };
 
40
 
 
41
diff -ruN newt-0.51.6-old/newt.c newt-0.51.6/newt.c
 
42
--- newt-0.51.6-old/newt.c      2004-08-14 22:13:51.000000000 +0100
 
43
+++ newt-0.51.6/newt.c  2004-08-14 22:13:51.000000000 +0100
 
44
@@ -153,7 +153,7 @@
 
45
     return -1;
 
46
 }
 
47
 
 
48
-int wstrlen(const char *str, int len) {
 
49
+int _newt_wstrlen(const char *str, int len) {
 
50
        mbstate_t ps;
 
51
        wchar_t tmp;
 
52
        int nchars = 0;
 
53
diff -ruN newt-0.51.6-old/newt_pr.h newt-0.51.6/newt_pr.h
 
54
--- newt-0.51.6-old/newt_pr.h   2002-08-15 21:13:40.000000000 +0100
 
55
+++ newt-0.51.6/newt_pr.h       2004-08-14 22:13:51.000000000 +0100
 
56
@@ -80,6 +80,7 @@
 
57
 struct eventResult newtDefaultEventHandler(newtComponent c,
 
58
                                           struct event ev);
 
59
 
 
60
-int wstrlen(const char *str, int len);
 
61
+int _newt_wstrlen(const char *str, int len);
 
62
+#define wstrlen(str,len) _newt_wstrlen((str),(len))
 
63
 
 
64
 #endif /* H_NEWT_PR */
 
65
diff -ruN newt-0.51.6-old/whiptail.c newt-0.51.6/whiptail.c
 
66
--- newt-0.51.6-old/whiptail.c  2004-08-14 22:13:51.000000000 +0100
 
67
+++ newt-0.51.6/whiptail.c      2004-08-14 22:13:51.000000000 +0100
 
68
@@ -12,6 +12,7 @@
 
69
 #include "nls.h"
 
70
 #include "dialogboxes.h"
 
71
 #include "newt.h"
 
72
+#include "newt_pr.h"
 
73
 
 
74
 enum { NO_ERROR = 0, WAS_ERROR = 1 };
 
75
 
 
76
@@ -68,6 +69,7 @@
 
77
        exit(DLG_ERROR);
 
78
 }
 
79
 
 
80
+#if 0
 
81
 /* FIXME Copied from newt.c
 
82
  * Place somewhere better -- dialogboxes? -- amck
 
83
  */
 
84
@@ -94,6 +96,7 @@
 
85
        }
 
86
        return nchars;
 
87
 }
 
88
+#endif
 
89
 
 
90
 /*
 
91
  * The value of *width is increased if it is not as large as the width of
 
92
@@ -112,7 +115,7 @@
 
93
     if ( *s == '\n' )
 
94
        s++;
 
95
 
 
96
-    *chrs = wstrlen (line, s - line );
 
97
+    *chrs = _newt_wstrlen (line, s - line );
 
98
     *width = max(*width, *chrs);
 
99
 
 
100
     return s;