Revision: 65156
          http://sourceforge.net/p/brlcad/code/65156
Author:   starseeker
Date:     2015-06-02 20:08:48 +0000 (Tue, 02 Jun 2015)
Log Message:
-----------
Remove dynamic opt table API.

Modified Paths:
--------------
    brlcad/trunk/include/bu/opt.h
    brlcad/trunk/src/conv/gcv/gcv.cpp
    brlcad/trunk/src/libbu/opt.c
    brlcad/trunk/src/util/dsp_add_opt.c

Modified: brlcad/trunk/include/bu/opt.h
===================================================================
--- brlcad/trunk/include/bu/opt.h       2015-06-02 17:42:52 UTC (rev 65155)
+++ brlcad/trunk/include/bu/opt.h       2015-06-02 20:08:48 UTC (rev 65156)
@@ -36,28 +36,10 @@
 /** @{ */
 /** @file bu/opt.h */
 
-/* Pick an arbitrary maximum pending a good reason to pick some specific value 
*/
-#define BU_OPT_MAX_ARGS 2000
-
 /* Make a human-readable define for using bu_opt_find to retrieve argv entries
  * that were not associated with options */
 #define BU_NON_OPTS -1
 
-/** Output format options for bu_opt documentation generation */
-typedef enum {
-    BU_OPT_ASCII,
-    BU_OPT_DOCBOOK, /* TODO */
-    BU_OPT_HTML,    /* TODO */
-    BU_OPT_LATEX,   /* TODO */
-    BU_OPT_MARKDOWN /* TODO */
-} bu_opt_format_t;
-
-typedef enum {
-    BU_OPT_SHORT,  /* TODO */
-    BU_OPT_FULL    /* TODO */
-} bu_opt_desc_t;
-
-
 /* Forward declaration for bu_opt_desc and bu_opt_arg_process_t */
 struct bu_opt_data;
 
@@ -90,33 +72,14 @@
 };
 #define BU_OPT_DESC_NULL {-1, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL}
 
-/**
- * Initialize a bu_opt_dtbl_t.  If ds is not NULL, populate the table
- * with the bu_opt_desc structs in the ds array. */
-BU_EXPORT extern void bu_opt_desc_init(bu_opt_dtbl_t **dtbl, struct 
bu_opt_desc *ds);
 
-/**
- * Add an option description to a bu_opt_desc ptbl */
-BU_EXPORT extern void bu_opt_desc_add(bu_opt_dtbl_t *dtbl, int ind,
-       size_t min, size_t max, const char *shortopt,
-       const char *longopt, bu_opt_arg_process_t arg_process,
-       const char *shortopt_doc, const char *longopt_doc, const char 
*help_str);
-/**
- * Remove option descriptions with index matching key from a bu_opt_desc ptbl 
*/
-BU_EXPORT extern void bu_opt_desc_del(bu_opt_dtbl_t *dtbl, int key);
+/** Output format options for bu_opt documentation generation */
+typedef enum {
+    BU_OPT_ASCII,
+    BU_OPT_DOCBOOK /* TODO */
+} bu_opt_format_t;
 
 /**
- * Remove option descriptions with either a shortopt or a longopt matching name
- * from a bu_opt_desc ptbl */
-BU_EXPORT extern void bu_opt_desc_del_name(bu_opt_dtbl_t *dtbl, const char 
*name);
-
-/**
- *  Free a bu_opt_dtbl_t.
- */
-BU_EXPORT extern void bu_opt_desc_free(bu_opt_dtbl_t *tbl);
-
-
-/**
  * Construct a textual description of the options defined by
  * the array.
  *
@@ -132,18 +95,15 @@
 
 /* TODO - support actually using the struct... */
 struct bu_opt_desc_opts {
-    bu_opt_desc_t desc_type;
-    bu_opt_format_t format_type;
+    bu_opt_format_t format;
     int offset;
     int option_columns;
     int description_columns;
 };
 
 BU_EXPORT extern const char *bu_opt_describe(struct bu_opt_desc *ds, struct 
bu_opt_desc_opts *settings);
-BU_EXPORT extern const char *bu_opt_describe_dtbl(bu_opt_dtbl_t *dtbl, struct 
bu_opt_desc_opts *settings);
 
 
-
 /**
  * Parsed option data container
  */
@@ -155,6 +115,7 @@
     void *user_data;  /* place for arg_process to stash data */
 };
 #define BU_OPT_DATA_NULL {NULL, 0, NULL, NULL, NULL}
+
 /**
  * Free a table of bu_opt_data results */
 BU_EXPORT extern void bu_opt_data_free(bu_opt_data_t *data);
@@ -177,42 +138,15 @@
 BU_EXPORT extern const char *bu_opt_data_arg(struct bu_opt_data *d, size_t 
ind);
 
 /**
- * Find and return a specific option from a bu_opt_data_t of options using an 
enum
- * integer as the lookup key.  Will only return an option if its valid entry
- * is set to 1.  A key value of -1 retrieves the bu_opt_data struct with the
- * unknown entries stored in its args table.
- */
-BU_EXPORT extern struct bu_opt_data *bu_opt_find(int key, bu_opt_data_t 
*results);
-
-/**
  * Find and return a specific option from a bu_opt_data_t of options using an 
option
  * string as the lookup key.  Will only return an option if its valid entry
  * is set to 1. A NULL value passed in for name retrieves the bu_opt_data 
struct with the
  * unknown entries stored in its args table.
  */
-BU_EXPORT extern struct bu_opt_data *bu_opt_find_name(const char *name, 
bu_opt_data_t *results);
+BU_EXPORT extern struct bu_opt_data *bu_opt_find(const char *name, 
bu_opt_data_t *results);
 
-/**
- * TODO
- *
- * If an option has a message string associated with it, this function will
- * get it.  This works for both valid and invalid opts, to allow for error
- * message retrieval.  If multiple instances of a key are present, the msg
- * from the last instance is returned. */
-BU_EXPORT extern const char *bu_opt_msg(int key, bu_opt_data_t *results);
 
-/**
- * TODO
- *
- * If an option has a message string associated with it, this function will
- * get it.  This works for both valid and invalid opts, to allow for error
- * message retrieval.  If multiple instances of a name are present, the msg
- * from the last instance is returned. */
-BU_EXPORT extern const char *bu_opt_msg_name(const char *name, bu_opt_data_t 
*results);
 
-
-
-
 /**
  * Parse argv array using option descs.
  *
@@ -246,37 +180,7 @@
  * breaking str down into a proper argv array. */
 BU_EXPORT extern int bu_opt_parse_str(bu_opt_data_t **results, struct bu_vls 
*msgs, const char *str, struct bu_opt_desc *ds);
 
-
 /**
- * For situations requiring a dynamic bu_opt_desc generation mechanism,
- * the procedure is slightly different
- *
- *  If we need dynamic definitions, need to take a slightly different approach
- *
- *  enum d1_opt_ind {D1_HELP, D1_VERBOSITY, D_MAX};
- *  struct bu_opt_desc d1[4] = {
- *      {D1_HELP, 0, 0, "h", "help", NULL, help_str},
- *      {D1_VERBOSITY, 0, 1, "v", "verbosity", &(d1_verbosity), "Set 
verbosity"},
- *      BU_OPT_DESC_NULL
- *  };
-
- *  bu_opt_dtbl_t *dtbl;
- *  bu_opt_data_t *results;
-
- *  bu_opt_desc_init(&dtbl, (struct bu_opt_desc *)&d1);
- *  bu_opt_desc_add(D1_HELP, 0, 0, "?", "",        NULL,      "-?", "",        
"");
- *  bu_opt_desc_add(D_MAX + 1,   0, 0, "d", "dummy",   &(dtbl_d), "-d", 
"--dummy", "Dummy opt");
- *  bu_opt_parse_dtbl(&results, NULL, argc, argv, dtbl);
- */
-BU_EXPORT extern int bu_opt_parse_dtbl(bu_opt_data_t **results, struct bu_vls 
*msgs, int ac, const char **argv, bu_opt_dtbl_t *dtbl);
-
-/**
- * Option parse an argv array defined as a space separated string.  This
- * is a convenience function that calls bu_opt_parse_dtbl and also handles
- * breaking str down into a proper argv array. */
-BU_EXPORT extern int bu_opt_parse_dtbl_str(bu_opt_data_t **results, struct 
bu_vls *msgs, const char *str, bu_opt_dtbl_t *dtbl);
-
-/**
  * In situations where multiple options are present, the general rule is that
  * the last one in the list wins but there are situations where a program may
  * want to (say) accumulate multiple values past with multiple instances of the

Modified: brlcad/trunk/src/conv/gcv/gcv.cpp
===================================================================
--- brlcad/trunk/src/conv/gcv/gcv.cpp   2015-06-02 17:42:52 UTC (rev 65155)
+++ brlcad/trunk/src/conv/gcv/gcv.cpp   2015-06-02 20:08:48 UTC (rev 65156)
@@ -47,7 +47,7 @@
     (void)bu_opt_parse_str(&results, NULL, args, fg4_opt_desc);
     bu_opt_compact(results);
     bu_opt_validate(results);
-    d = bu_opt_find(FG4_WARN_DEFAULT_NAMES, results);
+    d = bu_opt_find("w", results);
     if (d) {
        bu_log("FASTGEN 4 opt found: %s\n", d->name);
     }
@@ -73,7 +73,7 @@
     (void)bu_opt_parse_str(&results, NULL, args, stl_opt_desc);
     bu_opt_compact(results);
     bu_opt_validate(results);
-    d = bu_opt_find(STL_UNITS, results);
+    d = bu_opt_find("u", results);
     if (d) {
        bu_log("STL opt found: %s:%s\n", d->name, bu_opt_data_arg(d, 0));
     }
@@ -306,75 +306,34 @@
     struct bu_opt_data *d = NULL;
     struct bu_ptbl *unknown_tbl = NULL;
     bu_opt_data_t *results = NULL;
-    bu_opt_dtbl_t *top_opt_desc = NULL;
 
     ac-=(ac>0); av+=(ac>0); // skip program name argv[0] if present
 
-    bu_opt_desc_init(&top_opt_desc, (struct bu_opt_desc *)&gcv_opt_desc);
-
     if (ac == 0) {
-       const char *help = bu_opt_describe_dtbl(top_opt_desc, NULL);
+       const char *help = bu_opt_describe(gcv_opt_desc, NULL);
        bu_log("%s\n", help);
        if (help) bu_free((char *)help, "help str");
        // TODO - print some help
        goto cleanup;
     }
 
-    /*
     (void)bu_opt_parse(&results, NULL, ac, (const char **)av, gcv_opt_desc);
-    */
-    (void)bu_opt_parse_dtbl(&results, NULL, ac, (const char **)av, 
top_opt_desc);
     bu_opt_compact(results);
 
     /* First, see if help was supplied */
-    d = bu_opt_find(GCV_HELP, results);
+    d = bu_opt_find("h", results);
     if (d) {
        const char *help_fmt = bu_opt_data_arg(d, 0);
        if (help_fmt) {
            // TODO - generate some help based on format
        } else {
-           // TODO - generate some generic gcv help
            { /* Test static help print  */
-               bu_log("Static help printing:\n");
+               bu_log("Options:\n");
                const char *help = bu_opt_describe(gcv_opt_desc, NULL);
                bu_log("%s\n", help);
                if (help) bu_free((char *)help, "help str");
            }
 
-           { /* Test help print before dynamic opts */
-               bu_log("Dynamic help printing:\n");
-               const char *help = bu_opt_describe_dtbl(top_opt_desc, NULL);
-               bu_log("%s\n", help);
-               if (help) bu_free((char *)help, "help str");
-           }
-
-           /* Simulate a plug-in adding a new option to the toplevel options */
-
-           bu_opt_desc_add(top_opt_desc, BU_PTBL_LEN(top_opt_desc) + 1, 0, 1, 
"", "decimate", NULL, "", "--decimate [algorithm]",
-                   "Decimate output triangles.  If an algorithm is supplied 
use it, otherwise use FOO");
-
-           int parallel_key = BU_PTBL_LEN(top_opt_desc) + 1;
-           bu_opt_desc_add(top_opt_desc, parallel_key, 0, 0, "p", "parallel", 
NULL, "-p", "--parallel", "Enable parallel processing");
-           bu_opt_desc_add(top_opt_desc, parallel_key, 0, 0, "P", "", NULL, 
"-P", "", "");
-
-           { /* Test help print with dynamic opts added */
-               bu_log("Dynamic help printing with added opts:\n");
-               const char *help = bu_opt_describe_dtbl(top_opt_desc, NULL);
-               bu_log("%s\n", help);
-               if (help) bu_free((char *)help, "help str");
-           }
-
-           bu_opt_desc_del(top_opt_desc, IN_OPTS);
-           bu_opt_desc_del(top_opt_desc, OUT_OPTS);
-           bu_opt_desc_del_name(top_opt_desc, "P");
-
-           { /* Test help print with dynamic opts removed */
-               bu_log("Dynamic help printing with removed opts:\n");
-               const char *help = bu_opt_describe_dtbl(top_opt_desc, NULL);
-               bu_log("%s\n", help);
-               if (help) bu_free((char *)help, "help str");
-           }
-
 #if 0
 
            // TODO - figure out how to get this info from each plugin to 
construct this table
@@ -402,14 +361,14 @@
 
 
     /* Did we get explicit options for an input and/or output file? */
-    d = bu_opt_find(IN_FILE, results);
+    d = bu_opt_find("i", results);
     if (d) bu_vls_sprintf(&in_path_raw, "%s", bu_opt_data_arg(d, 0));
-    d = bu_opt_find(OUT_FILE, results);
+    d = bu_opt_find("o", results);
     if (d) bu_vls_sprintf(&out_path_raw, "%s", bu_opt_data_arg(d, 0));
 
     /* If not specified explicitly with -i or -o, the input and output paths 
must always
      * be the last two arguments supplied */
-    d = bu_opt_find(BU_NON_OPTS, results);
+    d = bu_opt_find(NULL, results);
     if (d) {
        unknown_tbl = d->args;
        if (unknown_tbl && BU_PTBL_LEN(unknown_tbl) > 1)
@@ -431,7 +390,7 @@
     }
 
     /* If we have input and/or output specific options, append them now */
-    d = bu_opt_find(IN_OPTS, results);
+    d = bu_opt_find("I", results);
     if (d) {
        struct bu_vls o_tmp = BU_VLS_INIT_ZERO;
        bu_vls_sprintf(&o_tmp, "%s", bu_opt_data_arg(d, 0));
@@ -441,7 +400,7 @@
        if (bu_vls_strlen(&input_opts) > 0) bu_log("Input only opts: %s\n", 
bu_vls_addr(&o_tmp));
        bu_vls_free(&o_tmp);
     }
-    d = bu_opt_find(OUT_OPTS, results);
+    d = bu_opt_find("O", results);
     if (d) {
        struct bu_vls o_tmp = BU_VLS_INIT_ZERO;
        bu_vls_sprintf(&o_tmp, "%s", bu_opt_data_arg(d, 0));
@@ -480,7 +439,7 @@
     /* Find out what input file type we are dealing with */
 
     /* If we have input and/or output specific options, append them now */
-    d = bu_opt_find(IN_FORMAT, results);
+    d = bu_opt_find("input-format", results);
     if (d) {
        in_fmt = bu_opt_data_arg(d, 0);
     } else {
@@ -496,7 +455,7 @@
     in_fmt = NULL;
 
     /* Identify output file type */
-    d = bu_opt_find(OUT_FORMAT, results);
+    d = bu_opt_find("output-format", results);
     if (d) out_fmt = bu_opt_data_arg(d, 0);
     fmt = parse_model_string(&out_format, &log, out_fmt, 
bu_vls_addr(&out_path_raw));
     out_type = (fmt < 0) ? MIME_MODEL_UNKNOWN : (mime_model_t)fmt;
@@ -568,7 +527,6 @@
     bu_vls_free(&input_opts);
     bu_vls_free(&output_opts);
     bu_opt_data_free(results);
-    if (top_opt_desc) bu_opt_desc_free(top_opt_desc);
 
     return ret;
 }

Modified: brlcad/trunk/src/libbu/opt.c
===================================================================
--- brlcad/trunk/src/libbu/opt.c        2015-06-02 17:42:52 UTC (rev 65155)
+++ brlcad/trunk/src/libbu/opt.c        2015-06-02 20:08:48 UTC (rev 65156)
@@ -43,7 +43,7 @@
     (*d)->user_data = NULL;
 }
 
-void
+HIDDEN void
 bu_opt_data_free_entry(struct bu_opt_data *d)
 {
     if (!d) return;
@@ -137,7 +137,7 @@
 }
 
 struct bu_opt_data *
-bu_opt_find_name(const char *name, struct bu_ptbl *opts)
+bu_opt_find(const char *name, struct bu_ptbl *opts)
 {
     size_t i;
     if (!opts) return NULL;
@@ -159,174 +159,7 @@
     return NULL;
 }
 
-struct bu_opt_data *
-bu_opt_find(int key, struct bu_ptbl *opts)
-{
-    size_t i;
-    if (!opts) return NULL;
-
-    for (i = 0; i < BU_PTBL_LEN(opts); i++) {
-       struct bu_opt_data *opt = (struct bu_opt_data *)BU_PTBL_GET(opts, i);
-       /* Don't check the unknown opts - they were already marked as not
-        * valid opts per the current descriptions in the parsing pass */
-       if (key == -1 && !opt->name) return opt;
-       if (!opt->name) continue;
-       if (!opt->desc) continue;
-       if (key == opt->desc->index) {
-           /* option culling guarantees us one "winner" if multiple instances
-            * of an option were originally supplied, so if we find a match we
-            * have found what we wanted.  Now, just need to check validity */
-           return (opt->valid) ? opt : NULL;
-       }
-    }
-    return NULL;
-}
-
 HIDDEN void
-bu_opt_desc_init_entry(struct bu_opt_desc *d)
-{
-    if (!d) return;
-    d->index = -1;
-    d->arg_cnt_min = 0;
-    d->arg_cnt_max = 0;
-    d->shortopt = NULL;
-    d->longopt = NULL;
-    d->arg_process = NULL;
-    d->shortopt_doc = NULL;
-    d->longopt_doc = NULL;
-    d->help_string = NULL;
-}
-
-HIDDEN void
-bu_opt_desc_set(struct bu_opt_desc *d, int ind,
-       size_t min, size_t max, const char *shortopt,
-       const char *longopt, bu_opt_arg_process_t arg_process,
-       const char *shortopt_doc, const char *longopt_doc, const char *help_str)
-{
-    if (!d) return;
-    d->index = ind;
-    d->arg_cnt_min = min;
-    d->arg_cnt_max = max;
-    d->shortopt = (shortopt) ? bu_strdup(shortopt) : NULL;
-    d->longopt = (longopt) ? bu_strdup(longopt) : NULL;
-    d->arg_process = arg_process;
-    d->shortopt_doc = (shortopt_doc) ? bu_strdup(shortopt_doc) : NULL;
-    d->longopt_doc = (longopt_doc) ? bu_strdup(longopt_doc) : NULL;
-    d->help_string = (help_str) ? bu_strdup(help_str) : NULL;;
-}
-
-HIDDEN void
-bu_opt_desc_free_entry(struct bu_opt_desc *d)
-{
-    if (!d) return;
-    if (d->shortopt) bu_free((char *)d->shortopt, "shortopt");
-    if (d->longopt) bu_free((char *)d->longopt, "longopt");
-    if (d->shortopt_doc) bu_free((char *)d->shortopt_doc, "shortopt_doc");
-    if (d->longopt_doc) bu_free((char *)d->longopt_doc, "longopt_doc");
-    if (d->help_string) bu_free((char *)d->help_string, "help_string");
-}
-void
-bu_opt_desc_init(bu_opt_dtbl_t **dtbl, struct bu_opt_desc *ds)
-{
-    size_t i;
-    size_t array_cnt = 0;
-    struct bu_opt_desc *cd;
-    struct bu_ptbl *tbl;
-    if (!dtbl) return;
-    BU_GET(tbl, struct bu_ptbl);
-    if (!(!ds || ds[0].index == -1)) {
-       while (ds[array_cnt].index != -1) array_cnt++;
-       bu_ptbl_init(tbl, array_cnt + 1, "new ptbl");
-       for (i = 0; i < array_cnt; i++) {
-           struct bu_opt_desc *d = &(ds[i]);
-           BU_GET(cd, struct bu_opt_desc);
-           bu_opt_desc_init_entry(cd);
-           bu_opt_desc_set(cd, d->index, d->arg_cnt_min, d->arg_cnt_max,
-                   d->shortopt, d->longopt, d->arg_process,
-                   d->shortopt_doc, d->longopt_doc,
-                   d->help_string);
-           bu_ptbl_ins(tbl, (long *)cd);
-       }
-    } else {
-       bu_ptbl_init(tbl, 8, "new ptbl");
-    }
-    BU_GET(cd, struct bu_opt_desc);
-    bu_opt_desc_init_entry(cd);
-    bu_ptbl_ins(tbl, (long *)cd);
-    (*dtbl) = tbl;
-}
-
-void
-bu_opt_desc_add(bu_opt_dtbl_t *tbl, int ind, size_t min, size_t max, const 
char *shortopt,
-       const char *longopt, bu_opt_arg_process_t arg_process,
-       const char *shortopt_doc, const char *longopt_doc, const char *help_str)
-{
-    struct bu_opt_desc *d;
-    long *dn;
-    if (!tbl || (!shortopt && !longopt)) return;
-    dn = BU_PTBL_GET(tbl, BU_PTBL_LEN(tbl) - 1);
-    bu_ptbl_rm(tbl, dn);
-    BU_GET(d, struct bu_opt_desc);
-    bu_opt_desc_init_entry(d);
-    bu_opt_desc_set(d, ind, min, max, shortopt,
-           longopt, arg_process, shortopt_doc,
-           longopt_doc, help_str);
-    bu_ptbl_ins(tbl, (long *)d);
-    bu_ptbl_ins(tbl, dn);
-}
-
-void
-bu_opt_desc_del(bu_opt_dtbl_t *tbl, int key)
-{
-    size_t i = 0;
-    struct bu_ptbl tmp_tbl;
-    if (!tbl || key < 0) return;
-    bu_ptbl_init(&tmp_tbl, 64, "tmp tbl");
-    for (i = 0; i < BU_PTBL_LEN(tbl) - 1; i++) {
-       struct bu_opt_desc *d = (struct bu_opt_desc *)BU_PTBL_GET(tbl, i);
-       if (d->index == key) {
-           bu_ptbl_ins(&tmp_tbl, (long *)d);
-       }
-    }
-    for (i = 0; i < BU_PTBL_LEN(&tmp_tbl); i++) {
-       bu_ptbl_rm(tbl, BU_PTBL_GET(&tmp_tbl, i));
-    }
-    bu_ptbl_free(&tmp_tbl);
-}
-
-void
-bu_opt_desc_del_name(bu_opt_dtbl_t *tbl, const char *name)
-{
-    size_t i = 0;
-    struct bu_ptbl tmp_tbl;
-    if (!tbl || !name) return;
-    bu_ptbl_init(&tmp_tbl, 64, "tmp tbl");
-    for (i = 0; i < BU_PTBL_LEN(tbl) - 1; i++) {
-       struct bu_opt_desc *d = (struct bu_opt_desc *)BU_PTBL_GET(tbl, i);
-       if (BU_STR_EQUAL(d->shortopt, name) || BU_STR_EQUAL(d->longopt, name)) {
-           bu_ptbl_ins(&tmp_tbl, (long *)d);
-       }
-    }
-    for (i = 0; i < BU_PTBL_LEN(&tmp_tbl); i++) {
-       bu_ptbl_rm(tbl, BU_PTBL_GET(&tmp_tbl, i));
-    }
-    bu_ptbl_free(&tmp_tbl);
-}
-
-void
-bu_opt_desc_free(bu_opt_dtbl_t *tbl)
-{
-    size_t i;
-    if (!tbl) return;
-    for (i = 0; i < BU_PTBL_LEN(tbl); i++) {
-       struct bu_opt_desc *opt = (struct bu_opt_desc *)BU_PTBL_GET(tbl, i);
-       bu_opt_desc_free_entry(opt);
-    }
-    bu_ptbl_free(tbl);
-    BU_PUT(tbl, struct bu_ptbl);
-}
-
-HIDDEN void
 wrap_help(struct bu_vls *help, int indent, int offset, int len)
 {
     int i = 0;
@@ -820,41 +653,6 @@
     return ret;
 }
 
-int
-bu_opt_parse_dtbl(struct bu_ptbl **tbl, struct bu_vls *msgs, int ac, const 
char **argv, struct bu_ptbl *dtbl)
-{
-    struct bu_ptbl *results = NULL;
-    if (!tbl || !argv || !dtbl) return 1;
-    results = bu_opt_parse_internal(ac, argv, NULL, dtbl, msgs);
-    if (results) {
-       (*tbl) = results;
-       return 0;
-    } else {
-       return 1;
-    }
-}
-
-int
-bu_opt_parse_dtbl_str(struct bu_ptbl **tbl, struct bu_vls *msgs, const char 
*str, struct bu_ptbl *dtbl)
-{
-    int ret = 0;
-    char *input = NULL;
-    char **argv = NULL;
-    int argc = 0;
-    if (!tbl || !str || !dtbl) return 1;
-    input = bu_strdup(str);
-    argv = (char **)bu_calloc(strlen(input) + 1, sizeof(char *), "argv array");
-    argc = bu_argv_from_string(argv, strlen(input), input);
-
-    ret = bu_opt_parse_dtbl(tbl, msgs, argc, (const char **)argv, dtbl);
-
-    bu_free(input, "free str copy");
-    bu_free(argv, "free argv memory");
-    return ret;
-}
-
-
-
 /*
  * Local Variables:
  * mode: C

Modified: brlcad/trunk/src/util/dsp_add_opt.c
===================================================================
--- brlcad/trunk/src/util/dsp_add_opt.c 2015-06-02 17:42:52 UTC (rev 65155)
+++ brlcad/trunk/src/util/dsp_add_opt.c 2015-06-02 20:08:48 UTC (rev 65156)
@@ -212,7 +212,7 @@
     }
 
     results = parse_args(ac, av);
-    non_opts = bu_opt_find(BU_NON_OPTS, results);
+    non_opts = bu_opt_find(NULL, results);
 
     if (!non_opts->args || BU_PTBL_LEN(non_opts->args) < 2) {
        bu_log("Error: No files specified\n");

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to