News Score: Score the News, Sort the News, Rewrite the Headlines

Protecting paths in macro expansions by extending UTF-8

March 05, 2024 nullprogram.com/blog/2024/03/05/ After a year I’ve finally came up with an elegant solution to a vexing u-config problem. The pkg-config format uses macros to generate build flags through recursive expansion. Some flags embed file system paths, but to the macro system it’s all strings. The output is also ultimately just one big string, which the receiving shell splits into fields. If a path contains spaces, or shell metacharacters, u-config must escape them so that shells treat th...

Read more at nullprogram.com

© News Score  score the news, sort the news, rewrite the headlines