#include #include #include #include "amigaos4.h" // TODO: check if this is set in SDK #define MAX_PATH_SIZE 255 char *_fullpath(const char *path) { //rintf("DBG: _fullpath() %s\n", path); if (strcmp(path, ".")) { /* STRPTR appPath = AllocVecTags(sizeof(char) * MAX_PATH_SIZE, AVT_Type, MEMF_SHARED, AVT_ClearWithValue, "\0", TAG_DONE); */ char *appPath = malloc(sizeof(char) * MAX_PATH_SIZE); BPTR pathLock = Lock(path, SHARED_LOCK); if (pathLock) { //BPTR parentLock = ParentDir(pathLock); NameFromLock(pathLock, appPath, sizeof(char) * MAX_PATH_SIZE); //printf("DBG: apppath %s\n", appPath); //UnLock(parentLock); UnLock(pathLock); return appPath; //return "ram:"; } //printf("DBG: pathLock failed\n"); } // TODO: Deal with . path if (!strcmp(path, ".")) { //printf("DBG: return app folder\n"); return "Applications:Programming/workspace/MyProjects/lite-xl_v1.16.12"; } return NULL; }