diff options
author | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2003-03-24 13:35:11 +0000 |
---|---|---|
committer | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2003-03-24 13:35:11 +0000 |
commit | ef619044e39b1116411043eecb10c1f0ff014b53 (patch) | |
tree | a09e271dbbede1d455752c33b4919c3d19ec5c26 /src/jtutil | |
parent | ae70e713db572a4fb250c3b8d5a337b6840a5cea (diff) |
pull C-compatible stuff out of "jtutil/util.hh" into a separate
C-only header file to avoid problems with strict C compilers not
grokking C++-style // comments even in #ifdef __cplusplus sections
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@1007 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/jtutil')
-rw-r--r-- | src/jtutil/miscstr.c | 6 | ||||
-rw-r--r-- | src/jtutil/util.hh | 32 |
2 files changed, 7 insertions, 31 deletions
diff --git a/src/jtutil/miscstr.c b/src/jtutil/miscstr.c index 6553b55..97aefeb 100644 --- a/src/jtutil/miscstr.c +++ b/src/jtutil/miscstr.c @@ -6,11 +6,7 @@ #include "../include/stdc.h" -/* - * exceptionally, this (C++) header file is safe to #include from C, - * and contains a prototype for AHFinderDirect_Strlcat() . - */ -#include "util.hh" +#include "misc.h" /******************************************************************************/ diff --git a/src/jtutil/util.hh b/src/jtutil/util.hh index ddba0d7..80ca2dc 100644 --- a/src/jtutil/util.hh +++ b/src/jtutil/util.hh @@ -1,29 +1,10 @@ -/* util.hh -- stuff for my C++ utility library */ -/* $Header$ */ - -/* - * prerequisites: - * <stdlib.h> or <string.h> or <stdio.h> // size_t - * "stdc.h" - * - * This is mainly a C++ header file, but exceptionally (until Tom puts - * my latest patches into the Cactus flesh :), it's safe to #include - * from C code, to provide a prototype for AHFinderDirect_Strlcat(). - * Thus we use C comments here. - */ - -/* - * misc string functions (in C, not C++) - */ -#ifdef __cplusplus -extern "C" -#endif -size_t AHFinderDirect_Strlcat(char* dst, const char* src, size_t dst_size); +// $Header$ + +// +// prerequisites: +// "stdc.h" +// -/* - * the rest of this file is C++ only - */ -#ifdef __cplusplus namespace jtutil { @@ -223,4 +204,3 @@ public: //****************************************************************************** } // namespace jtutil -#endif /* __cplusplus */ |