[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re[2]: [Gnash-dev] Trying file i/o extension...
From: |
Udo Giacomozzi |
Subject: |
Re[2]: [Gnash-dev] Trying file i/o extension... |
Date: |
Tue, 20 Feb 2007 18:59:24 +0100 |
Hello Rob,
Tuesday, February 20, 2007, 3:43:01 PM, you wrote:
RS> Did you open to file first ?
Yes, of course. I also use it to detect if file i/o is supported. The
code should be (don't have the file at hand right now):
-----------8<---------------------------------------------------------
file = new FileIO();
if (file.fopen("/proc/uptime", "r")) {
trace("fopen() succeeded :-)");
} else {
trace("fopen() failed!");
return;
}
trace(file.fgets());
trace("closing...");
file.close();
-----------8<---------------------------------------------------------
The segfault is raised somewhere after fileio_fgets() in fileio.cpp
returns. However, the "closing" trace-msg is not printed.
RS> Instead of trace(), you can also use
RS> file.puts().
trace() is perfect for my needs.
Udo