Revision: 33607
          http://brlcad.svn.sourceforge.net/brlcad/?rev=33607&view=rev
Author:   bob1961
Date:     2009-01-26 22:06:20 +0000 (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 <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+
+#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", 0xffffffffL, 
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 <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+
+#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: "stroustrup"
+ * End:
+ * ex: shiftwidth=4 tabstop=8
+ */


Property changes on: brlcad/trunk/src/libged/debugdir.c
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native

Added: brlcad/trunk/src/libged/debuglib.c
===================================================================
--- brlcad/trunk/src/libged/debuglib.c                          (rev 0)
+++ brlcad/trunk/src/libged/debuglib.c  2009-01-26 22:06:20 UTC (rev 33607)
@@ -0,0 +1,82 @@
+/*                         D E B U G L I B . 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 debuglib.c
+ *
+ * The debuglib command.
+ *
+ */
+
+#include "common.h"
+#include "bio.h"
+
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+
+#include "ged_private.h"
+
+
+int
+ged_debuglib(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 librt's debug bit vector */
+    if (argc == 1) {
+       bu_vls_printb(&gedp->ged_result_str, "Possible flags", 0xffffffffL, 
DEBUG_FORMAT);
+       bu_vls_printf(&gedp->ged_result_str, "\n");
+    } else {
+       /* set librt's debug bit vector */
+       if (sscanf(argv[1], "%x", (unsigned int *)&rt_g.debug) != 1) {
+           bu_vls_printf(&gedp->ged_result_str, "Usage: %s %s", argv[0], 
usage);
+           return BRLCAD_ERROR;
+       }
+
+       if (RT_G_DEBUG) bu_debug |= BU_DEBUG_COREDUMP;
+    }
+
+    bu_vls_printb(&gedp->ged_result_str, "librt RT_G_DEBUG", RT_G_DEBUG, 
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/debuglib.c
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native

Added: brlcad/trunk/src/libged/debugmem.c
===================================================================
--- brlcad/trunk/src/libged/debugmem.c                          (rev 0)
+++ brlcad/trunk/src/libged/debugmem.c  2009-01-26 22:06:20 UTC (rev 33607)
@@ -0,0 +1,66 @@
+/*                         D E B U G M E M . 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 debugmem.c
+ *
+ * The debugmem command.
+ *
+ */
+
+#include "common.h"
+#include "bio.h"
+
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+
+#include "ged_private.h"
+
+
+int
+ged_debugmem(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;
+    }
+
+    bu_prmem("Invoked via libged");
+
+    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/debugmem.c
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native

Added: brlcad/trunk/src/libged/debugnmg.c
===================================================================
--- brlcad/trunk/src/libged/debugnmg.c                          (rev 0)
+++ brlcad/trunk/src/libged/debugnmg.c  2009-01-26 22:06:20 UTC (rev 33607)
@@ -0,0 +1,80 @@
+/*                         D E B U G N M G . 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 debugnmg.c
+ *
+ * The debugnmg command.
+ *
+ */
+
+#include "common.h"
+#include "bio.h"
+
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+
+#include "ged_private.h"
+
+
+int
+ged_debugnmg(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 librt's NMG debug bit vector */
+    if (argc == 1) {
+       bu_vls_printb(&gedp->ged_result_str, "Possible flags", 0xffffffffL, 
NMG_DEBUG_FORMAT );
+       bu_vls_printf(&gedp->ged_result_str, "\n");
+    } else {
+       /* set librt's NMG debug bit vector */
+       if (sscanf(argv[1], "%x", (unsigned int *)&rt_g.NMG_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, "librt rt_g.NMG_debug", bu_debug, 
NMG_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/debugnmg.c
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native


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

Reply via email to