mirror of
https://github.com/notwa/rc
synced 2024-05-05 12:53:23 -07:00
Compare commits
2 Commits
7703d77332
...
7582a84356
Author | SHA1 | Date | |
---|---|---|---|
Connor Olding | 7582a84356 | ||
Connor Olding | d100b43f69 |
|
@ -160,7 +160,7 @@ compile() {
|
|||
our_flags+=(-march=native)
|
||||
fi
|
||||
local debug_flags=(-O1 -g -D_DEBUG);
|
||||
local release_flags=(-Ofast -mtune=native -g0 -fomit-frame-pointer -s -DNDEBUG)
|
||||
local release_flags=(-Ofast -fwhole-program -fweb -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
|
||||
|
|
40
sh/noccom
40
sh/noccom
|
@ -4,13 +4,45 @@
|
|||
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 : ""#gse;
|
||||
s#|\\\\?\\n\\s*([{}])?\\s*(;*)\\s*(?=\\\\?\\n)|("(?:\\\\.|[^"\\\\])*"|'(?:\\\\.|[^'\\\\])*'|.[^/"'\\\\\\n]*)#defined \$3?\$3:defined \$1?" ".\$1.\$2:\$2#gse;
|
||||
s#^(\\s*\\n)+##s;
|
||||
|
||||
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;
|
||||
EOF
|
||||
|
||||
perl ~/opt/local/bin/noccom "$@"
|
||||
}
|
||||
noccom "$@"
|
||||
|
|
Loading…
Reference in New Issue
Block a user