Changeset 6004 for src/Pugs/Run

Show
Ignore:
Timestamp:
08/02/05 18:14:11 (3 years ago)
Author:
vkon
svk:copy_cache_prev:
8154
Message:

do not parse arguments after '--'; do not treat '-foo' as '-f'

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Run/Args.hs

    r5267 r6004  
    5555unpackOptions [] = [] 
    5656unpackOptions (('-':[]):rest)  = ["-"] ++ unpackOptions rest 
    57 unpackOptions ("--":opts) = opts 
     57unpackOptions ("--":opts) = ["--"] ++ opts 
    5858unpackOptions (('-':opt):rest) = unpackOption opt ++ unpackOptions rest 
    5959unpackOptions (filename:rest) = filename : unpackOptions rest 
     
    136136gatherArgs("-V:":item:rest)       = [Opt "-V:" item] ++ gatherArgs(rest) 
    137137gatherArgs(('-':[]):xs)           = [File "-"] ++ gatherArgs(xs) 
    138 gatherArgs(('-':x):xs)            = [Switch (head x)] ++ gatherArgs(xs) 
     138gatherArgs(("--"):rest)           = [File x | x <- rest] 
     139gatherArgs(('-':x:[]):xs)         = [Switch x] ++ gatherArgs(xs) 
    139140gatherArgs(x:xs)                  = [File x] ++ gatherArgs(xs) 
    140141