xref: /freebsd/sys/fs/udf/osta.h (revision 8aac90f18aef7c9eea906c3ff9a001ca7b94f375)
1 /*
2  * Prototypes for the OSTA functions
3  */
4 
5 /*-
6  **********************************************************************
7  * OSTA compliant Unicode compression, uncompression routines.
8  * Copyright 1995 Micro Design International, Inc.
9  * Written by Jason M. Rinn.
10  * Micro Design International gives permission for the free use of the
11  * following source code.
12  */
13 
14 /*
15  * Various routines from the OSTA 2.01 specs.  Copyrights are included with
16  * each code segment.  Slight whitespace modifications have been made for
17  * formatting purposes.  Typos/bugs have been fixed.
18  */
19 
20 #ifndef UNIX
21 #define	UNIX
22 #endif
23 
24 #ifndef MAXLEN
25 #define	MAXLEN	255
26 #endif
27 
28 /***********************************************************************
29  * The following two typedef's are to remove compiler dependencies.
30  * byte needs to be unsigned 8-bit, and unicode_t needs to be
31  * unsigned 16-bit.
32  */
33 typedef unsigned short unicode_t;
34 typedef unsigned char byte;
35 
36 int udf_UncompressUnicode(int, byte *, unicode_t *);
37 int udf_UncompressUnicodeByte(int, byte *, byte *);
38 int udf_CompressUnicode(int, int, unicode_t *, byte *);
39 unsigned short udf_cksum(unsigned char *, int);
40 unsigned short udf_unicode_cksum(unsigned short *, int);
41 int UDFTransName(unicode_t *, unicode_t *, int);
42