[brlcad-commits] SF.net SVN: brlcad:[72402] brlcad/trunk/src/mged/cmd.c

2019-02-11 Thread brlcad--- via brlcad-commits
Revision: 72402
  http://sourceforge.net/p/brlcad/code/72402
Author:   brlcad
Date: 2019-02-11 19:19:27 + (Mon, 11 Feb 2019)
Log Message:
---
not valid syntax, nul char != null pointer.  provide a null pointer.

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

Modified: brlcad/trunk/src/mged/cmd.c
===
--- brlcad/trunk/src/mged/cmd.c 2019-02-11 19:07:58 UTC (rev 72401)
+++ brlcad/trunk/src/mged/cmd.c 2019-02-11 19:19:27 UTC (rev 72402)
@@ -1960,7 +1960,7 @@
 const char *av[3];
 av[0] = "process";
 av[1] = "list";
-av[2] = '\0';
+av[2] = NULL;
 ret = ged_process(gedp, 2, (const char **)av);
 /* For the next couple releases, print a rename notice */
 Tcl_AppendResult(interpreter, "(Note: former 'ps' command has been renamed 
to 'postscript')\n", NULL);

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



___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[72405] brlcad/trunk/src/libanalyze/tests

2019-02-11 Thread brlcad--- via brlcad-commits
Revision: 72405
  http://sourceforge.net/p/brlcad/code/72405
Author:   brlcad
Date: 2019-02-11 19:29:47 + (Mon, 11 Feb 2019)
Log Message:
---
make funcs static and ws

Modified Paths:
--
brlcad/trunk/src/libanalyze/tests/density.cxx
brlcad/trunk/src/libanalyze/tests/raydiff.c
brlcad/trunk/src/libanalyze/tests/solid_partitions.c

Modified: brlcad/trunk/src/libanalyze/tests/density.cxx
===
--- brlcad/trunk/src/libanalyze/tests/density.cxx   2019-02-11 19:23:09 UTC 
(rev 72404)
+++ brlcad/trunk/src/libanalyze/tests/density.cxx   2019-02-11 19:29:47 UTC 
(rev 72405)
@@ -24,43 +24,44 @@
 
 #include "analyze.h"
 
+
 const char *simple_buff = "1 7.8295steel";
-
 const char *test_buff =
-"#  Test density file with comments and bad input\n"
-"27.82  Carbon Tool Steel\n"
-"32.7   Aluminum, 6061-T6\n"
-"42.74  Aluminum, 7079-T6\n"
-"#  Incomplete line following\n"
-"   Copper, pure\n"
-"   619.32 Gold, pure\n"
-"   78.03  Stainless, 18Cr-8Ni\n"
-"#  Comment\n"
-"   87.47  Stainless 27Cr\n"
-"\n"
-"   97.715 Steel, tool\n"
-"\n"
-"#  Blank line above\n"
-"#  Comment following valid data on the line below\n"
-"   10   7.84  Carbon Steel # used for widgets\n"
-"   12   3.00  Gunner\n"
-"   14   10.00 Fuel\n"
-"#  Material ID too high \n"
-"999 70.84Kryptonite\n";
+"#  Test density file with comments and bad input\n"
+"27.82  Carbon Tool Steel\n"
+"32.7   Aluminum, 6061-T6\n"
+"42.74  Aluminum, 7079-T6\n"
+"#  Incomplete line following\n"
+"   Copper, pure\n"
+"   619.32 Gold, pure\n"
+"   78.03  Stainless, 18Cr-8Ni\n"
+"#  Comment\n"
+"   87.47  Stainless 27Cr\n"
+"\n"
+"   97.715 Steel, tool\n"
+"\n"
+"#  Blank line above\n"
+"#  Comment following valid data on the line below\n"
+"   10   7.84  Carbon Steel # used for widgets\n"
+"   12   3.00  Gunner\n"
+"   14   10.00 Fuel\n"
+"#  Material ID too high \n"
+"999 70.84Kryptonite\n";
 
 const char *tbuff_out_ctrl =
-"2 7.82Carbon Tool Steel\n"
-"3 2.7 Aluminum, 6061-T6\n"
-"4 2.74Aluminum, 7079-T6\n"
-"6 19.32   Gold, pure\n"
-"7 8.03Stainless, 18Cr-8Ni\n"
-"8 7.47Stainless 27Cr\n"
-"9 7.715   Steel, tool\n"
-"107.84Carbon Steel\n"
-"123   Gunner\n"
-"1410  Fuel\n";
+"2 7.82Carbon Tool Steel\n"
+"3 2.7 Aluminum, 6061-T6\n"
+"4 2.74Aluminum, 7079-T6\n"
+"6 19.32   Gold, pure\n"
+"7 8.03Stainless, 18Cr-8Ni\n"
+"8 7.47Stainless 27Cr\n"
+"9 7.715   Steel, tool\n"
+"107.84Carbon Steel\n"
+"123   Gunner\n"
+"1410  Fuel\n";
 
-int
+
+static int
 dtest_validate(struct analyze_densities *a, long int id, fastf_t density, 
const char *name)
 {
 char *db_name = analyze_densities_name(a, id);
@@ -74,7 +75,7 @@
return -1;
 }
 bu_free(db_name, "free name");
-
+
 fastf_t db_density = analyze_densities_density(a, id);
 if (db_density < 0) {
bu_log("Error - could not find density for id %ld\n", id);
@@ -92,6 +93,7 @@
bu_log("Error - could not find any ids associated with name %s\n", 
name);
return -1;
 }
+
 int have_correct_id = 0;
 for (long int i = 0; i < max_ids; i++) {
if (ids[i] >= 0 && ids[i] == id) {
@@ -107,7 +109,8 @@
 return 0;
 }
 
-int
+
+static int
 dtest_insert(struct analyze_densities *a, long int id, fastf_t density, const 
char *name, struct bu_vls *msgs)
 {
 if (analyze_densities_set(a, id, density, name, msgs)) {
@@ -120,6 +123,7 @@
 return 0;
 }
 
+
 int
 main(int argc, char **argv)
 {
@@ -173,7 +177,7 @@
 
 if (BU_STR_EQUAL(argv[1], "std")) {
 
-   std::set valid_ids = {0,2,15,4,31};
+   std::set valid_ids = {0, 2, 15, 4, 31};
 
analyze_densities_create();
 
@@ -216,7 +220,7 @@
bu_log("Error - could not find both ids for Carbon Tool Steel\n");
goto analyze_density_fail;
}
-   std::set exp_cts = {2,31};
+   std::set exp_cts = {2, 31};
std::set found_cts;
for (long int i = 0; i < 2; i++) {
found_cts.insert(ids[i]);
@@ -312,6 +316,7 @@
 return -1;
 }
 
+
 /*
  * Local Variables:
  * mode: C

Modified: brlcad/trunk/src/libanalyze/tests/raydiff.c
===
--- brlcad/trunk/src/libanalyze/tests/raydiff.c 2019-02-11 19:23:09 UTC (rev 
72404)
+++ brlcad/trunk/src/libanalyze/tests/raydiff.c 2019-02-11 19:29:47 UTC (rev 
72405)

[brlcad-commits] SF.net SVN: brlcad:[72401] brlcad/trunk

2019-02-11 Thread starseeker--- via brlcad-commits
Revision: 72401
  http://sourceforge.net/p/brlcad/code/72401
Author:   starseeker
Date: 2019-02-11 19:07:58 + (Mon, 11 Feb 2019)
Log Message:
---
Add a slot in the ged struct for density information

Modified Paths:
--
brlcad/trunk/include/ged/defines.h
brlcad/trunk/src/libged/ged.c

Modified: brlcad/trunk/include/ged/defines.h
===
--- brlcad/trunk/include/ged/defines.h  2019-02-11 18:38:26 UTC (rev 72400)
+++ brlcad/trunk/include/ged/defines.h  2019-02-11 19:07:58 UTC (rev 72401)
@@ -223,6 +223,9 @@
 
 struct ged_subprocess  gd_headSubprocess; /**< @brief  head of forked 
processes */
 
+struct analyze_densities *gd_densities; /** @brief current densities */
+char *gd_densities_source;
+
 void *ged_interp; /* Temporary - do not rely on when designing new 
functionality */
 db_search_callback_t ged_interp_eval; /* FIXME: broke the rule written on 
the previous line */
 

Modified: brlcad/trunk/src/libged/ged.c
===
--- brlcad/trunk/src/libged/ged.c   2019-02-11 18:38:26 UTC (rev 72400)
+++ brlcad/trunk/src/libged/ged.c   2019-02-11 19:07:58 UTC (rev 72401)
@@ -188,6 +188,15 @@
 
 free_object_selections(gedp->ged_selections);
 bu_hash_destroy(gedp->ged_selections);
+
+if (gedp->gd_densities) {
+   analyze_densities_destroy(gedp->gd_densities);
+   gedp->gd_densities = NULL;
+}
+if (gedp->gd_densities_source) {
+   bu_free((void *)gedp->gd_densities_source, "free densities source 
path");
+   gedp->gd_densities_source = NULL;
+}
 }
 
 
@@ -267,6 +276,9 @@
 
 gedp->ged_selections = bu_hash_create(32);
 
+gedp->gd_densities = NULL;
+gedp->gd_densities_source = NULL;
+
 /* init the solid list */
 BU_GET(freesolid, struct solid);
 BU_LIST_INIT(>l);

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



___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[72404] brlcad/trunk/include

2019-02-11 Thread brlcad--- via brlcad-commits
Revision: 72404
  http://sourceforge.net/p/brlcad/code/72404
Author:   brlcad
Date: 2019-02-11 19:23:09 + (Mon, 11 Feb 2019)
Log Message:
---
separate out ged commands from the object macros into their own header

Modified Paths:
--
brlcad/trunk/include/ged.h

Added Paths:
---
brlcad/trunk/include/ged/commands.h

Added: brlcad/trunk/include/ged/commands.h
===
--- brlcad/trunk/include/ged/commands.h (rev 0)
+++ brlcad/trunk/include/ged/commands.h 2019-02-11 19:23:09 UTC (rev 72404)
@@ -0,0 +1,798 @@
+/*   C O M M A N D S . H
+ * BRL-CAD
+ *
+ * Copyright (c) 2008-2019 United States Government as represented by
+ * the U.S. Army Research Laboratory.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this file; see the file named COPYING for more
+ * information.
+ */
+/** @addtogroup ged_commands
+ *
+ * Geometry EDiting Library Commands
+ *
+ */
+/** @{ */
+/** @file ged/commands.h */
+
+#ifndef GED_COMMANDS_H
+#define GED_COMMANDS_H
+
+#include "common.h"
+#include "ged/defines.h"
+
+
+__BEGIN_DECLS
+
+/**
+ * Adjust object's attribute(s)
+ */
+GED_EXPORT extern int ged_adjust(struct ged *gedp, int argc, const char 
*argv[]);
+
+/**
+ * Set, get, show, remove or append to attribute values for the specified 
object.
+ * The arguments for "set" and "append" subcommands are attribute name/value 
pairs.
+ * The arguments for "get", "rm", and "show" subcommands are attribute names.
+ * The "set" subcommand sets the specified attributes for the object.
+ * The "append" subcommand appends the provided value to an existing attribute,
+ * or creates a new attribute if it does not already exist.
+ * The "get" subcommand retrieves and displays the specified attributes.
+ * The "rm" subcommand deletes the specified attributes.
+ * The "show" subcommand does a "get" and displays the results in a user 
readable format.
+ */
+GED_EXPORT extern int ged_attr(struct ged *gedp, int argc, const char *argv[]);
+
+/**
+ * List attributes (brief).
+ */
+GED_EXPORT extern int ged_cat(struct ged *gedp, int argc, const char *argv[]);
+
+/**
+ * Set combination color.
+ */
+GED_EXPORT extern int ged_comb_color(struct ged *gedp, int argc, const char 
*argv[]);
+
+/**
+ * Create or extend combination w/booleans.
+ */
+GED_EXPORT extern int ged_comb(struct ged *gedp, int argc, const char *argv[]);
+
+/**
+ * Create or extend a combination using standard notation.
+ */
+GED_EXPORT extern int ged_comb_std(struct ged *gedp, int argc, const char 
*argv[]);
+
+/**
+ * Set/get comb's members.
+ */
+GED_EXPORT extern int ged_combmem(struct ged *gedp, int argc, const char 
*argv[]);
+
+/**
+ * Copy a database object
+ */
+GED_EXPORT extern int ged_copy(struct ged *gedp, int argc, const char *argv[]);
+
+/**
+ * Copy an 'evaluated' path solid
+ */
+GED_EXPORT extern int ged_copyeval(struct ged *gedp, int argc, const char 
*argv[]);
+
+/**
+ * Copy the matrix from one combination's arc to another.
+ */
+GED_EXPORT extern int ged_copymat(struct ged *gedp, int argc, const char 
*argv[]);
+
+
+/**
+ * Edit region ident codes.
+ */
+GED_EXPORT extern int ged_edcodes(struct ged *gedp, int argc, const char 
*argv[]);
+
+/**
+ * Edit combination.
+ */
+GED_EXPORT extern int ged_edcomb(struct ged *gedp, int argc, const char 
*argv[]);
+
+/**
+ * Edit objects, by using subcommands.
+ */
+GED_EXPORT extern int ged_edit(struct ged *gedp, int argc, const char *argv[]);
+
+/**
+ * Checks to see if the specified database object exists.
+ */
+GED_EXPORT extern int ged_exists(struct ged *gedp, int argc, const char 
*argv[]);
+
+/**
+ * returns form for objects of type "type"
+ */
+GED_EXPORT extern int ged_form(struct ged *gedp, int argc, const char *argv[]);
+
+/**
+ * Get object attributes
+ */
+GED_EXPORT extern int ged_get(struct ged *gedp, int argc, const char *argv[]);
+
+/**
+ * Get combination information
+ */
+GED_EXPORT extern int ged_get_comb(struct ged *gedp, int argc, const char 
*argv[]);
+
+/**
+ * Create or append objects to a group
+ */
+GED_EXPORT extern int ged_group(struct ged *gedp, int argc, const char 
*argv[]);
+
+/**
+ * Heal command to heal the defects in bots
+ */
+GED_EXPORT extern int ged_heal(struct ged *gedp, int argc, const char *argv[]);
+
+/**
+ * Set the "hidden" flag for the specified objects so they do not
+ * appear in an "ls" command output
+ */
+GED_EXPORT extern 

[brlcad-commits] SF.net SVN: brlcad:[72403] brlcad/trunk/src/libanalyze/tests/density.cxx

2019-02-11 Thread brlcad--- via brlcad-commits
Revision: 72403
  http://sourceforge.net/p/brlcad/code/72403
Author:   brlcad
Date: 2019-02-11 19:22:19 + (Mon, 11 Feb 2019)
Log Message:
---
quell warning about accessing analyze_denisities unitialized

Modified Paths:
--
brlcad/trunk/src/libanalyze/tests/density.cxx

Modified: brlcad/trunk/src/libanalyze/tests/density.cxx
===
--- brlcad/trunk/src/libanalyze/tests/density.cxx   2019-02-11 19:19:27 UTC 
(rev 72402)
+++ brlcad/trunk/src/libanalyze/tests/density.cxx   2019-02-11 19:22:19 UTC 
(rev 72403)
@@ -124,9 +124,9 @@
 main(int argc, char **argv)
 {
 struct bu_vls msgs = BU_VLS_INIT_ZERO;
-struct analyze_densities *a;
+struct analyze_densities *a = NULL;
 
-if (!argc || !argv) {
+if (argc < 1 || !argv) {
return -1;
 }
 

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



___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[72399] brlcad/trunk/TODO

2019-02-11 Thread brlcad--- via brlcad-commits
Revision: 72399
  http://sourceforge.net/p/brlcad/code/72399
Author:   brlcad
Date: 2019-02-11 18:19:57 + (Mon, 11 Feb 2019)
Log Message:
---
g-ply seems to be working fine, getting more info from user

Modified Paths:
--
brlcad/trunk/TODO

Modified: brlcad/trunk/TODO
===
--- brlcad/trunk/TODO   2019-02-11 16:25:37 UTC (rev 72398)
+++ brlcad/trunk/TODO   2019-02-11 18:19:57 UTC (rev 72399)
@@ -25,9 +25,7 @@
   - debug means to set env vars
   - large db tests need to be enabled
 
-* g-ply not writing geometry
 
-
 THESE TASKS SHOULD HAPPEN WITHIN TWO RELEASE ITERATIONS
 ---
 

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



___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[72400] brlcad/trunk/src/conv/ply/g-ply.c

2019-02-11 Thread brlcad--- via brlcad-commits
Revision: 72400
  http://sourceforge.net/p/brlcad/code/72400
Author:   brlcad
Date: 2019-02-11 18:38:26 + (Mon, 11 Feb 2019)
Log Message:
---
possibly some unitialized variables being accessed, so make sure they're all 
zero (ttol in particular).  this may have been the source of the previous 
observed failure as it would have been an optimized build.

Modified Paths:
--
brlcad/trunk/src/conv/ply/g-ply.c

Modified: brlcad/trunk/src/conv/ply/g-ply.c
===
--- brlcad/trunk/src/conv/ply/g-ply.c   2019-02-11 18:19:57 UTC (rev 72399)
+++ brlcad/trunk/src/conv/ply/g-ply.c   2019-02-11 18:38:26 UTC (rev 72400)
@@ -43,51 +43,43 @@
 #include "raytrace.h"
 #include "rply.h"
 
-#define V3ARGSIN(a)   (a)[X]/25.4, (a)[Y]/25.4, (a)[Z]/25.4
-#define VSETIN(a, b)   {\
-   (a)[X] = (b)[X]/25.4; \
-   (a)[Y] = (b)[Y]/25.4; \
-   (a)[Z] = (b)[Z]/25.4; \
-}
 
-static charusage[] = "\
-Usage: %s [-v][-xX lvl][-a abs_tess_tol (default: 0.0)][-r rel_tess_tol 
(default: 0.01)]\n\
-  [-n norm_tess_tol (default: 0.0)][-t type (asc: ascii), (le: little endian), 
(be: big endian)]\n\
-  [-s separate file per object][-D dist_calc_tol (default: 0.0005)] -o 
output_file_name brlcad_db.g object(s)\n";
+static int NMG_debug = 0; /* saved arg of -X, for longjmp handling */
+static int verbose = 0;
+static struct db_i *dbip = NULL;
+static struct rt_tess_tol ttol = RT_TESS_TOL_INIT_ZERO; /* tessellation 
tolerance in mm */
+static struct bn_tol tol = BN_TOL_INIT_ZERO;/* calculation 
tolerance */
+static struct model *the_model = NULL;
+static char *ply_file = NULL;
 
-static int NMG_debug;  /* saved arg of -X, for longjmp handling */
-static int verbose;
-static struct db_i *dbip;
-static struct rt_tess_tol  ttol;   /* tessellation tolerance in mm */
-static struct bn_tol   tol;/* calculation tolerance */
-static struct model*the_model;
-static char *ply_file = NULL;
-static int storage_type = 0;
-static int merge_all = 1;
 static long ***f_regs = NULL;
 static double ***v_regs = NULL;
 static struct bu_hash_tbl **v_tbl_regs = NULL;
 static int *f_sizes = NULL;
+
 static int v_order = 0;
-static int all_colors[3];
+static int merge_all = 1;
+static int storage_type = 0;
+static int all_colors[3] = {0, 0, 0};
 static int color_info = 0; /* 0: not checked yet, 1: all same so far, 2: no 
color information, 3: not same color */
 
-static struct db_tree_statetree_state; /* includes tol & model */
+static struct db_tree_state tree_state;/* includes tol & model */
 
-static int regions_tried = 0;
-static int regions_converted = 0;
-static int regions_written = 0;
-static int cur_region = 0;
-static int tot_regions = 0;
-static longtot_polygons = 0;
-static longtot_vertices = 0;
+static int regions_tried = 0;
+static int regions_converted = 0;
+static int regions_written = 0;
+static int cur_region = 0;
+static int tot_regions = 0;
+static long tot_polygons = 0;
+static long tot_vertices = 0;
 
+
 static struct bu_hash_entry *
 write_verts(p_ply fp, struct bu_hash_tbl *t)
 {
 struct bu_hash_entry *v_entry = bu_hash_next(t, NULL);
 while (v_entry) {
-   /* TODO - this shouldn't be possible now with new libbu hash API? */
+   /* TODO: determine if possible with new libbu hash API? */
double *coords = (double *)(bu_hash_value(v_entry, NULL));
if (!coords) return v_entry;
 
@@ -96,7 +88,9 @@
ply_write(fp, coords[1] / 1000);
ply_write(fp, coords[2] / 1000);
 
-   /* keeping track of the order in which the vertices are input, to write 
the faces */
+   /* keeping track of the order in which the vertices are input,
+* to write the faces
+*/
coords[3] = v_order;
v_order++;
 
@@ -105,7 +99,10 @@
 return NULL;
 }
 
-/* routine to output the faceted NMG representation of a BRL-CAD region */
+
+/* routine to output the faceted NMG representation of a BRL-CAD
+ * region
+ */
 static void
 nmg_to_ply(struct nmgregion *r, const struct db_full_path *pathp, int 
UNUSED(region_id), int UNUSED(material_id), struct db_tree_state *tsp)
 {
@@ -121,16 +118,16 @@
 
 VSCALE(color, tsp->ts_mater.ma_color, 255);
 if (merge_all) {
-   if (!tsp->ts_mater.ma_color_valid)
+   if (!tsp->ts_mater.ma_color_valid) {
color_info = 2;
-   else if (color_info == 0) {
+   } else if (color_info == 0) {
all_colors[0] = color[0];
all_colors[1] = color[1];
all_colors[2] = color[2];
color_info = 1;
+   } else if (color_info == 1 && (all_colors[0] != color [0] || 
all_colors[1] != color [1] || all_colors[2] != color [2])) {
+   color_info = 3;
}
-   else if (color_info == 1 && (all_colors[0] != color [0] || 

[brlcad-commits] SF.net SVN: brlcad:[72406] brlcad/trunk/src/libanalyze/tests/ solid_partitions.c

2019-02-11 Thread brlcad--- via brlcad-commits
Revision: 72406
  http://sourceforge.net/p/brlcad/code/72406
Author:   brlcad
Date: 2019-02-11 19:39:52 + (Mon, 11 Feb 2019)
Log Message:
---
anser comment question - there is API for getting the bbox.

Modified Paths:
--
brlcad/trunk/src/libanalyze/tests/solid_partitions.c

Modified: brlcad/trunk/src/libanalyze/tests/solid_partitions.c
===
--- brlcad/trunk/src/libanalyze/tests/solid_partitions.c2019-02-11 
19:29:47 UTC (rev 72405)
+++ brlcad/trunk/src/libanalyze/tests/solid_partitions.c2019-02-11 
19:39:52 UTC (rev 72406)
@@ -63,14 +63,18 @@
 
 dp = db_lookup(dbip, argv[2], LOOKUP_QUIET);
 
-if (dp == RT_DIR_NULL) return 1;
+if (dp == RT_DIR_NULL)
+   return 1;
 
-/* TODO - should get bbox without doing this - does the API allow it 
without libged? */
+/* TODO: call rt_bound_internal instead of prep directly to get
+ * the bounding box.
+ */
 rtip = rt_new_rti(dbip);
 state.rtip = rtip;
 state.resp = 
 rt_init_resource(state.resp, 0, rtip);
-if (rt_gettree(rtip, argv[2]) < 0) return -1;
+if (rt_gettree(rtip, argv[2]) < 0)
+   return -1;
 rt_prep_parallel(rtip, 1);
 
 count = analyze_get_bbox_rays(, rtip->mdl_min, rtip->mdl_max, );

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



___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[72413] brlcad/trunk/src/libged/ged_util.c

2019-02-11 Thread starseeker--- via brlcad-commits
Revision: 72413
  http://sourceforge.net/p/brlcad/code/72413
Author:   starseeker
Date: 2019-02-11 21:32:35 + (Mon, 11 Feb 2019)
Log Message:
---
checkpoint refactor of density file loading code into a common ged_util 
function.

Modified Paths:
--
brlcad/trunk/src/libged/ged_util.c

Modified: brlcad/trunk/src/libged/ged_util.c
===
--- brlcad/trunk/src/libged/ged_util.c  2019-02-11 21:25:38 UTC (rev 72412)
+++ brlcad/trunk/src/libged/ged_util.c  2019-02-11 21:32:35 UTC (rev 72413)
@@ -321,6 +321,161 @@
 return nonexist_cnt;
 }
 
+
+
+/**
+ * Returns
+ * 0 on success
+ * !0 on failure
+ */
+static int
+_ged_densities_from_file(struct ged *gedp, char *name, int fault_tolerant)
+{
+struct bu_mapped_file *dfile = NULL;
+struct bu_vls msgs = BU_VLS_INIT_ZERO;
+char *buf = NULL;
+int ret = 0;
+
+if (!bu_file_exists(name, NULL)) {
+   bu_vls_printf(gedp->ged_result_str, "Could not find density file - 
%s\n", name);
+   return GED_ERROR;
+}
+
+dfile = bu_open_mapped_file(name, "densities file");
+if (!dfile) {
+   bu_vls_printf(gedp->ged_result_str, "Could not open density file - 
%s\n", name);
+   return GED_ERROR;
+}
+
+buf = (char *)(dfile->buf);
+
+if (gedp->gd_densities) {
+   analyze_densities_destroy(gedp->gd_densities);
+}
+
+if (gedp->gd_densities_source) {
+   bu_free(gedp->gd_densities_source, "free densities source string");
+}
+
+(void)analyze_densities_create(&(gedp->gd_densities));
+
+ret = analyze_densities_load(gedp->gd_densities, buf, );
+
+if (!fault_tolerant && ret <= 0) {
+   if (bu_vls_strlen()) {
+   bu_vls_printf(gedp->ged_result_str, "Problem reading densities file 
%s:\n%s\n", name, bu_vls_cstr());
+   }
+   if (gedp->gd_densities) {
+   analyze_densities_destroy(gedp->gd_densities);
+   }
+   bu_vls_free();
+   bu_close_mapped_file(dfile);
+   return GED_ERROR;
+}
+
+bu_vls_free();
+bu_close_mapped_file(dfile);
+
+if (ret > 0) {
+   gedp->gd_densities_source = bu_strdup(name);
+}
+
+return (ret == 0) ? GED_ERROR : GED_OK;
+}
+
+/**
+ * Load density information into the GED structure.
+ *
+ * Returns
+ * 0 on success
+ * !0 on failure
+ */
+int
+_ged_read_densities(struct ged *gedp, char *filename, int fault_tolerant)
+{
+if (gedp == GED_NULL || gedp->ged_wdbp == RT_WDB_NULL) {
+   return GED_ERROR;
+}
+
+/* If we've explicitly been given a file, read that */
+if (filename) {
+   return _ged_densities_from_file(gedp, filename, fault_tolerant);
+}
+
+/* If we don't have an explicitly specified file, see if we have 
definitions in
+ * the database itself. */
+if (gedp->ged_wdbp->dbip != DBI_NULL) {
+   int ret = 0;
+   struct bu_vls msgs = BU_VLS_INIT_ZERO;
+   struct directory *dp;
+   struct rt_db_internal intern;
+   struct rt_binunif_internal *bu;
+   char *buf;
+
+   dp = db_lookup(gedp->ged_wdbp->dbip, "_DENSITIES", LOOKUP_QUIET);
+   if (dp == (struct directory *)NULL) {
+   bu_vls_printf(_ged_current_gedp->ged_result_str, "No \"_DENSITIES\" 
density table object in database.");
+   bu_vls_printf(_ged_current_gedp->ged_result_str, " If you do not 
have density data you can still get adjacent air, bounding box, exposed air, 
gaps, volume or overlaps by using the -Aa, -Ab, -Ae, -Ag, -Av, or -Ao options 
respectively.\n");
+   return GED_ERROR;
+   }
+
+   if (rt_db_get_internal(, dp, gedp->ged_wdbp->dbip, NULL, 
_uniresource) < 0) {
+   bu_vls_printf(_ged_current_gedp->ged_result_str, "could not import 
%s\n", dp->d_namep);
+   return GED_ERROR;
+   }
+
+   if ((intern.idb_major_type & DB5_MAJORTYPE_BINARY_MASK) == 0)
+   return GED_ERROR;
+
+   bu = (struct rt_binunif_internal *)intern.idb_ptr;
+
+   RT_CHECK_BINUNIF (bu);
+
+
+   if (gedp->gd_densities) {
+   analyze_densities_destroy(gedp->gd_densities);
+   }
+
+   if (gedp->gd_densities_source) {
+   bu_free(gedp->gd_densities_source, "free densities source string");
+   }
+
+   (void)analyze_densities_create(>gd_densities);
+
+   buf = (char *)bu_malloc(bu->count+1, "density buffer");
+   memcpy(buf, bu->u.int8, bu->count);
+
+   ret = analyze_densities_load(gedp->gd_densities, buf, );
+
+   if (!fault_tolerant && ret <= 0) {
+   if (bu_vls_strlen()) {
+   bu_vls_printf(gedp->ged_result_str, "Problem reading densities 
from .g file:\n%s\n", bu_vls_cstr());
+   }
+   if (gedp->gd_densities) {
+   analyze_densities_destroy(gedp->gd_densities);
+   }
+   bu_vls_free();
+   return GED_ERROR;
+   }
+
+   bu_vls_free();
+   bu_free((void *)buf, "density buffer");
+
+   if (ret > 0) {
+ 

[brlcad-commits] SF.net SVN: brlcad:[72412] brlcad/trunk/src/mged/cmd.c

2019-02-11 Thread brlcad--- via brlcad-commits
Revision: 72412
  http://sourceforge.net/p/brlcad/code/72412
Author:   brlcad
Date: 2019-02-11 21:25:38 + (Mon, 11 Feb 2019)
Log Message:
---
revert 72409 due to globals, need to fix at same time (get rev right!)

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

Modified: brlcad/trunk/src/mged/cmd.c
===
--- brlcad/trunk/src/mged/cmd.c 2019-02-11 21:21:00 UTC (rev 72411)
+++ brlcad/trunk/src/mged/cmd.c 2019-02-11 21:25:38 UTC (rev 72412)
@@ -82,34 +82,34 @@
 static struct bu_vls tcl_output_hook = BU_VLS_INIT_ZERO;
 
 static int
-mged_dm_width(struct ged *gedp)
+mged_dm_width(struct ged *gedpp)
 {
-dm *dmp = (dm *)gedp->ged_dmp;
-return dm_get_width(dmp);
+dm *dmpp = (dm *)gedpp->ged_dmp;
+return dm_get_width(dmpp);
 }
 
 
 static int
-mged_dm_height(struct ged *gedp)
+mged_dm_height(struct ged *gedpp)
 {
-dm *dmp = (dm *)gedp->ged_dmp;
-return dm_get_height(dmp);
+dm *dmpp = (dm *)gedpp->ged_dmp;
+return dm_get_height(dmpp);
 }
 
 
 static int
-mged_dmp_is_null(struct ged *gedp)
+mged_dmp_is_null(struct ged *gedpp)
 {
-dm *dmp = (dm *)gedp->ged_dmp;
-return dmp == NULL;
+dm *dmpp = (dm *)gedpp->ged_dmp;
+return dmpp == NULL;
 }
 
 
 static void
-mged_dm_get_display_image(struct ged *gedp, unsigned char **idata)
+mged_dm_get_display_image(struct ged *gedpp, unsigned char **idata)
 {
-dm *dmp = (dm *)gedp->ged_dmp;
-dm_get_display_image(dmp, idata);
+dm *dmpp = (dm *)gedpp->ged_dmp;
+dm_get_display_image(dmpp, idata);
 }
 
 

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



___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[72407] brlcad/trunk/src/mged

2019-02-11 Thread brlcad--- via brlcad-commits
Revision: 72407
  http://sourceforge.net/p/brlcad/code/72407
Author:   brlcad
Date: 2019-02-11 20:13:25 + (Mon, 11 Feb 2019)
Log Message:
---
remove glob_compat_mode and output_as_return from global namespace, to static 
global.  simplify setup slightly.

Modified Paths:
--
brlcad/trunk/src/mged/cmd.c
brlcad/trunk/src/mged/setup.c

Modified: brlcad/trunk/src/mged/cmd.c
===
--- brlcad/trunk/src/mged/cmd.c 2019-02-11 19:39:52 UTC (rev 72406)
+++ brlcad/trunk/src/mged/cmd.c 2019-02-11 20:13:25 UTC (rev 72407)
@@ -70,11 +70,12 @@
 extern int mged_db_upgrade;
 extern int mged_db_version;
 
-int glob_compat_mode = 1;
-int output_as_return = 1;
+static int glob_compat_mode = 1;
+static int output_as_return = 1;
 
 Tk_Window tkwin = NULL;
 
+
 /* The following is for GUI output hooks: contains name of function to
  * run with output.
  */
@@ -231,10 +232,10 @@
 Tcl_AppendResult(interpreter, bu_vls_addr(gedp->ged_result_str), NULL);
 
 if (ret & GED_HELP)
-return TCL_OK;
+   return TCL_OK;
 
 if (ret)
-return TCL_ERROR;
+   return TCL_ERROR;
 
 av[0] = "draw";
 av[1] = argv[1];
@@ -596,17 +597,17 @@
 /* This code is for debugging/testing the new ged return mechanism */
 #if 0
 {
-int r_loop = 0;
-size_t result_cnt = 0;
+   int r_loop = 0;
+   size_t result_cnt = 0;
 
-result_cnt = ged_results_count(gedp->ged_results);
-if (result_cnt > 0) {
-   bu_log("Results container holds results(%d):\n", result_cnt);
-   for (r_loop = 0; r_loop < (int)result_cnt; r_loop++) {
-   bu_log("%s\n", ged_results_get(gedp->ged_results, r_loop));
+   result_cnt = ged_results_count(gedp->ged_results);
+   if (result_cnt > 0) {
+   bu_log("Results container holds results(%d):\n", result_cnt);
+   for (r_loop = 0; r_loop < (int)result_cnt; r_loop++) {
+   bu_log("%s\n", ged_results_get(gedp->ged_results, r_loop));
+   }
}
 }
-}
 #endif
 
 if (ret & GED_MORE)
@@ -692,6 +693,7 @@
 return TCL_OK;
 }
 
+
 int
 cmd_ged_dm_wrapper(ClientData clientData, Tcl_Interp *interpreter, int argc, 
const char *argv[])
 {
@@ -987,9 +989,6 @@
 }
 
 
-
-
-
 /**
  * This routine is called to process a vls full of commands.  Each
  * command is newline terminated.  The input string will not be
@@ -1348,7 +1347,7 @@
if (clp->cl_tie) {
if (dm_get_pathname(dmp)) {
bu_vls_printf(, "%s %s", bu_vls_addr(>cl_name),
-   bu_vls_addr(dm_get_pathname(clp->cl_tie->dml_dmp)));
+ 
bu_vls_addr(dm_get_pathname(clp->cl_tie->dml_dmp)));
Tcl_AppendElement(interpreter, bu_vls_addr());
}
} else {
@@ -1361,7 +1360,7 @@
if (clp->cl_tie) {
if (dm_get_pathname(dmp)) {
bu_vls_printf(, "%s %s", bu_vls_addr(>cl_name),
-   bu_vls_addr(dm_get_pathname(clp->cl_tie->dml_dmp)));
+ 
bu_vls_addr(dm_get_pathname(clp->cl_tie->dml_dmp)));
Tcl_AppendElement(interpreter, bu_vls_addr());
}
} else {
@@ -1560,6 +1559,10 @@
 Tcl_LinkVar(interpreter, "edit_class", (char *)_edclass, TCL_LINK_INT);
 Tcl_LinkVar(interpreter, "edit_solid_flag", (char *)_edflag, 
TCL_LINK_INT);
 Tcl_LinkVar(interpreter, "edit_object_flag", (char *), TCL_LINK_INT);
+
+/* link some tcl variables to these corresponding globals */
+Tcl_LinkVar(INTERP, "glob_compat_mode", (char *)_compat_mode, 
TCL_LINK_BOOLEAN);
+Tcl_LinkVar(INTERP, "output_as_return", (char *)_as_return, 
TCL_LINK_BOOLEAN);
 }
 
 
@@ -1574,6 +1577,9 @@
 Tcl_UnlinkVar(interpreter, "edit_class");
 Tcl_UnlinkVar(interpreter, "edit_solid_flag");
 Tcl_UnlinkVar(interpreter, "edit_object_flag");
+
+Tcl_UnlinkVar(interpreter, "glob_compat_mode");
+Tcl_UnlinkVar(interpreter, "output_as_return");
 }
 
 
@@ -1598,6 +1604,7 @@
 return TCL_OK;
 }
 
+
 /**
  *@brief
  * Called when the named proc created by rt_gettrees() is destroyed.
@@ -1618,6 +1625,7 @@
 bu_free((void *)ap, "struct application");
 }
 
+
 int
 cmd_rt_gettrees(ClientData UNUSED(clientData), Tcl_Interp 
*UNUSED(interpreter), int argc, const char *argv[])
 {
@@ -1794,6 +1802,7 @@
 
 }
 
+
 /**
  * "tol" displays current settings
  * "tol abs #" sets absolute tolerance.  # > 0.0
@@ -1876,6 +1885,7 @@
 return edit_com(argc, argv, 1);
 }
 
+
 /**
  * Format: ev objects
  */
@@ -1950,11 +1960,12 @@
 return TCL_OK;
 }
 
+
 int
 cmd_ps(ClientData UNUSED(clientData),
-   Tcl_Interp *interpreter,
-   int UNUSED(argc),
-   const char **UNUSED(argv))
+   Tcl_Interp *interpreter,
+   int UNUSED(argc),
+   const char **UNUSED(argv))
 {
 int ret = 0;
 const char *av[3];
@@ -1968,6 +1979,7 @@
 return (ret) ? 

[brlcad-commits] SF.net SVN: brlcad:[72408] brlcad/trunk

2019-02-11 Thread brlcad--- via brlcad-commits
Revision: 72408
  http://sourceforge.net/p/brlcad/code/72408
Author:   brlcad
Date: 2019-02-11 20:20:12 + (Mon, 11 Feb 2019)
Log Message:
---
no need for long long when it's a double (only when it's an int64_t).

Modified Paths:
--
brlcad/trunk/include/bu/time.h
brlcad/trunk/src/librt/test_dbio.c

Modified: brlcad/trunk/include/bu/time.h
===
--- brlcad/trunk/include/bu/time.h  2019-02-11 20:13:25 UTC (rev 72407)
+++ brlcad/trunk/include/bu/time.h  2019-02-11 20:20:12 UTC (rev 72408)
@@ -48,7 +48,7 @@
 int64_t start = bu_gettime();
 do_some_work_here();
 double elapsed = bu_gettime() - start;
-double seconds = elapsed / 100LL;
+double seconds = elapsed / 100.0;
 printf("time: %.2f\n", seconds);
 @endcode
  *

Modified: brlcad/trunk/src/librt/test_dbio.c
===
--- brlcad/trunk/src/librt/test_dbio.c  2019-02-11 20:13:25 UTC (rev 72407)
+++ brlcad/trunk/src/librt/test_dbio.c  2019-02-11 20:20:12 UTC (rev 72408)
@@ -44,7 +44,7 @@
 void
 print_elapsed(const char *label, int64_t elapsed)
 {
-bu_log("%s elapsed: %.6f\n", label, (double)elapsed / 100LL);
+bu_log("%s elapsed: %.6f\n", label, (double)elapsed / 100.0);
 }
 
 

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



___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[72411] brlcad/trunk

2019-02-11 Thread brlcad--- via brlcad-commits
Revision: 72411
  http://sourceforge.net/p/brlcad/code/72411
Author:   brlcad
Date: 2019-02-11 21:21:00 + (Mon, 11 Feb 2019)
Log Message:
---
gah, undo fail

Modified Paths:
--
brlcad/trunk/TODO
brlcad/trunk/include/analyze.h
brlcad/trunk/include/ged/defines.h
brlcad/trunk/include/ged.h

Modified: brlcad/trunk/TODO
===
--- brlcad/trunk/TODO   2019-02-11 21:07:19 UTC (rev 72410)
+++ brlcad/trunk/TODO   2019-02-11 21:21:00 UTC (rev 72411)
@@ -23,6 +23,7 @@
 * prep caching actions
   - needs to double-check graceful fallback when cache has any issue
   - debug means to set env vars
+  - large db tests need to be enabled
 
 
 THESE TASKS SHOULD HAPPEN WITHIN TWO RELEASE ITERATIONS

Modified: brlcad/trunk/include/analyze.h
===
--- brlcad/trunk/include/analyze.h  2019-02-11 21:07:19 UTC (rev 72410)
+++ brlcad/trunk/include/analyze.h  2019-02-11 21:21:00 UTC (rev 72411)
@@ -31,7 +31,6 @@
 #include "common.h"
 #include "bu/opt.h"
 #include "bu/vls.h"
-#include "ged/defines.h" /* For GED_SEM_LAST */
 #include "raytrace.h"
 
 __BEGIN_DECLS
@@ -51,7 +50,7 @@
 /* Libanalyze return codes */
 #define ANALYZE_OK 0x
 #define ANALYZE_ERROR 0x0001 /**< something went wrong, function not completed 
*/
-#define ANALYZE_SEM_WORKER GED_SEM_LAST
+#define ANALYZE_SEM_WORKER RT_SEM_LAST
 #define ANALYZE_SEM_STATS ANALYZE_SEM_WORKER+1
 #define ANALYZE_SEM_LIST ANALYZE_SEM_STATS+1
 #define ANALYZE_SEM_LAST ANALYZE_SEM_LIST+1

Modified: brlcad/trunk/include/ged/defines.h
===
--- brlcad/trunk/include/ged/defines.h  2019-02-11 21:07:19 UTC (rev 72410)
+++ brlcad/trunk/include/ged/defines.h  2019-02-11 21:21:00 UTC (rev 72411)
@@ -87,7 +87,7 @@
  * Definition of global parallel-processing semaphores.
  *
  */
-#define GED_SEM_WORKER RT_SEM_LAST
+#define GED_SEM_WORKER ANALYZE_SEM_LAST
 #define GED_SEM_STATS GED_SEM_WORKER+1
 #define GED_SEM_LIST GED_SEM_STATS+1
 #define GED_SEM_LAST GED_SEM_LIST+1

Modified: brlcad/trunk/include/ged.h
===
--- brlcad/trunk/include/ged.h  2019-02-11 21:07:19 UTC (rev 72410)
+++ brlcad/trunk/include/ged.h  2019-02-11 21:21:00 UTC (rev 72411)
@@ -36,6 +36,7 @@
 #include "dm/bview.h"
 #include "raytrace.h"
 #include "rt/solid.h"
+#include "analyze.h"
 #include "ged/defines.h"
 #include "ged/database.h"
 #include "ged/commands.h"

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



___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[72410] brlcad/trunk

2019-02-11 Thread brlcad--- via brlcad-commits
Revision: 72410
  http://sourceforge.net/p/brlcad/code/72410
Author:   brlcad
Date: 2019-02-11 21:07:19 + (Mon, 11 Feb 2019)
Log Message:
---
revert 72398 due to globals, need to fix at same time

Modified Paths:
--
brlcad/trunk/TODO
brlcad/trunk/include/analyze.h
brlcad/trunk/include/ged/defines.h
brlcad/trunk/include/ged.h

Modified: brlcad/trunk/TODO
===
--- brlcad/trunk/TODO   2019-02-11 21:02:10 UTC (rev 72409)
+++ brlcad/trunk/TODO   2019-02-11 21:07:19 UTC (rev 72410)
@@ -23,7 +23,6 @@
 * prep caching actions
   - needs to double-check graceful fallback when cache has any issue
   - debug means to set env vars
-  - large db tests need to be enabled
 
 
 THESE TASKS SHOULD HAPPEN WITHIN TWO RELEASE ITERATIONS

Modified: brlcad/trunk/include/analyze.h
===
--- brlcad/trunk/include/analyze.h  2019-02-11 21:02:10 UTC (rev 72409)
+++ brlcad/trunk/include/analyze.h  2019-02-11 21:07:19 UTC (rev 72410)
@@ -31,6 +31,7 @@
 #include "common.h"
 #include "bu/opt.h"
 #include "bu/vls.h"
+#include "ged/defines.h" /* For GED_SEM_LAST */
 #include "raytrace.h"
 
 __BEGIN_DECLS
@@ -50,7 +51,7 @@
 /* Libanalyze return codes */
 #define ANALYZE_OK 0x
 #define ANALYZE_ERROR 0x0001 /**< something went wrong, function not completed 
*/
-#define ANALYZE_SEM_WORKER RT_SEM_LAST
+#define ANALYZE_SEM_WORKER GED_SEM_LAST
 #define ANALYZE_SEM_STATS ANALYZE_SEM_WORKER+1
 #define ANALYZE_SEM_LIST ANALYZE_SEM_STATS+1
 #define ANALYZE_SEM_LAST ANALYZE_SEM_LIST+1

Modified: brlcad/trunk/include/ged/defines.h
===
--- brlcad/trunk/include/ged/defines.h  2019-02-11 21:02:10 UTC (rev 72409)
+++ brlcad/trunk/include/ged/defines.h  2019-02-11 21:07:19 UTC (rev 72410)
@@ -87,7 +87,7 @@
  * Definition of global parallel-processing semaphores.
  *
  */
-#define GED_SEM_WORKER ANALYZE_SEM_LAST
+#define GED_SEM_WORKER RT_SEM_LAST
 #define GED_SEM_STATS GED_SEM_WORKER+1
 #define GED_SEM_LIST GED_SEM_STATS+1
 #define GED_SEM_LAST GED_SEM_LIST+1

Modified: brlcad/trunk/include/ged.h
===
--- brlcad/trunk/include/ged.h  2019-02-11 21:02:10 UTC (rev 72409)
+++ brlcad/trunk/include/ged.h  2019-02-11 21:07:19 UTC (rev 72410)
@@ -36,7 +36,6 @@
 #include "dm/bview.h"
 #include "raytrace.h"
 #include "rt/solid.h"
-#include "analyze.h"
 #include "ged/defines.h"
 #include "ged/database.h"
 #include "ged/commands.h"

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



___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[72409] brlcad/trunk/src/mged/cmd.c

2019-02-11 Thread brlcad--- via brlcad-commits
Revision: 72409
  http://sourceforge.net/p/brlcad/code/72409
Author:   brlcad
Date: 2019-02-11 21:02:10 + (Mon, 11 Feb 2019)
Log Message:
---
fix misnomer, they're not pointer pointers

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

Modified: brlcad/trunk/src/mged/cmd.c
===
--- brlcad/trunk/src/mged/cmd.c 2019-02-11 20:20:12 UTC (rev 72408)
+++ brlcad/trunk/src/mged/cmd.c 2019-02-11 21:02:10 UTC (rev 72409)
@@ -82,34 +82,34 @@
 static struct bu_vls tcl_output_hook = BU_VLS_INIT_ZERO;
 
 static int
-mged_dm_width(struct ged *gedpp)
+mged_dm_width(struct ged *gedp)
 {
-dm *dmpp = (dm *)gedpp->ged_dmp;
-return dm_get_width(dmpp);
+dm *dmp = (dm *)gedp->ged_dmp;
+return dm_get_width(dmp);
 }
 
 
 static int
-mged_dm_height(struct ged *gedpp)
+mged_dm_height(struct ged *gedp)
 {
-dm *dmpp = (dm *)gedpp->ged_dmp;
-return dm_get_height(dmpp);
+dm *dmp = (dm *)gedp->ged_dmp;
+return dm_get_height(dmp);
 }
 
 
 static int
-mged_dmp_is_null(struct ged *gedpp)
+mged_dmp_is_null(struct ged *gedp)
 {
-dm *dmpp = (dm *)gedpp->ged_dmp;
-return dmpp == NULL;
+dm *dmp = (dm *)gedp->ged_dmp;
+return dmp == NULL;
 }
 
 
 static void
-mged_dm_get_display_image(struct ged *gedpp, unsigned char **idata)
+mged_dm_get_display_image(struct ged *gedp, unsigned char **idata)
 {
-dm *dmpp = (dm *)gedpp->ged_dmp;
-dm_get_display_image(dmpp, idata);
+dm *dmp = (dm *)gedp->ged_dmp;
+dm_get_display_image(dmp, idata);
 }
 
 

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



___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[72416] brlcad/trunk/src/mged/setup.c

2019-02-11 Thread brlcad--- via brlcad-commits
Revision: 72416
  http://sourceforge.net/p/brlcad/code/72416
Author:   brlcad
Date: 2019-02-12 01:23:14 + (Tue, 12 Feb 2019)
Log Message:
---
revert 72415, stale buffer

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

Modified: brlcad/trunk/src/mged/setup.c
===
--- brlcad/trunk/src/mged/setup.c   2019-02-12 01:11:42 UTC (rev 72415)
+++ brlcad/trunk/src/mged/setup.c   2019-02-12 01:23:14 UTC (rev 72416)
@@ -403,10 +403,6 @@
(ClientData)ctp, (Tcl_CmdDeleteProc *)NULL);
 }
 
-/* link some tcl variables to these corresponding globals */
-Tcl_LinkVar(INTERP, "glob_compat_mode", (char *)_compat_mode, 
TCL_LINK_BOOLEAN);
-Tcl_LinkVar(INTERP, "output_as_return", (char *)_as_return, 
TCL_LINK_BOOLEAN);
-
 /* Init mged's Tcl interface to libwdb */
 Wdb_Init(INTERP);
 

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



___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[72418] brlcad/trunk/misc/repoconv/svnfexport/ svnfexport.cxx

2019-02-11 Thread starseeker--- via brlcad-commits
Revision: 72418
  http://sourceforge.net/p/brlcad/code/72418
Author:   starseeker
Date: 2019-02-12 01:58:42 + (Tue, 12 Feb 2019)
Log Message:
---
right... git branches don't have commit messages.  We'll have to decide what to 
do with that, since at least a few of the branch commit messages have useful 
information in them.  Perhaps add them to an 'svn_branch_msgs.txt' file in doc?

Modified Paths:
--
brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx

Modified: brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx
===
--- brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx2019-02-12 
01:48:07 UTC (rev 72417)
+++ brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx2019-02-12 
01:58:42 UTC (rev 72418)
@@ -755,16 +755,6 @@
 }
 }
 
-void add_branch(struct svn_revision ,  std::ofstream , std::string 
, std::string ) {
-outfile << "commit " << branch << "\n";
-outfile << "mark :" << rev.revision_number << "\n";
-outfile << "committer " << author_map[rev.author] << " " << 
svn_time_to_git_time(rev.timestamp.c_str()) << "\n";
-outfile << "data " << rev.commit_msg.length() << "\n";
-outfile << rev.commit_msg << "\n";
-outfile << "from " << branch_head_id(bbpath) << "\n";
-branch_head_ids[branch] = std::to_string(rev.revision_number);
-}
-
 void rev_fast_export(std::ifstream , std::ofstream , long int 
rev_num_min, long int rev_num_max)
 {
 std::string empty_sha1("da39a3ee5e6b4b0d3255bfef95601890afd80709");
@@ -824,13 +814,16 @@
if (rev.revision_number < edited_tag_minr) {
std::string tbstr = std::string("refs/heads/") +  
node.branch;
std::cout << "Adding tag branch " << tbstr << " 
from " << bbpath << ", r" << rev.revision_number <<"\n";
-   add_branch(rev, outfile, tbstr, bbpath);
+   std::cout << rev.commit_msg << "\n";
+   outfile << "reset " << tbstr << "\n";
+   outfile << "from " << branch_head_id(bbpath) << 
"\n";
+   branch_head_ids[tbstr] = branch_head_ids[bbpath];
have_commit = 1;
continue;
} else {
if (rev.revision_number == edited_tag_maxr) {
// Note - in this situation, we need to both 
build a commit and do a tag.  Will probably
-   // take some refactoring
+   // take some refactoring.  Merge information 
will also be a factor.
std::cout << "[TODO] Adding final commit and 
tag " << node.branch << ", r" << rev.revision_number<< "\n";
have_commit = 1;
continue;
@@ -852,7 +845,10 @@
int is_tag;
node_path_split(node.copyfrom_path, ppath, bbpath, llpath, 
_tag);
std::cout << "Adding branch " << node.branch << " from " << 
bbpath << ", r" << rev.revision_number <<"\n";
-   add_branch(rev, outfile, node.branch, bbpath);
+   std::cout << rev.commit_msg << "\n";
+   outfile << "reset " << node.branch << "\n";
+   outfile << "from " << branch_head_id(bbpath) << "\n";
+   branch_head_ids[node.branch] = branch_head_ids[bbpath];
have_commit = 1;
continue;
}

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



___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[72419] brlcad/trunk/misc/repoconv/svnfexport/ svnfexport.cxx

2019-02-11 Thread starseeker--- via brlcad-commits
Revision: 72419
  http://sourceforge.net/p/brlcad/code/72419
Author:   starseeker
Date: 2019-02-12 02:43:49 + (Tue, 12 Feb 2019)
Log Message:
---
More tweaks of various sorts...

Modified Paths:
--
brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx

Modified: brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx
===
--- brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx2019-02-12 
01:58:42 UTC (rev 72418)
+++ brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx2019-02-12 
02:43:49 UTC (rev 72419)
@@ -672,6 +672,7 @@
 analyze_dump()
 {
 std::map::iterator r_it;
+
 for (r_it = revs.begin(); r_it != revs.end(); r_it++) {
long int maxrev = 0;
struct svn_revision  = r_it->second;
@@ -680,6 +681,11 @@
// Break up paths and build tag/branch lists
node_path_split(node.path, node.project, node.branch, 
node.local_path, &(node.tag_path));
if (node.branch.length()) {
+   // Map dmtogl-branch names to dmtogl
+   if (node.branch == std::string("refs/heads/dmtogl-branch")) {
+   node.branch = std::string("refs/heads/dmtogl");
+   std::cout << "Updating rev " << rev.revision_number << "\n";
+   }
if (node.tag_path) {
tags.insert(node.branch);
} else {
@@ -692,7 +698,7 @@
rev.move_edit = 1;
}
// Spot tag edits
-   if (node.text_content_length > 0 && node.tag_path) {
+   if ((node.text_content_length > 0 || 
node.text_copy_source_sha1.length()) && node.tag_path) {
node.tag_edit = 1;
if (edited_tags.find(node.branch) == edited_tags.end()) {
edited_tag_first_rev[node.branch] = rev.revision_number;
@@ -753,6 +759,7 @@
rev.project = rev.nodes[0].project; 
}
 }
+
 }
 
 void rev_fast_export(std::ifstream , std::ofstream , long int 
rev_num_min, long int rev_num_max)
@@ -789,6 +796,8 @@
 #endif
int git_changes = 0;
int have_commit = 0;
+   int tag_after_commit = 0;
+   int branch_delete = 0;
for (size_t n = 0; n != rev.nodes.size(); n++) {
struct svn_node  = rev.nodes[n];
 
@@ -822,13 +831,14 @@
continue;
} else {
if (rev.revision_number == edited_tag_maxr) {
-   // Note - in this situation, we need to both 
build a commit and do a tag.  Will probably
-   // take some refactoring.  Merge information 
will also be a factor.
-   std::cout << "[TODO] Adding final commit and 
tag " << node.branch << ", r" << rev.revision_number<< "\n";
-   have_commit = 1;
+   tag_after_commit = 1;
+   std::string tbstr = std::string("refs/heads/") 
+  node.branch;
+   node.branch = tbstr;
continue;
} else {
std::cout << "Non-final tag edit, processing 
normally: " << node.branch << ", r" << rev.revision_number<< "\n";
+   std::string tbstr = std::string("refs/heads/") 
+  node.branch;
+   node.branch = tbstr;
}
}
} else {
@@ -856,6 +866,7 @@
if (node.branch_delete) {
//std::cout << "Processing revision " << 
rev.revision_number << "\n";
//std::cout << "Delete branch instruction: " << node.branch 
<< " - deferring.\n";
+   branch_delete = 1;
continue;
}
if (node.text_content_length > 0) {
@@ -874,7 +885,6 @@
}
}
 
-   continue;
if (git_changes) {
if (have_commit) {
std::cout << "Error - more than one commit generated for 
revision " << rev.revision_number << "\n";
@@ -971,8 +981,17 @@
std::cout << "Error - unhandled node action: " << 
print_node_action(node.action) << "\n";
exit(1);
}
+   if (tag_after_commit) {
+   // Note - in this situation, we need to both build a commit 
and do a tag.  Will probably
+   // take some refactoring.  Merge information will also be a 
factor.
+   std::cout << "[TODO] Adding final commit and tag " << 
rev.nodes[0].branch << ", r" << rev.revision_number<< "\n";
+   }
+
} else {
-   std::cout << "Skipping SVN commit r" << rev.revision_number << 
" - no git applicable changes\n";
+   

[brlcad-commits] SF.net SVN: brlcad:[72420] brlcad/trunk/misc/repoconv/svnfexport/ svnfexport.cxx

2019-02-11 Thread starseeker--- via brlcad-commits
Revision: 72420
  http://sourceforge.net/p/brlcad/code/72420
Author:   starseeker
Date: 2019-02-12 03:07:17 + (Tue, 12 Feb 2019)
Log Message:
---
Something is wrong with the parsing somewhere - getting no-commit 
determinations on changes that clearly have file changes

Modified Paths:
--
brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx

Modified: brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx
===
--- brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx2019-02-12 
02:43:49 UTC (rev 72419)
+++ brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx2019-02-12 
03:07:17 UTC (rev 72420)
@@ -798,6 +798,7 @@
int have_commit = 0;
int tag_after_commit = 0;
int branch_delete = 0;
+   std::string rbranch = rev.nodes[0].branch;
for (size_t n = 0; n != rev.nodes.size(); n++) {
struct svn_node  = rev.nodes[n];
 
@@ -834,11 +835,13 @@
tag_after_commit = 1;
std::string tbstr = std::string("refs/heads/") 
+  node.branch;
node.branch = tbstr;
+   rbranch = tbstr;
continue;
} else {
std::cout << "Non-final tag edit, processing 
normally: " << node.branch << ", r" << rev.revision_number<< "\n";
std::string tbstr = std::string("refs/heads/") 
+  node.branch;
node.branch = tbstr;
+   rbranch = tbstr;
}
}
} else {
@@ -893,13 +896,13 @@
std::cout << "Error - couldn't find author map for author " 
<< rev.author << " on revision " << rev.revision_number << "\n";
exit(1);
}
-   outfile << "commit " << rev.nodes[0].branch << "\n";
+   outfile << "commit " << rbranch << "\n";
outfile << "mark :" << rev.revision_number << "\n";
outfile << "committer " << author_map[rev.author] << " " << 
svn_time_to_git_time(rev.timestamp.c_str()) << "\n";
outfile << "data " << rev.commit_msg.length() << "\n";
outfile << rev.commit_msg << "\n";
-   outfile << "from " << branch_head_id(rev.nodes[0].branch) << 
"\n";
-   branch_head_ids[rev.nodes[0].branch] = 
std::to_string(rev.revision_number);
+   outfile << "from " << branch_head_id(rbranch) << "\n";
+   branch_head_ids[rbranch] = std::to_string(rev.revision_number);
 
for (size_t n = 0; n != rev.nodes.size(); n++) {
struct svn_node  = rev.nodes[n];
@@ -984,11 +987,11 @@
if (tag_after_commit) {
// Note - in this situation, we need to both build a commit 
and do a tag.  Will probably
// take some refactoring.  Merge information will also be a 
factor.
-   std::cout << "[TODO] Adding final commit and tag " << 
rev.nodes[0].branch << ", r" << rev.revision_number<< "\n";
+   std::cout << "[TODO] Adding final commit and tag " << 
rbranch << ", r" << rev.revision_number<< "\n";
}
 
} else {
-   if (!branch_delete) {
+   if (!branch_delete && !have_commit) {
std::cout << "Skipping SVN commit r" << rev.revision_number 
<< " - no git applicable changes\n";
std::cout << rev.commit_msg << "\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
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[72415] brlcad/trunk/src/mged/setup.c

2019-02-11 Thread brlcad--- via brlcad-commits
Revision: 72415
  http://sourceforge.net/p/brlcad/code/72415
Author:   brlcad
Date: 2019-02-12 01:11:42 + (Tue, 12 Feb 2019)
Log Message:
---
missed commit?  register glob_compat_mode and output_as_return as globals 
during setup

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

Modified: brlcad/trunk/src/mged/setup.c
===
--- brlcad/trunk/src/mged/setup.c   2019-02-12 00:36:10 UTC (rev 72414)
+++ brlcad/trunk/src/mged/setup.c   2019-02-12 01:11:42 UTC (rev 72415)
@@ -403,6 +403,10 @@
(ClientData)ctp, (Tcl_CmdDeleteProc *)NULL);
 }
 
+/* link some tcl variables to these corresponding globals */
+Tcl_LinkVar(INTERP, "glob_compat_mode", (char *)_compat_mode, 
TCL_LINK_BOOLEAN);
+Tcl_LinkVar(INTERP, "output_as_return", (char *)_as_return, 
TCL_LINK_BOOLEAN);
+
 /* Init mged's Tcl interface to libwdb */
 Wdb_Init(INTERP);
 

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



___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[72422] brlcad/trunk/misc/repoconv/svnfexport/ svnfexport.cxx

2019-02-11 Thread starseeker--- via brlcad-commits
Revision: 72422
  http://sourceforge.net/p/brlcad/code/72422
Author:   starseeker
Date: 2019-02-12 03:51:21 + (Tue, 12 Feb 2019)
Log Message:
---
Getting dizzy following tagging, untagging, editing old tags... still not there 
yet.

Modified Paths:
--
brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx

Modified: brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx
===
--- brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx2019-02-12 
03:16:17 UTC (rev 72421)
+++ brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx2019-02-12 
03:51:21 UTC (rev 72422)
@@ -176,6 +176,21 @@
 std::cout << "local_path: " << n.local_path << std::endl;
 }
 
+// Don't care about deletes on old tags...
+bool reject_branch(std::string rbranch)
+{
+if (rbranch == std::string("rel-4-5")) return true;
+if (rbranch == std::string("ctj-4-5-post")) return true;
+if (rbranch == std::string("ctj-4-5-pre")) return true;
+if (rbranch == std::string("rel-5-0")) return true;
+if (rbranch == std::string("rel-5-0-beta")) return true;
+if (rbranch == std::string("rel-5-1")) return true;
+if (rbranch == std::string("rel-5-2")) return true;
+if (rbranch == std::string("offsite-5-3-pre")) return true;
+if (rbranch == std::string("rel-5-3")) return true;
+if (rbranch == std::string("rel-5-4")) return true;
+return false;
+}
 
 std::string git_sha1(std::ifstream , struct svn_node *n)
 {
@@ -239,13 +254,13 @@
 }
 
 std::string
-branch_head_id(std::string branch){
+branch_head_id(std::string branch, int rev){
 // If strlen of current head == 40, it's a sha1 and just return it.
 //
 // else, it's a mark and return the string with a colon in front.
 std::string curr_head = branch_head_ids[branch];
 if (!curr_head.length()) {
-   std::cout << "Error - unknown branch " << branch << "\n";
+   std::cout << "Error - unknown branch " << branch << ", " << rev << "\n";
exit(1);
 }
 if (curr_head.length() == 40) return curr_head;
@@ -799,8 +814,8 @@
int tag_after_commit = 0;
int branch_delete = 0;
std::string rbranch = rev.nodes[0].branch;
-   if (rev.revision_number == 66223) {
-   std::cout << "at 66223\n";
+   if (rev.revision_number == 30544) {
+   std::cout << "at 30544\n";
}
 
for (size_t n = 0; n != rev.nodes.size(); n++) {
@@ -827,7 +842,7 @@
std::cout << "Adding tag branch " << tbstr << " 
from " << bbpath << ", r" << rev.revision_number <<"\n";
std::cout << rev.commit_msg << "\n";
outfile << "reset " << tbstr << "\n";
-   outfile << "from " << branch_head_id(bbpath) << 
"\n";
+   outfile << "from " << branch_head_id(bbpath, 
rev.revision_number) << "\n";
branch_head_ids[tbstr] = branch_head_ids[bbpath];
have_commit = 1;
continue;
@@ -853,6 +868,13 @@
 
}
 
+   if (node.tag_delete) {
+   branch_delete = 1;
+   std::cout << "processing revision " << rev.revision_number 
<< "\n";
+   std::cout << "TODO - delete tag: " << node.branch << "\n";
+   continue;
+   }
+
if (node.branch_add) {
std::cout << "Processing revision " << rev.revision_number 
<< "\n";
std::string ppath, bbpath, llpath;
@@ -861,7 +883,7 @@
std::cout << "Adding branch " << node.branch << " from " << 
bbpath << ", r" << rev.revision_number <<"\n";
std::cout << rev.commit_msg << "\n";
outfile << "reset " << node.branch << "\n";
-   outfile << "from " << branch_head_id(bbpath) << "\n";
+   outfile << "from " << branch_head_id(bbpath, 
rev.revision_number) << "\n";
branch_head_ids[node.branch] = branch_head_ids[bbpath];
have_commit = 1;
continue;
@@ -868,7 +890,7 @@
}
 
if (node.branch_delete) {
-   //std::cout << "Processing revision " << 
rev.revision_number << "\n";
+   //std::cout << "processing revision " << 
rev.revision_number << "\n";
//std::cout << "Delete branch instruction: " << node.branch 
<< " - deferring.\n";
branch_delete = 1;
continue;
@@ -887,7 +909,7 @@
if (node.exec_change) {
git_changes = 1;
}
-   if (node.action == ndelete) {
+   if (node.action == ndelete && !reject_branch(rbranch)) {
git_changes = 1;
}

[brlcad-commits] SF.net SVN: brlcad:[72414] brlcad/trunk/misc/repoconv

2019-02-11 Thread starseeker--- via brlcad-commits
Revision: 72414
  http://sourceforge.net/p/brlcad/code/72414
Author:   starseeker
Date: 2019-02-12 00:36:10 + (Tue, 12 Feb 2019)
Log Message:
---
Start working on where branch and tag logic will go in the workflow.

Modified Paths:
--
brlcad/trunk/misc/repoconv/README
brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx

Modified: brlcad/trunk/misc/repoconv/README
===
--- brlcad/trunk/misc/repoconv/README   2019-02-11 21:32:35 UTC (rev 72413)
+++ brlcad/trunk/misc/repoconv/README   2019-02-12 00:36:10 UTC (rev 72414)
@@ -108,6 +108,8 @@
 
 Also needing special awareness will be the dmtogl branches:
 
+Processing revision 36185
+Adding branch refs/heads/dmtogl-branch from refs/heads/master
 Processing revision 36472
 Adding branch refs/heads/dmtogl from refs/heads/dmtogl-branch
 Processing revision 36472

Modified: brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx
===
--- brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx2019-02-11 
21:32:35 UTC (rev 72413)
+++ brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx2019-02-12 
00:36:10 UTC (rev 72414)
@@ -83,6 +83,7 @@
 std::set edited_tags;
 /* The last subversion revision that makes a change to the tag */
 std::map edited_tag_max_rev;
+std::map edited_tag_first_rev;
 
 std::map revs;
 
@@ -693,7 +694,11 @@
// Spot tag edits
if (node.text_content_length > 0 && node.tag_path) {
node.tag_edit = 1;
+   if (edited_tags.find(node.branch) == edited_tags.end()) {
+   edited_tag_first_rev[node.branch] = rev.revision_number;
+   }
edited_tags.insert(node.branch);
+   std::cout << "Edited tag(" << rev.revision_number << "): " << 
node.branch << "\n";
edited_tag_max_rev[node.branch] = rev.revision_number;
}
// Branch add
@@ -750,6 +755,16 @@
 }
 }
 
+void add_branch(struct svn_revision ,  std::ofstream , std::string 
, std::string ) {
+outfile << "commit " << branch << "\n";
+outfile << "mark :" << rev.revision_number << "\n";
+outfile << "committer " << author_map[rev.author] << " " << 
svn_time_to_git_time(rev.timestamp.c_str()) << "\n";
+outfile << "data " << rev.commit_msg.length() << "\n";
+outfile << rev.commit_msg << "\n";
+outfile << "from " << branch_head_id(bbpath) << "\n";
+branch_head_ids[branch] = std::to_string(rev.revision_number);
+}
+
 void rev_fast_export(std::ifstream , std::ofstream , long int 
rev_num_min, long int rev_num_max)
 {
 std::string empty_sha1("da39a3ee5e6b4b0d3255bfef95601890afd80709");
@@ -776,27 +791,75 @@
if (rev.revision_number > rev_num_max) return;
 
if (rev.revision_number >= rev_num_min) {
-
+#if 0
std::cout << "Processing revision " << rev.revision_number << "\n";
if (rev.merged_from.length()) {
std::cout << "Note: merged from " << rev.merged_from << "\n";
}
-
+#endif
int git_changes = 0;
+   int have_commit = 0;
for (size_t n = 0; n != rev.nodes.size(); n++) {
struct svn_node  = rev.nodes[n];
 
+   if (node.tag_add || node.tag_edit) {
+   std::cout << "Processing revision " << rev.revision_number 
<< "\n";
+   if (rev.revision_number == 66171) {
+   std::cout << "at 66171\n";
+   }
+   std::string ppath, bbpath, llpath;
+   int is_tag;
+   node_path_split(node.copyfrom_path, ppath, bbpath, llpath, 
_tag);
+
+   int edited_tag_minr = -1;
+   int edited_tag_maxr = -1;
+
+   // For edited tags - first tag create branch, final tag is 
"real" tag,
+   // else just branch commits
+   if (edited_tags.find(node.branch) != edited_tags.end()) {
+   edited_tag_minr = edited_tag_first_rev[node.branch];
+   edited_tag_maxr = edited_tag_max_rev[node.branch];
+   std::cout << node.branch << ": " << edited_tag_minr << 
" " << edited_tag_maxr << "\n";
+
+   if (rev.revision_number < edited_tag_minr) {
+   std::string tbstr = std::string("refs/heads/") +  
node.branch;
+   std::cout << "Adding tag branch " << tbstr << " 
from " << bbpath << ", r" << rev.revision_number <<"\n";
+   add_branch(rev, outfile, tbstr, bbpath);
+   have_commit = 1;
+   continue;
+   } else {
+   if (rev.revision_number == edited_tag_maxr) {
+   // Note - in this situation, we need to both 
build a commit and do a 

[brlcad-commits] SF.net SVN: brlcad:[72417] brlcad/trunk/src/mged

2019-02-11 Thread brlcad--- via brlcad-commits
Revision: 72417
  http://sourceforge.net/p/brlcad/code/72417
Author:   brlcad
Date: 2019-02-12 01:48:07 + (Tue, 12 Feb 2019)
Log Message:
---
call attention to the stateful gedp, dbip, and wdbp globals in mged by making 
them uppercase.  improves traceability and readability some.

Modified Paths:
--
brlcad/trunk/src/mged/adc.c
brlcad/trunk/src/mged/arbs.c
brlcad/trunk/src/mged/attach.c
brlcad/trunk/src/mged/axes.c
brlcad/trunk/src/mged/buttons.c
brlcad/trunk/src/mged/chgmodel.c
brlcad/trunk/src/mged/chgtree.c
brlcad/trunk/src/mged/chgview.c
brlcad/trunk/src/mged/clone.c
brlcad/trunk/src/mged/cmd.c
brlcad/trunk/src/mged/dm-generic.c
brlcad/trunk/src/mged/dodraw.c
brlcad/trunk/src/mged/doevent.c
brlcad/trunk/src/mged/dozoom.c
brlcad/trunk/src/mged/edsol.c
brlcad/trunk/src/mged/facedef.c
brlcad/trunk/src/mged/grid.c
brlcad/trunk/src/mged/mater.c
brlcad/trunk/src/mged/menu.c
brlcad/trunk/src/mged/mged.c
brlcad/trunk/src/mged/mged.h
brlcad/trunk/src/mged/mged_dm.h
brlcad/trunk/src/mged/mover.c
brlcad/trunk/src/mged/overlay.c
brlcad/trunk/src/mged/plot.c
brlcad/trunk/src/mged/rect.c
brlcad/trunk/src/mged/rtif.c
brlcad/trunk/src/mged/scroll.c
brlcad/trunk/src/mged/set.c
brlcad/trunk/src/mged/setup.c
brlcad/trunk/src/mged/share.c
brlcad/trunk/src/mged/titles.c
brlcad/trunk/src/mged/track.c
brlcad/trunk/src/mged/usepen.c
brlcad/trunk/src/mged/utility1.c

Modified: brlcad/trunk/src/mged/adc.c
===
--- brlcad/trunk/src/mged/adc.c 2019-02-12 01:23:14 UTC (rev 72416)
+++ brlcad/trunk/src/mged/adc.c 2019-02-12 01:48:07 UTC (rev 72417)
@@ -237,9 +237,9 @@
 x2 = adc_state->adc_dv_x + d1 -t1;
 y2 = adc_state->adc_dv_y + d2 + t2;
 if (clip(, , , ) == 0) {
-   dm_draw_line_2d(dmp,
-   GED2PM1(x1), GED2PM1(Y1) * dm_get_aspect(dmp),
-   GED2PM1(x2), GED2PM1(y2) * dm_get_aspect(dmp));
+   dm_draw_line_2d(DMP,
+   GED2PM1(x1), GED2PM1(Y1) * dm_get_aspect(DMP),
+   GED2PM1(x2), GED2PM1(y2) * dm_get_aspect(DMP));
 }
 
 /* Quadrant 2 */
@@ -248,9 +248,9 @@
 x2 = adc_state->adc_dv_x - d2 - t2;
 y2 = adc_state->adc_dv_y + d1 - t1;
 if (clip (, , , ) == 0) {
-   dm_draw_line_2d(dmp,
-   GED2PM1(x1), GED2PM1(Y1) * dm_get_aspect(dmp),
-   GED2PM1(x2), GED2PM1(y2) * dm_get_aspect(dmp));
+   dm_draw_line_2d(DMP,
+   GED2PM1(x1), GED2PM1(Y1) * dm_get_aspect(DMP),
+   GED2PM1(x2), GED2PM1(y2) * dm_get_aspect(DMP));
 }
 
 /* Quadrant 3 */
@@ -259,9 +259,9 @@
 x2 = adc_state->adc_dv_x - d1 + t1;
 y2 = adc_state->adc_dv_y - d2 - t2;
 if (clip (, , , ) == 0) {
-   dm_draw_line_2d(dmp,
-   GED2PM1(x1), GED2PM1(Y1) * dm_get_aspect(dmp),
-   GED2PM1(x2), GED2PM1(y2) * dm_get_aspect(dmp));
+   dm_draw_line_2d(DMP,
+   GED2PM1(x1), GED2PM1(Y1) * dm_get_aspect(DMP),
+   GED2PM1(x2), GED2PM1(y2) * dm_get_aspect(DMP));
 }
 
 /* Quadrant 4 */
@@ -270,9 +270,9 @@
 x2 = adc_state->adc_dv_x + d2 + t2;
 y2 = adc_state->adc_dv_y - d1 + t1;
 if (clip (, , , ) == 0) {
-   dm_draw_line_2d(dmp,
-   GED2PM1(x1), GED2PM1(Y1) * dm_get_aspect(dmp),
-   GED2PM1(x2), GED2PM1(y2) * dm_get_aspect(dmp));
+   dm_draw_line_2d(DMP,
+   GED2PM1(x1), GED2PM1(Y1) * dm_get_aspect(DMP),
+   GED2PM1(x2), GED2PM1(y2) * dm_get_aspect(DMP));
 }
 }
 
@@ -295,19 +295,19 @@
 calc_adc_a2();
 calc_adc_dst();
 
-dm_set_fg(dmp,
+dm_set_fg(DMP,
   color_scheme->cs_adc_line[0],
   color_scheme->cs_adc_line[1],
   color_scheme->cs_adc_line[2], 1, 1.0);
-dm_set_line_attr(dmp, mged_variables->mv_linewidth, 0);
+dm_set_line_attr(DMP, mged_variables->mv_linewidth, 0);
 
 /* Horizontal */
-dm_draw_line_2d(dmp,
-   GED2PM1(GED_MIN), GED2PM1(adc_state->adc_dv_y) * 
dm_get_aspect(dmp),
-   GED2PM1(GED_MAX), GED2PM1(adc_state->adc_dv_y) * 
dm_get_aspect(dmp));
+dm_draw_line_2d(DMP,
+   GED2PM1(GED_MIN), GED2PM1(adc_state->adc_dv_y) * 
dm_get_aspect(DMP),
+   GED2PM1(GED_MAX), GED2PM1(adc_state->adc_dv_y) * 
dm_get_aspect(DMP));
 
 /* Vertical */
-dm_draw_line_2d(dmp,
+dm_draw_line_2d(DMP,
GED2PM1(adc_state->adc_dv_x), GED2PM1(GED_MAX),
GED2PM1(adc_state->adc_dv_x), GED2PM1(GED_MIN));
 
@@ -327,12 +327,12 @@
 x4 = adc_state->adc_dv_x - d2;
 y4 = adc_state->adc_dv_y + d1;
 
-dm_draw_line_2d(dmp,
-   GED2PM1(x1), GED2PM1(Y1) 

[brlcad-commits] SF.net SVN: brlcad:[72421] brlcad/trunk/misc

2019-02-11 Thread starseeker--- via brlcad-commits
Revision: 72421
  http://sourceforge.net/p/brlcad/code/72421
Author:   starseeker
Date: 2019-02-12 03:16:17 + (Tue, 12 Feb 2019)
Log Message:
---
node deletes are commit actions

Modified Paths:
--
brlcad/trunk/misc/CMakeLists.txt
brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx

Modified: brlcad/trunk/misc/CMakeLists.txt
===
--- brlcad/trunk/misc/CMakeLists.txt2019-02-12 03:07:17 UTC (rev 72420)
+++ brlcad/trunk/misc/CMakeLists.txt2019-02-12 03:16:17 UTC (rev 72421)
@@ -146,6 +146,7 @@
   repoconv/svn2git/svn-fast-export/svn.h
   repoconv/svnfexport/sha1.hpp
   repoconv/svnfexport/svn_date.h
+  repoconv/svnfexport/cvssvnsync.cxx
   repoconv/svnfexport/svnfexport.cxx
   uncpowerplant2g.sh
   win32-msvc/CMakeLists.txt

Modified: brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx
===
--- brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx2019-02-12 
03:07:17 UTC (rev 72420)
+++ brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx2019-02-12 
03:16:17 UTC (rev 72421)
@@ -799,14 +799,15 @@
int tag_after_commit = 0;
int branch_delete = 0;
std::string rbranch = rev.nodes[0].branch;
+   if (rev.revision_number == 66223) {
+   std::cout << "at 66223\n";
+   }
+
for (size_t n = 0; n != rev.nodes.size(); n++) {
struct svn_node  = rev.nodes[n];
 
if (node.tag_add || node.tag_edit) {
std::cout << "Processing revision " << rev.revision_number 
<< "\n";
-   if (rev.revision_number == 66171) {
-   std::cout << "at 66171\n";
-   }
std::string ppath, bbpath, llpath;
int is_tag;
node_path_split(node.copyfrom_path, ppath, bbpath, llpath, 
_tag);
@@ -886,6 +887,9 @@
if (node.exec_change) {
git_changes = 1;
}
+   if (node.action == ndelete) {
+   git_changes = 1;
+   }
}
 
if (git_changes) {

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



___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[72423] brlcad/trunk/misc/repoconv/svnfexport/ svnfexport.cxx

2019-02-11 Thread starseeker--- via brlcad-commits
Revision: 72423
  http://sourceforge.net/p/brlcad/code/72423
Author:   starseeker
Date: 2019-02-12 04:10:23 + (Tue, 12 Feb 2019)
Log Message:
---
Need to take a step back and rething the svn->git path mapping - it's causing 
problems with the tags

Modified Paths:
--
brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx

Modified: brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx
===
--- brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx2019-02-12 
03:51:21 UTC (rev 72422)
+++ brlcad/trunk/misc/repoconv/svnfexport/svnfexport.cxx2019-02-12 
04:10:23 UTC (rev 72423)
@@ -814,8 +814,8 @@
int tag_after_commit = 0;
int branch_delete = 0;
std::string rbranch = rev.nodes[0].branch;
-   if (rev.revision_number == 30544) {
-   std::cout << "at 30544\n";
+   if (rev.revision_number == 34022) {
+   std::cout << "at 34022\n";
}
 
for (size_t n = 0; n != rev.nodes.size(); 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
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[72424] brlcad/trunk/src/rt/do.c

2019-02-11 Thread brlcad--- via brlcad-commits
Revision: 72424
  http://sourceforge.net/p/brlcad/code/72424
Author:   brlcad
Date: 2019-02-12 06:18:14 + (Tue, 12 Feb 2019)
Log Message:
---
BU_DEBUG_MEM_LOG no longer does anything

Modified Paths:
--
brlcad/trunk/src/rt/do.c

Modified: brlcad/trunk/src/rt/do.c
===
--- brlcad/trunk/src/rt/do.c2019-02-12 04:10:23 UTC (rev 72423)
+++ brlcad/trunk/src/rt/do.c2019-02-12 06:18:14 UTC (rev 72424)
@@ -1077,10 +1077,6 @@
  */
 view_end();
 
-/* Stop memory debug printing until next frame, leave full checking on */
-if (R_DEBUG_RTMEM)
-   bu_debug &= ~BU_DEBUG_MEM_LOG;
-
 /* These results need to be normalized.  Otherwise, all we would
  * know is that a given workload takes about the same amount of
  * CPU time, regardless of the number of CPUs.

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



___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[72425] brlcad/trunk

2019-02-11 Thread brlcad--- via brlcad-commits
Revision: 72425
  http://sourceforge.net/p/brlcad/code/72425
Author:   brlcad
Date: 2019-02-12 06:59:06 + (Tue, 12 Feb 2019)
Log Message:
---
removed remainders of memory debugging.  minimally impacting (replaced with a 0 
constant) and dev-centric.

Modified Paths:
--
brlcad/trunk/CHANGES
brlcad/trunk/include/bu/debug.h
brlcad/trunk/include/rt/debug.h
brlcad/trunk/src/gtools/tests/bigdb.c
brlcad/trunk/src/proc-db/tea.c
brlcad/trunk/src/proc-db/tea_nmg.c
brlcad/trunk/src/proc-db/wavy.c

Modified: brlcad/trunk/CHANGES
===
--- brlcad/trunk/CHANGES2019-02-12 06:18:14 UTC (rev 72424)
+++ brlcad/trunk/CHANGES2019-02-12 06:59:06 UTC (rev 72425)
@@ -1385,7 +1385,7 @@
 replaced by new BU API
 s/struct[[:space:]]*ged_run_rt/struct ged_subprocess/g
 
-# tentative
-s/bu_getprogname\([[:space:]]*\)/bu_app_name\(NULL\)/g
-s/bu_setprogname/bu_app_name/g
-s/bu_argv0_full_path\([[:space:]]*\)/bu_file_realpath\(bu_app_name\(NULL\)\)/g
+7.30
+
+s/BU_DEBUG_MEM_LOG/0/g
+   bu memory debugging API removed [7.29]

Modified: brlcad/trunk/include/bu/debug.h
===
--- brlcad/trunk/include/bu/debug.h 2019-02-12 06:18:14 UTC (rev 72424)
+++ brlcad/trunk/include/bu/debug.h 2019-02-12 06:59:06 UTC (rev 72425)
@@ -52,11 +52,11 @@
 
 #define BU_DEBUG_COREDUMP   0x0001  /* bu_bomb() should dump core 
on exit */
 #define BU_DEBUG_UNUSED_0   0x0002  /* Unallocated */
-#define BU_DEBUG_MEM_LOG0x0004  /* Print all dynamic memory 
operations */
-#define BU_DEBUG_UNUSED_1   0x0008  /* Unallocated */
+#define BU_DEBUG_UNUSED_1   0x0004  /* Unallocated */
+#define BU_DEBUG_UNUSED_2   0x0008  /* Unallocated */
 
 #define BU_DEBUG_PARALLEL   0x0010  /* Parallel debug logging */
-#define BU_DEBUG_UNUSED_2   0x0020  /* Unallocated */
+#define BU_DEBUG_UNUSED_3   0x0020  /* Unallocated */
 #define BU_DEBUG_BACKTRACE  0x0040  /* Log backtrace details 
during abnormal exit */
 #define BU_DEBUG_ATTACH 0x0080  /* Waits for a debugger to 
attach during a crash */
 
@@ -66,24 +66,24 @@
 #define BU_DEBUG_MAPPED_FILE0x0800  /* bu_mapped_file logging */
 
 #define BU_DEBUG_PATHS  0x1000  /* File and path debug logging 
*/
-#define BU_DEBUG_UNUSED_3   0x2000  /* Unallocated */
-#define BU_DEBUG_UNUSED_4   0x4000  /* Unallocated */
-#define BU_DEBUG_UNUSED_5   0x8000  /* Unallocated */
+#define BU_DEBUG_UNUSED_4   0x2000  /* Unallocated */
+#define BU_DEBUG_UNUSED_5   0x4000  /* Unallocated */
+#define BU_DEBUG_UNUSED_6   0x8000  /* Unallocated */
 
 #define BU_DEBUG_TABDATA0x0001  /* LIBBN: tabdata */
-#define BU_DEBUG_UNUSED_6   0x0002  /* Unallocated */
-#define BU_DEBUG_UNUSED_7   0x0004  /* Unallocated */
-#define BU_DEBUG_UNUSED_8   0x0008  /* Unallocated */
+#define BU_DEBUG_UNUSED_7   0x0002  /* Unallocated */
+#define BU_DEBUG_UNUSED_8   0x0004  /* Unallocated */
+#define BU_DEBUG_UNUSED_9   0x0008  /* Unallocated */
 
 /* Format string for bu_printb() */
 #define BU_DEBUG_FORMAT "\020" /* print hex */ \
-"\024UNUSED_8" \
-"\023UNUSED_7" \
-"\022UNUSED_6" \
+"\024UNUSED_9" \
+"\023UNUSED_8" \
+"\022UNUSED_7" \
 "\021TABDATA" \
-"\020UNUSED_5" \
-"\017UNUSED_4" \
-"\016UNUSED_3" \
+"\020UNUSED_6" \
+"\017UNUSED_5" \
+"\016UNUSED_4" \
 "\015PATHS" \
 "\014MAPPED_FILE" \
 "\013AVS" \
@@ -91,10 +91,10 @@
 "\011MATH" \
 "\010ATTACH" \
 "\7BACKTRACE" \
-"\6UNUSED_2" \
+"\6UNUSED_3" \
 "\5PARALLEL" \
-"\4UNUSED_1" \
-"\3MEM_LOG" \
+"\4UNUSED_2" \
+"\3UNUSED_1" \
 "\2UNUSED_0" \
 "\1COREDUMP"
 

Modified: brlcad/trunk/include/rt/debug.h
===
--- brlcad/trunk/include/rt/debug.h 2019-02-12 06:18:14 UTC (rev 72424)
+++ brlcad/trunk/include/rt/debug.h 2019-02-12 06:59:06 UTC (rev 72425)
@@ -66,8 +66,8 @@
 #define DEBUG_CUT  0x4000  /**< @brief 15 Print space cutting 
statistics */
 #define DEBUG_BOXING   0x8000  /**< @brief 16 Object/box checking 
details */
 
-#define DEBUG_MEM  0x0001  /**< @brief 17 -->> BU_DEBUG_MEM_LOG */
-#define DEBUG_UNUSED_0 0x0002  /**< @brief 18 Unassigned */
+#define DEBUG_UNUSED_0 0x0001  /**< @brief 17 -->> BU_DEBUG_MEM_LOG */
+#define DEBUG_UNUSED_1 0x0002  /**< @brief 18 Unassigned */
 #define DEBUG_FDIFF0x0004  /**< @brief 19 bool/fdiff debugging */
 #define DEBUG_PARALLEL 0x0008  /**< @brief 20 -->> BU_DEBUG_PARALLEL */

[brlcad-commits] SF.net SVN: brlcad:[72396] brlcad/trunk

2019-02-11 Thread starseeker--- via brlcad-commits
Revision: 72396
  http://sourceforge.net/p/brlcad/code/72396
Author:   starseeker
Date: 2019-02-11 16:12:13 + (Mon, 11 Feb 2019)
Log Message:
---
Correct the ordering of the SEM increments - analyze should come before ged.

Modified Paths:
--
brlcad/trunk/include/analyze.h
brlcad/trunk/include/ged/defines.h
brlcad/trunk/src/libged/ged.c

Modified: brlcad/trunk/include/analyze.h
===
--- brlcad/trunk/include/analyze.h  2019-02-11 01:46:21 UTC (rev 72395)
+++ brlcad/trunk/include/analyze.h  2019-02-11 16:12:13 UTC (rev 72396)
@@ -31,7 +31,6 @@
 #include "common.h"
 #include "bu/opt.h"
 #include "bu/vls.h"
-#include "ged/defines.h" /* For GED_SEM_LAST */
 #include "raytrace.h"
 
 __BEGIN_DECLS
@@ -51,7 +50,7 @@
 /* Libanalyze return codes */
 #define ANALYZE_OK 0x
 #define ANALYZE_ERROR 0x0001 /**< something went wrong, function not completed 
*/
-#define ANALYZE_SEM_WORKER GED_SEM_LAST
+#define ANALYZE_SEM_WORKER RT_SEM_LAST
 #define ANALYZE_SEM_STATS ANALYZE_SEM_WORKER+1
 #define ANALYZE_SEM_LIST ANALYZE_SEM_STATS+1
 #define ANALYZE_SEM_LAST ANALYZE_SEM_LIST+1

Modified: brlcad/trunk/include/ged/defines.h
===
--- brlcad/trunk/include/ged/defines.h  2019-02-11 01:46:21 UTC (rev 72395)
+++ brlcad/trunk/include/ged/defines.h  2019-02-11 16:12:13 UTC (rev 72396)
@@ -36,6 +36,7 @@
 #include "bu/vls.h"
 #include "dm/bview.h"
 #include "rt/search.h"
+#include "analyze.h"
 
 __BEGIN_DECLS
 
@@ -87,7 +88,7 @@
  * Definition of global parallel-processing semaphores.
  *
  */
-#define GED_SEM_WORKER RT_SEM_LAST
+#define GED_SEM_WORKER ANALYZE_SEM_LAST
 #define GED_SEM_STATS GED_SEM_WORKER+1
 #define GED_SEM_LIST GED_SEM_STATS+1
 #define GED_SEM_LAST GED_SEM_LIST+1
@@ -221,6 +222,9 @@
 int (*del)(struct ged *gedp, const char *name);
 int (*run)(struct ged *gedp, int ac, char *av[]);
 
+struct analyze_densities   *gd_densities; /**< @brief active density 
definitions */
+const char  *gd_source;/**< @brief source of density 
definitions */
+
 struct ged_subprocess  gd_headSubprocess; /**< @brief  head of forked 
processes */
 
 void *ged_interp; /* Temporary - do not rely on when designing new 
functionality */

Modified: brlcad/trunk/src/libged/ged.c
===
--- brlcad/trunk/src/libged/ged.c   2019-02-11 01:46:21 UTC (rev 72395)
+++ brlcad/trunk/src/libged/ged.c   2019-02-11 16:12:13 UTC (rev 72396)
@@ -188,6 +188,17 @@
 
 free_object_selections(gedp->ged_selections);
 bu_hash_destroy(gedp->ged_selections);
+
+
+if (gedp->gd_densities) {
+   analyze_densities_destroy(gedp->gd_densities);
+}
+gedp->gd_densities = NULL;
+if (gedp->gd_source) {
+   bu_free(gedp->gd_source, "free density source path");
+}
+gedp->gd_source = NULL;
+
 }
 
 
@@ -267,6 +278,9 @@
 
 gedp->ged_selections = bu_hash_create(32);
 
+gedp->gd_densities = NULL;
+gedp->gd_source = NULL;
+
 /* init the solid list */
 BU_GET(freesolid, struct solid);
 BU_LIST_INIT(>l);

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



___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[72397] brlcad/trunk

2019-02-11 Thread starseeker--- via brlcad-commits
Revision: 72397
  http://sourceforge.net/p/brlcad/code/72397
Author:   starseeker
Date: 2019-02-11 16:18:58 + (Mon, 11 Feb 2019)
Log Message:
---
Hmm - that's causing other problems...

Modified Paths:
--
brlcad/trunk/include/analyze.h
brlcad/trunk/include/ged/defines.h
brlcad/trunk/src/libanalyze/api.c
brlcad/trunk/src/libged/ged.c

Modified: brlcad/trunk/include/analyze.h
===
--- brlcad/trunk/include/analyze.h  2019-02-11 16:12:13 UTC (rev 72396)
+++ brlcad/trunk/include/analyze.h  2019-02-11 16:18:58 UTC (rev 72397)
@@ -31,6 +31,7 @@
 #include "common.h"
 #include "bu/opt.h"
 #include "bu/vls.h"
+#include "ged/defines.h" /* For GED_SEM_LAST */
 #include "raytrace.h"
 
 __BEGIN_DECLS
@@ -50,7 +51,7 @@
 /* Libanalyze return codes */
 #define ANALYZE_OK 0x
 #define ANALYZE_ERROR 0x0001 /**< something went wrong, function not completed 
*/
-#define ANALYZE_SEM_WORKER RT_SEM_LAST
+#define ANALYZE_SEM_WORKER GED_SEM_LAST
 #define ANALYZE_SEM_STATS ANALYZE_SEM_WORKER+1
 #define ANALYZE_SEM_LIST ANALYZE_SEM_STATS+1
 #define ANALYZE_SEM_LAST ANALYZE_SEM_LIST+1

Modified: brlcad/trunk/include/ged/defines.h
===
--- brlcad/trunk/include/ged/defines.h  2019-02-11 16:12:13 UTC (rev 72396)
+++ brlcad/trunk/include/ged/defines.h  2019-02-11 16:18:58 UTC (rev 72397)
@@ -36,7 +36,6 @@
 #include "bu/vls.h"
 #include "dm/bview.h"
 #include "rt/search.h"
-#include "analyze.h"
 
 __BEGIN_DECLS
 
@@ -88,7 +87,7 @@
  * Definition of global parallel-processing semaphores.
  *
  */
-#define GED_SEM_WORKER ANALYZE_SEM_LAST
+#define GED_SEM_WORKER RT_SEM_LAST
 #define GED_SEM_STATS GED_SEM_WORKER+1
 #define GED_SEM_LIST GED_SEM_STATS+1
 #define GED_SEM_LAST GED_SEM_LIST+1
@@ -222,9 +221,6 @@
 int (*del)(struct ged *gedp, const char *name);
 int (*run)(struct ged *gedp, int ac, char *av[]);
 
-struct analyze_densities   *gd_densities; /**< @brief active density 
definitions */
-const char  *gd_source;/**< @brief source of density 
definitions */
-
 struct ged_subprocess  gd_headSubprocess; /**< @brief  head of forked 
processes */
 
 void *ged_interp; /* Temporary - do not rely on when designing new 
functionality */

Modified: brlcad/trunk/src/libanalyze/api.c
===
--- brlcad/trunk/src/libanalyze/api.c   2019-02-11 16:12:13 UTC (rev 72396)
+++ brlcad/trunk/src/libanalyze/api.c   2019-02-11 16:18:58 UTC (rev 72397)
@@ -923,7 +923,7 @@
 
 if ((state->analysis_flags & 
(ANALYSIS_ADJ_AIR|ANALYSIS_EXP_AIR|ANALYSIS_FIRST_AIR|ANALYSIS_LAST_AIR|ANALYSIS_UNCONF_AIR))
 && ! state->use_air) {
bu_log("\nError:  Air regions discarded but air analysis 
requested!\nSet use_air non-zero or eliminate air analysis\n");
-   return GED_ERROR;
+   return ANALYZE_ERROR;
 }
 
 if (state->analysis_flags & ANALYSIS_EXP_AIR) {

Modified: brlcad/trunk/src/libged/ged.c
===
--- brlcad/trunk/src/libged/ged.c   2019-02-11 16:12:13 UTC (rev 72396)
+++ brlcad/trunk/src/libged/ged.c   2019-02-11 16:18:58 UTC (rev 72397)
@@ -188,17 +188,6 @@
 
 free_object_selections(gedp->ged_selections);
 bu_hash_destroy(gedp->ged_selections);
-
-
-if (gedp->gd_densities) {
-   analyze_densities_destroy(gedp->gd_densities);
-}
-gedp->gd_densities = NULL;
-if (gedp->gd_source) {
-   bu_free(gedp->gd_source, "free density source path");
-}
-gedp->gd_source = NULL;
-
 }
 
 
@@ -278,9 +267,6 @@
 
 gedp->ged_selections = bu_hash_create(32);
 
-gedp->gd_densities = NULL;
-gedp->gd_source = NULL;
-
 /* init the solid list */
 BU_GET(freesolid, struct solid);
 BU_LIST_INIT(>l);

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



___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits


[brlcad-commits] SF.net SVN: brlcad:[72398] brlcad/trunk/include

2019-02-11 Thread starseeker--- via brlcad-commits
Revision: 72398
  http://sourceforge.net/p/brlcad/code/72398
Author:   starseeker
Date: 2019-02-11 16:25:37 + (Mon, 11 Feb 2019)
Log Message:
---
Hmm.  Having analyze.h in ged/defines.h isn't working.  Not sure why, but the 
ged.h inclusion will handle it for now...

Modified Paths:
--
brlcad/trunk/include/analyze.h
brlcad/trunk/include/ged/defines.h
brlcad/trunk/include/ged.h

Modified: brlcad/trunk/include/analyze.h
===
--- brlcad/trunk/include/analyze.h  2019-02-11 16:18:58 UTC (rev 72397)
+++ brlcad/trunk/include/analyze.h  2019-02-11 16:25:37 UTC (rev 72398)
@@ -31,7 +31,6 @@
 #include "common.h"
 #include "bu/opt.h"
 #include "bu/vls.h"
-#include "ged/defines.h" /* For GED_SEM_LAST */
 #include "raytrace.h"
 
 __BEGIN_DECLS
@@ -51,7 +50,7 @@
 /* Libanalyze return codes */
 #define ANALYZE_OK 0x
 #define ANALYZE_ERROR 0x0001 /**< something went wrong, function not completed 
*/
-#define ANALYZE_SEM_WORKER GED_SEM_LAST
+#define ANALYZE_SEM_WORKER RT_SEM_LAST
 #define ANALYZE_SEM_STATS ANALYZE_SEM_WORKER+1
 #define ANALYZE_SEM_LIST ANALYZE_SEM_STATS+1
 #define ANALYZE_SEM_LAST ANALYZE_SEM_LIST+1

Modified: brlcad/trunk/include/ged/defines.h
===
--- brlcad/trunk/include/ged/defines.h  2019-02-11 16:18:58 UTC (rev 72397)
+++ brlcad/trunk/include/ged/defines.h  2019-02-11 16:25:37 UTC (rev 72398)
@@ -87,7 +87,7 @@
  * Definition of global parallel-processing semaphores.
  *
  */
-#define GED_SEM_WORKER RT_SEM_LAST
+#define GED_SEM_WORKER ANALYZE_SEM_LAST
 #define GED_SEM_STATS GED_SEM_WORKER+1
 #define GED_SEM_LIST GED_SEM_STATS+1
 #define GED_SEM_LAST GED_SEM_LIST+1

Modified: brlcad/trunk/include/ged.h
===
--- brlcad/trunk/include/ged.h  2019-02-11 16:18:58 UTC (rev 72397)
+++ brlcad/trunk/include/ged.h  2019-02-11 16:25:37 UTC (rev 72398)
@@ -36,6 +36,7 @@
 #include "dm/bview.h"
 #include "raytrace.h"
 #include "rt/solid.h"
+#include "analyze.h"
 #include "ged/defines.h"
 #include "ged/database.h"
 #include "ged/objects.h"

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



___
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits