1 /* Functions copied over from kpathsea library.
3 Original uppercasify is
4 Copyright 1993 Karl Berry.
6 Original xfopen/xfclose are
7 Copyright 1992, 93, 95 Free Software Foundation, Inc.
10 Copyright 2004 Olaf Weber.
12 This library is free software; you can redistribute it and/or
13 modify it under the terms of the GNU Library General Public
14 License as published by the Free Software Foundation; either
15 version 2 of the License, or (at your option) any later version.
17 This library is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 Library General Public License for more details.
22 You should have received a copy of the GNU Library General Public
23 License along with this library; if not, write to the Free Software
24 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
27 #include <kpathsea/c-ctype.h>
28 /* Get rid of kpathsea debug definitions. */
33 uppercasify (const_string s
)
36 string ret
= malloc (strlen(s
) + 1);
40 *target
= TOUPPER(*s
);
49 /* These routines just check the return status from standard library
50 routines and abort if an error happens. */
53 xfopen (const_string filename
, const_string mode
)
57 assert (filename
&& mode
);
59 f
= fopen (filename
, mode
);
70 xfclose (FILE *f
, const_string filename
)
74 if (fclose (f
) == EOF
) {