Print this page
Rich's feedback


   4  * You may only use this file in accordance with the terms of version
   5  * 1.0 of the CDDL.
   6  *
   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.
  10  */
  11 
  12 /*
  13  * Copyright 2017 Jason King
  14  */
  15 
  16 #ifndef _CPP_H
  17 #define _CPP_H
  18 
  19 #ifdef __cplusplus
  20 extern "C" {
  21 #endif
  22 
  23 #include <stdio.h>
  24 #include "sysdemangle.h"
  25 #include "str.h"
  26 
  27 typedef struct name_s {
  28         str_pair_t      *nm_items;
  29         sysdem_ops_t    *nm_ops;
  30         size_t          nm_len;
  31         size_t          nm_size;
  32 } name_t;
  33 
  34 extern size_t cpp_name_max_depth;
  35 
  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 *);




   4  * You may only use this file in accordance with the terms of version
   5  * 1.0 of the CDDL.
   6  *
   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.
  10  */
  11 
  12 /*
  13  * Copyright 2017 Jason King
  14  */
  15 
  16 #ifndef _CPP_H
  17 #define _CPP_H
  18 
  19 #ifdef __cplusplus
  20 extern "C" {
  21 #endif
  22 
  23 #include <stdio.h>
  24 #include "demangle-sys.h"
  25 #include "str.h"
  26 
  27 typedef struct name_s {
  28         str_pair_t      *nm_items;
  29         sysdem_ops_t    *nm_ops;
  30         size_t          nm_len;
  31         size_t          nm_size;
  32 } name_t;
  33 
  34 extern size_t cpp_name_max_depth;
  35 
  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 *);