Revision: 55681
http://sourceforge.net/p/brlcad/code/55681
Author: brlcad
Date: 2013-06-05 22:32:42 +0000 (Wed, 05 Jun 2013)
Log Message:
-----------
learn from each other. scale must be initialized.
Modified Paths:
--------------
brlcad/trunk/src/sig/d-f.c
brlcad/trunk/src/sig/f-d.c
Modified: brlcad/trunk/src/sig/d-f.c
===================================================================
--- brlcad/trunk/src/sig/d-f.c 2013-06-05 20:46:37 UTC (rev 55680)
+++ brlcad/trunk/src/sig/d-f.c 2013-06-05 22:32:42 UTC (rev 55681)
@@ -50,12 +50,12 @@
size_t ret;
if (argc > 1) {
- if (! BU_STR_EQUAL(argv[1], "-n"))
+ if (!BU_STR_EQUAL(argv[1], "-n"))
scale = atof(argv[1]);
argc--;
}
- if (argc > 1 || ZERO(scale) || isatty(fileno(stdin))) {
+ if (argc > 1 || ZERO(scale) || isatty(fileno(stdin)) ||
isatty(fileno(stdout))) {
bu_exit(1, "Usage: d-f [-n || scale] < doubles > floats\n");
}
Modified: brlcad/trunk/src/sig/f-d.c
===================================================================
--- brlcad/trunk/src/sig/f-d.c 2013-06-05 20:46:37 UTC (rev 55680)
+++ brlcad/trunk/src/sig/f-d.c 2013-06-05 22:32:42 UTC (rev 55681)
@@ -46,13 +46,11 @@
int main(int argc, char **argv)
{
int i, num;
- double scale;
+ double scale = 1.0;
size_t ret;
if (argc > 1) {
- if (BU_STR_EQUAL(argv[1], "-n"))
- scale = 1.0;
- else
+ if (!BU_STR_EQUAL(argv[1], "-n"))
scale = atof(argv[1]);
argc--;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits