| 1 | |
|---|
| 2 | New patches: |
|---|
| 3 | |
|---|
| 4 | [Add get/set functions for the rl_attempted_completion_over variable. |
|---|
| 5 | judah.jacobson@gmail.com**20070211230806] { |
|---|
| 6 | hunk ./System/Console/Readline.hsc 243 |
|---|
| 7 | + setAttemptedCompletionOver, -- :: Bool -> IO () |
|---|
| 8 | + getAttemptedCompletionOver, -- :: IO Bool |
|---|
| 9 | hunk ./System/Console/Readline.hsc 1223 |
|---|
| 10 | +foreign import ccall "&" rl_attempted_completion_over :: Ptr CInt |
|---|
| 11 | + |
|---|
| 12 | +getAttemptedCompletionOver :: IO Bool |
|---|
| 13 | +getAttemptedCompletionOver = |
|---|
| 14 | + liftM (/=0) (peek rl_attempted_completion_over) |
|---|
| 15 | + |
|---|
| 16 | +setAttemptedCompletionOver :: Bool -> IO () |
|---|
| 17 | +setAttemptedCompletionOver over = |
|---|
| 18 | + poke rl_attempted_completion_over (if over then 1 else 0) |
|---|
| 19 | + |
|---|
| 20 | } |
|---|
| 21 | |
|---|
| 22 | [Add interface for rl_completion_word_break_hook (version 5.0 or higher). |
|---|
| 23 | judah.jacobson@gmail.com**20070211231618] { |
|---|
| 24 | hunk ./System/Console/Readline.hsc 250 |
|---|
| 25 | +#if HAVE_READLINE_5 |
|---|
| 26 | + , |
|---|
| 27 | + setCompletionWordBreakHook |
|---|
| 28 | + -- :: Maybe (IO (Maybe String)) -> IO () |
|---|
| 29 | +#endif |
|---|
| 30 | hunk ./System/Console/Readline.hsc 1016 |
|---|
| 31 | + |
|---|
| 32 | hunk ./System/Console/Readline.hsc 1021 |
|---|
| 33 | +#if HAVE_READLINE_5 |
|---|
| 34 | +type StringFunc = IO (Ptr CChar) |
|---|
| 35 | + |
|---|
| 36 | +foreign import ccall "&" rl_completion_word_break_hook |
|---|
| 37 | + :: Ptr (FunPtr StringFunc) |
|---|
| 38 | + |
|---|
| 39 | +foreign import ccall "wrapper" |
|---|
| 40 | + exportStringFunc :: StringFunc -> IO (FunPtr StringFunc) |
|---|
| 41 | + |
|---|
| 42 | +setCompletionWordBreakHook |
|---|
| 43 | + :: Maybe (IO (Maybe String)) -> IO () |
|---|
| 44 | +setCompletionWordBreakHook fun = |
|---|
| 45 | + setFunPtr rl_completion_word_break_hook fun $ \f -> |
|---|
| 46 | + exportStringFunc $ do |
|---|
| 47 | + wordBreaks <- f |
|---|
| 48 | + case wordBreaks of |
|---|
| 49 | + Nothing -> return nullPtr |
|---|
| 50 | + Just wordBreaksString -> newCString wordBreaksString |
|---|
| 51 | + |
|---|
| 52 | +#endif |
|---|
| 53 | + |
|---|
| 54 | hunk ./configure.ac 65 |
|---|
| 55 | + AC_CHECK_LIB(readline, rl_completion_word_break_hook, |
|---|
| 56 | + [AC_DEFINE([HAVE_READLINE_5], [1], [Define to 1 if readline has version >= 5.0.])], |
|---|
| 57 | + [AC_DEFINE([HAVE_READLINE_5], [0], [Define to 1 if readline has version >= 5.0.])]) |
|---|
| 58 | hunk ./configure.ac 71 |
|---|
| 59 | + AC_DEFINE([HAVE_READLINE_5], [0], [Define to 1 if readline has version >= 5.0.]) |
|---|
| 60 | } |
|---|
| 61 | |
|---|
| 62 | Context: |
|---|
| 63 | |
|---|
| 64 | [TAG 6.6 release |
|---|
| 65 | Ian Lynagh <igloo@earth.li>**20061011124740] |
|---|
| 66 | [add boilerplate Setup.hs |
|---|
| 67 | Ross Paterson <ross@soi.city.ac.uk>**20060928231526] |
|---|
| 68 | [Typo (this is the readline, not unix, package) |
|---|
| 69 | Ian Lynagh <igloo@earth.li>**20060823144042] |
|---|
| 70 | [remove unnecessary #include "ghcconfig.h" |
|---|
| 71 | Ross Paterson <ross@soi.city.ac.uk>**20060809132127] |
|---|
| 72 | [Make the configure test robust against libedit |
|---|
| 73 | Simon Marlow <simonmar@microsoft.com>**20060706120654 |
|---|
| 74 | See #766 |
|---|
| 75 | Thanks to Greg Wright for the fix. |
|---|
| 76 | ] |
|---|
| 77 | [make a start on Cabalizing readline |
|---|
| 78 | Ross Paterson <ross@soi.city.ac.uk>**20060609161024] |
|---|
| 79 | [Move readline configuration into the readline package |
|---|
| 80 | Simon Marlow <simonmar@microsoft.com>**20060609135511 |
|---|
| 81 | |
|---|
| 82 | Configuration of the readline package is now done with a |
|---|
| 83 | package-private configure script, which takes it a step closer to |
|---|
| 84 | being a standalone Cabal package. |
|---|
| 85 | |
|---|
| 86 | At the same time I added --with-readline-includes and |
|---|
| 87 | --with-readline-libraries options to cater for systems where these |
|---|
| 88 | libraries live in non-std places. |
|---|
| 89 | |
|---|
| 90 | ] |
|---|
| 91 | [TAG Initial conversion from CVS complete |
|---|
| 92 | John Goerzen <jgoerzen@complete.org>**20060112154138] |
|---|
| 93 | Patch bundle hash: |
|---|
| 94 | 367b9df2a9175aa446267d40c850b20092a306e8 |
|---|