Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sam Joan Roque-Worcel
wine
Commits
c7a34802
Commit
c7a34802
authored
22 years ago
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
22 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Allow wpp users to undefine previously defined symbols.
parent
8794935e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
tools/wpp/preproc.c
+3
-3
3 additions, 3 deletions
tools/wpp/preproc.c
tools/wpp/wpp.c
+7
-0
7 additions, 0 deletions
tools/wpp/wpp.c
tools/wpp/wpp.h
+1
-0
1 addition, 0 deletions
tools/wpp/wpp.h
tools/wpp/wpp_private.h
+2
-2
2 additions, 2 deletions
tools/wpp/wpp_private.h
with
13 additions
and
5 deletions
tools/wpp/preproc.c
+
3
−
3
View file @
c7a34802
...
...
@@ -99,7 +99,7 @@ char *pp_xstrdup(const char *str)
}
/* Don't comment on the hash, its primitive but functional... */
int
pphash
(
char
*
str
)
static
int
pphash
(
const
char
*
str
)
{
int
sum
=
0
;
while
(
*
str
)
...
...
@@ -107,7 +107,7 @@ int pphash(char *str)
return
sum
%
HASHKEY
;
}
pp_entry_t
*
pplookup
(
char
*
ident
)
pp_entry_t
*
pplookup
(
const
char
*
ident
)
{
int
idx
=
pphash
(
ident
);
pp_entry_t
*
ppp
;
...
...
@@ -120,7 +120,7 @@ pp_entry_t *pplookup(char *ident)
return
NULL
;
}
void
pp_del_define
(
char
*
name
)
void
pp_del_define
(
const
char
*
name
)
{
int
idx
;
pp_entry_t
*
ppp
;
...
...
This diff is collapsed.
Click to expand it.
tools/wpp/wpp.c
+
7
−
0
View file @
c7a34802
...
...
@@ -58,6 +58,13 @@ void wpp_add_define( const char *name, const char *value )
}
/* undefine a previously added definition */
void
wpp_del_define
(
const
char
*
value
)
{
pp_del_define
(
value
);
}
/* add a command-line define of the form NAME=VALUE */
void
wpp_add_cmdline_define
(
const
char
*
value
)
{
...
...
This diff is collapsed.
Click to expand it.
tools/wpp/wpp.h
+
1
−
0
View file @
c7a34802
...
...
@@ -24,6 +24,7 @@
#include
<stdio.h>
extern
void
wpp_add_define
(
const
char
*
name
,
const
char
*
value
);
extern
void
wpp_del_define
(
const
char
*
name
);
extern
void
wpp_add_cmdline_define
(
const
char
*
value
);
extern
void
wpp_set_debug
(
int
lex_debug
,
int
parser_debug
,
int
msg_debug
);
extern
void
wpp_set_pedantic
(
int
on
);
...
...
This diff is collapsed.
Click to expand it.
tools/wpp/wpp_private.h
+
2
−
2
View file @
c7a34802
...
...
@@ -194,10 +194,10 @@ typedef struct cval {
void
*
pp_xmalloc
(
size_t
);
void
*
pp_xrealloc
(
void
*
,
size_t
);
char
*
pp_xstrdup
(
const
char
*
str
);
pp_entry_t
*
pplookup
(
char
*
ident
);
pp_entry_t
*
pplookup
(
const
char
*
ident
);
pp_entry_t
*
pp_add_define
(
char
*
def
,
char
*
text
);
pp_entry_t
*
pp_add_macro
(
char
*
ident
,
marg_t
*
args
[],
int
nargs
,
mtext_t
*
exp
);
void
pp_del_define
(
char
*
name
);
void
pp_del_define
(
const
char
*
name
);
FILE
*
pp_open_include
(
const
char
*
name
,
int
search
,
char
**
newpath
);
void
pp_push_if
(
pp_if_state_t
s
);
void
pp_next_if_state
(
int
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment