summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy.zurcher@heraeus.com>2011-04-18 15:13:07 +0200
committerJérémy Zurcher <jeremy.zurcher@heraeus.com>2011-04-18 15:13:07 +0200
commitb2d1dc07f424ccf484daa27bbb259cc41859e1dd (patch)
treeb0a1648370dce8b3a3e25d464e51e8edc06f6458
parent407a73b868c98a2e275b2f00663f62d7b9df32b9 (diff)
downloadffi-efl-b2d1dc07f424ccf484daa27bbb259cc41859e1dd.zip
ffi-efl-b2d1dc07f424ccf484daa27bbb259cc41859e1dd.tar.gz
update tools/sed-* and tools/extract-api.sh
-rwxr-xr-xtools/extract-api.sh9
-rw-r--r--tools/sed-enums2
-rw-r--r--tools/sed-structs14
-rw-r--r--tools/sed-types14
4 files changed, 19 insertions, 20 deletions
diff --git a/tools/extract-api.sh b/tools/extract-api.sh
index 04d51d2..00c3a5d 100755
--- a/tools/extract-api.sh
+++ b/tools/extract-api.sh
@@ -15,6 +15,7 @@ for header in \
"${INCLUDE}/evas-1/Evas_GL.h" \
"${INCLUDE}/ecore-1/Ecore.h" \
"${INCLUDE}/ecore-1/Ecore_Con.h" \
+ "${INCLUDE}/ecore-1/Ecore_Input.h" \
"${INCLUDE}/ecore-1/Ecore_Evas.h" \
"${INCLUDE}/ecore-1/Ecore_Fb.h" \
"${INCLUDE}/ecore-1/Ecore_File.h" \
@@ -26,11 +27,9 @@ for header in \
#
mv $CURRENT/$FILE-* $PREV/ 2>/dev/null
#
- for what in functions enums structs callbacks; do
- cat $header | sed -r -n -f sed-$what > $CURRENT/$FILE-$what
- done
- #
- for F in $FILE-funcs $FILE-enums $FILE-structs ; do
+ for what in functions enums types callbacks; do
+ F=$FILE-$what
+ cat $header | sed -r -n -f sed-$what > $CURRENT/$F
if [ -f $PREV/$F ]; then
diff -u0 $PREV/$F $CURRENT/$F > $F-diff
N=$(cat $F-diff | wc -l)
diff --git a/tools/sed-enums b/tools/sed-enums
index 3b6c7a5..488d6e1 100644
--- a/tools/sed-enums
+++ b/tools/sed-enums
@@ -1,4 +1,4 @@
-s/.*(enum\s+\w+).*$/typedef \1 { /
+s/^\s*typedef\s+(enum(\s+\w+)?).*$/typedef \1 { /
T;h
:attrs;n
s/^\s*([A-Z0-9_]+).*$/\1, /
diff --git a/tools/sed-structs b/tools/sed-structs
deleted file mode 100644
index 1b7afdf..0000000
--- a/tools/sed-structs
+++ /dev/null
@@ -1,14 +0,0 @@
-
-s/^\s*typedef\s+struct\s+(\w+)\s+(\w+)\s*;.*$/typedef struct \1 \2;/
-t finish
-/^\s*typedef\s+struct.*[^;].*/ ! b
-h
-:loop
-n
-/^\s*\}/ ! b loop
-s/^\s*\}\s*(\w+)\s*;.*$/\1;/
-H;x
-s/\n/ /g
-:finish
-s/ {2,}/ /g
-p
diff --git a/tools/sed-types b/tools/sed-types
new file mode 100644
index 0000000..7ac79a2
--- /dev/null
+++ b/tools/sed-types
@@ -0,0 +1,14 @@
+s/^\s*typedef\s+(struct\s+)?((\w+\**\s+)*)(\w+)\s*;.*$/typedef \1 \2 \4;/
+t finish
+s/^\s*typedef\s+(struct.*[^;].*)/typedef \1/
+T
+h
+:loop
+n
+/^\s*\}/ ! b loop
+s/^\s*\}\s*(\w+)\s*;.*$/\1;/
+H;x
+s/\n/ /g
+:finish
+s/ {2,}/ /g
+p