#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include "windef.h"
Go to the source code of this file.
|
enum | def_arg_t { arg_single,
arg_list,
arg_single,
arg_list
} |
|
enum | def_exp_t {
exp_text,
exp_concat,
exp_stringize,
exp_subst,
exp_text,
exp_concat,
exp_stringize,
exp_subst
} |
|
enum | def_type_t {
def_none,
def_define,
def_macro,
def_special,
def_none,
def_define,
def_macro,
def_special
} |
|
enum | pp_if_state_t {
if_false,
if_true,
if_elif,
if_elsefalse,
if_elsetrue,
if_ignore,
if_error,
if_false,
if_true,
if_elif,
if_elsefalse,
if_elsetrue,
if_ignore,
if_error
} |
|
enum | ctype_t {
cv_sint = SIZE_INT + FLAG_SIGNED,
cv_uint = SIZE_INT,
cv_slong = SIZE_LONG + FLAG_SIGNED,
cv_ulong = SIZE_LONG,
cv_sll = SIZE_LONGLONG + FLAG_SIGNED,
cv_ull = SIZE_LONGLONG,
cv_sint = SIZE_INT + FLAG_SIGNED,
cv_uint = SIZE_INT,
cv_slong = SIZE_LONG + FLAG_SIGNED,
cv_ulong = SIZE_LONG,
cv_sll = SIZE_LONGLONG + FLAG_SIGNED,
cv_ull = SIZE_LONGLONG
} |
|
|
int | wpp_add_define (const char *name, const char *value) |
|
void | wpp_del_define (const char *name) |
|
char * | wpp_lookup (const char *filename, int type, const char *parent_name) |
|
void * | wpp_open (const char *filename, int type) |
|
void | wpp_close (void *file) |
|
int | wpp_read (void *file, char *buffer, unsigned int len) |
|
void | wpp_write (const char *buffer, unsigned int len) |
|
int | wpp_parse (const char *input, FILE *output) |
|
void * | pp_xmalloc (size_t) |
|
void * | pp_xrealloc (void *, size_t) |
|
char * | pp_xstrdup (const char *str) |
|
pp_entry_t * | pplookup (const char *ident) |
|
int | pp_push_define_state (void) |
|
void | pp_pop_define_state (void) |
|
pp_entry_t * | pp_add_define (const char *def, const char *text) |
|
pp_entry_t * | pp_add_macro (char *ident, marg_t *args[], int nargs, mtext_t *exp) |
|
void | pp_del_define (const char *name) |
|
void * | pp_open_include (const char *name, int type, const char *parent_name, char **newpath) |
|
void | pp_push_if (pp_if_state_t s) |
|
void | pp_next_if_state (int) |
|
pp_if_state_t | pp_pop_if (void) |
|
pp_if_state_t | pp_if_state (void) |
|
int | pp_get_if_depth (void) |
|
int WINAPIV | ppy_error (const char *s,...) __attribute__((format(printf |
|
int WINAPIV int WINAPIV | ppy_warning (const char *s,...) __attribute__((format(printf |
|
int WINAPIV int WINAPIV void WINAPIV | pp_internal_error (const char *file, int line, const char *s,...) __attribute__((format(printf |
|
int | ppy_lex (void) |
|
void | pp_do_include (char *fname, int type) |
|
void | pp_push_ignore_state (void) |
|
void | pp_pop_ignore_state (void) |
|
void WINAPIV | pp_writestring (const char *format,...) __attribute__((format(printf |
|
void WINAPIV int | ppy_parse (void) |
|
◆ __attribute__
◆ FLAG_SIGNED
◆ MAXIFSTACK
#define MAXIFSTACK 64 /* If this isn't enough you should alter the source... */ |
◆ SIZE_CHAR
◆ SIZE_INT
◆ SIZE_LONG
◆ SIZE_LONGLONG
◆ SIZE_MASK
◆ SIZE_SHORT
◆ cval_t
◆ includelogicentry_t
◆ marg_t
◆ mtext_t
◆ pp_entry_t
◆ ctype_t
Enumerator |
---|
cv_sint | |
cv_uint | |
cv_slong | |
cv_ulong | |
cv_sll | |
cv_ull | |
cv_sint | |
cv_uint | |
cv_slong | |
cv_ulong | |
cv_sll | |
cv_ull | |
Definition at line 155 of file wpp_private.h.
◆ def_arg_t
Enumerator |
---|
arg_single | |
arg_list | |
arg_single | |
arg_list | |
Definition at line 54 of file wpp_private.h.
◆ def_exp_t
Enumerator |
---|
exp_text | |
exp_concat | |
exp_stringize | |
exp_subst | |
exp_text | |
exp_concat | |
exp_stringize | |
exp_subst | |
Definition at line 68 of file wpp_private.h.
◆ def_type_t
Enumerator |
---|
def_none | |
def_define | |
def_macro | |
def_special | |
def_none | |
def_define | |
def_macro | |
def_special | |
Definition at line 88 of file wpp_private.h.
◆ pp_if_state_t
Enumerator |
---|
if_false | |
if_true | |
if_elif | |
if_elsefalse | |
if_elsetrue | |
if_ignore | |
if_error | |
if_false | |
if_true | |
if_elif | |
if_elsefalse | |
if_elsetrue | |
if_ignore | |
if_error | |
Definition at line 118 of file wpp_private.h.
◆ pp_add_define()
Definition at line 194 of file preproc.c.
213 memset( ppp, 0,
sizeof(*ppp) );
228 ppp->
next->prev = ppp;
pp_entry_t * defines[HASHKEY]
#define memmove(s1, s2, n)
union pp_entry::@239 subst
ACPI_SIZE strlen(const char *String)
static int pphash(const char *str)
char * pp_xstrdup(const char *str)
void pp_del_define(const char *name)
pp_entry_t * pplookup(const char *ident)
char * strchr(const char *String, int ch)
void * pp_xmalloc(size_t size)
◆ pp_add_macro()
Definition at line 252 of file preproc.c.
269 memset( ppp, 0,
sizeof(*ppp) );
285 ppp->
next->prev = ppp;
pp_entry_t * defines[HASHKEY]
union pp_entry::@239 subst
static int pphash(const char *str)
char * pp_xstrdup(const char *str)
void pp_del_define(const char *name)
pp_entry_t * pplookup(const char *ident)
void * pp_xmalloc(size_t size)
◆ pp_del_define()
Definition at line 176 of file preproc.c.
union pp_entry::@239 subst
static void free_pp_entry(pp_entry_t *ppp, int idx)
static int pphash(const char *str)
pp_entry_t * pplookup(const char *ident)
◆ pp_do_include()
Definition at line 4687 of file ppl.yy.c.
4725 ppy_error(
"Unable to open include file %s", fname+1);
4730 fname[
n-1] = *fname;
int WINAPIV ppy_error(const char *msg,...)
ACPI_SIZE strlen(const char *String)
GLuint GLuint GLsizei GLenum type
void * pp_open_include(const char *name, int type, const char *parent_name, char **newpath)
includelogicentry_t * pp_includelogiclist
static void push_buffer(pp_entry_t *ppp, char *filename, char *incname, int pop)
include_state_t pp_incl_state
struct includelogicentry * next
void WINAPIV pp_writestring(const char *format,...)
int strcmp(const char *String1, const char *String2)
◆ pp_get_if_depth()
◆ pp_if_state()
Definition at line 405 of file preproc.c.
static pp_if_state_t if_stack[MAXIFSTACK]
◆ pp_internal_error()
◆ pp_next_if_state()
Definition at line 414 of file preproc.c.
void WINAPIV pp_internal_error(const char *file, int line, const char *s,...)
void pp_push_if(pp_if_state_t s)
pp_if_state_t pp_if_state(void)
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
◆ pp_open_include()
Definition at line 290 of file preproc.c.
300 if (newpath) *newpath =
path;
GLsizei const GLchar ** path
GLuint GLuint GLsizei GLenum type
void * wpp_open(const char *filename, int type)
char * wpp_lookup(const char *filename, int type, const char *parent_name)
◆ pp_pop_define_state()
Definition at line 161 of file preproc.c.
pp_entry_t * defines[HASHKEY]
static pp_def_state_t * pp_def_state
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
void pp_del_define(const char *name)
◆ pp_pop_if()
Definition at line 380 of file preproc.c.
384 ppy_error(
"#{endif,else,elif} without #{if,ifdef,ifndef} (#if-stack underflow)");
void WINAPIV pp_internal_error(const char *file, int line, const char *s,...)
pp_if_state_t pp_if_state(void)
static pp_if_state_t if_stack[MAXIFSTACK]
void pp_pop_ignore_state(void)
◆ pp_pop_ignore_state()
Definition at line 4753 of file ppl.yy.c.
static void yy_pop_state(void)
◆ pp_push_define_state()
Definition at line 148 of file preproc.c.
static pp_def_state_t * pp_def_state
void * pp_xmalloc(size_t size)
◆ pp_push_if()
Definition at line 357 of file preproc.c.
void WINAPIV pp_internal_error(const char *file, int line, const char *s,...)
pp_if_state_t pp_if_state(void)
static pp_if_state_t if_stack[MAXIFSTACK]
void pp_push_ignore_state(void)
◆ pp_push_ignore_state()
Definition at line 4748 of file ppl.yy.c.
static void yy_push_state(int _new_state)
◆ pp_writestring()
◆ pp_xmalloc()
◆ pp_xrealloc()
◆ pp_xstrdup()
Definition at line 73 of file preproc.c.
ACPI_SIZE strlen(const char *String)
#define memcpy(s1, s2, n)
void * pp_xmalloc(size_t size)
◆ pplookup()
Definition at line 95 of file preproc.c.
pp_entry_t * defines[HASHKEY]
static int pphash(const char *str)
_In_ ULONG _In_ ULONG_PTR ident
int strcmp(const char *String1, const char *String2)
◆ ppy_error()
◆ ppy_lex()
◆ ppy_parse()
◆ ppy_warning()
◆ wpp_add_define()
Definition at line 377 of file compiler.c.
391 def->
value = new_value;
static struct define * cmdline_defines
char * pp_xstrdup(const char *str)
void * pp_xmalloc(size_t size)
int strcmp(const char *String1, const char *String2)
◆ wpp_close()
Definition at line 258 of file compiler.c.
267 ERR(
"current_include == NULL, desc == %p, buffer = %s\n",
static ID3DInclude * current_include
static struct mem_file_desc current_shader
static const WCHAR desc[]
#define HeapFree(x, y, z)
Referenced by pop_buffer(), and wpp_parse().
◆ wpp_del_define()
Definition at line 420 of file compiler.c.
static struct define * cmdline_defines
int strcmp(const char *String1, const char *String2)
◆ wpp_lookup()
Definition at line 162 of file compiler.c.
184 ERR(
"Parent include %s missing.\n",
debugstr_a(parent_name));
ACPI_SIZE strlen(const char *String)
GLsizei const GLchar ** path
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
static struct loaded_include * includes
static const char * initial_filename
#define memcpy(s1, s2, n)
static const char * parent_include
int strcmp(const char *String1, const char *String2)
Referenced by pp_open_include().
◆ wpp_open()
Definition at line 195 of file compiler.c.
227 ERR(
"Error allocating memory for the loaded includes structure\n");
237 if(newincludes ==
NULL)
239 ERR(
"Error reallocating memory for the loaded includes structure\n");
static ID3DInclude * current_include
GLuint GLuint GLsizei GLenum type
static struct mem_file_desc current_shader
static const WCHAR desc[]
static struct loaded_include * includes
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static const char * initial_filename
static const char * parent_include
int strcmp(const char *String1, const char *String2)
#define INCLUDES_INITIAL_CAPACITY
static int includes_capacity
#define HeapFree(x, y, z)
Referenced by pp_open_include(), and wpp_parse().
◆ wpp_parse()
Definition at line 437 of file compiler.c.
static void add_special_defines(void)
int WINAPIV ppy_error(const char *msg,...)
static UCHAR ULONG UCHAR ULONG UCHAR * output
int pp_get_if_depth(void)
static void add_cmdline_defines(void)
char * pp_xstrdup(const char *str)
void * wpp_open(const char *filename, int type)
void wpp_close(void *file)
GLenum GLenum GLenum input
void WINAPIV pp_writestring(const char *format,...)
int pp_push_define_state(void)
static void del_cmdline_defines(void)
void pp_pop_define_state(void)
pp_if_state_t pp_pop_if(void)
static void del_special_defines(void)
◆ wpp_read()
Definition at line 274 of file compiler.c.
static const WCHAR desc[]
#define memcpy(s1, s2, n)
◆ wpp_write()
Definition at line 284 of file compiler.c.
286 char *new_wpp_output;
306 ERR(
"Error allocating memory\n");
static int wpp_output_size
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define BUFFER_INITIAL_CAPACITY
#define memcpy(s1, s2, n)
static int wpp_output_capacity
Referenced by pp_writestring(), and put_buffer().
◆ pp_incl_state
◆ pp_includelogiclist
◆ pp_status
◆ ppy_out
◆ ppy_text
◆ wpp_callbacks