Back to index

tetex-bin  3.0
tex-hush.c
Go to the documentation of this file.
00001 /* tex-hush.c: are we suppressing warnings?
00002 
00003 Copyright (C) 1996 Karl Berry.
00004 
00005 This program is free software; you can redistribute it and/or modify
00006 it under the terms of the GNU General Public License as published by
00007 the Free Software Foundation; either version 2, or (at your option)
00008 any later version.
00009 
00010 This program 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
00013 GNU General Public License for more details.
00014 
00015 You should have received a copy of the GNU General Public License
00016 along with this program; if not, write to the Free Software
00017 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
00018 
00019 #include <kpathsea/config.h>
00020 
00021 #include <kpathsea/pathsearch.h>
00022 #include <kpathsea/tex-hush.h>
00023 #include <kpathsea/variable.h>
00024 
00025 boolean
00026 kpse_tex_hush P1C(const_string, what)
00027 {
00028   string h;
00029   string hush = kpse_var_value ("TEX_HUSH");
00030   if (hush) {
00031     if (STREQ (hush, "all"))
00032         return true;
00033     if (STREQ (hush, "none"))
00034         return false;
00035     for (h = kpse_path_element (hush); h; h = kpse_path_element (NULL)) {
00036       /* Don't do anything special with empty elements.  */
00037       if (STREQ (h, what))
00038         return true;
00039     }
00040   }
00041   
00042   return false;
00043 }