Rob Walker wrote:
I was attempting to use Chuck Swiger's utility at
http://www.swigerco.com/gnuradio/raw2num_f.c to read a gnuradio file
created by audio_to_file.py but kept getting "Input reached EOF" well
before the entire file had been read.  I am not a C programmer, but
while debugging I noticed that he had used "r" in his fopen command
rather than the "rb" used by gr_file_source.cc so I made that change and
now the utility works fine.  I also noticed an old post from ematlis
(http://lists.gnu.org/archive/html/discuss-gnuradio/2007-05/msg00341.htm
l) mentioning a similar utility he'd developed and noticed it uses "r"
rather than "rb" also.  Shouldn't "rb" be used rather than "r" to open
gnuradio data files?

By the way, I am using MinGW/MSYS with GCC 3.4.5 if that matters.

Windows (MinGW/MSYS and Cygwin) needs to know when to convert the CR-LF line separators stored in a text file to LF on reading (text files) and when to leave them alone (binary data). For portability, I think that all files that are not text files should be opened with "rb".

-- Don W.




_______________________________________________
Discuss-gnuradio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to