Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
vkd3d
Manage
Activity
Members
Labels
Plan
Wiki
Bugzilla
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
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
wine
vkd3d
Commits
250a24bd
Commit
250a24bd
authored
1 year ago
by
Elizabeth Figura
Committed by
Alexandre Julliard
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
vkd3d-shader/preproc: Strip whitespace when stringifying.
parent
6fc3ae2b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!291
vkd3d-shader/preproc: Various fixes.
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libs/vkd3d-shader/preproc.l
+10
-1
10 additions, 1 deletion
libs/vkd3d-shader/preproc.l
tests/hlsl_d3d12.c
+6
-0
6 additions, 0 deletions
tests/hlsl_d3d12.c
with
16 additions
and
1 deletion
libs/vkd3d-shader/preproc.l
+
10
−
1
View file @
250a24bd
...
...
@@ -358,7 +358,16 @@ static void preproc_stringify(struct preproc_ctx *ctx, struct vkd3d_string_buffe
vkd3d_string_buffer_printf(buffer, "\"");
if ((expansion = find_arg_expansion(ctx, p)))
{
for (i = 0; i < expansion->text.content_size; ++i)
size_t len = expansion->text.content_size;
size_t start = 0;
while (len && strchr(" \t\r\n", expansion->text.buffer[len - 1]))
--len;
while (start < len && strchr(" \t\r\n", expansion->text.buffer[start]))
++start;
for (i = start; i < len; ++i)
{
char c = expansion->text.buffer[i];
...
...
This diff is collapsed.
Click to expand it.
tests/hlsl_d3d12.c
+
6
−
0
View file @
250a24bd
...
...
@@ -193,6 +193,12 @@ static void test_preprocess(void)
"
\"
apple
\"
"
,
},
{
"#define KEY(a) #a
\n
"
"KEY(
\t\r\n
apple
\t\r\n
)"
,
"
\"
apple
\"
"
,
},
{
"#define KEY(if) #if
\n
"
"KEY(apple)"
,
...
...
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