Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/io.lua')
-rw-r--r--src/base/io.lua11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/base/io.lua b/src/base/io.lua
index 805e87c..b694adf 100644
--- a/src/base/io.lua
+++ b/src/base/io.lua
@@ -53,13 +53,16 @@
--
function io.printf(msg, ...)
- if (not io.eol) then
+ if not io.eol then
io.eol = "\n"
end
-
- local s
+
+ if not io.indent then
+ io.indent = "\t"
+ end
+
if type(msg) == "number" then
- s = string.rep("\t", msg) .. string.format(unpack(arg))
+ s = string.rep(io.indent, msg) .. string.format(unpack(arg))
else
s = string.format(msg, unpack(arg))
end