<p dir="ltr">Maybe because I'm an idiot. :) <br>
Too long coding today.<br>
</p>
<div class="gmail_quote">10.11.2015 19.42 "Even Rouault" <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> kirjoitti:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Le mardi 10 novembre 2015 18:22:19, Ari Jolma a écrit :<br>
> I'd like to wrap VSIStdoutSetRedirection.<br>
><br>
> I would use it for streaming generated data in a web environment. The<br>
> preferred way to stream data out nowadays in Perl web development is to<br>
> use a write function in Perl space - i.e., not the standard print to<br>
> stdout.<br>
><br>
> I can capture stdout and achieve the wanted goal that way but it is a<br>
> bit too hackish I think.<br>
><br>
> I don't think the wrapping is such a big deal itself - it will require a<br>
> bit unusual function typemap, so I'll limit it to Perl for now - but<br>
> there is something in the C space I need to ask.<br>
><br>
> How can one undo a redirection done with VSIStdoutSetRedirection? It<br>
> seems to me that it would need a function:<br>
><br>
> void VSIStdoutUnsetRedirection()<br>
> {<br>
>      pWriteFunction = fwrite;<br>
>      pWriteStream = stdout;<br>
> }<br>
><br>
> but there is no such. Should there be one?<br>
<br>
Why not just call VSIStdoutSetRedirection(fwrite, stdout) ?<br>
<br>
><br>
> Best,<br>
><br>
> Ari<br>
><br>
> _______________________________________________<br>
> gdal-dev mailing list<br>
> <a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
<br>
--<br>
Spatialys - Geospatial professional services<br>
<a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
</blockquote></div>