isocline 1.0.0 → 1.0.1
raw patch · 6 files changed
+41/−4 lines, 6 filessetup-changedPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Setup.hs +2/−0
- haskell/readme.md +33/−1
- include/isocline.h +1/−1
- isocline.cabal +1/−1
- src/term.c +1/−1
- src/tty.c +3/−0
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
haskell/readme.md view
@@ -6,8 +6,38 @@ $ ./test/Example ``` +See the [API documentation](https://hackage.haskell.org/package/isocline-1.0.0/docs/System-Console-Isocline.html) on hackage. + +## Using with Stack + +You can build with isocline by adding +``` +extra-deps: + - isocline-1.0.0 +``` +to your `stack.yaml` file, and +``` +dependencies: + - isocline +``` +to your `package.yaml` file (and also run `stack update`). + +## Using with Cabal + +To use it with Cabal, add +``` +build-depends: + isocline +``` +to your `project.cabal` file (and perhaps run `cabal update`). + + +# Building Isocline from Source + ## Building with Stack +From the isocline directory, run: + ``` $ stack build $ stack exec example @@ -15,12 +45,14 @@ ## Building with Cabal +From the isocline directory, run: + ``` $ cabal build $ cabal run example ``` -You can install the `isocline` package locally as: +You can install the locally build `isocline` package as: ``` $ cabal install ```
include/isocline.h view
@@ -45,7 +45,7 @@ /// \{ /// Isocline version: 102 = 1.0.2.-#define IC_VERSION (100) /// 1.0.0+#define IC_VERSION (101) /// 1.0.0 /// Read input from the user using rich editing abilities.
isocline.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: isocline-version: 1.0.0+version: 1.0.1 synopsis: A portable alternative to GNU Readline description:  A Haskell wrapper around the [Isocline C library](https://github.com/daanx/isocline#readme) which can provide an alternative to GNU Readline. (The Isocline library is included whole and there are no runtime dependencies). Please see the [readme](https://github.com/daanx/isocline/haskell#readme) on GitHub for more information.
src/term.c view
@@ -483,7 +483,6 @@ while ((next = str_next_ofs(s, len, pos+ascii, NULL)) > 0 && (uint8_t)s[pos + ascii] > '\x1B' && (uint8_t)s[pos + ascii] <= 0x7F ) {- if (s[pos+ascii] == '\n') { newline = true; } ascii += next; } if (ascii > 0) {@@ -505,6 +504,7 @@ // ignore control characters except \a, \b, \t, \n, \r, and form-feed and vertical tab. } else {+ if (c == '\n') { newline = true; } sbuf_append_n(term->buf, s+pos, next); } pos += next;
src/tty.c view
@@ -18,6 +18,9 @@ #define isatty(fd) _isatty(fd) #define read(fd,s,n) _read(fd,s,n) #define STDIN_FILENO 0+#if (_WIN32_WINNT < 0x0600)+WINBASEAPI ULONGLONG WINAPI GetTickCount64(VOID);+#endif #else #include <signal.h> #include <errno.h>