1 /* $NetBSD: utbmstub.c,v 1.1.1.4 2014/05/28 09:58:45 tron Exp $ */ 2 3 /* $OpenLDAP$ */ 4 /* This work is part of OpenLDAP Software <http://www.openldap.org/>. 5 * 6 * Copyright 1998-2014 The OpenLDAP Foundation. 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted only as authorized by the OpenLDAP 11 * Public License. 12 * 13 * A copy of this license is available in file LICENSE in the 14 * top-level directory of the distribution or, alternatively, at 15 * <http://www.OpenLDAP.org/license.html>. 16 */ 17 /* Copyright 1997, 1998, 1999 Computing Research Labs, 18 * New Mexico State University 19 * 20 * Permission is hereby granted, free of charge, to any person obtaining a 21 * copy of this software and associated documentation files (the "Software"), 22 * to deal in the Software without restriction, including without limitation 23 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 24 * and/or sell copies of the Software, and to permit persons to whom the 25 * Software is furnished to do so, subject to the following conditions: 26 * 27 * The above copyright notice and this permission notice shall be included in 28 * all copies or substantial portions of the Software. 29 * 30 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 31 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 32 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 33 * THE COMPUTING RESEARCH LAB OR NEW MEXICO STATE UNIVERSITY BE LIABLE FOR ANY 34 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT 35 * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR 36 * THE USE OR OTHER DEALINGS IN THE SOFTWARE. 37 */ 38 /* Id: utbmstub.c,v 1.1 1999/09/21 15:45:18 mleisher Exp */ 39 40 #include "utbm.h" 41 42 /* 43 * This should be redefined to use the `isspace' function available in the 44 * Unicode support on the platform where this is being used. 45 */ 46 #define _platform_isspace(x) 0 47 48 /* 49 * Return non-zero for any character that should be considered the equivalent 50 * of a space character. Return zero otherwise. 51 */ 52 int 53 _utbm_isspace(ucs4_t c, int compress) 54 { 55 if (compress) 56 return (c == 0x09 || c == 0x0a || c == 0x0d || 57 c == 0x2028 || c == 0x2029 || _platform_isspace(c)) ? 1 : 0; 58 59 return _platform_isspace(c); 60 61 } 62 63 /* 64 * Return non-zero if the character is a control character, or zero otherwise. 65 */ 66 int 67 _utbm_iscntrl(ucs4_t c) 68 { 69 return 0; 70 } 71 72 /* 73 * Return non-zero if the character is a non-spacing character, or zero 74 * otherwise. 75 */ 76 int 77 _utbm_nonspacing(ucs4_t c) 78 { 79 return 0; 80 } 81 82 /* 83 * Convert a character to lower case. 84 */ 85 ucs4_t 86 _utbm_tolower(ucs4_t c) 87 { 88 return c; 89 } 90 91 /* 92 * Convert a character to upper case. 93 */ 94 ucs4_t 95 _utbm_toupper(ucs4_t c) 96 { 97 return c; 98 } 99 100 /* 101 * Convert a character to title case. 102 */ 103 ucs4_t 104 _utbm_totitle(ucs4_t c) 105 { 106 return c; 107 } 108