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 (c) 1996 by Sun Microsystems, Inc.
23  */
24 
25 
26 #include <errno.h>
27 #include <widec.h>
28 #include "common_def.h"
29 #include "common_han.h"
30 
31 
32 /****  _ I C V _ O P E N  ****/
33 
_icv_open()34 void* _icv_open()
35 {
36 	return((void*)NULL);
37 
38 }  /* end of int _icv_open(). */
39 
40 
41 /****  _ I C V _ C L O S E  ****/
42 
_icv_close(void * cd)43 void _icv_close(void* cd)
44 {
45 	return;
46 
47 }  /* end of void _icv_close(_conv_desc*). */
48 
49 
50 /****  _ I C V _ I C O N V  ****/
51 
_icv_iconv(void * cd,char ** inbuf,size_t * inbufleft,char ** outbuf,size_t * outbufleft)52 size_t _icv_iconv(void* cd, char** inbuf, size_t* inbufleft,
53 			    char** outbuf, size_t* outbufleft)
54 {
55 	size_t		ret_val = 0;
56 	unsigned char*	ib;
57 	unsigned char*	ob;
58 
59 	/*
60 	 * Simply copy input to output as it is
61 	 */
62 
63 
64 	ib = (unsigned char*)*inbuf;
65 	ob = (unsigned char*)*outbuf;
66 
67 	memcpy((char *)ob, (char *)ib, *inbufleft);
68 
69 	*inbuf = (char*)(ib + *inbufleft);
70 	*inbufleft = 0;
71 	*outbuf = (char*)(ob + *outbufleft) ;
72 	*outbufleft = 0;
73 
74 	return(ret_val);
75 
76 }  /* end of size_t _icv_iconv(int*, char**, size_t*, char**, size_t*).*/
77