1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-05-18 09:53:22 -07:00

Compare commits

..

No commits in common. "7582a8435624c54fb862b1e753ec83b9fac8582c" and "7703d77332d7af65b93b27595e491cacfd00aa4c" have entirely different histories.

2 changed files with 5 additions and 37 deletions

View File

@ -160,7 +160,7 @@ compile() {
our_flags+=(-march=native)
fi
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 hardened_flags=(-O3 -g0 -s
-DNDEBUG -D_FORTIFY_SOURCE=2

View File

@ -4,45 +4,13 @@
noccom() {
[ -s ~/opt/local/bin/noccom ] || cat > ~/opt/local/bin/noccom <<EOF
#!/usr/bin/env perl
\$/ = undef;
$/ = undef;
\$_ = <>;
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;
s#/\\*[^*]*\\*+([^/*][^*]*\\*+)*/|//([^\\\\]|[^\\n][\\n]?)*?\\n|("(\\\\.|[^"\\\\])*"|'(\\\\.|[^'\\\\])*'|.[^/"'\\\\]*)#defined \$3 ? \$3 : ""#gse;
s#|\\\\?\\n\\s*([{}])?\\s*(;*)\\s*(?=\\\\?\\n)|("(?:\\\\.|[^"\\\\])*"|'(?:\\\\.|[^'\\\\])*'|.[^/"'\\\\\\n]*)#defined \$3?\$3:defined \$1?" ".\$1.\$2:\$2#gse;
s#^(\\s*\\n)+##s;
print;
EOF
perl ~/opt/local/bin/noccom "$@"
}
noccom "$@"