#include <stdio.h>
#include <string.h>
#include "wine/list.h"
Go to the source code of this file.
|
| 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
} |
| |
|
| void | wpp_del_define (const char *name) |
| |
| void | wpp_add_cmdline_define (const char *value) |
| |
| void | wpp_set_debug (int lex_debug, int parser_debug, int msg_debug) |
| |
| void | wpp_add_include_path (const char *path) |
| |
| char * | wpp_find_include (const char *name, const char *parent_name) |
| |
| int | wpp_parse (const char *input, FILE *output) |
| |
| pp_entry_t * | pplookup (const char *ident) |
| |
| pp_entry_t * | pp_add_define (const char *def, const char *text) |
| |
| pp_entry_t * | pp_add_macro (char *ident, char *args[], int nargs, int variadic, 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 | ppy_error (const char *s,...) __attribute__((format(printf |
| |
| int int | ppy_warning (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) |
| |
| int | ppy_parse (void) |
| |
◆ FLAG_SIGNED
◆ MAXIFSTACK
| #define MAXIFSTACK 64 /* If this isn't enough you should alter the source... */ |
◆ SIZE_INT
◆ SIZE_LONG
◆ SIZE_LONGLONG
◆ SIZE_MASK
◆ cval_t
◆ includelogicentry_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 135 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 50 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 70 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 100 of file wpp_private.h.
◆ pp_add_define()
Definition at line 194 of file preproc.c.
195{
197 char *cptr;
200
201 if(!def)
205 {
209 }
211 if(!ppp)
213 memset( ppp, 0,
sizeof(*ppp) );
228 ppp->
next->prev = ppp;
230 {
231
234 {
236 }
237
239 ;
242 }
243 return ppp;
244
250}
ACPI_SIZE strlen(const char *String)
char * strchr(const char *String, int ch)
int WINAPIV ppy_warning(const char *msg,...)
char * pp_xstrdup(const char *str)
void * pp_xmalloc(size_t size)
static int pphash(const char *str)
pp_entry_t * pplookup(const char *ident)
void pp_del_define(const char *name)
#define memmove(s1, s2, n)
pp_entry_t * defines[HASHKEY]
union pp_entry::@276 subst
Referenced by add_cmdline_defines(), and add_special_defines().
◆ pp_add_macro()
Definition at line 242 of file wpp.c.
243{
246
249 {
251 ppy_warning(
"Redefinition of %s\n%s:%d: note: previous definition was here",
254 }
256 memset( ppp, 0,
sizeof(*ppp) );
267 {
270 {
272 {
275 break;
278 break;
281 break;
284 break;
285 }
286 }
288 }
289 return ppp;
290}
char * xstrdup(const char *s)
static void list_add_head(struct list_entry *head, struct list_entry *entry)
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
int ppy_warning(const char *s,...)
static int pphash(const char *str)
pp_entry_t * pplookup(const char *ident)
static struct list pp_defines[HASHKEY]
void pp_del_define(const char *name)
◆ pp_del_define()
◆ pp_do_include()
◆ pp_get_if_depth()
◆ pp_if_state()
◆ pp_next_if_state()
Definition at line 414 of file preproc.c.
415{
417 {
421 break;
427 break;
428 default:
430 }
431}
pp_if_state_t pp_if_state(void)
void pp_push_if(pp_if_state_t s)
void WINAPIV pp_internal_error(const char *file, int line, const char *s,...)
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.
291{
293 void *fp;
294
297
298 if (fp)
299 {
300 if (newpath) *newpath =
path;
302 return fp;
303 }
306}
void * wpp_open(const char *filename, int type)
char * wpp_lookup(const char *filename, int type, const char *parent_name)
GLuint GLuint GLsizei GLenum type
◆ pp_pop_if()
Definition at line 380 of file preproc.c.
381{
383 {
384 ppy_error(
"#{endif,else,elif} without #{if,ifdef,ifndef} (#if-stack underflow)");
386 }
387
389 {
392 break;
398 break;
399 default:
401 }
403}
int WINAPIV ppy_error(const char *msg,...)
void pp_pop_ignore_state(void)
Referenced by wpp_parse().
◆ pp_pop_ignore_state()
◆ pp_push_if()
Definition at line 357 of file preproc.c.
358{
361
363
365 {
368 break;
374 break;
375 default:
377 }
378}
void pp_push_ignore_state(void)
Referenced by pp_next_if_state().
◆ pp_push_ignore_state()
◆ pplookup()
◆ ppy_error()
◆ ppy_lex()
◆ ppy_parse()
◆ ppy_warning()
◆ wpp_add_cmdline_define()
Definition at line 588 of file wpp.c.
589{
592
597}
static void wpp_add_define(const char *name, const char *value)
◆ wpp_add_include_path()
Definition at line 298 of file wpp.c.
299{
301 char *cptr;
302
303 for(cptr =
dir; *cptr; cptr++)
304 {
305
306 if(*cptr == '\\')
307 *cptr = '/';
308 }
309
311
313}
static struct strarray includes
◆ wpp_del_define()
Definition at line 420 of file compiler.c.
421{
423
425 {
427 {
430 return;
431 }
432 }
433}
static struct define * cmdline_defines
Referenced by preprocess_shader().
◆ wpp_find_include()
Definition at line 315 of file wpp.c.
316{
318}
static char * wpp_lookup(const char *name, int type, const char *parent_name)
◆ wpp_parse()
Definition at line 437 of file compiler.c.
438{
440
445
451
454 {
459 return 2;
460 }
461
463
466
468
470
472 {
475 }
476
482}
static void del_special_defines(void)
static void add_special_defines(void)
void wpp_close(void *file)
static void add_cmdline_defines(void)
static void del_cmdline_defines(void)
int pp_get_if_depth(void)
int pp_push_define_state(void)
void pp_pop_define_state(void)
pp_if_state_t pp_pop_if(void)
void WINAPIV int ppy_parse(void)
void WINAPIV pp_writestring(const char *format,...) __attribute__((format(printf
GLenum GLenum GLenum input
Referenced by main(), open_input_file(), and preprocess_shader().
◆ wpp_set_debug()
| void wpp_set_debug |
( |
int |
lex_debug, |
|
|
int |
parser_debug, |
|
|
int |
msg_debug |
|
) |
| |
◆ pedantic
◆ pp_flex_debug
◆ pp_incl_state
◆ pp_status
◆ ppy_debug
◆ ppy_in
◆ ppy_out
◆ ppy_text