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