Back to index

tetex-bin  3.0
progname.h
Go to the documentation of this file.
00001 /* progname.h: Declarations for argv[0] equivalents.
00002 
00003 Copyright (C) 1994, 96 Karl Berry.
00004 
00005 This library is free software; you can redistribute it and/or
00006 modify it under the terms of the GNU Library General Public
00007 License as published by the Free Software Foundation; either
00008 version 2 of the License, or (at your option) any later version.
00009 
00010 This library is distributed in the hope that it will be useful,
00011 but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 Library General Public License for more details.
00014 
00015 You should have received a copy of the GNU Library General Public
00016 License along with this library; if not, write to the Free Software
00017 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
00018 
00019 #ifndef KPATHSEA_PROGNAME_H
00020 #define KPATHSEA_PROGNAME_H
00021 
00022 #include <kpathsea/c-proto.h>
00023 #include <kpathsea/types.h>
00024 
00025 extern KPSEDLL string program_invocation_name;
00026 extern KPSEDLL string program_invocation_short_name;
00027 extern KPSEDLL string kpse_program_name;
00028 
00029 /* Set the first two variables above (if they're not predefined) to a copy
00030    of ARGV0 and everything in ARGV0 after the last directory separator,
00031    respectively.  Set kpse_program_name to a copy of PROGNAME or the
00032    or the value of program_invocation_short_name if PROGNAME is NULL.
00033    This function also determines the AUTO* variables. */
00034 
00035 extern KPSEDLL void kpse_set_program_name P2H(const_string argv0,
00036                                       const_string progname);
00037 
00038 /* See also `kpse_reset_program_name' which is defined in tex-file.c
00039 
00040    That function is to be used to set kpse_program_name to a different
00041    value.  It clears the path searching information, to ensure that
00042    the search paths are appropriate to the new name. */
00043 
00044 /* DEPRECATED
00045    Set first two variables above (if they're not predefined) to a copy of
00046    ARGV0 and everything in ARGV0 after the last directory separator,
00047    respectively.  kpse_program_name is _always_ set to a copy of everything
00048    in ARGV0 after the last directory separator. */
00049 
00050 extern KPSEDLL void kpse_set_progname P1H(const_string argv0);
00051 
00052 #endif /* not KPATHSEA_PROGNAME_H */