diff -r 8fca9fd31357 -r 2c21bc80c95d project_files/hwc/rtl/fileio.c --- a/project_files/hwc/rtl/fileio.c Sat Apr 23 16:18:07 2016 -0400 +++ b/project_files/hwc/rtl/fileio.c Sat Apr 23 16:32:18 2016 -0400 @@ -8,9 +8,11 @@ #include #include #include +#include io_result_t IOResult; int FileMode; +char cwd[1024]; static void init(File f) { f->fp = NULL; @@ -219,6 +221,17 @@ return false; } +char * fpcrtl_getCurrentDir(void) { + + IOResult = IO_NO_ERROR; + + if (getcwd(cwd, sizeof(cwd)) != NULL) + return cwd; + + IOResult = IO_ERROR_DUMMY; + return ""; +} + void __attribute__((overloadable)) fpcrtl_flush(Text f) { fflush(f->fp); }