[brlcad-commits] SF.net SVN: brlcad:[33610] brlcad/trunk/include/bu.h
Revision: 33610 http://brlcad.svn.sourceforge.net/brlcad/?rev=33610&view=rev Author: brlcad Date: 2009-01-27 04:50:38 + (Tue, 27 Jan 2009) Log Message: --- gah, hard-coding to 5 is a problem on 64-bit platforms where long's can be 64-bit and require a 6 shift. must have been asleep at the keyboard. Modified Paths: -- brlcad/trunk/include/bu.h Modified: brlcad/trunk/include/bu.h === --- brlcad/trunk/include/bu.h 2009-01-27 02:16:49 UTC (rev 33609) +++ brlcad/trunk/include/bu.h 2009-01-27 04:50:38 UTC (rev 33610) @@ -966,7 +966,7 @@ * disabled for a handful of primitives that heavily rely on bit * vectors. */ -#define BU_BITV_SHIFT 5 +#define BU_BITV_SHIFT bu_bitv_shift() /** Bit vector mask */ #define BU_BITV_MASK ((1
[brlcad-commits] SF.net SVN: brlcad:[33609] brlcad/trunk/regress/Makefile.am
Revision: 33609 http://brlcad.svn.sourceforge.net/brlcad/?rev=33609&view=rev Author: starseeker Date: 2009-01-27 02:16:49 + (Tue, 27 Jan 2009) Log Message: --- put mged_test.sh in EXTRA_DIST Modified Paths: -- brlcad/trunk/regress/Makefile.am Modified: brlcad/trunk/regress/Makefile.am === --- brlcad/trunk/regress/Makefile.am2009-01-27 01:56:03 UTC (rev 33608) +++ brlcad/trunk/regress/Makefile.am2009-01-27 02:16:49 UTC (rev 33609) @@ -69,6 +69,7 @@ master_fetch.sh \ master_prep.sh \ mged.sh \ + mged_test.sh \ moss.sh \ mosspix.asc \ nightly.sh \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ 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:[33607] brlcad/trunk/src/libged
Revision: 33607 http://brlcad.svn.sourceforge.net/brlcad/?rev=33607&view=rev Author: bob1961 Date: 2009-01-26 22:06:20 + (Mon, 26 Jan 2009) Log Message: --- Oops, forgot to add the new source files for the last libged upgrade. Added Paths: --- brlcad/trunk/src/libged/debugbu.c brlcad/trunk/src/libged/debugdir.c brlcad/trunk/src/libged/debuglib.c brlcad/trunk/src/libged/debugmem.c brlcad/trunk/src/libged/debugnmg.c Added: brlcad/trunk/src/libged/debugbu.c === --- brlcad/trunk/src/libged/debugbu.c (rev 0) +++ brlcad/trunk/src/libged/debugbu.c 2009-01-26 22:06:20 UTC (rev 33607) @@ -0,0 +1,80 @@ +/* D E B U G B U . C + * BRL-CAD + * + * Copyright (c) 2008-2009 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. + */ +/** @file debugbu.c + * + * The debugbu command. + * + */ + +#include "common.h" +#include "bio.h" + +#include +#include +#include + +#include "ged_private.h" + + +int +ged_debugbu(struct ged *gedp, int argc, const char *argv[]) +{ +fastf_t size; +static const char *usage = "[hex_code]"; + +GED_CHECK_DATABASE_OPEN(gedp, BRLCAD_ERROR); +GED_CHECK_ARGC_GT_0(gedp, argc, BRLCAD_ERROR); + +/* initialize result */ +bu_vls_trunc(&gedp->ged_result_str, 0); + +if (argc > 2) { + bu_vls_printf(&gedp->ged_result_str, "Usage: %s %s", argv[0], usage); + return BRLCAD_ERROR; +} + +/* get libbu's debug bit vector */ +if (argc == 1) { + bu_vls_printb(&gedp->ged_result_str, "Possible flags", 0xL, BU_DEBUG_FORMAT ); + bu_vls_printf(&gedp->ged_result_str, "\n"); +} else { + /* set libbu's debug bit vector */ + if (sscanf(argv[1], "%x", (unsigned int *)&bu_debug) != 1) { + bu_vls_printf(&gedp->ged_result_str, "Usage: %s %s", argv[0], usage); + return BRLCAD_ERROR; + } +} + +bu_vls_printb(&gedp->ged_result_str, "bu_debug", bu_debug, BU_DEBUG_FORMAT ); +bu_vls_printf(&gedp->ged_result_str, "\n"); + +return BRLCAD_OK; +} + + +/* + * Local Variables: + * tab-width: 8 + * mode: C + * indent-tabs-mode: t + * c-file-style: "stroustrup" + * End: + * ex: shiftwidth=4 tabstop=8 + */ Property changes on: brlcad/trunk/src/libged/debugbu.c ___ Added: svn:executable + * Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: brlcad/trunk/src/libged/debugdir.c === --- brlcad/trunk/src/libged/debugdir.c (rev 0) +++ brlcad/trunk/src/libged/debugdir.c 2009-01-26 22:06:20 UTC (rev 33607) @@ -0,0 +1,66 @@ +/* D E B U G D I R . C + * BRL-CAD + * + * Copyright (c) 2008-2009 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. + */ +/** @file debugdir.c + * + * The debugdir command. + * + */ + +#include "common.h" +#include "bio.h" + +#include +#include +#include + +#include "ged_private.h" + + +int +ged_debugdir(struct ged *gedp, int argc, const char *argv[]) +{ +fastf_t size; + +GED_CHECK_DATABASE_OPEN(gedp, BRLCAD_ERROR); +GED_CHECK_ARGC_GT_0(gedp, argc, BRLCAD_ERROR); + +/* initialize result */ +bu_vls_trunc(&gedp->ged_result_str, 0); + +if (argc != 1) { + bu_vls_printf(&gedp->ged_result_str, "Usage: %s", argv[0]); + return BRLCAD_ERROR; +} + +db_pr_dir(gedp->ged_wdbp->dbip); + +return BRLCAD_OK; +} + + +/* + * Local Variables: + * tab-width: 8 + * mode: C + * indent-tabs-mode: t + * c-file-style:
[brlcad-commits] SF.net SVN: brlcad:[33606] brlcad/trunk
Revision: 33606 http://brlcad.svn.sourceforge.net/brlcad/?rev=33606&view=rev Author: bob1961 Date: 2009-01-26 19:36:48 + (Mon, 26 Jan 2009) Log Message: --- Added the following functions to libged (also modified MGED to use them): ged_debugbu, ged_debugdir, ged_debuglib, ged_debugmem and ged_debugnmg. Modified Paths: -- brlcad/trunk/include/ged.h brlcad/trunk/misc/win32-msvc8/libged/libged.vcproj brlcad/trunk/src/libged/Makefile.am brlcad/trunk/src/mged/chgview.c brlcad/trunk/src/mged/dir.c brlcad/trunk/src/mged/setup.c Modified: brlcad/trunk/include/ged.h === --- brlcad/trunk/include/ged.h 2009-01-25 16:41:48 UTC (rev 33605) +++ brlcad/trunk/include/ged.h 2009-01-26 19:36:48 UTC (rev 33606) @@ -1387,6 +1387,51 @@ GED_EXPORT BU_EXTERN(int ged_dbip, (struct ged *gedp, int argc, const char *argv[])); /** + * Set/get libbu's debug bit vector + * + * Usage: + * debugbu [hex_code] + * + */ +GED_EXPORT BU_EXTERN(int ged_debugbu, (struct ged *gedp, int argc, const char *argv[])); + +/** + * Dump of the database's directory + * + * Usage: + * debugdir + * + */ +GED_EXPORT BU_EXTERN(int ged_debugdir, (struct ged *gedp, int argc, const char *argv[])); + +/** + * Set/get librt's debug bit vector + * + * Usage: + * debuglib [hex_code] + * + */ +GED_EXPORT BU_EXTERN(int ged_debuglib, (struct ged *gedp, int argc, const char *argv[])); + +/** + * Provides user-level access to LIBBU's bu_prmem() + * + * Usage: + * debugmem + * + */ +GED_EXPORT BU_EXTERN(int ged_debugmem, (struct ged *gedp, int argc, const char *argv[])); + +/** + * Set/get librt's NMG debug bit vector + * + * Usage: + * debugnmg [hex_code] + * + */ +GED_EXPORT BU_EXTERN(int ged_debugnmg, (struct ged *gedp, int argc, const char *argv[])); + +/** * Decompose nmg_solid into maximally connected shells * * Usage: Modified: brlcad/trunk/misc/win32-msvc8/libged/libged.vcproj === --- brlcad/trunk/misc/win32-msvc8/libged/libged.vcproj 2009-01-25 16:41:48 UTC (rev 33605) +++ brlcad/trunk/misc/win32-msvc8/libged/libged.vcproj 2009-01-26 19:36:48 UTC (rev 33606) @@ -378,6 +378,26 @@ > + + + + + + + + + + Modified: brlcad/trunk/src/libged/Makefile.am === --- brlcad/trunk/src/libged/Makefile.am 2009-01-25 16:41:48 UTC (rev 33605) +++ brlcad/trunk/src/libged/Makefile.am 2009-01-26 19:36:48 UTC (rev 33606) @@ -41,6 +41,11 @@ copyeval.c \ cpi.c \ dbip.c \ + debugbu.c \ + debugdir.c \ + debuglib.c \ + debugmem.c \ + debugnmg.c \ decompose.c \ delay.c \ dg_obj.c \ Modified: brlcad/trunk/src/mged/chgview.c === --- brlcad/trunk/src/mged/chgview.c 2009-01-25 16:41:48 UTC (rev 33605) +++ brlcad/trunk/src/mged/chgview.c 2009-01-26 19:36:48 UTC (rev 33606) @@ -603,152 +603,6 @@ } /* - * F _ D E B U G B U - * - * Provide user-level access to LIBBU debug bit vector. - */ -int -f_debugbu(ClientData clientData, - Tcl_Interp*interp, - int argc, - char **argv) -{ -struct bu_vls vls; - -bu_vls_init(&vls); - -if (argc < 1 || 2 < argc) { - bu_vls_printf(&vls, "help debugbu"); - Tcl_Eval(interp, bu_vls_addr(&vls)); - bu_vls_free(&vls); - return TCL_ERROR; -} - - -if ( argc >= 2 ) { - sscanf( argv[1], "%x", (unsigned int *)&bu_debug ); -} else { - bu_vls_printb(&vls, "Possible flags", 0xL, BU_DEBUG_FORMAT ); - bu_vls_printf(&vls, "\n"); -} -bu_vls_printb(&vls, "bu_debug", bu_debug, BU_DEBUG_FORMAT ); -bu_vls_printf(&vls, "\n"); - -Tcl_AppendResult(interp, bu_vls_addr(&vls), (char *)NULL); -bu_vls_free(&vls); - -return TCL_OK; -} - -/* - * F _ D E B U G L I B - * - * Provide user-level access to LIBRT debug bit vector - */ -int -f_debuglib(ClientData clientData, - Tcl_Interp *interp, - int argc, - char **argv) -{ -struct bu_vls vls; - -bu_vls_init(&vls); - -if (argc < 1 || 2 < argc) { - bu_vls_printf(&vls, "help debuglib"); - Tcl_Eval(interp, bu_vls_addr(&vls)); - bu_vls_free(&vls); - return TCL_ERROR; -} - -if (argc >= 2) { - sscanf(argv[1], "%x", (unsigned int *)&rt_g.debug); - if (RT_G_DEBUG) bu_