Ticket #2053: readline-read-write-history-1.patch

File readline-read-write-history-1.patch, 6.1 KB (added by ajd, 8 years ago)

Patch to add read_history and write_history capabilities to readline

2New patches:
4[Added read_history and write_history bindings
5[email protected]**20080119065222
7 These bindings allow programs to have readline save the history for a session and then reload it in a future session. Many programs utilizing the history features of readline will want to allow users to scroll back through future sessions. (The direct motivation for this patch was adding a persistent history capability for GHCi.)
8] {
9hunk ./System/Console/Readline.hsc 44
10+    readHistory, -- :: String -> IO ()
11+    writeHistory, -- :: String -> IO ()
12hunk ./System/Console/Readline.hsc 338
13+readHistory :: FilePath -> IO ()
14+readHistory fp = withCString fp read_history
15+foreign import ccall unsafe read_history :: Ptr CChar -> IO ()
17+writeHistory :: FilePath -> IO ()
18+writeHistory fp = withCString fp write_history
19+foreign import ccall unsafe write_history :: Ptr CChar -> IO ()
25[markup for URL
26Ross Paterson <[email protected]>**20071107005425]
27[remove obsolete config.mk.in
28Ross Paterson <[email protected]>**20071107005850
30 This was used when building in the GHC tree using the old fptools build
31 system, to pass parameters from configure to the Makefile.  With the new
32 Cabal-based build system, they go via readline.buildinfo.
34[FIX: fix name of include file in sdist
35Ross Paterson <[email protected]>**20071103163724]
36[Fix test for whether readline is really editline to work for MacOS 10.5
37Manuel M T Chakravarty <[email protected]>**20071031105453]
38[Use configurations to allow building with older ghc & base lib
39Duncan Coutts <[email protected]>**20071018111417
40 Also specify build-type and cabal-version
42[bump the version number
43Ian Lynagh <[email protected]>**20071014105053]
44[Add interface for rl_completion_word_break_hook (version 5.0 or higher).
45[email protected]**20070211231618]
46[Add get/set functions for the rl_attempted_completion_over variable.
47[email protected]**20070211230806]
48[Add HsReadlineConfig.h to install-includes
49Ian Lynagh <[email protected]>**20070925214115
50 Patch from Audrey Tang
52[clean config.mk
53Simon Marlow <[email protected]>**20070914140737]
54[Add more entries to boring file
55Ian Lynagh <[email protected]>**20070913210720]
56[Add a boring file
57Ian Lynagh <[email protected]>**20070913204656]
58[TAG ghc-6.8 branched 2007-09-03
59Ian Lynagh <[email protected]>**20070903155838]
60[Link against GNUreadline.framework, if it's available.
61[email protected]**20070906052628
62 This can be overridden by setting --with-readline-includes or
63 --with-readline-libraries.
65[Remove redundant include/Makefile
66Ian Lynagh <[email protected]>**20070828205711]
67[Call the license LICENSE rather than COPYING for consistency
68Ian Lynagh <[email protected]>**20070828130747]
69[added a bit of documentation to the readline library
70[email protected]**20070819083106]
71[--configure-option and --ghc-option are now provided by Cabal
72Ross Paterson <[email protected]>**20070604115727]
73[Remove Makefile and package.conf.in (used in the old build system)
74Ian Lynagh <[email protected]>**20070524142629]
75[Remove unnecessary "import Prelude hiding (catch)"
76Ian Lynagh <[email protected]>**20070523222119]
77[We now depend on process
78Ian Lynagh <[email protected]>**20070523181523]
79[add install-includes: field
80Simon Marlow <[email protected]>**20070517095014]
81[Make the Cabal build system honour configure flags
82Roman Leshchinskiy <[email protected]>**20070504042130
84 The Cabal build system was ignoring --with-readline-includes and
85 --with-readline-libraries.
87[Make configure fail if the package is not buildable
88Ian Lynagh <[email protected]>**20070430190918]
89[Follow Cabal changes in Setup.hs
90Ian Lynagh <[email protected]>**20070418114443]
91[readline no longer needs to hide build failure
92Ian Lynagh <[email protected]>**20070415215805
93 The GHC build system now copes with it itself.
95[Fix configure with no --with-cc
96Ian Lynagh <[email protected]>**20070415194819]
97[Fix -Wall warnings
98Ian Lynagh <[email protected]>**20070411005013]
99[Add missing case in removePrefix
100Ian Lynagh <[email protected]>**20070411002555]
101[Pass configure opts down to ./configure, and add a nasty hack not to fail
102Ian Lynagh <[email protected]>**20070406182410
103 If readline doesn't build then we still want to build the rest of GHC.
104 For now readline simply ignores any failure when asked to build, but we
105 really need to do something better here!
107[parse (but don't pass on) options for ./configure
108Ian Lynagh <[email protected]>**20070406153705]
109[Make syntax in .cabal file haddock-friendly
110Ian Lynagh <[email protected]>**20070308163504]
111[make Setup suitable for building the libraries with GHC
112Ian Lynagh <[email protected]>**20061112214707]
113[Match the types in the C source, not the documentation
114Ian Lynagh <[email protected]>**20070404122733]
115[Fix C/Haskell type mismatch
116Ian Lynagh <[email protected]>**20070404003613]
117[Give ld -Llibdir, not -Ilibdir
118Ian Lynagh <[email protected]>**20070305143239]
120Ian Lynagh <[email protected]>**20070305141749]
121[README about building from darcs
122Ross Paterson <[email protected]>**20070218110201]
123[TAG 6.6 release
124Ian Lynagh <[email protected]>**20061011124740]
125[add boilerplate Setup.hs
126Ross Paterson <[email protected]>**20060928231526]
127[Typo (this is the readline, not unix, package)
128Ian Lynagh <[email protected]>**20060823144042]
129[remove unnecessary #include "ghcconfig.h"
130Ross Paterson <[email protected]>**20060809132127]
131[Make the configure test robust against libedit
132Simon Marlow <[email protected]>**20060706120654
133 See #766
134 Thanks to Greg Wright for the fix.
136[make a start on Cabalizing readline
137Ross Paterson <[email protected]>**20060609161024]
138[Move readline configuration into the readline package
139Simon Marlow <[email protected]>**20060609135511
141 Configuration of the readline package is now done with a
142 package-private configure script, which takes it a step closer to
143 being a standalone Cabal package.
145 At the same time I added --with-readline-includes and
146 --with-readline-libraries options to cater for systems where these
147 libraries live in non-std places.
150[TAG Initial conversion from CVS complete
151John Goerzen <[email protected]>**20060112154138]
152Patch bundle hash: