/[freetype]/freetype2/src/base/ftstream.c
ViewVC logotype

Diff of /freetype2/src/base/ftstream.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.46 by werner, Wed Aug 11 05:25:37 2004 UTC revision 1.47 by freetype, Tue Mar 15 18:18:57 2005 UTC
# Line 153  Line 153 
153    }    }
154    
155    
156      FT_BASE_DEF( FT_ULong )
157      FT_Stream_TryRead( FT_Stream  stream,
158                         FT_Byte*   buffer,
159                         FT_ULong   count )
160      {
161        FT_ULong  read_bytes = 0;
162    
163    
164        if ( stream->pos >= stream->size )
165          goto Exit;
166    
167        if ( stream->read )
168          read_bytes = stream->read( stream, stream->pos, buffer, count );
169        else
170        {
171          read_bytes = stream->size - stream->pos;
172          if ( read_bytes > count )
173            read_bytes = count;
174    
175          FT_MEM_COPY( buffer, stream->base + stream->pos, read_bytes );
176        }
177    
178        stream->pos += read_bytes;
179    
180      Exit:
181        return read_bytes;
182      }
183    
184    
185    FT_BASE_DEF( FT_Error )    FT_BASE_DEF( FT_Error )
186    FT_Stream_ExtractFrame( FT_Stream  stream,    FT_Stream_ExtractFrame( FT_Stream  stream,
187                            FT_ULong   count,                            FT_ULong   count,

Legend:
Removed from v.1.46  
changed lines
  Added in v.1.47

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26