Revision: 56291
http://sourceforge.net/p/brlcad/code/56291
Author: brlcad
Date: 2013-07-28 16:16:17 +0000 (Sun, 28 Jul 2013)
Log Message:
-----------
FIXED, tom made bu_vls_printf() teh awesome. now can avoid using sprintf for
complex table printing.
Modified Paths:
--------------
brlcad/trunk/src/libged/analyze.c
Modified: brlcad/trunk/src/libged/analyze.c
===================================================================
--- brlcad/trunk/src/libged/analyze.c 2013-07-28 16:09:24 UTC (rev 56290)
+++ brlcad/trunk/src/libged/analyze.c 2013-07-28 16:16:17 UTC (rev 56291)
@@ -194,23 +194,10 @@
/* the three data rows */
for (i = 0; i < table.nrows; ++i) {
-#if 1
- char tbuf[FBUFSIZ];
- sprintf(tbuf, "%-*.*s| %-*.*s = %*.*s |\n",
- indent, indent, " ",
- maxwidth[0], maxwidth[0], table.rows[i].fields[0].buf,
- maxwidth[1], maxwidth[1], table.rows[i].fields[1].buf);
- bu_vls_printf(gedp->ged_result_str, "%s", tbuf);
-#else
- /* FIXME: is this still true?
- * was:
- * bu_vls_printf can't handle this at the moment
- */
bu_vls_printf(gedp->ged_result_str, "%-*.*s| %-*.*s = %*.*s |\n",
indent, indent, " ",
maxwidth[0], maxwidth[0], table.rows[i].fields[0].buf,
maxwidth[1], maxwidth[1], table.rows[i].fields[1].buf);
-#endif
}
/* closing table row */
@@ -292,30 +279,6 @@
/* header row 2 */
/* print titles in 4 sets */
-#if 1
- /* FIXME: using sprintf because bu_vls_printf is broken for complex
formats */
- sprintf(buf, "%-*.*s| %-*.*s %*.*s ",
- indent, indent, " ",
- maxwidth[0], maxwidth[0], EDGE,
- maxwidth[1], maxwidth[1], LEN);
- bu_vls_printf(gedp->ged_result_str, "%s", buf);
-
- sprintf(buf, "| %-*.*s %*.*s ",
- maxwidth[2], maxwidth[2], EDGE,
- maxwidth[3], maxwidth[3], LEN);
- bu_vls_printf(gedp->ged_result_str, "%s", buf);
-
- sprintf(buf, "| %-*.*s %*.*s ",
- maxwidth[4], maxwidth[4], EDGE,
- maxwidth[5], maxwidth[5], LEN);
- bu_vls_printf(gedp->ged_result_str, "%s", buf);
-
- sprintf(buf, "| %-*.*s %*.*s |\n",
- maxwidth[6], maxwidth[6], EDGE,
- maxwidth[7], maxwidth[7], LEN);
- bu_vls_printf(gedp->ged_result_str, "%s", buf);
-
-#elif 0
/* bu_vls_printf can't handle this at the moment */
bu_vls_printf(gedp->ged_result_str, "%-*.*s| %-*.*s %*.*s ",
indent, indent, " ",
@@ -330,7 +293,6 @@
bu_vls_printf(gedp->ged_result_str, "| %-*.*s %*.*s |\n",
maxwidth[6], maxwidth[6], EDGE,
maxwidth[7], maxwidth[7], LEN);
-#endif
/* header row 3 */
/* print dashes in 4 sets */
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits