Skip to content
Snippets Groups Projects
Verified Commit 2ed1d3aa authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Remove obsolete C++ indenting scripts

We now use clang-format.

[skip ci]
parent 59c7e8b8
Branches
No related tags found
No related merge requests found
#!/bin/bash
# Reindents the C++ source code files given in argument
[[ -n $1 ]] || { echo "Give filename(s) in argument" 2>&1; exit 1; }
pushd "$(dirname "$0")" > /dev/null
SCRIPTS_DIR=$(pwd)
popd > /dev/null
for f in "$@"; do
echo "*** Indenting $f…"
uncrustify -l CPP --replace -c "${SCRIPTS_DIR}"/uncrustify.cfg "$f"
pushd "$(dirname "$f")" > /dev/null
emacs -batch "$(basename "$f")" -l "${SCRIPTS_DIR}"/indent-c++.el
popd > /dev/null
echo
done
(c++-mode)
(setq indent-tabs-mode nil)
(indent-region (point-min) (point-max))
(set-buffer-file-coding-system 'utf-8-unix)
(delete-trailing-whitespace)
(save-buffer)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment