summaryrefslogtreecommitdiff
path: root/design/mock/context.py
diff options
context:
space:
mode:
Diffstat (limited to 'design/mock/context.py')
-rw-r--r--design/mock/context.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/design/mock/context.py b/design/mock/context.py
index b35abd5..5549d02 100644
--- a/design/mock/context.py
+++ b/design/mock/context.py
@@ -176,7 +176,12 @@ def more(g, x, y):
def integer(g, x, y, v, ink=VELLUM):
- """A number that is not an address: one digit as it is; more, hex with 0x and its decimal after, faint."""
+ """A number that is not an address: one digit as it is; more, hex with 0x and its decimal after, faint; within
+ 4096 of 2^64, negative."""
+ if v >= (1 << 64) - 4096:
+ s = "-%d" % ((1 << 64) - v)
+ g.t(x, b(y), s, S, ink, MONO)
+ return x + len(s) * A
if v < 10:
g.t(x, b(y), str(v), S, ink, MONO)
return x + A
@@ -226,6 +231,10 @@ def chain(g, x, y, links, end, marks=None, room=None, lead=0):
x = value_arrow(g, x, y) if links else x
if marks.get("end") == "tick": # the value it holds changed within three steps
held(g, x + 2, y, len(str(end[1])) * A if end[0] == "int" else 3 * A)
+ if marks.get("end") == "strike" and end[0] == "int": # the value written: the softened vermilion, bold
+ s_ = str(end[1]) if end[1] < 10 else "0x%x" % end[1]
+ g.t(x, b(y), s_, S, struck(g, x - 5, y, len(s_) * A + 10), BOLD)
+ return where
if end[0] == "int":
integer(g, x, y, end[1])
else: