mass rename and rebranding from xwt to ibex - fixed to use ixt files
[org.ibex.core.git] / src / org / xwt / plat / POSIX.cc
diff --git a/src/org/xwt/plat/POSIX.cc b/src/org/xwt/plat/POSIX.cc
deleted file mode 100644 (file)
index 209c37a..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2002 Adam Megacz, see the COPYING file for licensing [LGPL]
-// see below for copyright information on the second portion of this file
-
-#include "GCJ.cc"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#include <sys/types.h>
-#include <signal.h>
-#include <java/lang/String.h>
-
-// FIXME: we don't need all these
-#include <java/lang/String.h>
-#include <org/xwt/Surface.h>
-#include <org/xwt/Picture.h>
-#include <org/xwt/js/JS.h>
-#include <org/xwt/Box.h>
-#include <org/xwt/util/Semaphore.h>
-#include <org/xwt/Platform.h>
-#include <java/lang/Long.h>
-#include <java/util/Hashtable.h>
-#include <org/xwt/util/Log.h>
-#include <org/xwt/plat/POSIX.h>
-#include <java/lang/System.h>
-#include <java/io/PrintStream.h>
-
-jstring org::xwt::plat::POSIX::_getEnv(jstring key) {
-    int len = JvGetStringUTFLength(key);
-    char buf[len + 1];
-    JvGetStringUTFRegion(key, 0, len, buf);
-    buf[len] = '\0';
-    char* envstr = getenv(buf);
-    return envstr == NULL ? NULL : JvNewStringLatin1(envstr);
-}
-
-void org::xwt::plat::POSIX::spawnChildProcess(JArray<jstring>* cmd) {
-    jstring* cmdstrings = elements(cmd);
-    char* cmd2[cmd->length + 1];
-    cmd2[cmd->length] = NULL;
-    for(int i=0; i<cmd->length; i++) {
-        cmd2[i] = (char*)malloc(JvGetStringUTFLength(cmdstrings[i]));
-        JvGetStringUTFRegion(cmdstrings[i], 0, JvGetStringUTFLength(cmdstrings[i]), cmd2[i]);
-    }
-
-    if (!fork()) {
-        signal(SIGHUP, SIG_IGN);
-        signal(SIGQUIT, SIG_IGN);
-        signal(SIGINT, SIG_IGN);
-        signal(SIGTERM, SIG_IGN);
-
-        // ignore SIGPIPE in case we were launched from a browser and the browser closed
-        signal(SIGPIPE, SIG_IGN);
-
-        execvp(cmd2[0], cmd2);
-    }
-}
-