xref: /freebsd/sys/fs/udf/osta.h (revision 95ee2897)
151a7b740SScott Long /*
251a7b740SScott Long  * Prototypes for the OSTA functions
351a7b740SScott Long  */
451a7b740SScott Long 
5b4583894SWarner Losh /*-
6b4583894SWarner Losh  **********************************************************************
7b4583894SWarner Losh  * OSTA compliant Unicode compression, uncompression routines.
8b4583894SWarner Losh  * Copyright 1995 Micro Design International, Inc.
9b4583894SWarner Losh  * Written by Jason M. Rinn.
10b4583894SWarner Losh  * Micro Design International gives permission for the free use of the
11b4583894SWarner Losh  * following source code.
12b4583894SWarner Losh  */
13b4583894SWarner Losh 
14b4583894SWarner Losh /*
15b4583894SWarner Losh  * Various routines from the OSTA 2.01 specs.  Copyrights are included with
16b4583894SWarner Losh  * each code segment.  Slight whitespace modifications have been made for
17b4583894SWarner Losh  * formatting purposes.  Typos/bugs have been fixed.
18b4583894SWarner Losh  */
19b4583894SWarner Losh 
2051a7b740SScott Long #ifndef UNIX
2151a7b740SScott Long #define	UNIX
2251a7b740SScott Long #endif
2351a7b740SScott Long 
2451a7b740SScott Long #ifndef MAXLEN
2551a7b740SScott Long #define	MAXLEN	255
2651a7b740SScott Long #endif
2751a7b740SScott Long 
2851a7b740SScott Long /***********************************************************************
29b3a15dddSPedro F. Giffuni  * The following two typedef's are to remove compiler dependencies.
3051a7b740SScott Long  * byte needs to be unsigned 8-bit, and unicode_t needs to be
3151a7b740SScott Long  * unsigned 16-bit.
3251a7b740SScott Long  */
3351a7b740SScott Long typedef unsigned short unicode_t;
3451a7b740SScott Long typedef unsigned char byte;
3551a7b740SScott Long 
3651a7b740SScott Long int udf_UncompressUnicode(int, byte *, unicode_t *);
37c5a1bf1bSScott Long int udf_UncompressUnicodeByte(int, byte *, byte *);
3851a7b740SScott Long int udf_CompressUnicode(int, int, unicode_t *, byte *);
3951a7b740SScott Long unsigned short udf_cksum(unsigned char *, int);
4051a7b740SScott Long unsigned short udf_unicode_cksum(unsigned short *, int);
4151a7b740SScott Long int UDFTransName(unicode_t *, unicode_t *, int);
42