ctype TYPENAME header_files
Optional Flags:
-p
:p
rint a full, human-friendly type
- Primitives:
All primitive types follow the general layout
P<s>
whereP
is the primitive prefix and<s>
is a set of 4 bytes (big-endian) representing the primitive size in bits (with the exception of void, bool and self)
prefixes:i
: A signed integeru
: An unsigned integerf
: A floating-point numberv
: voidb
: a boolean values
: a self-reference back to the root (requested) type
- Pointers:
A pointer is expressed as
pT
whereT
is any type
- Structs:
Structs are a little more complex and are represented using the following rules:
- byte 1:
S
prefix - byte 2-5: number of members (big-endian)
- for each member (separated by the
|
character):- name (as a null-terminated c-string)
- type
- byte 1:
- Unions:
The representation of unions is almost identical to structs except the first byte is the
U
character