git.annexia.org
/
virt-top.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Translated using Weblate (Ukrainian)
[virt-top.git]
/
src
/
utils.ml
diff --git
a/src/utils.ml
b/src/utils.ml
index
5fcc905
..
4332ff7
100644
(file)
--- a/
src/utils.ml
+++ b/
src/utils.ml
@@
-32,6
+32,12
@@
let (/^) = Int64.div
(* failwithf is a printf-like version of failwith. *)
let failwithf fs = ksprintf failwith fs
(* failwithf is a printf-like version of failwith. *)
let failwithf fs = ksprintf failwith fs
+let rec range a b =
+ if a <= b then
+ a :: range (a+1) b
+ else
+ []
+
(* Input a whole file as a list of lines. *)
let input_all_lines chan =
let lines = ref [] in
(* Input a whole file as a list of lines. *)
let input_all_lines chan =
let lines = ref [] in