elks-enhanced
public
Read
Owner: themaster
Branch: master
Commits: 6893
Updated: 2026-04-19 00:15
Git CLI clone URL
git clone https://www.xt-emporium.com/git/elks-enhanced.git
Fullscreen desktop URL
Code
Commits
History
Branches
Bug Reports
Discussions
Compare
Settings
elks-enhanced
/
elks
/
scripts
/
reindent
File editor
#!/bin/bash # # This script is used by the `make indent` command, and expects to be called # with a list of files in the current directory that are NOT to be reindented. # It reindents all files in the current directory not in that list that match # the *.c pattern. export allow_null_glob_expansion=Y function reformat() { indent "${FILE}" --ignore-profile \ --braces-on-if-line \ --braces-on-struct-decl-line \ --cuddle-else \ --dont-break-procedure-type \ --else-endif-column24 \ --indent-level4 \ --line-length79 \ --no-space-after-function-call-names \ --no-space-after-parentheses \ --space-after-cast \ --start-left-side-of-comments \ --tab-size8 } function reindent() { printf 'Reindenting %s ...\n' "$1" >&2 if fgrep -q '#asm' "$1" ; then printf "Can't reindent %s as it contains an '#asm' statement.\n" "$1" >&2 sleep 1 else reformat "$1" fi } OK=`printf '%s\n' "$@" | grep '^~' | cut -b 2-` if [ -n "${OK}" ]; then for FILE in $OK ; do if [ -f "${FILE}" ]; then reindent "${FILE}" fi done else for FILE in *.[ch] ; do if [ -f "${FILE}" ]; then if ! printf '%s\n' "$@" | grep -q ^${FILE}'$' ; then reindent "${FILE}" fi fi done fi
Commit message
This repository is read-only for this account.
Repository snapshot
Current branch
master
Visibility
public
Your access
Read
Remote
Configured
File activity
View file history