diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2018-10-15 13:44:56 +0000 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2018-10-15 13:44:56 +0000 |
commit | 16d3daed247b1695bbf21679b70086c38d044eb7 (patch) | |
tree | b6f459dfe48396dbd24f046a2f746892a3d8e630 /usr/src/lib/libdemangle/common/str.h | |
parent | 8fe8a39ea9f7811d9c1e2e48a46932561906883f (diff) | |
parent | a6d101109bfb442cf0db6d8ebb5fb7c32cb16d7e (diff) | |
download | illumos-joyent-16d3daed247b1695bbf21679b70086c38d044eb7.tar.gz |
[illumos-gate merge]
commit a6d101109bfb442cf0db6d8ebb5fb7c32cb16d7e
9472 Add smbutil discon command
commit 4226f635096bf9d814aa9fb335518c4855bbe3a3
6375 Add native name demangling support
commit 83b4671e6262c5aa6b4f9fb5a384b1946dfc2e7f
9664 loader: need UEFI32 support
commit e1bf37b1abeb6653a6e35e2bd6924131cced1efe
9884 cw(1) should use -fpic rather than -Kpic
Conflicts:
usr/src/test/util-tests/tests/Makefile
usr/src/cmd/mdb/common/mdb/mdb_demangle.c
Diffstat (limited to 'usr/src/lib/libdemangle/common/str.h')
-rw-r--r-- | usr/src/lib/libdemangle/common/str.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/usr/src/lib/libdemangle/common/str.h b/usr/src/lib/libdemangle/common/str.h new file mode 100644 index 0000000000..1d6ee9294c --- /dev/null +++ b/usr/src/lib/libdemangle/common/str.h @@ -0,0 +1,63 @@ +/* + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + */ + +/* + * Copyright 2017 Jason King + */ + +#ifndef _STR_H +#define _STR_H + +#include <sys/types.h> +#include "demangle-sys.h" +#include "demangle_int.h" + +#ifdef __cplusplus +extern "C" { +#endif + +struct sysdem_alloc_s; + +typedef struct str_s { + char *str_s; + sysdem_ops_t *str_ops; + size_t str_len; + size_t str_size; +} str_t; + +typedef struct str_pair_s { + str_t strp_l; + str_t strp_r; +} str_pair_t; + +void str_init(str_t *restrict, sysdem_ops_t *); +void str_fini(str_t *); +size_t str_length(const str_t *); +boolean_t str_copy(const str_t *, str_t *); +void str_set(str_t *, const char *, size_t); +boolean_t str_append(str_t *, const char *, size_t); +boolean_t str_append_str(str_t *, const str_t *); +boolean_t str_append_c(str_t *, char); +boolean_t str_insert(str_t *, size_t, const char *, size_t); +boolean_t str_insert_str(str_t *, size_t, const str_t *); +boolean_t str_erase(str_t *, size_t, size_t); + +str_pair_t *str_pair_init(str_pair_t *, sysdem_ops_t *); +void str_pair_fini(str_pair_t *); +boolean_t str_pair_merge(str_pair_t *); +boolean_t str_pair_copy(const str_pair_t *, str_pair_t *); +size_t str_pair_len(const str_pair_t *); + +#ifdef __cplusplus +} +#endif + +#endif /* _STR_H */ |