|
@@ -23,7 +23,8 @@ class FileData |
|
|
|
|
|
|
|
|
void Open(String const &file, FileAccess mode) |
|
|
void Open(String const &file, FileAccess mode) |
|
|
{ |
|
|
{ |
|
|
#if HAVE_STDIO_H |
|
|
|
|
|
|
|
|
#if __CELLOS_LV2__ |
|
|
|
|
|
#elif HAVE_STDIO_H |
|
|
/* FIXME: no modes, no error checking, no nothing */ |
|
|
/* FIXME: no modes, no error checking, no nothing */ |
|
|
m_fd = fopen(file.C(), "r"); |
|
|
m_fd = fopen(file.C(), "r"); |
|
|
#endif |
|
|
#endif |
|
@@ -32,7 +33,8 @@ class FileData |
|
|
String ReadString() |
|
|
String ReadString() |
|
|
{ |
|
|
{ |
|
|
String ret; |
|
|
String ret; |
|
|
#if HAVE_STDIO_H |
|
|
|
|
|
|
|
|
#if __CELLOS_LV2__ |
|
|
|
|
|
#elif HAVE_STDIO_H |
|
|
while (!feof(m_fd)) |
|
|
while (!feof(m_fd)) |
|
|
{ |
|
|
{ |
|
|
char buf[BUFSIZ]; |
|
|
char buf[BUFSIZ]; |
|
@@ -50,12 +52,14 @@ class FileData |
|
|
|
|
|
|
|
|
void Close() |
|
|
void Close() |
|
|
{ |
|
|
{ |
|
|
#if HAVE_STDIO_H |
|
|
|
|
|
|
|
|
#if __CELLOS_LV2__ |
|
|
|
|
|
#elif HAVE_STDIO_H |
|
|
fclose(m_fd); |
|
|
fclose(m_fd); |
|
|
#endif |
|
|
#endif |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
#if HAVE_STDIO_H |
|
|
|
|
|
|
|
|
#if __CELLOS_LV2__ |
|
|
|
|
|
#elif HAVE_STDIO_H |
|
|
FILE *m_fd; |
|
|
FILE *m_fd; |
|
|
#endif |
|
|
#endif |
|
|
Atomic<int> m_refcount; |
|
|
Atomic<int> m_refcount; |
|
|