Skip to content

Commit

Permalink
feat: 0.3.7 switch to astyle format (#42)
Browse files Browse the repository at this point in the history
- feat: switch to astyle format

- fix: update anvil tests output

- feat: bump amboso to 1.6.10
  • Loading branch information
jgabaut authored Nov 6, 2023
1 parent 2207768 commit 495ad95
Show file tree
Hide file tree
Showing 21 changed files with 1,682 additions and 1,623 deletions.
2 changes: 2 additions & 0 deletions .astylerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--style=linux
-s4
2 changes: 1 addition & 1 deletion amboso
1 change: 1 addition & 0 deletions bin/stego.lock
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ tests# tests folder name
0.3.4# Add kls_maxRegions_KLS_BASIC, handle KLS_BASIC in kls_insord_p(), fix list macros args
0.3.5# Shush stderr message, return null on bad kls_temp_start()
0.3.6# Run indent -i4 -linux on all source files
0.3.7# Switch to astyle for format, bump amboso to 1.6.10
4 changes: 4 additions & 0 deletions bin/v0.3.7/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#amboso compliant version folder, will ignore everything inside BUT the gitignore, to keep the clean dir
*
!.gitignore
!static
1 change: 1 addition & 0 deletions bin/v0.3.7/static
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Define the package name and version
AC_INIT([koliseo], [0.3.6], [[email protected]])
AC_INIT([koliseo], [0.3.7], [[email protected]])

# Verify automake version and enable foreign option
AM_INIT_AUTOMAKE([foreign -Wall])
Expand Down Expand Up @@ -48,7 +48,7 @@ fi
# Set a default version number if not specified externally
AC_ARG_VAR([VERSION], [Version number])
if test -z "$VERSION"; then
VERSION="0.3.6"
VERSION="0.3.7"
fi

# Output variables to the config.h header
Expand Down
2 changes: 1 addition & 1 deletion docs/koliseo.doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ PROJECT_NAME = "koliseo"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = "0.3.6"
PROJECT_NUMBER = "0.3.7"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
31 changes: 31 additions & 0 deletions format.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

#Check if status is clean
if output=$(git status --untracked-files=no --porcelain) && [ -z "$output" ]; then
printf "\033[1;32m[OK]\e[0m Status is clean\n"
else
printf "\033[1;31m[ERR]\e[0m Status is dirty. Quitting.\n"
exit 1
fi
SRC_DIR="src"

kls_SOURCES=("$SRC_DIR"/*.c "$SRC_DIR"/*.h)
CONFIG_FILE=".astylerc"

printf "Running \033[1;34mastyle -s4 --style=linux\e[0m for all source files.\n"
for src_i in "${kls_SOURCES[@]}"; do {
astyle --options="$CONFIG_FILE" $src_i >/dev/null
printf "Ran astyle on [\033[1;35m$src_i\e[0m], status was [\033[1;33m$?\e[0m]\n"
}
done
printf "Removing all \033[1;34msrc/*.orig\e[0m files.\n"
for FILE in ${kls_SOURCES[@]}; do {
if [[ -f "$FILE.orig" ]] ; then {
rm "$FILE.orig" && printf "Removed [\033[1;36m$FILE.orig\e[0m]\n"
} else {
printf "[INFO] File [\033[1;33m$FILE.orig\e[0m] not found.\n"
}
fi
}
done
printf "\033[1;33mDone.\e[0m\n"
Loading

0 comments on commit 495ad95

Please sign in to comment.