mirror of
https://github.com/notwa/rc
synced 2024-06-01 15:33:07 -07:00
Compare commits
No commits in common. "7582a8435624c54fb862b1e753ec83b9fac8582c" and "7703d77332d7af65b93b27595e491cacfd00aa4c" have entirely different histories.
7582a84356
...
7703d77332
|
@ -160,7 +160,7 @@ compile() {
|
||||||
our_flags+=(-march=native)
|
our_flags+=(-march=native)
|
||||||
fi
|
fi
|
||||||
local debug_flags=(-O1 -g -D_DEBUG);
|
local debug_flags=(-O1 -g -D_DEBUG);
|
||||||
local release_flags=(-Ofast -fwhole-program -fweb -mtune=native -g0 -fomit-frame-pointer -s -DNDEBUG)
|
local release_flags=(-Ofast -mtune=native -g0 -fomit-frame-pointer -s -DNDEBUG)
|
||||||
local dr_flags=(-Ofast -g -fomit-frame-pointer -DNDEBUG)
|
local dr_flags=(-Ofast -g -fomit-frame-pointer -DNDEBUG)
|
||||||
local hardened_flags=(-O3 -g0 -s
|
local hardened_flags=(-O3 -g0 -s
|
||||||
-DNDEBUG -D_FORTIFY_SOURCE=2
|
-DNDEBUG -D_FORTIFY_SOURCE=2
|
||||||
|
|
40
sh/noccom
40
sh/noccom
|
@ -4,45 +4,13 @@
|
||||||
noccom() {
|
noccom() {
|
||||||
[ -s ~/opt/local/bin/noccom ] || cat > ~/opt/local/bin/noccom <<EOF
|
[ -s ~/opt/local/bin/noccom ] || cat > ~/opt/local/bin/noccom <<EOF
|
||||||
#!/usr/bin/env perl
|
#!/usr/bin/env perl
|
||||||
|
$/ = undef;
|
||||||
\$/ = undef;
|
|
||||||
\$_ = <>;
|
\$_ = <>;
|
||||||
|
s#/\\*[^*]*\\*+([^/*][^*]*\\*+)*/|//([^\\\\]|[^\\n][\\n]?)*?\\n|("(\\\\.|[^"\\\\])*"|'(\\\\.|[^'\\\\])*'|.[^/"'\\\\]*)#defined \$3 ? \$3 : ""#gse;
|
||||||
s{
|
s#|\\\\?\\n\\s*([{}])?\\s*(;*)\\s*(?=\\\\?\\n)|("(?:\\\\.|[^"\\\\])*"|'(?:\\\\.|[^'\\\\])*'|.[^/"'\\\\\\n]*)#defined \$3?\$3:defined \$1?" ".\$1.\$2:\$2#gse;
|
||||||
/\\*[^*]*\\*+([^/*][^*]*\\*+)*/
|
s#^(\\s*\\n)+##s;
|
||||||
|
|
|
||||||
//([^\\\\]
|
|
||||||
|
|
|
||||||
[^\\n][\\n]?)*?\\n
|
|
||||||
|
|
|
||||||
(
|
|
||||||
"(?:\\\\.|[^"\\\\])*"
|
|
||||||
|
|
|
||||||
'(?:\\\\.|[^'\\\\])*'
|
|
||||||
|
|
|
||||||
.[^/"'\\\\]*
|
|
||||||
)
|
|
||||||
}{defined \$3 ? \$3 : ""}gxse;
|
|
||||||
|
|
||||||
s{
|
|
||||||
\\\\?\\n\\s*([{}])?\\s*(;*)\\s*(?=\\\\?\\n)
|
|
||||||
|
|
|
||||||
(
|
|
||||||
\\#[^\\n]*\\n
|
|
||||||
|
|
|
||||||
"(?:\\\\.|[^"\\\\])*"
|
|
||||||
|
|
|
||||||
'(?:\\\\.|[^'\\\\])*'
|
|
||||||
|
|
|
||||||
.[^#/"'\\\\\\n]*
|
|
||||||
)
|
|
||||||
}{defined \$3 ? \$3 : (defined \$1 ? " ".\$1.\$2 : \$2)}gxse;
|
|
||||||
|
|
||||||
s#(^|\\n)\\s+#\$1#gs;
|
|
||||||
|
|
||||||
print;
|
print;
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
perl ~/opt/local/bin/noccom "$@"
|
perl ~/opt/local/bin/noccom "$@"
|
||||||
}
|
}
|
||||||
noccom "$@"
|
noccom "$@"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user