ReactOS  0.4.14-dev-50-g13bb5e2
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 {
24  va_list args;
25 
27  EngDebugPrint("ft2: ", (PCHAR)Format, args);
28  va_end(args);
29  return 0;
30 }
signed char * PCHAR
Definition: retypes.h:7
ENGAPI VOID APIENTRY EngDebugPrint(_In_z_ PCHAR StandardPrefix, _In_z_ PCHAR DebugMessage, _In_ va_list ap)
Definition: debug.c:19
Definition: match.c:390
#define va_end(ap)
Definition: acmsvcex.h:90
char * va_list
Definition: acmsvcex.h:78
#define va_start(ap, A)
Definition: acmsvcex.h:91
#define args
Definition: format.c:66

◆ 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 }
smooth NULL
Definition: ftsmooth.c:416
#define DPRINT1
Definition: precomp.h:8

◆ 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 }
#define DPRINT1
Definition: precomp.h:8

◆ 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
smooth NULL
Definition: ftsmooth.c:416
static IUnknown Object
Definition: main.c:512

Referenced by check_remoting_args(), combine_mtext(), find_type_or_error2(), fix_incomplete(), fix_incomplete_types(), get_type(), make_decl_spec(), make_statement_typedef(), merge_text(), set_var_types(), and yyparse().

◆ 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 }
#define DPRINT1
Definition: precomp.h:8

◆ 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 }
#define DPRINT1
Definition: precomp.h:8

◆ 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
smooth NULL
Definition: ftsmooth.c:416
static IUnknown Object
Definition: main.c:512
void * EngAllocMem(int zero, unsigned long size, int tag=0)
Definition: polytest.cpp:70
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359

◆ 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 EngFreeMem
Definition: polytest.cpp:56
#define TAG_FREETYPE
Definition: rosglue.c:15
smooth NULL
Definition: ftsmooth.c:416
static IUnknown Object
Definition: main.c:512
void * EngAllocMem(int zero, unsigned long size, int tag=0)
Definition: polytest.cpp:70
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
_Inout_opt_ PACCESS_STATE _In_opt_ ACCESS_MASK _In_ ULONG _Out_opt_ PVOID * NewObject
Definition: obfuncs.h:71