Enlightenment CVS committal
Author : kwo
Project : e16
Module : e
Dir : e16/e/src
Modified Files:
E.h actions.c config.c desktops.c events.c file.c handlers.c
main.c menus.c misc.c session.c setup.c snaps.c startup.c
theme.c
Log Message:
Good bye __EMX__.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/E.h,v
retrieving revision 1.210
retrieving revision 1.211
diff -u -3 -r1.210 -r1.211
--- E.h 18 Feb 2004 18:45:25 -0000 1.210
+++ E.h 18 Feb 2004 22:18:40 -0000 1.211
@@ -228,24 +228,6 @@
#error "particular Operating System or Distribution"
#endif
-#ifndef DEFAULT_SH_PATH
-#ifdef __sgi
-/*
- * It appears that SGI (at least IRIX 6.4) uses ksh as their sh, and it
- * seems to run in restricted mode, so things like restart fail miserably.
- * Let's use csh instead
- * -KDT 07/31/98
- */
-#define DEFAULT_SH_PATH "/sbin/csh"
-#else
-#ifdef __EMX__
-#define DEFAULT_SH_PATH "sh.exe"
-#else
-#define DEFAULT_SH_PATH "/bin/sh"
-#endif
-#endif
-#endif
-
#define FILEPATH_LEN_MAX 4096
/* This turns on E's internal stack tracking system for coarse debugging */
/* and being able to trace E for profiling/optimisation purposes (which */
@@ -2035,6 +2017,7 @@
void mkdirs(const char *s);
int isfile(const char *s);
int isdir(const char *s);
+int isabspath(const char *s);
char **ls(const char *dir, int *num);
void freestrlist(char **l, int num);
void rm(const char *s);
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/actions.c,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -3 -r1.141 -r1.142
--- actions.c 16 Feb 2004 22:58:18 -0000 1.141
+++ actions.c 18 Feb 2004 22:18:40 -0000 1.142
@@ -22,9 +22,6 @@
*/
#include "E.h"
#include "timestamp.h"
-#ifdef __EMX__
-#include <process.h>
-#endif
typedef struct
{
@@ -669,16 +666,13 @@
EDBUG(6, "runApp");
-#ifndef __EMX__
if (fork())
EDBUG_RETURN(0);
setsid();
/* Close all file descriptors except the std 3 */
for (fd = 3; fd < 1024; fd++)
- {
- close(fd);
- }
-#endif
+ close(fd);
+
sh = usershell(getuid());
if (exe)
{
@@ -688,25 +682,17 @@
Efree(path);
real_exec = (char *)Emalloc(strlen(params) + 6);
sprintf(real_exec, "exec %s", params);
-#ifndef __EMX__
execl(sh, sh, "-c", (char *)real_exec, NULL);
exit(0);
-#else
- spawnl(P_NOWAIT, sh, sh, "-c", (char *)real_exec, NULL);
- EDBUG_RETURN(0);
-#endif
}
+
if (!mode.startup)
{
path = pathtofile(exe);
if (!path)
{
/* absolute path */
-#ifndef __EMX__
- if (((char *)exe)[0] == '/')
-#else
- if (_fnisabs((char *)exe))
-#endif
+ if (isabspath(exe))
DialogAlertOK(_
("There was an error running the program:\n"
"%s\n"
@@ -781,22 +767,13 @@
Efree(path);
}
}
-#ifndef __EMX__
exit(100);
-#else
- EDBUG_RETURN(0);
-#endif
}
real_exec = (char *)Emalloc(strlen(params) + 6);
sprintf(real_exec, "exec %s", (char *)params);
-#ifndef __EMX__
execl(sh, sh, "-c", (char *)real_exec, NULL);
exit(0);
-#else
- spawnl(P_NOWAIT, sh, sh, "-c", (char *)real_exec, NULL);
-#endif
EDBUG_RETURN(0);
-
}
int
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/config.c,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -3 -r1.89 -r1.90
--- config.c 13 Feb 2004 18:36:51 -0000 1.89
+++ config.c 18 Feb 2004 22:18:40 -0000 1.90
@@ -27,12 +27,6 @@
#include "conf.h"
#include <ctype.h>
-#ifdef __EMX__
-#include <process.h>
-extern char *__XOS2RedirRoot(const char *);
-
-#endif
-
static char is_autosave = 0;
static void SkipTillEnd(FILE * ConfigFile);
@@ -3228,16 +3222,10 @@
/* All output is passed through epp for preprocessing however. */
FILE *fpin /*, *fpout */ ;
char execline[FILEPATH_LEN_MAX];
-
-#ifndef __EMX__
char *epp_path = ENLIGHTENMENT_BIN "/epp";
-#else
- char *epp_path = __XOS2RedirRoot(ENLIGHTENMENT_BIN "/epp.exe");
- char *x11root = getenv("X11ROOT");
-
-#endif
EDBUG(5, "OpenConfigFileForReading");
+
if (!path)
EDBUG_RETURN(0);
@@ -3267,49 +3255,29 @@
s = duplicate(path);
while (s[i])
{
-#ifndef __EMX__
if (s[i] == '/')
-#else
- if (s[i] == '/' || s[i] == '\\' || s[i] == ':')
-#endif
s[i] = '.';
i++;
}
Esnprintf(execline, sizeof(execline), "%s " "-P " "-nostdinc " "-undef "
-#ifndef __EMX__
"-include %s/config/definitions " "-I%s " "-I%s/config "
"-D ENLIGHTENMENT_VERSION=%s " "-D ENLIGHTENMENT_ROOT=%s "
"-D ENLIGHTENMENT_BIN=%s "
-#else
- "-include %s%s/config/definitions " "-I%s " "-I%s%s/config "
- "-D ENLIGHTENMENT_VERSION=%s " "-D ENLIGHTENMENT_ROOT=%s%s "
- "-D ENLIGHTENMENT_BIN=%s%s " "-D X11ROOT=%s "
-#endif
"-D ENLIGHTENMENT_THEME=%s " "-D ECONFDIR=%s "
"-D ECACHEDIR=%s " "-D SCREEN_RESOLUTION_%ix%i=1 "
"-D SCREEN_WIDTH_%i=1 " "-D SCREEN_HEIGHT_%i=1 "
"-D SCREEN_DEPTH_%i=1 " "-D USER_NAME=%s " "-D HOME_DIR=%s "
"-D USER_SHELL=%s " "-D ENLIGHTENMENT_VERSION_015=1 "
"%s %s/cached/cfg/%s.preparsed",
-#ifndef __EMX__
epp_path, EDirRoot(), themepath, EDirRoot(),
ENLIGHTENMENT_VERSION, EDirRoot(), EDirBin(),
-#else
- epp_path, x11root, ENLIGHTENMENT_ROOT, themepath, x11root,
- ENLIGHTENMENT_ROOT, ENLIGHTENMENT_VERSION, x11root,
- ENLIGHTENMENT_ROOT, x11root, ENLIGHTENMENT_BIN, x11root,
-#endif
themepath, EDirUser(), EDirUserCache(), root.w, root.h,
root.w, root.h, root.depth, def_user, def_home, def_shell,
path, EDirUserCache(), s);
system(execline);
Esnprintf(execline, sizeof(execline), "%s/cached/cfg/%s.preparsed",
EDirUserCache(), s);
-#ifndef __EMX__
fpin = fopen(execline, "r");
-#else
- fpin = fopen(execline, "rt");
-#endif
if (s)
Efree(s);
if (def_user)
@@ -3322,11 +3290,7 @@
}
else
{
-#ifndef __EMX__
fpin = fopen(path, "r");
-#else
- fpin = fopen(path, "rt");
-#endif
EDBUG_RETURN(fpin);
}
EDBUG_RETURN(0);
@@ -3517,23 +3481,12 @@
EDBUG(6, "FindFile");
/* if absolute path - and file exists - return it */
-#ifndef __EMX__
- if (file[0] == '/')
-#else
- if (_fnisabs(file))
-#endif
+ if (isabspath(file))
{
strcpy(s, file);
if (findLocalizedFile(s) || isfile(s))
EDBUG_RETURN(duplicate(s));
}
-#ifdef __EMX__
- if (file[0] == '/')
- {
- if (isfile(__XOS2RedirRoot(file)))
- EDBUG_RETURN(duplicate(__XOS2RedirRoot(file)));
- }
-#endif
/* look in ~/.enlightenment first */
@@ -3563,23 +3516,12 @@
EDBUG(6, "FindFile");
/* if absolute path - and file exists - return it */
-#ifndef __EMX__
- if (file[0] == '/')
-#else
- if (_fnisabs(file))
-#endif
+ if (isabspath(file))
{
strcpy(s, file);
if (findLocalizedFile(s) || isfile(s))
EDBUG_RETURN(duplicate(s));
}
-#ifdef __EMX__
- if (file[0] == '/')
- {
- if (isfile(__XOS2RedirRoot(file)))
- EDBUG_RETURN(duplicate(__XOS2RedirRoot(file)));
- }
-#endif
/* look in ~/.enlightenment first */
Esnprintf(s, sizeof(s), "%s/%s", EDirUser(), file);
@@ -3616,11 +3558,7 @@
while (s2[i])
{
-#ifndef __EMX__
if (s2[i] == '/')
-#else
- if (s2[i] == '/' || s2[i] == '\\' || s2[i] == ':')
-#endif
s2[i] = '.';
i++;
}
@@ -3720,9 +3658,10 @@
"maintainer.\n"
"If you are the administrator of your own system please\n"
"consult the documentation that came with Enlightenment for\n"
- "additional information.\n"), ENLIGHTENMENT_ROOT);
+ "additional information.\n"), EDirRoot());
EDBUG_RETURN(0);
}
+
strcpy(themepath, theme);
Esnprintf(s, sizeof(s), "%s/", theme);
#if USE_FNLIB
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/desktops.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -3 -r1.63 -r1.64
--- desktops.c 12 Feb 2004 01:17:21 -0000 1.63
+++ desktops.c 18 Feb 2004 22:18:40 -0000 1.64
@@ -29,14 +29,7 @@
{
char s[256];
const char *chmap =
-#ifndef __EMX__
"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";
-
-#else
- "0123456789abcdefghijklmnopqrstuvwxyz��������������������������-_";
-
- /* cyrillic symbols from 866 page correctly handled instead of eng. capitals */
-#endif
int r, g, b;
int n1, n2, n3, n4, n5, f1, f2, f3, f4, f5, f6;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/events.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -3 -r1.51 -r1.52
--- events.c 17 Feb 2004 23:15:54 -0000 1.51
+++ events.c 18 Feb 2004 22:18:41 -0000 1.52
@@ -23,9 +23,6 @@
#include "E.h"
#include <errno.h>
#include <sys/time.h>
-#ifdef __EMX__
-#include <io.h> /* EMX select() */
-#endif
static int event_base_shape = 0;
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/file.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -3 -r1.55 -r1.56
--- file.c 13 Feb 2004 18:36:51 -0000 1.55
+++ file.c 18 Feb 2004 22:18:41 -0000 1.56
@@ -23,12 +23,6 @@
#include "E.h"
#include <ctype.h>
-#ifdef __EMX__
-#define chdir _chdir2
-#define getcwd _getcwd2
-extern char *__XOS2RedirRoot(const char *);
-#endif
-
char *
FileExtension(char *file)
{
@@ -133,6 +127,12 @@
EDBUG_RETURN(0);
}
+int
+isabspath(const char *path)
+{
+ return path[0] == '/';
+}
+
char **
ls(const char *dir, int *num)
{
@@ -294,7 +294,6 @@
int
fileinode(const char *s)
{
-#ifndef __EMX__
struct stat st;
EDBUG(9, "filesize");
@@ -303,9 +302,6 @@
if (stat(s, &st) < 0)
EDBUG_RETURN(0);
EDBUG_RETURN((int)st.st_ino);
-#else
- EDBUG_RETURN(0);
-#endif
}
int
@@ -386,8 +382,6 @@
username(int uid)
{
char *s;
-
-#ifndef __EMX__
static int usr_uid = -1;
static char *usr_s = NULL;
struct passwd *pwd;
@@ -405,10 +399,6 @@
usr_s = duplicate(s);
EDBUG_RETURN(s);
}
-#else
- if ((s = getenv("USER")) != NULL)
- EDBUG_RETURN(duplicate(s));
-#endif
EDBUG_RETURN(duplicate("unknown"));
}
@@ -416,8 +406,6 @@
homedir(int uid)
{
char *s;
-
-#ifndef __EMX__
static int usr_uid = -1;
static char *usr_s = NULL;
struct passwd *pwd;
@@ -437,20 +425,13 @@
usr_s = duplicate(s);
EDBUG_RETURN(s);
}
-#else
- if ((s = getenv("HOME")) != NULL)
- EDBUG_RETURN(_fnslashify(duplicate(s)));
- if ((s = getenv("TMP")) != NULL)
- EDBUG_RETURN(_fnslashify(duplicate(s)));
-#endif
- EDBUG_RETURN(duplicate
- ((getenv("TMPDIR") == NULL) ? "/tmp" : getenv("TMPDIR")));
+ EDBUG_RETURN(duplicate((getenv("TMPDIR") == NULL) ?
+ "/tmp" : getenv("TMPDIR")));
}
char *
usershell(int uid)
{
-#ifndef __EMX__
char *s;
static int usr_uid = -1;
static char *usr_s = NULL;
@@ -476,9 +457,6 @@
EDBUG_RETURN(s);
}
EDBUG_RETURN(duplicate("/bin/sh"));
-#else
- EDBUG_RETURN(duplicate("sh.exe"));
-#endif
}
char *
@@ -884,41 +862,11 @@
int len, exelen;
EDBUG(9, "pathtoexec");
-#ifndef __EMX__
- if (file[0] == '/')
-#else
- if (_fnisabs(file))
-#endif
+
+ if (isabspath(file))
{
if (canexec(file))
EDBUG_RETURN(duplicate(file));
-#ifdef __EMX__
- len = strlen(file);
- s = Emalloc(len + 5);
- strcpy(s, file);
- strcat(s, ".cmd");
- if (canexec(s))
- EDBUG_RETURN(s);
- strcpy(s + len, ".exe");
- if (canexec(s))
- EDBUG_RETURN(s);
- Efree(s);
- if (file[0] != '/' && file[0] != '\\')
- EDBUG_RETURN(NULL);
- file = __XOS2RedirRoot(file);
- if (canexec(file))
- EDBUG_RETURN(duplicate(file));
- len = strlen(file);
- s = Emalloc(len + 5);
- strcpy(s, file);
- strcat(s, ".cmd");
- if (canexec(s))
- EDBUG_RETURN(s);
- strcpy(s + len, ".exe");
- if (canexec(s))
- EDBUG_RETURN(s);
- Efree(s);
-#endif
EDBUG_RETURN(NULL);
}
p = getenv("PATH");
@@ -926,15 +874,10 @@
EDBUG_RETURN(duplicate(file));
if (!file)
EDBUG_RETURN(NULL);
-#ifndef __EMX__
+
cp = p;
exelen = strlen(file);
while ((ep = strchr(cp, ':')))
-#else
- cp = p = _fnslashify(strdup(p));
- exelen = strlen(file) + 4;
- while ((ep = strchr(cp, ';')))
-#endif
{
len = ep - cp;
s = Emalloc(len + 1);
@@ -943,32 +886,10 @@
strncpy(s, cp, len);
s[len] = 0;
s = Erealloc(s, len + 2 + exelen);
-#ifdef __EMX__
- if (s[len - 1] != '/')
-#endif
- strcat(s, "/");
+ strcat(s, "/");
strcat(s, file);
if (canexec(s))
-#ifndef __EMX__
EDBUG_RETURN(s);
-#else
- {
- free(p);
- EDBUG_RETURN(s);
- }
- strcat(s, ".cmd");
- if (canexec(s))
- {
- free(p);
- EDBUG_RETURN(s);
- }
- strcpy(s + strlen(s) - 3, "exe");
- if (canexec(s))
- {
- free(p);
- EDBUG_RETURN(s);
- }
-#endif
Efree(s);
}
cp = ep + 1;
@@ -980,10 +901,7 @@
strncpy(s, cp, len);
s[len] = 0;
s = Erealloc(s, len + 2 + exelen);
-#ifdef __EMX__
- if (s[len - 1] != '/')
-#endif
- strcat(s, "/");
+ strcat(s, "/");
strcat(s, file);
if (canexec(s))
EDBUG_RETURN(s);
@@ -1000,11 +918,8 @@
int len, exelen;
EDBUG(9, "pathtofile");
-#ifndef __EMX__
- if (file[0] == '/')
-#else
- if (_fnisabs(file))
-#endif
+
+ if (isabspath(file))
{
if (exists(file))
EDBUG_RETURN(duplicate(file));
@@ -1016,12 +931,7 @@
EDBUG_RETURN(NULL);
cp = p;
exelen = strlen(file);
-#ifndef __EMX__
while ((ep = strchr(cp, ':')))
-#else
- cp = p = _fnslashify(strdup(p));
- while ((ep = strchr(cp, ';')))
-#endif
{
len = ep - cp;
s = Emalloc(len + 1);
@@ -1030,20 +940,10 @@
strncpy(s, cp, len);
s[len] = 0;
s = Erealloc(s, len + 2 + exelen);
-#ifdef __EMX__
- if (s[len - 1] != '/')
-#endif
- strcat(s, "/");
+ strcat(s, "/");
strcat(s, file);
if (exists(s))
-#ifndef __EMX__
EDBUG_RETURN(s);
-#else
- {
- free(p);
- EDBUG_RETURN(s);
- }
-#endif
Efree(s);
}
cp = ep + 1;
@@ -1055,32 +955,18 @@
strncpy(s, cp, len);
s[len] = 0;
s = Erealloc(s, len + 2 + exelen);
-#ifdef __EMX__
- if (s[len - 1] != '/')
-#endif
- strcat(s, "/");
+ strcat(s, "/");
strcat(s, file);
if (exists(s))
-#ifndef __EMX__
EDBUG_RETURN(s);
-#else
- {
- free(p);
- EDBUG_RETURN(s);
- }
-#endif
Efree(s);
}
-#ifdef __EMX__
- free(p);
-#endif
EDBUG_RETURN(NULL);
}
int
findLocalizedFile(char *fname)
{
-#ifndef __EMX__
char *tmp, *lang, *p[3];
int i;
@@ -1111,7 +997,6 @@
strcpy(fname, tmp);
free(tmp);
free(lang);
-#endif
return 0;
}
@@ -1122,11 +1007,7 @@
{
char s[FILEPATH_LEN_MAX];
-#ifndef __EMX__
Esnprintf(s, sizeof(s), "/bin/rm -rf %s", path);
-#else
- Esnprintf(s, sizeof(s), "rm.exe -rf %s", path);
-#endif
system(s);
}
#endif
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/handlers.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -3 -r1.31 -r1.32
--- handlers.c 19 Jan 2004 22:30:30 -0000 1.31
+++ handlers.c 18 Feb 2004 22:18:41 -0000 1.32
@@ -110,11 +110,7 @@
break;
case SIGCHLD:
-#ifndef __EMX__
while (waitpid(-1, &status, WNOHANG) > 0);
-#else
- waitpid(-1, &status, WNOHANG);
-#endif
break;
}
EDBUG_RETURN_;
@@ -137,11 +133,7 @@
for (i = 0; i < sizeof(signals) / sizeof(int); i++)
{
sa.sa_handler = SignalHandler;
-#ifndef __EMX__
sa.sa_flags = (signals[i] == SIGCHLD) ? SA_RESTART : 0;
-#else
- sa.sa_flags = 0;
-#endif
sigemptyset(&sa.sa_mask);
sigaction(signals[i], &sa, (struct sigaction *)0);
}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/main.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -3 -r1.74 -r1.75
--- main.c 13 Feb 2004 18:36:51 -0000 1.74
+++ main.c 18 Feb 2004 22:18:41 -0000 1.75
@@ -33,8 +33,8 @@
if (fork())
EDBUG_RETURN_;
- Esnprintf(file, sizeof(file), "exec %s/dox %s/E-docs", ENLIGHTENMENT_BIN,
- ENLIGHTENMENT_ROOT);
+ Esnprintf(file, sizeof(file), "exec %s/dox %s/E-docs",
+ EDirBin(), EDirRoot());
execl(usershell(getuid()), usershell(getuid()), "-c", (char *)file, NULL);
exit(0);
@@ -199,11 +199,7 @@
if (file)
{
s[0] = 0;
-#ifndef __EMX__
f = fopen(file, "r");
-#else
- f = fopen(file, "rt");
-#endif
if (f)
{
if (fscanf(f, "%4000s", s) < 1)
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/menus.c,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -3 -r1.102 -r1.103
--- menus.c 16 Feb 2004 23:14:01 -0000 1.102
+++ menus.c 18 Feb 2004 22:18:41 -0000 1.103
@@ -945,13 +945,7 @@
MenuItem *mi;
struct stat st;
const char *chmap =
-#ifndef __EMX__
"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";
-
-#else
- "0123456789abcdefghijklmnopqrstuvwxyz��������������������������-_";
-
-#endif
FILE *f;
EDBUG(5, "MenuCreateFromDirectory");
@@ -961,13 +955,7 @@
{
int aa, bb, cc;
-#ifndef __EMX__
aa = (int)st.st_ino;
-#else
- list = ls(dir, &num);
- aa = (int)num;
- freestrlist(list, num);
-#endif
bb = (int)st.st_dev;
cc = 0;
if (st.st_mtime > st.st_ctime)
@@ -989,11 +977,7 @@
/* cached dir listing - use it */
if (exists(cs))
{
-#ifndef __EMX__
f = fopen(cs, "r");
-#else
- f = fopen(cs, "rt");
-#endif
while (fgets(s, sizeof(s), f))
{
s[strlen(s) - 1] = 0;
@@ -1214,12 +1198,7 @@
char s2[4096], s3[512];
int aa, bb, cc;
-#ifndef __EMX__
aa = (int)st.st_ino;
-#else
- aa = (int)st.st_nlink;
-#endif
-
bb = (int)st.st_dev;
cc = 0;
if (st.st_mtime > st.st_ctime)
@@ -1406,11 +1385,7 @@
char first = 1;
char s[4096];
-#ifndef __EMX__
f = fopen(file, "r");
-#else
- f = fopen(file, "rt");
-#endif
if (!f)
{
fprintf(stderr, "Unable to open menu file %s -- %s\n", file,
@@ -1614,11 +1589,7 @@
}
else
{
-#ifndef __EMX__
f = fopen(ss, "r");
-#else
- f = fopen(ss, "rt");
-#endif
if (f)
{
char *iname = NULL, *exec = NULL, *texec =
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/misc.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -3 -r1.41 -r1.42
--- misc.c 13 Feb 2004 18:36:52 -0000 1.41
+++ misc.c 18 Feb 2004 22:18:41 -0000 1.42
@@ -21,34 +21,28 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
-#ifdef __EMX__
-extern char *__XOS2RedirRoot(const char *);
-
-#endif
void EdgeTimeout(int val, void *data);
static char *dir = NULL;
static char *cacheDir = NULL;
+static const char *const bins[] = { "dox", "eesh", "epp" };
+static const char *const docs[] =
+ { "E-docs/MAIN", "E-docs/Edoc_bg.png", "E-docs/E_logo.png" };
+static const char *const thms[] = { "themes/DEFAULT/epplets/epplets.cfg" };
+
+#define N_BINS (sizeof(bins)/sizeof(char*))
+#define N_DOCS (sizeof(docs)/sizeof(char*))
+#define N_THMS (sizeof(thms)/sizeof(char*))
+
void
BlumFlimFrub(void)
{
int i;
char s[1024];
- char *bins[3] =
-#ifndef __EMX__
- { "dox", "eesh", "epp" };
-
-#else
- { "dox.exe", "eesh.exe", "epp.exe" };
-
-#endif
- char *docs[4] =
- { "E-docs/MAIN", "E-docs/Edoc_bg.png", "E-docs/E_logo.png" };
- char *thms[1] = { "themes/DEFAULT/epplets/epplets.cfg" };
- for (i = 0; i < 3; i++)
+ for (i = 0; i < N_BINS; i++)
{
Esnprintf(s, sizeof(s), "%s/%s", EDirBin(), bins[i]);
if (!exists(s))
@@ -78,7 +72,7 @@
}
}
- for (i = 0; i < 3; i++)
+ for (i = 0; i < N_DOCS; i++)
{
Esnprintf(s, sizeof(s), "%s/%s", EDirRoot(), docs[i]);
if (!exists(s))
@@ -97,7 +91,7 @@
}
}
- for (i = 0; i < 1; i++)
+ for (i = 0; i < N_THMS; i++)
{
Esnprintf(s, sizeof(s), "%s/%s", EDirRoot(), thms[i]);
if (!exists(s))
@@ -119,21 +113,13 @@
const char *
EDirBin(void)
{
-#ifndef __EMX__
return ENLIGHTENMENT_BIN;
-#else
- return __XOS2RedirRoot(ENLIGHTENMENT_BIN);
-#endif
}
const char *
EDirRoot(void)
{
-#ifndef __EMX__
return ENLIGHTENMENT_ROOT;
-#else
- return __XOS2RedirRoot(ENLIGHTENMENT_ROOT);
-#endif
}
void
@@ -145,17 +131,16 @@
char *
EDirUser(void)
{
+ char *home, buf[4096];
+
if (dir)
return dir;
- {
- char *home, buf[4096];
+ home = homedir(getuid());
+ Esnprintf(buf, sizeof(buf), "%s/.enlightenment", home);
+ Efree(home);
+ dir = duplicate(buf);
- home = homedir(getuid());
- Esnprintf(buf, sizeof(buf), "%s/.enlightenment", home);
- Efree(home);
- dir = duplicate(buf);
- }
return dir;
}
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/session.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -3 -r1.52 -r1.53
--- session.c 13 Feb 2004 18:36:52 -0000 1.52
+++ session.c 18 Feb 2004 22:18:41 -0000 1.53
@@ -26,6 +26,20 @@
#include <unistd.h>
#include <sys/time.h>
+#ifndef DEFAULT_SH_PATH
+#ifdef __sgi
+/*
+ * It appears that SGI (at least IRIX 6.4) uses ksh as their sh, and it
+ * seems to run in restricted mode, so things like restart fail miserably.
+ * Let's use csh instead
+ * -KDT 07/31/98
+ */
+#define DEFAULT_SH_PATH "/sbin/csh"
+#else
+#define DEFAULT_SH_PATH "/bin/sh"
+#endif
+#endif
+
#ifdef _LIBC
#include <stdint.h>
#define gettimeofday __gettimeofday
@@ -49,14 +63,8 @@
Emkstemp(char *template)
{
static const char letters[]
-#ifndef __EMX__
= "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
-#else
- = "abcdefghijklmnopqrstuvwxyz��������������������������0123456789";
-
-#endif
-
static big_type value;
struct timeval tv;
char *XXXXXX;
@@ -265,11 +273,7 @@
char s[4096], s1[4096];
Esnprintf(s, sizeof(s), "%s.clients.%i", GetSMFile(), root.scr);
-#ifndef __EMX__
f = fopen(s, "r");
-#else
- f = fopen(s, "rt");
-#endif
if (f)
{
while (fgets(s, sizeof(s), f))
@@ -1137,9 +1141,7 @@
if (params)
{
SoundExit();
-#ifndef __EMX__
setsid();
-#endif
sscanf(params, "%1000s", s);
ThemeCleanup();
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/setup.c,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -3 -r1.111 -r1.112
--- setup.c 13 Feb 2004 18:36:52 -0000 1.111
+++ setup.c 18 Feb 2004 22:18:41 -0000 1.112
@@ -23,12 +23,6 @@
#include "E.h"
#include <X11/keysym.h>
-#ifdef __EMX__
-extern char *__XOS2RedirRoot(const char *);
-
-#include <io.h>
-#endif
-
void
MapUnmap(int start)
{
@@ -574,11 +568,6 @@
Esetenv("ETHEME", themepath, 1);
Esetenv("ECONFDIR", EDirUser(), 1);
Esetenv("ECACHEDIR", EDirUserCache(), 1);
-
-#ifdef __EMX__
- Esetenv("EMXSHELL", "sh.exe", 1);
-#endif
- return;
}
Window
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/snaps.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -3 -r1.58 -r1.59
--- snaps.c 8 Feb 2004 17:02:27 -0000 1.58
+++ snaps.c 18 Feb 2004 22:18:41 -0000 1.59
@@ -21,9 +21,6 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "E.h"
-#ifdef __EMX__
-#include <process.h>
-#endif
static Snapshot *NewSnapshot(char *name);
@@ -982,13 +979,10 @@
if (!exists(buf))
Esnprintf(buf, sizeof(buf), "%s.snapshots.%i", GetGenericSMFile(),
root.scr);
-#ifndef __EMX__
f = fopen(buf, "r");
-#else
- f = fopen(buf, "rt");
-#endif
if (!f)
return;
+
res_w = root.w;
res_h = root.h;
while (fgets(buf, sizeof(buf), f))
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/startup.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -3 -r1.34 -r1.35
--- startup.c 13 Feb 2004 18:36:52 -0000 1.34
+++ startup.c 18 Feb 2004 22:18:41 -0000 1.35
@@ -23,7 +23,6 @@
#include "E.h"
#include <sys/time.h>
-#ifndef __EMX__
int
AddEToFile(char *file)
{
@@ -129,12 +128,10 @@
fclose(f);
EDBUG_RETURN(1);
}
-#endif
void
AddE()
{
-#ifndef __EMX__
char *h;
char s[1024];
int val;
@@ -160,7 +157,6 @@
if (h)
Efree(h);
EDBUG_RETURN_;
-#endif
}
void
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/src/theme.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -3 -r1.30 -r1.31
--- theme.c 13 Feb 2004 18:36:52 -0000 1.30
+++ theme.c 18 Feb 2004 22:18:41 -0000 1.31
@@ -22,11 +22,6 @@
*/
#include "E.h"
-#ifdef __EMX__
-#include <process.h>
-extern char *__XOS2RedirRoot(const char *);
-#endif
-
#define ENABLE_THEME_SANITY_CHECKING 0
static char *badtheme = NULL;
@@ -96,14 +91,12 @@
badreason = _("Theme does not contain a slideouts.cfg file\n");
return 0;
}
-#ifndef __EMX__ /* OS/2 Team will compile ESound after XMMS
project */
Esnprintf(s, sizeof(s), "%s/%s", dir, "sound.cfg");
if (!isfile(s))
{
badreason = _("Theme does not contain a sound.cfg file\n");
return 0;
}
-#endif
Esnprintf(s, sizeof(s), "%s/%s", dir, "tooltips.cfg");
if (!isfile(s))
{
@@ -173,7 +166,6 @@
if (!strcmp(str[i], "DEFAULT"))
{
Esnprintf(ss, sizeof(ss), "%s/%s", dir, str[i]);
-#ifndef __EMX__
if (readlink(ss, s, sizeof(s)) > 0)
{
if (s[0] == '/')
@@ -184,17 +176,6 @@
def = duplicate(s);
}
}
-#else
- if (isdir(ss))
- {
- def = duplicate(ss);
- (*count)++;
- (*list) =
- Erealloc(*list, (*count) * sizeof(char *));
-
- (*list)[(*count) - 1] = duplicate(ss);
- }
-#endif
}
else
{
@@ -259,51 +240,41 @@
int count;
Esnprintf(ss, sizeof(ss), "%s/themes/DEFAULT", EDirUser());
-#ifndef __EMX__
count = readlink(ss, s, sizeof(s));
if ((exists(ss)) && (count > 0))
{
s[count] = 0;
- if (s[0] == '/')
+ if (isabspath(s))
def = duplicate(s);
else
{
Esnprintf(ss, sizeof(ss), "%s/themes/%s", EDirUser(), s);
def = duplicate(ss);
}
+ return def;
}
-#else
- if (isdir(ss))
- def = duplicate(ss);
-#endif
- if (!def)
+
+ Esnprintf(ss, sizeof(ss), "%s/themes/DEFAULT", EDirRoot());
+ count = readlink(ss, s, sizeof(s));
+ if ((exists(ss)) && (count > 0))
{
- Esnprintf(ss, sizeof(ss), "%s/themes/DEFAULT", EDirRoot());
-#ifndef __EMX__
- count = readlink(ss, s, sizeof(s));
- if ((exists(ss)) && (count > 0))
+ s[count] = 0;
+ if (isabspath(s))
+ def = duplicate(s);
+ else
{
- s[count] = 0;
- if (s[0] == '/')
- def = duplicate(s);
- else
- {
- Esnprintf(ss, sizeof(ss), "%s/themes/%s", EDirRoot(), s);
- def = duplicate(ss);
- }
+ Esnprintf(ss, sizeof(ss), "%s/themes/%s", EDirRoot(), s);
+ def = duplicate(ss);
}
-#else
- if (isdir(ss))
- def = duplicate(ss);
-#endif
+ return def;
}
- return def;
+
+ return NULL;
}
void
ThemeSetDefault(const char *theme)
{
-#ifndef __EMX__
/* os2 has no symlink,
* but it doesn't matter since we have ~/.enlightenment/user_theme.cfg
*/
@@ -314,7 +285,6 @@
rm(ss);
if (theme)
symlink(theme, ss);
-#endif
}
static char *
@@ -415,11 +385,7 @@
EDBUG_RETURN(duplicate(s));
}
-#ifndef __EMX__
- if (theme[0] == '/')
-#else
- if (_fnisabs(theme))
-#endif
+ if (isabspath(theme))
ret = ThemeExtract(theme);
if (!ret)
{
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs