lua: more fix mix of spaces & tabs

This commit is contained in:
Philippe Teuwen 2019-03-09 10:40:45 +01:00
commit 2d1a077ae4
14 changed files with 1423 additions and 1423 deletions

View file

@ -7,19 +7,19 @@ https://github.com/attractivechaos/klib/blob/master/lua/klib.lua
--[[
The MIT License
Copyright (c) 2011, Attractive Chaos <attractor@live.co.uk>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@ -56,8 +56,8 @@ local function getopt(args, ostr)
return function ()
if place == 0 then -- update scanning pointer
place = 1
if #args == 0
or args[1]:sub(1, 1) ~= '-' then
if #args == 0
or args[1]:sub(1, 1) ~= '-' then
place = 0; return nil end
if #args[1] >= 2 then
place = place + 1
@ -96,12 +96,12 @@ local function getopt(args, ostr)
if ostr:sub(1, 1) == ':' then return ':' end
return '?';
else arg = args[1] end
end
table.remove(args, 1);
place = 0;
end
end
table.remove(args, 1);
place = 0;
end
return optopt, arg;
end
end
return { getopt = getopt }
return { getopt = getopt }