On Fri, Aug 25, 2006 at 05:05:04PM +0200, Jean-Marc Lasgouttes wrote:
> 
> We have come a long way towards 1.4.3, so now is the time to think
> about a release. I will be in vacation again next week, so the date
> should be some time at the beginning of September.

Please JMarc, could the attached patch be applied to 1.4.x?

It is about small fixes for the cygwin target:
- Cygwin does not have locale support, so the warning about
  "Locale xx_XX could not be set" is bogus.
- Some unnecessary path conversions are avoided.
- When the fronted is Qt3/X11, it is not necessary that external_path
  and external_path_list return a windows style path.

Thanks in advance.

-- 
Enrico
Index: src/ChangeLog
===================================================================
--- src/ChangeLog       (revision 14926)
+++ src/ChangeLog       (working copy)
@@ -1,3 +1,8 @@
+1006-09-07  Enrico Forestieri <[EMAIL PROTECTED]>
+
+       * messages.C (Messages::get): don't warn about locale on cygwin
+       as it is not supported.
+
 2006-08-19  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
 
        * BufferView_pimpl.C (focusChange): new method; updates the
Index: src/support/ChangeLog
===================================================================
--- src/support/ChangeLog       (revision 14926)
+++ src/support/ChangeLog       (working copy)
@@ -1,3 +1,11 @@
+2006-09-07  Enrico Forestieri  <[EMAIL PROTECTED]>
+       * os_cygwin.C (is_windows_path): avoid unnecessary conversion
+       when path is relative
+       (convert_path_list): avoid unnecessary conversion when path
+       list is empty
+       (external_path, external_path_list): for an X11 build it is not
+       necessary that the output path style is windows
+
 2006-06-27  Enrico Forestieri  <[EMAIL PROTECTED]>
 
        * os.h: rename cygwin_path_fix as windows_style_tex_paths.
Index: src/support/os_cygwin.C
===================================================================
--- src/support/os_cygwin.C     (revision 14926)
+++ src/support/os_cygwin.C     (working copy)
@@ -55,8 +55,7 @@ bool is_posix_path(string const & p)
 
 bool is_windows_path(string const & p)
 {
-       return p.empty() ||
-               (!contains(p, '\\') && (p.length() <= 1 || p[1] == ':'));
+       return p.empty() || (!contains(p, '\\') && p[0] != '/');
 }
 
 
@@ -87,6 +86,9 @@ string convert_path(string const & p, Pa
 
 string convert_path_list(string const & p, PathStyle const & target)
 {
+       if (p.empty())
+               return p;
+
        char const * const pc = p.c_str();
        PathStyle const actual = cygwin_posix_path_list_p(pc) ? posix : windows;
 
@@ -186,7 +188,11 @@ string::size_type common_path(string con
 
 string external_path(string const & p)
 {
+#ifdef X_DISPLAY_MISSING
        return convert_path(p, PathStyle(windows));
+#else
+       return convert_path(p, PathStyle(posix));
+#endif
 }
 
 
@@ -198,7 +204,11 @@ string internal_path(string const & p)
 
 string external_path_list(string const & p)
 {
+#ifdef X_DISPLAY_MISSING
        return convert_path_list(p, PathStyle(windows));
+#else
+       return convert_path_list(p, PathStyle(posix));
+#endif
 }
 
 
Index: src/messages.C
===================================================================
--- src/messages.C      (revision 14926)
+++ src/messages.C      (working copy)
@@ -126,10 +126,10 @@ public:
 #endif
                // setlocale fails (returns NULL) if the corresponding locale
                // is not installed.
-               // On windows (mingw) it always returns NULL.
+               // On windows (mingw and cygwin) it always returns NULL.
                // Since this method gets called for every translatable
                // buffer string like e.g. "Figure:" we warn only once.
-#ifndef _WIN32
+#if !defined(_WIN32) && !defined(__CYGWIN__)
                static bool warned = false;
                if (!warned && !lc_msgs) {
                        warned = true;

Reply via email to