Revert "Merged all Chromoting Host code into remoting_core.dll (Windows)."
[chromium-blink-merge.git] / third_party / harfbuzz / src / harfbuzz-stream-private.h
blobfbd9f81379ebb67a2bb8045e77f19e6d93c5f751
1 /*
2 * Copyright (C) 1998-2004 David Turner and Werner Lemberg
3 * Copyright (C) 2006 Behdad Esfahbod
5 * This is part of HarfBuzz, an OpenType Layout engine library.
7 * Permission is hereby granted, without written agreement and without
8 * license or royalty fees, to use, copy, modify, and distribute this
9 * software and its documentation for any purpose, provided that the
10 * above copyright notice and the following two paragraphs appear in
11 * all copies of this software.
13 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
14 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
15 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
16 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
17 * DAMAGE.
19 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
20 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
21 * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
22 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
23 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
26 #ifndef HARFBUZZ_STREAM_PRIVATE_H
27 #define HARFBUZZ_STREAM_PRIVATE_H
29 #include "harfbuzz-impl.h"
30 #include "harfbuzz-stream.h"
32 HB_BEGIN_HEADER
34 HB_INTERNAL void
35 _hb_close_stream( HB_Stream stream );
37 HB_INTERNAL HB_Int
38 _hb_stream_pos( HB_Stream stream );
40 HB_INTERNAL HB_Error
41 _hb_stream_seek( HB_Stream stream,
42 HB_UInt pos );
44 HB_INTERNAL HB_Error
45 _hb_stream_frame_enter( HB_Stream stream,
46 HB_UInt size );
48 HB_INTERNAL void
49 _hb_stream_frame_exit( HB_Stream stream );
51 /* convenience macros */
53 #define SET_ERR(c) ( (error = (c)) != 0 )
55 #define GOTO_Table(tag) (0)
56 #define FILE_Pos() _hb_stream_pos( stream )
57 #define FILE_Seek(pos) SET_ERR( _hb_stream_seek( stream, pos ) )
58 #define ACCESS_Frame(size) SET_ERR( _hb_stream_frame_enter( stream, size ) )
59 #define FORGET_Frame() _hb_stream_frame_exit( stream )
61 #define GET_Byte() (*stream->cursor++)
62 #define GET_Short() (stream->cursor += 2, (HB_Short)( \
63 (*(((HB_Byte*)stream->cursor)-2) << 8) | \
64 *(((HB_Byte*)stream->cursor)-1) \
66 #define GET_Long() (stream->cursor += 4, (HB_Int)( \
67 (*(((HB_Byte*)stream->cursor)-4) << 24) | \
68 (*(((HB_Byte*)stream->cursor)-3) << 16) | \
69 (*(((HB_Byte*)stream->cursor)-2) << 8) | \
70 *(((HB_Byte*)stream->cursor)-1) \
74 #define GET_Char() ((HB_Char)GET_Byte())
75 #define GET_UShort() ((HB_UShort)GET_Short())
76 #define GET_ULong() ((HB_UInt)GET_Long())
77 #define GET_Tag4() GET_ULong()
79 HB_END_HEADER
81 #endif /* HARFBUZZ_STREAM_PRIVATE_H */