ReactOS 0.4.15-dev-8241-g63935f8
rosglue.c File Reference
#include "ftfd.h"
#include <debug.h>
Include dependency graph for rosglue.c:

Go to the source code of this file.

Macros

#define NDEBUG
 
#define TAG_FREETYPE   'PYTF'
 

Functions

ULONG DbgPrint (IN PCCH Format, IN ...)
 
voidmalloc (size_t Size)
 
voidrealloc (void *Object, size_t Size)
 
void free (void *Object)
 
FILEfopen (const char *FileName, const char *Mode)
 
int fseek (FILE *Stream, long Offset, int Origin)
 
long ftell (FILE *Stream)
 
size_t fread (void *Buffer, size_t Size, size_t Count, FILE *Stream)
 
int fclose (FILE *Stream)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 12 of file rosglue.c.

◆ TAG_FREETYPE

#define TAG_FREETYPE   'PYTF'

Definition at line 15 of file rosglue.c.

Function Documentation

◆ DbgPrint()

ULONG DbgPrint ( IN PCCH  Format,
IN ...   
)

Function prototypes

Definition at line 22 of file rosglue.c.

23{
25
27 EngDebugPrint("ft2: ", (PCHAR)Format, args);
28 va_end(args);
29 return 0;
30}
char * va_list
Definition: acmsvcex.h:78
#define va_end(ap)
Definition: acmsvcex.h:90
#define va_start(ap, A)
Definition: acmsvcex.h:91
#define args
Definition: format.c:66
Definition: match.c:390
char * PCHAR
Definition: typedefs.h:51
ENGAPI VOID APIENTRY EngDebugPrint(_In_z_ PCHAR StandardPrefix, _In_z_ PCHAR DebugMessage, _In_ va_list ap)
Definition: debug.c:19

◆ fclose()

int fclose ( FILE Stream)

Definition at line 125 of file rosglue.c.

126{
127 DPRINT1("Doubleplus ungood: freetype shouldn't fclose!\n");
128 return EOF;
129}
#define DPRINT1
Definition: precomp.h:8
#define EOF
Definition: stdio.h:24

◆ fopen()

FILE * fopen ( const char FileName,
const char Mode 
)

Definition at line 97 of file rosglue.c.

98{
99 DPRINT1("Freetype tries to open file %s\n", FileName);
100 return NULL;
101}
#define NULL
Definition: types.h:112

◆ fread()

size_t fread ( void Buffer,
size_t  Size,
size_t  Count,
FILE Stream 
)

Definition at line 118 of file rosglue.c.

119{
120 DPRINT1("Doubleplus ungood: freetype shouldn't fread!\n");
121 return 0;
122}

◆ free()

void free ( void Object)

Definition at line 80 of file rosglue.c.

81{
82 if (Object != NULL)
83 {
84 EngFreeMem((size_t *)Object - 1);
85 }
86}
#define EngFreeMem
Definition: polytest.cpp:56
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object

◆ fseek()

int fseek ( FILE Stream,
long  Offset,
int  Origin 
)

Definition at line 104 of file rosglue.c.

105{
106 DPRINT1("Doubleplus ungood: freetype shouldn't fseek!\n");
107 return -1;
108}

◆ ftell()

long ftell ( FILE Stream)

Definition at line 111 of file rosglue.c.

112{
113 DPRINT1("Doubleplus ungood: freetype shouldn't ftell!\n");
114 return -1;
115}

◆ malloc()

void * malloc ( size_t  Size)

Definition at line 42 of file rosglue.c.

43{
44 void *Object;
45
46 Object = EngAllocMem(0, sizeof(size_t) + Size, TAG_FREETYPE);
47 if (Object != NULL)
48 {
49 *((size_t *)Object) = Size;
50 Object = (void *)((size_t *)Object + 1);
51 }
52
53 return Object;
54}
#define TAG_FREETYPE
Definition: rosglue.c:15
void * EngAllocMem(int zero, unsigned long size, int tag=0)
Definition: polytest.cpp:70
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533

◆ realloc()

void * realloc ( void Object,
size_t  Size 
)

Definition at line 57 of file rosglue.c.

58{
59 void *NewObject;
60 size_t CopySize;
61
62 NewObject = EngAllocMem(0, sizeof(size_t) + Size, TAG_FREETYPE);
63 if (NewObject != NULL)
64 {
65 *((size_t *)NewObject) = Size;
66 NewObject = (void *)((size_t *)NewObject + 1);
67 CopySize = *((size_t *)Object - 1);
68 if (Size < CopySize)
69 {
70 CopySize = Size;
71 }
72 memcpy(NewObject, Object, CopySize);
73 EngFreeMem((size_t *)Object - 1);
74 }
75
76 return NewObject;
77}
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
_Inout_opt_ PACCESS_STATE _In_opt_ ACCESS_MASK _In_ ULONG _Out_opt_ PVOID * NewObject
Definition: obfuncs.h:74