Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 16 lines (14 sloc) 0.355 kB
#!/bin/sh
# works only with GNU sed, not BSD/OSX sed
sed -r -e :a -e "$!N;
# remove comments
s¦/\*[^*]*\*+([^/][^*]*\*+)*/¦¦;
# remove newlines and white space at the beginning and at the end of lines
s/[\t ]*[\r\n]+[\t ]*//;
# condense tabs and blanks
s/[\t ]+/ /;
# remove unnecessary blanks
s/[ ]+\{/{/;
s/([:\(\{,;])[ ]+/\1/;
s/[ ]+([\)\}])/\1/;
ta"
Jump to Line
Something went wrong with that request. Please try again.