Print this page
Address Robert's feedback


  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 *);
  45 str_pair_t *name_at(name_t *, size_t);
  46 str_pair_t *name_top(name_t *);
  47 str_pair_t *name_pop(name_t *, str_pair_t *);
  48 
  49 typedef struct sub_s {
  50         name_t          *sub_items;
  51         sysdem_ops_t    *sub_ops;
  52         size_t          sub_len;
  53         size_t          sub_size;
  54 } sub_t;
  55 
  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 *);
  64 
  65 typedef struct templ_s {
  66         sub_t           *tpl_items;
  67         sysdem_ops_t    *tpl_ops;


  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 *);
  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 *);
  48 
  49 typedef struct sub_s {
  50         name_t          *sub_items;
  51         sysdem_ops_t    *sub_ops;
  52         size_t          sub_len;
  53         size_t          sub_size;
  54 } sub_t;
  55 
  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 *);
  64 
  65 typedef struct templ_s {
  66         sub_t           *tpl_items;
  67         sysdem_ops_t    *tpl_ops;