Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177587485
D47403.1794803695.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D47403.1794803695.diff
View Options
diff --git a/stand/lua/core.lua b/stand/lua/core.lua
--- a/stand/lua/core.lua
+++ b/stand/lua/core.lua
@@ -543,6 +543,16 @@
end
end
+-- The graphical-enabled loaders have unicode drawing character support. The text-only
+-- ones do not. Select the single and double frame styles based on whether or not we
+-- have gfx binding. We have to check these funciton bindings since we create gfx above
+-- for really old loaders and they may or may not support this based on whether these
+-- functions are defined. We check the old and new bindings. This also abstracts out
+-- the test elsewhere in case we start to export this notion more directly.
+function core.hasUnicode()
+ return gfx.term_drawrect ~= nil or loader.term_drawrect ~= nil
+end
+
-- Sanity check the boot loader revision
-- Loaders with version 3.0 have everything that we need without backwards
-- compatible hacks. Warn users that still have old versions to upgrade so
diff --git a/stand/lua/drawer.lua b/stand/lua/drawer.lua
--- a/stand/lua/drawer.lua
+++ b/stand/lua/drawer.lua
@@ -506,23 +506,45 @@
top_right = "+",
bottom_right = "+",
},
- ["single"] = {
+}
+
+if core.hasUnicode() then
+ -- unicode based framing characters
+ drawer.frame_styles["single"] = {
horizontal = "\xE2\x94\x80",
vertical = "\xE2\x94\x82",
top_left = "\xE2\x94\x8C",
bottom_left = "\xE2\x94\x94",
top_right = "\xE2\x94\x90",
bottom_right = "\xE2\x94\x98",
- },
- ["double"] = {
+ }
+ drawer.frame_styles["double"] = {
horizontal = "\xE2\x95\x90",
vertical = "\xE2\x95\x91",
top_left = "\xE2\x95\x94",
bottom_left = "\xE2\x95\x9A",
top_right = "\xE2\x95\x97",
bottom_right = "\xE2\x95\x9D",
- },
-}
+ }
+else
+ -- non-unicode cons25-style framing characters
+ drawer.frame_styles["single"] = {
+ horizontal = "\xC4",
+ vertical = "\xB3",
+ top_left = "\xDA",
+ bottom_left = "\xC0",
+ top_right = "\xBF",
+ bottom_right = "\xD9",
+ }
+ drawer.frame_styles["double"] = {
+ horizontal = "\xCD",
+ vertical = "\xBA",
+ top_left = "\xC9",
+ bottom_left = "\xC8",
+ top_right = "\xBB",
+ bottom_right = "\xBC",
+ }
+end
function drawer.drawscreen(menudef)
-- drawlogo() must go first.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 16, 4:34 AM (22 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41760277
Default Alt Text
D47403.1794803695.diff (2 KB)
Attached To
Mode
D47403: loader: Fix boot menu on BIOS
Attached
Detach File
Event Timeline