Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Mar 2014 03:25:30 +0000 (UTC)
From:      Devin Teske <dteske@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r263703 - stable/9/sys/boot/forth
Message-ID:  <201403250325.s2P3PUqN054163@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dteske
Date: Tue Mar 25 03:25:30 2014
New Revision: 263703
URL: http://svnweb.freebsd.org/changeset/base/263703

Log:
  MFC r258269: Refactor draw-beastie function.
  
  Discussed on:	-hackers

Modified:
  stable/9/sys/boot/forth/beastie.4th
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/forth/   (props changed)

Modified: stable/9/sys/boot/forth/beastie.4th
==============================================================================
--- stable/9/sys/boot/forth/beastie.4th	Tue Mar 25 03:23:06 2014	(r263702)
+++ stable/9/sys/boot/forth/beastie.4th	Tue Mar 25 03:25:30 2014	(r263703)
@@ -272,56 +272,26 @@ variable logoY
 		drop
 	then
 
-	s" loader_logo" getenv dup -1 = if
-		logoX @ logoY @
-		loader_color? if
-			orb-logo
-		else
-			orbbw-logo
-		then
-		drop exit
-	then
-
-	2dup s" beastie" compare-insensitive 0= if
-		logoX @ logoY @ beastie-logo
-		2drop exit
-	then
-	2dup s" beastiebw" compare-insensitive 0= if
-		logoX @ logoY @ beastiebw-logo
-		2drop exit
-	then
-	2dup s" fbsdbw" compare-insensitive 0= if
-		logoX @ logoY @ fbsdbw-logo
-		2drop exit
-	then
-	2dup s" orb" compare-insensitive 0= if
-		logoX @ logoY @ orb-logo
-		2drop exit
-	then
-	2dup s" orbbw" compare-insensitive 0= if
-		logoX @ logoY @ orbbw-logo
-		2drop exit
-	then
-	2dup s" tribute" compare-insensitive 0= if
-		logoX @ logoY @
-		s" tribute-logo" sfind if
-			execute
-		else
-			drop orb-logo
-		then
-		2drop exit
+	s" loader_logo" getenv dup -1 <> if
+		dup 5 + allocate if ENOMEM throw then
+		0 2swap strcat s" -logo" strcat
+		over -rot ( a-addr/u -- a-addr a-addr/u )
+		sfind     ( a-addr a-addr/u -- a-addr xt bool )
+		rot       ( a-addr xt bool -- xt bool a-addr )
+		free      ( xt bool a-addr -- xt bool ior )
+		if EFREE throw then
+	else
+		0 ( cruft -- cruft bool ) \ load the default below
 	then
-	2dup s" tributebw" compare-insensitive 0= if
-		logoX @ logoY @
-		s" tributebw-logo" sfind if
-			execute
+	0= if
+		drop ( cruft -- )
+		loader_color? if
+			['] orb-logo
 		else
-			drop orbbw-logo
+			['] orbbw-logo
 		then
-		2drop exit
 	then
-
-	2drop
+	logoX @ logoY @ rot execute
 ;
 
 : clear-beastie ( -- ) \ clears beastie from the screen



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403250325.s2P3PUqN054163>