version 1.9, 2000/09/23 15:47:09
|
version 1.10, 2000/10/29 20:27:03
|
Line 44 Variable argc ( -- addr ) \ gforth
|
Line 44 Variable argc ( -- addr ) \ gforth
|
2swap |
2swap |
2dup s" -e" compare 0= >r |
2dup s" -e" compare 0= >r |
2dup s" --evaluate" compare 0= r> or |
2dup s" --evaluate" compare 0= r> or |
IF 2drop dup >r evaluate |
IF 2drop ( dup >r ) evaluate |
r> >tib +! 2 EXIT THEN |
( r> >tib +! ) 2 EXIT THEN |
2dup s" -h" compare 0= >r |
2dup s" -h" compare 0= >r |
2dup s" --help" compare 0= r> or |
2dup s" --help" compare 0= r> or |
IF ." Image Options:" cr |
IF ." Image Options:" cr |
Line 58 Variable argc ( -- addr ) \ gforth
|
Line 58 Variable argc ( -- addr ) \ gforth
|
|
|
: (process-args) ( -- ) |
: (process-args) ( -- ) |
true to script? |
true to script? |
>tib @ >r #tib @ >r >in @ >r |
\ >tib @ >r #tib @ >r >in @ >r |
argc @ 1 |
argc @ 1 |
?DO |
?DO |
I arg over c@ [char] - <> |
I arg over c@ [char] - <> |
IF |
IF |
2dup dup #tib ! >in ! >tib ! |
\ 2dup dup #tib ! >in ! >tib ! |
required 1 |
required 1 |
ELSE |
ELSE |
I 1+ argc @ = IF s" " ELSE I 1+ arg THEN |
I 1+ argc @ = IF s" " ELSE I 1+ arg THEN |
do-option |
do-option |
THEN |
THEN |
+LOOP |
+LOOP |
r> >in ! r> #tib ! r> >tib ! |
\ r> >in ! r> #tib ! r> >tib ! |
false to script? |
false to script? |
; |
; |
|
|