1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21/* 22 * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 23 * Use is subject to license terms. 24 */ 25/* 26 * ICU License - ICU 1.8.1 and later 27 * 28 * COPYRIGHT AND PERMISSION NOTICE 29 * 30 * Copyright (c) 1995-2005 International Business Machines Corporation and others 31 * All rights reserved. 32 * 33 * Permission is hereby granted, free of charge, to any person obtaining a 34 * copy of this software and associated documentation files (the 35 * "Software"), to deal in the Software without restriction, including 36 * without limitation the rights to use, copy, modify, merge, publish, 37 * distribute, and/or sell copies of the Software, and to permit persons 38 * to whom the Software is furnished to do so, provided that the above 39 * copyright notice(s) and this permission notice appear in all copies of 40 * the Software and that both the above copyright notice(s) and this 41 * permission notice appear in supporting documentation. 42 * 43 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 44 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 45 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 46 * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 47 * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 48 * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 49 * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 50 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 51 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 52 * 53 * Except as contained in this notice, the name of a copyright holder 54 * shall not be used in advertising or otherwise to promote the sale, use 55 * or other dealings in this Software without prior written authorization 56 * of the copyright holder. 57 * 58 * -------------------------------------------------------------------------- 59 * All trademarks and registered trademarks mentioned herein are the property 60 * of their respective owners. 61 */ 62#include <sys/errno.h> 63utf8%system { 64 direction { 65 @condition { 66 inputsize >= 1; 67 @between 0X0...0X7F; 68 } @map { 69 0x00 0x00 // U+0000 70 0x01 0x01 // U+0001 71 0x02 0x02 // U+0002 72 0x03 0x03 // U+0003 73 0x04 0x37 // U+0004 74 0x05 0x2D // U+0005 75 0x06 0x2E // U+0006 76 0x07 0x2F // U+0007 77 0x08 0x16 // U+0008 78 0x09 0x05 // U+0009 79 0x0A 0x25 // U+000a 80 0x0B 0x0B // U+000b 81 0x0C 0x0C // U+000c 82 0x0D 0x0D // U+000d 83 0x0E 0x0E // U+000e 84 0x0F 0x0F // U+000f 85 0x10 0x10 // U+0010 86 0x11 0x11 // U+0011 87 0x12 0x12 // U+0012 88 0x13 0x13 // U+0013 89 0x14 0x3C // U+0014 90 0x15 0x3D // U+0015 91 0x16 0x32 // U+0016 92 0x17 0x26 // U+0017 93 0x18 0x18 // U+0018 94 0x19 0x19 // U+0019 95 0x1A 0x3F // U+001a 96 0x1B 0x27 // U+001b 97 0x1C 0x1C // U+001c 98 0x1D 0x1D // U+001d 99 0x1E 0x1E // U+001e 100 0x1F 0x1F // U+001f 101 0x20 0x40 // U+0020 102 0x21 0x4F // U+0021 103 0x22 0x7F // U+0022 104 0x23 0x7B // U+0023 105 0x24 0x5B // U+0024 106 0x25 0x6C // U+0025 107 0x26 0x50 // U+0026 108 0x27 0x7D // U+0027 109 0x28 0x4D // U+0028 110 0x29 0x5D // U+0029 111 0x2A 0x5C // U+002a 112 0x2B 0x4E // U+002b 113 0x2C 0x6B // U+002c 114 0x2D 0x60 // U+002d 115 0x2E 0x4B // U+002e 116 0x2F 0x61 // U+002f 117 0x30 0xF0 // U+0030 118 0x31 0xF1 // U+0031 119 0x32 0xF2 // U+0032 120 0x33 0xF3 // U+0033 121 0x34 0xF4 // U+0034 122 0x35 0xF5 // U+0035 123 0x36 0xF6 // U+0036 124 0x37 0xF7 // U+0037 125 0x38 0xF8 // U+0038 126 0x39 0xF9 // U+0039 127 0x3A 0x7A // U+003a 128 0x3B 0x5E // U+003b 129 0x3C 0x4C // U+003c 130 0x3D 0x7E // U+003d 131 0x3E 0x6E // U+003e 132 0x3F 0x6F // U+003f 133 0x40 0x7C // U+0040 134 0x41 0xC1 // U+0041 135 0x42 0xC2 // U+0042 136 0x43 0xC3 // U+0043 137 0x44 0xC4 // U+0044 138 0x45 0xC5 // U+0045 139 0x46 0xC6 // U+0046 140 0x47 0xC7 // U+0047 141 0x48 0xC8 // U+0048 142 0x49 0xC9 // U+0049 143 0x4A 0xD1 // U+004a 144 0x4B 0xD2 // U+004b 145 0x4C 0xD3 // U+004c 146 0x4D 0xD4 // U+004d 147 0x4E 0xD5 // U+004e 148 0x4F 0xD6 // U+004f 149 0x50 0xD7 // U+0050 150 0x51 0xD8 // U+0051 151 0x52 0xD9 // U+0052 152 0x53 0xE2 // U+0053 153 0x54 0xE3 // U+0054 154 0x55 0xE4 // U+0055 155 0x56 0xE5 // U+0056 156 0x57 0xE6 // U+0057 157 0x58 0xE7 // U+0058 158 0x59 0xE8 // U+0059 159 0x5A 0xE9 // U+005a 160 0x5B 0x4A // U+005b 161 0x5C 0xE0 // U+005c 162 0x5D 0x5A // U+005d 163 0x5E 0x5F // U+005e 164 0x5F 0x6D // U+005f 165 0x60 0x79 // U+0060 166 0x61 0x81 // U+0061 167 0x62 0x82 // U+0062 168 0x63 0x83 // U+0063 169 0x64 0x84 // U+0064 170 0x65 0x85 // U+0065 171 0x66 0x86 // U+0066 172 0x67 0x87 // U+0067 173 0x68 0x88 // U+0068 174 0x69 0x89 // U+0069 175 0x6A 0x91 // U+006a 176 0x6B 0x92 // U+006b 177 0x6C 0x93 // U+006c 178 0x6D 0x94 // U+006d 179 0x6E 0x95 // U+006e 180 0x6F 0x96 // U+006f 181 0x70 0x97 // U+0070 182 0x71 0x98 // U+0071 183 0x72 0x99 // U+0072 184 0x73 0xA2 // U+0073 185 0x74 0xA3 // U+0074 186 0x75 0xA4 // U+0075 187 0x76 0xA5 // U+0076 188 0x77 0xA6 // U+0077 189 0x78 0xA7 // U+0078 190 0x79 0xA8 // U+0079 191 0x7A 0xA9 // U+007a 192 0x7B 0xC0 // U+007b 193 0x7C 0x6A // U+007c 194 0x7D 0xD0 // U+007d 195 0x7E 0xA1 // U+007e 196 0x7F 0x07 // U+007f 197 default 0x6f 198 }; 199 @condition { 200 inputsize <= 1; 201 @between 0XC0...0XFD; 202 } @operation { 203 error EINVAL; 204 }; 205 @condition { 206 inputsize >= 2; 207 @between 0XC080...0XDFBF; 208 } @map { 209 0xC280 0x20 // U+0080 210 0xC281 0x21 // U+0081 211 0xC282 0x22 // U+0082 212 0xC283 0x23 // U+0083 213 0xC284 0x24 // U+0084 214 0xC285 0x15 // U+0085 215 0xC286 0x06 // U+0086 216 0xC287 0x17 // U+0087 217 0xC288 0x28 // U+0088 218 0xC289 0x29 // U+0089 219 0xC28A 0x2A // U+008a 220 0xC28B 0x2B // U+008b 221 0xC28C 0x2C // U+008c 222 0xC28D 0x09 // U+008d 223 0xC28E 0x0A // U+008e 224 0xC28F 0x1B // U+008f 225 0xC290 0x30 // U+0090 226 0xC291 0x31 // U+0091 227 0xC292 0x1A // U+0092 228 0xC293 0x33 // U+0093 229 0xC294 0x34 // U+0094 230 0xC295 0x35 // U+0095 231 0xC296 0x36 // U+0096 232 0xC297 0x08 // U+0097 233 0xC298 0x38 // U+0098 234 0xC299 0x39 // U+0099 235 0xC29A 0x3A // U+009a 236 0xC29B 0x3B // U+009b 237 0xC29C 0x04 // U+009c 238 0xC29D 0x14 // U+009d 239 0xC29E 0x3E // U+009e 240 0xC29F 0xFF // U+009f 241 0xC2A0 0x41 // U+00a0 242 0xC2A7 0xE1 // U+00a7 243 0xC2AD 0x73 // U+00ad 244 0xD081 0x63 // U+0401 245 0xD082 0x59 // U+0402 246 0xD083 0x62 // U+0403 247 0xD084 0x64 // U+0404 248 0xD085 0x65 // U+0405 249 0xD086 0x66 // U+0406 250 0xD087 0x67 // U+0407 251 0xD088 0x68 // U+0408 252 0xD089 0x69 // U+0409 253 0xD08A 0x70 // U+040a 254 0xD08B 0x71 // U+040b 255 0xD08C 0x72 // U+040c 256 0xD08E 0x74 // U+040e 257 0xD08F 0x75 // U+040f 258 0xD090 0xB9 // U+0410 259 0xD091 0xBA // U+0411 260 0xD092 0xED // U+0412 261 0xD093 0xBF // U+0413 262 0xD094 0xBC // U+0414 263 0xD095 0xBD // U+0415 264 0xD096 0xEC // U+0416 265 0xD097 0xFA // U+0417 266 0xD098 0xCB // U+0418 267 0xD099 0xCC // U+0419 268 0xD09A 0xCD // U+041a 269 0xD09B 0xCE // U+041b 270 0xD09C 0xCF // U+041c 271 0xD09D 0xDA // U+041d 272 0xD09E 0xDB // U+041e 273 0xD09F 0xDC // U+041f 274 0xD0A0 0xDE // U+0420 275 0xD0A1 0xDF // U+0421 276 0xD0A2 0xEA // U+0422 277 0xD0A3 0xEB // U+0423 278 0xD0A4 0xBE // U+0424 279 0xD0A5 0xCA // U+0425 280 0xD0A6 0xBB // U+0426 281 0xD0A7 0xFE // U+0427 282 0xD0A8 0xFB // U+0428 283 0xD0A9 0xFD // U+0429 284 0xD0AA 0x57 // U+042a 285 0xD0AB 0xEF // U+042b 286 0xD0AC 0xEE // U+042c 287 0xD0AD 0xFC // U+042d 288 0xD0AE 0xB8 // U+042e 289 0xD0AF 0xDD // U+042f 290 0xD0B0 0x77 // U+0430 291 0xD0B1 0x78 // U+0431 292 0xD0B2 0xAF // U+0432 293 0xD0B3 0x8D // U+0433 294 0xD0B4 0x8A // U+0434 295 0xD0B5 0x8B // U+0435 296 0xD0B6 0xAE // U+0436 297 0xD0B7 0xB2 // U+0437 298 0xD0B8 0x8F // U+0438 299 0xD0B9 0x90 // U+0439 300 0xD0BA 0x9A // U+043a 301 0xD0BB 0x9B // U+043b 302 0xD0BC 0x9C // U+043c 303 0xD0BD 0x9D // U+043d 304 0xD0BE 0x9E // U+043e 305 0xD0BF 0x9F // U+043f 306 0xD180 0xAA // U+0440 307 0xD181 0xAB // U+0441 308 0xD182 0xAC // U+0442 309 0xD183 0xAD // U+0443 310 0xD184 0x8C // U+0444 311 0xD185 0x8E // U+0445 312 0xD186 0x80 // U+0446 313 0xD187 0xB6 // U+0447 314 0xD188 0xB3 // U+0448 315 0xD189 0xB5 // U+0449 316 0xD18A 0xB7 // U+044a 317 0xD18B 0xB1 // U+044b 318 0xD18C 0xB0 // U+044c 319 0xD18D 0xB4 // U+044d 320 0xD18E 0x76 // U+044e 321 0xD18F 0xA0 // U+044f 322 0xD191 0x44 // U+0451 323 0xD192 0x42 // U+0452 324 0xD193 0x43 // U+0453 325 0xD194 0x45 // U+0454 326 0xD195 0x46 // U+0455 327 0xD196 0x47 // U+0456 328 0xD197 0x48 // U+0457 329 0xD198 0x49 // U+0458 330 0xD199 0x51 // U+0459 331 0xD19A 0x52 // U+045a 332 0xD19B 0x53 // U+045b 333 0xD19C 0x54 // U+045c 334 0xD19E 0x55 // U+045e 335 0xD19F 0x56 // U+045f 336 default 0x6f 337 }; 338 @condition { 339 inputsize <= 2; 340 @between 0XE0...0XFD; 341 } @operation { 342 error EINVAL; 343 }; 344 @condition { 345 inputsize >= 3; 346 @between 0XE08080...0XECBFBF, 0XED8080...0XED9FBF, 0XEE8080...0XEFBFBF; 347 } @map { 348 0xE28496 0x58 // U+2116 349 0xefbfbe error 350 0xefbfbf error 351 default 0x6f 352 }; // for last @map syntax 353 @condition { 354 inputsize <= 3; 355 @between 0XF0...0XFD; 356 } @operation { 357 error EINVAL; 358 }; 359 @condition { 360 inputsize >= 4; 361 @between 0XF0808080...0XF7BFBFBF; 362 } @operation { 363 output = 0x6f; 364 discard 4; 365 }; 366 @condition { 367 inputsize <= 4; 368 @between 0XF8...0XFD; 369 } @operation { 370 error EINVAL; 371 }; 372 @condition { 373 inputsize >= 5; 374 @between 0XF880808080...0XFBBFBFBFBF; 375 } @operation { 376 output = 0x6f; 377 discard 5; 378 }; 379 @condition { 380 inputsize <= 5; 381 @between 0XFC...0XFD; 382 } @operation { 383 error EINVAL; 384 }; 385 @condition { 386 inputsize >= 6; 387 @between 0XFC8080808080...0XFDBFBFBFBFBF; 388 } @operation { 389 output = 0x6f; 390 discard 6; 391 }; 392 }; // for direction 393} // for conversion name 394