Skip to content

Commit

Permalink
root: applied regressive changes to C programming language
Browse files Browse the repository at this point in the history
Since Nim introduced a lot of changes that are applicable
regressively, we should apply it. Hence, let's do this.

This patch applies regressive changes to C programming langauge in
root repository.

Co-authored-by: Galyna, Cory <[email protected]>
Co-authored-by: (Holloway) Chew, Kean Ho <[email protected]>
Signed-off-by: (Holloway) Chew, Kean Ho <[email protected]>
  • Loading branch information
hollowaykeanho and corygalyna committed Oct 16, 2023
1 parent 52055aa commit 8dd591a
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 51 deletions.
4 changes: 2 additions & 2 deletions CONFIG.toml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ PROJECT_SOURCE_URL = "https://github.com/ChewKeanHo/AutomataCI"
#
# To enable it: simply supply the path (e.g. default is 'srcGO').
# To disable it: simply supply an empty path (e.g. default is '').
PROJECT_NIM = 'srcNIM'
PROJECT_NIM = ''


# PROJECT_PATH_NIM_ENGINE
Expand All @@ -126,7 +126,7 @@ PROJECT_PATH_NIM_ENGINE = "nim-engine"
#
# To enable it: simply supply the path (e.g. default is 'srcC').
# To disable it: simply supply an empty path (e.g. default is '').
PROJECT_C = ''
PROJECT_C = 'srcC'



Expand Down
Binary file modified automataCI/docs/AutomataCI-Engineering-Specification.odt
Binary file not shown.
Binary file modified automataCI/docs/AutomataCI-Engineering-Specification.pdf
Binary file not shown.
7 changes: 0 additions & 7 deletions automataCI/services/compilers/c.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,6 @@ C::get_compiler_by_arch() {
;;
*)
__compiler="aarch64-linux-gnu-gcc"
OS::is_command_available "$__compiler"
if [ $? -eq 0 ]; then
printf -- "%b" "$__compiler"
return 0
fi

__compiler="aarch64-elf-gcc"
;;
esac
;;
Expand Down
1 change: 1 addition & 0 deletions src/changelog/data/latest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
root: added Nim Programming Language support
3 changes: 2 additions & 1 deletion src/changelog/deb/latest
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
automataci (1.7.0) stable; urgency=low

* root: added Nim Programming Language support

-- Your Legal Full Name Here <[email protected]> Sun, 15 Oct 2023 07:59:13 +0800
-- Your Legal Full Name Here <[email protected]> Mon, 16 Oct 2023 13:05:06 +0800
50 changes: 25 additions & 25 deletions srcC/.ci/build_unix-any.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fi

. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/services/io/os.sh"
. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/services/io/fs.sh"
. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/operator_unix-any.sh"
. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/operators_unix-any.sh"



Expand Down Expand Up @@ -67,13 +67,13 @@ EXIT_CODE=0
# execute
# compile for linux-amd64 (microprocessor)
if [ ! "$PROJECT_OS" = "darwin" ]; then
BUILD::compile "c_binary" "linux" "amd64" "automataCI.txt" "$SETTINGS_BIN" "$COMPILER"
BUILD::compile "c-binary" "linux" "amd64" "automataCI.txt" "$SETTINGS_BIN" "$COMPILER"
if [ $? -ne 0 -a $? -ne 10 ]; then
EXIT_CODE=1
fi

BUILD::compile \
"c_library" \
"c-library" \
"linux" \
"amd64" \
"libs/sample/automataCI.txt" \
Expand All @@ -87,13 +87,13 @@ fi

# compile for linux-arm64 (microprocessor)
if [ ! "$PROJECT_OS" = "darwin" ]; then
BUILD::compile "c_binary" "linux" "arm64" "automataCI.txt" "$SETTINGS_BIN" "$COMPILER"
BUILD::compile "c-binary" "linux" "arm64" "automataCI.txt" "$SETTINGS_BIN" "$COMPILER"
if [ $? -ne 0 -a $? -ne 10 ]; then
EXIT_CODE=1
fi

BUILD::compile \
"c_library" \
"c-library" \
"linux" \
"arm64" \
"libs/sample/automataCI.txt" \
Expand All @@ -106,13 +106,13 @@ fi


# compile for windows-amd64 (microprocessor)
BUILD::compile "c_binary" "windows" "amd64" "automataCI.txt" "$SETTINGS_BIN" "$COMPILER"
BUILD::compile "c-binary" "windows" "amd64" "automataCI.txt" "$SETTINGS_BIN" "$COMPILER"
if [ $? -ne 0 -a $? -ne 10 ]; then
EXIT_CODE=1
fi

BUILD::compile \
"c_library" \
"c-library" \
"windows" \
"amd64" \
"libs/sample/automataCI.txt" \
Expand All @@ -124,13 +124,13 @@ fi


# compile for windows-arm64 (microprocessor)
BUILD::compile "c_binary" "windows" "arm64" "automataCI.txt" "$SETTINGS_BIN" "$COMPILER"
BUILD::compile "c-binary" "windows" "arm64" "automataCI.txt" "$SETTINGS_BIN" "$COMPILER"
if [ $? -ne 0 -a $? -ne 10 ]; then
EXIT_CODE=1
fi

BUILD::compile \
"c_library" \
"c-library" \
"windows" \
"arm64" \
"libs/sample/automataCI.txt" \
Expand All @@ -144,7 +144,7 @@ fi
# compile for darwin-amd64 (microprocessor)
if [ "$PROJECT_OS" = "darwin" ]; then
BUILD::compile \
"c_binary" \
"c-binary" \
"darwin" \
"amd64" \
"automataCI.txt" \
Expand All @@ -155,7 +155,7 @@ if [ "$PROJECT_OS" = "darwin" ]; then
fi

BUILD::compile \
"c_library" \
"c-library" \
"darwin" \
"amd64" \
"libs/sample/automataCI.txt" \
Expand All @@ -170,7 +170,7 @@ fi
# compile for darwin-arm64 (microprocessor)
if [ "$PROJECT_OS" = "darwin" ]; then
BUILD::compile \
"c_binary" \
"c-binary" \
"darwin" \
"arm64" \
"automataCI.txt" \
Expand All @@ -181,7 +181,7 @@ if [ "$PROJECT_OS" = "darwin" ]; then
fi

BUILD::compile \
"c_library" \
"c-library" \
"darwin" \
"arm64" \
"libs/sample/automataCI.txt" \
Expand All @@ -195,7 +195,7 @@ fi

# compile for linux-armel (microprocessor)
BUILD::compile \
"c_binary" \
"c-binary" \
"linux" \
"armel" \
"automataCI.txt" \
Expand All @@ -208,7 +208,7 @@ fi

# compile for linux-armhf (microprocessor)
BUILD::compile \
"c_binary" \
"c-binary" \
"linux" \
"armhf" \
"automataCI.txt" \
Expand All @@ -221,7 +221,7 @@ fi

# compile for linux-mips (microprocessor)
BUILD::compile \
"c_binary" \
"c-binary" \
"linux" \
"mips" \
"automataCI.txt" \
Expand All @@ -234,7 +234,7 @@ fi

# compile for linux-mips64 (microprocessor)
BUILD::compile \
"c_binary" \
"c-binary" \
"linux" \
"mips64" \
"automataCI.txt" \
Expand All @@ -247,7 +247,7 @@ fi

# compile for linux-mips64el (microprocessor)
BUILD::compile \
"c_binary" \
"c-binary" \
"linux" \
"mips64el" \
"automataCI.txt" \
Expand All @@ -260,7 +260,7 @@ fi

# compile for linux-mips64r6 (microprocessor)
BUILD::compile \
"c_binary" \
"c-binary" \
"linux" \
"mips64r6" \
"automataCI.txt" \
Expand All @@ -273,7 +273,7 @@ fi

# compile for linux-mips64r6el (microprocessor)
BUILD::compile \
"c_binary" \
"c-binary" \
"linux" \
"mips64r6el" \
"automataCI.txt" \
Expand All @@ -286,7 +286,7 @@ fi

# compile for linux-powerpc (microprocessor)
BUILD::compile \
"c_binary" \
"c-binary" \
"linux" \
"powerpc" \
"automataCI.txt" \
Expand All @@ -299,7 +299,7 @@ fi

# compile for linux-ppc64el (microprocessor)
BUILD::compile \
"c_binary" \
"c-binary" \
"linux" \
"ppc64el" \
"automataCI.txt" \
Expand All @@ -312,7 +312,7 @@ fi

# compile for linux-s390x (microprocessor)
BUILD::compile \
"c_binary" \
"c-binary" \
"linux" \
"s390x" \
"automataCI.txt" \
Expand All @@ -326,7 +326,7 @@ fi
# compile for linux-avr (ATMEL microcontroller)
OS::is_command_available "avr-objcopy"
if [ $? -eq 0 ]; then
BUILD::compile "c_binary" "linux" "avr" "automataCI.txt" "\
BUILD::compile "c-binary" "linux" "avr" "automataCI.txt" "\
-Wall \
-Wextra \
-std=gnu89 \
Expand Down Expand Up @@ -367,7 +367,7 @@ fi

# compile for js-wasm (web)
ALLOW_MEMORY_GROWTH=1 BUILD::compile \
"c_binary" \
"c-binary" \
"js" \
"wasm" \
"automataCI.txt" \
Expand Down
12 changes: 6 additions & 6 deletions srcC/.ci/build_windows-any.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) {

. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\services\io\os.ps1"
. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\services\io\fs.ps1"
. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\operator_windows-any.ps1"
. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\operators_windows-any.ps1"



Expand Down Expand Up @@ -64,7 +64,7 @@ $EXIT_CODE = 0

# compile for windows-amd64 (microprocessor)
$__process = BUILD-Compile `
"c_binary" `
"c-binary" `
"windows" `
"amd64" `
"automataCI.txt" `
Expand All @@ -76,7 +76,7 @@ if (($__process -ne 0) -and ($__process -ne 10)) {


$__process = BUILD-Compile `
"c_library" `
"c-library" `
"windows" `
"amd64" `
"libs\sample\automataCI.txt" `
Expand All @@ -91,7 +91,7 @@ if (($__process -ne 0) -and ($__process -ne 10)) {

# compile for windows-arm64 (microprocessor)
$__process = BUILD-Compile `
"c_binary" `
"c-binary" `
"windows" `
"arm64" `
"automataCI.txt" `
Expand All @@ -103,7 +103,7 @@ if (($__process -ne 0) -and ($__process -ne 10)) {


$__process = BUILD-Compile `
"c_library" `
"c-library" `
"windows" `
"arm64" `
"libs\sample\automataCI.txt" `
Expand All @@ -116,7 +116,7 @@ if (($__process -ne 0) -and ($__process -ne 10)) {

# compile for js-wasm (web)
$__process = BUILD-Compile `
"c_binary" `
"c-binary" `
"js" `
"wasm" `
"automataCI.txt" `
Expand Down
10 changes: 5 additions & 5 deletions srcC/.ci/materialize_unix-any.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fi

. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/services/io/os.sh"
. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/services/io/fs.sh"
. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/operator_unix-any.sh"
. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/operators_unix-any.sh"



Expand Down Expand Up @@ -65,7 +65,7 @@ COMPILER=""
# execute
if [ "$PROJECT_OS" = "darwin" ]; then
BUILD::compile \
"c_binary" \
"c-binary" \
"darwin" \
"amd64" \
"automataCI.txt" \
Expand All @@ -76,7 +76,7 @@ if [ "$PROJECT_OS" = "darwin" ]; then
fi

BUILD::compile \
"c_library" \
"c-library" \
"darwin" \
"amd64" \
"libs/sample/automataCI.txt" \
Expand All @@ -86,13 +86,13 @@ if [ "$PROJECT_OS" = "darwin" ]; then
return 1
fi
else
BUILD::compile "c_binary" "linux" "amd64" "automataCI.txt" "$SETTINGS_BIN" "$COMPILER"
BUILD::compile "c-binary" "linux" "amd64" "automataCI.txt" "$SETTINGS_BIN" "$COMPILER"
if [ $? -ne 0 -a $? -ne 10 ]; then
return 1
fi

BUILD::compile \
"c_library" \
"c-library" \
"linux" \
"amd64" \
"libs/sample/automataCI.txt" \
Expand Down
6 changes: 3 additions & 3 deletions srcC/.ci/materialize_windows-any.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if (-not (Test-Path -Path $env:PROJECT_PATH_ROOT)) {

. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\services\io\os.ps1"
. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\services\io\fs.ps1"
. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\operator_windows-any.ps1"
. "${env:PROJECT_PATH_ROOT}\${env:PROJECT_PATH_AUTOMATA}\operators_windows-any.ps1"



Expand Down Expand Up @@ -62,7 +62,7 @@ $COMPILER = ""

# execute
$__process = BUILD-Compile `
"c_binary" `
"c-binary" `
"windows" `
"${env:PROJECT_ARCH}" `
"automataCI.txt" `
Expand All @@ -74,7 +74,7 @@ if (($__process -ne 0) -and ($__process -ne 10)) {


$__process = BUILD-Compile `
"c_library" `
"c-library" `
"windows" `
"${env:PROJECT_ARCH}" `
"libs\sample\automataCI.txt" `
Expand Down
2 changes: 1 addition & 1 deletion srcC/.ci/test_unix-any.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fi

. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/services/io/os.sh"
. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/services/io/fs.sh"
. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/operator_unix-any.sh"
. "${PROJECT_PATH_ROOT}/${PROJECT_PATH_AUTOMATA}/operators_unix-any.sh"



Expand Down
Loading

0 comments on commit 8dd591a

Please sign in to comment.