Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/dox


Modified Files:
        dox.c file.c 


Log Message:
Good bye __EMX__.
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/dox/dox.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- dox.c       13 Feb 2004 18:13:55 -0000      1.23
+++ dox.c       18 Feb 2004 22:18:40 -0000      1.24
@@ -328,21 +328,13 @@
    im_exit1 = LoadImage("exit1.xpm");
    im_exit2 = LoadImage("exit2.xpm");
 
-#ifndef __EMX__
    f = fopen(s, "r");
-#else
-   f = fopen(s, "rt");
-#endif
    if (!f)
      {
        strcpy(s, docdir);
        strcat(s, "/");
        strcat(s, docfile);
-#ifndef __EMX__
        f = fopen(s, "r");
-#else
-       f = fopen(s, "rt");
-#endif
        if (!f)
          {
             printf("Edoc_dir %s does not contain a %s file\n", docdir,
===================================================================
RCS file: /cvsroot/enlightenment/e16/e/dox/file.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- file.c      13 Feb 2004 18:13:55 -0000      1.12
+++ file.c      18 Feb 2004 22:18:40 -0000      1.13
@@ -26,11 +26,6 @@
 # include <wctype.h>
 #endif
 
-#ifdef __EMX__
-#define chdir  _chdir2
-#define getcwd _getcwd2
-#endif
-
 char               *
 FileExtension(char *file)
 {
@@ -357,8 +352,6 @@
    static int          usr_uid = -1;
    static char        *usr_s = NULL;
    char               *s;
-
-#ifndef __EMX__
    struct passwd      *pwd;
 
    if (usr_uid < 0)
@@ -373,10 +366,6 @@
           usr_s = strdup(s);
        return (s);
      }
-#else
-   if ((s = getenv("USER")) != NULL)
-      return (s);
-#endif
    return (strdup("unknown"));
 }
 
@@ -386,8 +375,6 @@
    static int          usr_uid = -1;
    static char        *usr_s = NULL;
    char               *s;
-
-#ifndef __EMX__
    struct passwd      *pwd;
 
    if (usr_uid < 0)
@@ -402,12 +389,6 @@
           usr_s = strdup(s);
        return (s);
      }
-#else
-   if ((s = getenv("HOME")) != NULL)
-      return (s);
-   else if ((s = getenv("TMP")) != NULL)
-      return (s);
-#endif
    return (strdup("/tmp"));
 }
 
@@ -417,8 +398,6 @@
    static int          usr_uid = -1;
    static char        *usr_s = NULL;
    char               *s;
-
-#ifndef __EMX__
    struct passwd      *pwd;
 
    if (usr_uid < 0)
@@ -434,9 +413,6 @@
        return (s);
      }
    return (strdup("/bin/sh"));
-#else
-   return (strdup("sh.exe"));
-#endif
 }
 
 char               *
@@ -859,11 +835,7 @@
    char               *s;
    int                 len, exelen;
 
-#ifndef __EMX__
    if (file[0] == '/')
-#else
-   if (_fnisabs(file))
-#endif
      {
        if (canexec(file))
           return (strdup(file));
@@ -875,11 +847,7 @@
       return (NULL);
    cp = p;
    exelen = strlen(file);
-#ifndef __EMX__
    while ((ep = strchr(cp, ':')))
-#else
-   while ((ep = strchr(cp, ';')))
-#endif
      {
        len = ep - cp;
        s = malloc(len + 1);
@@ -888,10 +856,7 @@
             strncpy(s, cp, len);
             s[len] = 0;
             s = realloc(s, len + 2 + exelen);
-#ifdef __EMX__
-            if (s[len - 1] != '/')
-#endif
-               strcat(s, "/");
+            strcat(s, "/");
             strcat(s, file);
             if (canexec(s))
                return (s);
@@ -906,10 +871,7 @@
        strncpy(s, cp, len);
        s[len] = 0;
        s = realloc(s, len + 2 + exelen);
-#ifdef __EMX__
-       if (s[len - 1] != '/')
-#endif
-          strcat(s, "/");
+       strcat(s, "/");
        strcat(s, file);
        if (canexec(s))
           return (s);
@@ -925,11 +887,7 @@
    char               *s;
    int                 len, exelen;
 
-#ifndef __EMX__
    if (file[0] == '/')
-#else
-   if (_fnisabs(file))
-#endif
      {
        if (exists(file))
           return (strdup(file));
@@ -941,11 +899,7 @@
       return (NULL);
    cp = p;
    exelen = strlen(file);
-#ifndef __EMX__
    while ((ep = strchr(cp, ':')))
-#else
-   while ((ep = strchr(cp, ';')))
-#endif
      {
        len = ep - cp;
        s = malloc(len + 1);
@@ -954,10 +908,7 @@
             strncpy(s, cp, len);
             s[len] = 0;
             s = realloc(s, len + 2 + exelen);
-#ifdef __EMX__
-            if (s[len - 1] != '/')
-#endif
-               strcat(s, "/");
+            strcat(s, "/");
             strcat(s, file);
             if (exists(s))
                return (s);
@@ -972,10 +923,7 @@
        strncpy(s, cp, len);
        s[len] = 0;
        s = realloc(s, len + 2 + exelen);
-#ifdef __EMX__
-       if (s[len - 1] != '/')
-#endif
-          strcat(s, "/");
+       strcat(s, "/");
        strcat(s, file);
        if (exists(s))
           return (s);
@@ -987,7 +935,6 @@
 int
 findLocalizedFile(char *fname)
 {
-#ifndef __EMX__
    char               *tmp, *lang, *p[3];
    int                 i;
 
@@ -1018,7 +965,6 @@
    strcpy(fname, tmp);
    free(tmp);
    free(lang);
-#endif
 
    return 0;
 }




-------------------------------------------------------
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

Reply via email to