2002-04-14 16:52:14 +00:00
|
|
|
/*
|
|
|
|
* Prototypes for the OSTA functions
|
|
|
|
*
|
|
|
|
* $FreeBSD$
|
|
|
|
*/
|
|
|
|
|
2006-09-12 19:02:34 +00:00
|
|
|
/*-
|
|
|
|
**********************************************************************
|
|
|
|
* OSTA compliant Unicode compression, uncompression routines.
|
|
|
|
* Copyright 1995 Micro Design International, Inc.
|
|
|
|
* Written by Jason M. Rinn.
|
|
|
|
* Micro Design International gives permission for the free use of the
|
|
|
|
* following source code.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Various routines from the OSTA 2.01 specs. Copyrights are included with
|
|
|
|
* each code segment. Slight whitespace modifications have been made for
|
|
|
|
* formatting purposes. Typos/bugs have been fixed.
|
|
|
|
*/
|
|
|
|
|
2002-04-14 16:52:14 +00:00
|
|
|
#ifndef UNIX
|
|
|
|
#define UNIX
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef MAXLEN
|
|
|
|
#define MAXLEN 255
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/***********************************************************************
|
2016-04-29 20:51:24 +00:00
|
|
|
* The following two typedef's are to remove compiler dependencies.
|
2002-04-14 16:52:14 +00:00
|
|
|
* byte needs to be unsigned 8-bit, and unicode_t needs to be
|
|
|
|
* unsigned 16-bit.
|
|
|
|
*/
|
|
|
|
typedef unsigned short unicode_t;
|
|
|
|
typedef unsigned char byte;
|
|
|
|
|
|
|
|
int udf_UncompressUnicode(int, byte *, unicode_t *);
|
2003-11-05 06:55:23 +00:00
|
|
|
int udf_UncompressUnicodeByte(int, byte *, byte *);
|
2002-04-14 16:52:14 +00:00
|
|
|
int udf_CompressUnicode(int, int, unicode_t *, byte *);
|
|
|
|
unsigned short udf_cksum(unsigned char *, int);
|
|
|
|
unsigned short udf_unicode_cksum(unsigned short *, int);
|
|
|
|
int UDFTransName(unicode_t *, unicode_t *, int);
|