2N/A/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2N/A/*
2N/A * Copyright (C) 2008 by the Massachusetts Institute of Technology,
2N/A * Cambridge, MA, USA. All Rights Reserved.
2N/A *
2N/A * This software is being provided to you, the LICENSEE, by the
2N/A * Massachusetts Institute of Technology (M.I.T.) under the following
2N/A * license. By obtaining, using and/or copying this software, you agree
2N/A * that you have read, understood, and will comply with these terms and
2N/A * conditions:
2N/A *
2N/A * Export of this software from the United States of America may
2N/A * require a specific license from the United States Government.
2N/A * It is the responsibility of any person or organization contemplating
2N/A * export to obtain such a license before exporting.
2N/A *
2N/A * WITHIN THAT CONSTRAINT, permission to use, copy, modify and distribute
2N/A * this software and its documentation for any purpose and without fee or
2N/A * royalty is hereby granted, provided that you agree to comply with the
2N/A * following copyright notice and statements, including the disclaimer, and
2N/A * that the same appear on ALL copies of the software and documentation,
2N/A * including modifications that you make for internal use or for
2N/A * distribution:
2N/A *
2N/A * THIS SOFTWARE IS PROVIDED "AS IS", AND M.I.T. MAKES NO REPRESENTATIONS
2N/A * OR WARRANTIES, EXPRESS OR IMPLIED. By way of example, but not
2N/A * limitation, M.I.T. MAKES NO REPRESENTATIONS OR WARRANTIES OF
2N/A * MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF
2N/A * THE LICENSED SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY
2N/A * PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
2N/A *
2N/A * The name of the Massachusetts Institute of Technology or M.I.T. may NOT
2N/A * be used in advertising or publicity pertaining to distribution of the
2N/A * software. Title to copyright in this software and any associated
2N/A * documentation shall at all times remain with M.I.T., and USER agrees to
2N/A * preserve same.
2N/A *
2N/A * Furthermore if you modify this software you must label
2N/A * your software as modified software and not distribute it in such a
2N/A * fashion that it might be confused with the original M.I.T. software.
2N/A */
2N/A/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
2N/A *
2N/A * Copyright 1998-2008 The OpenLDAP Foundation.
2N/A * All rights reserved.
2N/A *
2N/A * Redistribution and use in source and binary forms, with or without
2N/A * modification, are permitted only as authorized by the OpenLDAP
2N/A * Public License.
2N/A *
2N/A * A copy of this license is available in file LICENSE in the
2N/A * top-level directory of the distribution or, alternatively, at
2N/A * <http://www.OpenLDAP.org/license.html>.
2N/A */
2N/A/* This notice applies to changes, created by or for Novell, Inc.,
2N/A * to preexisting works for which notices appear elsewhere in this file.
2N/A *
2N/A * Copyright (C) 2000 Novell, Inc. All Rights Reserved.
2N/A *
2N/A * THIS WORK IS SUBJECT TO U.S. AND INTERNATIONAL COPYRIGHT LAWS AND TREATIES.
2N/A * USE, MODIFICATION, AND REDISTRIBUTION OF THIS WORK IS SUBJECT TO VERSION
2N/A * 2.0.1 OF THE OPENLDAP PUBLIC LICENSE, A COPY OF WHICH IS AVAILABLE AT
2N/A * HTTP://WWW.OPENLDAP.ORG/LICENSE.HTML OR IN THE FILE "LICENSE" IN THE
2N/A * TOP-LEVEL DIRECTORY OF THE DISTRIBUTION. ANY USE OR EXPLOITATION OF THIS
2N/A * WORK OTHER THAN AS AUTHORIZED IN VERSION 2.0.1 OF THE OPENLDAP PUBLIC
2N/A * LICENSE, OR OTHER PRIOR WRITTEN CONSENT FROM NOVELL, COULD SUBJECT THE
2N/A * PERPETRATOR TO CRIMINAL AND CIVIL LIABILITY.
2N/A */
2N/A
2N/A#ifndef K5_UNICODE_H
2N/A#define K5_UNICODE_H
2N/A
2N/A#include "autoconf.h"
2N/A
2N/A#ifdef HAVE_SYS_TYPES_H
2N/A#include <sys/types.h>
2N/A#endif
2N/A
2N/A#ifdef HAVE_UNISTD_H
2N/A#include <unistd.h>
2N/A#endif
2N/A
2N/A#ifdef HAVE_STDLIB_H
2N/A#include <stdlib.h>
2N/A#endif
2N/A
2N/A#include "k5-utf8.h"
2N/A
2N/Atypedef krb5_ucs4 krb5_unicode;
2N/A
2N/Aint krb5int_ucstrncmp(
2N/A const krb5_unicode *,
2N/A const krb5_unicode *,
2N/A size_t);
2N/A
2N/Aint krb5int_ucstrncasecmp(
2N/A const krb5_unicode *,
2N/A const krb5_unicode *,
2N/A size_t);
2N/A
2N/Akrb5_unicode *krb5int_ucstrnchr(
2N/A const krb5_unicode *,
2N/A size_t,
2N/A krb5_unicode);
2N/A
2N/Akrb5_unicode *krb5int_ucstrncasechr(
2N/A const krb5_unicode *,
2N/A size_t,
2N/A krb5_unicode);
2N/A
2N/Avoid krb5int_ucstr2upper(
2N/A krb5_unicode *,
2N/A size_t);
2N/A
2N/A#define KRB5_UTF8_NOCASEFOLD 0x0U
2N/A#define KRB5_UTF8_CASEFOLD 0x1U
2N/A#define KRB5_UTF8_ARG1NFC 0x2U
2N/A#define KRB5_UTF8_ARG2NFC 0x4U
2N/A#define KRB5_UTF8_APPROX 0x8U
2N/A
2N/Akrb5_error_code krb5int_utf8_normalize(
2N/A krb5_data *,
2N/A krb5_data **,
2N/A unsigned);
2N/A
2N/Aint krb5int_utf8_normcmp(
2N/A const krb5_data *,
2N/A const krb5_data *,
2N/A unsigned);
2N/A
2N/A#endif /* K5_UNICODE_H */