Revision: 42328
http://brlcad.svn.sourceforge.net/brlcad/?rev=42328&view=rev
Author: starseeker
Date: 2011-01-16 20:49:19 +0000 (Sun, 16 Jan 2011)
Log Message:
-----------
Update cmake branch to trunk r42327
Modified Paths:
--------------
brlcad/branches/cmake/HACKING
brlcad/branches/cmake/INSTALL
brlcad/branches/cmake/NEWS
brlcad/branches/cmake/TODO
brlcad/branches/cmake/configure.ac
brlcad/branches/cmake/doc/docbook/articles/en/oed.xml
brlcad/branches/cmake/doc/docbook/system/mann/en/qorot.xml
brlcad/branches/cmake/include/bu.h
brlcad/branches/cmake/src/burst/Hm.c
brlcad/branches/cmake/src/conv/g-xxx_facets.c
brlcad/branches/cmake/src/fb/cat-fb.c
brlcad/branches/cmake/src/gtools/g_diff.c
brlcad/branches/cmake/src/libged/wdb_obj.c
brlcad/branches/cmake/src/librt/tree.c
brlcad/branches/cmake/src/util/bwcrop.c
Property Changed:
----------------
brlcad/branches/cmake/
brlcad/branches/cmake/src/other/tkhtml/
Property changes on: brlcad/branches/cmake
___________________________________________________________________
Modified: svn:mergeinfo
-
/brlcad/trunk:37932-39894,41673-41706,41994-41998,42011-42052,42060-42120,42240-42293
+
/brlcad/trunk:37932-39894,41673-41706,41994-41998,42011-42052,42060-42120,42240-42327
Modified: brlcad/branches/cmake/HACKING
===================================================================
--- brlcad/branches/cmake/HACKING 2011-01-16 19:32:56 UTC (rev 42327)
+++ brlcad/branches/cmake/HACKING 2011-01-16 20:49:19 UTC (rev 42328)
@@ -180,7 +180,7 @@
scope and passing as parameters or embedding them in structures as
data.
-In addtion, don't be afraid to rewrite code or throw away code that
+In addition, don't be afraid to rewrite code or throw away code that
"smells bad". No code is sacred. Perfection is achieved not when
there is nothing more to add but, rather, when there is nothing more
to take away.
@@ -421,7 +421,7 @@
removed outright. It's okay to make modifications that assume
compiler conformance with the ANSI C standard (c89).
-There currently no C++ interface to the core BRL-CAD libraries. There
+There is currently no C++ interface to the core BRL-CAD libraries. There
are a few tools and enhancements to libraries that are implemented in
C++ (the new BREP object type in librt, for example), but there are
presently no C++ bindings available beyond experimental developments.
Modified: brlcad/branches/cmake/INSTALL
===================================================================
--- brlcad/branches/cmake/INSTALL 2011-01-16 19:32:56 UTC (rev 42327)
+++ brlcad/branches/cmake/INSTALL 2011-01-16 20:49:19 UTC (rev 42328)
@@ -90,7 +90,7 @@
For the unspecialized binary distributions that are basically
compressed tarballs of the installation root, they should contain the
entire hierarchy of the distribution. That is to say that they
-contain /usr/brlcad in it's entirety so that if you decompress, you
+contain /usr/brlcad in its entirety so that if you decompress, you
will have a `usr' directory that contains a single `brlcad' directory:
gunzip brlcad-7.2.4_linux_ia64.tar.gz
@@ -123,13 +123,13 @@
INSTALLING FROM SOURCE
----------------------
-There are a couple means to obtain the BRL-CAD sources, usually via
+There are a couple of ways to obtain the BRL-CAD sources, usually via
one of the following starting points:
1) from a SVN checkout/export, or
2) from a source distribution tarball
-Using the latest SVN sources is recommended where possible, since it
+Using the latest SVN sources is recommended where possible since it
will have the latest changes. See the corresponding section below for
details on how to install from either starting point.
Modified: brlcad/branches/cmake/NEWS
===================================================================
--- brlcad/branches/cmake/NEWS 2011-01-16 19:32:56 UTC (rev 42327)
+++ brlcad/branches/cmake/NEWS 2011-01-16 20:49:19 UTC (rev 42328)
@@ -13,6 +13,8 @@
--- 2010-12-XX Release 7.18.2 ---
----------------------------------------------------------------------
+* fixed g_diff color table difference false positive - Sean Morrison
+* fixed asc2g color table bug parsing 'color' lines - Sean Morrison
* 'attr show' command displays attributes sorted by name - Tom Browder
* fixed ted command to work using new editor support - Cliff Yapp
* fixed mged text editor invocation bug when editor wasn't installed
Modified: brlcad/branches/cmake/TODO
===================================================================
--- brlcad/branches/cmake/TODO 2011-01-16 19:32:56 UTC (rev 42327)
+++ brlcad/branches/cmake/TODO 2011-01-16 20:49:19 UTC (rev 42328)
@@ -44,6 +44,11 @@
THESE ARE UNSCHEDULED BACKLOG TASKS
-----------------------------------
+* bu_basename() says it'll return things that it probably won't
+ return. like /path/to/file/ should return file and //// returning /
+ instead of empty. probably should portably handle path separators
+ too, otherwise it's kind of meaningless in bu.
+
* add distribution test for making sure the source code conventions
for function replacements are being respected (e.g., bu_strcmp()
instead of strcmp()).
Modified: brlcad/branches/cmake/configure.ac
===================================================================
--- brlcad/branches/cmake/configure.ac 2011-01-16 19:32:56 UTC (rev 42327)
+++ brlcad/branches/cmake/configure.ac 2011-01-16 20:49:19 UTC (rev 42328)
@@ -2047,7 +2047,25 @@
dnl debug flags
if test "x$bc_use_debug" != "xno" ; then
- BC_COMPILER_AND_LINKER_RECOGNIZES([-ggdb3], [debug_flag])
+
+ dnl FIXME: fugly workaround as there is no known
+ dnl feature-specific way to detect -ggdb3 or -gstabs+ is
+ dnl preferred and libtool+Mac 10.4 will work with -ggdb3.
+
+ AC_CHECK_PROGS(SW_VERS, sw_vers)
+ if test "x$SW_VERS" != "x"; then
+ AC_MSG_CHECKING(Mac OS X version for debugging)
+ MACOSX_VERSION=`$SW_VERS | sed -n
"s/^ProductVersion:[[[:space:]]]//p" | cut -f 1-3 -d.`
+ AC_MSG_RESULT([$MACOSX_VERSION])
+ fi
+ case "x$MACOSX_VERSION" in
+ x10.[1234])
+ BC_COMPILER_AND_LINKER_RECOGNIZES([-gstabs+], [debug_flag])
+ ;;
+ *)
+ BC_COMPILER_AND_LINKER_RECOGNIZES([-ggdb3], [debug_flag])
+ ;;
+ esac
if test "x$bc_debug_flag_works" = "xno" ; then
BC_COMPILER_AND_LINKER_RECOGNIZES([-g], [debug_flag])
fi
Modified: brlcad/branches/cmake/doc/docbook/articles/en/oed.xml
===================================================================
--- brlcad/branches/cmake/doc/docbook/articles/en/oed.xml 2011-01-16
19:32:56 UTC (rev 42327)
+++ brlcad/branches/cmake/doc/docbook/articles/en/oed.xml 2011-01-16
20:49:19 UTC (rev 42328)
@@ -206,7 +206,7 @@
<literallayout class="monospaced">comb object1.c u sphere.s u
cube.s</literallayout>
- After this command both the primitives and the combination are \
+ After this command both the primitives and the combination are
present in the display, which will result in overlaps. Use the
<command>B</command> command to reduce the display to just the
combination.
@@ -867,6 +867,13 @@
are possible if the wrong path is used.
</para>
</listitem>
+ <listitem>
+ <para>
+ When using <command>oed</command> in a script, the object must be in
view so a
+ <command>B</command> or <command>draw</command> command to select
the object must
+ be entered before using the <command>oed</command> command on it.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</sect1>
Modified: brlcad/branches/cmake/doc/docbook/system/mann/en/qorot.xml
===================================================================
--- brlcad/branches/cmake/doc/docbook/system/mann/en/qorot.xml 2011-01-16
19:32:56 UTC (rev 42327)
+++ brlcad/branches/cmake/doc/docbook/system/mann/en/qorot.xml 2011-01-16
20:49:19 UTC (rev 42328)
@@ -72,7 +72,7 @@
<refsect1 id='examples'>
<title>EXAMPLES</title>
- <para>The example shows the use of the <command>quorot</command> command to
rotate a currently edited object through a specified angle and starting point
and in a particular direction.
+ <para>The example shows the use of the <command>qorot</command> command to
rotate a currently edited object through a specified angle and starting point
and in a particular direction.
</para>
Modified: brlcad/branches/cmake/include/bu.h
===================================================================
--- brlcad/branches/cmake/include/bu.h 2011-01-16 19:32:56 UTC (rev 42327)
+++ brlcad/branches/cmake/include/bu.h 2011-01-16 20:49:19 UTC (rev 42328)
@@ -3324,6 +3324,9 @@
* Given a filesystem pathname, return a pointer to a dynamic string
* which is the parent directory of that file/directory.
*
+ * It is the caller's responsibility to bu_free() the pointer returned
+ * from this routine. Examples of strings returned:
+ *
* /usr/dir/file /usr/dir
* @n /usr/dir/ /usr
* @n /usr/file /usr
@@ -3339,11 +3342,6 @@
*
* This routine will return "." if other valid results are not available
* but should never return NULL.
- *
- * Caller is responsible for freeing memory used by the return.
- *
- * Warning: don't rely on non-constness of bu_dirname().. will change
- * to const.
*/
BU_EXPORT BU_EXTERN(char *bu_dirname,
(const char *cp));
Modified: brlcad/branches/cmake/src/burst/Hm.c
===================================================================
--- brlcad/branches/cmake/src/burst/Hm.c 2011-01-16 19:32:56 UTC (rev
42327)
+++ brlcad/branches/cmake/src/burst/Hm.c 2011-01-16 20:49:19 UTC (rev
42328)
@@ -199,22 +199,6 @@
/*
- void HmPrntLList(HmLList *listp) (DEBUG)
-
- Print all HmItem's in listp.
-*/
-static void
-HmPrntLList(HmLList *listp)
-{
- if (listp == (HmLList *) NULL)
- return;
- HmPrntItem(listp->itemp);
- HmPrntLList(listp->next);
- return;
-}
-
-
-/*
void HmFreeItems(Hmitem *itemp)
Free storage (allocated with malloc) for an array of HmItem's.
Modified: brlcad/branches/cmake/src/conv/g-xxx_facets.c
===================================================================
--- brlcad/branches/cmake/src/conv/g-xxx_facets.c 2011-01-16 19:32:56 UTC
(rev 42327)
+++ brlcad/branches/cmake/src/conv/g-xxx_facets.c 2011-01-16 20:49:19 UTC
(rev 42328)
@@ -27,12 +27,10 @@
#include "common.h"
-#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <math.h>
#include <string.h>
-#include "bio.h"
#include "vmath.h"
#include "nmg.h"
@@ -52,8 +50,9 @@
extern double nmg_eue_dist; /* from nmg_plot.c */
static char usage[] = "\
-Usage: %s [-v][-xX lvl][-a abs_tess_tol][-r rel_tess_tol][-n norm_tess_tol]\n\
-[-D dist_calc_tol] -o output_file_name brlcad_db.g object(s)\n";
+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)][-D dist_calc_tol (default: 0.005)]\n\
+ -o output_file_name brlcad_db.g object(s)\n";
static int NMG_debug; /* saved arg of -X, for longjmp handling */
static int verbose;
@@ -70,14 +69,11 @@
static int regions_written = 0;
static unsigned int tot_polygons = 0;
-
/*
* M A I N
*/
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char **argv)
{
int c;
double percent;
@@ -183,12 +179,12 @@
/* Walk indicated tree(s). Each region will be output separately */
(void) db_walk_tree(dbip, argc-1, (const char **)(argv+1),
- 1, /* ncpu */
- &tree_state,
- 0, /* take all regions */
- do_region_end,
- nmg_booltree_leaf_tess,
- (genptr_t)NULL); /* in librt/nmg_bool.c */
+ 1, /* ncpu */
+ &tree_state,
+ 0, /* take all regions */
+ do_region_end,
+ nmg_booltree_leaf_tess,
+ (genptr_t)NULL); /* in librt/nmg_bool.c */
percent = 0;
if (regions_tried>0) {
@@ -206,6 +202,12 @@
bu_log( "%ld triangles written\n", tot_polygons );
+ bu_log( "Tesselation parameters used:\n");
+ bu_log( " abs [-a] %g\n", ttol.abs );
+ bu_log( " rel [-r] %g\n", ttol.rel );
+ bu_log( " norm [-n] %g\n", ttol.norm );
+ bu_log( " dist [-D] %g\n", tol.dist );
+
/* Release dynamic storage */
nmg_km(the_model);
rt_vlist_cleanup();
Modified: brlcad/branches/cmake/src/fb/cat-fb.c
===================================================================
--- brlcad/branches/cmake/src/fb/cat-fb.c 2011-01-16 19:32:56 UTC (rev
42327)
+++ brlcad/branches/cmake/src/fb/cat-fb.c 2011-01-16 20:49:19 UTC (rev
42328)
@@ -764,7 +764,7 @@
cfont = relfont();
fontdes[cfont].fnum = fnum;
- fontdes[cfont].psize = fontdes[cfont].psize = size;
+ fontdes[cfont].psize = size;
fontdes[cfont].vfp = vfp;
if (debug) fprintf(stderr, "slot %d = %s\n", cfont, cbuf );
Modified: brlcad/branches/cmake/src/gtools/g_diff.c
===================================================================
--- brlcad/branches/cmake/src/gtools/g_diff.c 2011-01-16 19:32:56 UTC (rev
42327)
+++ brlcad/branches/cmake/src/gtools/g_diff.c 2011-01-16 20:49:19 UTC (rev
42328)
@@ -86,101 +86,79 @@
int found1 = 0, found2 = 0;
int is_diff = 0;
- for (mp1 = mater_hd1; mp1 != MATER_NULL; mp1 = mp1->mt_forw) {
+ /* find a match for all color table entries of file1 in file2 */
+ for (mp1 = mater_hd1; is_diff == 0 && mp1 != MATER_NULL; mp1 =
mp1->mt_forw) {
found1 = 0;
mp2 = mater_hd2;
while (mp2 != MATER_NULL) {
- if (mp1->mt_low == mp2->mt_low &&
- mp1->mt_high == mp2->mt_high &&
- mp1->mt_r == mp2->mt_r &&
- mp1->mt_g == mp2->mt_g &&
- mp1->mt_b == mp2->mt_b) {
+ if (mp1->mt_low == mp2->mt_low
+ && mp1->mt_high == mp2->mt_high
+ && mp1->mt_r == mp2->mt_r
+ && mp1->mt_g == mp2->mt_g
+ && mp1->mt_b == mp2->mt_b)
+ {
found1 = 1;
break;
- } else {
- mp2 = mp2->mt_forw;
}
+ mp2 = mp2->mt_forw;
}
- if (!found1)
- break;
+ if (!found1) {
+ /* bu_log("could not find %d..%d: %d %d %d\n", mp1->mt_low,
mp1->mt_high, mp1->mt_r, mp1->mt_g, mp1->mt_b); */
+ is_diff = 1;
+ }
}
- for (mp2 = mater_hd2; mp2 != MATER_NULL; mp2 = mp2->mt_forw) {
- found1 = 0;
+
+ /* find a match for all color tabl eentries of file2 in file1 */
+ for (mp2 = mater_hd2; is_diff == 0 && mp2 != MATER_NULL; mp2 =
mp2->mt_forw) {
+ found2 = 0;
mp1 = mater_hd1;
while (mp1 != MATER_NULL) {
- if (mp1->mt_low == mp2->mt_low &&
- mp1->mt_high == mp2->mt_high &&
- mp1->mt_r == mp2->mt_r &&
- mp1->mt_g == mp2->mt_g &&
- mp1->mt_b == mp2->mt_b) {
+ if (mp1->mt_low == mp2->mt_low
+ && mp1->mt_high == mp2->mt_high
+ && mp1->mt_r == mp2->mt_r
+ && mp1->mt_g == mp2->mt_g
+ && mp1->mt_b == mp2->mt_b)
+ {
found2 = 1;
break;
- } else {
- mp1 = mp1->mt_forw;
}
+ mp1 = mp1->mt_forw;
}
- if (!found2)
- break;
+ if (!found2) {
+ /* bu_log("could not find %d..%d: %d %d %d\n", mp1->mt_low,
mp1->mt_high, mp1->mt_r, mp1->mt_g, mp1->mt_b); */
+ is_diff = 1;
+ }
}
- if (!found1 && !found2) {
+
+ if (is_diff == 0) {
return 0;
- } else if (!found1 || !found2) {
- is_diff = 1;
- } else {
- /* actually compare two color tables */
- mp1 = mater_hd1;
- mp2 = mater_hd2;
- while (mp1 != MATER_NULL && mp2 != MATER_NULL) {
- if (mp1->mt_low != mp2->mt_low) {
- is_diff = 1;
- break;
- }
- if (mp1->mt_high != mp2->mt_high) {
- is_diff = 1;
- break;
- }
- if (mp1->mt_r != mp2->mt_r) {
- is_diff = 1;
- break;
- }
- if (mp1->mt_g != mp2->mt_g) {
- is_diff = 1;
- break;
- }
- if (mp1->mt_b != mp2->mt_b) {
- is_diff = 1;
- break;
- }
- mp1 = mp1->mt_forw;
- mp2 = mp2->mt_forw;
- }
}
- if (is_diff) {
- if (mode == HUMAN) {
- printf("Color table has changed from:\n");
- for (mp1 = mater_hd1; mp1 != MATER_NULL; mp1 = mp1->mt_forw) {
- printf("\t%d..%d %d %d %d\n", mp1->mt_low, mp1->mt_high,
- mp1->mt_r, mp1->mt_g, mp1->mt_b);
- }
- printf("\t\tto:\n");
+ if (mode == HUMAN) {
+ printf("Color table has changed from:\n");
+ for (mp1 = mater_hd1; mp1 != MATER_NULL; mp1 = mp1->mt_forw) {
+ printf("\t%d..%d %d %d %d\n", mp1->mt_low, mp1->mt_high,
+ mp1->mt_r, mp1->mt_g, mp1->mt_b);
+ }
+ printf("\t\tto:\n");
+ for (mp2 = mater_hd2; mp2 != MATER_NULL; mp2 = mp2->mt_forw) {
+ printf("\t%d..%d %d %d %d\n", mp2->mt_low, mp2->mt_high,
+ mp2->mt_r, mp2->mt_g, mp2->mt_b);
+ }
+ } else {
+ if (version2 > 4) {
+ /* punt, just delete the existing colortable and print a new one */
+ printf("attr rm _GLOBAL regionid_colortable\n");
for (mp2 = mater_hd2; mp2 != MATER_NULL; mp2 = mp2->mt_forw) {
- printf("\t%d..%d %d %d %d\n", mp2->mt_low, mp2->mt_high,
- mp2->mt_r, mp2->mt_g, mp2->mt_b);
- }
- } else {
- if (version2 > 4)
- printf("attr rm _GLOBAL regionid_colortable\n");
- for (mp2 = mater_hd2; mp2 != MATER_NULL; mp2 = mp2->mt_forw) {
printf("color %d %d %d %d %d\n", mp2->mt_low, mp2->mt_high,
mp2->mt_r, mp2->mt_g, mp2->mt_b);
}
}
- return 1;
}
- return 0;
+ return 1;
}
+
void
kill_obj(char *name)
{
Modified: brlcad/branches/cmake/src/libged/wdb_obj.c
===================================================================
--- brlcad/branches/cmake/src/libged/wdb_obj.c 2011-01-16 19:32:56 UTC (rev
42327)
+++ brlcad/branches/cmake/src/libged/wdb_obj.c 2011-01-16 20:49:19 UTC (rev
42328)
@@ -429,6 +429,27 @@
static int
wdb_cmd(ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
{
+ struct bu_cmdtab *ctp = NULL;
+ struct rt_wdb *wdbp = (struct rt_wdb *)clientData;
+ struct ged ged;
+ int ret;
+
+ /* look for the new libged commands too, but don't call bu_cmd()
+ * or wdb_newcmds_tcl() as there's no way to distinguish between
+ * TCL_ERROR from a found command and an unfound command.
+ */
+ GED_INIT(&ged, wdbp);
+ for (ctp = wdb_newcmds; ctp->ct_name != (char *)0; ctp++) {
+ if (BU_STR_EQUAL(ctp->ct_name, argv[1])) {
+ ret = (*ctp->ct_func)(&ged, argc-1, argv+1);
+ Tcl_SetResult(interp, bu_vls_addr(&ged.ged_result_str),
TCL_VOLATILE);
+ if (ret == GED_OK)
+ return TCL_OK;
+ return TCL_ERROR;
+ }
+ }
+
+ /* not a new command -- look for the command in the old command table */
return bu_cmd(clientData, interp, argc, (const char **)argv, wdb_cmds, 1);
}
Modified: brlcad/branches/cmake/src/librt/tree.c
===================================================================
--- brlcad/branches/cmake/src/librt/tree.c 2011-01-16 19:32:56 UTC (rev
42327)
+++ brlcad/branches/cmake/src/librt/tree.c 2011-01-16 20:49:19 UTC (rev
42328)
@@ -557,7 +557,7 @@
} else {
/*
* If there is more than just a direct reference to this leaf
- * from it's containing region, copy that below-region path
+ * from its containing region, copy that below-region path
* into st_path. Otherwise, leave st_path's magic number 0.
*
* XXX nothing depends on this behavior yet, and this whole
Property changes on: brlcad/branches/cmake/src/other/tkhtml
___________________________________________________________________
Modified: svn:mergeinfo
-
/brlcad/trunk/src/other/tkhtml:37932-39894,40417,41673-41706,42011-42052,42060-42120,42240-42293
+
/brlcad/trunk/src/other/tkhtml:37932-39894,40417,41673-41706,42011-42052,42060-42120,42240-42327
Modified: brlcad/branches/cmake/src/util/bwcrop.c
===================================================================
--- brlcad/branches/cmake/src/util/bwcrop.c 2011-01-16 19:32:56 UTC (rev
42327)
+++ brlcad/branches/cmake/src/util/bwcrop.c 2011-01-16 20:49:19 UTC (rev
42328)
@@ -172,7 +172,7 @@
init_buffer(scanlen);
/* Check for silly buffer syndrome */
- if ((size_t)abs((int)(ury - uly)) > buflines/2 || (size_t)abs((int)(lry -
lly)) > buflines/2) {
+ if ((unsigned)abs((int)(ury - uly)) > buflines/2 ||
(unsigned)abs((int)(lry - lly)) > buflines/2) {
fprintf(stderr, "bwcrop: Warning: You are skewing enough in the y
direction\n");
fprintf(stderr, "bwcrop: relative to my buffer size that I will exhibit
silly\n");
fprintf(stderr, "bwcrop: buffer syndrome (two replacements per
scanline).\n");
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits