Indentation fixes
This commit is contained in:
parent
f3b0b0b00a
commit
2a85c34c67
@ -63,12 +63,12 @@ module Atom = struct
|
||||
Int32.to_int (MBytes.get_int32 buffer ofs)
|
||||
|
||||
let int = function
|
||||
| `Int31 -> int31
|
||||
| `Int16 -> int16
|
||||
| `Int8 -> int8
|
||||
| `Uint30 -> uint30
|
||||
| `Uint16 -> uint16
|
||||
| `Uint8 -> uint8
|
||||
| `Int31 -> int31
|
||||
| `Int16 -> int16
|
||||
| `Int8 -> int8
|
||||
| `Uint30 -> uint30
|
||||
| `Uint16 -> uint16
|
||||
| `Uint8 -> uint8
|
||||
|
||||
let ranged_int ~minimum ~maximum state =
|
||||
let read_int =
|
||||
|
@ -110,12 +110,12 @@ module Atom = struct
|
||||
Int32.to_int (MBytes.get_int32 buffer ofs)
|
||||
|
||||
let int = function
|
||||
| `Int31 -> int31
|
||||
| `Int16 -> int16
|
||||
| `Int8 -> int8
|
||||
| `Uint30 -> uint30
|
||||
| `Uint16 -> uint16
|
||||
| `Uint8 -> uint8
|
||||
| `Int31 -> int31
|
||||
| `Int16 -> int16
|
||||
| `Int8 -> int8
|
||||
| `Uint30 -> uint30
|
||||
| `Uint16 -> uint16
|
||||
| `Uint8 -> uint8
|
||||
|
||||
let ranged_int ~minimum ~maximum resume state k =
|
||||
let read_int =
|
||||
|
@ -279,26 +279,26 @@ let rec write_rec : type a. a Encoding.t -> state -> a -> unit =
|
||||
|
||||
and write_with_limit : type a. int -> a Encoding.t -> state -> a -> unit =
|
||||
fun limit e state value ->
|
||||
(* backup the current limit *)
|
||||
let old_limit = state.allowed_bytes in
|
||||
(* install the new limit (only if smaller than the current limit) *)
|
||||
let limit =
|
||||
match state.allowed_bytes with
|
||||
| None -> limit
|
||||
| Some old_limit -> min old_limit limit in
|
||||
state.allowed_bytes <- Some limit ;
|
||||
write_rec e state value ;
|
||||
(* restore the previous limit (minus the read bytes) *)
|
||||
match old_limit with
|
||||
| None ->
|
||||
state.allowed_bytes <- None
|
||||
| Some old_limit ->
|
||||
let remaining =
|
||||
match state.allowed_bytes with
|
||||
| None -> assert false
|
||||
| Some len -> len in
|
||||
let read = limit - remaining in
|
||||
state.allowed_bytes <- Some (old_limit - read)
|
||||
(* backup the current limit *)
|
||||
let old_limit = state.allowed_bytes in
|
||||
(* install the new limit (only if smaller than the current limit) *)
|
||||
let limit =
|
||||
match state.allowed_bytes with
|
||||
| None -> limit
|
||||
| Some old_limit -> min old_limit limit in
|
||||
state.allowed_bytes <- Some limit ;
|
||||
write_rec e state value ;
|
||||
(* restore the previous limit (minus the read bytes) *)
|
||||
match old_limit with
|
||||
| None ->
|
||||
state.allowed_bytes <- None
|
||||
| Some old_limit ->
|
||||
let remaining =
|
||||
match state.allowed_bytes with
|
||||
| None -> assert false
|
||||
| Some len -> len in
|
||||
let read = limit - remaining in
|
||||
state.allowed_bytes <- Some (old_limit - read)
|
||||
|
||||
|
||||
(** ******************** *)
|
||||
|
@ -18,6 +18,7 @@ if [ -z "$files" ]; then
|
||||
files=` find \( -name _build -or \
|
||||
-name .git -or \
|
||||
-wholename ./src/environment/v1.ml -or \
|
||||
-name ocplib-json-typed -or \
|
||||
-name registerer.ml \) -prune -or \
|
||||
\( -name \*.ml -or -name \*.mli \) -print`
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user