|
From: <ai...@us...> - 2009-10-20 21:46:02
|
Revision: 10535
http://plplot.svn.sourceforge.net/plplot/?rev=10535&view=rev
Author: airwin
Date: 2009-10-20 21:45:53 +0000 (Tue, 20 Oct 2009)
Log Message:
-----------
Replace "--view" option with "--diff" option. Allow concatanated options for
diff headed by a single hyphen, e.g., "--diff -au". If no diff options
are specified, "-auw" is assumed.
Modified Paths:
--------------
trunk/scripts/style_source.sh
Modified: trunk/scripts/style_source.sh
===================================================================
--- trunk/scripts/style_source.sh 2009-10-13 15:58:19 UTC (rev 10534)
+++ trunk/scripts/style_source.sh 2009-10-20 21:45:53 UTC (rev 10535)
@@ -32,11 +32,14 @@
Usage: ./style_source.sh [OPTIONS]
Options:
- [--view] Show detailed style differences in source code.
- [--noview] Summarize style differences in source code (default).
- [--apply] Apply style differences to source code (POWERFUL).
- [--noapply] Do not apply style differences to source code (default).
- [--help] Show this message.
+ [--diff [diff options]] Show detailed style differences in source code
+ with optional concatanated diff options headed
+ by a single hyphen. If no diff options are
+ specified, then -auw is used by default.
+ [--nodiff] Summarize style differences in source code (default).
+ [--apply] Apply style differences to source code (POWERFUL).
+ [--noapply] Do not apply style differences to source code (default).
+ [--help] Show this message.
'
exit $1
@@ -44,17 +47,24 @@
# Figure out what script options were specified by the user.
# Defaults
-export view=OFF
+export diff=OFF
export apply=OFF
+export diff_options="-auw"
while test $# -gt 0; do
case $1 in
- --view)
- view=ON
+ --diff)
+ diff=ON
+ case $2 in
+ -[^-]*)
+ diff_options=$2
+ shift
+ ;;
+ esac
;;
- --noview)
- view=OFF
+ --nodiff)
+ diff=OFF
;;
--apply)
apply=ON
@@ -102,16 +112,24 @@
fi
-export csource_LIST="src/*.c src/*.h"
+export csource_LIST
+# Top level directory.
+csource_LIST=config.h.cmake
+# src directory
+csource_LIST="$csource_LIST src/*.c src/*.h"
+
+# All C source (i.e., exclude qt.h) in include directory.
+csource_LIST="$csource_LIST `ls include/*.h include/*.h.in include/*.h.cmake |grep -v qt.h`"
+
export cppsource_LIST="bindings/c++/plstream.cc bindings/c++/plstream.h"
for csource in $csource_LIST ; do
uncrustify -c uncrustify.cfg -q -l c < $csource | cmp --quiet $csource -
if [ "$?" -ne 0 ] ; then
ls $csource
- if [ "$view" = "ON" ] ; then
- uncrustify -c uncrustify.cfg -q -l c < $csource | diff -au $csource -
+ if [ "$diff" = "ON" ] ; then
+ uncrustify -c uncrustify.cfg -q -l c < $csource | diff $diff_options $csource -
fi
if [ "$apply" = "ON" ] ; then
@@ -124,8 +142,8 @@
uncrustify -c uncrustify.cfg -q -l cpp < $cppsource | cmp --quiet $cppsource -
if [ "$?" -ne 0 ] ; then
ls $cppsource
- if [ "$view" = "ON" ] ; then
- uncrustify -c uncrustify.cfg -q -l cpp < $cppsource | diff -au $cppsource -
+ if [ "$diff" = "ON" ] ; then
+ uncrustify -c uncrustify.cfg -q -l cpp < $cppsource | diff $diff_options $cppsource -
fi
if [ "$apply" = "ON" ] ; then
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|