]> git.saurik.com Git - wxWidgets.git/blame - interface/check_syntax.sh
Add wxVectorSort function for sorting wxVector<T> containers. Closes #11889
[wxWidgets.git] / interface / check_syntax.sh
CommitLineData
d6d0011d
FM
1#!/bin/bash
2
3# check_syntax.sh - a small script to search for interface headers with
4# missing semicolons (they give troubles to Doxygen).
5# RCS-ID: $Id$
6# Author: Francesco Montorsi
7
8
15686fa4 9rm -f missing_semicolons
d6d0011d
FM
10
11# the preprocessor will remove comments and all #preprocessor #stuff;
12# we then remove the empty lines
13for iface in wx/*h; do
14
15 echo "--- $iface ---" >>missing_semicolons
16
17 gcc -E $iface | grep -v '#' | grep -v '^[[:space:]]*$' >temp
18
19 # now remove the lines which ends with a comma or a semicolon; they're ok
20 cat temp | grep -v '.*;$' | grep -v '.*,$' >temp2
21
22 # now search for methods; we know they should always contain at least two () brackets!
23 cat temp2 | grep '(' >>missing_semicolons
24
25 # now remove the lines which shouldn't have final comma or semicolon:
26# cat temp2 | grep -v '^[[:space:]]*wx[A-Z]*[[:space:]]*$' >temp
27# cat temp | grep -v 'class' | grep -v 'enum' | grep -v 'template' | \
28# grep -v 'struct' | grep -v 'typedef' | \
29# grep -v 'public:' | grep -v 'protected:' | grep -v 'private:' | \
30# grep -v '{' | grep -v '}' >>missing_semicolons
31
32done
33
34rm temp temp2