/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#include "utf.h"
#include <windows.h>
#include <stdlib.h>
#include <stdio.h>
/*
* Initialize all utf processing.
*/
{
/*
* Get the code page for this locale
*/
} else {
}
return ui;
}
/*
* Terminate all utf processing
*/
void JNICALL
{
}
/*
* Get wide string (assumes len>0)
*/
static WCHAR*
{
int wlen;
/* Convert the string to WIDE string */
if (wlen <= 0) {
UTF_ERROR(("Can't get WIDE string length"));
return NULL;
}
UTF_ERROR(("Can't malloc() any space"));
return NULL;
}
UTF_ERROR(("Can't get WIDE string"));
return NULL;
}
return wstr;
}
/*
* Convert UTF-8 to a platform string
*/
int JNICALL
{
int wlen;
int plen;
/* Negative length is an error */
if ( len < 0 ) {
return -1;
}
/* Zero length is ok, but we don't need to do much */
if ( len == 0 ) {
output[0] = 0;
return 0;
}
/* Get WIDE string version (assumes len>0) */
return -1;
}
/* Convert WIDE string to MultiByte string */
if (plen <= 0) {
UTF_ERROR(("Can't convert WIDE string to multi-byte"));
return -1;
}
return plen;
}
/*
* Convert Platform Encoding to UTF-8.
*/
int JNICALL
{
int wlen;
int plen;
/* Negative length is an error */
if ( len < 0 ) {
return -1;
}
/* Zero length is ok, but we don't need to do much */
if ( len == 0 ) {
output[0] = 0;
return 0;
}
/* Get WIDE string version (assumes len>0) */
return -1;
}
/* Convert WIDE string to UTF-8 string */
if (plen <= 0) {
UTF_ERROR(("Can't convert WIDE string to multi-byte"));
return -1;
}
return plen;
}