diff options
Diffstat (limited to 'appl/cmd')
| -rw-r--r-- | appl/cmd/sh92.b | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/appl/cmd/sh92.b b/appl/cmd/sh92.b index 50ee4d1..dc6d22e 100644 --- a/appl/cmd/sh92.b +++ b/appl/cmd/sh92.b @@ -57,7 +57,7 @@ HashVal: import hash; Logger: import sh9l; LOG_DBG, LOG_INF, LOG_WRN, LOG_ERR: import sh9l; logger: ref Logger; -verbosity := LOG_WRN; +verbosity : int; stdin: ref sys->FD; stderr: ref sys->FD; @@ -801,6 +801,7 @@ init(ctxt: ref Draw->Context, argv: list of string) { argv = tl argv; } + verbosity = LOG_WRN; for(; argv != nil && len hd argv && (hd argv)[0]=='-'; argv = tl argv) { case hd argv { "-e" => @@ -809,13 +810,14 @@ init(ctxt: ref Draw->Context, argv: list of string) { nflag = 1; "-l" => lflag = 1; - "-V" => - argv = tl argv; - if(len argv != 1){ - usage(); - return; - } - verbosity = int hd argv; + "-V" => { + argv = tl argv; + if(len argv != 1){ + usage(); + return; + } + verbosity = int hd argv; + }; "-c" => argv = tl argv; if(len argv != 1){ @@ -829,10 +831,6 @@ init(ctxt: ref Draw->Context, argv: list of string) { } } - sys->print("Verbosity: %d\n", verbosity); - logger = ref Logger; - logger.set_level(verbosity); - if (lflag) startup(ctxt, grammar); @@ -861,6 +859,10 @@ init(ctxt: ref Draw->Context, argv: list of string) { if(dfd == nil) return; + sys->print("Verbosity: %d\n", verbosity); + logger = ref Logger; + logger.set_level(verbosity); + offset : int = 0; temp : int; #last_cmdline := array[1024] of int; |
