Bug#354507: libkpathsea3 should be removed
On Thu, Mar 02, 2006 at 07:22:56PM +0100, Frank Küster wrote:
> Adrian Bunk <bunk@stusta.de> wrote:
>
> > Your example is irrelevant since this is a difference between different
> > teTeX versions but not between libkpathsea3 and libkpathsea4.
> >
> > The proof is simple (./kpsewhich is the program from sarge (linked with
> > libkpathsea3) copied to an unstable system):
> >
> > $ ./kpsewhich lm.map
> > /etc/texmf/map/dvips/lm/lm.map
> > $ ./kpsewhich --format='dvips config' lm.map
> > $ ./kpsewhich --format=map lm.map
> > /etc/texmf/map/dvips/lm/lm.map
> > $
>
> I stand corrected - I assumed it was a change in the internal
> assignments of categories in tex-file.c
>
> But that still leaves us with Olaf's statement that he is unsure about
> the API.
That's not that hard to check.
The API is defined through the header files, and below is a complete
diff of the header files.
The only thing that looks slightly suspicious is the
kpse_file_format_type change, but I don't see any way for it to cause
serious problems.
> Regards, Frank
cu
Adrian
diff -ur libkpathsea3/kpathsea/c-auto.h libkpathsea4/kpathsea/c-auto.h
--- libkpathsea3/kpathsea/c-auto.h 2005-10-03 16:50:38.000000000 +0200
+++ libkpathsea4/kpathsea/c-auto.h 2006-02-27 00:56:55.000000000 +0100
@@ -11,7 +11,7 @@
#define KPATHSEA_C_AUTO_H
/* kpathsea: the version string. */
-#define KPSEVERSION "kpathsea version 3.4.5"
+#define KPSEVERSION "kpathsea version 3.5.4"
/* kpathsea/configure.in tests for these functions with
kb_AC_KLIBTOOL_REPLACE_FUNCS, and naturally Autoheader doesn't know
@@ -111,6 +111,9 @@
/* Define if you have the <dirent.h> header file. */
#define HAVE_DIRENT_H 1
+/* Define if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
/* Define if you have the <float.h> header file. */
#define HAVE_FLOAT_H 1
@@ -132,6 +135,9 @@
/* Define if you have the <string.h> header file. */
#define HAVE_STRING_H 1
+/* Define if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
/* Define if you have the <sys/dir.h> header file. */
/* #undef HAVE_SYS_DIR_H */
diff -ur libkpathsea3/kpathsea/c-memstr.h libkpathsea4/kpathsea/c-memstr.h
--- libkpathsea3/kpathsea/c-memstr.h 2005-10-03 16:50:38.000000000 +0200
+++ libkpathsea4/kpathsea/c-memstr.h 2006-02-27 00:56:55.000000000 +0100
@@ -24,7 +24,8 @@
#ifdef HAVE_STRING_H
#include <string.h>
-#else
+#endif
+#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
@@ -64,6 +65,14 @@
#define bzero(s, len) memset ((s), 0, (len))
#endif
+#if !defined(HAVE_INDEX) && !defined(index)
+#define index(s, c) strchr ((s), (c))
+#endif
+
+#if !defined(HAVE_RINDEX) && !defined(rindex)
+#define rindex(s, c) strrchr ((s), (c))
+#endif
+
#if !defined(HAVE_STRING_H)
extern char *strtok ();
#ifndef strstr
diff -ur libkpathsea3/kpathsea/config.h libkpathsea4/kpathsea/config.h
--- libkpathsea3/kpathsea/config.h 2005-10-03 16:50:38.000000000 +0200
+++ libkpathsea4/kpathsea/config.h 2006-02-27 00:56:55.000000000 +0100
@@ -32,11 +32,14 @@
#define __i386_pc_gnu__
#endif
-/* If we have either DOS or OS2, we are DOSISH. */
-#if defined(__i386_pc_gnu__) || \
- defined(OS2) || \
- defined(MSDOS) || defined(__MSDOS__) || defined(DOS) || \
- defined(WIN32) || defined(__WIN32__) || defined(_WIN32)
+/* If we have either DOS or OS2, we are DOSISH. Cygwin pretends to be
+ * unix, mostly, so don't include it here.
+ */
+#if defined(OS2) || \
+ defined(MSDOS) || defined(__MSDOS__) || defined(DOS) || \
+ defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || \
+ defined(DJGPP) || defined(__DJGPP__) || \
+ defined(MINGW32) || defined(__MINGW32__)
#define DOSISH
#endif
diff -ur libkpathsea3/kpathsea/c-proto.h libkpathsea4/kpathsea/c-proto.h
--- libkpathsea3/kpathsea/c-proto.h 2005-10-03 16:50:38.000000000 +0200
+++ libkpathsea4/kpathsea/c-proto.h 2006-02-27 00:56:55.000000000 +0100
@@ -19,20 +19,15 @@
#ifndef KPATHSEA_C_PROTO_H
#define KPATHSEA_C_PROTO_H
-#if defined(WIN32)
-#ifdef KPSE_DLL
+#if defined (KPSE_DLL) && (defined (WIN32) || defined (__CYGWIN__))
#ifdef MAKE_KPSE_DLL
-#define KPSEDLL __declspec( dllexport)
-#else
-#define KPSEDLL __declspec( dllimport)
+#define KPSEDLL __declspec(dllexport)
+#else /* ! MAKE_KPSE_DLL */
+#define KPSEDLL __declspec(dllimport)
#endif
-#else
+#else /* ! (KPSE_DLL && (WIN32 || __CYGWIN__)) */
#define KPSEDLL
#endif
-#else /* ! WIN32 */
-#define KPSEDLL
-#endif
-
/* These macros munge function declarations to make them work in both
cases. The P?H macros are used for declarations, the P?C for
diff -ur libkpathsea3/kpathsea/db.h libkpathsea4/kpathsea/db.h
--- libkpathsea3/kpathsea/db.h 2005-10-03 16:50:38.000000000 +0200
+++ libkpathsea4/kpathsea/db.h 2006-02-27 00:56:55.000000000 +0100
@@ -35,6 +35,10 @@
extern str_list_type *kpse_db_search P3H(const_string name,
const_string path_elt, boolean all);
+extern str_list_type *kpse_db_search_list P3H(const_string* names,
+ const_string path_elt,
+ boolean all);
+
/* Insert the filename FNAME into the database.
Called by mktexpk et al. */
extern KPSEDLL void kpse_db_insert P1H(const_string fname);
diff -ur libkpathsea3/kpathsea/getopt.h libkpathsea4/kpathsea/getopt.h
--- libkpathsea3/kpathsea/getopt.h 2005-10-03 16:50:38.000000000 +0200
+++ libkpathsea4/kpathsea/getopt.h 2006-02-27 00:56:55.000000000 +0100
@@ -26,16 +26,15 @@
#ifndef __STDC__
#define __STDC__ 1
#endif
-#if defined (KPSE_DLL) || defined (GNUW32_DLL)
-#if defined (MAKE_KPSE_DLL) || defined (MAKE_GNUW32_DLL)
-#define KPSEDLL __declspec( dllexport)
-#else
-#define KPSEDLL __declspec( dllimport)
#endif
-#else
-#define KPSEDLL
+
+#if defined (KPSE_DLL) && (defined (WIN32) || defined (__CYGWIN__))
+#ifdef MAKE_KPSE_DLL
+#define KPSEDLL __declspec(dllexport)
+#else /* ! MAKE_KPSE_DLL */
+#define KPSEDLL __declspec(dllimport)
#endif
-#else /* ! WIN32 */
+#else /* ! (KPSE_DLL && (WIN32 || __CYGWIN__)) */
#define KPSEDLL
#endif
diff -ur libkpathsea3/kpathsea/pathsearch.h libkpathsea4/kpathsea/pathsearch.h
--- libkpathsea3/kpathsea/pathsearch.h 2005-10-03 16:50:38.000000000 +0200
+++ libkpathsea4/kpathsea/pathsearch.h 2006-02-27 00:56:55.000000000 +0100
@@ -74,11 +74,20 @@
const_string name,
boolean must_exist);
+/* Like kpse_path_search, except we're given a list of names. */
+extern KPSEDLL string kpse_path_search_list P3H(const_string path,
+ const_string* names,
+ boolean must_exist);
/* Like `kpse_path_search' with MUST_EXIST true, but return a list of
all the filenames (or NULL if none), instead of taking the first. */
extern KPSEDLL string *kpse_all_path_search P2H(const_string path,
const_string name);
+/* Like `kpse_path_search_list' with MUST_EXIST true, but return a list of
+ all the filenames (or NULL if none), instead of taking the first. */
+extern KPSEDLL string *kpse_all_path_search_list P2H(const_string path,
+ const_string* names);
+
#endif /* not KPATHSEA_PATHSEARCH_H */
diff -ur libkpathsea3/kpathsea/paths.h libkpathsea4/kpathsea/paths.h
--- libkpathsea3/kpathsea/paths.h 2005-10-03 16:50:38.000000000 +0200
+++ libkpathsea4/kpathsea/paths.h 2006-02-27 00:56:55.000000000 +0100
@@ -2,20 +2,35 @@
#ifndef DEFAULT_TEXMFMAIN
#define DEFAULT_TEXMFMAIN "/usr/share/texmf"
#endif
+#ifndef DEFAULT_TEXMFDIST
+#define DEFAULT_TEXMFDIST "/usr/share/texmf"
+#endif
#ifndef DEFAULT_TEXMFLOCAL
-#define DEFAULT_TEXMFLOCAL "/usr/share/texmf-local"
+#define DEFAULT_TEXMFLOCAL "/usr/local/share/texmf"
+#endif
+#ifndef DEFAULT_TEXMFSYSVAR
+#define DEFAULT_TEXMFSYSVAR "/var/lib/texmf"
+#endif
+#ifndef DEFAULT_TEXMFSYSCONFIG
+#define DEFAULT_TEXMFSYSCONFIG "/usr/share/texmf"
#endif
-#ifndef DEFAULT_HOMETEXMF
-#define DEFAULT_HOMETEXMF "$HOME/texmf"
+#ifndef DEFAULT_TEXMFHOME
+#define DEFAULT_TEXMFHOME "$HOME/texmf"
+#endif
+#ifndef DEFAULT_TEXMFVAR
+#define DEFAULT_TEXMFVAR "$HOME/.texmf-var"
+#endif
+#ifndef DEFAULT_TEXMFCONFIG
+#define DEFAULT_TEXMFCONFIG "$HOME/.texmf-config"
#endif
#ifndef DEFAULT_TEXMF
-#define DEFAULT_TEXMF "{$HOMETEXMF,!!/usr/share/texmfLOCAL,!!/usr/share/texmf}"
+#define DEFAULT_TEXMF "{!!/usr/share/texmfCONFIG,!!/usr/share/texmfVAR,/usr/share/texmfHOME,!!/usr/share/texmfLOCAL,!!/usr/share/texmfSYSVAR,!!/usr/share/texmf}"
#endif
#ifndef DEFAULT_SYSTEXMF
-#define DEFAULT_SYSTEXMF "/usr/share/texmf"
+#define DEFAULT_SYSTEXMF "/usr/share/texmfLOCAL:/usr/share/texmf:/usr/share/texmfDIST"
#endif
#ifndef DEFAULT_VARTEXFONTS
-#define DEFAULT_VARTEXFONTS "/var/spool/texmf"
+#define DEFAULT_VARTEXFONTS "/var/cache/fonts"
#endif
#ifndef DEFAULT_TEXMFDBS
#define DEFAULT_TEXMFDBS "/usr/share/texmf:/var/spool/texmf"
@@ -24,7 +39,7 @@
#define DEFAULT_WEB2C "/usr/share/texmf/web2c"
#endif
#ifndef DEFAULT_TEXINPUTS
-#define DEFAULT_TEXINPUTS ".:/usr/share/texmf/tex/{generic,}//"
+#define DEFAULT_TEXINPUTS ".:/usr/share/texmf/tex/{$progname,generic,}//"
#endif
#ifndef DEFAULT_MFINPUTS
#define DEFAULT_MFINPUTS ".:/usr/share/texmf/metafont//:{/usr/share/texmf/fonts,/var/spool/texmf}/source//"
@@ -69,19 +84,19 @@
#define DEFAULT_MISCFONTS ".:/usr/share/texmf/fonts/misc//"
#endif
#ifndef DEFAULT_TEXFONTMAPS
-#define DEFAULT_TEXFONTMAPS ".:/usr/share/texmf/fontname"
+#define DEFAULT_TEXFONTMAPS ".:/usr/share/texmf/fonts/map//"
#endif
#ifndef DEFAULT_BIBINPUTS
-#define DEFAULT_BIBINPUTS ".:/usr/share/texmf/bibtex/{bib,}//"
+#define DEFAULT_BIBINPUTS ".:/usr/share/texmf/bibtex/bib//"
#endif
#ifndef DEFAULT_BSTINPUTS
-#define DEFAULT_BSTINPUTS ".:/usr/share/texmf/bibtex/{bst,}//"
+#define DEFAULT_BSTINPUTS ".:/usr/share/texmf/bibtex/bst//"
#endif
#ifndef DEFAULT_MFTINPUTS
#define DEFAULT_MFTINPUTS ".:/usr/share/texmf/mft//"
#endif
#ifndef DEFAULT_TEXPSHEADERS
-#define DEFAULT_TEXPSHEADERS ".:/usr/share/texmf/{dvips,pdftex,tex,fonts/type1}//"
+#define DEFAULT_TEXPSHEADERS ".:/usr/share/texmf/{dvips,fonts/{enc,type1,type3}}//"
#endif
#ifndef DEFAULT_T1FONTS
#define DEFAULT_T1FONTS ".:/usr/share/texmf/fonts/type1//"
@@ -95,14 +110,32 @@
#ifndef DEFAULT_T42FONTS
#define DEFAULT_T42FONTS ".:/usr/share/texmf/fonts/type42//"
#endif
+#ifndef DEFAULT_LIGFONTS
+#define DEFAULT_LIGFONTS ".:/usr/share/texmf/fonts/lig//"
+#endif
#ifndef DEFAULT_TEXCONFIG
#define DEFAULT_TEXCONFIG "/usr/share/texmf/dvips//"
#endif
#ifndef DEFAULT_INDEXSTYLE
#define DEFAULT_INDEXSTYLE ".:/usr/share/texmf/makeindex//"
#endif
+#ifndef DEFAULT_ENCFONTS
+#define DEFAULT_ENCFONTS ".:/usr/share/texmf/fonts/enc//"
+#endif
+#ifndef DEFAULT_CMAPFONTS
+#define DEFAULT_CMAPFONTS ".:/usr/share/texmf/fonts/cmap//"
+#endif
+#ifndef DEFAULT_SFDFONTS
+#define DEFAULT_SFDFONTS ".:/usr/share/texmf/fonts/sfd//"
+#endif
+#ifndef DEFAULT_OPENTYPEFONTS
+#define DEFAULT_OPENTYPEFONTS ".:/usr/share/texmf/fonts/opentype//"
+#endif
+#ifndef DEFAULT_PDFTEXCONFIG
+#define DEFAULT_PDFTEXCONFIG ".:/usr/share/texmf/pdftex/{$progname,}//"
+#endif
#ifndef DEFAULT_TRFONTS
-#define DEFAULT_TRFONTS "/usr/lib/font/devpost"
+#define DEFAULT_TRFONTS "/usr/share/groff/current/font/devps"
#endif
#ifndef DEFAULT_MPSUPPORT
#define DEFAULT_MPSUPPORT ".:/usr/share/texmf/metapost/support"
@@ -146,11 +179,8 @@
#ifndef DEFAULT_T4HTINPUTS
#define DEFAULT_T4HTINPUTS ".:/usr/share/texmf/tex4ht//"
#endif
-#ifndef DEFAULT_XDVIINPUTS
-#define DEFAULT_XDVIINPUTS ".:/usr/share/texmf/{xdvi,dvips}//"
-#endif
-#ifndef DEFAULT_DVIPDFMINPUTS
-#define DEFAULT_DVIPDFMINPUTS ".:/usr/share/texmf/{dvipdfm,dvips}//"
+#ifndef DEFAULT_TEXMFSCRIPTS
+#define DEFAULT_TEXMFSCRIPTS "/usr/share/texmf/scripts//"
#endif
#ifndef DEFAULT_TEXMFCNF
#define DEFAULT_TEXMFCNF "{$SELFAUTOLOC,$SELFAUTODIR,$SELFAUTOPARENT}{,{/share,}/texmf{-local,}/web2c}:$TETEXDIR:/usr/share/texmf/web2c:/usr/share/texmf/web2c"
diff -ur libkpathsea3/kpathsea/tex-file.h libkpathsea4/kpathsea/tex-file.h
--- libkpathsea3/kpathsea/tex-file.h 2005-10-03 16:50:38.000000000 +0200
+++ libkpathsea4/kpathsea/tex-file.h 2006-02-27 00:56:55.000000000 +0100
@@ -92,6 +92,13 @@
kpse_miscfonts_format,
kpse_web_format,
kpse_cweb_format,
+ kpse_enc_format,
+ kpse_cmap_format,
+ kpse_sfd_format,
+ kpse_opentype_format,
+ kpse_pdftex_config_format,
+ kpse_lig_format,
+ kpse_texmfscripts_format,
kpse_last_format /* one past last index */
} kpse_file_format_type;
Reply to: