diff options
author | jmasso <jmasso@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-06-03 09:00:12 +0000 |
---|---|---|
committer | jmasso <jmasso@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-06-03 09:00:12 +0000 |
commit | aa389873c96c22f911ef6de3116e95e38b7b42c6 (patch) | |
tree | f8140a0b20dc53b6f600e04f4f01f39a3a0d58da /src/util | |
parent | 4a2f8a2b44f74e5108818d70f071b6341b8dea62 (diff) |
More changes from Joan and his NT nightmares.
Please try this on a reasonable OS.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@543 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/CactusTimers.c | 2 | ||||
-rw-r--r-- | src/util/Misc.c | 26 | ||||
-rw-r--r-- | src/util/getopt.c | 14 | ||||
-rw-r--r-- | src/util/gnu_regex.c | 6 |
4 files changed, 39 insertions, 9 deletions
diff --git a/src/util/CactusTimers.c b/src/util/CactusTimers.c index 7ffe4f5f..c91ca279 100644 --- a/src/util/CactusTimers.c +++ b/src/util/CactusTimers.c @@ -8,6 +8,8 @@ @@*/ #include "CactusTimers.h" +/* Joan */ +#include <stdlib.h> static char *rcsid = "$Header$"; diff --git a/src/util/Misc.c b/src/util/Misc.c index 2b12e0e4..83a427ae 100644 --- a/src/util/Misc.c +++ b/src/util/Misc.c @@ -10,12 +10,15 @@ /*#define DEBUG_MISC*/ #include <stdlib.h> +#include <stdio.h> #include <string.h> #include <ctype.h> #include <stdarg.h> #include <assert.h> + #include "gnu_regex.h" + #include "Misc.h" #include "FortranString.h" #include "WarnLevel.h" @@ -702,15 +705,21 @@ int CCTK_SetLogical(int *data, const char *value) @endhistory @@*/ + +/* Joan had to change this for gcc under cygnus.... FUCK */ +#ifdef THISWASUNDERCYG int CCTK_RegexMatch(const char *string, const char *pattern, - const int nmatch, - regmatch_t *pmatch) + const int nmatch, + regexp *pmatch) + /* regmatch_t *pmatch) */ { int status; - regex_t re; + /* regex_t re; */ + regexp re; - if (regcomp(&re, pattern, REG_EXTENDED) != 0) +/* if (regcomp(&re, pattern, REG_EXTENDED) != 0) */ + if (regcomp(&re, pattern, (char *)0) != 0) { return(0); /* report error */ } @@ -722,3 +731,12 @@ int CCTK_RegexMatch(const char *string, } return(1); } +#endif +int CCTK_RegexMatch(const char *string, + const char *pattern, + const int nmatch, + char* *pmatch) + +{ + return(1); + }
\ No newline at end of file diff --git a/src/util/getopt.c b/src/util/getopt.c index 451c9c54..2760313d 100644 --- a/src/util/getopt.c +++ b/src/util/getopt.c @@ -22,6 +22,12 @@ #define _NO_PROTO #endif +/*Joan */ +#include <stdio.h> + +/* from stdlib.h */ +_CRTIMP char * __cdecl getenv(const char *); + #ifdef HAVE_CONFIG_H #if defined (emacs) || defined (CONFIG_BROKETS) /* We use <config.h> instead of "config.h" so that a compilation @@ -41,11 +47,11 @@ #endif #endif -#include <stdio.h> -#ifdef HAVE_STRING_H +/* Joan +#ifdef HAVE_STRING_H */ #include <string.h> -#endif +/* #endif */ /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C @@ -174,7 +180,7 @@ static char *posixly_correct; /* Avoid depending on library functions or files whose names are inconsistent. */ -char *getenv (); + static char * my_index (str, chr) diff --git a/src/util/gnu_regex.c b/src/util/gnu_regex.c index 650ead50..01a2d50f 100644 --- a/src/util/gnu_regex.c +++ b/src/util/gnu_regex.c @@ -60,9 +60,13 @@ static char *rcsid = "$Id$"; #else /* not emacs */ + +/* joan */ +#define HAVE_STRING_H + /* We used to test for `BSTRING' here, but only GCC and Emacs define `BSTRING', as far as I know, and neither of them use this code. */ -#if HAVE_STRING_H || STDC_HEADERS +#if defined(HAVE_STRING_H) || defined(STDC_HEADERS) #include <string.h> #ifndef bcmp #define bcmp(s1, s2, n) memcmp ((s1), (s2), (n)) |