Skip to content

Commit 68236be

Browse files
Replace remaining cecho calls with ANSI escape codes (#6)
Replace remaining occurrences of cecho with ANSI escape sequences in Windows build scripts.
1 parent 76d5f13 commit 68236be

File tree

9 files changed

+20
-20
lines changed

9 files changed

+20
-20
lines changed

mbr_bootloader/BUILD.BAT

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
cd %~d0%~p0
33
call CLEAN.BAT
44

5-
cecho {09}Assembling{0F}{\t}==^> boot_mbr.asm...{#}
5+
echo|set /p dummy="[94mAssembling[97m ==> boot_mbr.asm...[0m"
66
nasm -f bin boot_mbr.asm -o boot_mbr.bin || goto ERROR
7-
cecho {0a}done{#}{\n}
7+
echo [92mdone[0m
88
goto EOF
99

1010
:ERROR
11-
cecho {0C}Error{#}{\n}
11+
echo [91mError[0m
1212
EXIT /B 1
1313

1414
:EOF

stage1_bootloader/BUILD.BAT

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
cd %~d0%~p0
33
call CLEAN.BAT
44

5-
if not exist ..\stage2_bootloader\boot2.map cecho {0C}You have to build the second stage bootloader first{#}{\n}&&goto ERROR
5+
if not exist ..\stage2_bootloader\boot2.map echo [91mYou have to build the second stage bootloader first[0m&&goto ERROR
66
for /f "tokens=1" %%i in ('findstr /R /C:"[0-9a-fA-F][0-9a-fA-F]* *OperatingSystemName" ..\stage2_bootloader\boot2.map') do set BPB_OFFSET=0x%%i
77

8-
cecho {09}Assembling{0F}{\t}==^> boot.asm...{#}
8+
echo|set /p dummy="[94mAssembling[97m ==> boot.asm...[0m"
99
nasm -f bin -D BPB_OFFSET=%BPB_OFFSET% boot.asm -o boot.bin || goto ERROR
10-
cecho {0a}done{#}{\n}
10+
echo [92mdone[0m
1111
goto EOF
1212

1313
:ERROR
14-
cecho {0C}Error{#}{\n}
14+
echo [91mError[0m
1515
EXIT /B 1
1616

1717
:EOF

stage2_bootloader/BUILD.BAT

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
cd %~d0%~p0
33
call CLEAN.BAT
44

5-
cecho {09}Assembling{0F}{\t}==^> boot2.asm...{#}
5+
echo|set /p dummy="[94mAssembling[97m ==> boot2.asm...[0m"
66
nasm -f bin boot2.asm -o BOOT2.SYS || goto ERROR
7-
cecho {0a}done{#}{\n}
7+
echo [92mdone[0m
88
goto EOF
99

1010
:ERROR
11-
cecho {0C}Error{#}{\n}
11+
echo [91mError[0m
1212
EXIT /B 1
1313

1414
:EOF

user/user_programs/cpptest/BUILD.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ make --makefile=makefile SHELL=cmd || goto ERROR
55
goto EOF
66

77
:ERROR
8-
cecho {0C}Error{#}{\n}
8+
echo [91mError[0m
99
EXIT /B 1
1010

1111
:EOF

user/user_programs/pcilist/BUILD.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ make --makefile=makefile SHELL=cmd || goto ERROR
55
goto EOF
66

77
:ERROR
8-
cecho {0C}Error{#}{\n}
8+
echo [91mError[0m
99
EXIT /B 1
1010

1111
:EOF

user/user_programs/raycaster/BUILD.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ make --makefile=makefile SHELL=cmd || goto ERROR
55
goto EOF
66

77
:ERROR
8-
cecho {0C}Error{#}{\n}
8+
echo [91mError[0m
99
EXIT /B 1
1010

1111
:EOF

user/user_programs/shell/BUILD.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ make --makefile=makefile SHELL=cmd || goto ERROR
55
goto EOF
66

77
:ERROR
8-
cecho {0C}Error{#}{\n}
8+
echo [91mError[0m
99
EXIT /B 1
1010

1111
:EOF

user/user_programs/threadtest/BUILD.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ make --makefile=makefile SHELL=cmd || goto ERROR
55
goto EOF
66

77
:ERROR
8-
cecho {0C}Error{#}{\n}
8+
echo [91mError[0m
99
EXIT /B 1
1010

1111
:EOF

user/user_tools/BUILD.BAT

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ mkdir obj >nul 2>&1
66

77
cd src
88

9-
cecho {09}Assembling{0F}{\t}==^> start.asm...{#}
9+
echo|set /p dummy="[94mAssembling[97m ==> start.asm...[0m"
1010
nasm -O32 -f elf start.asm -o ../obj/start.o || goto ERROR
11-
cecho {0a}done{#}{\n}
11+
echo [92mdone[0m
1212

13-
cecho {09}Compiling{0F}{\t}==^> userlib.c...{#}
13+
echo|set /p dummy="[94mCompiling[97m ==> userlib.c...[0m"
1414
i686-elf-gcc -std=c99 -c -Werror -Wall -O -ffreestanding -fleading-underscore -nostdlib -nostdinc -fno-builtin -ffunction-sections -fdata-sections -Iinclude userlib.c -o ../obj/userlib.o || goto ERROR
15-
cecho {0a}done{#}{\n}
15+
echo [92mdone[0m
1616

1717
cd %~d0%~p0
1818

@@ -30,7 +30,7 @@ goto EOF
3030

3131
:ERROR
3232
cd %~d0%~p0
33-
cecho {0C}Error{#}{\n}
33+
echo [91mError[0m
3434
EXIT /B 1
3535

3636
:EOF

0 commit comments

Comments
 (0)