1 /* clib.c: Functions which we normally expect to find in the C library.
2 $Id: clib.c,v 1.1.1.1 1997/08/21 22:57:59 jason Exp $
4 This file is part of GNU Info, a program for reading online documentation
7 Copyright (C) 1995 Free Software Foundation, Inc.
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2, or (at your option)
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 Written by Brian Fox (bfox@ai.mit.edu). */
27 #if defined (HAVE_UNISTD_H)
31 #if defined (HAVE_STDLIB_H)
35 #if defined (HAVE_STRING_H)
39 #include <sys/errno.h>
41 extern void *xmalloc (), *xrealloc ();
48 #if !defined (HAVE_STRERROR)
49 extern char *sys_errlist
[];
59 return (sys_errlist
[num
]);
61 #endif /* !HAVE_STRERROR */
63 #if !defined (HAVE_STRCASECMP)
64 /* This Unix doesn't have the strcasecmp () function. */
66 strcasecmp (string1
, string2
)
67 char *string1
, *string2
;
79 ch1
= info_toupper (ch1
);
80 ch2
= info_toupper (ch2
);
87 /* Compare at most COUNT characters from string1 to string2. Case
90 strncasecmp (string1
, string2
, count
)
91 char *string1
, *string2
;
94 register char ch1
, ch2
;
101 ch1
= info_toupper (ch1
);
102 ch2
= info_toupper (ch2
);
111 #endif /* !STRCASECMP */