[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
4.8.3 djgpp/MinGW patch
From: |
Jason Hood |
Subject: |
4.8.3 djgpp/MinGW patch |
Date: |
Wed, 02 Mar 2005 01:59:13 +1000 |
This patch fixes some things I missed last time, to do with the case
insensitive file system. Now HTAGS will recognise #include statements
that use a different case to the actual filename. GTAGS will store
the actual case of the file (instead of lowering; I made the suffix
test ignore case).
Jason.
--- gtags-parser/gctags~.c Sat Feb 26 14:21:52 2005
+++ gtags-parser/gctags.c Mon Feb 28 15:53:24 2005
@@ -280,10 +280,6 @@
const char *lang, *suffix;
struct lang_entry *ent;
-#if defined(_WIN32) || defined(__DJGPP__)
- /* Lower case the file name since names are case insensitive */
- strlwr(argv[0]);
-#endif
/* get suffix of the path. */
suffix = locatestring(argv[0], ".", MATCH_LAST);
if (!suffix)
--- htags/incop~.c Sat Feb 26 14:21:50 2005
+++ htags/incop.c Mon Feb 28 16:31:30 2005
@@ -26,6 +26,13 @@
#include "queue.h"
#include "global.h"
#include "incop.h"
+
+#if defined(_WIN32) || defined(__DJGPP__)
+# define STRCMP stricmp
+#else
+# define STRCMP strcmp
+#endif
+
/*----------------------------------------------------------------------*/
/* Pool
*/
/*----------------------------------------------------------------------*/
@@ -65,7 +72,7 @@
if (strlen(name) > MAXPATHLEN)
die("name is too long.");
SLIST_FOREACH(data, head, next) {
- if (!strcmp(data->name, name))
+ if (!STRCMP(data->name, name))
break;
}
if (!data) {
@@ -95,7 +102,7 @@
struct data *data;
SLIST_FOREACH(data, head, next) {
- if (!strcmp(data->name, name))
+ if (!STRCMP(data->name, name))
break;
}
return data;
--- libutil/conf~.c Sat Feb 26 14:21:52 2005
+++ libutil/conf.c Mon Feb 28 21:45:30 2005
@@ -335,8 +335,10 @@
/*
* usable search in BINDIR at first.
*/
-#if defined(_WIN32) || defined(__DJGPP__)
+#if defined(_WIN32)
path = "gtags-parser.exe";
+#elif defined(__DJGPP__)
+ path = usable("gtags-parser") ? "gtags-parser.exe" :
"gtags-~1.exe";
#else
path = usable("gtags-parser");
if (!path)
--- libutil/langmap~.c Sat Feb 26 14:21:52 2005
+++ libutil/langmap.c Mon Feb 28 15:52:46 2005
@@ -105,7 +105,11 @@
const char *list;
{
while (*list) {
- if (locatestring(list, suffix, MATCH_AT_FIRST))
+ if (locatestring(list, suffix, MATCH_AT_FIRST
+#if defined(_WIN32) || defined(__DJGPP__)
+ |IGNORE_CASE
+#endif
+ ))
return 1;
for (list++; *list && *list != '.'; list++)
;
- 4.8.3 djgpp/MinGW patch,
Jason Hood <=