Print this page
Rich's feedback
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/libsysdemangle/common/cxx.h
+++ new/usr/src/lib/libdemangle/common/cxx.h
1 1 /*
2 2 * This file and its contents are supplied under the terms of the
3 3 * Common Development and Distribution License ("CDDL"), version 1.0.
4 4 * You may only use this file in accordance with the terms of version
5 5 * 1.0 of the CDDL.
6 6 *
7 7 * A full copy of the text of the CDDL should have accompanied this
8 8 * source. A copy of the CDDL is also available via the Internet at
9 9 * http://www.illumos.org/license/CDDL.
10 10 */
11 11
12 12 /*
13 13 * Copyright 2017 Jason King
↓ open down ↓ |
13 lines elided |
↑ open up ↑ |
14 14 */
15 15
16 16 #ifndef _CPP_H
17 17 #define _CPP_H
18 18
19 19 #ifdef __cplusplus
20 20 extern "C" {
21 21 #endif
22 22
23 23 #include <stdio.h>
24 -#include "sysdemangle.h"
24 +#include "demangle-sys.h"
25 25 #include "str.h"
26 26
27 27 typedef struct name_s {
28 28 str_pair_t *nm_items;
29 29 sysdem_ops_t *nm_ops;
30 30 size_t nm_len;
31 31 size_t nm_size;
32 32 } name_t;
33 33
34 34 extern size_t cpp_name_max_depth;
35 35
36 36 void name_clear(name_t *);
37 37 void name_init(name_t *, sysdem_ops_t *);
38 38 void name_fini(name_t *);
39 39 size_t name_len(const name_t *);
40 40 boolean_t name_empty(const name_t *);
41 41 boolean_t name_add(name_t *, const char *, size_t, const char *, size_t);
42 42 boolean_t name_add_str(name_t *, str_t *, str_t *);
43 43 boolean_t name_join(name_t *, size_t, const char *);
44 44 boolean_t name_fmt(name_t *, const char *, const char *);
45 45 str_pair_t *name_at(const name_t *, size_t);
46 46 str_pair_t *name_top(name_t *);
47 47 void name_pop(name_t *, str_pair_t *);
48 48
49 49 typedef struct sub_s {
50 50 name_t *sub_items;
51 51 sysdem_ops_t *sub_ops;
52 52 size_t sub_len;
53 53 size_t sub_size;
54 54 } sub_t;
55 55
56 56 void sub_clear(sub_t *);
57 57 void sub_init(sub_t *, sysdem_ops_t *);
58 58 void sub_fini(sub_t *);
59 59 void sub_pop(sub_t *);
60 60 boolean_t sub_save(sub_t *, const name_t *, size_t);
61 61 boolean_t sub_substitute(const sub_t *, size_t, name_t *);
62 62 boolean_t sub_empty(const sub_t *);
63 63 size_t sub_len(const sub_t *);
64 64
65 65 typedef struct templ_s {
66 66 sub_t *tpl_items;
67 67 sysdem_ops_t *tpl_ops;
68 68 size_t tpl_len;
69 69 size_t tpl_size;
70 70 } templ_t;
71 71
72 72 void templ_init(templ_t *, sysdem_ops_t *);
73 73 void templ_fini(templ_t *);
74 74 boolean_t templ_empty(const templ_t *);
75 75 size_t templ_top_len(const templ_t *);
76 76 boolean_t templ_sub(const templ_t *, size_t, name_t *);
77 77 boolean_t templ_save(const name_t *, size_t, templ_t *);
78 78
79 79 boolean_t templ_push(templ_t *);
80 80 void templ_pop(templ_t *);
81 81 sub_t *templ_top(templ_t *);
82 82
83 83 #ifdef __cplusplus
84 84 }
85 85 #endif
86 86
87 87 #endif /* _CPP_H */
↓ open down ↓ |
53 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX