System dependant functions (skeletons) to retrieve user and system base dirs.
[blender.git] / intern / ghost / intern / GHOST_SystemX11.cpp
index fc99ffbdd473f0d7780340735de3def3b957da41..5eab71eebf5d5a29303b640cc7776682ad80f8f6 100644 (file)
@@ -1457,3 +1457,22 @@ void GHOST_SystemX11::putClipboard(GHOST_TInt8 *buffer, bool selection) const
                        fprintf(stderr, "failed to own primary\n");
        }
 }
+
+GHOST_TUns8* GHOST_SystemX11::getSystemDir() const
+{
+
+}
+
+GHOST_TUns8* GHOST_SystemX11::getUserDir() const
+{
+       char* path;
+       char* env = getenv("HOME");
+       if(env) {
+               path = (char*) malloc(strlen(env) + 10); // "/.blender/"
+               strcat(path, env);
+               strcat(path, "/,blender/");
+               return (GHOST_TUns8*) path;
+       } else {
+               return NULL;
+       }
+}