aboutsummaryrefslogtreecommitdiff
path: root/fontconfig/src/cleangperf.py
diff options
context:
space:
mode:
Diffstat (limited to 'fontconfig/src/cleangperf.py')
-rw-r--r--fontconfig/src/cleangperf.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/fontconfig/src/cleangperf.py b/fontconfig/src/cleangperf.py
new file mode 100644
index 000000000..a276312c9
--- /dev/null
+++ b/fontconfig/src/cleangperf.py
@@ -0,0 +1,8 @@
+import sys,re
+
+inbuffer=sys.stdin.read()
+inbuffer=re.sub(r'[ \t\r\n]*\n[ \t]*',r'\n',inbuffer)
+inbuffer=re.sub(r'[ \t\r\n]*,[ \t\r\n]',r',',inbuffer)
+inbuffer=re.sub(r'\n#[^\n]+','',inbuffer)
+sys.stdout.write(inbuffer)
+