]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/ofed/libsdp/config/libsdp_indent
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / ofed / libsdp / config / libsdp_indent
1 #!/bin/bash
2 #
3 # Copyright (c) 2006 Mellanox Technologies LTD. All rights reserved.
4 #
5 # This software is available to you under a choice of one of two
6 # licenses.  You may choose to be licensed under the terms of the GNU
7 # General Public License (GPL) Version 2, available from the file
8 # COPYING in the main directory of this source tree, or the
9 # OpenIB.org BSD license below:
10 #
11 #     Redistribution and use in source and binary forms, with or
12 #     without modification, are permitted provided that the following
13 #     conditions are met:
14 #
15 #      - Redistributions of source code must retain the above
16 #        copyright notice, this list of conditions and the following
17 #        disclaimer.
18 #
19 #      - Redistributions in binary form must reproduce the above
20 #        copyright notice, this list of conditions and the following
21 #        disclaimer in the documentation and/or other materials
22 #        provided with the distribution.
23 #
24 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
28 # BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
29 # ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
30 # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31 # SOFTWARE.
32 #
33 # $Id: osm_indent 4707 2006-01-03 16:18:08Z halr $
34 #
35 #########################################################################
36
37 #  Abstract:
38 #       Indent script for enforcing source code formatting.
39
40 # This is the indent format used for libsdp:
41 #
42 # -bad  Blank line after declarations
43 # -bap  Blank line after Procedures
44 # -nbbb NO Blank line before block comments
45 # -nbbo NO Break after Boolean operator
46 # -bl   Break after if line
47 # -bli0  Indent for braces is 0
48 # -bls  Break after struct declarations
49 # -cbi0 Case break indent 0
50 # -ci3  Continue indent 3 spaces
51 # -cli0 Case label indent 0 spaces
52 # -ncs  No space after cast operator
53 # -hnl  Honor existing newlines on long lines
54 # -i3      Substitute indent with 3 spaces
55 # -npcs No space after procedure calls
56 # -prs  Space after parenthesis
57 # -nsai No space after if keyword - removed
58 # -nsaw No space after while keyword - removed
59 # -sc      Put * at left of comments in a block comment style
60 # -nsob Don't swallow unnecessary blank lines
61 # -ts3  Tab size is 3
62 # -psl  Type of procedure return in a separate line
63 # -bfda Function declaration arguments in a separate line.
64 # -ut    No tabs as we allow spaces
65 # -br    Put braces on line with if, etc
66 # -ce    Cuddle else and preceeding }
67 #
68 #########################################################################
69
70 eval indent -bad -bap -nbbb -nbbo -bl -bli0 -bls -cbi0 -ci3 -cli0 -ncs \
71             -hnl -i3 -npcs -prs -sc -nsob -ts3 -psl -bfda -ut -br -ce $*