File: indent-c%2B%2B

package info (click to toggle)
dynare 4.5.7-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 49,408 kB
  • sloc: cpp: 84,998; ansic: 29,058; pascal: 13,843; sh: 4,833; objc: 4,236; yacc: 3,622; makefile: 2,278; lex: 1,541; python: 236; lisp: 69; xml: 8
file content (15 lines) | stat: -rwxr-xr-x 319 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

# Reindents the C++ source code file given in argument.

if [ -z "$1" ]; then
    echo "Give a filename in argument"
    exit 1
fi

SCRIPTS_DIR=$(pwd)/$(dirname $0)

uncrustify -l CPP --replace -c ${SCRIPTS_DIR}/uncrustify.cfg $1

cd $(dirname $1)
emacs -batch $(basename $1) -l ${SCRIPTS_DIR}/indent-c++.el