#!/usr/bin/env bash

# Copyright(c) 2004-2026 DDCcontrol authors and contributors (see AUTHORS and CONTRIBUTORS)

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PROJECT_DIR="$( dirname "$DIR" )"

# for now, only added folders heavily touched in this release
PATHS=(
    "${PROJECT_DIR}/src/ddccontrol/"
    "${PROJECT_DIR}/src/daemon/"
)

astyle --recursive \
    --style=linux --indent=tab --align-pointer=name \
    --unpad-paren --pad-header --pad-oper \
    "${PATHS[@]/%/\*.h}" "${PATHS[@]/%/\*.c}"
