Rename collate_range_cmp to __collate_range_cmp for internal usage

inside libc. Add collate_range_cmp as alias to __collate_range_cmp
for temp. backward compatibility.
collate_range_cmp will be replaced with direct code for each
external program for compatibility with the rest of world
This commit is contained in:
Andrey A. Chernov 1996-10-31 04:25:14 +00:00
parent d13d3630fd
commit 38aa46cdf0
2 changed files with 14 additions and 5 deletions

View File

@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: collate.h,v 1.3 1996/08/12 19:18:46 ache Exp $
* $Id: collate.h,v 1.4 1996/10/15 21:53:23 ache Exp $
*/
#ifndef COLLATE_H_INCLUDED
@ -57,6 +57,7 @@ u_char *__collate_strdup __P((u_char *));
u_char *__collate_substitute __P((const u_char *));
int __collate_load_tables __P((char *));
void __collate_lookup __P((u_char *, int *, int *, int *));
int __collate_range_cmp __P((int, int));
#ifdef COLLATE_DEBUG
void __collate_print_tables __P((void));
#endif

View File

@ -23,25 +23,33 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: collcmp.c,v 1.6 1996/09/17 19:27:06 ache Exp $
* $Id: collcmp.c,v 1.7 1996/10/23 15:35:46 ache Exp $
*/
#define ASCII_COMPATIBLE_COLLATE /* see usr.bin/colldef/data */
#include <string.h>
#include <limits.h>
#include <locale.h>
#include "collate.h"
#ifndef ASCII_COMPATIBLE_COLLATE
#include <ctype.h>
#endif
/* Temporary backward compatibility */
int collate_range_cmp (c1, c2)
int c1, c2;
{
return __collate_range_cmp(c1, c2);
}
/*
* Compare two characters converting collate information
* into ASCII-compatible range, it allows to handle
* "[a-z]"-type ranges with national characters.
*/
int collate_range_cmp (c1, c2)
int __collate_range_cmp (c1, c2)
int c1, c2;
{
static char s1[2], s2[2];