Revision: 55208
http://brlcad.svn.sourceforge.net/brlcad/?rev=55208&view=rev
Author: carlmoore
Date: 2013-04-22 21:30:42 +0000 (Mon, 22 Apr 2013)
Log Message:
-----------
accept - as argument for stdin; also acknowledge what will be used for input &
output; further changes will be needed for no-argument 'Usage' result
Modified Paths:
--------------
brlcad/trunk/src/conv/nmg/asc-nmg.c
Modified: brlcad/trunk/src/conv/nmg/asc-nmg.c
===================================================================
--- brlcad/trunk/src/conv/nmg/asc-nmg.c 2013-04-22 18:00:07 UTC (rev 55207)
+++ brlcad/trunk/src/conv/nmg/asc-nmg.c 2013-04-22 21:30:42 UTC (rev 55208)
@@ -60,12 +60,13 @@
bu_setprogname(argv[0]);
/* Get ascii NMG input file name. */
- if (bu_optind >= argc) {
+ if (bu_optind >= argc || (int)(*argv[1]) == '-') {
afile = "-";
fpin = stdin;
#if defined(_WIN32) && !defined(__CYGWIN__)
setmode(fileno(fpin), O_BINARY);
#endif
+ bu_log("%s: will be reading from stdin\n",argv[0]);
} else {
afile = argv[bu_optind];
if ((fpin = fopen(afile, "rb")) == NULL) {
@@ -74,6 +75,7 @@
argv[0], afile);
bu_exit(1, NULL);
}
+ bu_log("%s: will be reading from file %s\n",argv[0],afile);
}
@@ -89,6 +91,7 @@
argv[0], bfile);
bu_exit(1, NULL);
}
+ bu_log("%s: will be creating file %s\n",argv[0],bfile);
ascii_to_brlcad(fpin, fpout, "nmg", NULL);
fclose(fpin);
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