ReactOS  0.4.14-dev-390-g34947ad
xmllite_private.h File Reference
#include "wine/heap.h"
Include dependency graph for xmllite_private.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  xml_encoding {
  XmlEncoding_ISO_8859_1 = 0, XmlEncoding_ISO_8859_13, XmlEncoding_ISO_8859_15, XmlEncoding_ISO_8859_2,
  XmlEncoding_ISO_8859_3, XmlEncoding_ISO_8859_4, XmlEncoding_ISO_8859_5, XmlEncoding_ISO_8859_7,
  XmlEncoding_ISO_8859_9, XmlEncoding_UTF16, XmlEncoding_UTF8, XmlEncoding_Unknown,
  XmlEncoding_USASCII, XmlEncoding_UTF16, XmlEncoding_UTF8, XmlEncoding_Unknown
}
 

Functions

static voidm_alloc (IMalloc *imalloc, size_t len)
 
static voidm_realloc (IMalloc *imalloc, void *mem, size_t len)
 
static void m_free (IMalloc *imalloc, void *mem)
 
xml_encoding parse_encoding_name (const WCHAR *, int) DECLSPEC_HIDDEN
 
HRESULT get_code_page (xml_encoding, UINT *) DECLSPEC_HIDDEN
 
const WCHARget_encoding_name (xml_encoding) DECLSPEC_HIDDEN
 
xml_encoding get_encoding_from_codepage (UINT) DECLSPEC_HIDDEN
 

Enumeration Type Documentation

◆ xml_encoding

Enumerator
XmlEncoding_ISO_8859_1 
XmlEncoding_ISO_8859_13 
XmlEncoding_ISO_8859_15 
XmlEncoding_ISO_8859_2 
XmlEncoding_ISO_8859_3 
XmlEncoding_ISO_8859_4 
XmlEncoding_ISO_8859_5 
XmlEncoding_ISO_8859_7 
XmlEncoding_ISO_8859_9 
XmlEncoding_UTF16 
XmlEncoding_UTF8 
XmlEncoding_Unknown 
XmlEncoding_USASCII 
XmlEncoding_UTF16 
XmlEncoding_UTF8 
XmlEncoding_Unknown 

Definition at line 50 of file xmllite_private.h.

Function Documentation

◆ get_code_page()

HRESULT get_code_page ( xml_encoding  ,
UINT  
)

Definition at line 732 of file reader.c.

733 {
735  {
736  FIXME("unsupported encoding %d\n", encoding);
737  return E_NOTIMPL;
738  }
739 
741 
742  return S_OK;
743 }
#define FIXME(fmt,...)
Definition: debug.h:110
static const struct xml_encoding_data xml_encoding_map[]
Definition: reader.c:157
ed encoding
Definition: write.c:2839
#define S_OK
Definition: intsafe.h:59
#define E_NOTIMPL
Definition: ddrawi.h:99
POINT cp
Definition: magnifier.c:59

Referenced by readerinput_switchencoding().

◆ get_encoding_from_codepage()

xml_encoding get_encoding_from_codepage ( UINT  )

Definition at line 168 of file reader.c.

169 {
170  int i;
171  for (i = 0; i < ARRAY_SIZE(xml_encoding_map); i++)
172  {
173  if (xml_encoding_map[i].cp == codepage) return xml_encoding_map[i].enc;
174  }
175  return XmlEncoding_Unknown;
176 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
int codepage
Definition: win_iconv.c:156
static const struct xml_encoding_data xml_encoding_map[]
Definition: reader.c:157
#define ARRAY_SIZE(a)
Definition: main.h:24
POINT cp
Definition: magnifier.c:59

Referenced by CreateXmlWriterOutputWithEncodingCodePage().

◆ get_encoding_name()

const WCHAR* get_encoding_name ( xml_encoding  )

Definition at line 163 of file reader.c.

164 {
165  return xml_encoding_map[encoding].name;
166 }
static const struct xml_encoding_data xml_encoding_map[]
Definition: reader.c:157
ed encoding
Definition: write.c:2839

Referenced by get_output_encoding_name().

◆ m_alloc()

static void* m_alloc ( IMalloc imalloc,
size_t  len 
)
inlinestatic

Definition at line 26 of file xmllite_private.h.

27 {
28  if (imalloc)
29  return IMalloc_Alloc(imalloc, len);
30  else
31  return heap_alloc(len);
32 }
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
GLenum GLsizei len
Definition: glext.h:6722

Referenced by reader_alloc(), readerinput_alloc(), writer_alloc(), and writeroutput_alloc().

◆ m_free()

static void m_free ( IMalloc imalloc,
void mem 
)
inlinestatic

Definition at line 42 of file xmllite_private.h.

43 {
44  if (imalloc)
45  IMalloc_Free(imalloc, mem);
46  else
47  heap_free(mem);
48 }
Definition: mem.c:156
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by reader_free(), readerinput_free(), writer_free(), and writeroutput_free().

◆ m_realloc()

static void* m_realloc ( IMalloc imalloc,
void mem,
size_t  len 
)
inlinestatic

Definition at line 34 of file xmllite_private.h.

35 {
36  if (imalloc)
37  return IMalloc_Realloc(imalloc, mem, len);
38  else
39  return heap_realloc(mem, len);
40 }
static void * heap_realloc(void *mem, size_t len)
Definition: appwiz.h:70
GLenum GLsizei len
Definition: glext.h:6722
Definition: mem.c:156

Referenced by readerinput_realloc(), and writeroutput_realloc().

◆ parse_encoding_name()

xml_encoding parse_encoding_name ( const WCHAR ,
int   
)

Definition at line 745 of file reader.c.

746 {
747  int min, max, n, c;
748 
749  if (!name) return XmlEncoding_Unknown;
750 
751  min = 0;
753 
754  while (min <= max)
755  {
756  n = (min+max)/2;
757 
758  if (len != -1)
760  else
762  if (!c)
763  return xml_encoding_map[n].enc;
764 
765  if (c > 0)
766  max = n-1;
767  else
768  min = n+1;
769  }
770 
771  return XmlEncoding_Unknown;
772 }
#define max(a, b)
Definition: svc.c:63
GLdouble n
Definition: glext.h:7729
#define strncmpiW(s1, s2, n)
Definition: unicode.h:40
static const struct xml_encoding_data xml_encoding_map[]
Definition: reader.c:157
const GLubyte * c
Definition: glext.h:8905
GLenum GLsizei len
Definition: glext.h:6722
#define strcmpiW(s1, s2)
Definition: unicode.h:39
#define ARRAY_SIZE(a)
Definition: main.h:24
#define min(a, b)
Definition: monoChain.cc:55
Definition: name.c:36
#define c
Definition: ke_i.h:80

Referenced by CreateXmlReaderInputWithEncodingName(), and reader_parse_encname().