change kprintf (removed in ocaml 5) to ksprintf

This commit is contained in:
Florian Stecker 2023-10-01 14:47:06 -04:00
parent 40c9c3c863
commit 6a473fe26d
3 changed files with 5 additions and 5 deletions

View File

@ -27,7 +27,7 @@ let drawstring size x y s =
Gl.disable `blend;
Gl.disable `texture_2d
let drawstringf size x y = Printf.kprintf (drawstring size (x+1) (y+size+1))
let drawstringf size x y = Printf.ksprintf (drawstring size (x+1) (y+size+1))
let redisplay = ref false
let postRedisplay who =
Utils.vlog "redisplay for [%S]" who;

View File

@ -53,7 +53,7 @@ let adderrmsg src msg =
S.newerrmsgs := true;
Glutils.postRedisplay src
let settextfmt fmt = Printf.kprintf (fun s -> S.text := s) fmt
let settextfmt fmt = Printf.ksprintf (fun s -> S.text := s) fmt
let impmsg fmt = Printf.ksprintf (fun s -> showtext '!' s) fmt
let adderrfmt src fmt = Printf.ksprintf (fun s -> adderrmsg src s) fmt

View File

@ -26,7 +26,7 @@ let exntos = function
let onoffs = function | true -> "on" | false -> "off"
let error fmt = Printf.kprintf failwith fmt
let error fmt = Printf.ksprintf failwith fmt
module IntSet = Set.Make (struct type t = int let compare = (-) end)
@ -182,7 +182,7 @@ let filecontents path =
s
let getcmdoutput errfun cmd =
let reperror fmt = Printf.kprintf errfun fmt in
let reperror fmt = Printf.ksprintf errfun fmt in
let clofail s e = error "failed to close %s: %s" s e in
match Unix.pipe () with
| exception exn ->
@ -249,7 +249,7 @@ let r32 s pos = ((r16 s (pos+2)) lsl 16) lor (r16 s pos)
let r32s s pos = Bytes.get_int32_le s pos |> Int32.to_int
let vlogf = ref ignore
let vlog fmt = Printf.kprintf !vlogf fmt
let vlog fmt = Printf.ksprintf !vlogf fmt
let pipef ?(closew=true) cap f cmd =
match Unix.pipe () with