aboutsummaryrefslogtreecommitdiffstats
path: root/src/mds-kbdc/call-stack.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-12-13 15:27:31 +0100
committerMattias Andrée <maandree@operamail.com>2014-12-13 15:29:04 +0100
commit91cda376252c6a754d7701e1732049748afd99d8 (patch)
tree950251ca02c668ca74147a362fac195eeb5839e4 /src/mds-kbdc/call-stack.h
parentm (diff)
downloadmds-91cda376252c6a754d7701e1732049748afd99d8.tar.gz
mds-91cda376252c6a754d7701e1732049748afd99d8.tar.bz2
mds-91cda376252c6a754d7701e1732049748afd99d8.tar.xz
mds-kbdc: call-stack: push and pop functions
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/mds-kbdc/call-stack.h17
1 files changed, 17 insertions, 0 deletions
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