ReactOS 0.4.16-dev-91-g764881a
psread.c File Reference
#include "psft.h"
#include "psglue.h"
#include "pserror.h"
Include dependency graph for psread.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CF2_IO_FAIL   0
 

Functions

 cf2_buf_readByte (CF2_Buffer buf)
 
 cf2_buf_isEnd (CF2_Buffer buf)
 

Macro Definition Documentation

◆ CF2_IO_FAIL

#define CF2_IO_FAIL   0

Definition at line 49 of file psread.c.

Function Documentation

◆ cf2_buf_isEnd()

cf2_buf_isEnd ( CF2_Buffer  buf)

Definition at line 106 of file psread.c.

107 {
108 return (FT_Bool)( buf->ptr >= buf->end );
109 }
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:108
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751

Referenced by cf2_interpT2CharString().

◆ cf2_buf_readByte()

cf2_buf_readByte ( CF2_Buffer  buf)

Definition at line 80 of file psread.c.

81 {
82 if ( buf->ptr < buf->end )
83 {
84#if CF2_IO_FAIL
85 if ( randomError2() )
86 {
87 CF2_SET_ERROR( buf->error, Invalid_Stream_Operation );
88 return 0;
89 }
90
91 return *(buf->ptr)++ + randomValue();
92#else
93 return *(buf->ptr)++;
94#endif
95 }
96 else
97 {
98 CF2_SET_ERROR( buf->error, Invalid_Stream_Operation );
99 return 0;
100 }
101 }
#define CF2_SET_ERROR(error, e)
Definition: pserror.h:109

Referenced by cf2_hintmask_read(), and cf2_interpT2CharString().