summaryrefslogtreecommitdiffstats
path: root/tools/sed-functions
diff options
context:
space:
mode:
Diffstat (limited to 'tools/sed-functions')
-rw-r--r--tools/sed-functions8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/sed-functions b/tools/sed-functions
index 296cab1..ac784a5 100644
--- a/tools/sed-functions
+++ b/tools/sed-functions
@@ -1,9 +1,13 @@
-/EAPI extern/ b
-# if return type on single line, append next line
+# drop if don't start with EAPI
+/^\s*EAPI/ ! b
+# drop extern definitions
+/EAPI\s+extern/ b
+# if does not end with ;, append next line
/EAPI.*[^;]\s*$/ { N; s/\n/ / }
# while unfinished argument list, append next line
:loop
/,$/ { N; s/\n/ /; t loop }
+# replace multi spaces with one ...
s/ {2,}/ /g
s/\s+EINA_.*/;/
s/^\s*EAPI/EAPI/p