forked from rebol/rebol
-
Notifications
You must be signed in to change notification settings - Fork 2
Make banner
angerangel edited this page Mar 19, 2013
·
1 revision
MAKE-BANNER fmt
Build startup banner.
MAKE-BANNER is a function value.
- fmt
#SOURCE
make-banner: make function! [ [
"Build startup banner."
fmt /local str star spc a b s
][
if string? fmt [return fmt]
str: make string! 200
star: append/dup make string! 74 #"*" 74
spc: format ["**" 70 "**"] ""
parse fmt [
some [
[
set a string! (s: format ["** " 68 "**"] a)
| '= set a [string! | word! | set-word!] [
b:
path! (b: get b/1)
| word! (b: get b/1)
| block! (b: reform b/1)
| string! (b: b/1)
]
(s: format ["** " 11 55 "**"] reduce [a b])
| '* (s: star)
| '- (s: spc)
]
(append append str s newline)
]
]
str
] ]