2 // Copyright 2005 Sun Microsystems, Inc. All rights reserved.
3 // Use is subject to license terms.
7 // The contents of this file are subject to the terms of the
8 // Common Development and Distribution License, Version 1.0 only
9 // (the "License"). You may not use this file except in compliance
12 // You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13 // or http://www.opensolaris.org/os/licensing.
14 // See the License for the specific language governing permissions
15 // and limitations under the License.
17 // When distributing Covered Code, include this CDDL HEADER in each
18 // file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19 // If applicable, add the following below this CDDL HEADER, with the
20 // fields enclosed by brackets "[]" replaced with your own identifying
21 // information: Portions Copyright [yyyy] [name of copyright owner]
25 // ident "%Z%%M% %I% %E% SMI"
32 #include <sys/errno.h>
55 var_input = input[0] & 0x7f;
56 var_input = var_input + offset;
57 if (var_input >= 0x7f) {
58 var_input = var_input + 0x01;
66 between 0x00 ... 0x7f ;
68 if ( outputsize < 1 ) {
78 // Note this, in the .c file check is made
79 // against ileft > 0 , but it's since the
80 // ileft is already decremented.
82 if ( inputsize > 1 ) {
83 if ( ( input[1] >= 0xa1 ) && ( input[1] <= 0xfe )) {
84 if (outputsize < 1 ) {
97 between 0xa1 ... 0xfe;
99 if ( inputsize > 1 ) {
100 if ( ( input[1] >= 0xa1 ) && ( input[1] <= 0xfe)) {
101 if ( outputsize < 2 ) {
106 var_input = input[0] & 0x7f;
107 if ( var_input & 0x01) {
112 var_input = ((var_input - 0x21 ) >> 1) + 0x81;
113 if ( var_input > 0x9f ) {
114 var_input = var_input + 0x40;