Revision: 55115
http://brlcad.svn.sourceforge.net/brlcad/?rev=55115&view=rev
Author: carlmoore
Date: 2013-04-10 21:47:41 +0000 (Wed, 10 Apr 2013)
Log Message:
-----------
work argv[0] into error messages, and eliminate 'if (npts <0) npts=0', because
negative npts was already spotted by program
Modified Paths:
--------------
brlcad/trunk/src/proc-db/contours.c
Modified: brlcad/trunk/src/proc-db/contours.c
===================================================================
--- brlcad/trunk/src/proc-db/contours.c 2013-04-10 19:39:22 UTC (rev 55114)
+++ brlcad/trunk/src/proc-db/contours.c 2013-04-10 21:47:41 UTC (rev 55115)
@@ -47,20 +47,17 @@
while (!feof(stdin)) {
if (scanf("%d %d %128s", &npts, &z, name) != 3) break;
if(npts < 0) {
- bu_log("Negative # of pts\n");
+ bu_log("%s: Negative # of pts\n",argv[0]);
return -1;
}
if (npts >= INT_MAX) {
- bu_log("Too many points\n");
+ bu_log("%s: Too many points\n",argv[0]);
return -1;
}
- if (npts < 0) {
- npts = 0;
- }
for (i=0; i<npts; i++) {
if (scanf("%d %d", &x, &y) != 2)
- fprintf(stderr, "bad xy\n");
+ fprintf(stderr, "%s: bad xy\n",argv[0]);
if (i==0)
pl_3move(stdout, x, y, z);
else
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits