UTF-8, untabify, whitespaces.
[binary-types.git] / ChangeLog
1 2003-12-11  Frode Vatvedt Fjeld  <frodef@cs.uit.no>
2
3         * RELEASE: 0.90
4
5         * API CHANGE! Map-binary-write functions now receive two
6         arguments: The object (as before), and the name of the binary-type
7         the object is supposed to be mapped to.
8
9         * Imroved README a bit. Documented :map-binary-read and
10         :map-binary-read-delayed.
11
12         * Fixed bug as reported by Simon Leinen. Various minor
13         bug-fixes. Changed the defpackage form to use gensym names.
14
15 2001-08-28  Frode Vatvedt Fjeld  <frodef@acm.org>
16
17         * binary-types.lisp:
18         Added utility functions SPLIT-BYTES and MERGE-BYTES that deals with
19         converting lists of bytes to new byte-sizes.
20
21 2001-08-27  Frode Vatvedt Fjeld  <frodef@acm.org>
22
23         * binary-types.lisp: Added generic function READ-BINARY-RECORD so
24         that it may be specialized.
25
26 2001-08-27  Frode Vatvedt Fjeld  <frodef@acm.org>
27
28         * binary-types.lisp:
29         Added function ENUM-SYMBOLIC-VALUE, the inverse of ENUM-VALUE.
30
31 2001-08-27  Frode Vatvedt Fjeld  <frodef@acm.org>
32
33         * binary-types.lisp: Added :binary-tags slot-option. The argument
34         specifies a list of "tags" (intended to be symbols, but any lisp
35         objects will do) that will be associated with the slot. The
36         function BINARY-SLOT-TAGS will retrieve the set of tags for a
37         slot. The function BINARY-RECORD-SLOT-NAMES has been modified to
38         take the keyword argument :MATCH-TAGS so that only slots with at
39         least one of those tags are returned.
40
41         The idea is that sometimes you need to iterate over a sub-set of
42         the slots, in which case a tag can be used to name and reference
43         such sub-sets.
44
45 2001-08-24  Frode Vatvedt Fjeld  <frodef@acm.org>
46
47         * binary-types.lisp: Changed they expansion function of
48         DEFINE-BINARY-CLASS not to generate literal structure
49         objects. Expansions should be much "nicer" for the compiler to
50         handle now.
51
52 2001-08-17  Frode Vatvedt Fjeld  <frodef@acm.org>
53
54         * binary-types.lisp: Added slot-options :MAP-ON-READ and
55         :MAP-ON-READ-DELAYED.  The former is analogous to :MAP-ON-WRITE,
56         i.e. at BINARY-READ-time the function named is applied to the
57         (binary) value read, and the result is placed in the
58         slot.
59
60         :MAP-ON-READ-DELAYED is a variation that delays the mapping
61         operation until the slot is read. Until that time, the slot is
62         unbound and the binary value kept in a "hidden" slot. [This is
63         implemented more or less seamlessly by specializing the
64         SLOT-UNBOUND method.]  However, the "hidden" binary value can be
65         read using BINARY-SLOT-VALUE; this will not cause the mapping to
66         occur. The idea is that if you have slots that represent pointers
67         to other records, you probalby don't want the READ-BINARY
68         operation to automatically follow and recursively read such
69         pointers. Using this mechanism, objects referenced by pointers
70         will magically be loaded "on demand".
71
72 2001-07-27  Frode Vatvedt Fjeld  <frodef@acm.org>
73
74         * binary-types.lisp:
75         Removed LET from DEFINE-BINARY-STRUCT expansion, making it a proper top-level-form.
76
77 2001-07-27  Frode Vatvedt Fjeld  <frodef@acm.org>
78
79         * RELEASE: 0.84
80
81         * binary-types.lisp: Removed (superfluous) LET* from
82         DEFINE-BINARY-STRUCT's expansion, so as not to hinder such forms
83         from being proper top-level forms.
84
85 2001-07-12  Frode Vatvedt Fjeld  <frodef@acm.org>
86
87         * RELEASE: 0.83
88
89         * binary-types.lisp: Fixed READ-BINARY-STRING to work correctly
90         for :SIZE 0. It will now return "" and 0, rather than entering
91         an infinite loop.
92
93 2001-06-29  Frode Vatvedt Fjeld  <frodef@acm.org>
94
95         * RELEASE: 0.82
96
97         * binary-types.lisp: Added macro WITH-BINARY-OUTPUT-TO-VECTOR.
98         Supposed to resemble CL:WITH-OUTPUT-TO-STRING.
99
100 2001-06-26  Frode Vatvedt Fjeld  <frodef@acm.org>
101
102         * binary-types.lisp: Fixed buggy function READ-BINARY-STRING.
103
104 2001-06-22  Frode Vatvedt Fjeld  <frodef@acm.org>
105
106         * binary-types.lisp: Renamed many identifiers from xx-COMPUND-xx
107         to xx-RECORD-xx. Of the exported symbols, only two are changed:
108         WRITE-BINARY-RECORD, and BINARY-RECORD-SLOT-NAMES. A (binary)
109         record is either a lisp struct or class.
110
111         * RELEASE: 0.81
112
113         * binary-types.lisp: Minor fixups to make BT work with CLISP.
114
115 2001-06-20  Frode Vatvedt Fjeld  <frodef@acm.org>
116
117         * RELEASE: 0.80
118
119         * binary-types.lisp: Rewrote and renamed some the binary string
120         types. Macros DEFINE-BINARY-STRING and
121         DEFINE-NULL-TERMINATED-STRING should now be used to define string
122         types.
123
124         * binary-types.lisp: Added function READ-BINARY-STRING that should
125         be general enough to read most kinds of strings. It still doesn't
126         do character sets, though.
127
128         * binary-types.lisp: Removed traces of variable-sized binary
129         types. Everything is now constant-sized. Removed functions
130         SIZEOF-MIN and SIZEOF-MAX.
131
132 2001-06-09  Frode Vatvedt Fjeld  <frodef@acm.org>
133
134         * binary-types.lisp: Removed one more instance of upcased symbols
135         in the code, in order to facilitate those using case-sensitive
136         readers.
137
138 2001-06-06  Frode Vatvedt Fjeld  <frodef@acm.org>
139
140         * RELEASE: 0.76
141
142         * binary-types.lisp: Added macro WITH-BINARY-INPUT-FROM-VECTOR.
143
144         * binary-types.lisp: Added check for end-of-list in
145         WITH-BINARY-INPUT-FROM-LIST macro.
146
147         * Makefile: Forgot to include recently added file
148         type-hierarchy.ps in the distribution tarball.
149
150 2001-05-03  Frode Vatvedt Fjeld  <frodef@acm.org>
151
152         * binary-types.lisp: Renamed the slot-options (the old ones still
153         work though).
154         :bt => :binary-type
155         :btt => :binary-lisp-type
156         :bt-on-write => :map-binary-write.
157
158         * binary-types.lisp: Added a pseudo-type :LABEL available only
159         inside DEFINE-BINARY-CLASS and which is a void type intended for
160         "slots" that don't hold any data but are used as labels in the
161         struct in order to determine offsets etc. If this type is declared
162         with the :btt (or :binary-lisp-type) slot-option, the lisp :type
163         NIL is declared (the empty type).
164
165 2001-04-24  Frode Vatvedt Fjeld  <frodef@acm.org>
166
167         * RELEASE: 0.75
168
169 2001-04-23  Frode Vatvedt Fjeld  <frodef@acm.org>
170
171         * type-hierarchy.ps: Added. This is a postscript file displaying
172         the type (meta-) hierarchy, for reference.
173
174 2001-04-22  Frode Vatvedt Fjeld  <frodef@acm.org>
175
176         * binary-types.lisp: Added macro WITH-BINARY-INPUT-FROM-LIST that
177         sets up a "stream" variable suitable for READ-BINARY that provides
178         8-bit bytes from a list of integers.
179
180 2001-04-12  Frode Vatvedt Fjeld  <frodef@acm.org>
181
182         * RELEASE: 0.74
183
184         * binary-types.lisp: The previous fix for DEFINE-BINARY-STRUCT's
185         lambda list was wrong. Hopefully this actually fixes it.
186
187 2001-04-11  Frode Vatvedt Fjeld  <frodef@acm.org>
188
189         * RELEASE: 0.73
190
191         * binary-types.lisp: Changed in DEFINE-BINARY-STRUCT a (format
192         "MAKE-~A" name) to (format "~A-~A" '#:make name), which should
193         allow for lower-case lisps to work.
194
195         * binary-types.lisp: Modified DEFINE-BINARY-STRUCT's macro
196         lambda-list slightly to accommodate a bug in clisp. (This
197         shouldn't affect other systems at all.)
198
199 2001-03-29  Frode Vatvedt Fjeld  <frodef@acm.org>
200
201         * RELEASE: 0.72.
202
203 2001-03-28  Frode Vatvedt Fjeld  <frodef@acm.org>
204
205         * binary-types.lisp: Added macro WITH-BINARY-OUTPUT-TO-LIST that,
206         given a stream variable S, evaluates its body such that calls to
207         WRITE-BINARY to stream S collects in a list the individual bytes
208         as integers. This list is returned by the macro form.
209
210         * binary-types.lisp: Added two dynamic variables that allows you
211         to override the low-level IO functions binary-types use to read
212         and write single octets: *BINARY-READ-BYTE* and
213         *BINARY-WRITE-BYTE*, respectively. They default to the standard CL
214         functions READ-BYTE and WRITE-BYTE, and you may rebind them to any
215         function with the same signature.
216
217         * binary-types.lisp: Fixed bug in the expansion of
218         DEFINE-BINARY-STRUCT that caused nested declarations not to
219         work. This bug even made example.lisp not work. Sigh.
220
221 2001-02-19  Frode Vatvedt Fjeld  <frodef@acm.org>
222
223         * RELEASE: 0.71.
224
225         * README: Revamped the documentation somewhat. Fixed up some
226         inconsistencies etc.
227
228 2001-02-13  Frode Vatvedt Fjeld  <frodef@acm.org>
229
230         * binary-types.lisp: Changed some more syntax (slightly) in order
231         to be more consistent with CL syntax. Specifically,
232         DEFINE-BITFIELD now requires parens around the storage-type (as
233         does DEFINE-ENUM).
234
235         * example.lisp: Changed to reflext new syntax.
236
237 2001-02-12  Frode Vatvedt Fjeld  <frodef@acm.org>
238
239         * binary-types.lisp: Changed syntax of DEFINE-ENUM. The
240         storage-type must be put in braces, and you may optionally specify
241         the :byte.
242
243         * binary-types.lisp: Added function ENUM-VALUE.
244
245 2000-11-01  Frode Vatvedt Fjeld  <frodef@acm.org>
246
247         * binary-types.lisp: Changed COMPOUND-SLOT-NAMES to not include
248         padding slots, unless explicity requested.
249
250         * binary-types.lisp: Added method WRITE-BINARY-COMPOUND that is
251         like WRITE-BINARY only it will automatically look up the correct
252         binary-type from the object, and it only works on compounds (that
253         is, binary-classes and binary-structs).
254
255 2000-10-31  Frode Vatvedt Fjeld  <frodef@acm.org>
256
257         * binary-types.lisp: Added slot-option :on-write, that provides a
258         function that will be called (at binary-writing time) on the
259         slot's value to obtain the actual value that is written.
260
261 2000-10-26  Frode Vatvedt Fjeld  <frodef@acm.org>
262
263         * RELEASE: 0.70.
264
265         * binary-types.lisp: Renamed DEF-BINCLASS to DEFINE-BINARY-CLASS,
266         and DEF-BINSTRUCT to DEFINE-BINARY-STRUCT, and DEF-* to DEFINE-*.
267
268         * binary-types.lisp: Added a variation of the :BT slot-option. It
269         is named :BTT, and will have the extra effect of adding a :TYPE
270         slot-option to the class or struct slot. Be careful when using
271         this in DEF-BINSTRUCT to provide an slot-initform that is of the
272         correct type!
273
274         * binary-types.lisp: Changed the way nested declarations are
275         expanded. Now, even nested declarations will (in the expansion)
276         become top-level forms, I believe. This means that the
277         type-specifiers (the place after :BT in e.g. DEF-BINCLASS) is no
278         longer really evaluated, rather it is parsed by the
279         macro-expander. This means you no longer have to quote the
280         type-names (See "example.lisp"). Bitfield types are represented
281         symbolically by lists, so they are all of the lisp-type
282         "list". Fixed-size-nt-strings are equivalent to lisp strings (they
283         should really be strings of a maximum size, but lisp can't easily
284         express that concept). Also note that padding binary types which
285         are named by integer objects don't translate to lisp types at
286         all. This is just fine, I think, since padding "slots" are not
287         supposed to hold any lisp data.
288
289         * binary-types.lisp: Added DEFTYPE declarations so that all
290         binary-types also become lisp-types. For example, if you declare
291         (def-unsigned raw-number 1), you implicitly declare a lisp
292         type-specifier RAW-NUMBER that is equivalent to (integer 0 255).
293
294 2000-10-25  Frode Vatvedt Fjeld  <frodef@acm.org>
295
296         * RELEASE: 0.61
297
298         * binary-types.lisp: Fixed bug in READ-BINARY for signed integers.
299
300         * binary-types.lisp: Added a WRITE-BINARY for binary-type
301         fixed-size-nt-string. Hopefully, read/write symmetry is complete
302         now. At least it should be possible to write the elf-header from
303         example.lisp.
304
305         * binary-types.lisp: Added DEF-BINSTRUCT macro, which is (supposed
306         to be) to DEFSTRUCT what DEF-BINCLASS is to DEFCLASS. If nothing
307         else, structs prints and reads more easily than classes. See the
308         definition of E-IDENT in the updated example.lisp.
309
310 2000-10-24  Frode Vatvedt Fjeld  <frodef@acm.org>
311
312         * binary-types.lisp: Added class-option for DEF-BINCLASS
313         :class-slot-align that allows you to adjust the offsets by
314         declaring the offset of one slot. Like this
315         (:class-slot-align slot-name offset)
316
317         * binary-types.lisp: Added a class-option for DEF-BINCLASS,
318         :class-slot-offset <integer>, that specifies an offset to add to
319         any slot-offset as returned by SLOT-OFFSET.
320
321         * README-bitfield: This is my response to a query about how
322         DEF-BITFIELD works, included here to provide some documentation.
323
324 2000-10-23  Frode Vatvedt Fjeld  <frodef@acm.org>
325
326         * RELEASE: 0.50
327
328         * binary-types.lisp: Added a macro WITH-BINARY-FILE that is a thin
329         wrapper around WITH-OPEN-FILE that tries to force the stream to
330         have the correct element-type.
331
332 2000-10-22  Frode Vatvedt Fjeld  <frodef@acm.org>
333
334         * binary-types.lisp: Changed syntax of DEF-BINCLASS again, so that
335         it now completely matches the DEFCLASS syntax, only you have one
336         extra slot-option, :BT, which declares the slot's
337         binary-type. This slot-option is evaluated, so you may still have
338         nested declarations. What is new is that you may have slots that
339         don't have a binary-type. Such slots are simply ignored by
340         READ-BINARY and WRITE-BINARY.
341
342 2000-10-21  Frode Vatvedt Fjeld  <frodef@acm.org>
343
344         * binary-types.lisp: Added COMPOUND-SLOT-NAMES, to replace
345         COMPOUND-ALIST and COMPOUND-MERGE which are now deprecated (the
346         functions are still there, but their symbols are no longer
347         exported..).
348
349         * binary-types.lisp: Changed the two BITFIELD-COMPUTE-XX-VALUE
350         from generic to regular functions (no reason for these to be
351         generic functions).
352
353 2000-10-20  Frode Vatvedt Fjeld  <frodef@acm.org>
354
355         * example.lisp: Changed the example ELF header declaration to work
356         with the slightly changed syntax. Basically, all slots' type-field
357         is evaluated, so type-names (symbols) must be quoted.
358
359         * binary-types.lisp: Renamed DEF-COMPOUND to DEF-BINCLASS, and
360         changed the syntax so it looks more like DEFCLASS.
361
362         * binary-types.lisp: Added the capability of binary-integers to be
363         declared a certain endianess. So an integer is either :BIG-ENDIAN
364         or :LITTLE-ENDIAN (regardless of *ENDIAN*), or it depends
365         dynamically on the value of *ENDIAN*. The DEF-INTEGER macros now
366         takes and optional endianess argument.
367
368         * binary-types.lisp: Changed the (previously very ugly)
369         implementation of the binary-types name-space. Now use the new
370         accessor FIND-BINARY-TYPE which is implemented with a simple
371         hash-table. This means that BINARY TYPES MUST NOW BE NAMED BY
372         SYMBOLS (binary-types no longer touches the symbol-value of
373         symbols).
374
375         * binary-types.lisp: Removed generic function BIT-SIZEOF, since we
376         only deal with octets anyway.
377
378         * binary-types.lisp: Changed *ENDIAN* to take keyword symbols
379         :BIG-ENDIAN or :LITTLE-ENDIAN (old BT-interned symbols still
380         work).
381
382 2000-08-25  Frode Vatvedt Fjeld  <frodef@acm.org>
383
384         * binary-types.lisp: Fixed reading of signed integers.
385
386 2000-06-13  Frode Vatvedt Fjeld  <frodef@acm.org>
387
388         * README: Added a little more documentation.
389
390         * example.lisp: Cleaned up some small things.
391
392 2000-03-30  Frode Vatvedt Fjeld  <frodef@acm.org>
393
394         * binary-types.lisp: Added write support for bitfield.
395
396         * binary-types.lisp: Changed the bitfield type to use proper CL
397         "bytes" for subfields.
398
399 1999-12-08  Frode Vatvedt Fjeld  <frodef@acm.org>
400
401         * test.lisp: Added this file for tests of the BINARY-TYPES
402         package. Not much in it so far.
403
404         * binary-types.lisp: Fixed READ-BINARY for signed integers so it
405         actually works.
406
407         * binary-types.lisp: Added WRITE-BINARY for integers, char8,
408         padding, and compound.
409
410         * ChangeLog: Started
411