Move idnkit from SFW to oi-userland
[unleashed-userland.git] / components / library / idnkit / patches / lib_unicode.c.patch
blob10fad2373ba38eff6d858438c733205b2b1f3b99
1 *** idnkit-1.0-src/lib/unicode.c.org Wed Aug 27 11:37:02 2003
2 --- idnkit-1.0-src/lib/unicode.c Tue Sep 2 17:13:30 2003
3 ***************
4 *** 117,122 ****
5 --- 117,126 ----
6 idn__unicode_version_t v;
8 assert(versionp != NULL);
9 + #ifdef SUN_CHANGE
10 + if (versionp == NULL)
11 + return (idn_notfound);
12 + #endif /* SUN_CHANGE */
13 TRACE(("idn__unicode_create(version=%-.50s)\n",
14 version == NULL ? "<NULL>" : version));
16 ***************
17 *** 135,140 ****
18 --- 139,148 ----
19 void
20 idn__unicode_destroy(idn__unicode_version_t version) {
21 assert(version != NULL);
22 + #ifdef SUN_CHANGE
23 + if (version == NULL)
24 + return;
25 + #endif /* SUN_CHANGE */
26 TRACE(("idn__unicode_destroy()\n"));
27 /* Nothing to do */
29 ***************
30 *** 156,161 ****
31 --- 164,173 ----
32 const unsigned long *seq;
34 assert(v != NULL && vlen >= 0 && decomp_lenp != NULL);
35 + #ifdef SUN_CHANGE
36 + if (v == NULL || vlen < 0 || decomp_lenp == NULL)
37 + return (idn_notfound);
38 + #endif /* SUN_CHANGE */
40 if (c > UCS_MAX)
41 return (idn_notfound);
42 ***************
43 *** 253,258 ****
44 --- 265,274 ----
45 const struct composition *cseq;
47 assert(compp != NULL);
48 + #ifdef SUN_CHANGE
49 + if (compp == NULL)
50 + return (idn_notfound);
51 + #endif /* SUN_CHANGE */
53 if (c1 > UCS_MAX || c2 > UCS_MAX)
54 return (idn_notfound);