File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55#include < iostream>
66#include < cstring>
77
8- int main (int argc, char **argv) {
8+ int main (int argc, char **argv)
9+ {
910 const char *filename = NULL ;
1011
1112 // Settings..
Original file line number Diff line number Diff line change 11#! /bin/bash
2+ # The version check in this script is used to avoid commit battles
3+ # between different developers that use different astyle versions as
4+ # different versions might have different output (this has happened in
5+ # the past).
26
3- astyle --convert-tabs test.cpp
4- astyle --convert-tabs simplecpp.cpp
5- astyle --convert-tabs simplecpp.h
7+ # If project management wishes to take a newer astyle version into use
8+ # just change this string to match the start of astyle version string.
9+ ASTYLE_VERSION=" Artistic Style Version 2.05.1"
10+ ASTYLE=" astyle"
11+
12+ DETECTED_VERSION=` $ASTYLE --version 2>&1 `
13+ if [[ " $DETECTED_VERSION " != ${ASTYLE_VERSION} * ]]; then
14+ echo " You should use: ${ASTYLE_VERSION} " ;
15+ echo " Detected: ${DETECTED_VERSION} "
16+ exit 1;
17+ fi
18+
19+ style=" --style=stroustrup --indent=spaces=4 --indent-namespaces --lineend=linux --min-conditional-indent=0"
20+ options=" --options=none --pad-header --unpad-paren --suffix=none --convert-tabs --attach-inlines"
21+
22+ $ASTYLE $style $options * .cpp
23+ $ASTYLE $style $options * .h
Original file line number Diff line number Diff line change 1+ @ REM Script to run AStyle on the sources
2+
3+ @ SET STYLE = --style=stroustrup --indent=spaces=4 --indent-namespaces --lineend=linux --min-conditional-indent=0
4+ @ SET OPTIONS = --pad-header --unpad-paren --suffix=none --convert-tabs --attach-inlines
5+
6+ astyle %STYLE% %OPTIONS% *.h
7+ astyle %STYLE% %OPTIONS% *.cpp
You can’t perform that action at this time.
0 commit comments