Back to index

openldap  2.4.31
utbmstub.c
Go to the documentation of this file.
00001 /* $OpenLDAP$ */
00002 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
00003  *
00004  * Copyright 1998-2012 The OpenLDAP Foundation.
00005  * All rights reserved.
00006  *
00007  * Redistribution and use in source and binary forms, with or without
00008  * modification, are permitted only as authorized by the OpenLDAP
00009  * Public License.
00010  *
00011  * A copy of this license is available in file LICENSE in the
00012  * top-level directory of the distribution or, alternatively, at
00013  * <http://www.OpenLDAP.org/license.html>.
00014  */
00015 /* Copyright 1997, 1998, 1999 Computing Research Labs,
00016  * New Mexico State University
00017  *
00018  * Permission is hereby granted, free of charge, to any person obtaining a
00019  * copy of this software and associated documentation files (the "Software"),
00020  * to deal in the Software without restriction, including without limitation
00021  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
00022  * and/or sell copies of the Software, and to permit persons to whom the
00023  * Software is furnished to do so, subject to the following conditions:
00024  *
00025  * The above copyright notice and this permission notice shall be included in
00026  * all copies or substantial portions of the Software.
00027  *
00028  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00029  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00030  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
00031  * THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY
00032  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
00033  * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
00034  * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00035  */
00036 /* $Id: utbmstub.c,v 1.1 1999/09/21 15:45:18 mleisher Exp $ */
00037 
00038 #include "utbm.h"
00039 
00040 /*
00041  * This should be redefined to use the `isspace' function available in the
00042  * Unicode support on the platform where this is being used.
00043  */
00044 #define _platform_isspace(x) 0
00045 
00046 /*
00047  * Return non-zero for any character that should be considered the equivalent
00048  * of a space character.  Return zero otherwise.
00049  */
00050 int
00051 _utbm_isspace(ucs4_t c, int compress)
00052 {
00053     if (compress)
00054       return (c == 0x09 || c == 0x0a || c == 0x0d ||
00055               c == 0x2028 || c == 0x2029 || _platform_isspace(c)) ? 1 : 0;
00056 
00057     return _platform_isspace(c);
00058         
00059 }
00060 
00061 /*
00062  * Return non-zero if the character is a control character, or zero otherwise.
00063  */
00064 int
00065 _utbm_iscntrl(ucs4_t c)
00066 {
00067     return 0;
00068 }
00069 
00070 /*
00071  * Return non-zero if the character is a non-spacing character, or zero
00072  * otherwise.
00073  */
00074 int
00075 _utbm_nonspacing(ucs4_t c)
00076 {
00077     return 0;
00078 }
00079 
00080 /*
00081  * Convert a character to lower case.
00082  */
00083 ucs4_t
00084 _utbm_tolower(ucs4_t c)
00085 {
00086     return c;
00087 }
00088 
00089 /*
00090  * Convert a character to upper case.
00091  */
00092 ucs4_t
00093 _utbm_toupper(ucs4_t c)
00094 {
00095     return c;
00096 }
00097 
00098 /*
00099  * Convert a character to title case.
00100  */
00101 ucs4_t
00102 _utbm_totitle(ucs4_t c)
00103 {
00104     return c;
00105 }