I keep reading these as "unused parts of dlg" and wondering
why he's not remoing them himself..

ok beck@


On Sat, Jun 25, 2022 at 08:48:48PM +1000, Jonathan Gray wrote:
> Index: lib/dns/gen.c
> ===================================================================
> RCS file: /cvs/src/usr.bin/dig/lib/dns/gen.c,v
> retrieving revision 1.15
> diff -u -p -r1.15 gen.c
> --- lib/dns/gen.c     14 Sep 2020 08:40:43 -0000      1.15
> +++ lib/dns/gen.c     25 Jun 2022 10:43:28 -0000
> @@ -83,7 +83,6 @@ static const char copyright[] =
>  #define TYPECLASSLEN 20              /* DNS mnemonic size. Must be less than 
> 100. */
>  #define TYPECLASSBUF (TYPECLASSLEN + 1)
>  #define TYPECLASSFMT "%" STR(TYPECLASSLEN) "[-0-9a-z]_%d"
> -#define ATTRIBUTESIZE 256
>  #define DIRNAMESIZE 256
>  
>  static struct cc {
> Index: lib/dns/rdata.c
> ===================================================================
> RCS file: /cvs/src/usr.bin/dig/lib/dns/rdata.c,v
> retrieving revision 1.33
> diff -u -p -r1.33 rdata.c
> --- lib/dns/rdata.c   2 Apr 2021 06:37:40 -0000       1.33
> +++ lib/dns/rdata.c   25 Jun 2022 10:43:28 -0000
> @@ -20,7 +20,6 @@
>  
>  #include <arpa/inet.h>
>  
> -#include <ctype.h>
>  #include <stdlib.h>
>  #include <string.h>
>  
> Index: lib/dns/rdatalist.c
> ===================================================================
> RCS file: /cvs/src/usr.bin/dig/lib/dns/rdatalist.c,v
> retrieving revision 1.3
> diff -u -p -r1.3 rdatalist.c
> --- lib/dns/rdatalist.c       25 Jun 2022 10:20:29 -0000      1.3
> +++ lib/dns/rdatalist.c       25 Jun 2022 10:43:28 -0000
> @@ -22,7 +22,6 @@
>  
>  #include <isc/util.h>
>  
> -#include <dns/name.h>
>  #include <dns/rdata.h>
>  #include <dns/rdatalist.h>
>  #include <dns/rdataset.h>
> Index: lib/dns/rdataset.c
> ===================================================================
> RCS file: /cvs/src/usr.bin/dig/lib/dns/rdataset.c,v
> retrieving revision 1.11
> diff -u -p -r1.11 rdataset.c
> --- lib/dns/rdataset.c        25 Jun 2022 10:20:29 -0000      1.11
> +++ lib/dns/rdataset.c        25 Jun 2022 10:43:28 -0000
> @@ -159,19 +159,6 @@ dns_rdataset_makequestion(dns_rdataset_t
>       rdataset->attributes |= DNS_RDATASETATTR_QUESTION;
>  }
>  
> -void
> -dns_rdataset_clone(dns_rdataset_t *source, dns_rdataset_t *target) {
> -
> -     /*
> -      * Make 'target' refer to the same rdataset as 'source'.
> -      */
> -
> -     REQUIRE(source->methods != NULL);
> -     REQUIRE(target->methods == NULL);
> -
> -     (source->methods->clone)(source, target);
> -}
> -
>  isc_result_t
>  dns_rdataset_first(dns_rdataset_t *rdataset) {
>  
> Index: lib/dns/include/dns/rdataset.h
> ===================================================================
> RCS file: /cvs/src/usr.bin/dig/lib/dns/include/dns/rdataset.h,v
> retrieving revision 1.12
> diff -u -p -r1.12 rdataset.h
> --- lib/dns/include/dns/rdataset.h    25 Jun 2022 10:20:30 -0000      1.12
> +++ lib/dns/include/dns/rdataset.h    25 Jun 2022 10:43:28 -0000
> @@ -181,20 +181,6 @@ dns_rdataset_makequestion(dns_rdataset_t
>   *\li        'rdataset' is a valid, associated, question rdataset.
>   */
>  
> -void
> -dns_rdataset_clone(dns_rdataset_t *source, dns_rdataset_t *target);
> -/*%<
> - * Make 'target' refer to the same rdataset as 'source'.
> - *
> - * Requires:
> - *\li        'source' is a valid, associated rdataset.
> - *
> - *\li        'target' is a valid, dissociated rdataset.
> - *
> - * Ensures:
> - *\li        'target' references the same rdataset as 'source'.
> - */
> -
>  isc_result_t
>  dns_rdataset_first(dns_rdataset_t *rdataset);
>  /*%<
> Index: lib/isc/lex.c
> ===================================================================
> RCS file: /cvs/src/usr.bin/dig/lib/isc/lex.c,v
> retrieving revision 1.14
> diff -u -p -r1.14 lex.c
> --- lib/isc/lex.c     17 Jan 2022 18:19:51 -0000      1.14
> +++ lib/isc/lex.c     25 Jun 2022 10:43:28 -0000
> @@ -18,7 +18,6 @@
>  
>  /*! \file */
>  
> -#include <ctype.h>
>  #include <stdlib.h>
>  
>  #include <isc/buffer.h>
> @@ -238,8 +237,6 @@ typedef enum {
>       lexstate_eatline,
>       lexstate_qstring
>  } lexstate;
> -
> -#define IWSEOL (ISC_LEXOPT_INITIALWS | ISC_LEXOPT_EOL)
>  
>  static void
>  pushback(inputsource *source, int c) {
> Index: lib/isccfg/parser.c
> ===================================================================
> RCS file: /cvs/src/usr.bin/dig/lib/isccfg/parser.c,v
> retrieving revision 1.8
> diff -u -p -r1.8 parser.c
> --- lib/isccfg/parser.c       14 Sep 2020 08:40:44 -0000      1.8
> +++ lib/isccfg/parser.c       25 Jun 2022 10:43:28 -0000
> @@ -590,49 +590,6 @@ cfg_parse_listelt(cfg_parser_t *pctx, co
>       return (result);
>  }
>  
> -int
> -cfg_obj_islist(const cfg_obj_t *obj) {
> -     REQUIRE(obj != NULL);
> -     return (obj->type->rep == &cfg_rep_list);
> -}
> -
> -const cfg_listelt_t *
> -cfg_list_first(const cfg_obj_t *obj) {
> -     REQUIRE(obj == NULL || obj->type->rep == &cfg_rep_list);
> -     if (obj == NULL)
> -             return (NULL);
> -     return (ISC_LIST_HEAD(obj->value.list));
> -}
> -
> -const cfg_listelt_t *
> -cfg_list_next(const cfg_listelt_t *elt) {
> -     REQUIRE(elt != NULL);
> -     return (ISC_LIST_NEXT(elt, link));
> -}
> -
> -/*
> - * Return the length of a list object.  If obj is NULL or is not
> - * a list, return 0.
> - */
> -unsigned int
> -cfg_list_length(const cfg_obj_t *obj, int recurse) {
> -     const cfg_listelt_t *elt;
> -     unsigned int count = 0;
> -
> -     if (obj == NULL || !cfg_obj_islist(obj))
> -             return (0U);
> -     for (elt = cfg_list_first(obj);
> -          elt != NULL;
> -          elt = cfg_list_next(elt)) {
> -             if (recurse && cfg_obj_islist(elt->obj)) {
> -                     count += cfg_list_length(elt->obj, recurse);
> -             } else {
> -                     count++;
> -             }
> -     }
> -     return (count);
> -}
> -
>  /*
>   * Maps.
>   */
> Index: lib/isccfg/include/isccfg/cfg.h
> ===================================================================
> RCS file: /cvs/src/usr.bin/dig/lib/isccfg/include/isccfg/cfg.h,v
> retrieving revision 1.6
> diff -u -p -r1.6 cfg.h
> --- lib/isccfg/include/isccfg/cfg.h   14 Sep 2020 08:40:44 -0000      1.6
> +++ lib/isccfg/include/isccfg/cfg.h   25 Jun 2022 10:43:28 -0000
> @@ -157,74 +157,7 @@ cfg_obj_asstring(const cfg_obj_t *obj);
>   * \li     A pointer to a null terminated string.
>   */
>  
> -int
> -cfg_obj_islist(const cfg_obj_t *obj);
> -/*%<
> - * Return true iff 'obj' is of list type.
> - */
> -
> -const cfg_listelt_t *
> -cfg_list_first(const cfg_obj_t *obj);
> -/*%<
> - * Returns the first list element in a configuration object of a list type.
> - *
> - * Requires:
> - * \li     'obj' points to a valid configuration object of a list type or 
> NULL.
> - *
> - * Returns:
> - *   \li   A pointer to a cfg_listelt_t representing the first list element,
> - *   or NULL if the list is empty or nonexistent.
> - */
> -
> -const cfg_listelt_t *
> -cfg_list_next(const cfg_listelt_t *elt);
> -/*%<
> - * Returns the next element of a list of configuration objects.
> - *
> - * Requires:
> - * \li     'elt' points to cfg_listelt_t obtained from cfg_list_first() or
> - *   a previous call to cfg_list_next().
> - *
> - * Returns:
> - * \li     A pointer to a cfg_listelt_t representing the next element,
> - *   or NULL if there are no more elements.
> - */
> -
> -unsigned int
> -cfg_list_length(const cfg_obj_t *obj, int recurse);
> -/*%<
> - * Returns the length of a list of configure objects.  If obj is
> - * not a list, returns 0.  If recurse is true, add in the length of
> - * all contained lists.
> - */
> -
> -void
> -cfg_print(const cfg_obj_t *obj,
> -       void (*f)(void *closure, const char *text, int textlen),
> -       void *closure);
> -void
> -cfg_printx(const cfg_obj_t *obj, unsigned int flags,
> -        void (*f)(void *closure, const char *text, int textlen),
> -        void *closure);
> -
>  #define CFG_PRINTER_XKEY        0x1     /* '?' out shared keys. */
> -
> -/*%<
> - * Print the configuration object 'obj' by repeatedly calling the
> - * function 'f', passing 'closure' and a region of text starting
> - * at 'text' and comprising 'textlen' characters.
> - *
> - * If CFG_PRINTER_XKEY the contents of shared keys will be obscured
> - * by replacing them with question marks ('?')
> - */
> -
> -void
> -cfg_print_grammar(const cfg_type_t *type,
> -       void (*f)(void *closure, const char *text, int textlen),
> -       void *closure);
> -/*%<
> - * Print a summary of the grammar of the configuration type 'type'.
> - */
>  
>  void
>  cfg_obj_destroy(cfg_parser_t *pctx, cfg_obj_t **obj);
> 

Reply via email to