diff options
author | Mattias Andrée <maandree@kth.se> | 2016-08-26 13:27:31 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2016-08-26 13:27:31 +0200 |
commit | 1bedd961b4ad3c3c0892576de19c8051aab664f4 (patch) | |
tree | 438aa73253f06e8cbfec431a1dab30978a1a73f7 /src/cg-icc.c | |
parent | Work on icc (diff) | |
download | cg-tools-1bedd961b4ad3c3c0892576de19c8051aab664f4.tar.gz cg-tools-1bedd961b4ad3c3c0892576de19c8051aab664f4.tar.bz2 cg-tools-1bedd961b4ad3c3c0892576de19c8051aab664f4.tar.xz |
doc
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/cg-icc.c')
-rw-r--r-- | src/cg-icc.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/cg-icc.c b/src/cg-icc.c index eaa6d36..24aa5cb 100644 --- a/src/cg-icc.c +++ b/src/cg-icc.c @@ -134,6 +134,12 @@ int handle_args(int argc, char* argv[], char* method, char* site, } +/** + * Read an unsigned 64-bit integer + * + * @param content The beginning of the encoded integer + * @return The integer, decoded + */ uint64_t icc_uint64(const char* restrict content) { uint64_t rc; @@ -149,6 +155,12 @@ uint64_t icc_uint64(const char* restrict content) } +/** + * Read an unsigned 32-bit integer + * + * @param content The beginning of the encoded integer + * @return The integer, decoded + */ uint32_t icc_uint32(const char* restrict content) { uint32_t rc; @@ -160,6 +172,12 @@ uint32_t icc_uint32(const char* restrict content) } +/** + * Read an unsigned 16-bit integer + * + * @param content The beginning of the encoded integer + * @return The integer, decoded + */ uint16_t icc_uint16(const char* restrict content) { uint16_t rc; @@ -169,12 +187,25 @@ uint16_t icc_uint16(const char* restrict content) } +/** + * Read an unsigned 8-bit integer + * + * @param content The beginning of the encoded integer + * @return The integer, decoded + */ uint16_t icc_uint8(const char* restrict content) { return (uint8_t)(content[0]) } +/** + * Read a floating-point value + * + * @param content The beginning of the encoded value + * @param width The number of bytes with which the value is encoded + * @return The value, decoded + */ double icc_double(const char* restrict content, size_t width) { double ret = 0; |