From b2d1dc07f424ccf484daa27bbb259cc41859e1dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 18 Apr 2011 15:13:07 +0200 Subject: update tools/sed-* and tools/extract-api.sh --- tools/extract-api.sh | 9 ++++----- tools/sed-enums | 2 +- tools/sed-structs | 14 -------------- tools/sed-types | 14 ++++++++++++++ 4 files changed, 19 insertions(+), 20 deletions(-) delete mode 100644 tools/sed-structs create mode 100644 tools/sed-types 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 -- cgit v1.1-2-g2b99