[gforth] / gforth / wf.fs  

gforth: gforth/wf.fs


1 : pazsan 1.1 \ wiki forth
2 :    
3 :     require string.fs
4 :    
5 : pazsan 1.11 : -scan ( addr u char -- addr' u' )
6 :     >r BEGIN dup WHILE 1- 2dup + c@ r@ = UNTIL THEN
7 :     rdrop ;
8 :     : -$split ( addr u char -- addr1 u1 addr2 u2 )
9 :     >r 2dup r@ -scan 2dup + c@ r> = negate over + >r
10 :     2swap r> /string ;
11 :    
12 : pazsan 1.1 \ tag handling
13 :    
14 :     : .' '' parse postpone SLiteral postpone type ; immediate
15 : pazsan 1.3 : s' '' parse postpone SLiteral ; immediate
16 : pazsan 1.1
17 : pazsan 1.3 Variable tag-option
18 :     s" " tag-option $!
19 :    
20 :     : tag ( addr u -- ) '< emit type tag-option $@ type '> emit
21 :     s" " tag-option $! ;
22 : pazsan 1.1 : /tag ( addr u -- ) '< emit '/ emit type '> emit ;
23 : pazsan 1.2 : tagged ( addr1 u1 addr2 u2 -- ) 2dup 2>r tag type 2r> /tag ;
24 : pazsan 1.1
25 : pazsan 1.3 : opt ( addr u opt u -- ) s" " tag-option $+!
26 :     tag-option $+! s' ="' tag-option $+! tag-option $+!
27 :     s' "' tag-option $+! ;
28 :     : href= ( addr u -- ) s" href" opt ;
29 : pazsan 1.10 : name= ( addr u -- ) s" name" opt ;
30 : pazsan 1.3 : src= ( addr u -- ) s" src" opt ;
31 : pazsan 1.4 : alt= ( addr u -- ) s" alt" opt ;
32 : pazsan 1.7 : width= ( addr u -- ) s" width" opt ;
33 :     : height= ( addr u -- ) s" height" opt ;
34 : pazsan 1.3 : align= ( addr u -- ) s" align" opt ;
35 :     : mailto: ( addr u -- ) s' href="mailto:' tag-option $+!
36 :     tag-option $+! s' "' tag-option $+! ;
37 :    
38 : pazsan 1.1 \ environment handling
39 :    
40 : pazsan 1.11 Variable end-sec
41 : pazsan 1.1 Variable oldenv
42 : pazsan 1.10 Variable envs 30 0 [DO] 0 , [LOOP]
43 : pazsan 1.1
44 :     : env$ ( -- addr ) envs dup @ 1+ cells + ;
45 :     : env ( addr u -- ) env$ $! ;
46 :     : env? ( -- ) envs @ oldenv @
47 :     2dup > IF env$ $@ tag THEN
48 :     2dup < IF env$ cell+ $@ /tag env$ cell+ $off THEN
49 :     drop oldenv ! ;
50 :     : +env 1 envs +! ;
51 : pazsan 1.11 : -env end-sec @ envs @ 2 > or IF -1 envs +! env? THEN ;
52 : pazsan 1.1 : -envs envs @ 0 ?DO -env cr LOOP ;
53 : pazsan 1.2 : >env ( addr u -- ) +env env env? ;
54 : pazsan 1.1
55 : pazsan 1.6 \ alignment
56 :    
57 : pazsan 1.12 Variable table-format
58 :     Variable table#
59 :     Variable table-start
60 :    
61 : pazsan 1.6 : >align ( c -- )
62 :     CASE
63 :     'l OF s" left" align= ENDOF
64 :     'r OF s" right" align= ENDOF
65 :     'c OF s" center" align= ENDOF
66 :     '< OF s" left" align= ENDOF
67 :     '> OF s" right" align= ENDOF
68 : pazsan 1.11 '= OF s" center" align= ENDOF
69 : pazsan 1.12 digit? IF 0 <# #S #> s" rowspan" opt
70 :     table# @ 1+ table-start ! THEN 0
71 : pazsan 1.6 ENDCASE ;
72 :    
73 : pazsan 1.10 : >border ( c -- )
74 :     case
75 :     '- of s" 0" s" border" opt endof
76 :     '+ of s" 1" s" border" opt endof
77 :     endcase ;
78 :    
79 : pazsan 1.7 \ image handling
80 :    
81 :     Create imgbuf $20 allot
82 :    
83 :     Create pngsig $89 c, $50 c, $4E c, $47 c, $0D c, $0A c, $1A c, $0A c,
84 :     Create jfif $FF c, $D8 c, $FF c, $E0 c, $00 c, $10 c, $4A c, $46 c,
85 :     $49 c, $46 c,
86 :    
87 :     : b@ ( addr -- x ) 0 swap 4 bounds ?DO 8 lshift I c@ + LOOP ;
88 :     : bw@ ( addr -- x ) 0 swap 2 bounds ?DO 8 lshift I c@ + LOOP ;
89 :    
90 :     : gif? ( -- flag )
91 :     s" GIF89a" imgbuf over compare 0=
92 :     s" GIF87a" imgbuf over compare 0= or ;
93 :     : gif-size ( -- w h )
94 : pazsan 1.10 imgbuf 8 + c@ imgbuf 9 + c@ 8 lshift +
95 :     imgbuf 6 + c@ imgbuf 7 + c@ 8 lshift + ;
96 : pazsan 1.7
97 :     : png? ( -- flag )
98 :     pngsig 8 imgbuf over compare 0= ;
99 :     : png-size ( -- w h )
100 : pazsan 1.10 imgbuf $14 + b@ imgbuf $10 + b@ ;
101 : pazsan 1.7
102 :     : jpg? ( -- flag )
103 :     jfif 10 imgbuf over compare 0= ;
104 :     : jpg-size ( fd -- w h ) >r
105 :     2. BEGIN
106 :     2dup r@ reposition-file throw
107 :     imgbuf $10 r@ read-file throw 0<>
108 : pazsan 1.8 imgbuf bw@ $FFC0 $FFD0 within 0= and WHILE
109 : pazsan 1.7 imgbuf 2 + bw@ 2 + 0 d+ REPEAT
110 :     2drop imgbuf 5 + bw@ imgbuf 7 + bw@ rdrop ;
111 :    
112 :     : img-size ( fd -- w h ) >r
113 :     gif? IF gif-size rdrop EXIT THEN
114 :     jpg? IF r> jpg-size EXIT THEN
115 :     png? IF png-size rdrop EXIT THEN
116 :     0 0 ;
117 :    
118 :     : .img-size ( addr u -- )
119 : pazsan 1.10 r/o open-file IF drop EXIT THEN >r
120 : pazsan 1.7 imgbuf $20 r@ read-file throw drop
121 :     r@ img-size
122 :     r> close-file throw
123 :     ?dup IF 0 <# #S #> width= THEN
124 :     ?dup IF 0 <# #S #> height= THEN ;
125 :    
126 : pazsan 1.1 \ link creation
127 :    
128 :     Variable link
129 : pazsan 1.10 Variable link-sig
130 : pazsan 1.1 Variable link-suffix
131 : pazsan 1.3 Variable iconpath
132 : pazsan 1.1
133 : pazsan 1.2 Variable do-size
134 : pazsan 1.9 Variable do-icon
135 : pazsan 1.2
136 : pazsan 1.8 Defer parse-line
137 :    
138 : pazsan 1.11 : .img ( addr u -- ) dup >r '| -$split dup r> = IF 2swap THEN
139 :     dup IF 2swap alt= ELSE 2drop THEN
140 :     tag-option $@len >r over c@ >align tag-option $@len r> = 1+ /string
141 :     tag-option $@len >r over c@ >border tag-option $@len r> = 1+ /string
142 :     2dup .img-size src= s" img" tag ;
143 :     : >img ( -- ) '{ parse type '} parse .img ;
144 :    
145 : pazsan 1.7 : alt-suffix ( -- )
146 :     link-suffix $@len 2 - link-suffix $!len
147 :     s" [" link-suffix 0 $ins
148 :     s" ]" link-suffix $+!
149 :     link-suffix $@ alt= ;
150 :    
151 : pazsan 1.6 : get-icon ( addr u -- ) iconpath @ IF 2drop EXIT THEN
152 :     link-suffix $! s" .*" link-suffix $+!
153 : pazsan 1.1 s" icons" open-dir throw >r
154 :     BEGIN
155 :     pad $100 r@ read-dir throw WHILE
156 :     pad swap 2dup link-suffix $@ filename-match
157 : pazsan 1.3 IF s" icons/" iconpath $! iconpath $+!
158 : pazsan 1.10 iconpath $@ 2dup .img-size src= '- >border
159 : pazsan 1.7 alt-suffix s" img" tag true
160 : pazsan 1.1 ELSE 2drop false THEN
161 : pazsan 1.6 UNTIL ELSE drop THEN
162 : pazsan 1.1 r> close-dir throw ;
163 :    
164 : pazsan 1.9 : link-icon? ( -- ) do-icon @ 0= ?EXIT
165 :     iconpath @ IF iconpath $off THEN
166 :     link $@ + 1- c@ '/ = IF s" index.html" ELSE link $@ THEN
167 : pazsan 1.8 BEGIN '. $split 2swap 2drop dup WHILE
168 :     2dup get-icon REPEAT 2drop ;
169 : pazsan 1.6
170 : pazsan 1.2 : link-size? ( -- ) do-size @ 0= ?EXIT
171 : pazsan 1.1 link $@ r/o open-file IF drop EXIT THEN >r
172 :     r@ file-size throw $400 um/mod nip ." (" 0 u.r ." k)"
173 :     r> close-file throw ;
174 :    
175 : pazsan 1.10 : link-sig? ( -- )
176 :     link $@ link-sig $! s" .sig" link-sig $+!
177 :     link-sig $@ r/o open-file IF drop EXIT THEN
178 :     close-file throw
179 :     ." (" link-sig $@ href= s" a" tag
180 : pazsan 1.11 s" |-icons/sig.gif" .img ." sig" s" /a" tag ." )" ;
181 : pazsan 1.10
182 : pazsan 1.2 : link-options ( addr u -- addr' u' )
183 : pazsan 1.9 do-size off do-icon on
184 :     over c@ '% = over 0> and IF do-size on 1 /string THEN
185 :     over c@ '\ = over 0> and IF do-icon off 1 /string THEN ;
186 : pazsan 1.2
187 : pazsan 1.8 : parse-string ( addr u -- )
188 :     evaluate-input cell new-tib #tib ! tib !
189 :     ['] parse-line catch pop-file throw ;
190 :    
191 : pazsan 1.11 : .link ( addr u -- ) dup >r '| -$split dup r> = IF 2swap THEN
192 : pazsan 1.2 link-options link $!
193 : pazsan 1.1 link $@len 0= IF 2dup link $! s" .html" link $+! THEN
194 : pazsan 1.10 link $@ href= s" a" tag link-icon?
195 :     parse-string s" a" /tag link-size? link-sig? ;
196 : pazsan 1.9 : >link ( -- ) '[ parse type '] parse .link ;
197 : pazsan 1.1
198 :     \ line handling
199 :    
200 : pazsan 1.4 : char? ( -- c ) >in @ char swap >in ! ;
201 : pazsan 1.1 : parse-tag ( addr u char -- )
202 :     >r r@ parse type
203 : pazsan 1.2 r> parse 2swap tagged ;
204 : pazsan 1.1
205 : pazsan 1.6 : .text ( -- ) >in @ >r char drop
206 : pazsan 1.9 source r@ /string >in @ r> - nip
207 :     bounds ?DO I c@
208 :     case
209 :     '& of ." &amp;" endof
210 :     '< of ." &lt;" endof
211 :     dup emit
212 :     endcase
213 :     LOOP ;
214 : pazsan 1.6
215 :     Create do-words $100 0 [DO] ' .text , [LOOP]
216 :    
217 : pazsan 1.9 :noname '( emit 1 >in +! ; '( cells do-words + !
218 :    
219 : pazsan 1.6 : bind-char ( xt -- ) char cells do-words + ! ;
220 :    
221 :     : char>tag ( -- ) char >r
222 :     :noname bl sword postpone SLiteral r@ postpone Literal
223 :     postpone parse-tag postpone ; r> cells do-words + ! ;
224 : pazsan 1.1
225 : pazsan 1.12 : >tag '\ parse type '\ parse tag ;
226 :    
227 : pazsan 1.6 char>tag * b
228 :     char>tag _ em
229 :     char>tag # code
230 :    
231 : pazsan 1.9 ' >link bind-char [
232 :     ' >img bind-char {
233 : pazsan 1.12 ' >tag bind-char \
234 : pazsan 1.6
235 :     : do-word ( char -- ) cells do-words + perform ;
236 : pazsan 1.4
237 : pazsan 1.9 : word? ( -- addr u ) >in @ >r bl sword r> >in ! ;
238 :    
239 :     wordlist Constant autoreplacements
240 :    
241 : pazsan 1.8 :noname ( -- )
242 : pazsan 1.9 BEGIN char? do-word source nip >in @ = UNTIL ; is parse-line
243 :    
244 :     : parse-line+ ( -- )
245 :     BEGIN
246 :     word? autoreplacements search-wordlist
247 :     IF execute bl sword 2drop
248 :     source >in @ 1- /string drop c@ bl = >in +!
249 :     ELSE char? do-word THEN
250 :     source nip >in @ = UNTIL ;
251 : pazsan 1.4
252 :     : parse-to ( char -- ) >r
253 :     BEGIN char? dup r@ <> WHILE
254 :     do-word source nip >in @ = UNTIL ELSE drop THEN
255 :     r> parse type ;
256 : pazsan 1.1
257 : pazsan 1.9 \ autoreplace
258 :    
259 :     : autoreplace ( <[string|url]> -- )
260 :     get-current autoreplacements set-current
261 :     Create set-current
262 :     here 0 , '[ parse 2drop '] parse rot $!
263 :     DOES> $@ .link ;
264 :    
265 : pazsan 1.1 \ paragraph handling
266 :    
267 :     : parse-par ( -- )
268 : pazsan 1.9 BEGIN parse-line+ cr refill WHILE
269 : pazsan 1.1 source nip 0= UNTIL THEN ;
270 :    
271 :     : par ( addr u -- ) env? 2dup tag parse-par /tag cr cr ;
272 : pazsan 1.9 : line ( addr u -- ) env? 2dup tag parse-line+ /tag cr cr ;
273 : pazsan 1.1
274 : pazsan 1.10 \ scan strings
275 :    
276 :     : get-rest ( addr -- ) 0 parse -trailing rot $! ;
277 :     Create $lf 1 c, #lf c,
278 :     : get-par ( addr -- ) >r s" " r@ $+!
279 :     BEGIN 0 parse 2dup s" ." compare WHILE
280 :     r@ $@len IF $lf count r@ $+! THEN r@ $+!
281 :     refill 0= UNTIL ELSE 2drop THEN
282 :     rdrop ;
283 :    
284 :     \ toc handling
285 :    
286 :     Variable toc-link
287 :    
288 :     : >last ( addr link -- link' )
289 :     BEGIN dup @ WHILE @ REPEAT ! 0 ;
290 :    
291 : pazsan 1.11 : toc, ( n -- ) , 0 parse '| -$split 2swap here 0 , $! here 0 , $! ;
292 : pazsan 1.10 : up-toc align here toc-link >last , 0 toc, ;
293 :     : top-toc align here toc-link >last , 1 toc, ;
294 :     : this-toc align here toc-link >last , 2 toc, ;
295 :     : sub-toc align here toc-link >last , 3 toc, ;
296 : pazsan 1.12 : new-toc toc-link off ;
297 : pazsan 1.10
298 :     Variable toc-name
299 :    
300 :     : .toc-entry ( toc flag -- )
301 :     swap cell+ dup @ swap cell+ dup cell+ $@ 2dup href= s" a" tag
302 : pazsan 1.11 '# scan 1 /string toc-name $@ compare >r
303 : pazsan 1.10 $@ .img swap
304 :     IF
305 :     case
306 : pazsan 1.11 2 of s" ^]|-icons/arrow_up.jpg" .img endof
307 : pazsan 1.10 3 of
308 : pazsan 1.11 r@ 0= IF s" *]|-icons/circle.jpg"
309 :     ELSE s" v]|-icons/arrow_down.jpg" THEN .img endof
310 : pazsan 1.10 endcase
311 :     ELSE
312 :     case
313 : pazsan 1.11 0 of s" ^]|-icons/arrow_up.jpg" .img endof
314 :     1 of s" >]|-icons/arrow_right.jpg" .img endof
315 :     2 of s" *]|-icons/circle.jpg" .img endof
316 :     3 of s" v]|-icons/arrow_down.jpg" .img endof
317 : pazsan 1.10 endcase
318 :     THEN
319 :     s" a" /tag rdrop
320 :     ;
321 :     : print-toc ( -- ) cr 0 parse
322 :     dup 0= IF toc-name $! 0 ELSE
323 :     toc-name $! toc-name $@ name= s" " s" a" tagged 2
324 :     THEN >r
325 :     toc-link BEGIN @ dup WHILE
326 : pazsan 1.11 dup cell+ @ 3 = r@ 0= and IF rdrop 1 >r s" br" tag cr THEN
327 : pazsan 1.10 dup cell+ @ r@ >= IF dup r@ 2 = .toc-entry THEN
328 : pazsan 1.11 dup cell+ @ 2 = r@ 2 = and IF s" br" tag cr THEN
329 : pazsan 1.10 REPEAT drop rdrop cr ;
330 :    
331 : pazsan 1.1 \ handle global tags
332 :    
333 : pazsan 1.8 Variable indentlevel
334 : pazsan 1.10 : indent ( n -- ) indentlevel @ over indentlevel !
335 :     2dup < IF swap DO -env -env LOOP EXIT THEN
336 :     2dup > IF DO s" dl" >env s" dt" >env LOOP EXIT THEN
337 :     2dup = IF drop IF -env s" dt" >env THEN THEN ;
338 : pazsan 1.11 : +indent ( -- ) indentlevel @ IF -env s" dd" >env THEN ;
339 : pazsan 1.8
340 : pazsan 1.1 wordlist constant longtags
341 :    
342 :     longtags set-current
343 :    
344 : pazsan 1.10 : --- 0 indent cr s" hr" tag cr +indent ;
345 : pazsan 1.8 : * 1 indent s" h1" line +indent ;
346 :     : ** 1 indent s" h2" line +indent ;
347 :     : *** 2 indent s" h3" line +indent ;
348 : pazsan 1.10 : -- 0 indent cr print-toc ;
349 : pazsan 1.12 : && 0 parse name= s" " s" a" tagged ;
350 : pazsan 1.1 : - s" ul" env s" li" par ;
351 :     : + s" ol" env s" li" par ;
352 :     : << +env ;
353 : pazsan 1.3 : <* s" center" >env ;
354 : pazsan 1.10 : <red s" #ff0000" s" color" opt s" font" >env ;
355 :     : red> -env ;
356 : pazsan 1.1 : >> -env ;
357 : pazsan 1.3 : *> -env ;
358 : pazsan 1.9 : :: interpret ;
359 : pazsan 1.11 : . end-sec on 0 indent ;
360 : pazsan 1.9 : :code s" pre" >env
361 :     BEGIN source >in @ /string type cr refill WHILE
362 :     source s" :endcode" compare 0= UNTIL THEN
363 :     -env ;
364 : pazsan 1.1 : \ postpone \ ;
365 :    
366 :     definitions
367 : pazsan 1.3
368 :     \ Table
369 :    
370 : pazsan 1.6 : |tag table-format $@ table# @ /string drop c@ >align
371 :     >env 1 table# +! ;
372 : pazsan 1.12 : |d table# @ table-start @ > IF -env THEN s" td" |tag ;
373 :     : |h table# @ table-start @ > IF -env THEN s" th" |tag ;
374 :     : |line s" tr" >env table-start @ table# ! ;
375 : pazsan 1.3 : line| -env -env cr ;
376 :    
377 : pazsan 1.5 : next-char ( -- char ) source drop >in @ + c@ ;
378 :    
379 : pazsan 1.3 longtags set-current
380 :    
381 : pazsan 1.12 : <| bl sword table-format $! table-start off bl sword
382 :     dup IF s" border" opt ELSE 2drop THEN s" table" >env ;
383 :     : |> -env -env cr cr ;
384 : pazsan 1.3 : +| |line
385 :     BEGIN
386 : pazsan 1.5 |h '| parse-to next-char '+ = UNTIL line| ;
387 : pazsan 1.3 : -| |line
388 :     BEGIN
389 : pazsan 1.5 |d '| parse-to next-char '- = UNTIL line| ;
390 : pazsan 1.3
391 :     definitions
392 : pazsan 1.1
393 :     \ parse a section
394 :    
395 : pazsan 1.8 : section-line ( -- ) >in off
396 : pazsan 1.9 bl sword longtags search-wordlist
397 :     IF execute
398 : pazsan 1.8 ELSE source nip IF >in off s" p" par THEN THEN ;
399 : pazsan 1.1 : refill-loop ( -- ) end-sec off
400 : pazsan 1.8 BEGIN refill WHILE
401 :     section-line end-sec @ UNTIL THEN ;
402 : pazsan 1.1 : parse-section ( -- )
403 : pazsan 1.9 refill-loop ;
404 : pazsan 1.1
405 :     \ HTML head
406 :    
407 :     : .title ( addr u -- )
408 :     .' <!doctype html public "-//w3c//dtd html 4.0 transitional//en">' cr
409 : pazsan 1.2 s" html" >env s" head" >env
410 : pazsan 1.1 .' <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">' cr
411 : pazsan 1.2 s" title" tagged cr
412 : pazsan 1.1 -env ;
413 :    
414 :     \ HTML trailer
415 :    
416 :     Variable mail
417 :     Variable mail-name
418 : pazsan 1.12 Variable orig-date
419 : pazsan 1.1
420 :     : .trailer
421 : pazsan 1.2 s" address" >env s" center" >env
422 : pazsan 1.12 orig-date @ IF ." Created " orig-date $@ type ." . " THEN
423 : pazsan 1.2 ." Last modified: " time&date rot 0 u.r swap 1-
424 : pazsan 1.1 s" janfebmaraprmayjunjulaugsepoctnovdec" rot 3 * /string 3 min type
425 : pazsan 1.3 0 u.r ." by "
426 : pazsan 1.10 s" Mail|icons/mail.gif" .img mail $@ mailto: mail-name $@ s" a" tagged
427 : pazsan 1.1 -envs ;
428 :    
429 :     \ top word
430 :    
431 : pazsan 1.6 : parse" ( -- addr u ) '" parse 2drop '" parse ;
432 :    
433 : pazsan 1.12 : maintainer ( -- )
434 : pazsan 1.6 bl sword mail $! parse" mail-name $! ;
435 : pazsan 1.12 : created ( -- )
436 :     bl sword orig-date $! ;
437 : pazsan 1.6
438 :     Variable style$
439 :     : style> style$ @ 0= IF s" " style$ $! THEN style$ $@ tag-option $! ;
440 :     : >style tag-option $@ style$ $! s" " tag-option $! ;
441 :    
442 :     : style style> opt >style ;
443 :     : background ( -- ) parse" s" background" style ;
444 :     : text ( -- ) parse" s" text" style ;
445 :     warnings @ warnings off
446 :     : link ( -- ) parse" s" link" style ;
447 :     warnings !
448 :     : vlink ( -- ) parse" s" vlink" style ;
449 :     : marginheight ( -- ) parse" s" marginheight" style ;
450 : pazsan 1.1
451 :     : wf ( -- )
452 :     outfile-id >r
453 :     bl sword r/w create-file throw to outfile-id
454 : pazsan 1.6 parse" .title
455 :     +env style> s" body" env env?
456 : pazsan 1.1 ['] parse-section catch .trailer
457 :     outfile-id close-file throw
458 :     r> to outfile-id
459 :     dup 0< IF throw ELSE drop THEN ;
460 :    
461 : pazsan 1.8 : eval-par ( addr u -- )
462 :     s" wf-temp.wf" r/w create-file throw >r
463 :     r@ write-file r> close-file throw
464 :     push-file s" wf-temp.wf" r/o open-file throw loadfile !
465 :     parse-par parse-section
466 :     loadfile @ close-file swap 2dup or
467 :     pop-file drop throw throw
468 :     s" wf-temp.wf" delete-file throw ;
469 :    
470 : pazsan 1.2 \ simple text data base
471 :    
472 :     Variable last-entry
473 :     Variable field#
474 :    
475 :     : table: ( xt n -- ) Create , , 1 field# !
476 :     DOES> 2@ >in @ >r longtags set-current
477 :     Create definitions swap , r> >in !
478 :     here last-entry !
479 :     dup 0 DO 0 , LOOP
480 :     1 DO s" " last-entry @ I cells + $! LOOP
481 :     last-entry @ get-rest
482 :     DOES> dup cell+ swap perform ;
483 :    
484 :     : field: Create field# @ , 1 field# +!
485 :     DOES> @ cells last-entry @ + get-rest ;
486 : pazsan 1.8 : par: Create field# @ , 1 field# +!
487 :     DOES> @ cells last-entry @ + get-par ;
488 : pazsan 1.3
489 :     : >field ' >body @ cells postpone Literal postpone + ; immediate

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help