egg-980315.
[elisp/egg.git] / egg-com.el
index d9a97fe..a45871f 100644 (file)
@@ -649,6 +649,9 @@ Return the length of resulting text."
   (insert s)
   (insert-char 0 1))
 
+(defsubst comm-format-u8-vector (s)
+  (insert (concat s)))
+
 (defsubst comm-format-bytes (s)
   (insert s)
   (insert-char 255 1))
@@ -661,7 +664,8 @@ w means unsigned 16-bit in big endian.
 b means unsigned  8-bit.
 S means 16-bit(big endian) wide-character string (0x0000 terminated).
 E means multibyte string (0x00 terminated).
-s means 8-bit string (0x00 terminated)."
+s means 8-bit string (0x00 terminated).
+v means 8-bit vector."
   (let ((p args) result arg f)
     (while format
       (setq arg (car p))
@@ -672,6 +676,7 @@ s means 8-bit string (0x00 terminated)."
                     (cond ((eq f 'U) (list 'comm-format-u32c arg))
                           ((eq f 'u) (list 'comm-format-u32 arg))
                           ((eq f 'i) (list 'comm-format-i32 arg))
+                          ((eq f 'v) (list 'comm-format-u8-vector arg))
                           ((eq f 'w) (list 'comm-format-u16 arg))
                           ((eq f 'b) (list 'comm-format-u8 arg))
                           ((eq f 'S) (list 'comm-format-u16-string arg))