Ticket #113: Haskeline-Unicode.dpatch

File Haskeline-Unicode.dpatch, 3.2 kB (added by batterseapower, 3 years ago)
Line 
11 patch for repository http://code.haskell.org/haskeline:
2
3Mon Apr 11 22:16:21 BST 2011  Max Bolingbroke <batterseapower@hotmail.com>
4  * Use CAString functions to marshal locale names
5
6New patches:
7
8[Use CAString functions to marshal locale names
9Max Bolingbroke <batterseapower@hotmail.com>**20110411211621
10 Ignore-this: f99bf99f238b4510ae302255727ef521
11] {
12hunk ./System/Console/Haskeline/Backend/IConv.hsc 68
13 foreign import ccall "setlocale" c_setlocale :: CInt -> CString -> IO CString
14 
15 setLocale :: Maybe String -> IO (Maybe String)
16-setLocale oldLocale = (maybeWith withCString) oldLocale $ \loc_p -> do
17-    c_setlocale (#const LC_CTYPE) loc_p >>= maybePeek peekCString
18+setLocale oldLocale = (maybeWith withCAString) oldLocale $ \loc_p -> do
19+    c_setlocale (#const LC_CTYPE) loc_p >>= maybePeek peekCAString
20 
21 -----------------
22 -- Getting the encoding
23hunk ./System/Console/Haskeline/Backend/IConv.hsc 80
24 
25 getCodeset :: IO String
26 getCodeset = do
27-    str <- nl_langinfo (#const CODESET) >>= peekCString
28+    str <- nl_langinfo (#const CODESET) >>= peekCAString
29     -- check for codesets which may be returned by Solaris, but not understood
30     -- by GNU iconv.
31     if str `elem` ["","646"]
32hunk ./System/Console/Haskeline/Backend/IConv.hsc 98
33     :: CString -> CString -> IO IConvTPtr
34 
35 iconvOpen :: String -> String -> IO IConvT
36-iconvOpen destName srcName = withCString destName $ \dest ->
37-                            withCString srcName $ \src -> do
38+iconvOpen destName srcName = withCAString destName $ \dest ->
39+                            withCAString srcName $ \src -> do
40                                 res <- iconv_open dest src
41                                 if res == nullPtr `plusPtr` (-1)
42                                     then throwErrno $ "iconvOpen "
43}
44
45Context:
46
47[TAG 0.6.4
48Judah Jacobson <judah.jacobson@gmail.com>**20110317060752
49 Ignore-this: 2df5eafa5f8c5571520de2d3d1a5dd5
50]
51[Record getInputLineWithInitial in CHANGES.
52Judah Jacobson <judah.jacobson@gmail.com>**20110317060407
53 Ignore-this: 9755cf3570a68d58d26de487ef06e756
54]
55[Add new function getInputLineWithInitial.
56Judah Jacobson <judah.jacobson@gmail.com>**20110221232628
57 Ignore-this: bfa1a14232fd4ca2438b9604c902fa43
58 This function lets the user specify initial "default" text for the prompt.
59 Adapted from a patch by Robert Massaioli.
60]
61[Bump version to 0.6.4.0.
62Judah Jacobson <judah.jacobson@gmail.com>**20110221230219
63 Ignore-this: 891a0236739d7b96c57760fe4278493d
64]
65[Add NondecreasingIndentation extension for GHC >= 7.1
66Ian Lynagh <igloo@earth.li>**20110117192223
67 Ignore-this: d76fd2b7014b2e412dfcb1af8bfa74c5
68]
69[Fix issues with the "#81 Attempts" patch.
70Judah Jacobson <judah.jacobson@gmail.com>**20101211071320
71 Ignore-this: d29bc022667bf6c7fdc57db49046fb0
72]
73[Attempt to fix #81 on Windows.
74Judah Jacobson <judah.jacobson@gmail.com>**20101206215548
75 Ignore-this: cba5d8c4f78f2b103f833776ab8044c8
76]
77[Bump version to 0.6.3.3.
78Judah Jacobson <judah.jacobson@gmail.com>**20101206215029
79 Ignore-this: b313bccff23abbd9e56695b6527c675c
80]
81[TAG 0.6.3.2
82Judah Jacobson <judah.jacobson@gmail.com>**20101104171909
83 Ignore-this: 20b210e0c28a8a522b47f14a1590dc2e
84]
85Patch bundle hash:
86476b2eb7d0fdbbc221b37ee3d1bafd4851b80e74