#include "config.h"
+#include <glib.h> /* To get stat->_stat redefinition
+ * for mingw32
+ */
+
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <pwd.h>
#endif
-#ifdef WIN32
-#define STRICT
-#include <windows.h>
-
-#ifdef _MSC_VER
-#ifndef S_ISDIR
-#define S_ISDIR(mode) ((mode)&_S_IFDIR)
-#endif
-#define mkdir(path,mode) mkdir(path)
-#endif
-#endif
-
#include "fnmatch.h"
#include "gdk/gdkkeysyms.h"
#include "gtkdialog.h"
#include "gtkintl.h"
+#ifdef WIN32
+#define STRICT
+#include <windows.h>
+
+#ifdef NATIVE_WIN32
+#include <direct.h>
+#include <io.h>
+#define mkdir(p,m) _mkdir(p)
+#ifndef S_ISDIR
+#define S_ISDIR(mode) ((mode)&_S_IFDIR)
+#endif
+
+#endif /* NATIVE_WIN32 */
+
+#endif /* WIN32 */
+
#define DIR_LIST_WIDTH 180
#define DIR_LIST_HEIGHT 180
#define FILE_LIST_WIDTH 180
pat_buf = g_new (gchar, len + 2);
strcpy(pat_buf, dir->cmpl_text);
- strcpy(pat_buf + len, "*");
+ /* Don't append a * if the user entered one herself.
+ * This way one can complete *.h and don't get matches
+ * on any .help files, for instance.
+ */
+ if (strchr(pat_buf, '*') == NULL)
+ strcpy(pat_buf + len, "*");
}
if(first_slash)