aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog7
-rw-r--r--src/algebra/data.spad.pamphlet4
-rw-r--r--src/algebra/strap/OUTFORM.lsp6
3 files changed, 16 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 7dc5e9a1..1a5ee205 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,12 @@
2009-09-20 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * algebra/data.spad.pamphlet (size$Byte): Implement.
+ (index$Byte): Likewise.
+ (lookup$Byte): Likewise.
+ (random$Byte): Likewise.
+
+2009-09-20 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* lib/XDither.c: Tidy.
* lib/XShade.c: Likewise.
* lib/XSpadFill.c: Likewise.
diff --git a/src/algebra/data.spad.pamphlet b/src/algebra/data.spad.pamphlet
index 2d84ac59..e5de8656 100644
--- a/src/algebra/data.spad.pamphlet
+++ b/src/algebra/data.spad.pamphlet
@@ -47,6 +47,10 @@ Byte(): Public == Private where
x >= y == byteGreaterEqual(x,y)$Foreign(Builtin)
min() == per 0
max() == per 255
+ size() == 256
+ index n == byte((n - 1) pretend NonNegativeInteger)
+ lookup x == (rep x + 1) pretend PositiveInteger
+ random() == byte random(size())$NonNegativeInteger
bitand(x,y) == bitand(x,y)$Foreign(Builtin)
bitior(x,y) == bitior(x,y)$Foreign(Builtin)
diff --git a/src/algebra/strap/OUTFORM.lsp b/src/algebra/strap/OUTFORM.lsp
index 9f6d60da..636f4db5 100644
--- a/src/algebra/strap/OUTFORM.lsp
+++ b/src/algebra/strap/OUTFORM.lsp
@@ -63,6 +63,9 @@
(DECLAIM (FTYPE (FUNCTION (|%DoubleFloat| |%Shell|) |%Thing|)
|OUTFORM;outputForm;Df$;14|))
+(PUT '|OUTFORM;outputForm;Df$;14| '|SPADreplace|
+ 'DFLOAT-FORMAT-GENERAL)
+
(DECLAIM (FTYPE (FUNCTION (|%String| |%Shell|) |%Thing|)
|OUTFORM;outputForm;S$;15|))
@@ -557,7 +560,8 @@
(DEFUN |OUTFORM;outputForm;S$;13| (|e| $) (DECLARE (IGNORE $)) |e|)
(DEFUN |OUTFORM;outputForm;Df$;14| (|f| $)
- (FORMAT NIL (|getShellEntry| $ 6) |f|))
+ (DECLARE (IGNORE $))
+ (DFLOAT-FORMAT-GENERAL |f|))
(DEFUN |OUTFORM;outputForm;S$;15| (|s| $)
(SPADCALL (|spadConstant| $ 27)