From 91cda376252c6a754d7701e1732049748afd99d8 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 13 Dec 2014 15:27:31 +0100 Subject: mds-kbdc: call-stack: push and pop functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/mds-kbdc/call-stack.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/mds-kbdc/call-stack.h') diff --git a/src/mds-kbdc/call-stack.h b/src/mds-kbdc/call-stack.h index fffedf1..aa206b3 100644 --- a/src/mds-kbdc/call-stack.h +++ b/src/mds-kbdc/call-stack.h @@ -36,6 +36,23 @@ void mds_kbdc_call_stack_begin(mds_kbdc_parsed_t* restrict result); */ void mds_kbdc_call_stack_end(void); +/** + * Mark an function- or macro-call + * + * @param tree The tree node where the call was made + * @param start The position of the line of the tree node where the call begins + * @param end The position of the line of the tree node where the call end + * @return Zero on success, -1 on error + */ +int mds_kbdc_call_stack_push(const mds_kbdc_tree_t* restrict tree, size_t start, size_t end); + +/** + * Undo the lasted not-undone call to `mds_kbdc_call_stack_push` + * + * This function is guaranteed not to modify `errno` + */ +void mds_kbdc_call_stack_pop(void); + #endif -- cgit v1.2.3-70-g09d2