From 65a64f20a0e6bd17f528e351278514856a700a7d Mon Sep 17 00:00:00 2001 From: Laurent Huberdeau Date: Fri, 30 Aug 2024 11:29:55 -0400 Subject: [PATCH] Regenerate examples --- examples/compiled/base64.sh | 6 +++--- examples/compiled/cat.sh | 4 ++-- examples/compiled/cp.sh | 4 ++-- examples/compiled/echo.sh | 2 +- examples/compiled/print-reverse.sh | 2 +- examples/compiled/repl.sh | 4 ++-- examples/compiled/reverse.sh | 2 +- examples/compiled/select-file.sh | 4 ++-- examples/compiled/sha256sum.sh | 6 +++--- examples/compiled/wc-stdin.sh | 2 +- examples/compiled/wc.sh | 4 ++-- examples/compiled/welcome.sh | 2 +- 12 files changed, 21 insertions(+), 21 deletions(-) diff --git a/examples/compiled/base64.sh b/examples/compiled/base64.sh index 1b026ccb..6af8e5ff 100755 --- a/examples/compiled/base64.sh +++ b/examples/compiled/base64.sh @@ -46,7 +46,7 @@ unpack_escaped_string() { __buf="${__buf#?}" # Remove the current char from $__buf ;; *) - __c=$(LC_CTYPE=C printf "%d" "'${__buf%"${__buf#?}"}") + __c=$(LC_CTYPE=C printf "%d" "'${__buf%"${__buf#?}"}"); __c=$((__c > 0 ? __c : 256 + __c)) __buf="${__buf#?}" # Remove the current char from $__buf ;; esac @@ -190,7 +190,7 @@ _getchar() { fi fi fi - __c=$(LC_CTYPE=C printf "%d" "'${__stdin_buf%"${__stdin_buf#?}"}") + __c=$(LC_CTYPE=C printf "%d" "'${__stdin_buf%"${__stdin_buf#?}"}"); __c=$((__c > 0 ? __c : 256 + __c)) : $(($1 = __c)) __stdin_buf="${__stdin_buf#?}" # remove the current char from $__stdin_buf } @@ -206,7 +206,7 @@ unpack_string() { # Remove all but first char __char="${__str%"$__tail"}" # Convert char to ASCII - __c=$(LC_CTYPE=C printf "%d" "'$__char") + __c=$(LC_CTYPE=C printf "%d" "'$__char"); __c=$((__c > 0 ? __c : 256 + __c)) # Write character to memory : $((_$__ptr = __c)) # Continue with rest of string diff --git a/examples/compiled/cat.sh b/examples/compiled/cat.sh index 515654c0..eba09703 100755 --- a/examples/compiled/cat.sh +++ b/examples/compiled/cat.sh @@ -78,7 +78,7 @@ unpack_line() { # $1: Shell string, $2: Buffer, $3: Ends with EOF? __buffer=$2 __ends_with_eof=$3 while [ ! -z "$__fgetc_buf" ]; do - __c=$(LC_CTYPE=C printf "%d" "'${__fgetc_buf%"${__fgetc_buf#?}"}") + __c=$(LC_CTYPE=C printf "%d" "'${__fgetc_buf%"${__fgetc_buf#?}"}"); __c=$((__c > 0 ? __c : 256 + __c)) : $((_$__buffer = __c)) __fgetc_buf=${__fgetc_buf#?} # Remove the first character : $((__buffer += 1)) # Move to the next buffer position @@ -272,7 +272,7 @@ unpack_string() { # Remove all but first char __char="${__str%"$__tail"}" # Convert char to ASCII - __c=$(LC_CTYPE=C printf "%d" "'$__char") + __c=$(LC_CTYPE=C printf "%d" "'$__char"); __c=$((__c > 0 ? __c : 256 + __c)) # Write character to memory : $((_$__ptr = __c)) # Continue with rest of string diff --git a/examples/compiled/cp.sh b/examples/compiled/cp.sh index 740bc522..3946bf3c 100755 --- a/examples/compiled/cp.sh +++ b/examples/compiled/cp.sh @@ -71,7 +71,7 @@ unpack_line() { # $1: Shell string, $2: Buffer, $3: Ends with EOF? __buffer=$2 __ends_with_eof=$3 while [ ! -z "$__fgetc_buf" ]; do - __c=$(LC_CTYPE=C printf "%d" "'${__fgetc_buf%"${__fgetc_buf#?}"}") + __c=$(LC_CTYPE=C printf "%d" "'${__fgetc_buf%"${__fgetc_buf#?}"}"); __c=$((__c > 0 ? __c : 256 + __c)) : $((_$__buffer = __c)) __fgetc_buf=${__fgetc_buf#?} # Remove the first character : $((__buffer += 1)) # Move to the next buffer position @@ -251,7 +251,7 @@ unpack_string() { # Remove all but first char __char="${__str%"$__tail"}" # Convert char to ASCII - __c=$(LC_CTYPE=C printf "%d" "'$__char") + __c=$(LC_CTYPE=C printf "%d" "'$__char"); __c=$((__c > 0 ? __c : 256 + __c)) # Write character to memory : $((_$__ptr = __c)) # Continue with rest of string diff --git a/examples/compiled/echo.sh b/examples/compiled/echo.sh index c209f549..43148775 100755 --- a/examples/compiled/echo.sh +++ b/examples/compiled/echo.sh @@ -44,7 +44,7 @@ unpack_string() { # Remove all but first char __char="${__str%"$__tail"}" # Convert char to ASCII - __c=$(LC_CTYPE=C printf "%d" "'$__char") + __c=$(LC_CTYPE=C printf "%d" "'$__char"); __c=$((__c > 0 ? __c : 256 + __c)) # Write character to memory : $((_$__ptr = __c)) # Continue with rest of string diff --git a/examples/compiled/print-reverse.sh b/examples/compiled/print-reverse.sh index c2c4b537..504e8f35 100755 --- a/examples/compiled/print-reverse.sh +++ b/examples/compiled/print-reverse.sh @@ -62,7 +62,7 @@ unpack_string() { # Remove all but first char __char="${__str%"$__tail"}" # Convert char to ASCII - __c=$(LC_CTYPE=C printf "%d" "'$__char") + __c=$(LC_CTYPE=C printf "%d" "'$__char"); __c=$((__c > 0 ? __c : 256 + __c)) # Write character to memory : $((_$__ptr = __c)) # Continue with rest of string diff --git a/examples/compiled/repl.sh b/examples/compiled/repl.sh index 1ab7ae99..1462a6cf 100755 --- a/examples/compiled/repl.sh +++ b/examples/compiled/repl.sh @@ -37,7 +37,7 @@ unpack_escaped_string() { __buf="${__buf#?}" # Remove the current char from $__buf ;; *) - __c=$(LC_CTYPE=C printf "%d" "'${__buf%"${__buf#?}"}") + __c=$(LC_CTYPE=C printf "%d" "'${__buf%"${__buf#?}"}"); __c=$((__c > 0 ? __c : 256 + __c)) __buf="${__buf#?}" # Remove the current char from $__buf ;; esac @@ -781,7 +781,7 @@ unpack_line() { # $1: Shell string, $2: Buffer, $3: Ends with EOF? __buffer=$2 __ends_with_eof=$3 while [ ! -z "$__fgetc_buf" ]; do - __c=$(LC_CTYPE=C printf "%d" "'${__fgetc_buf%"${__fgetc_buf#?}"}") + __c=$(LC_CTYPE=C printf "%d" "'${__fgetc_buf%"${__fgetc_buf#?}"}"); __c=$((__c > 0 ? __c : 256 + __c)) : $((_$__buffer = __c)) __fgetc_buf=${__fgetc_buf#?} # Remove the first character : $((__buffer += 1)) # Move to the next buffer position diff --git a/examples/compiled/reverse.sh b/examples/compiled/reverse.sh index 57d2a5ba..840199dd 100755 --- a/examples/compiled/reverse.sh +++ b/examples/compiled/reverse.sh @@ -43,7 +43,7 @@ unpack_string() { # Remove all but first char __char="${__str%"$__tail"}" # Convert char to ASCII - __c=$(LC_CTYPE=C printf "%d" "'$__char") + __c=$(LC_CTYPE=C printf "%d" "'$__char"); __c=$((__c > 0 ? __c : 256 + __c)) # Write character to memory : $((_$__ptr = __c)) # Continue with rest of string diff --git a/examples/compiled/select-file.sh b/examples/compiled/select-file.sh index 334c65ee..02a9a533 100755 --- a/examples/compiled/select-file.sh +++ b/examples/compiled/select-file.sh @@ -224,7 +224,7 @@ _getchar() { fi fi fi - __c=$(LC_CTYPE=C printf "%d" "'${__stdin_buf%"${__stdin_buf#?}"}") + __c=$(LC_CTYPE=C printf "%d" "'${__stdin_buf%"${__stdin_buf#?}"}"); __c=$((__c > 0 ? __c : 256 + __c)) : $(($1 = __c)) __stdin_buf="${__stdin_buf#?}" # remove the current char from $__stdin_buf } @@ -298,7 +298,7 @@ unpack_string() { # Remove all but first char __char="${__str%"$__tail"}" # Convert char to ASCII - __c=$(LC_CTYPE=C printf "%d" "'$__char") + __c=$(LC_CTYPE=C printf "%d" "'$__char"); __c=$((__c > 0 ? __c : 256 + __c)) # Write character to memory : $((_$__ptr = __c)) # Continue with rest of string diff --git a/examples/compiled/sha256sum.sh b/examples/compiled/sha256sum.sh index 9b13f9a6..01990ef2 100755 --- a/examples/compiled/sha256sum.sh +++ b/examples/compiled/sha256sum.sh @@ -262,7 +262,7 @@ unpack_escaped_string() { __buf="${__buf#?}" # Remove the current char from $__buf ;; *) - __c=$(LC_CTYPE=C printf "%d" "'${__buf%"${__buf#?}"}") + __c=$(LC_CTYPE=C printf "%d" "'${__buf%"${__buf#?}"}"); __c=$((__c > 0 ? __c : 256 + __c)) __buf="${__buf#?}" # Remove the current char from $__buf ;; esac @@ -300,7 +300,7 @@ unpack_line() { # $1: Shell string, $2: Buffer, $3: Ends with EOF? __buffer=$2 __ends_with_eof=$3 while [ ! -z "$__fgetc_buf" ]; do - __c=$(LC_CTYPE=C printf "%d" "'${__fgetc_buf%"${__fgetc_buf#?}"}") + __c=$(LC_CTYPE=C printf "%d" "'${__fgetc_buf%"${__fgetc_buf#?}"}"); __c=$((__c > 0 ? __c : 256 + __c)) : $((_$__buffer = __c)) __fgetc_buf=${__fgetc_buf#?} # Remove the first character : $((__buffer += 1)) # Move to the next buffer position @@ -484,7 +484,7 @@ unpack_string() { # Remove all but first char __char="${__str%"$__tail"}" # Convert char to ASCII - __c=$(LC_CTYPE=C printf "%d" "'$__char") + __c=$(LC_CTYPE=C printf "%d" "'$__char"); __c=$((__c > 0 ? __c : 256 + __c)) # Write character to memory : $((_$__ptr = __c)) # Continue with rest of string diff --git a/examples/compiled/wc-stdin.sh b/examples/compiled/wc-stdin.sh index 19f17214..7cbfc677 100755 --- a/examples/compiled/wc-stdin.sh +++ b/examples/compiled/wc-stdin.sh @@ -61,7 +61,7 @@ _getchar() { fi fi fi - __c=$(LC_CTYPE=C printf "%d" "'${__stdin_buf%"${__stdin_buf#?}"}") + __c=$(LC_CTYPE=C printf "%d" "'${__stdin_buf%"${__stdin_buf#?}"}"); __c=$((__c > 0 ? __c : 256 + __c)) : $(($1 = __c)) __stdin_buf="${__stdin_buf#?}" # remove the current char from $__stdin_buf } diff --git a/examples/compiled/wc.sh b/examples/compiled/wc.sh index d34e851e..4c848714 100755 --- a/examples/compiled/wc.sh +++ b/examples/compiled/wc.sh @@ -112,7 +112,7 @@ unpack_line() { # $1: Shell string, $2: Buffer, $3: Ends with EOF? __buffer=$2 __ends_with_eof=$3 while [ ! -z "$__fgetc_buf" ]; do - __c=$(LC_CTYPE=C printf "%d" "'${__fgetc_buf%"${__fgetc_buf#?}"}") + __c=$(LC_CTYPE=C printf "%d" "'${__fgetc_buf%"${__fgetc_buf#?}"}"); __c=$((__c > 0 ? __c : 256 + __c)) : $((_$__buffer = __c)) __fgetc_buf=${__fgetc_buf#?} # Remove the first character : $((__buffer += 1)) # Move to the next buffer position @@ -296,7 +296,7 @@ unpack_string() { # Remove all but first char __char="${__str%"$__tail"}" # Convert char to ASCII - __c=$(LC_CTYPE=C printf "%d" "'$__char") + __c=$(LC_CTYPE=C printf "%d" "'$__char"); __c=$((__c > 0 ? __c : 256 + __c)) # Write character to memory : $((_$__ptr = __c)) # Continue with rest of string diff --git a/examples/compiled/welcome.sh b/examples/compiled/welcome.sh index fbf4055e..b326a1e1 100755 --- a/examples/compiled/welcome.sh +++ b/examples/compiled/welcome.sh @@ -47,7 +47,7 @@ _getchar() { fi fi fi - __c=$(LC_CTYPE=C printf "%d" "'${__stdin_buf%"${__stdin_buf#?}"}") + __c=$(LC_CTYPE=C printf "%d" "'${__stdin_buf%"${__stdin_buf#?}"}"); __c=$((__c > 0 ? __c : 256 + __c)) : $(($1 = __c)) __stdin_buf="${__stdin_buf#?}" # remove the current char from $__stdin_buf }