Revision: 45518
          http://brlcad.svn.sourceforge.net/brlcad/?rev=45518&view=rev
Author:   starseeker
Date:     2011-07-15 23:03:41 +0000 (Fri, 15 Jul 2011)

Log Message:
-----------
clang is reporting these as unused. Looks like this is part of the stuff that 
has moved to libged - nuke.

Modified Paths:
--------------
    brlcad/trunk/src/mged/utility1.c

Modified: brlcad/trunk/src/mged/utility1.c
===================================================================
--- brlcad/trunk/src/mged/utility1.c    2011-07-15 22:13:41 UTC (rev 45517)
+++ brlcad/trunk/src/mged/utility1.c    2011-07-15 23:03:41 UTC (rev 45518)
@@ -371,223 +371,6 @@
 };
 
 
-HIDDEN int
-sol_number(const matp_t matrix, char *name, int *old)
-{
-    int i;
-    struct identt idbuf1, idbuf2;
-    int readval;
-    int ret;
-
-    memset(&idbuf1, 0, sizeof(struct identt));
-    bu_strlcpy(idbuf1.i_name, name, sizeof(idbuf1.i_name));
-    MAT_COPY(idbuf1.i_mat, matrix);
-
-    for (i=0; i<numsol; i++) {
-       (void)lseek(rd_idfd, i*(long)sizeof identt, 0);
-       readval = read(rd_idfd, &idbuf2, sizeof identt);
-
-       if (readval < 0) {
-           perror("READ ERROR");
-       }
-
-       idbuf1.i_index = i + 1;
-
-       if (check((char *)&idbuf1, (char *)&idbuf2) == 1) {
-           *old = 1;
-           return idbuf2.i_index;
-       }
-    }
-    numsol++;
-    idbuf1.i_index = numsol;
-
-    (void)lseek(idfd, (off_t)0L, 2);
-    ret = write(idfd, &idbuf1, sizeof identt);
-    if (ret < 0)
-       perror("write");
-
-    *old = 0;
-    return idbuf1.i_index;
-}
-
-
-HIDDEN void
-new_tables(struct directory *dp, struct bu_ptbl *cur_path, const matp_t 
old_mat, int flag)
-{
-    struct rt_db_internal intern;
-    struct rt_comb_internal *comb;
-    struct rt_tree_array *tree_list;
-    int node_count;
-    int actual_count;
-    int i, k;
-
-    if (dbip == DBI_NULL)
-       return;
-
-    RT_CK_DIR(dp);
-    BU_CK_PTBL(cur_path);
-
-    if (!(dp->d_flags & RT_DIR_COMB))
-       return;
-
-    if (rt_db_get_internal(&intern, dp, dbip, (fastf_t *)NULL, 
&rt_uniresource) < 0)
-       READ_ERR_return;
-
-    comb = (struct rt_comb_internal *)intern.idb_ptr;
-    RT_CK_COMB(comb);
-
-    if (comb->tree && db_ck_v4gift_tree(comb->tree) < 0) {
-       db_non_union_push(comb->tree, &rt_uniresource);
-       if (db_ck_v4gift_tree(comb->tree) < 0) {
-           Tcl_AppendResult(INTERP, "Cannot flatten tree for editing\n", (char 
*)NULL);
-           intern.idb_meth->ft_ifree(&intern);
-           return;
-       }
-    }
-
-    if (!comb->tree) {
-       /* empty combination */
-       intern.idb_meth->ft_ifree(&intern);
-       return;
-    }
-
-    node_count = db_tree_nleaves(comb->tree);
-    tree_list = (struct rt_tree_array *)bu_calloc(node_count,
-                                                 sizeof(struct rt_tree_array), 
"tree list");
-
-    /* flatten tree */
-    actual_count = (struct rt_tree_array *)db_flatten_tree(tree_list,
-                                                          comb->tree, 
OP_UNION, 0, &rt_uniresource) - tree_list;
-    BU_ASSERT_LONG(actual_count, ==, node_count);
-
-    if (dp->d_flags & RT_DIR_REGION) {
-       numreg++;
-       (void)fprintf(tabptr, " %-4ld %4ld %4ld %4ld %4ld  ",
-                     numreg, comb->region_id, comb->aircode, comb->GIFTmater,
-                     comb->los);
-       for (k=0; k<BU_PTBL_END(cur_path); k++) {
-           struct directory *path_dp;
-
-           path_dp = (struct directory *)BU_PTBL_GET(cur_path, k);
-           RT_CK_DIR(path_dp);
-           (void)fprintf(tabptr, "/%s", path_dp->d_namep);
-       }
-       (void)fprintf(tabptr, "/%s:\n", dp->d_namep);
-
-       if (flag == ID_TABLE)
-           goto out;
-
-       for (i=0; i<actual_count; i++) {
-           char op;
-           int nsoltemp=0;
-           struct rt_db_internal sol_intern;
-           struct directory *sol_dp;
-           mat_t temp_mat;
-           int old;
-
-           switch (tree_list[i].tl_op) {
-               case OP_UNION:
-                   op = 'u';
-                   break;
-               case OP_SUBTRACT:
-                   op = '-';
-                   break;
-               case OP_INTERSECT:
-                   op = '+';
-                   break;
-               default:
-                   bu_log("unrecognized operation in region %s\n", 
dp->d_namep);
-                   op = '?';
-                   break;
-           }
-
-           if ((sol_dp=db_lookup(dbip, tree_list[i].tl_tree->tr_l.tl_name, 
LOOKUP_QUIET)) != RT_DIR_NULL) {
-               if (sol_dp->d_flags & RT_DIR_COMB) {
-                   (void)fprintf(tabptr, "   RG %c %s\n",
-                                 op, sol_dp->d_namep);
-                   continue;
-               } else if (!(sol_dp->d_flags & RT_DIR_SOLID)) {
-                   (void)fprintf(tabptr, "   ?? %c %s\n",
-                                 op, sol_dp->d_namep);
-                   continue;
-               } else {
-                   if (tree_list[i].tl_tree->tr_l.tl_mat) {
-                       bn_mat_mul(temp_mat, old_mat,
-                                  tree_list[i].tl_tree->tr_l.tl_mat);
-                   } else {
-                       MAT_COPY(temp_mat, old_mat);
-                   }
-                   if (rt_db_get_internal(&sol_intern, sol_dp, dbip, temp_mat, 
&rt_uniresource) < 0) {
-                       bu_log("Could not import %s\n", 
tree_list[i].tl_tree->tr_l.tl_name);
-                       nsoltemp = 0;
-                   }
-                   nsoltemp = sol_number(temp_mat, 
tree_list[i].tl_tree->tr_l.tl_name, &old);
-                   (void)fprintf(tabptr, "   %c [%d] ", op, nsoltemp);
-               }
-           } else {
-               nsoltemp = sol_number(old_mat, 
tree_list[i].tl_tree->tr_l.tl_name, &old);
-               (void)fprintf(tabptr, "   %c [%d] ", op, nsoltemp);
-               continue;
-           }
-
-           if (flag == REG_TABLE || old) {
-               (void) fprintf(tabptr, "%s\n", 
tree_list[i].tl_tree->tr_l.tl_name);
-               continue;
-           } else
-               (void) fprintf(tabptr, "%s:  ", 
tree_list[i].tl_tree->tr_l.tl_name);
-
-           if (!old && (sol_dp->d_flags & RT_DIR_SOLID)) {
-               /* if we get here, we must be looking for a solid table */
-               struct bu_vls tmp_vls;
-               bu_vls_init(&tmp_vls);
-
-               if (rt_functab[sol_intern.idb_type].ft_describe(&tmp_vls, 
&sol_intern, 1, base2local, &rt_uniresource, dbip) < 0) {
-                   Tcl_AppendResult(INTERP, tree_list[i].tl_tree->tr_l.tl_name,
-                                    "describe error\n", (char *)NULL);
-               }
-               fprintf(tabptr, "%s", bu_vls_addr(&tmp_vls));
-               bu_vls_free(&tmp_vls);
-           }
-           if (nsoltemp && (sol_dp->d_flags & RT_DIR_SOLID))
-               rt_db_free_internal(&sol_intern);
-       }
-    } else if (dp->d_flags & RT_DIR_COMB) {
-       int cur_length;
-
-       bu_ptbl_ins(cur_path, (long *)dp);
-       cur_length = BU_PTBL_END(cur_path);
-
-       for (i=0; i<actual_count; i++) {
-           struct directory *nextdp;
-           mat_t new_mat;
-
-           nextdp = db_lookup(dbip, tree_list[i].tl_tree->tr_l.tl_name, 
LOOKUP_NOISY);
-           if (nextdp == RT_DIR_NULL) {
-               Tcl_AppendResult(INTERP, "\tskipping this object\n", (char 
*)NULL);
-               continue;
-           }
-
-           /* recurse */
-           if (tree_list[i].tl_tree->tr_l.tl_mat) {
-               bn_mat_mul(new_mat, old_mat, tree_list[i].tl_tree->tr_l.tl_mat);
-           } else {
-               MAT_COPY(new_mat, old_mat);
-           }
-           new_tables(nextdp, cur_path, new_mat, flag);
-           bu_ptbl_trunc(cur_path, cur_length);
-       }
-    } else {
-       Tcl_AppendResult(INTERP, "Illegal flags for ", dp->d_namep,
-                        "skipping\n", (char *)NULL);
-       return;
-    }
-
- out:
-    bu_free((char *)tree_list, "new_tables: tree_list");
-    intern.idb_meth->ft_ifree(&intern);
-    return;
-}
-
 /*
  * Local Variables:
  * mode: C


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

------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to