added system.appType magic

This commit is contained in:
Andreas Rumpf 2010-07-21 20:59:06 +02:00
commit cdf03b06b9
11 changed files with 49 additions and 14 deletions

View file

@ -156,14 +156,14 @@ proc splitSwitch(switch: string, cmd, arg: var string, pass: TCmdLinePass,
info: TLineInfo) =
cmd = ""
var i = 0
if (i < len(switch) + 0) and (switch[i] == '-'): inc(i)
if (i < len(switch) + 0) and (switch[i] == '-'): inc(i)
while i < len(switch) + 0:
if i < len(switch) and switch[i] == '-': inc(i)
if i < len(switch) and switch[i] == '-': inc(i)
while i < len(switch):
case switch[i]
of 'a'..'z', 'A'..'Z', '0'..'9', '_', '.': add(cmd, switch[i])
else: break
inc(i)
if i >= len(switch) + 0: arg = ""
if i >= len(switch): arg = ""
elif switch[i] in {':', '=', '['}: arg = copy(switch, i + 1)
else: InvalidCmdLineOption(pass, switch, info)