Diff for /gforth/wf.fs between versions 1.31 and 1.33

version 1.31, 2005/01/04 22:09:04 version 1.33, 2005/01/22 16:39:58
Line 232  Variable icon-tmp Line 232  Variable icon-tmp
   
 Variable do-size  Variable do-size
 Variable do-icon  Variable do-icon
   Variable do-expand
   
 Defer parse-line  Defer parse-line
   
Line 288  Defer parse-line Line 289  Defer parse-line
   
 : link-warn? ( -- ) \ local links only  : link-warn? ( -- ) \ local links only
     link $@ ': scan nip ?EXIT      link $@ ': scan nip ?EXIT
     link $@ '# $split 2drop r/o open-file nip IF      link $@ '# $split 2drop dup IF
         s" Dead Link '" stderr write-file throw          r/o open-file nip IF
         link $@ stderr write-file throw              s" Dead Link '" stderr write-file throw
         s\" ' !!!\n" stderr write-file throw              link $@ stderr write-file throw
     THEN ;              s\" ' !!!\n" stderr write-file throw
           THEN
       ELSE  2drop  THEN ;
   
 : link-options ( addr u -- addr' u' )  : link-options ( addr u -- addr' u' )
     do-size off  do-icon on      do-size off  do-icon on  do-expand off
     over c@ '% = over 0> and IF  do-size on  1 /string  THEN      over c@ '% = over 0> and IF  do-size on   1 /string  THEN
     over c@ '\ = over 0> and IF  do-icon off 1 /string  THEN ;      over c@ '\ = over 0> and IF  do-icon off  1 /string  THEN
       over c@ '* = over 0> and IF  do-expand on 1 /string  THEN ;
   
 s" Gforth" environment? [IF] s" 0.5.0" str= [IF]   s" Gforth" environment? [IF] s" 0.5.0" str= [IF] 
 : parse-string ( c-addr u -- ) \ core,block  : parse-string ( c-addr u -- ) \ core,block
Line 312  s" Gforth" environment? [IF] s" 0.5.0" s Line 316  s" Gforth" environment? [IF] s" 0.5.0" s
     ['] parse-line catch pop-file throw ;      ['] parse-line catch pop-file throw ;
 [THEN] [THEN]  [THEN] [THEN]
   
   Variable expand-link
   Variable expand-prefix
   Variable expand-postfix
   
   : ?expand ( addr u -- )  expand-link $!
       do-expand @ IF
           expand-prefix $@ expand-link 0 $ins
           expand-postfix $@ expand-link $+!  THEN
       expand-link $@ ;
   
 : .link ( addr u -- ) dup >r '| -$split  dup r> = IF  2swap  THEN   : .link ( addr u -- ) dup >r '| -$split  dup r> = IF  2swap  THEN 
     link-options link $!      link-options link $!
     link $@len 0= IF  2dup link $! ( s" .html" link $+! ) THEN      link $@len 0= IF  2dup link $! ( s" .html" link $+! ) THEN
     link $@ href= s" a" tag link-icon?      link $@ ?expand
       href= s" a" tag link-icon?
     parse-string s" a" /tag link-size? link-sig? link-warn? ;      parse-string s" a" /tag link-size? link-sig? link-warn? ;
 : >link ( -- )  '[ parse type '] parse .link ;  : >link ( -- )  '[ parse type '] parse .link ;
   
Line 654  Variable orig-date Line 669  Variable orig-date
     bl sword orig-date $! ;      bl sword orig-date $! ;
 : icons  : icons
     bl sword icon-prefix $! ;      bl sword icon-prefix $! ;
   : expands '# sword expand-prefix $! bl sword expand-postfix $! ;
   
 icons icons  icons icons
   
 Variable style$  Variable style$

Removed from v.1.31  
changed lines
  Added in v.1.33


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>