aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2006-12-29 01:20:48 +0000
committerKim F. Storm2006-12-29 01:20:48 +0000
commitf8a265f26e6dc93507aa423c2775ca1dd21550da (patch)
tree23c5305a03a57038990be6614cb9c9d1dd8e44aa
parent8f2b5ec6ecd64e0177026b550fda8515c472a52d (diff)
downloademacs-f8a265f26e6dc93507aa423c2775ca1dd21550da.tar.gz
emacs-f8a265f26e6dc93507aa423c2775ca1dd21550da.zip
(bindat--unpack-group, bindat--length-group)
(bindat--pack-group): Let-bind COUNT during repeat block evaluation.
-rw-r--r--lisp/emacs-lisp/bindat.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/bindat.el b/lisp/emacs-lisp/bindat.el
index 792272ef88a..6053fb3cf09 100644
--- a/lisp/emacs-lisp/bindat.el
+++ b/lisp/emacs-lisp/bindat.el
@@ -319,8 +319,8 @@
319 ((eq type 'struct) 319 ((eq type 'struct)
320 (setq data (bindat--unpack-group (eval len)))) 320 (setq data (bindat--unpack-group (eval len))))
321 ((eq type 'repeat) 321 ((eq type 'repeat)
322 (let ((index 0)) 322 (let ((index 0) (count len))
323 (while (< index len) 323 (while (< index count)
324 (setq data (cons (bindat--unpack-group (nthcdr tail item)) data)) 324 (setq data (cons (bindat--unpack-group (nthcdr tail item)) data))
325 (setq index (1+ index))) 325 (setq index (1+ index)))
326 (setq data (nreverse data)))) 326 (setq data (nreverse data))))
@@ -415,8 +415,8 @@ e.g. corresponding to STRUCT.FIELD1[INDEX2].FIELD3..."
415 (bindat--length-group 415 (bindat--length-group
416 (if field (bindat-get-field struct field) struct) (eval len))) 416 (if field (bindat-get-field struct field) struct) (eval len)))
417 ((eq type 'repeat) 417 ((eq type 'repeat)
418 (let ((index 0)) 418 (let ((index 0) (count len))
419 (while (< index len) 419 (while (< index count)
420 (bindat--length-group 420 (bindat--length-group
421 (nth index (bindat-get-field struct field)) 421 (nth index (bindat-get-field struct field))
422 (nthcdr tail item)) 422 (nthcdr tail item))
@@ -559,8 +559,8 @@ e.g. corresponding to STRUCT.FIELD1[INDEX2].FIELD3..."
559 (bindat--pack-group 559 (bindat--pack-group
560 (if field (bindat-get-field struct field) struct) (eval len))) 560 (if field (bindat-get-field struct field) struct) (eval len)))
561 ((eq type 'repeat) 561 ((eq type 'repeat)
562 (let ((index 0)) 562 (let ((index 0) (count len))
563 (while (< index len) 563 (while (< index count)
564 (bindat--pack-group 564 (bindat--pack-group
565 (nth index (bindat-get-field struct field)) 565 (nth index (bindat-get-field struct field))
566 (nthcdr tail item)) 566 (nthcdr tail item))