+2003-01-12 Bruno Haible <bruno@clisp.org>
+
+ * classpath.h: New file.
+ * classpath.c: Turn into an independent source file.
+ (new_classpath, set_classpath, reset_classpath): Make non-static.
+ * javacomp.c: Include classpath.h instead of classpath.c.
+ * javaexec.c: Likewise.
+ * Makefile.am (libgettextlib_la_SOURCES): Add classpath.h, classpath.c.
+ (EXTRA_DIST): Remove classpath.c.
+
2003-01-12 Bruno Haible <bruno@clisp.org>
* localcharset.h: New file.
basename.h basename.c \
binary-io.h \
c-ctype.h c-ctype.c \
+ classpath.h classpath.c \
copy-file.h copy-file.c \
error.h error.c \
execute.h execute.c \
noinst_HEADERS = gettext.h
-EXTRA_DIST += classpath.c \
+EXTRA_DIST += \
$(LIBADD_SOURCE) $(UNUSED_SOURCE) \
gen-lbrkprop.c 3level.h Combining.txt
/* Java CLASSPATH handling.
- Copyright (C) 2001-2002 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software; you can redistribute it and/or modify
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* Specification. */
+#include "classpath.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "xsetenv.h"
+#include "xmalloc.h"
/* Separator in PATH like lists of pathnames. */
#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
# define PATH_SEPARATOR ':'
#endif
-
/* Return the new CLASSPATH value. The given classpaths are prepended to
the current CLASSPATH value. If use_minimal_classpath, the current
CLASSPATH is ignored. */
-static char *
+char *
new_classpath (const char * const *classpaths, unsigned int classpaths_count,
bool use_minimal_classpath)
{
}
/* Set CLASSPATH and returns a safe copy of its old value. */
-static char *
+char *
set_classpath (const char * const *classpaths, unsigned int classpaths_count,
bool use_minimal_classpath, bool verbose)
{
}
/* Restore CLASSPATH to its previous value. */
-static void
+void
reset_classpath (char *old_classpath)
{
if (old_classpath != NULL)
--- /dev/null
+/* Java CLASSPATH handling.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+ Written by Bruno Haible <haible@clisp.cons.org>, 2003.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include <stdbool.h>
+
+/* Return the new CLASSPATH value. The given classpaths are prepended to
+ the current CLASSPATH value. If use_minimal_classpath, the current
+ CLASSPATH is ignored. */
+extern char * new_classpath (const char * const *classpaths,
+ unsigned int classpaths_count,
+ bool use_minimal_classpath);
+
+/* Set CLASSPATH and returns a safe copy of its old value. */
+extern char * set_classpath (const char * const *classpaths,
+ unsigned int classpaths_count,
+ bool use_minimal_classpath, bool verbose);
+
+/* Restore CLASSPATH to its previous value. */
+extern void reset_classpath (char *old_classpath);
#include "execute.h"
#include "pipe.h"
#include "wait-process.h"
+#include "classpath.h"
#include "xsetenv.h"
#include "sh-quote.h"
#include "safe-read.h"
#define _(str) gettext (str)
-/* CLASSPATH handling subroutines. */
-#include "classpath.c"
-
/* Survey of Java compilers.
A = does it work without CLASSPATH being set
#include <string.h>
#include "execute.h"
+#include "classpath.h"
#include "xsetenv.h"
#include "sh-quote.h"
#include "pathname.h"
#define _(str) gettext (str)
-/* CLASSPATH handling subroutines. */
-#include "classpath.c"
-
/* Survey of Java virtual machines.
A = does it work without CLASSPATH being set