Enlightenment CVS committal

Author  : doursse
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        Makefile.am ewl_base.h ewl_config.c ewl_entry.c ewl_filelist.c 
        ewl_filelist.h ewl_private.h 


Log Message:

* reorganize configure.in
* use evil on windows, hence remove most of the win32 specific code
* fix glew engine wrt the latest modifications
* add directdraw engine
* minor fixes in tests on Windows

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/Makefile.am,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -3 -r1.65 -r1.66
--- Makefile.am 20 May 2008 23:47:00 -0000      1.65
+++ Makefile.am 29 Jun 2008 14:01:39 -0000      1.66
@@ -9,7 +9,7 @@
 -DPACKAGE_LIB_DIR=\"$(libdir)\" \
 -DPACKAGE_SYSCONF_DIR=\"$(sysconfdir)\" \
 $(GCOV_CFLAGS) \
[EMAIL PROTECTED]@ @ECORE_CFLAGS@ @EVAS_CFLAGS@ @EMOTION_CFLAGS@ 
@EPSILON_CFLAGS@ @EFREET_CFLAGS@
[EMAIL PROTECTED]@ @ECORE_CFLAGS@ @EVAS_CFLAGS@ @EMOTION_CFLAGS@ 
@EPSILON_CFLAGS@ @EFREET_CFLAGS@ @EVIL_CFLAGS@
 
 lib_LTLIBRARIES = libewl.la
 
@@ -190,8 +190,8 @@
 installed_headersdir = $(prefix)/include/ewl
 installed_headers_DATA = $(EWLHEADERS)
 
-libewl_la_LIBADD = $(GCOV_LIBS) @EMOTION_LIBS@ @EPSILON_LIBS@ @EFREET_LIBS@ 
@EDJE_LIBS@ @ECORE_LIBS@ @EVAS_LIBS@ -lm
-libewl_la_LDFLAGS = @create_shared_lib@ -version-info @INTERFACE_VERSION@
+libewl_la_LIBADD = $(GCOV_LIBS) @EMOTION_LIBS@ @EPSILON_LIBS@ @EFREET_LIBS@ 
@EDJE_LIBS@ @ECORE_LIBS@ @EVAS_LIBS@ @EVIL_LIBS@ @fnmatch_libs@ -lm
+libewl_la_LDFLAGS = @lt_no_undefined@ @lt_enable_auto_import@ -version-info 
@INTERFACE_VERSION@
 libewl_la_LIBTOOLFLAGS =
 
 clean-local:
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_base.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- ewl_base.h  6 May 2008 20:22:55 -0000       1.5
+++ ewl_base.h  29 Jun 2008 14:01:39 -0000      1.6
@@ -9,13 +9,6 @@
 #include <Ecore.h>
 #include <Ecore_Data.h>
 
-/* typedef to allow inclusion of ewl_filelist.h */
-/* and ewl_filelist_model.h on Windows */
-#ifdef _WIN32
-typedef unsigned long uid_t;
-typedef unsigned long gid_t;
-#endif /* _WIN32 */
-
 #include <ewl_enums.h>
 #include <ewl_object.h>
 #include <ewl_widget.h>
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_config.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -3 -r1.40 -r1.41
--- ewl_config.c        7 May 2008 13:38:23 -0000       1.40
+++ ewl_config.c        29 Jun 2008 14:01:39 -0000      1.41
@@ -4,18 +4,26 @@
 #include "ewl_private.h"
 #include "ewl_debug.h"
 
-#include <Evas.h>
 #include <unistd.h>
 #if HAVE_FCNTL_H
 # include <fcntl.h>
 #endif /* HAVE_FCNTL_H */
 #include <libgen.h>
 
-#ifdef _WIN32
-# include <io.h>
-# include <share.h>
-# include <sys/locking.h>
-#endif /* _WIN32 */
+#ifdef HAVE_EVIL
+# include <Evil.h>
+#endif
+
+#include <Evas.h>
+
+/*
+ * On Windows, if the file is not opened in binary mode,
+ * read does not return the correct size, because of
+ * CR / LF translation.
+ */
+#ifndef O_BINARY
+# define O_BINARY 0
+#endif
 
 Ewl_Config *ewl_config = NULL;
 Ewl_Config_Cache ewl_config_cache;
@@ -618,16 +626,8 @@
         if (!hash)
                 DRETURN_INT(TRUE, DLEVEL_STABLE);
 
-#ifndef _WIN32
-        fd = open(file, O_CREAT | O_WRONLY | O_TRUNC,
+        fd = open(file, O_CREAT | O_WRONLY | O_TRUNC | O_BINARY,
                         S_IRWXU | S_IRGRP | S_IROTH);
-#else
-# ifdef __MINGW32__
-        fd = _sopen(file, O_CREAT | O_WRONLY | O_TRUNC, _SH_DENYRD, S_IRWXU);
-# else
-        _sopen_s(&fd, file, O_CREAT | O_WRONLY | O_TRUNC, _SH_DENYRD, S_IRWXU);
-# endif /* __MINGW32 */
-#endif /* _WIN32 */
         if (fd == -1)
         {
                 DWARNING("Unable to open cfg file %s.", file);
@@ -971,15 +971,7 @@
         if (!ecore_file_exists(file))
                 DRETURN_INT(FALSE, DLEVEL_STABLE);
 
-#ifndef _WIN32
-        fd = open(file, O_RDONLY, S_IRUSR);
-#else
-# ifdef __MINGW32__
-        fd = _sopen(file, O_RDONLY, _SH_DENYWR, S_IRUSR);
-# else
-        _sopen_s(&fd, file, O_RDONLY, _SH_DENYWR, S_IRUSR);
-# endif /* __MINGW32 */
-#endif /* _WIN32 */
+        fd = open(file, O_RDONLY | O_BINARY, S_IRUSR);
         if (fd == -1)
         {
                 DWARNING("Unable to open cfg file %s.", file);
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_entry.c,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -3 -r1.88 -r1.89
--- ewl_entry.c 4 Jun 2008 20:18:26 -0000       1.88
+++ ewl_entry.c 29 Jun 2008 14:01:39 -0000      1.89
@@ -10,81 +10,15 @@
 #endif /* HAVE_LANGINFO_H */
 #include "ewl_debug.h"
 
+#ifdef HAVE_EVIL
+# include <Evil.h>
+#endif /* HAVE_EVIL */
+
+
 static Ewl_Widget *ewl_entry_view_cb_widget_fetch(void *data, unsigned int row,
                                                         unsigned int col);
 static Ewl_Widget *ewl_entry_view_cb_header_fetch(void *data, unsigned int 
col);
 
-#ifdef _WIN32
-# include <locale.h>
-
-typedef int nl_item;
-# define __NL_ITEM( CATEGORY, INDEX )  ((CATEGORY << 16) | INDEX)
-
-# define __NL_ITEM_CATEGORY( ITEM )    (ITEM >> 16)
-# define __NL_ITEM_INDEX( ITEM )       (ITEM & 0xffff)
-
-/*
- * Enumerate the item classification indices...
- *
- */
-enum {
-  /*
-   * LC_CTYPE category...
-   * Character set classification items.
-   *
-   */
-  _NL_CTYPE_CODESET = __NL_ITEM( LC_CTYPE, 0 ),
-
-  /*
-   * Dummy entry, to terminate the list.
-   *
-   */
-  _NL_ITEM_CLASSIFICATION_END
-};
-
-/*
- * Define the public aliases for the enumerated classification indices...
- *
- */
-# define CODESET       _NL_CTYPE_CODESET
-
-static char *replace( char *prev, char *value )
-{
-  if( value == NULL )
-    return prev;
-
-  if( prev )
-    free( prev );
-  return strdup( value );
-}
-
-char *nl_langinfo( nl_item index )
-{
-  // static char result[128];
-  static char *result = NULL;
-  static char *nothing = "";
-
-  switch( index )
-  {
-    case CODESET:
-      {
-        char *p;
-        result = replace( result, setlocale( LC_CTYPE, NULL ));
-        if( (p = strrchr( result, '.' )) == NULL )
-          return nothing;
-
-        if( (++p - result) > 2 )
-          strcpy( result, "cp" );
-        else
-          *result = '\0';
-        strcat( result, p );
-        return result;
-      }
-  }
-  return nothing;
-}
-
-#endif /* _WIN32 */
 
 /**
  * @return Returns a new Ewl_Widget on success or NULL on failure
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_filelist.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -3 -r1.62 -r1.63
--- ewl_filelist.c      23 Jun 2008 23:37:27 -0000      1.62
+++ ewl_filelist.c      29 Jun 2008 14:01:39 -0000      1.63
@@ -12,6 +12,7 @@
 #include "ewl_private.h"
 #include "ewl_debug.h"
 #include "ewl_scrollpane.h"
+
 #include <sys/types.h>
 #if HAVE_PWD_H
 # include <pwd.h>
@@ -649,7 +650,6 @@
         if ((S_IWUSR & st_mode) == S_IWUSR) perm[1] = 'w';
         if ((S_IXUSR & st_mode) == S_IXUSR) perm[2] = 'x';
 
-#ifndef _WIN32
         if ((S_IRGRP & st_mode) == S_IRGRP) perm[3] = 'r';
         if ((S_IWGRP & st_mode) == S_IWGRP) perm[4] = 'w';
         if ((S_IXGRP & st_mode) == S_IXGRP) perm[5] = 'x';
@@ -657,14 +657,13 @@
         if ((S_IROTH & st_mode) == S_IROTH) perm[6] = 'r';
         if ((S_IWOTH & st_mode) == S_IWOTH) perm[7] = 'w';
         if ((S_IXOTH & st_mode) == S_IXOTH) perm[8] = 'x';
-#endif /* _WIN32 */
 
         DRETURN_PTR(perm, DLEVEL_STABLE);
 }
 
 /**
  * @param st_uid: The userid to lookup. On Windows, this parameter
- *                should be unused.
+ *                is unused.
  * @return Returns the user name for the given user id
  * @brief Convertes the given user id into the approriate user name
  */
@@ -674,10 +673,6 @@
         char name[PATH_MAX];
 #ifdef HAVE_PWD_H
         struct passwd *pwd = NULL;
-#else
-# ifdef _WIN32
-        char *homedir;
-# endif /* _WIN32 */
 #endif /* HAVE_PWD_H */
 
         DENTER_FUNCTION(DLEVEL_STABLE);
@@ -687,26 +682,6 @@
         if (pwd)
                 snprintf(name, PATH_MAX, "%s", pwd->pw_name);
         else
-#else
-# ifdef _WIN32
-        /* we are on Windows, so we get the user name from */
-        /* the environment variable HOME or USERPROFILE */
-        homedir = getenv("HOME");
-        if (!homedir) homedir = getenv("USERPROFILE");
-        if (homedir)
-        {
-                char *p;
-                p = homedir;
-                while (p)
-                {
-                        if (*p == '\\') *p = '/';
-                        p++;
-                }
-                p = strrchr(homedir, '/');
-                snprintf(name, PATH_MAX, "%s", p);
-        }
-        else
-# endif /* _WIN32 */
 #endif /* HAVE_PWD_H */
                 snprintf(name, PATH_MAX, "%-8d", (int)st_uid);
 
@@ -714,7 +689,8 @@
 }
 
 /**
- * @param st_gid: The group id to convert
+ * @param st_gid: The group id to convert On Windows, this parameter
+ *                is unused.
  * @return Returns the group name for the given id
  * @brief Converts the given group id into a group name
  */
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_filelist.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -3 -r1.26 -r1.27
--- ewl_filelist.h      23 Jun 2008 23:37:27 -0000      1.26
+++ ewl_filelist.h      29 Jun 2008 14:01:39 -0000      1.27
@@ -8,7 +8,16 @@
 #include "ewl_text.h"
 #include "ewl_model.h"
 #include "ewl_view.h"
+
 #include <Ecore_File.h>
+
+#ifndef uid_t
+# define uid_t unsigned long
+#endif
+
+#ifndef gid_t
+# define gid_t unsigned long
+#endif
 
 /**
  * @addtogroup Ewl_Filelist Ewl_Filelist: The base widget for the filelists
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_private.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- ewl_private.h       6 May 2008 20:22:56 -0000       1.24
+++ ewl_private.h       29 Jun 2008 14:01:39 -0000      1.25
@@ -2,9 +2,6 @@
 #ifndef _EWL_PRIVATE_H
 #define _EWL_PRIVATE_H
 
-#include <Ecore_Str.h>
-#include <Ecore_File.h>
-
 #ifdef HAVE_CONFIG_H
 #include "ewl-config.h"
 #endif
@@ -29,6 +26,9 @@
 # endif
 void *alloca (size_t);
 #endif
+
+#include <Ecore_Str.h>
+#include <Ecore_File.h>
 
 #ifndef PATH_MAX
 #define PATH_MAX 4096



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to