/****************************************************************************** ** $Id: init.c,v 1.2 1997/12/06 22:56:00 gerd Exp gerd $ **============================================================================= ** ** This file is part of BibTool. ** It is distributed under the GNU General Public License. ** See the file COPYING for details. ** ** (c) 1996-2004 Gerd Neugebauer ** ** Net: gene@gerd-neugebauer.de ** **----------------------------------------------------------------------------- ** Description: ** This module contains the global initialization function which ** has to be called before any modules in \BibTool{} are ** activated. This is for convenience, thus nobody has to call ** the various initialization functions for the different modules ** by hand. ******************************************************************************/ #include #include #include #include #include #include #include #include #include #include "config.h" #ifdef HAVE_LIBKPATHSEA #include #endif /*****************************************************************************/ /* Internal Programs */ /*===========================================================================*/ /*****************************************************************************/ /* External Programs */ /*===========================================================================*/ /*---------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------- ** Function: init_bibtool() ** Purpose: Perform any initializations necessary for \BibTool. ** ** ** Arguments: ** progname Name of the program for |KPATHSEA|. ** Returns: nothing **___________________________________________________ */ void init_bibtool(progname) /* */ char * progname; /* */ { /* */ #ifdef EMTEX_LIKE_PATH static StringBuffer *sb_rsc; /* */ static StringBuffer *sb_bibtex; /* */ /* */ { char *emtexdir = getenv(EMTEXDIR); /* */ if ( emtexdir == NULL ) emtexdir = EMTEXTDIR_DEFAULT;/* */ sb_rsc = sbopen(); /* */ sbputs(".;",sb_rsc); /* */ sbputs(emtexdir,sb_rsc); /* */ sbputs(EMTEXT_RESOURCE,sb_rsc); /* */ rsc_v_rsc = sbflush(sb_rsc); /* */ sb_bibtex = sbopen(); /* */ sbputs(".;",sb_bibtex); /* */ sbputs(emtexdir,sb_bibtex); /* */ sbputs(EMTEXT_BIBTEX,sb_bibtex); /* */ rsc_v_bibtex = sbflush(sb_bibtex); /* */ } /* */ #endif #ifdef HAVE_LIBKPATHSEA #ifdef HAVE_LIBKPATHSEA2 kpse_set_progname(progname); /* */ #else kpse_set_program_name(progname,"bibtool"); /* */ #endif #endif /* */ init_type(); /* */ init_symbols(); /* */ init_entries(); /* */ init_read(); /* */ /* */ set_rsc_path(rsc_v_rsc); /* */ /* */ init_macros(); /* */ init_read(); /* */ } /*------------------------*/