Revision: 51730
          http://brlcad.svn.sourceforge.net/brlcad/?rev=51730&view=rev
Author:   starseeker
Date:     2012-07-31 18:11:24 +0000 (Tue, 31 Jul 2012)
Log Message:
-----------
C89 doesn't provide z in printf - this is masked in cmake by inheriting the C99 
flag from libfb, which requires it on the Mac.  Autotools doesn't propagate the 
flags the same way.  Use bu_vls_printf, which does provide support for z

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

Modified: brlcad/trunk/src/libged/analyze.c
===================================================================
--- brlcad/trunk/src/libged/analyze.c   2012-07-31 17:55:11 UTC (rev 51729)
+++ brlcad/trunk/src/libged/analyze.c   2012-07-31 18:11:24 UTC (rev 51730)
@@ -969,6 +969,7 @@
 analyze_arbn(struct ged *gedp, const struct rt_db_internal *ip)
 {
     size_t i, j, k, l;
+    struct bu_vls tmpstr = BU_VLS_INIT_ZERO;
     fastf_t tot_vol = 0.0, tot_area = 0.0;
     table_t table;
     struct poly_face *faces;
@@ -1015,7 +1016,8 @@
     table.nrows = aip->neqn;
     for (i = 0; i < aip->neqn; i++) {
         vect_t tmp;
-        sprintf(faces[i].label, "%4zu", i);
+        bu_vls_printf(&tmpstr, "%4zu", i);
+        sprintf(faces[i].label, "%s", bu_vls_addr(&tmpstr));
 
         /* calculate surface area */
         analyze_poly_face(gedp, &faces[i], &table.rows[i]);
@@ -1031,6 +1033,7 @@
         bu_free((char *)faces[i].pts, "analyze_arbn: pts");
     }
     bu_free((char *)faces, "analyze_arbn: faces");
+    bu_vls_free(&tmpstr);
 
     print_faces_table(gedp, &table);
     print_volume_table(gedp,

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


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to