diff options
author | Thien-Thi Nguyen <ttn@gnuvola.org> | 2006-05-23 08:04:25 +0000 |
---|---|---|
committer | Thien-Thi Nguyen <ttn@gnuvola.org> | 2006-05-23 08:04:25 +0000 |
commit | b12d1537e7b0dcc07bdfc7ca3a63f4e3b14595dd (patch) | |
tree | 8b737fb8c71dc503584e5354c57222159b05e0d2 /lisp | |
parent | f569c26e7918554700a02146bd92a1ee8384ee4a (diff) | |
download | emacs-b12d1537e7b0dcc07bdfc7ca3a63f4e3b14595dd.tar.gz |
Refill; nfc.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/emacs-lisp/bindat.el | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/bindat.el b/lisp/emacs-lisp/bindat.el index 455b049dc8a..c6989883a10 100644 --- a/lisp/emacs-lisp/bindat.el +++ b/lisp/emacs-lisp/bindat.el @@ -171,8 +171,8 @@ ;; | INTEGER_CONSTANT ;; | DEREF -;; DEREF ::= ( [NAME | INTEGER]... ) -- Field NAME or Array index relative to -;; current structure spec. +;; DEREF ::= ( [NAME | INTEGER]... ) -- Field NAME or Array index relative +;; to current structure spec. ;; -- see bindat-get-field ;; A `union' specification @@ -415,7 +415,9 @@ e.g. corresponding to STRUCT.FIELD1[INDEX2].FIELD3..." ((eq type 'repeat) (let ((index 0)) (while (< index len) - (bindat--length-group (nth index (bindat-get-field struct field)) (nthcdr tail item)) + (bindat--length-group + (nth index (bindat-get-field struct field)) + (nthcdr tail item)) (setq index (1+ index))))) ((eq type 'union) (let ((tag len) (cases (nthcdr tail item)) case cc) @@ -436,7 +438,7 @@ e.g. corresponding to STRUCT.FIELD1[INDEX2].FIELD3..." (setq pos (+ pos len)))))))) (defun bindat-length (spec struct) - "Calculate raw-data length for STRUCT according to bindat specification SPEC." + "Calculate raw-data length for STRUCT according to bindat SPEC." (let ((pos 0)) (bindat--length-group struct spec) pos)) @@ -557,7 +559,9 @@ e.g. corresponding to STRUCT.FIELD1[INDEX2].FIELD3..." ((eq type 'repeat) (let ((index 0)) (while (< index len) - (bindat--pack-group (nth index (bindat-get-field struct field)) (nthcdr tail item)) + (bindat--pack-group + (nth index (bindat-get-field struct field)) + (nthcdr tail item)) (setq index (1+ index))))) ((eq type 'union) (let ((tag len) (cases (nthcdr tail item)) case cc) @@ -583,7 +587,8 @@ Note: The result is a multibyte string; use `string-make-unibyte' on it to make it unibyte if necessary." (let ((no-return raw-data)) (unless pos (setq pos 0)) - (unless raw-data (setq raw-data (make-vector (+ pos (bindat-length spec struct)) 0))) + (unless raw-data + (setq raw-data (make-vector (+ pos (bindat-length spec struct)) 0))) (bindat--pack-group struct spec) (if no-return nil (concat raw-data)))) |