use printf rather than echo in c-family.kak

According to POSIX, echo with a backspace in any arg is undefined
behaviour...
This commit is contained in:
Maxime Coste 2014-12-01 19:33:15 +00:00
parent 6c45b1d1e2
commit 798d4c3a1e

View File

@ -46,18 +46,18 @@ def -hidden _c-family-indent-on-closing-curly-brace %[
# Regions definition are the same between c++ and objective-c # Regions definition are the same between c++ and objective-c
%sh{ %sh{
for ft in cpp objc; do for ft in cpp objc; do
echo ' printf '%s' '
addhl -group / regions -default code FT \ addhl -group / regions -default code FT \
string %{(?<!'\'')"} %{(?<!\\)(\\\\)*\"} "" \ string %{(?<!QUOTE)"} %{(?<!\\)(\\\\)*"} "" \
comment /\* \*/ "" \ comment /\* \*/ "" \
comment // $ "" \ comment // $ "" \
disabled ^\h*?#\h*if\h+(0|FALSE)\b "#\h*(else|elif|endif)" "#\h*if(def)?" \ disabled ^\h*?#\h*if\h+(0|FALSE)\b "#\h*(else|elif|endif)" "#\h*if(def)?" \
macro ^\h*?\K# %{(?<!\\)\n} "" macro %{^\h*?\K#} %{(?<!\\)\n} ""
addhl -group /FT/string fill string addhl -group /FT/string fill string
addhl -group /FT/comment fill comment addhl -group /FT/comment fill comment
addhl -group /FT/disabled fill rgb:666666 addhl -group /FT/disabled fill rgb:666666
addhl -group /FT/macro fill meta' | sed -e "s/FT/${ft}/g" addhl -group /FT/macro fill meta' | sed -e "s/FT/${ft}/g; s/QUOTE/'/g"
done done
} }