Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lsp/cobol_indent/editor.ml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ let apply_edits ~contents ~range ~config ~filename ~edits ~symbolic =
if nbefore > 0 then
let c = contents.[pos] in
if c = '\n' || c = '\r' then
Printf.kprintf failwith
Printf.ksprintf failwith
"Cobol_indent.Editor.skip_before: char \\%3d at pos %d, line %d, skipping %d" (int_of_char c) pos line nbefore ;

if c = '\t' then
Expand Down
2 changes: 1 addition & 1 deletion src/lsp/cobol_indent/engine.ml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ let indent_tokens ~config tokens =
| _
-> ()
(*
Printf.kprintf failwith "No END-%s token"
Printf.ksprintf failwith "No END-%s token"
( Misc.string_of_token token )
*)
in
Expand Down
2 changes: 1 addition & 1 deletion src/lsp/cobol_indent/misc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ let () =

let log : ( 'a, unit, string, unit) format4 -> 'a =
let f fmt =
Printf.kprintf (fun s ->
Printf.ksprintf (fun s ->
match !oc with
| None -> ()
| Some oc ->
Expand Down
2 changes: 1 addition & 1 deletion src/lsp/ebcdic_lib/ebcdic.ml
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ let read_gnucobol_collation_file filename =
if len > 0 && line.[0] <> '#' then
let items = String.split_on_char ' ' line in
if List.length items <> 16 then
Printf.kprintf failwith "Wrong number of items on line %S" line;
Printf.ksprintf failwith "Wrong number of items on line %S" line;
let items = List.map (fun hh ->
int_of_string ( "0x" ^ hh )
) items in
Expand Down
2 changes: 1 addition & 1 deletion src/lsp/pretty/pretty.ml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ let pp_set_margin ppf margin =

(** Sends right margin to virtual infinity *)
let blast_margin ppf = (* see https://github.com/ocaml/ocaml/issues/10592 *)
pp_set_margin ppf max_int
pp_set_margin ppf 999_999_999 (* capped: OCaml 5.2+ pp_infinity = 1_000_000_001 *)

(** Version of {!Format.asprintf} with virtually no right margin *)
let to_string: ('a, string) func = fun fmt ->
Expand Down
4 changes: 2 additions & 2 deletions src/lsp/sql_preproc/misc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ let loc_of_edit ~filename e =
}

let error ?loc fmt =
Printf.kprintf
Printf.ksprintf
(fun s ->
Printf.eprintf "Error";
begin
Expand All @@ -33,7 +33,7 @@ let error ?loc fmt =
fmt

let warning ?loc fmt =
Printf.kprintf
Printf.ksprintf
(fun s ->
Printf.eprintf "Warning";
begin
Expand Down
4 changes: 2 additions & 2 deletions src/lsp/superbol_free_lib/call.ml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ module GLOBALS = struct
let verbose _ = !debug
end
module ERROR = struct
let raise fmt = Printf.kprintf failwith fmt
let raise fmt = Printf.ksprintf failwith fmt
end


(* [BEGIN] The following part is similar to ocamlup:call.ml *)

let command ?on_error fmt =
Printf.kprintf (fun cmd ->
Printf.ksprintf (fun cmd ->
Printf.eprintf "%s\n%!" cmd;
let retcode = Sys.command cmd in
if retcode <> 0 then begin
Expand Down
4 changes: 2 additions & 2 deletions src/lsp/superbol_free_lib/command_texi2rst.ml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module INPUT = struct
let close_in ic = close_in ic.ic

let error ?ic fmt =
Printf.kprintf (fun s ->
Printf.ksprintf (fun s ->
begin
match ic with
| Some ic ->
Expand All @@ -61,7 +61,7 @@ module INPUT = struct
) fmt

let warning ic fmt =
Printf.kprintf (fun s ->
Printf.ksprintf (fun s ->
Printf.eprintf "Warning at %s:%d: %s\n%!"
ic.filename ic.line s;
) fmt
Expand Down
2 changes: 1 addition & 1 deletion src/lsp/superbol_free_lib/misc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
open Ez_file.V1

let error fmt =
Printf.kprintf (fun s ->
Printf.ksprintf (fun s ->
Printf.eprintf "Error: %s\n%!" s;
exit 2
) fmt
Expand Down
2 changes: 1 addition & 1 deletion src/vendor/ez_toml/internal_printer.ml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ let bprint_key_path b key_path =
else
if String.contains key '"' then
if String.contains key '\'' then
Printf.kprintf failwith
Printf.ksprintf failwith
"Key %S cannot contain both simple and double quotes" key
else
Printf.bprintf b "'%s'" key
Expand Down
2 changes: 1 addition & 1 deletion src/vscode/vscode-json/ezjsonm.ml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ let to_channel ?minify oc json = value_to_channel ?minify oc (json :> value)
exception Parse_error of value * string

let parse_error t fmt =
Printf.kprintf (fun msg ->
Printf.ksprintf (fun msg ->
raise (Parse_error (t, msg))
) fmt

Expand Down
2 changes: 1 addition & 1 deletion src/vscode/vscode-json/main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ type state = {
}

let add_error ?(error=true) state fmt =
Printf.kprintf (fun s ->
Printf.ksprintf (fun s ->
if error then
state.errors <- s :: state.errors
else
Expand Down
Loading