2 * This file and its contents are supplied under the terms of the
3 * Common Development and Distribution License ("CDDL"), version 1.0.
4 * You may only use this file in accordance with the terms of version
7 * A full copy of the text of the CDDL should have accompanied this
8 * source. A copy of the CDDL is also available via the Internet at
9 * http://www.illumos.org/license/CDDL.
13 * Copyright 2017 Jason King
24 #include <demangle-sys.h>
27 typedef struct name_s
{
34 extern size_t cpp_name_max_depth
;
36 void name_clear(name_t
*);
37 void name_init(name_t
*, sysdem_ops_t
*);
38 void name_fini(name_t
*);
39 size_t name_len(const name_t
*);
40 boolean_t
name_empty(const name_t
*);
41 boolean_t
name_add(name_t
*, const char *, size_t, const char *, size_t);
42 boolean_t
name_add_str(name_t
*, str_t
*, str_t
*);
43 boolean_t
name_join(name_t
*, size_t, const char *);
44 boolean_t
name_fmt(name_t
*, const char *, const char *);
45 str_pair_t
*name_at(const name_t
*, size_t);
46 str_pair_t
*name_top(name_t
*);
47 void name_pop(name_t
*, str_pair_t
*);
49 typedef struct sub_s
{
51 sysdem_ops_t
*sub_ops
;
56 void sub_clear(sub_t
*);
57 void sub_init(sub_t
*, sysdem_ops_t
*);
58 void sub_fini(sub_t
*);
59 void sub_pop(sub_t
*);
60 boolean_t
sub_save(sub_t
*, const name_t
*, size_t);
61 boolean_t
sub_substitute(const sub_t
*, size_t, name_t
*);
62 boolean_t
sub_empty(const sub_t
*);
63 size_t sub_len(const sub_t
*);
65 typedef struct templ_s
{
67 sysdem_ops_t
*tpl_ops
;
72 void templ_init(templ_t
*, sysdem_ops_t
*);
73 void templ_fini(templ_t
*);
74 boolean_t
templ_empty(const templ_t
*);
75 size_t templ_top_len(const templ_t
*);
76 boolean_t
templ_sub(const templ_t
*, size_t, name_t
*);
77 boolean_t
templ_save(const name_t
*, size_t, templ_t
*);
79 boolean_t
templ_push(templ_t
*);
80 void templ_pop(templ_t
*);
81 sub_t
*templ_top(templ_t
*);