pack: Implement write-c-string for tftp.

Ruby has hella more string directives we could implement:
https://apidock.com/ruby/Array/pack
freebsd-work
Doug Coleman 2019-02-03 13:34:33 -05:00
parent c8da551a95
commit 3b5cbaff8c
1 changed files with 2 additions and 0 deletions

View File

@ -53,6 +53,7 @@ CONSTANT: pack-table
{ CHAR: F write-float }
{ CHAR: d write-double }
{ CHAR: D write-double }
{ CHAR: a write-c-string }
}
CONSTANT: unpack-table
@ -71,6 +72,7 @@ CONSTANT: unpack-table
{ CHAR: F [ unsigned-endian> bits>float ] }
{ CHAR: d [ unsigned-endian> bits>double ] }
{ CHAR: D [ unsigned-endian> bits>double ] }
! { CHAR: a read-c-string }
}
CONSTANT: packed-length-table