w3c / w3c/csswg-drafts

[filter-effects-1] Allow feTurbulence's reference implementation to compile

Open
#6,504 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

fx-filter-effects-1
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

The specification for the feTurbulenceElement filter primitive includes "C code below show[ing] the exact algorithm". Unfortunately, the code does not compile under any of the C or C++ standards supported by gcc 9.3.0. It has some very old C assumptions that are not legal C++ (and may generate warning in a modern C compiler), as well as some C++ casting operators and use of the bool type that are not legal C. Some relatively simple changes will bring it into compliance with modern C. My attempt to do so is attached.

turb.c.txt

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open the feTurbulenceElement filter primitive and compare its reference implementation with the attached turb.c.txt changes. Compile the reference code under the C and C++ standards supported by gcc 9.3.0, checking the reported legacy C assumptions, C++ casts, and bool usage. Done means the specification’s reference implementation compiles as modern C and C++.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cpp
Domain
documentation
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.