Skip to content

Commit 8d323b2

Browse files
tmattiojonahbeckfordkandunojb
committed
Switch from camomile to uu*
Co-authored-by: Jonah Beckford <71855677+jonahbeckford@users.noreply.github.com> Co-authored-by: ZAN DoYe <zandoye@gmail.com> Co-authored-by: Nicolás Ojeda Bär <n.oje.bar@gmail.com>
1 parent a550614 commit 8d323b2

29 files changed

+363
-451
lines changed

CHANGES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Unreleased
2+
----------
3+
4+
* Replace Camomile with uu* (Nicolás Ojeda Bär, ZAN DoYe, Thibaut Mattio, Jonah Beckford, #109)
5+
16
3.2.0 (2022-02-21)
27
------------------
38

dune-project

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ facilities in console applications.")
2828
(depends
2929
(ocaml
3030
(>= 4.08.0))
31-
(camomile
32-
(>= 1.0.1))
3331
(lwt
3432
(>= 4.2.0))
3533
lwt_log
@@ -41,5 +39,5 @@ facilities in console applications.")
4139
react
4240
(zed
4341
(and
44-
(>= 3.1.0)
45-
(< 3.2.0)))))
42+
(>= 3.2.0)
43+
(< 4.0)))))

examples/asciiart/asciiart.ml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ let indices img =
5858
open Lwt
5959
open LTerm_widget
6060
open LTerm_geom
61-
open CamomileLibrary
6261

6362
(* scrollable asciiart widget *)
6463
class asciiart img = object(self)
@@ -126,19 +125,19 @@ class asciiart img = object(self)
126125

127126
(* adjust scale, which changes the document size *)
128127
method private scale_event = function
129-
| LTerm_event.Key{LTerm_key.code=LTerm_key.Char c;_} when c = UChar.of_char 'w' ->
128+
| LTerm_event.Key{LTerm_key.code=LTerm_key.Char c;_} when c = Uchar.of_char 'w' ->
130129
avg_rows := max 1 (!avg_rows - 1);
131130
vscroll#set_document_size self#document_size.rows;
132131
self#queue_draw; true
133-
| LTerm_event.Key{LTerm_key.code=LTerm_key.Char c;_} when c = UChar.of_char 's' ->
132+
| LTerm_event.Key{LTerm_key.code=LTerm_key.Char c;_} when c = Uchar.of_char 's' ->
134133
avg_rows := !avg_rows + 1;
135134
vscroll#set_document_size self#document_size.rows;
136135
self#queue_draw; true
137-
| LTerm_event.Key{LTerm_key.code=LTerm_key.Char c;_} when c = UChar.of_char 'a' ->
136+
| LTerm_event.Key{LTerm_key.code=LTerm_key.Char c;_} when c = Uchar.of_char 'a' ->
138137
avg_cols := max 1 (!avg_cols - 1);
139138
hscroll#set_document_size self#document_size.cols;
140139
self#queue_draw; true
141-
| LTerm_event.Key{LTerm_key.code=LTerm_key.Char c;_} when c = UChar.of_char 'd' ->
140+
| LTerm_event.Key{LTerm_key.code=LTerm_key.Char c;_} when c = Uchar.of_char 'd' ->
142141
avg_cols := !avg_cols + 1;
143142
hscroll#set_document_size self#document_size.cols;
144143
self#queue_draw; true

examples/double_editor.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ let ( >>= ) = Lwt.( >>= )
1414
let make_key ?(ctrl = false) ?(meta = false) ?(shift = false) c =
1515
let code =
1616
match c with
17-
| `Char c -> LTerm_key.Char (CamomileLibrary.UChar.of_char c)
17+
| `Char c -> LTerm_key.Char (Uchar.of_char c)
1818
| `Other key -> key in
1919
{ LTerm_key.control = ctrl; meta; shift; code }
2020

examples/editor.ml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
* This file is a part of Lambda-Term.
88
*)
99

10-
open CamomileLibraryDefault.Camomile
1110
open Lwt
1211

1312
let main () =
@@ -25,9 +24,9 @@ let main () =
2524
editor#bind
2625
(let open LTerm_key in
2726
[ { control = true; meta = false; shift = false
28-
; code = Char (UChar.of_char 'x') }
27+
; code = Char (Uchar.of_char 'x') }
2928
; { control = true; meta = false; shift = false
30-
; code = Char (UChar.of_char 'c') }
29+
; code = Char (Uchar.of_char 'c') }
3130
])
3231
[ LTerm_edit.Custom (fun () -> wakeup wakener ()) ];
3332

examples/read_yes_no.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ open Lwt
1111

1212
let rec read_char term =
1313
LTerm.read_event term >>= function
14-
| LTerm_event.Key { LTerm_key.code = LTerm_key.Char ch; LTerm_key.control = true ; _ } when ch = CamomileLibraryDefault.Camomile.UChar.of_char 'c' ->
14+
| LTerm_event.Key { LTerm_key.code = LTerm_key.Char ch; LTerm_key.control = true ; _ } when ch = Uchar.of_char 'c' ->
1515
(* Exit on Ctrl+C *)
1616
Lwt.fail (Failure "interrupted")
1717
| LTerm_event.Key { LTerm_key.code = LTerm_key.Char ch ; _ } ->

examples/shell.ml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
(* A mini shell *)
1111

12-
open CamomileLibraryDefault.Camomile
1312
open React
1413
open Lwt
1514
open LTerm_style
@@ -67,7 +66,7 @@ let make_prompt size exit_code time =
6766
S" >─";
6867
S(Zed_utf8.make
6968
(size.cols - 24 - Zed_utf8.length code - Zed_utf8.length path)
70-
(UChar.of_int 0x2500));
69+
(Uchar.of_int 0x2500));
7170
S"[ ";
7271
B_fg(if exit_code = 0 then lwhite else lred); S code; E_fg;
7372
S" ]─";

lambda-term.opam

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,12 @@ bug-reports: "https://github.com/ocaml-community/lambda-term/issues"
1818
depends: [
1919
"dune" {>= "3.0"}
2020
"ocaml" {>= "4.08.0"}
21-
"camomile" {>= "1.0.1"}
2221
"lwt" {>= "4.2.0"}
2322
"lwt_log"
2423
"lwt_react"
2524
"mew_vi" {>= "0.5.0" & < "0.6.0"}
2625
"react"
27-
"zed" {>= "3.1.0" & < "3.2.0"}
26+
"zed" {>= "3.2.0" & < "4.0"}
2827
"odoc" {with-doc}
2928
]
3029
build: [

src/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
(name lambda_term)
33
(public_name lambda-term)
44
(wrapped false)
5-
(libraries camomile lwt lwt.unix lwt_react zed lwt_log mew_vi)
5+
(libraries lwt lwt.unix lwt_react zed lwt_log mew_vi uucp)
66
(flags (:standard -safe-string))
77
(synopsis "Cross-platform library for terminal manipulation")
88
(c_library_flags (:standard (:include c_library_flags)))

0 commit comments

Comments
 (0)