Revision: 56730
http://sourceforge.net/p/brlcad/code/56730
Author: mohitdaga
Date: 2013-08-09 22:23:37 +0000 (Fri, 09 Aug 2013)
Log Message:
-----------
Hidding stdin and stdout under fileno function
Modified Paths:
--------------
brlcad/trunk/src/libicv/bw.c
brlcad/trunk/src/libicv/pix.c
Modified: brlcad/trunk/src/libicv/bw.c
===================================================================
--- brlcad/trunk/src/libicv/bw.c 2013-08-09 21:38:17 UTC (rev 56729)
+++ brlcad/trunk/src/libicv/bw.c 2013-08-09 22:23:37 UTC (rev 56730)
@@ -59,7 +59,7 @@
size = (size_t) bif->height*bif->width;
if(filename==NULL)
- fd = 1; /* for stdout */
+ fd = fileno(stdout); /* for stdout */
else if ((fd = open(filename, O_RDONLY, WRMODE)) < 0) {
bu_log("bw_save: Cannot open file for saving\n");
return -1;
@@ -92,7 +92,7 @@
size = (size_t) height*width;
if(filename==NULL)
- fd = 0; /* for stdin */
+ fd = fileno(stdin); /* for stdin */
else if ((fd = open(filename, O_RDONLY, WRMODE)) < 0) {
bu_log("bw_load: Cannot open file for reading\n");
return NULL;
Modified: brlcad/trunk/src/libicv/pix.c
===================================================================
--- brlcad/trunk/src/libicv/pix.c 2013-08-09 21:38:17 UTC (rev 56729)
+++ brlcad/trunk/src/libicv/pix.c 2013-08-09 22:23:37 UTC (rev 56730)
@@ -56,7 +56,7 @@
}
if(filename==NULL)
- fd = 1; /* for stdout */
+ fd = fileno(stdout); /* for stdout */
else if ((fd = open(filename, O_RDONLY, WRMODE)) < 0) {
bu_log("pix_save: Cannot open file for saving\n");
return -1;
@@ -91,7 +91,7 @@
size = (size_t) height*width*3;
if(filename == NULL)
- fd = 0; /* for stdin */
+ fd = fileno(stdin); /* for stdin */
else if ((fd = open(filename, O_RDONLY, WRMODE))<0) {
bu_log("bw_load: Cannot open file for reading\n");
return NULL;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits