Revision: 54959
          http://brlcad.svn.sourceforge.net/brlcad/?rev=54959&view=rev
Author:   brlcad
Date:     2013-03-29 04:56:56 +0000 (Fri, 29 Mar 2013)
Log Message:
-----------
quellage, go through libbu and a vls to print size_t values to file.

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

Modified: brlcad/trunk/src/libged/tables.c
===================================================================
--- brlcad/trunk/src/libged/tables.c    2013-03-29 04:54:12 UTC (rev 54958)
+++ brlcad/trunk/src/libged/tables.c    2013-03-29 04:56:56 UTC (rev 54959)
@@ -160,10 +160,14 @@
     BU_ASSERT_SIZE_T(actual_count, ==, node_count);
 
     if (dp->d_flags & RT_DIR_REGION) {
+       struct bu_vls str = BU_VLS_INIT_ZERO;
+
        (*numreg)++;
-       fprintf(tabptr, " %-4ld %4ld %4ld %4ld %4ld  ",
-                     *numreg, comb->region_id, comb->aircode, comb->GIFTmater,
-                     comb->los);
+       bu_vls_printf(&str, " %-4zu %4ld %4ld %4ld %4ld  ",
+                     *numreg, comb->region_id, comb->aircode, comb->GIFTmater, 
comb->los);
+       bu_vls_fwrite(tabptr, &str);
+       bu_vls_free(&str);
+
        for (k = 0; k < BU_PTBL_LEN(cur_path); k++) {
            struct directory *path_dp;
 
@@ -405,9 +409,15 @@
     bu_vls_printf(gedp->ged_result_str, "Summary written in: %s\n", argv[1]);
 
     if (flag == SOL_TABLE || flag == REG_TABLE) {
+       struct bu_vls str = BU_VLS_INIT_ZERO;
+
+       /* FIXME: should not assume /tmp */
        bu_file_delete("/tmp/mged_discr\0");
-       fprintf(tabptr, "\n\nNumber Primitives = %lu  Number Regions = %lu\n",
+
+       bu_vls_printf(&str, "\n\nNumber Primitives = %zu  Number Regions = 
%zu\n",
                      numsol, numreg);
+       bu_vls_fwrite(tabptr, &str);
+       bu_vls_free(&str);
 
        bu_vls_printf(gedp->ged_result_str, "Processed %lu Primitives and %lu 
Regions\n",
                      numsol, numreg);

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


------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete 
for recognition, cash, and the chance to get your game on Steam. 
$5K grand prize plus 10 genre and skill prizes. Submit your demo 
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to