aboutsummaryrefslogtreecommitdiffstats
path: root/src/command.h
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2020-10-29 23:54:17 -0400
committerKevin O'Connor <kevin@koconnor.net>2020-10-30 14:04:08 -0400
commit473828ca6aef18c574b8665ae484513e5592af03 (patch)
tree74d6b8f205ce92282475ad0f6575ea0c5af01fc2 /src/command.h
parentaaf3dc6ac3e3a38b0dd3508d72594214ede27c5c (diff)
downloadkutter-473828ca6aef18c574b8665ae484513e5592af03.tar.gz
kutter-473828ca6aef18c574b8665ae484513e5592af03.tar.xz
kutter-473828ca6aef18c574b8665ae484513e5592af03.zip
command: Add command_decode_ptr() helper
Add a helper function to convert from a string buffer passed in the args[] parameter to an actual pointer. This avoids all the callers needing to perfrom pointer manipulation. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/command.h')
-rw-r--r--src/command.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/command.h b/src/command.h
index e7551ed7..67e595bc 100644
--- a/src/command.h
+++ b/src/command.h
@@ -71,6 +71,7 @@ enum {
};
// command.c
+void *command_decode_ptr(uint32_t v);
uint8_t *command_parsef(uint8_t *p, uint8_t *maxend
, const struct command_parser *cp, uint32_t *args);
uint_fast8_t command_encodef(uint8_t *buf, const struct command_encoder *ce